Selaa lähdekoodia

完善液位高度和宽度

hfxc226 2 vuotta sitten
vanhempi
commit
c3929b2d3f
2 muutettua tiedostoa jossa 41 lisäystä ja 39 poistoa
  1. 5 4
      src/views/remote/opc/RemoteOpc.vue
  2. 36 35
      src/views/remote/opc/modules/BaseForm.vue

+ 5 - 4
src/views/remote/opc/RemoteOpc.vue

@@ -136,13 +136,13 @@
               title="是否要删除该条数据?"
               @confirm="batchDelete(record.id)">删除</operation-button>
             <a-divider
-              v-if="record.type == 2"
+              v-if="record.type == 4"
               type="vertical" />
             <a
-              v-if="record.type == 2"
+              v-if="record.type == 4"
               @click="handleAddFetch(record)">设置M点位
             </a>
-            <a
+<!--            <a
               style="margin-left: 8px"
               @click="doTestAdd(record)">测试写入
             </a>
@@ -155,7 +155,7 @@
             <a
               style="margin-left: 8px"
               @click="doTestSelect(record)">测试查询
-            </a>
+            </a>-->
           </template>
         </span>
       </s-table>
@@ -389,6 +389,7 @@ export default {
         data.positionNum = null
         data.sbName = null
         data.description = null
+        data.type = 3
         data.fetchFlag = 0
         data.remark = null
         modal.base(data)

+ 36 - 35
src/views/remote/opc/modules/BaseForm.vue

@@ -100,39 +100,39 @@
             </a-select>
           </a-form-item>
         </row-item>
-        <row-item>
-          <a-form-item
-            label="是否禁止图片"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-select v-decorator="['fetchFlag', {initialValue:1, 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>
-        </row-item>
-        <!--        <row-item>
+        <!--       <row-item>
+           <a-form-item
+             label="是否禁止图片"
+             :labelCol="BaseTool.Constant.labelCol"
+             :wrapperCol="BaseTool.Constant.wrapperCol"
+           >
+             <a-select v-decorator="['fetchFlag', {initialValue:1, 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>
+         </row-item>
+           <row-item>
 
-          <a-form-item
-            label="是否模拟量"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-select v-decorator="['avFlag', {initialValue:1, 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>
-        </row-item>-->
+           <a-form-item
+             label="是否模拟量"
+             :labelCol="BaseTool.Constant.labelCol"
+             :wrapperCol="BaseTool.Constant.wrapperCol"
+           >
+             <a-select v-decorator="['avFlag', {initialValue:1, 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>
+         </row-item>-->
         <row-item>
 
           <a-form-item
@@ -623,15 +623,16 @@ export default {
       })
     },
     handleAddFetch () {
-      if (this.type === 1) {
-        this.$message.error('只有布尔类型的点位,才可以配置就地点位')
+      if (this.type === 4) {
+        this.$message.error('只有电机就地信号点位,才可以配置运行点位')
         return
       }
       this.model.id = null
+      this.model.type = 3
       this.model.positionNum = null
       this.model.sbName = null
       this.model.description = null
-      this.model.fetchFlag = 0
+      // this.model.fetchFlag = 0
       this.model.remark = null
       this.base(this.model)
     },