Ver código fonte

feat: 新增专业上下限参数类型

yusheng 2 meses atrás
pai
commit
1704a66295

+ 208 - 187
src/views/inspectionClassify/components/qualityItem.vue

@@ -1,28 +1,44 @@
 <template>
-  <ele-modal :title="title" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"
-    :close-on-press-escape="false" append-to-body width="85%" :maxable="true">
+  <ele-modal
+    :title="title"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="85%"
+    :maxable="true"
+  >
     <el-card shadow="never">
       <!-- 数据表格 -->
       <user-search @search="reload" />
 
-      <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :selection.sync="selection" row-key="id">
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        :selection.sync="selection"
+        row-key="id"
+      >
         <template v-slot:textType="{ row }">
           {{
             row.textType == 1
               ? '数值'
               : row.textType == 2
-                ? '选择'
-                : row.textType == 3
-                  ? '上下限'
-                  : row.textType == 4
-                    ? '规格'
-                    : row.textType == 5
-                      ? '时间'
-                      : row.textType == 6
-                        ? '范围'
-                        : row.textType == 7
-                          ? '文本'
-                          : ''
+              ? '选择'
+              : row.textType == 3
+              ? '上下限'
+              : row.textType == 8
+              ? '专业上下限'
+              : row.textType == 4
+              ? '规格'
+              : row.textType == 5
+              ? '时间'
+              : row.textType == 6
+              ? '范围'
+              : row.textType == 7
+              ? '文本'
+              : ''
           }}
         </template>
         <template v-slot:defaultValue="{ row }">
@@ -35,8 +51,13 @@
         </template>
 
         <template v-slot:toolList="{ row }">
-          <div style="display: inline-block" v-for="(item, idx) in row.toolList" :key="idx">{{ item.name }}
-            <span v-if="row.toolList && idx != row.toolList.length - 1">,
+          <div
+            style="display: inline-block"
+            v-for="(item, idx) in row.toolList"
+            :key="idx"
+            >{{ item.name }}
+            <span v-if="row.toolList && idx != row.toolList.length - 1"
+              >,
             </span>
           </div>
         </template>
@@ -51,184 +72,184 @@
 </template>
 
 <script>
