mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-17 14:42:51 +00:00
perf: 评论审批图片和投票深色按钮
This commit is contained in:
parent
ea40e95cae
commit
f757749282
@ -207,7 +207,7 @@ class ApproveController extends AbstractController
|
|||||||
if ($id != $user->userid) {
|
if ($id != $user->userid) {
|
||||||
$dialog = WebSocketDialog::checkUserDialog($botUser, $id);
|
$dialog = WebSocketDialog::checkUserDialog($botUser, $id);
|
||||||
$processInst['comment_user_id'] = $user->userid;
|
$processInst['comment_user_id'] = $user->userid;
|
||||||
$processInst['comment_content'] = json_decode($data['content'], true)['content'];
|
$processInst['comment_contents'] = json_decode($data['content'], true) ?? [];
|
||||||
$this->approveMsg('approve_comment_notifier', $dialog, $botUser, $processInst, $processInst);
|
$this->approveMsg('approve_comment_notifier', $dialog, $botUser, $processInst, $processInst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -983,7 +983,8 @@ class ApproveController extends AbstractController
|
|||||||
'end_day_of_week' => '周' . Base::getTimeWeek(Carbon::parse($process['var']['end_time'])->timestamp),
|
'end_day_of_week' => '周' . Base::getTimeWeek(Carbon::parse($process['var']['end_time'])->timestamp),
|
||||||
'description' => $process['var']['description'],
|
'description' => $process['var']['description'],
|
||||||
'comment_nickname' => $process['comment_user_id'] ? User::userid2nickname($process['comment_user_id']) : '',
|
'comment_nickname' => $process['comment_user_id'] ? User::userid2nickname($process['comment_user_id']) : '',
|
||||||
'comment_content' => $process['comment_content'] ?? ''
|
'comment_content' => $process['comment_contents']['content'] ?? '',
|
||||||
|
'comment_pictures' => $process['comment_contents']['pictures'] ?? []
|
||||||
];
|
];
|
||||||
$text = view('push.bot', ['type' => $type, 'action' => $action, 'is_finished' => $process['is_finished'], 'data' => (object)$data])->render();
|
$text = view('push.bot', ['type' => $type, 'action' => $action, 'is_finished' => $process['is_finished'], 'data' => (object)$data])->render();
|
||||||
$text = preg_replace("/^\x20+/", "", $text);
|
$text = preg_replace("/^\x20+/", "", $text);
|
||||||
|
|||||||
@ -420,27 +420,33 @@ export default {
|
|||||||
// 提交评论
|
// 提交评论
|
||||||
confirmComment() {
|
confirmComment() {
|
||||||
this.commentLoad++;
|
this.commentLoad++;
|
||||||
this.$store.dispatch("call", {
|
this.$refs["initiateRef"].validate((valid) => {
|
||||||
method: 'post',
|
if (valid) {
|
||||||
url: 'approve/process/addGlobalComment',
|
this.$store.dispatch("call", {
|
||||||
data: {
|
method: 'post',
|
||||||
proc_inst_id: this.$route.query.id || this.data.id,
|
url: 'approve/process/addGlobalComment',
|
||||||
content: JSON.stringify({
|
data: {
|
||||||
'content': this.commentData.content,
|
proc_inst_id: this.$route.query.id || this.data.id,
|
||||||
'pictures': this.commentData.pictures.map(h => {
|
content: JSON.stringify({
|
||||||
return h.path;
|
'content': this.commentData.content,
|
||||||
})
|
'pictures': this.commentData.pictures.map(h => {
|
||||||
})
|
return h.path;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).then(({msg}) => {
|
||||||
|
$A.messageSuccess("添加成功");
|
||||||
|
this.getInfo(true)
|
||||||
|
this.commentShow = false;
|
||||||
|
}).catch(({msg}) => {
|
||||||
|
$A.modalError(msg);
|
||||||
|
}).finally(_ => {
|
||||||
|
this.commentLoad--;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.commentLoad--;
|
||||||
}
|
}
|
||||||
}).then(({msg}) => {
|
})
|
||||||
$A.messageSuccess("添加成功");
|
|
||||||
this.getInfo(true)
|
|
||||||
this.commentShow = false;
|
|
||||||
}).catch(({msg}) => {
|
|
||||||
$A.modalError(msg);
|
|
||||||
}).finally(_ => {
|
|
||||||
this.commentLoad--;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 滚动到容器底部
|
// 滚动到容器底部
|
||||||
scrollToBottom() {
|
scrollToBottom() {
|
||||||
|
|||||||
@ -115,8 +115,8 @@
|
|||||||
</Checkbox>
|
</Checkbox>
|
||||||
</CheckboxGroup>
|
</CheckboxGroup>
|
||||||
<div class="btn-row">
|
<div class="btn-row">
|
||||||
<Button v-if="(voteData[msgData.msg.uuid] || []).length == 0" disabled>{{$L("请选择后投票")}}</Button>
|
<Button v-if="(voteData[msgData.msg.uuid] || []).length == 0" type="grey" disabled>{{$L("请选择后投票")}}</Button>
|
||||||
<Button v-else type="warning" :loading="msgData.msg._loadIng > 0" @click="onVote('vote',msgData)">{{$L("立即投票")}}</Button>
|
<Button v-else type="warning" :loading="msgData.msg._loadIng > 0" class="no-dark-content" @click="onVote('vote',msgData)">{{$L("立即投票")}}</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|||||||
@ -155,6 +155,9 @@
|
|||||||
<div class="cause"><span>申请人:<span style="color:#84c56a">{{'@'}}{{$data->nickname}}</span> {{$data->department}}</span>
|
<div class="cause"><span>申请人:<span style="color:#84c56a">{{'@'}}{{$data->nickname}}</span> {{$data->department}}</span>
|
||||||
<b>评论内容</b>
|
<b>评论内容</b>
|
||||||
<span>{{$data->comment_content}}</span>
|
<span>{{$data->comment_content}}</span>
|
||||||
|
@if ($data->comment_pictures)
|
||||||
|
<span>[图片]</span>
|
||||||
|
@endif
|
||||||
</div><div class="btn-raw no-dark-content">
|
</div><div class="btn-raw no-dark-content">
|
||||||
@if ($is_finished == 1)
|
@if ($is_finished == 1)
|
||||||
<button class="ivu-btn ivu-btn-grey">已同意</button>
|
<button class="ivu-btn ivu-btn-grey">已同意</button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user