xiaohaizhao пре 1 година
родитељ
комит
036f1df623

+ 17 - 2
control/components/prodnum-06/modules/basics.vue

@@ -4,7 +4,10 @@
             基础控制
         </view>
         <view class="current">
-
+            <view class="item" v-for="item in preview" :key="item.paramname">
+                <view class="label">{{ item.paramname }}</view>
+                <view class="value">{{ item.lastvalue }}</view>
+            </view>
         </view>
         <view class="show-list">
             <control-item v-for="item in itemList" :key="item.paramName" :item="item" @click.native="onClick(item)" />
@@ -18,7 +21,8 @@ export default {
     name: "basics",
     data() {
         return {
-            itemList: []
+            itemList: [],
+            preview: []
         }
     },
     methods: {
@@ -31,6 +35,17 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.current {
+    display: flex;
+    justify-content: space-around;
+    color: #fff;
+    margin-bottom: 10px;
+    font-size: 12px;
+    .label{
+        margin-bottom: 5px;
+    }
+}
+
 .show-list {
     display: flex;
     flex-wrap: wrap;

+ 4 - 0
control/components/prodnum-06/prodnum-06.vue

@@ -26,6 +26,10 @@ export default {
                 try {
                     let nameList = ['Flow control', 'pressure control', 'Config', 'Sleep time', 'Pilot valve', 'Minimum', 'MOP']
                     this.$refs.basics.itemList = this.__proto__.getControlItem(nameList, newVal.function, newVal.paramcmdvalues, newVal.params)
+                    this.$refs.basics.preview = ['Batt4', 'Batt12', 'BatFlow'].map(v => {
+                        return newVal.params[v]
+                    })
+                    console.log(this.$refs.basics.preview)
                 } catch (error) {
                     console.error(error)
                 }

+ 1 - 1
control/modules/My_input.vue

@@ -127,7 +127,7 @@ export default {
                 this.value = item.params[item.key + 'p'];
                 this.dayPartingFocus = false;
                 this.item = JSON.parse(JSON.stringify(item))
-                this.toBeUpdated = item.paramValue.time || item.paramValue.value ? `查询到一条待更新指令,更新内容为时间${item.paramValue.time.split("_").join(":")},压力${item.paramValue.value}MPA` : ""
+                this.toBeUpdated = item.paramValue.time || item.paramValue.value ? `查询到一条待更新指令,更新内容为时间${item.paramValue.time.split("_").join(":")},压力${item.paramValue.value}MPA` : ""
                 let p = item.params[item.key + 'P'];
                 if (p.num_minvalue || p.num_maxvalue) tips += `输入范围:${p.num_minvalue || 0} ~ ${p.num_maxvalue || '∞'}`
                 if (p.num_scale) tips += `,保留${p.num_scale}位小数`