Преглед изворни кода

Merge remote-tracking branch 'origin/master'

liuyc пре 8 месеци
родитељ
комит
81bddf0198

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
         "dayjs": "^1.11.10",
         "echarts": "^5.5.0",
         "element-plus": "^2.6.1",
-        "hc-vue3-ui": "^3.5.2",
+        "hc-vue3-ui": "^3.5.8",
         "js-base64": "^3.7.7",
         "js-fast-way": "0.4.6",
         "js-md5": "^0.8.3",

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20240315173155"
+  "value": "20240315180447"
 }

+ 2 - 2
src/main.js

@@ -13,8 +13,8 @@ import 'dayjs/locale/zh-cn'
 
 //hc-vue3-ui
 import HcVue3UI from 'hc-vue3-ui'
-import 'hc-vue3-ui/dist/index.css'
-import 'hc-vue3-ui/style/index.scss'
+import 'hc-vue3-ui/css'
+import 'hc-vue3-ui/scss'
 
 //挂载全局
 import { setupComponents } from './global/index'

+ 2 - 2
src/styles/other/first-item.scss

@@ -55,7 +55,7 @@
     }
 }
 
-.hc-first-item-node-layout {
+
     .node-content {
         flex: 1;
         display: flex;
@@ -104,4 +104,4 @@
         box-shadow: -2px 0px 10px 0 rgba(32, 37, 50, 0.03), 0 -10px 21px 3px rgba(32, 37, 50, 0.03);
         overflow: hidden;
     }
-}
+

+ 1 - 1
src/views/data-fill/collapse-form/formula.vue

@@ -103,7 +103,7 @@ const panelSave = async () => {
     if (!error && code === 200) {
         window?.$message?.success('操作成功')
     } else {
-        window.$message.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 

+ 5 - 5
src/views/data-fill/collapse-form/index.vue

@@ -997,7 +997,7 @@ const delClick = async ({ pkeyId }, index) => {
                 // renewData()
                 listDatas.value.splice(index, 1)
             } else {
-                window.$message.error(msg)
+                window?.$message?.error(msg || '操作失败')
             }
         } else {
             window?.$message?.warning('已上报的资料,不允许删除')
@@ -1096,7 +1096,7 @@ const copeBussTab = async (pkeyId) => {
         // renewData()
         getNewList()
     } else {
-        window.$message.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 
@@ -1141,7 +1141,7 @@ const hideClick = async ({ pkeyId, isBussShow }, index) => {
                 }
                 // renewData()
             } else {
-                window.$message.error(msg)
+                window?.$message?.error(msg || '操作失败')
             }
         } else {
             window?.$message?.warning('已上报的资料,不允许隐藏')
@@ -1268,7 +1268,7 @@ const saveExcelBussData = async ({ pkeyId }, dragItem = null, showTip = true) =>
             }
             return true
         } else {
-            window.$message.error(msg)
+            window.$message.error(msg || '操作失败')
             return false
         }
     } else {
@@ -1610,7 +1610,7 @@ const evaluate = async (item)=>{
             window?.$message?.success('操作成功')
             renewData()
         } else {
-            window?.$message?.warning(msg)
+            window?.$message?.error(msg || '操作失败')
         }
 }
 

+ 1 - 1
src/views/data-fill/collapse-form/test-file.vue

