|
|
@@ -368,7 +368,7 @@ export default {
|
|
|
},
|
|
|
getName ({ createBy, updateBy }) {
|
|
|
const id = updateBy || createBy
|
|
|
- const { name = '' } = this.$store.getters
|
|
|
+ const { name = '' } = this.$store.getters || {}
|
|
|
if (this.activeTab === 'finish') {
|
|
|
const t = this.userList.find(i => i.userId === id)
|
|
|
return t ? t.userName : ''
|
|
|
@@ -397,6 +397,13 @@ export default {
|
|
|
result.deptName = deptNames.join(',')
|
|
|
return result[arg]
|
|
|
},
|
|
|
+ getDept (v, arg = 'positionName') {
|
|
|
+ if (!v) {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ const t = this.deptList.find(i => i.positionId === v)
|
|
|
+ return t ? t[arg] : ''
|
|
|
+ },
|
|
|
tableRowClassName ({ row, rowIndex }) {
|
|
|
if (rowIndex % 2 === 1) return 'warning-row'
|
|
|
return 'success-row'
|
|
|
@@ -583,6 +590,7 @@ export default {
|
|
|
// 截取流程名
|
|
|
item.workName = item.subject.includes('#') ? item.subject.split('#')[0] : item.subject.split('(')[0]
|
|
|
item.workType = this.plan.includes(item.procDefKey) ? 'plan' : 'normal'
|
|
|
+ item.deptId = this.getAttr(item.subject, 'dept')
|
|
|
const limit = this.getAttr(item.subject, 'loseDate') || this.getAttr(item.subject, 'timeLimit')
|
|
|
const isExpire = this.judgeExpire(item.createTime, currentTime, item.workType, limit)
|
|
|
if (isExpire) {
|
|
|
@@ -602,7 +610,14 @@ export default {
|
|
|
this.dealUnexpile(result.all, noticeList)
|
|
|
}
|
|
|
},
|
|
|
- // 判断是否过期、获取办理状态
|
|
|
+ /**
|
|
|
+ * 判断是否过期、获取办理状态
|
|
|
+ * @param {string} time 比较时间
|
|
|
+ * @param {number} current 当前时间戳
|
|
|
+ * @param {string} type 事务类型
|
|
|
+ * @param {string} limit 限时,值分为两种类型,传值为字符串格式的时间时,判定逻辑为当前时间小于该时间,传值为字符串类型数字时,判定逻辑为创建limit天后,大于当前时间
|
|
|
+ * @param {string} isState 调用类型
|
|
|
+ */
|
|
|
judgeExpire (time, current, type, limit, isState) {
|
|
|
const D = new Date(time)
|
|
|
const a = new Date(time).getTime()
|
|
|
@@ -629,7 +644,7 @@ export default {
|
|
|
}
|
|
|
// 返回是否过期
|
|
|
if (isDate) {
|
|
|
- return b > new Date(l).getTime()
|
|
|
+ return b + (86400000 * 7) > new Date(l).getTime()
|
|
|
}
|
|
|
if (type === 'plan') {
|
|
|
return b + (86400000 * 7) > c
|
|
|
@@ -645,7 +660,7 @@ export default {
|
|
|
const addList = []
|
|
|
const sendList = []
|
|
|
const msgContent = {
|
|
|
- plan: '距离过期还剩七天,请及时处理!',
|
|
|
+ plan: '距离超时还剩七天,请及时处理!',
|
|
|
normal: '至今三天未处理,已超时,请及时处理!'
|
|
|
}
|
|
|
const msgTitle = {
|
|
|
@@ -653,6 +668,7 @@ export default {
|
|
|
normal: '事务超时提醒'
|
|
|
}
|
|
|
const nowTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
|
|
|
+ // console.log(data)
|
|
|
data.forEach(item => {
|
|
|
const isExist = !!noticeList.find(i => i.taskId === item.taskId)
|
|
|
// 筛选出不存在于主管提醒表的过期数据
|
|
|
@@ -675,11 +691,10 @@ export default {
|
|
|
chu_li_ren_ming_: item.ownerName,
|
|
|
chu_li_ren_id_: this.getInfoByName(item.ownerName, 'id'),
|
|
|
chu_li_ren_dian_h: this.getInfoByName(item.ownerName, 'phone'),
|
|
|
- bu_men_: this.orgInfo.orgName,
|
|
|
- bu_men_id_: this.orgInfo.groupID,
|
|
|
- // 主管ID与当前用户id相等时将主管ID设置为主任【】的ID,主管电话设为空
|
|
|
- zhu_guan_id_: this.orgInfo.id === userId ? '990927120278487040' : this.orgInfo.id,
|
|
|
- zhu_guan_dian_hua: this.orgInfo.id === userId ? '' : this.orgInfo.mobile,
|
|
|
+ bu_men_: this.getDept(item.deptId),
|
|
|
+ bu_men_id_: item.deptId,
|
|
|
+ zhu_guan_id_: this.getDept(item.deptId, 'managerId'),
|
|
|
+ zhu_guan_dian_hua: this.getInfoByName(this.getDept(item.deptId, 'manager'), 'phone'),
|
|
|
bian_zhi_shi_jian: item.createTime,
|
|
|
ti_xing_ci_shu_: 1,
|
|
|
duan_xin_ci_shu_: 0,
|