ZaiZai пре 1 година
родитељ
комит
7d4a083e9c
1 измењених фајлова са 112 додато и 112 уклоњено
  1. 112 112
      src/views/data-fill/wbs.vue

+ 112 - 112
src/views/data-fill/wbs.vue

@@ -641,13 +641,13 @@ const classType = ref('')
 watch(() => [
     classType.value,
 ], ([classify]) => {
- if (classify) {
-      //重新加载左边树
-      isShowLeft.value = false
+    if (classify) {
+        //重新加载左边树
+        isShowLeft.value = false
         setTimeout(()=>{
             isShowLeft.value = true
         }, 500)
- }
+    }
 
 })
 //渲染完成
@@ -895,7 +895,7 @@ const ElTreeNodeLoading = () => {
 }
 //保存用户填报历史
 const saveHistory = async (endNode)=>{
-     await wbsApi.saveUserHistory({
+    await wbsApi.saveUserHistory({
         contractId: contractId.value,
         projectId: projectId.value,
         endNode,
@@ -912,9 +912,9 @@ const gobackHistory = async ()=>{
         TreeAutoExpandKeys.value = data['endNode'].split(',') || []
         //重新加载左边树
         isShowLeft.value = false
-            setTimeout(()=>{
-                isShowLeft.value = true
-            }, 500)
+        setTimeout(()=>{
+            isShowLeft.value = true
+        }, 500)
     } else {
         window.$message.warning(msg)
     }
@@ -1005,11 +1005,11 @@ const setTreeMenuDataClick = ({ key, node, data }) => {
         addNodeLoading.value = false
         addNodeModal.value = true
     } else if (key === 'add1') {
-            addTreeNodeId.value = data?.primaryKeyId
-            addTreeNodeOldId.value = data?.oldId
-            addNodeLoading.value = false
-            nodeNameinput.value = ''
-            addNodeModalCus.value = true
+        addTreeNodeId.value = data?.primaryKeyId
+        addTreeNodeOldId.value = data?.oldId
+        addNodeLoading.value = false
+        nodeNameinput.value = ''
+        addNodeModalCus.value = true
     } else if (key === 'upload') {
         const info = nodeDataInfo.value
         HcUploadFileApi({
@@ -1097,8 +1097,8 @@ const firstItemHttp = async (info) => {
         window?.$message?.success('操作成功')
         window?.location?.reload() //刷新页面
     } else {
-       window?.$message?.error(msg)
-     }
+        window?.$message?.error(msg)
+    }
 }
 
 //编辑节点
@@ -1161,8 +1161,8 @@ const editNodeClick = async () => {
             editNodeModal.value = false
             window?.location?.reload() //刷新页面
         } else {
-                window?.$message?.error(msg)
-            }
+            window?.$message?.error(msg)
+        }
     }
 }
 
@@ -1234,29 +1234,29 @@ const copyNodeElTreeClick = ({ data, node }) => {
             }
         } else {
             if (data['id'] !== formCopyNodeModel.value.id) {//不能复制到本身节点下
-                    //只能往上一级点击,不能跨层级点击
-                    //如果选择的是父级节点,那不能复制到子级节点
-                    if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] == 6)) {
-                        setCopyNodeTable(data, title)
-                    }
-                    if (type === 5 && data['type'] === 4) {
-                        setCopyNodeTable(data, title, partitionCode)
-                    }
-                    if (type === 4 && (data['type'] === 2 || data['type'] === 3)) {
-                        setCopyNodeTable(data, title, partitionCode)
-                    }
-                    if (type === 3 && data['type'] === 2) {
-                        setCopyNodeTable(data, title, partitionCode)
-                    }
-                    if (type === 2 && data['type'] === 1) {
-                        setCopyNodeTable(data, title, partitionCode)
-                    }
-                    if (type === 1 && data['type'] === 1) {
-                        setCopyNodeTable(data, title, partitionCode)
-                    }
+                //只能往上一级点击,不能跨层级点击
+                //如果选择的是父级节点,那不能复制到子级节点
+                if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] == 6)) {
+                    setCopyNodeTable(data, title)
+                }
+                if (type === 5 && data['type'] === 4) {
+                    setCopyNodeTable(data, title, partitionCode)
+                }
+                if (type === 4 && (data['type'] === 2 || data['type'] === 3)) {
+                    setCopyNodeTable(data, title, partitionCode)
+                }
+                if (type === 3 && data['type'] === 2) {
+                    setCopyNodeTable(data, title, partitionCode)
+                }
+                if (type === 2 && data['type'] === 1) {
+                    setCopyNodeTable(data, title, partitionCode)
+                }
+                if (type === 1 && data['type'] === 1) {
+                    setCopyNodeTable(data, title, partitionCode)
+                }
 
 
-                }
+            }
         }
 
 