-import { getList } from '@/api/inspectionProject';
-import UserSearch from '@/views/inspectionProject/components/user-search.vue';
-import dictMixins from '@/mixins/dictMixins';
-export default {
-  components: {
-    UserSearch
-  },
-  mixins: [dictMixins],
-
-  data() {
-    return {
-      visible: false,
-      title: '选择检测项',
-
-      columns: [
-        {
-          columnKey: 'selection',
-          type: 'selection',
-          width: 45,
-          align: 'center',
-          reserveSelection: true
-        },
-        {
-          prop: 'inspectionCode',
-          label: '参数编码',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 110
-        },
-        {
-          prop: 'inspectionName',
-          label: '参数名称',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 110
-        },
-
-        {
-          prop: 'textType',
-          label: '参数类型',
-          showOverflowTooltip: true,
-          align: 'center',
-          slot: 'textType',
-          minWidth: 110
-        },
-        {
-          prop: 'defaultValue',
-          label: '默认值',
-          align: 'center',
-          showOverflowTooltip: true,
-          slot: 'defaultValue'
-        },
-        {
-          prop: 'maxValue',
-          label: '参数上限',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'minValue',
-          label: '参数下限',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'unitName',
-          label: '参数单位',
-          align: 'center',
-        },
-
-        // {
-        //   label: '工艺要求',
-        //   prop: 'inspectionStandard',
-        //   formatter: (row, column, cellValue) => {
-        //     return row.symbol + ' ' + cellValue + ' ' + row.unit;
-        //   },
-        //   minWidth: 150
-        // },
-
-        {
-          label: '标准类型',
-          prop: 'type',
-          slot: 'type'
-        },
-
-        {
-          prop: 'qualityStandardName',
-          label: '标准名称',
-          align: 'center',
-          minWidth: 110
-        },
-
-        {
-          prop: 'toolList',
-          slot: 'toolList',
-          label: '工具名称',
-          align: 'center',
-          minWidth: 150
-        },
-
-        {
-          label: '状态',
-          prop: 'status',
-          formatter: (row, column, cellValue) => {
-            return cellValue == 1 ? '启用' : cellValue === 0 ? '停用' : '';
-          }
-        },
-
-        {
-          label: '备注',
-          prop: 'inspectionRemark'
-        }
-      ],
-
-      // 表格选中数据
-      selection: [],
-
-      processData: [],
-      categoryId: null
-    };
-  },
-
-  watch: {},
-  methods: {
-    open(categoryId) {
-      this.categoryId = categoryId;
-      this.visible = true;
+  import { getList } from '@/api/inspectionProject';
+  import UserSearch from '@/views/inspectionProject/components/user-search.vue';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
+    components: {
+      UserSearch
     },
+    mixins: [dictMixins],
+
+    data() {
+      return {
+        visible: false,
+        title: '选择检测项',
+
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            reserveSelection: true
+          },
+          {
+            prop: 'inspectionCode',
+            label: '参数编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'inspectionName',
+            label: '参数名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+
+          {
+            prop: 'textType',
+            label: '参数类型',
+            showOverflowTooltip: true,
+            align: 'center',
+            slot: 'textType',
+            minWidth: 110
+          },
+          {
+            prop: 'defaultValue',
+            label: '默认值',
+            align: 'center',
+            showOverflowTooltip: true,
+            slot: 'defaultValue'
+          },
+          {
+            prop: 'maxValue',
+            label: '参数上限',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'minValue',
+            label: '参数下限',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'unitName',
+            label: '参数单位',
+            align: 'center'
+          },
+
+          // {
+          //   label: '工艺要求',
+          //   prop: 'inspectionStandard',
+          //   formatter: (row, column, cellValue) => {
+          //     return row.symbol + ' ' + cellValue + ' ' + row.unit;
+          //   },
+          //   minWidth: 150
+          // },
+
+          {
+            label: '标准类型',
+            prop: 'type',
+            slot: 'type'
+          },
+
+          {
+            prop: 'qualityStandardName',
+            label: '标准名称',
+            align: 'center',
+            minWidth: 110
+          },
+
+          {
+            prop: 'toolList',
+            slot: 'toolList',
+            label: '工具名称',
+            align: 'center',
+            minWidth: 150
+          },
+
+          {
+            label: '状态',
+            prop: 'status',
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1 ? '启用' : cellValue === 0 ? '停用' : '';
+            }
+          },
+
+          {
+            label: '备注',
+            prop: 'inspectionRemark'
+          }
+        ],
 
-    /* 表格数据源 */
-    async datasource({ page, limit, where }) {
-      const res = await getList({
-        ...where,
-        categoryLevelId: this.categoryId,
-        pageNum: page,
-        size: limit
-      });
-
-      return res;
-    },
+        // 表格选中数据
+        selection: [],
 
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({ page: 1, where: where });
+        processData: [],
+        categoryId: null
+      };
     },
 
-    handleClose() {
-      this.visible = false;
-      this.$refs.table.setSelectedRows([]);
-      this.selection = [];
-    },
-    selected() {
-      if (!this.selection.length) {
-        this.$message.error('请至少选择一条数据');
-        return;
-      }
-      let _arr = [];
-      _arr = this.selection.map((m) => {
-        return {
-          inspectionItemId: m.id,
-          status: 1,
-          mode: null,
-          version: null,
+    watch: {},
+    methods: {
+      open(categoryId) {
+        this.categoryId = categoryId;
+        this.visible = true;
+      },
+
+      /* 表格数据源 */
+      async datasource({ page, limit, where }) {
+        const res = await getList({
+          ...where,
           categoryLevelId: this.categoryId,
-          rootCategoryLevelId: '12'
-        };
-      });
-
-      this.$emit('chooseProcess', _arr);
-      this.handleClose();
+          pageNum: page,
+          size: limit
+        });
+
+        return res;
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
+
+      handleClose() {
+        this.visible = false;
+        this.$refs.table.setSelectedRows([]);
+        this.selection = [];
+      },
+      selected() {
+        if (!this.selection.length) {
+          this.$message.error('请至少选择一条数据');
+          return;
+        }
+        let _arr = [];
+        _arr = this.selection.map((m) => {
+          return {
+            inspectionItemId: m.id,
+            status: 1,
+            mode: null,
+            version: null,
+            categoryLevelId: this.categoryId,
+            rootCategoryLevelId: '12'
+          };
+        });
+
+        this.$emit('chooseProcess', _arr);
+        this.handleClose();
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.btns {
-  text-align: center;
-  padding: 10px 0;
-}
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
 </style>

+ 2 - 0
src/views/inspectionClassify/components/user-list.vue

@@ -35,6 +35,8 @@
             ? '选择'
             : row.itemVO.textType == 3
             ? '上下限'
+            : row.itemVO.textType == 8
+            ? '专业上下限'
             : row.itemVO.textType == 4
             ? '规格'
             : row.itemVO.textType == 5

+ 23 - 15
src/views/inspectionProject/components/user-edit.vue

@@ -29,7 +29,7 @@
               />
             </el-select>
           </el-form-item>
-          
+
           <el-form-item label="标准代码:">
             <el-input
               v-model="form.qualityStandardCode"
@@ -75,6 +75,7 @@
               <el-option label="数值" :value="'1'" />
               <el-option label="选择" :value="'2'" />
               <el-option label="上下限" :value="'3'" />
+              <el-option label="专业上下限" :value="'8'" />
               <el-option label="规格" :value="'4'" />
               <el-option label="时间" :value="'5'" />
               <el-option label="范围" :value="'6'" />
@@ -88,6 +89,7 @@
           v-if="
             form.textType == 1 ||
             form.textType == 3 ||
+            form.textType == 8 ||
             form.textType == 4 ||
             form.textType == 5
           "
@@ -98,6 +100,7 @@
               clearable
               dictName="数学字符"
               v-model="form.symbol"
+              :disabled="form.textType == 8"
             ></DictSelection>
             <el-input
               v-model="form.defaultValue"
@@ -148,12 +151,12 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12" v-if="form.textType == 3">
+        <el-col :span="12" v-if="form.textType == 3||form.textType == 8">
           <el-form-item label="参数上限:">
             <el-input placeholder="请输入" v-model="form.maxValue" />
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="form.textType == 3">
+        <el-col :span="12" v-if="form.textType == 3||form.textType == 8">
           <el-form-item label="参数下限:">
             <el-input placeholder="请输入" v-model="form.minValue" />
           </el-form-item>
@@ -436,20 +439,25 @@
           this.form.qualityStandardCode = '';
           return;
         }
-        
+
         const selectedStandard = this.qualityStandardList.find(
-          item => item.id === this.form.qualityStandardId
+          (item) => item.id === this.form.qualityStandardId
         );
-        
-        this.form.qualityStandardCode = selectedStandard ? selectedStandard.standardCode : '';
+
+        this.form.qualityStandardCode = selectedStandard
+          ? selectedStandard.standardCode
+          : '';
       },
-      
+
       textTypeChange() {
         this.form.maxValue = '';
         this.form.minValue = '';
-        this.form.symbol=''
+        this.form.symbol = '';
+        if (this.form.textType == 8) {
+          this.form.symbol = '=';
+        }
       },
-      
+
       defaultInput(value) {
         console.log(this.form.symbol, '0000 symbol');
         if (this.form.textType !== '1') {
@@ -471,7 +479,7 @@
         }
         this.form.defaultValue = filteredValue;
       },
-      
+
       save() {
         this.$refs.form.validate((valid) => {
           if (!valid) {
@@ -524,7 +532,7 @@
             });
         });
       },
-      
+
       updateVisible(value) {
         this.$emit('update:visible', value);
       },
@@ -561,7 +569,7 @@
       addPostscript() {
         this.form.postscriptList.push({ sort: null, content: '' });
       },
-      
+
       removePostscript(idx, row) {
         this.$confirm(`是否删除这个注意事项?`).then(async () => {
           this.form.postscriptList.splice(idx, 1);
@@ -586,7 +594,7 @@
           } else {
             const code = await getCode('inspection_code');
             this.form.inspectionCode = code;
-            this.form.qualityStandardCode = ''; 
+            this.form.qualityStandardCode = '';
             this.isUpdate = false;
           }
         } else {
@@ -616,4 +624,4 @@
   ::v-deep .el-form-item__content {
     display: flex !important;
   }
-</style>
+</style>

+ 212 - 211
src/views/inspectionProject/index.vue

@@ -59,6 +59,8 @@
               ? '选择'
               : row.textType == 3
               ? '上下限'
+              : row.textType == 8
+              ? '专业上下限'
               : row.textType == 4
               ? '规格'
               : row.textType == 5
@@ -146,235 +148,234 @@
 </template>
 
 <script>
-import UserSearch from './components/user-search.vue';
-import UserEdit from './components/user-edit.vue';
-import importDialog from './components/import-dialog.vue';
+  import UserSearch from './components/user-search.vue';
+  import UserEdit from './components/user-edit.vue';
+  import importDialog from './components/import-dialog.vue';
 
-import tabMixins from '@/mixins/tableColumnsMixin';
-import { getList, removeItem, copyItem } from '@/api/inspectionProject';
-import dictMixins from '@/mixins/dictMixins';
-export default {
-  name: 'inspectionProject',
-  components: {
-    UserSearch,
-    UserEdit,
-    importDialog
-  },
-  mixins: [dictMixins, tabMixins],
-  data() {
-    return {
-      cacheKeyUrl: 'qsm-c2e9664a-inspectionProject',
-      // 表格列配置
-      columns: [
-        
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'inspectionCode',
-          label: '参数编码',
-          align: 'center',
-          minWidth: 130
-        },
-        {
-          prop: 'inspectionName',
-          label: '参数名称',
+  import tabMixins from '@/mixins/tableColumnsMixin';
+  import { getList, removeItem, copyItem } from '@/api/inspectionProject';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
+    name: 'inspectionProject',
+    components: {
+      UserSearch,
+      UserEdit,
+      importDialog
+    },
+    mixins: [dictMixins, tabMixins],
+    data() {
+      return {
+        cacheKeyUrl: 'qsm-c2e9664a-inspectionProject',
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'inspectionCode',
+            label: '参数编码',
+            align: 'center',
+            minWidth: 130
+          },
+          {
+            prop: 'inspectionName',
+            label: '参数名称',
 
-          align: 'center',
-          minWidth: 110
-        },
+            align: 'center',
+            minWidth: 110
+          },
 
-        {
-          prop: 'textType',
-          label: '参数类型',
+          {
+            prop: 'textType',
+            label: '参数类型',
 
-          align: 'center',
-          slot: 'textType',
-          minWidth: 110
-        },
+            align: 'center',
+            slot: 'textType',
+            minWidth: 110
+          },
 
-        {
-          prop: 'defaultValue',
-          slot: 'defaultValue',
-          label: '默认值',
-          align: 'center',
-          showOverflowTooltip: true
-        },
+          {
+            prop: 'defaultValue',
+            slot: 'defaultValue',
+            label: '默认值',
+            align: 'center',
+            showOverflowTooltip: true
+          },
 
-        {
-          prop: 'maxValue',
-          slot: 'maxValue',
-          label: '参数上限',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'minValue',
-          slot: 'minValue',
-          label: '参数下限',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        // {
-        //   label: '工艺要求',
-        //   prop: 'inspectionStandard',
-        //   formatter: (row, column, cellValue) => {
-        //     return row.symbol + ' ' + cellValue + ' ' + row.unit;
-        //   },
-        //   minWidth: 150
-        // },
+          {
+            prop: 'maxValue',
+            slot: 'maxValue',
+            label: '参数上限',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'minValue',
+            slot: 'minValue',
+            label: '参数下限',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          // {
+          //   label: '工艺要求',
+          //   prop: 'inspectionStandard',
+          //   formatter: (row, column, cellValue) => {
+          //     return row.symbol + ' ' + cellValue + ' ' + row.unit;
+          //   },
+          //   minWidth: 150
+          // },
 
-        {
-          label: '标准类型',
-          prop: 'type',
-          slot: 'type'
-        },
-        {
-          prop: 'unitName',
-          label: '参数单位',
-          align: 'center'
-        },
-        {
-          prop: 'qualityStandardName',
-          label: '标准名称',
-          align: 'center',
-          minWidth: 110
-        },
-        {
-          prop: 'standardCode',
-          label: '标准代码',
-          align: 'center',
-          minWidth: 110
-        },
+          {
+            label: '标准类型',
+            prop: 'type',
+            slot: 'type'
+          },
+          {
+            prop: 'unitName',
+            label: '参数单位',
+            align: 'center'
+          },
+          {
+            prop: 'qualityStandardName',
+            label: '标准名称',
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'standardCode',
+            label: '标准代码',
+            align: 'center',
+            minWidth: 110
+          },
 
-        {
-          prop: 'toolList',
-          slot: 'toolList',
-          label: '工具名称',
-          align: 'center',
-          minWidth: 150
-        },
+          {
+            prop: 'toolList',
+            slot: 'toolList',
+            label: '工具名称',
+            align: 'center',
+            minWidth: 150
+          },
 
-        {
-          label: '状态',
-          prop: 'status',
-          formatter: (row, column, cellValue) => {
-            return cellValue == 1 ? '启用' : cellValue === 0 ? '停用' : '';
-          }
-        },
+          {
+            label: '状态',
+            prop: 'status',
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1 ? '启用' : cellValue === 0 ? '停用' : '';
+            }
+          },
 
-        {
-          label: '备注',
-          prop: 'inspectionRemark'
-        },
+          {
+            label: '备注',
+            prop: 'inspectionRemark'
+          },
 
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 220,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true
-        }
-      ],
-
-      // 表格选中数据
-      selection: [],
-      // 当前编辑数据
-      current: null,
-      // 是否显示编辑弹窗
-      showEdit: false,
-      // 是否显示导入弹窗
-      showImport: false,
-      moudleName: ''
-    };
-  },
-  methods: {
-    /*回显类型 */
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 220,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
 
-    /* 表格数据源 */
-    datasource({ page, where, limit }) {
-      return getList({
-        ...where,
-        pageNum: page,
-        size: limit
-      });
-    },
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({ page: 1, where: where });
+        // 表格选中数据
+        selection: [],
+        // 当前编辑数据
+        current: null,
+        // 是否显示编辑弹窗
+        showEdit: false,
+        // 是否显示导入弹窗
+        showImport: false,
+        moudleName: ''
+      };
     },
+    methods: {
+      /*回显类型 */
 
-    uploadFile() {
-      this.$refs.importDialogRef.open();
-    },
+      /* 表格数据源 */
+      datasource({ page, where, limit }) {
+        return getList({
+          ...where,
+          pageNum: page,
+          size: limit
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
 
-    /* 打开编辑弹窗 */
-    openEdit(row) {
-      this.current = row;
-      this.showEdit = true;
-      this.$refs.userEdit.$refs.form &&
-        this.$refs.userEdit.$refs.form.clearValidate();
-    },
+      uploadFile() {
+        this.$refs.importDialogRef.open();
+      },
 
-    /* 删除 */
-    remove(row) {
-      const loading = this.$loading({ lock: true });
+      /* 打开编辑弹窗 */
+      openEdit(row) {
+        this.current = row;
+        this.showEdit = true;
+        this.$refs.userEdit.$refs.form &&
+          this.$refs.userEdit.$refs.form.clearValidate();
+      },
 
-      removeItem([row.id])
-        .then((msg) => {
-          loading.close();
-          this.$message.success('删除' + msg);
-          this.reload();
-        })
-        .catch((e) => {
-          loading.close();
-        });
-    },
-    // 复制
-    copy(row) {
-      console.log(row, '33333');
-      const loading = this.$loading({ lock: true });
-      copyItem(row.id)
-        .then((msg) => {
-          loading.close();
-          this.$message.success('复制成功');
-          this.reload();
+      /* 删除 */
+      remove(row) {
+        const loading = this.$loading({ lock: true });
+
+        removeItem([row.id])
+          .then((msg) => {
+            loading.close();
+            this.$message.success('删除' + msg);
+            this.reload();
+          })
+          .catch((e) => {
+            loading.close();
+          });
+      },
+      // 复制
+      copy(row) {
+        console.log(row, '33333');
+        const loading = this.$loading({ lock: true });
+        copyItem(row.id)
+          .then((msg) => {
+            loading.close();
+            this.$message.success('复制成功');
+            this.reload();
+          })
+          .catch((e) => {
+            loading.close();
+          });
+      },
+      /* 批量删除 */
+      removeBatch() {
+        if (!this.selection.length) {
+          this.$message.error('请至少选择一条数据');
+          return;
+        }
+        this.$confirm('确定要删除选中的检测吗?', '提示', {
+          type: 'warning'
         })
-        .catch((e) => {
-          loading.close();
-        });
-    },
-    /* 批量删除 */
-    removeBatch() {
-      if (!this.selection.length) {
-        this.$message.error('请至少选择一条数据');
-        return;
+          .then(() => {
+            const loading = this.$loading({ lock: true });
+            removeItem(this.selection.map((d) => d.id))
+              .then((msg) => {
+                loading.close();
+                this.$message.success('删除' + msg);
+                this.reload();
+              })
+              .catch((e) => {
+                loading.close();
+              });
+          })
+          .catch(() => {});
       }
-      this.$confirm('确定要删除选中的检测吗?', '提示', {
-        type: 'warning'
-      })
-        .then(() => {
-          const loading = this.$loading({ lock: true });
-          removeItem(this.selection.map((d) => d.id))
-            .then((msg) => {
-              loading.close();
-              this.$message.success('删除' + msg);
-              this.reload();
-            })
-            .catch((e) => {
-              loading.close();
-            });
-        })
-        .catch(() => {});
     }
-  }
-};
+  };
 </script>

+ 22 - 3
src/views/inspectionTemplate/AddorUpdate.vue

@@ -249,13 +249,31 @@
                   clearable
                   dictName="数学字符"
                   v-model="row.symbol"
+                  v-if="row.textType != 8"
                 ></DictSelection>
-                <div v-if="row.textType == 3">
+                <div v-if="row.textType == 3 || row.textType == 8">
                   <el-input
                     v-model="row.minValue"
                     style="width: 80px"
-                  ></el-input
-                  >-
+                  ></el-input>
+                  <span v-if="row.textType == 3">-</span>
+
+                  <el-input
+                    v-else
+                    v-model="row.defaultValue"
+                    style="width: 200px"
+                  >
+                    <template slot="append">
+                      <DictSelection
+                        dictName="工艺参数单位"
+                        clearable
+                        filterable
+                        v-model="row.unitName"
+                        style="width: 80px"
+                      >
+                      </DictSelection
+                    ></template>
+                  </el-input>
                   <el-input v-model="row.maxValue" style="width: 80px">
                   </el-input>
                 </div>
@@ -269,6 +287,7 @@
                 <DictSelection
                   dictName="工艺参数单位"
                   clearable
+                  v-if="row.textType != 8"
                   filterable
                   v-model="row.unitName"
                   style="width: 100px"

+ 2 - 0
src/views/inspectionTemplate/inspectionClassify/index.vue

@@ -53,6 +53,8 @@
                     ? '选择'
                     : row.textType == 3
                     ? '上下限'
+                    : row.textType == 8
+                    ? '专业上下限'
                     : row.textType == 4
                     ? '规格'
                     : row.textType == 5

+ 11 - 5
src/views/inspectionWork/components/inspectionProjectReport.vue

@@ -233,16 +233,22 @@
       </template>
       <template v-slot:defaultValue="{ row }">
         <div style="display: flex; justify-content: center">
-          <span>{{ row.symbol }}</span>
+          <span v-if="row.textType != 8">{{ row.symbol }}</span>
           <span v-if="row.textType == 3">
             {{ row.minValue }}-{{ row.maxValue }}
           </span>
-
+          <span v-else-if="row.textType == 8">
+            标准值:{{ row.defaultValue }}{{ row.unitName||'' }} 下限:{{
+              row.minValue
+            }}{{ row.unitName||'' }}
+            上限:{{ row.maxValue }}{{ row.unitName||'' }}
+          </span>
           <span v-else>
             <span>{{ row.defaultValue }}</span>
           </span>
-
-          {{ row.unitName }}
+          <span v-if="row.textType != 8">
+            {{ row.unitName }}
+          </span>
         </div>
       </template>
 
@@ -611,7 +617,7 @@
             showOverflowTooltip: true
           },
           {
-            minWidth: 150,
+            minWidth: 320,
             slot: 'defaultValue',
             prop: 'defaultValue',
             align: 'center',

+ 13 - 4
src/views/inspectionWork/components/newQualityContentTabs.vue

@@ -502,19 +502,28 @@
             show-overflow-tooltip
             prop="defaultValue"
             align="center"
+            min-width="220px"
           >
             <template slot-scope="scope">
               <div style="display: flex; justify-content: center">
-                <span>{{ scope.row.symbol }}</span>
+                <span v-if="scope.row.textType != 8">{{
+                  scope.row.symbol
+                }}</span>
                 <span v-if="scope.row.textType == 3">
                   {{ scope.row.minValue }}-{{ scope.row.maxValue }}
                 </span>
-
+                <span v-else-if="scope.row.textType == 8">
+                  标准值:{{ scope.row.defaultValue }}{{ scope.row.unitName||'' }} 下限:{{
+                    scope.row.minValue
+                  }}{{ scope.row.unitName||'' }}
+                  上限:{{ scope.row.maxValue }}{{ scope.row.unitName||'' }}
+                </span>
                 <span v-else>
                   <span>{{ scope.row.defaultValue }}</span>
                 </span>
-
-                {{ scope.row.unitName }}
+                <span v-if="scope.row.textType != 8">
+                  {{ scope.row.unitName }}
+                </span>
               </div>
             </template>
           </el-table-column>

+ 15 - 4
src/views/inspectionWork/components/sampleListDialog.vue

@@ -80,6 +80,7 @@
                 prop="defaultValue"
                 align="center"
                 show-overflow-tooltip
+                min-width="220px"
               >
                 <template slot-scope="scope">
                   <!-- <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
@@ -89,16 +90,26 @@
                     style="display: flex; justify-content: center"
                     :class="scope.row.qualityResults === 2 ? 'warn' : ''"
                   >
-                    <span>{{ scope.row.symbol }}</span>
+                    <span v-if="scope.row.textType != 8">{{
+                      scope.row.symbol
+                    }}</span>
                     <span v-if="scope.row.textType == 3">
                       {{ scope.row.minValue }}-{{ scope.row.maxValue }}
                     </span>
-
+                    <span v-else-if="scope.row.textType == 8">
+                      标准值:{{ scope.row.defaultValue
+                      }}{{ scope.row.unitName || '' }} 下限:{{
+                        scope.row.minValue
+                      }}{{ scope.row.unitName || '' }} 上限:{{
+                        scope.row.maxValue
+                      }}{{ scope.row.unitName || '' }}
+                    </span>
                     <span v-else>
                       <span>{{ scope.row.defaultValue }}</span>
                     </span>
-
-                    {{ scope.row.unitName }}
+                    <span v-if="scope.row.textType != 8">
+                      {{ scope.row.unitName }}
+                    </span>
                   </div>
                 </template>
               </el-table-column>

+ 8 - 2
src/views/inspectionWork/components/unit.js

@@ -19,14 +19,20 @@ export function handleInput(item, value, arr) {
       qualityResultsListChange(arr);
     }
 
-    if (item.textType == '3') {
+    if (item.textType == '3' || item.textType == '8') {
       let num = Number(item.qualityResultContent);
+      if (item.textType == '8') {
+        num = num - (item.defaultValue || 0);
+      }
       if (num == NaN) {
         Vue.set(item, 'qualityResults', 2);
         qualityResultsListChange(arr);
         return;
       }
-      if (num >= Number(item.minValue) && num <= Number(item.maxValue)) {
+      if (
+        num >= Number(item.minValue || 0) &&
+        num <= Number(item.maxValue || 0)
+      ) {
         Vue.set(item, 'qualityResults', 1);
         qualityResultsListChange(arr);
       } else {

+ 20 - 0
src/views/inspectionWork/details.vue

@@ -363,6 +363,26 @@
                     >{{ scope.row.experimentCode }}
                   </el-link>
                 </template>
+                <template v-slot:defaultValue="{ row }">
+                  <div style="display: flex; justify-content: center">
+                    <span v-if="row.textType != 8">{{ row.symbol }}</span>
+                    <span v-if="row.textType == 3">
+                      {{ row.minValue }}-{{ row.maxValue }}
+                    </span>
+                    <span v-else-if="row.textType == 8">
+                      标准值:{{ row.defaultValue
+                      }}{{ row.unitName || '' }} 下限:{{ row.minValue
+                      }}{{ row.unitName || '' }} 上限:{{ row.maxValue
+                      }}{{ row.unitName || '' }}
+                    </span>
+                    <span v-else>
+                      <span>{{ row.defaultValue }}</span>
+                    </span>
+                    <span v-if="row.textType != 8">
+                      {{ row.unitName }}
+                    </span>
+                  </div>
+                </template>
               </ele-pro-table></el-tab-pane
             >
             <el-tab-pane label="检测任务单" name="4">

+ 1 - 0
src/views/inspectionWork/mixins/detailMixins.js

@@ -1072,6 +1072,7 @@ export default {
           prop: 'defaultValue',
           align: 'center',
           showOverflowTooltip: true,
+          minWidth:300,
           slot: 'defaultValue'
         },