Bläddra i källkod

修复实验方法,实验项目在列表和查询条件的显示

zhonghuizhen 6 månader sedan
förälder
incheckning
fbdfc4f1e3

+ 66 - 9
src/views/business/performance/myRecord.vue

@@ -24,12 +24,61 @@
         
         <template slot="xingNengZhiBiaSearch">
           <ibps-link-data
-            v-model="xingNengZhiBiaoValue"
+            v-model="searchFormData.xingNengZhiBiao"
             template-key="xnyzxnzbzly"
             placeholder="请选择"
             style="width: 250px"
           />
         </template>
+
+        <template slot="shiYanFangFaSearch">
+          <ibps-custom-dialog
+            v-model="searchFormData.shiYanFangFa"
+            size="mini"
+            :template-key="'ffglxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验方法"
+            icon="el-icon-search"
+            style="width: 250px"
+          />
+        </template>
+        <template slot="shiYanXiangMuSearch">
+          <ibps-custom-dialog
+            v-model="searchFormData.shiYanXiangMu"
+            size="mini"
+            :template-key="'nlfwxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验项目"
+            icon="el-icon-search"
+            style="width: 250px"
+          />
+        </template>
+        <template slot="shiYanFangFa" slot-scope="{ row }">
+          <ibps-custom-dialog
+            v-model="row.shiYanFangFa"
+            size="mini"
+            :template-key="'ffglxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验方法"
+            icon="el-icon-search"
+            :disabled="true"
+          />
+        </template>
+        <template slot="shiYanXiangMu" slot-scope="{ row }">
+          <ibps-custom-dialog
+            v-model="row.shiYanXiangMu"
+            size="mini"
+            :template-key="'nlfwxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验项目"
+            icon="el-icon-search"
+            :disabled="true"
+          />
+        </template>
       </ibps-crud>
       <ExperimentalView
         v-if="showConfig"
@@ -47,11 +96,13 @@
   import ActionUtils from '@/utils/action'
   import FixHeight from '@/mixins/height'
   import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