@@ -1389,8 +1389,8 @@ const copyContractTreeNode = async (type, form, table, classify) => {
             copyNodeModal.value = false
             window?.location?.reload() //刷新页面
         } else {
-                window?.$message?.error(msg)
-         }
+            window?.$message?.error(msg)
+        }
     } else {
         const { error, code, msg } = await wbsApi.copyContractTreeNode({
             copyType: type,
@@ -1408,8 +1408,8 @@ const copyContractTreeNode = async (type, form, table, classify) => {
             copyNodeModal.value = false
             window?.location?.reload() //刷新页面
         } else {
-                window?.$message?.error(msg)
-         }
+            window?.$message?.error(msg)
+        }
     }
 }
 //复制数据
@@ -1478,44 +1478,44 @@ const addNodeClick = async () => {
     if (keys.length <= 0) {
         window?.$message?.warning('请先选择节点')
     } else {
-         //发起请求
-         addNodeLoading.value = true
-            const primaryKeyId = nodeDataInfo.value?.primaryKeyId || ''
-            const { error, code } = await wbsApi.saveContractTreeNode({
-                projectId: projectId.value,
-                contractId: contractId.value,
-                saveType: addTreeNodeType.value,
-                allSelectedList: allSelectedList.value,
-                halfSelectedList: halfSelectedList.value,
-                currentNodePrimaryKeyId: primaryKeyId,
-            })
-            //判断状态
-            addNodeLoading.value = false
-            if (!error && code === 200) {
-                window?.$message?.success('新增成功')
-                addNodeModal.value = false
-                window?.location?.reload() //刷新页面
-            }
+        //发起请求
+        addNodeLoading.value = true
+        const primaryKeyId = nodeDataInfo.value?.primaryKeyId || ''
+        const { error, code } = await wbsApi.saveContractTreeNode({
+            projectId: projectId.value,
+            contractId: contractId.value,
+            saveType: addTreeNodeType.value,
+            allSelectedList: allSelectedList.value,
+            halfSelectedList: halfSelectedList.value,
+            currentNodePrimaryKeyId: primaryKeyId,
+        })
+        //判断状态
+        addNodeLoading.value = false
+        if (!error && code === 200) {
+            window?.$message?.success('新增成功')
+            addNodeModal.value = false
+            window?.location?.reload() //刷新页面
         }
     }
+}
 const addNodeClickCur = async ()=>{
-             //发起请求
-             addNodeLoadingCus.value = true
-            const { error, code, msg } = await wbsApi.saveCustomAddContractNode({
-                nodeName: nodeNameinput.value,
-                nodeType: nodeDataInfo.value?.nodeType || '',
-                partitionCode: nodeDataInfo.value?.partitionCode || '',
-                primaryKeyId: nodeDataInfo.value?.primaryKeyId || '',
-            })
-            //判断状态
-            addNodeLoadingCus.value = false
-            if (!error && code === 200) {
-                window?.$message?.success('新增成功')
-                addNodeModalCus.value = false
-                window?.location?.reload() //刷新页面
-            } else {
-                window?.$message?.error(msg)
-            }
+    //发起请求
+    addNodeLoadingCus.value = true
+    const { error, code, msg } = await wbsApi.saveCustomAddContractNode({
+        nodeName: nodeNameinput.value,
+        nodeType: nodeDataInfo.value?.nodeType || '',
+        partitionCode: nodeDataInfo.value?.partitionCode || '',
+        primaryKeyId: nodeDataInfo.value?.primaryKeyId || '',
+    })
+    //判断状态
+    addNodeLoadingCus.value = false
+    if (!error && code === 200) {
+        window?.$message?.success('新增成功')
+        addNodeModalCus.value = false
+        window?.location?.reload() //刷新页面
+    } else {
+        window?.$message?.error(msg)
+    }
 }
 
 //删除节点
