9.22问题修复

dev_xd
lj7788@126.com 2025-09-22 15:17:59 +08:00
parent 78e6b33e6b
commit 2f8097e3ce
27 changed files with 1623 additions and 1582 deletions

View File

@ -140,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join wx_menu_config_role smcr on smcr.smcid = smc.id left join wx_menu_config_role smcr on smcr.smcid = smc.id
left join sys_user_role ur on ur.role_id = smcr.role_id left join sys_user_role ur on ur.role_id = smcr.role_id
where smc.del_flag = 0 where smc.del_flag = 0
and ur.user_id = #{currentUserId} and (ur.user_id = #{currentUserId} or smc.menu_identi='GRQMPZ')
<if test="activeProjectId != null"> and smc.project_id = #{activeProjectId}</if> <if test="activeProjectId != null"> and smc.project_id = #{activeProjectId}</if>
<if test="menuType != null and menuType != ''"> and smc.menu_type = #{menuType}</if> <if test="menuType != null and menuType != ''"> and smc.menu_type = #{menuType}</if>
order by smc.menu_sort asc order by smc.menu_sort asc

View File

@ -1,7 +1,7 @@
import { getToken, getUserInfo } from "../../../../utils/auth.js"; import { getToken, getUserInfo } from "../../../../utils/auth.js";
import { getMobileAttendanceConfig } from "../../../../api/project.js"; import { getMobileAttendanceConfig } from "../../../../api/project.js";
import { calculateDistance } from "../../../../utils/location.js"; import { calculateDistance } from "../../../../utils/location.js";
import cfg from "../../../../config.js";
const app = getApp(); const app = getApp();
Page({ Page({
@ -20,6 +20,7 @@ Page({
currentAddress: "", // 当前位置地址 currentAddress: "", // 当前位置地址
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
baseImgUrl: cfg.baseImgUrl,
}, },
/** /**
@ -168,7 +169,11 @@ Page({
}, },
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/ /*关闭当前页面,跳转到其它页面。*/
if (wx.getStorageSync("nav-menu") == "xmgl") { if (wx.getStorageSync("nav-menu") == "prjInfo") {
wx.redirectTo({
url: "../../../project_info/index",
});
} else if (wx.getStorageSync("nav-menu") == "xmgl") {
wx.redirectTo({ wx.redirectTo({
url: "../../../project_more/index", url: "../../../project_more/index",
}); });

View File

@ -28,7 +28,7 @@
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{baseImgUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -27,6 +27,7 @@ Page({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
baseImgUrl: config.baseImgUrl, // 添加 baseImgUrl 到页面数据中
}, },
/** /**

View File

@ -5,7 +5,7 @@
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="../../../../images/left.png"></image>
</view> </view>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">
@ -31,7 +31,7 @@
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{baseImgUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
@ -75,7 +75,7 @@
<view class="inspect_add_to" bindtap="doAddCfg"> <view class="inspect_add_to" bindtap="doAddCfg">
<view style="padding-top: 22rpx"> <view style="padding-top: 22rpx">
<image src="/images/new_add.png"></image> <image src="../../../../images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -73,13 +73,13 @@
</view> </view>
<view wx:if="{{ listData.length == 0 }}"> <view wx:if="{{ listData.length == 0 }}">
<view style="padding-top: 70px; text-align: -webkit-center"> <view style="padding-top: 70px; text-align: -webkit-center">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px; height: 105px"></image> <image src="{{ imgBaseUrl }}/cdn/appimgs/nodata.png" style="width: 130px; height: 105px"></image>
<view style="color: #a5abbb">暂无数据</view> <view style="color: #a5abbb">暂无数据</view>
</view> </view>
</view> </view>
<view wx:if="{{ isGroup }}" class="inspect_add_to" bindtap="skipAdd"> <view wx:if="{{ isGroup }}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx"> <view style="padding-top: 22rpx">
<image src="/images/new_add.png"></image> <image src="../../../images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -49,7 +49,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -31,7 +31,7 @@
<text wx:if="{{item.endTime}}" class="color_purple">办结时间 {{item.endTime}}</text> <text wx:if="{{item.endTime}}" class="color_purple">办结时间 {{item.endTime}}</text>
</view> </view>
<view wx:if="{{showChecked && activeState=='dsh'}}" class="myIcon" data-set="{{item.procInsId}}" catchtap="selectItem"> <view wx:if="{{showChecked && activeState=='dsh'}}" class="myIcon" data-set="{{item.procInsId}}" catchtap="selectItem">
<image src="{{item.selected ? 'https://xiangguan.sxyanzhu.com/profile/static/images/choice.png' : '/images/unchoice.png'}}" /> <image src="{{item.selected ? imgBaseUrl + '/profile/static/images/choice.png' : '/images/unchoice.png'}}" />
</view> </view>
</view> </view>
</view> </view>
@ -56,7 +56,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -1,21 +1,14 @@
import config from '../../config' import config from "../../config";
import { import { getToken, getUserInfo } from "../../utils/auth";
getToken, import { findUserMenuList } from "../../api/publics";
getUserInfo import { findProjectInfo, findProjectDepts } from "../../api/project";
} from '../../utils/auth'
import {
findProjectInfo,
findProjectDepts
} from '../../api/project'
import { import {
findSubDeptsUsers, findSubDeptsUsers,
findDaysAttendanceView, findDaysAttendanceView,
findUsersAttendanceView, findUsersAttendanceView,
findSubDeptsAttendanceView findSubDeptsAttendanceView,
} from '../api/attendance' } from "../api/attendance";
import { import { findMyTask } from "../api/flowable";
findMyTask
} from '../api/flowable'
const app = getApp(); const app = getApp();
Page({ Page({
/** /**
@ -27,101 +20,115 @@ Page({
//项目信息 //项目信息
projectInfo: {}, projectInfo: {},
projectDeptsList: [], projectDeptsList: [],
deptTypes: [{ deptTypes: [
"name": "建设单位", {
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/WEB_jsdw.png" name: "建设单位",
}, { iconSrc: config.baseImgUrl + "/profile/static/icon/WEB_jsdw.png",
"name": "监理单位", },
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/WEB_jldw.png" {
}, { name: "监理单位",
"name": "设计单位", iconSrc: config.baseImgUrl + "/profile/static/icon/WEB_jldw.png",
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/WEB_sjdw.png" },
}, { {
"name": "检测单位", name: "设计单位",
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/WEB_jcjg.png" iconSrc: config.baseImgUrl + "/profile/static/icon/WEB_sjdw.png",
}, { },
"name": "勘察单位", {
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/web_ktdw.png" name: "检测单位",
}, { iconSrc: config.baseImgUrl + "/profile/static/icon/WEB_jcjg.png",
"name": "总包单位", },
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/web_zbdw.png" {
}], name: "勘察单位",
iconSrc: config.baseImgUrl + "/profile/static/icon/web_ktdw.png",
},
{
name: "总包单位",
iconSrc: config.baseImgUrl + "/profile/static/icon/web_zbdw.png",
},
],
active: 0, active: 0,
projectId: '', projectId: "",
projectName: '', projectName: "",
initData: {}, initData: {},
aqglDb: 0, aqglDb: 0,
zlglDb: 0, zlglDb: 0,
todoDb: 0, todoDb: 0,
nactive: 0, nactive: 0,
labourData: [{ labourData: [
{
name: "管理人员", name: "管理人员",
total: 0, total: 0,
unit: "人", unit: "人",
yesMonitor: 180 yesMonitor: 180,
}, },
{ {
name: "劳务人员", name: "劳务人员",
yesMonitor: 0, yesMonitor: 0,
total: 0, total: 0,
unit: "人" unit: "人",
}, },
{ {
name: "特殊工种", name: "特殊工种",
yesMonitor: 0, yesMonitor: 0,
total: 0, total: 0,
unit: "人" unit: "人",
}, },
], ],
labourDataList: [], labourDataList: [],
labourDays: [{ labourDays: [
{
name: "管理人员", name: "管理人员",
total: 0, total: 0,
unit: "人", unit: "人",
yesMonitor: 180 yesMonitor: 180,
}, },
{ {
name: "劳务人员", name: "劳务人员",
yesMonitor: 0, yesMonitor: 0,
total: 0, total: 0,
unit: "人" unit: "人",
}, },
{ {
name: "特殊工种", name: "特殊工种",
yesMonitor: 0, yesMonitor: 0,
total: 0, total: 0,
unit: "人" unit: "人",
}, },
], ],
labourDaysTotal: 0, labourDaysTotal: 0,
labourImg: "https://szgcwx.jhncidg.com/staticFiles/icon/zgry.png", labourImg: config.baseImgUrl + "/cdn/appimgs/zgry.png",
labourName: "在岗人员", labourName: "在岗人员",
labourTotal: 0, labourTotal: 0,
labourTypeList: [{ labourTypeList: [
{
name: "在岗人员", name: "在岗人员",
total: 0, total: 0,
img: "https://szgcwx.jhncidg.com/staticFiles/icon/zgry.png" img: config.baseImgUrl + "/cdn/appimgs/zgry.png",
}, { },
{
name: "离岗人员", name: "离岗人员",
total: 0, total: 0,
img: "https://szgcwx.jhncidg.com/staticFiles/icon/rylg.png" img: config.baseImgUrl + "/cdn/appimgs/rylg.png",
}], },
],
animation: true, animation: true,
animationData: {}, animationData: {},
labourDatas: { labourDatas: {
unit: '人', unit: "人",
legend: ['出勤人数', '当前在岗'], legend: ["出勤人数", "当前在岗"],
color: ['#2e6ed0', '#fb9300'], color: ["#2e6ed0", "#fb9300"],
Xdata: ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'], Xdata: ["01-01", "01-02", "01-03", "01-04", "01-05", "01-06", "01-07"],
Ydata: [ Ydata: [
[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0, 0],
] ],
}, },
switchChart: false, switchChart: false,
attendanceListData: [], attendanceListData: [],
subDeptUserInfo: {}, subDeptUserInfo: {},
imgBaseUrl: config.baseImgUrl imgBaseUrl: config.baseImgUrl,
menuList: [],
baseImgUrl: config.baseImgUrl,
}, },
/** /**
@ -130,10 +137,10 @@ Page({
onLoad: function (options) { onLoad: function (options) {
if (!getToken()) { if (!getToken()) {
wx.redirectTo({ wx.redirectTo({
url: '../../pages/login/login', url: "../../pages/login/login",
}) });
} }
wx.setStorageSync('nav-menu', "xmgk"); wx.setStorageSync("nav-menu", "xmgk");
const proUserInfo = getUserInfo(); const proUserInfo = getUserInfo();
app.globalData.subDeptUserData = proUserInfo.projectUserInfo; app.globalData.subDeptUserData = proUserInfo.projectUserInfo;
this.initAnimationData(); this.initAnimationData();
@ -145,7 +152,7 @@ Page({
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
text: app.globalData.useProjectName, text: app.globalData.useProjectName,
}, },
subDeptUserInfo: proUserInfo.projectUserInfo subDeptUserInfo: proUserInfo.projectUserInfo,
}); });
//项目基本信息 //项目基本信息
this.getProjectInfo(app.globalData.useProjectId); this.getProjectInfo(app.globalData.useProjectId);
@ -153,19 +160,50 @@ Page({
this.getProUserDatas(); this.getProUserDatas();
//项目建设单位 //项目建设单位
this.getProjectDepts(app.globalData.useProjectId); this.getProjectDepts(app.globalData.useProjectId);
this.getMenu();
},
getMenu() {
let subDeptUserInfo = this.data.subDeptUserInfo;
if (
(subDeptUserInfo.subDeptType == "4" ||
subDeptUserInfo.subDeptType == "5") &&
(subDeptUserInfo.userPost == "4" || subDeptUserInfo.userPost == "5")
) {
let proId = app.globalData.useProjectId;
findUserMenuList(proId, "gdgn").then((res) => {
if (res.code == 200) {
let menus = (res.data || []).filter(
(it) => it.menuIdenti != "YDKQGL"
);
this.setData({
menuList: menus,
});
}
});
}
},
goMenu: function (event) {
let _url = event.currentTarget.dataset.url;
if (!_url) {
app.toast("正在建设中...");
return false;
}
wx.setStorageSync("nav-menu", "prjInfo");
wx.redirectTo({
url: _url,
});
}, },
/** /**
* 统计劳务人员信息 * 统计劳务人员信息
* @param {*} proId * @param {*} proId
*/ */
getSubDeptsUsers(proId) { getSubDeptsUsers(proId) {
findSubDeptsUsers(proId).then(res => { findSubDeptsUsers(proId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let zg = 0; let zg = 0;
let lg = 0; let lg = 0;
res.data.forEach(item => { res.data.forEach((item) => {
if (item.useStatus == '0') { if (item.useStatus == "0") {
zg += item.total; zg += item.total;
} else { } else {
lg += item.total; lg += item.total;
@ -175,8 +213,8 @@ Page({
"labourTypeList[0].total": zg, "labourTypeList[0].total": zg,
"labourTypeList[1].total": lg, "labourTypeList[1].total": lg,
labourTotal: zg, labourTotal: zg,
labourDataList: res.data || [] labourDataList: res.data || [],
}) });
this.initSubDeptUsersCharts(); this.initSubDeptUsersCharts();
} }
}); });
@ -188,8 +226,8 @@ Page({
initAnimationData() { initAnimationData() {
var animation = wx.createAnimation({ var animation = wx.createAnimation({
duration: 1000, duration: 1000,
timingFunction: 'linear', timingFunction: "linear",
}) });
this.animation = animation; this.animation = animation;
if (this.data.animation) { if (this.data.animation) {
animation.translateY(-8).step(); animation.translateY(-8).step();
@ -198,11 +236,11 @@ Page({
} }
this.setData({ this.setData({
animation: this.data.animation ? false : true, animation: this.data.animation ? false : true,
animationData: animation.export() animationData: animation.export(),
}) });
setTimeout(() => { setTimeout(() => {
this.initAnimationData(); this.initAnimationData();
}, 1200) }, 1200);
}, },
/** /**
@ -214,22 +252,22 @@ Page({
let gl = 0; let gl = 0;
let ts = 0; let ts = 0;
let lw = 0; let lw = 0;
labourDataList.forEach(item => { labourDataList.forEach((item) => {
if (this.data.nactive == 0) { if (this.data.nactive == 0) {
if (item.useStatus == '0') { if (item.useStatus == "0") {
if (item.craftType == '2') { if (item.craftType == "2") {
ts += item.total; ts += item.total;
} else if (item.craftType == '3') { } else if (item.craftType == "3") {
gl += item.total; gl += item.total;
} else { } else {
lw += item.total; lw += item.total;
} }
} }
} else { } else {
if (item.useStatus != '0') { if (item.useStatus != "0") {
if (item.craftType == '2') { if (item.craftType == "2") {
ts += item.total; ts += item.total;
} else if (item.craftType == '3') { } else if (item.craftType == "3") {
gl += item.total; gl += item.total;
} else { } else {
lw += item.total; lw += item.total;
@ -244,8 +282,8 @@ Page({
"labourData[1].yesMonitor": ts, "labourData[1].yesMonitor": ts,
"labourData[2].total": lw, "labourData[2].total": lw,
"labourData[2].yesMonitor": lw, "labourData[2].yesMonitor": lw,
labourTotal: this.data.labourTypeList[this.data.nactive].total labourTotal: this.data.labourTypeList[this.data.nactive].total,
}) });
if (this.data.switchChart) { if (this.data.switchChart) {
let chats = this.selectComponent("#userChart"); let chats = this.selectComponent("#userChart");
chats.initChart(); chats.initChart();
@ -259,15 +297,15 @@ Page({
* @param {*} proId * @param {*} proId
*/ */
initSubDeptDaysCharts(proId) { initSubDeptDaysCharts(proId) {
findDaysAttendanceView(proId).then(res => { findDaysAttendanceView(proId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let gl = 0; let gl = 0;
let ts = 0; let ts = 0;
let lw = 0; let lw = 0;
res.data.forEach(item => { res.data.forEach((item) => {
if (item.craftType == '2') { if (item.craftType == "2") {
ts += item.total; ts += item.total;
} else if (item.craftType == '3') { } else if (item.craftType == "3") {
gl += item.total; gl += item.total;
} else { } else {
lw += item.total; lw += item.total;
@ -280,8 +318,8 @@ Page({
"labourDays[1].yesMonitor": ts, "labourDays[1].yesMonitor": ts,
"labourDays[2].total": lw, "labourDays[2].total": lw,
"labourDays[2].yesMonitor": lw, "labourDays[2].yesMonitor": lw,
labourDaysTotal: gl + ts + lw labourDaysTotal: gl + ts + lw,
}) });
if (this.data.switchChart) { if (this.data.switchChart) {
let chats = this.selectComponent("#attsChart"); let chats = this.selectComponent("#attsChart");
chats.initChart(); chats.initChart();
@ -296,19 +334,19 @@ Page({
* @param {*} proId * @param {*} proId
*/ */
getSubDeptsAttendanceView(proId) { getSubDeptsAttendanceView(proId) {
findSubDeptsAttendanceView(proId).then(res => { findSubDeptsAttendanceView(proId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let xd = []; let xd = [];
let yd1 = []; let yd1 = [];
let yd2 = []; let yd2 = [];
res.data.list.forEach(item => { res.data.list.forEach((item) => {
xd.push(item.attendanceTime); xd.push(item.attendanceTime);
yd1.push(item.total); yd1.push(item.total);
}); });
if (xd.length < 7) { if (xd.length < 7) {
let n = 7 - xd.length; let n = 7 - xd.length;
for (let i = 0; i < n; i++) { for (let i = 0; i < n; i++) {
xd.push('-'); xd.push("-");
yd1.push(0); yd1.push(0);
} }
} }
@ -320,7 +358,7 @@ Page({
yd.push(yd2); yd.push(yd2);
this.setData({ this.setData({
"labourDatas.Xdata": xd, "labourDatas.Xdata": xd,
"labourDatas.Ydata": yd "labourDatas.Ydata": yd,
}); });
if (this.data.switchChart) { if (this.data.switchChart) {
let chats = this.selectComponent("#chartBar"); let chats = this.selectComponent("#chartBar");
@ -335,13 +373,13 @@ Page({
* @param {*} proId * @param {*} proId
*/ */
getUsersAttendanceView(proId) { getUsersAttendanceView(proId) {
findUsersAttendanceView(proId).then(res => { findUsersAttendanceView(proId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
attendanceListData: res.data attendanceListData: res.data,
}); });
} }
}) });
}, },
/** /**
@ -350,18 +388,31 @@ Page({
*/ */
getProUserDatas() { getProUserDatas() {
//劳务人员信息 //劳务人员信息
if ((app.globalData.subDeptUserData.subDeptType == '1' || app.globalData.subDeptUserData.subDeptType == '4' || app.globalData.subDeptUserData.subDeptType == '5') && app.globalData.subDeptUserData.userPost != '4' && app.globalData.subDeptUserData.userPost != '5' && app.globalData.subDeptUserData.userPost != '6' && app.globalData.subDeptUserData.userPost != '8') { if (
(app.globalData.subDeptUserData.subDeptType == "1" ||
app.globalData.subDeptUserData.subDeptType == "4" ||
app.globalData.subDeptUserData.subDeptType == "5") &&
app.globalData.subDeptUserData.userPost != "4" &&
app.globalData.subDeptUserData.userPost != "5" &&
app.globalData.subDeptUserData.userPost != "6" &&
app.globalData.subDeptUserData.userPost != "8"
) {
//统计劳务人员信息 //统计劳务人员信息
this.getSubDeptsUsers(app.globalData.useProjectId); this.getSubDeptsUsers(app.globalData.useProjectId);
this.initSubDeptDaysCharts(app.globalData.useProjectId); this.initSubDeptDaysCharts(app.globalData.useProjectId);
} }
this.awaitTask(); this.awaitTask();
//今日出勤信息 //今日出勤信息
if (app.globalData.subDeptUserData.subDeptType == '1') { if (app.globalData.subDeptUserData.subDeptType == "1") {
this.getSubDeptsAttendanceView(app.globalData.useProjectId); this.getSubDeptsAttendanceView(app.globalData.useProjectId);
} }
//人员出勤信息 //人员出勤信息
if (app.globalData.subDeptUserData.userPost == '4' || app.globalData.subDeptUserData.userPost == '5' || app.globalData.subDeptUserData.userPost == '6' || app.globalData.subDeptUserData.userPost == '8') { if (
app.globalData.subDeptUserData.userPost == "4" ||
app.globalData.subDeptUserData.userPost == "5" ||
app.globalData.subDeptUserData.userPost == "6" ||
app.globalData.subDeptUserData.userPost == "8"
) {
//统计劳务人员信息 //统计劳务人员信息
this.getUsersAttendanceView(app.globalData.useProjectId); this.getUsersAttendanceView(app.globalData.useProjectId);
} }
@ -379,7 +430,7 @@ Page({
onChange(event) { onChange(event) {
// event.detail 的值为当前选中项的索引 // event.detail 的值为当前选中项的索引
this.setData({ this.setData({
active: event.detail active: event.detail,
}); });
}, },
@ -388,20 +439,20 @@ Page({
*/ */
initLabourDatas() { initLabourDatas() {
findGroupAllByDays({ findGroupAllByDays({
projectId: app.globalData.projectId projectId: app.globalData.projectId,
}).then(res => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let xd = []; let xd = [];
let yd1 = []; let yd1 = [];
let yd2 = []; let yd2 = [];
res.data.list.forEach(item => { res.data.list.forEach((item) => {
xd.push(item.attendanceTime); xd.push(item.attendanceTime);
yd1.push(item.total); yd1.push(item.total);
}); });
if (xd.length < 7) { if (xd.length < 7) {
let n = 7 - xd.length; let n = 7 - xd.length;
for (let i = 0; i < n; i++) { for (let i = 0; i < n; i++) {
xd.push(''); xd.push("");
yd1.push(0); yd1.push(0);
} }
} }
@ -413,7 +464,7 @@ Page({
yd.push(yd2); yd.push(yd2);
this.setData({ this.setData({
"labourDatas.Xdata": xd, "labourDatas.Xdata": xd,
"labourDatas.Ydata": yd "labourDatas.Ydata": yd,
}); });
if (this.data.switchChart) { if (this.data.switchChart) {
let chats = this.selectComponent("#chartBar"); let chats = this.selectComponent("#chartBar");
@ -428,19 +479,21 @@ Page({
* @param {*} proId * @param {*} proId
*/ */
getProjectInfo: function (proId) { getProjectInfo: function (proId) {
findProjectInfo(proId).then(res => { findProjectInfo(proId).then((res) => {
if (res.data.scheduledStartTime) { if (res.data.scheduledStartTime) {
res.data.scheduledStartTime = res.data.scheduledStartTime.split("T")[0]; res.data.scheduledStartTime = res.data.scheduledStartTime.split("T")[0];
} else { } else {
res.data.scheduledStartTime = " - "; res.data.scheduledStartTime = " - ";
} }
if (res.data.actualOperatingTime) { if (res.data.actualOperatingTime) {
res.data.actualOperatingTime = res.data.actualOperatingTime.split("T")[0]; res.data.actualOperatingTime =
res.data.actualOperatingTime.split("T")[0];
} else { } else {
res.data.actualOperatingTime = " - "; res.data.actualOperatingTime = " - ";
} }
if (res.data.plannedCompletionTime) { if (res.data.plannedCompletionTime) {
res.data.plannedCompletionTime = res.data.plannedCompletionTime.split("T")[0]; res.data.plannedCompletionTime =
res.data.plannedCompletionTime.split("T")[0];
} else { } else {
res.data.plannedCompletionTime = " - "; res.data.plannedCompletionTime = " - ";
} }
@ -454,8 +507,8 @@ Page({
// }); // });
this.setData({ this.setData({
projectInfo: res.data, projectInfo: res.data,
projectDeptsList: res.data.projectDeptsList projectDeptsList: res.data.projectDeptsList,
}) });
}); });
}, },
@ -465,10 +518,10 @@ Page({
* @param {*} proId * @param {*} proId
*/ */
getProjectDepts: function (proId) { getProjectDepts: function (proId) {
findProjectDepts(proId).then(res => { findProjectDepts(proId).then((res) => {
this.setData({ this.setData({
projectDeptsList: res.data projectDeptsList: res.data,
}) });
}); });
}, },
@ -478,7 +531,7 @@ Page({
this.setData({ this.setData({
nactive: e.target.dataset.set, nactive: e.target.dataset.set,
labourImg: this.data.labourTypeList[e.target.dataset.set].img, labourImg: this.data.labourTypeList[e.target.dataset.set].img,
}) });
this.initSubDeptUsersCharts(); this.initSubDeptUsersCharts();
} }
}, },
@ -490,8 +543,8 @@ Page({
app.globalData.useProjectId = projectId; app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName; app.globalData.useProjectName = projectName;
this.setData({ this.setData({
switchChart: true switchChart: true,
}) });
this.onLoad(); this.onLoad();
}, },
@ -511,24 +564,24 @@ Page({
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: callPhone, phoneNumber: callPhone,
success: function () { success: function () {
console.log("拨打电话成功!") console.log("拨打电话成功!");
}, },
fail: function () { fail: function () {
console.log("拨打电话失败!") console.log("拨打电话失败!");
} },
}) });
}, },
showImg: function (e) { showImg: function (e) {
let paths = e.target.dataset.set; let paths = e.target.dataset.set;
let path = []; let path = [];
paths.split(',').forEach(url => { paths.split(",").forEach((url) => {
path.push(config.baseImgUrl + url); path.push(config.baseImgUrl + url);
}); });
wx.previewImage({ wx.previewImage({
urls: path, urls: path,
current: path[0] current: path[0],
}) });
}, },
/** /**
@ -537,8 +590,8 @@ Page({
goLWGL: function () { goLWGL: function () {
if (this.data.nactive == 2) { if (this.data.nactive == 2) {
wx.redirectTo({ wx.redirectTo({
url: '../../pageage/project_attendance/project_attendanceData/list/index' url: "../../pageage/project_attendance/project_attendanceData/list/index",
}) });
} else { } else {
let type; let type;
if (this.data.nactive == 0) { if (this.data.nactive == 0) {
@ -547,8 +600,10 @@ Page({
type = 2; type = 2;
} }
wx.redirectTo({ wx.redirectTo({
url: '../../pageage/project_attendance/project_attendanceUser/list/index?type=' + type url:
}) "../../pageage/project_attendance/project_attendanceUser/list/index?type=" +
type,
});
} }
}, },
@ -557,47 +612,47 @@ Page({
*/ */
goZJCQ: function () { goZJCQ: function () {
wx.redirectTo({ wx.redirectTo({
url: '../../pageage/project_attendance/project_attendanceData/list/index' url: "../../pageage/project_attendance/project_attendanceData/list/index",
}) });
}, },
//跳转到安全管控 //跳转到安全管控
XMSP: function () { XMSP: function () {
wx.setStorageSync('nav-menu', "aqgl"); wx.setStorageSync("nav-menu", "aqgl");
wx.redirectTo({ wx.redirectTo({
url: '../project_safety/index' url: "../project_safety/index",
}) });
}, },
//跳转到质量管理 //跳转到质量管理
ZLGL: function () { ZLGL: function () {
wx.setStorageSync('nav-menu', "zlgl"); wx.setStorageSync("nav-menu", "zlgl");
wx.redirectTo({ wx.redirectTo({
url: '../project_quality/index' url: "../project_quality/index",
}) });
}, },
//跳转到进度管理 //跳转到进度管理
JDGL: function () { JDGL: function () {
wx.setStorageSync('nav-menu', "xmgk"); wx.setStorageSync("nav-menu", "xmgk");
wx.redirectTo({ wx.redirectTo({
url: '../project_schedule/list/index' url: "../project_schedule/list/index",
}) });
}, },
//跳转到项目管理 //跳转到项目管理
XMGL: function () { XMGL: function () {
wx.setStorageSync('nav-menu', "xmgl"); wx.setStorageSync("nav-menu", "xmgl");
wx.redirectTo({ wx.redirectTo({
url: '../project_more/index' url: "../project_more/index",
}) });
}, },
//跳转到项目列表 //跳转到项目列表
XMLB: function () { XMLB: function () {
wx.redirectTo({ wx.redirectTo({
url: '../project_list/index' url: "../project_list/index",
}) });
}, },
/** /**
@ -605,15 +660,18 @@ Page({
*/ */
awaitTask() { awaitTask() {
let param = "proId=" + app.globalData.useProjectId; let param = "proId=" + app.globalData.useProjectId;
findMyTask(param).then(res => { findMyTask(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo; let proUserInfo = this.data.subDeptUserInfo;
this.setData({ this.setData({
todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo, todoDb:
proUserInfo.subDeptType == "1"
? res.data.dwsh + res.data.rysh
: res.data.todo,
aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0, aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0 zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
}) });
} }
}); });
}, },
}) });

View File

@ -26,51 +26,51 @@
<van-collapse-item title="项目基本信息" name="base"> <van-collapse-item title="项目基本信息" name="base">
<view class="gk_open_con"> <view class="gk_open_con">
<view> <view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_12.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_12.png"></image>
项目单位:<text>{{projectInfo.comName}}</text> 项目单位:<text>{{projectInfo.comName}}</text>
</view> </view>
<view wx:if="{{projectInfo.province && projectInfo.city}}"> <view wx:if="{{projectInfo.province && projectInfo.city}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_1.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_1.png"></image>
所属区域:<text>{{projectInfo.province+' - '+projectInfo.city}}</text> 所属区域:<text>{{projectInfo.province+' - '+projectInfo.city}}</text>
</view> </view>
<view> <view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_2.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_2.png"></image>
详细地址:<text>{{projectInfo.projectAddress}}</text> 详细地址:<text>{{projectInfo.projectAddress}}</text>
</view> </view>
<view> <view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_3.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_3.png"></image>
项目类型:<text>{{projectInfo.projectTypeName}}</text> 项目类型:<text>{{projectInfo.projectTypeName}}</text>
</view> </view>
<view wx:if="{{false}}"> <view wx:if="{{false}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_4.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_4.png"></image>
总建筑面积:<text>{{projectInfo.totalBuildingArea}}</text> 总建筑面积:<text>{{projectInfo.totalBuildingArea}}</text>
</view> </view>
<view> <view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_5.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_5.png"></image>
计划开工日期:<text>{{projectInfo.scheduledStartTime}}</text> 计划开工日期:<text>{{projectInfo.scheduledStartTime}}</text>
</view> </view>
<view> <view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_6.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_6.png"></image>
实际开工日期:<text>{{projectInfo.actualOperatingTime}}</text> 实际开工日期:<text>{{projectInfo.actualOperatingTime}}</text>
</view> </view>
<view> <view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_7.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_7.png"></image>
计划竣工日期:<text>{{projectInfo.plannedCompletionTime}}</text> 计划竣工日期:<text>{{projectInfo.plannedCompletionTime}}</text>
</view> </view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}"> <view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_8.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_8.png"></image>
总工期:<text>{{projectInfo.projectTimeLimit + ' 天'}}</text> 总工期:<text>{{projectInfo.projectTimeLimit + ' 天'}}</text>
</view> </view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}"> <view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_10.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_10.png"></image>
项目负责人:<text>{{projectInfo.projectPerson}}</text> 项目负责人:<text>{{projectInfo.projectPerson}}</text>
</view> </view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}"> <view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_11.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_11.png"></image>
负责人手机号:<text>{{projectInfo.projectPersonPhone}}</text> 负责人手机号:<text>{{projectInfo.projectPersonPhone}}</text>
</view> </view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}"> <view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_15.png"></image> <image src="{{baseImgUrl}}/profile/static/images/s_15.png"></image>
项目概述:<text>{{projectInfo.projectSummarize}}</text> 项目概述:<text>{{projectInfo.projectSummarize}}</text>
</view> </view>
</view> </view>
@ -78,7 +78,7 @@
<van-collapse-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" title="建设及管理单位信息" name="dept"> <van-collapse-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" title="建设及管理单位信息" name="dept">
<view class="construction_unit" wx:for="{{projectDeptsList}}" wx:key="index"> <view class="construction_unit" wx:for="{{projectDeptsList}}" wx:key="index">
<view class="construction_unit_image"> <view class="construction_unit_image">
<image src="https://xiangguan.sxyanzhu.com/profile/static/icon/web_zbdw.png"></image> <image src="{{baseImgUrl}}/profile/static/icon/web_zbdw.png"></image>
</view> </view>
<view class="construction_unit_list"> <view class="construction_unit_list">
<view class="construction_unit_title">{{item.deptType}}</view> <view class="construction_unit_title">{{item.deptType}}</view>
@ -90,7 +90,22 @@
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
</view> </view>
<view class="gd_max" style="margin-top: 20rpx;"
wx-if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && (subDeptUserInfo.userPost=='4' || subDeptUserInfo.userPost=='5')}}">
<van-row class="demo clearfix">
<van-col span="8" wx:for="{{menuList}}" wx:key="unique">
<view class="gd_min" data-id="{{item.menuIdenti}}" data-url="{{item.menuUrl}}" bindtap="goMenu">
<span class="tabNum_active" wx:if="{{item.menuIdenti=='FBDWSH' && fbdwDB>0}}">{{fbdwDB}}</span>
<span class="tabNum_active" wx:if="{{item.menuIdenti=='FBRYSH' && fbrtDB>0}}">{{fbrtDB}}</span>
<span class="tabNum_active" wx:if="{{item.menuIdenti=='AQYHPC' && aqyhDB>0}}">{{aqyhDB}}</span>
<span class="tabNum_active" wx:if="{{item.menuIdenti=='ZLYHPC' && zlyhDB>0}}">{{zlyhDB}}</span>
<span class="tabNum_active" wx:if="{{item.menuIdenti=='JPYSGL' && checkDB>0}}">{{checkDB}}</span>
<image src="{{format.httpImg(item.menuImg)}}"></image>
<view>{{item.menuName}}</view>
</view>
</van-col>
</van-row>
</view>
<view class="echarts_max" <view class="echarts_max"
wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}"> wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min"> <view class="echarts_min">
@ -142,7 +157,7 @@
<van-col span="8"> <van-col span="8">
<view class="survey_content"> <view class="survey_content">
<view class="survey_content_img"> <view class="survey_content_img">
<image animation="{{animationData}}" src="https://szgcwx.jhncidg.com/staticFiles/icon/dw.png" /> <image animation="{{animationData}}" src="{{baseImgUrl}}/cd/appimgs/dw.png" />
</view> </view>
</view> </view>
<view class="survey_content_number labour-survey_content_number"> <view class="survey_content_number labour-survey_content_number">
@ -249,7 +264,7 @@
</view> </view>
<view wx:if="{{attendanceListData.length==0}}"> <view wx:if="{{attendanceListData.length==0}}">
<view style="padding-top: 5px;text-align: -webkit-center;"> <view style="padding-top: 5px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"> <image src="{{baseImgUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;">
</image> </image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
@ -259,7 +274,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 底部导航 --> <!-- 底部导航 -->
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" <van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange"
active-color="#ffffff" inactive-color="#7d95d6"> active-color="#ffffff" inactive-color="#7d95d6">

View File

@ -253,3 +253,23 @@
.bt30{ .bt30{
margin-bottom: 20px; margin-bottom: 20px;
} }
.gd_max {
padding: 10rpx 50rpx 0;
}
.gd_min {
padding: 30rpx 0;
text-align: center;
position: relative;
}
.gd_min image {
width: 150rpx;
height: 150rpx;
}
.gd_min view {
padding: 10rpx;
color: #89a4eb;
}

View File

@ -1,13 +1,8 @@
import { import config from "../../../config";
getToken import { getToken } from "../../../utils/auth";
} from '../../../utils/auth' import { subusersList, subusersCount } from "../../../api/project";
import { const app = getApp();
subusersList,
subusersCount
} from '../../../api/project'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
@ -22,6 +17,7 @@ Page({
yrcCount: 0, yrcCount: 0,
ylcCount: 0, ylcCount: 0,
activeName: "0_0", activeName: "0_0",
imgBaseUrl: config.baseImgUrl, // 添加 imgBaseUrl
}, },
//项目切换 返回值 //项目切换 返回值
@ -39,8 +35,8 @@ Page({
onLoad(options) { onLoad(options) {
if (!getToken()) { if (!getToken()) {
wx.redirectTo({ wx.redirectTo({
url: '../../../pages/login/login', url: "../../../pages/login/login",
}) });
} }
this.setData({ this.setData({
addFlag: true, addFlag: true,
@ -51,7 +47,7 @@ Page({
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,
listData: [], listData: [],
total: 0 total: 0,
}); });
//获取数据列表 //获取数据列表
this.getListData(); this.getListData();
@ -64,7 +60,7 @@ Page({
skipAdd() { skipAdd() {
wx.redirectTo({ wx.redirectTo({
url: `../add/index`, url: `../add/index`,
}) });
}, },
/** /**
@ -75,7 +71,7 @@ Page({
let _id = e.currentTarget.dataset.set; let _id = e.currentTarget.dataset.set;
wx.redirectTo({ wx.redirectTo({
url: `../info/index?id=${_id}`, url: `../info/index?id=${_id}`,
}) });
}, },
/** /**
@ -86,13 +82,13 @@ Page({
let _id = e.currentTarget.dataset.set; let _id = e.currentTarget.dataset.set;
wx.redirectTo({ wx.redirectTo({
url: `../add/index?id=${_id}`, url: `../add/index?id=${_id}`,
}) });
}, },
// 手风琴 // 手风琴
onChange(e) { onChange(e) {
this.setData({ this.setData({
activeName: e.target.dataset.set activeName: e.target.dataset.set,
}); });
}, },
@ -100,13 +96,22 @@ Page({
* 查询数据列表 * 查询数据列表
*/ */
getListData() { getListData() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=magUsers"; let params =
subusersList(params).then(res => { "pageNum=" +
this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId +
"&useStatus=" +
this.data.activeState +
"&activeTags=finished&searchValue=magUsers";
subusersList(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
total: res.total, total: res.total,
listData: this.data.listData.concat(res.rows) listData: this.data.listData.concat(res.rows),
}) });
} }
}); });
}, },
@ -115,12 +120,19 @@ Page({
* 统计数据列表 * 统计数据列表
*/ */
getListCount() { getListCount() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=magUsers"; let params =
subusersCount(params).then(res => { "pageNum=" +
this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId +
"&activeTags=finished&searchValue=magUsers";
subusersCount(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let _yrc = 0, let _yrc = 0,
_ylc = 0; _ylc = 0;
res.data.forEach(item => { res.data.forEach((item) => {
if (item.useStatus == "0") { if (item.useStatus == "0") {
_yrc = item.total; _yrc = item.total;
} else { } else {
@ -129,8 +141,8 @@ Page({
}); });
this.setData({ this.setData({
yrcCount: _yrc, yrcCount: _yrc,
ylcCount: _ylc ylcCount: _ylc,
}) });
} }
}); });
}, },
@ -142,9 +154,9 @@ Page({
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
let nav = ""; let nav = "";
if (index == 1) { if (index == 1) {
nav = '0'; nav = "0";
} else { } else {
nav = '1'; nav = "1";
} }
this.setData({ this.setData({
activeState: nav, activeState: nav,
@ -158,22 +170,18 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/ /*关闭当前页面,跳转到其它页面。*/
wx.redirectTo({ wx.redirectTo({
url: '../../project_more/index', url: "../../project_more/index",
}) });
}, },
/** /**
@ -183,7 +191,7 @@ Page({
let nal = Math.ceil(this.data.total / this.data.pageSize); let nal = Math.ceil(this.data.total / this.data.pageSize);
if (this.data.pageNum < nal) { if (this.data.pageNum < nal) {
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1,
}); });
this.getListData(); this.getListData();
} else { } else {
@ -194,35 +202,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {},
});
}
})

View File

@ -3,7 +3,7 @@
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="../../../images/left.png"></image>
</view> </view>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">
@ -47,13 +47,13 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd"> <view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image> <image src="../../../images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -61,19 +61,19 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view wx:if="{{addDraftFlag}}" class="inspect_add_to_darft" bindtap="skipAddDarft"> <view wx:if="{{addDraftFlag}}" class="inspect_add_to_darft" bindtap="skipAddDarft">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image> <image src="../../../images/new_add.png"></image>
<view>草稿</view> <view>草稿</view>
</view> </view>
</view> </view>
<view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd"> <view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image> <image src="../../../images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -4,7 +4,7 @@
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="XMGK"> <view class="header_img" bindtap="XMGK">
<image src="/images/left.png"></image> <image src="../../../images/left.png"></image>
<text class="header_fh">返回</text> <text class="header_fh">返回</text>
</view> </view>
</van-col> </van-col>
@ -49,13 +49,13 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view class="inspect_add_to_copy" bindtap="skipAdd"> <view class="inspect_add_to_copy" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image> <image src="../../../images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>
@ -64,28 +64,28 @@
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6"> <van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK"> <van-tabbar-item bindtap="XMGK">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <image slot="icon" src="../../../images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <image slot="icon-active" src="../../../images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况 项目概况
</van-tabbar-item> </van-tabbar-item>
<van-tabbar-item> <van-tabbar-item>
<image slot="icon" src="/images/footer_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <image slot="icon" src="../../../images/footer_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <image slot="icon-active" src="../../../images/foot_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
安全管理 安全管理
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span> <span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item> </van-tabbar-item>
<van-tabbar-item bindtap="ZLGL"> <van-tabbar-item bindtap="ZLGL">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <image slot="icon" src="../../../images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <image slot="icon-active" src="../../../images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
质量管理 质量管理
<span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span> <span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span>
</van-tabbar-item> </van-tabbar-item>
<van-tabbar-item bindtap="JDGL"> <van-tabbar-item bindtap="JDGL">
<image slot="icon" src="/images/footer_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <image slot="icon" src="../../../images/footer_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <image slot="icon-active" src="../../../images/foot_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
进度管理 进度管理
</van-tabbar-item> </van-tabbar-item>

View File

@ -1,13 +1,8 @@
import { import config from "../../../config";
getToken import { getToken } from "../../../utils/auth";
} from '../../../utils/auth' import { subdeptsList, subdeptsCount } from "../../../api/project";
import { const app = getApp();
subdeptsList,
subdeptsCount
} from '../../../api/project'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
@ -20,7 +15,8 @@ Page({
listData: [], listData: [],
activeState: "0", activeState: "0",
yrcCount: 0, yrcCount: 0,
ylcCount: 0 ylcCount: 0,
imgBaseUrl: config.baseImgUrl, // 添加 imgBaseUrl
}, },
//项目切换 返回值 //项目切换 返回值
@ -38,8 +34,8 @@ Page({
onLoad(options) { onLoad(options) {
if (!getToken()) { if (!getToken()) {
wx.redirectTo({ wx.redirectTo({
url: '../../../pages/login/login', url: "../../../pages/login/login",
}) });
} }
this.setData({ this.setData({
addFlag: true, addFlag: true,
@ -50,7 +46,7 @@ Page({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
listData: [], listData: [],
total: 0 total: 0,
}); });
//获取数据列表 //获取数据列表
this.getListData(); this.getListData();
@ -63,7 +59,7 @@ Page({
skipAdd() { skipAdd() {
wx.redirectTo({ wx.redirectTo({
url: `../add/index`, url: `../add/index`,
}) });
}, },
/** /**
@ -74,31 +70,40 @@ Page({
let _id = e.currentTarget.dataset.set; let _id = e.currentTarget.dataset.set;
wx.redirectTo({ wx.redirectTo({
url: `../info/index?id=${_id}`, url: `../info/index?id=${_id}`,
}) });
}, },
/** /**
* 修改按钮 * 修改按钮
* @param {*} e * @param {*} e
*/ */
editInfo(e){ editInfo(e) {
let _id = e.currentTarget.dataset.set; let _id = e.currentTarget.dataset.set;
wx.redirectTo({ wx.redirectTo({
url: `../add/index?id=${_id}`, url: `../add/index?id=${_id}`,
}) });
}, },
/** /**
* 查询数据列表 * 查询数据列表
*/ */
getListData() { getListData() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished"; let params =
subdeptsList(params).then(res => { "pageNum=" +
this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId +
"&useStatus=" +
this.data.activeState +
"&activeTags=finished";
subdeptsList(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
total: res.total, total: res.total,
listData: this.data.listData.concat(res.rows) listData: this.data.listData.concat(res.rows),
}) });
} }
}); });
}, },
@ -107,12 +112,19 @@ Page({
* 统计数据列表 * 统计数据列表
*/ */
getListCount() { getListCount() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished"; let params =
subdeptsCount(params).then(res => { "pageNum=" +
this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId +
"&activeTags=finished";
subdeptsCount(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let _yrc = 0, let _yrc = 0,
_ylc = 0; _ylc = 0;
res.data.forEach(item => { res.data.forEach((item) => {
if (item.useStatus == "0") { if (item.useStatus == "0") {
_yrc = item.total; _yrc = item.total;
} else { } else {
@ -121,8 +133,8 @@ Page({
}); });
this.setData({ this.setData({
yrcCount: _yrc, yrcCount: _yrc,
ylcCount: _ylc ylcCount: _ylc,
}) });
} }
}); });
}, },
@ -134,9 +146,9 @@ Page({
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
let nav = ""; let nav = "";
if (index == 1) { if (index == 1) {
nav = '0'; nav = "0";
} else { } else {
nav = '1'; nav = "1";
} }
this.setData({ this.setData({
activeState: nav, activeState: nav,
@ -150,22 +162,18 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/ /*关闭当前页面,跳转到其它页面。*/
wx.redirectTo({ wx.redirectTo({
url: '../../project_more/index', url: "../../project_more/index",
}) });
}, },
/** /**
@ -175,7 +183,7 @@ Page({
let nal = Math.ceil(this.data.total / this.data.pageSize); let nal = Math.ceil(this.data.total / this.data.pageSize);
if (this.data.pageNum < nal) { if (this.data.pageNum < nal) {
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1,
}); });
this.getListData(); this.getListData();
} else { } else {
@ -186,35 +194,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {},
});
}
})

View File

@ -3,7 +3,7 @@
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="../../../images/left.png"></image>
</view> </view>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">
@ -44,13 +44,13 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd"> <view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image> <image src="../../../images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -1,14 +1,8 @@
import { import config from "../../../config";
getToken, import { getToken, getUserInfo } from "../../../utils/auth";
getUserInfo import { subgroupsList, subgroupsCount } from "../../../api/project";
} from '../../../utils/auth' const app = getApp();
import {
subgroupsList,
subgroupsCount
} from '../../../api/project'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
@ -22,7 +16,8 @@ Page({
activeState: "0", activeState: "0",
yrcCount: 0, yrcCount: 0,
ylcCount: 0, ylcCount: 0,
userInfo:{} userInfo: {},
imgBaseUrl: config.baseImgUrl, // 添加 imgBaseUrl
}, },
//项目切换 返回值 //项目切换 返回值
@ -40,12 +35,12 @@ Page({
onLoad(options) { onLoad(options) {
if (!getToken()) { if (!getToken()) {
wx.redirectTo({ wx.redirectTo({
url: '../../../pages/login/login', url: "../../../pages/login/login",
}) });
} }
const proUserInfo = getUserInfo(); const proUserInfo = getUserInfo();
this.setData({ this.setData({
addFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false, addFlag: proUserInfo.projectUserInfo.subDeptType == "1" ? true : false,
userInfo: proUserInfo.projectUserInfo, userInfo: proUserInfo.projectUserInfo,
initData: { initData: {
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
@ -54,7 +49,7 @@ Page({
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
listData: [], listData: [],
total: 0 total: 0,
}); });
//获取数据列表 //获取数据列表
this.getListData(proUserInfo.projectUserInfo); this.getListData(proUserInfo.projectUserInfo);
@ -67,7 +62,7 @@ Page({
skipAdd() { skipAdd() {
wx.redirectTo({ wx.redirectTo({
url: `../add/index`, url: `../add/index`,
}) });
}, },
/** /**
@ -78,34 +73,43 @@ Page({
let _id = e.currentTarget.dataset.set; let _id = e.currentTarget.dataset.set;
wx.redirectTo({ wx.redirectTo({
url: `../info/index?id=${_id}`, url: `../info/index?id=${_id}`,
}) });
}, },
/** /**
* 修改按钮 * 修改按钮
* @param {*} e * @param {*} e
*/ */
editInfo(e){ editInfo(e) {
let _id = e.currentTarget.dataset.set; let _id = e.currentTarget.dataset.set;
wx.redirectTo({ wx.redirectTo({
url: `../add/index?id=${_id}`, url: `../add/index?id=${_id}`,
}) });
}, },
/** /**
* 查询数据列表 * 查询数据列表
*/ */
getListData(_userInfo) { getListData(_userInfo) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished"; let params =
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){ "pageNum=" +
params += "&subDeptId="+_userInfo.subDeptId; this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId +
"&useStatus=" +
this.data.activeState +
"&activeTags=finished";
if (_userInfo.subDeptType && _userInfo.subDeptType != "1") {
params += "&subDeptId=" + _userInfo.subDeptId;
} }
subgroupsList(params).then(res => { subgroupsList(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
total: res.total, total: res.total,
listData: this.data.listData.concat(res.rows) listData: this.data.listData.concat(res.rows),
}) });
} }
}); });
}, },
@ -114,15 +118,22 @@ Page({
* 统计数据列表 * 统计数据列表
*/ */
getListCount(_userInfo) { getListCount(_userInfo) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished"; let params =
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){ "pageNum=" +
params += "&subDeptId="+_userInfo.subDeptId; this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId +
"&activeTags=finished";
if (_userInfo.subDeptType && _userInfo.subDeptType != "1") {
params += "&subDeptId=" + _userInfo.subDeptId;
} }
subgroupsCount(params).then(res => { subgroupsCount(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let _yrc = 0, let _yrc = 0,
_ylc = 0; _ylc = 0;
res.data.forEach(item => { res.data.forEach((item) => {
if (item.useStatus == "0") { if (item.useStatus == "0") {
_yrc = item.total; _yrc = item.total;
} else { } else {
@ -131,8 +142,8 @@ Page({
}); });
this.setData({ this.setData({
yrcCount: _yrc, yrcCount: _yrc,
ylcCount: _ylc ylcCount: _ylc,
}) });
} }
}); });
}, },
@ -144,9 +155,9 @@ Page({
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
let nav = ""; let nav = "";
if (index == 1) { if (index == 1) {
nav = '0'; nav = "0";
} else { } else {
nav = '1'; nav = "1";
} }
this.setData({ this.setData({
activeState: nav, activeState: nav,
@ -160,22 +171,18 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/ /*关闭当前页面,跳转到其它页面。*/
wx.redirectTo({ wx.redirectTo({
url: '../../project_more/index', url: "../../project_more/index",
}) });
}, },
/** /**
@ -185,7 +192,7 @@ Page({
let nal = Math.ceil(this.data.total / this.data.pageSize); let nal = Math.ceil(this.data.total / this.data.pageSize);
if (this.data.pageNum < nal) { if (this.data.pageNum < nal) {
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1,
}); });
this.getListData(this.data.userInfo); this.getListData(this.data.userInfo);
} else { } else {
@ -196,35 +203,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {},
});
}
})

View File

@ -3,7 +3,7 @@
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="../../../images/left.png"></image>
</view> </view>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">
@ -41,13 +41,13 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd"> <view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image> <image src="../../../images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -1,14 +1,8 @@
import { import config from "../../../config";
getToken, import { getToken, getUserInfo } from "../../../utils/auth";
getUserInfo import { subusersList, subusersCount } from "../../../api/project";
} from '../../../utils/auth' const app = getApp();
import {
subusersList,
subusersCount
} from '../../../api/project'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
@ -23,7 +17,8 @@ Page({
yrcCount: 0, yrcCount: 0,
ylcCount: 0, ylcCount: 0,
activeName: "", activeName: "",
userInfo:{} userInfo: {},
imgBaseUrl: config.baseImgUrl, // 添加 imgBaseUrl
}, },
//项目切换 返回值 //项目切换 返回值
@ -41,12 +36,12 @@ Page({
onLoad(options) { onLoad(options) {
if (!getToken()) { if (!getToken()) {
wx.redirectTo({ wx.redirectTo({
url: '../../../pages/login/login', url: "../../../pages/login/login",
}) });
} }
const proUserInfo = getUserInfo(); const proUserInfo = getUserInfo();
this.setData({ this.setData({
addFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false, addFlag: proUserInfo.projectUserInfo.subDeptType == "1" ? true : false,
userInfo: proUserInfo.projectUserInfo, userInfo: proUserInfo.projectUserInfo,
initData: { initData: {
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
@ -55,7 +50,7 @@ Page({
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,
listData: [], listData: [],
total: 0 total: 0,
}); });
//获取数据列表 //获取数据列表
this.getListData(proUserInfo.projectUserInfo); this.getListData(proUserInfo.projectUserInfo);
@ -68,7 +63,7 @@ Page({
skipAdd() { skipAdd() {
wx.redirectTo({ wx.redirectTo({
url: `../add/index`, url: `../add/index`,
}) });
}, },
/** /**
@ -79,7 +74,7 @@ Page({
let _id = e.currentTarget.dataset.set; let _id = e.currentTarget.dataset.set;
wx.redirectTo({ wx.redirectTo({
url: `../info/index?id=${_id}`, url: `../info/index?id=${_id}`,
}) });
}, },
/** /**
@ -90,13 +85,13 @@ Page({
let _id = e.currentTarget.dataset.set; let _id = e.currentTarget.dataset.set;
wx.redirectTo({ wx.redirectTo({
url: `../add/index?id=${_id}`, url: `../add/index?id=${_id}`,
}) });
}, },
// 手风琴 // 手风琴
onChange(e) { onChange(e) {
this.setData({ this.setData({
activeName: e.target.dataset.set activeName: e.target.dataset.set,
}); });
}, },
@ -104,16 +99,25 @@ Page({
* 查询数据列表 * 查询数据列表
*/ */
getListData(_userInfo) { getListData(_userInfo) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=subUsers"; let params =
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){ "pageNum=" +
params += "&subDeptId="+_userInfo.subDeptId; this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId +
"&useStatus=" +
this.data.activeState +
"&activeTags=finished&searchValue=subUsers";
if (_userInfo.subDeptType && _userInfo.subDeptType != "1") {
params += "&subDeptId=" + _userInfo.subDeptId;
} }
subusersList(params).then(res => { subusersList(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
total: res.total, total: res.total,
listData: this.data.listData.concat(res.rows) listData: this.data.listData.concat(res.rows),
}) });
} }
}); });
}, },
@ -122,15 +126,22 @@ Page({
* 统计数据列表 * 统计数据列表
*/ */
getListCount(_userInfo) { getListCount(_userInfo) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=subUsers"; let params =
if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){ "pageNum=" +
params += "&subDeptId="+_userInfo.subDeptId; this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId +
"&activeTags=finished&searchValue=subUsers";
if (_userInfo.subDeptType && _userInfo.subDeptType != "1") {
params += "&subDeptId=" + _userInfo.subDeptId;
} }
subusersCount(params).then(res => { subusersCount(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
let _yrc = 0, let _yrc = 0,
_ylc = 0; _ylc = 0;
res.data.forEach(item => { res.data.forEach((item) => {
if (item.useStatus == "0") { if (item.useStatus == "0") {
_yrc = item.total; _yrc = item.total;
} else { } else {
@ -139,8 +150,8 @@ Page({
}); });
this.setData({ this.setData({
yrcCount: _yrc, yrcCount: _yrc,
ylcCount: _ylc ylcCount: _ylc,
}) });
} }
}); });
}, },
@ -152,9 +163,9 @@ Page({
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
let nav = ""; let nav = "";
if (index == 1) { if (index == 1) {
nav = '0'; nav = "0";
} else { } else {
nav = '1'; nav = "1";
} }
this.setData({ this.setData({
activeState: nav, activeState: nav,
@ -168,22 +179,18 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/ /*关闭当前页面,跳转到其它页面。*/
wx.redirectTo({ wx.redirectTo({
url: '../../project_more/index', url: "../../project_more/index",
}) });
}, },
/** /**
@ -193,7 +200,7 @@ Page({
let nal = Math.ceil(this.data.total / this.data.pageSize); let nal = Math.ceil(this.data.total / this.data.pageSize);
if (this.data.pageNum < nal) { if (this.data.pageNum < nal) {
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1,
}); });
this.getListData(this.data.userInfo); this.getListData(this.data.userInfo);
} else { } else {
@ -204,35 +211,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {},
});
}
})

View File

@ -3,7 +3,7 @@
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="../../../images/left.png"></image>
</view> </view>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">
@ -47,13 +47,13 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd"> <view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image> <image src="../../../images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -1,12 +1,8 @@
import { import config from "../../../config";
getToken import { getToken } from "../../../utils/auth";
} from '../../../utils/auth' import { proVideoList } from "../../../api/project";
import { const app = getApp();
proVideoList
} from '../../../api/project'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
@ -16,6 +12,7 @@ Page({
pageSize: 10, pageSize: 10,
total: 0, total: 0,
listData: [], listData: [],
imgBaseUrl: config.baseImgUrl, // 添加 imgBaseUrl
}, },
//项目切换 返回值 //项目切换 返回值
@ -33,8 +30,8 @@ Page({
onLoad(options) { onLoad(options) {
if (!getToken()) { if (!getToken()) {
wx.redirectTo({ wx.redirectTo({
url: '../../../pages/login/login', url: "../../../pages/login/login",
}) });
} }
this.setData({ this.setData({
initData: { initData: {
@ -44,7 +41,7 @@ Page({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
listData: [], listData: [],
total: 0 total: 0,
}); });
this.getListData(); this.getListData();
}, },
@ -54,27 +51,29 @@ Page({
* @param {*} e * @param {*} e
*/ */
videoPlay(e) { videoPlay(e) {
let { let { id, url, secret } = e.currentTarget.dataset.set;
id,
url,
secret
} = e.currentTarget.dataset.set
wx.redirectTo({ wx.redirectTo({
url: `../info/index?id=${id}&url=${url}&token=${secret}`, url: `../info/index?id=${id}&url=${url}&token=${secret}`,
}) });
}, },
/** /**
* 查询数据列表 * 查询数据列表
*/ */
getListData() { getListData() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId; let params =
proVideoList(params).then(res => { "pageNum=" +
this.data.pageNum +
"&pageSize=" +
this.data.pageSize +
"&projectId=" +
app.globalData.useProjectId;
proVideoList(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
total: res.total, total: res.total,
listData: this.data.listData.concat(res.rows) listData: this.data.listData.concat(res.rows),
}) });
} }
}); });
}, },
@ -82,28 +81,24 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
returnToPage: function () { returnToPage: function () {
wx.redirectTo({ wx.redirectTo({
url: '../../project_safety/index', url: "../../project_safety/index",
}) });
}, },
onScrollToLower() { onScrollToLower() {
let nal = Math.ceil(this.data.total / this.data.pageSize); let nal = Math.ceil(this.data.total / this.data.pageSize);
if (this.data.pageNum < nal) { if (this.data.pageNum < nal) {
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1,
}); });
this.getListData(); this.getListData();
} else { } else {
@ -114,35 +109,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {},
});
}
})

View File

@ -3,7 +3,7 @@
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"> <view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image> <image src="../../../images/left.png"></image>
</view> </view>
</van-col> </van-col>
<van-col span="15"> <van-col span="15">
@ -30,8 +30,8 @@
<view class="inspect_list_info"> <view class="inspect_list_info">
<view class="inspect_list_info_details"> <view class="inspect_list_info_details">
<view class="video-imgage-container" data-set="{{item}}" bindtap="videoPlay"> <view class="video-imgage-container" data-set="{{item}}" bindtap="videoPlay">
<image class="video-image" src="https://xiangguan.sxyanzhu.com/profile/static/images/video_bg.png"/> <image class="video-image" src="{{imgBaseUrl}}/profile/static/images/video_bg.png"/>
<image class="video-play" src="https://xiangguan.sxyanzhu.com/profile/static/images/home_play.png" alt="play"/> <image class="video-play" src="{{imgBaseUrl}}/profile/static/images/home_play.png" alt="play"/>
</view> </view>
</view> </view>
</view> </view>
@ -39,7 +39,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image> <image src="{{imgBaseUrl}}/cdn/appimgs/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -1,30 +1,22 @@
import config from '../../config' import config from "../../config";
import { import { getToken } from "../../utils/auth";
getToken import { submitUserSign, findUserSignList } from "../../api/publics";
} from '../../utils/auth' import { securitySignFileUpload } from "../../utils/request";
import { const app = getApp();
submitUserSign,
findUserSignList
} from '../../api/publics'
import {
securitySignFileUpload
} from '../../utils/request'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
projectId: '', projectId: "",
projectName: '', projectName: "",
initData: {}, initData: {},
signData: { signData: {
id: null, id: null,
signetPath: null signetPath: null,
}, },
signPath: '', signPath: "",
imgBaseUrl: config.baseImgUrl imgBaseUrl: config.baseImgUrl,
}, },
//项目切换 返回值 //项目切换 返回值
@ -47,14 +39,14 @@ Page({
initData: { initData: {
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
text: app.globalData.useProjectName, text: app.globalData.useProjectName,
} },
}); });
this.getUserSignList(app.globalData.useProjectId); this.getUserSignList(app.globalData.useProjectId);
} else { } else {
console.log("未查询到Token...{}...准备重新登录") console.log("未查询到Token...{}...准备重新登录");
wx.redirectTo({ wx.redirectTo({
url: '../../pages/login/login', url: "../../pages/login/login",
}) });
} }
}, },
@ -63,24 +55,24 @@ Page({
* @param {*} proId * @param {*} proId
*/ */
getUserSignList(proId) { getUserSignList(proId) {
findUserSignList(proId).then(res => { findUserSignList(proId).then((res) => {
if (res.code == 200 && res.data.length > 0) { if (res.code == 200 && res.data.length > 0) {
this.setData({ this.setData({
signData: res.data[0] signData: res.data[0],
}); });
} }
}) });
}, },
/** /**
* 确认签名 * 确认签名
*/ */
sign(e) { sign(e) {
let tempFilePath = e.detail let tempFilePath = e.detail;
securitySignFileUpload(tempFilePath).then(res => { securitySignFileUpload(tempFilePath).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
signPath: res.data.url signPath: res.data.url,
}); });
} }
}); });
@ -90,11 +82,7 @@ Page({
* 确认修改签名 * 确认修改签名
*/ */
submitSign() { submitSign() {
let { let { projectId, signPath, signData } = this.data;
projectId,
signPath,
signData
} = this.data;
//数据效验 //数据效验
if (!projectId) { if (!projectId) {
app.toast("信息异常...请刷新后重试!"); app.toast("信息异常...请刷新后重试!");
@ -107,16 +95,16 @@ Page({
let param = { let param = {
id: signData.id, id: signData.id,
projectId: projectId, projectId: projectId,
signetPath: signPath signetPath: signPath,
} };
submitUserSign(param).then(res => { submitUserSign(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
app.toast("保存签名成功!") app.toast("保存签名成功!");
setTimeout(() => { setTimeout(() => {
wx.redirectTo({ wx.redirectTo({
url: '../project_more/index', url: "../project_more/index",
}) });
}, 200) }, 200);
} }
}); });
}, },
@ -125,57 +113,49 @@ Page({
* 返回上级页面 * 返回上级页面
*/ */
BACK() { BACK() {
if (wx.getStorageSync("nav-menu") == "prjInfo") {
wx.redirectTo({ wx.redirectTo({
url: '../project_more/index', url: "../project_info/index",
}) });
} else {
wx.redirectTo({
url: "../project_more/index",
});
}
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {},
});
}
})

View File

@ -1,13 +1,7 @@
import { import { removeToken } from "../../../utils/auth";
removeToken import { loginOut, updatePwd, findOpenUserMsgId } from "../../../api/login";
} from '../../../utils/auth' import cfg from "../../../config";
import { const app = getApp();
loginOut,
updatePwd,
findOpenUserMsgId
} from '../../../api/login'
const app = getApp()
Component({ Component({
/**数据监听 */ /**数据监听 */
observers: {}, observers: {},
@ -18,14 +12,15 @@ Component({
show: false, show: false,
userData: {}, userData: {},
resPas: false, resPas: false,
oldPsw: '', oldPsw: "",
newPsw: '', newPsw: "",
password: '', password: "",
showOldPass: true, showOldPass: true,
showNewPass: true, showNewPass: true,
showPassWord: true, showPassWord: true,
binding: false, binding: false,
msgOpenId: "", msgOpenId: "",
baseImgUrl: cfg.baseImgUrl,
}, },
created() { created() {
@ -33,7 +28,7 @@ Component({
userData: app.globalData.userData, userData: app.globalData.userData,
loginName: app.globalData.userData.userName, loginName: app.globalData.userData.userName,
msgOpenId: "", msgOpenId: "",
}) });
}, },
/** /**
@ -44,30 +39,30 @@ Component({
let that = this; let that = this;
//获取缓存数据 //获取缓存数据
wx.getStorage({ wx.getStorage({
key: 'userinfo', key: "userinfo",
success: function (res) { success: function (res) {
findOpenUserMsgId(res.data.openId).then(vo => { findOpenUserMsgId(res.data.openId).then((vo) => {
if (vo.code == 200 && vo.data) { if (vo.code == 200 && vo.data) {
res.data.msgOpenId = vo.data.msgOpenId; res.data.msgOpenId = vo.data.msgOpenId;
wx.setStorage({ wx.setStorage({
key: 'userinfo', key: "userinfo",
data: res.data data: res.data,
}); });
that.setData({ that.setData({
show: true, show: true,
userData: res.data, userData: res.data,
loginName: res.data.loginName, loginName: res.data.loginName,
msgOpenId: res.data.msgOpenId || "", msgOpenId: res.data.msgOpenId || "",
})
}
}); });
} }
}) });
},
});
}, },
showPopup() { showPopup() {
this.setData({ this.setData({
show: true show: true,
}); });
}, },
@ -76,14 +71,14 @@ Component({
*/ */
closePopup() { closePopup() {
this.setData({ this.setData({
show: false show: false,
}); });
}, },
//修改密码 //修改密码
resPassword: function () { resPassword: function () {
this.setData({ this.setData({
resPas: true resPas: true,
}); });
}, },
@ -97,7 +92,7 @@ Component({
*/ */
closeResPas: function () { closeResPas: function () {
this.setData({ this.setData({
resPas: false resPas: false,
}); });
}, },
@ -106,25 +101,25 @@ Component({
*/ */
closeBinding: function () { closeBinding: function () {
this.setData({ this.setData({
binding: false binding: false,
}); });
}, },
bindingBuild: function () { bindingBuild: function () {
wx.previewImage({ wx.previewImage({
urls: "https://szgcwx.jhncidg.com/staticFiles/qrv1.jpg".split(","), urls: cfg.baseImgUrl + "/cdn/appimgs/qrv1.jpg".split(","),
current: 0 current: 0,
}) });
}, },
//退出登录 //退出登录
loginOut: function () { loginOut: function () {
loginOut().then(res => { loginOut().then((res) => {
removeToken(); removeToken();
wx.clearStorageSync(); wx.clearStorageSync();
wx.navigateTo({ wx.navigateTo({
url: '/pages/login/login' url: "/pages/login/login",
}) });
}); });
}, },
@ -132,25 +127,25 @@ Component({
let that = this; let that = this;
that.setData({ that.setData({
// 切换图标 // 切换图标
showOldPass: !that.data.showOldPass showOldPass: !that.data.showOldPass,
}) });
}, },
seeTap2() { seeTap2() {
let that = this; let that = this;
that.setData({ that.setData({
// 切换图标 // 切换图标
showNewPass: !that.data.showNewPass showNewPass: !that.data.showNewPass,
}) });
}, },
seeTap3() { seeTap3() {
let that = this; let that = this;
that.setData({ that.setData({
// 切换图标 // 切换图标
showPassWord: !that.data.showPassWord showPassWord: !that.data.showPassWord,
}) });
if (that.data.newPsw != '' && that.data.newPsw != that.data.password) { if (that.data.newPsw != "" && that.data.newPsw != that.data.password) {
app.toast("两次密码输入不一致!"); app.toast("两次密码输入不一致!");
} }
}, },
@ -160,22 +155,14 @@ Component({
*/ */
submit: function () { submit: function () {
var that = this; var that = this;
if (false && that.data.oldPsw == '') { if (that.data.password == "") {
app.toast("请输入旧密码!");
return;
}
if (that.data.password == '') {
app.toast("请确认新密码!"); app.toast("请确认新密码!");
return; return;
} }
if (that.data.newPsw != '' && that.data.newPsw != that.data.password) { if (that.data.newPsw != "" && that.data.newPsw != that.data.password) {
app.toast("两次密码输入不一致!"); app.toast("两次密码输入不一致!");
return; return;
} }
if (false && that.data.oldPsw.length < 6) {
app.toast("请输入旧密码长度 [6-20]位字符!");
return;
}
if (that.data.newPsw.length < 6) { if (that.data.newPsw.length < 6) {
app.toast("请输入新密码长度 [6-20]位字符!"); app.toast("请输入新密码长度 [6-20]位字符!");
return; return;
@ -189,22 +176,22 @@ Component({
oldPass: that.data.oldPsw, oldPass: that.data.oldPsw,
password: that.data.newPsw, password: that.data.newPsw,
confPass: that.data.password, confPass: that.data.password,
source: "u" source: "u",
} };
updatePwd(data).then(res => { updatePwd(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
app.toast("密码修改成功,请重新登录!", 800); app.toast("密码修改成功,请重新登录!", 800);
loginOut().then(res => { loginOut().then((res) => {
removeToken(); removeToken();
wx.clearStorageSync(); wx.clearStorageSync();
setTimeout(() => { setTimeout(() => {
wx.redirectTo({ wx.redirectTo({
url: '../login/login' url: "../login/login",
}); });
}, 500) }, 500);
}); });
} }
}); });
}, },
} },
}) });

View File

@ -1,5 +1,5 @@
<view class="header_img" bindtap="showPopup"> <view class="header_img" bindtap="showPopup">
<image src="/images/foot_3.png"></image> <image src="../../../images/foot_3.png"></image>
</view> </view>
<!-- 左侧账号信息 --> <!-- 左侧账号信息 -->
<van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="closePopup"> <van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="closePopup">
@ -10,7 +10,7 @@
</van-col> </van-col>
<van-col span="10"> <van-col span="10">
<view class="left_head"> <view class="left_head">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/user_avatar.png"></image> <image src="{{baseImgUrl}}/cdn/appimgs/user_avatar.png"></image>
</view> </view>
</van-col> </van-col>
<van-col span="14"> <van-col span="14">
@ -28,56 +28,56 @@
<button wx:if="{{false}}" type="default" size="default" style="margin-top: 40rpx;background-color: #513ea7;color: #FFF;" bindtap="bindingBuild">立即关注公众号</button> <button wx:if="{{false}}" type="default" size="default" style="margin-top: 40rpx;background-color: #513ea7;color: #FFF;" bindtap="bindingBuild">立即关注公众号</button>
<view class="left_manage_min" wx:if="{{false}}"> <view class="left_manage_min" wx:if="{{false}}">
<view class="left_manage" bindtap="binding"> <view class="left_manage" bindtap="binding">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/img_1.png" class="left_icon"></image> <image src="{{baseImgUrl}}/profile/static/images/img_1.png" class="left_icon"></image>
<text class="left_binding">授权消息通知</text> <text class="left_binding">授权消息通知</text>
<image src="/images/right.png" class="left_flaot"></image> <image src="../../../images/right.png" class="left_flaot"></image>
</view> </view>
</view> </view>
<view class="left_manage_min"> <view class="left_manage_min">
<view class="left_manage" bindtap="resPassword"> <view class="left_manage" bindtap="resPassword">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/img_5.png" class="left_icon"></image> <image src="{{baseImgUrl}}/profile/static/images/img_5.png" class="left_icon"></image>
<text class="left_password">修改密码</text> <text class="left_password">修改密码</text>
<image src="/images/right.png" class="left_flaot"></image> <image src="../../../images/right.png" class="left_flaot"></image>
</view> </view>
</view> </view>
<view class="left_manage_min"> <view class="left_manage_min">
<view class="left_manage" bindtap="loginOut"> <view class="left_manage" bindtap="loginOut">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/set.png" class="left_icon"></image> <image src="{{baseImgUrl}}/profile/static/images/set.png" class="left_icon"></image>
<text class="left_sign">退出登录</text> <text class="left_sign">退出登录</text>
<image src="/images/right.png" class="left_flaot"></image> <image src="../../../images/right.png" class="left_flaot"></image>
</view> </view>
</view> </view>
</view> </view>
</van-popup> </van-popup>
<!--修改密码--> <!--修改密码-->
<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"> <van-popup show="{{ resPas }}" position="left" class="passClass" custom-style="width: 100%;height:100%;background: #191d28 url({{baseImgUrl}}/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png) no-repeat bottom/100%;" bind:close="closeResPas">
<view class="bg_bg"> <view class="bg_bg">
<image src="https://szgcwx.jhncidg.com/staticFiles/img/yanzhu_logo_blue.png"></image> <image src="{{baseImgUrl}}/staticFiles/img/yanzhu_logo_blue.png"></image>
</view> </view>
<view class="inspect_info"> <view class="inspect_info">
<view class="inspect_info_list" wx:if="{{false}}"> <view class="inspect_info_list" wx:if="{{false}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">旧密码</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">旧密码</view>
<view class="inspect_info_content"> <view class="inspect_info_content">
<input placeholder="请输入旧密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showOldPass}}" maxlength="20" model:value="{{oldPsw}}" /> <input placeholder="请输入旧密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showOldPass}}" maxlength="20" model:value="{{oldPsw}}" />
<image wx:if="{{showOldPass}}" class="password-icon" src="https://xiangguan.sxyanzhu.com/profile/static/images/biyan.png" bindtap="seeTap1"></image> <image wx:if="{{showOldPass}}" class="password-icon" src="{{baseImgUrl}}/profile/static/images/biyan.png" bindtap="seeTap1"></image>
<image wx:else class="password-icon" src="/images/yj_01.png" bindtap="seeTap1"></image> <image wx:else class="password-icon" src="../../../images/yj_01.png" bindtap="seeTap1"></image>
</view> </view>
</view> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">新密码</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">新密码</view>
<view class="inspect_info_content"> <view class="inspect_info_content">
<input placeholder="请输入新密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showNewPass}}" maxlength="20" model:value="{{newPsw}}" /> <input placeholder="请输入新密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showNewPass}}" maxlength="20" model:value="{{newPsw}}" />
<image class="password-icon" src="https://xiangguan.sxyanzhu.com/profile/static/images/biyan.png" bindtap="seeTap2" wx:if="{{showNewPass}}" /> <image class="password-icon" src="{{baseImgUrl}}/profile/static/images/biyan.png" bindtap="seeTap2" wx:if="{{showNewPass}}" />
<image class="password-icon" src="/images/yj_01.png" bindtap="seeTap2" wx:else /> <image class="password-icon" src="../../../images/yj_01.png" bindtap="seeTap2" wx:else />
</view> </view>
</view> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">确认密码</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">确认密码</view>
<view class="inspect_info_content"> <view class="inspect_info_content">
<input placeholder="请确认新密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showPassWord}}" maxlength="20" model:value="{{password}}" /> <input placeholder="请确认新密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showPassWord}}" maxlength="20" model:value="{{password}}" />
<image class="password-icon" src="https://xiangguan.sxyanzhu.com/profile/static/images/biyan.png" bindtap="seeTap3" wx:if="{{showPassWord}}" /> <image class="password-icon" src="{{baseImgUrl}}/profile/static/images/biyan.png" bindtap="seeTap3" wx:if="{{showPassWord}}" />
<image class="password-icon" src="/images/yj_01.png" bindtap="seeTap3" wx:else /> <image class="password-icon" src="../../../images/yj_01.png" bindtap="seeTap3" wx:else />
</view> </view>
</view> </view>
<view class="problem_submit_to"> <view class="problem_submit_to">

View File

@ -41,7 +41,8 @@ config.forEach((item) => {
const newData = data const newData = data
.replace(/数字建安施工/g, item.title) .replace(/数字建安施工/g, item.title)
.replaceAll(`src="./`, `src = "/xd/`) .replaceAll(`src="./`, `src = "/xd/`)
.replaceAll(`href="./`, `href = "/xd/`); .replaceAll(`href="./`, `href = "/xd/`)
.replaceAll(`/cdn/webcfg.js`,`/cdn/tmp.js`)
// 将替换后的内容写入目标文件 // 将替换后的内容写入目标文件
fs.writeFile(targetFilePath, newData, "utf8", (err) => { fs.writeFile(targetFilePath, newData, "utf8", (err) => {