|
|
@@ -71,30 +71,18 @@
|
|
|
<u-toast ref="toast" />
|
|
|
</view>
|
|
|
<view class="equip_part">
|
|
|
- <template v-if="equipInfo.type==7">
|
|
|
- <view class="item1" v-for="item in bzy" v-if="item.tf" @click="partClick(item.path)">
|
|
|
+
|
|
|
+
|
|
|
+ <template v-for="item in curEquip">
|
|
|
+ <view :class="[equipInfo.type==3?'item2':'item1']" v-show="item.tf" @click="partClick(item.path)">
|
|
|
<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+item.icon" mode="widthFix"></image>
|
|
|
<view class="">
|
|
|
{{item.tex}}
|
|
|
</view>
|
|
|
</view>
|
|
|
- </template>
|
|
|
- <template v-else-if="equipInfo.type==3">
|
|
|
- <view class="item2" v-for="item in curEquip" v-if="item.tf" @click="partClick(item.path)">
|
|
|
- <image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+item.icon" mode="widthFix"></image>
|
|
|
- <view class="">
|
|
|
- {{item.tex}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <view class="item3" v-for="item in curEquip" v-if="item.tf" @click="partClick(item.path)">
|
|
|
- <image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+item.icon" mode="widthFix"></image>
|
|
|
- <view class="">
|
|
|
- {{item.tex}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
<view class="tit">
|
|
|
<p>实时数据</p>
|
|
|
@@ -141,6 +129,7 @@
|
|
|
type: null, //设备类型
|
|
|
device_status: null,
|
|
|
equipInfo: {},
|
|
|
+
|
|
|
cbd: [{
|
|
|
icon: '/image/cb/1.png',
|
|
|
tex: '查看图片',
|
|
|
@@ -162,7 +151,7 @@
|
|
|
tex: 'sim卡详情',
|
|
|
path: '/pages/prevention/sim',
|
|
|
tf: QueryPermission(274)
|
|
|
- }, {
|
|
|
+ },{
|
|
|
icon: '/image/environment/7.png',
|
|
|
tex: '一键报修',
|
|
|
path: '/pages/afterSale/addafter',
|
|
|
@@ -231,14 +220,37 @@
|
|
|
},
|
|
|
computed: {
|
|
|
curEquip() {
|
|
|
+
|
|
|
switch (this.type) {
|
|
|
case 3:
|
|
|
+ if(this.equipInfo.device_model==11){
|
|
|
+ // 虫情信息采集设备
|
|
|
+ let permission = [QueryPermission(294),QueryPermission(296),QueryPermission(295),QueryPermission(293),true]
|
|
|
+ this.cbd.map((cb,index)=>{
|
|
|
+ cb.tf = permission[index]
|
|
|
+ })
|
|
|
+ console.log(this.cbd)
|
|
|
+ }
|
|
|
return this.cbd;
|
|
|
case 7:
|
|
|
+ if(this.equipInfo.device_model==51){
|
|
|
+ // 孢子仪1.0
|
|
|
+ let permission = [QueryPermission(301),QueryPermission(302),QueryPermission(303),true]
|
|
|
+ this.bzy.map((cb,index)=>{
|
|
|
+ cb.tf = permission[index]
|
|
|
+ })
|
|
|
+ }else if(this.equipInfo.device_model==52){
|
|
|
+ // 孢子仪2.0
|
|
|
+ let permission = [QueryPermission(308),QueryPermission(309),QueryPermission(310),true]
|
|
|
+ this.bzy.map((cb,index)=>{
|
|
|
+ cb.tf = permission[index]
|
|
|
+ })
|
|
|
+ }
|
|
|
return this.bzy;
|
|
|
case 4:
|
|
|
return this.xy
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
curState() {
|
|
|
switch (this.type) {
|
|
|
@@ -259,7 +271,7 @@
|
|
|
} else {
|
|
|
blbs = "--";
|
|
|
}
|
|
|
- console.log(this.newState)
|
|
|
+ console.log('新状态:::::',this.newState)
|
|
|
return [{
|
|
|
icon: '/image/cb/icon02.png',
|
|
|
txt: '在线状态',
|