Переглянути джерело

完善液位高度和宽度

hfxc226 1 рік тому
батько
коміт
2056294dcd

+ 30 - 9
src/views/remote/opc/modules/BaseForm.vue

@@ -259,22 +259,27 @@
               v-decorator="['imgYPosition', {initialValue:100, rules: [{required: true, message: '图片y轴位置不能为空'}]}]"/>
           </a-form-item>
         </row-item>
-        <row-item>
+        <row-item v-if="type!==1">
 
           <a-form-item
-            label="量程上限"
+            label="图片高度"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input-number
-              style="width: 100%"
-              :min="0"
-              :formatter="BaseTool.Amount.formatter"
-              :parser="BaseTool.Amount.parser"
-              v-decorator="['high', {initialValue:100,rules: [{required: false, message: '量程上限不能为空'}]}]"/>
+            <a-input
+              v-decorator="['imgHeight', {initialValue:50, rules: [{required: true, message: '图片高度不能为空'}]}]"/>
+          </a-form-item>
+        </row-item>
+        <row-item v-if="type!==1">
+          <a-form-item
+            label="图片宽度"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['imgWidth', {initialValue:100, rules: [{required: true, message: '图片宽度不能为空'}]}]"/>
           </a-form-item>
         </row-item>
-
         <row-item>
 
           <a-form-item
@@ -347,7 +352,21 @@
             </a-tag>
           </a-form-item>
         </row-item>
+        <row-item>
 
+          <a-form-item
+            label="量程上限"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input-number
+              style="width: 100%"
+              :min="0"
+              :formatter="BaseTool.Amount.formatter"
+              :parser="BaseTool.Amount.parser"
+              v-decorator="['high', {initialValue:100,rules: [{required: false, message: '量程上限不能为空'}]}]"/>
+          </a-form-item>
+        </row-item>
         <row-item>
 
           <a-form-item
@@ -489,6 +508,8 @@ export default {
             'yposition',
             'imgXPosition',
             'imgYPosition',
+            'imgHeight',
+            'imgWidth',
             'width',
             'height',
             'unit',

+ 4 - 0
src/views/remote/opc/modules/Detail.vue

@@ -43,6 +43,8 @@
       <detail-list-item term="y轴位置">{{ model.yPosition }}</detail-list-item>
       <detail-list-item term="图片x轴位置">{{ model.imgXPosition }}</detail-list-item>
       <detail-list-item term="图片y轴位置">{{ model.imgYPosition }}</detail-list-item>
+      <detail-list-item term="图片高度">{{ model.imgHeight}}</detail-list-item>
+      <detail-list-item term="图片宽度">{{ model.imgWidth }}</detail-list-item>
       <detail-list-item term="位置宽度">{{ model.width }}</detail-list-item>
       <detail-list-item term="位置高度">{{ model.height }}</detail-list-item>
       <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
@@ -94,6 +96,8 @@ export default {
         'yPosition': null,
         'imgXPosition': null,
         'imgYPosition': null,
+        'imgHeight': null,
+        'imgWidth': null,
         'width': null,
         'height': null,
         'low': null,