提交代码

dev_xd
姜玉琦 2025-03-09 15:12:00 +08:00
parent d5797bdb89
commit 75953e6c1f
21 changed files with 912 additions and 188 deletions

View File

@ -75,6 +75,13 @@ public interface SmzSspProblemmodifyMapper
*/
public List<Map<String, Object>> getWxListCount(SmzSspProblemmodify where);
/**
*
* @param where
* @return
*/
public List<Map<String,Object>> getWxGroupCountView(SmzSspProblemmodify where);
/**
*
* @param where

View File

@ -348,6 +348,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by ssp.checkState
</select>
<select id="getWxGroupCountView" parameterType="SmzSspProblemmodify" resultType="map">
SELECT
ssp.problemType,
count(1) AS total,
com.total AS comTotal
FROM
smz_ssp_problemmodify ssp
LEFT JOIN (
SELECT
ssp2.problemType AS type,
count(1) AS total
FROM
smz_ssp_problemmodify ssp2
WHERE
ssp2.checkState = 4
And ssp2.isDel=0
AND ssp2.projectId = #{projectId}
AND ssp2.infoType = #{infoType}
GROUP BY
ssp2.problemType
) com ON com.type = ssp.problemType
WHERE ssp.isDel=0
AND ssp.projectId = #{projectId}
AND ssp.infoType = #{infoType}
GROUP BY
ssp.problemType
</select>
<select id="selectList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
SELECT
a.id,

View File

@ -244,8 +244,10 @@ public class FlowBusinessKeyController extends BaseController {
data.put("rysh",rysh);
int aqyh = Convert.toInt(sumByCategory.get("106"),0)+Convert.toInt(sumByCategory.get("107"),0);
data.put("aqyh",aqyh);
data.put("aqal",aqyh);
int zlyh = Convert.toInt(sumByCategory.get("108"),0)+Convert.toInt(sumByCategory.get("109"),0);
data.put("zlyh",zlyh);
data.put("zlgl",zlyh);
return success(data);
}

View File

@ -284,6 +284,19 @@ public class SmzSspProblemmodifyController extends BaseController
return success(smzSspAuditinfoService.insertSmzSspAuditinfo(smzSspAuditinfo));
}
/**
*
* @param proId
* @return
*/
@GetMapping("/getWxGroupCountView/{proId}")
public AjaxResult getWxGroupCountView(@PathVariable("proId") Long proId,Long infoType){
SmzSspProblemmodify query = new SmzSspProblemmodify();
query.setProjectId(proId);
query.setInfoType(infoType);
return success(smzSspProblemmodifyService.getWxGroupCountView(query));
}
/** (ssp_proble_type)
* @param where
* @return

View File

@ -78,6 +78,13 @@ public interface ISmzSspProblemmodifyService
*/
public List<Map<String, Object>> getWxListCount(SmzSspProblemmodify where);
/**
*
* @param where
* @return
*/
public List<Map<String,Object>> getWxGroupCountView(SmzSspProblemmodify where);
/**
*
* @param where

View File

@ -149,6 +149,16 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
return smzSspProblemmodifyMapper.getWxListCount(where);
}
/**
*
* @param where
* @return
*/
@Override
public List<Map<String,Object>> getWxGroupCountView(SmzSspProblemmodify where){
return smzSspProblemmodifyMapper.getWxGroupCountView(where);
}
/**
*
* @param where
@ -178,4 +188,5 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
public List<SmzSspProblemmodify> groupByDangerType(SmzSspProblemmodify where) {
return smzSspProblemmodifyMapper.groupByDangerType(where);
}
}

View File

@ -86,4 +86,12 @@ export function findMyLastProblemmodify(proId,type) {
url: '/manage/problemmodify/findMyLastProblemmodify/'+proId+'?infoType='+type,
method: 'get'
})
}
// 项目分组查询统计
export function findGroupCountView(proId,type) {
return request({
url: '/manage/problemmodify/getWxGroupCountView/'+proId+'?infoType='+type,
method: 'get'
})
}

View File

@ -1,6 +1,13 @@
{
"pages": [
"pages/login/login",
"pages/project_qr/index",
"pages/project_list/index",
"pages/project_info/index",
"pages/project_more/index",
"pages/project_safety/index",
"pages/project_quality/index",
"pages/sign_mags/index",
"pages/project_flowable/initTask/index",
"pages/project_flowable/myFlowDefinition/index",
"pages/project_flowable/await/index",
@ -11,11 +18,6 @@
"pages/project_flowable/myProcessIns/index",
"pages/project_flowable/subDepts/index",
"pages/project_flowable/subDeptsUsers/index",
"pages/project_info/index",
"pages/project_list/index",
"pages/project_more/index",
"pages/project_qr/index",
"pages/sign_mags/index",
"pages/project_problemmodify/list/index",
"pages/project_problemmodify/info/index",
"pages/project_problemmodify/modify/index",

View File

@ -50,9 +50,9 @@ Page({
projectId: '',
projectName: '',
initData: {},
aqglDb: 0,
zlglDb: 0,
todoDb: 0,
approveDb: 0,
aq: 0,
nactive: 0,
labourData: [{
name: "管理人员",
@ -128,32 +128,31 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
labourImg: this.data.labourTypeList[this.data.nactive].img,
});
this.initAnimationData();
if (getToken()) {
this.setData({
userData: app.globalData.userData,
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
}
});
//项目基本信息
this.getProjectInfo(app.globalData.useProjectId);
//用户项目信息
this.getProSubDeptsUserInfo();
//项目建设单位
this.getProjectDepts(app.globalData.useProjectId);
} else {
console.log("未查询到Token...{}...准备重新登录")
if (!getToken()) {
wx.redirectTo({
url: '../login/login',
url: '../../login/login',
})
}
wx.setStorageSync('nav-menu', "xmgk");
const proUserInfo = getUserInfo();
app.globalData.subDeptUserData = proUserInfo.projectUserInfo;
this.initAnimationData();
this.setData({
labourImg: this.data.labourTypeList[this.data.nactive].img,
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
subDeptUserInfo: proUserInfo.projectUserInfo
});
//项目基本信息
this.getProjectInfo(app.globalData.useProjectId);
//用户项目信息
this.getProUserDatas();
//项目建设单位
this.getProjectDepts(app.globalData.useProjectId);
},
/**
@ -346,24 +345,19 @@ Page({
},
/**
* 查询单位人员信息
* 单位人员信息
* @param {*} proId
*/
getProSubDeptsUserInfo() {
const proUserInfo = getUserInfo();
app.globalData.subDeptUserData = proUserInfo.projectUserInfo;
this.setData({
subDeptUserInfo: proUserInfo.projectUserInfo
});
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.initSubDeptDaysCharts(app.globalData.useProjectId);
}
this.awaitTask();
//今日出勤信息
if (app.globalData.subDeptUserData.subDeptType=='1') {
if (app.globalData.subDeptUserData.subDeptType == '1') {
this.getSubDeptsAttendanceView(app.globalData.useProjectId);
}
//人员出勤信息
@ -522,7 +516,7 @@ Page({
})
},
showImg:function(e){
showImg: function (e) {
let paths = e.target.dataset.set;
let path = [];
paths.split(',').forEach(url => {
@ -531,7 +525,7 @@ Page({
wx.previewImage({
urls: path,
current: path[0]
})
})
},
/**
@ -566,30 +560,31 @@ Page({
//跳转到安全管控
XMSP: function () {
app.toast("正在建设中");
// wx.redirectTo({
// url: '../safety_manage/index'
// })
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({
url: '../project_safety/index'
})
},
//跳转到质量管理
ZLGL: function () {
app.toast("正在建设中");
// wx.redirectTo({
// url: '../quality_manage/index'
// })
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({
url: '../project_quality/index'
})
},
//跳转到进度管理
JDGL2: function () {
JDGL: function () {
app.toast("正在建设中");
// wx.redirectTo({
// url: '../../pageage/project_schedule/list/index'
// })
},
//跳转到更多功能
GDGN: function () {
//跳转到项目管理
XMGL: function () {
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: '../project_more/index'
})
@ -608,9 +603,12 @@ Page({
awaitTask() {
let param = "proId=" + app.globalData.useProjectId;
findMyTask(param).then(res => {
if(res.code==200){
if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo;
this.setData({
todoDb: res.data.todo
todoDb: proUserInfo.subDeptType=="1"?(res.data.dwsh+res.data.rysh):res.data.todo,
aqglDb: proUserInfo.subDeptType=="1"?res.data.aqgl:0,
zlglDb: proUserInfo.subDeptType=="1"?res.data.zlgl:0
})
}
});

View File

@ -235,38 +235,53 @@
</view>
<!-- 底部导航 -->
<van-tabbar wx:if="{{subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}" 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>
<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;" />
项目概况
</van-tabbar-item>
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="XMSP">
<van-tabbar-item bindtap="XMSP">
<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;" />
安全管理
<span class="tabNum" wx:if="{{aq>0}}">{{aq}}</span>
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item>
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" 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-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
质量管理
<span class="tabNum" wx:if="{{approveDb>0}}">{{approveDb}}</span>
<span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span>
</van-tabbar-item>
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="JDGL2">
<van-tabbar-item bindtap="JDGL">
<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;" />
进度管理
</van-tabbar-item>
<van-tabbar-item bindtap="GDGN">
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<!-- 底部导航 -->
<van-tabbar wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item>
<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;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -15,12 +15,14 @@ Page({
* 页面的初始数据
*/
data: {
active: 0,
active: 1,
projectId: '',
projectName: '',
subDeptUserInfo:{},
subDeptUserInfo: {},
menuList: [],
initData: {},
aqglDb: 0,
zlglDb: 0,
todoDB: 0,
fbdwDB: 0,
fbrtDB: 0,
@ -42,27 +44,26 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (getToken()) {
this.setData({
userData: app.globalData.userData,
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
}
});
//用户权限菜单
this.getUserMenuList(app.globalData.useProjectId);
//用户项目信息
this.getProSubDeptsUserInfo();
this.awaitTask();
} else {
console.log("未查询到Token...{}...准备重新登录")
if (!getToken()) {
wx.redirectTo({
url: '../login/login',
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();
this.setData({
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
active: proUserInfo.projectUserInfo.subDeptType=='1'?4:1,
subDeptUserInfo: proUserInfo.projectUserInfo,
});
//用户权限菜单
this.getUserMenuList(app.globalData.useProjectId);
this.awaitTask();
},
/**
@ -79,28 +80,8 @@ Page({
});
},
/**
* 查询单位人员信息
*/
getProSubDeptsUserInfo() {
const proUserInfo = getUserInfo();
let _act = this.data.active;
let _projectUserInfo = proUserInfo.projectUserInfo;
if(_projectUserInfo.subDeptType=='1'){
_act = 4;
}else{
if(_projectUserInfo.userPost=='1' || _projectUserInfo.userPost=='2' || _projectUserInfo.userPost=='3'){
_act = 1;
}
}
this.setData({
active:_act,
subDeptUserInfo: _projectUserInfo,
});
},
goMenu: function (event) {
wx.setStorageSync('nav-menu', "gdgn");
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: event.currentTarget.dataset.url
})
@ -118,8 +99,9 @@ Page({
});
},
//跳转到项目概况页面
//跳转到项目概况
XMGK: function () {
wx.setStorageSync('nav-menu', "xmgk");
wx.redirectTo({
url: '../project_info/index'
})
@ -127,22 +109,22 @@ Page({
//跳转到安全管理
AQGL: function () {
app.toast("正在建设中");
// wx.redirectTo({
// url:'../safety_manage/index'
// })
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({
url:'../project_safety/index'
})
},
//跳转到质量管理
ZLGL: function () {
app.toast("正在建设中");
// wx.redirectTo({
// url:'../quality_manage/index'
// })
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({
url:'../project_quality/index'
})
},
//跳转到进度管理
JDGL2: function () {
JDGL: function () {
app.toast("正在建设中");
// wx.redirectTo({
// url:'../../pageage/project_schedule/list/index'
@ -156,12 +138,15 @@ Page({
let param = "proId=" + app.globalData.useProjectId;
findMyTask(param).then(res => {
if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo;
this.setData({
todoDb: res.data.todo,
todoDb: proUserInfo.subDeptType=="1"?(res.data.dwsh+res.data.rysh):res.data.todo,
fbdwDB: res.data.dwsh,
fbrtDB: res.data.rysh,
aqyhDB: res.data.aqyh,
zlyhDB: res.data.zlyh,
aqglDb: proUserInfo.subDeptType=="1"?res.data.aqgl:0,
zlglDb: proUserInfo.subDeptType=="1"?res.data.zlgl:0,
aqyhDB: res.data.aqgl,
zlyhDB: res.data.zlgl,
})
}
});

View File

@ -18,8 +18,8 @@
</view>
<view class="max_content">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="gd_max" style="margin-top: 20rpx;">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="gd_max" style="margin-top: 20rpx;">
<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">
@ -35,87 +35,52 @@
</view>
</view>
<van-tabbar wx:if="{{subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}" 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">
<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" 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;" />
项目概况
</van-tabbar-item>
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="AQGL">
<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;"
/>
<van-tabbar-item bindtap="AQGL">
<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;" />
安全管理
<span class="tabNum" wx:if="{{aq>0}}">{{aq}}</span>
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item>
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="ZLGL">
<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;"
/>
<van-tabbar-item bindtap="ZLGL">
<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;" />
质量管理
<span class="tabNum" wx:if="{{ad>0}}">{{ad}}</span>
</van-tabbar-item>
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="JDGL2">
<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;"
/>
<span class="tabNum" wx:if="{{zhglDB>0}}">{{zhglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL">
<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;" />
进度管理
</van-tabbar-item>
<van-tabbar-item>
<image
slot="icon"
src="/images/footer_1.png"
mode="aspectFit"
style="width:40rpx; height: 40rpx;"
/>
<image
slot="icon-active"
src="/images/foot_1.png"
mode="aspectFit"
style="width:40rpx; height:40rpx;"
/>
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<van-tabbar wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK">
<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;" />
项目概况
</van-tabbar-item>
<van-tabbar-item>
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -191,18 +191,18 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
if (wx.getStorageSync('nav-menu') == "gdgn") {
if (wx.getStorageSync('nav-menu') == "xmgl") {
wx.redirectTo({
url: '../../project_more/index',
})
} else {
if (this.data.type == 1) {
wx.redirectTo({
url: '../../../../pages/quality_manage/index',
url: '../../project_quality/index',
})
} else {
wx.redirectTo({
url: '../../../../pages/quality_manage/index',
url: '../../project_safety/index',
})
}
}

View File

@ -0,0 +1,196 @@
import {
getToken,
getUserInfo
} from '../../utils/auth'
import {
findUserMenuList
} from '../../api/publics'
import {
findMyTask
} from '../../api/flowable'
import {
findGroupCountView
} from '../../api/problemmodify'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
active: 2,
projectId: '',
projectName: '',
subDeptUserInfo: {},
menuList: [],
initData: {},
aqglDb: 0,
zlyhDB: 0,
zlglDb: 0,
todoDB: 0,
checkList: [{
id: 1,
name: "日常巡检问题",
rate: 0, //整改率
total: 0, //问题总数
number: 0, //检查次数
}, {
id: 2,
name: "周检隐患问题",
rate: 0, //整改率
total: 0, //问题总数
number: 0, //检查次数
}, {
id: 3,
name: "月检隐患问题",
rate: 0, //整改率
total: 0, //问题总数
number: 0, //检查次数
}, {
id: 4,
name: "专项检查问题",
rate: 0, //整改率
total: 0, //问题总数
number: 0, //检查次数
}],
},
//项目切换 返回值
onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName;
this.onLoad();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (!getToken()) {
wx.redirectTo({
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();
this.setData({
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
subDeptUserInfo: proUserInfo.projectUserInfo,
});
//用户权限菜单
this.getUserMenuList(app.globalData.useProjectId);
this.awaitTask();
this.getGroupCountView(app.globalData.useProjectId, 1);
},
/**
* 查询功能菜单
* @param {*} proId
*/
getUserMenuList: function (proId) {
findUserMenuList(proId, 'zlgl').then(res => {
if (res.code == 200) {
this.setData({
menuList: res.data
})
}
});
},
/**
* 项目分组查询统计
* @param {*} proId
* @param {*} type
*/
getGroupCountView(proId, type) {
findGroupCountView(proId, type).then(res => {
let _checkList = this.data.checkList;
//隐患统计数据
res.data.forEach((item, idx) => {
let _index = parseInt(item.problemType - 1);
_checkList[_index].rate = (item.comTotal / item.total * 100).toFixed(2);
_checkList[_index].total = item.comTotal;
_checkList[_index].number = item.total;
});
this.setData({
checkList: _checkList
})
});
},
goMenu: function (event) {
wx.redirectTo({
url: event.currentTarget.dataset.url
})
//wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0'
//})
},
// 底部导航
onChange(event) {
// event.detail 的值为当前选中项的索引
this.setData({
active: event.detail
});
},
//跳转到项目概况
XMGK: function () {
wx.setStorageSync('nav-menu', "xmgk");
wx.redirectTo({
url: '../project_info/index'
})
},
//跳转到安全管理
AQGL: function () {
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({
url: '../project_safety/index'
})
},
//跳转到进度管理
JDGL: function () {
app.toast("正在建设中");
// wx.redirectTo({
// url:'../../pageage/project_schedule/list/index'
// })
},
//跳转到项目管理
XMGL: function () {
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: '../project_more/index'
})
},
/**
* 统计代办
*/
awaitTask() {
let param = "proId=" + app.globalData.useProjectId;
findMyTask(param).then(res => {
if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo;
this.setData({
aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
zlyhDB: res.data.zlyl,
zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo
})
}
});
},
})

View File

@ -0,0 +1,7 @@
{
"usingComponents": {
"van-tabbar": "@vant/weapp/tabbar",
"van-tabbar-item": "@vant/weapp/tabbar-item"
},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,112 @@
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="XMGK">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="3">
<user-infos></user-infos>
</van-col>
<van-col span="10">
<view class="header_name">质量管理</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="gd_max" style="margin-top: 20rpx;">
<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=='ZLYHPC' && zlyhDB>0}}">{{zlyhDB}}</span>
<image src="{{item.menuImg}}"></image>
<view>{{item.menuName}}</view>
</view>
</van-col>
</van-row>
</view>
</view>
<view class="module_max">
<view class="module_min">
<view class="module_title module_title_flex">
<view>质量隐患统计</view>
<view class="module_see_info" bindtap="goAQYH">查看详情
<van-icon name="arrow" />
</view>
</view>
<view class="safety_inspect">
<van-row>
<van-col span="12" wx:for="{{checkList}}" wx:key="index">
<view class="safety_inspect_title">{{item.name}}</view>
<safety-number number="{{item.number}}"></safety-number>
<view class="safety_prop ">
<view style="padding-right: 30rpx;">整改率</view>
<view class="safety_prop_val"><text>{{item.rate}}</text> %</view>
</view>
<view class="safety_issue">
<view class="safety_issue_number">
<view style="padding-right: 30rpx;">已整改问题数</view>
<view>{{item.total}}</view>
</view>
</view>
</van-col>
</van-row>
</view>
</view>
</view>
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK">
<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;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="AQGL">
<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;" />
安全管理
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item>
<van-tabbar-item>
<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;" />
质量管理
<span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL">
<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;" />
进度管理
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<van-tabbar wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK">
<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;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -0,0 +1,27 @@
.more_max {
padding: 10rpx 30rpx 30rpx;
}
.more_manage {
border-radius: 10rpx;
margin-top: 50rpx;
}
.gd_max {
padding: 10rpx 50rpx 0;
}
.gd_min {
padding: 30rpx 0;
text-align: center;
}
.gd_min image {
width: 150rpx;
height: 150rpx;
}
.gd_min view {
padding: 10rpx;
color: #89a4eb;
}

View File

@ -0,0 +1,195 @@
import {
getToken,
getUserInfo
} from '../../utils/auth'
import {
findUserMenuList
} from '../../api/publics'
import {
findMyTask
} from '../../api/flowable'
import {
findGroupCountView
} from '../../api/problemmodify'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
active: 1,
projectId: '',
projectName: '',
subDeptUserInfo: {},
menuList: [],
initData: {},
aqyhDB: 0,
aqglDB: 0,
zlglDB: 0,
todoDB: 0,
checkList: [{
id:1,
name: "日常巡检问题",
rate: 0, //整改率
total: 0, //问题总数
number: 0, //检查次数
},{
id:2,
name: "周检隐患问题",
rate: 0, //整改率
total: 0, //问题总数
number: 0, //检查次数
},{
id:3,
name: "月检隐患问题",
rate: 0, //整改率
total: 0, //问题总数
number: 0, //检查次数
},{
id:4,
name: "专项检查问题",
rate: 0, //整改率
total: 0, //问题总数
number: 0, //检查次数
}],
},
//项目切换 返回值
onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName;
this.onLoad();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (!getToken()) {
wx.redirectTo({
url: '../../login/login',
})
}
const proUserInfo = getUserInfo();
this.setData({
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
subDeptUserInfo: proUserInfo.projectUserInfo,
});
//用户权限菜单
this.getUserMenuList(app.globalData.useProjectId);
this.awaitTask();
this.getGroupCountView(app.globalData.useProjectId, 0);
},
/**
* 查询功能菜单
* @param {*} proId
*/
getUserMenuList: function (proId) {
findUserMenuList(proId, 'aqgl').then(res => {
if (res.code == 200) {
this.setData({
menuList: res.data
})
}
});
},
/**
* 项目分组查询统计
* @param {*} proId
* @param {*} type
*/
getGroupCountView(proId, type) {
findGroupCountView(proId, type).then(res => {
let _checkList = this.data.checkList;
//隐患统计数据
res.data.forEach((item, idx) => {
let _index = parseInt(item.problemType - 1);
_checkList[_index].rate = (item.comTotal / item.total * 100).toFixed(2);
_checkList[_index].total = item.comTotal;
_checkList[_index].number = item.total;
});
this.setData({
checkList: _checkList
})
});
},
goMenu: function (event) {
wx.redirectTo({
url: event.currentTarget.dataset.url
})
//wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0'
//})
},
// 底部导航
onChange(event) {
// event.detail 的值为当前选中项的索引
this.setData({
active: event.detail
});
},
//跳转到项目概况
XMGK: function () {
wx.setStorageSync('nav-menu', "xmgk");
wx.redirectTo({
url: '../project_info/index'
})
},
//跳转到质量管理
ZLGL: function () {
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({
url: '../project_quality/index'
})
},
//跳转到进度管理
JDGL: function () {
app.toast("正在建设中");
// wx.redirectTo({
// url:'../../pageage/project_schedule/list/index'
// })
},
//跳转到项目管理
XMGL: function () {
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: '../project_more/index'
})
},
/**
* 统计代办
*/
awaitTask() {
let param = "proId=" + app.globalData.useProjectId;
findMyTask(param).then(res => {
if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo;
this.setData({
aqyhDB: res.data.aqyh,
aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo
})
}
});
},
})

View File

@ -0,0 +1,7 @@
{
"usingComponents": {
"van-tabbar": "@vant/weapp/tabbar",
"van-tabbar-item": "@vant/weapp/tabbar-item"
},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,112 @@
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="XMGK">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="3">
<user-infos></user-infos>
</van-col>
<van-col span="10">
<view class="header_name">安全管理</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="gd_max" style="margin-top: 20rpx;">
<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=='AQYHPC' && aqyhDB>0}}">{{aqyhDB}}</span>
<image src="{{item.menuImg}}"></image>
<view>{{item.menuName}}</view>
</view>
</van-col>
</van-row>
</view>
</view>
<view class="module_max">
<view class="module_min">
<view class="module_title module_title_flex">
<view>安全隐患统计</view>
<view class="module_see_info" bindtap="goAQYH">查看详情
<van-icon name="arrow" />
</view>
</view>
<view class="safety_inspect">
<van-row>
<van-col span="12" wx:for="{{checkList}}" wx:key="index">
<view class="safety_inspect_title">{{item.name}}</view>
<safety-number number="{{item.number}}"></safety-number>
<view class="safety_prop ">
<view style="padding-right: 30rpx;">整改率</view>
<view class="safety_prop_val"><text>{{item.rate}}</text> %</view>
</view>
<view class="safety_issue">
<view class="safety_issue_number">
<view style="padding-right: 30rpx;">已整改问题数</view>
<view>{{item.total}}</view>
</view>
</view>
</van-col>
</van-row>
</view>
</view>
</view>
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK">
<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;" />
项目概况
</van-tabbar-item>
<van-tabbar-item>
<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;" />
安全管理
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="ZLGL">
<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;" />
质量管理
<span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL">
<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;" />
进度管理
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<van-tabbar wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK">
<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;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -0,0 +1,27 @@
.more_max {
padding: 10rpx 30rpx 30rpx;
}
.more_manage {
border-radius: 10rpx;
margin-top: 50rpx;
}
.gd_max {
padding: 10rpx 50rpx 0;
}
.gd_min {
padding: 30rpx 0;
text-align: center;
}
.gd_min image {
width: 150rpx;
height: 150rpx;
}
.gd_min view {
padding: 10rpx;
color: #89a4eb;
}