mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-16 14:12:51 +00:00
feat: 可点击标注图标查看标注人员
This commit is contained in:
parent
4430d85242
commit
04acd7c56d
4
resources/assets/js/functions/web.js
vendored
4
resources/assets/js/functions/web.js
vendored
@ -905,6 +905,10 @@ import {convertLocalResourcePath} from "../components/Replace/utils";
|
|||||||
$A.Message.success($A.L(msg));
|
$A.Message.success($A.L(msg));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
messageInfo(msg) {
|
||||||
|
$A.Message.info($A.L(msg));
|
||||||
|
},
|
||||||
|
|
||||||
messageWarning(msg) {
|
messageWarning(msg) {
|
||||||
if (msg === false) {
|
if (msg === false) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -1074,19 +1074,7 @@ export default {
|
|||||||
this.__notificationId = id;
|
this.__notificationId = id;
|
||||||
//
|
//
|
||||||
const notificationFuncA = async (title) => {
|
const notificationFuncA = async (title) => {
|
||||||
let tempUser = this.cacheUserBasic.find(item => item.userid == userid);
|
const tempUser = (await this.$store.dispatch("getUserData", userid).catch(_ => {}))?.data;
|
||||||
if (!tempUser) {
|
|
||||||
try {
|
|
||||||
const {data} = await this.$store.dispatch("call", {
|
|
||||||
url: 'users/basic',
|
|
||||||
data: {
|
|
||||||
userid: [userid]
|
|
||||||
},
|
|
||||||
checkAuth: false
|
|
||||||
});
|
|
||||||
tempUser = data.find(item => item.userid == userid);
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
if (dialog_type === 'group' && tempUser) {
|
if (dialog_type === 'group' && tempUser) {
|
||||||
title = `${title} (${tempUser.nickname})`
|
title = `${title} (${tempUser.nickname})`
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,7 @@
|
|||||||
{{msgData.reply_num}}条回复
|
{{msgData.reply_num}}条回复
|
||||||
</div>
|
</div>
|
||||||
<!--标注-->
|
<!--标注-->
|
||||||
<div v-if="msgData.tag" class="tag">
|
<div v-if="msgData.tag" class="tag" @click="openTag">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
</div>
|
</div>
|
||||||
<!--待办-->
|
<!--待办-->
|
||||||
@ -399,6 +399,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
openTag() {
|
||||||
|
if (!this.msgData.tag) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$store.dispatch("showSpinner", 600)
|
||||||
|
this.$store.dispatch("getUserData", this.msgData.tag).then(user => {
|
||||||
|
$A.messageInfo(`标注人员:${user.nickname} (ID: ${user.userid})`)
|
||||||
|
}).catch(_ => {
|
||||||
|
$A.messageError('标注人员不存在')
|
||||||
|
}).finally(_ => {
|
||||||
|
this.$store.dispatch("hiddenSpinner")
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
openTodo() {
|
openTodo() {
|
||||||
if (this.todoLoad > 0) {
|
if (this.todoLoad > 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
30
resources/assets/js/store/actions.js
vendored
30
resources/assets/js/store/actions.js
vendored
@ -795,6 +795,36 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户基础信息(缓存没有则请求网络)
|
||||||
|
* @param state
|
||||||
|
* @param dispatch
|
||||||
|
* @param userid
|
||||||
|
* @returns {Promise<unknown>}
|
||||||
|
*/
|
||||||
|
getUserData({state, dispatch}, userid) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let tempUser = state.cacheUserBasic.find(item => item.userid == userid);
|
||||||
|
if (!tempUser) {
|
||||||
|
try {
|
||||||
|
const {data} = await dispatch("call", {
|
||||||
|
url: 'users/basic',
|
||||||
|
data: {
|
||||||
|
userid: [userid]
|
||||||
|
},
|
||||||
|
checkAuth: false
|
||||||
|
});
|
||||||
|
tempUser = data.find(item => item.userid == userid);
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
|
if (tempUser) {
|
||||||
|
resolve(tempUser);
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存用户基础信息
|
* 保存用户基础信息
|
||||||
* @param commit
|
* @param commit
|
||||||
|
|||||||
@ -1632,6 +1632,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.todo {
|
.todo {
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user