Quellcode durchsuchen

系统状态选择设置

yuhan vor 4 Monaten
Ursprung
Commit
2774188e9d

+ 2 - 0
src/components/module_interLock/UEquipmentTree/UEquipmentTree.vue

@@ -180,11 +180,13 @@
         this.$refs.modalForm.add();
         this.$refs.modalForm.title = "新增";
         this.$refs.modalForm.disableSubmit = false;
+        this.$refs.modalForm.disableEdit = false;
       },
       handleEdit: function (record) {
         this.$refs.modalForm.edit(record);
         this.$refs.modalForm.title = "编辑";
         this.$refs.modalForm.disableSubmit = false;
+        this.$refs.modalForm.disableEdit = true;
       },
       handleDelete: function (id) {
         if(!this.url.delete){

+ 25 - 34
src/views/module_interLock/baseInterLock/modules/BaseInterLockModal.vue

@@ -14,7 +14,8 @@
           <j-dict-select-tag
             type="radio"
             v-model="model.interlockType"  dictCode="interlock_type"
-            placeholder="请选择类型"/>
+            placeholder="请选择类型"
+            :disabled="disableEdit"/>
         </a-form-model-item>
         <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="interlockName">
           <a-input v-model="model.interlockName" placeholder="请输入名称" ></a-input>
@@ -55,31 +56,20 @@
               <!-- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" -->
           </a-form-model-item>
           <a-divider orientation="left"> <span style="font-size: 12px;">状态值设置</span> </a-divider>
-          <a-form-model-item label="输入卡件状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inputStatus">
-            <!-- <j-dict-select-tag v-model="model.inputStatus"  placeholder="请设置状态" dictCode="system_value_set" @change="change"/> -->
-            <a-select v-model="model.inputStatus" placeholder="请设置状态" @change="change">
-              <a-select-option v-for="(item) in systemValueOptions" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
-            </a-select>
+          <a-form-model-item label="输入卡件状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inputStatusNormal">
+            <j-dict-select-tag v-model="model.inputStatusNormal"  placeholder="请设置状态" dictCode="input_status_normal"/>
           </a-form-model-item>
-          <a-form-model-item label="输出卡件状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outputStatus">
-            <a-select v-model="model.outputStatus" placeholder="请设置状态" @change="change">
-              <a-select-option v-for="(item) in systemValueOptions" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
-            </a-select>
+          <a-form-model-item label="输出卡件状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outputStatusNormal">
+            <j-dict-select-tag v-model="model.outputStatusNormal"  placeholder="请设置状态" dictCode="output_status_normal"/>
           </a-form-model-item>
-          <a-form-model-item label="MP状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mpStatus">
-            <a-select v-model="model.mpStatus" placeholder="请设置状态" @change="change">
-              <a-select-option v-for="(item) in systemValueOptions" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
-            </a-select>
+          <a-form-model-item label="MP状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mpStatusNormal">
+            <j-dict-select-tag v-model="model.mpStatusNormal"  placeholder="请设置状态" dictCode="mp_status_normal"/>
           </a-form-model-item>
-          <a-form-model-item label="旁路状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bypassStatus">
-            <a-select v-model="model.bypassStatus" placeholder="请设置状态" @change="change">
-              <a-select-option v-for="(item) in systemValueOptions" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
-            </a-select>
+          <a-form-model-item label="旁路状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bypassYes">
+            <j-dict-select-tag v-model="model.bypassYes"  placeholder="请设置状态" dictCode="bypass_yes"/>
           </a-form-model-item>
-          <a-form-model-item label="仪表状态(位号读取)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentStatus">
-            <a-select v-model="model.instrumentStatus" placeholder="请设置状态" @change="change">
-              <a-select-option v-for="(item) in systemValueOptions" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
-            </a-select>
+          <a-form-model-item label="仪表状态(位号读取)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentStatusNormal">
+            <j-dict-select-tag v-model="model.instrumentStatusNormal"  placeholder="请设置状态" dictCode="instrument_status_normal"/>
           </a-form-model-item>
         </template>
         
@@ -101,13 +91,14 @@
         title:"操作",
         width:800,
         visible: false,
+        disableEdit: false,
         model:{
           interlockType: '0',
-          inputStatus: '0',
-          outputStatus: '0',
-          mpStatus: '0',
-          bypassStatus: '0',
-          instrumentStatus: '0',
+          inputStatusNormal: '0',
+          outputStatusNormal	: '0',
+          mpStatusNormal: '0',
+          bypassYes: '0',
+          instrumentStatusNormal: '0',
         },
         labelCol: {
           xs: { span: 24 },
@@ -123,11 +114,11 @@
           interlockType: [{required: true, message: '请选择类型'}],
           interlockName: [{required: true, message: '请输入名称'}],
           pid: [{required: true, message: '请选择上级'}],
-          inputStatus: [{required: true, message: '请设置状态'}],
-          outputStatus: [{required: true, message: '请设置状态'}],
-          mpStatus: [{required: true, message: '请设置状态'}],
-          bypassStatus: [{required: true, message: '请设置状态'}],
-          instrumentStatus: [{required: true, message: '请设置状态'}],
+          inputStatusNormal: [{required: true, message: '请设置状态'}],
+          outputStatusNormal: [{required: true, message: '请设置状态'}],
+          mpStatusNormal: [{required: true, message: '请设置状态'}],
+          bypassYes: [{required: true, message: '请设置状态'}],
+          instrumentStatusNormal: [{required: true, message: '请设置状态'}],
         },
         url: {
           add: "/base/interlockBase/add",
@@ -204,14 +195,14 @@
       add (obj) {
         // this.getInterlockTwoTree()
         this.getData('0', 'interlockTwoTree')
-        this.getSystemValue()
+        // this.getSystemValue()
         this.modelDefault.pid=''
         this.edit(Object.assign(this.modelDefault , obj));
         },
         edit (record) {
           // this.getInterlockTwoTree()
           this.getData('0', 'interlockTwoTree')
-          this.getSystemValue()
+          // this.getSystemValue()
         this.model = Object.assign({}, record);
         this.visible = true;
       },