瀏覽代碼

优化发布规则业务类型参数并统一实验过程/记录类型标识

yusheng 5 月之前
父節點
當前提交
db276d13e2

+ 2 - 2
src/components/releaseRules/index.vue

@@ -304,7 +304,7 @@
       async getTypeList() {
         const { list = [] } = await recordrulesTypePage({
           pageNum: 1,
-          businessType:2,
+          businessType:3,
           size: 99999,
           reportWorkType:this.type
         });
@@ -467,7 +467,7 @@
           enable: 1,
           publishStatus:1,
           reportWorkType: this.type,
-          businessType:2
+          businessType:3
         });
       },
       // 单击获取id

+ 8 - 8
src/views/inspectionTemplate/AddorUpdate.vue

@@ -294,14 +294,14 @@
           <template v-slot:procedureName="{ row, $index }">
             <el-input
               v-model="row.procedureName"
-              @click.native="addTemplate(5, $index)"
+              @click.native="addTemplate(1, $index)"
               readonly
               style="width: calc(100% - 60px)"
             >
             </el-input>
             <el-button
               type="primary"
-              @click="viewTemplate(row.procedureJson.tempJson, 5, $index)"
+              @click="viewTemplate(row.procedureJson.tempJson, 1, $index)"
               v-if="row.procedureJson.tempJson"
               style="margin-left: 8px"
               :disabled="false"
@@ -311,14 +311,14 @@
           <template v-slot:recordName="{ row, $index }">
             <el-input
               v-model="row.recordName"
-              @click.native="addTemplate(7, $index)"
+              @click.native="addTemplate(2, $index)"
               readonly
               style="width: calc(100% - 60px)"
             >
             </el-input>
             <el-button
               type="primary"
-              @click="viewTemplate(row.recordJson.tempJson, 7, $index)"
+              @click="viewTemplate(row.recordJson.tempJson, 2, $index)"
               v-if="row.recordJson.tempJson"
               :disabled="false"
               style="margin-left: 8px"
@@ -673,7 +673,7 @@
         this.$refs.experimentationProcessDialog.open(tempJson);
       },
       releaseRulesSuccess(data) {
-        if (this.releaseRulesType == 5) {
+        if (this.releaseRulesType == 1) {
           this.$set(
             this.dataForm.inspectionItemVOList[this.currentIndex].procedureJson,
             'tempJson',
@@ -686,7 +686,7 @@
           );
         }
 
-        if (this.releaseRulesType == 7) {
+        if (this.releaseRulesType == 2) {
           this.$set(
             this.dataForm.inspectionItemVOList[this.currentIndex].recordJson,
             'tempJson',
@@ -700,7 +700,7 @@
         }
       },
       experimentationSave(tempJson) {
-        if (this.releaseRulesType == 5) {
+        if (this.releaseRulesType == 1) {
           this.$set(
             this.dataForm.inspectionItemVOList[this.currentIndex].procedureJson,
             'tempJson',
@@ -708,7 +708,7 @@
           );
         }
 
-        if (this.releaseRulesType == 7) {
+        if (this.releaseRulesType == 2) {
           this.$set(
             this.dataForm.inspectionItemVOList[this.currentIndex].recordJson,
             'tempJson',

+ 4 - 5
src/views/inspectionWork/components/experimentReport.vue

@@ -254,7 +254,7 @@
         </el-col></el-row
       >
       <header-title title="实验过程"> </header-title>
-      <el-button type="primary" size="small" @click="releaseRulesRefOpen(5)"
+      <el-button type="primary" size="small" @click="releaseRulesRefOpen(1)"
         >选择实验过程</el-button
       >
       <el-row>
@@ -335,7 +335,7 @@
         </template>
       </ele-pro-table>
       <header-title title="实验记录" style="margin-top: 15px"> </header-title>
-      <el-button type="primary" size="small" @click="releaseRulesRefOpen(7)"
+      <el-button type="primary" size="small" @click="releaseRulesRefOpen(2)"
         >选择实验记录</el-button
       >
       <el-row>
@@ -416,7 +416,6 @@
   import ProductModal from '@/views/inspectionProject/components/ProductModal.vue';
   import imgList from '@/components/upload/imgList.vue';
   import detailMixins from '../mixins/detailMixins';
-  import { recordrulesGetById } from '@/api/main/index';
 
   export default {
     components: { experimentationProcess, releaseRules, ProductModal, imgList },
@@ -695,11 +694,11 @@
         this.$refs.releaseRulesRef.open(type);
       },
       releaseRulesSuccess(data) {
-        if (this.releaseRulesType == 5) {
+        if (this.releaseRulesType ==1) {
           this.$refs.experimentationProcess1.init(data.tempJson.tempJson);
         }
 
-        if (this.releaseRulesType == 7) {
+        if (this.releaseRulesType == 2) {
           this.$refs.experimentationProcess2.init(data.tempJson.tempJson);
         }
       },

+ 1 - 1
src/views/inspectionWork/edit.vue

@@ -980,7 +980,7 @@
         ];
         data.type = 2;
         this.form.remainingSampleCount =
-          this.form.remainingSampleCount - data.sampleQuantity;
+          data.remainingSampleCount - data.sampleQuantity;
         this.form.taskMonadInfo = data;
         this.form.hours = data.hours;
       },