|
@@ -39,15 +39,13 @@
|
|
|
</view>
|
|
|
<!-- 大型按钮模块 -->
|
|
|
<view class="big-icon-button-box" v-if="homeConfig.type == 'bigBox'">
|
|
|
- <permissionsSlot class="imgBox" v-for="(item,index) in homeConfig.layout" :key="index"
|
|
|
- :hasPermi="item.limits">
|
|
|
+ <permissionsSlot class="imgBox" v-for="(item,index) in homeConfig.layout" :key="index" :hasPermi="item.limits">
|
|
|
<img :src="item.img" @click="buttonClick(item)">
|
|
|
</permissionsSlot>
|
|
|
</view>
|
|
|
<!-- 三格按钮 -->
|
|
|
<view class="three-big-icon-button-box" v-if="homeConfig.type == 'threeBox'">
|
|
|
- <permissionsSlot class="imgBox" v-for="(item,index) in homeConfig.layout" :key="index"
|
|
|
- :hasPermi="item.limits">
|
|
|
+ <permissionsSlot class="imgBox" v-for="(item,index) in homeConfig.layout" :key="index" :hasPermi="item.limits">
|
|
|
<img v-if="index<3" :src="item.img" @click="buttonClick(item)">
|
|
|
</permissionsSlot>
|
|
|
</view>
|
|
@@ -72,7 +70,7 @@
|
|
|
outSubjectPhoto,
|
|
|
gradingControl
|
|
|
} from '@/api/basicsModules/index.js'
|
|
|
- import {} from '@/api/safetyExamine/index.js'
|
|
|
+ // import {} from '@/api/safetyExamine/index.js'
|
|
|
export default {
|
|
|
name: "homeConfigurationSlot",
|
|
|
props: {
|
|
@@ -102,73 +100,72 @@
|
|
|
},
|
|
|
//按钮点击事件
|
|
|
buttonClick(item) {
|
|
|
- if (item.buttonType === 'page') {//随手拍
|
|
|
- if (item.route === 'snapshotManage') {//安全检查
|
|
|
+ if (item.buttonType === 'page') { //随手拍
|
|
|
+ if (item.route === 'snapshotManage') { //安全检查
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
}
|
|
|
- if (item.route === 'safetyExamine') {//安全检查
|
|
|
+ if (item.route === 'safetyExamine') { //安全检查
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
//this.getGentleIdentifier(item.routeUrl)
|
|
|
}
|
|
|
- if (item.route === 'leaveInspection') {//离开检查
|
|
|
- console.log(11)
|
|
|
+ if (item.route === 'leaveInspection') { //离开检查
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
//this.outSubjectPhoto(item.routeUrl);
|
|
|
}
|
|
|
- if (item.route === 'accessQualification') {//准入审核
|
|
|
+ if (item.route === 'accessQualification') { //准入审核
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
//this.outSubjectPhoto(item.routeUrl);
|
|
|
}
|
|
|
- if (item.route === 'gasBottle') {//气瓶管理
|
|
|
+ if (item.route === 'gasBottle') { //气瓶管理
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
}
|
|
|
- if (item.route === 'warningRecording') {//安全报警
|
|
|
+ if (item.route === 'warningRecording') { //安全报警
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
}
|
|
|
- if (item.route === 'emergencyEvacuation') {//应急处置
|
|
|
+ if (item.route === 'emergencyEvacuation') { //应急处置
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
}
|
|
|
- if (item.route === 'gradingControl') {//分級管控
|
|
|
+ if (item.route === 'gradingControl') { //分級管控
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
}
|
|
|
//学生端------------------------
|
|
|
- if (item.route === 'integralExchange') {//积分兑换
|
|
|
+ if (item.route === 'integralExchange') { //积分兑换
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
//this.saoCode(item.routeUrl)
|
|
|
}
|
|
|
- if (item.route === 'accessApplication') {//准入申请
|
|
|
+ if (item.route === 'accessApplication') { //准入申请
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
}
|
|
|
- if (item.route === 'studentGasBottle') {//气瓶管理
|
|
|
+ if (item.route === 'studentGasBottle') { //气瓶管理
|
|
|
uni.navigateTo({
|
|
|
url: item.routeUrl,
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }else if (item.buttonType === 'button') {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ } else if (item.buttonType === 'button') {
|
|
|
if (item.route === 'photoInspection') {
|
|
|
this.outSubjectPhoto();
|
|
|
}
|
|
@@ -182,40 +179,52 @@
|
|
|
}
|
|
|
},
|
|
|
//获取用户身份标识"adminGentle": false, 管理员身份 "rectifyGentle": false, 院级管理员collegeGentle 整改身份"applyGentle": false 检查者身份
|
|
|
- async getGentleIdentifier(routeUrl){
|
|
|
+ async getGentleIdentifier(routeUrl) {
|
|
|
let self = this;
|
|
|
- const {data} = await getGentleIdentifier();
|
|
|
- if(data.code==200){
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await getGentleIdentifier();
|
|
|
+ if (data.code == 200) {
|
|
|
let pageType = null
|
|
|
- // 如果是管理员 检查者和整改者
|
|
|
- let list=[];
|
|
|
- if(data.data.adminGentle || data.data.collegeGentle){//校级管理员
|
|
|
- list.push({name:'管理员',pageType:1})
|
|
|
- }
|
|
|
- if(data.data.applyGentle ||data.data.myApplyGentle){
|
|
|
- list.push({name:'检查者',pageType:2})
|
|
|
- }
|
|
|
- if(data.data.rectifyGentle){
|
|
|
- list.push({name:'整改者',pageType:3})
|
|
|
- }
|
|
|
- if(!data.data.adminGentle && !data.data.applyGentle && !data.data.myApplyGentle && !data.data.rectifyGentle && !data.data.collegeGentle){
|
|
|
-
|
|
|
- }
|
|
|
- uni.setStorageSync('gentleIdentifier',list)
|
|
|
- uni.setStorageSync('gentleIdentifierData',data.data)
|
|
|
- if(list.length>0){
|
|
|
- uni.navigateTo({
|
|
|
- url: routeUrl,
|
|
|
- });
|
|
|
- }else{
|
|
|
- uni.showToast({
|
|
|
- title: '没有相关权限',
|
|
|
- icon:"none",
|
|
|
- mask:true,
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ // 如果是管理员 检查者和整改者
|
|
|
+ let list = [];
|
|
|
+ if (data.data.adminGentle || data.data.collegeGentle) { //校级管理员
|
|
|
+ list.push({
|
|
|
+ name: '管理员',
|
|
|
+ pageType: 1
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (data.data.applyGentle || data.data.myApplyGentle) {
|
|
|
+ list.push({
|
|
|
+ name: '检查者',
|
|
|
+ pageType: 2
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (data.data.rectifyGentle) {
|
|
|
+ list.push({
|
|
|
+ name: '整改者',
|
|
|
+ pageType: 3
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (!data.data.adminGentle && !data.data.applyGentle && !data.data.myApplyGentle && !data.data
|
|
|
+ .rectifyGentle && !data.data.collegeGentle) {
|
|
|
+
|
|
|
+ }
|
|
|
+ uni.setStorageSync('gentleIdentifier', list)
|
|
|
+ uni.setStorageSync('gentleIdentifierData', data.data)
|
|
|
+ if (list.length > 0) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: routeUrl,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '没有相关权限',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
//获取拍照检查配置
|
|
|
async outSubjectPhoto(routeUrl) {
|
|
@@ -236,7 +245,7 @@
|
|
|
sourceRiskUrl: "",
|
|
|
};
|
|
|
uni.navigateTo({
|
|
|
- url: routeUrl+'?newData=' + encodeURIComponent(JSON.stringify(obj)),
|
|
|
+ url: routeUrl + '?newData=' + encodeURIComponent(JSON.stringify(obj)),
|
|
|
});
|
|
|
} else if (data.data == false) {
|
|
|
//不需要检查
|
|
@@ -260,7 +269,7 @@
|
|
|
sourceRiskUrl: data.data.sourceRiskUrl,
|
|
|
};
|
|
|
uni.navigateTo({
|
|
|
- url: routeUrl+'?newData=' + encodeURIComponent(JSON.stringify(obj)),
|
|
|
+ url: routeUrl + '?newData=' + encodeURIComponent(JSON.stringify(obj)),
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -280,7 +289,7 @@
|
|
|
onlyFromCamera: true,
|
|
|
success: function(res) {
|
|
|
uni.navigateTo({
|
|
|
- url: routeUrl+'?q=' + encodeURIComponent(JSON
|
|
|
+ url: routeUrl + '?q=' + encodeURIComponent(JSON
|
|
|
.stringify(res.result))
|
|
|
});
|
|
|
}
|