@@ -362,7 +362,7 @@ const savesubmitRelationFile = async (ids) => {
     if (!error && code === 200) {
         window?.$message?.success('操作成功')
     } else {
-        window.$message.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 

+ 1 - 1
src/views/data-fill/collapse-form/water.vue

@@ -72,7 +72,7 @@ const waterSave = async ()=>{
         window?.$message?.success('操作成功')
         return data
     } else {
-        window.$message.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 

+ 4 - 2
src/views/data-fill/components/HcUpload.vue

@@ -183,7 +183,7 @@ const delUploadData = async (res) => {
          } else {
             loadingText.value = '删除中...'
             uploadDisabled.value = true
-            const { error, code } = await wbsApi.delTabById({
+            const { error, code, msg } = await wbsApi.delTabById({
                 ids: id,
             })
             uploadDisabled.value = false
@@ -191,6 +191,7 @@ const delUploadData = async (res) => {
                 window?.$message?.success('删除成功')
                 return true
             } else {
+                window?.$message?.error(msg || '操作失败')
                 return false
             }
         }
@@ -203,7 +204,7 @@ const delUploadData = async (res) => {
         } else {
             loadingText.value = '删除中...'
             uploadDisabled.value = true
-            const { error, code } = await wbsApi.removeBussFile({
+            const { error, code, msg } = await wbsApi.removeBussFile({
                 ids: id,
             })
             uploadDisabled.value = false
@@ -211,6 +212,7 @@ const delUploadData = async (res) => {
                 window?.$message?.success('删除成功')
                 return true
             } else {
+                window?.$message?.error(msg || '操作失败')
                 return false
             }
         }

+ 14 - 12
src/views/data-fill/division.vue

@@ -210,7 +210,7 @@
         </hc-new-dialog>
 
         <!-- 新增子节点 -->
-        <hc-new-dialog v-model="addNodeModal" :loading="addNodeLoading" loading-text="新增节点中,请耐心等待..." title="新增子节点" widths="720px">
+        <hc-new-dialog v-model="addNodeModal" :loading="addNodeLoading" loading-text="新增节点中,请耐心等待..." title="新增子节点" widths="720px" is-table>
             <el-alert :closable="false" title="双击节点,可编辑节点名称,编辑完成后,请按回车或输入框消失后,再点提交" type="warning" />
             <HcTreeNode
                 v-if="addTreeNodeType === '1'" :node-id="addTreeNodeId" :old-id="addTreeNodeOldId" :contract-id="contractId"
@@ -599,7 +599,7 @@ const concealedChange = async () => {
         if (!error && code === 200) {
             window?.$message?.success(msg)
         } else {
-            window?.$message?.warning(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     } else {
         window?.$message?.warning('请先在左侧选择节点')
@@ -739,7 +739,7 @@ const editNodeClick = async () => {
         //发起请求
         editNodeLoading.value = true
         const { primaryKeyId, title, partitionCode } = formEditNodeModel.value
-        const { error, code } = await wbsApi.wbsTreeUpdateNode({
+        const { error, code, msg } = await wbsApi.wbsTreeUpdateNode({
             nodeName: title || '',
             pKeyId: primaryKeyId || '',
             partitionCode: partitionCode || '',
@@ -752,6 +752,8 @@ const editNodeClick = async () => {
             treeItemInfo.value['partitionCode'] = partitionCode || ''
             editNodeModal.value = false
             window?.location?.reload() //刷新页面
+        } else {
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }
@@ -972,7 +974,7 @@ 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({
@@ -991,7 +993,7 @@ const copyContractTreeNode = async (type, form, table, classify) => {
             copyNodeModal.value = false
             window?.location?.reload() //刷新页面
         } else {
-            window.$message.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }
@@ -1011,7 +1013,7 @@ const copyContractNodeSubmitBusinessData = async (form, table, classify) => {
         copyNodeModal.value = false
         window?.location?.reload() //刷新页面
     } else {
-            window.$message.error(msg)
+        window?.$message?.error(msg || '操作失败')
       }
 }
 
@@ -1079,7 +1081,7 @@ const addNodeClick = async () => {
             addNodeModal.value = false
             window?.location?.reload() //刷新页面
         } else {
-            window.$message.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }
@@ -1099,7 +1101,7 @@ const addNodeClickCur = async ()=>{
                 addNodeModalCus.value = false
                 window?.location?.reload() //刷新页面
             } else {
-                window.$message.error(msg)
+                window?.$message?.error(msg || '操作失败')
             }
 }
 //删除节点
@@ -1123,7 +1125,7 @@ const removeContractTreeNode = async () => {
         window?.$message?.success('删除成功')
         window?.location?.reload() //刷新页面
     } else {
-        window.$message.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 
@@ -1170,7 +1172,7 @@ const sortNodeClick = async () => {
         sortNodeModal.value = false
         window?.location?.reload() //刷新页面
     } else {
-        window.$message.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 
@@ -1346,7 +1348,7 @@ const deltableexcel = async (row) => {
                             searchNodeAllTableApi(treeItemInfo.value['primaryKeyId'])
 
                         } else {
-                            window?.$message?.warning(msg)
+                            window?.$message?.error(msg || '操作失败')
                         }
                     }
                 },
@@ -1358,7 +1360,7 @@ const deltableexcel = async (row) => {
                 searchNodeAllTableApi(treeItemInfo.value['primaryKeyId'])
                 // window?.location?.reload()  //刷新页面
             } else {
-                window?.$message?.warning(msg)
+                window?.$message?.error(msg || '操作失败')
             }
         }
     } else {

+ 4 - 2
src/views/data-fill/wbs.vue

@@ -388,7 +388,7 @@
         </hc-new-dialog>
 
         <!-- 新增子节点 -->
-        <hc-new-dialog v-model="addNodeModal" :loading="addNodeLoading" loading-text="新增节点中,请耐心等待..." title="新增子节点" widths="720px">
+        <hc-new-dialog v-model="addNodeModal" :loading="addNodeLoading" loading-text="新增节点中,请耐心等待..." title="新增子节点" widths="720px" is-table>
             <el-alert :closable="false" title="双击节点,可编辑节点名称,编辑完成后,请按回车或输入框消失后,再点提交" type="warning" />
             <HcTreeNode
                 v-if="addTreeNodeType === '1'"
@@ -1787,7 +1787,7 @@ const tableFormSaveClick = async () => {
         console.log('保存')
         tableFormSaveLoading.value = true
         console.log('FormData', FormData)
-        const { error, code } = await wbsApi.saveExcelBussData({
+        const { error, code, msg } = await wbsApi.saveExcelBussData({
             dataInfo: { orderList: FormData },
         })
         tableFormSaveLoading.value = false
@@ -1796,6 +1796,8 @@ const tableFormSaveClick = async () => {
             // await bussPdfsClick()
              const activeKey = ListItemRef.value?.getActiveKey()
             getTableDataAll(activeKey)
+        } else {
+            window?.$message?.error(msg || '操作失败')
         }
     } else {
         console.log('预览')

+ 4 - 4
src/views/gauge/station.vue

@@ -329,7 +329,7 @@ const saveFormClick = async () => {
         const form = formRowValue.value
         if (form.id) {
             saveFormLoading.value = true
-            const { error, code } = await stationApi.updateSave(form, false)
+            const { error, code, msg } = await stationApi.updateSave(form, false)
             //判断状态
             saveFormLoading.value = false
             if (!error && code === 200) {
@@ -337,11 +337,11 @@ const saveFormClick = async () => {
                 window?.$message?.success('保存成功')
                 getTableData()
             } else {
-                window?.$message?.error('保存失败')
+                window?.$message?.error(msg || '操作失败')
             }
         } else {
             saveFormLoading.value = true
-            const { error, code } = await stationApi.addSave(form, false)
+            const { error, code, msg } = await stationApi.addSave(form, false)
             //判断状态
             saveFormLoading.value = false
             if (!error && code === 200) {
@@ -349,7 +349,7 @@ const saveFormClick = async () => {
                 window?.$message?.success('新增成功')
                 getTableData()
             } else {
-                window?.$message?.error('新增失败')
+                window?.$message?.error(msg || '操作失败')
             }
         }
     }

+ 3 - 1
src/views/tentative/detect/test-form.vue

@@ -945,7 +945,7 @@ const getrecordsamplegetData = async () => {
 }
 //获取关联工程部位key值
 const getpositiondata = async () => {
-    const { error, code, data } = await dataApi.recordprojectPositiongetData({
+    const { error, code, data, msg } = await dataApi.recordprojectPositiongetData({
         projectPositionIds:checkrelationString.value,
         nodePKeyId: routerQuery?.nodeId,
         contractId: contractId.value,
@@ -955,6 +955,8 @@ const getpositiondata = async () => {
 
         return data
 
+    } else {
+        window.$message?.error(msg || '操作失败')
     }
 
 }

+ 1 - 1
src/views/tentative/material/approach.vue

@@ -546,7 +546,7 @@ const addEditFormClick = async () => {
             addEditFormLoading.value = false
             await getTableData()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
             addEditFormLoading.value = false
         }
     }

+ 3 - 3
src/views/tentative/material/sampling.vue

@@ -547,7 +547,7 @@ const addEditFormClick = async () => {
          
             await getTableData()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }
@@ -608,7 +608,7 @@ const tableCopyData = async (rows) => {
         copyTableModal.value = false
         await getTableData()
     } else {
-        window?.$message?.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 
@@ -634,7 +634,7 @@ const tableRemoveData = async () => {
             window?.$message?.success('操作成功')
             searchClick()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }

+ 2 - 2
src/views/tentative/parameter/compactness.vue

@@ -202,7 +202,7 @@ const addEditFormClick = async () => {
          
             await getTableData()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }
@@ -229,7 +229,7 @@ const tableRemoveData = async () => {
             window?.$message?.success('操作成功')
             searchClick()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }

+ 4 - 4
src/views/tentative/parameter/container.vue

@@ -427,7 +427,7 @@ const submitClassification = async (form) => {
         addEditNodeFormModal.value = false
         await getMenusData()
     } else {
-        window?.$message?.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 
@@ -457,7 +457,7 @@ const removeClassification = async (id) => {
         window?.$message?.success('操作成功')
         getMenusData()
     } else {
-        window?.$message?.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 
@@ -589,7 +589,7 @@ const addEditFormClick = async () => {
             await getTableData()
             console.log(addEditFormLoading.value, 'addEditFormLoading.value')
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }
@@ -618,7 +618,7 @@ const tableRemoveData = async () => {
             window?.$message?.success('操作成功')
             searchClick()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }

+ 2 - 2
src/views/tentative/parameter/density.vue

@@ -184,7 +184,7 @@ const addEditFormClick = async () => {
             
             await getTableData()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }
@@ -211,7 +211,7 @@ const tableRemoveData = async () => {
             window?.$message?.success('操作成功')
             searchClick()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }

+ 4 - 4
src/views/tentative/parameter/sieve.vue

@@ -314,7 +314,7 @@ const addEditNodeFormModalSave = async () => {
            
             await queryClassification()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
 
         addEditFormLoading.value = false
@@ -340,7 +340,7 @@ const delClassification = async (item) => {
         window?.$message?.success('操作成功')
         await queryClassification()
     } else {
-        window?.$message?.error(msg)
+        window?.$message?.error(msg || '操作失败')
     }
 }
 
@@ -432,7 +432,7 @@ const addEditFormClick = async () => {
     
             await getTableData()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }
@@ -459,7 +459,7 @@ const tableRemoveData = async () => {
             window?.$message?.success('操作成功')
             searchClick()
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
         }
     }
 }

+ 10 - 5
src/views/user/index.vue

@@ -303,7 +303,7 @@ const uploadFinish = async (res) => {
             window?.$message?.success('更换头像成功')
             useAppState.setUserInfo(userInfo.value)
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
             avatarLoading.value = false
         }
     } else {
@@ -460,7 +460,7 @@ const saveUserInfoData = async () => {
             userInfo.value.phone = phone
             useAppState.setUserInfo(userInfo.value)
         } else {
-            window?.$message?.error(msg)
+            window?.$message?.error(msg || '操作失败')
             saveUserLoading.value = false
         }
     }
@@ -509,7 +509,7 @@ const saveUpdatePassword = async () => {
     if (res) {
         const form = formUserPassModel.value
         saveUserLoading.value = true
-        const { error, code } = await userApi.updatePassword({
+        const { error, code, msg } = await userApi.updatePassword({
             oldPassword: md5(form?.oldPassword),
             newPassword: md5(form?.newPassword),
             newPassword1: md5(form?.newPassword1),
@@ -524,6 +524,7 @@ const saveUpdatePassword = async () => {
                 newPassword1: '',
             }
         } else {
+            window?.$message?.error(msg || '操作失败')
             saveUserLoading.value = false
         }
     }
@@ -551,12 +552,14 @@ const projectMenuValue = (item, items) => {
 const setDefaultProjectClick = async () => {
     const pid = menuProjectId.value, cid = menuContractId.value
     if (pid && cid) {
-        const { error, code } = await userApi.setDefaultProject({
+        const { error, code, msg } = await userApi.setDefaultProject({
             projectId: pid,
             contractId: cid,
         })
         if (!error && code === 200) {
             window?.$message?.success('设置成功')
+        } else {
+            window?.$message?.error(msg || '操作失败')
         }
     } else {
         window?.$message?.warning('请先在下方选择一个项目合同段')
@@ -771,7 +774,7 @@ const recycleBtnClick = async () => {
     if (rows.length > 0) {
         //请求数据
         recycleBtnLoading.value = true
-        const { error, code } = await userApi.recycleBinRegain({
+        const { error, code, msg } = await userApi.recycleBinRegain({
             projectId: projectId.value,
             contractId: contractId.value,
             delType: tabTypeKey.value,
@@ -782,6 +785,8 @@ const recycleBtnClick = async () => {
             window?.$message?.success('操作成功')
             searchRecycleForm.value.current = 1
             getRecycleTableData()
+        } else {
+            window?.$message?.error(msg || '操作失败')
         }
     } else {
         window.$message?.warning('请先勾选要恢复的数据')

+ 4 - 4
yarn.lock

@@ -1366,10 +1366,10 @@ hasown@^2.0.0:
   dependencies:
     function-bind "^1.1.2"
 
-hc-vue3-ui@^3.5.2:
-  version "3.5.2"
-  resolved "http://39.108.216.210:9000/hc-vue3-ui/-/hc-vue3-ui-3.5.2.tgz#22da583fa64e709cf03c8d846fe50f04e6d2f542"
-  integrity sha512-GL/nj+DfDgTtVkFGpcAC+k/s8JnLxUikMPsOW6xHUigQLYq/q5Yx7G8xQanR/2ftqvTc3r23RLgnj9ZsxyRTkA==
+hc-vue3-ui@^3.5.8:
+  version "3.5.8"
+  resolved "http://39.108.216.210:9000/hc-vue3-ui/-/hc-vue3-ui-3.5.8.tgz#c8d560249835a5e860fe5132c757fb9708b59348"
+  integrity sha512-LJmCLC5CZPfYSKD5VGkYGehyAr2pERuxbOIuGWoNzGtrfQtqE9IMOsf+u1Q3+a6RTPhIKNwGsa3gUQ+O/0N8+w==
   dependencies:
     axios "^1.6.7"
     dayjs "^1.11.10"