Browse Source

fix:修补成本监审表模版管理显示查看按钮的bug,监审文书号管理权限bug

cb_luzhixia 1 tháng trước cách đây
mục cha
commit
3a926d2eb1

+ 13 - 27
src/views/costAudit/baseInfo/auditDocNoManage/index.vue

@@ -62,11 +62,11 @@
 
         <!-- 操作按钮区域 -->
         <div class="operation-bar">
-          <el-button
-            v-region-permission="{
+          <!-- v-region-permission="{
               category: 'auditDocNoManage',
               action: 'add',
-            }"
+            }" -->
+          <el-button
             plain
             type="success"
             icon="el-icon-circle-plus"
@@ -115,33 +115,25 @@
             </div>
           </template>
           <template #action="{ row }">
-            <el-button
-              v-region-permission="{
+            <!-- v-region-permission="{
                 category: 'auditReviewDocManage',
                 action: 'view',
-              }"
-              type="text"
-              size="mini"
-              @click="handleDetail(row)"
-            >
+              }" -->
+            <el-button type="text" size="mini" @click="handleDetail(row)">
               详情
             </el-button>
-            <el-button
-              v-region-permission="{
+            <!-- v-region-permission="{
                 category: 'auditReviewDocManage',
                 action: 'edit',
-              }"
-              type="text"
-              size="mini"
-              @click="handleEdit(row)"
-            >
+              }" -->
+            <el-button type="text" size="mini" @click="handleEdit(row)">
               修改
             </el-button>
-            <el-button
-              v-region-permission="{
+            <!-- v-region-permission="{
                 category: 'auditReviewDocManage',
                 action: 'delete',
-              }"
+              }" -->
+            <el-button
               type="text"
               size="mini"
               class="delete-btn"
@@ -330,13 +322,7 @@
           </div>
 
           <div slot="footer" class="dialog-footer">
-            <el-button
-              v-if="dialogTitle === '添加'"
-              type="primary"
-              @click="handleSave"
-            >
-              确认
-            </el-button>
+            <el-button type="primary" @click="handleSave">确认</el-button>
             <el-button @click="dialogVisible = false">取消</el-button>
           </div>
         </el-dialog>

+ 24 - 1
src/views/costAudit/baseInfo/costFormManage/index.vue

@@ -88,6 +88,9 @@
           @selection-change="handleSelectionChange"
           @pagination-change="handlePaginationChange"
         >
+          <!-- :table-props="{
+            defaultSort: { prop: 'createTime', order: 'descending' },
+          }" -->
           <template #catalogId="{ row }">
             <span class="table-name-link">
               {{ getCatalogNames(row) }}
@@ -117,6 +120,15 @@
             >
               详情
             </el-button>
+            <!-- 查看内容详情 -->
+            <el-button
+              v-if="!$permission.isAdminOrProvince()"
+              type="text"
+              size="mini"
+              @click="handleDropdownCommand('infoMaintain', row)"
+            >
+              内容详情
+            </el-button>
             <el-button
               v-region-permission="{
                 category: 'costFormManage',
@@ -499,6 +511,18 @@
         ]
       },
     },
+    watch: {
+      // 监听目录数据变化,数据加载完成后处理回显
+      catalogListOptions: {
+        handler(newVal) {
+          if (newVal && newVal.length > 0) {
+            // 数据加载完成后,重新处理value
+            this.batchGetCatalogNames()
+          }
+        },
+        immediate: true,
+      },
+    },
     mounted() {
       // 初始化表单选项
       // this.initFormOptions()
@@ -546,7 +570,6 @@
             if (res.rows.length > 0) {
               this.tableData = res.rows || []
               this.pagination.total = res.total || 0
-              this.batchGetCatalogNames()
             }
           })
           .catch((error) => {

+ 36 - 1
src/views/costAudit/baseInfo/costFormManage/infoMaintain.vue

@@ -40,6 +40,7 @@
     <!-- 操作栏 -->
     <div class="operation-bar">
       <el-button
+        v-region-permission="{ category: 'costFormManage', action: 'add' }"
         plain
         type="success"
         icon="el-icon-circle-plus"
@@ -48,6 +49,11 @@
         添加
       </el-button>
       <el-button
+        v-region-permission="{
+          category: 'costFormManage',
+          action: 'delete',
+          targetData: row,
+        }"
         plain
         type="danger"
         icon="el-icon-delete"
@@ -80,11 +86,23 @@
 
         <!-- 操作列 -->
         <template #action="{ row }">
-          <el-button type="text" size="small" @click="handleViewDetail(row)">
+          <el-button
+            v-region-permission="{
+              category: 'costFormManage',
+              action: 'view',
+            }"
+            type="text"
+            size="small"
+            @click="handleViewDetail(row)"
+          >
             详情
           </el-button>
           <el-button
             v-if="row.status === '-1'"
+            v-region-permission="{
+              category: 'costFormManage',
+              action: 'edit',
+            }"
             type="text"
             size="small"
             @click="handleEdit(row)"
@@ -93,6 +111,11 @@
           </el-button>
           <el-button
             v-if="row.status != '0'"
+            v-region-permission="{
+              category: 'costFormManage',
+              action: 'delete',
+              targetData: row,
+            }"
             class="delete-btn"
             type="text"
             size="small"
