| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 | 
							- <template>
 
-     <view class="container">
 
-         <!-- 控制模式 -->
 
-         <mpattern ref="mpattern" />
 
-         <!-- 基础控制 -->
 
-         <basics ref="basics" />
 
-         <!-- 分时开关 -->
 
-         <division ref="division" />
 
-     </view>
 
- </template>
 
- <script>
 
- import mpattern from './modules/mpattern.vue'
 
- import basics from './modules/basics.vue'
 
- import division from './modules/division.vue'
 
- export default {
 
-     name: "prodnum-06",
 
-     components: { mpattern, basics, division },
 
-     props: {
 
-         control: Object
 
-     },
 
-     watch: {
 
-         control: function (newVal) {
 
-             if (newVal) {
 
-                 try {
 
-                     let nameList = ['Flow control', 'pressure control', 'Config', 'Sleep time', 'Pilot valve', 'Minimum', 'MOP']
 
-                     this.$refs.basics.itemList = this.__proto__.getControlItem(nameList, newVal)
 
-                     this.$refs.basics.preview = ['Batt4', 'Batt12', 'BatFlow'].map(v => {
 
-                         return newVal.params[v]
 
-                     })
 
-                 } catch (error) {
 
-                     console.error("06基础控制", error)
 
-                 }
 
-                 try {
 
-                     let division = this.$refs.division;
 
-                     division && division.loadData(newVal.function, newVal.paramcmdvalues, newVal.params, newVal.isfeedback)
 
-                     division.timeControl = this.__proto__.getControlItem(["TimeControl"], newVal)[0]
 
-                 } catch (error) {
 
-                     console.error("06分时控制", error)
 
-                 }
 
-                 try {
 
-                     let ctrlModel = this.__proto__.getControlItem(['Ctrl'], newVal, { Ctrl: "radio" })[0]
 
-                     this.$refs.mpattern.ctrlModel = ctrlModel;
 
-                     let lastvalue = ctrlModel.params.lastvalue - 0;
 
-                     this.$refs.mpattern.list = [{
 
-                         now: newVal.params['DownP'],
 
-                         tar: this.__proto__.getControlItem(['Downstream'], newVal)[0],
 
-                         current: lastvalue == 1
 
-                     }, {
 
-                         now: newVal.params['NowFlow'],
 
-                         tar: this.__proto__.getControlItem(['Constantflow'], newVal)[0],
 
-                         current: lastvalue == 2
 
-                     }, {
 
-                         now: newVal.params['MostBad'],
 
-                         tar: this.__proto__.getControlItem(['unfavorable'], newVal)[0],
 
-                         current: lastvalue == 3
 
-                     }];
 
-                 } catch (error) {
 
-                     console.error("06控制模式", error)
 
-                 }
 
-                 try {
 
-                     this.$Http.openNetwork(newVal.params.RSSI.lastvalue)
 
-                 } catch (error) {
 
-                     setTimeout(this.$Http.openNetwork(newVal.params.RSSI.lastvalue), 100)
 
-                     console.error("06信号强度", error)
 
-                 };
 
-                 try {
 
-                     this.$Http.slideshowSetData({
 
-                         ctrlItem: getCease(this)
 
-                     })
 
-                 } catch (error) {
 
-                     setTimeout({
 
-                         ctrlItem: getCease(this)
 
-                     }, 100)
 
-                     console.error("控制按钮", error)
 
-                 };
 
-                 function getCease(that) {
 
-                     let cease = that.__proto__.getControlItem(['cease'], newVal)[0];
 
-                     if (cease.params.lastvalue == 0) {
 
-                         cease.showValue = '正常工作中'
 
-                         cease.background = '#004A92'
 
-                     } else {
 
-                         cease.showValue = '紧急关阀中'
 
-                         cease.background = '#FF7875'
 
-                     }
 
-                     return cease
 
-                 }
 
-             } else {
 
-             }
 
-         }
 
-     }
 
- }
 
- </script>
 
 
  |