Parcourir la source

性能验证修复6577

zhonghuizhen il y a 6 mois
Parent
commit
364b0cbf32
1 fichiers modifiés avec 34 ajouts et 22 suppressions
  1. 34 22
      src/views/business/performance/recordVerify.vue

+ 34 - 22
src/views/business/performance/recordVerify.vue

@@ -110,6 +110,38 @@ export default {
       label: item.userName,
       value: item.userId
     }))
+    
+    // 获取用户角色信息
+    const userRole = this.$store.getters.userInfo.role || []
+    const isSystemAdmin = userRole.some(role => role.alias === 'xtgljs')
+    
+    // 基础搜索表单字段
+    const baseForms = [
+      { prop: 'Q^shi_yan_xiang_mu_^SL', label: '实验项目', fieldType: 'slot', slotName: 'shiYanXiangMuSearch' },
+      { prop: 'Q^xing_neng_zhi_bia^SL', label: '性能指标', fieldType: 'slot', slotName: 'xingNengZhiBiaSearch' },
+      { prop: 'Q^fang_an_lei_xing_^SL', label: '方案类型' },
+      { prop: 'Q^shi_yan_fang_fa_^SL', label: '实验方法', fieldType: 'slot', slotName: 'shiYanFangFaSearch' },
+      { prop: 'Q^yang_ben_lei_xing^SL', label: '样本类型' },
+      {
+        prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
+        label: '创建时间',
+        fieldType: 'daterange'
+      }
+    ]
+    
+    // 只有系统管理员才显示状态字段
+    if (isSystemAdmin) {
+      baseForms.splice(5, 0, {
+        prop: 'Q^shi_fou_guo_shen_^SL',
+        label: '状态',
+        fieldType: 'select',
+        options: [
+          { label: '已编制', value: '已编制' },
+          { label: '已审核', value: '已审核' }
+        ]
+      })
+    }
+    
     return {
       userOption,
       title: '快速评价审核',
@@ -136,27 +168,7 @@ export default {
         searchForm: {
           model: this.searchFormData, // 新增:绑定数据模型
           itemWidth: 250,
-          forms: [
-            { prop: 'Q^shi_yan_xiang_mu_^SL', label: '实验项目', fieldType: 'slot', slotName: 'shiYanXiangMuSearch' },
-            { prop: 'Q^xing_neng_zhi_bia^SL', label: '性能指标', fieldType: 'slot', slotName: 'xingNengZhiBiaSearch' },
-            { prop: 'Q^fang_an_lei_xing_^SL', label: '方案类型' },
-            { prop: 'Q^shi_yan_fang_fa_^SL', label: '实验方法', fieldType: 'slot', slotName: 'shiYanFangFaSearch' },
-            { prop: 'Q^yang_ben_lei_xing^SL', label: '样本类型' },
-            {
-              prop: 'Q^shi_fou_guo_shen_^SL',
-              label: '状态',
-              fieldType: 'select',
-              options: [
-                { label: '已编制', value: '已编制' },
-                { label: '已审核', value: '已审核' }
-              ]
-            },
-            {
-              prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
-              label: '创建时间',
-              fieldType: 'daterange'
-            }
-          ]
+          forms: baseForms
         },
         // 表格字段配置
         columns: [
@@ -457,4 +469,4 @@ export default {
   }
 }
 }
-</style>
+</style>