Browse Source

检定完善

hfxc226 2 years ago
parent
commit
846c34784a
3 changed files with 32 additions and 6 deletions
  1. 1 1
      src/views/sb/info/SbInfo.vue
  2. 29 3
      src/views/sb/info/modules/BaseForm.vue
  3. 2 2
      vue.config.js

+ 1 - 1
src/views/sb/info/SbInfo.vue

@@ -386,7 +386,7 @@ export default {
         {
           title: '设备编号',
           dataIndex: 'no',
-          width: 120,
+          width: 150,
           checked: true
         },
         {

+ 29 - 3
src/views/sb/info/modules/BaseForm.vue

@@ -53,7 +53,7 @@
                 v-decorator="['ppNo']"/>
             </a-form-item>
           </a-col>
-<!--          <a-col :lg="12" :md="24" :sm="24">
+          <!--          <a-col :lg="12" :md="24" :sm="24">
             <a-form-item
               label="是否子设备"
               :labelCol="BaseTool.Constant.labelCol"
@@ -210,7 +210,7 @@
         </a-col>
       </a-row>
       <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-<!--        <a-col :lg="12" :md="24" :sm="24">
+        <!--        <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
             label="大小/尺寸"
             :labelCol="BaseTool.Constant.labelCol"
@@ -821,7 +821,23 @@
               :labelCol="BaseTool.Constant.labelCol"
               :wrapperCol="BaseTool.Constant.wrapperCol"
             >
-              <a-select @change="childChange" v-decorator="['isMeasure', { rules: [{required: true, message: '是否需要检定不能为空'}]}]" placeholder="请选择">
+              <a-select @change="isMeasureChange" v-decorator="['isMeasure', { rules: [{required: true, message: '是否需要检定不能为空'}]}]" placeholder="请选择">
+                <a-select-option
+                  v-for="(label,value) in yesNoMap"
+                  :key="value"
+                  :label="label"
+                  :value="parseInt(value)">{{ label }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="是否自检"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-select v-decorator="['isSelf', { rules: [{required: isSelfRequired, message: '是否需要检定不能为空'}]}]" placeholder="请选择">
                 <a-select-option
                   v-for="(label,value) in yesNoMap"
                   :key="value"
@@ -991,6 +1007,7 @@ export default {
       useFileList: [], // 使用手册
       recheckFileList: [], // 验收手册
       sbFileList: [], // 设备图片,
+      isSelfRequired: false, // 是否自检,
       uploadUrl: uploadUrl,
       qrcodesrc: null,
       id: null,
@@ -1163,6 +1180,7 @@ export default {
           'model',
           'cph',
           'isMeasure',
+          'isSelf',
           'positionId',
           'producerName',
           'useArea',
@@ -1465,6 +1483,14 @@ export default {
         })
       }
     },
+    // 设置为需要检定的,是否自检也要设置
+    isMeasureChange (value) {
+      if (value === this.DictCache.VALUE.YES_NO.YES) {
+        this.isSelfRequired = true
+      } else {
+        this.isSelfRequired = false
+      }
+    },
     handleSbSelect () {
       this.$refs.sbInfoSelectModal.base({}, { isChild: this.DictCache.VALUE.SB_IS_CHILD.IS_PARENT })
     },

+ 2 - 2
vue.config.js

@@ -100,11 +100,11 @@ const vueConfig = {
 
   devServer: {
     // development server port 8000
-    port: 8050,
+    port: 8000,
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://localhost:5050',
+        target: 'http://localhost:5000',
         ws: false,
         changeOrigin: true,
         pathRewrite: {