@@ -102,6 +125,10 @@
           </el-button>
           <el-button
             v-if="row.status === '-1'"
+            v-region-permission="{
+              category: 'costFormManage',
+              action: 'edit',
+            }"
             type="text"
             size="small"
             @click="handleEditContent(row)"
@@ -110,6 +137,10 @@
           </el-button>
           <el-button
             v-if="row.status === '-1'"
+            v-region-permission="{
+              category: 'costFormManage',
+              action: 'edit',
+            }"
             type="text"
             size="small"
             @click="handleStatus(row)"
@@ -118,6 +149,10 @@
           </el-button>
           <el-button
             v-if="row.status === '0'"
+            v-region-permission="{
+              category: 'costFormManage',
+              action: 'edit',
+            }"
             type="text"
             size="small"
             @click="handleStatus(row)"

+ 15 - 5
src/views/costAudit/baseInfo/costVerifyManage/index.vue

@@ -81,6 +81,7 @@
         :default-sort="{ prop: 'createTime', order: 'descending' }"
         @selection-change="handleSelectionChange"
       >
+        <!-- :default-sort="{ prop: 'createTime', order: 'descending' }" -->
         <el-table-column
           type="selection"
           width="55"
@@ -152,10 +153,11 @@
           prop="createTime"
           label="创建时间"
           width="160"
-          sortable
           show-overflow-tooltip
           align="center"
+          sortable
         >
+          <!-- sortable -->
           <template slot-scope="scope">
             <div>{{ scope.row.createTime.split(' ')[0] }}</div>
             <div>{{ scope.row.createTime.split(' ')[1] }}</div>
@@ -163,7 +165,6 @@
         </el-table-column>
 
         <el-table-column
-          v-if="$permission.isAdminOrProvince()"
           label="操作"
           width="240"
           fixed="right"
@@ -240,7 +241,7 @@
     <el-dialog
       :title="dialogTitle"
       :visible.sync="dialogVisible"
-      width="70%"
+      width="75%"
       :close-on-click-modal="false"
     >
       <el-form
@@ -1159,6 +1160,16 @@
       }
     },
     watch: {
+      // 监听目录数据变化,数据加载完成后处理回显
+      catalogListOptions: {
+        handler(newVal) {
+          if (newVal && newVal.length > 0) {
+            // 数据加载完成后,重新处理value
+            this.batchGetCatalogNames()
+          }
+        },
+        immediate: true,
+      },
       indicatorTableData: {
         handler(newVal) {
           if (this.radioType === 'other' && this.selectedTemplateId) {
@@ -1380,7 +1391,6 @@
           if (res.rows.length > 0) {
             this.tableData = res.rows || []
             this.pagination.total = res.total || 0
-            this.batchGetCatalogNames()
           }
         })
       },
@@ -1520,7 +1530,7 @@
                 this.generateFromSurveyTemplate()
               } else if (this.contentEditForm.createmode == '2') {
                 if (!this.contentEditForm.createtemplateid1) {
-                  this.$message.error('请选择成本调查表模板')
+                  this.$message.error('请选择历史核定模板')
                   return
                 }
                 this.generateFromHistoryTemplate()

+ 15 - 1
src/views/costAudit/baseInfo/financeSheetManage/index.vue

@@ -97,6 +97,9 @@
           @selection-change="handleSelectionChange"
           @pagination-change="handlePaginationChange"
         >
+          <!-- :table-props="{
+            defaultSort: { prop: 'createTime', order: 'descending' },
+          }" -->
           <template #catalogId="{ row }">
             <span class="table-name-link">
               {{ getCatalogNames(row) }}
@@ -501,6 +504,18 @@
         ]
       },
     },
+    watch: {
+      // 监听目录数据变化,数据加载完成后处理回显
+      catalogListOptions: {
+        handler(newVal) {
+          if (newVal && newVal.length > 0) {
+            // 数据加载完成后,重新处理value
+            this.batchGetCatalogNames()
+          }
+        },
+        immediate: true,
+      },
+    },
     mounted() {
       if (!this.$permission.isAdminOrProvince()) {
         this.tableColumns.splice(this.tableColumns.length - 1, 1)
@@ -549,7 +564,6 @@
             if (res.rows.length > 0) {
               this.tableData = res.rows || []
               this.pagination.total = res.total || 0
-              this.batchGetCatalogNames()
             }
           })
           .catch((error) => {

+ 11 - 2
src/views/costAudit/projectInfo/auditProjectManage/annualReviewPlan/index.vue

@@ -624,9 +624,18 @@
         if (this.$permission.isAdminOrProvince()) {
           // 管理员或省级权限,显示所有数据
           arr = this.unitList
-        } else {
+        } else if (user && user.dataScope !== undefined) {
           // 非管理员且数据范围为区域时,筛选出当前用户区域下的市区数据
-          arr = this.unitList.filter((item) => item.areaLevel >= user.dataScope)
+          // 确保areaLevel和dataScope都有有效值再进行比较
+          arr = this.unitList.filter(
+            (item) =>
+              item &&
+              item.areaLevel !== undefined &&
+              item.areaLevel >= user.dataScope
+          )
+        } else {
+          // 如果用户信息或数据范围不存在,返回空数组
+          arr = []
         }
         return arr
       },