Преглед на файлове

新增联锁需求修改(input选择方式)

yuhan преди 9 месеца
родител
ревизия
3697a3e2f8
променени са 1 файла, в които са добавени 44 реда и са изтрити 48 реда
  1. 44 48
      src/views/module_interLock/InterlockSummary/modules/InterlockConditionForm.vue

+ 44 - 48
src/views/module_interLock/InterlockSummary/modules/InterlockConditionForm.vue

@@ -106,22 +106,13 @@
               </a-form-model-item>
             </a-col>
             <a-col :span="24">
-              <a-form-model-item label="可参考默认值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="defaultValueType">
-                <a-radio-group name="radioGroup" v-model="model.defaultValueType" @change="changeGdxDefaultType">
-                  <!--  :default-value="model.ifBypass" -->
-                  <a-radio :value="'TRICON'"> TRICON </a-radio>
-                  <a-radio :value="'TSXPLUS'"> TSXPLUS </a-radio>
-                </a-radio-group>
-              </a-form-model-item>
-            </a-col>
-            <a-col :span="24">
               <a-form-model-item label="高限值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperLimit">
-                <a-input v-model="model.upperLimit" placeholder="请输入高限"></a-input>
+                <a-auto-complete :data-source="['4258', '61948']" v-model="model.upperLimit" placeholder="请输入高限"></a-auto-complete>
               </a-form-model-item>
             </a-col>
             <a-col :span="24">
               <a-form-model-item label="低限值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lowerLimit">
-                <a-input v-model="model.lowerLimit" placeholder="请输入低限"></a-input>
+                <a-auto-complete :data-source="['737', '10722']" v-model="model.lowerLimit" placeholder="请输入低限"></a-auto-complete>
               </a-form-model-item>
             </a-col>
           </template>
@@ -139,21 +130,45 @@
               </a-form-model-item>
             </a-col>
             <a-col :span="24">
-              <a-form-model-item label="可参考默认值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="defaultValueType">
-                <a-radio-group name="radioGroup" v-model="model.defaultValueType" @change="changeTbcxDefaultType">
-                  <!--  :default-value="model.ifBypass" -->
-                  <a-radio :value="'TRICON'"> TRICON </a-radio>
-                  <a-radio :value="'TSXPLUS'"> TSXPLUS </a-radio>
-                </a-radio-group>
-              </a-form-model-item>
-            </a-col>
-            <a-col :span="24">
               <a-form-model-item label="突变判断公式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperLimit">
-                ( <a-input v-model="model.upperLimit" placeholder="请输入高限" style="width: 29%;"></a-input>
+                ( <a-auto-complete :data-source="['4095', '59577']" v-model="model.upperLimit" placeholder="请输入高限" style="width: 29%;"></a-auto-complete>
                 -
-                <a-input v-model="model.lowerLimit" placeholder="请输入低限" style="width: 29%;"></a-input> )* 
-                <a-input v-model="model.thresholdValueN" placeholder="请输入阈值" style="width: 25%;"></a-input>
+                <a-auto-complete :data-source="['819', '11915']" v-model="model.lowerLimit" placeholder="请输入低限" style="width: 29%;"></a-auto-complete> )* 
+                <a-auto-complete :data-source="['1']" v-model="model.thresholdValueN" placeholder="请输入阈值" style="width: 25%;"></a-auto-complete>
                 %
+                <!-- <a-input-group compact>
+                  <a-select default-value="TRICON" @change="changeTbcxDefaultType">
+                    <a-select-option value="TRICON">
+                      TRICON
+                    </a-select-option>
+                    <a-select-option value="TSXPLUS">
+                      TSXPLUS
+                    </a-select-option>
+                  </a-select>
+                  <a-input
+                    style=" width: 30px; border-right: 0; pointer-events: none; backgroundColor: #fff"
+                    placeholder="("
+                    disabled
+                  />
+                  <a-input v-model="model.upperLimit" placeholder="请输入高限" style="width: 20%;border-left: 0;"></a-input>
+                  <a-input
+                    style=" width: 30px; border-left: 0; pointer-events: none; backgroundColor: #fff"
+                    placeholder="-"
+                    disabled
+                  />
+                  <a-input v-model="model.lowerLimit" placeholder="请输入低限" style="width: 20%;border-left: 0;"></a-input>
+                  <a-input
+                    style=" width: 50px; border-left: 0; pointer-events: none; backgroundColor: #fff"
+                    placeholder=") * "
+                    disabled
+                  />
+                  <a-input v-model="model.thresholdValueN" placeholder="请输入阈值" style="width: 15%;border-left: 0;"></a-input>
+                  <a-input
+                    style=" width: 40px; border-left: 0; pointer-events: none; backgroundColor: #fff"
+                    placeholder="% "
+                    disabled
+                  />
+                </a-input-group> -->
               </a-form-model-item>
             </a-col>
             <!-- <a-col :span="24">
@@ -247,6 +262,9 @@
           instrumentStatusJuge: '0',
           ifBypass: '1',
           bypassNo: '0',
+          upperLimit: null,
+          lowerLimit: null,
+          thresholdTime: null,
         },
         labelCol: {
           xs: { span: 24 },
@@ -360,31 +378,9 @@
       // 点位状态依据改变时
       instrumentStatusJugeChange(e){
         console.log(e)
-      },
-      // 默认值选择改变时
-      changeGdxDefaultType(e){
-        console.log(e.target.value)
-        if(e.target.value === 'TRICON'){
-          this.model.upperLimit = 4258
-          this.model.lowerLimit = 737
-        }
-        if(e.target.value === 'TSXPLUS'){
-          this.model.upperLimit = 61948
-          this.model.lowerLimit = 10722
-        }
-      },
-      changeTbcxDefaultType(e){
-        console.log(e.target.value)
-        if(e.target.value === 'TRICON'){
-          this.model.upperLimit = 4095
-          this.model.lowerLimit = 819
-          this.model.thresholdValueN = 1
-        }
-        if(e.target.value === 'TSXPLUS'){
-          this.model.upperLimit = 59577
-          this.model.lowerLimit = 11915
-          this.model.thresholdValueN = 1
-        }
+        this.model.upperLimit = null
+        this.model.lowerLimit = null
+        this.model.thresholdValueN = null
       },
       add () {  
         // this.edit(this.modelDefault);