981 lines
24 KiB
Vue
Raw Normal View History

2022-06-08 15:48:09 +08:00
<template>
2023-03-20 18:43:57 +08:00
<view class="fullHeight projectIndexPage" style="background-color: white">
2024-04-14 22:53:26 +08:00
<scroll-view class="" :class="accountType == 5 || accountType == 6 || accountType == 10 ? 'smallHeight' : ''"
scroll-y>
<headers :showBack="accountType == 5 || accountType == 6 || accountType == 10 ? false : true"
:themeType="'white'">
2022-06-08 15:48:09 +08:00
<view class="headerName">
2023-03-20 18:43:57 +08:00
{{ projectDetail.projectName }}
2022-06-08 15:48:09 +08:00
</view>
</headers>
<image src="/static/projectIndexBG.png" class="projectIndexBG"
2023-03-20 18:43:57 +08:00
:style="{ height: systemInfo.statusBarHeight + 357 + 'px' }"></image>
2022-06-08 15:48:09 +08:00
<view class="topBoxContent">
2023-03-20 18:43:57 +08:00
<view class="" style="height: 20px"> </view>
2022-06-08 15:48:09 +08:00
<view class="progressBox">
<image src="/static/progressLine.png" class="progressLine"></image>
2023-03-20 18:43:57 +08:00
<view class="title1"> 工程进度 </view>
2022-06-08 15:48:09 +08:00
<view class="title2">
2023-03-20 18:43:57 +08:00
<text>{{
projectDetail.periodRatio ? projectDetail.periodRatio : '--'
}}</text><text class="unit">%</text>
2022-06-08 15:48:09 +08:00
</view>
2023-03-20 18:43:57 +08:00
<text class="status" :class="projectDetail.contractPeriodType == 2 ? 'redStatus' : ''">{{
projectDetail.contractPeriodType == 1 ? '正常' : '已延期'
}}</text>
2022-06-08 15:48:09 +08:00
</view>
<view class="weatherBox">
<view class="top">
2023-03-20 18:43:57 +08:00
{{ weatherInfo.temperature }}
<image class="weatherIcon"
:src=" '/static/weatherIcon/' +weatherIcon(weatherInfo.weather) +'.png'">
</image>
2022-06-08 15:48:09 +08:00
</view>
<view class="bottom">
<!-- {{weatherInfo.reporttime.split(' ')[0]}} -->
2023-03-20 18:43:57 +08:00
{{ weatherInfo.winddirection }} {{ weatherInfo.windpower }}
2022-06-08 15:48:09 +08:00
</view>
</view>
<view class="dateBox">
<view class="item">
<view class="">
2023-03-20 18:43:57 +08:00
{{
projectDetail.contractPeriodStartTime != null
? projectDetail.contractPeriodStartTime
: '—.—.—'
}}
2022-06-08 15:48:09 +08:00
</view>
2023-03-20 18:43:57 +08:00
<view class=""> 项目开工日期 </view>
2022-06-08 15:48:09 +08:00
</view>
<view class="item item2">
<view class="">
2023-03-20 18:43:57 +08:00
{{
projectDetail.contractPeriodEndTime != null
? projectDetail.contractPeriodEndTime
: '—.—.—'
}}
2022-06-08 15:48:09 +08:00
</view>
2023-03-20 18:43:57 +08:00
<view class=""> 要求完成日期 </view>
2022-06-08 15:48:09 +08:00
</view>
<!-- <view class="item">
<view class="">
..
</view>
<view class="">
预计完成日期
</view>
</view> -->
</view>
</view>
<view class="moudleContent">
2023-03-20 18:43:57 +08:00
<view class="moudleTitle"> ·已有产品· </view>
2022-06-08 15:48:09 +08:00
<view class="moudleBox">
2023-03-20 18:43:57 +08:00
<view class="moudleItem" @click="goMoudleFn(item)" v-for="(item, index) in list" :key="index"
v-if="item.operation && item.moduleType == 2 && item.appShow == 1">
<view class="inner" v-if="COMPANY=='sanjiang'">
<!-- <view class="imgBox" v-if="iconType == 1">
<image class="img" :src="'/static/moudleImg/' + item.moduleIcon + '.png'"></image>
</view> -->
<view class="imgBox" v-if="item.bigModuleIcon">
<image class="img" :src="'/static/sjjtIcon/' + item.bigModuleIcon + '.png'"></image>
</view>
<view class="desc">
{{ item.appName }}
</view>
</view>
<view class="inner" v-else>
2022-06-08 15:48:09 +08:00
<view class="imgBox" v-if="iconType == 1">
2023-03-20 18:43:57 +08:00
<image class="img" :src="'/static/moudleImg/' + item.moduleIcon + '.png'"></image>
2022-06-08 15:48:09 +08:00
</view>
<view class="imgBox" v-if="iconType == 2">
2023-03-20 18:43:57 +08:00
<image class="img" :src="'/static/moudleImg/' + item.bigModuleIcon + '.png'"></image>
2022-06-08 15:48:09 +08:00
</view>
<view class="desc">
2023-03-20 18:43:57 +08:00
{{ item.appName }}
2022-06-08 15:48:09 +08:00
</view>
</view>
</view>
2024-03-29 17:34:09 +08:00
<!-- <view class="moudleItem" @click="goMoudleFnTest()">
2024-03-05 16:53:50 +08:00
<view class="inner">
<view class="imgBox">
<image class="img" src=""></image>
</view>
<view class="desc">
实测监管ss
</view>
</view>
2024-03-29 17:34:09 +08:00
</view> -->
2022-06-08 15:48:09 +08:00
</view>
</view>
<!-- <view class="moudleTitle">
2022-06-08 15:48:09 +08:00
未解锁模块
</view>
<view class="moudleBox moudleBox2">
<view class="moudleItem" v-for="(item,index) in list" :key="index" v-if="!item.operation&&item.moduleType==2&&item.appShow==1">
<view class="inner">
<view class="imgBox">
<image class="img" :src="'/static/moudleImg/'+item.moduleIcon+'.png'"></image>
</view>
<view class="desc">
{{item.appName}}
</view>
</view>
</view>
</view> -->
</scroll-view>
2023-02-06 11:14:16 +08:00
<uni-popup ref="popupqrcode" type="center">
<view class="qrcodeItem">
2023-03-20 18:43:57 +08:00
<view class="title"> 打卡成功 </view>
2023-02-06 11:14:16 +08:00
<view class="checkingPointName">
2023-03-20 18:43:57 +08:00
巡检点{{ qrCode.checkingPointName }}
2023-02-06 11:14:16 +08:00
</view>
2023-03-20 18:43:57 +08:00
<view class="position"> 巡检点位置{{ qrCode.position }} </view>
2023-02-06 11:14:16 +08:00
</view>
</uni-popup>
2024-04-14 22:53:26 +08:00
<footers :activeTab="'projectEnd'" v-if="accountType == 5 || accountType == 6 || accountType == 10"></footers>
2022-06-08 15:48:09 +08:00
</view>
</template>
<script>
2023-03-20 18:43:57 +08:00
import headers from '../../../components/headers/headers.vue'
2022-06-08 15:48:09 +08:00
import footers from '../../../components/footers/footers.vue'
import {
2022-08-02 15:11:04 +08:00
closeBle
2023-03-20 18:43:57 +08:00
} from '@/static/js/BLEConn.js'
2022-06-08 15:48:09 +08:00
export default {
components: {
headers,
footers
},
data() {
return {
2023-02-06 11:14:16 +08:00
qrCode: {},
2022-06-08 15:48:09 +08:00
projectDetail: {
projectName: '',
2022-08-02 15:11:04 +08:00
contractPeriodEndTime: '',
2023-02-06 11:14:16 +08:00
contractPeriodStartTime: '', //-.-.-
2022-06-08 15:48:09 +08:00
contractPeriodType: 1, //1是正常 2是已延期
2023-03-20 18:43:57 +08:00
periodRatio: 0
2022-06-08 15:48:09 +08:00
},
2023-02-06 11:14:16 +08:00
userInfo: {},
2022-06-08 15:48:09 +08:00
searchsn: '',
accountType: 1,
list: [],
weatherInfo: {
2023-03-20 18:43:57 +08:00
city: '--',
weather: '-',
temperature: '--',
winddirection: '--',
windpower: '--',
humidity: '--'
2022-06-08 15:48:09 +08:00
},
2023-03-20 18:43:57 +08:00
iconType: '1',
2022-06-08 15:48:09 +08:00
systemInfo: {
statusBarHeight: 0
2023-03-20 18:43:57 +08:00
},
styType: '',
//天气
imgUrl: '',
date: '', //现在时间
// weatherInfo: '--',
adressDetail: '--',
city: '',
url: '',
2023-11-04 09:23:47 +08:00
versionData: '',
2022-06-08 15:48:09 +08:00
}
},
mounted() {
this.loadWeather();
2023-03-20 18:43:57 +08:00
},
2022-06-08 15:48:09 +08:00
onShow() {
this.getSystemLogoConfig()
2023-03-20 18:43:57 +08:00
closeBle()
.then((res) => {
// this.closeDiv = false
// this.clear()
// uni.hideLoading()
console.log('断开蓝牙成功')
})
.catch((err) => {
// uni.hideLoading()
console.log('断开蓝牙失败')
})
2022-08-02 15:11:04 +08:00
if (uni.getStorageSync('oldObj')) {
2023-03-20 18:43:57 +08:00
uni.removeStorageSync('oldObj')
2022-06-08 15:48:09 +08:00
}
2022-08-02 15:11:04 +08:00
if (uni.getStorageSync('buildObj')) {
2023-03-20 18:43:57 +08:00
uni.removeStorageSync('buildObj')
2022-06-08 15:48:09 +08:00
}
},
onLoad() {
2023-03-20 18:43:57 +08:00
var userInfo = JSON.parse(uni.getStorageSync('userInfo'))
2024-04-14 22:53:26 +08:00
let that = this;
2023-03-20 18:43:57 +08:00
console.log('userInfo===========', userInfo)
this.userInfo = userInfo
2022-06-08 15:48:09 +08:00
this.accountType = userInfo.accountType
2023-03-20 18:43:57 +08:00
this.accountType = userInfo.accountType
this.styType = userInfo.styleType
2022-06-08 15:48:09 +08:00
var arr = userInfo.menuAuthority.moduleList
2023-02-06 11:14:16 +08:00
console.log('上面的', arr)
2022-06-08 15:48:09 +08:00
this.systemInfo = uni.getStorageSync('systemInfo')
this.getSystemLogoConfig()
if (this.accountType == 5 || this.accountType == 6) {
this.searchsn = userInfo.sn
this.getProjectDetail()
2024-04-14 22:53:26 +08:00
this.getAllModule(arr)
} else if(this.accountType == 10){
this.sendRequest({
url: 'xmgl/company/getTenantOrgTreeList',
data: {
userId: userInfo.userId,
},
method: 'POST',
success(res) {
console.log(res,'777888')
if(res && res.result && res.result.length > 0){
let responseData = res.result;
that.selectedDefaultProject(responseData[0])
}
}
})
2022-06-08 15:48:09 +08:00
} else {
2022-08-02 15:11:04 +08:00
this.projectDetail = JSON.parse(uni.getStorageSync('projectDetail'))
2022-06-08 15:48:09 +08:00
this.loadWeather()
2024-04-14 22:53:26 +08:00
this.getAllModule(arr)
2022-06-08 15:48:09 +08:00
}
this.viewVersionInfo()
},
2023-03-20 18:43:57 +08:00
onReady() {},
2022-06-08 15:48:09 +08:00
methods: {
2024-04-14 22:53:26 +08:00
// 默认选中第一个组织的第一个项目
selectedDefaultProject(obj) {
2024-04-15 09:53:37 +08:00
console.log(obj.list,888999)
2024-04-14 22:53:26 +08:00
if (obj.list && obj.list.length > 0) {
obj.list.map((item) => {
this.selectedDefaultProject(item);
});
} else {
this.searchsn = obj.sn
console.log(obj.sn,888999)
this.getProjectDetail()
this.getAllModule([])
uni.setStorageSync('userInfo',JSON.stringify({...this.userInfo,sn: obj.sn}))
}
},
2022-06-08 15:48:09 +08:00
viewVersionInfo() {
console.log('进入页面调用');
2022-08-02 15:11:04 +08:00
//fix 避开检查更新 罗劲章
// return false
2022-06-08 15:48:09 +08:00
var that = this
//获取当前应用版本
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
2024-03-29 17:34:09 +08:00
// console.log('版本号的数据信息', widgetInfo.version);//其实是应用版本名称
console.log('应用版本名称', widgetInfo.version);
that.versionName = widgetInfo.version
console.log('应用版本号', widgetInfo.versionCode);
that.versionNo = widgetInfo.versionCode
})
console.log('viewVersionInfo', that.url_config)
2022-06-08 15:48:09 +08:00
// uni.navigateTo({
// url:'versionInfo'
// })
2023-03-20 18:43:57 +08:00
if (
this.systemInfo.platform.indexOf('android') != -1 &&
typeof plus !== 'undefined'
) {
2022-06-08 15:48:09 +08:00
//获取最新版本
that.sendRequest({
2023-03-20 18:43:57 +08:00
url: 'xmgl/appVersion/getAppVersion',
2022-06-08 15:48:09 +08:00
data: {},
2023-03-20 18:43:57 +08:00
method: 'POST',
2022-06-08 15:48:09 +08:00
success(res2) {
2024-03-29 17:34:09 +08:00
console.log('获取当前app应用版本名称', that.versionName);
console.log('获取平台版本名称', res2.result.versionName);
let jxjAppVersionName = res2.result.versionName
console.log('获取当前app应用版本号', that.versionNo);
2023-11-04 09:23:47 +08:00
console.log('获取平台版本号', res2.result.versionNo);
2024-03-29 17:34:09 +08:00
let jxjAppVersionNo = res2.result.versionNo
2024-04-14 22:53:26 +08:00
2024-03-29 17:34:09 +08:00
if (res2.result && jxjAppVersionNo !== that.versionNo) {
2022-06-08 15:48:09 +08:00
uni.showModal({
title: '版本更新',
content: '更新内容:' + res2.result.versionDescribe,
// confirmText: '更新',
showCancel: false,
success(res) {
if (res.confirm) {
2023-03-20 18:43:57 +08:00
console.log('用户点击确定')
2024-03-29 17:34:09 +08:00
// var url = that.url_config + 'image/' + JSON.parse(res2.result.downloadUrl)[0].url//地址拼错啦,直接返回的就是下载地址
var url = JSON.parse(res2.result.downloadUrl)[0].url
2022-06-08 15:48:09 +08:00
console.log('apk地址', url)
uni.showModal({
title: '提示',
2024-03-29 17:34:09 +08:00
content: '正在后台下载更新资源,请耐心等待......',
2022-06-08 15:48:09 +08:00
showCancel: false
})
uni.downloadFile({
url: url,
success: (res) => {
// uni.hideLoading()
console.log('res', res)
if (res.statusCode === 200) {
2024-03-29 17:34:09 +08:00
console.log('下载成功')
2022-06-08 15:48:09 +08:00
var fileSaveUrl = plus.io
2023-03-20 18:43:57 +08:00
.convertLocalFileSystemURL(
res.tempFilePath
)
2022-06-08 15:48:09 +08:00
plus.runtime.openFile(res
2023-03-20 18:43:57 +08:00
.tempFilePath) //选择软件打开文件
2022-06-08 15:48:09 +08:00
}
}
2023-03-20 18:43:57 +08:00
})
2022-06-08 15:48:09 +08:00
} else if (res.cancel) {
2023-03-20 18:43:57 +08:00
console.log('用户点击取消')
2022-06-08 15:48:09 +08:00
}
}
})
} else {
// uni.showToast({
// title: '您已经是最新版本啦!',
// icon: 'none'
// })
}
}
})
}
},
weatherIcon(index) {
if (index == "晴") {
return "w_sun";
} else if (index == "多云") {
return "w_overcast";
} else if (index == "阴") {
return "w_cloud";
} else if (index.indexOf("雨")) {
return "w_rain";
} else if (index.indexOf("雷")) {
return "w_thunder";
} else if (index.indexOf("雪")) {
2023-11-04 09:23:47 +08:00
return "w_snow";
} else if (index.indexOf("雾")) {
2023-11-04 09:23:47 +08:00
return "w_fog";
} else {
return "w_cloud";
}
},
2023-03-20 18:43:57 +08:00
2022-08-02 15:11:04 +08:00
getSystemLogoConfig() {
2022-06-08 15:48:09 +08:00
var that = this
this.sendRequest({
2023-03-20 18:43:57 +08:00
url: 'xmgl/systemLogoConfig/selectSystemLogoConfig',
2022-08-02 15:11:04 +08:00
data: {},
2023-03-20 18:43:57 +08:00
method: 'GET',
2022-06-08 15:48:09 +08:00
success(res) {
console.log(res.result.iconType)
2023-03-20 18:43:57 +08:00
that.iconType = res.result.iconType ? res.result.iconType : '1'
2022-06-08 15:48:09 +08:00
}
})
},
loadWeather() {
console.log('进来了吗:==========');
2023-03-20 18:43:57 +08:00
//获取天气温度等信息
let that = this
uni.getLocation({
type: 'gcj02',
geocode: true,
2023-11-04 09:23:47 +08:00
isHighAccuracy: "true",
accuracy: "best", // 精度值为20m
2023-03-20 18:43:57 +08:00
success: function(res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
var location = res.longitude + ',' + res.latitude
//通过当前经纬度获取当前地址
uni.request({
url: "https://restapi.amap.com/v3/geocode/regeo",
data: {
2023-12-15 14:18:44 +08:00
key: "56c91fb2683e5bf0f46014ac200d4c1b", //高德地图key
2023-03-20 18:43:57 +08:00
location: location
},
method: "GET",
success(res) {
2023-03-20 18:43:57 +08:00
console.log("地址", res)
if (res.data.status == "1") {
var one = res.data.regeocode.formatted_address
if (one) {
that.adressDetail = one.substr(3, 3) + one.substr(9,
4) + one.substr(20, 7)
}
var city = res.data.regeocode.addressComponent.city
console.log("地址", that.adressDetail)
//通过当前城市,获取当前天气
uni.request({
url: "http://restapi.amap.com/v3/weather/weatherInfo",
data: {
key: "56c91fb2683e5bf0f46014ac200d4c1b",
city: city,
extensions: "base",
output: "JSON",
},
method: "GET",
success(res) {
if (res.data.status == "1") {
that.weatherInfo = res.data.lives[0]
console.log("成功获取天气", res)
//获取完地址天气等信息后,开始画水印
// that.canversImg();
}
}
})
}
2022-06-08 15:48:09 +08:00
}
2023-03-20 18:43:57 +08:00
})
2023-12-15 11:34:44 +08:00
},
fail: function(msg) {
2024-03-05 16:53:50 +08:00
console.log("获取位置失败", msg)
2022-06-08 15:48:09 +08:00
}
});
2023-03-20 18:43:57 +08:00
// let city=this.projectDetail.cityCode
// uni.request({
// url: 'https://v0.yiketianqi.com/api', //仅为示例,并非真实接口地址。
// data: {
// key: '3b060f3a0ce4bafebeba1621dcd99c31',
// city:city ,
// extensions: 'base',
// output: 'JSON'
// }
// })
// .then((res) => {
// console.log('天气的数据', res)
// this.weatherInfo = res.data.lives[0]
// localStorage.setItem('weatherInfo', JSON.stringify(this.weatherInfo))
// })
2022-06-08 15:48:09 +08:00
},
2024-03-05 16:53:50 +08:00
goMoudleFnTest() {
uni.navigateTo({
url: '../realMonitor/index'
})
},
2022-06-08 15:48:09 +08:00
goMoudleFn(item) {
2022-08-02 15:11:04 +08:00
//添加虚拟模块 报警提示
// if(item.moduleName=="预警播报"){
// uni.navigateTo({
// url: '/pages/alarmPage/index'
// })
// return false;
// }
2023-03-22 15:38:12 +08:00
console.log('item.plugin===================', item)
2022-06-08 15:48:09 +08:00
switch (item.plugin) {
2022-06-08 15:48:09 +08:00
case 'markRoom':
uni.navigateTo({
url: '../markRoom/markRoom'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'videoMonitor':
uni.navigateTo({
2023-03-20 18:43:57 +08:00
url: '../../videoManage/videoList?sn=' +
this.projectDetail.projectSn +
2022-06-08 15:48:09 +08:00
'&pageType=backEnd'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'projectInfo':
uni.navigateTo({
url: '../project/projectInfo'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'environmentMonitor':
uni.navigateTo({
url: '../environment/menu'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'laborManage':
uni.navigateTo({
url: '../laborManage/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'constructionLog':
uni.navigateTo({
url: '../constructionLog/list'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'electricBoxMange':
uni.navigateTo({
url: '../electricBox/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'lifterManage':
uni.navigateTo({
url: '../lifterMonitoring/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'carManage':
uni.navigateTo({
url: '../carManage/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'towerManage':
uni.navigateTo({
url: '../towerManage/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'dailyInspection':
uni.navigateTo({
url: '../dailyCheck/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'qualitySpringback':
uni.navigateTo({
url: '../qualitySpringback/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'unloadManage':
uni.navigateTo({
url: '../unload/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'concreteMonitoring':
uni.navigateTo({
url: '../concreteMonitoring/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'safeManage':
// uni.navigateTo({
// url: '../safeManage/index'
// })
uni.navigateTo({
url: '../safeManage/safeIndex'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
// uni.navigateTo({
// url: '../safeManage/addExamine'
// })
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'qualityManage':
uni.navigateTo({
url: '../qualityManage/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'carWashManage':
uni.navigateTo({
url: '../carWashManage/index'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'dangerBigProject':
uni.navigateTo({
url: '../dangerBigProject/index'
})
2023-03-20 18:43:57 +08:00
break
2022-08-02 15:11:04 +08:00
case 'fileManage':
2022-06-08 15:48:09 +08:00
uni.navigateTo({
url: '../../fileManage/fileManage'
})
2023-03-20 18:43:57 +08:00
break
2022-06-08 15:48:09 +08:00
case 'betonManage':
uni.navigateTo({
url: '../betonManage/index'
})
2023-03-20 18:43:57 +08:00
break
case 'progressManage':
2023-03-22 15:38:12 +08:00
uni.navigateTo({
url: '../progressManagement/index'
})
break
case 'dangerBroadcast':
2022-08-02 15:11:04 +08:00
uni.navigateTo({
2023-02-06 11:14:16 +08:00
url: '../../alarmPage/index'
2022-08-02 15:11:04 +08:00
})
2023-03-20 18:43:57 +08:00
break
2023-11-04 09:23:47 +08:00
case 'standardSchedule':
uni.navigateTo({
url: '../standardSchedule/index',
})
break
2023-12-15 09:27:23 +08:00
case 'smartBeamField':
uni.navigateTo({
url: '../smartBeamField/beamMenu',
})
break
2023-02-06 11:14:16 +08:00
case 'saosao':
console.log('打开saosao')
// let that = this;
uni.scanCode({
scanType: ['qrCode'],
success: function(res) {
2023-03-20 18:43:57 +08:00
console.log('扫一扫得到的数据:' + res.result)
uni.navigateTo({
url: '../scan/saoSao?data=' + res.result
})
// let qrcodeVal=JSON.parse(res.result)
// let param={
// checkingPointId:qrcodeVal.checkingPointId,
// checkingPointName:qrcodeVal.checkingPointName,
// checkingPointUserId:that.userInfo.userId,
// checkingPointUserName:that.userInfo.realName||that.userInfo.account,
// position:qrcodeVal.position
// }
// that.sendRequest({
// url: "xmgl/checkingPointInfo/add",
// data:param,
// method: "POST",
// success(res) {
// console.log(res,'res');
// console.log(param,'===')
// that.qrCode=param;
// that.$refs.popupqrcode.open();
// setTimeout(item=>{
// that.$refs.popupqrcode.close();
// },5000)
// }
// })
2023-02-06 11:14:16 +08:00
}
2023-03-20 18:43:57 +08:00
})
break
2022-06-08 15:48:09 +08:00
default:
uni.showToast({
icon: 'none',
title: '该产品暂未开放,敬请期待!'
})
}
},
getProjectDetail() {
var that = this
this.sendRequest({
2023-03-20 18:43:57 +08:00
url: 'xmgl/project/getProjectInfoBySn',
2022-06-08 15:48:09 +08:00
data: {
projectSn: this.searchsn
},
2023-03-20 18:43:57 +08:00
method: 'POST',
2022-06-08 15:48:09 +08:00
success(res) {
that.projectDetail = res.result
uni.setStorageSync('projectDetail', JSON.stringify(res.result))
that.loadWeather()
}
})
},
getAllModule(half) {
2023-03-20 18:43:57 +08:00
console.log('half====', half)
2022-06-08 15:48:09 +08:00
var that = this
2024-04-14 22:53:26 +08:00
if (this.accountType == 10) {
this.sendRequest({
url: 'xmgl/baseModule/getModuleAndMenuList',
data: {
projectSn: this.searchsn,
userId: this.userInfo.userId,
moduleType: 2,
},
method: 'POST',
success(res) {
if (res.success) {
var all = res.result.moduleList;
console.log("all", all);
all.forEach((element, index) => {
all[index].operation = false;
res.result.menuList.forEach((element2) => {
if (element2.moduleId == element.moduleId) {
all[index].operation = true;
}
});
});
console.log("all111", all);
that.list = all;
}
}
})
} else {
this.sendRequest({
url: 'xmgl/baseModule/list',
data: {
moduleType: 2,
styleType: this.styType
},
method: 'POST',
success(res) {
var all = res.result
all.forEach((element, index) => {
all[index].operation = false
half.forEach((element2) => {
if (element2.moduleId == element.moduleId) {
all[index].operation = true
all[index].menuList = element2.menuList
}
let newAll = all[index].menuList
})
2023-03-20 18:43:57 +08:00
})
2024-04-14 22:53:26 +08:00
that.list = all
// this.list=newAppShow
2023-02-06 11:14:16 +08:00
2024-04-14 22:53:26 +08:00
//添加报警提示模块
console.log('用户列表', that.list)
// that.list.push({
// operation:true,
// appName: "报警提示",
// appShow: 1,
// bigModuleIcon: "log_active2",
// disableModuleIcon: null,
// labelName: "报警提示",
// labelSortNum: "7",
// menuList: null,
// moduleDesc: "",
// moduleEquipment: 0,
// moduleIcon: "log_active",
// moduleIcon2: "log",
// moduleId: "41",
// moduleName: "报警提示",
// modulePath: "",
// moduleType: 2,
// plugin: "constructionLog",
// styleType: 1
// });
}
})
}
2022-06-08 15:48:09 +08:00
}
}
}
</script>
<style lang="scss" scoped>
2023-02-06 11:14:16 +08:00
.qrcodeItem {
padding: 40rpx 30rpx;
width: 480rpx;
background-color: #fff;
border-radius: 8rpx;
.title {
text-align: center;
margin-bottom: 12rpx;
}
}
2022-06-08 15:48:09 +08:00
.topBoxContent {
color: white;
font-size: 14px;
// background: linear-gradient(360deg, #A59FFF 0%, #3258FF 100%);
height: 260px;
position: relative;
.dateBox {
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 2;
.item {
flex: 1;
text-align: center;
}
.item2 {
border-left: 1px dashed white;
// border-right: 1px dashed white;
}
}
}
.progressBox {
width: 150px;
height: 150px;
position: relative;
text-align: center;
margin: 0px auto 25px;
.title1 {
padding-top: 24px;
}
.title2 {
font-size: 33px;
margin: 6px 0;
.unit {
font-size: 20px;
}
}
.status {
width: 52px;
height: 25px;
2023-03-20 18:43:57 +08:00
background: #8fda5c;
2022-06-08 15:48:09 +08:00
border-radius: 12px;
display: inline-block;
line-height: 25px;
}
.redStatus {
background: #ea6868;
}
.progressLine {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
}
.weatherBox {
position: absolute;
top: 15px;
right: 15px;
text-align: center;
.top {
font-size: 27px;
display: flex;
align-items: center;
}
.weatherIcon {
width: 36px;
height: 36px;
}
.bottom {
font-size: 10px;
}
}
.projectIndexPage {
/deep/.headerBox {
background-color: transparent;
border-bottom: none;
}
}
.progressBox {
width: 150px;
height: 150px;
position: relative;
text-align: center;
margin: 0px auto 24px;
.title1 {
padding-top: 24px;
}
.title2 {
font-size: 33px;
margin: 6px 0;
.unit {
font-size: 20px;
}
}
.status {
width: 52px;
height: 25px;
2023-03-20 18:43:57 +08:00
background: #8fda5c;
2022-06-08 15:48:09 +08:00
border-radius: 12px;
display: inline-block;
line-height: 25px;
}
.redStatus {
background: #ea6868;
}
.progressLine {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
}
.weatherBox {
position: absolute;
top: 10px;
right: 15px;
text-align: center;
.top {
font-size: 27px;
display: flex;
align-items: center;
}
.weatherIcon {
width: 36px;
height: 36px;
}
.bottom {
font-size: 10px;
}
}
.moudleBox2 {
opacity: 0.6;
}
.moudleBox {
overflow: hidden;
// margin: 20px 11px;
}
.moudleItem {
float: left;
width: 33.33%;
font-size: 13px;
text-align: center;
margin-bottom: 10px;
.inner {
border: 1px solid rgba(18, 41, 75, 0.06);
padding: 15px 0 15px;
margin: 0 5px;
border-radius: 5px;
}
.img {
width: 40px;
height: 40px;
2023-03-20 18:43:57 +08:00
color: red;
2022-06-08 15:48:09 +08:00
}
.desc {
margin-top: 6px;
color: rgba(38, 45, 71, 0.77);
}
}
.moudleTitle {
color: rgba(42, 43, 91, 0.5);
font-size: 13px;
margin: 0px 0 15px;
text-align: center;
}
.smallHeight {
// padding-bottom: 63px;
height: calc(100% - 63px);
}
.moudleContent {
box-shadow: 0px 4px 16px 0px rgba(212, 220, 236, 0.59);
border-radius: 8px;
padding: 15px 15px;
margin: 55px 15px 15px;
position: relative;
z-index: 2;
}
.projectIndexBG {
width: 100%;
height: 357px;
position: absolute;
top: 0;
left: 0;
}
2023-12-15 09:27:23 +08:00
</style>