Sfoglia il codice sorgente

更新依赖,并更改插件,以及修复表单数据问题

ZaiZai 2 anni fa
parent
commit
96be327942
57 ha cambiato i file con 2496 aggiunte e 2694 eliminazioni
  1. 4 4
      README.md
  2. 1 0
      package.json
  3. 6 6
      src/App.vue
  4. 5 5
      src/api/request/httpApi.js
  5. 1 1
      src/api/request/index.js
  6. 2 1
      src/components/drag-node/index.vue
  7. 3 3
      src/components/plugins/table-form/hc-form-checkbox-group.vue
  8. 3 3
      src/components/plugins/table-form/hc-form-select-search.vue
  9. 0 590
      src/components/table-form/bak.vue
  10. 8 7
      src/components/table-form/index.vue
  11. 6 5
      src/config/index.js
  12. 1 1
      src/global/components/hc-context-menu/index.vue
  13. 3 2
      src/global/components/hc-dialog/index.vue
  14. 1 1
      src/global/components/hc-drag-modal/index.vue
  15. 15 11
      src/global/components/hc-menu-simple/index.vue
  16. 54 32
      src/global/components/hc-report-modal/index.vue
  17. 10 9
      src/global/components/hc-sms-auth/index.vue
  18. 4 3
      src/global/components/hc-tabs-simple/index.vue
  19. 35 29
      src/global/components/hc-tasks-user/index.vue
  20. 6 6
      src/global/components/hc-uploads/index.vue
  21. 25 25
      src/layout/modules/HelpInfoBar.vue
  22. 8 8
      src/layout/modules/TopMenuBar.vue
  23. 6 6
      src/layout/modules/UserInfoBar.vue
  24. 1 1
      src/plugins/HTableForm.js
  25. 75 0
      src/plugins/useOsTheme.js
  26. 4 8
      src/router/routers.js
  27. 41 41
      src/store/index.js
  28. 10 10
      src/store/modules/app.js
  29. 13 12
      src/store/modules/user.js
  30. 6 6
      src/test/index.vue
  31. 18 3
      src/utils/storage.js
  32. 11 27
      src/utils/tools.js
  33. 1 0
      src/views/data-fill/collapse-form/index.vue
  34. 2 2
      src/views/data-fill/collapse-form/table-form-item.vue
  35. 3 3
      src/views/data-fill/collapse-form/test-diaolg.vue
  36. 4 4
      src/views/data-fill/components/ListItem(已废弃).vue
  37. 14 8
      src/views/data-fill/division.vue
  38. 3 3
      src/views/data-fill/query.vue
  39. 6 6
      src/views/data-fill/wbs.vue
  40. 37 26
      src/views/home/config.vue
  41. 16 13
      src/views/ledger/write.vue
  42. 4 4
      src/views/other-file/image-data.vue
  43. 92 67
      src/views/other-file/image-form.vue
  44. 7 7
      src/views/other-file/image-view.vue
  45. 157 133
      src/views/other-file/project-scanning.vue
  46. 330 276
      src/views/other/components/ListItem.vue
  47. 207 190
      src/views/other/first-item.vue
  48. 223 206
      src/views/other/first-itemcopy.vue
  49. 13 12
      src/views/schedule/write.vue
  50. 45 40
      src/views/tentative/collect/test.vue
  51. 118 94
      src/views/tentative/detect/outside.vue
  52. 337 316
      src/views/tentative/detect/test-form.vue
  53. 245 220
      src/views/tentative/detect/test.vue
  54. 118 93
      src/views/tentative/detect/third.vue
  55. 25 24
      src/views/tentative/laboratory/print.vue
  56. 98 81
      src/views/tentative/material/sampling.vue
  57. 5 0
      yarn.lock

+ 4 - 4
README.md

@@ -4,7 +4,6 @@
 
 ---
 
-
 ## node.js 的版本需要  14.18+
 
 ```shell
@@ -17,7 +16,6 @@ node -v
 
 ---
 
-
 ### 推荐使用  `yarn` 管理依赖
 
 如果电脑上还没有安装 `yarn` ,执行以下命令安装 `yarn`
@@ -42,7 +40,6 @@ yarn install
 
 ---
 
-
 ### `yarn` 的相关命令
 
 安装依赖
@@ -54,10 +51,13 @@ yarn add 依赖名
 yarn add -D 依赖名
 ```
 
-
 检测依赖更新
 
 ```shell
 yarn upgrade-interactive --latest
 ```
 
+js-fast-way 文档
+
+https://js-fast-way.vercel.app/
+

+ 1 - 0
package.json

@@ -14,6 +14,7 @@
         "element-plus": "2.3.3",
         "js-base64": "^3.7.5",
         "js-cookie": "^3.0.1",
+        "js-fast-way": "^0.0.7",
         "js-md5": "^0.7.3",
         "js-web-screen-shot": "^1.9.0",
         "nprogress": "^0.2.0",

+ 6 - 6
src/App.vue

@@ -8,8 +8,8 @@
 import {nextTick, ref, watch} from "vue";
 import {useAppStore} from "~src/store";
 import AppConfig from "~com/AppConfig/index.vue";
-import {setMainColor} from "~src/utils/tools";
-import {getObjValue, ulog, useOsTheme} from "vue-utils-plus"
+import {useOsTheme} from '~src/plugins/useOsTheme';
+import {setElementMainColor, ulog, getObjValue} from "js-fast-way"
 import config from '~src/config/index';
 
 //初始变量
@@ -21,12 +21,12 @@ watch(() => [
     appStore.getTheme,
     appStore.getThemeVal,
     appStore.getColor
-], ([Theme,ThemeVal,ColorVal]) => {
+], ([Theme, ThemeVal, ColorVal]) => {
     UserTheme.value = Theme
     setUserTheme(ThemeVal, ColorVal)
 })
 
-nextTick(()=> {
+nextTick(() => {
     setUserTheme(appStore.getThemeVal, appStore.getColor)
     ulog('客户端 启动成功', '当前开发版本 v' + config?.dev_version)
 })
@@ -35,7 +35,7 @@ nextTick(()=> {
 const setUserTheme = (theme, appColor) => {
     const colorVal = getObjValue(appColor)
     //设置主色调
-    setMainColor(colorVal?.color)
+    setElementMainColor(colorVal?.color)
     const colorName = colorVal?.name || 'green'
     //设置主题
     let val = UserTheme.value
@@ -46,6 +46,6 @@ const setUserTheme = (theme, appColor) => {
         theme = val;
     }
     //挂载相关样式
-    document.documentElement.setAttribute('class',`${theme} color-${colorName}`)
+    document.documentElement.setAttribute('class', `${theme} color-${colorName}`)
 }
 </script>

+ 5 - 5
src/api/request/httpApi.js

@@ -1,17 +1,17 @@
 import request from "./index";
-import {getObjValue} from "vue-utils-plus"
+import {getObjValue} from "js-fast-way"
 
 //封装的请求
-export const httpApi = async (obj, message= true) => {
-    return new Promise( (resolve) => {
+export const httpApi = async (obj, message = true) => {
+    return new Promise((resolve) => {
         //发起请求
         request(obj).then((response) => {
-            resolve(getResData(response,false));
+            resolve(getResData(response, false));
         }).catch((response) => {
             if (message) {
                 window.$message?.error(getMsgVal(response));
             }
-            resolve(getResData(response,true));
+            resolve(getResData(response, true));
         })
     });
 }

+ 1 - 1
src/api/request/index.js

@@ -3,7 +3,7 @@ import {Base64} from 'js-base64';
 import website from '~src/config';
 import router from '~src/router/index';
 import {getToken} from '~src/api/util/auth';
-import {toSerialize} from "vue-utils-plus"
+import {toSerialize} from "js-fast-way"
 
 //默认超时时间
 axios.defaults.timeout = 0;

+ 2 - 1
src/components/drag-node/index.vue

@@ -44,7 +44,8 @@
 
 <script setup>
 import {ref, watch} from "vue"
-import {getRandom} from "vue-utils-plus"
+import {getRandom} from "js-fast-way"
+
 //初始
 const props = defineProps({
     moreMenu: {

+ 3 - 3
src/components/plugins/table-form/hc-form-checkbox-group.vue

@@ -20,7 +20,7 @@ export default {
 <script setup>
 import {ref, nextTick, watch} from 'vue'
 import {ElCheckbox} from 'element-plus'
-import {isNullAll, deepClone, getIndex} from "vue-utils-plus"
+import {isNullES, deepClone, arrIndex} from "js-fast-way"
 
 const props = defineProps({
     ui: {
@@ -72,11 +72,11 @@ const setInitDatas = (datas, objs) => {
 //处理数据
 const setModelVal = (val) => {
     const datas = deepClone(checkboxDatas.value)
-    if (!isNullAll(val)) {
+    if (!isNullES(val)) {
         const arr = String(val).split(',')
         for (let i = 0; i < arr.length; i++) {
             const item = String(arr[i])
-            const index = getIndex(datas, 'key', item)
+            const index = arrIndex(datas, 'key', item)
             datas[index].checked = true
         }
     }

+ 3 - 3
src/components/plugins/table-form/hc-form-select-search.vue

@@ -9,7 +9,7 @@
 import {nextTick, ref} from 'vue'
 import {getDapSiteData} from "~api/other"
 import {ElSelect, ElOption} from 'z-element-plus'
-import {getObjNullValue, getIndex, getObjValue} from "vue-utils-plus"
+import {getObjValue, getObjVal, arrIndex} from "js-fast-way"
 
 const props = defineProps({
     val: {
@@ -68,7 +68,7 @@ const getDapSiteDataApi = async (key) => {
             key: key
         }, false)
         //处理数据
-        const resData = getObjNullValue(data)
+        const resData = getObjVal(data)
         if (!error && code === 200 && resData) {
             selectDatas.value = await objToArr(resData, key)
         } else {
@@ -98,7 +98,7 @@ const emit = defineEmits(['change'])
 //当前被选中的事件
 const formRemoteChange = (val) => {
     const datas = selectDatas.value
-    const index = getIndex(datas, 'value', val)
+    const index = arrIndex(datas, 'value', val)
     if (index >= 0) {
         emit('change', getObjValue(datas[index].data))
     }

+ 0 - 590
src/components/table-form/bak.vue

@@ -1,590 +0,0 @@
-<template>
-    <div :id="`table-form-item-${keyId}`" v-loading="loading" :style="tableFormItemStyle"
-         class="hc-table-form-data-item">
-        <el-scrollbar v-if="isScroll" class="table-form-item-scrollbar">
-            <div :id="`table-form-${keyId}`" class="hc-excel-table-form"/>
-        </el-scrollbar>
-        <div v-else :id="`table-form-${keyId}`" class="hc-excel-table-form"/>
-        <div v-if="isTableForm === false" class="hc-no-table-form">
-            <div class="table-form-no">
-                <img :src="notableform" alt=""/>
-                <div class="desc">暂无表单数据</div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import {ref, watch, onMounted, nextTick, onUnmounted} from "vue"
-import {useAppStore} from "~src/store";
-import HTableForm from "~src/plugins/HTableForm"
-import notableform from '~src/assets/view/notableform.svg'
-import {getStoreData, setStoreData, delStoreData} from "~uti/storage";
-import {getObjNullValue, isAsyncFunction, isString, getArrValue, deepClone, getIndex} from "vue-utils-plus"
-
-const useAppState = useAppStore()
-
-//初始
-const props = defineProps({
-    tid: { // 树节点
-        type: [String, Number],
-        default: ''
-    },
-    kid: { // pkeyId
-        type: [String, Number],
-        default: ''
-    },
-    classify: { // 类型
-        type: [String, Number],
-        default: ''
-    },
-    api: { //请求方法函数列表
-        type: Object,
-        default: () => ({
-            dataInfo: null,
-            bussCols: null,
-            excelHtml: null
-        })
-    },
-    height: { // 高度
-        type: String,
-        default: '100%'
-    },
-    width: { // 宽度
-        type: String,
-        default: 'auto'
-    },
-    scroll: { // 可否滚动
-        type: Boolean,
-        default: false
-    },
-    datas: { //变动的数据
-        type: Object,
-        default: () => ({})
-    },
-    nodeName: { // 表单名称
-        type: String,
-        default: ''
-    },
-})
-
-//初始变量
-const projectId = ref(useAppState.getProjectId)
-const contractId = ref(useAppState.getContractId)
-const keyId = ref(props.kid ? props.kid + '' : '')
-const treeId = ref(props.tid)
-const classify = ref(props.classify)
-const apis = ref(props.api)
-const tableFormItemStyle = ref('')
-const loading = ref(false)
-const isScroll = ref(props.scroll)
-const changeData = ref(props.datas)
-const nodeNames = ref(props.nodeName)
-
-//监听
-watch(() => [
-    useAppState.getProjectId,
-    useAppState.getContractId,
-    props.tid,
-    props.kid,
-    props.classify,
-    props.width,
-    props.height,
-    props.scroll,
-    props.nodeName
-], ([project_id, contract_id, tree_id, key_id, cid, width, height, scroll, nodeName]) => {
-    projectId.value = project_id
-    contractId.value = contract_id
-    treeId.value = tree_id
-    keyId.value = key_id ? key_id + '' : ''
-    classify.value = cid
-    isScroll.value = scroll
-    nodeNames.value = nodeName
-    setItemStyle(width, height)
-})
-
-//深度监听变动的对象数据
-watch(() => [
-    props.datas
-], ([data]) => {
-    changeData.value = data
-    setFormChangeData(data)
-}, {deep: true})
-
-//渲染完成
-onMounted(async () => {
-    let keys = []
-    loading.value = true
-    const {dataInfo, bussCols, excelHtml} = apis.value
-    setItemStyle(props.width, props.height)
-    //获取已填写的数据
-    if (isAsyncFunction(dataInfo)) {
-        await getTableFormInfo(keyId.value, dataInfo)
-    }
-    //按键key列表
-    if (isAsyncFunction(bussCols)) {
-        keys = await getHtmlBussColsApi(keyId.value, bussCols)
-    }
-    //渲染表单
-    if (isAsyncFunction(excelHtml)) {
-        await getExcelHtml(keyId.value, excelHtml, keys)
-    }
-    loading.value = false
-})
-
-const setFormChangeData = (data) => {
-    const form = tableFormInfo.value
-    tableFormInfo.value = {
-        ...form,
-        ...data
-    }
-    tableFormInfo.value = form
-}
-
-//设置样式
-const setItemStyle = (width, height) => {
-    tableFormItemStyle.value = `width: ${width}; height: ${height};`
-}
-
-//事件
-const emit = defineEmits(['rightTap', 'render'])
-
-//渲染状态变量
-const isTableForm = ref(false)
-const tableFormInfo = ref({})
-
-//获取表单初始数据
-const getFormDataInit = () => {
-    return {
-        projectId: projectId.value,
-        contractId: contractId.value,
-        classify: classify.value,
-        pkeyId: keyId.value,
-        nodeId: treeId.value,
-        isRenderForm: false,
-    }
-}
-
-//获取已填写的数据
-const getTableFormInfo = async (pkeyId, func) => {
-    if (pkeyId) {
-        const {error, code, data} = await func({
-            pkeyId: pkeyId
-        }, false)
-        const resData = getObjNullValue(data)
-        if (!error && code === 200 && resData) {
-            HTableForm.setPickerKey(resData)
-            tableFormInfo.value = {
-                ...resData,
-                ...getFormDataInit(),
-                ...changeData.value
-            }
-        } else {
-            tableFormInfo.value = {
-                ...getFormDataInit(),
-                ...changeData.value
-            }
-        }
-    } else {
-        tableFormInfo.value = {}
-        window?.$message?.warning('pkeyId为空')
-    }
-}
-
-//获取按键切换输入框的key列表
-const getHtmlBussColsApi = async (pkeyId, func) => {
-    if (pkeyId) {
-        const {error, code, data} = await func({
-            pkeyId: pkeyId
-        }, false)
-        if (!error && code === 200) {
-            let keys = getArrValue(data);
-            for (let i = 0; i < keys.length; i++) {
-                if (keys[i].length <= 0) {
-                    keys.splice(i, 1)
-                }
-            }
-            return keys;
-        } else {
-            return [];
-        }
-    } else {
-        return [];
-    }
-}
-
-//获取模板标签数据
-const getExcelHtml = async (pkeyId, func, keys) => {
-    if (pkeyId) {
-        const {error, code, data} = await func({
-            pkeyId: pkeyId
-        }, false)
-        const resData = isString(data) ? data || '' : ''
-        if (!error && code === 200 && resData) {
-            isTableForm.value = true
-            //渲染表单
-            HTableForm.createForm({
-                template: resData,
-                tableForm: tableFormInfo.value,
-                keys: keys,
-                appId: `#table-form-${pkeyId}`,
-                onRight: (event, KeyName) => {
-                    onRightClick(pkeyId, event, KeyName)
-                },
-                //表单正则效验
-                onBlur: (event, key, reg, val, msg) => {
-                    setTableFormBlurReg(pkeyId, event, key, reg, val, msg)
-                },
-                onLeftClick: (key) => {
-                    setShiftTableForm(key)
-                },
-            })
-            tableFormInfo.value.isRenderForm = true
-            await nextTick(() => {
-                HTableForm.setByClassKeyup(keys)
-            })
-        } else {
-            isTableForm.value = false
-            tableFormInfo.value.isRenderForm = false
-            window?.$message?.warning('暂无表单')
-        }
-    } else {
-        isTableForm.value = false
-        tableFormInfo.value.isRenderForm = false
-        window?.$message?.warning('pkeyId为空')
-    }
-    emit('render', tableFormInfo.value)
-}
-
-//正则效验
-const formRegExpJson = ref({})
-const setTableFormBlurReg = (pkeyId, event, key, reg, val, msg) => {
-    const dom = document.getElementById(key)?.parentElement ?? ''
-    if (dom) {
-        if (val && reg) {
-            let regx = new RegExp(reg);
-            let state = regx.test(val);
-            if (state) {
-                delete formRegExpJson.value[key]
-                HTableForm.setFormStyle(key, 'hc-red-border')
-            } else {
-                formRegExpJson.value[key] = {key, reg, val, msg, state}
-                HTableForm.setFormStyle(key, 'hc-red-border', true)
-                window?.$message?.warning(msg)
-            }
-        } else {
-            delete formRegExpJson.value[key]
-            HTableForm.setFormStyle(key, 'hc-red-border')
-        }
-    } else {
-        delete formRegExpJson.value[key]
-    }
-}
-
-
-//鼠标右键事件
-const onRightClick = (pkeyId, event, KeyName) => {
-    //取光标位置
-    const specialDom = document.getElementById(KeyName + "")
-    const startPos = specialDom?.selectionStart || 0
-    const endPos = specialDom?.selectionEnd || 0
-    emit('rightTap', {event, KeyName, startPos, endPos, pkeyId})
-}
-
-const isCtrlKey = ref(false)
-const checkKeyList = ref([])
-const copyKeyList = ref(getStoreData('TableFormCopyKeyList') || [])
-
-//设置选择数据
-const setShiftTableForm = (key) => {
-    if (isCtrlKey.value) {
-        const form = tableFormInfo.value
-        const keys = checkKeyList.value
-        const index = getIndex(keys, 'key', key)
-        if (index === -1) {
-            keys.push({key: key, val: form[key]})
-        } else {
-            keys.splice(index, 1)
-        }
-        checkKeyList.value = keys
-        HTableForm.setCheckKeyStyle(key, index !== -1)
-    }
-}
-
-//全局按键按下监听
-document.onkeydown = async (event) => {
-    const {key, ctrlKey} = event
-    //按下ctrl键
-    if (ctrlKey && key === 'Control') {
-        isCtrlKey.value = true
-    }
-    //按下复制快捷键
-    if (ctrlKey && key === 'c') {
-        const keysList = deepClone(checkKeyList.value)
-        if (keysList.length > 0) {
-            event.preventDefault()
-            setStoreData('TableFormCopyKeyList', keysList)
-            copyKeyList.value = keysList
-            keysList.forEach(item => {
-                HTableForm.setCheckKeyStyle(item['key'], true)
-            })
-            checkKeyList.value = []
-        }
-    }
-    //按下粘贴快捷键
-    if (ctrlKey && key === 'v') {
-        const keysList = deepClone(copyKeyList.value)
-        const checkList = checkKeyList.value
-        if (checkList.length > 0) {
-            event.preventDefault()
-            //粘贴多个
-            if (checkList.length > 1 && keysList.length > 1) {
-                await setMultipleCheckValue(checkList, keysList)
-            }
-            //粘贴单个复制
-            if (checkList.length > 1 && keysList.length === 1) {
-                await setSingleCopyValue(checkList, keysList)
-            }
-            //复制单个粘贴
-            if (checkList.length === 1 && keysList.length > 1) {
-                await setCopySingleValue(checkList, keysList)
-            }
-            //清除缓存
-            checkKeyList.value = []
-            copyKeyList.value = []
-            delStoreData('TableFormCopyKeyList')
-        }
-    }
-}
-
-//复制单个粘贴
-const setCopySingleValue = async (checkList, keysList) => {
-    let form_val = '', key = checkList[0]['key']
-    const form = tableFormInfo.value
-    for (let i = 0; i < keysList.length; i++) {
-        const val = form[keysList[i]['key']]
-        form_val = form_val ? form_val + '、' + val : val
-        keysList.splice(0, 1) //删除第一个元素
-    }
-    await setTableFormInfoValue(key, form_val)
-    HTableForm.setCheckKeyStyle(key, true)
-}
-
-//粘贴单个复制
-const setSingleCopyValue = async (checkList, keysList) => {
-    const form = tableFormInfo.value
-    const form_val = form[keysList[0]['key']]
-    for (let i = 0; i < checkList.length; i++) {
-        const {key} = checkList[i]
-        await setTableFormInfoValue(key, form_val)
-        HTableForm.setCheckKeyStyle(key, true)
-    }
-    keysList.splice(0, 1) //删除第一个元素
-}
-
-
-//粘贴多个
-const setMultipleCheckValue = async (checkList, keysList) => {
-    const form = tableFormInfo.value
-    for (let i = 0; i < checkList.length; i++) {
-        const {key, val} = checkList[i]
-        if (keysList.length > 0) {
-            const form_val = form[keysList[0]['key']]
-            await setTableFormInfoValue(key, form_val ? form_val : val)
-            keysList.splice(0, 1) //删除第一个元素
-        } else {
-            await setTableFormInfoValue(key, val)
-        }
-        HTableForm.setCheckKeyStyle(key, true)
-    }
-}
-
-//设置表单数据
-const setTableFormInfoValue = async (key, value) => {
-    return new Promise((resolve) => {
-        setTimeout(() => {
-            tableFormInfo.value[key] = value
-            resolve(true)
-        }, 100)
-    })
-}
-
-
-//全局键盘放开监听
-document.onkeyup = (event) => {
-    const {key, ctrlKey} = event
-    if (!ctrlKey && key === 'Control') {
-        isCtrlKey.value = false
-    }
-}
-
-//卸载页面
-onUnmounted(() => {
-    document.onkeydown = null
-    document.onkeyup = null
-})
-
-//获取表单数据
-const getFormData = () => {
-    return tableFormInfo.value
-}
-
-//设置表单数据
-const setFormData = (data) => {
-    nextTick(() => {
-        tableFormInfo.value = data
-    })
-}
-
-//获取表单效验数据
-const getRegExpJson = () => {
-    return deepClone(formRegExpJson.value);
-}
-
-const getNodeName = () => {
-    return nodeNames.value
-}
-
-//正则效验
-const isFormRegExp = async () => {
-    const isRegExp = !!getObjNullValue(formRegExpJson.value)
-    if (!isRegExp) {
-        return true
-    } else {
-        window?.$message?.warning('请先修改完红色输入框的数据')
-        return false
-    }
-}
-
-// 暴露出去
-defineExpose({
-    getFormData,
-    setFormData,
-    getRegExpJson,
-    isFormRegExp,
-    getNodeName
-})
-</script>
-
-<style lang="scss">
-//插入特殊字符弹窗的输入框
-.hc-table-form-data-item .hc-excel-table-form td,
-.hc-table-form-data-item .hc-excel-table-form td .el-input .el-input__wrapper .el-input__inner,
-.el-form-item.special-form-item .el-form-item__content .el-input .el-input__wrapper .el-input__inner {
-    font-family: "EUDC", 宋体, v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
-}
-.hc-table-form-data-item {
-    position: relative;
-    padding: 12px;
-    height: 100%;
-    overflow: hidden;
-    background-color: white;
-    .hc-excel-table-form {
-        position: relative;
-        display: flex;
-        padding: 10px;
-        justify-content: center;
-        td {
-            padding: 6px;
-            .el-input {
-                background-color: #ffffff !important;
-                border-radius: 3px;
-                color: #606266;
-                .el-input__wrapper {
-                    background-color: inherit;
-                    caret-color: var(--el-color-primary);
-                }
-                .el-input__suffix-inner {
-                    width: 18px;
-                }
-            }
-            .el-textarea {
-                width: 100%;
-                height: 100%;
-                .el-textarea__inner {
-                    min-height: initial !important;
-                    background-color: #ffffff;
-                    border-radius: 3px;
-                    color: #606266;
-                    height: 100%;
-                    caret-color: var(--el-color-primary);
-                }
-            }
-            //日期选择框
-            .el-date-editor.el-input .el-input__wrapper,
-            .el-date-editor.el-date-editor--datetimerange.el-input__wrapper {
-                height: 100%;
-                width: 100%;
-            }
-            //焦点
-            .el-input .el-input__wrapper.is-focus, .el-input .el-input__wrapper:hover,
-            .el-textarea .el-textarea__inner:hover {
-                box-shadow: 0 0 0 1.5px var(--el-input-focus-border-color) inset;
-                background-color: #eddac4;
-            }
-            //公式
-            &[gscolor] {
-                .el-input, .el-textarea .el-textarea__inner {
-                    background-color: #dcdcdc !important;
-                }
-            }
-            //文本选中颜色
-            .el-input .el-input__wrapper input,
-            .el-textarea textarea {
-                &::selection {
-                    background: var(--el-color-primary-light-9);
-                    color: var(--el-color-primary);
-                }
-                &::-moz-selection {
-                    background: var(--el-color-primary-light-9);
-                    color: var(--el-color-primary);
-                }
-            }
-            //下拉框
-            .el-select {
-                width: 100%;
-                height: 100%;
-            }
-        }
-        //非输入框颜色
-        td:not([titlexx]), td[titlexx*=''],
-        td:not([title]), td[title*=''] {
-            background-color: white !important;
-            user-select: none;
-        }
-    }
-    .hc-no-table-form {
-        position: relative;
-        height: 100%;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        .table-form-no {
-            position: relative;
-            img {
-                width: 350px;
-            }
-            .desc {
-                text-align: center;
-                font-size: 20px;
-                color: #aaa;
-            }
-        }
-    }
-}
-
-.hc-red-border {
-    &.el-textarea__inner, &.el-input .el-input__wrapper {
-        --el-input-border-color: #fe0000 !important;
-        box-shadow: 0 0 0 2px #fe0000 inset !important;
-    }
-}
-
-.hc-green-border {
-    &.el-textarea__inner, &.el-input .el-input__wrapper {
-        --el-input-border-color: #1ECC95 !important;
-        box-shadow: 0 0 0 2px #1ECC95 inset !important;
-    }
-}
-
-</style>

+ 8 - 7
src/components/table-form/index.vue

@@ -18,8 +18,8 @@
 import {ref, watch, onMounted, nextTick, onUnmounted} from "vue"
 import HTableForm from "~src/plugins/HTableForm"
 import notableform from '~src/assets/view/notableform.svg'
-import {getStoreData, setStoreData, delStoreData} from "~uti/storage";
-import {getObjNullValue, getArrValue, isString, deepClone, getIndex} from "vue-utils-plus"
+import {getStoreValue, setStoreValue, delStoreValue} from "~uti/storage";
+import {getArrValue, getObjVal, isString, deepClone, arrIndex} from "js-fast-way"
 
 //初始
 const props = defineProps({
@@ -237,7 +237,7 @@ const setShiftTableForm = (key, pid) => {
     if (isCtrlKey.value) {
         const form = excelForm.value
         const keys = checkKeyList.value
-        const index = getIndex(keys, 'key', key)
+        const index = arrIndex(keys, 'key', key)
         if (index === -1) {
             keys.push({key: key, val: form[key]})
         } else {
@@ -259,7 +259,7 @@ const setCopyKeyList = (event) => {
     const keysList = deepClone(checkKeyList.value)
     if (keysList.length > 0) {
         event.preventDefault()
-        setStoreData('TableFormCopyKeys', keysList)
+        setStoreValue('TableFormCopyKeys', keysList)
         keysList.forEach(item => {
             HTableForm.setCheckKeyStyle(item['key'], pid, true)
         })
@@ -269,7 +269,7 @@ const setCopyKeyList = (event) => {
 
 //按下粘贴快捷键
 const setPasteKeyList = async (event) => {
-    let keysList = getArrValue(getStoreData('TableFormCopyKeys'))
+    let keysList = getArrValue(getStoreValue('TableFormCopyKeys'))
     const checkList = checkKeyList.value
     if (checkList.length > 0) {
         event.preventDefault()
@@ -287,7 +287,7 @@ const setPasteKeyList = async (event) => {
         }
         //清除缓存
         checkKeyList.value = []
-        delStoreData('TableFormCopyKeys')
+        delStoreValue('TableFormCopyKeys')
     }
 }
 
@@ -350,6 +350,7 @@ const getFormData = () => {
 //设置表单数据
 const setFormData = (data) => {
     excelForm.value = deepClone(data)
+    setExcelHtml()
 }
 
 //获取表单效验数据
@@ -359,7 +360,7 @@ const getRegExpJson = () => {
 
 //正则效验
 const isFormRegExp = async () => {
-    const isRegExp = !!getObjNullValue(formRegExpJson.value)
+    const isRegExp = !!getObjVal(formRegExpJson.value)
     if (!isRegExp) {
         return true
     } else {

+ 6 - 5
src/config/index.js

@@ -10,17 +10,18 @@ export default {
     tenantId: "000000",     // 管理组租户编号
     captchaMode: false,     // 是否开启验证码模式
     switchMode: false,      // 是否开启部门切换模式
-    tokenTime: 3000,
+    tokenTime: 1740,
     tokenHeader: 'Blade-Auth',
     tokenKey: 'client-access-token',
     refreshTokenKey: 'client-refresh-token',
     statusWhiteList: [],    //http的status默认放行列表
     ossUrl: 'https://bladex-test-info.oss-cn-chengdu.aliyuncs.com', //oss地址
+    isLog: 'auto',  //是否打印日志
     smsPhone: '',  //测试接受短信验证码的手机号
-    dev_version: '202303301528',    //开发版本号
-    //host: 'http://47.110.251.215:8090',  //测试线上
-    host: 'http://127.0.0.1:8090',  //打包线上
-    //host: 'http://192.168.0.118', //祝炜
+    dev_version: '202304111410',    //开发版本号
+    host: 'http://47.110.251.215:8090',  //测试线上
+    //host: 'http://127.0.0.1:8090',  //打包线上
+    //host: 'http://192.168.0.116:8090', //祝炜
     //host: 'http://192.168.0.155', //刘依程
     socket: 'wss://business.hcxxy.com/wss/websocket/',  //测试线上
     //socket: 'ws://127.0.0.1:5399/websocket/',  //打包线上

+ 1 - 1
src/global/components/hc-context-menu/index.vue

@@ -19,7 +19,7 @@
 <script setup>
 import {ref, useSlots, watch, nextTick, onMounted, onBeforeUnmount} from "vue";
 import {ClickOutside as vClickOutside} from 'element-plus'
-import {getRandom, deepClone} from "vue-utils-plus"
+import {getRandom, deepClone} from "js-fast-way"
 
 const props = defineProps({
     ui: {

+ 3 - 2
src/global/components/hc-dialog/index.vue

@@ -3,7 +3,8 @@
                v-model="isShow"
                :append-to-body="isToBody"
                :before-close="beforeClose"
-               :class="[isTable?'hc-modal-table':'', isSlotExtra?'hc-modal-header-extra':'', padding ? '':'hc-modal-no-padding', ui]" :close-on-click-modal="false" :destroy-on-close="!isLoading"
+               :class="[isTable?'hc-modal-table':'', isSlotExtra?'hc-modal-header-extra':'', padding ? '':'hc-modal-no-padding', ui]"
+               :close-on-click-modal="false" :destroy-on-close="!isLoading"
                :show-close="isClose" :style="isBgColor?'--el-dialog-bg-color:' + isBgColor:''" :title="title"
                :width="isWidth"
                class="hc-modal-border"
@@ -42,7 +43,7 @@
 
 <script setup>
 import {ref, watch, useSlots, onMounted} from "vue";
-import {getRandom} from "vue-utils-plus"
+import {getRandom} from "js-fast-way"
 
 const props = defineProps({
     ui: {

+ 1 - 1
src/global/components/hc-drag-modal/index.vue

@@ -54,7 +54,7 @@
 
 <script setup>
 import {ref, nextTick, watch} from "vue"
-import {deepClone, getRandom} from "vue-utils-plus"
+import {getRandom, deepClone} from "js-fast-way"
 import {useAppStore} from "~src/store";
 
 const useAppState = useAppStore()

+ 15 - 11
src/global/components/hc-menu-simple/index.vue

@@ -1,14 +1,16 @@
 <template>
-    <div class="hc-menu-simple-box" :class="ui">
+    <div :class="ui" class="hc-menu-simple-box">
         <template v-for="item in datas" :key="item[menuProps.key]">
-            <div class="item-box" :class="item[menuProps.key] === keysValue ? 'active' : ''" @click="MenuClick(item)" @contextmenu.prevent.stop="menuLabelContextMenu($event,item)">
-                <div class="icon-box" v-if="item[menuProps.icon]">
+            <div :class="item[menuProps.key] === keysValue ? 'active' : ''" class="item-box" @click="MenuClick(item)"
+                 @contextmenu.prevent.stop="menuLabelContextMenu($event,item)">
+                <div v-if="item[menuProps.icon]" class="icon-box">
                     <HcIcon :name="item[menuProps.icon]" fill/>
                 </div>
-                <div class="label-box truncate">{{item[menuProps.label]}}</div>
-                <el-badge :value="item[menuProps.badge]" v-if="item[menuProps.badge] > 0"/>
+                <div class="label-box truncate">{{ item[menuProps.label] }}</div>
+                <el-badge v-if="item[menuProps.badge] > 0" :value="item[menuProps.badge]"/>
                 <!--操作菜单-->
-                <div class="menu-icon" :class="item.showMenuIcon?'show':''" v-if="menusData.length > 0 && !item.isNoContextMenu">
+                <div v-if="menusData.length > 0 && !item.isNoContextMenu" :class="item.showMenuIcon?'show':''"
+                     class="menu-icon">
                     <div class="menu-popover-icon" @click.prevent.stop="menuLabelContextMenu($event,item)">
                         <HcIcon name="apps" ui="text-2xl"/>
                     </div>
@@ -17,13 +19,15 @@
             </div>
         </template>
         <!--右键菜单-->
-        <HcContextMenu ref="contextMenuRef" :datas="menusData" @item-click="handleMenuSelect" v-if="menusData.length > 0" @closed="handleMenuClosed"/>
+        <HcContextMenu v-if="menusData.length > 0" ref="contextMenuRef" :datas="menusData"
+                       @closed="handleMenuClosed" @item-click="handleMenuSelect"/>
     </div>
 </template>
 
 <script setup>
 import {nextTick, ref, watch} from "vue";
-import {getObjValue, getObjNullValue} from "vue-utils-plus"
+import {getObjValue, getObjVal} from "js-fast-way"
+
 const props = defineProps({
     ui: {
         type: String,
@@ -34,7 +38,7 @@ const props = defineProps({
         default: () => ([])
     },
     keys: {
-        type: [String,Number],
+        type: [String, Number],
         default: ''
     },
     menus: {
@@ -91,7 +95,7 @@ const MenuClick = (item) => {
 
 //鼠标右键事件
 const contextMenuRef = ref(null)
-const menuLabelContextMenu = (e,item) => {
+const menuLabelContextMenu = (e, item) => {
     const rows = menusData.value || [];
     if (rows.length > 0 && !item.isNoContextMenu) {
         e.preventDefault();
@@ -114,7 +118,7 @@ const handleMenuSelect = ({key}) => {
 //菜单关闭
 const handleMenuClosed = () => {
     const item = menuItemData.value;
-    if (getObjNullValue(item)) {
+    if (getObjVal(item)) {
         menuItemData.value.showMenuIcon = false
     }
 }

+ 54 - 32
src/global/components/hc-report-modal/index.vue

@@ -1,51 +1,58 @@
 <template>
-    <el-dialog v-model="isShow" :title="title" width="47rem" class="hc-modal-border" draggable destroy-on-close @closed="cancelReportClick">
+    <el-dialog v-model="isShow" :title="title" class="hc-modal-border" destroy-on-close draggable width="47rem"
+               @closed="cancelReportClick">
         <el-form ref="formRef" :model="formModel" :rules="formRules" label-width="auto" size="large">
             <el-form-item label="任务名称" prop="taskName">
                 <el-input v-model="formModel.taskName" disabled/>
             </el-form-item>
-            <el-form-item label="审批内容" v-if="isDatas && reportDatas.length > 0">
+            <el-form-item v-if="isDatas && reportDatas.length > 0" label="审批内容">
                 <div class="task-tag-data-box">
                     <template v-for="(item,index) in reportDatas" :key="item.id">
-                        <el-tag type="info" size="default" closable @close="taskTagClose(index)">{{item.name}}</el-tag>
+                        <el-tag closable size="default" type="info" @close="taskTagClose(index)">{{ item.name }}
+                        </el-tag>
                     </template>
                 </div>
             </el-form-item>
             <el-form-item label="任务描述" prop="taskContent">
-                <el-input type="textarea" v-model="formModel.taskContent" placeholder="请输入任务描述" :autosize="{ minRows: 3, maxRows: 5 }"/>
+                <el-input v-model="formModel.taskContent" :autosize="{ minRows: 3, maxRows: 5 }" placeholder="请输入任务描述"
+                          type="textarea"/>
             </el-form-item>
             <el-form-item label="任务流程" prop="fixedFlowId">
                 <el-select v-model="formModel.fixedFlowId" block @change="handleProcessValue">
-                    <el-option v-for="item in processData" :label="item.fixedFlowName" :disabled="item.disabled" :value="item.id"/>
+                    <el-option v-for="item in processData" :disabled="item.disabled" :label="item.fixedFlowName"
+                               :value="item.id"/>
                 </el-select>
             </el-form-item>
-            <el-form-item label="任务人" prop="userTasks" v-if="diyProcessUser">
-                <HcTasksUser ui="w-full" :projectId="projectId" :contractId="contractId" :type="type" :typeData="typeData" @change="diyProcessUserChange"/>
+            <el-form-item v-if="diyProcessUser" label="任务人" prop="userTasks">
+                <HcTasksUser :contractId="contractId" :projectId="projectId" :type="type" :typeData="typeData"
+                             ui="w-full" @change="diyProcessUserChange"/>
             </el-form-item>
-            <el-form-item label="任务人" v-else>
-                <div class="form-item-div">{{linkUserJoinString}}</div>
+            <el-form-item v-else label="任务人">
+                <div class="form-item-div">{{ linkUserJoinString }}</div>
             </el-form-item>
             <el-form-item label="上报批次">
                 <HcCounter v-model:value="formModel.batch" @update:modelValue="batchUpdateValue"/>
             </el-form-item>
             <el-form-item label="限定审批时间">
-                <HcCounter v-model:value="formModel.restrictDay" text="(天)" @update:modelValue="restrictDayUpdateValue"/>
+                <HcCounter v-model:value="formModel.restrictDay" text="(天)"
+                           @update:modelValue="restrictDayUpdateValue"/>
             </el-form-item>
         </el-form>
         <template #footer>
             <div class="dialog-footer">
                 <el-button size="large" @click="cancelReportClick">取消</el-button>
-                <el-button type="primary" hc-btn :loading="formReportLoading" @click="formReportClick">提交</el-button>
+                <el-button :loading="formReportLoading" hc-btn type="primary" @click="formReportClick">提交</el-button>
             </div>
         </template>
     </el-dialog>
 </template>
 
 <script setup>
-import {ref,watch,onMounted} from "vue";
+import {ref, watch, onMounted} from "vue";
 import tasksFlowApi from '~api/tasks/flow';
-import {ApprovalApi,queryFixedFlow} from '~api/other';
-import {getArrValue,getIndex,formValidate} from "vue-utils-plus"
+import {ApprovalApi, queryFixedFlow} from '~api/other';
+import {getArrValue, formValidate, arrIndex} from "js-fast-way"
+
 const props = defineProps({
     show: {
         type: Boolean,
@@ -64,15 +71,15 @@ const props = defineProps({
         default: null
     },
     projectId: {
-        type: [String,Number],
+        type: [String, Number],
         default: ''
     },
     contractId: {
-        type: [String,Number],
+        type: [String, Number],
         default: ''
     },
     url: {
-        type: [String,Number],
+        type: [String, Number],
         default: ''
     },
     datas: {
@@ -88,15 +95,15 @@ const props = defineProps({
         default: () => ({})
     },
     type: { //first,log,wbs
-        type: [String,Number],
+        type: [String, Number],
         default: ''
     },
     typeData: {
         type: [String, Number, Array, Object],
         default: ''
     },
-    trialSelfInspectionRecordId:{
-        type: [String,Number],
+    trialSelfInspectionRecordId: {
+        type: [String, Number],
         default: ''
     }
 })
@@ -114,8 +121,16 @@ const reportDatas = ref(props.datas)
 const formRef = ref(null)
 const processData = ref([])
 const formModel = ref({
-    projectId: projectId.value, contractId: contractId.value, ids: props.ids, userTasks: null,
-    taskName: props.taskName, taskContent: '', fixedFlowId: '', batch: 1, restrictDay: 1,trialSelfInspectionRecordId:props.trialSelfInspectionRecordId,
+    projectId: projectId.value,
+    contractId: contractId.value,
+    ids: props.ids,
+    userTasks: null,
+    taskName: props.taskName,
+    taskContent: '',
+    fixedFlowId: '',
+    batch: 1,
+    restrictDay: 1,
+    trialSelfInspectionRecordId: props.trialSelfInspectionRecordId,
     ...props.addition
 })
 const formRules = ref({
@@ -149,15 +164,22 @@ watch(() => [
     props.typeData,
     props.datas,
     props.trialSelfInspectionRecordId
-], ([val,pid,cid,name,ids,url,addition, type, typeData, datas,trialSelfInspectionRecordId]) => {
+], ([val, pid, cid, name, ids, url, addition, type, typeData, datas, trialSelfInspectionRecordId]) => {
     isShow.value = val
     projectId.value = pid
     contractId.value = cid
     ApiUrl.value = url
     //更新到表单数据
     formModel.value = {
-        projectId: pid, contractId: cid, ids: ids, taskName: name,
-        taskContent: '', fixedFlowId: '', batch: 1, restrictDay: 1,trialSelfInspectionRecordId:trialSelfInspectionRecordId,
+        projectId: pid,
+        contractId: cid,
+        ids: ids,
+        taskName: name,
+        taskContent: '',
+        fixedFlowId: '',
+        batch: 1,
+        restrictDay: 1,
+        trialSelfInspectionRecordId: trialSelfInspectionRecordId,
         ...addition
     }
     isTypes.value = type
@@ -173,7 +195,7 @@ onMounted(() => {
     getProcessDatasApi()
 })
 
-const processDefaultData = [{ id: 0, fixedFlowName: '自定义流程', disabled: false}]
+const processDefaultData = [{id: 0, fixedFlowName: '自定义流程', disabled: false}]
 const getProcessDatasApi = () => {
     if (isShow.value) {
         const type = isTypes.value
@@ -189,7 +211,7 @@ const getProcessDatasApi = () => {
 const linkUserJoinString = ref('')
 const getProcessData = async () => {
     linkUserJoinString.value = ''
-    const { error, code, data } = await tasksFlowApi.getPageData({
+    const {error, code, data} = await tasksFlowApi.getPageData({
         projectId: projectId.value,
         contractId: contractId.value,
         current: 1, size: 100
@@ -214,7 +236,7 @@ const queryFixedFlowApi = async (type, datas) => {
     }
     //请求数据
     linkUserJoinString.value = ''
-    const { error, code, data } = await queryFixedFlow({
+    const {error, code, data} = await queryFixedFlow({
         projectId: projectId.value,
         contractId: contractId.value,
         ...flowJson
@@ -233,7 +255,7 @@ const handleProcessValue = (val) => {
     if (val > 0) {
         diyProcessUser.value = false
         const list = processData.value
-        const index = getIndex(list, 'id', val)
+        const index = arrIndex(list, 'id', val)
         linkUserJoinString.value = list[index]?.linkUserJoinString
     } else {
         linkUserJoinString.value = ''
@@ -256,7 +278,7 @@ const restrictDayUpdateValue = (val) => {
     formModel.value.restrictDay = val
 }
 
-const emit = defineEmits(['hide','finish', 'tagClose'])
+const emit = defineEmits(['hide', 'finish', 'tagClose'])
 
 //审批内容的标签移除
 const taskTagClose = (index) => {
@@ -285,7 +307,7 @@ const formReportLoading = ref(false)
 const batchApprovalApi = async () => {
     formReportLoading.value = true
     //发起请求
-    const { error, code, data } = await ApprovalApi(ApiUrl.value, {
+    const {error, code, data} = await ApprovalApi(ApiUrl.value, {
         projectId: projectId.value,
         contractId: contractId.value,
         ...formModel.value
@@ -303,7 +325,7 @@ const batchApprovalApi = async () => {
 }
 </script>
 
-<style lang="scss" >
+<style lang="scss">
 .task-tag-data-box {
     position: relative;
     border: 1px solid #e0e0e6;

+ 10 - 9
src/global/components/hc-sms-auth/index.vue

@@ -1,13 +1,14 @@
 <template>
-    <el-dialog v-model="showModal" title="短信认证" width="26rem" class="hc-modal-border" draggable destroy-on-close @closed="cancelClick">
+    <el-dialog v-model="showModal" class="hc-modal-border" destroy-on-close draggable title="短信认证" width="26rem"
+               @closed="cancelClick">
         <el-form ref="reportFormRef" :model="reportModel" :rules="reportRules" label-width="auto" size="large">
             <el-form-item label="手机号码">
-                <el-input v-model="phoneVal" placeholder="手机号码" disabled/>
+                <el-input v-model="phoneVal" disabled placeholder="手机号码"/>
             </el-form-item>
             <el-form-item class="hc-input-button-group" label="验证码" prop="code">
                 <el-input v-model="reportModel.code" placeholder="请输入验证码"/>
-                <el-button type="primary" size="large" @click="getCodeClick" :disabled="isDisabled">
-                    {{isDisabled ? '倒计时' + currentTime + 's' : '获取验证码'}}
+                <el-button :disabled="isDisabled" size="large" type="primary" @click="getCodeClick">
+                    {{ isDisabled ? '倒计时' + currentTime + 's' : '获取验证码' }}
                 </el-button>
             </el-form-item>
         </el-form>
@@ -17,7 +18,7 @@
                     <HcIcon name="close"/>
                     <span>取消</span>
                 </el-button>
-                <el-button type="primary" hc-btn :loading="isLoading" @click="confirmClick">
+                <el-button :loading="isLoading" hc-btn type="primary" @click="confirmClick">
                     <HcIcon name="check"/>
                     <span>确认</span>
                 </el-button>
@@ -31,7 +32,7 @@ import {ref, watch} from "vue"
 import {useAppStore} from "~src/store";
 import {sendNotice, saveSmsTimeout} from '~api/other';
 import config from '~src/config/index';
-import {formValidate} from "vue-utils-plus"
+import {formValidate} from "js-fast-way"
 //参数
 const props = defineProps({
     show: {
@@ -56,7 +57,7 @@ watch(() => [
     props.show,
     props.loading,
     userStore.getUserInfo
-], ([show,  loading, user]) => {
+], ([show, loading, user]) => {
     userInfo.value = user
     showModal.value = show
     isLoading.value = loading
@@ -96,7 +97,7 @@ const currentTime = ref(0)      //显示时间变量
 const getCodeClick = async () => {
     const {error, code, msg} = await sendNotice({
         phone: phoneVal.value
-    },false)
+    }, false)
     //处理数据
     if (!error && code === 200 && msg) {
         resCode.value = msg
@@ -120,7 +121,7 @@ const checkingTime = () => {
         //判断显示时间是否已到0,判断记录时间是否已到总时间
         if (currentTime.value > 0 && recordingTime.value <= totalTime) {
             //记录时间增加 1
-            recordingTime.value ++;
+            recordingTime.value++;
             //显示时间,用总时间 - 记录时间
             currentTime.value = totalTime - recordingTime.value;
             //1秒钟后,再次执行本方法

+ 4 - 3
src/global/components/hc-tabs-simple/index.vue

@@ -1,6 +1,7 @@
 <template>
     <div class="hc-sb-table">
-        <svg class="svg-tabs" height="45px" width="40px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+        <svg class="svg-tabs" height="45px" width="40px" xmlns="http://www.w3.org/2000/svg"
+             xmlns:xlink="http://www.w3.org/1999/xlink">
             <clipPath id="tabs">
                 <path d="M40,45C15,36,33,0,0,0v45H40z" fill-rule="evenodd"/>
             </clipPath>
@@ -20,7 +21,7 @@
 
 <script setup>
 import {nextTick, ref, watch} from "vue";
-import {getIndex} from "vue-utils-plus"
+import {arrIndex} from "js-fast-way"
 
 const props = defineProps({
     datas: {
@@ -53,7 +54,7 @@ nextTick(() => {
 
 //获取索引
 const getCurIndex = (datas, key) => {
-    curIndex.value = getIndex(datas, 'key', key)
+    curIndex.value = arrIndex(datas, 'key', key)
 }
 
 //事件

+ 35 - 29
src/global/components/hc-tasks-user/index.vue

@@ -3,19 +3,21 @@
         <div class="tasks-user-box">
             <div class="tag-user-list" @click="showModalClick">
                 <template v-for="(item,index) in UserDataList" :key="index">
-                    <el-tag>{{setCheckboxUserName(item)}}</el-tag>
-                    <HcIcon name="arrow-right" ui="arrow-icon-tag" v-if="(UserDataList.length - 1) > index"/>
+                    <el-tag>{{ setCheckboxUserName(item) }}</el-tag>
+                    <HcIcon v-if="(UserDataList.length - 1) > index" name="arrow-right" ui="arrow-icon-tag"/>
                 </template>
-                <div class="tasks-placeholder" v-if="UserDataList.length <= 0"> 点击这里选择任务人 </div>
+                <div v-if="UserDataList.length <= 0" class="tasks-placeholder"> 点击这里选择任务人</div>
             </div>
         </div>
 
         <!--选择任务人-->
-        <el-dialog v-model="showModal" title="选择任务人" width="62rem" class="hc-modal-border hc-modal-nop" draggable destroy-on-close>
+        <el-dialog v-model="showModal" class="hc-modal-border hc-modal-nop" destroy-on-close draggable title="选择任务人"
+                   width="62rem">
             <div class="hc-tasks-user-modal-content-box">
                 <div class="tree-box">
                     <el-scrollbar>
-                        <ElTree class="hc-tree-node-box" :props="ElTreeProps" :data="ElTreeData" node-key="roleId" highlight-current accordion :default-expanded-keys="[0]" @node-click="ElTreeNodeClick"/>
+                        <ElTree :data="ElTreeData" :default-expanded-keys="[0]" :props="ElTreeProps" accordion
+                                class="hc-tree-node-box" highlight-current node-key="roleId" @node-click="ElTreeNodeClick"/>
                     </el-scrollbar>
                 </div>
                 <div class="user-box">
@@ -28,8 +30,9 @@
                                 <el-checkbox-group v-model="checkboxUserList">
                                     <template v-for="item in signUserList">
                                         <div class="user-item checkbox-li">
-                                            <el-checkbox :label="`${item['certificateUserName']}-${item['certificateUserId']}`">
-                                                <div class="item-user-name">{{item['certificateUserName']}}</div>
+                                            <el-checkbox
+                                                :label="`${item['certificateUserName']}-${item['certificateUserId']}`">
+                                                <div class="item-user-name">{{ item['certificateUserName'] }}</div>
                                             </el-checkbox>
                                         </div>
                                     </template>
@@ -39,13 +42,14 @@
                     </div>
                     <div class="s-user-list-box">
                         <div class="title-box">
-                            <div class="title">已选择({{checkboxUserList.length}})</div>
+                            <div class="title">已选择({{ checkboxUserList.length }})</div>
                             <el-button plain size="small" @click="sequenceModal = true">调整顺序</el-button>
                         </div>
                         <div class="user-list">
                             <el-scrollbar>
                                 <template v-for="(item,index) in checkboxUserList" :key="index">
-                                    <el-tag closable @close="delCheckboxUser(index)">{{setCheckboxUserName(item)}}</el-tag>
+                                    <el-tag closable @close="delCheckboxUser(index)">{{ setCheckboxUserName(item) }}
+                                    </el-tag>
                                 </template>
                             </el-scrollbar>
                         </div>
@@ -58,7 +62,7 @@
                         <HcIcon name="close"/>
                         <span>取消</span>
                     </el-button>
-                    <el-button hc-btn type="primary" :loading="sureSignUserLoading" @click="sureSignUserClick">
+                    <el-button :loading="sureSignUserLoading" hc-btn type="primary" @click="sureSignUserClick">
                         <HcIcon name="check"/>
                         <span>确定</span>
                     </el-button>
@@ -67,8 +71,9 @@
         </el-dialog>
 
         <!--调整顺序-->
-        <el-dialog v-model="sequenceModal" title="调整顺序" width="38rem" class="hc-modal-border" draggable destroy-on-close>
-            <el-alert title="可拖动排序,也可在后面点击图标,切换排序" type="warning" :closable="false"/>
+        <el-dialog v-model="sequenceModal" class="hc-modal-border" destroy-on-close draggable title="调整顺序"
+                   width="38rem">
+            <el-alert :closable="false" title="可拖动排序,也可在后面点击图标,切换排序" type="warning"/>
             <div class="sort-node-body-box list-group header">
                 <div class="list-group-item">
                     <div class="index-box">序号</div>
@@ -76,11 +81,12 @@
                     <div class="icon-box">排序</div>
                 </div>
             </div>
-            <Draggable class="sort-node-body-box list-group" ghost-class="ghost" :list="checkboxUserList" item-key="id" @start="sortNodeDrag = true" @end="sortNodeDrag = false">
+            <Draggable :list="checkboxUserList" class="sort-node-body-box list-group" ghost-class="ghost" item-key="id"
+                       @end="sortNodeDrag = false" @start="sortNodeDrag = true">
                 <template #item="{element, index}">
                     <div class="list-group-item">
-                        <div class="index-box">{{index + 1}}</div>
-                        <div class="title-box">{{setCheckboxUserName(element)}}</div>
+                        <div class="index-box">{{ index + 1 }}</div>
+                        <div class="title-box">{{ setCheckboxUserName(element) }}</div>
                         <div class="icon-box">
                             <span class="icon" @click="downSortClick(index)">
                                 <HcIcon name="arrow-down" ui="text-lg"/>
@@ -95,7 +101,7 @@
             <template #footer>
                 <div class="dialog-footer">
                     <el-button size="large" @click="sequenceModal = false">取消</el-button>
-                    <el-button type="primary" hc-btn @click="sequenceModal = false">确认</el-button>
+                    <el-button hc-btn type="primary" @click="sequenceModal = false">确认</el-button>
                 </div>
             </template>
         </el-dialog>
@@ -105,7 +111,7 @@
 <script setup>
 import {ref, watch, onMounted} from "vue";
 import tasksFlowApi from '~api/tasks/flow';
-import {getArrValue,deepClone} from "vue-utils-plus"
+import {getArrValue, deepClone} from "js-fast-way"
 import {checkCustomFlowUserIsEVisaPermissions} from '~api/other';
 import Draggable from "vuedraggable";
 
@@ -121,15 +127,15 @@ const props = defineProps({
         default: ''
     },
     projectId: {
-        type: [String,Number],
+        type: [String, Number],
         default: ''
     },
     contractId: {
-        type: [String,Number],
+        type: [String, Number],
         default: ''
     },
     type: { //first,log,wbs
-        type: [String,Number],
+        type: [String, Number],
         default: ''
     },
     typeData: {
@@ -198,7 +204,7 @@ const showModalClick = () => {
 //获取系统所有角色划分
 const signUserList = ref([])
 const queryAllRoleList = async () => {
-    const { error, code, data } = await tasksFlowApi.queryAllRoleList({
+    const {error, code, data} = await tasksFlowApi.queryAllRoleList({
         contractId: contractId.value
     })
     //处理数据
@@ -240,7 +246,7 @@ const setCheckboxUserName = (item) => {
 
 //删除已选择的用户
 const delCheckboxUser = (index) => {
-    checkboxUserList.value.splice(index,1);
+    checkboxUserList.value.splice(index, 1);
 }
 
 //排序
@@ -249,9 +255,9 @@ const sortNodeDrag = ref(false)
 const downSortClick = (index) => {
     const indexs = index + 1
     const data = checkboxUserList.value
-    if(indexs !== data.length) {
-        const tmp = data.splice(indexs,1);
-        checkboxUserList.value.splice(index,0,tmp[0]);
+    if (indexs !== data.length) {
+        const tmp = data.splice(indexs, 1);
+        checkboxUserList.value.splice(index, 0, tmp[0]);
     } else {
         window?.$message?.warning('已经处于置底,无法下移')
     }
@@ -259,9 +265,9 @@ const downSortClick = (index) => {
 //向上
 const upSortClick = (index) => {
     const data = checkboxUserList.value || []
-    if(index !== 0) {
-        const tmp = data.splice(index - 1,1);
-        checkboxUserList.value.splice(index,0,tmp[0]);
+    if (index !== 0) {
+        const tmp = data.splice(index - 1, 1);
+        checkboxUserList.value.splice(index, 0, tmp[0]);
     } else {
         window?.$message?.warning('已经处于置顶,无法上移')
     }
@@ -313,7 +319,7 @@ const sureSignUserClick = () => {
 
 //检查所选的流程环节处理人是否具有审批权限(三大填报页、日志列表的批量上报、首件列表的批量上报)
 const getCheckCustomFlowUserIsEVisaPermissions = async (flowJson, newUser, newUserId, users) => {
-    const { error, code, data } = await checkCustomFlowUserIsEVisaPermissions({
+    const {error, code, data} = await checkCustomFlowUserIsEVisaPermissions({
         projectId: projectId.value,
         contractId: contractId.value,
         customFlowUserList: newUserId,

+ 6 - 6
src/global/components/hc-uploads/index.vue

@@ -15,7 +15,7 @@
 <script setup>
 import {ref, watch, onMounted} from "vue";
 import {getTokenHeader} from '~src/api/request/header';
-import {getIndex, getObjValue, getObjNullValue, isSize} from "vue-utils-plus"
+import {arrIndex, getObjValue, getObjVal, isFileSize} from "js-fast-way"
 import {genFileId} from "element-plus";
 
 const props = defineProps({
@@ -86,7 +86,7 @@ const emit = defineEmits(['change', 'progress', 'del', 'preview'])
 const spinShow = ref(false)
 const beforeFileNum = ref(0)
 const beforeUpload = async (file) => {
-    if (isSize(file?.size, props.size)) {
+    if (isFileSize(file?.size, props.size)) {
         beforeFileNum.value++;
         spinShow.value = true
         return true;
@@ -153,7 +153,7 @@ const uploadClearFiles = () => {
 const getUploadFileList = (fileListArr) => {
     let fileArr = [], fileList = fileListArr ?? [];
     fileList.forEach(item => {
-        if (getObjNullValue(item?.response)) {
+        if (getObjVal(item?.response)) {
             const data = getObjValue(item?.response?.data)
             fileArr.push({
                 ...data,
@@ -175,7 +175,7 @@ const previewFileList = ref([])
 const uploadPreview = (file) => {
     let fileArr = getUploadFileUrl()
     const fileList = fileListData.value ?? [];
-    const index = getIndex(fileList, 'uid', file?.uid)
+    const index = arrIndex(fileList, 'uid', file?.uid)
     if (props.viewer) {
         previewFileList.value = fileArr
         initialIndex.value = index
@@ -189,7 +189,7 @@ const uploadPreview = (file) => {
 const getUploadFileUrl = () => {
     let fileArr = [], fileList = fileListData.value ?? [];
     fileList.forEach(item => {
-        if (getObjNullValue(item?.response)) {
+        if (getObjVal(item?.response)) {
             fileArr.push(item?.response?.data?.link)
         } else {
             fileArr.push(item?.url)
@@ -201,7 +201,7 @@ const getUploadFileUrl = () => {
 //删除文件
 const uploadRemove = (row) => {
     let link;
-    if (getObjNullValue(row?.response)) {
+    if (getObjVal(row?.response)) {
         link = row?.response?.data?.link
     } else {
         link = row?.url

+ 25 - 25
src/layout/modules/HelpInfoBar.vue

@@ -1,8 +1,8 @@
 <template>
-    <el-popover placement="bottom" :width="220" trigger="hover">
+    <el-popover :width="220" placement="bottom" trigger="hover">
         <template #reference>
             <div class="header-icon-bar">
-                <HcIcon name="question" class="header-icon"/>
+                <HcIcon class="header-icon" name="question"/>
             </div>
         </template>
         <div class="header-pover-menu-list">
@@ -10,38 +10,38 @@
                 <span class="text">开启功能气泡提示</span>
                 <el-switch v-model="bubbleVal" @change="bubbleUpdate"/>
             </div>
-            <div class="list-item" @click="excelPreviewClick" v-if="excelUrl">
+            <div v-if="excelUrl" class="list-item" @click="excelPreviewClick">
                 <span class="text">查看系统操作文档</span>
-                <img class="icon" :src="getAssetsHomeFile('word.png')" alt=""/>
-                <img class="icon1" :src="getAssetsHomeFile('word1.png')" alt=""/>
+                <img :src="getAssetsHomeFile('word.png')" alt="" class="icon"/>
+                <img :src="getAssetsHomeFile('word1.png')" alt="" class="icon1"/>
             </div>
-            <div class="list-item" @click="videoPreviewModal = true" v-if="videoUrl">
+            <div v-if="videoUrl" class="list-item" @click="videoPreviewModal = true">
                 <span class="text">当前页面功能讲解</span>
-                <img class="icon" :src="getAssetsHomeFile('video.png')" alt=""/>
-                <img class="icon1" :src="getAssetsHomeFile('video1.png')" alt=""/>
+                <img :src="getAssetsHomeFile('video.png')" alt="" class="icon"/>
+                <img :src="getAssetsHomeFile('video1.png')" alt="" class="icon1"/>
             </div>
             <div class="list-item" @click="toOrderService">
                 <span class="text">工单服务\需求反馈</span>
-                <img class="icon" :src="getAssetsHomeFile('screen.png')" alt="" @click.stop="screenShortClick"/>
-                <img class="icon1" :src="getAssetsHomeFile('screen1.png')" alt="" @click.stop="screenShortClick"/>
+                <img :src="getAssetsHomeFile('screen.png')" alt="" class="icon" @click.stop="screenShortClick"/>
+                <img :src="getAssetsHomeFile('screen1.png')" alt="" class="icon1" @click.stop="screenShortClick"/>
             </div>
         </div>
     </el-popover>
     <!--当前页面功能讲解-->
-    <el-dialog v-model="videoPreviewModal" width="62rem" destroy-on-close :before-close="videoPreviewModalClose">
-        <video class="preview-video" :src="videoUrl" controls="controls" autoplay="autoplay">
+    <el-dialog v-model="videoPreviewModal" :before-close="videoPreviewModalClose" destroy-on-close width="62rem">
+        <video :src="videoUrl" autoplay="autoplay" class="preview-video" controls="controls">
             您的浏览器不支持 video
         </video>
     </el-dialog>
 </template>
 
 <script setup>
-import { ref,watch,nextTick } from "vue";
-import { useRouter,useRoute } from 'vue-router'
-import { useAppStore } from "~src/store";
+import {ref, watch, nextTick} from "vue";
+import {useRouter, useRoute} from 'vue-router'
+import {useAppStore} from "~src/store";
 import ScreenShot from "js-web-screen-shot";
-import { getStoreData }  from '~src/utils/storage'
-import { getOneObjValue, getObjValue } from "vue-utils-plus"
+import {getStoreValue} from '~src/utils/storage'
+import {getObjValue, getToObjVal} from "js-fast-way"
 
 //初始变量
 const router = useRouter()
@@ -49,7 +49,7 @@ const useRoutes = useRoute()
 const useAppState = useAppStore()
 
 //相关变量
-const route = getObjValue(getStoreData('route'))
+const route = getObjValue(getStoreValue('route'))
 const bubbleVal = ref(useAppState.getBubble);
 const videoUrl = ref('')
 const excelUrl = ref('')
@@ -63,11 +63,11 @@ watch(() => [
     useRoutes.name,
     useAppState.getShotWebRtc,
     useAppState.getFullScreen,
-], ([Bubble,routeName,webRtc,fullScreen]) => {
+], ([Bubble, routeName, webRtc, fullScreen]) => {
     bubbleVal.value = Bubble
     getVideoUrl(routeName)
     getExcelUrl(routeName)
-    setScreenShotData(webRtc,fullScreen)
+    setScreenShotData(webRtc, fullScreen)
 })
 
 //渲染完成
@@ -76,21 +76,21 @@ nextTick(() => {
     getExcelUrl(useRoutes?.name)
     const webRtc = useAppState.getShotWebRtc
     const fullScreen = useAppState.getFullScreen
-    setScreenShotData(webRtc,fullScreen)
+    setScreenShotData(webRtc, fullScreen)
 })
 
 //取文档地址
 const getExcelUrl = (name) => {
-    excelUrl.value = getOneObjValue(route, name, 'excelUrl')
+    excelUrl.value = getToObjVal(route, name, 'excelUrl')
 }
 
 //取视频地址
 const getVideoUrl = (name) => {
-    videoUrl.value = getOneObjValue(route, name, 'videoUrl')
+    videoUrl.value = getToObjVal(route, name, 'videoUrl')
 }
 
 //处理屏幕截图的配置
-const setScreenShotData = (webRtc,fullScreen) => {
+const setScreenShotData = (webRtc, fullScreen) => {
     webRtcVal.value = parseInt(webRtc) === 1
     fullScreenVal.value = parseInt(fullScreen) === 1
 }
@@ -191,7 +191,7 @@ const excelPreviewClick = () => {
         .text {
             flex: auto;
         }
-        .icon,.icon1 {
+        .icon, .icon1 {
             width: 24px;
             height: 24px;
         }

+ 8 - 8
src/layout/modules/TopMenuBar.vue

@@ -21,7 +21,7 @@
 import {onMounted, ref, watch} from "vue";
 import {useAppStore} from "~src/store";
 import {useRouter, useRoute} from 'vue-router'
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 
 //初始组合式
 const router = useRouter()
@@ -29,7 +29,7 @@ const useRoutes = useRoute()
 const useAppState = useAppStore()
 
 //初始变量
-const barMenuData = ref(getStoreData('bar-menu-datas') || []);
+const barMenuData = ref(getStoreValue('bar-menu-datas') || []);
 const barRoutes = ref({key: '', path: '', title: ''});
 
 //渲染完成
@@ -57,7 +57,7 @@ const setBarMenuData = () => {
         if (index === -1) {
             barMenuData.value.push({path, key: key, title: title})
         }
-        setStoreData('bar-menu-datas', barMenuData.value)
+        setStoreValue('bar-menu-datas', barMenuData.value)
     }
 }
 
@@ -91,12 +91,12 @@ const handleMenuSelect = ({key}) => {
         barMenuCloseClick(barItem.value, barItemIndex.value)
     } else if (key === 'all') {
         barMenuData.value = []
-        setStoreData('bar-menu-datas', [])
+        setStoreValue('bar-menu-datas', [])
         router.push({name: 'home-index'});
     } else if (key === 'other') {
         const {key} = barRoutes.value
         barMenuData.value = barMenuData.value.filter(item => item.key === key)
-        setStoreData('bar-menu-datas', barMenuData.value)
+        setStoreValue('bar-menu-datas', barMenuData.value)
     }
 }
 
@@ -114,15 +114,15 @@ const barMenuCloseClick = (item, index) => {
             items = barMenuData.value[indexs]
         }
         if (indexs < 0) {
-            setStoreData('bar-menu-datas', barMenuData.value)
+            setStoreValue('bar-menu-datas', barMenuData.value)
             router.push({name: 'home-index'});
         } else {
             barRoutes.value = items
-            setStoreData('bar-menu-datas', barMenuData.value)
+            setStoreValue('bar-menu-datas', barMenuData.value)
             router.push({name: items.key});
         }
     } else {
-        setStoreData('bar-menu-datas', barMenuData.value)
+        setStoreValue('bar-menu-datas', barMenuData.value)
     }
 }
 </script>

+ 6 - 6
src/layout/modules/UserInfoBar.vue

@@ -25,8 +25,8 @@ import {useAppStore} from "~src/store";
 import website from "~src/config/index";
 import avatarPng from '~src/assets/images/avatar.png';
 import {RefreshToken, LogOut} from "~sto/user";
-import {getStoreData} from '~src/utils/storage'
-import {calcDate, isValueNull} from "vue-utils-plus"
+import {getStoreValue} from '~src/utils/storage'
+import {calcDate, isNullES} from "js-fast-way"
 
 //变量
 const router = useRouter()
@@ -48,9 +48,9 @@ onMounted(() => {
 //刷新token
 const getRefreshToken = () => {
     setInterval(() => {
-        const token = getStoreData("token", true) || {};
+        const token = getStoreValue("token", true) || {};
         const date = calcDate(token.datetime, new Date().getTime());
-        if (isValueNull(date)) return;
+        if (isNullES(date)) return;
         if (date.seconds >= website.tokenTime && !refreshLock.value) {
             refreshLock.value = true;
             console.log('刷新token')
@@ -79,11 +79,11 @@ const options = [
 
 //事件
 const emit = defineEmits(['change'])
-const handleSelect = async (key) => {
+const handleSelect = (key) => {
     if (key === 'my') {
         router.push({name: 'user-index'});
     } else if (key === 'logout') {
-        await LogOut();
+        LogOut().then();
         window.$message?.info('退出成功');
         router.push({name: 'login'});
     }

+ 1 - 1
src/plugins/HTableForm.js

@@ -1,6 +1,6 @@
 import {createApp} from "vue/dist/vue.esm-bundler.js";
 import {getTokenHeader} from '~src/api/request/header';
-import {toParse, isArray} from "vue-utils-plus";
+import {toParse, isArray} from "js-fast-way"
 
 //自定义组件或二次封装的组件
 import HcTableFormUpload from "~com/plugins/table-form/hc-form-upload.vue"

+ 75 - 0
src/plugins/useOsTheme.js

@@ -0,0 +1,75 @@
+import {ref, onBeforeMount, onBeforeUnmount, getCurrentInstance} from 'vue'
+
+let usedCount = 0, darks, lights, managable = true
+
+const osTheme = ref(null)
+const supportMatchMedia = typeof window !== 'undefined' && window.matchMedia !== undefined
+
+//获取系统主题
+export const useOsTheme = () => {
+    if (process.env.NODE_ENV !== 'test' && !supportMatchMedia) {
+        return osTheme.value
+    }
+    if (process.env.NODE_ENV === 'test' && window.matchMedia === undefined) {
+        return osTheme.value
+    }
+    if (usedCount === 0) init()
+    if (managable && (managable = hasInstance())) {
+        onBeforeMount(() => {
+            usedCount += 1
+        })
+        onBeforeUnmount(() => {
+            usedCount -= 1
+            if (usedCount === 0) clean()
+        })
+    }
+    return osTheme.value
+}
+
+const handleDarkMqlChange = (e) => {
+    if (e.matches) {
+        osTheme.value = 'dark'
+    }
+}
+
+const handleLightMqlChange = (e) => {
+    if (e.matches) {
+        osTheme.value = 'light'
+    }
+}
+
+const init = () => {
+    darks = window.matchMedia('(prefers-color-scheme: dark)')
+    lights = window.matchMedia('(prefers-color-scheme: light)')
+    if (darks.matches) {
+        osTheme.value = 'dark'
+    } else if (lights.matches) {
+        osTheme.value = 'light'
+    } else {
+        osTheme.value = null
+    }
+    if (darks.addEventListener) {
+        darks.addEventListener('change', handleDarkMqlChange)
+        lights.addEventListener('change', handleLightMqlChange)
+    } else if (darks.addListener) {
+        darks.addListener(handleDarkMqlChange)
+        lights.addListener(handleLightMqlChange)
+    }
+}
+
+const clean = () => {
+    if ('removeEventListener' in darks) {
+        darks.removeEventListener('change', handleDarkMqlChange)
+        lights?.removeEventListener('change', handleLightMqlChange)
+    } else if ('removeListener' in darks) {
+        darks?.removeListener(handleDarkMqlChange)
+        lights?.removeListener(handleLightMqlChange)
+    }
+
+    darks = undefined
+    lights = undefined
+}
+
+export const hasInstance = () => {
+    return getCurrentInstance() !== null
+}

+ 4 - 8
src/router/routers.js

@@ -1,12 +1,8 @@
-import { getStoreData }  from '~src/utils/storage'
-import {getArrValue,isItem} from "vue-utils-plus"
+import {getStoreValue} from '~src/utils/storage'
+import {getArrValue} from "js-fast-way"
 
 //获取路由菜单
 export const getRouterData = async (toName) => {
-    const routes = getArrValue(getStoreData('routes'))
-    if (isItem(routes,toName)) {
-        return true
-    } else {
-        return false
-    }
+    const routes = getArrValue(getStoreValue('routes'))
+    return routes.indexOf(toName) !== -1
 }

+ 41 - 41
src/store/index.js

@@ -1,36 +1,36 @@
 import {defineStore} from 'pinia'
 import pinia from "~src/store/init"
 import appConfig from '~src/config/app';
-import {getStoreData, setStoreData, clearStoreAll} from '~src/utils/storage'
+import {getStoreValue, setStoreValue, clearStoreAll} from '~src/utils/storage'
 import {setToken, setRefreshToken, removeToken, removeRefreshToken} from '~src/api/util/auth'
 
 export const useAppStore = defineStore('main', {
     state: () => ({
         //主题信息
-        theme: getStoreData('theme') || appConfig.theme,    //用户可选择类型:auto,light, dark
-        themeVal: getStoreData('themeVal') || '',           //实际主题:light, dark
-        color: getStoreData('color') || appConfig.color,
-        homeTheme: getStoreData('homeTheme') || appConfig.homeTheme,
+        theme: getStoreValue('theme') || appConfig.theme,    //用户可选择类型:auto,light, dark
+        themeVal: getStoreValue('themeVal') || '',           //实际主题:light, dark
+        color: getStoreValue('color') || appConfig.color,
+        homeTheme: getStoreValue('homeTheme') || appConfig.homeTheme,
         //用户信息
-        token: getStoreData('token') || '',
-        refreshToken: getStoreData('refreshToken') || '',
-        tenantId: getStoreData('tenantId') || '',
-        userInfo: getStoreData('userInfo') || {},
+        token: getStoreValue('token') || '',
+        refreshToken: getStoreValue('refreshToken') || '',
+        tenantId: getStoreValue('tenantId') || '',
+        userInfo: getStoreValue('userInfo') || {},
         //菜单信息
-        menus: getStoreData('menus') || [],
-        buttons: getStoreData('buttons') || {},
+        menus: getStoreValue('menus') || [],
+        buttons: getStoreValue('buttons') || {},
         //项目合同段数据
-        projectContract: getStoreData('projectContract') || [],
-        projectInfo: getStoreData('projectInfo') || {},
-        contractInfo: getStoreData('contractInfo') || {},
-        projectId: getStoreData('projectId') || '',
-        contractId: getStoreData('contractId') || '',
+        projectContract: getStoreValue('projectContract') || [],
+        projectInfo: getStoreValue('projectInfo') || {},
+        contractInfo: getStoreValue('contractInfo') || {},
+        projectId: getStoreValue('projectId') || '',
+        contractId: getStoreValue('contractId') || '',
         //其他配置信息
-        bubble: getStoreData('bubble') || false,
-        orderServiceTipModal: getStoreData('orderServiceTipModal') ?? 1, //0不弹出,1弹出
-        shotWebRtc: getStoreData('shotWebRtc') || 0, //WebRtc截图方式: 0关闭,1开启
-        fullScreen: getStoreData('fullScreen') || 0, //全屏截图:0关闭,1开启
-        isCollapse: getStoreData('isCollapse') || false, //菜单折叠
+        bubble: getStoreValue('bubble') || false,
+        orderServiceTipModal: getStoreValue('orderServiceTipModal') ?? 1, //0不弹出,1弹出
+        shotWebRtc: getStoreValue('shotWebRtc') || 0, //WebRtc截图方式: 0关闭,1开启
+        fullScreen: getStoreValue('fullScreen') || 0, //全屏截图:0关闭,1开启
+        isCollapse: getStoreValue('isCollapse') || false, //菜单折叠
         dragModalSortTop: [], //拖拽弹窗排序
         isScreenShort: false,
         barMenuName: '',
@@ -68,47 +68,47 @@ export const useAppStore = defineStore('main', {
         //主题信息
         setTheme(value) {
             this.theme = value
-            setStoreData('theme', value)
+            setStoreValue('theme', value)
         },
         setThemeVal(value) {
             this.themeVal = value
-            setStoreData('themeVal', value)
+            setStoreValue('themeVal', value)
         },
         setColor(value) {
             this.color = value
-            setStoreData('color', value)
+            setStoreValue('color', value)
         },
         setHomeTheme(value) {
             this.homeTheme = value
-            setStoreData('homeTheme', value)
+            setStoreValue('homeTheme', value)
         },
         //用户信息
         setTokenVal(value) {
             this.token = value
             setToken(value)
-            setStoreData('token', value)
+            setStoreValue('token', value)
         },
         setRefreshTokenVal(value) {
             this.refreshToken = value
             setRefreshToken(value)
-            setStoreData('refreshToken', value)
+            setStoreValue('refreshToken', value)
         },
         setTenantId(value) {
             this.tenantId = value
-            setStoreData('tenantId', value)
+            setStoreValue('tenantId', value)
         },
         setUserInfo(value) {
             this.userInfo = value
-            setStoreData('userInfo', value)
+            setStoreValue('userInfo', value)
         },
         //菜单信息
         setMenus(value) {
             this.menus = value
-            setStoreData('menus', value)
+            setStoreValue('menus', value)
         },
         setButtons(value) {
             this.buttons = value
-            setStoreData('buttons', value)
+            setStoreValue('buttons', value)
         },
         getButtonsVal(value) {
             return this.buttons[value] || false;
@@ -116,47 +116,47 @@ export const useAppStore = defineStore('main', {
         //项目合同段数据
         setProjectContract(value) {
             this.projectContract = value
-            setStoreData('projectContract', value)
+            setStoreValue('projectContract', value)
         },
         setProjectInfo(value) {
             this.projectInfo = value
-            setStoreData('projectInfo', value)
+            setStoreValue('projectInfo', value)
         },
         setContractInfo(value) {
             this.contractInfo = value
-            setStoreData('contractInfo', value)
+            setStoreValue('contractInfo', value)
         },
         setProjectId(value) {
             this.projectId = value
-            setStoreData('projectId', value)
+            setStoreValue('projectId', value)
         },
         setContractId(value) {
             this.contractId = value
-            setStoreData('contractId', value)
+            setStoreValue('contractId', value)
         },
         //其他配置信息
         setBubble(value) {
             this.bubble = value
-            setStoreData('bubble', value)
+            setStoreValue('bubble', value)
         },
         setOrderServiceTipModal(value) {
             this.orderServiceTipModal = value
-            setStoreData('orderServiceTipModal', value)
+            setStoreValue('orderServiceTipModal', value)
         },
         setScreenShort(value) {
             this.isScreenShort = value
         },
         setShotWebRtc(value) {
             this.shotWebRtc = value
-            setStoreData('shotWebRtc', value)
+            setStoreValue('shotWebRtc', value)
         },
         setFullScreen(value) {
             this.fullScreen = value
-            setStoreData('fullScreen', value)
+            setStoreValue('fullScreen', value)
         },
         setCollapse(value) { //菜单折叠
             this.isCollapse = value
-            setStoreData('isCollapse', value)
+            setStoreValue('isCollapse', value)
         },
         setDragModalSortTop(value) {
             this.dragModalSortTop = value

+ 10 - 10
src/store/modules/app.js

@@ -1,17 +1,17 @@
 import pinia from "~src/store/init"
-import { useAppStore } from "~src/store";
-import { getButtons } from '~api/menu';
-import { getProjectAndContract } from '~api/user';
-import { getStoreData }  from '~src/utils/storage'
-import { ArrToOneObj, getArrValue } from "vue-utils-plus"
+import {useAppStore} from "~src/store";
+import {getButtons} from '~api/menu';
+import {getProjectAndContract} from '~api/user';
+import {getStoreValue} from '~src/utils/storage'
+import {ArrToOneObj, getArrValue} from "js-fast-way"
 
 const store = useAppStore(pinia)
 
 //项目合同段初始化
 export const initProjectContract = async () => {
-    const value = getStoreData('projectContract')
+    const value = getStoreValue('projectContract')
     if (!value) {
-        const { error, data } = await getProjectAndContract();
+        const {error, data} = await getProjectAndContract();
         if (error) return Promise.reject('error');
         const datas = getArrValue(data)
         store.setProjectContract(datas)
@@ -23,9 +23,9 @@ export const initProjectContract = async () => {
 
 //按钮初始化
 export const initButtons = async () => {
-    const value = getStoreData('buttons')
+    const value = getStoreValue('buttons')
     if (!value) {
-        const { error, data } = await getButtons();
+        const {error, data} = await getButtons();
         if (error) return Promise.reject('error');
         const buttons = getArrValue(data)
         const buttonsArr = await setButtonsData(buttons)
@@ -39,6 +39,6 @@ export const initButtons = async () => {
 //设置按钮
 const setButtonsData = async (data) => {
     let buttonsArr = {};
-    await ArrToOneObj(data,'code', buttonsArr)
+    await ArrToOneObj(data, 'code', buttonsArr)
     return buttonsArr;
 }

+ 13 - 12
src/store/modules/user.js

@@ -4,17 +4,18 @@ import {useAppStore} from "~src/store";
 import {getRoutes} from '~api/menu';
 import themeData from '~src/config/theme';
 import tokenData from "~src/router/modules/token";
-import {setStoreData} from "~src/utils/storage";
-import {userLogin,refreshToken,logout} from '~api/user';
+import {setStoreValue} from "~src/utils/storage";
+import {userLogin, refreshToken, logout} from '~api/user';
 import {userConfigInfo, userConfigSave} from "~api/other";
-import {ArrToOneObj, getArrValue, getIndex, getObjValue, useOsTheme} from "vue-utils-plus"
+import {ArrToOneObj, getArrValue, arrIndex, getObjValue} from "js-fast-way"
+import {useOsTheme} from '~src/plugins/useOsTheme';
 
 //初始变量
 const store = useAppStore(pinia)
 
 //登录
 export const useAppLogin = async (form) => {
-    const { error, status, res } = await userLogin(form);
+    const {error, status, res} = await userLogin(form);
     if (!error && status === 200) {
         store.setTokenVal(res['access_token'])
         store.setRefreshTokenVal(res['refresh_token'])
@@ -22,7 +23,7 @@ export const useAppLogin = async (form) => {
         store.setUserInfo(res)
         const routerRes = await setRouterData()
         if (!routerRes) {
-            return Promise.reject({msg:'路由异常'});
+            return Promise.reject({msg: '路由异常'});
         }
         await initUserConfigInfo()
         return Promise.resolve(res);
@@ -39,7 +40,7 @@ export const initUserConfigInfo = async () => {
     }
     const res = getObjValue(data)
     if (res?.theme) {
-        const {theme,color,homeTheme,shotWebRtc,fullScreen,opinionView} = res
+        const {theme, color, homeTheme, shotWebRtc, fullScreen, opinionView} = res
         //设置主题
         store.setTheme(theme)
         //设置模式
@@ -50,8 +51,8 @@ export const initUserConfigInfo = async () => {
         }
         //获取主色调和首页主题数据
         let themeColor = themeData.color, themeHome = themeData.home;
-        let colorIndex = getIndex(themeColor,'name',color)
-        let homeIndex = getIndex(themeHome,'name',homeTheme)
+        let colorIndex = arrIndex(themeColor, 'name', color)
+        let homeIndex = arrIndex(themeHome, 'name', homeTheme)
         //设置主色调
         if (colorIndex !== -1) {
             store.setColor(themeColor[colorIndex])
@@ -92,8 +93,8 @@ export const setRouterData = async () => {
     const routes = [...tokenData, ...routesArr] //合并
     //数据缓存
     store.setMenus(resData)
-    setStoreData('route', routesObj)
-    setStoreData('routes', routes)
+    setStoreValue('route', routesObj)
+    setStoreValue('routes', routes)
     return Promise.resolve(true);
 }
 
@@ -101,10 +102,10 @@ export const setRouterData = async () => {
 export const RefreshToken = async () => {
     try {
         window.console.log('刷新 token');
-        const { dept_id, role_id } = store.getUserInfo;
+        const {dept_id, role_id} = store.getUserInfo;
         const refresh = store.getRefreshToken;
         const tenantId = store.getTenantId;
-        const { error, status, res } = await refreshToken(refresh, tenantId, dept_id, role_id);
+        const {error, status, res} = await refreshToken(refresh, tenantId, dept_id, role_id);
         if (!error && status === 200) {
             store.setTokenVal(res['access_token'])
             store.setRefreshTokenVal(res['refresh_token'])

+ 6 - 6
src/test/index.vue

@@ -16,9 +16,9 @@
 <script setup>
 import {onMounted, onUnmounted, ref} from "vue";
 import {data} from './data.js'
-import {getIndex, deepClone} from "vue-utils-plus";
+import {arrIndex, deepClone} from "js-fast-way"
 import HTableForm from "~src/plugins/HTableForm"
-import {getStoreData, setStoreData, delStoreData} from "~uti/storage";
+import {getStoreValue, setStoreValue, delStoreValue} from "~uti/storage";
 
 onMounted(() => {
     getExcelHtml()
@@ -40,14 +40,14 @@ const getExcelHtml = () => {
 
 const isCtrlKey = ref(false)
 const checkKeyList = ref([])
-const copyKeyList = ref(getStoreData('TableFormCopyKeyList') || [])
+const copyKeyList = ref(getStoreValue('TableFormCopyKeyList') || [])
 
 //设置选择数据
 const setShiftTableForm = (key) => {
     if (isCtrlKey.value) {
         const form = formData.value
         const keys = checkKeyList.value
-        const index = getIndex(keys, 'key', key)
+        const index = arrIndex(keys, 'key', key)
         if (index === -1) {
             keys.push({key, val: form[key] ?? ''})
         } else {
@@ -69,7 +69,7 @@ document.onkeydown = (event) => {
     //按下复制快捷键
     if (ctrlKey && key === 'c') {
         const keysList = deepClone(checkKeyList.value)
-        setStoreData('TableFormCopyKeyList', keysList)
+        setStoreValue('TableFormCopyKeyList', keysList)
         copyKeyList.value = keysList
         keysList.forEach(item => {
             HTableForm.setCheckKeyStyle(item['key'], true)
@@ -90,7 +90,7 @@ document.onkeydown = (event) => {
         //清除缓存
         checkKeyList.value = []
         copyKeyList.value = []
-        delStoreData('TableFormCopyKeyList')
+        delStoreValue('TableFormCopyKeyList')
     }
 }
 

+ 18 - 3
src/utils/storage.js

@@ -1,4 +1,19 @@
+import {setStoreData, getStoreData, delStoreData, clearStoreAll} from "js-fast-way"
 import website from '~src/config/index'
-import { utilsStore } from "vue-utils-plus";
-const { getStoreData, setStoreData, delStoreData, clearStoreAll } = utilsStore(website.key)
-export { getStoreData, setStoreData, delStoreData, clearStoreAll }
+
+//获取缓存
+export const getStoreValue = (key, debug = false, session = false) => {
+    return getStoreData(website.key + '-' + key, debug, session)
+}
+
+//保存缓存
+export const setStoreValue = (key, value, session = false) => {
+    return setStoreData(website.key + '-' + key, value, session)
+}
+
+//删除缓存
+export const delStoreValue = (key, session = false) => {
+    return delStoreData(website.key + '-' + key, session)
+}
+
+export {clearStoreAll}

+ 11 - 27
src/utils/tools.js

@@ -1,42 +1,26 @@
-import {toColor, clog, getIndex} from "vue-utils-plus"
+import {clog, arrIndex} from "js-fast-way"
+import config from "~src/config/index";
+
 import {useAppStore} from "~src/store";
 
 const store = useAppStore()
 
-//设置主色调
-export const setMainColor = (color) => {
-    color = color ?? '#1ECC95'
-    const el = document.documentElement
-    el.style.setProperty('--el-color-primary', color)
-    // 设置 css 渐变 变量
-    const numArr = [3, 5, 7, 8, 9]
-    numArr.forEach(item => {
-        let amount = 0
-        if (item === 3) {
-            amount = 0.9
-        } else if (item === 5) {
-            amount = 0.7
-        } else if (item >= 7) {
-            amount = amount = (10 - item) / 10
-        }
-        const val = toColor('#FFFFFF', color, amount)
-        el.style.setProperty(`--el-color-primary-light-${item}`, val)
-    })
-    //生成深主色颜色
-    const val = toColor('#000000', color, 0.9)
-    el.style.setProperty('--el-color-primary-dark-2', val)
-}
-
 //控制台打印
 export const HcLog = (name, tips, data) => {
     const title = store.barMenuName ?? '';
-    clog(name, tips, data, title)
+    if (config.isLog === 'auto') {
+        if (import.meta.env.DEV) {
+            clog(title, name, tips, data)
+        }
+    } else if (config.isLog === true) {
+        clog(title, name, tips, data)
+    }
 }
 
 //取数组中的值
 export const getRowsValue = (arr, key, key2, value) => {
     if (value) {
-        const index = getIndex(arr, key, value)
+        const index = arrIndex(arr, key, value)
         return arr[index][key2]
     } else {
         return ''

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

@@ -272,6 +272,7 @@ import HcTestFile from "./test-file.vue"
 import HcFormula from "./formula.vue"
 import HcDragNode from "~com/drag-node/index.vue"
 import NoDataSvg from '~src/assets/view/no-data.svg'
+//import {getArrValue, getObjVal, isString, deepClone, arrIndex} from "js-fast-way"
 import {setPosRange, isType, utilsArray, deepClone, isValueNull} from "vue-utils-plus"
 //初始变量
 const useAppState = useAppStore()

+ 2 - 2
src/views/data-fill/collapse-form/table-form-item.vue

@@ -20,7 +20,7 @@ import {ref, watch, onMounted} from "vue"
 import {useAppStore} from "~src/store";
 import wbsApi from "~api/data-fill/wbs";
 import HcTableForm from "~com/table-form/index.vue"
-import {getObjNullValue, isString, getArrValue} from "vue-utils-plus"
+import {getArrValue, getObjVal, isString} from "js-fast-way"
 
 //初始
 const props = defineProps({
@@ -152,7 +152,7 @@ const getTableFormInfo = async (pkeyId) => {
         const {error, code, data} = await wbsApi.getBussDataInfo({
             pkeyId: pkeyId
         }, false)
-        const resData = getObjNullValue(data)
+        const resData = getObjVal(data)
         if (!error && code === 200 && resData) {
             tableFormInfo.value = {
                 ...resData,

+ 3 - 3
src/views/data-fill/collapse-form/test-diaolg.vue

@@ -41,7 +41,7 @@
 import {ref, watch, onMounted} from "vue";
 import TestTree from "./testTree.vue"
 import {getArrValue} from "vue-utils-plus"
-import {getStoreData, setStoreData} from "~uti/storage";
+import {getStoreValue, setStoreValue} from "~uti/storage";
 import samplingApi from "~api/tentative/material/sampling";
 
 const props = defineProps({
@@ -78,7 +78,7 @@ watch(() => [
 
 //渲染完成
 onMounted(() => {
-    testTreeExpandKeys.value = getStoreData('testTreeAutoExpandKeys') || []
+    testTreeExpandKeys.value = getStoreValue('testTreeAutoExpandKeys') || []
 })
 
 //事件
@@ -93,7 +93,7 @@ const testElTreeClick = ({data, keys}) => {
     testSearchClick()
     //缓存展开的节点
     testTreeExpandKeys.value = keys.value || []
-    setStoreData('testTreeAutoExpandKeys', keys.value)
+    setStoreValue('testTreeAutoExpandKeys', keys.value)
 }
 
 //搜索表单

+ 4 - 4
src/views/data-fill/components/ListItem(已废弃).vue

@@ -413,7 +413,7 @@
 
 <script setup>
 import {ref, watch, nextTick} from "vue";
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import notableform from '~src/assets/view/notableform.svg';
 import HTableForm from "~src/plugins/HTableForm"
 import WbsTree from "../components/WbsTree.vue"
@@ -1128,7 +1128,7 @@ const getPanel = async () => {
 
         if (!error && code === 200) {
             componentDetail.value = getObjNullValue(data)
-            formulaModalinfo.value.type=componentDetail?.value.info?.data||''
+            formulaModalinfo.value.type = componentDetail?.value.info?.data || ''
         } else {
             componentDetail.value = []
         }
@@ -1231,7 +1231,7 @@ const CTDModal = ref(false)
 //树形结构异步加载数据
 const defaultExpandedCids = ref([])
 //自动展开缓存
-const CTDTreeAutoExpandKeys = ref(getStoreData('CTDElTreeExpandKeys') || [])
+const CTDTreeAutoExpandKeys = ref(getStoreValue('CTDElTreeExpandKeys') || [])
 const dialogTableRef = ref(null)
 const dialogTableRef1 = ref(null)
 const dialogTableRef2 = ref(null)
@@ -1353,7 +1353,7 @@ const CTDElTreeClick = (data, node, keys) => {
     getNodeData()
     //缓存展开的节点
     CTDTreeAutoExpandKeys.value = keys.value || []
-    setStoreData('CTDElTreeExpandKeys', keys.value)
+    setStoreValue('CTDElTreeExpandKeys', keys.value)
 
 }
 //获取试验树节点下的记录信息

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

@@ -362,7 +362,7 @@ import HcTreeData1 from "./components/division/HcTreeData1.vue"
 import DivisionTree from "./components/division/DivisionTree.vue"
 import HcTreeNode from "./components/HcTreeNode.vue"
 import {isType, getIndex, deepClone, formValidate, utilsArray} from "vue-utils-plus"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import {getDictionary} from "~api/other"
 import wbsApi from "~api/data-fill/wbs";
 import divisionApi from "~api/data-fill/division";
@@ -381,8 +381,8 @@ const contractId = ref(useAppState.getContractId);
 const projectInfo = ref(useAppState.getProjectInfo);
 const isCollapse = ref(useAppState.getCollapse)
 const contractInfo = ref(useAppState.getContractInfo);
-const { contractType } = contractInfo.value;
-const classifyType  = ref(contractType === 2 ? '2' : '1')
+const {contractType} = contractInfo.value;
+const classifyType = ref(contractType === 2 ? '2' : '1')
 
 //监听
 watch(() => [
@@ -392,9 +392,9 @@ watch(() => [
 })
 
 //自动展开缓存
-const treeAutoExpandKeys = ref(getStoreData('wbsTreeExpandKeys') || [])
+const treeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
 //自动展开缓存
-const TreeAutoExpandKeys = ref(getStoreData('wbsTreeExpandKeys') || [])
+const TreeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
 //渲染完成
 onMounted(() => {
     //setElTreeMenu()
@@ -501,7 +501,7 @@ const wbsElTreeClick = ({node, data, keys}) => {
     treeNodeInfo.value = node
     treeItemInfo.value = data
     tableBasicData.value = [data]
-    setStoreData('wbsTreeExpandKeys', keys)
+    setStoreValue('wbsTreeExpandKeys', keys)
     treeAutoExpandKeys.value = keys || []
     if (node.level === 3) {
         treePrimaryKeyId.value = data['primaryKeyId']
@@ -577,7 +577,7 @@ const ElTreeMenu = ref([
 const ElTreeMenuClick = async ({key, node, data, keys}) => {
     treeNodeInfo.value = node
     treeItemInfo.value = data
-    setStoreData('wbsTreeExpandKeys', keys)
+    setStoreValue('wbsTreeExpandKeys', keys)
     if (key === 'add') {
         addTreeNodeId.value = data?.id
         addTreeNodeOldId.value = data?.oldId
@@ -797,9 +797,15 @@ const copyNodeClick = async () => {
      if(table.length>0){
         table.forEach((ele)=>{
             if(ele.parentId===formCopyNodeModel.value.parentId||ele.id===formCopyNodeModel.value.parentId){
-               ele.isSameNode =1 
+               ele.isSameNode =1
             }else{
                 ele.isSameNode =0
+    if (table.length > 0) {
+        table.forEach((ele) => {
+            if (ele.primaryKeyId === formCopyNodeModel.value.primaryKeyId) {
+                ele.isSameNode = 1
+            } else {
+                ele.isSameNode = 0
             }
         })
     }

+ 3 - 3
src/views/data-fill/query.vue

@@ -203,7 +203,7 @@ import {ref, watch, onMounted} from "vue";
 import {useAppStore} from "~src/store";
 import WbsTree from "./components/WbsTree.vue"
 import HcTreeData from "./components/HcTreeData.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import {isType, downloadBlob, isString} from "vue-utils-plus"
 import queryApi from '~api/data-fill/query';
 import {eVisaTaskCheckApi} from "~api/other"
@@ -229,7 +229,7 @@ watch(() => [
 })
 
 //自动展开缓存
-const treeAutoExpandKeys = ref(getStoreData('wbsTreeExpandKeys') || [])
+const treeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
 
 //渲染完成
 onMounted(() => {
@@ -333,7 +333,7 @@ const wbsElTreeClick = ({node, data, keys}) => {
     primaryKeyId.value = data['primaryKeyId'] || ''
     //缓存自动展开
     treeAutoExpandKeys.value = keys
-    setStoreData('wbsTreeExpandKeys', keys)
+    setStoreValue('wbsTreeExpandKeys', keys)
     //改变搜索表单数据
     searchForm.value.wbsId = data['primaryKeyId']
     searchForm.value.contractIdRelation = data['contractIdRelation']

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

@@ -666,7 +666,7 @@ import HcTreeNode from "./components/HcTreeNode.vue"
 import HcTreeData from "./components/HcTreeData.vue"
 import WbsTree from "./components/WbsTree.vue"
 import {getTokenHeader} from '~src/api/request/header';
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import {isType, deepClone, formValidate, setCopyText} from "vue-utils-plus"
 import {getDictionary, eVisaTaskCheckApi} from "~api/other"
 import wbsApi from "~api/data-fill/wbs"
@@ -693,7 +693,7 @@ const typeName = routerQuery?.type || 'tree'
 //是否是抽屉
 const isDrawType = ref(true)
 //自动展开缓存
-const TreeAutoExpandKeys = ref(getStoreData('wbsTreeExpandKeys') || [])
+const TreeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
 //树搜索
 const isSearchTree = ref(false)
 const wbstreeKey = ref(Math.random())
@@ -938,7 +938,7 @@ const wbsElTreeClick = ({node, data, keys}) => {
     nodeItemInfo.value = node
     nodeDataInfo.value = data
     primaryKeyId.value = data?.primaryKeyId || ''
-    setStoreData('wbsTreeExpandKeys', keys)
+    setStoreValue('wbsTreeExpandKeys', keys)
     TreeAutoExpandKeys.value = keys || []
     getTableDataAll()
 }
@@ -951,7 +951,7 @@ const ElTreeNodeLoading = () => {
 const ElTreeMenuClick = async ({key, node, data, keys}) => {
     nodeItemInfo.value = node
     nodeDataInfo.value = data
-    setStoreData('wbsTreeExpandKeys', keys)
+    setStoreValue('wbsTreeExpandKeys', keys)
     setTreeMenuDataClick({key, node, data})
 }
 
@@ -960,7 +960,7 @@ const NodeTreeRef = ref(null)
 
 //鼠标左键单击事件
 const NodeTreeClick = ({keys}) => {
-    setStoreData('wbsTreeExpandKeys', keys)
+    setStoreValue('wbsTreeExpandKeys', keys)
     TreeAutoExpandKeys.value = keys || []
 }
 
@@ -1338,7 +1338,7 @@ const copyNodeClick = async () => {
      if(table.length>0){
         table.forEach((ele)=>{
             if(ele.parentId===formCopyNodeModel.value.parentId||ele.id===formCopyNodeModel.value.parentId){
-               ele.isSameNode =1 
+               ele.isSameNode =1
             }else{
                 ele.isSameNode =0
             }

+ 37 - 26
src/views/home/config.vue

@@ -1,15 +1,16 @@
 <template>
     <HcCard actionSize="lg" scrollbar>
-        <div class="text-lg font-medium mb-4">主题模式<span class="text-sm text-slate-400 font-light ml-4">深色模式还未适配,暂不推荐使用深色模式</span></div>
+        <div class="text-lg font-medium mb-4">主题模式<span class="text-sm text-slate-400 font-light ml-4">深色模式还未适配,暂不推荐使用深色模式</span>
+        </div>
         <div class="hc-theme-box mb-8">
             <el-radio-group v-model="UserTheme" @change="ThemeTabsUpdate">
                 <template v-for="item in ThemeDatas">
-                    <div class="item" :class="UserTheme === item?.key ? 'active' : ''">
-                        <div class="demo" :class="item?.key">
+                    <div :class="UserTheme === item?.key ? 'active' : ''" class="item">
+                        <div :class="item?.key" class="demo">
                             <img :src="ImgTheme" alt="">
                         </div>
                         <div class="action" @click="ThemeConfigClick(item)">
-                            <el-radio :label="item?.key" size="large" class="size-xl">{{item?.name}}</el-radio>
+                            <el-radio :label="item?.key" class="size-xl" size="large">{{ item?.name }}</el-radio>
                         </div>
                     </div>
                 </template>
@@ -19,24 +20,28 @@
         <div class="text-lg font-medium mb-4">主题色</div>
         <div class="hc-theme-box color-box mb-4">
             <template v-for="(item,index) in ColorConfigData">
-                <div class="item" :class="UserColorNmae === item.name ? 'active' : ''" v-if="index < 5">
-                    <div class="demo" :class="`bg-${item.name}`">
+                <div v-if="index < 5" :class="UserColorNmae === item.name ? 'active' : ''" class="item">
+                    <div :class="`bg-${item.name}`" class="demo">
                         <img :src="ImgColor" alt="">
                     </div>
                     <div class="action" @click="ColorConfigClick(item)">
-                        <el-radio v-model="UserColorNmae" :label="item?.name" size="large" class="size-xl">{{item?.label}}</el-radio>
+                        <el-radio v-model="UserColorNmae" :label="item?.name" class="size-xl" size="large">
+                            {{ item?.label }}
+                        </el-radio>
                     </div>
                 </div>
             </template>
         </div>
         <div class="hc-theme-box color-box mb-8">
             <template v-for="(item,index) in ColorConfigData">
-                <div class="item" :class="UserColorNmae === item.name ? 'active' : ''" v-if="index >= 5">
-                    <div class="demo" :class="`bg-${item.name}`">
+                <div v-if="index >= 5" :class="UserColorNmae === item.name ? 'active' : ''" class="item">
+                    <div :class="`bg-${item.name}`" class="demo">
                         <img :src="ImgColor" alt="">
                     </div>
                     <div class="action" @click="ColorConfigClick(item)">
-                        <el-radio v-model="UserColorNmae" :label="item?.name" size="large" class="size-xl">{{item?.label}}</el-radio>
+                        <el-radio v-model="UserColorNmae" :label="item?.name" class="size-xl" size="large">
+                            {{ item?.label }}
+                        </el-radio>
                     </div>
                 </div>
             </template>
@@ -45,7 +50,8 @@
         <div class="text-lg font-medium mb-2">首页背景</div>
         <div class="hc-theme-box home-bg-box mb-8">
             <template v-for="item in homeConfigData">
-                <div class="item mt-2" :class="HomeTheme.name === item?.name ? 'active' : ''" @click="homeConfigClick(item)">
+                <div :class="HomeTheme.name === item?.name ? 'active' : ''" class="item mt-2"
+                     @click="homeConfigClick(item)">
                     <img :src="item.bg" alt="" crossOrigin="anonymous">
                 </div>
             </template>
@@ -55,38 +61,43 @@
         <div class="hc-screenshot-box mb-4">
             <div class="item">
                 <div class="label">WebRtc:</div>
-                <el-popover placement="top-start" trigger="hover" :width="400">
+                <el-popover :width="400" placement="top-start" trigger="hover">
                     <template #reference>
-                        <el-switch v-model="webRtcVal" size="large" active-value="1" inactive-value="0" @change="webRtcUpdate"/>
+                        <el-switch v-model="webRtcVal" active-value="1" inactive-value="0" size="large"
+                                   @change="webRtcUpdate"/>
                     </template>
                     <div>
-                        <div>是否启用WebRtc方式截图,WebRtc方式不会错版,但需要同意授权,调用的是浏览器的共享屏幕API (可能在某些浏览器上,不支持)。</div>
-                        <div class="mt-2 mb-2">不启用WebRtc时,采用 html2canvas 实现截图,但支持的并不好,容易出现错版。</div>
+                        <div>是否启用WebRtc方式截图,WebRtc方式不会错版,但需要同意授权,调用的是浏览器的共享屏幕API
+                            (可能在某些浏览器上,不支持)。
+                        </div>
+                        <div class="mt-2 mb-2">不启用WebRtc时,采用 html2canvas 实现截图,但支持的并不好,容易出现错版。
+                        </div>
                         <div>但目前市面上,网页截图的仅有这两种方案,推荐使用第三方截图来手动上传图片。</div>
                     </div>
                 </el-popover>
             </div>
             <div class="item">
                 <div class="label">全屏截图:</div>
-                <el-popover placement="top-start" trigger="hover" :width="180">
+                <el-popover :width="180" placement="top-start" trigger="hover">
                     <template #reference>
-                        <el-switch v-model="fullScreenVal" size="large" active-value="1" inactive-value="0" @change="fullScreenUpdate"/>
+                        <el-switch v-model="fullScreenVal" active-value="1" inactive-value="0" size="large"
+                                   @change="fullScreenUpdate"/>
                     </template>
                     <div>单击截全屏的启用状态</div>
                 </el-popover>
             </div>
         </div>
         <template #action>
-            <el-popover placement="top" trigger="hover" :width="180">
+            <el-popover :width="180" placement="top" trigger="hover">
                 <template #reference>
-                    <el-button type="primary" hc-btn :loading="saveLoading" @click="SaveConfigClick">
+                    <el-button :loading="saveLoading" hc-btn type="primary" @click="SaveConfigClick">
                         <HcIcon name="save"/>
                         <span>保存配置</span>
                     </el-button>
                 </template>
                 <div>下次登录后,会自动同步,并启用当前配置</div>
             </el-popover>
-            <el-popover placement="top-start" trigger="hover" :width="180">
+            <el-popover :width="180" placement="top-start" trigger="hover">
                 <template #reference>
                     <el-button hc-btn @click="CancelClick">
                         <HcIcon name="arrow-go-back"/>
@@ -100,15 +111,15 @@
 </template>
 
 <script setup>
-import {ref,nextTick} from "vue";
+import {ref, nextTick} from "vue";
 import {useRouter, useRoute} from 'vue-router'
 import {useAppStore} from "~src/store";
 import themeData from '~src/config/theme';
 import {userConfigSave} from "~api/other";
 import ImgTheme from "~src/assets/images/theme.png";
 import ImgColor from "~src/assets/images/color.png";
-import {setMainColor} from "~src/utils/tools";
-import {useOsTheme} from "vue-utils-plus"
+import {setElementMainColor} from "js-fast-way"
+import {useOsTheme} from '~src/plugins/useOsTheme';
 
 //初始变量
 const router = useRouter()
@@ -131,7 +142,7 @@ const ColorConfigClick = (item) => {
     useAppState.setColor(item)
     UserColorNmae.value = item?.name
     //设置主色调
-    setMainColor(item?.color)
+    setElementMainColor(item?.color)
     nextTick(() => {
         UserColor.value = item
     })
@@ -155,7 +166,7 @@ const ThemeTabsUpdate = (val) => {
         useAppState.setThemeVal(val)
     }
     let colorName = UserColorNmae.value || 'green'
-    document.documentElement.setAttribute('class',`${val} color-${colorName}`)
+    document.documentElement.setAttribute('class', `${val} color-${colorName}`)
 }
 
 //更改首页主题
@@ -184,7 +195,7 @@ const saveLoading = ref(false)
 const SaveConfigClick = async () => {
     //发起请求
     saveLoading.value = true
-    const { error, code } = await userConfigSave({
+    const {error, code} = await userConfigSave({
         theme: UserTheme.value,
         color: UserColorNmae.value,
         homeTheme: HomeTheme.value?.name,

+ 16 - 13
src/views/ledger/write.vue

@@ -1,33 +1,36 @@
 <template>
     <div class="hc-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'" v-if="sbTableKey !== 'weather'">
+        <div v-if="sbTableKey !== 'weather'" :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :projectId="projectId" :contractId="contractId" @nodeTap="nodeWbsElTreeClick"/>
+                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :contractId="contractId" :projectId="projectId"
+                             @nodeTap="nodeWbsElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
             <div class="horizontal-drag-line" @mousedown="onmousedown"/>
         </div>
         <div class="hc-layout-content-box ledger-write-box">
-            <HcTabsSimple :datas="sbTableData" :cur="sbTableKey" @tabClick="sbTableClick" >
+            <HcTabsSimple :cur="sbTableKey" :datas="sbTableData" @tabClick="sbTableClick">
                 <template #tab-internal>
-                    <HcInternal v-if="sbTableKey === 'internal'" :projectId="projectId" :contractId="contractId" :treeData="nodeDataInfo"/>
+                    <HcInternal v-if="sbTableKey === 'internal'" :contractId="contractId" :projectId="projectId"
+                                :treeData="nodeDataInfo"/>
                 </template>
                 <template #tab-construction>
-                    <HcConstruction v-if="sbTableKey === 'construction'" :projectId="projectId" :contractId="contractId" :treeData="nodeDataInfo"/>
+                    <HcConstruction v-if="sbTableKey === 'construction'" :contractId="contractId" :projectId="projectId"
+                                    :treeData="nodeDataInfo"/>
                 </template>
                 <template #tab-weather>
-                    <HcWeather v-if="sbTableKey === 'weather'" :projectId="projectId" :contractId="contractId"/>
+                    <HcWeather v-if="sbTableKey === 'weather'" :contractId="contractId" :projectId="projectId"/>
                 </template>
             </HcTabsSimple>
         </div>
@@ -42,7 +45,7 @@ import WbsTree from "./components/WbsTree.vue"
 import HcInternal from "./components/internal.vue"
 import HcWeather from "./components/weather.vue"
 import HcConstruction from "./components/construction.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 
 //变量
 const router = useRouter()
@@ -92,7 +95,7 @@ onMounted(() => {
 //根据类型获取相关数据
 const getTypeData = (key) => {
     if (key === 'internal' || key === 'construction') {
-        treeAutoExpandKeys.value = getStoreData('ledgerWriteTreeKeys') || []
+        treeAutoExpandKeys.value = getStoreValue('ledgerWriteTreeKeys') || []
     }
 }
 
@@ -100,7 +103,7 @@ const getTypeData = (key) => {
 const nodeDataInfo = ref({})
 const nodeWbsElTreeClick = ({data, keys}) => {
     nodeDataInfo.value = data
-    setStoreData('ledgerWriteTreeKeys',keys)
+    setStoreValue('ledgerWriteTreeKeys', keys)
     treeAutoExpandKeys.value = keys || []
 }
 
@@ -110,7 +113,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         const diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }
@@ -124,7 +127,7 @@ const onmousedown = () => {
 <style lang="scss" scoped>
 @import "../../styles/ledger/write.scss";
 
-.hc-layout-box .hc-layout-left-box .hc-tree-box{
+.hc-layout-box .hc-layout-left-box .hc-tree-box {
     height: calc(100% - 81px);
 }
 

+ 4 - 4
src/views/other-file/image-data.vue

@@ -81,7 +81,7 @@ import {onMounted, ref} from 'vue'
 import {useAppStore} from "~src/store";
 import {useRouter, useRoute} from 'vue-router'
 import imageApi from '~api/other-file/imageData';
-import {delStoreData} from '~src/utils/storage'
+import {delStoreValue} from '~src/utils/storage'
 import {getArrValue} from "vue-utils-plus"
 
 //变量
@@ -93,9 +93,9 @@ const contractId = ref(useAppState.getContractId);
 
 //渲染完成
 onMounted(() => {
-    delStoreData('TreeExpandKeys')
-    delStoreData('TreeExpandedKeys')
-    delStoreData('TreeCurrentNodeKey')
+    delStoreValue('TreeExpandKeys')
+    delStoreValue('TreeExpandedKeys')
+    delStoreValue('TreeCurrentNodeKey')
     getClassIfyList()
 })
 

+ 92 - 67
src/views/other-file/image-form.vue

@@ -1,87 +1,113 @@
 <template>
     <div class="hc-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'"  v-if="dataType === 1">
+        <div v-if="dataType === 1" :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <WbsTree :autoExpandKeys="TreeAutoExpandKeys" :projectId="projectId" :contractId="contractId" @nodeTap="nodeWbsElTreeClick"/>
+                    <WbsTree :autoExpandKeys="TreeAutoExpandKeys" :contractId="contractId" :projectId="projectId"
+                             @nodeTap="nodeWbsElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
             <div class="horizontal-drag-line" @mousedown="onmousedown"/>
         </div>
-        <div class="hc-layout-content-box" v-loading="queryByLoading" element-loading-text="获取数据中...">
-            <HcCard :title="`${treeItemInfo?.title ?? ''} 上传${fileType === 1 ? '视频' : fileType === 2 ? '图片' : ''}`" :scrollbar="false" actionSize="lg">
-                <el-alert style="margin-bottom: 14px" title="请先在左边项目树,选择一个节点" type="warning" effect="dark" :closable="false" v-if="dataType === 1 && !wbsId"/>
+        <div v-loading="queryByLoading" class="hc-layout-content-box" element-loading-text="获取数据中...">
+            <HcCard
+                :scrollbar="false"
+                :title="`${treeItemInfo?.title ?? ''} 上传${fileType === 1 ? '视频' : fileType === 2 ? '图片' : ''}`"
+                actionSize="lg">
+                <el-alert v-if="dataType === 1 && !wbsId" :closable="false" effect="dark" style="margin-bottom: 14px"
+                          title="请先在左边项目树,选择一个节点" type="warning"/>
 
-                <el-row class="hc-form-row-box" :gutter="20">
+                <el-row :gutter="20" class="hc-form-row-box">
                     <el-col :span="10">
                         <el-scrollbar>
                             <el-form ref="formRef" :model="formValue" :rules="rules" label-width="auto" size="large">
                                 <el-form-item label="上传日期" prop="uploadTime">
-                                    <el-date-picker v-model="formValue.uploadTime" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
+                                    <el-date-picker v-model="formValue.uploadTime" format="YYYY-MM-DD" type="date"
+                                                    value-format="YYYY-MM-DD"/>
                                 </el-form-item>
                                 <el-form-item label="上传文件" prop="imageUrl">
                                     <div class="w-full">
-                                        <HcUploads :fileList="uploadFileList" :accept="fileType === 1 ? videoAccept : fileType === 2 ? imageAccept : null" action="upload-file"
-                                                   :limit="fileType === 2 ? 10 : 1" :size="fileType === 2 ? 30 : 500" :viewer="false" @change="uploadsChange" @progress="uploadsProgress"
-                                                   @del="uploadsDel" @preview="uploadsPreview"/>
+                                        <HcUploads
+                                            :accept="fileType === 1 ? videoAccept : fileType === 2 ? imageAccept : null"
+                                            :fileList="uploadFileList"
+                                            :limit="fileType === 2 ? 10 : 1"
+                                            :size="fileType === 2 ? 30 : 500" :viewer="false"
+                                            action="upload-file" @change="uploadsChange" @del="uploadsDel"
+                                            @preview="uploadsPreview" @progress="uploadsProgress"/>
                                     </div>
-                                    <el-image-viewer v-if="previewModal && fileType === 2" :initial-index="initialIndex" :url-list="previewFileList" @close="previewModalClose"/>
-                                    <el-dialog v-model="previewVideoModal" width="62rem" destroy-on-close :before-close="previewModalClose">
-                                        <video class="preview-video" :src="previewVideoUrl" controls="controls" autoplay="autoplay">
+                                    <el-image-viewer v-if="previewModal && fileType === 2" :initial-index="initialIndex"
+                                                     :url-list="previewFileList" @close="previewModalClose"/>
+                                    <el-dialog v-model="previewVideoModal" :before-close="previewModalClose"
+                                               destroy-on-close
+                                               width="62rem">
+                                        <video :src="previewVideoUrl" autoplay="autoplay" class="preview-video"
+                                               controls="controls">
                                             您的浏览器不支持 video
                                         </video>
                                     </el-dialog>
-                                    <el-alert title="请上传MP4、MOV格式的视频文件,文件大小不超过500M,只能上传1个视频文件" type="error" :closable="false" v-if="fileType === 1"/>
-                                    <el-alert title="请上传JPG/JPEG、PNG格式的图片文件,文件大小不超过30M,最多10张图片文件" type="error" :closable="false" v-if="fileType === 2"/>
+                                    <el-alert v-if="fileType === 1"
+                                              :closable="false"
+                                              title="请上传MP4、MOV格式的视频文件,文件大小不超过500M,只能上传1个视频文件"
+                                              type="error"/>
+                                    <el-alert
+                                        v-if="fileType === 2"
+                                        :closable="false"
+                                        title="请上传JPG/JPEG、PNG格式的图片文件,文件大小不超过30M,最多10张图片文件"
+                                        type="error"/>
                                 </el-form-item>
                                 <el-form-item label="题名" prop="title">
                                     <el-input v-model="formValue.title" placeholder="请输入题名"/>
                                 </el-form-item>
                                 <div class="flex">
-                                    <el-form-item class="flex-1" :class="fileType === 2?'mr-4':''" prop="shootingUser" label="拍摄者">
+                                    <el-form-item :class="fileType === 2?'mr-4':''" class="flex-1" label="拍摄者"
+                                                  prop="shootingUser">
                                         <el-input v-model="formValue.shootingUser" placeholder="请输入拍摄者"/>
                                     </el-form-item>
-                                    <el-form-item class="flex-1 ml-4" label="照片号" v-if="fileType === 2">
+                                    <el-form-item v-if="fileType === 2" class="flex-1 ml-4" label="照片号">
                                         <el-input v-model="formValue.photoCode" placeholder="请输入照片号"/>
                                     </el-form-item>
                                 </div>
                                 <el-form-item label="拍摄时间" prop="shootingTimeStr">
-                                    <el-date-picker v-model="formValue.shootingTimeStr" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
+                                    <el-date-picker v-model="formValue.shootingTimeStr" format="YYYY-MM-DD" type="date"
+                                                    value-format="YYYY-MM-DD"/>
                                 </el-form-item>
-                                <div class="flex" v-if="fileType === 2">
-                                    <el-form-item class="flex-1 mr-4" prop="filmCode" label="底片号">
+                                <div v-if="fileType === 2" class="flex">
+                                    <el-form-item class="flex-1 mr-4" label="底片号" prop="filmCode">
                                         <el-input v-model="formValue.filmCode" placeholder="请输入底片号"/>
                                     </el-form-item>
-                                    <el-form-item class="flex-1 ml-4" prop="seeAlsoCode" label="参见号">
+                                    <el-form-item class="flex-1 ml-4" label="参见号" prop="seeAlsoCode">
                                         <el-input v-model="formValue.seeAlsoCode" placeholder="请输入参见号"/>
                                     </el-form-item>
                                 </div>
                                 <el-form-item label="文字说明" prop="textContent">
-                                    <el-input type="textarea" v-model="formValue.textContent" placeholder="请输入文字说明" :autosize="{ minRows: 3, maxRows: 5 }"/>
+                                    <el-input v-model="formValue.textContent" :autosize="{ minRows: 3, maxRows: 5 }"
+                                              placeholder="请输入文字说明" type="textarea"/>
                                 </el-form-item>
                             </el-form>
                         </el-scrollbar>
                     </el-col>
                     <el-col :span="14">
-                        <HcTable :column="tableColumn" :datas="tableData" v-if="dataType === 2"/>
+                        <HcTable v-if="dataType === 2" :column="tableColumn" :datas="tableData"/>
                     </el-col>
                 </el-row>
                 <template #action>
-                    <el-button type="primary" :disabled="uploadsLoading || (dataType === 1 && !wbsId)" hc-btn :loading="saveLoading" @click="saveClick">
+                    <el-button :disabled="uploadsLoading || (dataType === 1 && !wbsId)" :loading="saveLoading" hc-btn
+                               type="primary" @click="saveClick">
                         <HcIcon name="save"/>
                         <span>保存</span>
                     </el-button>
-                    <el-button hc-btn :disabled="uploadsLoading" :loading="saveLoading" v-if="dataType === 2" @click="saveLogClick">
+                    <el-button v-if="dataType === 2" :disabled="uploadsLoading" :loading="saveLoading" hc-btn
+                               @click="saveLogClick">
                         <HcIcon name="save"/>
                         <span>保存并再次添加</span>
                     </el-button>
@@ -101,7 +127,7 @@ import {useAppStore} from "~src/store";
 import {useRouter, useRoute} from 'vue-router'
 import WbsTree from "./components/WbsTree.vue"
 import imageApi from '~api/other-file/imageData';
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import {formValidate, getObjValue, getRandom, deepClone, dateFormat} from "vue-utils-plus"
 import ossApi from "~api/oss";
 
@@ -131,36 +157,36 @@ watch(() => [
     useAppState.getCollapse,
     useAppState.getUserInfo,
     useAppState.getContractId
-], ([Collapse,UserInfo,ContractId]) => {
+], ([Collapse, UserInfo, ContractId]) => {
     isCollapse.value = Collapse
     userRealName.value = UserInfo['real_name']
     formValue.value.shootingUser = UserInfo['real_name']
-    contractId.value=ContractId
+    contractId.value = ContractId
 })
 watch(contractId, (val) => {
-    if(val){
+    if (val) {
         router.push({
             path: '/other-file/image-data',
-     })
+        })
     }
-      
-   
-    })
+
+
+})
 //自动展开缓存
 const TreeAutoExpandKeys = ref([])
 
 //渲染完成
 onMounted(() => {
     if (dataType === 1) {
-        TreeAutoExpandKeys.value = getStoreData('TreeExpandKeys')
+        TreeAutoExpandKeys.value = getStoreValue('TreeExpandKeys')
     }
     formDataFormat({})
     queryById()
     formValue.value.shootingUser = userInfo.value['real_name']
-    if(wbsNodeIds){
-         getFileTitleNamedata(wbsNodeIds)
+    if (wbsNodeIds) {
+        getFileTitleNamedata(wbsNodeIds)
     }
-   
+
 })
 
 //详情
@@ -178,20 +204,19 @@ const queryById = async () => {
 }
 //获取题名
 const getFileTitleNamedata = async (wbsNodeIds) => {
-    
-        const {error, code, data} = await imageApi.getFileTitleName({pKeyId: wbsNodeIds})
-        //判断状态
-        if (!error && code === 200) {
-            let arr = Object.keys(data);
-            if(arr.length>0){
-                formValue.value.title=data
-            }else{
-                formValue.value.title=''
-            }
+
+    const {error, code, data} = await imageApi.getFileTitleName({pKeyId: wbsNodeIds})
+    //判断状态
+    if (!error && code === 200) {
+        let arr = Object.keys(data);
+        if (arr.length > 0) {
+            formValue.value.title = data
+        } else {
+            formValue.value.title = ''
         }
-    
-      
-    
+    }
+
+
 }
 //项目树被点击
 const wbsId = ref('')
@@ -204,7 +229,7 @@ const nodeWbsElTreeClick = ({data, keys}) => {
         getFileTitleNamedata(data['primaryKeyId'])
         //缓存自动展开
         TreeAutoExpandKeys.value = keys
-        setStoreData('TreeExpandKeys', keys)
+        setStoreValue('TreeExpandKeys', keys)
     } else {
         wbsId.value = ''
         treeItemInfo.value = {}
@@ -295,7 +320,7 @@ const previewFileList = ref([])
 const uploadFileList = ref([])
 
 //上传的文件结果
-const uploadsChange = ({ fileList}) => {
+const uploadsChange = ({fileList}) => {
     uploadFileList.value = fileList
 }
 
@@ -310,7 +335,7 @@ const previewModal = ref(false)
 const previewVideoModal = ref(false)
 const initialIndex = ref(-1)
 const previewVideoUrl = ref('')
-const uploadsPreview = ({ index, fileArr}) => {
+const uploadsPreview = ({index, fileArr}) => {
     if (fileType === 2) {
         previewFileList.value = fileArr
         initialIndex.value = index
@@ -332,7 +357,7 @@ const previewModalClose = () => {
 const uploadsDel = async ({link}) => {
     const arrUrl = link.split(".com//");
     if (arrUrl.length > 0) {
-        await ossApi.removeFile({fileName: arrUrl[1]},false)
+        await ossApi.removeFile({fileName: arrUrl[1]}, false)
     }
 }
 
@@ -364,8 +389,8 @@ const verifyFormData = async (log) => {
     //处理文件
     let imageUrl = '', pdfUrl = '';
     if (fileList.length > 0) {
-        imageUrl = rowsToKey(fileList,'url')
-        pdfUrl = rowsToKey(fileList,'pdfUrl')
+        imageUrl = rowsToKey(fileList, 'url')
+        pdfUrl = rowsToKey(fileList, 'pdfUrl')
     }
     //设置数据
     formData.imageUrl = imageUrl
@@ -378,9 +403,9 @@ const verifyFormData = async (log) => {
         const res = await formValidate(formRef.value)
         if (res) {
             if (formData?.id) {
-                updateImageclassifyFile(formData,log)
+                updateImageclassifyFile(formData, log)
             } else {
-                addImageclassifyFile(formData,log)
+                addImageclassifyFile(formData, log)
             }
         } else {
             window.$message?.warning('请先完善表单')
@@ -389,7 +414,7 @@ const verifyFormData = async (log) => {
 }
 
 //新增资料
-const addImageclassifyFile = async (formData,log) => {
+const addImageclassifyFile = async (formData, log) => {
     saveLoading.value = true
     const {error, code} = await imageApi.addImageclassifyFile(formData)
     //判断状态
@@ -406,7 +431,7 @@ const addImageclassifyFile = async (formData,log) => {
 }
 
 //修改资料
-const updateImageclassifyFile = async (formData,log) => {
+const updateImageclassifyFile = async (formData, log) => {
     saveLoading.value = true
     const {error, code} = await imageApi.updateImageclassifyFile(formData)
     //判断状态
@@ -423,7 +448,7 @@ const updateImageclassifyFile = async (formData,log) => {
 }
 
 //拼接字段
-const rowsToKey = (rows,key) => {
+const rowsToKey = (rows, key) => {
     return rows.map((obj) => {
         return obj[key];
     }).join(",")
@@ -435,7 +460,7 @@ const dataNodeExpandKeys = () => {
     let TimeArr = TimeStr.split('-')
     if (TimeStr && TimeArr.length > 0) {
         let timeKey = TimeArr[0] + '-' + TimeArr[1];
-        setStoreData('TreeExpandedKeys', [timeKey])
+        setStoreValue('TreeExpandedKeys', [timeKey])
     }
 }
 
@@ -455,9 +480,9 @@ const toBackClick = () => {
             id: classifyId,
         }
     })
-    setTimeout(()=>{
+    setTimeout(() => {
         window?.location?.reload()  //刷新页面
-    },1000)
+    }, 1000)
 }
 
 //左右拖动,改变树形结构宽度
@@ -466,7 +491,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         let diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }

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

@@ -123,7 +123,7 @@ import {useRouter, useRoute} from 'vue-router'
 import WbsTree from "./components/WbsTree.vue"
 import HcTreeData from "./components/HcTreeData.vue"
 import imageApi from '~api/other-file/imageData';
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import {downloadBlob, getArrValue, isString} from "vue-utils-plus"
 
 //变量
@@ -173,7 +173,7 @@ watch(contractId, (val) => {
 //自动展开缓存
 const TreeAutoExpandKeys = ref([])
 const TreeExpandedKeys = ref([])
-const TreeCurrentNodeKey = ref(getStoreData('TreeCurrentNodeKey') || '')
+const TreeCurrentNodeKey = ref(getStoreValue('TreeCurrentNodeKey') || '')
 
 //渲染完成
 onMounted(() => {
@@ -184,9 +184,9 @@ const initMounted = () => {
     console.log('onMounted')
     const nodeKey = TreeCurrentNodeKey.value
     if (dataType.value === 1) {
-        TreeAutoExpandKeys.value = getStoreData('TreeExpandKeys') || []
+        TreeAutoExpandKeys.value = getStoreValue('TreeExpandKeys') || []
     } else {
-        TreeExpandedKeys.value = getStoreData('TreeExpandedKeys') || []
+        TreeExpandedKeys.value = getStoreValue('TreeExpandedKeys') || []
     }
     if (dataType.value === 2 && dataId.value) {
         getYearDateTree()
@@ -227,8 +227,8 @@ const dateWbsElTreeClick = ({data, keys, key}) => {
     //缓存自动展开
     TreeExpandedKeys.value = keys
     TreeCurrentNodeKey.value = key
-    setStoreData('TreeExpandedKeys', keys)
-    setStoreData('TreeCurrentNodeKey', key)
+    setStoreValue('TreeExpandedKeys', keys)
+    setStoreValue('TreeCurrentNodeKey', key)
     //改变搜索表单数据
     searchForm.value.queryDate = data['hierarchy'] || ''
     searchForm.value.wbsIdsStr = null
@@ -245,7 +245,7 @@ const nodeWbsElTreeClick = ({data, keys}) => {
 
         //缓存自动展开
         TreeAutoExpandKeys.value = keys
-        setStoreData('TreeExpandKeys', keys)
+        setStoreValue('TreeExpandKeys', keys)
         //改变搜索表单数据
         searchForm.value.queryDate = null
         // searchForm.value.wbsIdsStr = data?.primaryKeyId || ''

+ 157 - 133
src/views/other-file/project-scanning.vue

@@ -1,18 +1,18 @@
 <template>
     <div class="hc-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
+        <div :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <ProjectTree :datas="ElTreeData" :autoExpandKeys="TreeAutoExpandKeys" @nodeTap="nodeElTreeClick"/>
+                    <ProjectTree :autoExpandKeys="TreeAutoExpandKeys" :datas="ElTreeData" @nodeTap="nodeElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
@@ -22,43 +22,45 @@
             <HcCard :scrollbar="false" actionSize="lg">
                 <template #header>
                     <HcTooltip keys="project-scanning-upload">
-                        <el-button type="primary" :disabled="!nodeIds" hc-btn @click="uploadModalClick">
+                        <el-button :disabled="!nodeIds" hc-btn type="primary" @click="uploadModalClick">
                             <HcIcon name="add-circle"/>
                             <span>上传文件</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="project-scanning-download">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="batchDownloadLoading" @click="batchDownload">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="batchDownloadLoading" hc-btn
+                                   @click="batchDownload">
                             <HcIcon name="download"/>
                             <span>批量下载</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="project-scanning-report">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="reportLoading" @click="reportModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="reportLoading" hc-btn
+                                   @click="reportModalClick">
                             <HcIcon name="send-plane-2"/>
                             <span>批量上报</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="project-scanning-attest">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="certificationModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="certificationModalClick">
                             <HcIcon name="vip-diamond"/>
                             <span>批量认证</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="project-scanning-del">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="batchDel">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="batchDel">
                             <HcIcon name="delete-bin-2"/>
                             <span>批量删除</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="project-scanning-edit">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="batchEditClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="batchEditClick">
                             <HcIcon name="draft"/>
                             <span>批量编辑</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="project-scanning-abolish">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="batchAbolishClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="batchAbolishClick">
                             <HcIcon name="delete-bin-3"/>
                             <span>批量废除</span>
                         </el-button>
@@ -66,17 +68,20 @@
                 </template>
                 <template #search>
                     <div class="w-32">
-                        <el-select v-model="searchForm.isApprovalValue" placeholder="审批状态" clearable>
-                            <el-option v-for="item in approvalData" :label="item['dictValue']" :value="item['dictKey']"/>
+                        <el-select v-model="searchForm.isApprovalValue" clearable placeholder="审批状态">
+                            <el-option v-for="item in approvalData" :label="item['dictValue']"
+                                       :value="item['dictKey']"/>
                         </el-select>
                     </div>
                     <div class="w-32 ml-4">
-                        <el-select v-model="searchForm.isCertificationValue" placeholder="认证状态" clearable>
-                            <el-option v-for="item in certificationType" :label="item['dictValue']" :value="item['dictKey']"/>
+                        <el-select v-model="searchForm.isCertificationValue" clearable placeholder="认证状态">
+                            <el-option v-for="item in certificationType" :label="item['dictValue']"
+                                       :value="item['dictKey']"/>
                         </el-select>
                     </div>
                     <div class="w-64 ml-3">
-                        <el-input v-model="searchForm.queryValue" placeholder="请输入文件名、责任者进行搜索" clearable @keyup="keyUpEvent"/>
+                        <el-input v-model="searchForm.queryValue" clearable placeholder="请输入文件名、责任者进行搜索"
+                                  @keyup="keyUpEvent"/>
                     </div>
                     <div class="ml-2">
                         <el-button type="primary" @click="searchClick">
@@ -85,13 +90,17 @@
                         </el-button>
                     </div>
                 </template>
-                <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" isCheck @selection-change="tableSelectionChange">
+                <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading"
+                         isCheck @selection-change="tableSelectionChange">
                     <template #fileName="{row}">
-                        <span class="text-link" @click="tablePreview(row)">{{row?.fileName}}</span>
+                        <span class="text-link" @click="tablePreview(row)">{{ row?.fileName }}</span>
                     </template>
                     <template #isApprovalValue="{row}">
-                        <el-tag :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`"
-                                class="mx-1" effect="dark" v-if="row['isApprovalValue']">{{row['isApprovalValue']}}</el-tag>
+                        <el-tag
+                            v-if="row['isApprovalValue']"
+                            :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`"
+                            class="mx-1" effect="dark">{{ row['isApprovalValue'] }}
+                        </el-tag>
                     </template>
                 </HcTable>
                 <template #action>
@@ -101,58 +110,70 @@
         </div>
 
         <!--新增编辑文件-->
-        <el-dialog v-model="showUploadModal" title="上传工程文件" width="80vw" class="hc-modal-border hc-modal-table">
-            <HcTable ui="hc-form-table" :column="tableUploadColumn" :datas="tableUploadData" :loading="uploadSaveLoading">
+        <el-dialog v-model="showUploadModal" class="hc-modal-border hc-modal-table" title="上传工程文件" width="80vw">
+            <HcTable :column="tableUploadColumn" :datas="tableUploadData" :loading="uploadSaveLoading"
+                     ui="hc-form-table">
                 <template #fileNumber="{row}">
-                    <el-input v-model="row.fileNumber" :class="row['isFileNumber'] ? 'is-error' : ''" @input="tableInput($event, row, 'isFileNumber')"/>
+                    <el-input v-model="row.fileNumber" :class="row['isFileNumber'] ? 'is-error' : ''"
+                              @input="tableInput($event, row, 'isFileNumber')"/>
                 </template>
                 <template #fileName="{row}">
-                    <el-input v-model="row.fileName" :class="row['isFileName'] ? 'is-error' : ''" @input="tableInput($event, row, 'isFileName')"/>
+                    <el-input v-model="row.fileName" :class="row['isFileName'] ? 'is-error' : ''"
+                              @input="tableInput($event, row, 'isFileName')"/>
                 </template>
                 <template #fileTime="{row}">
-                    <el-date-picker v-model="row.fileTime" type="date" format="YYYY/MM/DD" value-format="YYYY-MM-DD" :clearable="false"/>
+                    <el-date-picker v-model="row.fileTime" :clearable="false" format="YYYY/MM/DD" type="date"
+                                    value-format="YYYY-MM-DD"/>
                 </template>
-                <template #sheetType="{row}" v-if="isBuiltDrawing === 1">
+                <template v-if="isBuiltDrawing === 1" #sheetType="{row}">
                     <el-select v-model="row.sheetType">
-                        <el-option v-for="item in sheetType" :key="item['dictKey']" :label="item['dictValue']" :value="item['dictKey']"/>
+                        <el-option v-for="item in sheetType" :key="item['dictKey']" :label="item['dictValue']"
+                                   :value="item['dictKey']"/>
                     </el-select>
                 </template>
-                <template #sheetSource="{row}" v-if="isBuiltDrawing === 1">
+                <template v-if="isBuiltDrawing === 1" #sheetSource="{row}">
                     <el-select v-model="row.sheetSource">
-                        <el-option v-for="item in sheetSourceType" :key="item['dictKey']" :label="item['dictValue']" :value="item['dictKey']"/>
+                        <el-option v-for="item in sheetSourceType" :key="item['dictKey']" :label="item['dictValue']"
+                                   :value="item['dictKey']"/>
                     </el-select>
                 </template>
-                <template #drawingNo="{row}" v-if="isBuiltDrawing === 1">
+                <template v-if="isBuiltDrawing === 1" #drawingNo="{row}">
                     <el-input v-model="row.drawingNo"/>
                 </template>
-                <template #citeChangeNumber="{row}" v-if="isBuiltDrawing === 1">
+                <template v-if="isBuiltDrawing === 1" #citeChangeNumber="{row}">
                     <el-input v-model="row.citeChangeNumber"/>
                 </template>
                 <template #isApproval="{row}">
                     <el-select v-model="row.isApproval">
-                        <el-option v-for="item in whetherData" :key="item.value" :label="item.label" :value="item.value"/>
+                        <el-option v-for="item in whetherData" :key="item.value" :label="item.label"
+                                   :value="item.value"/>
                     </el-select>
                 </template>
                 <template #isNeedCertification="{row}">
                     <el-select v-model="row.isNeedCertification">
-                        <el-option v-for="item in whetherData" :key="item.value" :label="item.label" :value="item.value"/>
+                        <el-option v-for="item in whetherData" :key="item.value" :label="item.label"
+                                   :value="item.value"/>
                     </el-select>
                 </template>
                 <template #dutyUser="{row}">
                     <el-input v-model="row.dutyUser"/>
                 </template>
                 <template #action="{row,index}">
-                    <HcFileUpload1 @change="newUploadsChange($event, row)" @progress="newUploadsProgress($event, row)" v-if="row.id">
-                        <el-button type="primary" plain size="small" :loading="row['newBtnLoading']">上传新文件</el-button>
+                    <HcFileUpload1 v-if="row.id" @change="newUploadsChange($event, row)"
+                                   @progress="newUploadsProgress($event, row)">
+                        <el-button :loading="row['newBtnLoading']" plain size="small" type="primary">上传新文件
+                        </el-button>
                     </HcFileUpload1>
-                    <el-button type="danger" plain size="small" :loading="row['delBtnLoading']" @click="delUploadData(row,index)">删除</el-button>
+                    <el-button :loading="row['delBtnLoading']" plain size="small" type="danger"
+                               @click="delUploadData(row,index)">删除
+                    </el-button>
                 </template>
             </HcTable>
             <template #footer>
                 <div class="lr-dialog-footer">
                     <div class="left flex items-center">
                         <HcFileUpload @change="uploadsChange" @progress="uploadsProgress">
-                            <el-button type="primary" hc-btn :loading="uploadsLoading" :disabled="uploadSaveLoading">
+                            <el-button :disabled="uploadSaveLoading" :loading="uploadsLoading" hc-btn type="primary">
                                 <HcIcon name="add-circle"/>
                                 <span>新增上传</span>
                             </el-button>
@@ -163,7 +184,8 @@
                             <HcIcon name="close"/>
                             <span>取消</span>
                         </el-button>
-                        <el-button type="primary" hc-btn :disabled="uploadsLoading" :loading="uploadSaveLoading" @click="batchUploadSave">
+                        <el-button :disabled="uploadsLoading" :loading="uploadSaveLoading" hc-btn type="primary"
+                                   @click="batchUploadSave">
                             <HcIcon name="save"/>
                             <span>提交保存</span>
                         </el-button>
@@ -174,34 +196,36 @@
 
         <!--批量上报审批-->
         <HcReportModal
-            title="批量上报审批"
-            url="archiveFile/batchApproval"
-            :show="showReportModal"
-            :projectId="projectId"
             :contractId="contractId"
-            :taskName="reportTaskName"
+            :datas="reportDatas"
             :ids="reportIds"
+            :projectId="projectId"
+            :show="showReportModal"
+            :taskName="reportTaskName"
             isDatas
-            :datas="reportDatas"
-            @hide="showReportModal = false"
+            title="批量上报审批"
+            url="archiveFile/batchApproval"
             @finish="showReportFinish"
+            @hide="showReportModal = false"
             @tagClose="reportTaskTagClose"
         />
 
         <!--批量认证-->
-        <el-dialog v-model="showCertificationModal" title="批量认证" width="80vw" class="hc-modal-border hc-modal-table">
+        <el-dialog v-model="showCertificationModal" class="hc-modal-border hc-modal-table" title="批量认证"
+                   width="80vw">
             <div class="hc-card-body-flex">
                 <div class="flex-table">
-                    <HcTable ui="hc-form-table" :column="CertColumns" :datas="CertData" @row-click="CertRowClick">
+                    <HcTable :column="CertColumns" :datas="CertData" ui="hc-form-table" @row-click="CertRowClick">
                         <template #action="{row,index}">
-                            <el-button type="primary" plain size="small" @click.stop="CertRowClick2(row)">预览</el-button>
+                            <el-button plain size="small" type="primary" @click.stop="CertRowClick2(row)">预览
+                            </el-button>
                         </template>
                     </HcTable>
                 </div>
-                <div class="flex-iframe" v-if="CertPdf">
-                    <iframe allow="display-capture" width='100%' height='100%' frameborder='1' :src="CertPdf"></iframe>
+                <div v-if="CertPdf" class="flex-iframe">
+                    <iframe :src="CertPdf" allow="display-capture" frameborder='1' height='100%' width='100%'></iframe>
                 </div>
-                <div class="flex-iframe hc-no-table-form" v-else>
+                <div v-else class="flex-iframe hc-no-table-form">
                     <div class="table-form-no">
                         <img :src="notableform" alt=""/>
                         <div class="desc">暂无 PDF 数据</div>
@@ -214,7 +238,7 @@
                         <HcIcon name="close"/>
                         <span>取消</span>
                     </el-button>
-                    <el-button type="primary" hc-btn :loading="CertLoading" @click="CertClick">
+                    <el-button :loading="CertLoading" hc-btn type="primary" @click="CertClick">
                         <HcIcon name="save"/>
                         <span>确认认证</span>
                     </el-button>
@@ -232,7 +256,7 @@ import {useRouter, useRoute} from 'vue-router'
 import ProjectTree from "./components/ProjectTree.vue"
 import HcFileUpload from "./components/HcFileUpload.vue"
 import HcFileUpload1 from "./components/HcFileUpload1.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import projectScanningApi from "~api/other-file/projectScanning";
 import {downloadBlob, getArrValue, deepClone} from "vue-utils-plus"
 import notableform from '~src/assets/view/notableform.svg';
@@ -258,7 +282,7 @@ watch(() => [
 })
 
 //自动展开缓存
-const TreeAutoExpandKeys = ref(getStoreData('scanningTreeExpandKeys') || [])
+const TreeAutoExpandKeys = ref(getStoreValue('scanningTreeExpandKeys') || [])
 
 const dayDate = ref('')
 
@@ -273,7 +297,7 @@ onMounted(() => {
 //获取树的数据
 const ElTreeData = ref([])
 const getClassIfyList = async () => {
-    const { error, code, data } = await projectScanningApi.getClassIfyList({
+    const {error, code, data} = await projectScanningApi.getClassIfyList({
         projectId: projectId.value,
         contractId: contractId.value
     })
@@ -304,13 +328,13 @@ const nodeElTreeClick = ({node, data, keys, key}) => {
     setTableColumns()
     getTableData()
     //缓存展开的节点
-    setStoreData('scanningTreeExpandKeys', keys)
+    setStoreValue('scanningTreeExpandKeys', keys)
 }
 
 //获取任务类型
 const approvalData = ref([])
 const firstTaskStatus = async () => {
-    const { error, code, data } = await tasksDataApi.queryTaskTypeStatus({
+    const {error, code, data} = await tasksDataApi.queryTaskTypeStatus({
         typeOrStatus: 'first_task_status'
     })
     //处理数据
@@ -324,7 +348,7 @@ const firstTaskStatus = async () => {
 //获取认证状态
 const certificationType = ref([])
 const certificationStatus = async () => {
-    const { error, code, data } = await tasksDataApi.queryTaskTypeStatus({
+    const {error, code, data} = await tasksDataApi.queryTaskTypeStatus({
         typeOrStatus: 'certification_status'
     })
     //处理数据
@@ -338,7 +362,7 @@ const certificationStatus = async () => {
 //获取图幅类型
 const sheetType = ref([])
 const sheetTypeStatus = async () => {
-    const { error, code, data } = await tasksDataApi.queryTaskTypeStatus({
+    const {error, code, data} = await tasksDataApi.queryTaskTypeStatus({
         typeOrStatus: 'sheet_type'
     })
     //处理数据
@@ -352,7 +376,7 @@ const sheetTypeStatus = async () => {
 //获取图表来源
 const sheetSourceType = ref([])
 const sheetSourceStatus = async () => {
-    const { error, code, data } = await tasksDataApi.queryTaskTypeStatus({
+    const {error, code, data} = await tasksDataApi.queryTaskTypeStatus({
         typeOrStatus: 'sheet_source'
     })
     //处理数据
@@ -395,40 +419,40 @@ const pageChange = ({current, size}) => {
 
 //设置表头
 const tableListColumn = ref([
-    {key:'fileNumber', name: '文件编号', width: 160},
-    {key:'fileName', name: '文件名称'},
-    {key:'filePage', name: '文件页数', width: 120},
-    {key:'isCertificationValue', name: '认证状态', width: 160},
-    {key:'isApprovalValue', name: '状态', width: 160},
-    {key:'fileTime', name: '文件时间', width: 160},
-    {key:'dutyUser', name: '责任者', width: 160}
+    {key: 'fileNumber', name: '文件编号', width: 160},
+    {key: 'fileName', name: '文件名称'},
+    {key: 'filePage', name: '文件页数', width: 120},
+    {key: 'isCertificationValue', name: '认证状态', width: 160},
+    {key: 'isApprovalValue', name: '状态', width: 160},
+    {key: 'fileTime', name: '文件时间', width: 160},
+    {key: 'dutyUser', name: '责任者', width: 160}
 ])
 const setTableColumns = () => {
     if (isBuiltDrawing.value === 1) {
         tableListColumn.value = [
-            {key:'fileNumber', name: '文件编号', width: 160},
-            {key:'fileName', name: '文件名称'},
-            {key:'filePage', name: '文件页数', width: 120},
-            {key:'sheetType', name: '图幅'},
-            {key:'sheetSourceValue', name: '图表来源'},
-            {key:'drawingNo', name: '图号'},
-            {key:'citeChangeNumber', name: '引用变更令编号'},
-            {key:'isCertificationValue', name: '认证状态', width: 160},
-            {key:'isApprovalValue', name: '状态', width: 160},
-            {key:'fileTime', name: '文件时间', width: 160},
-            {key:'dutyUser', name: '责任者', width: 160}
+            {key: 'fileNumber', name: '文件编号', width: 160},
+            {key: 'fileName', name: '文件名称'},
+            {key: 'filePage', name: '文件页数', width: 120},
+            {key: 'sheetType', name: '图幅'},
+            {key: 'sheetSourceValue', name: '图表来源'},
+            {key: 'drawingNo', name: '图号'},
+            {key: 'citeChangeNumber', name: '引用变更令编号'},
+            {key: 'isCertificationValue', name: '认证状态', width: 160},
+            {key: 'isApprovalValue', name: '状态', width: 160},
+            {key: 'fileTime', name: '文件时间', width: 160},
+            {key: 'dutyUser', name: '责任者', width: 160}
         ]
         sheetTypeStatus()
         sheetSourceStatus()
     } else {
         tableListColumn.value = [
-            {key:'fileNumber', name: '文件编号', width: 160},
-            {key:'fileName', name: '文件名称'},
-            {key:'filePage', name: '文件页数', width: 120},
-            {key:'isCertificationValue', name: '认证状态', width: 160},
-            {key:'isApprovalValue', name: '状态', width: 160},
-            {key:'fileTime', name: '文件时间', width: 160},
-            {key:'dutyUser', name: '责任者', width: 160}
+            {key: 'fileNumber', name: '文件编号', width: 160},
+            {key: 'fileName', name: '文件名称'},
+            {key: 'filePage', name: '文件页数', width: 120},
+            {key: 'isCertificationValue', name: '认证状态', width: 160},
+            {key: 'isApprovalValue', name: '状态', width: 160},
+            {key: 'fileTime', name: '文件时间', width: 160},
+            {key: 'dutyUser', name: '责任者', width: 160}
         ]
     }
 }
@@ -459,7 +483,7 @@ const tableListRef = ref(null)
 const tableCheckedKeys = ref([]);
 const tableSelectionChange = (rows) => {
     tableCheckedKeys.value = rows.filter((item) => {
-        return (item??'') !== '';
+        return (item ?? '') !== '';
     })
 }
 
@@ -468,9 +492,9 @@ const tablePreview = (row) => {
     const pdfUrl = row['pdfFileUrl'] || ''
     const evisaFile = row['evisaFile'] || ''
     if (evisaFile) {
-        window.open(evisaFile,'_blank')
+        window.open(evisaFile, '_blank')
     } else if (pdfUrl) {
-        window.open(pdfUrl,'_blank')
+        window.open(pdfUrl, '_blank')
     } else {
         window.$message?.warning('该数据暂无PDF')
     }
@@ -493,38 +517,38 @@ const uploadModalClick = () => {
 
 //设置文件表头
 const tableUploadColumn = ref([
-    {key:'fileNumber', name: '文件编号'},
-    {key:'fileName', name: '文件名称'},
-    {key:'fileTime', name: '文件时间'},
-    {key:'isApproval', name: '是否需要审批'},
-    {key:'isNeedCertification', name: '是否需要认证'},
-    {key:'dutyUser', name: '责任者'},
-    {key:'action', name: '操作', width: 180}
+    {key: 'fileNumber', name: '文件编号'},
+    {key: 'fileName', name: '文件名称'},
+    {key: 'fileTime', name: '文件时间'},
+    {key: 'isApproval', name: '是否需要审批'},
+    {key: 'isNeedCertification', name: '是否需要认证'},
+    {key: 'dutyUser', name: '责任者'},
+    {key: 'action', name: '操作', width: 180}
 ])
 const setTableUploadColumn = () => {
     if (isBuiltDrawing.value === 1) {
         tableUploadColumn.value = [
-            {key:'fileNumber', name: '文件编号'},
-            {key:'fileName', name: '文件名称'},
-            {key:'fileTime', name: '文件时间'},
-            {key:'sheetType', name: '图幅'},
-            {key:'sheetSource', name: '图表来源'},
-            {key:'drawingNo', name: '图号'},
-            {key:'citeChangeNumber', name: '引用变更令编号'},
-            {key:'isApproval', name: '是否需要审批'},
-            {key:'isNeedCertification', name: '是否需要认证'},
-            {key:'dutyUser', name: '责任者'},
-            {key:'action', name: '操作', width: 180}
+            {key: 'fileNumber', name: '文件编号'},
+            {key: 'fileName', name: '文件名称'},
+            {key: 'fileTime', name: '文件时间'},
+            {key: 'sheetType', name: '图幅'},
+            {key: 'sheetSource', name: '图表来源'},
+            {key: 'drawingNo', name: '图号'},
+            {key: 'citeChangeNumber', name: '引用变更令编号'},
+            {key: 'isApproval', name: '是否需要审批'},
+            {key: 'isNeedCertification', name: '是否需要认证'},
+            {key: 'dutyUser', name: '责任者'},
+            {key: 'action', name: '操作', width: 180}
         ]
     } else {
         tableUploadColumn.value = [
-            {key:'fileNumber', name: '文件编号'},
-            {key:'fileName', name: '文件名称'},
-            {key:'fileTime', name: '文件时间'},
-            {key:'isApproval', name: '是否需要审批'},
-            {key:'isNeedCertification', name: '是否需要认证'},
-            {key:'dutyUser', name: '责任者'},
-            {key:'action', name: '操作', width: 180}
+            {key: 'fileNumber', name: '文件编号'},
+            {key: 'fileName', name: '文件名称'},
+            {key: 'fileTime', name: '文件时间'},
+            {key: 'isApproval', name: '是否需要审批'},
+            {key: 'isNeedCertification', name: '是否需要认证'},
+            {key: 'dutyUser', name: '责任者'},
+            {key: 'action', name: '操作', width: 180}
         ]
     }
 }
@@ -547,8 +571,8 @@ const uploadsChange = ({fileList}) => {
             ossFileName: item?.name || '',
             fileTime: dayDate.value,
             fileUrl: item?.link || '',
-            sheetType: sheet.length > 0 ? sheet[0]['dictKey'] || '': '',
-            sheetSource: source.length > 0 ? source[0]['dictKey'] || '': '',
+            sheetType: sheet.length > 0 ? sheet[0]['dictKey'] || '' : '',
+            sheetSource: source.length > 0 ? source[0]['dictKey'] || '' : '',
             drawingNo: '',
             citeChangeNumber: '',
             isApproval: 0,
@@ -571,7 +595,7 @@ const uploadsProgress = (val) => {
 const whetherData = ref([{label: "不需要", value: 0}, {label: "需要", value: 1}])
 
 //输入框验证
-const tableInput = (val,row,isv) => {
+const tableInput = (val, row, isv) => {
     if (val) {
         row[isv] = false
     } else {
@@ -600,14 +624,14 @@ const newUploadsProgress = (val, row) => {
 }
 
 //删除
-const delUploadData = async (row,index) => {
+const delUploadData = async (row, index) => {
     if (row['ossFileName']) {
         row['delBtnLoading'] = true
         await ossApi.removeFile({fileName: row['ossFileName']})
         row['delBtnLoading'] = false
-        tableUploadData.value.splice(index,1);
+        tableUploadData.value.splice(index, 1);
     } else {
-        tableUploadData.value.splice(index,1);
+        tableUploadData.value.splice(index, 1);
     }
 }
 
@@ -649,7 +673,7 @@ const batchUploadSaveApi = async (rows) => {
     uploadSaveLoading.value = true
     const {error, code} = await projectScanningApi.batchUploadSave({
         list: rows
-    },false)
+    }, false)
     //判断状态
     uploadSaveLoading.value = false
     if (!error && code === 200) {
@@ -673,7 +697,7 @@ const batchUploadCancel = () => {
 const batchEditClick = () => {
     const rows = deepClone(tableCheckedKeys.value)
     //判断是否满足条件
-    const result = rows.every(({status})=> {
+    const result = rows.every(({status}) => {
         return status !== 1 && status !== 2
     })
     console.log(rows)
@@ -694,7 +718,7 @@ const batchEditSaveApi = async (rows) => {
     uploadSaveLoading.value = true
     const {error, code} = await projectScanningApi.batchEditSave({
         list: rows
-    },false)
+    }, false)
     //判断状态
     uploadSaveLoading.value = false
     if (!error && code === 200) {
@@ -713,12 +737,12 @@ const batchDownload = async () => {
     const ids = rowsToId(rows)
     //批量下载
     batchDownloadLoading.value = true
-    const { error, disposition, res } = await projectScanningApi.batchDownloadFileToZip({ids: ids})
+    const {error, disposition, res} = await projectScanningApi.batchDownloadFileToZip({ids: ids})
     //处理数据
     batchDownloadLoading.value = false
     if (!error) {
         if (disposition) {
-            downloadBlob(res,disposition)
+            downloadBlob(res, disposition)
         } else {
             window.$message?.error('数据异常')
         }
@@ -733,7 +757,7 @@ const showReportModal = ref(false)
 const reportLoading = ref(false)
 const reportModalClick = async () => {
     const rows = tableCheckedKeys.value;
-    const result = rows.every(({status})=> {
+    const result = rows.every(({status}) => {
         return status === 0 //isApproval !== 1 && status !== 0 || isApproval === 1 && status !== 0
     })
     if (result) {
@@ -754,7 +778,7 @@ const reportModalClick = async () => {
             })
             reportDatas.value = reportDataArr
             //设置任务名称
-            reportTaskName.value = rows.length > 1?`${rows[0].fileName}等${rows.length}个文件`:rows[0].fileName
+            reportTaskName.value = rows.length > 1 ? `${rows[0].fileName}等${rows.length}个文件` : rows[0].fileName
             reportLoading.value = false
             showReportModal.value = true
         } else {
@@ -768,7 +792,7 @@ const reportModalClick = async () => {
 //上报的审批内容移除
 const reportTaskTagClose = (index) => {
     const row = tableCheckedKeys.value[index];
-    tableListRef.value?.toggleRowSelection(row,false)
+    tableListRef.value?.toggleRowSelection(row, false)
 }
 
 //上报完成
@@ -782,15 +806,15 @@ const CertData = ref([])
 const CertIds = ref([])
 const CertPdf = ref('')
 const CertColumns = [
-    {key:'fileName', name: '文件名称'},
-    {key:'action', name: '操作', width: 100}
+    {key: 'fileName', name: '文件名称'},
+    {key: 'action', name: '操作', width: 100}
 ]
 
 //批量认证弹窗
 const showCertificationModal = ref(false)
 const certificationModalClick = () => {
     const rows = tableCheckedKeys.value;
-    const result = rows.every(({isCertification})=> {
+    const result = rows.every(({isCertification}) => {
         return isCertification === 0
     })
     if (result) {
@@ -840,7 +864,7 @@ const CertClick = async () => {
 //批量删除
 const batchDel = () => {
     const rows = tableCheckedKeys.value;
-    const result = rows.every(({status})=> {
+    const result = rows.every(({status}) => {
         return status === 0
     })
     if (result) {
@@ -878,7 +902,7 @@ const removeArchiveFile = async (ids) => {
 //批量废除
 const batchAbolishClick = () => {
     const rows = tableCheckedKeys.value;
-    const result = rows.every(({status})=> {
+    const result = rows.every(({status}) => {
         return status > 0
     })
     if (result) {
@@ -925,7 +949,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         const diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }

File diff suppressed because it is too large
+ 330 - 276
src/views/other/components/ListItem.vue


+ 207 - 190
src/views/other/first-item.vue

@@ -1,46 +1,50 @@
 <template>
-    <div class="hc-layout-box" id="first-item-node-layout-target">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'" v-show="!isFirstReportDrawer">
+    <div id="first-item-node-layout-target" class="hc-layout-box">
+        <div v-show="!isFirstReportDrawer" :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <WbsTree :autoExpandKeys="TreeAutoExpandKeys" :projectId="projectId" :contractId="contractId" @nodeTap="nodeWbsElTreeClick"/>
+                    <WbsTree :autoExpandKeys="TreeAutoExpandKeys" :contractId="contractId" :projectId="projectId"
+                             @nodeTap="nodeWbsElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
             <div class="horizontal-drag-line" @mousedown="onmousedown"/>
         </div>
-        <div class="hc-layout-content-box first-item" v-show="!isFirstReportDrawer">
+        <div v-show="!isFirstReportDrawer" class="hc-layout-content-box first-item">
             <HcCard :scrollbar="false" actionSize="lg">
                 <template #header>
-                    <HcTooltip keys="other-first-item-report" v-if="tabTypeKey === 'mark'">
-                        <el-button type="primary" hc-btn :disabled="tableSelectionKeys.length <= 0" @click="firstReportClick">
+                    <HcTooltip v-if="tabTypeKey === 'mark'" keys="other-first-item-report">
+                        <el-button :disabled="tableSelectionKeys.length <= 0" hc-btn type="primary"
+                                   @click="firstReportClick">
                             <HcIcon name="send-plane-2"/>
                             <span>上报首件</span>
                         </el-button>
                     </HcTooltip>
-                    <HcTooltip keys="other-first-item-report-approval" v-if="tabTypeKey === 'query'">
-                        <el-button type="primary" hc-btn :disabled="tableSelectionKeys.length <= 0" @click="reportModalClick(1)">
+                    <HcTooltip v-if="tabTypeKey === 'query'" keys="other-first-item-report-approval">
+                        <el-button :disabled="tableSelectionKeys.length <= 0" hc-btn type="primary"
+                                   @click="reportModalClick(1)">
                             <HcIcon name="send-plane-2"/>
                             <span>上报审批</span>
                         </el-button>
                     </HcTooltip>
-                    <HcTooltip keys="other-first-item-repeal" v-if="tabTypeKey === 'query'">
-                        <el-button hc-btn :disabled="tableSelectionKeys.length <= 0" @click="batchAbolishClick">
+                    <HcTooltip v-if="tabTypeKey === 'query'" keys="other-first-item-repeal">
+                        <el-button :disabled="tableSelectionKeys.length <= 0" hc-btn @click="batchAbolishClick">
                             <HcIcon name="delete-bin-3"/>
                             <span>批量废除</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="other-first-item-down-print">
-                        <el-button hc-btn :disabled="tableSelectionKeys.length <= 0" :loading="printLoading" @click="batchPrint">
+                        <el-button :disabled="tableSelectionKeys.length <= 0" :loading="printLoading" hc-btn
+                                   @click="batchPrint">
                             <HcIcon name="printer"/>
                             <span>预览/打印</span>
                         </el-button>
@@ -51,12 +55,13 @@
                 </template>
                 <template #search>
                     <div class="w-32">
-                        <el-select v-model="searchForm.status" placeholder="流程状态" clearable>
-                            <el-option v-for="item in processStatus" :label="item['dictValue']" :value="item['dictKey']"/>
+                        <el-select v-model="searchForm.status" clearable placeholder="流程状态">
+                            <el-option v-for="item in processStatus" :label="item['dictValue']"
+                                       :value="item['dictKey']"/>
                         </el-select>
                     </div>
                     <div class="w-32 ml-3">
-                        <el-select v-model="searchForm.reportNumber" placeholder="上报批次" clearable>
+                        <el-select v-model="searchForm.reportNumber" clearable placeholder="上报批次">
                             <el-option v-for="item in reportBatch" :label="item" :value="item"/>
                         </el-select>
                     </div>
@@ -64,7 +69,8 @@
                         <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate"/>
                     </div>
                     <div class="w-64 ml-3">
-                        <el-input v-model="searchForm.queryValue" placeholder="请输入名称关键词检索" clearable @keyup="keyUpEvent"/>
+                        <el-input v-model="searchForm.queryValue" clearable placeholder="请输入名称关键词检索"
+                                  @keyup="keyUpEvent"/>
                     </div>
                     <div class="ml-2">
                         <el-button type="primary" @click="searchClick">
@@ -73,28 +79,35 @@
                         </el-button>
                     </div>
                 </template>
-                <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" isCheck @selection-change="tableSelectionChange">
+                <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading"
+                         isCheck @selection-change="tableSelectionChange">
                     <template #name="{row}">
-                        <span class="text-link" @click="tableRowName(row)">{{row?.name}}</span>
+                        <span class="text-link" @click="tableRowName(row)">{{ row?.name }}</span>
                     </template>
                     <template #waitingUserList="{row}">
                         <template v-for="item in row['waitingUserList']">
-                            <el-tag :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`"
-                                    class="mx-1" effect="dark" v-if="item['waitingUserName']">{{item['waitingUserName']}}</el-tag>
+                            <el-tag
+                                v-if="item['waitingUserName']"
+                                :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`"
+                                class="mx-1" effect="dark">{{ item['waitingUserName'] }}
+                            </el-tag>
                         </template>
                     </template>
                     <template #taskStatusStr="{row}">
-                        <el-tag :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`"
-                                class="mx-1" effect="dark" v-if="row['taskStatusStr']">{{row['taskStatusStr']}}</el-tag>
+                        <el-tag
+                            v-if="row['taskStatusStr']"
+                            :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`"
+                            class="mx-1" effect="dark">{{ row['taskStatusStr'] }}
+                        </el-tag>
                     </template>
                 </HcTable>
                 <template #action>
                     <div class="lr-dialog-footer">
                         <div class="left">
                             <span class="text-success">任务人中:</span>
-                            <el-tag type="success" class="mx-1" effect="dark">已签字</el-tag>
-                            <el-tag type="warning" class="mx-1" effect="dark">已废除</el-tag>
-                            <el-tag type="danger" class="mx-1" effect="dark">签字异常</el-tag>
+                            <el-tag class="mx-1" effect="dark" type="success">已签字</el-tag>
+                            <el-tag class="mx-1" effect="dark" type="warning">已废除</el-tag>
+                            <el-tag class="mx-1" effect="dark" type="danger">签字异常</el-tag>
                         </div>
                         <div class="right">
                             <HcPages :pages="searchForm" @change="pageChange"/>
@@ -105,48 +118,56 @@
         </div>
 
         <!--上报首件-->
-        <HcDrawer :show="isFirstReportDrawer" :isCard="false" uis="hc-first-item-node-layout" to-id="first-item-node-layout-target" @close="FirstReportDrawerClose">
+        <HcDrawer :isCard="false" :show="isFirstReportDrawer" to-id="first-item-node-layout-target"
+                  uis="hc-first-item-node-layout" @close="FirstReportDrawerClose">
             <div class="node-content">
                 <div class="node-form">
                     <el-scrollbar v-if="contractId && isTableForm">
-                        <div class="hc-excel-table-form-view" :id="`table-form-${contractId}`"></div>
+                        <div :id="`table-form-${contractId}`" class="hc-excel-table-form-view"></div>
                     </el-scrollbar>
-                    <HcStatus :desc="statusDesc" v-else/>
+                    <HcStatus v-else :desc="statusDesc"/>
                 </div>
                 <div class="node-file">
                     <div class="title">上传总结报告</div>
-                    <div class="node-upload-box" v-if="contractId && isTableForm">
+                    <div v-if="contractId && isTableForm" class="node-upload-box">
                         <HcUpload :fileList="fileListData" :pkeyId="pkeyIds" @finish='uploadChange'/>
                     </div>
-                    <div class="node-upload-box" v-else>
-                        <el-alert title="表单异常,暂时无法使用上传" type="warning" show-icon :closable="false"/>
+                    <div v-else class="node-upload-box">
+                        <el-alert :closable="false" show-icon title="表单异常,暂时无法使用上传" type="warning"/>
                     </div>
-                    <el-divider border-style="dashed" />
+                    <el-divider border-style="dashed"/>
                     <div class="title">文件附件</div>
                     <div class="hc-table-node-file-box">
                         <HcTable :column="tableFileColumn" :datas="tableFileData" :isIndex="false">
                             <template #action="{row,index}">
-                                <el-button type="danger" plain size="small" @click="tableDelButton(index)">删除</el-button>
+                                <el-button plain size="small" type="danger" @click="tableDelButton(index)">删除
+                                </el-button>
                             </template>
                         </HcTable>
                     </div>
                 </div>
             </div>
             <div class="node-action">
-                <el-button type="primary" hc-btn :disabled="!contractId || !isTableForm||NodeStatus === '3'" :loading="tableFormSaveLoading" @click="saveBussData">
+                <el-button :disabled="!contractId || !isTableForm||NodeStatus === '3'" :loading="tableFormSaveLoading"
+                           hc-btn
+                           type="primary" @click="saveBussData">
                     <HcIcon name="save"/>
                     <span>保存</span>
                 </el-button>
-                <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '1'" @click="bussPdfInfo">
+                <el-button :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '1'" hc-btn
+                           @click="bussPdfInfo">
                     <HcIcon name="eye"/>
                     <span>预览</span>
                 </el-button>
-                <el-button v-if="NodeStatus !== '3'" hc-btn :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '3' || NodeStatus === '1'" :loading="reportLoading" @click="reportModalClick(2)">
+                <el-button v-if="NodeStatus !== '3'"
+                           :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '3' || NodeStatus === '1'"
+                           :loading="reportLoading"
+                           hc-btn @click="reportModalClick(2)">
                     <HcIcon name="send-plane-2"/>
                     <span>上报</span>
                 </el-button>
 
-                <el-button hc-btn @click="abolishOneClick"  v-if="NodeStatus === '3'">
+                <el-button v-if="NodeStatus === '3'" hc-btn @click="abolishOneClick">
                     <HcIcon name="arrow-go-back"/>
                     <span>撤回上报流程</span>
                 </el-button>
@@ -160,19 +181,19 @@
 
         <!--上报审批-->
         <HcReportModal
-            title="上报审批"
-            url="informationWriteQuery/batchTask"
-            :show="showReportModal"
-            :projectId="projectId"
             :contractId="contractId"
-            type="first"
-            :typeData="reportTypeData"
-            :taskName="reportTaskName"
+            :datas="reportDatas"
             :ids="reportIds"
             :isDatas="isReportModalDatas"
-            :datas="reportDatas"
-            @hide="showReportModal = false"
+            :projectId="projectId"
+            :show="showReportModal"
+            :taskName="reportTaskName"
+            :typeData="reportTypeData"
+            title="上报审批"
+            type="first"
+            url="informationWriteQuery/batchTask"
             @finish="showReportFinish"
+            @hide="showReportModal = false"
             @tagClose="reportTaskTagClose"
         />
     </div>
@@ -185,11 +206,11 @@ import {useRouter, useRoute} from 'vue-router'
 import WbsTree from "./components/WbsTree.vue"
 import HcUpload from "./components/HcUpload.vue"
 import HTableForm from "~src/plugins/HTableForm"
-import {getReportNumber,eVisaTaskCheckApi} from "~api/other";
+import {getReportNumber, eVisaTaskCheckApi} from "~api/other";
 import firstApi from '~api/other/first-item';
 import tasksApi from '~api/tasks/data';
-import {getStoreData, setStoreData} from '~src/utils/storage'
-import {getArrValue, isString, getObjValue, getObjNullValue,deepClone} from "vue-utils-plus"
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
+import {getArrValue, isString, getObjValue, getObjNullValue, deepClone} from "vue-utils-plus"
 import queryApi from "~api/data-fill/query";
 import wbsApi from "~api/data-fill/wbs";
 //变量
@@ -215,13 +236,13 @@ watch(() => [
 
 
 //自动展开缓存
-const TreeAutoExpandKeys = ref(getStoreData('firstItemTreeKeys') || [])
+const TreeAutoExpandKeys = ref(getStoreValue('firstItemTreeKeys') || [])
 
 //类型tab数据和相关处理
 const tabTypeKey = ref(typeName)
 const tabTypeTab = ref([
-    {key:'mark',  name: '已标记为首件'},
-    {key:'query', name: '首件查询'}
+    {key: 'mark', name: '已标记为首件'},
+    {key: 'query', name: '首件查询'}
 ]);
 
 const tabTypeChange = (item) => {
@@ -230,7 +251,7 @@ const tabTypeChange = (item) => {
     if (searchForm.value.wbsId) {
         searchForm.value.current = 1;
         getTableData()
-      
+
     }
     //路由跳转
     router.push({
@@ -252,17 +273,17 @@ const nodeWbsElTreeClick = ({data, keys}) => {
     searchForm.value.wbsId = data['primaryKeyId']
     //缓存自动展开
     TreeAutoExpandKeys.value = keys
-    setStoreData('firstItemTreeKeys', keys)
+    setStoreValue('firstItemTreeKeys', keys)
     //获取相关数据
-    let type=tabTypeKey.value==='mark'?2:3
-    getReportNumberByContractId(data['contractIdRelation'],type)
+    let type = tabTypeKey.value === 'mark' ? 2 : 3
+    getReportNumberByContractId(data['contractIdRelation'], type)
     searchClick()
 }
 
 //获取流程状态
 const processStatus = ref([])
 const firstTaskStatus = async () => {
-    const { data } = await tasksApi.queryTaskTypeStatus({
+    const {data} = await tasksApi.queryTaskTypeStatus({
         typeOrStatus: 'first_task_status'
     })
     //处理数据
@@ -270,19 +291,19 @@ const firstTaskStatus = async () => {
 }
 //查询状态
 const NodeStatus = ref('1')
-const queryNodeStatusId=ref('')
- const { contractType } = contractInfo.value;
-const authBtnTabKey = ref(contractType===2?'2':'1')
+const queryNodeStatusId = ref('')
+const {contractType} = contractInfo.value;
+const authBtnTabKey = ref(contractType === 2 ? '2' : '1')
 const queryNodeStatus = async () => {
     const info = treeItem.value;
-    console.log(info,'info')
+    console.log(info, 'info')
     const {error, code, data} = await wbsApi.queryNodeStatusSj({
         // primaryKeyId: info['contractIdRelation'] ? info['id'] : info['primaryKeyId'],
         // classify: 1
-    //    primaryKeyId: authBtnTabKey.value==1 ? info['id'] : info['primaryKeyId'],
-        primaryKeyId:info.primaryKeyId,
+        //    primaryKeyId: authBtnTabKey.value==1 ? info['id'] : info['primaryKeyId'],
+        primaryKeyId: info.primaryKeyId,
         classify: authBtnTabKey.value,
-        id:queryNodeStatusId.value
+        id: queryNodeStatusId.value
 
     })
     //1 未填报,2待上报,3已上报
@@ -294,13 +315,13 @@ const queryNodeStatus = async () => {
 }
 //获取上报批次
 const reportBatch = ref([])
-const getReportNumberByContractId = async (cid,type) => {
-    const { data } = await getReportNumber({
-         projectId:projectId.value,
+const getReportNumberByContractId = async (cid, type) => {
+    const {data} = await getReportNumber({
+        projectId: projectId.value,
         contractId: contractId.value,
         contractIdRelation: cid ?? '',
-        firstTitle: tabTypeKey.value === 'query' ? 1: null,
-        type:type
+        firstTitle: tabTypeKey.value === 'query' ? 1 : null,
+        type: type
     })
     //处理数据
     reportBatch.value = getArrValue(data)
@@ -314,7 +335,7 @@ const searchForm = ref({
 
 //日期时间被选择
 const betweenTime = ref(null)
-const betweenTimeUpdate = ({query,arr}) => {
+const betweenTimeUpdate = ({query, arr}) => {
     betweenTime.value = arr
     searchForm.value.betweenTime = query
 }
@@ -345,11 +366,11 @@ const pageChange = ({current, size}) => {
 
 //表格表头
 const tableListColumn = ref([
-    {key:'name', name: '文件名称'},
-    {key:'waitingUserList', name: '任务人'},
-    {key:'startTime', name: '开始时间', width: 180},
-    {key:'taskStatusStr', name: '流程状态', width: 140},
-    {key:'reportNumber', name: '上报批次', width: 120},
+    {key: 'name', name: '文件名称'},
+    {key: 'waitingUserList', name: '任务人'},
+    {key: 'startTime', name: '开始时间', width: 180},
+    {key: 'taskStatusStr', name: '流程状态', width: 140},
+    {key: 'reportNumber', name: '上报批次', width: 120},
 ])
 
 //获取表格数据
@@ -381,7 +402,7 @@ const getTableData = async () => {
         }
         addFormData['wbsId'] = treeInfo['contractIdRelation'] ? treeInfo['id'] : treeInfo['primaryKeyId']
         //处理数据
-        const { error, code, data } = await firstApi.getQueryPageData({
+        const {error, code, data} = await firstApi.getQueryPageData({
             ...addFormData,
             ...searchInfo,
         })
@@ -403,7 +424,7 @@ const tableListRef = ref(null)
 const tableSelectionKeys = ref([]);
 const tableSelectionChange = (rows) => {
     tableSelectionKeys.value = rows.filter((item) => {
-        return (item??'') !== '';
+        return (item ?? '') !== '';
     })
 }
 
@@ -414,9 +435,9 @@ const tableRowName = (row) => {
         //首件查询时,直接调用接口
         getBussPdfInfo(row.id + '')
     } else if (row['evisaPdfUrl']) {
-        window.open(row['evisaPdfUrl'],'_blank')
+        window.open(row['evisaPdfUrl'], '_blank')
     } else if (row['pdfUrl']) {
-        window.open(row['pdfUrl'],'_blank')
+        window.open(row['pdfUrl'], '_blank')
     } else {
         window.$message?.warning('文件不存在')
     }
@@ -424,15 +445,15 @@ const tableRowName = (row) => {
 
 //上报首件
 const isFirstReportDrawer = ref(false)
-const isCanreport=ref(false)
+const isCanreport = ref(false)
 const firstReportClick = () => {
     const rows = deepClone(tableSelectionKeys.value)
     //判断是否满足条件
-    const result = rows.every(({status})=> {
+    const result = rows.every(({status}) => {
         return status === 2
         // return status === 0 || status === 3
     })
-    isCanreport.value=result
+    isCanreport.value = result
     //判断状态
     // if (result) {
     //     isFirstReportDrawer.value = true
@@ -443,10 +464,10 @@ const firstReportClick = () => {
     //     tableFileData.value = []
     //     window.$message?.warning('已上报的文件不能进行再次上报,若要重新上报,要先撤回之前的上报,再重新上报')
     // }
-        isFirstReportDrawer.value = true
-        queryNodeStatus()
-        tableFileData.value = rows
-        getFirstExcelHtml()
+    isFirstReportDrawer.value = true
+    queryNodeStatus()
+    tableFileData.value = rows
+    getFirstExcelHtml()
 }
 //撤回上报流程
 const abolishOneClick = () => {
@@ -466,8 +487,8 @@ const abolishOneClick = () => {
 const abolishOneSave = async () => {
     const info = treeItem.value;
     const {error, code} = await wbsApi.abolishOneSJ({
-        primaryKeyId:  info?.primaryKeyId || '',
-        id:queryNodeStatusId.value
+        primaryKeyId: info?.primaryKeyId || '',
+        id: queryNodeStatusId.value
     })
     if (!error && code === 200) {
         window.$message?.success('撤回成功')
@@ -486,7 +507,7 @@ const isTableForm = ref(false)
 const pkeyIds = ref('')
 const getFirstExcelHtml = async () => {
     const cid = contractId.value;
-    const { error, code, data } = await firstApi.getFirstExcelHtml({
+    const {error, code, data} = await firstApi.getFirstExcelHtml({
         contractId: contractId.value || ''
     }, false)
     //处理数据
@@ -530,7 +551,7 @@ const setHTableForm = (resData, cid) => {
 const tableFormData = ref({})
 const getFirstBussDataInfo = async (pkeyId) => {
     if (pkeyId) {
-        const { data } = await firstApi.getFirstBussDataInfo({
+        const {data} = await firstApi.getFirstBussDataInfo({
             contractId: contractId.value || '',
             firstId: pkeyId + ''
         }, false)
@@ -570,8 +591,8 @@ const uploadChange = async ({type, res}) => {
 
 //文件附件列表
 const tableFileColumn = ref([
-    {key:'name', name: '文件名称'},
-    {key:'action', name: '操作', width: 80, align: 'center'}
+    {key: 'name', name: '文件名称'},
+    {key: 'action', name: '操作', width: 80, align: 'center'}
 ]);
 const tableFileData = ref([]);
 const tableDelButton = (index) => {
@@ -594,21 +615,20 @@ const tableDelButton = (index) => {
 }
 
 //填报数据保存
-const pdfId=ref('')
+const pdfId = ref('')
 const saveBussData = async () => {
     console.log('保存');
-    const { id } = treeItem.value
+    const {id} = treeItem.value
     const res = await saveExcelBussData(id + '')
     //刷新页面
     //  window?.location?.reload()  //刷新页面
     if (res) {
-        pdfId.value=res
-        queryNodeStatusId.value=res
-         queryNodeStatus()
+        pdfId.value = res
+        queryNodeStatusId.value = res
+        queryNodeStatus()
         await getBussPdfInfo(res)
 
 
-
     }
 }
 
@@ -617,10 +637,10 @@ const tableFormSaveLoading = ref(false)
 const tableFormId = ref('')
 const saveExcelBussData = async (pkeyId) => {
     tableFormId.value = ''
-    const { primaryKeyId } = treeItem.value
+    const {primaryKeyId} = treeItem.value
     tableFormSaveLoading.value = true
     const linkIds = rowsToArr(tableFileData.value);
-    const { error, code, data } = await firstApi.saveBussData({
+    const {error, code, data} = await firstApi.saveBussData({
         ...tableFormData.value,
         projectId: projectId.value,
         contractId: contractId.value,
@@ -646,21 +666,21 @@ const saveExcelBussData = async (pkeyId) => {
 
 //pdf预览
 const bussPdfInfo = () => {
-    const { id } = treeItem.value
+    const {id} = treeItem.value
     // getBussPdfInfo(id + '')
-     getBussPdfInfo(pdfId.value)
+    getBussPdfInfo(pdfId.value)
 
 }
 
 //预览PDF请求
 const getBussPdfInfo = async (pkeyId) => {
-    const { error, code, data } = await firstApi.getFirstBussPdfInfo({
+    const {error, code, data} = await firstApi.getFirstBussPdfInfo({
         firstId: pkeyId
     })
     //判断状态
-    const res = isString(data)? data ?? '': ''
+    const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res,'_blank')
+        window.open(res, '_blank')
     }
 }
 
@@ -673,101 +693,98 @@ const reportLoading = ref(false)
 const reportTypeData = ref('')
 const reportDatas = ref([])
 const isReportModalDatas = ref(false)
-const iscanReport=ref(false)
+const iscanReport = ref(false)
 //上报方法封装
 const toreportModalClick = async (type) => {
-    if(type){
-            const { primaryKeyId, contractIdRelation } = treeItem.value
-            let rows = [];
-            //处理获取流程的条件
-            if (tabTypeKey.value === 'mark') {
-                reportTypeData.value = tableFormId.value
-                isReportModalDatas.value = false
-                rows = tableFileData.value
-            } else {
-                isReportModalDatas.value = true
-                rows = tableSelectionKeys.value
-            }
-            if (rows.length > 0) {
-                reportLoading.value = true
-                const taskCheck = await eVisaTaskCheckApi({
-                    projectId: projectId.value,
-                    contractId: contractId.value
-                })
-                if (taskCheck) {
-                    if (tabTypeKey.value === 'mark') {
-                        reportIds.value = tableFormId.value
-                        const { data } = await firstApi.queryFirstDocumentTitle({
-                            projectId: projectId.value,
-                            contractId: contractId.value,
-                            queryId: tableFormId.value
-                        })
-                        reportTaskName.value = isString(data) ? data ?? '' : ''
-                    } else {
-                        reportIds.value = rowsToId(rows)
-                        //设置任务数据
-                        let reportDataArr = []
-                        rows.forEach(item => {
-                            reportDataArr.push({
-                                id: item?.id,
-                                name: item?.name
-                            })
-                        })
-                        reportDatas.value = reportDataArr
-                        //其他数据
-                        reportTypeData.value = rows[0]['id']
-                        reportTaskName.value = rows.length > 1?`${rows[0].name}等${rows.length}个文件`:rows[0].name
-                    }
-                    reportLoading.value = false
-                    //附加数据
-                    reportAddition.value = {
-                        classify: 1,
-                        isFirst: 1,
-                        primaryKeyId: primaryKeyId,
-                        contractIdRelation: contractIdRelation ?? contractId.value,
-                    }
-                    showReportModal.value = true
+    if (type) {
+        const {primaryKeyId, contractIdRelation} = treeItem.value
+        let rows = [];
+        //处理获取流程的条件
+        if (tabTypeKey.value === 'mark') {
+            reportTypeData.value = tableFormId.value
+            isReportModalDatas.value = false
+            rows = tableFileData.value
+        } else {
+            isReportModalDatas.value = true
+            rows = tableSelectionKeys.value
+        }
+        if (rows.length > 0) {
+            reportLoading.value = true
+            const taskCheck = await eVisaTaskCheckApi({
+                projectId: projectId.value,
+                contractId: contractId.value
+            })
+            if (taskCheck) {
+                if (tabTypeKey.value === 'mark') {
+                    reportIds.value = tableFormId.value
+                    const {data} = await firstApi.queryFirstDocumentTitle({
+                        projectId: projectId.value,
+                        contractId: contractId.value,
+                        queryId: tableFormId.value
+                    })
+                    reportTaskName.value = isString(data) ? data ?? '' : ''
                 } else {
-                    reportLoading.value = false
+                    reportIds.value = rowsToId(rows)
+                    //设置任务数据
+                    let reportDataArr = []
+                    rows.forEach(item => {
+                        reportDataArr.push({
+                            id: item?.id,
+                            name: item?.name
+                        })
+                    })
+                    reportDatas.value = reportDataArr
+                    //其他数据
+                    reportTypeData.value = rows[0]['id']
+                    reportTaskName.value = rows.length > 1 ? `${rows[0].name}等${rows.length}个文件` : rows[0].name
+                }
+                reportLoading.value = false
+                //附加数据
+                reportAddition.value = {
+                    classify: 1,
+                    isFirst: 1,
+                    primaryKeyId: primaryKeyId,
+                    contractIdRelation: contractIdRelation ?? contractId.value,
                 }
+                showReportModal.value = true
             } else {
-                window.$message?.warning('暂无相关数据')
+                reportLoading.value = false
             }
-        }else{
-             window.$message?.warning('当前工序资料还未审批,待审批完成才能进行首件模板上报')
-
+        } else {
+            window.$message?.warning('暂无相关数据')
         }
+    } else {
+        window.$message?.warning('当前工序资料还未审批,待审批完成才能进行首件模板上报')
+
+    }
 }
 const reportModalClick = async (type) => {
-    if(type===2){
-         console.log('上报')
-        iscanReport.value=isCanreport.value;
+    if (type === 2) {
+        console.log('上报')
+        iscanReport.value = isCanreport.value;
         toreportModalClick(iscanReport.value)
 
-    }
-
-    else{
-         const rows = deepClone(tableSelectionKeys.value)
-         let result=false
-            console.log('上报审批',rows)
+    } else {
+        const rows = deepClone(tableSelectionKeys.value)
+        let result = false
+        console.log('上报审批', rows)
         //判断自身是否满足条件
-         const result1 = rows.every(({taskStatusStr})=> {
-            return taskStatusStr === '未上报'||taskStatusStr === '已废除'
+        const result1 = rows.every(({taskStatusStr}) => {
+            return taskStatusStr === '未上报' || taskStatusStr === '已废除'
         })
-        if(result1){
-             //判断工序节点是否满足条件
-             result = rows.every(({isApprove})=> {
+        if (result1) {
+            //判断工序节点是否满足条件
+            result = rows.every(({isApprove}) => {
                 return isApprove === true
             })
-             iscanReport.value=result
-              toreportModalClick(iscanReport.value)
-        }else{
-              window.$message?.warning('已上报的数据不能重复上报')
-               iscanReport.value=false
+            iscanReport.value = result
+            toreportModalClick(iscanReport.value)
+        } else {
+            window.$message?.warning('已上报的数据不能重复上报')
+            iscanReport.value = false
         }
 
 
-
     }
 
 }
@@ -775,7 +792,7 @@ const reportModalClick = async (type) => {
 //上报的审批内容移除
 const reportTaskTagClose = (index) => {
     const row = tableSelectionKeys.value[index];
-    tableListRef.value?.toggleRowSelection(row,false)
+    tableListRef.value?.toggleRowSelection(row, false)
 }
 const getTableDataAll = () => {
     getTableData()
@@ -795,15 +812,15 @@ const batchPrint = async () => {
     const ids = rowsToId(rows)
     //批量下载
     printLoading.value = true
-    const { error, code, data } = await firstApi.batchPrint({
+    const {error, code, data} = await firstApi.batchPrint({
         ids: ids
     })
     //处理数据
     printLoading.value = false
     //判断状态
-    const res = isString(data)? data ?? '': ''
+    const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res,'_blank')
+        window.open(res, '_blank')
     }
 }
 
@@ -811,7 +828,7 @@ const batchPrint = async () => {
 const batchAbolishClick = () => {
     const rows = tableSelectionKeys.value;
     //判断是否满足条件
-    const result = rows.every(({status})=> {
+    const result = rows.every(({status}) => {
         return status !== 0 && status !== 3
     })
     //判断状态
@@ -834,7 +851,7 @@ const batchAbolishClick = () => {
 }
 //废除勾选的已上报文件
 const batchAbolishSave = async (ids) => {
-    const { error, code } = await queryApi.batchAbolish({ids: ids})
+    const {error, code} = await queryApi.batchAbolish({ids: ids})
     //处理数据
     if (!error && code === 200) {
         window.$message?.success('批量废除成功')
@@ -868,7 +885,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         const diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }

+ 223 - 206
src/views/other/first-itemcopy.vue

@@ -1,46 +1,50 @@
 <template>
-    <div class="hc-layout-box" id="first-item-node-layout-target">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'" v-show="!isFirstReportDrawer">
+    <div id="first-item-node-layout-target" class="hc-layout-box">
+        <div v-show="!isFirstReportDrawer" :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <WbsTree :autoExpandKeys="TreeAutoExpandKeys" :projectId="projectId" :contractId="contractId" @nodeTap="nodeWbsElTreeClick"/>
+                    <WbsTree :autoExpandKeys="TreeAutoExpandKeys" :contractId="contractId" :projectId="projectId"
+                             @nodeTap="nodeWbsElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
             <div class="horizontal-drag-line" @mousedown="onmousedown"/>
         </div>
-        <div class="hc-layout-content-box first-item" v-show="!isFirstReportDrawer">
+        <div v-show="!isFirstReportDrawer" class="hc-layout-content-box first-item">
             <HcCard :scrollbar="false" actionSize="lg">
                 <template #header>
-                    <HcTooltip keys="other-first-item-report" v-if="tabTypeKey === 'mark'">
-                        <el-button type="primary" hc-btn :disabled="tableSelectionKeys.length <= 0" @click="firstReportClick">
+                    <HcTooltip v-if="tabTypeKey === 'mark'" keys="other-first-item-report">
+                        <el-button :disabled="tableSelectionKeys.length <= 0" hc-btn type="primary"
+                                   @click="firstReportClick">
                             <HcIcon name="send-plane-2"/>
                             <span>上报首件</span>
                         </el-button>
                     </HcTooltip>
-                    <HcTooltip keys="other-first-item-report-approval" v-if="tabTypeKey === 'query'">
-                        <el-button type="primary" hc-btn :disabled="tableSelectionKeys.length <= 0" @click="reportModalClick(1)">
+                    <HcTooltip v-if="tabTypeKey === 'query'" keys="other-first-item-report-approval">
+                        <el-button :disabled="tableSelectionKeys.length <= 0" hc-btn type="primary"
+                                   @click="reportModalClick(1)">
                             <HcIcon name="send-plane-2"/>
                             <span>上报审批</span>
                         </el-button>
                     </HcTooltip>
-                    <HcTooltip keys="other-first-item-repeal" v-if="tabTypeKey === 'query'">
-                        <el-button hc-btn :disabled="tableSelectionKeys.length <= 0" @click="batchAbolishClick">
+                    <HcTooltip v-if="tabTypeKey === 'query'" keys="other-first-item-repeal">
+                        <el-button :disabled="tableSelectionKeys.length <= 0" hc-btn @click="batchAbolishClick">
                             <HcIcon name="delete-bin-3"/>
                             <span>批量废除</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="other-first-item-down-print">
-                        <el-button hc-btn :disabled="tableSelectionKeys.length <= 0" :loading="printLoading" @click="batchPrint">
+                        <el-button :disabled="tableSelectionKeys.length <= 0" :loading="printLoading" hc-btn
+                                   @click="batchPrint">
                             <HcIcon name="printer"/>
                             <span>预览/打印</span>
                         </el-button>
@@ -51,12 +55,13 @@
                 </template>
                 <template #search>
                     <div class="w-32">
-                        <el-select v-model="searchForm.status" placeholder="流程状态" clearable>
-                            <el-option v-for="item in processStatus" :label="item['dictValue']" :value="item['dictKey']"/>
+                        <el-select v-model="searchForm.status" clearable placeholder="流程状态">
+                            <el-option v-for="item in processStatus" :label="item['dictValue']"
+                                       :value="item['dictKey']"/>
                         </el-select>
                     </div>
                     <div class="w-32 ml-3">
-                        <el-select v-model="searchForm.reportNumber" placeholder="上报批次" clearable>
+                        <el-select v-model="searchForm.reportNumber" clearable placeholder="上报批次">
                             <el-option v-for="item in reportBatch" :label="item" :value="item"/>
                         </el-select>
                     </div>
@@ -64,7 +69,8 @@
                         <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate"/>
                     </div>
                     <div class="w-64 ml-3">
-                        <el-input v-model="searchForm.queryValue" placeholder="请输入名称关键词检索" clearable @keyup="keyUpEvent"/>
+                        <el-input v-model="searchForm.queryValue" clearable placeholder="请输入名称关键词检索"
+                                  @keyup="keyUpEvent"/>
                     </div>
                     <div class="ml-2">
                         <el-button type="primary" @click="searchClick">
@@ -73,28 +79,35 @@
                         </el-button>
                     </div>
                 </template>
-                <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" isCheck @selection-change="tableSelectionChange">
+                <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading"
+                         isCheck @selection-change="tableSelectionChange">
                     <template #name="{row}">
-                        <span class="text-link" @click="tableRowName(row)">{{row?.name}}</span>
+                        <span class="text-link" @click="tableRowName(row)">{{ row?.name }}</span>
                     </template>
                     <template #waitingUserList="{row}">
                         <template v-for="item in row['waitingUserList']">
-                            <el-tag :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`"
-                                    class="mx-1" effect="dark" v-if="item['waitingUserName']">{{item['waitingUserName']}}</el-tag>
+                            <el-tag
+                                v-if="item['waitingUserName']"
+                                :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`"
+                                class="mx-1" effect="dark">{{ item['waitingUserName'] }}
+                            </el-tag>
                         </template>
                     </template>
                     <template #taskStatusStr="{row}">
-                        <el-tag :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`"
-                                class="mx-1" effect="dark" v-if="row['taskStatusStr']">{{row['taskStatusStr']}}</el-tag>
+                        <el-tag
+                            v-if="row['taskStatusStr']"
+                            :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`"
+                            class="mx-1" effect="dark">{{ row['taskStatusStr'] }}
+                        </el-tag>
                     </template>
                 </HcTable>
                 <template #action>
                     <div class="lr-dialog-footer">
                         <div class="left">
                             <span class="text-success">任务人中:</span>
-                            <el-tag type="success" class="mx-1" effect="dark">已签字</el-tag>
-                            <el-tag type="warning" class="mx-1" effect="dark">已废除</el-tag>
-                            <el-tag type="danger" class="mx-1" effect="dark">签字异常</el-tag>
+                            <el-tag class="mx-1" effect="dark" type="success">已签字</el-tag>
+                            <el-tag class="mx-1" effect="dark" type="warning">已废除</el-tag>
+                            <el-tag class="mx-1" effect="dark" type="danger">签字异常</el-tag>
                         </div>
                         <div class="right">
                             <HcPages :pages="searchForm" @change="pageChange"/>
@@ -105,56 +118,64 @@
         </div>
 
         <!--上报首件-->
-        <HcDrawer :show="isFirstReportDrawer" :isCard="false" uis="hc-first-item-node-layout" to-id="first-item-node-layout-target" @close="FirstReportDrawerClose">
+        <HcDrawer :isCard="false" :show="isFirstReportDrawer" to-id="first-item-node-layout-target"
+                  uis="hc-first-item-node-layout" @close="FirstReportDrawerClose">
             <div class="node-content">
                 <div class="node-form">
-                    <el-scrollbar v-if="contractId && isTableForm" ref="ListItemScrollRef" >
+                    <el-scrollbar v-if="contractId && isTableForm" ref="ListItemScrollRef">
                         <!-- <div class="hc-excel-table-form-view" :id="`table-form-${contractId}`"></div> -->
-                         <ListItem ref="ListItemsRef"
-                            :datas="ListItemDatas" 
-                            :status="NodeStatus" 
-                            :classify="authBtnTabKey"
-                            @offsetTop="ListItemOffsetTop" 
-                            :projectInfo="projectInfo" 
-                            :treeItem="treeItem"
-                            :contractId="contractId" 
-                            @renew="renewtable"
-                            :drawType="isDrawType"
-                            :tableFileData="tableFileData"
-                            :finishFile="finishFile"
-                            />
+                        <ListItem ref="ListItemsRef"
+                                  :classify="authBtnTabKey"
+                                  :contractId="contractId"
+                                  :datas="ListItemDatas"
+                                  :drawType="isDrawType"
+                                  :finishFile="finishFile"
+                                  :projectInfo="projectInfo"
+                                  :status="NodeStatus"
+                                  :tableFileData="tableFileData"
+                                  :treeItem="treeItem"
+                                  @offsetTop="ListItemOffsetTop"
+                                  @renew="renewtable"
+                        />
                     </el-scrollbar>
-                    <HcStatus :desc="statusDesc" v-else/>
+                    <HcStatus v-else :desc="statusDesc"/>
                 </div>
                 <div class="node-file">
                     <div class="title">上传总结报告1111</div>
-                    <div class="node-upload-box" v-if="contractId && isTableForm">
+                    <div v-if="contractId && isTableForm" class="node-upload-box">
                         <HcUpload :fileList="fileListData" :pkeyId="pkeyIds" @finish='uploadChange'/>
                     </div>
-                    <div class="node-upload-box" v-else>
-                        <el-alert title="表单异常,暂时无法使用上传" type="warning" show-icon :closable="false"/>
+                    <div v-else class="node-upload-box">
+                        <el-alert :closable="false" show-icon title="表单异常,暂时无法使用上传" type="warning"/>
                     </div>
-                    <el-divider border-style="dashed" />
+                    <el-divider border-style="dashed"/>
                     <div class="title">文件附件</div>
                     <div class="hc-table-node-file-box">
                         <HcTable :column="tableFileColumn" :datas="tableFileData" :isIndex="false">
                             <template #action="{row,index}">
-                                <el-button type="danger" plain size="small" @click="tableDelButton(index)">删除</el-button>
+                                <el-button plain size="small" type="danger" @click="tableDelButton(index)">删除
+                                </el-button>
                             </template>
                         </HcTable>
                     </div>
                 </div>
             </div>
             <div class="node-action">
-                <el-button type="primary" hc-btn :disabled="!contractId || !isTableForm||NodeStatus === '3'" :loading="tableFormSaveLoading" @click="saveBussData">
+                <el-button :disabled="!contractId || !isTableForm||NodeStatus === '3'" :loading="tableFormSaveLoading"
+                           hc-btn
+                           type="primary" @click="saveBussData">
                     <HcIcon name="save"/>
                     <span>保存</span>
                 </el-button>
-                <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '1'" @click="bussPdfInfo">
+                <el-button :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '1'" hc-btn
+                           @click="bussPdfInfo">
                     <HcIcon name="eye"/>
                     <span>预览</span>
                 </el-button>
-                <el-button hc-btn :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '3' || NodeStatus === '1'" :loading="reportLoading" @click="reportModalClick(2)">
+                <el-button
+                    :disabled="!contractId || !isTableForm || !tableFormId||NodeStatus === '3' || NodeStatus === '1'"
+                    :loading="reportLoading"
+                    hc-btn @click="reportModalClick(2)">
                     <HcIcon name="send-plane-2"/>
                     <span>上报</span>
                 </el-button>
@@ -167,19 +188,19 @@
 
         <!--上报审批-->
         <HcReportModal
-            title="上报审批"
-            url="informationWriteQuery/batchTask"
-            :show="showReportModal"
-            :projectId="projectId"
             :contractId="contractId"
-            type="first"
-            :typeData="reportTypeData"
-            :taskName="reportTaskName"
+            :datas="reportDatas"
             :ids="reportIds"
             :isDatas="isReportModalDatas"
-            :datas="reportDatas"
-            @hide="showReportModal = false"
+            :projectId="projectId"
+            :show="showReportModal"
+            :taskName="reportTaskName"
+            :typeData="reportTypeData"
+            title="上报审批"
+            type="first"
+            url="informationWriteQuery/batchTask"
             @finish="showReportFinish"
+            @hide="showReportModal = false"
             @tagClose="reportTaskTagClose"
         />
     </div>
@@ -192,11 +213,11 @@ import {useRouter, useRoute} from 'vue-router'
 import WbsTree from "./components/WbsTree.vue"
 import HcUpload from "./components/HcUpload.vue"
 import HTableForm from "~src/plugins/HTableForm"
-import {getReportNumber,eVisaTaskCheckApi} from "~api/other";
+import {getReportNumber, eVisaTaskCheckApi} from "~api/other";
 import firstApi from '~api/other/first-item';
 import tasksApi from '~api/tasks/data';
-import {getStoreData, setStoreData} from '~src/utils/storage'
-import {getArrValue, isString, getObjValue, getObjNullValue,deepClone} from "vue-utils-plus"
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
+import {getArrValue, isString, getObjValue, getObjNullValue, deepClone} from "vue-utils-plus"
 import queryApi from "~api/data-fill/query";
 import wbsApi from "~api/data-fill/wbs";
 import ListItem from "./components/ListItem.vue"
@@ -223,13 +244,13 @@ watch(() => [
 
 
 //自动展开缓存
-const TreeAutoExpandKeys = ref(getStoreData('firstItemTreeKeys') || [])
+const TreeAutoExpandKeys = ref(getStoreValue('firstItemTreeKeys') || [])
 
 //类型tab数据和相关处理
 const tabTypeKey = ref(typeName)
 const tabTypeTab = ref([
-    {key:'mark',  name: '已标记为首件'},
-    {key:'query', name: '首件查询'}
+    {key: 'mark', name: '已标记为首件'},
+    {key: 'query', name: '首件查询'}
 ]);
 
 const tabTypeChange = (item) => {
@@ -250,9 +271,9 @@ const tabTypeChange = (item) => {
 onMounted(() => {
     firstTaskStatus()
 })
-const renewtable=()=>{
-     getTableData()
-     queryNodeStatus()
+const renewtable = () => {
+    getTableData()
+    queryNodeStatus()
 }
 //项目树被点击
 const treeItem = ref({})
@@ -262,7 +283,7 @@ const nodeWbsElTreeClick = ({data, keys}) => {
     searchForm.value.wbsId = data['primaryKeyId']
     //缓存自动展开
     TreeAutoExpandKeys.value = keys
-    setStoreData('firstItemTreeKeys', keys)
+    setStoreValue('firstItemTreeKeys', keys)
     //获取相关数据
     getReportNumberByContractId(data['contractIdRelation'])
     searchClick()
@@ -271,7 +292,7 @@ const nodeWbsElTreeClick = ({data, keys}) => {
 //获取流程状态
 const processStatus = ref([])
 const firstTaskStatus = async () => {
-    const { data } = await tasksApi.queryTaskTypeStatus({
+    const {data} = await tasksApi.queryTaskTypeStatus({
         typeOrStatus: 'first_task_status'
     })
     //处理数据
@@ -279,17 +300,17 @@ const firstTaskStatus = async () => {
 }
 //查询状态
 const NodeStatus = ref('1')
- const { contractType } = contractInfo.value;
-const authBtnTabKey = ref(contractType===2?'2':'1')
+const {contractType} = contractInfo.value;
+const authBtnTabKey = ref(contractType === 2 ? '2' : '1')
 const queryNodeStatus = async () => {
     const info = treeItem.value;
-    console.log(info,'info')
+    console.log(info, 'info')
     const {error, code, data} = await wbsApi.queryNodeStatus({
         // primaryKeyId: info['contractIdRelation'] ? info['id'] : info['primaryKeyId'],
         // classify: 1
-       primaryKeyId: authBtnTabKey.value==1 ? info['id'] : info['primaryKeyId'],
+        primaryKeyId: authBtnTabKey.value == 1 ? info['id'] : info['primaryKeyId'],
         classify: authBtnTabKey.value
-        
+
     })
     //1 未填报,2待上报,3已上报
     if (!error && code === 200) {
@@ -301,11 +322,11 @@ const queryNodeStatus = async () => {
 //获取上报批次
 const reportBatch = ref([])
 const getReportNumberByContractId = async (cid) => {
-    const { data } = await getReportNumber({
+    const {data} = await getReportNumber({
         contractId: contractId.value,
-        projectId:projectId.value,
+        projectId: projectId.value,
         contractIdRelation: cid ?? '',
-        firstTitle: tabTypeKey.value === 'query' ? 1: null
+        firstTitle: tabTypeKey.value === 'query' ? 1 : null
     })
     //处理数据
     reportBatch.value = getArrValue(data)
@@ -319,7 +340,7 @@ const searchForm = ref({
 
 //日期时间被选择
 const betweenTime = ref(null)
-const betweenTimeUpdate = ({query,arr}) => {
+const betweenTimeUpdate = ({query, arr}) => {
     betweenTime.value = arr
     searchForm.value.betweenTime = query
 }
@@ -350,11 +371,11 @@ const pageChange = ({current, size}) => {
 
 //表格表头
 const tableListColumn = ref([
-    {key:'name', name: '文件名称'},
-    {key:'waitingUserList', name: '任务人'},
-    {key:'startTime', name: '开始时间', width: 180},
-    {key:'taskStatusStr', name: '流程状态', width: 140},
-    {key:'reportNumber', name: '上报批次', width: 120},
+    {key: 'name', name: '文件名称'},
+    {key: 'waitingUserList', name: '任务人'},
+    {key: 'startTime', name: '开始时间', width: 180},
+    {key: 'taskStatusStr', name: '流程状态', width: 140},
+    {key: 'reportNumber', name: '上报批次', width: 120},
 ])
 
 //获取表格数据
@@ -402,7 +423,7 @@ const getTableData = async () => {
         }
         addFormData['wbsId'] = treeInfo['contractIdRelation'] ? treeInfo['id'] : treeInfo['primaryKeyId']
         //处理数据
-        const { error, code, data } = await firstApi.getQueryPageData({
+        const {error, code, data} = await firstApi.getQueryPageData({
             ...addFormData,
             ...searchInfo,
         })
@@ -425,7 +446,7 @@ const tableListRef = ref(null)
 const tableSelectionKeys = ref([]);
 const tableSelectionChange = (rows) => {
     tableSelectionKeys.value = rows.filter((item) => {
-        return (item??'') !== '';
+        return (item ?? '') !== '';
     })
 }
 
@@ -436,9 +457,9 @@ const tableRowName = (row) => {
         //首件查询时,直接调用接口
         getBussPdfInfo(row.id + '')
     } else if (row['evisaPdfUrl']) {
-        window.open(row['evisaPdfUrl'],'_blank')
+        window.open(row['evisaPdfUrl'], '_blank')
     } else if (row['pdfUrl']) {
-        window.open(row['pdfUrl'],'_blank')
+        window.open(row['pdfUrl'], '_blank')
     } else {
         window.$message?.warning('文件不存在')
     }
@@ -446,21 +467,21 @@ const tableRowName = (row) => {
 const ListItemDatas = ref([]);
 //上报首件
 const isFirstReportDrawer = ref(false)
-const isCanreport=ref(false)
+const isCanreport = ref(false)
 const firstReportClick = () => {
     const rows = deepClone(tableSelectionKeys.value)
-    console.log(rows,'rows')
-    nextTick(()=>{
-      ListItemDatas.value=rows
+    console.log(rows, 'rows')
+    nextTick(() => {
+        ListItemDatas.value = rows
 
     })
-      console.log( ListItemDatas.value,' ListItemDatas.value')
+    console.log(ListItemDatas.value, ' ListItemDatas.value')
     //判断是否满足条件
-    const result = rows.every(({status})=> {
+    const result = rows.every(({status}) => {
         return status === 2
         // return status === 0 || status === 3
     })
-    isCanreport.value=result
+    isCanreport.value = result
     //判断状态
     // if (result) {
     //     isFirstReportDrawer.value = true
@@ -471,11 +492,11 @@ const firstReportClick = () => {
     //     tableFileData.value = []
     //     window.$message?.warning('已上报的文件不能进行再次上报,若要重新上报,要先撤回之前的上报,再重新上报')
     // }
-        isFirstReportDrawer.value = true
-        // getTableData()
-        queryNodeStatus()
-        tableFileData.value = rows
-        getFirstExcelHtml()
+    isFirstReportDrawer.value = true
+    // getTableData()
+    queryNodeStatus()
+    tableFileData.value = rows
+    getFirstExcelHtml()
 }
 const FirstReportDrawerClose = () => {
     isFirstReportDrawer.value = false
@@ -487,7 +508,7 @@ const isTableForm = ref(false)
 const pkeyIds = ref('')
 const getFirstExcelHtml = async () => {
     const cid = contractId.value;
-    const { error, code, data } = await firstApi.getFirstExcelHtml({
+    const {error, code, data} = await firstApi.getFirstExcelHtml({
         contractId: contractId.value || ''
     }, false)
     //处理数据
@@ -531,7 +552,7 @@ const setHTableForm = (resData, cid) => {
 const tableFormData = ref({})
 const getFirstBussDataInfo = async (pkeyId) => {
     if (pkeyId) {
-        const { data } = await firstApi.getFirstBussDataInfo({
+        const {data} = await firstApi.getFirstBussDataInfo({
             contractId: contractId.value || '',
             firstId: pkeyId + ''
         }, false)
@@ -571,8 +592,8 @@ const uploadChange = async ({type, res}) => {
 
 //文件附件列表
 const tableFileColumn = ref([
-    {key:'name', name: '文件名称'},
-    {key:'action', name: '操作', width: 80, align: 'center'}
+    {key: 'name', name: '文件名称'},
+    {key: 'action', name: '操作', width: 80, align: 'center'}
 ]);
 const tableFileData = ref([]);
 const tableDelButton = (index) => {
@@ -595,20 +616,19 @@ const tableDelButton = (index) => {
 }
 
 //填报数据保存
-const pdfId=ref('')
+const pdfId = ref('')
 const saveBussData = async () => {
     console.log('保存');
-    const { id } = treeItem.value
+    const {id} = treeItem.value
     const res = await saveExcelBussData(id + '')
     //刷新页面
     //  window?.location?.reload()  //刷新页面
     if (res) {
-        pdfId.value=res
-         queryNodeStatus()
+        pdfId.value = res
+        queryNodeStatus()
         await getBussPdfInfo(res)
-         
-          
-       
+
+
     }
 }
 
@@ -617,10 +637,10 @@ const tableFormSaveLoading = ref(false)
 const tableFormId = ref('')
 const saveExcelBussData = async (pkeyId) => {
     tableFormId.value = ''
-    const { primaryKeyId } = treeItem.value
+    const {primaryKeyId} = treeItem.value
     tableFormSaveLoading.value = true
     const linkIds = rowsToArr(tableFileData.value);
-    const { error, code, data } = await firstApi.saveBussData({
+    const {error, code, data} = await firstApi.saveBussData({
         ...tableFormData.value,
         projectId: projectId.value,
         contractId: contractId.value,
@@ -646,21 +666,21 @@ const saveExcelBussData = async (pkeyId) => {
 
 //pdf预览
 const bussPdfInfo = () => {
-    const { id } = treeItem.value
+    const {id} = treeItem.value
     // getBussPdfInfo(id + '')
-     getBussPdfInfo(pdfId.value)
-      
+    getBussPdfInfo(pdfId.value)
+
 }
 
 //预览PDF请求
 const getBussPdfInfo = async (pkeyId) => {
-    const { error, code, data } = await firstApi.getFirstBussPdfInfo({
+    const {error, code, data} = await firstApi.getFirstBussPdfInfo({
         firstId: pkeyId
     })
     //判断状态
-    const res = isString(data)? data ?? '': ''
+    const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res,'_blank')
+        window.open(res, '_blank')
     }
 }
 
@@ -673,109 +693,106 @@ const reportLoading = ref(false)
 const reportTypeData = ref('')
 const reportDatas = ref([])
 const isReportModalDatas = ref(false)
-const iscanReport=ref(false)
+const iscanReport = ref(false)
 //上报方法封装
 const toreportModalClick = async (type) => {
-    if(type){
-            const { primaryKeyId, contractIdRelation } = treeItem.value
-            let rows = [];
-            //处理获取流程的条件
-            if (tabTypeKey.value === 'mark') {
-                reportTypeData.value = tableFormId.value
-                isReportModalDatas.value = false
-                rows = tableFileData.value
-            } else {
-                isReportModalDatas.value = true
-                rows = tableSelectionKeys.value
-            }
-            if (rows.length > 0) {
-                reportLoading.value = true
-                const taskCheck = await eVisaTaskCheckApi({
-                    projectId: projectId.value,
-                    contractId: contractId.value
-                })
-                if (taskCheck) {
-                    if (tabTypeKey.value === 'mark') {
-                        reportIds.value = tableFormId.value
-                        const { data } = await firstApi.queryFirstDocumentTitle({
-                            projectId: projectId.value,
-                            contractId: contractId.value,
-                            queryId: tableFormId.value
-                        })
-                        reportTaskName.value = isString(data) ? data ?? '' : ''
-                    } else {
-                        reportIds.value = rowsToId(rows)
-                        //设置任务数据
-                        let reportDataArr = []
-                        rows.forEach(item => {
-                            reportDataArr.push({
-                                id: item?.id,
-                                name: item?.name
-                            })
-                        })
-                        reportDatas.value = reportDataArr
-                        //其他数据
-                        reportTypeData.value = rows[0]['id']
-                        reportTaskName.value = rows.length > 1?`${rows[0].name}等${rows.length}个文件`:rows[0].name
-                    }
-                    reportLoading.value = false
-                    //附加数据
-                    reportAddition.value = {
-                        classify: 1,
-                        isFirst: 1,
-                        primaryKeyId: primaryKeyId,
-                        contractIdRelation: contractIdRelation ?? contractId.value,
-                    }
-                    showReportModal.value = true
+    if (type) {
+        const {primaryKeyId, contractIdRelation} = treeItem.value
+        let rows = [];
+        //处理获取流程的条件
+        if (tabTypeKey.value === 'mark') {
+            reportTypeData.value = tableFormId.value
+            isReportModalDatas.value = false
+            rows = tableFileData.value
+        } else {
+            isReportModalDatas.value = true
+            rows = tableSelectionKeys.value
+        }
+        if (rows.length > 0) {
+            reportLoading.value = true
+            const taskCheck = await eVisaTaskCheckApi({
+                projectId: projectId.value,
+                contractId: contractId.value
+            })
+            if (taskCheck) {
+                if (tabTypeKey.value === 'mark') {
+                    reportIds.value = tableFormId.value
+                    const {data} = await firstApi.queryFirstDocumentTitle({
+                        projectId: projectId.value,
+                        contractId: contractId.value,
+                        queryId: tableFormId.value
+                    })
+                    reportTaskName.value = isString(data) ? data ?? '' : ''
                 } else {
-                    reportLoading.value = false
+                    reportIds.value = rowsToId(rows)
+                    //设置任务数据
+                    let reportDataArr = []
+                    rows.forEach(item => {
+                        reportDataArr.push({
+                            id: item?.id,
+                            name: item?.name
+                        })
+                    })
+                    reportDatas.value = reportDataArr
+                    //其他数据
+                    reportTypeData.value = rows[0]['id']
+                    reportTaskName.value = rows.length > 1 ? `${rows[0].name}等${rows.length}个文件` : rows[0].name
                 }
+                reportLoading.value = false
+                //附加数据
+                reportAddition.value = {
+                    classify: 1,
+                    isFirst: 1,
+                    primaryKeyId: primaryKeyId,
+                    contractIdRelation: contractIdRelation ?? contractId.value,
+                }
+                showReportModal.value = true
             } else {
-                window.$message?.warning('暂无相关数据')
+                reportLoading.value = false
             }
-        }else{
-             window.$message?.warning('当前工序资料还未审批,待审批完成才能进行首件模板上报')
-            
+        } else {
+            window.$message?.warning('暂无相关数据')
         }
+    } else {
+        window.$message?.warning('当前工序资料还未审批,待审批完成才能进行首件模板上报')
+
+    }
 }
 const reportModalClick = async (type) => {
-    if(type===2){
-         console.log('上报')
-        iscanReport.value=isCanreport.value;
+    if (type === 2) {
+        console.log('上报')
+        iscanReport.value = isCanreport.value;
         toreportModalClick(iscanReport.value)
 
-    }
-    
-    else{
-         const rows = deepClone(tableSelectionKeys.value)
-         let result=false
-            console.log('上报审批',rows)
+    } else {
+        const rows = deepClone(tableSelectionKeys.value)
+        let result = false
+        console.log('上报审批', rows)
         //判断自身是否满足条件
-         const result1 = rows.every(({taskStatusStr})=> {
-            return taskStatusStr === '未上报'||taskStatusStr === '已废除'
+        const result1 = rows.every(({taskStatusStr}) => {
+            return taskStatusStr === '未上报' || taskStatusStr === '已废除'
         })
-        if(result1){
-             //判断工序节点是否满足条件
-             result = rows.every(({isApprove})=> {
+        if (result1) {
+            //判断工序节点是否满足条件
+            result = rows.every(({isApprove}) => {
                 return isApprove === true
             })
-             iscanReport.value=result
-              toreportModalClick(iscanReport.value)
-        }else{
-              window.$message?.warning('已上报的数据不能重复上报')
-               iscanReport.value=false
+            iscanReport.value = result
+            toreportModalClick(iscanReport.value)
+        } else {
+            window.$message?.warning('已上报的数据不能重复上报')
+            iscanReport.value = false
         }
-       
-        
-         
+
+
     }
-   
+
 }
 
 //上报的审批内容移除
 const reportTaskTagClose = (index) => {
     const row = tableSelectionKeys.value[index];
-    tableListRef.value?.toggleRowSelection(row,false)
+    tableListRef.value?.toggleRowSelection(row, false)
 }
 const getTableDataAll = () => {
     getTableData()
@@ -794,15 +811,15 @@ const batchPrint = async () => {
     const ids = rowsToId(rows)
     //批量下载
     printLoading.value = true
-    const { error, code, data } = await firstApi.batchPrint({
+    const {error, code, data} = await firstApi.batchPrint({
         ids: ids
     })
     //处理数据
     printLoading.value = false
     //判断状态
-    const res = isString(data)? data ?? '': ''
+    const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res,'_blank')
+        window.open(res, '_blank')
     }
 }
 
@@ -810,7 +827,7 @@ const batchPrint = async () => {
 const batchAbolishClick = () => {
     const rows = tableSelectionKeys.value;
     //判断是否满足条件
-    const result = rows.every(({status})=> {
+    const result = rows.every(({status}) => {
         return status !== 0 && status !== 3
     })
     //判断状态
@@ -833,7 +850,7 @@ const batchAbolishClick = () => {
 }
 //废除勾选的已上报文件
 const batchAbolishSave = async (ids) => {
-    const { error, code } = await queryApi.batchAbolish({ids: ids})
+    const {error, code} = await queryApi.batchAbolish({ids: ids})
     //处理数据
     if (!error && code === 200) {
         window.$message?.success('批量废除成功')
@@ -867,7 +884,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         const diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }

+ 13 - 12
src/views/schedule/write.vue

@@ -1,24 +1,25 @@
 <template>
     <div class="hc-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
+        <div :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :projectId="projectId" :contractId="contractId" @nodeTap="wbsElTreeClick" :classifyType="classifyType"/>
+                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :classifyType="classifyType" :contractId="contractId"
+                             :projectId="projectId" @nodeTap="wbsElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
             <div class="horizontal-drag-line" @mousedown="onmousedown"/>
         </div>
-        <div class="hc-chart-content-box" v-loading="isLoading">
+        <div v-loading="isLoading" class="hc-chart-content-box">
             <BarChart ref="barChartRef" :datas="barChartDatas"/>
         </div>
     </div>
@@ -28,7 +29,7 @@
 import {ref, watch} from 'vue'
 import {useAppStore} from "~src/store";
 import WbsTree from "../data-fill/components/WbsTree.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import BarChart from "./components/echarts/BarChart.vue"
 import DataApi from "~api/schedule/data"
 import {getArrValue} from "vue-utils-plus"
@@ -51,7 +52,7 @@ watch(() => [
 })
 
 //自动展开缓存
-const treeAutoExpandKeys = ref(getStoreData('scheduleTreeKeys') || [])
+const treeAutoExpandKeys = ref(getStoreValue('scheduleTreeKeys') || [])
 const barChartRef = ref(null)
 
 //树被点击
@@ -60,7 +61,7 @@ const wbsElTreeClick = ({data, keys}) => {
     treeItemInfo.value = data
     //缓存自动展开
     treeAutoExpandKeys.value = keys
-    setStoreData('scheduleTreeKeys',keys)
+    setStoreValue('scheduleTreeKeys', keys)
     //获取数据
     queryNeiWaiYeProgress()
 }
@@ -71,9 +72,9 @@ const barChartDatas = ref([])
 const queryNeiWaiYeProgress = async () => {
     //获取数据
     isLoading.value = true
-    const { primaryKeyId, contractIdRelation } = treeItemInfo.value
-    const { error, code, data } = await DataApi.queryNeiWaiYeProgress({
-        projectId:projectId.value,
+    const {primaryKeyId, contractIdRelation} = treeItemInfo.value
+    const {error, code, data} = await DataApi.queryNeiWaiYeProgress({
+        projectId: projectId.value,
         contractId: contractIdRelation ? contractIdRelation : contractId.value,
         contractIdRelation,
         primaryKeyId,
@@ -93,7 +94,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         const diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }

+ 45 - 40
src/views/tentative/collect/test.vue

@@ -1,18 +1,19 @@
 <template>
     <div class="hc-page-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
+        <div :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :projectId="projectId" :contractId="contractId" isColor @nodeTap="wbsElTreeClick" :classifyType="classifyType"/>
+                    <WbsTree :autoExpandKeys="treeAutoExpandKeys" :classifyType="classifyType" :contractId="contractId"
+                             :projectId="projectId" isColor @nodeTap="wbsElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
@@ -42,18 +43,21 @@
                 </template>
                 <template #search>
                     <div class="w-auto">
-                        <el-select v-model="searchForm.contractId" placeholder="请选择合同段" clearable block>
-                            <el-option v-for="item in projectInfo?.contractInfoList" :key="item.id" :label="item['name']" :value="item['id']"/>
+                        <el-select v-model="searchForm.contractId" block clearable placeholder="请选择合同段">
+                            <el-option v-for="item in projectInfo?.contractInfoList" :key="item.id"
+                                       :label="item['name']" :value="item['id']"/>
                         </el-select>
                     </div>
                     <div class="w-32 ml-2">
-                        <el-select v-model="searchForm.type" placeholder="检测类别" clearable block>
-                            <el-option v-for="item in typeData" :key="item.value" :label="item['label']" :value="item['value']"/>
+                        <el-select v-model="searchForm.type" block clearable placeholder="检测类别">
+                            <el-option v-for="item in typeData" :key="item.value" :label="item['label']"
+                                       :value="item['value']"/>
                         </el-select>
                     </div>
                     <div class="w-32 ml-2">
-                        <el-select v-model="searchForm.approval" placeholder="审批状态" clearable block>
-                            <el-option v-for="item in approvalData" :key="item.value" :label="item['label']" :value="item['value']"/>
+                        <el-select v-model="searchForm.approval" block clearable placeholder="审批状态">
+                            <el-option v-for="item in approvalData" :key="item.value" :label="item['label']"
+                                       :value="item['value']"/>
                         </el-select>
                     </div>
                     <div class="w-64 ml-2">
@@ -66,7 +70,8 @@
                         </el-button>
                     </div>
                 </template>
-                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection"/>
+                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck
+                         @selection-change="tableSelection"/>
                 <template #action>
                     <HcPages :pages="searchForm" @change="pageChange"/>
                 </template>
@@ -80,7 +85,7 @@
 import {ref, watch, onMounted} from "vue";
 import {useAppStore} from "~src/store";
 import WbsTree from "../../data-fill/components/WbsTree.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 
 //变量
 const useAppState = useAppStore()
@@ -89,8 +94,8 @@ const contractId = ref(useAppState.getContractId);
 const projectInfo = ref(useAppState.getProjectInfo);
 const isCollapse = ref(useAppState.getCollapse)
 const contractInfo = ref(useAppState.getContractInfo);
-const { contractType } = contractInfo.value;
-const classifyType  = ref(contractType === 2 ? '2' : '1')
+const {contractType} = contractInfo.value;
+const classifyType = ref(contractType === 2 ? '2' : '1')
 //监听
 watch(() => [
     useAppState.getCollapse
@@ -99,7 +104,7 @@ watch(() => [
 })
 
 //自动展开缓存
-const treeAutoExpandKeys = ref(getStoreData('wbsTreeExpandKeys') || [])
+const treeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
 
 //渲染完成
 onMounted(() => {
@@ -124,7 +129,7 @@ const wbsElTreeClick = ({node, data, keys}) => {
     primaryKeyId.value = data['primaryKeyId'] || ''
     //缓存自动展开
     treeAutoExpandKeys.value = keys
-    setStoreData('wbsTreeExpandKeys',keys)
+    setStoreValue('wbsTreeExpandKeys', keys)
     //改变搜索表单数据
     //searchForm.value.wbsId = data['contractIdRelation'] ? data['id'] : data['primaryKeyId']
     //searchForm.value.contractIdRelation = data['contractIdRelation']
@@ -150,7 +155,7 @@ const approvalData = ref([
 
 //日期时间被选择
 const betweenTime = ref(null)
-const betweenTimeUpdate = ({arr,query}) => {
+const betweenTimeUpdate = ({arr, query}) => {
     betweenTime.value = arr
     searchForm.value.betweenTime = query
 }
@@ -171,27 +176,27 @@ const pageChange = ({current, size}) => {
 //表格数据
 const tableRef = ref(null)
 const tableColumn = ref([
-    {key:'key1', name: '报告编号'},
-    {key:'key2', name: '工程部位'},
-    {key:'key3', name: '试验日期'},
-    {key:'key4', name: '样品编号'},
-    {key:'key5', name: '生产厂家'},
-    {key:'key6', name: '规格型号'},
-    {key:'key7', name: '代表数量'},
-    {key:'key8', name: '密度(开kg/m3)'},
-    {key:'key9', name: '比表面积(m2/kg)'},
-    {key:'key10', name: '细度(%)'},
-    {key:'key11', name: '标准稠度用水量(%)'},
-    {key:'key12', name: '初凝结时间(min)'},
-    {key:'key13', name: '终凝结时间(min)'},
-    {key:'key14', name: '安定性霍氏夹法'},
-    {key:'key15', name: '抗折3D胶砂强度(Mpa)'},
-    {key:'key16', name: '抗折28D胶砂强度(Mpa)'},
-    {key:'key17', name: '抗压3D胶砂强度(Mpa)'},
-    {key:'key18', name: '抗压28D胶砂强度(Mpa)'},
-    {key:'key19', name: '试验结果'},
-    {key:'key20', name: '检测类型'},
-    {key:'key21', name: '检测人'},
+    {key: 'key1', name: '报告编号'},
+    {key: 'key2', name: '工程部位'},
+    {key: 'key3', name: '试验日期'},
+    {key: 'key4', name: '样品编号'},
+    {key: 'key5', name: '生产厂家'},
+    {key: 'key6', name: '规格型号'},
+    {key: 'key7', name: '代表数量'},
+    {key: 'key8', name: '密度(开kg/m3)'},
+    {key: 'key9', name: '比表面积(m2/kg)'},
+    {key: 'key10', name: '细度(%)'},
+    {key: 'key11', name: '标准稠度用水量(%)'},
+    {key: 'key12', name: '初凝结时间(min)'},
+    {key: 'key13', name: '终凝结时间(min)'},
+    {key: 'key14', name: '安定性霍氏夹法'},
+    {key: 'key15', name: '抗折3D胶砂强度(Mpa)'},
+    {key: 'key16', name: '抗折28D胶砂强度(Mpa)'},
+    {key: 'key17', name: '抗压3D胶砂强度(Mpa)'},
+    {key: 'key18', name: '抗压28D胶砂强度(Mpa)'},
+    {key: 'key19', name: '试验结果'},
+    {key: 'key20', name: '检测类型'},
+    {key: 'key21', name: '检测人'},
 ])
 
 //获取数据
@@ -205,7 +210,7 @@ const getTableData = async () => {
 const tableCheckedKeys = ref([]);
 const tableSelection = (rows) => {
     tableCheckedKeys.value = rows.filter((item) => {
-        return (item??'') !== '';
+        return (item ?? '') !== '';
     })
 }
 
@@ -237,7 +242,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         let diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }

+ 118 - 94
src/views/tentative/detect/outside.vue

@@ -1,18 +1,19 @@
 <template>
     <div class="hc-page-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
+        <div :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <HcTreeData :autoExpandKeys="thirdTreeKeys" :projectId="projectId" :contractId="contractId" type="rightTree" @nodeTap="wbsElTreeClick"  @menuTap="menuTapClick"/>
+                    <HcTreeData :autoExpandKeys="thirdTreeKeys" :contractId="contractId" :projectId="projectId"
+                                type="rightTree" @menuTap="menuTapClick" @nodeTap="wbsElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
@@ -22,25 +23,26 @@
             <HcCard :scrollbar="false" actionSize="lg">
                 <template #header>
                     <HcTooltip keys="tentative_detect_third_add">
-                        <el-button type="primary" hc-btn :disabled="!thirdTreeKeys" @click="addFormModalClick">
+                        <el-button :disabled="!thirdTreeKeys" hc-btn type="primary" @click="addFormModalClick">
                             <HcIcon name="add-circle"/>
                             <span>新增</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_third_edit">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="editFormModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="editFormModalClick">
                             <HcIcon name="edit"/>
                             <span>编辑</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_third_copy">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="copyLoading" @click="copyTableModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="copyLoading" hc-btn
+                                   @click="copyTableModalClick">
                             <HcIcon name="file-copy-2"/>
                             <span>复制</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_third_del">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="delModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="delModalClick">
                             <HcIcon name="delete-bin-2"/>
                             <span>删除</span>
                         </el-button>
@@ -48,18 +50,20 @@
                 </template>
                 <template #search>
                     <div class="w-40">
-                        <el-input v-model="searchForm.queryName" placeholder="送样人员" clearable/>
+                        <el-input v-model="searchForm.queryName" clearable placeholder="送样人员"/>
                     </div>
                     <div class="w-40 ml-2">
-                        <el-select v-model="searchForm.queryStatus" placeholder="请选择是否合格" clearable>
-                            <el-option v-for="item in qualifiedData" :key="item.value" :label="item['label']" :value="item['value']"/>
+                        <el-select v-model="searchForm.queryStatus" clearable placeholder="请选择是否合格">
+                            <el-option v-for="item in qualifiedData" :key="item.value" :label="item['label']"
+                                       :value="item['value']"/>
                         </el-select>
                     </div>
                     <div class="w-64 ml-2">
                         <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate"/>
                     </div>
                     <div class="w-72 ml-2">
-                        <el-input v-model="searchForm.queryValue" placeholder="请输入报告编号、委托编号" clearable @keyup="keyUpEvent"/>
+                        <el-input v-model="searchForm.queryValue" clearable placeholder="请输入报告编号、委托编号"
+                                  @keyup="keyUpEvent"/>
                     </div>
                     <div class="ml-2">
                         <el-button type="primary" @click="searchClick">
@@ -68,7 +72,8 @@
                         </el-button>
                     </div>
                 </template>
-                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection"/>
+                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck
+                         @selection-change="tableSelection"/>
                 <template #action>
                     <HcPages :pages="searchForm" @change="pageChange"/>
                 </template>
@@ -76,15 +81,20 @@
         </div>
 
         <!--新增/编辑-->
-        <HcDialog :show="addEditFormModal" :title="formModalTitle + ' 第三方试验信息'" widths="70rem" isRowFooter :isClose="false" @close="addEditFormModalClose">
+        <HcDialog :isClose="false" :show="addEditFormModal" :title="formModalTitle + ' 第三方试验信息'" isRowFooter
+                  widths="70rem" @close="addEditFormModalClose">
             <template #extra>
                 <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange"/>
             </template>
-            <el-form ref="addEditFormRef" :model="addEditFormModel" :rules="addEditFormRules" label-width="auto" size="large" v-if="tabTypeKey === 'tab1'">
+            <el-form v-if="tabTypeKey === 'tab1'" ref="addEditFormRef" :model="addEditFormModel"
+                     :rules="addEditFormRules"
+                     label-width="auto" size="large">
                 <div class="hc-form-item">
                     <el-form-item label="合同段">
-                        <el-select v-model="addEditFormModel.contractId" block placeholder="请选择合同段"  popper-class="select-popper" :teleported="false">
-                            <el-option v-for="item in projectInfo?.contractInfoList" :key="item.id" :label="item['name']" :value="item['id']"/>
+                        <el-select v-model="addEditFormModel.contractId" :teleported="false" block
+                                   placeholder="请选择合同段" popper-class="select-popper">
+                            <el-option v-for="item in projectInfo?.contractInfoList" :key="item.id"
+                                       :label="item['name']" :value="item['id']"/>
                         </el-select>
                     </el-form-item>
                     <el-form-item label="合格状态">
@@ -112,7 +122,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="证书编号">
-                        <el-input v-model="addEditFormModel.testingAgencyCertificateNo" placeholder="检测机构资质证书编号"/>
+                        <el-input v-model="addEditFormModel.testingAgencyCertificateNo"
+                                  placeholder="检测机构资质证书编号"/>
                     </el-form-item>
                     <el-form-item label="样品数量">
                         <el-input v-model="addEditFormModel.materialCount"/>
@@ -136,7 +147,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="送样日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.sampleDeliveryDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.sampleDeliveryDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                     <el-form-item label="产地">
                         <el-input v-model="addEditFormModel.placeOfOrigin"/>
@@ -144,7 +156,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="取样日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.samplingDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.samplingDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                     <el-form-item label="取样地点">
                         <el-input v-model="addEditFormModel.samplingLocation"/>
@@ -152,7 +165,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="检测日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.testDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.testDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                     <el-form-item label="生产厂家">
                         <el-input v-model="addEditFormModel.manufacturer"/>
@@ -160,7 +174,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="报告日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.reportDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.reportDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                     <el-form-item label="生产批号">
                         <el-input v-model="addEditFormModel.batchNumber"/>
@@ -192,22 +207,28 @@
                     <FormItemUpload v-model="addEditFormModel.reportAttachmentUrl" :action="'upload-file2'"/>
                 </el-form-item>
             </el-form>
-            <el-form  :model="addEditFormModel"  :rules="addEditFormRules" label-position="top" label-width="auto" size="large" v-if="tabTypeKey === 'tab2'">
+            <el-form v-if="tabTypeKey === 'tab2'" :model="addEditFormModel" :rules="addEditFormRules"
+                     label-position="top"
+                     label-width="auto" size="large">
                 <el-form-item label="检测依据">
-                    <el-input v-model="addEditFormModel.testBasisText" type="textarea" placeholder="请输入检测依据" :autosize="{ minRows: 3}" show-word-limit  maxlength="1000"/>
+                    <el-input v-model="addEditFormModel.testBasisText" :autosize="{ minRows: 3}" maxlength="1000"
+                              placeholder="请输入检测依据" show-word-limit type="textarea"/>
                 </el-form-item>
                 <el-form-item label="评定标准">
-                    <el-input v-model="addEditFormModel.evaluationCriteriaText" type="textarea" placeholder="请输入评定标准" :autosize="{ minRows: 3}" show-word-limit  maxlength="1000"/>
+                    <el-input v-model="addEditFormModel.evaluationCriteriaText" :autosize="{ minRows: 3}"
+                              maxlength="1000" placeholder="请输入评定标准" show-word-limit type="textarea"/>
                 </el-form-item>
                 <el-form-item label="检测结论">
-                    <el-input v-model="addEditFormModel.testConclusionText" type="textarea" placeholder="请输入检测结论" :autosize="{ minRows: 3}" show-word-limit  maxlength="1000"/>
+                    <el-input v-model="addEditFormModel.testConclusionText" :autosize="{ minRows: 3}" maxlength="1000"
+                              placeholder="请输入检测结论" show-word-limit type="textarea"/>
                 </el-form-item>
                 <el-form-item label="备注">
-                    <el-input v-model="addEditFormModel.remarks" type="textarea" placeholder="请输入备注" :autosize="{ minRows: 3}" show-word-limit  maxlength="1000"/>
+                    <el-input v-model="addEditFormModel.remarks" :autosize="{ minRows: 3}" maxlength="1000"
+                              placeholder="请输入备注" show-word-limit type="textarea"/>
                 </el-form-item>
             </el-form>
             <template #leftRowFooter>
-                <el-button type="primary" hc-btn @click="linksSampleModalClick">
+                <el-button hc-btn type="primary" @click="linksSampleModalClick">
                     <HcIcon name="links"/>
                     <span>选择样品信息</span>
                 </el-button>
@@ -217,7 +238,7 @@
                     <HcIcon name="close"/>
                     <span>取消</span>
                 </el-button>
-                <el-button type="primary" hc-btn :loading="addEditFormLoading" @click="addEditFormClick">
+                <el-button :loading="addEditFormLoading" hc-btn type="primary" @click="addEditFormClick">
                     <HcIcon name="check"/>
                     <span>确认</span>
                 </el-button>
@@ -225,22 +246,27 @@
         </HcDialog>
 
         <!--选择样品信息-->
-        <HcDialog :show="linksSampleModal" title="选择样品信息" widths="70%" isTable isRowFooter @close="linksSampleModalClose">
+        <HcDialog :show="linksSampleModal" isRowFooter isTable title="选择样品信息" widths="70%"
+                  @close="linksSampleModalClose">
             <div class="hc-links-sample-modal-box">
                 <div class="hc-links-sample-tree-box">
                     <el-scrollbar>
                         <TestTree :projectId="projectId"
+                                  :tenantId="userInfo?.tenant_id"
                                   :wbsTempId="projectInfo?.referenceWbsTemplateIdTrial"
                                   :wbsType="2"
-                                  :tenantId="userInfo?.tenant_id"
                                   @nodeTap="sampleTreeClick"/>
                     </el-scrollbar>
                 </div>
                 <div class="hc-links-sample-table-box">
-                    <HcTable :column="linksSampleTableColumn" :datas="linksSampleTableData" :loading="linksSampleTableLoading" :isIndex="false">
+                    <HcTable :column="linksSampleTableColumn" :datas="linksSampleTableData"
+                             :isIndex="false" :loading="linksSampleTableLoading">
                         <template #action="{row}">
-                            <el-button type="primary" size="small" plain v-if="addEditFormModel.sampleId === row.id">已选择</el-button>
-                            <el-button type="primary" size="small" plain @click="linksSampleRow(row)" v-else>选择</el-button>
+                            <el-button v-if="addEditFormModel.sampleId === row.id" plain size="small" type="primary">
+                                已选择
+                            </el-button>
+                            <el-button v-else plain size="small" type="primary" @click="linksSampleRow(row)">选择
+                            </el-button>
                         </template>
                     </HcTable>
                 </div>
@@ -265,7 +291,7 @@ import {useAppStore} from "~src/store";
 import HcTreeData from "./components/HcTreeData.vue"
 import FormItemUpload from "./components/FormItemUpload.vue"
 import TestTree from "../material/components/TestTree.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import dataApi from "~api/tentative/detect/third";
 import samplingApi from "~api/tentative/material/sampling"
 import {formValidate, getArrValue} from "vue-utils-plus";
@@ -287,7 +313,7 @@ watch(() => [
 })
 
 //自动展开缓存
-const thirdTreeKeys = ref(getStoreData('outsideTreeKeys'))
+const thirdTreeKeys = ref(getStoreValue('outsideTreeKeys'))
 
 //渲染完成
 onMounted(() => {
@@ -316,15 +342,15 @@ const wbsElTreeClick = ({node, keys}) => {
     nodeItemInfo.value = node
     //缓存自动展开
     thirdTreeKeys.value = keys
-    setStoreData('outsideTreeKeys',keys)
+    setStoreValue('outsideTreeKeys', keys)
     //改变搜索表单数据
     searchForm.value.nodeId = keys
     searchForm.value.current = 1;
     getTableData()
 }
-const menuTapClick=({data })=>{
-    if(data?.isData===1){
-         window.$message.warning('当前节点下已有数据,不允许新增节点')
+const menuTapClick = ({data}) => {
+    if (data?.isData === 1) {
+        window.$message.warning('当前节点下已有数据,不允许新增节点')
     }
 }
 //日期时间被选择
@@ -334,9 +360,9 @@ const betweenTimeUpdate = ({arr}) => {
     if (arr.length > 0) {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
-    }else{
+    } else {
         searchForm.value.startTime = ''
-         searchForm.value.endTime =''
+        searchForm.value.endTime = ''
     }
 }
 
@@ -364,20 +390,20 @@ const pageChange = ({current, size}) => {
 //表格数据
 const tableRef = ref(null)
 const tableColumn = ref([
-    {key:'entrustNo', name: '委托编号', width: 150},
-    {key:'reportNo', name: '报告编号', width: 150},
-    {key:'specificationNumber', name: '样品编号', width: 150},
-    {key:'trialType', name: '试验类型', width: 150},
-    {key:'materialName', name: '样品名称', width: 150},
-    {key:'specificationModel', name: '规格型号', width: 150},
-    {key:'entrustCompany', name: '委托单位', width: 150},
-    {key:'inspectionOrganization', name: '检测机构', width: 150},
-    {key:'projectPosition', name: '工程部位', width: 150},
-    {key:'userName', name: '送样人', width: 100},
-    {key:'sampleDeliveryDate', name: '送样日期', width: 150},
-    {key:'reportDate', name: '报告日期', width: 150},
-    {key:'testConclusionText', name: '检测结果', width: 150},
-    {key:'remarks', name: '备注', width: 180},
+    {key: 'entrustNo', name: '委托编号', width: 150},
+    {key: 'reportNo', name: '报告编号', width: 150},
+    {key: 'specificationNumber', name: '样品编号', width: 150},
+    {key: 'trialType', name: '试验类型', width: 150},
+    {key: 'materialName', name: '样品名称', width: 150},
+    {key: 'specificationModel', name: '规格型号', width: 150},
+    {key: 'entrustCompany', name: '委托单位', width: 150},
+    {key: 'inspectionOrganization', name: '检测机构', width: 150},
+    {key: 'projectPosition', name: '工程部位', width: 150},
+    {key: 'userName', name: '送样人', width: 100},
+    {key: 'sampleDeliveryDate', name: '送样日期', width: 150},
+    {key: 'reportDate', name: '报告日期', width: 150},
+    {key: 'testConclusionText', name: '检测结果', width: 150},
+    {key: 'remarks', name: '备注', width: 180},
 ])
 const tableData = ref([])
 
@@ -385,7 +411,7 @@ const tableData = ref([])
 const tableLoading = ref(false)
 const getTableData = async () => {
     tableLoading.value = true
-    const { error, code, data } = await dataApi.queryPage({
+    const {error, code, data} = await dataApi.queryPage({
         ...searchForm.value,
         projectId: projectId.value,
         contractId: contractId.value
@@ -411,7 +437,7 @@ const tableSelection = (rows) => {
 const addEditFormModal = ref(false)
 const formModalTitle = ref('新增')
 const addFormModalClick = () => {
-    const { data } = nodeItemInfo.value
+    const {data} = nodeItemInfo.value
     if (data?.id) {
         addEditFormModel.value = {
             nodeId: data.id, trialType: data.nodeName, status: 1
@@ -444,8 +470,8 @@ const addEditFormModalClose = () => {
 //类型tab数据和相关处理
 const tabTypeKey = ref('tab1')
 const tabTypeTab = ref([
-    {key:'tab1',  name: '基础信息'},
-    {key:'tab2', name: '检查结论'},
+    {key: 'tab1', name: '基础信息'},
+    {key: 'tab2', name: '检查结论'},
 ]);
 const tabTypeChange = (item) => {
     tabTypeKey.value = item?.key
@@ -465,53 +491,51 @@ const addEditFormRules = {
         trigger: 'blur',
         message: "请输入报告编号"
     },
-     entrustCompany: {
+    entrustCompany: {
         required: true,
         trigger: 'blur',
         message: "请输入委托单位"
     }
 }
-const addEditFormRules2 = {
-
-}
+const addEditFormRules2 = {}
 //新增/编辑/复制弹窗 保存
 const addEditFormLoading = ref(false)
 const addEditFormClick = async () => {
-         let validate
-    if(addEditFormRef.value!==null){
-          validate= await formValidate(addEditFormRef.value)
+    let validate
+    if (addEditFormRef.value !== null) {
+        validate = await formValidate(addEditFormRef.value)
     }
-   
+
     if (validate) {
         if (formModalTitle.value === '复制') {
             await copyFormApi()
         } else {
             await submitFormApi()
         }
-    }else if(validate===undefined){
-         window?.$message?.warning('请输入表单所需必填项')
+    } else if (validate === undefined) {
+        window?.$message?.warning('请输入表单所需必填项')
     }
 }
 
 //新增、编辑 提交保存
 const submitFormApi = async () => {
     addEditFormLoading.value = true
-    const { error, code } = await dataApi.submitForm({
+    const {error, code} = await dataApi.submitForm({
         ...addEditFormModel.value,
         projectId: projectId.value,
         contractId: contractId.value
     })
     //处理数据
-   
+
     if (!error && code === 200) {
         window?.$message?.success('操作成功')
         addEditFormModal.value = false
         setTimeout(() => {
-             addEditFormLoading.value = false
+            addEditFormLoading.value = false
         }, 1000);
         await getTableData()
     }
-     addEditFormLoading.value = false
+    addEditFormLoading.value = false
 }
 
 //复制
@@ -530,13 +554,13 @@ const copyTableModalClick = () => {
 //复制提交保存
 const copyFormApi = async () => {
     addEditFormLoading.value = true
-    const { error, code } = await dataApi.copyData({
+    const {error, code} = await dataApi.copyData({
         ...addEditFormModel.value,
         projectId: projectId.value,
         contractId: contractId.value
     })
     //处理数据
-    
+
     if (!error && code === 200) {
         window?.$message?.success('操作成功')
         addEditFormModal.value = false
@@ -545,14 +569,14 @@ const copyFormApi = async () => {
         }, 1000);
         await getTableData()
     }
-     addEditFormLoading.value = false
+    addEditFormLoading.value = false
 }
 
 //批量复制 提交保存
 const copyLoading = ref(false)
 const batchCopyFormApi = async (ids) => {
     copyLoading.value = true
-    const { error, code } = await dataApi.copyData({
+    const {error, code} = await dataApi.copyData({
         projectId: projectId.value,
         contractId: contractId.value,
         ids: ids,
@@ -575,10 +599,10 @@ const delModalClick = () => {
 //批量删除
 const tableRemoveData = async () => {
     const rows = tableCheckedKeys.value
-    if (rows.length > 0 ) {
+    if (rows.length > 0) {
         const ids = rowsToId(rows)
         //删除请求
-        const { error, code } = await dataApi.removeData({
+        const {error, code} = await dataApi.removeData({
             projectId: projectId.value,
             contractId: contractId.value,
             ids: ids,
@@ -620,27 +644,27 @@ const pageSampleChange = ({current, size}) => {
 
 //关联进场材料数据
 const linksSampleTableColumn = ref([
-    {key:'materialName', name: '取样名称'},
-    {key:'samplingDate', name: '取样日期'},
-    {key:'specificationNumber', name: '样品编号'},
-    {key:'specificationModel', name: '规格型号'},
-    {key:'materialCount', name: '试样数量'},
-    {key:'calculationUnit', name: '计算单位'},
-    {key:'proposedPosition', name: '拟用部位'},
-    {key:'representativeCount', name: '代表数量'},
-    {key:'userName', name: '取样人'},
-    {key:'action', name: '操作'},
-    
+    {key: 'materialName', name: '取样名称'},
+    {key: 'samplingDate', name: '取样日期'},
+    {key: 'specificationNumber', name: '样品编号'},
+    {key: 'specificationModel', name: '规格型号'},
+    {key: 'materialCount', name: '试样数量'},
+    {key: 'calculationUnit', name: '计算单位'},
+    {key: 'proposedPosition', name: '拟用部位'},
+    {key: 'representativeCount', name: '代表数量'},
+    {key: 'userName', name: '取样人'},
+    {key: 'action', name: '操作'},
+
 ])
 const linksSampleTableData = ref([])
 
 //获取关联数据
 const linksSampleTableLoading = ref(false)
 const getLinksSampleTable = async () => {
-    const { nodeId } = searchSampleForm.value
+    const {nodeId} = searchSampleForm.value
     if (nodeId) {
         linksSampleTableLoading.value = true
-        const { error, code, data } = await samplingApi.queryPage({
+        const {error, code, data} = await samplingApi.queryPage({
             ...searchSampleForm.value,
             projectId: projectId.value,
             contractId: contractId.value
@@ -689,7 +713,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         let diffVal = ve.clientX - leftNum;
-        if(diffVal >= 260 && diffVal <= 700) {
+        if (diffVal >= 260 && diffVal <= 700) {
             leftWidth.value = diffVal;
         }
     }

File diff suppressed because it is too large
+ 337 - 316
src/views/tentative/detect/test-form.vue


+ 245 - 220
src/views/tentative/detect/test.vue

@@ -1,13 +1,13 @@
 <template>
     <div class="hc-page-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
+        <div :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
@@ -15,9 +15,9 @@
                     <TestTree
                         :autoExpandKeys="treeAutoExpandKeys"
                         :projectId="projectId"
+                        :tenantId="userInfo?.tenant_id"
                         :wbsTempId="projectInfo?.referenceWbsTemplateIdTrial"
                         :wbsType="2"
-                        :tenantId="userInfo?.tenant_id"
                         @nodeTap="wbsElTreeClick"/>
                 </el-scrollbar>
             </div>
@@ -28,43 +28,49 @@
             <HcCard :scrollbar="false" actionSize="lg">
                 <template #header>
                     <HcTooltip keys="tentative_detect_test_add">
-                        <el-button type="primary" hc-btn :disabled="!primaryKeyId" @click="addFormModalClick">
+                        <el-button :disabled="!primaryKeyId" hc-btn type="primary" @click="addFormModalClick">
                             <HcIcon name="add-circle"/>
                             <span>新增</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_test_copy">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="copyLoading" @click="copyDataClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="copyLoading" hc-btn
+                                   @click="copyDataClick">
                             <HcIcon name="file-copy-2"/>
                             <span>复制</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_test_del">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="removeLoading" @click="delModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="removeLoading" hc-btn
+                                   @click="delModalClick">
                             <HcIcon name="delete-bin-2"/>
                             <span>删除</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_test_print">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="printPdfLoading" @click="printPdfClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="printPdfLoading" hc-btn
+                                   @click="printPdfClick">
                             <HcIcon name="printer"/>
                             <span>批量打印</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_test_report">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="reportPdfLoading" @click="reportPdfClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="reportPdfLoading" hc-btn
+                                   @click="reportPdfClick">
                             <HcIcon name="send-plane-2"/>
                             <span>批量上报</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_test_quit">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="quitPdfLoading" @click="quitPdfClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="quitPdfLoading" hc-btn
+                                   @click="quitPdfClick">
                             <HcIcon name="delete-bin-3"/>
                             <span>批量废除</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_test_null">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="printNullPdfLoading" @click="printNullPdfClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="printNullPdfLoading" hc-btn
+                                   @click="printNullPdfClick">
                             <HcIcon name="printer"/>
                             <span>打印空表</span>
                         </el-button>
@@ -82,18 +88,21 @@
                 </template>
                 <template #search>
                     <div class="w-40">
-                        <el-input v-model="searchForm.trialUserName" placeholder="请输入试验人员" clearable @keyup="keyUpEvent"/>
+                        <el-input v-model="searchForm.trialUserName" clearable placeholder="请输入试验人员"
+                                  @keyup="keyUpEvent"/>
                     </div>
                     <div class="w-40 ml-2">
-                        <el-select v-model="searchForm.queryStatus" placeholder="请选择是否合格" clearable>
-                            <el-option v-for="item in qualifiedData" :key="item.value" :label="item['label']" :value="item['value']"/>
+                        <el-select v-model="searchForm.queryStatus" clearable placeholder="请选择是否合格">
+                            <el-option v-for="item in qualifiedData" :key="item.value" :label="item['label']"
+                                       :value="item['value']"/>
                         </el-select>
                     </div>
                     <div class="w-64 ml-2">
                         <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate"/>
                     </div>
                     <div class="w-72 ml-2">
-                        <el-input v-model="searchForm.queryValue" placeholder="请输入项目名称关键字" clearable @keyup="keyUpEvent"/>
+                        <el-input v-model="searchForm.queryValue" clearable placeholder="请输入项目名称关键字"
+                                  @keyup="keyUpEvent"/>
                     </div>
                     <div class="ml-2">
                         <el-button type="primary" @click="searchClick">
@@ -102,41 +111,48 @@
                         </el-button>
                     </div>
                 </template>
-                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection">
+                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck
+                         @selection-change="tableSelection">
                     <template #recordNo="{row}">
-                        <span class="text-link" @click="tableRowEdit(row,'1')">{{row?.recordNo}}</span>
+                        <span class="text-link" @click="tableRowEdit(row,'1')">{{ row?.recordNo }}</span>
                     </template>
                     <template #reportNo="{row}">
-                        <span class="text-link" @click="tableRowEdit(row,'2')">{{row?.reportNo}}</span>
+                        <span class="text-link" @click="tableRowEdit(row,'2')">{{ row?.reportNo }}</span>
                     </template>
                     <template #trialProjectName="{row}">
-                        <span class="text-link font-bold" @click="tableRowPdf(row)">{{row?.trialProjectName}}</span>
+                        <span class="text-link font-bold" @click="tableRowPdf(row)">{{ row?.trialProjectName }}</span>
                     </template>
                     <template #taskStatus="{row}">
                         <!-- <el-tag :type="`${row.status === 2 ? 'success' : row.status === 0 ? 'warning' : row.status === 1 ? 'danger' : 'info'}`" -->
-                        <el-tag :type="`${row.taskStatus === '已审批' ? 'success' : row.taskStatus === '待审批' ? 'warning' : row.taskStatus === '已废除' ? 'danger' : 'info'}`"
-                                class="mx-1" effect="dark" v-if="row['taskStatus']">{{row['taskStatus']}}</el-tag>
+                        <el-tag
+                            v-if="row['taskStatus']"
+                            :type="`${row.taskStatus === '已审批' ? 'success' : row.taskStatus === '待审批' ? 'warning' : row.taskStatus === '已废除' ? 'danger' : 'info'}`"
+                            class="mx-1" effect="dark">{{ row['taskStatus'] }}
+                        </el-tag>
                     </template>
                     <template #detectionCategory="{row}">
                         <!-- <span>{{getArrKeyValue(categoryData, 'dictKey', 'dictValue', row.detectionCategory)}}</span> -->
-                         <span>{{row.detectionCategoryName}}</span>
+                        <span>{{ row.detectionCategoryName }}</span>
                     </template>
                     <template #isUploadCertificate="{row}">
                         <!-- <span>{{row.isUploadCertificate == 0 ? '是':row.isUploadCertificate == -1?'' : '否'}}</span> -->
-                          <span>{{row.isUploadCertificateName}}</span>
+                        <span>{{ row.isUploadCertificateName }}</span>
                     </template>
                     <template #contractId="{row}">
-                        <span>{{contractInfo?.name}}</span>
+                        <span>{{ contractInfo?.name }}</span>
                     </template>
                     <template #detectionResult="{row}">
-                        <span>{{row.detectionResultName }}</span>
+                        <span>{{ row.detectionResultName }}</span>
                     </template>
                     <template #action="{row}">
                         <HcTooltip keys="tentative_detect_test_annex">
-                            <el-button type="primary" size="small" plain   @click="viewAttachmentModalClick(row)">附件</el-button>
+                            <el-button plain size="small" type="primary" @click="viewAttachmentModalClick(row)">附件
+                            </el-button>
                         </HcTooltip>
                         <HcTooltip keys="tentative_detect_test_info">
-                            <el-button type="primary" size="small" plain @click="samplingRecordModalClick(row)">样品信息</el-button>
+                            <el-button plain size="small" type="primary" @click="samplingRecordModalClick(row)">
+                                样品信息
+                            </el-button>
                         </HcTooltip>
                     </template>
                 </HcTable>
@@ -147,25 +163,29 @@
         </div>
 
         <!--查看附件-->
-        <HcDialog :show="viewAttachmentModal" title="查看附件" widths="70rem" :footer="false" isTable @close="viewAttachmentModalClose">
+        <HcDialog :footer="false" :show="viewAttachmentModal" isTable title="查看附件" widths="70rem"
+                  @close="viewAttachmentModalClose">
             <template #extra>
                 <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange"/>
             </template>
-            <div class="hc-switch-tab-content" v-loading="viewAttachmentLoading">
+            <div v-loading="viewAttachmentLoading" class="hc-switch-tab-content">
                 <div class="h-full w-full flex">
-                    <div class="pdf-file-list-box" v-if="viewAttachmentData.length>0">
-                        <template v-for="item in viewAttachmentData" >
-                            <div class="file-item" :class="[item.isCheck ? 'cur' : '']"  @click="viewCurFile(item)">{{item.fileName||''}}</div>
+                    <div v-if="viewAttachmentData.length>0" class="pdf-file-list-box">
+                        <template v-for="item in viewAttachmentData">
+                            <div :class="[item.isCheck ? 'cur' : '']" class="file-item" @click="viewCurFile(item)">
+                                {{ item.fileName || '' }}
+                            </div>
                         </template>
                     </div>
-                    <div class="pdf-file-list-box" v-else>
-                      <HcNoData></HcNoData>
+                    <div v-else class="pdf-file-list-box">
+                        <HcNoData></HcNoData>
                     </div>
-                   <iframe width='80%' height='100%' frameborder='1' :src="attachmentPdfUrl" v-if="attachmentPdfUrl"/>
-                    <div class="hc-no-table-form" >
+                    <iframe v-if="attachmentPdfUrl" :src="attachmentPdfUrl" frameborder='1' height='100%' width='80%'/>
+                    <div class="hc-no-table-form">
                         <div class="table-form-no">
-                            <HcDragUpload  @progress="uploadprogress" @finished="uploadFinished" :datas="uploadData"  :fileList="fileListData" @delFile="delFileData"/>
-                            
+                            <HcDragUpload :datas="uploadData" :fileList="fileListData" @delFile="delFileData"
+                                          @finished="uploadFinished" @progress="uploadprogress"/>
+
                         </div>
                     </div>
                 </div>
@@ -173,12 +193,18 @@
         </HcDialog>
 
         <!--查看样品信息-->
-        <HcDialog :show="samplingRecordModal" title="查看样品信息" widths="60%" :footer="false" isTable @close="samplingRecordModalClose">
-            <HcTable :column="samplingTableColumn" :datas="samplingTableData" :loading="samplingTableLoading" :isIndex="false"></HcTable>
+        <HcDialog :footer="false" :show="samplingRecordModal" isTable title="查看样品信息" widths="60%"
+                  @close="samplingRecordModalClose">
+            <HcTable :column="samplingTableColumn" :datas="samplingTableData" :isIndex="false"
+                     :loading="samplingTableLoading"></HcTable>
         </HcDialog>
         <!--批量上报审批-->
-        <HcReportModal  title="批量上报审批" url="informationWriteQuery/batchTask" :show="showReportModal" :projectId="projectId" :contractId="contractId" type="wbs" :typeData="reportTypeData"
-        :taskName="reportTaskName" :ids="reportIds" :addition="reportAddition" :trialSelfInspectionRecordId="1"  @hide="showReportModal = false" @finish="showReportFinish"/>
+        <HcReportModal :addition="reportAddition" :contractId="contractId" :ids="reportIds"
+                       :projectId="projectId" :show="showReportModal" :taskName="reportTaskName"
+                       :trialSelfInspectionRecordId="1"
+                       :typeData="reportTypeData" title="批量上报审批" type="wbs"
+                       url="informationWriteQuery/batchTask" @finish="showReportFinish"
+                       @hide="showReportModal = false"/>
 
     </div>
 </template>
@@ -188,15 +214,15 @@ import {ref, watch, onMounted} from "vue";
 import {useRouter} from 'vue-router'
 import {useAppStore} from "~src/store";
 import TestTree from "../material/components/TestTree.vue"
-import {getStoreData, setStoreData, delStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue, delStoreValue} from '~src/utils/storage'
 import {getArrValue, getArrKeyValue, isString} from "vue-utils-plus";
 import HcDragUpload from "./components/HcDragUpload.vue"
 import dataApi from "~api/tentative/detect/test";
 import {delMessage, rowsToId} from "~uti/tools";
 import {getDictionary} from "~api/other";
-import { eVisaTaskCheckApi} from "~api/other"
+import {eVisaTaskCheckApi} from "~api/other"
 import wbsApi from "~api/data-fill/wbs"
-import { Loading } from "element-plus/es/components/loading/src/service";
+import {Loading} from "element-plus/es/components/loading/src/service";
 import notableform from '~src/assets/view/notableform.svg';
 
 //变量
@@ -214,7 +240,7 @@ const isBubble = ref(useAppState.getBubble);
 watch(() => [
     useAppState.getCollapse,
     useAppState.getBubble,
-], ([Collapse,bubble]) => {
+], ([Collapse, bubble]) => {
     isCollapse.value = Collapse
     isBubble.value = bubble
 })
@@ -225,7 +251,7 @@ const getButtonsVal = (value) => {
 }
 
 //自动展开缓存
-const treeAutoExpandKeys = ref(getStoreData('testTreeExpandKeys') || [])
+const treeAutoExpandKeys = ref(getStoreValue('testTreeExpandKeys') || [])
 const btn_edit = ref(false)
 
 //渲染完成
@@ -233,7 +259,7 @@ onMounted(() => {
     btn_edit.value = getButtonsVal('tentative_detect_test_edit')
     setContractType(contractInfo.value?.contractType)
     getCategoryData()
-     
+
 })
 
 const qualifiedData = ref([
@@ -244,7 +270,7 @@ const qualifiedData = ref([
 //获取检测类别类型
 const categoryData = ref([])
 const getCategoryData = async () => {
-    const { data } = await getDictionary({
+    const {data} = await getDictionary({
         code: 'trial_detection_category'
     })
     const arrData = getArrValue(data)
@@ -268,10 +294,10 @@ const nodeDataInfo = ref({})
 const wbsElTreeClick = ({data, keys}) => {
     nodeDataInfo.value = data
     primaryKeyId.value = data['primaryKeyId'] || ''
-    setStoreData('testTreeItem',data)
+    setStoreValue('testTreeItem', data)
     //缓存自动展开
     treeAutoExpandKeys.value = keys
-    setStoreData('testTreeExpandKeys',keys)
+    setStoreValue('testTreeExpandKeys', keys)
     //改变搜索表单数据
     searchForm.value.nodeId = data['primaryKeyId'];
     searchForm.value.current = 1;
@@ -306,9 +332,9 @@ const betweenTimeUpdate = ({arr}) => {
     if (arr.length > 0) {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
-    }else{
+    } else {
         searchForm.value.startTime = ''
-         searchForm.value.endTime =''
+        searchForm.value.endTime = ''
     }
 }
 
@@ -336,24 +362,24 @@ const pageChange = ({current, size}) => {
 //表格数据
 const tableRef = ref(null)
 const tableColumn = ref([
-    {key:'recordNo', name: '记录编号', width: 220},
-    {key:'reportNo', name: '报告编号', width: 220},
-    {key:'samplingLocation', name: '取样地点', width: 220},
-    {key:'trialProjectName', name: '试验项目名称', width: 220},
-    {key:'detectionResult', name: '检测结果', width: 160},
-     {key:'taskStatus', name: '任务状态', width: 140},
-    {key:'detectionCategory', name: '检测类别', width: 120},
-    {key:'isUploadCertificate', name: '是否上传合格证', width: 130},
-    {key:'contractId', name: '合同段', width: 220},
-    {key:'company', name: '单位', width: 160},
-    {key:'specificationNumber', name: '样品编号', width: 220},
-    {key:'specificationModel', name: '规格类型', width: 200},
-  
+    {key: 'recordNo', name: '记录编号', width: 220},
+    {key: 'reportNo', name: '报告编号', width: 220},
+    {key: 'samplingLocation', name: '取样地点', width: 220},
+    {key: 'trialProjectName', name: '试验项目名称', width: 220},
+    {key: 'detectionResult', name: '检测结果', width: 160},
+    {key: 'taskStatus', name: '任务状态', width: 140},
+    {key: 'detectionCategory', name: '检测类别', width: 120},
+    {key: 'isUploadCertificate', name: '是否上传合格证', width: 130},
+    {key: 'contractId', name: '合同段', width: 220},
+    {key: 'company', name: '单位', width: 160},
+    {key: 'specificationNumber', name: '样品编号', width: 220},
+    {key: 'specificationModel', name: '规格类型', width: 200},
+
     //{key:'projectPosition', name: '工程部位及用途', width: 160},
-    {key:'projectPositionName', name: '工程部位及用途', width: 160},
-    {key:'reportDate', name: '报告日期', width: 170},
-    {key:'trialUserName', name: '试验人员', width: 170},
-    {key:'action', name: '操作', width: 150, fixed: 'right', align: 'center'},
+    {key: 'projectPositionName', name: '工程部位及用途', width: 160},
+    {key: 'reportDate', name: '报告日期', width: 170},
+    {key: 'trialUserName', name: '试验人员', width: 170},
+    {key: 'action', name: '操作', width: 150, fixed: 'right', align: 'center'},
 ])
 const tableData = ref([])
 
@@ -361,7 +387,7 @@ const tableData = ref([])
 const tableLoading = ref(false)
 const getTableData = async () => {
     tableLoading.value = true
-    const { error, code, data } = await dataApi.queryPage({
+    const {error, code, data} = await dataApi.queryPage({
         ...searchForm.value,
         projectId: projectId.value,
         contractId: contractId.value
@@ -385,29 +411,29 @@ const tableSelection = (rows) => {
 
 //新增
 const addFormModalClick = () => {
-    delStoreData('test-form')
+    delStoreValue('test-form')
     router.push({
         path: '/tentative/detect/test-form',
         query: {
             nodeId: primaryKeyId.value,
             dataType: authBtnTabKey.value,
-            isaddType:true,
+            isaddType: true,
         }
     })
 }
 
 //编辑
-const tableRowEdit = (row,tabTypeKey) => {
-    setStoreData('test-form', row)
-    setStoreData('prenodeDataInfo', nodeDataInfo.value)
-    console.log(JSON.stringify(nodeDataInfo.value),'JSON.stringify(nodeDataInfo.value)');
+const tableRowEdit = (row, tabTypeKey) => {
+    setStoreValue('test-form', row)
+    setStoreValue('prenodeDataInfo', nodeDataInfo.value)
+    console.log(JSON.stringify(nodeDataInfo.value), 'JSON.stringify(nodeDataInfo.value)');
     router.push({
         path: '/tentative/detect/test-form',
         query: {
             id: row.id,
             nodeId: row.nodeId,
             dataType: row.type,
-            tabTypeKey:tabTypeKey
+            tabTypeKey: tabTypeKey
             // prenodeDataInfo:JSON.stringify(nodeDataInfo.value)
 
         }
@@ -417,7 +443,7 @@ const tableRowEdit = (row,tabTypeKey) => {
 //预览PDF
 const tableRowPdf = ({pdfUrl}) => {
     if (pdfUrl) {
-        window.open(pdfUrl,'_blank')
+        window.open(pdfUrl, '_blank')
     } else {
         window.$message?.warning('该数据暂无PDF')
     }
@@ -439,9 +465,9 @@ const copyLoading = ref(false)
 const copyDataApi = async (ids) => {
     //请求数据
     copyLoading.value = true
-    const { error, code, msg } = await dataApi.copyData({
+    const {error, code, msg} = await dataApi.copyData({
         ids: ids
-    },false)
+    }, false)
     //处理数据
     copyLoading.value = false
     if (!error && code === 200) {
@@ -470,9 +496,9 @@ const removeLoading = ref(false)
 const removeDataApi = async (ids) => {
     //请求数据
     removeLoading.value = true
-    const { error, code, msg } = await dataApi.removeData({
+    const {error, code, msg} = await dataApi.removeData({
         ids: ids
-    },false)
+    }, false)
     //处理数据
     removeLoading.value = false
     if (!error && code === 200) {
@@ -491,14 +517,14 @@ const printPdfClick = async () => {
         const ids = rowsToId(rows)
         //请求数据
         printPdfLoading.value = true
-        const { error, code, msg, data } = await dataApi.printPdf({
+        const {error, code, msg, data} = await dataApi.printPdf({
             ids: ids
-        },false)
+        }, false)
         //处理数据
         const pdfUrl = isString(data) ? data || '' : ''
         printPdfLoading.value = false
         if (!error && code === 200 && pdfUrl) {
-            window.open(pdfUrl,'_blank')
+            window.open(pdfUrl, '_blank')
         } else {
             window.$message?.error(msg || '文件异常')
         }
@@ -513,18 +539,18 @@ const quitPdfClick = async () => {
     const rows = tableCheckedKeys.value;
     if (rows.length > 0) {
         const ids = rowsToId(rows)
-       const res1 = rows.some(item => item.taskStatus === '未上报')
-       const res2 = rows.some(item => item.taskStatus === '已废除')
-        if(res1){
+        const res1 = rows.some(item => item.taskStatus === '未上报')
+        const res2 = rows.some(item => item.taskStatus === '已废除')
+        if (res1) {
             window.$message?.warning('未上报的文件不能废除')
-        }else if(res2){
-              window.$message?.warning('已废除的文件不能再次废除')
-        }else{
+        } else if (res2) {
+            window.$message?.warning('已废除的文件不能再次废除')
+        } else {
             //请求数据
             quitPdfLoading.value = true
-            const { error, code, msg, data } = await dataApi.batchAbolish({
+            const {error, code, msg, data} = await dataApi.batchAbolish({
                 ids: ids
-            },false)
+            }, false)
             //处理数据
             if (!error && code === 200) {
                 window.$message?.success('废除成功')
@@ -535,7 +561,7 @@ const quitPdfClick = async () => {
                 window.$message?.error(msg)
             }
         }
-     
+
     } else {
         window.$message?.warning('请先勾选需要批量打印的记录')
     }
@@ -553,51 +579,50 @@ const reportTypeData = ref([])
 const reportPdfClick = async () => {
     const rows = tableCheckedKeys.value;
     if (rows.length > 0) {
-            const info = getStoreData('prenodeDataInfo') || {}
-            const res1 = rows.some(item => item.pdfUrl.length<1)
-            const res2 = rows.some(item => item.taskStatus === '待审批'|| item.taskStatus === '已审批')
-            if(res1){
-                  window.$message?.warning('当前数据暂无pdf无法上报')
-            }else if(res2){
-                window.$message?.warning('已上报的数据无法再次上报')
-            }else{
-                 reportLoading.value = true
-                 const ids = rowsToId(rows)
-                 reportIds.value=ids
-                const taskCheck = await eVisaTaskCheckApi({
-                    projectId: projectId.value,
-                    contractId: contractId.value
-                })
-                //处理数据
-                let newArr = [];
-                for (let i = 0; i < rows.length; i++) {
-                    newArr.push(rows[i]['tableIds'])
-                }
-                reportTypeData.value = [...newArr];
-                console.log( reportTypeData.value,' reportTypeData.value');
-                reportLoading.value = false
-                if (taskCheck) {
-                    //初始弹出弹窗,防呆
-                  
-                    reportAddition.value = {
-                        classify: authBtnTabKey.value,
-                        contractIdRelation: info['contractIdRelation'],
-                    }
-                    showReportModal.value = true
-                    //请求文件题名
-                    const {data} = await wbsApi.queryDocumentTitle({
-                        // primaryKeyId: info['primaryKeyId'],
-                        primaryKeyId: rows[0].id,
-                        classify: authBtnTabKey.value
-                    })
-                    reportTaskName.value = isString(data)? data : ''
-        
-                } else {
-                    window.$message?.warning('暂无相关数据')
+        const info = getStoreValue('prenodeDataInfo') || {}
+        const res1 = rows.some(item => item.pdfUrl.length < 1)
+        const res2 = rows.some(item => item.taskStatus === '待审批' || item.taskStatus === '已审批')
+        if (res1) {
+            window.$message?.warning('当前数据暂无pdf无法上报')
+        } else if (res2) {
+            window.$message?.warning('已上报的数据无法再次上报')
+        } else {
+            reportLoading.value = true
+            const ids = rowsToId(rows)
+            reportIds.value = ids
+            const taskCheck = await eVisaTaskCheckApi({
+                projectId: projectId.value,
+                contractId: contractId.value
+            })
+            //处理数据
+            let newArr = [];
+            for (let i = 0; i < rows.length; i++) {
+                newArr.push(rows[i]['tableIds'])
+            }
+            reportTypeData.value = [...newArr];
+            console.log(reportTypeData.value, ' reportTypeData.value');
+            reportLoading.value = false
+            if (taskCheck) {
+                //初始弹出弹窗,防呆
+
+                reportAddition.value = {
+                    classify: authBtnTabKey.value,
+                    contractIdRelation: info['contractIdRelation'],
                 }
+                showReportModal.value = true
+                //请求文件题名
+                const {data} = await wbsApi.queryDocumentTitle({
+                    // primaryKeyId: info['primaryKeyId'],
+                    primaryKeyId: rows[0].id,
+                    classify: authBtnTabKey.value
+                })
+                reportTaskName.value = isString(data) ? data : ''
+
+            } else {
+                window.$message?.warning('暂无相关数据')
             }
-            
-               
+        }
+
 
     } else {
         window.$message?.warning('请先勾选需要批量上报的记录')
@@ -617,14 +642,14 @@ const printNullPdfClick = async () => {
         const ids = rowsToId(rows)
         //请求数据
         printNullPdfLoading.value = true
-        const { error, code, msg, data } = await dataApi.printNullPdf({
+        const {error, code, msg, data} = await dataApi.printNullPdf({
             ids: ids
-        },false)
+        }, false)
         //处理数据
         const pdfUrl = isString(data) ? data || '' : ''
         printNullPdfLoading.value = false
         if (!error && code === 200 && pdfUrl) {
-            window.open(pdfUrl,'_blank')
+            window.open(pdfUrl, '_blank')
         } else {
             window.$message?.error(msg || '文件异常')
         }
@@ -639,155 +664,155 @@ const viewAttachmentLoading = ref(false)
 const viewAttachmentId = ref('')
 const viewAttachmentData = ref([])
 const viewAttachmentModalClick = async ({id}) => {
-    viewAttachmentId.value=id
+    viewAttachmentId.value = id
     viewAttachmentModal.value = true
-    getAttachmentModalClick( viewAttachmentId.value, '1')
+    getAttachmentModalClick(viewAttachmentId.value, '1')
 
 }
-const getCaption =(obj)=> {
+const getCaption = (obj) => {
     const index = obj.lastIndexOf("pdf")
-   
+
     return index
 }
 
 //获取附件
-const getAttachmentModalClick = async (id,type) => {
-     viewAttachmentLoading.value = true
-   const { error, code, data } = await dataApi.ancillaryDocumentsList({id: id,type:type})
-   console.log(data,'data');
-   viewAttachmentLoading.value = false
-        if (!error && code === 200) {
+const getAttachmentModalClick = async (id, type) => {
+    viewAttachmentLoading.value = true
+    const {error, code, data} = await dataApi.ancillaryDocumentsList({id: id, type: type})
+    console.log(data, 'data');
+    viewAttachmentLoading.value = false
+    if (!error && code === 200) {
         viewAttachmentData.value = getArrValue(data)
-        curFileData.value=viewAttachmentData.value[0]
+        curFileData.value = viewAttachmentData.value[0]
         viewCurFile(curFileData.value)
-       
+
     } else {
         viewAttachmentData.value = []
-         
+
     }
-   
+
 }
-const refeshAttachmentModalClick = async (id,type) => {
-    const { error, code, data } = await dataApi.ancillaryDocumentsList({id: id,type:type})
+const refeshAttachmentModalClick = async (id, type) => {
+    const {error, code, data} = await dataApi.ancillaryDocumentsList({id: id, type: type})
     //处理数据
     viewAttachmentLoading.value = false
     if (!error && code === 200) {
         viewAttachmentData.value = getArrValue(data)
-        if ( viewAttachmentData.value.length<1) {
+        if (viewAttachmentData.value.length < 1) {
             //  window.$message?.warning('该条记录不存在附件')
-        }else{
-             viewCurFile( viewAttachmentData.value[0])
+        } else {
+            viewCurFile(viewAttachmentData.value[0])
         }
-       
+
     } else {
         viewAttachmentData.value = []
-         
+
     }
 }
 const attachmentPdfUrl = ref('')
-const curFileData =ref ({})
+const curFileData = ref({})
 //类型tab数据和相关处理
 const tabTypeKey = ref('1')
 const tabTypeTab = ref([
-    {key:'1',  name: '生产合格证'},
-    {key:'2', name: '厂家质检报告'},
-    {key:'3', name: '其他文件'},
+    {key: '1', name: '生产合格证'},
+    {key: '2', name: '厂家质检报告'},
+    {key: '3', name: '其他文件'},
 ]);
 const tabTypeChange = (item) => {
     console.log(1111111111);
     tabTypeKey.value = item?.key
-    getAttachmentModalClick( viewAttachmentId.value, item?.key)
-    fileListData.value =[]
-    
-     
+    getAttachmentModalClick(viewAttachmentId.value, item?.key)
+    fileListData.value = []
+
+
     refeshAttachmentModalClick(viewAttachmentId.value, tabTypeKey.value)
 }
 
 //关闭查看附件
 const viewAttachmentModalClose = () => {
     viewAttachmentModal.value = false
-     curFileData.value=''
-     attachmentPdfUrl.value=''
+    curFileData.value = ''
+    attachmentPdfUrl.value = ''
 }
 const uploadData = ref({})
-const fileListData=ref([])
-const listuploadref=ref('1')
+const fileListData = ref([])
+const listuploadref = ref('1')
 //截取文件名称
-const splitFileName=(str)=>{
+const splitFileName = (str) => {
     // if(str.indexOf("https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload") != -1){
-    if(str.indexOf("https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload") != -1){
-        let a=str.split('//')[2].split('/')[2]
+    if (str.indexOf("https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload") != -1) {
+        let a = str.split('//')[2].split('/')[2]
         return a
-    }else{
+    } else {
         return str
     }
- 
+
 }
 //查看当前文件pdf
 const viewCurFile = (item) => {
-    console.log(item,'item');
-    if(item){
-         curFileData.value=item 
-        let arr=[]
-        arr.push({name:item.fileName,url:item.url})
-        fileListData.value =getArrValue(arr)
-        viewAttachmentData.value.forEach((ele)=>{
-            ele.isCheck=false
+    console.log(item, 'item');
+    if (item) {
+        curFileData.value = item
+        let arr = []
+        arr.push({name: item.fileName, url: item.url})
+        fileListData.value = getArrValue(arr)
+        viewAttachmentData.value.forEach((ele) => {
+            ele.isCheck = false
         })
-        item.isCheck=true
-        
+        item.isCheck = true
+
     }
-    
+
 }
 
 //上传进度
 const uploadprogress = (res) => {
- console.log('进度');
+    console.log('进度');
 }
 
 //上传完成
-const uploadFinished = async(res) => {
-    const { error, code, data } = await dataApi.updateAncillaryDocument(
+const uploadFinished = async (res) => {
+    const {error, code, data} = await dataApi.updateAncillaryDocument(
         {
-            selfId:viewAttachmentId.value,
-            url:res.link,
+            selfId: viewAttachmentId.value,
+            url: res.link,
             type: tabTypeKey.value,
-            
+
         })
-        console.log(data,'data');
-     if (!error && code === 200) {
-       refeshAttachmentModalClick(viewAttachmentId.value, tabTypeKey.value)
+    console.log(data, 'data');
+    if (!error && code === 200) {
+        refeshAttachmentModalClick(viewAttachmentId.value, tabTypeKey.value)
     }
 }
 //上传文件delFileData
-const delFileData = async(res) => {
-    console.log('删除文件',curFileData.value);
-    if(curFileData.value.isDel==0){
+const delFileData = async (res) => {
+    console.log('删除文件', curFileData.value);
+    if (curFileData.value.isDel == 0) {
         window.$message.warning('该文件不可删除')
-    }else{
-           const { error, code, data } = await dataApi.removedocuments(
+    } else {
+        const {error, code, data} = await dataApi.removedocuments(
             {
-                id:curFileData.value.id, 
+                id: curFileData.value.id,
             })
-            if (!error && code === 200) {
+        if (!error && code === 200) {
             window.$message.success('删除成功')
             refeshAttachmentModalClick(viewAttachmentId.value, tabTypeKey.value)
-            }
+        }
     }
- 
+
 }
 
 //样品信息数据
 const samplingTableColumn = ref([
-    {key:'materialName', name: '样品名称'},
-    {key:'samplingDate', name: '取样时间'},
-    {key:'specificationNumber', name: '样品编号'},
-    {key:'specificationModel', name: '规格型号'},
-    {key:'materialCount', name: '试样数量'},
-    {key:'calculationUnit', name: '计算单位'},
-    {key:'proposedPosition', name: '拟用部位'},
-    {key:'representativeCount', name: '代表数量'},
-    {key:'userName', name: '取样人'},
+    {key: 'materialName', name: '样品名称'},
+    {key: 'samplingDate', name: '取样时间'},
+    {key: 'specificationNumber', name: '样品编号'},
+    {key: 'specificationModel', name: '规格型号'},
+    {key: 'materialCount', name: '试样数量'},
+    {key: 'calculationUnit', name: '计算单位'},
+    {key: 'proposedPosition', name: '拟用部位'},
+    {key: 'representativeCount', name: '代表数量'},
+    {key: 'userName', name: '取样人'},
 ])
 const samplingTableData = ref([])
 const samplingTableLoading = ref(false)
@@ -797,7 +822,7 @@ const samplingRecordModal = ref(false)
 const samplingRecordModalClick = async ({id}) => {
     samplingRecordModal.value = true
     samplingTableLoading.value = true
-    const { error, code, data } = await dataApi.getSampleList({
+    const {error, code, data} = await dataApi.getSampleList({
         id: id
     })
     //处理数据
@@ -821,7 +846,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         let diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }
@@ -843,7 +868,7 @@ const onmousedown = () => {
         overflow-y: auto;
         height: 100%;
         flex: 1;
-       
+
         .file-item {
             position: relative;
             cursor: pointer;

+ 118 - 93
src/views/tentative/detect/third.vue

@@ -1,18 +1,19 @@
 <template>
     <div class="hc-page-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
+        <div :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <HcTreeData :autoExpandKeys="thirdTreeKeys" :projectId="projectId" :contractId="contractId" type="leftTree" @nodeTap="wbsElTreeClick" @menuTap="menuTapClick"/>
+                    <HcTreeData :autoExpandKeys="thirdTreeKeys" :contractId="contractId" :projectId="projectId"
+                                type="leftTree" @menuTap="menuTapClick" @nodeTap="wbsElTreeClick"/>
                 </el-scrollbar>
             </div>
             <!--左右拖动-->
@@ -22,25 +23,26 @@
             <HcCard :scrollbar="false" actionSize="lg">
                 <template #header>
                     <HcTooltip keys="tentative_detect_third_add">
-                        <el-button type="primary" hc-btn :disabled="!thirdTreeKeys" @click="addFormModalClick">
+                        <el-button :disabled="!thirdTreeKeys" hc-btn type="primary" @click="addFormModalClick">
                             <HcIcon name="add-circle"/>
                             <span>新增</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_third_edit">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="editFormModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="editFormModalClick">
                             <HcIcon name="edit"/>
                             <span>编辑</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_third_copy">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="copyLoading" @click="copyTableModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="copyLoading" hc-btn
+                                   @click="copyTableModalClick">
                             <HcIcon name="file-copy-2"/>
                             <span>复制</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_detect_third_del">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="delModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="delModalClick">
                             <HcIcon name="delete-bin-2"/>
                             <span>删除</span>
                         </el-button>
@@ -48,18 +50,20 @@
                 </template>
                 <template #search>
                     <div class="w-40">
-                        <el-input v-model="searchForm.queryName" placeholder="送样人员" clearable/>
+                        <el-input v-model="searchForm.queryName" clearable placeholder="送样人员"/>
                     </div>
                     <div class="w-40 ml-2">
-                        <el-select v-model="searchForm.queryStatus" placeholder="请选择是否合格" clearable>
-                            <el-option v-for="item in qualifiedData" :key="item.value" :label="item['label']" :value="item['value']"/>
+                        <el-select v-model="searchForm.queryStatus" clearable placeholder="请选择是否合格">
+                            <el-option v-for="item in qualifiedData" :key="item.value" :label="item['label']"
+                                       :value="item['value']"/>
                         </el-select>
                     </div>
                     <div class="w-64 ml-2">
                         <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate"/>
                     </div>
                     <div class="w-72 ml-2">
-                        <el-input v-model="searchForm.queryValue" placeholder="请输入报告编号、委托编号" clearable @keyup="keyUpEvent"/>
+                        <el-input v-model="searchForm.queryValue" clearable placeholder="请输入报告编号、委托编号"
+                                  @keyup="keyUpEvent"/>
                     </div>
                     <div class="ml-2">
                         <el-button type="primary" @click="searchClick">
@@ -68,7 +72,8 @@
                         </el-button>
                     </div>
                 </template>
-                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection"/>
+                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck
+                         @selection-change="tableSelection"/>
                 <template #action>
                     <HcPages :pages="searchForm" @change="pageChange"/>
                 </template>
@@ -76,15 +81,20 @@
         </div>
 
         <!--新增/编辑-->
-        <HcDialog :show="addEditFormModal" :title="formModalTitle + ' 外委试验信息'" widths="70rem" isRowFooter :isClose="false" @close="addEditFormModalClose">
+        <HcDialog :isClose="false" :show="addEditFormModal" :title="formModalTitle + ' 外委试验信息'" isRowFooter
+                  widths="70rem" @close="addEditFormModalClose">
             <template #extra>
                 <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange"/>
             </template>
-            <el-form ref="addEditFormRef" :model="addEditFormModel" :rules="addEditFormRules" label-width="auto" size="large" v-if="tabTypeKey === 'tab1'">
+            <el-form v-if="tabTypeKey === 'tab1'" ref="addEditFormRef" :model="addEditFormModel"
+                     :rules="addEditFormRules"
+                     label-width="auto" size="large">
                 <div class="hc-form-item">
                     <el-form-item label="合同段">
-                        <el-select v-model="addEditFormModel.contractId" block placeholder="请选择合同段"  popper-class="select-popper" :teleported="false">
-                            <el-option v-for="item in projectInfo?.contractInfoList" :key="item.id" :label="item['name']" :value="item['id']"/>
+                        <el-select v-model="addEditFormModel.contractId" :teleported="false" block
+                                   placeholder="请选择合同段" popper-class="select-popper">
+                            <el-option v-for="item in projectInfo?.contractInfoList" :key="item.id"
+                                       :label="item['name']" :value="item['id']"/>
                         </el-select>
                     </el-form-item>
                     <el-form-item label="合格状态">
@@ -112,7 +122,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="证书编号">
-                        <el-input v-model="addEditFormModel.testingAgencyCertificateNo" placeholder="检测机构资质证书编号"/>
+                        <el-input v-model="addEditFormModel.testingAgencyCertificateNo"
+                                  placeholder="检测机构资质证书编号"/>
                     </el-form-item>
                     <el-form-item label="样品数量">
                         <el-input v-model="addEditFormModel.materialCount"/>
@@ -136,7 +147,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="送样日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.sampleDeliveryDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.sampleDeliveryDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                     <el-form-item label="产地">
                         <el-input v-model="addEditFormModel.placeOfOrigin"/>
@@ -144,7 +156,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="取样日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.samplingDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.samplingDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                     <el-form-item label="取样地点">
                         <el-input v-model="addEditFormModel.samplingLocation"/>
@@ -152,7 +165,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="检测日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.testDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.testDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                     <el-form-item label="生产厂家">
                         <el-input v-model="addEditFormModel.manufacturer"/>
@@ -160,7 +174,8 @@
                 </div>
                 <div class="hc-form-item">
                     <el-form-item label="报告日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.reportDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.reportDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                     <el-form-item label="生产批号">
                         <el-input v-model="addEditFormModel.batchNumber"/>
@@ -192,22 +207,27 @@
                     <FormItemUpload v-model="addEditFormModel.reportAttachmentUrl" :action="'upload-file2'"/>
                 </el-form-item>
             </el-form>
-            <el-form  :model="addEditFormModel" label-position="top" label-width="auto" size="large" v-if="tabTypeKey === 'tab2'">
+            <el-form v-if="tabTypeKey === 'tab2'" :model="addEditFormModel" label-position="top" label-width="auto"
+                     size="large">
                 <el-form-item label="检测依据">
-                    <el-input v-model="addEditFormModel.testBasisText" type="textarea" placeholder="请输入检测依据" :autosize="{ minRows: 3}"  show-word-limit  maxlength="1000"/>
+                    <el-input v-model="addEditFormModel.testBasisText" :autosize="{ minRows: 3}" maxlength="1000"
+                              placeholder="请输入检测依据" show-word-limit type="textarea"/>
                 </el-form-item>
                 <el-form-item label="评定标准">
-                    <el-input v-model="addEditFormModel.evaluationCriteriaText" type="textarea" placeholder="请输入评定标准" :autosize="{ minRows: 3}"  show-word-limit  maxlength="1000"/>
+                    <el-input v-model="addEditFormModel.evaluationCriteriaText" :autosize="{ minRows: 3}"
+                              maxlength="1000" placeholder="请输入评定标准" show-word-limit type="textarea"/>
                 </el-form-item>
                 <el-form-item label="检测结论">
-                    <el-input v-model="addEditFormModel.testConclusionText" type="textarea" placeholder="请输入检测结论" :autosize="{ minRows: 3}"  show-word-limit  maxlength="1000"/>
+                    <el-input v-model="addEditFormModel.testConclusionText" :autosize="{ minRows: 3}" maxlength="1000"
+                              placeholder="请输入检测结论" show-word-limit type="textarea"/>
                 </el-form-item>
                 <el-form-item label="备注">
-                    <el-input v-model="addEditFormModel.remarks" type="textarea" placeholder="请输入备注" :autosize="{ minRows: 3}"  show-word-limit  maxlength="1000"/>
+                    <el-input v-model="addEditFormModel.remarks" :autosize="{ minRows: 3}" maxlength="1000"
+                              placeholder="请输入备注" show-word-limit type="textarea"/>
                 </el-form-item>
             </el-form>
             <template #leftRowFooter>
-                <el-button type="primary" hc-btn @click="linksSampleModalClick">
+                <el-button hc-btn type="primary" @click="linksSampleModalClick">
                     <HcIcon name="links"/>
                     <span>选择样品信息</span>
                 </el-button>
@@ -217,7 +237,7 @@
                     <HcIcon name="close"/>
                     <span>取消</span>
                 </el-button>
-                <el-button type="primary" hc-btn :loading="addEditFormLoading" @click="addEditFormClick">
+                <el-button :loading="addEditFormLoading" hc-btn type="primary" @click="addEditFormClick">
                     <HcIcon name="check"/>
                     <span>确认</span>
                 </el-button>
@@ -225,22 +245,27 @@
         </HcDialog>
 
         <!--选择样品信息-->
-        <HcDialog :show="linksSampleModal" title="选择样品信息" widths="70%" isTable isRowFooter @close="linksSampleModalClose">
+        <HcDialog :show="linksSampleModal" isRowFooter isTable title="选择样品信息" widths="70%"
+                  @close="linksSampleModalClose">
             <div class="hc-links-sample-modal-box">
                 <div class="hc-links-sample-tree-box">
                     <el-scrollbar>
                         <TestTree :projectId="projectId"
-                            :wbsTempId="projectInfo?.referenceWbsTemplateIdTrial"
-                            :wbsType="2"
-                            :tenantId="userInfo?.tenant_id"
-                            @nodeTap="sampleTreeClick"/>
+                                  :tenantId="userInfo?.tenant_id"
+                                  :wbsTempId="projectInfo?.referenceWbsTemplateIdTrial"
+                                  :wbsType="2"
+                                  @nodeTap="sampleTreeClick"/>
                     </el-scrollbar>
                 </div>
                 <div class="hc-links-sample-table-box">
-                    <HcTable :column="linksSampleTableColumn" :datas="linksSampleTableData" :loading="linksSampleTableLoading" :isIndex="false">
+                    <HcTable :column="linksSampleTableColumn" :datas="linksSampleTableData"
+                             :isIndex="false" :loading="linksSampleTableLoading">
                         <template #action="{row}">
-                            <el-button type="primary" size="small" plain v-if="addEditFormModel.sampleId === row.id">已选择</el-button>
-                            <el-button type="primary" size="small" plain @click="linksSampleRow(row)" v-else>选择</el-button>
+                            <el-button v-if="addEditFormModel.sampleId === row.id" plain size="small" type="primary">
+                                已选择
+                            </el-button>
+                            <el-button v-else plain size="small" type="primary" @click="linksSampleRow(row)">选择
+                            </el-button>
                         </template>
                     </HcTable>
                 </div>
@@ -265,7 +290,7 @@ import {useAppStore} from "~src/store";
 import HcTreeData from "./components/HcTreeData.vue"
 import FormItemUpload from "./components/FormItemUpload.vue"
 import TestTree from "../material/components/TestTree.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import dataApi from "~api/tentative/detect/third";
 import samplingApi from "~api/tentative/material/sampling"
 import {formValidate, getArrValue} from "vue-utils-plus";
@@ -287,7 +312,7 @@ watch(() => [
 })
 
 //自动展开缓存
-const thirdTreeKeys = ref(getStoreData('thirdTreeKeys'))
+const thirdTreeKeys = ref(getStoreValue('thirdTreeKeys'))
 
 //渲染完成
 onMounted(() => {
@@ -316,15 +341,15 @@ const wbsElTreeClick = ({node, keys}) => {
     nodeItemInfo.value = node
     //缓存自动展开
     thirdTreeKeys.value = keys
-    setStoreData('thirdTreeKeys',keys)
+    setStoreValue('thirdTreeKeys', keys)
     //改变搜索表单数据
     searchForm.value.nodeId = keys
     searchForm.value.current = 1;
     getTableData()
 }
-const menuTapClick=({data })=>{
-    if(data?.isData===1){
-         window.$message.warning('当前节点下已有数据,不允许新增节点')
+const menuTapClick = ({data}) => {
+    if (data?.isData === 1) {
+        window.$message.warning('当前节点下已有数据,不允许新增节点')
     }
 }
 //日期时间被选择
@@ -334,9 +359,9 @@ const betweenTimeUpdate = ({arr}) => {
     if (arr.length > 0) {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
-    }else{
+    } else {
         searchForm.value.startTime = ''
-         searchForm.value.endTime =''
+        searchForm.value.endTime = ''
     }
 }
 
@@ -364,20 +389,20 @@ const pageChange = ({current, size}) => {
 //表格数据
 const tableRef = ref(null)
 const tableColumn = ref([
-    {key:'entrustNo', name: '委托编号', width: 150},
-    {key:'reportNo', name: '报告编号', width: 150},
-    {key:'specificationNumber', name: '样品编号', width: 150},
-    {key:'trialType', name: '试验类型', width: 150},
-    {key:'materialName', name: '样品名称', width: 150},
-    {key:'specificationModel', name: '规格型号', width: 150},
-    {key:'entrustCompany', name: '委托单位', width: 150},
-    {key:'inspectionOrganization', name: '检测机构', width: 150},
-    {key:'projectPosition', name: '工程部位', width: 150},
-    {key:'userName', name: '送样人', width: 100},
-    {key:'sampleDeliveryDate', name: '送样日期', width: 150},
-    {key:'reportDate', name: '报告日期', width: 150},
-    {key:'testConclusionText', name: '检测结果', width: 150},
-    {key:'remarks', name: '备注', width: 180},
+    {key: 'entrustNo', name: '委托编号', width: 150},
+    {key: 'reportNo', name: '报告编号', width: 150},
+    {key: 'specificationNumber', name: '样品编号', width: 150},
+    {key: 'trialType', name: '试验类型', width: 150},
+    {key: 'materialName', name: '样品名称', width: 150},
+    {key: 'specificationModel', name: '规格型号', width: 150},
+    {key: 'entrustCompany', name: '委托单位', width: 150},
+    {key: 'inspectionOrganization', name: '检测机构', width: 150},
+    {key: 'projectPosition', name: '工程部位', width: 150},
+    {key: 'userName', name: '送样人', width: 100},
+    {key: 'sampleDeliveryDate', name: '送样日期', width: 150},
+    {key: 'reportDate', name: '报告日期', width: 150},
+    {key: 'testConclusionText', name: '检测结果', width: 150},
+    {key: 'remarks', name: '备注', width: 180},
 ])
 const tableData = ref([])
 
@@ -385,7 +410,7 @@ const tableData = ref([])
 const tableLoading = ref(false)
 const getTableData = async () => {
     tableLoading.value = true
-    const { error, code, data } = await dataApi.queryPage({
+    const {error, code, data} = await dataApi.queryPage({
         ...searchForm.value,
         projectId: projectId.value,
         contractId: contractId.value
@@ -411,7 +436,7 @@ const tableSelection = (rows) => {
 const addEditFormModal = ref(false)
 const formModalTitle = ref('新增')
 const addFormModalClick = () => {
-    const { data } = nodeItemInfo.value
+    const {data} = nodeItemInfo.value
     if (data?.id) {
         addEditFormModel.value = {
             nodeId: data.id, trialType: data.nodeName, status: 1
@@ -444,8 +469,8 @@ const addEditFormModalClose = () => {
 //类型tab数据和相关处理
 const tabTypeKey = ref('tab1')
 const tabTypeTab = ref([
-    {key:'tab1',  name: '基础信息'},
-    {key:'tab2', name: '检查结论'},
+    {key: 'tab1', name: '基础信息'},
+    {key: 'tab2', name: '检查结论'},
 ]);
 const tabTypeChange = (item) => {
     tabTypeKey.value = item?.key
@@ -460,7 +485,7 @@ const addEditFormRules = {
         trigger: 'blur',
         message: "请输入委托单位"
     },
-        entrustNo: {
+    entrustNo: {
         required: true,
         trigger: 'blur',
         message: "请输入编号"
@@ -470,15 +495,15 @@ const addEditFormRules = {
         trigger: 'blur',
         message: "请输入报告编号"
     },
-    
+
 }
 
 //新增/编辑/复制弹窗 保存
 const addEditFormLoading = ref(false)
 const addEditFormClick = async () => {
-     let validate
-    if(addEditFormRef.value!==null){
-          validate= await formValidate(addEditFormRef.value)
+    let validate
+    if (addEditFormRef.value !== null) {
+        validate = await formValidate(addEditFormRef.value)
     }
 
     if (validate) {
@@ -487,21 +512,21 @@ const addEditFormClick = async () => {
         } else {
             await submitFormApi()
         }
-    }else if(validate===undefined){
-         window?.$message?.warning('请输入表单所需必填项')
+    } else if (validate === undefined) {
+        window?.$message?.warning('请输入表单所需必填项')
     }
 }
 
 //新增、编辑 提交保存
 const submitFormApi = async () => {
     addEditFormLoading.value = true
-    const { error, code } = await dataApi.submitForm({
+    const {error, code} = await dataApi.submitForm({
         ...addEditFormModel.value,
         projectId: projectId.value,
         contractId: contractId.value
     })
     //处理数据
-   
+
     if (!error && code === 200) {
         window?.$message?.success('操作成功')
         addEditFormModal.value = false
@@ -510,7 +535,7 @@ const submitFormApi = async () => {
         }, 1000);
         await getTableData()
     }
-     addEditFormLoading.value = false
+    addEditFormLoading.value = false
 }
 
 //复制
@@ -529,13 +554,13 @@ const copyTableModalClick = () => {
 //复制提交保存
 const copyFormApi = async () => {
     addEditFormLoading.value = true
-    const { error, code } = await dataApi.copyData({
+    const {error, code} = await dataApi.copyData({
         ...addEditFormModel.value,
         projectId: projectId.value,
         contractId: contractId.value
     })
     //处理数据
-  
+
     if (!error && code === 200) {
         window?.$message?.success('操作成功')
         addEditFormModal.value = false
@@ -544,14 +569,14 @@ const copyFormApi = async () => {
         }, 1000);
         await getTableData()
     }
-     addEditFormLoading.value = false
+    addEditFormLoading.value = false
 }
 
 //批量复制 提交保存
 const copyLoading = ref(false)
 const batchCopyFormApi = async (ids) => {
     copyLoading.value = true
-    const { error, code } = await dataApi.copyData({
+    const {error, code} = await dataApi.copyData({
         projectId: projectId.value,
         contractId: contractId.value,
         ids: ids,
@@ -574,10 +599,10 @@ const delModalClick = () => {
 //批量删除
 const tableRemoveData = async () => {
     const rows = tableCheckedKeys.value
-    if (rows.length > 0 ) {
+    if (rows.length > 0) {
         const ids = rowsToId(rows)
         //删除请求
-        const { error, code } = await dataApi.removeData({
+        const {error, code} = await dataApi.removeData({
             projectId: projectId.value,
             contractId: contractId.value,
             ids: ids,
@@ -619,27 +644,27 @@ const pageSampleChange = ({current, size}) => {
 
 //关联进场材料数据
 const linksSampleTableColumn = ref([
-    {key:'materialName', name: '取样名称'},
-    {key:'samplingDate', name: '取样日期'},
-    {key:'specificationNumber', name: '样品编号'},
-    {key:'specificationModel', name: '规格型号'},
-    {key:'materialCount', name: '试样数量'},
-    {key:'calculationUnit', name: '计算单位'},
-    {key:'proposedPosition', name: '拟用部位'},
-    {key:'representativeCount', name: '代表数量'},
-    {key:'userName', name: '取样人'},
-    {key:'action', name: '操作'},
-    
+    {key: 'materialName', name: '取样名称'},
+    {key: 'samplingDate', name: '取样日期'},
+    {key: 'specificationNumber', name: '样品编号'},
+    {key: 'specificationModel', name: '规格型号'},
+    {key: 'materialCount', name: '试样数量'},
+    {key: 'calculationUnit', name: '计算单位'},
+    {key: 'proposedPosition', name: '拟用部位'},
+    {key: 'representativeCount', name: '代表数量'},
+    {key: 'userName', name: '取样人'},
+    {key: 'action', name: '操作'},
+
 ])
 const linksSampleTableData = ref([])
 
 //获取关联数据
 const linksSampleTableLoading = ref(false)
 const getLinksSampleTable = async () => {
-    const { nodeId } = searchSampleForm.value
+    const {nodeId} = searchSampleForm.value
     if (nodeId) {
         linksSampleTableLoading.value = true
-        const { error, code, data } = await samplingApi.queryPage({
+        const {error, code, data} = await samplingApi.queryPage({
             ...searchSampleForm.value,
             projectId: projectId.value,
             contractId: contractId.value
@@ -688,7 +713,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         let diffVal = ve.clientX - leftNum;
-        if(diffVal >= 260 && diffVal <= 700) {
+        if (diffVal >= 260 && diffVal <= 700) {
             leftWidth.value = diffVal;
         }
     }

+ 25 - 24
src/views/tentative/laboratory/print.vue

@@ -1,24 +1,24 @@
 <template>
     <div class="hc-page-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
+        <div :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
                     <!-- <WbsTree :autoExpandKeys="treeAutoExpandKeys" :projectId="projectId" :contractId="contractId" isColor @nodeTap="wbsElTreeClick"/> -->
-                     <TestTree
+                    <TestTree
                         :autoExpandKeys="treeAutoExpandKeys"
                         :projectId="projectId"
+                        :tenantId="userInfo?.tenant_id"
                         :wbsTempId="projectInfo?.referenceWbsTemplateIdTrial"
                         :wbsType="2"
-                        :tenantId="userInfo?.tenant_id"
                         @nodeTap="wbsElTreeClick"/>
                 </el-scrollbar>
             </div>
@@ -29,19 +29,20 @@
             <HcCard :scrollbar="false" actionSize="lg">
                 <template #header>
                     <HcTooltip keys="tentative_laboratory_print_print">
-                        <el-button hc-btn :loading="printLoading" @click="batchPrint()">
-                            <HcIcon name="printer" />
+                        <el-button :loading="printLoading" hc-btn @click="batchPrint()">
+                            <HcIcon name="printer"/>
                             <span>打印</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_laboratory_print_print_all">
-                        <el-button hc-btn :loading="allprintLoading" @click="batchPrintall()">
-                            <HcIcon name="printer" fill />
+                        <el-button :loading="allprintLoading" hc-btn @click="batchPrintall()">
+                            <HcIcon fill name="printer"/>
                             <span>全部打印</span>
                         </el-button>
                     </HcTooltip>
                 </template>
-                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection"/>
+                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck
+                         @selection-change="tableSelection"/>
                 <template #action>
                     <HcPages :pages="searchForm" @change="pageChange"/>
                 </template>
@@ -55,9 +56,9 @@ import {ref, watch, onMounted} from "vue";
 import {useAppStore} from "~src/store";
 import WbsTree from "../../data-fill/components/WbsTree.vue"
 import TestTree from "../material/components/TestTree.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import dataApi from "~api/tentative/laboratory/print"
-import {getArrValue, getArrKeyValue, isIdCard, formValidate,isString} from "vue-utils-plus"
+import {getArrValue, getArrKeyValue, isIdCard, formValidate, isString} from "vue-utils-plus"
 
 //变量
 const useAppState = useAppStore()
@@ -74,7 +75,7 @@ watch(() => [
 })
 
 //自动展开缓存
-const treeAutoExpandKeys = ref(getStoreData('wbsTreeExpandKeys') || [])
+const treeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
 
 //渲染完成
 onMounted(() => {
@@ -91,17 +92,17 @@ const searchForm = ref({
 const primaryKeyId = ref('')
 const nodeItemInfo = ref({})
 const nodeDataInfo = ref({})
-const clicID=ref('')
+const clicID = ref('')
 //树被点击
 const wbsElTreeClick = ({node, data, keys}) => {
     nodeItemInfo.value = node
     nodeDataInfo.value = data
     primaryKeyId.value = data['primaryKeyId'] || ''
-    clicID.value=data['id']||''
-    console.log(data,'dtat');
+    clicID.value = data['id'] || ''
+    console.log(data, 'dtat');
     //缓存自动展开
     treeAutoExpandKeys.value = keys
-    setStoreData('wbsTreeExpandKeys',keys)
+    setStoreValue('wbsTreeExpandKeys', keys)
     //改变搜索表单数据
     searchForm.value.wbsId = projectInfo?.value.referenceWbsTemplateIdTrial
     //searchForm.value.contractIdRelation = data['contractIdRelation'] projectInfo?.referenceWbsTemplateIdTrial
@@ -119,7 +120,7 @@ const pageChange = ({current, size}) => {
 //表格数据
 const tableRef = ref(null)
 const tableColumn = ref([
-    {key:'tableName', name: '表名'}
+    {key: 'tableName', name: '表名'}
 ])
 
 //获取数据
@@ -127,9 +128,9 @@ const tableLoading = ref(false)
 const tableData = ref([])
 const getTableData = async () => {
     tableLoading.value = true
-    const { error, code, data } = await dataApi.queryPage({
+    const {error, code, data} = await dataApi.queryPage({
         projectId: projectId.value,
-        parentId:clicID.value,
+        parentId: clicID.value,
         // contractId: contractId.value,
         ...searchForm.value,
     })
@@ -148,7 +149,7 @@ const getTableData = async () => {
 const tableCheckedKeys = ref([]);
 const tableSelection = (rows) => {
     tableCheckedKeys.value = rows.filter((item) => {
-        return (item??'') !== '';
+        return (item ?? '') !== '';
     })
 }
 
@@ -166,7 +167,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         let diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }
@@ -177,7 +178,7 @@ const onmousedown = () => {
 }
 //打印
 const printLoading = ref(false)
-const allprintLoading=ref(false)
+const allprintLoading = ref(false)
 const batchPrint = async () => {
     const rows = tableCheckedKeys.value;
     const ids = rowsToId(rows)
@@ -191,7 +192,7 @@ const batchPrint = async () => {
         window.open(res, '_blank')
     }
 }
-const batchPrintall=async()=>{
+const batchPrintall = async () => {
     const rows = tableData.value;
     const ids = rowsToId(rows)
     //批量下载

+ 98 - 81
src/views/tentative/material/sampling.vue

@@ -1,13 +1,13 @@
 <template>
     <div class="hc-page-layout-box">
-        <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
+        <div :style="'width:' + leftWidth + 'px;'" class="hc-layout-left-box">
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack"/>
                 </div>
                 <div class="ml-2 project-name-box">
-                    <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
-                    <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
+                    <span class="text-xl text-cut project-alias">{{ projectInfo['projectAlias'] }}</span>
+                    <div class="text-xs text-cut project-name">{{ projectInfo['name'] }}</div>
                 </div>
             </div>
             <div class="hc-tree-box">
@@ -15,9 +15,9 @@
                     <TestTree
                         :autoExpandKeys="treeAutoExpandKeys"
                         :projectId="projectId"
+                        :tenantId="userInfo?.tenant_id"
                         :wbsTempId="projectInfo?.referenceWbsTemplateIdTrial"
                         :wbsType="2"
-                        :tenantId="userInfo?.tenant_id"
                         @nodeTap="wbsElTreeClick"/>
                 </el-scrollbar>
             </div>
@@ -28,37 +28,38 @@
             <HcCard :scrollbar="false" actionSize="lg">
                 <template #header>
                     <HcTooltip keys="tentative_material_sampling_add">
-                        <el-button type="primary" hc-btn :disabled="!primaryKeyId" @click="addFormModalClick">
+                        <el-button :disabled="!primaryKeyId" hc-btn type="primary" @click="addFormModalClick">
                             <HcIcon name="add-circle"/>
                             <span>新增</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_material_sampling_edit">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="editFormModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="editFormModalClick">
                             <HcIcon name="edit"/>
                             <span>编辑</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_material_sampling_copy">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="copyTableModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="copyTableModalClick">
                             <HcIcon name="file-copy-2"/>
                             <span>复制</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_material_sampling_del">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="delModalClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="delModalClick">
                             <HcIcon name="delete-bin-2"/>
                             <span>删除</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_material_sampling_printer">
-                        <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="printerLoading" @click="printerClick">
+                        <el-button :disabled="tableCheckedKeys.length <= 0" :loading="printerLoading" hc-btn
+                                   @click="printerClick">
                             <HcIcon name="printer"/>
                             <span>打印</span>
                         </el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_material_sampling_import">
-                        <el-button hc-btn :disabled="!primaryKeyId" @click="importModalClick">
+                        <el-button :disabled="!primaryKeyId" hc-btn @click="importModalClick">
                             <HcIcon name="folder-upload"/>
                             <span>导入</span>
                         </el-button>
@@ -69,7 +70,8 @@
                         <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate"/>
                     </div>
                     <div class="w-72 ml-2">
-                        <el-input v-model="searchForm.queryValue" placeholder="请输入名称、规格、材料编号进行查询" clearable @keyup="keyUpEvent"/>
+                        <el-input v-model="searchForm.queryValue" clearable
+                                  placeholder="请输入名称、规格、材料编号进行查询" @keyup="keyUpEvent"/>
                     </div>
                     <div class="ml-2">
                         <el-button type="primary" @click="searchClick">
@@ -78,9 +80,12 @@
                         </el-button>
                     </div>
                 </template>
-                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection">
-                    <template #materialCount="{row}">{{row.materialCount===-1?"":row.materialCount}}</template>
-                    <template #representativeCount="{row}">{{row.representativeCount===-1?"":row.representativeCount}}</template>
+                <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck
+                         @selection-change="tableSelection">
+                    <template #materialCount="{row}">{{ row.materialCount === -1 ? "" : row.materialCount }}</template>
+                    <template #representativeCount="{row}">
+                        {{ row.representativeCount === -1 ? "" : row.representativeCount }}
+                    </template>
                 </HcTable>
                 <template #action>
                     <HcPages :pages="searchForm" @change="pageChange"/>
@@ -89,14 +94,17 @@
         </div>
 
         <!--新增/编辑-->
-        <HcDialog :show="addEditFormModal" :title="`${addEditFormModel.id?'编辑':'新增'}样品信息`" widths="50rem" isRowFooter @close="addEditFormModalClose">
-            <el-form ref="addEditFormRef" :model="addEditFormModel" :rules="addEditFormRules" label-width="auto" size="large">
+        <HcDialog :show="addEditFormModal" :title="`${addEditFormModel.id?'编辑':'新增'}样品信息`" isRowFooter
+                  widths="50rem" @close="addEditFormModalClose">
+            <el-form ref="addEditFormRef" :model="addEditFormModel" :rules="addEditFormRules" label-width="auto"
+                     size="large">
                 <div class="hc-form-item">
                     <el-form-item label="样品名称" prop="materialName">
                         <el-input v-model="addEditFormModel.materialName"/>
                     </el-form-item>
                     <el-form-item label="进场日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.mobilizationDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.mobilizationDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                 </div>
                 <div class="hc-form-item">
@@ -104,7 +112,8 @@
                         <el-input v-model="addEditFormModel.specificationNumber"/>
                     </el-form-item>
                     <el-form-item label="取样日期">
-                        <el-date-picker type="date" v-model="addEditFormModel.samplingDate" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
+                        <el-date-picker v-model="addEditFormModel.samplingDate" :clearable="false" class="block"
+                                        type="date" value-format="YYYY-MM-DD"/>
                     </el-form-item>
                 </div>
                 <div class="hc-form-item">
@@ -158,7 +167,7 @@
             </el-form>
             <template #leftRowFooter>
                 <HcTooltip keys="tentative_material_sampling_links">
-                    <el-button type="primary" hc-btn @click="linksApproachModalClick(addEditFormModel.mobilizationId)">
+                    <el-button hc-btn type="primary" @click="linksApproachModalClick(addEditFormModel.mobilizationId)">
                         <HcIcon name="links"/>
                         <span>关联进场材料</span>
                     </el-button>
@@ -169,7 +178,7 @@
                     <HcIcon name="close"/>
                     <span>取消</span>
                 </el-button>
-                <el-button type="primary" hc-btn :loading="addEditFormLoading" @click="addEditFormClick">
+                <el-button :loading="addEditFormLoading" hc-btn type="primary" @click="addEditFormClick">
                     <HcIcon name="check"/>
                     <span>确认</span>
                 </el-button>
@@ -177,13 +186,18 @@
         </HcDialog>
 
         <!--关联进场材料-->
-        <HcDialog :show="linksApproachModal" title="关联进场材料信息" widths="60%" isTable isRowFooter @close="linksApproachModalClose">
-            <HcTable :column="linksApproachTableColumn" :datas="linksApproachTableData" :loading="linksApproachTableLoading" :isIndex="false">
-                <template #materialType="{row}">{{getRowTableMaterialType(row['materialType'])}}</template>
+        <HcDialog :show="linksApproachModal" isRowFooter isTable title="关联进场材料信息" widths="60%"
+                  @close="linksApproachModalClose">
+            <HcTable :column="linksApproachTableColumn" :datas="linksApproachTableData"
+                     :isIndex="false" :loading="linksApproachTableLoading">
+                <template #materialType="{row}">{{ getRowTableMaterialType(row['materialType']) }}</template>
                 <template #action="{row}">
                     <HcTooltip keys="tentative_material_approach_annex">
-                        <el-button type="primary" size="small" plain @click="cancelApproachRow(row)" v-if="mobilizationId === row.id">取消关联</el-button>
-                        <el-button type="primary" size="small" plain @click="linksApproachRow(row)" v-else>关联</el-button>
+                        <el-button v-if="mobilizationId === row.id" plain size="small" type="primary"
+                                   @click="cancelApproachRow(row)">取消关联
+                        </el-button>
+                        <el-button v-else plain size="small" type="primary" @click="linksApproachRow(row)">关联
+                        </el-button>
                     </HcTooltip>
                 </template>
             </HcTable>
@@ -195,7 +209,7 @@
                     <HcIcon name="close"/>
                     <span>取消</span>
                 </el-button>
-                <el-button type="primary" hc-btn @click="linksApproachModalSave">
+                <el-button hc-btn type="primary" @click="linksApproachModalSave">
                     <HcIcon name="check"/>
                     <span>确定</span>
                 </el-button>
@@ -203,20 +217,23 @@
         </HcDialog>
 
         <!--复制样品登记信息-->
-        <HcDialog :show="copyTableModal" title="复制样品登记信息" widths="60rem" isTable :loading="copyTableLoading" @close="copyTableModalClose" @save="copyTableClick">
+        <HcDialog :loading="copyTableLoading" :show="copyTableModal" isTable title="复制样品登记信息" widths="60rem"
+                  @close="copyTableModalClose" @save="copyTableClick">
             <HcTable :column="copyTableColumn" :datas="copyTableData">
                 <template #specificationNumber="{row}">
                     <el-input v-model="row.specificationNumber" placeholder="请输入样品编号"/>
                 </template>
                 <template #action="{index}">
-                    <el-button type="danger" size="small" plain @click="specificationNumberDel(index)">删除</el-button>
+                    <el-button plain size="small" type="danger" @click="specificationNumberDel(index)">删除</el-button>
                 </template>
             </HcTable>
         </HcDialog>
 
         <!--导入-->
-        <HcDialog :show="importModal" title="导入" widths="38rem" isRowFooter @close="importModalClose">
-            <HcDragUpload ref="uploadRef" action="sample/import" :datas="uploadData" @progress="uploadprogress" @finished="uploadFinished" :api="'/api/blade-business/material/'"/>
+        <HcDialog :show="importModal" isRowFooter title="导入" widths="38rem" @close="importModalClose">
+            <HcDragUpload ref="uploadRef" :api="'/api/blade-business/material/'" :datas="uploadData"
+                          action="sample/import"
+                          @finished="uploadFinished" @progress="uploadprogress"/>
             <template #leftRowFooter>
                 <el-button size="large" @click="downloadImportClick">
                     <HcIcon name="download-2"/>
@@ -228,7 +245,7 @@
                     <HcIcon name="close"/>
                     <span>取消导入</span>
                 </el-button>
-                <el-button type="primary" hc-btn :loading="importModalLoading" @click="importModalYesClick">
+                <el-button :loading="importModalLoading" hc-btn type="primary" @click="importModalYesClick">
                     <HcIcon name="folder-upload"/>
                     <span>确认导入</span>
                 </el-button>
@@ -242,7 +259,7 @@
 import {ref, watch, onMounted} from "vue";
 import {useAppStore} from "~src/store";
 import TestTree from "./components/TestTree.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getStoreValue, setStoreValue} from '~src/utils/storage'
 import HcDragUpload from "./components/HcDragUpload.vue"
 import samplingApi from "~api/tentative/material/sampling"
 import approachApi from "~api/tentative/material/approach";
@@ -266,7 +283,7 @@ watch(() => [
 })
 
 //自动展开缓存
-const treeAutoExpandKeys = ref(getStoreData('testTreeExpandKeys') || [])
+const treeAutoExpandKeys = ref(getStoreValue('testTreeExpandKeys') || [])
 
 //渲染完成
 onMounted(() => {
@@ -277,7 +294,7 @@ onMounted(() => {
 //获取材料类型
 const typeData = ref([])
 const getMaterialType = async () => {
-    const { data } = await getDictionary({
+    const {data} = await getDictionary({
         code: 'material_type'
     })
     typeData.value = getArrValue(data)
@@ -298,7 +315,7 @@ const getRowTableMaterialType = (type) => {
 //获取用户列表
 const userListData = ref([])
 const getUserListData = async () => {
-    const { data } = await getContractUserList({
+    const {data} = await getContractUserList({
         contractId: contractId.value
     })
     userListData.value = getArrValue(data)
@@ -322,7 +339,7 @@ const wbsElTreeClick = ({node, data, keys}) => {
     primaryKeyId.value = data['primaryKeyId'] || ''
     //缓存自动展开
     treeAutoExpandKeys.value = keys
-    setStoreData('testTreeExpandKeys',keys)
+    setStoreValue('testTreeExpandKeys', keys)
     //改变搜索表单数据
     searchForm.value.nodeId = data['primaryKeyId'] || ''
     searchForm.value.current = 1;
@@ -336,9 +353,9 @@ const betweenTimeUpdate = ({arr}) => {
     if (arr.length > 0) {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
-    }else{
-         searchForm.value.startTime = ''
-         searchForm.value.endTime =''
+    } else {
+        searchForm.value.startTime = ''
+        searchForm.value.endTime = ''
     }
 }
 
@@ -366,15 +383,15 @@ const pageChange = ({current, size}) => {
 //表格数据
 const tableRef = ref(null)
 const tableColumn = ref([
-    {key:'materialName', name: '取样名称'},
-    {key:'samplingDate', name: '取样日期'},
-    {key:'specificationNumber', name: '样品编号'},
-    {key:'specificationModel', name: '规格型号'},
-    {key:'materialCount', name: '试样数量'},
-    {key:'calculationUnit', name: '计算单位'},
-    {key:'proposedPosition', name: '拟用部位'},
-    {key:'representativeCount', name: '代表数量'},
-    {key:'userName', name: '取样人'}
+    {key: 'materialName', name: '取样名称'},
+    {key: 'samplingDate', name: '取样日期'},
+    {key: 'specificationNumber', name: '样品编号'},
+    {key: 'specificationModel', name: '规格型号'},
+    {key: 'materialCount', name: '试样数量'},
+    {key: 'calculationUnit', name: '计算单位'},
+    {key: 'proposedPosition', name: '拟用部位'},
+    {key: 'representativeCount', name: '代表数量'},
+    {key: 'userName', name: '取样人'}
 ])
 
 //获取数据
@@ -384,7 +401,7 @@ const getTableData = async () => {
     const nodeId = primaryKeyId.value
     if (nodeId) {
         tableLoading.value = true
-        const { error, code, data } = await samplingApi.queryPage({
+        const {error, code, data} = await samplingApi.queryPage({
             projectId: projectId.value,
             contractId: contractId.value,
             nodeId,
@@ -408,7 +425,7 @@ const getTableData = async () => {
 const tableCheckedKeys = ref([]);
 const tableSelection = (rows) => {
     tableCheckedKeys.value = rows.filter((item) => {
-        return (item??'') !== '';
+        return (item ?? '') !== '';
     })
 }
 
@@ -428,8 +445,8 @@ const editFormModalClick = () => {
     const keys = tableCheckedKeys.value
     if (keys.length === 1) {
         addEditFormModel.value = keys[0]
-        addEditFormModel.value.representativeCount=addEditFormModel.value.representativeCount===-1?'':addEditFormModel.value.representativeCount
-        addEditFormModel.value.materialCount=addEditFormModel.value.materialCount===-1?'':addEditFormModel.value.materialCount
+        addEditFormModel.value.representativeCount = addEditFormModel.value.representativeCount === -1 ? '' : addEditFormModel.value.representativeCount
+        addEditFormModel.value.materialCount = addEditFormModel.value.materialCount === -1 ? '' : addEditFormModel.value.materialCount
         addEditFormModal.value = true
     } else if (keys.length > 1) {
         window?.$message?.warning('只能选择一条数据编辑')
@@ -469,7 +486,7 @@ const addEditFormRules = {
 
 //校验材料编号是否唯一
 const verification = async (val) => {
-    const { error, code, data } = await samplingApi.verification({
+    const {error, code, data} = await samplingApi.verification({
         projectId: projectId.value,
         contractId: contractId.value,
         specificationNumber: val,
@@ -489,18 +506,18 @@ const addEditFormClick = async () => {
     const validate = await formValidate(addEditFormRef.value)
     if (validate) {
         addEditFormLoading.value = true
-        const { error, code } = await samplingApi.submitForm({
+        const {error, code} = await samplingApi.submitForm({
             ...addEditFormModel.value,
             projectId: projectId.value,
             contractId: contractId.value
         })
         //处理数据
-      
+
         if (!error && code === 200) {
             window?.$message?.success('操作成功')
             addEditFormModal.value = false
             setTimeout(() => {
-                  addEditFormLoading.value = false
+                addEditFormLoading.value = false
             }, 1000);
             await getTableData()
         }
@@ -510,9 +527,9 @@ const addEditFormClick = async () => {
 
 //复制表格
 const copyTableColumn = ref([
-    {key:'materialName', name: '样品名称'},
-    {key:'specificationNumber', name: '样品编号'},
-    {key:'action', name: '操作', width: 100},
+    {key: 'materialName', name: '样品名称'},
+    {key: 'specificationNumber', name: '样品编号'},
+    {key: 'action', name: '操作', width: 100},
 ])
 const copyTableData = ref([])
 
@@ -555,7 +572,7 @@ const copyTableClick = () => {
 //复制数据请求
 const tableCopyData = async (rows) => {
     copyTableLoading.value = true
-    const { error, code } = await samplingApi.copyData(rows)
+    const {error, code} = await samplingApi.copyData(rows)
     //处理数据
     copyTableLoading.value = false
     if (!error && code === 200) {
@@ -583,10 +600,10 @@ const delModalClick = () => {
 //批量删除
 const tableRemoveData = async () => {
     const rows = tableCheckedKeys.value
-    if (rows.length > 0 ) {
+    if (rows.length > 0) {
         const ids = rowsToId(rows)
         //删除请求
-        const { error, code } = await samplingApi.removeData({
+        const {error, code} = await samplingApi.removeData({
             projectId: projectId.value,
             contractId: contractId.value,
             ids: ids,
@@ -603,11 +620,11 @@ const tableRemoveData = async () => {
 const printerLoading = ref(false)
 const printerClick = async () => {
     const rows = tableCheckedKeys.value
-    if (rows.length > 0 ) {
+    if (rows.length > 0) {
         printerLoading.value = true
         const ids = rowsToId(rows)
         //删除请求
-        const { error, code, data } = await samplingApi.exportPdf({
+        const {error, code, data} = await samplingApi.exportPdf({
             projectId: projectId.value,
             contractId: contractId.value,
             ids: ids,
@@ -615,7 +632,7 @@ const printerClick = async () => {
         //处理数据
         printerLoading.value = false
         if (!error && code === 200) {
-            window.open(data,'_blank')
+            window.open(data, '_blank')
         }
     }
 }
@@ -658,10 +675,10 @@ const importModalClose = () => {
 }
 //更改取样人名称changeusername
 const changeusername = (item) => {
-    userListData.value.forEach((ele)=>{
-        if(item==ele.userId){
-            addEditFormModel.value.userName=ele.userName
-            
+    userListData.value.forEach((ele) => {
+        if (item == ele.userId) {
+            addEditFormModel.value.userName = ele.userName
+
         }
     })
 }
@@ -687,15 +704,15 @@ const linksApproachPageChange = ({current, size}) => {
 
 //关联进场材料数据
 const linksApproachTableColumn = ref([
-    {key:'materialNumber', name: '材料编号'},
-    {key:'mobilizationDate', name: '进场日期'},
-    {key:'materialName', name: '材料名称'},
-    {key:'materialType', name: '材料类型'},
-    {key:'specificationModel', name: '规格型号'},
-    {key:'supplierUnit', name: '供应商单位'},
-    {key:'proposedPosition', name: '拟用部位'},
-    {key:'userName', name: '记录人'},
-    {key:'action', name: '操作', width: 100, fixed: 'right', align: 'center'},
+    {key: 'materialNumber', name: '材料编号'},
+    {key: 'mobilizationDate', name: '进场日期'},
+    {key: 'materialName', name: '材料名称'},
+    {key: 'materialType', name: '材料类型'},
+    {key: 'specificationModel', name: '规格型号'},
+    {key: 'supplierUnit', name: '供应商单位'},
+    {key: 'proposedPosition', name: '拟用部位'},
+    {key: 'userName', name: '记录人'},
+    {key: 'action', name: '操作', width: 100, fixed: 'right', align: 'center'},
 ])
 const linksApproachTableData = ref([])
 
@@ -703,7 +720,7 @@ const linksApproachTableData = ref([])
 const linksApproachTableLoading = ref(false)
 const getApproachTableData = async () => {
     linksApproachTableLoading.value = true
-    const { error, code, data } = await approachApi.queryPage({
+    const {error, code, data} = await approachApi.queryPage({
         projectId: projectId.value,
         contractId: contractId.value,
         ...ApproachSearchForm.value,
@@ -755,7 +772,7 @@ const linksApproachModalClose = () => {
 
 //下载导入模板
 const downloadImportClick = () => {
-    window.open('https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221109/1f1cc15e4e4918d8c793fa6ec0a2ae2a.xlsx','_blank')
+    window.open('https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221109/1f1cc15e4e4918d8c793fa6ec0a2ae2a.xlsx', '_blank')
 }
 
 
@@ -772,7 +789,7 @@ const onmousedown = () => {
     const leftNum = isCollapse.value ? 142 : 272
     document.onmousemove = (ve) => {
         let diffVal = ve.clientX - leftNum;
-        if(diffVal >= 310 && diffVal <= 900) {
+        if (diffVal >= 310 && diffVal <= 900) {
             leftWidth.value = diffVal;
         }
     }

+ 5 - 0
yarn.lock

@@ -803,6 +803,11 @@ js-cookie@^3.0.1:
   resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-3.0.1.tgz#9e39b4c6c2f56563708d7d31f6f5f21873a92414"
   integrity sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==
 
+js-fast-way@^0.0.7:
+  version "0.0.7"
+  resolved "https://registry.yarnpkg.com/js-fast-way/-/js-fast-way-0.0.7.tgz#88573927fce5db4ed3fca648308d07e910af14f1"
+  integrity sha512-RieD7U+ws/qDt9enkfIOphllwu1GX5z1LZl0rjQ2aWpGVJRo00D5TpoAFaookjMChi8XIXYj8bFHD8R1f5vs9w==
+
 js-md5@^0.7.3:
   version "0.7.3"
   resolved "https://registry.yarnpkg.com/js-md5/-/js-md5-0.7.3.tgz#b4f2fbb0b327455f598d6727e38ec272cd09c3f2"

Some files were not shown because too many files changed in this diff