@@ -1611,12 +1611,12 @@ const drawingsClose = (res) => {
 }
 const getDrawList = async (primaryKeyId)=>{
     const { error, code, data } = await wbsApi.getTreeDrawings({ primaryKeyId })
-       //判断状态
-       if (!error && code === 200) {
-            drawList.value = data
-       } else {
+    //判断状态
+    if (!error && code === 200) {
+        drawList.value = data
+    } else {
         drawList.value = data
-       }
+    }
 }
 
 //设置滚动条位置
@@ -1650,7 +1650,7 @@ const searchNodeAllTable = async () => {
 
 const newlistdata = ref([])
 const searchNodeAllTable1 = async () => {
-  console.log('重新获取表单列表')
+    console.log('重新获取表单列表')
     const info = nodeDataInfo.value
     const { data } = await wbsApi.searchNodeAllTable({
         projectId: projectId.value,
@@ -1775,7 +1775,7 @@ const tableFormSaveClick = async () => {
         if (!error && code === 200) {
             window?.$message?.success('保存成功')
             // await bussPdfsClick()
-             const activeKey = ListItemRef.value?.getActiveKey()
+            const activeKey = ListItemRef.value?.getActiveKey()
             getTableDataAll(activeKey)
         } else {
             window?.$message?.error(msg || '操作失败')
@@ -1901,14 +1901,14 @@ const getAttachmentList = async ()=>{
     } else {
         attachmentList.value = []
     }
- }
- //预览
- const previewFile = (item)=>{
-     toPdfPage(item['domainPdfUrl'])
+}
+//预览
+const previewFile = (item)=>{
+    toPdfPage(item['domainPdfUrl'])
     //window.open(item['domainPdfUrl'], '_blank')
- }
- //删除
- const delFile = async (item)=>{
+}
+//删除
+const delFile = async (item)=>{
     item.loading = true
     const { error, code, msg } = await wbsApi.removeBussFile({
         ids: item.id,
@@ -1923,7 +1923,7 @@ const getAttachmentList = async ()=>{
         window.$message.error(msg)
         return false
     }
- }
+}
 //划分变更
 const divisionClick = () => {
     router.push({
@@ -2001,14 +2001,14 @@ const syncdata = async ()=>{
 //附件添加
 
 const typeoptions = ref([
-{
-    value: '1',
-    label: '模板1',
-  },
-  {
-    value: '2',
-    label: '模板2',
-  },
+    {
+        value: '1',
+        label: '模板1',
+    },
+    {
+        value: '2',
+        label: '模板2',
+    },
 ])
 const getFileTypeApi = async () => {
     const { data } = await getDictionaryBiz({
@@ -2028,13 +2028,13 @@ const getFileTypeApi = async () => {
 const typevalue = ref('')
 
 const isCanadd = ref(true)
- const uploadModal = ref(false)
- const fileListData = ref([])
+const uploadModal = ref(false)
+const fileListData = ref([])
 const uploadData = ref({})
 const uploadModalClose = ()=>{
     uploadModal.value = false
     typevalue.value = ''
- }
+}
 
 
 //获取附件添加列表
@@ -2050,16 +2050,16 @@ const getBussFileList = async (pkeyId) => {
 }
 const addFilelist = async ()=>{
     getBussFileList(primaryKeyId.value)
-     uploadModal.value = true
+    uploadModal.value = true
     await getFileTypeApi()
 
-       //上传的配置
-       uploadData.value = {
-                classify:authBtnTabKey.value,
-                nodeId: primaryKeyId.value,
-                type:typevalue.value,
-                contractId:contractId.value,
-            }
+    //上传的配置
+    uploadData.value = {
+        classify:authBtnTabKey.value,
+        nodeId: primaryKeyId.value,
+        type:typevalue.value,
+        contractId:contractId.value,
+    }
 
 }
 const changeType = (val)=>{
@@ -2107,7 +2107,7 @@ const hideTreeNode = async ()=>{
     if (!error && code === 200) {
         window?.$message?.success(msg || '操作成功')
         setTimeout(() => {
-             window?.location?.reload() //刷新页面
+            window?.location?.reload() //刷新页面
         }, 1000)
 
     } else {