Selaa lähdekoodia

Merge branch 'test-dev'

# Conflicts:
#	src/api/modules/data-fill/wbs.js
#	src/router/modules/base.js
#	src/views/data-fill/collapse-form/index.vue
#	src/views/data-fill/query.vue
#	src/views/systemService/test.vue
zhuwei 3 päivää sitten
vanhempi
commit
0a6c4e7163

+ 8 - 1
src/api/modules/data-fill/nodebaseinfo.js

@@ -34,7 +34,14 @@ export default {
             params: form,
         })
     },
-    
+    //取消自动获取数据
+    async clearAutomatic(form) {
+        return HcApi({
+            url: '/api/blade-manager/nodebaseinfo/clearAutomatic',
+            method: 'get',
+            params: form,
+        })
+    },
     async getAllNodeBaseInfoByPkeyId(form) {
         return HcApi({
             url: '/api/blade-manager/nodebaseinfo/getAllNodeBaseInfoByPkeyId',

+ 6 - 6
src/api/modules/data-fill/wbs.js

@@ -523,7 +523,7 @@ export default {
         async addBussFileNode(form) {
         return HcApi({
               headers: {
-            'Content-Type': 'multipart/form-data', 
+            'Content-Type': 'multipart/form-data',
         },
             url: '/api/blade-manager/exceltab/add-bussfile-node',
             method: 'post',
@@ -533,7 +533,7 @@ export default {
     async addBussFile(form) {
         return HcApi({
               headers: {
-            'Content-Type': 'multipart/form-data', 
+            'Content-Type': 'multipart/form-data',
         },
             url: '/api/blade-manager/exceltab/add-buss-file',
             method: 'post',
@@ -555,7 +555,7 @@ export default {
     async previewBussfile(form) {
              return HcApi({
               headers: {
-            'Content-Type': 'multipart/form-data', 
+            'Content-Type': 'multipart/form-data',
         },
             url: '/api/blade-manager/exceltab/previewBussfile',
             method: 'post',
@@ -571,7 +571,7 @@ export default {
         })
     },
     //批量插入编号
-    
+
     async batchAddNumbers(form) {
         return HcApi({
             url: '/api/blade-manager/exceltab/batchAddNumbers',
@@ -579,7 +579,7 @@ export default {
             data: form,
         })
     },
-    //获取偏差范围    
+    //获取偏差范围
     async getDeviationRange(form) {
         return HcApi({
             url: '/api/blade-manager/param/getDeviationRange',
@@ -619,7 +619,7 @@ export default {
             params: form,
         })
     },
-     //绑定阶段
+    //绑定阶段
      async batchBind(form, form2) {
         return HcApi({
             url: `/api/blade-manager/wbsDivide/batchBind?contractId=${form2.contractId}&pKeyId=${form2.pKeyId}&projectId=${form2.projectId}`,

+ 8 - 0
src/api/modules/schedule/data.js

@@ -41,4 +41,12 @@ export default {
             params: form,
         })
     },
+    //隐藏
+        async hideProcessMaterial(form) {
+        return HcApi({
+            url: '/api/blade-business/materialProgress/hideProcessMaterial',
+            method: 'get',
+            params: form,
+        })
+    },
 }

+ 1 - 1
src/router/modules/base.js

@@ -530,7 +530,7 @@ export default [
                 meta: { title: '资料检测' },
                 component: () => import('~src/views/systemService/test.vue'),
             },
-           
+
 
 
         ],

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

@@ -773,7 +773,7 @@
         <div class="dialog-content">
             <!-- 提示文本 -->
             <p class="mb-4 text-orange">* 提示:多页导入会自动复制表格生成数据</p>
-        
+
             <!-- 表单内容 -->
             <el-form
                 :model="uploadFileForm"
@@ -781,9 +781,9 @@
                 <el-form-item label="">
                     <el-radio-group v-model="uploadFileForm.selectedOption">
                         <el-radio :value="true">
-                            导入前 <el-input 
-                                v-model="uploadFileForm.pageSize" 
-                                style="width: 120px; display: inline-block" 
+                            导入前 <el-input
+                                v-model="uploadFileForm.pageSize"
+                                style="width: 120px; display: inline-block"
                                 placeholder="请输入页码"
                                 type="number"
                                 min="1"
@@ -1150,7 +1150,7 @@ const isOpen = infos['isOpenRandomNumber'] ?? 0
     newArr.push({ label: '关联试验文件', key: 'file' })
     newArr.push({ label: '公式参数', key: 'formula' })
     newArr.push({ label: '含水率', key: 'water' })
-   
+
     if (isStatus.value !== 3) {
         newArr.push({ label: '清除所有数据', key: 'clear' }),
             newArr.push({ label: '清除字段数据', key: 'clearcur' })
@@ -1165,7 +1165,7 @@ const isOpen = infos['isOpenRandomNumber'] ?? 0
         label: '关联试验文件', key: 'file',
        }]
     }
-    
+
 }
 
 //鼠标右键事件
@@ -1175,7 +1175,7 @@ const tableFormRightTap = (
     index,
 ) => {
     console.log(ele, 'ele')
-    
+
     const { event, KeyName, startPos, endPos, pkeyId, clearFormula, clearautomatic } = ele
      const item = listDatas.value[index]
      console.log(item, 'item')
@@ -1198,9 +1198,9 @@ const tableFormRightTap = (
             label: '恢复公式引用',
             key: 'addGs',
         })
-    }  
+    }
     console.log(clearautomatic, 'clearautomatic')
-    
+
    // 先过滤掉可能存在的"取消自动获取数据"(避免重复添加)
         // tableFormMenu.value = tableFormMenu.value.filter(item => item.key !== 'clearautomatic')
 
@@ -1222,7 +1222,7 @@ const tableFormRightTap = (
         //     }
         // }
 
-     
+
     contextMenuRef.value?.showMenu(event, false) //展开菜单
 }
 const checkKeys = ref([])
@@ -1316,7 +1316,7 @@ const handleMenuSelect = async ({ key }) => {
         //取消公式引用
         handleGsClick(tableFormItemNode.value)
 
-        
+
     } else if (key === 'addGs') {
          tableFormItemNode.value.status = 1
          handleGsClick(tableFormItemNode.value)
@@ -2265,11 +2265,11 @@ const uploadFileClickSave = ()=>{
     if (uploadFileForm.value.selectedOption) {
         if (!uploadFileForm.value.pageSize) {
             window.$message.error('请输入页码')
-            return  
+            return
         }
     } else if (uploadFileForm.value.selectedOption === null) {
         window.$message.error('请选择导入方式')
-        return  
+        return
     } else if (uploadFileForm.value.selectedOption === false) {
         uploadFileForm.value.pageSize = ''
     }
@@ -2603,21 +2603,21 @@ const clearSaveClick = async (type)=>{
                 type:type,
             })
             if (!error && code === 200) {
-                
-                
+
+
                 // listDatas.value[index].isTableRender = false
-                
+
                 // 重新获取表单信息(清除数据后的新数据)
                 await refs?.getTableFormInfo(pkeyId)
                 await nextTick()
-                
+
                 // 重新启用表格渲染
                 listDatas.value[index].isTableRender = true
                 listDatas.value[index].isTableForm = true
-                
+
                 // 获取重新加载后的表单数据
                 const itemFormData = refs?.getFormData()
-                
+
                 // 主动调用保存接口 - 使用重新加载后的数据
                 isRemoveForSubTab.value = 1
                 await tableFormSaveClick(itemFormData)
@@ -2635,7 +2635,7 @@ const clearSaveClick = async (type)=>{
                         item.isTableRender = false
                     })
             }
-            
+
                 if (DragModalTableForm.value.length > 0) {
                     let draindex = arrIndex(
                         DragModalTableForm.value,
@@ -2663,7 +2663,7 @@ const clearSaveClick = async (type)=>{
 
 }
 //公式引用
-const handleGsClick = async (item) => { 
+const handleGsClick = async (item) => {
     const { error, code, msg } = await wbsApi.setFormulaReference({
         key:item.KeyName,
         initTableName:item.initTableName,
@@ -2676,21 +2676,21 @@ const handleGsClick = async (item) => {
     })
     if (!error && code === 200) {
       window.$message.success(msg)
-    } 
+    }
 }
 const clearAutomatic = async ()=>{
     const { KeyName, pkeyId } = tableFormItemNode.value
     const refs = await getFormRef(pkeyId)
     const itemFormData = refs?.getFormData()
-   
+
 
     const { error, code, msg, data } = await nodeBaseApi.clearAutomatic(
 
         {
             nodeId: treeId.value,
             pkeyId: pkeyId,
-           
-          
+
+
             paramName:KeyName,
         },
     )

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

@@ -1094,7 +1094,7 @@
                         </el-button>
                     </div>
                 </div>
-                <div class="mt-2 text-right">
+                <div class="download-btn-container mt-2 text-right">
                     <el-button hc-btn type="primary" :loading="downLoadTemplateLoading" @click="downLoadTemplate">
                         <HcIcon name="download-2" />
                         导入模板
@@ -3096,4 +3096,8 @@ const uploadProgress = ref(false)
 
 <style lang="scss" scoped>
 @import "../../styles/data-fill/division.scss";
+.download-btn-container {
+  overflow: hidden; /* 限制溢出,避免尺寸变化导致滚动 */
+  white-space: nowrap; /* 防止按钮内容换行导致高度变化 */
+}
 </style>

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

@@ -68,7 +68,7 @@
                                 <span>上报</span>
                             </el-button>
                         </HcTooltip>
-          
+
                         <HcTooltip keys="query_download">
                             <el-button
                                 v-if="!website.localModel"
@@ -80,7 +80,7 @@
                             </el-button>
                             <el-button
                                 v-else
-                   
+
                                 :disabled="tableCheckedKeys.length <= 0 " :loading="downloadLoading" hc-btn
                                 color="#A16222" @click="batchDownload"
                             >
@@ -123,13 +123,13 @@
                         </HcTooltip>
                         <el-button :disabled="tableCheckedKeys.length <= 0" :loading="signLoading" hc-btn type="primary" @click="resignClick">  <HcIcon name="repeat" />re-sign</el-button>
                         <HcTooltip keys="data-query-once-agin">
-                            <el-button 
+                            <el-button
                                 v-if="userInfo.dept_id === '1536982621165592577'"
-                                :disabled="tableCheckedKeys.length <= 0 || userInfo.dept_id !== '1536982621165592577'" 
-                                :loading="signLoading" 
-                                hc-btn type="warning" 
+                                :disabled="tableCheckedKeys.length <= 0 || userInfo.dept_id !== '1536982621165592577'"
+                                :loading="signLoading"
+                                hc-btn type="warning"
                                 @click="resignClick1"
-                            >  
+                            >
                                 <HcIcon name="repeat" />
                                 一键电签
                             </el-button>
@@ -144,8 +144,8 @@
                             </el-button>
                         </HcTooltip>
                         <HcTooltip keys="data-query-resign-title">
-                            <el-button 
-                               
+                            <el-button
+
                                 :disabled="tableCheckedKeys.length <= 0"
                                 hc-btn
                                 color="#3F9EFF" style="color: white;" :loading="ruleModalSaveLoad" @click="resignTitleClick"
@@ -183,7 +183,7 @@
                                     />
                                 </el-select>
                             </div>
-                           
+
                             <div class="ml-2 w-40">
                                 <el-select v-model="searchForm.sourceType" clearable placeholder="文件类型">
                                     <el-option
@@ -339,8 +339,8 @@
                 <el-checkbox-group v-model="checkTaskUserIds">
                     <el-checkbox v-for="item in tableCheckedKeys[0].waitingUserList" :key="item.id" :label="item.waitingUserName" :value="item.userId">
                         <el-tag
-                                   
-                                 
+
+
                             :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`"
                             class="mx-1" effect="dark"
                         >
@@ -370,13 +370,13 @@
                     </div>
                 </div>
             </template>
-         
+
             <div class="flex items-center justify-between">
                 <div>批量设置:</div>
-                <el-select 
-                    v-model="setValue" 
-                    placeholder="请选择" 
-                      
+                <el-select
+                    v-model="setValue"
+                    placeholder="请选择"
+
                     multiple
                     clearable
                     class="custom-select flex-1"
@@ -392,16 +392,16 @@
                 </el-select>
                 <el-button type="primary" hc-btn size="small" class="ml-2" :disabled="setValue.length === 0" @click="batchSetRule">设置</el-button>
             </div>
-            
+
             <div style="position: relative; height: 440px" class="mt-2">
                 <HcTable v-loading="ruleTableLoading" :column="ruleTableColumn" :datas="ruleTableData" :loading="ruleTableLoading">
                     <template #rule="{ row }">
                         <div class="flex items-center">
                             <span class="text-red">*</span>
-                            <el-select 
+                            <el-select
                                 v-model="row.rule"
-                                :class="{ 'error-border': !row.rule || row.rule.length === 0 }" 
-                                placeholder="请选择" 
+                                :class="{ 'error-border': !row.rule || row.rule.length === 0 }"
+                                placeholder="请选择"
                                 multiple
                                 clearable
                                 class="custom-select"
@@ -479,7 +479,7 @@ onMounted(() => {
     isCanDown.value = !website.localModel
     const treeWidth = useAppState.getTreeWidth
     leftWidth.value = isNullES(treeWidth) || treeWidth <= 0 ? 440 : treeWidth
-    
+
 })
 
 //获取
@@ -581,7 +581,7 @@ const wbsElTreeClick = ({ node, data, keys }) => {
     searchForm.value.current = 1
     getFileUser()
     getTableData()
-  
+
 }
 
 //搜索条件
@@ -593,7 +593,7 @@ const reportBatchData = ref([]) //上报批次
 //获取所有填报人
 const getFileUser = async () => {
     const info = nodeDataInfo.value
-   
+
     if (!info || !info?.contractIdRelation) {
         window.$message?.warning('请先点击左侧节点')
         return
@@ -1061,7 +1061,7 @@ const leftWidth = ref(300)
 watch(
     () => leftWidth.value,
     (diffVal) => {
-     
+
         setUserConfig(diffVal)
     },
 )
@@ -1100,7 +1100,7 @@ const resignModalRadio = ref(0)
 const resignClick = async ()=>{
     const rows = tableCheckedKeys.value
     if (rows.length <= 0) {
-        window.$message?.warning('勾选错误!只能操作待审批和已审批数据')
+        window.$message?.warning('只能操作待审批和已审批数据')
         return
     }
 
@@ -1114,7 +1114,7 @@ const signClick = async () => {
     const taskIds = arrToKey(rows, 'taskId')
     const idsArr = taskIds.split(',')
     let isCan = idsArr.some(ele=>!ele)
-  
+
     if (isCan) {
         window.$message?.warning('参数异常,暂不支持该操作')
         return
@@ -1148,7 +1148,7 @@ const saveAginClick = async ()=>{
 const rows = tableCheckedKeys.value
 const taskIds = rows.map(row => row.taskId)
 if (taskIds.some(id => id)) {
-    window.$message?.warning('勾选错误!只能操作未上报的数据')
+    window.$message?.warning('只能操作未上报的数据')
     return
 }
 const objArr = rows.map(row => ({
@@ -1174,15 +1174,15 @@ const saveAginLoading = ref(false)
 //重置文件题名
 const resignTitleModal = ref(false)
 const resignTitleClick = async ()=>{
- 
+
     // resignTitleModal.value = true
      if (isTemplateType.value) {
-       
+
         resignTitleModal.value = true
      } else {
         resignTitleSave()
      }
-    
+
 }
 const resignTitleSave = async ()=>{
       const rows = tableCheckedKeys.value
@@ -1222,12 +1222,12 @@ const changeRuleClick = async ()=>{
 
     let arr = tableCheckedKeys.value.map(item=>{
         return {
-         
+
             wbsId:item.wbsId,
             projectId:projectId.value,
             id:item.id,
 
-           
+
         }
     })
     let arr1 = await getRuleListData(arr)
@@ -1242,9 +1242,9 @@ const changeRuleClick = async ()=>{
             }
         }
     // ruleTableData.value = arr
- 
-    
-    
+
+
+
 }
 const ruleModal = ref(false)
 const ruleModalSaveLoad = ref(false)
@@ -1283,7 +1283,7 @@ const ruleModalSave = async ()=>{
        resignTitleModal.value = false
 
 
-    } 
+    }
 }
 const setValue = ref('')
 
@@ -1303,16 +1303,16 @@ const batchSetRule = async ()=>{
         let matchedItems = [] // 存储匹配的项
         if (ele.rule.length > 0) {
             // 1. 找出所有匹配的项
-            matchedItems = nodeTypeData.value.filter(dataItem => 
+            matchedItems = nodeTypeData.value.filter(dataItem =>
                 ele.rule.includes(dataItem.value),
             )
             // 2. 按原始 sort 排序
             matchedItems.sort((a, b) => a.sort - b.sort)
-            
+
             // 3. 更新 ele.rule 为排序后的 value 数组
             ele.rule = matchedItems.map(item => item.value)
-            
-           
+
+
         }
    })
 
@@ -1339,43 +1339,43 @@ const batchSetRule = async ()=>{
 
 
 const ruleChange = async (ele) => {
-  
-    
+
+
     let str = ''
     let matchedItems = [] // 存储匹配的项
-    
+
     if (ele.rule.length > 0) {
         // 1. 找出所有匹配的项
-        matchedItems = nodeTypeData.value.filter(dataItem => 
+        matchedItems = nodeTypeData.value.filter(dataItem =>
             ele.rule.includes(dataItem.value),
         )
-        
+
         // 2. 按原始 sort 排序
         matchedItems.sort((a, b) => a.sort - b.sort)
-        
+
         // 3. 更新 ele.rule 为排序后的 value 数组
         ele.rule = matchedItems.map(item => item.value)
-        
+
         // 4. 生成连接字符串
         str = ele.rule.join('-')
     }
- 
-    
+
+
     // 5. 调用API
     let arr = [{
         wbsId: ele.wbsId,
         nameRule: str,
         projectId: projectId.value,
         id:ele.id,
-      
+
     }]
-    
+
     let afterArr = await getRuleValue(arr)
     ele.newNodeName = afterArr[0].newNodeName
 }
 const getRuleLoad = ref(false)
 const ruleTableLoading = ref(false)
-const getRuleListData = async (arr) => { 
+const getRuleListData = async (arr) => {
 
     ruleTableLoading.value = true
     const { error, code, msg, data } = await queryApi.getNameRuleList(arr)
@@ -1388,7 +1388,7 @@ const getRuleListData = async (arr) => {
     }
 
 }
-const getRuleValue = async (arr) => { 
+const getRuleValue = async (arr) => {
   // 检查 arr 中每一项的 nameRule 是否有值
   const hasInvalidItem = arr.some(item => !item.nameRule || item.nameRule.length === 0)
   if (hasInvalidItem) {
@@ -1417,13 +1417,13 @@ const getWbsNodeTypeApi = async () => {
     let newArr = []
     const newData = getArrValue(data)
     for (let i = 0; i < newData.length; i++) {
-      
+
              newArr.push({
             label: newData[i]['dictValue'],
             value:newData[i]['dictKey'],
         })
-        
-       
+
+
     }
     nodeTypeData.value = newArr
 }
@@ -1433,19 +1433,19 @@ const resignModalRadio1 = ref(0)
 const resignClick1 = ()=>{
      const rows = tableCheckedKeys.value
     if (rows.length <= 0) {
-        window.$message?.warning('勾选错误!只能操作待审批和已审批数据')
+        window.$message?.warning('只能操作待审批和已审批数据')
         return
     }
         //获取任务id
     const taskIds = arrToKey(rows, 'taskId')
     const idsArr = taskIds.split(',')
     let isCan = idsArr.some(ele=>!ele)
-  
+
     if (isCan) {
-        window.$message?.warning('勾选错误!只能操作待审批和已审批数据')
+        window.$message?.warning('只能操作待审批和已审批数据')
         return
     }
-    
+
 
     resignModal1.value = true
 }
@@ -1464,7 +1464,7 @@ const signClick1 = async () => {
 
 
        if (resignModalRadio1.value === 1) {
-            if (checkTaskUserIds.value.length === 0) { 
+            if (checkTaskUserIds.value.length === 0) {
                 return window.$message?.warning('请选择用户')
             }
         } else {
@@ -1473,13 +1473,13 @@ const signClick1 = async () => {
     //发起请求
     signLoading1.value = true
 
-    
+
     const { error, code, msg } = await queryApi.reSigningEVisa1({
         userIds: checkTaskUserIds.value.length === 1 ? checkTaskUserIds.value[0] : checkTaskUserIds.value.join(','),
 
         ids: ids,
-      
-   
+
+
     })
     //处理数据
     signLoading1.value = false
@@ -1488,7 +1488,7 @@ const signClick1 = async () => {
         window.$message?.success(msg ?? '提交成功,请请耐心等待重签,可继续操作其它的功能。')
            cancelresign1()
         getTableData().then()
-    } 
+    }
 
 }
 const checkTaskUserIds = ref([])
@@ -1538,7 +1538,7 @@ const checkTaskUserIds = ref([])
         overflow-y: hidden;
         overflow-x: hidden;
         flex-wrap: nowrap;
-     
+
     }
 }
 </style>

+ 122 - 10
src/views/schedule/data.vue

@@ -3,14 +3,28 @@
         <div v-if="contractInfo?.contractType === 2 || contractInfo?.contractType === 3">
             <hc-new-switch :datas="contractTypeTab" :keys="contractTypeTabKey" size="default" @change="contractTypeTabChange" />
         </div>
-        <div v-loading="isProcessLoading" class="hc-round-chart mt-14px">
-            <el-row :gutter="30">
-                <template v-for="(item, index) in processMaterialList" :key="index">
+       
+        <div v-loading="isProcessLoading" class="hc-round-chart mt-14px flex">
+            <div v-if="isHideBtn" class="open-btn" @click="toggleShowAll">
+                <el-link type="primary">
+                    <HcIcon :name="isShowAll ? 'arrow-left-s' : 'arrow-right-s'" />
+                </el-link>
+            </div>
+            <el-row v-if="filteredProcessList.length > 0" :gutter="30" class="flex-1">
+                <template v-for="(item, index) in filteredProcessList" :key="index">
                     <el-col :span="isProcessSpan">
-                        <div class="hc-round-chart-card-box">
+                        <div class="hc-round-chart-card-box position-relative">
                             <div class="hc-card-content-box">
-                                <div class="card-title">{{ item.title }}</div>
-                                <div class="card-ratio-box">
+                                <div class="card-title flex">
+                                    {{ item.title }}
+                                    <div v-if="isHideBtn" class="eye-icon-container pos-absolute">
+                                        <el-link type="warning" @click="hideData(item)">
+                                            <HcIcon v-if="item.isHide === 0" name="eye-off" />
+                                            <HcIcon v-else name="eye" />
+                                        </el-link>
+                                    </div>
+                                </div>
+                                <div class="card-ratio-box mt-1">
                                     <div class="ratio-num">{{ item.ratio }}</div>
                                     <div class="ratio-text">
                                         <div class="unit">%</div>
@@ -37,6 +51,9 @@
                     </el-col>
                 </template>
             </el-row>
+            <div v-else class="w-full">
+                <hc-empty title="暂无数据" />
+            </div>
         </div>
         <div class="hc-chart-flex">
             <el-row :gutter="30" class="h-full">
@@ -44,10 +61,10 @@
                     <div class="hc-report-chart-card-box">
                         <div class="hc-chart-title">
                             <span class="title">报表资料审批统计</span>
-                            <span class="hc-chart-text">(已审批{{ materialList }}份)</span>
+                            <span class="hc-chart-text">(已审批{{ filteredMaterialList }}份)</span>
                         </div>
                         <div class="hc-report-chart-box">
-                            <ReportChart :datas="processMaterialStatusList" />
+                            <ReportChart :datas="filteredProcessMaterialStatusList" />
                         </div>
                     </div>
                 </el-col>
@@ -85,7 +102,7 @@
 </template>
 
 <script setup>
-import { onActivated, ref } from 'vue'
+import { computed, onActivated, ref } from 'vue'
 import { useRouter } from 'vue-router'
 import { useAppStore } from '~src/store'
 import { getArrValue, useClick } from 'js-fast-way'
@@ -93,6 +110,7 @@ import RoundChart from './components/echarts/RoundChart.vue'
 import ReportChart from './components/echarts/ReportChart.vue'
 import MediaChart from './components/echarts/MediaChart.vue'
 import DataApi from '~api/schedule/data'
+import { btnAuth } from '~uti/btn-auth'
 
 //变量
 const router = useRouter()
@@ -100,7 +118,7 @@ const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId)
 const contractId = ref(useAppState.getContractId)
 const contractInfo = ref(useAppState.getContractInfo)
-const isCollapse = ref(useAppState.getCollapse)
+const isHideBtn = btnAuth('schedule-data-hide')
 
 //渲染完成
 onActivated(async () => {
@@ -121,11 +139,14 @@ const contractTypeTabChange = ({ key }) => {
     queryMaterialProgress()
     queryMaterialProgressStatus()
     queryImageClassification()
+    isShowAll.value = false
 }
 
 //获取合同段类型
 const getContractTypeKey = () => {
     const { contractType } = contractInfo.value
+    console.log(contractType, 'contractType')
+    
     if (contractType === 2 || contractType === 3) {
         return contractTypeTabKey.value ?? '1'
     } else {
@@ -196,6 +217,20 @@ const queryMaterialProgressStatus = async () => {
         processMaterialStatusList.value = []
     }
 }
+// 根据显示状态过滤报表资料审批统计数据
+const filteredProcessMaterialStatusList = computed(() => {
+    if (isShowAll.value) {
+        return processMaterialStatusList.value
+    } else {
+        return processMaterialStatusList.value.filter(item => item.isHide === 0)
+    }
+})
+
+// 根据显示状态重新计算已审批份数
+const filteredMaterialList = computed(() => {
+    const list = filteredProcessMaterialStatusList.value
+    return list.reduce((total, item) => total + (item.approvalAmount || 0), 0)
+})
 
 //声像媒体资料统计
 const isImageClassLoading = ref(false)
@@ -231,8 +266,85 @@ const queryImageClassification = async () => {
 const toTableClick = () => {
     router.push({ path: '/schedule/table' })
 }
+const hideLoad = ref(false)
+const hideData = async (item)=>{
+  
+    
+        hideLoad.value = true
+     const { contractType } = contractInfo.value
+    
+    const { error, code, msg } = await DataApi.hideProcessMaterial({
+       hideType:item.hideType,
+        contractId: contractId.value,
+        classifyType:contractType === 1 ? contractType : contractTypeTabKey.value,
+        type:item.isHide === 0 ? 1 : 0,
+    })
+    //处理数据
+    hideLoad.value = false
+    if (!error && code === 200) {
+       window.$message.success(msg)
+        queryMaterialProgress()
+        queryMaterialProgressStatus()
+    }
+}
+
+// 新增一个控制是否显示所有卡片的变量
+const isShowAll = ref(false)
+
+// 切换显示所有/仅显示未隐藏卡片
+const toggleShowAll = () => {
+    isShowAll.value = !isShowAll.value
+}
+
+
+// 根据显示状态过滤并排序卡片列表
+const filteredProcessList = computed(() => {
+  if (isShowAll.value) {
+    // 显示所有卡片时,先排isHide===0的,再排其他
+    return [...processMaterialList.value].sort((a, b) => {
+      // 核心排序逻辑:isHide为0的排在前面
+      if (a.isHide === 1 && b.isHide !== 1) return -1
+      if (a.isHide !== 1 && b.isHide === 1) return 1
+      return 0 // 状态相同则保持原有顺序
+    })
+  } else {
+    // 仅显示未隐藏卡片(本身已经都是isHide===0,无需排序)
+    return processMaterialList.value.filter(item => item.isHide === 0)
+  }
+})
 </script>
 
 <style lang="scss" scoped>
+/* 默认隐藏闭眼图标容器 */
+.hc-round-chart-card-box .eye-icon-container {
+    display: none;
+}
+
+/* 鼠标移入卡片时显示闭眼图标 */
+.hc-round-chart-card-box:hover .eye-icon-container {
+    display: block;
+}
+
+/* 可选:添加过渡效果让显示更平滑 */
+.eye-icon-container {
+    transition: opacity 0.3s ease;
+    opacity: 0;
+    right: -140px;
+    top:-10px
+}
+
+.hc-round-chart-card-box:hover .eye-icon-container {
+    opacity: 1;
+}
+.open-btn{
+    width: 14px;
+    height: 177px;
+    background-color: #D4DDE9;
+    border-radius: 5px;
+    margin-right: 8px;
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+}
 @import "../../styles/schedule/hc-data.scss";
 </style>

+ 94 - 94
src/views/systemService/test.vue

@@ -29,7 +29,7 @@
                             :auto-expand-keys="treeAutoExpandKeys"
                             default-expand-all
                             :menus="treeMenus"
-                            @node-tap="wbsElTreeClick" 
+                            @node-tap="wbsElTreeClick"
                             @menu-tap="ElTreeMenuClick"
                         />
                     </el-scrollbar>
@@ -41,7 +41,7 @@
                             is-type
                             :menus="treeMenus"
                             @load="treeLoadNode"
-                            @node-tap="wbsElTreeClick" 
+                            @node-tap="wbsElTreeClick"
                             @menu-tap="ElTreeMenuClick"
                         />
                     </el-scrollbar>
@@ -168,8 +168,8 @@
                             <HcIcon name="send-plane-2" />
                             <span>上报</span>
                         </el-button>
-              
-                     
+
+
                         <el-button :disabled="tableCheckedKeys.length <= 0" :loading="reportLoading" hc-btn color="#FF976A" style="color: white;" @click="reportModalClick">
                             <HcIcon name="send-plane-2" />
                             <span>上报且审批</span>
@@ -183,11 +183,11 @@
                             <span>save-again</span>
                         </el-button>
                         <el-button :disabled="tableCheckedKeys.length <= 0" :loading="signLoading" hc-btn type="primary" @click="resignClick">  <HcIcon name="repeat" />re-sign</el-button>
-                 
-                     
+
+
                         <el-button
                             hc-btn
-                            color="#52B200" 
+                            color="#52B200"
                             style="color: white;"
                             :disabled="tableCheckedKeys.length <= 0 "
                             @click="batchOnlineClick"
@@ -195,15 +195,15 @@
                             <HcIcon name="survey" />
                             <span>电签检测</span>
                         </el-button>
-                      
+
                         <HcTooltip keys="data-query-once-agin">
-                            <el-button 
+                            <el-button
                                 v-if="userInfo.dept_id === '1536982621165592577'"
-                                :disabled="tableCheckedKeys.length <= 0 || userInfo.dept_id !== '1536982621165592577'" 
-                                :loading="signLoading" 
-                                hc-btn type="warning" 
+                                :disabled="tableCheckedKeys.length <= 0 || userInfo.dept_id !== '1536982621165592577'"
+                                :loading="signLoading"
+                                hc-btn type="warning"
                                 @click="resignClick1"
-                            >  
+                            >
                                 <HcIcon name="repeat" />
                                 一键电签
                             </el-button>
@@ -237,7 +237,7 @@
                                     />
                                 </el-select>
                             </div>
-                           
+
                             <div class="ml-2 w-40">
                                 <el-select v-model="searchForm.sourceType" clearable placeholder="文件类型">
                                     <el-option
@@ -411,8 +411,8 @@
                 <el-checkbox-group v-model="checkTaskUserIds">
                     <el-checkbox v-for="item in tableCheckedKeys[0].waitingUserList" :key="item.id" :label="item.waitingUserName" :value="item.userId">
                         <el-tag
-                                   
-                                 
+
+
                             :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`"
                             class="mx-1" effect="dark"
                         >
@@ -442,13 +442,13 @@
                     </div>
                 </div>
             </template>
-         
+
             <div class="flex items-center justify-between">
                 <div>批量设置:</div>
-                <el-select 
-                    v-model="setValue" 
-                    placeholder="请选择" 
-                      
+                <el-select
+                    v-model="setValue"
+                    placeholder="请选择"
+
                     multiple
                     clearable
                     class="custom-select flex-1"
@@ -464,16 +464,16 @@
                 </el-select>
                 <el-button type="primary" hc-btn size="small" class="ml-2" :disabled="setValue.length === 0" @click="batchSetRule">设置</el-button>
             </div>
-            
+
             <div style="position: relative; height: 440px" class="mt-2">
                 <HcTable v-loading="ruleTableLoading" :column="ruleTableColumn" :datas="ruleTableData" :loading="ruleTableLoading">
                     <template #rule="{ row }">
                         <div class="flex items-center">
                             <span class="text-red">*</span>
-                            <el-select 
+                            <el-select
                                 v-model="row.rule"
-                                :class="{ 'error-border': !row.rule || row.rule.length === 0 }" 
-                                placeholder="请选择" 
+                                :class="{ 'error-border': !row.rule || row.rule.length === 0 }"
+                                placeholder="请选择"
                                 multiple
                                 clearable
                                 class="custom-select"
@@ -543,7 +543,7 @@ const treeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
 
 //渲染完成
 onMounted(() => {
-    // getOtherPaceInfoData()
+    getOtherPaceInfoData()
     getCheckPdfPaceInfoData()
     getFileUser()
     getReportNumber()
@@ -553,7 +553,7 @@ onMounted(() => {
     isCanDown.value = !website.localModel
     const treeWidth = useAppState.getTreeWidth
     leftWidth.value = isNullES(treeWidth) || treeWidth <= 0 ? 440 : treeWidth
-    
+
 })
 
 //获取
@@ -655,7 +655,7 @@ const wbsElTreeClick = ({ node, data, keys }) => {
     searchForm.value.current = 1
     getFileUser()
     getTableData()
-  
+
 }
 
 //搜索条件
@@ -667,7 +667,7 @@ const reportBatchData = ref([]) //上报批次
 //获取所有填报人
 const getFileUser = async () => {
     const info = nodeDataInfo.value
-   
+
     if (!info ) {
         window.$message?.warning('请先点击左侧节点')
         return
@@ -806,7 +806,7 @@ const tableListRef = ref(null)
 const tableLoading = ref(false)
 const tableListColumn = ref([
     { key: 'name', name: '文件题名' },
- 
+
     { key: 'taskStatusStr', name: '资料状态', width: 100, align: 'center' },
     { key: 'chekStatus', name: '检测状态', width: 100, align: 'center' },
       { key: 'checkDesc', name: '检测描述', align: 'center' },
@@ -1124,7 +1124,7 @@ const leftWidth = ref(300)
 watch(
     () => leftWidth.value,
     (diffVal) => {
-     
+
         setUserConfig(diffVal)
     },
 )
@@ -1163,9 +1163,9 @@ const resignModalRadio = ref(0)
 const resignClick = async ()=>{
     const rows = tableCheckedKeys.value
 
-    
+
     if (rows.length <= 0) {
-        window.$message?.warning('勾选错误!只能操作待审批和已审批数据')
+        window.$message?.warning('只能操作待审批和已审批数据')
         return
     }
 
@@ -1179,7 +1179,7 @@ const signClick = async () => {
     const taskIds = arrToKey(rows, 'taskId')
     const idsArr = taskIds.split(',')
     let isCan = idsArr.some(ele=>!ele)
-  
+
     if (isCan) {
         window.$message?.warning('该数据不存在任务ID,请重新勾选数据!')
 
@@ -1215,7 +1215,7 @@ const saveAginClick = async ()=>{
 const rows = tableCheckedKeys.value
 const taskIds = rows.map(row => row.taskId)
 if (taskIds.some(id => id)) {
-    window.$message?.warning('勾选错误!只能操作未上报的数据')
+    window.$message?.warning('只能操作未上报的数据')
     return
 }
 const objArr = rows.map(row => ({
@@ -1242,15 +1242,15 @@ const saveAginLoading = ref(false)
 //重置文件题名
 const resignTitleModal = ref(false)
 const resignTitleClick = async ()=>{
- 
+
     // resignTitleModal.value = true
      if (isTemplateType.value) {
-       
+
         resignTitleModal.value = true
      } else {
         resignTitleSave()
      }
-    
+
 }
 const resignTitleSave = async ()=>{
       const rows = tableCheckedKeys.value
@@ -1290,11 +1290,11 @@ const changeRuleClick = async ()=>{
 
     let arr = tableCheckedKeys.value.map(item=>{
         return {
-         
+
             wbsId:item.wbsId,
             projectId:projectId.value,
 
-           
+
         }
     })
     let arr1 = await getRuleListData(arr)
@@ -1309,9 +1309,9 @@ const changeRuleClick = async ()=>{
             }
         }
     // ruleTableData.value = arr
- 
-    
-    
+
+
+
 }
 const ruleModal = ref(false)
 const ruleModalSaveLoad = ref(false)
@@ -1350,7 +1350,7 @@ const ruleModalSave = async ()=>{
        resignTitleModal.value = false
 
 
-    } 
+    }
 }
 const setValue = ref('')
 
@@ -1370,16 +1370,16 @@ const batchSetRule = async ()=>{
         let matchedItems = [] // 存储匹配的项
         if (ele.rule.length > 0) {
             // 1. 找出所有匹配的项
-            matchedItems = nodeTypeData.value.filter(dataItem => 
+            matchedItems = nodeTypeData.value.filter(dataItem =>
                 ele.rule.includes(dataItem.value),
             )
             // 2. 按原始 sort 排序
             matchedItems.sort((a, b) => a.sort - b.sort)
-            
+
             // 3. 更新 ele.rule 为排序后的 value 数组
             ele.rule = matchedItems.map(item => item.value)
-            
-           
+
+
         }
    })
 
@@ -1407,36 +1407,36 @@ const batchSetRule = async ()=>{
 const ruleChange = async (ele) => {
     let str = ''
     let matchedItems = [] // 存储匹配的项
-    
+
     if (ele.rule.length > 0) {
         // 1. 找出所有匹配的项
-        matchedItems = nodeTypeData.value.filter(dataItem => 
+        matchedItems = nodeTypeData.value.filter(dataItem =>
             ele.rule.includes(dataItem.value),
         )
-        
+
         // 2. 按原始 sort 排序
         matchedItems.sort((a, b) => a.sort - b.sort)
-        
+
         // 3. 更新 ele.rule 为排序后的 value 数组
         ele.rule = matchedItems.map(item => item.value)
-        
+
         // 4. 生成连接字符串
         str = ele.rule.join('-')
     }
- 
-    
+
+
     // 5. 调用API
     let arr = [{
         wbsId: ele.wbsId,
         nameRule: str,
     }]
-    
+
     let afterArr = await getRuleValue(arr)
     ele.newNodeName = afterArr[0].newNodeName
 }
 const getRuleLoad = ref(false)
 const ruleTableLoading = ref(false)
-const getRuleListData = async (arr) => { 
+const getRuleListData = async (arr) => {
 
     ruleTableLoading.value = true
     const { error, code, msg, data } = await queryApi.getNameRuleList(arr)
@@ -1449,7 +1449,7 @@ const getRuleListData = async (arr) => {
     }
 
 }
-const getRuleValue = async (arr) => { 
+const getRuleValue = async (arr) => {
   // 检查 arr 中每一项的 nameRule 是否有值
   const hasInvalidItem = arr.some(item => !item.nameRule || item.nameRule.length === 0)
   if (hasInvalidItem) {
@@ -1478,13 +1478,13 @@ const getWbsNodeTypeApi = async () => {
     let newArr = []
     const newData = getArrValue(data)
     for (let i = 0; i < newData.length; i++) {
-      
+
              newArr.push({
             label: newData[i]['dictValue'],
             value:newData[i]['dictKey'],
         })
-        
-       
+
+
     }
     nodeTypeData.value = newArr
 }
@@ -1494,20 +1494,20 @@ const resignModalRadio1 = ref(0)
 const resignClick1 = ()=>{
      const rows = tableCheckedKeys.value
     if (rows.length <= 0) {
-        window.$message?.warning('勾选错误!只能操作待审批和已审批数据')
+        window.$message?.warning('只能操作待审批和已审批数据')
         return
     }
       //获取任务id
     const taskIds = arrToKey(rows, 'taskId')
     const idsArr = taskIds.split(',')
     let isCan = idsArr.some(ele=>!ele)
-  
+
     if (isCan) {
-        window.$message?.warning('勾选错误!只能操作待审批和已审批数据')
+        window.$message?.warning('只能操作待审批和已审批数据')
         return
     }
-    
-    
+
+
 
     resignModal1.value = true
 }
@@ -1525,7 +1525,7 @@ const signClick1 = async () => {
        const ids = arrToId(rows)
 
        if (resignModalRadio1.value === 1) {
-            if (checkTaskUserIds.value.length === 0) { 
+            if (checkTaskUserIds.value.length === 0) {
                 return window.$message?.warning('请选择用户')
             }
         } else {
@@ -1534,13 +1534,13 @@ const signClick1 = async () => {
     //发起请求
     signLoading1.value = true
 
-    
+
     const { error, code, msg } = await queryApi.reSigningEVisa1({
         userIds: checkTaskUserIds.value.length === 1 ? checkTaskUserIds.value[0] : checkTaskUserIds.value.join(','),
 
         ids: ids,
-      
-   
+
+
     })
     //处理数据
     signLoading1.value = false
@@ -1550,7 +1550,7 @@ const signClick1 = async () => {
            cancelresign1()
         getTableData().then()
          getOtherPaceInfoData()
-    } 
+    }
 
 }
 const checkTaskUserIds = ref([])
@@ -1568,7 +1568,7 @@ const batchOnlineClick = async ()=>{
         type:2,
         ids,
       },
-   
+
     )
      batchOnlineClickLoad.value = false
     //处理数据
@@ -1578,10 +1578,10 @@ const batchOnlineClick = async ()=>{
         window.$message?.success(msg )
          getCheckPdfPaceInfoData()
         getTableData()
-    } 
-    
+    }
+
+
 
-   
 }
 const treeMenus = ref([
     {
@@ -1589,7 +1589,7 @@ const treeMenus = ref([
                 label: '电签检测',
                 key: 'add1',
             },
-           
+
 ])
 
 const ElTreeMenuClick = async ({ key, node, data, keys }) => {
@@ -1610,7 +1610,7 @@ const ElTreeMenuClick = async ({ key, node, data, keys }) => {
                             type:1,
                             ids:nodeDataInfo.value.primaryKeyId,
                         },
-                    
+
                         )
                         batchOnlineClickLoad.value = false
                         //处理数据
@@ -1621,13 +1621,13 @@ const ElTreeMenuClick = async ({ key, node, data, keys }) => {
                             getCheckPdfPaceInfoData().then()
 
                             getTableData().then()
-                        } 
+                        }
                 }
             },
         })
-        
+
     }
-   
+
 }
 //获取进度状态
 const progressObj = ref({
@@ -1637,16 +1637,16 @@ const progressObj = ref({
 })
 const getCheckPdfPaceInfoData = async () => {
            const { error, code, data, msg } = await queryApi.getCheckPdfPaceInfo({
-           
+
             contractId: contractId.value,
-          
+
             classify: contractTypeTabKey.value,
         })
         //处理数据
-      
+
         if (!error && code === 200) {
             progressObj.value = getObjValue(data)
-            
+
         } else {
           progressObj.value = {
             finishCount:0,
@@ -1654,7 +1654,7 @@ const getCheckPdfPaceInfoData = async () => {
             pace:0,
         }
         }
- 
+
 }
 const saveAgainData = ref(
     {
@@ -1679,13 +1679,13 @@ const electronicSignData = ref(
 )
 const getOtherPaceInfoData = async () => {
            const { error, code, data, msg } = await queryApi.getTaskProgress({
-           
+
             contractId: contractId.value,
-          
+
             projectId:projectId.value,
         })
         //处理数据
-      
+
         if (!error && code === 200) {
            console.log(data, 'data')
            const resData = getObjValue(data)
@@ -1704,8 +1704,8 @@ const getOtherPaceInfoData = async () => {
                 pace:0,
                 finishCount:0,
            }
-       
-            
+
+
         } else {
             saveAgainData.value = {
                 totalCount:0,
@@ -1722,9 +1722,9 @@ const getOtherPaceInfoData = async () => {
                 pace:0,
                 finishCount:0,
             }
-      
+
         }
- 
+
 }
 </script>
 
@@ -1740,7 +1740,7 @@ const getOtherPaceInfoData = async () => {
 .bg-primary-color {
     background-color: var(--el-color-primary) ;
 }
-.basic-info-box { 
+.basic-info-box {
     height: calc(100% - 77px);
 }
 </style>
@@ -1775,7 +1775,7 @@ const getOtherPaceInfoData = async () => {
         overflow-y: hidden;
         overflow-x: hidden;
         flex-wrap: nowrap;
-     
+
     }
 }
 </style>