Ver código fonte

修改请求

ZaiZai 1 ano atrás
pai
commit
834867e8ae

+ 0 - 38
src/components/message/index.js

@@ -23,41 +23,3 @@ export const delMessageV2 = (cbk) => {
         },
     })
 }
-
-//请求异常
-export const apiErrorMessage = () => {
-    setTimeout(() => {
-        const doms = document.querySelector('.hc-message-view-box.warning')
-        if (doms) return
-        window?.$messageBox({
-            center: true,
-            message: () => h(domView, {
-                type: 'warning',
-                title: '服务器异常,请稍后重试',
-                text: '服务器异常了,如有需要,请联系管理员!',
-            }),
-            customClass: 'hc-message-view-box warning',
-            showCancelButton: false,
-            confirmButtonText: '关闭',
-        })
-    }, 1000)
-}
-
-//请求异常
-export const apiWarningMessage = () => {
-    setTimeout(() => {
-        const doms = document.querySelector('.hc-message-view-box.warning')
-        if (doms) return
-        window?.$messageBox({
-            center: true,
-            message: () => h(domView, {
-                type: 'warning',
-                title: '正在升级优化,请稍后重试',
-                text: '该功能正在升级优化,请联系管理员',
-            }),
-            customClass: 'hc-message-view-box warning',
-            showCancelButton: false,
-            confirmButtonText: '关闭',
-        })
-    }, 1000)
-}

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

@@ -326,7 +326,7 @@ import {
     arrIndex, deepClone,
     downloadBlob, getArrValue, getObjVal, getObjValue, isNullES, setPosRange,
 } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { getHeader } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 //参数

+ 1 - 1
src/views/data-fill/division.vue

@@ -402,7 +402,7 @@ import wbsApi from '~api/data-fill/wbs'
 import queryApi from '~api/data-fill/query'
 import divisionApi from '~api/data-fill/division'
 import Draggable from 'vuedraggable'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //初始变量
 const router = useRouter()

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

@@ -560,7 +560,7 @@ import { eVisaTaskCheckApi, getDictionary, getDictionaryBiz } from '~api/other'
 import wbsApi from '~api/data-fill/wbs'
 import queryApi from '~api/data-fill/query'
 import Draggable from 'vuedraggable'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import HcUpload from './components/HcUpload.vue'
 import { toPdfPage } from '~uti/btn-auth'
 

+ 1 - 1
src/views/gauge/bezier.vue

@@ -291,7 +291,7 @@ import bezierApi from '~api/gauge/bezier'
 import { getHeader } from 'hc-vue3-ui'
 import { deepClone, downloadBlob, formValidate, getArrValue, getObjValue, isObjNull } from 'js-fast-way'
 import { genFileId } from 'element-plus'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //初始变量
 const useAppState = useAppStore()

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

