14 changed files with 3090 additions and 94 deletions
			
			
		| @ -0,0 +1,110 @@ | |||||
|  | import request from '@/utils/request' | ||||
|  | 
 | ||||
|  | export function getDirectoryTree(params) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata/list', | ||||
|  |     method: 'get', | ||||
|  |     params, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function getDirectory(id) { | ||||
|  |   return request({ | ||||
|  |     url: `/default-api/datastd/cata/${id}`, | ||||
|  |     method: 'get', | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function addDirectory(data) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata', | ||||
|  |     method: 'post', | ||||
|  |     data, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function updateDirectory(data) { | ||||
|  |   return request({ | ||||
|  |     url: `/default-api/datastd/cata/edit`, | ||||
|  |     method: 'put', | ||||
|  |     data, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function delDirectory(id) { | ||||
|  |   return request({ | ||||
|  |     url: `/default-api/datastd/cata/${id}`, | ||||
|  |     method: 'delete', | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function addDirectoryCollection(data) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata/bookmark ', | ||||
|  |     method: 'post', | ||||
|  |     data, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function cancelDirectoryCollection(id) { | ||||
|  |   return request({ | ||||
|  |     url: `/default-api/datastd/cata/bookmark/${id}`, | ||||
|  |     method: 'delete', | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function delDirectoryCollection(data) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/system/delete_data_asset_collection', | ||||
|  |     method: 'delete', | ||||
|  |     data, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function moveDirectory(data) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata/moved', | ||||
|  |     method: 'put', | ||||
|  |     data, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function mergeDirectory(data) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata/merge', | ||||
|  |     method: 'put', | ||||
|  |     data, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function delDirectoryAsset(data) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata/removerel', | ||||
|  |     method: 'put', | ||||
|  |     data, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function moveDirectoryAsset(data) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata/moverel', | ||||
|  |     method: 'put', | ||||
|  |     data, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function getDirectoryAsset(params) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata/atree', | ||||
|  |     method: 'get', | ||||
|  |     params, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | export function getHtmlString(params) { | ||||
|  |   return request({ | ||||
|  |     url: '/default-api/datastd/cata/indx/list', | ||||
|  |     method: 'get', | ||||
|  |     params, | ||||
|  |   }) | ||||
|  | } | ||||
| @ -0,0 +1,203 @@ | |||||
|  | <template> | ||||
|  |   <el-dialog width="500px" append-to-body :title="isEdit ? '修改数据标准' : '新增数据标准'" v-model="visible" @close="handleClose"> | ||||
|  |     <el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules"> | ||||
|  | 
 | ||||
|  |          | ||||
|  |         <el-form-item label="标准编号" prop="stdNum"> | ||||
|  |         <el-input v-model="formData.stdNum" :disabled="isEdit" placeholder="请输入标准编号" clearable /> | ||||
|  |       </el-form-item> | ||||
|  |       <el-form-item label="标准中文名" prop="stdName"> | ||||
|  |         <el-input v-model="formData.stdName" placeholder="请输入标准中文名" clearable /> | ||||
|  |       </el-form-item> | ||||
|  |       <el-form-item label="标准英文名" prop="stdCode"> | ||||
|  |         <el-input v-model="formData.stdCode" placeholder="请输入标准英文名" clearable /> | ||||
|  |       </el-form-item> | ||||
|  |       <el-form-item label="标准业务定义" prop="stdMenu"> | ||||
|  |         <el-input v-model="formData.stdMenu" placeholder="请输入标准业务定义" clearable /> | ||||
|  |       </el-form-item> | ||||
|  | 
 | ||||
|  |       <el-form-item label="标准类型" prop="stdType"> | ||||
|  |         <el-select v-model="formData.stdType" placeholder="请输入标准类型"> | ||||
|  |           <el-option label="基础数据" value="0" /> | ||||
|  |           <el-option label="指标数据" value="1" /> | ||||
|  |         </el-select>     | ||||
|  |         </el-form-item> | ||||
|  |         <el-form-item label="标准来源" prop="stdSrc"> | ||||
|  |         <el-select v-model="formData.stdSrc" placeholder="请选择标准来源"> | ||||
|  |           <el-option label="行业标准" value="行业标准" /> | ||||
|  |           <el-option label="自建标准" value="自建标准" /> | ||||
|  |         </el-select>     | ||||
|  |         </el-form-item> | ||||
|  |         <el-form-item label="数据类别" prop="dataClas"> | ||||
|  |         <el-select v-model="formData.dataClas" placeholder="请选择数据类别"> | ||||
|  |           <el-option label="日期类" value="日期类" /> | ||||
|  |           <el-option label="文本类" value="文本类" /> | ||||
|  |           <el-option label="数值类" value="数值类" /> | ||||
|  |           <el-option label="金额类" value="金额类" /> | ||||
|  |           <el-option label="编码类" value="编码类" /> | ||||
|  |           <el-option label="标志类" value="标志类" /> | ||||
|  |           <el-option label="码值类" value="码值类" /> | ||||
|  |         </el-select>     | ||||
|  |         </el-form-item> | ||||
|  |       <el-form-item label="代码编号" prop="codeNum"> | ||||
|  |         <el-input v-model="formData.codeNum" placeholder="请输入代码编号" clearable /> | ||||
|  |       </el-form-item> | ||||
|  |       <el-form-item label="业务认责部门" prop="bussDeptId"> | ||||
|  |        <el-tree-select | ||||
|  |                         v-model="formData.bussDeptId" | ||||
|  |                         :data="deptOptions" | ||||
|  |                         :props="{ value: 'id', label: 'label', children: 'children' }" | ||||
|  |                         value-key="id" | ||||
|  |                         placeholder="请选择业务认责部门" | ||||
|  |                         check-strictly /> | ||||
|  |      </el-form-item> | ||||
|  |      <el-form-item label="业务认责人员" prop="bussUser"> | ||||
|  |         <el-select v-model="formData.bussUser" placeholder="请选择业务认责人员"> | ||||
|  |           <el-option | ||||
|  |                 v-for="dict in userList" | ||||
|  |                 :key="dict.id" | ||||
|  |                 :label="dict.userName" | ||||
|  |                 :value="dict.userName" | ||||
|  |               ></el-option> | ||||
|  |         </el-select>     | ||||
|  |         </el-form-item> | ||||
|  |      <el-form-item label="技术认责部门" prop="techDeptId"> | ||||
|  |                      <el-tree-select | ||||
|  |                         v-model="formData.techDeptId" | ||||
|  |                         :data="deptOptions" | ||||
|  |                         :props="{ value: 'id', label: 'label', children: 'children' }" | ||||
|  |                         value-key="id" | ||||
|  |                         placeholder="请选择技术认责部门" | ||||
|  |                         check-strictly /> | ||||
|  |      </el-form-item> | ||||
|  |      <el-form-item label="技术认责人员" prop="techUser"> | ||||
|  |         <el-select v-model="formData.techUser" placeholder="技术认责人员"> | ||||
|  |           <el-option | ||||
|  |                 v-for="dict in userList" | ||||
|  |                 :key="dict.id" | ||||
|  |                 :label="dict.userName" | ||||
|  |                 :value="dict.userName" | ||||
|  |               ></el-option> | ||||
|  |         </el-select>     | ||||
|  |         </el-form-item> | ||||
|  | 
 | ||||
|  |          <!-- 底部按钮区域 --> | ||||
|  |          <el-row justify="center" style="margin-top: 20px;"> | ||||
|  |         <el-col :span="4" style="padding-right: 10px;"> | ||||
|  |           <el-button @click="handleClose" style="width: 100%" plain>取消</el-button> | ||||
|  |         </el-col> | ||||
|  |         <el-col :span="4" style="padding-left: 10px;"> | ||||
|  |           <el-button type="primary" @click="handleSubmit" style="width: 100%">保存</el-button> | ||||
|  |         </el-col> | ||||
|  |       </el-row> | ||||
|  |    | ||||
|  | 
 | ||||
|  |     </el-form> | ||||
|  |   </el-dialog> | ||||
|  | </template> | ||||
|  | 
 | ||||
|  | <script setup> | ||||
|  | import { ref, watch } from 'vue'; | ||||
|  | import { updateStdMain, addStdMain } from '@/api/datastd/std'; // 确保接口存在 | ||||
|  | import {  listUser,  deptTreeSelect } from "@/api/system/user"; | ||||
|  | const { proxy } = getCurrentInstance(); | ||||
|  | const { std_code_status,std_code_appr } = proxy.useDict("std_code_status","std_code_appr"); | ||||
|  | 
 | ||||
|  | const props = defineProps({ | ||||
|  |   data: { | ||||
|  |     type: Object, | ||||
|  |     required: false, | ||||
|  |   }, | ||||
|  |   isEdit: { | ||||
|  |     type: Boolean, | ||||
|  |   }, | ||||
|  |   dbResourceOldList: { | ||||
|  |     type: Object, | ||||
|  |   }, | ||||
|  |   visible: { | ||||
|  |     type: Boolean, | ||||
|  |   }, | ||||
|  | }); | ||||
|  | // 定义表单校验规则 | ||||
|  | const formRules = ref({ | ||||
|  |   stdNum: [{ required: true, message: '请输入标准编号', trigger: 'blur' }], | ||||
|  |   stdType: [{ required: true, message: '请选择标准类型', trigger: 'change' }], | ||||
|  |   stdSrc: [{ required: true, message: '请选择标准来源', trigger: 'change' }], | ||||
|  |   dataClas: [{ required: true, message: '请选择数据类别', trigger: 'change' }], | ||||
|  |   bussDeptId: [{ required: true, message: '请选择业务认责部门', trigger: 'blur' }], | ||||
|  |   techDeptId: [{ required: true, message: '请选择技术认责部门', trigger: 'blur' }], | ||||
|  |   bussUser: [{ required: true, message: '请输入业务认责人', trigger: 'blur' }], | ||||
|  |   techUser: [{ required: true, message: '请输入技术认责人', trigger: 'blur' }], | ||||
|  | }); | ||||
|  | const showSys = ref(false); | ||||
|  | const emit = defineEmits(['update:visible', 'refresh']); | ||||
|  | const userList = ref([]); | ||||
|  | const formData = ref({ ...props.data }); | ||||
|  | const visible = ref(props.visible);  // 使用 prop 传入的 visible | ||||
|  | function dataChange(data) { | ||||
|  |   // 从 dbResourceOldList 中查找对应的 name | ||||
|  |   const selectedItem = props.dbResourceOldList.find(item => item.id === data); | ||||
|  |   if (selectedItem) { | ||||
|  |     // 如果找到对应的项,将 name 赋值给 formData.value.dbRName | ||||
|  |     formData.value.sysName = selectedItem.name; | ||||
|  |   } else { | ||||
|  |     // 如果未找到,清空 formData.value.dbRName | ||||
|  |     formData.value.sysName = ''; | ||||
|  |   } | ||||
|  | } | ||||
|  | // 监听 props.visible 的变化,确保同步到 local visible | ||||
|  | watch(() => props.visible, (newVal) => { | ||||
|  |   visible.value = newVal; | ||||
|  |   formData.value = { ...props.data } | ||||
|  | }); | ||||
|  | 
 | ||||
|  | function getList() { | ||||
|  |   listUser({pageSize:1000,pageNum:1}).then(res => { | ||||
|  |     userList.value = res.rows; | ||||
|  |   }); | ||||
|  | }; | ||||
|  | const handleClose = () => { | ||||
|  |   emit('update:visible', false);  // 关闭弹框 | ||||
|  | }; | ||||
|  | const deptOptions = ref(undefined); | ||||
|  | 
 | ||||
|  | function getDeptTree() { | ||||
|  |   deptTreeSelect().then(response => { | ||||
|  |     deptOptions.value = response.data; | ||||
|  |   }); | ||||
|  | }; | ||||
|  | function changeCodeType(data) { | ||||
|  |   if (data != "company") { | ||||
|  |     showSys.value = true; | ||||
|  |     formData.value.sysName = ""; | ||||
|  |     formData.value.sysId = undefined; | ||||
|  |   } else { | ||||
|  |     showSys.value = false; | ||||
|  |     formData.value.sysName = "公司级"; | ||||
|  |     formData.value.sysId = 10000; | ||||
|  |   } | ||||
|  | } | ||||
|  | getDeptTree(); | ||||
|  | getList(); | ||||
|  | const handleSubmit = () => { | ||||
|  |   const formRef = proxy.$refs.formRef; | ||||
|  |   formRef.validate((valid) => { | ||||
|  |     if (valid) { | ||||
|  |       const apiCall = props.isEdit ? updateStdMain(formData.value) : addStdMain(formData.value); | ||||
|  |       apiCall | ||||
|  |         .then((response) => { | ||||
|  |           console.log(response.success,"sssssssss") | ||||
|  |           if (response.success) { | ||||
|  |             emit('refresh'); | ||||
|  |             handleClose(); | ||||
|  |           } else { | ||||
|  |             proxy.$message.error(response.data || '操作失败,请稍后重试'); | ||||
|  |           } | ||||
|  |         }) | ||||
|  |     } else { | ||||
|  |       console.log('表单验证失败'); | ||||
|  |       return false; | ||||
|  |     } | ||||
|  |   }); | ||||
|  | }; | ||||
|  | </script> | ||||
| @ -0,0 +1,171 @@ | |||||
|  | <template> | ||||
|  |   <el-dialog width="800px" append-to-body :title="title" v-model="open"> | ||||
|  |     <el-form label-width="100px" ref="formRef" :model="form" :rules="rules"> | ||||
|  |       <el-row :gutter="16"> | ||||
|  |         <el-col :span="11"> | ||||
|  |           <el-form-item label="当前资产" prop="dataAstCnName"> | ||||
|  |             <el-input :disabled="true" v-model="form.dataAstCnName" /> | ||||
|  |           </el-form-item> | ||||
|  |           <el-form-item label="当前资产简介" prop="dataAstDesc"> | ||||
|  |             <el-input | ||||
|  |               placeholder="自动带入" | ||||
|  |               type="textarea" | ||||
|  |               :disabled="true" | ||||
|  |               :rows="8" | ||||
|  |               v-model="form.dataAstDesc" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |         </el-col> | ||||
|  |         <el-col :span="2"> | ||||
|  |           <div class="arrow"> | ||||
|  |             <span>········</span> | ||||
|  |             <el-icon><Right /></el-icon> | ||||
|  |           </div> | ||||
|  |         </el-col> | ||||
|  |         <el-col :span="11"> | ||||
|  |           <el-form-item label="目标分类" prop="contentOnumAfter"> | ||||
|  |             <el-tree-select | ||||
|  |               check-strictly | ||||
|  |               value-key="contentOnum" | ||||
|  |               placeholder="选择目标分类" | ||||
|  |               :default-expand-all="true" | ||||
|  |               :disabled="disabled" | ||||
|  |               :clearable="true" | ||||
|  |               :data="localDirectoryTree" | ||||
|  |               :props="{ | ||||
|  |                 value: 'contentOnum', | ||||
|  |                 label: 'contentName', | ||||
|  |                 children: 'children', | ||||
|  |               }" | ||||
|  |               v-model="form.contentOnumAfter" | ||||
|  |               @node-click="handleTargetCatalogNodeClick" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |           <el-form-item label="目标分类简介" prop="contentIntrAfter"> | ||||
|  |             <el-input | ||||
|  |               placeholder="自动带入" | ||||
|  |               type="textarea" | ||||
|  |               :disabled="true" | ||||
|  |               :rows="8" | ||||
|  |               v-model="form.contentIntrAfter" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |         </el-col> | ||||
|  |       </el-row> | ||||
|  |     </el-form> | ||||
|  |     <template #footer> | ||||
|  |       <div class="dialog-footer"> | ||||
|  |         <el-button @click="cancel">取消</el-button> | ||||
|  |         <el-button type="primary" :disabled="disabled" @click="submitForm" | ||||
|  |           >确定</el-button | ||||
|  |         > | ||||
|  |       </div> | ||||
|  |     </template> | ||||
|  |   </el-dialog> | ||||
|  | </template> | ||||
|  | 
 | ||||
|  | <script setup> | ||||
|  | import { nextTick } from 'vue' | ||||
|  | import { moveDirectoryAsset } from '@/api/datastd/directory' | ||||
|  | 
 | ||||
|  | const props = defineProps({ | ||||
|  |   directoryTree: { | ||||
|  |     type: Array, | ||||
|  |     required: true, | ||||
|  |   }, | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const filterTree = (tree, conditionFn) => { | ||||
|  |   return tree | ||||
|  |     .map((node) => { | ||||
|  |       // 递归处理每个节点的子节点 | ||||
|  |       const filteredChildren = node.children | ||||
|  |         ? filterTree(node.children, conditionFn) | ||||
|  |         : [] | ||||
|  |       // 根据条件判断是否保留当前节点 | ||||
|  |       if (conditionFn(node)) { | ||||
|  |         // 返回新的节点结构,保留符合条件的子节点 | ||||
|  |         return { | ||||
|  |           ...node, | ||||
|  |           children: filteredChildren, | ||||
|  |         } | ||||
|  |       } | ||||
|  |       // 如果不符合条件,返回 null,不加入到最终结果中 | ||||
|  |       return null | ||||
|  |     }) | ||||
|  |     .filter(Boolean) // 移除值为 null 的项 | ||||
|  | } | ||||
|  | 
 | ||||
|  | const localDirectoryTree = computed(() => { | ||||
|  |   const tree = props.directoryTree | ||||
|  |   return filterTree(tree, (node) => node.contentOnum && !node.astOnum) // 过滤资产子节点 | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const title = ref('') | ||||
|  | const open = ref(false) | ||||
|  | const disabled = ref(false) | ||||
|  | const { proxy } = getCurrentInstance() | ||||
|  | const form = ref({}) | ||||
|  | const rules = ref({ | ||||
|  |   targetContentOnum: [ | ||||
|  |     { required: true, message: '目标分类不能为空', trigger: 'blur' }, | ||||
|  |   ], | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const formRef = ref(null) | ||||
|  | const openDialog = (row) => { | ||||
|  |   open.value = true | ||||
|  |   form.value = { | ||||
|  |     relaOnum: undefined, | ||||
|  |     contentOnum: undefined, | ||||
|  |     contentOnumAfter: undefined, | ||||
|  |   } | ||||
|  |   if (row.relaOnum) { | ||||
|  |     form.value = { | ||||
|  |       ...form.value, | ||||
|  |       ...row, | ||||
|  |     } | ||||
|  |   } | ||||
|  |   nextTick(() => { | ||||
|  |     formRef.value.clearValidate() | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleTargetCatalogNodeClick = (data) => { | ||||
|  |   form.value = { | ||||
|  |     ...form.value, | ||||
|  |     contentIntrAfter: data.contentIntr, | ||||
|  |   } | ||||
|  | } | ||||
|  | 
 | ||||
|  | const emit = defineEmits(['onSuccess']) | ||||
|  | const submitForm = () => { | ||||
|  |   formRef.value.validate((valid) => { | ||||
|  |     if (valid) { | ||||
|  |       moveDirectoryAsset(form.value).then((response) => { | ||||
|  |         proxy.$modal.msgSuccess('移动成功') | ||||
|  |         open.value = false | ||||
|  |         emit('onSuccess') | ||||
|  |       }) | ||||
|  |     } | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const cancel = () => { | ||||
|  |   open.value = false | ||||
|  | } | ||||
|  | 
 | ||||
|  | defineExpose({ title, disabled, openDialog }) | ||||
|  | </script> | ||||
|  | 
 | ||||
|  | <style lang="scss" scoped> | ||||
|  | .arrow { | ||||
|  |   display: flex; | ||||
|  |   font-size: 18px; | ||||
|  |   text-align: center; | ||||
|  |   margin: 8px auto; | ||||
|  |   span { | ||||
|  |     line-height: 18px; | ||||
|  |   } | ||||
|  | } | ||||
|  | </style> | ||||
| @ -0,0 +1,193 @@ | |||||
|  | <template> | ||||
|  |   <el-dialog width="600px" append-to-body :title="title" v-model="open"> | ||||
|  |     <el-form label-width="100px" ref="formRef" :model="form" :rules="rules"> | ||||
|  |       <el-form-item label="分类名称" prop="contentName"> | ||||
|  |         <el-input | ||||
|  |           placeholder="请输入分类名称" | ||||
|  |           :disabled="disabled" | ||||
|  |           v-model="form.contentName" | ||||
|  |         /> | ||||
|  |       </el-form-item> | ||||
|  |       <el-form-item label="上级分类" prop="suprContentOnum"> | ||||
|  |         <el-tree-select | ||||
|  |           check-strictly | ||||
|  |           value-key="contentOnum" | ||||
|  |           placeholder="请选择上级分类" | ||||
|  |           :default-expand-all="true" | ||||
|  |           :disabled="disabled" | ||||
|  |           :clearable="true" | ||||
|  |           :data="localDirectoryTree" | ||||
|  |           :props="{ | ||||
|  |             value: 'contentOnum', | ||||
|  |             label: 'contentName', | ||||
|  |             children: 'children', | ||||
|  |           }" | ||||
|  |           v-model="form.suprContentOnum" | ||||
|  |         > | ||||
|  |         </el-tree-select> | ||||
|  |       </el-form-item> | ||||
|  |       <el-form-item label="负责人" prop="contentPic"> | ||||
|  |         <el-input | ||||
|  |           placeholder="请输入负责人" | ||||
|  |           :disabled="disabled" | ||||
|  |           v-model="form.contentPic" | ||||
|  |         /> | ||||
|  |       </el-form-item> | ||||
|  |       <el-form-item label="分类简介" prop="contentIntr"> | ||||
|  |         <el-input | ||||
|  |           placeholder="请输入分类简介" | ||||
|  |           type="textarea" | ||||
|  |           :disabled="disabled" | ||||
|  |           :rows="8" | ||||
|  |           v-model="form.contentIntr" | ||||
|  |         /> | ||||
|  |       </el-form-item> | ||||
|  |     </el-form> | ||||
|  |     <template #footer> | ||||
|  |       <div class="dialog-footer"> | ||||
|  |         <el-button @click="cancel">取消</el-button> | ||||
|  |         <el-button type="primary" :disabled="disabled" @click="submitForm" | ||||
|  |           >确定</el-button | ||||
|  |         > | ||||
|  |       </div> | ||||
|  |     </template> | ||||
|  |   </el-dialog> | ||||
|  | </template> | ||||
|  | 
 | ||||
|  | <script setup> | ||||
|  | import { computed, nextTick } from 'vue' | ||||
|  | import { | ||||
|  |   getDirectory, | ||||
|  |   addDirectory, | ||||
|  |   updateDirectory, | ||||
|  |   getDirectoryAsset, | ||||
|  | } from '@/api/datastd/directory' | ||||
|  | 
 | ||||
|  | const props = defineProps({ | ||||
|  |   directoryTree: { | ||||
|  |     type: Array, | ||||
|  |     required: true, | ||||
|  |   }, | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const filterTree = (tree, conditionFn) => { | ||||
|  |   return tree | ||||
|  |     .map((node) => { | ||||
|  |       // 递归处理每个节点的子节点 | ||||
|  |       const filteredChildren = node.children | ||||
|  |         ? filterTree(node.children, conditionFn) | ||||
|  |         : [] | ||||
|  |       // 根据条件判断是否保留当前节点 | ||||
|  |       if (conditionFn(node)) { | ||||
|  |         // 返回新的节点结构,保留符合条件的子节点 | ||||
|  |         return { | ||||
|  |           ...node, | ||||
|  |           children: filteredChildren, | ||||
|  |         } | ||||
|  |       } | ||||
|  |       // 如果不符合条件,返回 null,不加入到最终结果中 | ||||
|  |       return null | ||||
|  |     }) | ||||
|  |     .filter(Boolean) // 移除值为 null 的项 | ||||
|  | } | ||||
|  | 
 | ||||
|  | const localDirectoryTree = computed(() => { | ||||
|  |   const tree = props.directoryTree | ||||
|  |   return filterTree(tree, (node) => node.contentOnum && !node.astOnum) // 过滤资产子节点 | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const title = ref('') | ||||
|  | const open = ref(false) | ||||
|  | const disabled = ref(false) | ||||
|  | const { proxy } = getCurrentInstance() | ||||
|  | const form = ref({}) | ||||
|  | const rules = ref({ | ||||
|  |   contentName: [ | ||||
|  |     { required: true, message: '分类名称不能为空', trigger: 'blur' }, | ||||
|  |   ], | ||||
|  |   suprContentOnum: [ | ||||
|  |     { required: true, message: '上级分类不能为空', trigger: 'blur' }, | ||||
|  |   ], | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const formRef = ref(null) | ||||
|  | const openDialog = (row) => { | ||||
|  |   open.value = true | ||||
|  |   form.value = { | ||||
|  |     contentName: undefined, | ||||
|  |     suprContentOnum: undefined, | ||||
|  |     contentPic: undefined, | ||||
|  |     contentStat: '1', // 0-废弃,1-有效,2-停用 | ||||
|  |     contentIntr: undefined, | ||||
|  |     children: [], | ||||
|  |   } | ||||
|  |   if (row.contentOnum || row.suprContentOnum) { | ||||
|  |     form.value = { | ||||
|  |       ...form.value, | ||||
|  |       ...row, | ||||
|  |       assets: | ||||
|  |         row.children && | ||||
|  |         row.children.length && | ||||
|  |         row.children.find((i) => i.astOnum) | ||||
|  |           ? [...row.children].map((i) => i.astOnum) | ||||
|  |           : [], // 新增冗余字段来暂存资产编号 | ||||
|  |     } | ||||
|  |   } | ||||
|  |   nextTick(() => { | ||||
|  |     formRef.value.clearValidate() | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const addTreeNodeId = (tree) => { | ||||
|  |   return tree.map((node, index) => { | ||||
|  |     return { | ||||
|  |       ...node, | ||||
|  |       id: node.dataAssetCatalogAstno || index, | ||||
|  |       children: | ||||
|  |         node.children && node.children.length | ||||
|  |           ? addTreeNodeId(node.children) | ||||
|  |           : [], | ||||
|  |     } | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | const emit = defineEmits(['onSuccess']) | ||||
|  | const submitForm = () => { | ||||
|  |   formRef.value.validate((valid) => { | ||||
|  |     if (valid) { | ||||
|  |       const children = form.value.assets.reduce((arr, cur) => { | ||||
|  |         const item = form.value.children.find((i) => i.astOnum === cur) | ||||
|  |         if (!item) { | ||||
|  |           arr.push({ | ||||
|  |             contentOnum: form.value.contentOnum, | ||||
|  |             astOnum: cur, | ||||
|  |           }) | ||||
|  |         } else { | ||||
|  |           arr.push(item) | ||||
|  |         } | ||||
|  |         return arr | ||||
|  |       }, []) | ||||
|  |       form.value = { | ||||
|  |         ...form.value, | ||||
|  |         children, | ||||
|  |       } | ||||
|  |       const request = form.value.contentOnum ? updateDirectory : addDirectory | ||||
|  |       request(form.value).then((response) => { | ||||
|  |         proxy.$modal.msgSuccess( | ||||
|  |           form.value.contentOnum ? '修改成功' : '新增成功' | ||||
|  |         ) | ||||
|  |         open.value = false | ||||
|  |         emit('onSuccess') | ||||
|  |       }) | ||||
|  |     } | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const cancel = () => { | ||||
|  |   open.value = false | ||||
|  | } | ||||
|  | 
 | ||||
|  | defineExpose({ title, disabled, openDialog }) | ||||
|  | </script> | ||||
| @ -0,0 +1,175 @@ | |||||
|  | <template> | ||||
|  |   <el-dialog width="800px" append-to-body :title="title" v-model="open"> | ||||
|  |     <el-form label-width="100px" ref="formRef" :model="form" :rules="rules"> | ||||
|  |       <el-row :gutter="16"> | ||||
|  |         <el-col :span="11"> | ||||
|  |           <el-form-item label="当前目录" prop="contentName"> | ||||
|  |             <el-input :disabled="true" v-model="form.contentName" /> | ||||
|  |           </el-form-item> | ||||
|  |           <el-form-item label="当前目录简介" prop="contentIntr"> | ||||
|  |             <el-input | ||||
|  |               placeholder="自动带入" | ||||
|  |               type="textarea" | ||||
|  |               :disabled="true" | ||||
|  |               :rows="8" | ||||
|  |               v-model="form.contentIntr" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |         </el-col> | ||||
|  |         <el-col :span="2"> | ||||
|  |           <div class="arrow"> | ||||
|  |             <span>········</span> | ||||
|  |             <el-icon><Right /></el-icon> | ||||
|  |           </div> | ||||
|  |         </el-col> | ||||
|  |         <el-col :span="11"> | ||||
|  |           <el-form-item label="目标目录" prop="contentOnumAfter"> | ||||
|  |             <el-tree-select | ||||
|  |               check-strictly | ||||
|  |               value-key="contentOnum" | ||||
|  |               placeholder="选择目标目录" | ||||
|  |               :default-expand-all="true" | ||||
|  |               :disabled="disabled" | ||||
|  |               :clearable="true" | ||||
|  |               :data="localDirectoryTree" | ||||
|  |               :props="{ | ||||
|  |                 value: 'contentOnum', | ||||
|  |                 label: 'contentName', | ||||
|  |                 children: 'children', | ||||
|  |               }" | ||||
|  |               v-model="form.contentOnumAfter" | ||||
|  |               @node-click="handleTargetCatalogNodeClick" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |           <el-form-item label="目标目录简介" prop="contentIntrAfter"> | ||||
|  |             <el-input | ||||
|  |               placeholder="自动带入" | ||||
|  |               type="textarea" | ||||
|  |               :disabled="true" | ||||
|  |               :rows="8" | ||||
|  |               v-model="form.contentIntrAfter" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |         </el-col> | ||||
|  |       </el-row> | ||||
|  |     </el-form> | ||||
|  |     <template #footer> | ||||
|  |       <div class="dialog-footer"> | ||||
|  |         <el-button @click="cancel">取消</el-button> | ||||
|  |         <el-button type="primary" :disabled="disabled" @click="submitForm" | ||||
|  |           >确定</el-button | ||||
|  |         > | ||||
|  |       </div> | ||||
|  |     </template> | ||||
|  |   </el-dialog> | ||||
|  | </template> | ||||
|  | 
 | ||||
|  | <script setup> | ||||
|  | import { nextTick } from 'vue' | ||||
|  | import { mergeDirectory } from '@/api/datastd/directory' | ||||
|  | 
 | ||||
|  | const props = defineProps({ | ||||
|  |   directoryTree: { | ||||
|  |     type: Array, | ||||
|  |     required: true, | ||||
|  |   }, | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const filterTree = (tree, conditionFn) => { | ||||
|  |   return tree | ||||
|  |     .map((node) => { | ||||
|  |       // 递归处理每个节点的子节点 | ||||
|  |       const filteredChildren = node.children | ||||
|  |         ? filterTree(node.children, conditionFn) | ||||
|  |         : [] | ||||
|  |       // 根据条件判断是否保留当前节点 | ||||
|  |       if (conditionFn(node)) { | ||||
|  |         // 返回新的节点结构,保留符合条件的子节点 | ||||
|  |         return { | ||||
|  |           ...node, | ||||
|  |           children: filteredChildren, | ||||
|  |         } | ||||
|  |       } | ||||
|  |       // 如果不符合条件,返回 null,不加入到最终结果中 | ||||
|  |       return null | ||||
|  |     }) | ||||
|  |     .filter(Boolean) // 移除值为 null 的项 | ||||
|  | } | ||||
|  | 
 | ||||
|  | const localDirectoryTree = computed(() => { | ||||
|  |   const tree = props.directoryTree | ||||
|  |   return filterTree(tree, (node) => node.contentOnum && !node.astOnum) // 过滤资产子节点 | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const title = ref('') | ||||
|  | const open = ref(false) | ||||
|  | const disabled = ref(false) | ||||
|  | const { proxy } = getCurrentInstance() | ||||
|  | const form = ref({}) | ||||
|  | const rules = ref({ | ||||
|  |   contentOnumAfter: [ | ||||
|  |     { required: true, message: '目标目录不能为空', trigger: 'blur' }, | ||||
|  |   ], | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const formRef = ref(null) | ||||
|  | const openDialog = (row) => { | ||||
|  |   open.value = true | ||||
|  |   form.value = { | ||||
|  |     contentOnum: undefined, | ||||
|  |     suprContentOnum: undefined, | ||||
|  |     contentIntr: undefined, | ||||
|  |     contentOnumAfter: undefined, | ||||
|  |     suprContentOnumAfter: undefined, | ||||
|  |     contentIntrAfter: undefined, | ||||
|  |   } | ||||
|  |   if (row.contentOnum) { | ||||
|  |     form.value = { | ||||
|  |       ...form.value, | ||||
|  |       ...row, | ||||
|  |     } | ||||
|  |   } | ||||
|  |   nextTick(() => { | ||||
|  |     formRef.value.clearValidate() | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleTargetCatalogNodeClick = (data) => { | ||||
|  |   form.value = { | ||||
|  |     ...form.value, | ||||
|  |     suprContentOnumAfter: data.suprContentOnum, | ||||
|  |     contentIntrAfter: data.contentIntr, | ||||
|  |   } | ||||
|  | } | ||||
|  | 
 | ||||
|  | const emit = defineEmits(['onSuccess']) | ||||
|  | const submitForm = () => { | ||||
|  |   formRef.value.validate((valid) => { | ||||
|  |     if (valid) { | ||||
|  |       mergeDirectory(form.value).then((response) => { | ||||
|  |         proxy.$modal.msgSuccess('合并成功') | ||||
|  |         open.value = false | ||||
|  |         emit('onSuccess') | ||||
|  |       }) | ||||
|  |     } | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const cancel = () => { | ||||
|  |   open.value = false | ||||
|  | } | ||||
|  | 
 | ||||
|  | defineExpose({ title, disabled, openDialog }) | ||||
|  | </script> | ||||
|  | 
 | ||||
|  | <style lang="scss" scoped> | ||||
|  | .arrow { | ||||
|  |   display: flex; | ||||
|  |   font-size: 18px; | ||||
|  |   text-align: center; | ||||
|  |   margin: 8px auto; | ||||
|  |   span { | ||||
|  |     line-height: 18px; | ||||
|  |   } | ||||
|  | } | ||||
|  | </style> | ||||
| @ -0,0 +1,173 @@ | |||||
|  | <template> | ||||
|  |   <el-dialog width="800px" append-to-body :title="title" v-model="open"> | ||||
|  |     <el-form label-width="100px" ref="formRef" :model="form" :rules="rules"> | ||||
|  |       <el-row :gutter="16"> | ||||
|  |         <el-col :span="11"> | ||||
|  |           <el-form-item label="当前分类" prop="contentName"> | ||||
|  |             <el-input :disabled="true" v-model="form.contentName" /> | ||||
|  |           </el-form-item> | ||||
|  |           <el-form-item label="当前分类简介" prop="contentIntr"> | ||||
|  |             <el-input | ||||
|  |               placeholder="自动带入" | ||||
|  |               type="textarea" | ||||
|  |               :disabled="true" | ||||
|  |               :rows="8" | ||||
|  |               v-model="form.contentIntr" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |         </el-col> | ||||
|  |         <el-col :span="2"> | ||||
|  |           <div class="arrow"> | ||||
|  |             <span>········</span> | ||||
|  |             <el-icon><Right /></el-icon> | ||||
|  |           </div> | ||||
|  |         </el-col> | ||||
|  |         <el-col :span="11"> | ||||
|  |           <el-form-item label="目标分类" prop="suprContentOnumAfter"> | ||||
|  |             <el-tree-select | ||||
|  |               check-strictly | ||||
|  |               value-key="contentOnum" | ||||
|  |               placeholder="选择目标分类" | ||||
|  |               :default-expand-all="true" | ||||
|  |               :disabled="disabled" | ||||
|  |               :clearable="true" | ||||
|  |               :data="localDirectoryTree" | ||||
|  |               :props="{ | ||||
|  |                 value: 'contentOnum', | ||||
|  |                 label: 'contentName', | ||||
|  |                 children: 'children', | ||||
|  |               }" | ||||
|  |               v-model="form.suprContentOnumAfter" | ||||
|  |               @node-click="handleTargetCatalogNodeClick" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |           <el-form-item label="目标分类简介" prop="contentIntrAfter"> | ||||
|  |             <el-input | ||||
|  |               placeholder="自动带入" | ||||
|  |               type="textarea" | ||||
|  |               :disabled="true" | ||||
|  |               :rows="8" | ||||
|  |               v-model="form.contentIntrAfter" | ||||
|  |             /> | ||||
|  |           </el-form-item> | ||||
|  |         </el-col> | ||||
|  |       </el-row> | ||||
|  |     </el-form> | ||||
|  |     <template #footer> | ||||
|  |       <div class="dialog-footer"> | ||||
|  |         <el-button @click="cancel">取消</el-button> | ||||
|  |         <el-button type="primary" :disabled="disabled" @click="submitForm" | ||||
|  |           >确定</el-button | ||||
|  |         > | ||||
|  |       </div> | ||||
|  |     </template> | ||||
|  |   </el-dialog> | ||||
|  | </template> | ||||
|  | 
 | ||||
|  | <script setup> | ||||
|  | import { nextTick } from 'vue' | ||||
|  | import { moveDirectory } from '@/api/datastd/directory' | ||||
|  | 
 | ||||
|  | const props = defineProps({ | ||||
|  |   directoryTree: { | ||||
|  |     type: Array, | ||||
|  |     required: true, | ||||
|  |   }, | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const filterTree = (tree, conditionFn) => { | ||||
|  |   return tree | ||||
|  |     .map((node) => { | ||||
|  |       // 递归处理每个节点的子节点 | ||||
|  |       const filteredChildren = node.children | ||||
|  |         ? filterTree(node.children, conditionFn) | ||||
|  |         : [] | ||||
|  |       // 根据条件判断是否保留当前节点 | ||||
|  |       if (conditionFn(node)) { | ||||
|  |         // 返回新的节点结构,保留符合条件的子节点 | ||||
|  |         return { | ||||
|  |           ...node, | ||||
|  |           children: filteredChildren, | ||||
|  |         } | ||||
|  |       } | ||||
|  |       // 如果不符合条件,返回 null,不加入到最终结果中 | ||||
|  |       return null | ||||
|  |     }) | ||||
|  |     .filter(Boolean) // 移除值为 null 的项 | ||||
|  | } | ||||
|  | 
 | ||||
|  | const localDirectoryTree = computed(() => { | ||||
|  |   const tree = props.directoryTree | ||||
|  |   return filterTree(tree, (node) => node.contentOnum && !node.astOnum) // 过滤资产子节点 | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const title = ref('') | ||||
|  | const open = ref(false) | ||||
|  | const disabled = ref(false) | ||||
|  | const { proxy } = getCurrentInstance() | ||||
|  | const form = ref({}) | ||||
|  | const rules = ref({ | ||||
|  |   suprContentOnumAfter: [ | ||||
|  |     { required: true, message: '目标分类不能为空', trigger: 'blur' }, | ||||
|  |   ], | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const formRef = ref(null) | ||||
|  | const openDialog = (row) => { | ||||
|  |   open.value = true | ||||
|  |   form.value = { | ||||
|  |     contentOnum: undefined, | ||||
|  |     contentIntr: undefined, | ||||
|  |     suprContentOnum: undefined, | ||||
|  |     suprContentOnumAfter: undefined, | ||||
|  |     contentIntrAfter: undefined, | ||||
|  |   } | ||||
|  |   if (row.contentOnum) { | ||||
|  |     form.value = { | ||||
|  |       ...form.value, | ||||
|  |       ...row, | ||||
|  |     } | ||||
|  |   } | ||||
|  |   nextTick(() => { | ||||
|  |     formRef.value.clearValidate() | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleTargetCatalogNodeClick = (data) => { | ||||
|  |   form.value = { | ||||
|  |     ...form.value, | ||||
|  |     contentIntrAfter: data.contentIntr, | ||||
|  |   } | ||||
|  | } | ||||
|  | 
 | ||||
|  | const emit = defineEmits(['onSuccess']) | ||||
|  | const submitForm = () => { | ||||
|  |   formRef.value.validate((valid) => { | ||||
|  |     if (valid) { | ||||
|  |       moveDirectory(form.value).then((response) => { | ||||
|  |         proxy.$modal.msgSuccess('移动成功') | ||||
|  |         open.value = false | ||||
|  |         emit('onSuccess') | ||||
|  |       }) | ||||
|  |     } | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const cancel = () => { | ||||
|  |   open.value = false | ||||
|  | } | ||||
|  | 
 | ||||
|  | defineExpose({ title, disabled, openDialog }) | ||||
|  | </script> | ||||
|  | 
 | ||||
|  | <style lang="scss" scoped> | ||||
|  | .arrow { | ||||
|  |   display: flex; | ||||
|  |   font-size: 18px; | ||||
|  |   text-align: center; | ||||
|  |   margin: 8px auto; | ||||
|  |   span { | ||||
|  |     line-height: 18px; | ||||
|  |   } | ||||
|  | } | ||||
|  | </style> | ||||
| @ -0,0 +1,651 @@ | |||||
|  | <template> | ||||
|  |   <div class="app-container"> | ||||
|  |     <el-row :gutter="16"> | ||||
|  |       <el-col :span="5"> | ||||
|  |           <el-input | ||||
|  |             v-model="filterText" | ||||
|  |             style="width: 100%" | ||||
|  |             placeholder="搜索分类名称" | ||||
|  |           > | ||||
|  |             <template #prefix> | ||||
|  |               <el-icon><Search /></el-icon> | ||||
|  |             </template> | ||||
|  |           </el-input> | ||||
|  |           <div class="tree-box"> | ||||
|  |             <el-tree | ||||
|  |               class="tree" | ||||
|  |               ref="treeRef" | ||||
|  |               node-key="tempId" | ||||
|  |               :default-expand-all="true" | ||||
|  |               :highlight-current="true" | ||||
|  |               :expand-on-click-node="false" | ||||
|  |               :data="directoryTree" | ||||
|  |               :props="defaultProps" | ||||
|  |               :filter-node-method="filterNode" | ||||
|  |               :current-node-key="currentNode.tempId" | ||||
|  |               @node-click="handleNodeClick" | ||||
|  |             > | ||||
|  |               <template #default="{ data }"> | ||||
|  |                 <div class="custom-tree-node"> | ||||
|  |                   <el-space :size="2"> | ||||
|  |                     <el-icon v-if="!isCollectionDirectory(data)"> | ||||
|  |         <Folder /> | ||||
|  |       </el-icon> | ||||
|  |       <el-icon v-else :style="isCollectionDirectory(data) ? { color: '#E6A23C' } : {}"> | ||||
|  |         <FolderRemove /> | ||||
|  |       </el-icon> | ||||
|  |                     <span :style="isCollectionDirectory(data) ? { color: '#E6A23C' } : {}"> | ||||
|  |         {{ data.contentName || data.dataAstCnName }} | ||||
|  |       </span>                  </el-space> | ||||
|  |                   <div | ||||
|  |                     v-if="!isCollectionDirectory(data)" | ||||
|  |                     class="tree-node__action" | ||||
|  |                   > | ||||
|  |                     <template v-if="isAsset(data)"> | ||||
|  |                       <el-button | ||||
|  |                         v-if="!isCollected(data)" | ||||
|  |                         link | ||||
|  |                         type="warning" | ||||
|  |                         icon="Star" | ||||
|  |                         @click="(e) => handleCollect(data, e)" | ||||
|  |                       ></el-button> | ||||
|  |                       <el-button | ||||
|  |                         v-else | ||||
|  |                         link | ||||
|  |                         type="warning" | ||||
|  |                         style="margin-right: -2px" | ||||
|  |                         @click="(e) => handleCollectionCancel(data, e)" | ||||
|  |                       > | ||||
|  |                         <el-icon slot="icon" size="18" color="#E6A23C"> | ||||
|  |                           <StarFilled /> | ||||
|  |                         </el-icon> | ||||
|  |                       </el-button> | ||||
|  |                     </template> | ||||
|  |                     <el-dropdown | ||||
|  |                       v-if=" | ||||
|  |                         !isCollection(data) && | ||||
|  |                         (isDirectory(data) || isRoot(data)) && | ||||
|  |                         hasPermiOr([ | ||||
|  |                           'dataAsset:directory:add', | ||||
|  |                           'dataAsset:directory:edit', | ||||
|  |                           'dataAsset:directory:remove', | ||||
|  |                           'dataAsset:directory:move', | ||||
|  |                           'dataAsset:directory:merge', | ||||
|  |                         ]) | ||||
|  |                       " | ||||
|  |                       placement="right-start" | ||||
|  |                       @command="(command) => handleCommand(command, data)" | ||||
|  |                     > | ||||
|  |                       <el-button | ||||
|  |                         style="margin-left: 4px" | ||||
|  |                         link | ||||
|  |                         type="primary" | ||||
|  |                         icon="Menu" | ||||
|  |                       ></el-button> | ||||
|  |                       <template #dropdown> | ||||
|  |                         <el-dropdown-menu> | ||||
|  |                           <el-dropdown-item | ||||
|  |                             v-if=" | ||||
|  |                               isRoot(data) && | ||||
|  |                               hasPermiOr(['dataAsset:directory:add']) | ||||
|  |                             " | ||||
|  |                             command="handleAddDialogOpen" | ||||
|  |                           > | ||||
|  |                             新增分类 | ||||
|  |                           </el-dropdown-item> | ||||
|  |                           <template v-if="isDirectory(data)"> | ||||
|  |                             <el-dropdown-item | ||||
|  |                               v-if="hasPermiOr(['dataAsset:directory:add'])" | ||||
|  |                               command="handleAddDialogOpen" | ||||
|  |                             > | ||||
|  |                               新增分类 | ||||
|  |                             </el-dropdown-item> | ||||
|  |                             <el-dropdown-item | ||||
|  |                               v-if="hasPermiOr(['dataAsset:directory:edit'])" | ||||
|  |                               command="handleEditDialogOpen" | ||||
|  |                             > | ||||
|  |                               修改分类 | ||||
|  |                             </el-dropdown-item> | ||||
|  |                             <el-dropdown-item | ||||
|  |                               v-if="hasPermiOr(['dataAsset:directory:remove'])" | ||||
|  |                               command="handleDelete" | ||||
|  |                             > | ||||
|  |                               删除分类 | ||||
|  |                             </el-dropdown-item> | ||||
|  |                             <el-dropdown-item | ||||
|  |                               v-if="hasPermiOr(['dataAsset:directory:move'])" | ||||
|  |                               command="handleMoveDialogOpen" | ||||
|  |                             > | ||||
|  |                               移动分类 | ||||
|  |                             </el-dropdown-item> | ||||
|  |                             <el-dropdown-item | ||||
|  |                               v-if="hasPermiOr(['dataAsset:directory:merge'])" | ||||
|  |                               command="handleMergerDialogOpen" | ||||
|  |                             > | ||||
|  |                               合并分类 | ||||
|  |                             </el-dropdown-item> | ||||
|  |                           </template> | ||||
|  |                         </el-dropdown-menu> | ||||
|  |                       </template> | ||||
|  |                     </el-dropdown> | ||||
|  |                     <el-dropdown | ||||
|  |                       v-if=" | ||||
|  |                         !isCollection(data) && | ||||
|  |                         isAsset(data) && | ||||
|  |                         hasPermiOr([ | ||||
|  |                           'dataAsset:asset:remove', | ||||
|  |                           'dataAsset:asst:move', | ||||
|  |                         ]) | ||||
|  |                       " | ||||
|  |                       placement="right-start" | ||||
|  |                       @command="(command) => handleCommand(command, data)" | ||||
|  |                     > | ||||
|  |                       <el-button | ||||
|  |                         style="margin-left: 4px" | ||||
|  |                         link | ||||
|  |                         type="primary" | ||||
|  |                         icon="Menu" | ||||
|  |                       ></el-button> | ||||
|  |                       <template #dropdown> | ||||
|  |                         <el-dropdown-menu> | ||||
|  |                           <el-dropdown-item | ||||
|  |                             v-if="hasPermiOr(['dataAsset:asset:remove'])" | ||||
|  |                             command="handleAssetDelete" | ||||
|  |                           > | ||||
|  |                             删除资产 | ||||
|  |                           </el-dropdown-item> | ||||
|  |                           <el-dropdown-item | ||||
|  |                             v-if="hasPermiOr(['dataAsset:asst:move'])" | ||||
|  |                             command="handleAssetMoveDialogOpen" | ||||
|  |                           > | ||||
|  |                             移动资产 | ||||
|  |                           </el-dropdown-item> | ||||
|  |                         </el-dropdown-menu> | ||||
|  |                       </template> | ||||
|  |                     </el-dropdown> | ||||
|  |                   </div> | ||||
|  |                 </div> | ||||
|  |               </template> | ||||
|  |             </el-tree> | ||||
|  |           </div> | ||||
|  |       </el-col> | ||||
|  |       <el-col :span="19"> | ||||
|  |         <el-form :model="queryParams" ref="queryRef" :inline="true"> | ||||
|  |           <el-form-item label="标准编号/名称"> | ||||
|  |             <el-input v-model="queryParams.stdNum" placeholder="请输入标准编号" /> | ||||
|  |           </el-form-item> | ||||
|  |           <el-form-item label="业务定义"> | ||||
|  |             <el-input v-model="queryParams.stdMenu" placeholder="请输入业务定义" /> | ||||
|  |           </el-form-item> | ||||
|  |           <el-form-item> | ||||
|  |             <el-button type="primary" @click="handleQuery">搜索</el-button> | ||||
|  |             <el-button icon="Refresh" @click="resetQuery">重置</el-button> | ||||
|  |           </el-form-item> | ||||
|  |         </el-form> | ||||
|  |                <!-- 操作按钮 --> | ||||
|  |                <el-row :gutter="10" class="mb8"> | ||||
|  |           <el-col :span="1.5"> | ||||
|  |             <el-button | ||||
|  |               type="primary" | ||||
|  |               plain | ||||
|  |               icon="Plus" | ||||
|  |               @click="handleAdd" | ||||
|  |               v-hasPermi="['meta:metaSecurityCol:add']" | ||||
|  |               >新增</el-button | ||||
|  |             > | ||||
|  |           </el-col> | ||||
|  |           <el-col :span="1.5"> | ||||
|  |             <el-button | ||||
|  |               type="success" | ||||
|  |               plain | ||||
|  |               icon="Edit" | ||||
|  |               :disabled="single" | ||||
|  |               @click="handleEdit" | ||||
|  |               v-hasPermi="['meta:metaSecurityCol:edit']" | ||||
|  |               >修改</el-button | ||||
|  |             > | ||||
|  |           </el-col> | ||||
|  |           <el-col :span="1.5"> | ||||
|  |             <el-button | ||||
|  |               type="danger" | ||||
|  |               plain | ||||
|  |               icon="Delete" | ||||
|  |               :disabled="multiple" | ||||
|  |               @click="handleRemove" | ||||
|  |               v-hasPermi="['meta:metaSecurityCol:remove']" | ||||
|  |               >删除</el-button | ||||
|  |             > | ||||
|  |           </el-col> | ||||
|  |         </el-row> | ||||
|  |                 <!-- 表格展示 --> | ||||
|  |                 <el-table | ||||
|  |           v-loading="loading" | ||||
|  |           :data="tableData" | ||||
|  |           @selection-change="handleSelectionChange" | ||||
|  |         > | ||||
|  |          <el-table-column type="selection" width="55" align="center" /> | ||||
|  |          <el-table-column label="标准编号" prop="stdNum" width="150"></el-table-column> | ||||
|  | <el-table-column label="标准英文名" prop="stdCode" width="150"></el-table-column> | ||||
|  | <el-table-column label="标准中文名" prop="stdName" width="150"></el-table-column> | ||||
|  | <el-table-column label="标准业务定义" prop="stdMenu" width="150"></el-table-column> | ||||
|  | <el-table-column label="类型" prop="stdType" width="150"></el-table-column> | ||||
|  | <el-table-column label="标准来源" prop="stdSrc" width="150"></el-table-column> | ||||
|  | <el-table-column label="数据类别" prop="dataClas" width="150"></el-table-column> | ||||
|  | <el-table-column label="代码编号" prop="codeNum" width="150"></el-table-column> | ||||
|  | <el-table-column label="业务认责部门" prop="bussDeptId" width="150"></el-table-column> | ||||
|  | <el-table-column label="业务认责人员" prop="bussUser" width="150"></el-table-column> | ||||
|  | <el-table-column label="技术认责部门" prop="techDeptId" width="150"></el-table-column> | ||||
|  | <el-table-column label="技术认责人员" prop="techUser" width="150"></el-table-column> | ||||
|  | <!-- <el-table-column label="分类" prop="contentOnum" width="150"></el-table-column> --> | ||||
|  | <el-table-column label="更新时间" prop="updateTime" width="180"></el-table-column> | ||||
|  |           <el-table-column label="操作" align="center" width="180"> | ||||
|  |             <template #default="scope"> | ||||
|  |               <el-button | ||||
|  |                 @click="handleEdit(scope.row)" | ||||
|  |                 type="text" | ||||
|  |                 icon="Edit" | ||||
|  |               /> | ||||
|  |               <el-button | ||||
|  |                 @click="handleRemove(scope.row)" | ||||
|  |                 type="text" | ||||
|  |                 icon="Delete" | ||||
|  |               /> | ||||
|  |             </template> | ||||
|  |           </el-table-column> | ||||
|  |         </el-table> | ||||
|  | 
 | ||||
|  |         <!-- 分页 --> | ||||
|  |         <pagination | ||||
|  |           v-show="total > 0" | ||||
|  |           :total="total" | ||||
|  |           v-model:page="queryParams.pageNum" | ||||
|  |           v-model:limit="queryParams.pageSize" | ||||
|  |           @pagination="handlePagination" | ||||
|  |         /> | ||||
|  |       </el-col> | ||||
|  |     </el-row> | ||||
|  |     <FormDialog | ||||
|  |       ref="formDialogRef" | ||||
|  |       :directoryTree="directoryTree" | ||||
|  |       @onSuccess="setDirectoryTree" | ||||
|  |     /> | ||||
|  |     <MoveDialog | ||||
|  |       ref="moveDialogRef" | ||||
|  |       :directoryTree="directoryTree" | ||||
|  |       @onSuccess="setDirectoryTree" | ||||
|  |     /> | ||||
|  |     <MergerDialog | ||||
|  |       ref="mergerDialogRef" | ||||
|  |       :directoryTree="directoryTree" | ||||
|  |       @onSuccess="setDirectoryTree" | ||||
|  |     /> | ||||
|  |     <AssetMoveDialog | ||||
|  |       ref="assetMoveDialogRef" | ||||
|  |       :directoryTree="directoryTree" | ||||
|  |       @onSuccess="setDirectoryTree" | ||||
|  |     /> | ||||
|  |     <AddEditForm | ||||
|  |       :data="selectedRow" | ||||
|  |       :isEdit="isEdit" | ||||
|  |       :dbResourceOldList="dbResourceOldList" | ||||
|  |       v-model:visible="dialogVisible" | ||||
|  |       @refresh="getList" | ||||
|  |     /> | ||||
|  |   </div> | ||||
|  | </template> | ||||
|  | 
 | ||||
|  | <script setup name="Directory"> | ||||
|  | import { ElMessage, ElMessageBox } from 'element-plus' | ||||
|  | import { | ||||
|  |   getDirectoryTree, | ||||
|  |   delDirectory, | ||||
|  |   delDirectoryAsset, | ||||
|  |   addDirectoryCollection, | ||||
|  |   cancelDirectoryCollection, | ||||
|  | } from '@/api/datastd/directory' | ||||
|  | import auth from '@/plugins/auth' | ||||
|  | import FormDialog from './components/FormDialog.vue' | ||||
|  | import MoveDialog from './components/MoveDialog.vue' | ||||
|  | import MergerDialog from './components/MergerDialog.vue' | ||||
|  | import AssetMoveDialog from './components/AssetMoveDialog.vue' | ||||
|  | import AddEditForm from "./components/AddEditForm.vue"; | ||||
|  | import { | ||||
|  |   listStdMain, | ||||
|  |   getStdMain, | ||||
|  |   deleteStdMain, | ||||
|  | } from "@/api/datastd/std"; // 更新为新的接口 | ||||
|  | import useUserStore from '@/store/modules/user' | ||||
|  | import { nextTick } from 'vue' | ||||
|  | 
 | ||||
|  | import { datasourcetree } from "@/api/meta/metatask"; | ||||
|  | const { proxy } = getCurrentInstance() | ||||
|  | const { hasPermiOr } = auth | ||||
|  | const userStore = useUserStore() | ||||
|  | 
 | ||||
|  | const defaultProps = { | ||||
|  |   children: 'children', | ||||
|  |   label: 'contentName', | ||||
|  | } | ||||
|  | const directoryTree = ref([]) | ||||
|  | const currentNode = ref({}) | ||||
|  | 
 | ||||
|  | const directoryTableData = ref([]) | ||||
|  | const queryParams = ref({ | ||||
|  |   stdNum: '', | ||||
|  |   stdMenu: '',  | ||||
|  |   pageNum: 1, | ||||
|  |   pageSize: 10, | ||||
|  | }); | ||||
|  | const single = ref(true); | ||||
|  | const multiple = ref(true); | ||||
|  | const dialogVisible = ref(false); | ||||
|  | const selectedRow = ref(null); | ||||
|  | const isEdit = ref(false); | ||||
|  | const tableData = ref([]); | ||||
|  | const total = ref(0); | ||||
|  | const loading = ref(false); | ||||
|  | const ids = ref([]); | ||||
|  | const stdNums = ref([]); | ||||
|  | const handlePagination = (pageNum, pageSize) => { | ||||
|  |   queryParams.value.pageNum = pageNum; | ||||
|  |   queryParams.value.pageSize = pageSize; | ||||
|  |   handleQuery(); | ||||
|  | }; | ||||
|  | 
 | ||||
|  | const resetQuery = () => { | ||||
|  |   queryParams.value = { stdNum: '', stdMenu: '' ,   pageNum: 1, | ||||
|  |   pageSize: 10} | ||||
|  |   handleQuery() | ||||
|  | } | ||||
|  | const handleQuery = () => { | ||||
|  |   queryParams.value.pageNum = 1; | ||||
|  |   getList(); | ||||
|  | }; | ||||
|  | const handleSelectionChange = (selection) => { | ||||
|  |   single.value = selection.length !== 1; | ||||
|  |   multiple.value = !selection.length; | ||||
|  |   ids.value = selection.map((item) => item.id); | ||||
|  |   stdNums.value = selection.map((item) => item.stdNum); | ||||
|  | }; | ||||
|  | const setDirectoryTree = () => { | ||||
|  |   return getDirectoryTree({ | ||||
|  |     pageSize: 999, | ||||
|  |   }).then(({ rows }) => { | ||||
|  |     directoryTree.value = addTreeNodeId(rows) | ||||
|  |   }) | ||||
|  | } | ||||
|  | setDirectoryTree().then(async () => { | ||||
|  |   if (directoryTree.value.length) { | ||||
|  |     currentNode.value = directoryTree.value[0] | ||||
|  |     directoryTableData.value = directoryTree.value[0].children || [] | ||||
|  | 
 | ||||
|  |   } | ||||
|  | }) | ||||
|  | const getList = async () => { | ||||
|  |   loading.value = true; | ||||
|  |   const response = await listStdMain(queryParams.value); | ||||
|  |   tableData.value = response.rows; | ||||
|  |   total.value = response.total; | ||||
|  |   loading.value = false; | ||||
|  | }; | ||||
|  | const handleRemove = (row) => { | ||||
|  |   const idsToDelete = row.id ? [row.id] : ids.value; | ||||
|  |   const codesToDelete = row.stdNum ? [row.stdNum] : stdNums.value; | ||||
|  |   proxy.$modal | ||||
|  |     .confirm( | ||||
|  |       '是否确认删除标准编号为"' + codesToDelete.toString() + '"的数据项?' | ||||
|  |     ) | ||||
|  |     .then(function () { | ||||
|  |       return deleteStdMain(idsToDelete.toString()); | ||||
|  |     }) | ||||
|  |     .then(() => { | ||||
|  |       handleQuery(); | ||||
|  |       proxy.$modal.msgSuccess("删除成功"); | ||||
|  |     }) | ||||
|  |     .catch(() => {}); | ||||
|  | }; | ||||
|  | const dbResourceOldList = ref([]); | ||||
|  | 
 | ||||
|  | const handleAdd = () => { | ||||
|  |   console.log("update:visible", 111); | ||||
|  |   isEdit.value = false; | ||||
|  |   selectedRow.value = { | ||||
|  |     stdType: "", | ||||
|  |     stdNum: "", | ||||
|  |     stdCode: "", | ||||
|  |     stdName: "", | ||||
|  |     stdMenu: "", | ||||
|  |     dataType: "", | ||||
|  |     stdCode: "", | ||||
|  |     bussDeptId: "", | ||||
|  |     bussUser: "", | ||||
|  |     techDeptId: "", | ||||
|  |     techUser: "", | ||||
|  |   }; | ||||
|  | 
 | ||||
|  |   // 清空选中的数据 | ||||
|  |   dialogVisible.value = true; | ||||
|  | }; | ||||
|  | 
 | ||||
|  | const handleEdit = (row) => { | ||||
|  |   const id = row.id ? row.id : ids.value.toString(); | ||||
|  |   getStdMain(id).then((response) => { | ||||
|  |     selectedRow.value = response.data; | ||||
|  |     isEdit.value = true; | ||||
|  |     dialogVisible.value = true; | ||||
|  |   }); | ||||
|  | }; | ||||
|  | /** 增加临时ID作为树节点的唯一键值 */ | ||||
|  | const addTreeNodeId = (tree) => { | ||||
|  |   return tree.map((node) => { | ||||
|  |     return { | ||||
|  |       ...node, | ||||
|  |       tempId: node.astOnum || node.contentOnum, | ||||
|  |       children: | ||||
|  |         node.children && node.children.length | ||||
|  |           ? addTreeNodeId(node.children) | ||||
|  |           : [], | ||||
|  |     } | ||||
|  |   }) | ||||
|  | } | ||||
|  | const filterText = ref(undefined) | ||||
|  | const treeRef = ref(null) | ||||
|  | watch(filterText, (val) => { | ||||
|  |   treeRef.value.filter(val) | ||||
|  | }) | ||||
|  | 
 | ||||
|  | const filterNode = (value, data) => { | ||||
|  |   if (!value) { | ||||
|  |     return true | ||||
|  |   } | ||||
|  |   if (data.contentName) { | ||||
|  |     return data.contentName.includes(value) | ||||
|  |   } | ||||
|  |   if (data.dataAstCnName) { | ||||
|  |     return data.dataAstCnName.includes(value) | ||||
|  |   } | ||||
|  | } | ||||
|  | 
 | ||||
|  | // 是否根分类 | ||||
|  | const isRoot = (data) => { | ||||
|  |   return data.contentOnum === 1 | ||||
|  | } | ||||
|  | 
 | ||||
|  | // 是否我的收藏分类 | ||||
|  | const isCollectionDirectory = (data) => { | ||||
|  |   return data.contentName === '临时' | ||||
|  | } | ||||
|  | 
 | ||||
|  | // 是否收藏的分类 | ||||
|  | const isCollection = (data) => { | ||||
|  |   return false | ||||
|  | } | ||||
|  | 
 | ||||
|  | // 是否已收藏的 | ||||
|  | const isCollected = (data) => { | ||||
|  |   return data.bookmarkFlag === 1 | ||||
|  | } | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | // 是否子分类 | ||||
|  | const isDirectory = (data) => { | ||||
|  |   return data.contentOnum && !isRoot(data) && !data.astOnum | ||||
|  | } | ||||
|  | 
 | ||||
|  | // 是否资产 | ||||
|  | const isAsset = (data) => { | ||||
|  |   return data.astOnum | ||||
|  | } | ||||
|  | 
 | ||||
|  | const activeName = ref('1') | ||||
|  | const handleNodeClick = async (data) => { | ||||
|  |   if (isCollectionDirectory(data)) { | ||||
|  |     return | ||||
|  |   } | ||||
|  | 
 | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleCollect = (data, e) => { | ||||
|  |   e.stopPropagation() | ||||
|  |   addDirectoryCollection({ | ||||
|  |     dataAstNo: String(data.dataAstNo), | ||||
|  |     userId: String(userStore.id), | ||||
|  |   }).then(() => { | ||||
|  |     proxy.$modal.msgSuccess('收藏成功') | ||||
|  |     setDirectoryTree() | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleCollectionCancel = (data, e) => { | ||||
|  |   e.stopPropagation() | ||||
|  |   cancelDirectoryCollection(data.relaOnum).then(() => { | ||||
|  |     proxy.$modal.msgSuccess('取消成功') | ||||
|  |     setDirectoryTree() | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const formDialogRef = ref(null) | ||||
|  | const handleAddDialogOpen = (data) => { | ||||
|  |   formDialogRef.value.title = '新增分类' | ||||
|  |   formDialogRef.value.openDialog({ | ||||
|  |     suprContentOnum: data.contentOnum, | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleEditDialogOpen = (data) => { | ||||
|  |   formDialogRef.value.title = '修改分类' | ||||
|  |   formDialogRef.value.openDialog(data) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleDelete = (data) => { | ||||
|  |   ElMessageBox.confirm( | ||||
|  |     `确定删除 ${data.contentName} 分类吗?`, | ||||
|  |     '分类删除', | ||||
|  |     { | ||||
|  |       confirmButtonText: '确定', | ||||
|  |       cancelButtonText: '取消', | ||||
|  |       type: 'warning', | ||||
|  |     } | ||||
|  |   ).then(() => { | ||||
|  |     delDirectory(data.contentOnum).then(() => { | ||||
|  |       proxy.$modal.msgSuccess('删除成功') | ||||
|  |       setDirectoryTree() | ||||
|  |     }) | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const moveDialogRef = ref(null) | ||||
|  | const handleMoveDialogOpen = (data) => { | ||||
|  |   moveDialogRef.value.title = '移动分类' | ||||
|  |   moveDialogRef.value.openDialog(data) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const mergerDialogRef = ref(null) | ||||
|  | const handleMergerDialogOpen = (data) => { | ||||
|  |   mergerDialogRef.value.title = '合并分类' | ||||
|  |   mergerDialogRef.value.openDialog(data) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleAssetDelete = (data) => { | ||||
|  |   ElMessageBox.confirm(`确定删除 ${data.dataAstCnName} 资产吗?`, '资产删除', { | ||||
|  |     confirmButtonText: '确定', | ||||
|  |     cancelButtonText: '取消', | ||||
|  |     type: 'warning', | ||||
|  |   }).then(() => { | ||||
|  |     delDirectoryAsset({ | ||||
|  |       ...data, | ||||
|  |       relaStatus: '0', // 0-删除,1-正常 | ||||
|  |     }).then(() => { | ||||
|  |       proxy.$modal.msgSuccess('删除成功') | ||||
|  |       setDirectoryTree() | ||||
|  |     }) | ||||
|  |   }) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const assetMoveDialogRef = ref(null) | ||||
|  | const handleAssetMoveDialogOpen = (data) => { | ||||
|  |   assetMoveDialogRef.value.title = '移动资产' | ||||
|  |   assetMoveDialogRef.value.openDialog(data) | ||||
|  | } | ||||
|  | 
 | ||||
|  | const handleCommand = (command, data) => { | ||||
|  |   const strategy = { | ||||
|  |     handleAddDialogOpen: handleAddDialogOpen, | ||||
|  |     handleEditDialogOpen: handleEditDialogOpen, | ||||
|  |     handleDelete: handleDelete, | ||||
|  |     handleMoveDialogOpen: handleMoveDialogOpen, | ||||
|  |     handleMergerDialogOpen: handleMergerDialogOpen, | ||||
|  |     handleAssetDelete: handleAssetDelete, | ||||
|  |     handleAssetMoveDialogOpen: handleAssetMoveDialogOpen, | ||||
|  |   } | ||||
|  |   strategy[command](data) | ||||
|  | } | ||||
|  | 
 | ||||
|  | onMounted(() => { | ||||
|  |   datasourcetree().then((response) => { | ||||
|  |     dbResourceOldList.value = response.rows; | ||||
|  | 
 | ||||
|  |   }); | ||||
|  |   getList(); | ||||
|  | }); | ||||
|  | 
 | ||||
|  | </script> | ||||
|  | 
 | ||||
|  | <style lang="scss" scoped> | ||||
|  | .tree-box { | ||||
|  |   overflow: auto; | ||||
|  | } | ||||
|  | .tree { | ||||
|  |   margin-top: 10px; | ||||
|  |   min-width: 260px; | ||||
|  | } | ||||
|  | .custom-tree-node { | ||||
|  |   flex: 1; | ||||
|  |   display: flex; | ||||
|  |   align-items: center; | ||||
|  |   justify-content: space-between; | ||||
|  |   .tree-node__action { | ||||
|  |     padding: 0 8px; | ||||
|  |     display: flex; | ||||
|  |     justify-content: flex-end; | ||||
|  |   } | ||||
|  | } | ||||
|  | 
 | ||||
|  | :deep( | ||||
|  |     .el-descriptions__body | ||||
|  |       .el-descriptions__table.is-bordered | ||||
|  |       .el-descriptions__cell | ||||
|  |   ) { | ||||
|  |   width: 80px !important; | ||||
|  | } | ||||
|  | 
 | ||||
|  | .faq { | ||||
|  |   white-space: pre-wrap; | ||||
|  | } | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | iframe { | ||||
|  |   border: none; | ||||
|  | } | ||||
|  | </style> | ||||
					Loading…
					
					
				
		Reference in new issue