YZProjectCloud/yanzhu-ui-app/miniprogram/pageage/project_info/index.js

678 lines
16 KiB
JavaScript
Raw Normal View History

2025-09-22 15:17:59 +08:00
import config from "../../config";
import { getToken, getUserInfo } from "../../utils/auth";
import { findUserMenuList } from "../../api/publics";
import { findProjectInfo, findProjectDepts } from "../../api/project";
2025-05-18 10:49:52 +08:00
import {
2025-08-06 10:40:52 +08:00
findSubDeptsUsers,
findDaysAttendanceView,
findUsersAttendanceView,
2025-09-22 15:17:59 +08:00
findSubDeptsAttendanceView,
} from "../api/attendance";
import { findMyTask } from "../api/flowable";
2025-05-18 10:49:52 +08:00
const app = getApp();
Page({
2025-08-06 10:40:52 +08:00
/**
* 页面的初始数据
*/
data: {
title: "项目详情",
activeNames: ["base"],
//项目信息
projectInfo: {},
projectDeptsList: [],
2025-09-22 15:17:59 +08:00
deptTypes: [
{
name: "建设单位",
iconSrc: config.baseImgUrl + "/profile/static/icon/WEB_jsdw.png",
},
{
name: "监理单位",
iconSrc: config.baseImgUrl + "/profile/static/icon/WEB_jldw.png",
},
{
name: "设计单位",
iconSrc: config.baseImgUrl + "/profile/static/icon/WEB_sjdw.png",
},
{
name: "检测单位",
iconSrc: config.baseImgUrl + "/profile/static/icon/WEB_jcjg.png",
},
{
name: "勘察单位",
iconSrc: config.baseImgUrl + "/profile/static/icon/web_ktdw.png",
},
{
name: "总包单位",
iconSrc: config.baseImgUrl + "/profile/static/icon/web_zbdw.png",
},
],
2025-08-06 10:40:52 +08:00
active: 0,
2025-09-22 15:17:59 +08:00
projectId: "",
projectName: "",
2025-08-06 10:40:52 +08:00
initData: {},
aqglDb: 0,
zlglDb: 0,
todoDb: 0,
nactive: 0,
2025-09-22 15:17:59 +08:00
labourData: [
{
name: "管理人员",
total: 0,
unit: "人",
yesMonitor: 180,
},
{
name: "劳务人员",
yesMonitor: 0,
total: 0,
unit: "人",
},
{
name: "特殊工种",
yesMonitor: 0,
total: 0,
unit: "人",
},
2025-08-06 10:40:52 +08:00
],
labourDataList: [],
2025-09-22 15:17:59 +08:00
labourDays: [
{
name: "管理人员",
total: 0,
unit: "人",
yesMonitor: 180,
},
{
name: "劳务人员",
yesMonitor: 0,
total: 0,
unit: "人",
},
{
name: "特殊工种",
yesMonitor: 0,
total: 0,
unit: "人",
},
2025-08-06 10:40:52 +08:00
],
labourDaysTotal: 0,
2025-09-22 15:17:59 +08:00
labourImg: config.baseImgUrl + "/cdn/appimgs/zgry.png",
2025-08-06 10:40:52 +08:00
labourName: "在岗人员",
labourTotal: 0,
2025-09-22 15:17:59 +08:00
labourTypeList: [
{
name: "在岗人员",
total: 0,
img: config.baseImgUrl + "/cdn/appimgs/zgry.png",
},
{
name: "离岗人员",
total: 0,
img: config.baseImgUrl + "/cdn/appimgs/rylg.png",
},
],
2025-08-06 10:40:52 +08:00
animation: true,
animationData: {},
labourDatas: {
2025-09-22 15:17:59 +08:00
unit: "人",
legend: ["出勤人数", "当前在岗"],
color: ["#2e6ed0", "#fb9300"],
Xdata: ["01-01", "01-02", "01-03", "01-04", "01-05", "01-06", "01-07"],
2025-08-06 10:40:52 +08:00
Ydata: [
[0, 0, 0, 0, 0, 0, 0],
2025-09-22 15:17:59 +08:00
[0, 0, 0, 0, 0, 0, 0],
],
2025-08-06 10:40:52 +08:00
},
switchChart: false,
attendanceListData: [],
subDeptUserInfo: {},
2025-09-22 15:17:59 +08:00
imgBaseUrl: config.baseImgUrl,
menuList: [],
baseImgUrl: config.baseImgUrl,
2025-08-06 10:40:52 +08:00
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (!getToken()) {
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url: "../../pages/login/login",
});
2025-08-06 10:40:52 +08:00
}
2025-09-22 15:17:59 +08:00
wx.setStorageSync("nav-menu", "xmgk");
2025-08-06 10:40:52 +08:00
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,
},
2025-09-22 15:17:59 +08:00
subDeptUserInfo: proUserInfo.projectUserInfo,
2025-08-06 10:40:52 +08:00
});
//项目基本信息
this.getProjectInfo(app.globalData.useProjectId);
//用户项目信息
this.getProUserDatas();
//项目建设单位
this.getProjectDepts(app.globalData.useProjectId);
2025-09-22 15:17:59 +08:00
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,
});
2025-08-06 10:40:52 +08:00
},
/**
* 统计劳务人员信息
2025-09-22 15:17:59 +08:00
* @param {*} proId
2025-08-06 10:40:52 +08:00
*/
getSubDeptsUsers(proId) {
2025-09-22 15:17:59 +08:00
findSubDeptsUsers(proId).then((res) => {
2025-08-06 10:40:52 +08:00
if (res.code == 200) {
let zg = 0;
let lg = 0;
2025-09-22 15:17:59 +08:00
res.data.forEach((item) => {
if (item.useStatus == "0") {
2025-08-06 10:40:52 +08:00
zg += item.total;
} else {
lg += item.total;
}
});
2025-05-18 10:49:52 +08:00
this.setData({
2025-08-06 10:40:52 +08:00
"labourTypeList[0].total": zg,
"labourTypeList[1].total": lg,
labourTotal: zg,
2025-09-22 15:17:59 +08:00
labourDataList: res.data || [],
});
2025-08-06 10:40:52 +08:00
this.initSubDeptUsersCharts();
}
});
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 初始化动画
*/
initAnimationData() {
var animation = wx.createAnimation({
duration: 1000,
2025-09-22 15:17:59 +08:00
timingFunction: "linear",
});
2025-08-06 10:40:52 +08:00
this.animation = animation;
if (this.data.animation) {
animation.translateY(-8).step();
} else {
animation.translateY(8).step();
}
this.setData({
animation: this.data.animation ? false : true,
2025-09-22 15:17:59 +08:00
animationData: animation.export(),
});
2025-08-06 10:40:52 +08:00
setTimeout(() => {
this.initAnimationData();
2025-09-22 15:17:59 +08:00
}, 1200);
2025-08-06 10:40:52 +08:00
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 初始化统计图表
*/
initSubDeptUsersCharts() {
let labourDataList = this.data.labourDataList;
if (labourDataList.length > 0) {
let gl = 0;
let ts = 0;
let lw = 0;
2025-09-22 15:17:59 +08:00
labourDataList.forEach((item) => {
2025-08-06 10:40:52 +08:00
if (this.data.nactive == 0) {
2025-09-22 15:17:59 +08:00
if (item.useStatus == "0") {
if (item.craftType == "2") {
2025-08-06 10:40:52 +08:00
ts += item.total;
2025-09-22 15:17:59 +08:00
} else if (item.craftType == "3") {
2025-08-06 10:40:52 +08:00
gl += item.total;
} else {
lw += item.total;
2025-05-18 10:49:52 +08:00
}
2025-08-06 10:40:52 +08:00
}
} else {
2025-09-22 15:17:59 +08:00
if (item.useStatus != "0") {
if (item.craftType == "2") {
2025-08-06 10:40:52 +08:00
ts += item.total;
2025-09-22 15:17:59 +08:00
} else if (item.craftType == "3") {
2025-08-06 10:40:52 +08:00
gl += item.total;
} else {
lw += item.total;
2025-05-18 10:49:52 +08:00
}
2025-08-06 10:40:52 +08:00
}
}
});
this.setData({
"labourData[0].total": gl,
"labourData[0].yesMonitor": gl,
"labourData[1].total": ts,
"labourData[1].yesMonitor": ts,
"labourData[2].total": lw,
"labourData[2].yesMonitor": lw,
2025-09-22 15:17:59 +08:00
labourTotal: this.data.labourTypeList[this.data.nactive].total,
});
2025-08-06 10:40:52 +08:00
if (this.data.switchChart) {
let chats = this.selectComponent("#userChart");
chats.initChart();
}
}
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 初始化
* 今日考勤
2025-09-22 15:17:59 +08:00
* @param {*} proId
2025-08-06 10:40:52 +08:00
*/
initSubDeptDaysCharts(proId) {
2025-09-22 15:17:59 +08:00
findDaysAttendanceView(proId).then((res) => {
2025-08-06 10:40:52 +08:00
if (res.code == 200) {
let gl = 0;
let ts = 0;
let lw = 0;
2025-09-22 15:17:59 +08:00
res.data.forEach((item) => {
if (item.craftType == "2") {
2025-08-06 10:40:52 +08:00
ts += item.total;
2025-09-22 15:17:59 +08:00
} else if (item.craftType == "3") {
2025-08-06 10:40:52 +08:00
gl += item.total;
} else {
lw += item.total;
}
});
this.setData({
"labourDays[0].total": gl,
"labourDays[0].yesMonitor": gl,
"labourDays[1].total": ts,
"labourDays[1].yesMonitor": ts,
"labourDays[2].total": lw,
"labourDays[2].yesMonitor": lw,
2025-09-22 15:17:59 +08:00
labourDaysTotal: gl + ts + lw,
});
2025-08-06 10:40:52 +08:00
if (this.data.switchChart) {
let chats = this.selectComponent("#attsChart");
chats.initChart();
}
}
});
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 统计
* 最近出勤信息
2025-09-22 15:17:59 +08:00
* @param {*} proId
2025-08-06 10:40:52 +08:00
*/
getSubDeptsAttendanceView(proId) {
2025-09-22 15:17:59 +08:00
findSubDeptsAttendanceView(proId).then((res) => {
2025-08-06 10:40:52 +08:00
if (res.code == 200) {
let xd = [];
let yd1 = [];
let yd2 = [];
2025-09-22 15:17:59 +08:00
res.data.list.forEach((item) => {
2025-08-06 10:40:52 +08:00
xd.push(item.attendanceTime);
yd1.push(item.total);
});
if (xd.length < 7) {
let n = 7 - xd.length;
for (let i = 0; i < n; i++) {
2025-09-22 15:17:59 +08:00
xd.push("-");
2025-08-06 10:40:52 +08:00
yd1.push(0);
}
2025-05-18 10:49:52 +08:00
}
2025-08-06 10:40:52 +08:00
for (let y = 0; y < 7; y++) {
yd2.push(res.data.user);
2025-05-18 10:49:52 +08:00
}
2025-08-06 10:40:52 +08:00
let yd = [];
yd.push(yd1);
yd.push(yd2);
this.setData({
"labourDatas.Xdata": xd,
2025-09-22 15:17:59 +08:00
"labourDatas.Ydata": yd,
2025-08-06 10:40:52 +08:00
});
if (this.data.switchChart) {
let chats = this.selectComponent("#chartBar");
chats.initChart();
2025-05-18 10:49:52 +08:00
}
2025-08-06 10:40:52 +08:00
}
});
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 查询用户考勤
2025-09-22 15:17:59 +08:00
* @param {*} proId
2025-08-06 10:40:52 +08:00
*/
getUsersAttendanceView(proId) {
2025-09-22 15:17:59 +08:00
findUsersAttendanceView(proId).then((res) => {
2025-08-06 10:40:52 +08:00
if (res.code == 200) {
2025-05-18 10:49:52 +08:00
this.setData({
2025-09-22 15:17:59 +08:00
attendanceListData: res.data,
2025-05-18 10:49:52 +08:00
});
2025-08-06 10:40:52 +08:00
}
2025-09-22 15:17:59 +08:00
});
2025-08-06 10:40:52 +08:00
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 单位人员信息
2025-09-22 15:17:59 +08:00
* @param {*} proId
2025-08-06 10:40:52 +08:00
*/
getProUserDatas() {
//劳务人员信息
2025-09-22 15:17:59 +08:00
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"
) {
2025-08-06 10:40:52 +08:00
//统计劳务人员信息
this.getSubDeptsUsers(app.globalData.useProjectId);
this.initSubDeptDaysCharts(app.globalData.useProjectId);
}
this.awaitTask();
//今日出勤信息
2025-09-22 15:17:59 +08:00
if (app.globalData.subDeptUserData.subDeptType == "1") {
2025-08-06 10:40:52 +08:00
this.getSubDeptsAttendanceView(app.globalData.useProjectId);
}
//人员出勤信息
2025-09-22 15:17:59 +08:00
if (
app.globalData.subDeptUserData.userPost == "4" ||
app.globalData.subDeptUserData.userPost == "5" ||
app.globalData.subDeptUserData.userPost == "6" ||
app.globalData.subDeptUserData.userPost == "8"
) {
2025-08-06 10:40:52 +08:00
//统计劳务人员信息
this.getUsersAttendanceView(app.globalData.useProjectId);
}
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 查询公众号消息授权
*/
reUserOpenMsgId() {
let userInfos = this.selectComponent("#userInfos");
userInfos.loadUserInfo();
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
// 底部导航
onChange(event) {
// event.detail 的值为当前选中项的索引
this.setData({
2025-09-22 15:17:59 +08:00
active: event.detail,
2025-08-06 10:40:52 +08:00
});
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 初始化曲线图表
*/
initLabourDatas() {
findGroupAllByDays({
2025-09-22 15:17:59 +08:00
projectId: app.globalData.projectId,
}).then((res) => {
2025-08-06 10:40:52 +08:00
if (res.code == 200) {
let xd = [];
let yd1 = [];
let yd2 = [];
2025-09-22 15:17:59 +08:00
res.data.list.forEach((item) => {
2025-08-06 10:40:52 +08:00
xd.push(item.attendanceTime);
yd1.push(item.total);
});
if (xd.length < 7) {
let n = 7 - xd.length;
for (let i = 0; i < n; i++) {
2025-09-22 15:17:59 +08:00
xd.push("");
2025-08-06 10:40:52 +08:00
yd1.push(0);
}
2025-06-28 15:40:18 +08:00
}
2025-08-06 10:40:52 +08:00
for (let y = 0; y < 7; y++) {
yd2.push(res.data.user);
}
let yd = [];
yd.push(yd1);
yd.push(yd2);
2025-05-18 10:49:52 +08:00
this.setData({
2025-08-06 10:40:52 +08:00
"labourDatas.Xdata": xd,
2025-09-22 15:17:59 +08:00
"labourDatas.Ydata": yd,
2025-05-18 10:49:52 +08:00
});
2025-08-06 10:40:52 +08:00
if (this.data.switchChart) {
let chats = this.selectComponent("#chartBar");
chats.initChart();
}
}
});
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 查询项目详情
2025-09-22 15:17:59 +08:00
* @param {*} proId
2025-08-06 10:40:52 +08:00
*/
getProjectInfo: function (proId) {
2025-09-22 15:17:59 +08:00
findProjectInfo(proId).then((res) => {
2025-08-06 10:40:52 +08:00
if (res.data.scheduledStartTime) {
res.data.scheduledStartTime = res.data.scheduledStartTime.split("T")[0];
} else {
res.data.scheduledStartTime = " - ";
}
if (res.data.actualOperatingTime) {
2025-09-22 15:17:59 +08:00
res.data.actualOperatingTime =
res.data.actualOperatingTime.split("T")[0];
2025-08-06 10:40:52 +08:00
} else {
res.data.actualOperatingTime = " - ";
}
if (res.data.plannedCompletionTime) {
2025-09-22 15:17:59 +08:00
res.data.plannedCompletionTime =
res.data.plannedCompletionTime.split("T")[0];
2025-08-06 10:40:52 +08:00
} else {
res.data.plannedCompletionTime = " - ";
}
// let list = [];
// res.data.projectDeptsList.forEach(item => {
// let typeItem = this.data.deptTypes.filter((v) => v.name == item.deptType);
// if(typeItem.length>0){
// item.iconSrc = typeItem[0].iconSrc;
// }
// list.push(item);
// });
this.setData({
projectInfo: res.data,
2025-09-22 15:17:59 +08:00
projectDeptsList: res.data.projectDeptsList,
});
2025-08-06 10:40:52 +08:00
});
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 查询
* 项目建设单位
2025-09-22 15:17:59 +08:00
* @param {*} proId
2025-08-06 10:40:52 +08:00
*/
getProjectDepts: function (proId) {
2025-09-22 15:17:59 +08:00
findProjectDepts(proId).then((res) => {
2025-08-06 10:40:52 +08:00
this.setData({
2025-09-22 15:17:59 +08:00
projectDeptsList: res.data,
});
2025-08-06 10:40:52 +08:00
});
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
// 页签选中事件
selectedTab(e) {
if (e.target.dataset.set !== undefined) {
this.setData({
nactive: e.target.dataset.set,
labourImg: this.data.labourTypeList[e.target.dataset.set].img,
2025-09-22 15:17:59 +08:00
});
2025-08-06 10:40:52 +08:00
this.initSubDeptUsersCharts();
}
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
//项目切换 返回值
onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName;
this.setData({
2025-09-22 15:17:59 +08:00
switchChart: true,
});
2025-08-06 10:40:52 +08:00
this.onLoad();
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
// 手风琴
onCollChange(event) {
this.setData({
activeNames: event.detail,
});
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 拨打电话
2025-09-22 15:17:59 +08:00
* @param {*} event
2025-08-06 10:40:52 +08:00
*/
calling: function (event) {
let callPhone = event.currentTarget.dataset.phone;
wx.makePhoneCall({
phoneNumber: callPhone,
success: function () {
2025-09-22 15:17:59 +08:00
console.log("拨打电话成功!");
2025-08-06 10:40:52 +08:00
},
fail: function () {
2025-09-22 15:17:59 +08:00
console.log("拨打电话失败!");
},
});
2025-08-06 10:40:52 +08:00
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
showImg: function (e) {
let paths = e.target.dataset.set;
let path = [];
2025-09-22 15:17:59 +08:00
paths.split(",").forEach((url) => {
2025-08-06 10:40:52 +08:00
path.push(config.baseImgUrl + url);
});
wx.previewImage({
urls: path,
2025-09-22 15:17:59 +08:00
current: path[0],
});
2025-08-06 10:40:52 +08:00
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 劳务管理查看详细
*/
goLWGL: function () {
if (this.data.nactive == 2) {
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url: "../../pageage/project_attendance/project_attendanceData/list/index",
});
2025-08-06 10:40:52 +08:00
} else {
let type;
if (this.data.nactive == 0) {
type = 1;
} else {
type = 2;
}
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url:
"../../pageage/project_attendance/project_attendanceUser/list/index?type=" +
type,
});
2025-08-06 10:40:52 +08:00
}
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
/**
* 最近出勤
*/
goZJCQ: function () {
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url: "../../pageage/project_attendance/project_attendanceData/list/index",
});
2025-08-06 10:40:52 +08:00
},
2025-05-18 10:49:52 +08:00
2025-08-06 10:40:52 +08:00
//跳转到安全管控
XMSP: function () {
2025-09-22 15:17:59 +08:00
wx.setStorageSync("nav-menu", "aqgl");
2025-08-06 10:40:52 +08:00
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url: "../project_safety/index",
});
2025-08-06 10:40:52 +08:00
},
//跳转到质量管理
ZLGL: function () {
2025-09-22 15:17:59 +08:00
wx.setStorageSync("nav-menu", "zlgl");
2025-08-06 10:40:52 +08:00
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url: "../project_quality/index",
});
2025-08-06 10:40:52 +08:00
},
//跳转到进度管理
JDGL: function () {
2025-09-22 15:17:59 +08:00
wx.setStorageSync("nav-menu", "xmgk");
2025-08-06 10:40:52 +08:00
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url: "../project_schedule/list/index",
});
2025-08-06 10:40:52 +08:00
},
//跳转到项目管理
XMGL: function () {
2025-09-22 15:17:59 +08:00
wx.setStorageSync("nav-menu", "xmgl");
2025-08-06 10:40:52 +08:00
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url: "../project_more/index",
});
2025-08-06 10:40:52 +08:00
},
//跳转到项目列表
XMLB: function () {
wx.redirectTo({
2025-09-22 15:17:59 +08:00
url: "../project_list/index",
});
2025-08-06 10:40:52 +08:00
},
/**
* 统计代办
*/
awaitTask() {
let param = "proId=" + app.globalData.useProjectId;
2025-09-22 15:17:59 +08:00
findMyTask(param).then((res) => {
2025-08-06 10:40:52 +08:00
if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo;
this.setData({
2025-09-22 15:17:59 +08:00
todoDb:
proUserInfo.subDeptType == "1"
? res.data.dwsh + res.data.rysh
: res.data.todo,
2025-08-06 10:40:52 +08:00
aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
2025-09-22 15:17:59 +08:00
zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
});
2025-08-06 10:40:52 +08:00
}
});
},
2025-09-22 15:17:59 +08:00
});