@@ -154,7 +154,7 @@ import stationApi from '~api/gauge/station'
 import { getHeader } from 'hc-vue3-ui'
 import { genFileId } from 'element-plus'
 import { downloadBlob, formValidate, getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //初始变量
 const router = useRouter()

+ 1 - 1
src/views/gauge/testdata.vue

@@ -213,7 +213,7 @@
 import { onMounted, ref } from 'vue'
 import testApi from '~api/gauge/testdata'
 import { deepClone, formValidate, getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { useAppStore } from '~src/store'
 import { genFileId } from 'element-plus'
 import { getHeader } from 'hc-vue3-ui'

+ 1 - 1
src/views/other-file/image-view.vue

@@ -139,7 +139,7 @@ import HcTreeData from './components/HcTreeData.vue'
 import imageApi from '~api/other-file/imageData'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import { arrToId, downloadBlob, getArrValue, isString } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 //变量
 const router = useRouter()

+ 1 - 1
src/views/other-file/project-scanning.vue

@@ -301,7 +301,7 @@ import { eVisaTaskCheckApi } from '~api/other'
 import tasksDataApi from '~api/tasks/data'
 import ossApi from '~api/oss'
 import dayjs from 'dayjs'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 
 //变量

+ 1 - 1
src/views/other/first-item.vue

@@ -240,7 +240,7 @@ import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import queryApi from '~api/data-fill/query'
 import wbsApi from '~api/data-fill/wbs'
 import { arrToId, deepClone, getArrValue, getObjVal, getObjValue, isString } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 //变量
 const router = useRouter()

+ 1 - 1
src/views/other/first-itemcopy.vue

@@ -248,7 +248,7 @@ import { arrToId, deepClone, getArrValue, getObjVal, getObjValue, isString } fro
 import queryApi from '~api/data-fill/query'
 import wbsApi from '~api/data-fill/wbs'
 import ListItem from './components/ListItem.vue'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 //变量
 const router = useRouter()

+ 3 - 3
src/views/patrol/safe.vue

@@ -35,7 +35,7 @@ import { useRouter } from 'vue-router'
 import patrolApi from '~api/patrol/patrol'
 import { useAppStore } from '~src/store'
 import { getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId)
 const contractId = ref(useAppState.contractId)
@@ -133,9 +133,9 @@ const delInfo = async (row)=>{
     if (!error && code === 200) {
         window.$message.success(msg)
         getTableData()
-    } 
+    }
 }
 </script>
 
 <style lang='scss' scoped>
-</style>
+</style>

+ 5 - 13
src/views/tasks/flow.vue

@@ -21,7 +21,7 @@
                         <el-button plain size="small" type="primary" @click="handleTableEdit(row)">编辑</el-button>
                     </HcTooltip>
                     <HcTooltip keys="tasks_flow_del">
-                        <el-button plain size="small" type="danger" @click="handleTableDel(row)">删除</el-button>
+                        <el-button v-del-com:[handleTableDel]="row" plain size="small" type="danger">删除</el-button>
                     </HcTooltip>
                 </template>
             </HcTable>
@@ -57,7 +57,7 @@ import { onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import { getArrValue, getObjValue } from 'js-fast-way'
 import tasksFlowApi from '~api/tasks/flow'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 //变量
 const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId)
@@ -194,17 +194,9 @@ const saveFormClick = async () => {
 }
 
 //删除
-const handleTableDel = (row) => {
-    delMessageV2(async (action, instance, done) => {
-            if (action === 'confirm') {
-                instance.confirmButtonLoading = true
-                removeFixedFlowData(row)
-                instance.confirmButtonLoading = false
-                done()
-            } else {
-                done()
-            }
-    })
+const handleTableDel = async ({ item }, resolve) => {
+    await removeFixedFlowData(item)
+    resolve()
 }
 
 //确认删除

+ 1 - 1
src/views/tasks/message-data.vue

@@ -64,7 +64,7 @@ import { useRoute, useRouter } from 'vue-router'
 import messageApi from '~api/tasks/message'
 import { arrToId, getArrValue } from 'js-fast-way'
 import website from '~src/config/index'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //消息数量
 const props = defineProps(

+ 13 - 13
src/views/tentative/collect/test.vue

@@ -63,7 +63,7 @@
                             />
                         </el-select>
                     </div>
-               
+
                     <div class="w-64 ml-2">
                         <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
                     </div>
@@ -76,7 +76,7 @@
                     <template #action="{ row }">
                         <el-button
                             hc-btn
-                            type="primary" 
+                            type="primary"
                             @click="viewPdf(row)"
                         >
                             <HcIcon name="eye" />
@@ -161,7 +161,7 @@ import { useAppStore } from '~src/store'
 import { download, getContractList, getPage, getSummaryList, removeByIds, save } from '~api/tentative/collect/test'
 import { arrToId, getArrValue, getObjValue, isString } from 'js-fast-way'
 
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { getDictionary } from '~api/other'
 import { toPdfPage } from '~uti/btn-auth'
 
@@ -204,7 +204,7 @@ const getContractOpt = async () => {
     const { error, code, data } = await getContractList({
         contractId: contractId.value,
         projectId: projectId.value,
-      
+
     })
     //判断状态
     if (!error && code === 200) {
@@ -274,7 +274,7 @@ const addbetweenTimeUpdate = ({ arr, query }) => {
     addbetweenTime.value = arr
     addFormModal.value.startDate = arr[0]
     addFormModal.value.endDate = arr[1]
- 
+
 }
 
 //选择检测类别
@@ -301,7 +301,7 @@ const tableColumn = ref([
     { key: 'detectionTypeName', name: '检测类型' },
     { key: 'summaryDateName', name: '汇总日期' },
     { key: 'action', name: '操作', width:100 },
-   
+
 ])
 
 //获取数据
@@ -329,7 +329,7 @@ const getTableData = async () => {
     } else {
         window.$message.warning('请先选择汇总分类')
     }
-   
+
 }
 
 //多选
@@ -363,7 +363,7 @@ const removeContractTreeNode = async () => {
         text: '删除节点中,请耐心等待...',
         background: 'rgba(0, 0, 0, 0.7)',
     })
-  
+
     const { error, code } = await removeByIds({
         ids: arrToId( tableCheckedKeys.value),
     })
@@ -403,14 +403,14 @@ const addFormModal = ref({})
 const addFormShow = ref(false)
 const addFormLoading = ref(false)
 const addClick = ()=>{
- 
+
     addFormShow.value = true
 
 }
 const addModalClose = ()=>{
     addFormShow.value = false
     addFormModal.value = {}
-  
+
 }
 
 const addFormRules = ref(null)
@@ -421,7 +421,7 @@ const addModalSave = async ()=>{
     addFormLoading.value = true
     const { error, code, msg } = await save({
             ...addFormModal.value,
-            
+
      })
      addFormLoading.value = false
         //判断状态
@@ -430,7 +430,7 @@ const addModalSave = async ()=>{
          addFormShow.value = false
          getTableData()
 
-        } 
+        }
 }
 const unitOpt = ref([
     { name:'施工', id:'1' },
@@ -442,7 +442,7 @@ const downClick = async ()=>{
             ids: arrToId( tableCheckedKeys.value),
         })
         downLoading.value = false
- 
+
     const res = isString(data) ? data || '' : ''
     if (!error && code === 200 && res) {
         window.open(res, '_blank')

+ 1 - 1
src/views/tentative/detect/components/HcTreeData.vue

@@ -48,7 +48,7 @@ import { nextTick, onMounted, ref, watch } from 'vue'
 import { HcIsButton } from '~src/plugins/IsButtons'
 import { getTreeAll, removeTree, submitTree } from '~api/tentative/detect'
 import { formValidate, getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 //参数
 const props = defineProps({
     autoExpandKeys: {

+ 3 - 3
src/views/tentative/detect/outside.vue

@@ -13,7 +13,7 @@
                 <el-scrollbar>
                     <HcTreeData
                         v-if="isShowTree" :auto-expand-keys="thirdTreeKeys" :contract-id="contractId"
-                        :project-id="projectId" type="rightTree" @menuTap="menuTapClick" @nodeTap="wbsElTreeClick"
+                        :project-id="projectId" type="rightTree" @menu-tap="menuTapClick" @node-tap="wbsElTreeClick"
                     />
                 </el-scrollbar>
             </div>
@@ -297,7 +297,7 @@
                             :tenant-id="userInfo?.tenant_id"
                             :wbs-temp-id="projectInfo?.referenceWbsTemplateIdTrial"
                             :wbs-type="2"
-                            @nodeTap="sampleTreeClick"
+                            @node-tap="sampleTreeClick"
                         />
                     </el-scrollbar>
                 </div>
@@ -341,7 +341,7 @@ import dataApi from '~api/tentative/detect/third'
 import samplingApi from '~api/tentative/material/sampling'
 import { arrToId, formValidate, getArrValue } from 'js-fast-way'
 // import {delMessage} from "~uti/tools";
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //变量
 const useAppState = useAppStore()

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

@@ -253,7 +253,7 @@ import { arrKeyValue, arrToId, getArrValue, getObjValue, isString } from 'js-fas
 
 import { Loading } from 'element-plus/es/components/loading/src/service'
 import notableform from '~src/assets/view/notableform.svg'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 
 //变量

+ 3 - 3
src/views/tentative/detect/third.vue

@@ -13,7 +13,7 @@
                 <el-scrollbar>
                     <HcTreeData
                         v-if="isShowTree" :auto-expand-keys="thirdTreeKeys" :contract-id="contractId"
-                        :project-id="projectId" type="leftTree" @menuTap="menuTapClick" @nodeTap="wbsElTreeClick"
+                        :project-id="projectId" type="leftTree" @menu-tap="menuTapClick" @node-tap="wbsElTreeClick"
                     />
                 </el-scrollbar>
             </div>
@@ -300,7 +300,7 @@
                             :tenant-id="userInfo?.tenant_id"
                             :wbs-temp-id="projectInfo?.referenceWbsTemplateIdTrial"
                             :wbs-type="2"
-                            @nodeTap="sampleTreeClick"
+                            @node-tap="sampleTreeClick"
                         />
                     </el-scrollbar>
                 </div>
@@ -343,7 +343,7 @@ import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import dataApi from '~api/tentative/detect/third'
 import samplingApi from '~api/tentative/material/sampling'
 import { arrToId, formValidate, getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //变量
 const useAppState = useAppStore()

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

@@ -266,7 +266,7 @@ import approachApi from '~api/tentative/device/approach'
 import { formValidate, getArrValue } from 'js-fast-way'
 import { getContractUserList } from '~api/other'
 import { deviceClassListInit, getClassList } from '~api/tentative'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 
 //初始变量

+ 1 - 1
src/views/tentative/device/employ.vue

@@ -212,7 +212,7 @@ import { getContractUserList } from '~api/other'
 import dataApi from '~api/tentative/device/employ'
 import { arrToId, formValidate, getArrValue, getObjValue } from 'js-fast-way'
 import { getRowsValue } from '~uti/tools'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 
 //初始变量

+ 1 - 1
src/views/tentative/device/overhaul.vue

@@ -175,7 +175,7 @@ import { getContractUserList } from '~api/other'
 import { arrToId, formValidate, getArrValue } from 'js-fast-way'
 import dataApi from '~api/tentative/device/overhaul'
 import { getRowsValue } from '~uti/tools'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 
 

+ 1 - 1
src/views/tentative/laboratory/user.vue

@@ -211,7 +211,7 @@ import dataApi from '~api/tentative/laboratory/user'
 import FormItemUpload from './components/FormItemUpload.vue'
 import { arrKeyValue, arrToId, formValidate, getArrValue, isIdCard } from 'js-fast-way'
 import { getDictionary } from '~api/other'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //初始变量
 const useAppState = useAppStore()

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

@@ -294,7 +294,7 @@ import notableform from '~src/assets/view/notableform.svg'
 import approachApi from '~api/tentative/material/approach'
 import { arrIndex, arrToId, deepClone, formValidate, getArrValue } from 'js-fast-way'
 import { getDictionary } from '~api/other'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 
 //初始变量

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

@@ -292,7 +292,7 @@ import samplingApi from '~api/tentative/material/sampling'
 import approachApi from '~api/tentative/material/approach'
 import { getContractUserList, getDictionary } from '~api/other'
 import { arrIndex, arrToId, deepClone, formValidate, getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 
 //变量

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

@@ -62,7 +62,7 @@ import { onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import dataApi from '~api/tentative/parameter/compactness'
 import { arrToId, formValidate, getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //初始变量
 const useAppState = useAppStore()

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

@@ -13,7 +13,7 @@
                 <el-scrollbar>
                     <HcMenuSimple
                         :datas="menus" :keys="menuKey" :menus="contextMenu" :props="menuProps"
-                        @change="menuChange" @menuTap="contextMenuClick"
+                        @change="menuChange" @menu-tap="contextMenuClick"
                     />
                 </el-scrollbar>
             </div>
@@ -189,7 +189,7 @@ import { HcIsButton } from '~src/plugins/IsButtons'
 import { arrToId, downloadBlob, formValidate, getArrValue } from 'js-fast-way'
 import HcDragUpload from './components/HcDragUpload.vue'
 import dataApi from '~api/tentative/parameter/container'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //初始变量
 const useAppState = useAppStore()

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

@@ -56,7 +56,7 @@ import { onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import dataApi from '~api/tentative/parameter/density'
 import { arrToId, formValidate, getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //初始变量
 const useAppState = useAppStore()

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

@@ -13,7 +13,7 @@
                 <el-scrollbar>
                     <HcMenuSimple
                         :datas="menus" :keys="menuKey" :menus="contextMenu" :props="menuProps"
-                        @change="menuChange" @menuTap="contextMenuClick"
+                        @change="menuChange" @menu-tap="contextMenuClick"
                     />
                 </el-scrollbar>
             </div>
@@ -131,7 +131,7 @@ import { useAppStore } from '~src/store'
 import { HcIsButton } from '~src/plugins/IsButtons'
 import { arrToId, formValidate, getArrValue } from 'js-fast-way'
 import dataApi from '~api/tentative/parameter/sieve'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 //初始变量
 const useAppState = useAppStore()