670添加分享的权限
This commit is contained in:
@ -223,15 +223,15 @@
|
||||
<view class="proinfo lamp">
|
||||
<text class="title">产品信息</text>
|
||||
<view class="itemcontent">
|
||||
<view class="item" @click="proParam()">
|
||||
<view class="item" @click="proDetail('productDes')">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/param.png" mode="aspectFit"></image>
|
||||
<text class="txt">产品参数</text>
|
||||
</view>
|
||||
<view class="item" @click="handRemark()">
|
||||
<view class="item" @click="proDetail('operatingInstruct')">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/remark.png" mode="aspectFit"></image>
|
||||
<text class="txt">操作说明</text>
|
||||
</view>
|
||||
<view class="item" @click="handVideo()">
|
||||
<view class="item" @click="proDetail('operationVideo')">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/video.png" mode="aspectFit"></image>
|
||||
<text class="txt">操作视频</text>
|
||||
</view>
|
||||
@ -268,6 +268,7 @@
|
||||
import BleReceive from '@/utils/BleReceive';
|
||||
import api from '@/api/670/HBY670.js';
|
||||
import MqttClient from '@/utils/mqtt.js';
|
||||
import Common from '@/utils/Common.js'
|
||||
import {
|
||||
showLoading,
|
||||
hideLoading,
|
||||
@ -438,7 +439,7 @@
|
||||
these.Status.apiType = data.apiType;
|
||||
these.device = device;
|
||||
if(data.apiType!=='listA'){
|
||||
Comment.getdeviceShareId(data.data.id).then(res=>{
|
||||
Common.getdeviceShareId(data.data.id).then(res=>{
|
||||
if(res.code==200){
|
||||
if(res.data.permission){
|
||||
these.permissions=res.data.permission.split(',');
|
||||
@ -604,7 +605,7 @@
|
||||
} else if (s === 1) {
|
||||
console.log("分享");
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/Share/shareIndex',
|
||||
url: '/pages/common/share/index',
|
||||
events: {
|
||||
ack: function(data) {}
|
||||
},
|
||||
@ -862,6 +863,18 @@
|
||||
|
||||
},
|
||||
lightSetting: function(type) {
|
||||
if(!this.permissions.includes('1') && this.Status.apiType!=='listA'){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.formData.lightCurr == type) {
|
||||
return;
|
||||
}
|
||||
@ -1037,6 +1050,20 @@
|
||||
});
|
||||
},
|
||||
sosSetting: function(type) {
|
||||
|
||||
if(!this.permissions.includes('42') && this.Status.apiType!=='listA'){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.formData.SOS == type) {
|
||||
type = "close";
|
||||
}
|
||||
@ -1201,7 +1228,15 @@
|
||||
},
|
||||
GearSetting: function(type) { //档位设置
|
||||
if(!this.permissions.includes('41') && this.Status.apiType!=='listA'){
|
||||
console.log("无操作权限");
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.formData.modeCurr == type) {
|
||||
@ -1288,32 +1323,27 @@
|
||||
|
||||
setTimeout(task, 0);
|
||||
},
|
||||
|
||||
proParam: function() {
|
||||
|
||||
proDetail:function(type){
|
||||
if(!this.permissions.includes('41') && this.Status.apiType!=='listA'){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/productDes/index?id=' + this.device.id,
|
||||
url: '/pages/common/'+type+'/index?id=' + this.device.id,
|
||||
success(ev) {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
handRemark: function() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/operatingInstruct/index?id=' + this.device.id,
|
||||
success(ev) {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
handVideo: function() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/operationVideo/index?id=' + this.device.id,
|
||||
success(ev) {
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
checkImgUpload: function(type, index) {
|
||||
console.log("123213213213");
|
||||
let f = these.getDevice();
|
||||
@ -1851,6 +1881,18 @@
|
||||
|
||||
},
|
||||
ShowUpload: function() {
|
||||
if(!this.permissions.includes('3') && this.Status.apiType!=='listA'){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
return;
|
||||
}
|
||||
//上传开机画面
|
||||
this.Status.BottomMenu.menuItems = [];
|
||||
this.Status.BottomMenu.title = "上传开机画面";
|
||||
@ -1945,6 +1987,19 @@
|
||||
this.Status.Pop.showPop = true;
|
||||
},
|
||||
sendUsr: function(ReSendNo) {
|
||||
|
||||
if(!this.permissions.includes('4') && this.Status.apiType!=='listA'){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
let requestSend = () => {
|
||||
let json = {
|
||||
@ -2139,6 +2194,19 @@
|
||||
|
||||
},
|
||||
sendUrgent(type) {
|
||||
|
||||
if(!this.permissions.includes('5') && this.Status.apiType!=='listA'){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (!this.formData.msgTxt) {
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user