+  import IbpsCustomDialog from '@/business/platform/data/templaterender/custom-dialog'
   
   export default {
     components: {
       ExperimentalView: () => import('./experimentalView'),
-      'ibps-link-data': IbpsLinkData
+      'ibps-link-data': IbpsLinkData,
+      IbpsCustomDialog
     },
     mixins: [FixHeight],
     data() {
@@ -69,13 +120,17 @@
         listData: [],
         pagination: {},
         sorts: {},
-        searchFormData: {}, // 新增:为搜索表单创建独立的数据模型
+        searchFormData: {
+          xingNengZhiBiao: '',
+          shiYanFangFa: '',
+          shiYanXiangMu: ''
+        }, // 新增:为搜索表单创建独立的数据模型
         showConfig: false,
         readonly: false,
         params: {},
         targetOption: [],
         methodOption: [],
-        xingNengZhiBiaoValue: '',
+        
         listConfig: {
           toolbars: [{ key: 'search' }, { key: 'remove' }],
           searchForm: {
@@ -83,10 +138,10 @@
             itemWidth: 250,
             forms: [
 
-              { prop: 'Q^shi_yan_xiang_mu_^SL', label: '实验项目' },
+              { 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: '实验方法' },
+              { 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',
@@ -118,8 +173,8 @@
               minWidth: 125
             },
             
-            { prop: 'shiYanXiangMu', label: '实验项目', width: 120 },
-            { prop: 'shiYanFangFa', label: '实验方法', width: 120 },
+            { prop: 'shiYanXiangMu', label: '实验项目', slotName: 'shiYanXiangMu', width: 120 },
+            { prop: 'shiYanFangFa', label: '实验方法', slotName: 'shiYanFangFa', width: 180 },
             { prop: 'yangBenLeiXing', label: '样本类型', width: 100 },
             { prop: 'shiYanYiQi', label: '实验仪器', width: 120 },
             {
@@ -190,7 +245,9 @@
         const searchParam = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
         const { userId } = this.$store.getters || {}
         searchParam['Q^create_by_^S'] = userId
-        searchParam['Q^xing_neng_zhi_bia^SL'] = this.xingNengZhiBiaoValue
+        searchParam['Q^xing_neng_zhi_bia^SL'] = this.searchFormData.xingNengZhiBiao
+        searchParam['Q^shi_yan_xiang_mu_^S'] = this.searchFormData.shiYanXiangMu
+        searchParam['Q^shi_yan_fang_fa_^S'] = this.searchFormData.shiYanFangFa
         return ActionUtils.formatParams(searchParam, this.pagination, this.sorts)
       },
       /**

+ 65 - 9
src/views/business/performance/record.vue

@@ -23,12 +23,61 @@
       </template>
       <template slot="xingNengZhiBiaSearch">
           <ibps-link-data
-            v-model="xingNengZhiBiaoValue"
+            v-model="searchFormData.xingNengZhiBiao"
             template-key="xnyzxnzbzly"
             placeholder="请选择"
             style="width: 250px"
           />
         </template>
+
+        <template slot="shiYanFangFaSearch">
+          <ibps-custom-dialog
+            v-model="searchFormData.shiYanFangFa"
+            size="mini"
+            :template-key="'ffglxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验方法"
+            icon="el-icon-search"
+            style="width: 250px"
+          />
+        </template>
+        <template slot="shiYanXiangMuSearch">
+          <ibps-custom-dialog
+            v-model="searchFormData.shiYanXiangMu"
+            size="mini"
+            :template-key="'nlfwxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验项目"
+            icon="el-icon-search"
+            style="width: 250px"
+          />
+        </template>
+        <template slot="shiYanFangFa" slot-scope="{ row }">
+          <ibps-custom-dialog
+            v-model="row.shiYanFangFa"
+            size="mini"
+            :template-key="'ffglxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验方法"
+            icon="el-icon-search"
+            :disabled="true"
+          />
+        </template>
+        <template slot="shiYanXiangMu" slot-scope="{ row }">
+          <ibps-custom-dialog
+            v-model="row.shiYanXiangMu"
+            size="mini"
+            :template-key="'nlfwxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验项目"
+            icon="el-icon-search"
+            :disabled="true"
+          />
+        </template>
     </ibps-crud>
     <ExperimentalView
       v-if="showConfig"
@@ -46,11 +95,13 @@ import { queryExperimental, removeExperimental } from '@/api/business/pv'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
+import IbpsCustomDialog from '@/business/platform/data/templaterender/custom-dialog'
 
 export default {
   components: {
     ExperimentalView: () => import('./experimentalView'),
-    'ibps-link-data': IbpsLinkData
+    'ibps-link-data': IbpsLinkData,
+    IbpsCustomDialog
   },
   mixins: [FixHeight],
   data() {
@@ -73,17 +124,20 @@ export default {
       params: {},
       targetOption: [],
       methodOption: [],
-      xingNengZhiBiaoValue: '',
+      searchFormData: {
+          xingNengZhiBiao: '',
+          shiYanFangFa: '',
+          shiYanXiangMu: ''
+      }, // 新增:为搜索表单创建独立的数据模型
       listConfig: {
         toolbars: [{ key: 'search' }, { key: 'remove' }],
         searchForm: {
           itemWidth: 250,
           forms: [
-            { prop: 'Q^shi_yan_xiang_mu_^SL', label: '实验项目' },
-            //{ prop: 'Q^xing_neng_zhi_bia^SL', label: '性能指标' },
+            { 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: '实验方法' },
+            { 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',
@@ -114,8 +168,8 @@ export default {
             tags: [],
             minWidth: 125
           },
-          { prop: 'shiYanXiangMu', label: '实验项目', width: 120 },
-          { prop: 'shiYanFangFa', label: '实验方法', width: 120 },
+          { prop: 'shiYanXiangMu', label: '实验项目', slotName: 'shiYanXiangMu', width: 120 },
+          { prop: 'shiYanFangFa', label: '实验方法', slotName: 'shiYanFangFa', width: 180 },
           { prop: 'yangBenLeiXing', label: '样本类型', width: 100 },
           { prop: 'shiYanYiQi', label: '实验仪器', width: 120 },
           {
@@ -182,7 +236,9 @@ export default {
      */
     getSearchFormData() {
       const searchParam = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      searchParam['Q^xing_neng_zhi_bia^SL'] = this.xingNengZhiBiaoValue
+      searchParam['Q^xing_neng_zhi_bia^SL'] = this.searchFormData.xingNengZhiBiao
+      searchParam['Q^shi_yan_xiang_mu_^S'] = this.searchFormData.shiYanXiangMu
+      searchParam['Q^shi_yan_fang_fa_^S'] = this.searchFormData.shiYanFangFa
       return ActionUtils.formatParams(
         searchParam,
         this.pagination,

+ 72 - 16
src/views/business/performance/recordVerify.vue

@@ -22,13 +22,62 @@
         <div>止:{{ scope.row.jieShuShiJian }}</div>
       </template>
       <template slot="xingNengZhiBiaSearch">
-        <ibps-link-data
-          v-model="xingNengZhiBiaoValue"
-          template-key="xnyzxnzbzly"
-          placeholder="请选择"
-          style="width: 250px"
-        />
-      </template>
+          <ibps-link-data
+            v-model="searchFormData.xingNengZhiBiao"
+            template-key="xnyzxnzbzly"
+            placeholder="请选择"
+            style="width: 250px"
+          />
+        </template>
+
+        <template slot="shiYanFangFaSearch">
+          <ibps-custom-dialog
+            v-model="searchFormData.shiYanFangFa"
+            size="mini"
+            :template-key="'ffglxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验方法"
+            icon="el-icon-search"
+            style="width: 250px"
+          />
+        </template>
+        <template slot="shiYanXiangMuSearch">
+          <ibps-custom-dialog
+            v-model="searchFormData.shiYanXiangMu"
+            size="mini"
+            :template-key="'nlfwxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验项目"
+            icon="el-icon-search"
+            style="width: 250px"
+          />
+        </template>
+        <template slot="shiYanFangFa" slot-scope="{ row }">
+          <ibps-custom-dialog
+            v-model="row.shiYanFangFa"
+            size="mini"
+            :template-key="'ffglxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验方法"
+            icon="el-icon-search"
+            :disabled="true"
+          />
+        </template>
+        <template slot="shiYanXiangMu" slot-scope="{ row }">
+          <ibps-custom-dialog
+            v-model="row.shiYanXiangMu"
+            size="mini"
+            :template-key="'nlfwxz'"
+            type="dialog"
+            class="custom-dialog"
+            placeholder="请选择实验项目"
+            icon="el-icon-search"
+            :disabled="true"
+          />
+        </template>
     </ibps-crud>
     <ExperimentalView
       v-if="showConfig"
@@ -46,11 +95,13 @@ import { queryExperimental, removeExperimental } from '@/api/business/pv'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
-
+import IbpsCustomDialog from '@/business/platform/data/templaterender/custom-dialog'
+  
 export default {
   components: {
     ExperimentalView: () => import('./experimentalView'),
-    'ibps-link-data': IbpsLinkData
+    'ibps-link-data': IbpsLinkData,
+    IbpsCustomDialog
   },
   mixins: [FixHeight],
   data() {
@@ -70,23 +121,26 @@ export default {
       sorts: {
         create_time_: "asc"
       },
-      searchFormData: {}, // 新增:为搜索表单创建独立的数据模型
+      searchFormData: {
+          xingNengZhiBiao: '',
+          shiYanFangFa: '',
+          shiYanXiangMu: ''
+        }, // 新增:为搜索表单创建独立的数据模型
       showConfig: false,
       readonly: false,
       params: {},
       targetOption: [],
       methodOption: [],
-      xingNengZhiBiaoValue: '',
       listConfig: {
         toolbars: [{ key: 'search' }, { key: 'remove' }],
         searchForm: {
           model: this.searchFormData, // 新增:绑定数据模型
           itemWidth: 250,
           forms: [
-            { prop: 'Q^shi_yan_xiang_mu_^SL', label: '实验项目' },
+            { 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: '实验方法' },
+            { 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',
@@ -114,8 +168,8 @@ export default {
             minWidth: 125
           },
           
-          { prop: 'shiYanXiangMu', label: '实验项目', width: 120 },
-          { prop: 'shiYanFangFa', label: '实验方法', width: 120 },
+          { prop: 'shiYanXiangMu', label: '实验项目', slotName: 'shiYanXiangMu', width: 120 },
+            { prop: 'shiYanFangFa', label: '实验方法', slotName: 'shiYanFangFa', width: 180 },
           { prop: 'yangBenLeiXing', label: '样本类型', width: 100 },
           { prop: 'shiYanYiQi', label: '实验仪器', width: 120 },
           {
@@ -177,7 +231,9 @@ export default {
      */
      getSearchFormData() {
       const searchParam = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      searchParam['Q^xing_neng_zhi_bia^SL'] = this.xingNengZhiBiaoValue
+      searchParam['Q^xing_neng_zhi_bia^SL'] = this.searchFormData.xingNengZhiBiao
+      searchParam['Q^shi_yan_xiang_mu_^S'] = this.searchFormData.shiYanXiangMu
+      searchParam['Q^shi_yan_fang_fa_^S'] = this.searchFormData.shiYanFangFa
       const userRole = this.$store.getters.userInfo.role || []
       const jsfzrFlag = userRole.some(role => role.alias === 'jsfzr') 
       const zcFlag = userRole.some(role => role.alias === 'zhsfzr')