<template>
|
<div class="sys-dict-container">
|
<el-row :gutter="8" style="width: 100%; height: 100%; flex: 1">
|
<el-col :span="24" :xs="24" style="display: flex; height: 100%; flex: 1">
|
<el-card class="full-table" shadow="hover" :body-style="{ height: 'calc(100% - 51px)' }">
|
<template #header>
|
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-Collection /></el-icon>帮助文档内容
|
<span v-show="docTitle">: {{ docTitle }}</span>
|
</template>
|
<div class="boxView">
|
<div v-html="valueHtml"></div>
|
</div>
|
</el-card>
|
</el-col>
|
</el-row>
|
</div>
|
</template>
|
|
<script lang="ts" setup name="sysDict">
|
import { onMounted, reactive, ref, watch } from 'vue';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { pageWmsSysHelpDoc } from '/@/api/main/WmsSystem/wmsSysHelpDoc';
|
import { useRoute } from 'vue-router';
|
const route = useRoute();
|
const state = reactive({
|
loading: false,
|
});
|
|
console.log(route);
|
console.log(route.meta);
|
console.log(route.meta.idMenu);
|
const docTitle = ref("");
|
docTitle.value = route.meta.title || "";
|
const valueHtml = ref('');
|
// 查询字典操作
|
const handleDictTypeQuery = async () => {
|
if (!route.meta.idMenu) {
|
debugger;
|
console.log('路由id未找到');
|
return;
|
}
|
state.loading = true;
|
var res = await pageWmsSysHelpDoc({
|
helpFlagId: route.meta.idMenu,
|
pageSize: 1,
|
});
|
if (res.data.type == 'success') {
|
var arr = res.data.result?.items;
|
if (arr.length > 0 && arr.length == 1) {
|
valueHtml.value = arr[0].helpContext;
|
} else {
|
valueHtml.value = '';
|
}
|
}
|
state.loading = false;
|
};
|
|
onMounted(async () => {
|
handleDictTypeQuery();
|
});
|
</script>
|
<style>
|
img{
|
max-width: 100% !important;
|
}
|
.boxView{
|
height: calc(100vh - 200px);
|
overflow-y: auto;
|
}
|
</style>
|