提交代码

main
姜玉琦 2024-04-08 00:58:58 +08:00
parent 34ef6dd8f9
commit 366a897e54
47 changed files with 2682 additions and 1448 deletions

View File

@ -29,7 +29,7 @@ export function updatePwd(data) {
// 用户退出方法
export function loginOut() {
return request({
'url': '/wxApi/loginOut',
'url': '/wechat/loginOut',
'method': 'get'
})
}

View File

@ -17,3 +17,11 @@ export function findCountByType(data){
data: data
})
}
// 文件阅读
export function readFile(id){
return request({
url: '/wechat/projectFiles/readFile/'+id,
method: 'get'
})
}

View File

@ -29,10 +29,10 @@ App({
userProjectId:'',
appId: "wx9997d071b4996f23",
// 智慧工地后台接口访问域名
//reqUrl:'https://szgcwx.jhncidg.com',
reqUrl:'http://127.0.0.1:8091',
//uploadUrl:"https://szgcwx.jhncidg.com/wechat",
uploadUrl:'http://127.0.0.1:8091/wechat',
reqUrl:'https://szgcwx.jhncidg.com',
//reqUrl:'http://127.0.0.1:8091',
uploadUrl:"https://szgcwx.jhncidg.com/wechat",
//uploadUrl:'http://127.0.0.1:8091/wechat',
//御景路数字化集成管控平台接口访问域名
szhUrl:'https://szh.makalu.cc',
@ -79,6 +79,7 @@ App({
}
this.autoUpdate();
},
onLoad(){
},
@ -93,6 +94,12 @@ App({
});
},
initWxAuth:function(){
wx.redirectTo({
url: '../wx-auth/index',
})
},
//版本自动更新
autoUpdate:function(){
var self = this

View File

@ -1,6 +1,7 @@
{
"pages": [
"pages/login/index",
"pages/wx-auth/index",
"pages/gongchengliebiao/index",
"pages/gengduogongneng/index",
"pages/xiangmugaikuang/index",

View File

@ -2,7 +2,8 @@
module.exports = {
timeout: 60000,
appId: "wx9997d071b4996f23",
//baseUrl: 'http://127.0.0.1:8091',
baseUrl: 'https://szgcwx.jhncidg.com',
baseUrl: 'http://127.0.0.1:8091',
manageUrl: 'https://szgc.jhncidg.com',
noSecuritys:['/wechat/captchaImage','/wxApi/login']
};

View File

@ -19,7 +19,7 @@ Component({
},
observers: {
data: function (val) {
console.log(val)
//console.log(val)
this.initChart()
},
},

View File

@ -18,7 +18,7 @@ Component({
},
observers: {
chartData: function (val) {
console.log(val)
//console.log(val)
this.initChart()
},
},

View File

@ -172,8 +172,8 @@ Page({
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
urls: that.data.detectionImageList,
current: that.data.detectionImageList[e.currentTarget.dataset.index]
})
},

View File

@ -141,7 +141,7 @@
<van-col span="6"><text class="color_purple">检测报告</text></van-col>
<van-col span="18">
<view class="in-img-div" wx:if="{{minDetectionFileImages.length>0}}" wx:for="{{minDetectionFileImages}}" wx:key="index">
<image bindtap='showDetectionFileImg' data-index="{{index}}" src='{{item}}'></image>
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
<view class="in-img-div" wx:if="{{detectionFiles.length>0}}">
<image src='https://szgcwx.jhncidg.com/staticFiles/icon/pdf.png'></image>

View File

@ -27,7 +27,12 @@ Page({
},
getInfo(e) {
let {id,checkState,approveStatus,witnessUser} = e.currentTarget.dataset.set
let {
id,
checkState,
approveStatus,
witnessUser
} = e.currentTarget.dataset.set
if (approveStatus == "1" && witnessUser == this.data.loginName) {
wx.redirectTo({
url: `../../../pages/project_approve/approveCheckDetection/index?id=${id}`
@ -49,6 +54,76 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
wx.getStorage({
key: 'projectInfoList',
success: res => {
app.globalData.projectInfoList = res.data;
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
} else {
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
} else {
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -58,9 +133,14 @@ Page({
loginName: res.data.loginName,
projectId: app.globalData.projectId,
minRoleId: res.data.minRoleId,
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
})
this.getListData(app.globalData.projectId, res.data.deptId, res.data.minRoleId);
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
},

View File

@ -168,7 +168,7 @@ Page({
dataTypeLvl1:e.detail.id
})
let tempData = []
this.dataTypeLvl2AllList.forEach(it =>{
this.data.dataTypeLvl2AllList.forEach(it =>{
if(it.remark==e.detail.id){
tempData.push({"id":it.dictValue,"text":it.dictLabel});
}

View File

@ -150,6 +150,7 @@ Page({
if(res.code == 200){
let tempData = []
res.data.forEach(it =>{
console.log(that.data.dt1,"xxxxxxxxxxxxxxxx");
if(it.remark==that.data.dt1){
tempData.push({"id":it.dictValue,"text":it.dictLabel});
}
@ -176,7 +177,7 @@ Page({
dataTypeLvl1:e.detail.id
})
let tempData = []
this.dataTypeLvl2AllList.forEach(it =>{
this.data.dataTypeLvl2AllList.forEach(it =>{
if(it.remark==e.detail.id){
tempData.push({"id":it.dictValue,"text":it.dictLabel});
}

View File

@ -117,9 +117,9 @@ Page({
//跳转修改页面
onUpdate:function(){
let id = this.data.id;
let dt1= this.data.dataTypeLvl1
let dataTypeLvl1= this.data.infoData.dataTypeLvl1;
wx.redirectTo({
url: `../edit/index?id=${id}&dt1=${dt1}`,
url: `../edit/index?id=${id}&dt1=${dataTypeLvl1}`,
})
},

View File

@ -23,10 +23,14 @@ Page({
},
onClose() {
this.setData({ show: false });
this.setData({
show: false
});
},
showPopup() {
this.setData({ show: true });
this.setData({
show: true
});
},
skipAdd() {
@ -36,7 +40,11 @@ Page({
},
getInfo(e) {
let {id,approveStatus,superviseUser} = e.currentTarget.dataset.set
let {
id,
approveStatus,
superviseUser
} = e.currentTarget.dataset.set
if (approveStatus == "1" && superviseUser == this.data.loginName) {
wx.redirectTo({
url: `../../../pages/project_approve/approveChecking/index?id=${id}`
@ -52,6 +60,76 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
wx.getStorage({
key: 'projectInfoList',
success: res => {
app.globalData.projectInfoList = res.data;
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
} else {
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
} else {
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -63,9 +141,14 @@ Page({
minRoleId: res.data.minRoleId,
projectId: app.globalData.projectId,
projectNameArgs: app.globalData.projectName,
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
})
this.getProjectCheckingData(app.globalData.projectId, res.data.loginName, res.data.deptId, res.data.minRoleId);
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
},

View File

@ -1,5 +1,6 @@
import {
fileList,
readFile,
findCountByType,
} from '../../api/projectFiles'
@ -21,6 +22,7 @@ Page({
pageSize: 10,
lastDataSize: 10,
list: [],
deptIds:"",
},
/**
@ -37,7 +39,26 @@ Page({
lastDataSize: 10,
listData: []
})
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success: res => {
let fileDepts = "";
if(res.data.minRoleId>3){
if(res.data.minRoleId==4){
fileDepts += app.globalData.projectInfoList[0].projectInfoList[0].deptId;
}else{
app.globalData.projectInfoList.forEach(pro =>{
fileDepts += pro.projectInfoList[0].deptId;
});
}
}
this.setData({
deptIds:fileDepts
})
this.getListData();
}
})
},
/**
@ -50,11 +71,13 @@ Page({
return;
}
let that = this;
this.queryCount();
fileList({
fileBelong: this.data.activeState,
pageNum: this.data.pageNum,
pageSize: this.data.pageSize
pageSize: this.data.pageSize,
remark:this.data.deptIds
}).then(res => {
//这里处理this.data.lastDataSize=this.data.pageSize
if (that.data.list.length > 0 && res.rows.length > 0 && that.data.list[0].id == res.rows[0].id) {
@ -77,7 +100,7 @@ Page({
*/
queryCount() {
let that = this;
findCountByType({}).then(res => {
findCountByType({remark:this.data.deptIds}).then(res => {
if (res.data.length > 0) {
let sjbm = 0,
jtgs = 0,
@ -114,8 +137,9 @@ Page({
*/
openFile: function (e) {
let {
filePath
id,filePath
} = e.currentTarget.dataset.set
readFile(id);
wx.downloadFile({
// 示例 url并非真实存在
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + filePath,

View File

@ -28,7 +28,7 @@
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_text" wx:if="{{item.fileBelong=='1'}}">上级部门</view>
<view class="module_title module_title_flex inspect_list_title_text" wx:if="{{item.fileBelong=='2'}}">集团公司</view>
<view class="module_title module_title_flex inspect_list_title_text" wx:if="{{item.fileBelong=='3'}}">子公司</view>
<view class="module_title module_title_flex inspect_list_title_text" wx:if="{{item.fileBelong=='3'}}">{{item.deptName}}</view>
</view>
</view>
<view class="inspect_list_info">

View File

@ -222,8 +222,8 @@ Page({
showSignFileImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.sifnFileImages,
current: that.data.sifnFileImages[e.currentTarget.dataset.index]
urls: that.data.signFileImages,
current: that.data.signFileImages[e.currentTarget.dataset.index]
})
},

View File

@ -25,7 +25,11 @@ Page({
},
getInfo(e) {
let {id,approveStatus,witnessUser} = e.currentTarget.dataset.set
let {
id,
approveStatus,
witnessUser
} = e.currentTarget.dataset.set
if (approveStatus == "1" && witnessUser == this.data.loginName) {
wx.redirectTo({
url: `../../../pages/project_approve/approveMaterialSeal/index?id=${id}`
@ -41,6 +45,76 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
wx.getStorage({
key: 'projectInfoList',
success: res => {
app.globalData.projectInfoList = res.data;
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
} else {
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
} else {
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -50,9 +124,18 @@ Page({
loginName: res.data.loginName,
projectId: app.globalData.projectId,
minRoleId: res.data.minRoleId,
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
this.getListData(app.globalData.projectId, res.data.deptId, res.data.minRoleId);
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
},

View File

@ -19,6 +19,7 @@ Page({
measureType: "1",
measureTypeList: [],
measureInfo: "1",
infoTypeList: [],
measureInfoTypeList: [],
measurePosition: "",
measurePointPosition: "",
@ -29,14 +30,26 @@ Page({
//验收时间
measureTime: '',
measureResult: "1",
resultList:[{id:1,text:"合格"},{id:2,text:"不合格"}]
limit: 9,
measureFiles: [],
resultList: [{
id: 1,
text: "合格"
}, {
id: 2,
text: "不合格"
}],
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {projectId,projectName} = options
let {
projectId,
projectName
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -114,7 +127,10 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel});
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
})
that.setData({
measureTypeList: list
@ -140,9 +156,15 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel});
if (!it.remark) {
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
}
})
that.setData({
infoTypeList: res.data,
measureInfoTypeList: list
})
}
@ -221,7 +243,11 @@ Page({
loadShow: true
})
let that = this
let {projectId,loginName, deptId,measureType,
let {
projectId,
loginName,
deptId,
measureType,
measureInfo,
measurePosition,
measurePointPosition,
@ -230,7 +256,10 @@ Page({
superviseUser,
superviseUserName,
measureTime,
measureResult,imageInfoData} = that.data;
measureResult,
imageInfoData,
measureFiles
} = that.data;
//数据效验
if (projectId == "" || loginName == "" || deptId == "") {
app.toast("数据异常,请刷新页面重试!")
@ -309,7 +338,23 @@ Page({
})
return;
}
if (measureFiles.length > 0) {
for (let i = 0; i < measureFiles.length; i++) {
let _fileType = measureFiles[i].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
//判断附件类型,如果是图片直接展示,非图片则显示附件
if (this.data.fileType.indexOf(_fileType) == -1) {
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
that.setData({
loadShow: false
});
return;
}
}
}
let fileUrls = [];
let _measureFiles = [];
imageInfoData.forEach(async (item) => {
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
let name = "file"
@ -318,10 +363,51 @@ Page({
fileUrls.push(obj.data.fileName);
//验证图片上传完毕
if (fileUrls.length == imageInfoData.length) {
if(measureFiles.length>0){
measureFiles.forEach(async (_file) => {
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
let name = "file"
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
let obj = await that.syncUploadImage(uploadUrl, _file.path, name);
_measureFiles.push(obj.data.fileName);
if (_measureFiles.length == measureFiles.length) {
this.submitFroms(fileUrls,_measureFiles);
}
});
}else{
//不传入附件信息
this.submitFroms(fileUrls,"");
}
}
})
},
/**
* 表单提交
* @param {*} fileUrls
* @param {*} measureFiles
*/
submitFroms(fileUrls,measureFiles){
let that = this
let {
projectId,
loginName,
deptId,
measureType,
measureInfo,
measurePosition,
measurePointPosition,
qualityUser,
qualityUserName,
superviseUser,
superviseUserName,
measureTime,
} = that.data;
let params = {
projectId,
deptId,
imageUrls: fileUrls.toString(),
measureFiles: measureFiles.toString(),
measureType,
measureInfo,
measurePosition,
@ -331,7 +417,6 @@ Page({
superviseUser,
superviseUserName,
measureTime: measureTime+":00",
//measureResult,
approveStatus: "1",
createBy: loginName
}
@ -358,8 +443,6 @@ Page({
}
}
})
}
})
},
/**
@ -374,7 +457,9 @@ Page({
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
@ -396,10 +481,42 @@ Page({
})
},
/**
* 文件上传
* @param {*} e
*/
fileUpload(e) {
this.setData({
measureFiles: e.detail
});
},
//选择测量类型
onSelectMeasureType(e) {
let list = [];
if (e.detail.id == 6) {
this.data.infoTypeList.forEach(item => {
if (item.remark == "gjgc") {
list.push({
"id": item.dictValue,
"text": item.dictLabel
});
}
})
} else {
this.data.infoTypeList.forEach(item => {
if (!item.remark) {
list.push({
"id": item.dictValue,
"text": item.dictLabel
});
}
})
}
this.setData({
measureType:e.detail.id
measureType: e.detail.id,
measureInfo: list[0].id,
measureInfoTypeList: list
})
},

View File

@ -75,6 +75,14 @@
<voucher-select columns="{{resultList}}" placeholder="请选择测量结果" bindchange="onSelectType" ></voucher-select>
</view>
</view>
<view class="inspect_info_list" style="width: 100%;">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
</view>
<view class="problem_list_info_con">
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>

View File

@ -17,23 +17,35 @@ Page({
imageInfoData: [],
loadShow: false,
measureTypeList: [],
infoTypeList: [],
measureInfoTypeList: [],
activeName: "",
flowRecordList: [],
request:app.globalData.reqUrl
request: app.globalData.reqUrl,
limit: 9,
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"],
type: "",
info: "",
filesData: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id} = options
let {
id,
measureType,
measureInfo
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success: res => {
this.setData({
id,
type: measureType,
info: measureInfo,
projectId: app.globalData.projectId,
projectName: app.globalData.projectName,
loginName: res.data.loginName
@ -108,7 +120,10 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel});
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
})
that.setData({
measureTypeList: list
@ -134,9 +149,24 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel});
if (that.data.type == 6) {
if (it.remark) {
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
}
} else {
if (!it.remark) {
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
}
}
})
that.setData({
infoTypeList: res.data,
measureInfoTypeList: list
})
}
@ -149,7 +179,9 @@ Page({
*
*/
getInfo() {
let {id} = this.data
let {
id
} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectMeasure/info',
@ -166,9 +198,20 @@ Page({
imageInfoData.push(that.data.request + element + '.min.jpg');
});
}
let filesData = [];
if (res.data.measureFiles) {
res.data.measureFiles.split(',').forEach(element => {
let it = element.split('/');
filesData.push({
name: it[it.length - 1],
path: element
});
});
}
that.setData({
infoData: res.data,
imageInfoData,
filesData,
loadShow: false
})
}
@ -223,7 +266,7 @@ Page({
//验收时间
onInputTime(e) {
this.setData({
"infoData.measureTime":e.detail.value
"infoData.measureTime": e.detail.value + ":00"
})
},
@ -267,7 +310,13 @@ Page({
loadShow: true
})
let that = this
let {id,loginName,imageInfoData,infoData} = that.data;
let {
id,
loginName,
imageInfoData,
infoData,
measureFiles
} = that.data;
//数据效验
if (id == "") {
app.toast("数据异常,请刷新页面重试!")
@ -339,7 +388,22 @@ Page({
})
return;
}
if (measureFiles.length > 0) {
for (let i = 0; i < measureFiles.length; i++) {
let _fileType = measureFiles[i].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
//判断附件类型,如果是图片直接展示,非图片则显示附件
if (this.data.fileType.indexOf(_fileType) == -1) {
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
that.setData({
loadShow: false
});
return;
}
}
}
let fileUrls = [];
let _measureFiles = [];
imageInfoData.forEach(async (item) => {
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
if (item.indexOf(that.data.request) > -1) {
@ -352,9 +416,43 @@ Page({
}
//验证图片上传完毕
if (fileUrls.length == imageInfoData.length) {
if (measureFiles.length > 0) {
measureFiles.forEach(async (_file) => {
if (_file.path.indexOf("/profile") > -1) {
_measureFiles.push(_file.path);
} else {
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
let name = "file"
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
let obj = await that.syncUploadImage(uploadUrl, _file.path, name);
_measureFiles.push(obj.data.fileName);
}
if (_measureFiles.length == measureFiles.length) {
this.submitFroms(fileUrls, _measureFiles);
}
});
} else {
//不传入附件信息
this.submitFroms(fileUrls, "");
}
}
})
},
/**
* 表单提交
*/
submitFroms(fileUlrs, measureFiles) {
let that = this
let {
id,
loginName,
infoData
} = that.data;
let params = {
id,
imageUrls:fileUrls.toString(),
imageUrls: fileUlrs.toString(),
measureFiles: measureFiles.toString(),
measureType: infoData.measureType,
measureInfo: infoData.measureInfo,
measurePosition: infoData.measurePosition,
@ -389,9 +487,7 @@ Page({
}, 200)
}
}
})
}
})
});
},
/**
@ -406,7 +502,9 @@ Page({
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
@ -428,10 +526,42 @@ Page({
})
},
/**
* 文件上传
* @param {*} e
*/
fileUpload(e) {
this.setData({
measureFiles: e.detail
});
},
//选择测量类型
onSelectMeasureType(e) {
let list = [];
if (e.detail.id == 6) {
this.data.infoTypeList.forEach(item => {
if (item.remark == "gjgc") {
list.push({
"id": item.dictValue,
"text": item.dictLabel
});
}
})
} else {
this.data.infoTypeList.forEach(item => {
if (!item.remark) {
list.push({
"id": item.dictValue,
"text": item.dictLabel
});
}
})
}
this.setData({
"infoData.measureType":e.detail.id
"infoData.measureType": e.detail.id,
"infoData.measureInfo": list[0].id,
measureInfoTypeList: list
})
},

View File

@ -96,6 +96,14 @@
<voucher-datetime counts="5" placeholder="请选择测量时间" maxDate="{{maxDate}}" currentDate="{{currentDate}}" bindchange="onInputTime" time="{{infoData.measureTime}}"></voucher-datetime>
</view>
</view>
<view class="inspect_info_list" style="width: 100%;">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
</view>
<view class="problem_list_info_con">
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}" fileUrlArray="{{filesData}}"></file-uploader-all>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>

View File

@ -150,7 +150,7 @@ Page({
onUpdate:function(){
let id = this.data.id;
wx.redirectTo({
url: `../edit/index?id=${id}`,
url: `../edit/index?id=${id}&measureType=${this.data.infoData.measureType}&measureInfo=${this.data.infoData.measureInfo}`,
})
},

View File

@ -27,7 +27,11 @@ Page({
},
getInfo(e) {
let {id,approveStatus,superviseUser} = e.currentTarget.dataset.set
let {
id,
approveStatus,
superviseUser
} = e.currentTarget.dataset.set
if (approveStatus == "1" && superviseUser == this.data.loginName) {
wx.redirectTo({
url: `../../../pages/project_approve/approveMeasure/index?id=${id}`
@ -43,6 +47,76 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
wx.getStorage({
key: 'projectInfoList',
success: res => {
app.globalData.projectInfoList = res.data;
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
} else {
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
} else {
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -53,9 +127,18 @@ Page({
userName: res.data.userName,
projectId: app.globalData.projectId,
minRoleId: res.data.minRoleId,
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
this.getListData(app.globalData.projectId, res.data.deptId, res.data.minRoleId);
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
},

View File

@ -28,7 +28,7 @@ Page({
deptNames:"",
dataType:"",
trainDataTypeList:[],
fileType:["doc","docx","xls","xlsx","ppt","pptx","txt","pdf","png","jpg","jpeg","mp4"]
fileType:["doc","docx","xls","xlsx","ppt","pptx","pdf","png","jpg","jpeg"]
},
/**

View File

@ -23,7 +23,7 @@ Component({
},
observers: {
chartData: function (val) {
console.log(val)
//console.log(val)
this.initChart()
},
},

View File

@ -15,7 +15,7 @@ Component({
},
observers: {
chartData: function (val) {
console.log(val)
//console.log(val)
this.initChart()
},
},

View File

@ -19,7 +19,7 @@ Component({
/**数据监听 */
observers: {
columns: function (val) {
console.log(val)
//console.log(val)
if(val.length > 0){
this.setData({
floorList:val[0].floorList

View File

@ -1,6 +1,9 @@
import {
removeToken
} from '../../../utils/auth'
import {
loginOut
} from '../../../api/login'
const app = getApp()
Component({
/**数据监听 */
@ -18,6 +21,7 @@ Component({
showOldPass: true,
showNewPass: true,
showPassWord: true,
binding: false,
},
created() {
@ -59,6 +63,11 @@ Component({
});
},
//绑定公众号
binding: function () {
app.initWxAuth();
},
/**
* 修改密码返回
*/
@ -68,9 +77,27 @@ Component({
});
},
/**
* 修改密码返回
*/
closeBinding: function () {
this.setData({
binding: false
});
},
bindingBuild: function () {
wx.previewImage({
urls: "https://szgcwx.jhncidg.com/staticFiles/qr.jpg".split(","),
current: 0
})
},
//退出登录
loginOut: function () {
loginOut({}).then(res => {
removeToken();
});
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
@ -79,7 +106,6 @@ Component({
},
seeTap1() {
debugger
let that = this;
that.setData({
// 切换图标

View File

@ -2,7 +2,10 @@
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col",
"van-popup": "@vant/weapp/popup"
"van-popup": "@vant/weapp/popup",
"van-notice-bar": "@vant/weapp/notice-bar/index",
"van-grid": "@vant/weapp/grid/index",
"van-grid-item": "@vant/weapp/grid-item/index"
},
"navigationStyle":"custom"
}

View File

@ -20,9 +20,20 @@
</view>
</van-col>
</van-row>
<view class="left_manage_min" wx:if="{{true}}">
<view class="message-title">关注公众号才能成功开启消息通知</view>
</view>
<button wx:if="{{true}}" type="default" size="default" style="margin-top: 40rpx;background-color: #513ea7;color: #FFF;" bindtap="bindingBuild">立即关注公众号</button>
<view class="left_manage_min" wx:if="{{binding}}">
<view class="left_manage" bindtap="binding">
<image src="/images/img_1.png" class="left_icon"></image>
<text class="left_binding">开启消息通知</text>
<image src="/images/right.png" class="left_flaot"></image>
</view>
</view>
<view class="left_manage_min">
<view class="left_manage" bindtap="resPassword">
<image src="/images/set.png" class="left_icon"></image>
<image src="/images/img_5.png" class="left_icon"></image>
<text class="left_password">修改密码</text>
<image src="/images/right.png" class="left_flaot"></image>
</view>
@ -38,7 +49,7 @@
</van-popup>
<!--修改密码-->
<van-popup show="{{ resPas }}" position="left" class="passClass" custom-style="width: 100%;height:100%;background: #191d28 url(http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png) no-repeat bottom/100%;" bind:close="closeResPas">
<van-popup show="{{ resPas }}" position="left" class="passClass" custom-style="width: 100%;height:100%;background: #191d28 url(https://szgcwx.jhncidg.com/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png) no-repeat bottom/100%;" bind:close="closeResPas">
<view class="bg_bg">
<image src="https://szgcwx.jhncidg.com/staticFiles/img/yanzhu_logo_blue.png"></image>
</view>

View File

@ -49,6 +49,15 @@
padding: 0 5%;
margin-top: 40rpx;
}
.message-title{
color: #FFFFFF;
font-weight: 600;
text-align: center;
}
.color_blue {
color: #45affb;
}
.left_manage {
padding: 20rpx 20rpx 15rpx;
@ -85,6 +94,12 @@
padding-bottom: 5rpx;
}
.left_binding {
text-align: center;
padding-bottom: 5rpx;
color: #45affb;
}
.left_sign {
text-align: center;
padding-bottom: 5rpx;

View File

@ -1,4 +1,9 @@
// pages/gongchengliebiao/index.js\
import {
removeToken
} from '../../utils/auth'
import {
loginOut
} from '../../api/login'
const app = getApp()
Page({
@ -289,6 +294,9 @@ Page({
this.setData({ loadShow: false });
},
onLogout(){
loginOut({}).then(res => {
removeToken();
});
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
@ -311,7 +319,6 @@ Page({
value3:app.globalData.value3
})
// let _dataList = app.globalData.projectInfoList;
// debugger
// if(app.globalData.type == "1"){
// that.setData({
// "type":'1',
@ -466,6 +473,11 @@ Page({
projectData:res.data,
projectInfoList:res.data
})
//存入文件中
wx.setStorage({
key: 'projectInfoList',
data: res.data
});
app.globalData.projectInfoList = res.data;
//if(that.data.type == 1){
// that.setData({

View File

@ -92,9 +92,6 @@
<view class="font_color {{ index == nav3 ? 'active3' :' ' }}" wx:for = "{{ziGs}}" wx:key="ziGs" data-index="{{index}}" bindtap="onclassC" data-name="{{item.text}}" data-id="{{item.id}}"> {{item.text}}</view>
</view>
</van-popup>
</van-row>
</view>
@ -102,7 +99,6 @@
{{value1}}/{{value2}}/{{value3}}
</view>
<view class="list_title">
总工程数<text>{{proCount}}</text>
</view>

View File

@ -133,6 +133,11 @@ Page({
app.globalData.value1 = rd.projectInfo.shengName;
app.globalData.value2 = rd.projectInfo.shiName + '/' + rd.projectInfo.quName;
app.globalData.value3 = rd.projectInfo.logCompanyName;
//存入文件中
wx.setStorage({
key: 'projectInfoList',
data: app.globalData.projectInfoList
});
wx.redirectTo({
url: '../xiangmugaikuang/index',
})
@ -225,6 +230,11 @@ Page({
app.globalData.value1 = rd.projectInfo.shengName;
app.globalData.value2 = rd.projectInfo.shiName + '/' + rd.projectInfo.quName;
app.globalData.value3 = rd.projectInfo.logCompanyName;
//存入文件中
wx.setStorage({
key: 'projectInfoList',
data: app.globalData.projectInfoList
});
wx.redirectTo({
url: '../xiangmugaikuang/index',
})

View File

@ -73,16 +73,31 @@ Page({
},
onclassA(event) {
this.setData({nav1: event.target.dataset.index});
this.setData({dataclass1: 1});
this.setData({
nav1: event.target.dataset.index
});
this.setData({
dataclass1: 1
});
if (this.data.dataclass1 == 1) {
this.setData({title2: true});
this.setData({
title2: true
});
}
this.setData({classA: event.target.dataset.name});
this.setData({overall1: event.target.dataset.name,newCompanyId:event.target.dataset.id});
this.setData({value3:event.target.dataset.name})
this.setData({
classA: event.target.dataset.name
});
this.setData({
overall1: event.target.dataset.name,
newCompanyId: event.target.dataset.id
});
this.setData({
value3: event.target.dataset.name
})
//获取子公司信息
this.setData({showTest:false})
this.setData({
showTest: false
})
wx.setStorageSync('select_dept_id', event.target.dataset.id)
wx.setStorageSync('select_dept_name', event.target.dataset.name)
wx.setStorageSync('select_dept_index', event.target.dataset.index)
@ -90,38 +105,74 @@ Page({
//this.selectCompanyJG(event.target.dataset.id,'SGS');
},
onclassB(event) {
this.setData({nav2: event.target.dataset.index});
this.setData({dataclass2: 1});
this.setData({
nav2: event.target.dataset.index
});
this.setData({
dataclass2: 1
});
if (this.data.dataclass2 == 1) {
this.setData({title3: true});
this.setData({
title3: true
});
}
this.setData({classB: " / " + event.target.dataset.name });
this.setData({overall2: event.target.dataset.name ,newCompanyId:event.target.dataset.id});
this.setData({value3:this.data.overall1 + " / "+ event.target.dataset.name})
this.setData({
classB: " / " + event.target.dataset.name
});
this.setData({
overall2: event.target.dataset.name,
newCompanyId: event.target.dataset.id
});
this.setData({
value3: this.data.overall1 + " / " + event.target.dataset.name
})
//获取子公司信息
this.selectCompanyJG(event.target.dataset.id, 'GS');
},
onclassC(event) {
this.setData({nav3: event.target.dataset.index});
this.setData({dataclass3: 1});
this.setData({classC: " / " + event.target.dataset.name });
this.setData({overall3: event.target.dataset.name ,newCompanyId:event.target.dataset.id});
this.setData({value3: this.data.overall1 + " / " + this.data.overall2 + " / " + event.target.dataset.name});
this.setData({
nav3: event.target.dataset.index
});
this.setData({
dataclass3: 1
});
this.setData({
classC: " / " + event.target.dataset.name
});
this.setData({
overall3: event.target.dataset.name,
newCompanyId: event.target.dataset.id
});
this.setData({
value3: this.data.overall1 + " / " + this.data.overall2 + " / " + event.target.dataset.name
});
},
queren(event) {
//加载蒙版
this.onClickShow();
this.setData({ showTest: false});
this.setData({ show3: false });
//this.onClickShow();
this.setData({
showTest: false
});
this.setData({
show3: false
});
if (this.data.overall1 == "") {
this.setData({value3:""});
this.setData({
value3: ""
});
} else if (this.data.overall2 == "") {
this.setData({value3: this.data.overall1 + " / "});
this.setData({
value3: this.data.overall1 + " / "
});
} else if (this.data.overall3 == "") {
this.setData({value3: this.data.overall1 + " / " + this.data.overall2 + " / " });
this.setData({
value3: this.data.overall1 + " / " + this.data.overall2 + " / "
});
} else {
this.setData({value3: this.data.overall1 + " / " + this.data.overall2 + " / " + this.data.overall3});
this.setData({
value3: this.data.overall1 + " / " + this.data.overall2 + " / " + this.data.overall3
});
}
let companyId = this.data.newCompanyId;
@ -137,58 +188,131 @@ Page({
tabTltie(event) {
var id = event.currentTarget.id;
if (id == 1) {
this.setData({flag1:true})
this.setData({flag2:false})
this.setData({flag3:false})
this.setData({Highlight1:"active"})
this.setData({Highlight2:""})
this.setData({Highlight3:""})
this.setData({title2:false})
this.setData({title3:false})
this.setData({classA:""})
this.setData({classB:""})
this.setData({classC:""})
this.setData({nav2: "-1"});
this.setData({nav3: "-1"});
this.setData({overall1:"",overall2:"",overall3:""})
this.setData({
flag1: true
})
this.setData({
flag2: false
})
this.setData({
flag3: false
})
this.setData({
Highlight1: "active"
})
this.setData({
Highlight2: ""
})
this.setData({
Highlight3: ""
})
this.setData({
title2: false
})
this.setData({
title3: false
})
this.setData({
classA: ""
})
this.setData({
classB: ""
})
this.setData({
classC: ""
})
this.setData({
nav2: "-1"
});
this.setData({
nav3: "-1"
});
this.setData({
overall1: "",
overall2: "",
overall3: ""
})
} else if (id == 2) {
this.setData({flag1:false})
this.setData({flag2:true})
this.setData({flag3:false})
this.setData({Highlight1:""})
this.setData({Highlight2:"active"})
this.setData({Highlight3:""})
this.setData({title3:false})
this.setData({classB:""})
this.setData({classC:""})
this.setData({nav3: "-1"});
this.setData({overall2:"",overall3:""})
this.setData({
flag1: false
})
this.setData({
flag2: true
})
this.setData({
flag3: false
})
this.setData({
Highlight1: ""
})
this.setData({
Highlight2: "active"
})
this.setData({
Highlight3: ""
})
this.setData({
title3: false
})
this.setData({
classB: ""
})
this.setData({
classC: ""
})
this.setData({
nav3: "-1"
});
this.setData({
overall2: "",
overall3: ""
})
} else {
this.setData({flag1:false})
this.setData({flag2:false})
this.setData({flag3:true})
this.setData({Highlight1:""})
this.setData({Highlight2:""})
this.setData({Highlight3:"active"})
this.setData({overall3:""})
this.setData({classC:""})
this.setData({
flag1: false
})
this.setData({
flag2: false
})
this.setData({
flag3: true
})
this.setData({
Highlight1: ""
})
this.setData({
Highlight2: ""
})
this.setData({
Highlight3: "active"
})
this.setData({
overall3: ""
})
this.setData({
classC: ""
})
}
},
showTest() {
if (this.data.popUp3 == false) {
this.setData({ showTest: true });
this.setData({
showTest: true
});
}
},
onCloseTest() {
this.setData({ showTest: false });
this.setData({
showTest: false
});
},
onChangeSheng(event) {
//加载蒙版
this.onClickShow();
//this.onClickShow();
var province = event.detail.value;
this.setData({
value1: province.text,
@ -198,21 +322,49 @@ Page({
ifDeptId: true,
provinceId: province.id,
});
this.setData({flag1:true})
this.setData({flag2:false})
this.setData({flag3:false})
this.setData({Highlight1:"active"})
this.setData({Highlight2:""})
this.setData({Highlight3:""})
this.setData({title2:false})
this.setData({title3:false})
this.setData({classA:""})
this.setData({classB:""})
this.setData({classC:""})
this.setData({nav2: "-1"});
this.setData({nav3: "-1"});
this.setData({
flag1: true
})
this.setData({
flag2: false
})
this.setData({
flag3: false
})
this.setData({
Highlight1: "active"
})
this.setData({
Highlight2: ""
})
this.setData({
Highlight3: ""
})
this.setData({
title2: false
})
this.setData({
title3: false
})
this.setData({
classA: ""
})
this.setData({
classB: ""
})
this.setData({
classC: ""
})
this.setData({
nav2: "-1"
});
this.setData({
nav3: "-1"
});
app.globalData.paramDeptId = province.id,
this.setData({ show1: false });
this.setData({
show1: false
});
this.getDeptSubordinate(province.id);
this.selectProjectByCompanyId(this.data.userInfo.deptId, province.id, '', '');
this.selectEarly(this.data.userInfo.deptId, '', province.id, '', '');
@ -220,7 +372,7 @@ Page({
},
onChangeShiQu(event) {
//加载蒙版
this.onClickShow();
//this.onClickShow();
var city = event.detail.value[0];
var area = event.detail.value[1].text;
var sq = city + "/" + area
@ -232,20 +384,48 @@ Page({
cityId: area == '全部' ? event.detail.value[1].id : '',
areaId: area == '全部' ? '' : event.detail.value[1].id
});
this.setData({flag1:true})
this.setData({flag2:false})
this.setData({flag3:false})
this.setData({Highlight1:"active"})
this.setData({Highlight2:""})
this.setData({Highlight3:""})
this.setData({title2:false})
this.setData({title3:false})
this.setData({classA:""})
this.setData({classB:""})
this.setData({classC:""})
this.setData({nav2: "-1"});
this.setData({nav3: "-1"});
this.setData({ show2: false });
this.setData({
flag1: true
})
this.setData({
flag2: false
})
this.setData({
flag3: false
})
this.setData({
Highlight1: "active"
})
this.setData({
Highlight2: ""
})
this.setData({
Highlight3: ""
})
this.setData({
title2: false
})
this.setData({
title3: false
})
this.setData({
classA: ""
})
this.setData({
classB: ""
})
this.setData({
classC: ""
})
this.setData({
nav2: "-1"
});
this.setData({
nav3: "-1"
});
this.setData({
show2: false
});
let deptId = this.data.userInfo.deptId;
this.selectProjectByCompanyId(deptId, '', '', event.detail.value[1].id);
@ -255,7 +435,11 @@ Page({
onChange1(event) {
const { picker, value, index } = event.detail;
const {
picker,
value,
index
} = event.detail;
picker.setColumnValues(1, this.data.citys[value[0]]);
},
onChange2(event) {
@ -265,40 +449,60 @@ Page({
showPopup1() {
if (this.data.popUp1 == false) {
this.setData({ show1: true });
this.setData({
show1: true
});
}
},
showPopup2() {
if (this.data.popUp2 == false) {
this.setData({ show2: true });
this.setData({
show2: true
});
}
},
onCancel() {
this.setData({ show1: false });
this.setData({ show2: false });
this.setData({ show3: false });
this.setData({
show1: false
});
this.setData({
show2: false
});
this.setData({
show3: false
});
},
onClose() {
this.setData({ show1: false });
this.setData({ show2: false });
this.setData({ show3: false });
this.setData({
show1: false
});
this.setData({
show2: false
});
this.setData({
show3: false
});
},
onClickShow() {
this.setData({ loadShow: true });
this.setData({
loadShow: true
});
},
onClickHide() {
this.setData({ loadShow: false });
this.setData({
loadShow: false
});
},
//页面初始化
onLoad: function (option) {
var that = this
//加载蒙版
that.onClickShow();
//that.onClickShow();
//调用wx.getSystemInfo接口然后动态绑定组件高度
wx.getSystemInfo({
success: function (res) {
@ -342,8 +546,24 @@ Page({
res = res.data;
//判断登录是否项目人员
if (res.data.projectId != undefined) {
var markers = [{id:0,projectId:res.data.projectId,longitude:res.data.longitude,latitude:res.data.latitude,projectName:res.data.projectName}];
var projectData = [{projectId:res.data.projectId,projectName:res.data.projectName,projectAddress:res.data.projectAddress,companyName:res.data.companyName,streamNumber:res.data.streamNumber,projectCount:res.data.projectCount,videoNum:res.data.videoNum,towerCount:res.data.towerCount,monitoringCount:res.data.monitoringCount}]
var markers = [{
id: 0,
projectId: res.data.projectId,
longitude: res.data.longitude,
latitude: res.data.latitude,
projectName: res.data.projectName
}];
var projectData = [{
projectId: res.data.projectId,
projectName: res.data.projectName,
projectAddress: res.data.projectAddress,
companyName: res.data.companyName,
streamNumber: res.data.streamNumber,
projectCount: res.data.projectCount,
videoNum: res.data.videoNum,
towerCount: res.data.towerCount,
monitoringCount: res.data.monitoringCount
}]
that.setData({
value1: res.data.shengName,
value2: res.data.shiName + '/' + res.data.quName,
@ -361,7 +581,7 @@ Page({
})
//that.selectEarly(res.data.deptId,res.data.projectId,'','','');
//that.getEnvironCount(res.data.deptId,res.data.projectId,'','','');
that.onClickHide();
//that.onClickHide();
} else {
var columns = [];
columns.push(res.data.province_list);
@ -401,7 +621,7 @@ Page({
} else {
that.selectProjectByCompanyId(wx.getStorageSync('select_dept_id'), '', '', '');
}
that.onClickHide();
//that.onClickHide();
}
}
})
@ -422,10 +642,9 @@ Page({
},
method: "GET",
success: function (res) {
that.onClickHide();
//that.onClickHide();
let citys = res.data;
let cityArea = [
{
let cityArea = [{
values: Object.keys(citys),
className: 'column1',
},
@ -465,7 +684,7 @@ Page({
method: "GET",
success: function (res) {
//关闭蒙版
that.onClickHide();
//that.onClickHide();
if (res.data.length > 0) {
that.setData({
markers: res.data,
@ -475,6 +694,11 @@ Page({
initialLon: res.data[0].longitude,
initialLat: res.data[0].latitude,
})
//存入文件中
wx.setStorage({
key: 'projectInfoList',
data: res.data
});
app.globalData.projectInfoList = res.data;
} else {
that.setData({
@ -502,7 +726,7 @@ Page({
},
method: "GET",
success: function (res) {
that.onClickHide();
//that.onClickHide();
if (state == "SGS") {
that.setData({
shengGs: res.data
@ -537,7 +761,7 @@ Page({
"areaId": areaId,
},
success: function (res) {
that.onClickHide();
//that.onClickHide();
that.setData({
monitoringCount: res.data.monitoringCount,
videoNum: res.data.videoNum,
@ -568,7 +792,7 @@ Page({
"areaId": areaId,
},
success: function (res) {
that.onClickHide();
//that.onClickHide();
that.setData({
environProjectData: res.data,
environCount: res.data.length

View File

@ -200,11 +200,11 @@ Page({
},
//展示图片
showImg:function(e){
showDetectionFileImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
urls: that.data.detectionImageList,
current: that.data.detectionImageList[e.currentTarget.dataset.index]
})
},

View File

@ -275,8 +275,8 @@ Page({
showSignFileImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.sifnFileImages,
current: that.data.sifnFileImages[e.currentTarget.dataset.index]
urls: that.data.signFileImages,
current: that.data.signFileImages[e.currentTarget.dataset.index]
})
},

View File

@ -56,6 +56,11 @@ Page({
name: '特殊事项确认',
icon: config.baseUrl + '/staticFiles/img/tssxqrl.png',
todoDB:0,
}, {
id: 8,
name: '专项验收审批',
icon: config.baseUrl + '/staticFiles/img/zxyssp.png',
todoDB:0,
}
],
},

View File

@ -29,7 +29,6 @@ Page({
taskName:"",
passState:true,
backName:"",
filesData:[],
ret:"",
remark:"",
filesData:[],

View File

@ -0,0 +1,68 @@
import config from '../../config'
Page({
/**
* 页面的初始数据
*/
data: {
url:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
url:config.manageUrl+"/#/wxAuth?userOpenId=1111111111111111"
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,2 @@
<!--pages/wx-auth/index.wxml-->
<web-view src="{{url}}"></web-view>

View File

@ -0,0 +1 @@
/* pages/wx-auth/index.wxss */

View File

@ -21,9 +21,6 @@
<!-- 中间内容 -->
<view class="max_content" >
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="official">
<official-account></official-account>
</view>
<!-- <view class="video_add">
<view class="video_address">
<view class="video_address_min" bindtap="GOMAP">

View File

@ -35,7 +35,7 @@ function doRequest(url, method = 'GET', data, header = {}) {
if (code === 401) {
removeToken();
wx.redirectTo({
url: '../login/index',
url: '../pages/login/index',
});
} else if (code === 500 || code === 403) {
app.toast(res.data.msg);

View File

@ -4,5 +4,233 @@
"setting": {
"compileHotReLoad": true,
"urlCheck": false
},
"condition": {
"miniprogram": {
"list": [
{
"name": "db guide",
"pathName": "pages/databaseGuide/databaseGuide",
"query": ""
},
{
"name": "pages/gongchengliebiao/index",
"pathName": "pages/gongchengliebiao/index",
"query": "",
"scene": null
},
{
"name": "pages/gengduogongneng/index",
"pathName": "pages/gengduogongneng/index",
"query": "",
"scene": null
},
{
"name": "pages/login/index",
"pathName": "pages/login/index",
"query": "",
"scene": null
},
{
"name": "pages/xiangmushipin/xiangmushipin",
"pathName": "pages/xiangmushipin/xiangmushipin",
"query": "",
"scene": null
},
{
"name": "pageage/project_checking/list/index",
"pathName": "pageage/project_checking/list/index",
"query": "barProId=645",
"launchMode": "default",
"scene": null
},
{
"name": "pages/gengduogongneng/index",
"pathName": "pages/gengduogongneng/index",
"query": "",
"scene": null
},
{
"name": "pages/xiangmugaikuang/index",
"pathName": "pages/xiangmugaikuang/index",
"query": "",
"scene": null
},
{
"name": "pages/xiangmuhuanjing/xiangmuhuanjing",
"pathName": "pages/xiangmuhuanjing/xiangmuhuanjing",
"query": "",
"scene": null
},
{
"name": "pages/xiangmuyujing/xiangmuyujing",
"pathName": "pages/xiangmuyujing/xiangmuyujing",
"query": "",
"scene": null
},
{
"name": "pages/gengduogongneng/index",
"pathName": "pages/gengduogongneng/index",
"query": "",
"scene": null
},
{
"name": "pages/xiangmugaikuang/index",
"pathName": "pages/xiangmugaikuang/index",
"query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
"scene": null
},
{
"name": "pages/shebieguanli-taji/taji",
"pathName": "pages/shebieguanli-taji/taji",
"query": "",
"scene": null
},
{
"name": "pages/shebieguanli-shajiangguan/shajiangguan",
"pathName": "pages/shebieguanli-shajiangguan/shajiangguan",
"query": "",
"scene": null
},
{
"name": "pages/xiangmugaikuang/index",
"pathName": "pages/xiangmugaikuang/index",
"query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
"scene": null
},
{
"name": "pages/xiangmuyujing/xiangmuyujing",
"pathName": "pages/xiangmuyujing/xiangmuyujing",
"query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
"scene": null
},
{
"name": "pages/map/map",
"pathName": "pages/map/map",
"query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
"scene": null
},
{
"name": "pages/map/map",
"pathName": "pages/map/map",
"query": "projectId=2&projectName=山西四建月亮湾Ⅱ湾住宅小区建设项目",
"scene": null
},
{
"name": "pages/yujingxinxi/yujingxinxi",
"pathName": "pages/yujingxinxi/yujingxinxi",
"query": "",
"scene": null
},
{
"name": "pages/yujingxinxi/yujingxinxi",
"pathName": "pages/yujingxinxi/yujingxinxi",
"query": "",
"scene": null
},
{
"name": "pages/xiangmushipin/xiangmushipin",
"pathName": "pages/xiangmushipin/xiangmushipin",
"query": "",
"scene": null
},
{
"name": "pages/xiangmushipin/xiangmushipin",
"pathName": "pages/xiangmushipin/xiangmushipin",
"query": "projectId=9&projectName=路桥龙锦花园东区",
"scene": null
},
{
"name": "pages/renyuanguanli/renyuanguanli",
"pathName": "pages/renyuanguanli/renyuanguanli",
"query": "projectId=9&projectName=路桥龙锦花园东区",
"scene": null
},
{
"name": "pages/renyuanguanli/renyuanguanli",
"pathName": "pages/renyuanguanli/renyuanguanli",
"query": "",
"scene": null
},
{
"name": "pages/ranyuanguanli-map/map",
"pathName": "pages/ranyuanguanli-map/map",
"query": "",
"scene": null
},
{
"name": "pages/renyuanguanli/renyuanguanli",
"pathName": "pages/renyuanguanli/renyuanguanli",
"query": "projectId=616",
"scene": null
},
{
"name": "pages/shebieguanli-shajiangguan/shajiangguan",
"pathName": "pages/shebieguanli-jxsb/shajiangguan",
"query": "",
"scene": null
},
{
"name": "pages/shebeiguanli-map/jixiedingwei",
"pathName": "pages/shebeiguanli-map/jixiedingwei",
"query": "",
"scene": null
},
{
"name": "pages/shebieguanli-tzsb/taji",
"pathName": "pages/shebieguanli-tzsb/taji",
"query": "",
"scene": null
},
{
"name": "pages/jinduguanli/jinduguanli",
"pathName": "pages/jinduguanli/jinduguanli",
"query": "",
"scene": null
},
{
"name": "pages/xiangmuyujing/xiangmuyujing",
"pathName": "pages/xiangmuyujing/xiangmuyujing",
"query": "projectId=616",
"scene": null
},
{
"name": "pages/anquanguankong/anquanguankong",
"pathName": "pages/anquanguankong/anquanguankong",
"query": "",
"scene": null
},
{
"name": "pages/nenghaoguanli/nenghaoguanli",
"pathName": "pages/nenghaoguanli/nenghaoguanli",
"query": "",
"scene": null
},
{
"name": "pages/wuliaoguanli/wuliaoguanli",
"pathName": "pages/wuliaoguanli/wuliaoguanli",
"query": "",
"scene": null
},
{
"name": "pages/jinduguanli/jinduguanli",
"pathName": "pages/jinduguanli/jinduguanli",
"query": "projectId=621",
"scene": null
},
{
"name": "pages/lw-jibenxinxi/lw-jibenxinxi",
"pathName": "pages/lw-jibenxinxi/lw-jibenxinxi",
"query": "",
"scene": null
},
{
"name": "pages/lw-gerenxinxi/lw-gerenxinxi",
"pathName": "pages/lw-gerenxinxi/lw-gerenxinxi",
"query": "register=1",
"scene": null
}
]
}
}
}