|
|
@@ -56,7 +56,13 @@ Page({
|
|
|
id: v.departmentid,
|
|
|
text: v.depname,
|
|
|
children: v.hr.map(value => {
|
|
|
- const text = value.position ? value.name + ` (${value.position})` : value.name
|
|
|
+ const text = value.position ? value.name + ` (${value.position})` : value.name;
|
|
|
+ if (value.hrid == wx.getStorageSync('userMsg').hrid) this.setData({
|
|
|
+ hrid: value.hrid,
|
|
|
+ activeId: value.hrid,
|
|
|
+ text: value.name,
|
|
|
+ showText: value.name
|
|
|
+ })
|
|
|
return {
|
|
|
id: value.hrid,
|
|
|
text
|
|
|
@@ -73,16 +79,12 @@ Page({
|
|
|
getYear(init = false) {
|
|
|
/* 获取年份 */
|
|
|
_Http.basic({
|
|
|
- "classname": "sysmanage.develop.optiontype.optiontype",
|
|
|
- "method": "optiontypeselect",
|
|
|
+ "id": 20230728090204,
|
|
|
"content": {
|
|
|
- pageSize: 999,
|
|
|
- "typename": 'targetyearofpersonal',
|
|
|
- "parameter": {
|
|
|
- "siteid": wx.getStorageSync('siteP').siteid
|
|
|
- }
|
|
|
+ "targettype": "人员目标"
|
|
|
}
|
|
|
}).then(res => {
|
|
|
+ console.log("人员开启年度", res)
|
|
|
if (res.msg != '成功') return wx.showToast({
|
|
|
title: res.msg,
|
|
|
icon: "none"
|
|
|
@@ -96,17 +98,12 @@ Page({
|
|
|
})
|
|
|
/* 获取年份 */
|
|
|
_Http.basic({
|
|
|
- "classname": "sysmanage.develop.optiontype.optiontype",
|
|
|
- "method": "optiontypeselect",
|
|
|
+ "id": 20230728090204,
|
|
|
"content": {
|
|
|
- pageSize: 999,
|
|
|
- "typename": 'targetyearofproject',
|
|
|
- "parameter": {
|
|
|
- "siteid": wx.getStorageSync('siteP').siteid
|
|
|
- }
|
|
|
+ "targettype": "项目目标"
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- console.log('项目分类', res)
|
|
|
+ console.log('项目开启年度', res)
|
|
|
if (res.msg != '成功') return wx.showToast({
|
|
|
title: res.msg,
|
|
|
icon: "none"
|
|
|
@@ -216,12 +213,13 @@ Page({
|
|
|
//绘制线图
|
|
|
this.selectComponent("#line").render(lineData);
|
|
|
// this.selectComponent("#histogram").render(histogram);
|
|
|
+
|
|
|
this.setData({
|
|
|
targetYear: {
|
|
|
yl: res.data.y1l,
|
|
|
yh: res.data.y1h,
|
|
|
ya: res.data.y1a,
|
|
|
- jl: (res.data.y1a == 0 && res.data.y1l == 0) ? '0.00%' : res.data.y1l == 0 ? res.data.y1a + '%' : (res.data.y1a / res.data.y1l * 100).toFixed(2) + '%'
|
|
|
+ jl: (res.data.y1a == 0 || res.data.y1l == 0) ? '0.00%' : res.data.y1l == 0 ? res.data.y1a + '%' : (res.data.y1a / res.data.y1l * 100).toFixed(2) + '%'
|
|
|
}
|
|
|
});
|
|
|
if (this.data.year == this.data.content.year) {
|
|
|
@@ -237,13 +235,13 @@ Page({
|
|
|
sl: res.data[`s${s}l`],
|
|
|
sh: res.data[`s${s}h`],
|
|
|
sa: res.data[`s${s}a`],
|
|
|
- jl: (res.data[`s${s}a`] == 0 && res.data[`s${s}l`] == 0) ? '0.00%' : res.data[`s${s}l`] == 0 ? res.data[`s${s}a`] + '%' : (res.data[`s${s}a`] / res.data[`s${s}l`] * 100).toFixed(2) + '%'
|
|
|
+ jl: (res.data[`s${s}a`] == 0 || res.data[`s${s}l`] == 0) ? '0.00%' : res.data[`s${s}l`] == 0 ? res.data[`s${s}a`] + '%' : (res.data[`s${s}a`] / res.data[`s${s}l`] * 100).toFixed(2) + '%'
|
|
|
},
|
|
|
targetMonth: {
|
|
|
ml: res.data[`m${m}l`],
|
|
|
mh: res.data[`m${m}h`],
|
|
|
ma: res.data[`m${m}a`],
|
|
|
- jl: (res.data[`m${m}a`] == 0 && res.data[`m${m}l`] == 0) ? '0.00%' : res.data[`m${m}l`] == 0 ? res.data[`m${m}a`] + '%' : (res.data[`m${m}a`] / res.data[`m${m}l`] * 100).toFixed(2) + '%'
|
|
|
+ jl: (res.data[`m${m}a`] == 0 || res.data[`m${m}l`] == 0) ? '0.00%' : res.data[`m${m}l`] == 0 ? res.data[`m${m}a`] + '%' : (res.data[`m${m}a`] / res.data[`m${m}l`] * 100).toFixed(2) + '%'
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -318,8 +316,6 @@ Page({
|
|
|
"content.targettype": detail.title == '业绩目标' ? '人员目标' : '项目目标',
|
|
|
active: detail.title
|
|
|
});
|
|
|
- console.log(123)
|
|
|
this.getData();
|
|
|
- },
|
|
|
- onShareAppMessage() {}
|
|
|
+ }
|
|
|
})
|