mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
Merge Optimization
This commit is contained in:
parent
952836e1f1
commit
b5d63dfd12
@ -74,7 +74,7 @@ class ApproveController extends AbstractController
|
|||||||
$ret = Ihttp::ihttp_post($this->flow_url.'/api/v1/workflow/procdef/findAll', json_encode($data));
|
$ret = Ihttp::ihttp_post($this->flow_url.'/api/v1/workflow/procdef/findAll', json_encode($data));
|
||||||
$procdef = json_decode($ret['ret'] == 1 ? $ret['data'] : '{}', true);
|
$procdef = json_decode($ret['ret'] == 1 ? $ret['data'] : '{}', true);
|
||||||
if (!$procdef || $procdef['status'] != 200 || $ret['ret'] == 0) {
|
if (!$procdef || $procdef['status'] != 200 || $ret['ret'] == 0) {
|
||||||
info($ret);
|
// info($ret);
|
||||||
return Base::retError($procdef['message'] ?? '查询失败');
|
return Base::retError($procdef['message'] ?? '查询失败');
|
||||||
}
|
}
|
||||||
return Base::retSuccess('success', Base::arrayKeyToUnderline($procdef['data']));
|
return Base::retSuccess('success', Base::arrayKeyToUnderline($procdef['data']));
|
||||||
|
|||||||
@ -850,7 +850,7 @@ class WebSocketDialogMsg extends AbstractModel
|
|||||||
$dialogMsg->key = $dialogMsg->generateMsgKey();
|
$dialogMsg->key = $dialogMsg->generateMsgKey();
|
||||||
$dialogMsg->save();
|
$dialogMsg->save();
|
||||||
//
|
//
|
||||||
$dialogMsg->msgJoinGroup($dialog, $dialogMsg);
|
$dialogMsg->msgJoinGroup($dialog);
|
||||||
//
|
//
|
||||||
$dialog->pushMsg('update', array_merge($updateData, [
|
$dialog->pushMsg('update', array_merge($updateData, [
|
||||||
'id' => $dialogMsg->id
|
'id' => $dialogMsg->id
|
||||||
@ -901,11 +901,10 @@ class WebSocketDialogMsg extends AbstractModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将被@的人加入群
|
* 将被@的人加入群
|
||||||
* @param $dialogMsg 发送的消息
|
* @param WebSocketDialog $dialog 对话
|
||||||
* @param $dialog 对话
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function msgJoinGroup($dialog, $dialogMsg)
|
public function msgJoinGroup(WebSocketDialog $dialog)
|
||||||
{
|
{
|
||||||
$updateds = [];
|
$updateds = [];
|
||||||
$silences = [];
|
$silences = [];
|
||||||
@ -914,20 +913,22 @@ class WebSocketDialogMsg extends AbstractModel
|
|||||||
$silences[$dialogUser->userid] = $dialogUser->silence;
|
$silences[$dialogUser->userid] = $dialogUser->silence;
|
||||||
}
|
}
|
||||||
$userids = array_keys($silences);
|
$userids = array_keys($silences);
|
||||||
|
|
||||||
// 提及会员
|
// 提及会员
|
||||||
$mentions = [];
|
$mentions = [];
|
||||||
if ($dialogMsg->type === 'text') {
|
if ($this->type === 'text') {
|
||||||
preg_match_all("/<span class=\"mention user\" data-id=\"(\d+)\">/", $dialogMsg->msg['text'], $matchs);
|
preg_match_all("/<span class=\"mention user\" data-id=\"(\d+)\">/", $this->msg['text'], $matchs);
|
||||||
if ($matchs) {
|
if ($matchs) {
|
||||||
$mentions = array_values(array_filter(array_unique($matchs[1])));
|
$mentions = array_values(array_filter(array_unique($matchs[1])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 将会话以外的成员加入会话内
|
// 将会话以外的成员加入会话内
|
||||||
$diffids = array_values(array_diff($mentions, $userids));
|
$diffids = array_values(array_diff($mentions, $userids));
|
||||||
if ($diffids) {
|
if ($diffids) {
|
||||||
// 仅(群聊)且(是群主或没有群主)才可以@成员以外的人
|
// 仅(群聊)且(是群主或没有群主)才可以@成员以外的人
|
||||||
if ($dialog->type === 'group' && in_array($dialog->owner_id, [0, $dialogMsg->userid])) {
|
if ($dialog->type === 'group' && in_array($dialog->owner_id, [0, $this->userid])) {
|
||||||
$dialog->joinGroup($diffids, $dialogMsg->userid);
|
$dialog->joinGroup($diffids, $this->userid);
|
||||||
$dialog->pushMsg("groupJoin", null, $diffids);
|
$dialog->pushMsg("groupJoin", null, $diffids);
|
||||||
$userids = array_values(array_unique(array_merge($mentions, $userids)));
|
$userids = array_values(array_unique(array_merge($mentions, $userids)));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -313,7 +313,7 @@ class BotReceiveMsgTask extends AbstractTask
|
|||||||
$nameKey = $isManager ? $array[2] : $array[1];
|
$nameKey = $isManager ? $array[2] : $array[1];
|
||||||
$data = $this->botManagerOne($botId, $msg->userid);
|
$data = $this->botManagerOne($botId, $msg->userid);
|
||||||
if ($data) {
|
if ($data) {
|
||||||
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.updated_at as user_at'])
|
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at'])
|
||||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||||
->where('web_socket_dialogs.name', 'LIKE', "%{$nameKey}%")
|
->where('web_socket_dialogs.name', 'LIKE', "%{$nameKey}%")
|
||||||
->where('u.userid', $data->userid)
|
->where('u.userid', $data->userid)
|
||||||
|
|||||||
@ -93,7 +93,7 @@ class WebSocketDialogMsgTask extends AbstractTask
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 将会话以外的成员加入会话内
|
// 将会话以外的成员加入会话内
|
||||||
$msgJoinGroupResult = $msg->msgJoinGroup($dialog, $msg);
|
$msgJoinGroupResult = $msg->msgJoinGroup($dialog);
|
||||||
$updateds = $msgJoinGroupResult['updateds'];
|
$updateds = $msgJoinGroupResult['updateds'];
|
||||||
$silences = $msgJoinGroupResult['silences'];
|
$silences = $msgJoinGroupResult['silences'];
|
||||||
$userids = $msgJoinGroupResult['userids'];
|
$userids = $msgJoinGroupResult['userids'];
|
||||||
|
|||||||
2
public/js/emoticon.all.js
vendored
2
public/js/emoticon.all.js
vendored
@ -16,7 +16,7 @@
|
|||||||
{"name": "给你个眼神", "key": "眼神 真的 质疑 疑问 不确定", "path": "9.gif"},
|
{"name": "给你个眼神", "key": "眼神 真的 质疑 疑问 不确定", "path": "9.gif"},
|
||||||
{"name": "恭喜发财", "key": "新年好 新年 拜年", "path": "10.gif"},
|
{"name": "恭喜发财", "key": "新年好 新年 拜年", "path": "10.gif"},
|
||||||
{"name": "跪谢", "key": "谢谢 感动 跪", "path": "11.gif"},
|
{"name": "跪谢", "key": "谢谢 感动 跪", "path": "11.gif"},
|
||||||
{"name": "Hi", "key": "打招呼 欢迎 招呼 你好 好", "path": "12.gif"},
|
{"name": "Hi", "key": "打招呼 欢迎 招呼 你好", "path": "12.gif"},
|
||||||
{"name": "欢迎欢迎", "key": "欢迎 新人 兴奋 开心 庆祝 喝彩 气氛组", "path": "13.gif"},
|
{"name": "欢迎欢迎", "key": "欢迎 新人 兴奋 开心 庆祝 喝彩 气氛组", "path": "13.gif"},
|
||||||
{"name": "加油", "key": "喝彩 气氛组", "path": "14.gif"},
|
{"name": "加油", "key": "喝彩 气氛组", "path": "14.gif"},
|
||||||
{"name": "静静看着你", "key": "静静 看着 不说话 沉默", "path": "15.gif"},
|
{"name": "静静看着你", "key": "静静 看着 不说话 沉默", "path": "15.gif"},
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="approve-details" :style="{'z-index':modalTransferIndex}">
|
<div class="approve-details" :style="{'z-index':modalTransferIndex}">
|
||||||
|
<!-- 审批详情 -->
|
||||||
<div class="approve-details-box" ref="approveDetailsBox">
|
<div class="approve-details-box" ref="approveDetailsBox">
|
||||||
<h2 class="approve-details-title">
|
<h2 class="approve-details-title">
|
||||||
<span>{{$L(datas.proc_def_name)}}</span>
|
<span>{{$L(datas.proc_def_name)}}</span>
|
||||||
@ -20,16 +21,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="approve-details-text">
|
<div class="approve-details-text">
|
||||||
<h4>{{$L('开始时间')}}</h4>
|
<h4>{{$L('开始时间')}}</h4>
|
||||||
<div>
|
<div class="time-text">
|
||||||
<span>{{datas.var?.start_time}}</span>
|
<span>{{datas.var?.start_time}}</span>
|
||||||
<span> ({{getWeekday(datas.var?.start_time)}})</span>
|
<span>({{getWeekday(datas.var?.start_time)}})</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="approve-details-text">
|
<div class="approve-details-text">
|
||||||
<h4>{{$L('结束时间')}}</h4>
|
<h4>{{$L('结束时间')}}</h4>
|
||||||
<div>
|
<div class="time-text">
|
||||||
<span>{{datas.var?.end_time}}</span>
|
<span>{{datas.var?.end_time}}</span>
|
||||||
<span> ({{getWeekday(datas.var?.end_time)}})</span>
|
<span>({{getWeekday(datas.var?.end_time)}})</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="approve-details-text">
|
<div class="approve-details-text">
|
||||||
@ -72,9 +73,10 @@
|
|||||||
</TimelineItem>
|
</TimelineItem>
|
||||||
|
|
||||||
<!-- 审批 -->
|
<!-- 审批 -->
|
||||||
<TimelineItem :key="key" v-if="item.type == 'approver' && item._show"
|
<TimelineItem
|
||||||
:color="item.identitylink ? (item.identitylink?.state > 1 ? '#f03f3f' :'green') : '#ccc'"
|
v-if="item.type == 'approver' && item._show"
|
||||||
>
|
:key="key"
|
||||||
|
:color="item.identitylink ? (item.identitylink?.state > 1 ? '#f03f3f' :'green') : '#ccc'">
|
||||||
<p class="timeline-title">{{$L('审批')}}</p>
|
<p class="timeline-title">{{$L('审批')}}</p>
|
||||||
<div class="timeline-body">
|
<div class="timeline-body">
|
||||||
<Avatar :src="(item.node_user_list && item.node_user_list[0]?.userimg) || item.userimg" size="38"/>
|
<Avatar :src="(item.node_user_list && item.node_user_list[0]?.userimg) || item.userimg" size="38"/>
|
||||||
@ -110,9 +112,9 @@
|
|||||||
<p class="approve-process-name">{{$L('系统')}}</p>
|
<p class="approve-process-name">{{$L('系统')}}</p>
|
||||||
<p class="approve-process-desc">{{$L('自动抄送')}}
|
<p class="approve-process-desc">{{$L('自动抄送')}}
|
||||||
<span style="color: #486fed;">
|
<span style="color: #486fed;">
|
||||||
{{ item.node_user_list?.map(h=>h.name).join(',') }}
|
{{ item.node_user_list?.map(h=>h.name).join(',') }}
|
||||||
{{$L('等'+item.node_user_list?.length+'人')}}
|
{{$L('等'+item.node_user_list?.length+'人')}}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -139,7 +141,7 @@
|
|||||||
<div class="approve-record-comment">
|
<div class="approve-record-comment">
|
||||||
<List :split="false" :border="false">
|
<List :split="false" :border="false">
|
||||||
<ListItem v-for="(item,key) in datas.global_comments" :key="key">
|
<ListItem v-for="(item,key) in datas.global_comments" :key="key">
|
||||||
<div>
|
<div>
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<Avatar :src="item.userimg" size="38"/>
|
<Avatar :src="item.userimg" size="38"/>
|
||||||
<div>
|
<div>
|
||||||
@ -156,21 +158,26 @@
|
|||||||
<ImgView :src="src" class="img-view"/>
|
<ImgView :src="src" class="img-view"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--审批操作-->
|
||||||
<div class="approve-operation">
|
<div class="approve-operation">
|
||||||
<div style="flex: 1;"></div>
|
|
||||||
<Button type="success" v-if="isShowAgreeBtn" @click="approve(1)">{{$L('同意')}}</Button>
|
<Button type="success" v-if="isShowAgreeBtn" @click="approve(1)">{{$L('同意')}}</Button>
|
||||||
<Button type="error" v-if="isShowAgreeBtn" @click="approve(2)">{{$L('拒绝')}}</Button>
|
<Button type="error" v-if="isShowAgreeBtn" @click="approve(2)">{{$L('拒绝')}}</Button>
|
||||||
<Button type="warning" v-if="isShowWarningBtn" @click="revocation">{{$L('撤销')}}</Button>
|
<Button type="warning" v-if="isShowWarningBtn" @click="revocation">{{$L('撤销')}}</Button>
|
||||||
<Button @click="comment" type="success" ghost>+{{$L('添加评论')}}</Button>
|
<Button @click="comment" type="success" ghost>+{{$L('添加评论')}}</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--加载中-->
|
||||||
|
<div v-if="loadIng > 0" class="approve-load">
|
||||||
|
<Loading/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--评论-->
|
<!--评论-->
|
||||||
<Modal v-model="commentShow" :title="$L('评论')" :mask-closable="false" class="page-approve-initiate">
|
<Modal v-model="commentShow" :title="$L('评论')" :mask-closable="false" class="page-approve-initiate">
|
||||||
<Form ref="initiateRef" :model="commentData" :rules="commentRule" label-width="auto" @submit.native.prevent>
|
<Form ref="initiateRef" :model="commentData" :rules="commentRule" label-width="auto" @submit.native.prevent>
|
||||||
@ -183,20 +190,19 @@
|
|||||||
</Form>
|
</Form>
|
||||||
<div slot="footer" class="adaption">
|
<div slot="footer" class="adaption">
|
||||||
<Button type="default" @click="commentShow=false">{{$L('取消')}}</Button>
|
<Button type="default" @click="commentShow=false">{{$L('取消')}}</Button>
|
||||||
<Button type="primary" :loading="loadIng > 0" @click="confirmComment">{{$L('确认')}}</Button>
|
<Button type="primary" :loading="commentLoad > 0" @click="confirmComment">{{$L('确认')}}</Button>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import ImgView from "../../../components/ImgView";
|
import ImgView from "../../../components/ImgView";
|
||||||
import ImgUpload from "../../../components/ImgUpload";
|
import ImgUpload from "../../../components/ImgUpload";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "details",
|
name: "ApproveDetails",
|
||||||
components:{ImgView,ImgUpload},
|
components: {ImgView, ImgUpload},
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -208,29 +214,31 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
modalTransferIndex:window.modalTransferIndex,
|
datas: {},
|
||||||
datas:{},
|
loadIng: 0,
|
||||||
showTimeNum:24,
|
showTimeNum: 24,
|
||||||
commentShow:false,
|
modalTransferIndex: window.modalTransferIndex,
|
||||||
loadIng:0,
|
|
||||||
|
commentLoad: 0,
|
||||||
|
commentShow: false,
|
||||||
commentData: {
|
commentData: {
|
||||||
content:"",
|
content: "",
|
||||||
pictures:[]
|
pictures: []
|
||||||
},
|
},
|
||||||
commentRule: {
|
commentRule: {
|
||||||
content: { type: 'string',required: true, message: this.$L('请输入内容!'), trigger: 'change' },
|
content: {type: 'string', required: true, message: this.$L('请输入内容!'), trigger: 'change'},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route' (to, from) {
|
'$route'(to, from) {
|
||||||
if(to.name == 'manage-approve-details'){
|
if (to.name == 'manage-approve-details') {
|
||||||
this.init()
|
this.init()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
handler(newValue,oldValue) {
|
handler(newValue, oldValue) {
|
||||||
if(newValue.id){
|
if (newValue.id) {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -238,13 +246,13 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isShowAgreeBtn(){
|
isShowAgreeBtn() {
|
||||||
return (this.datas.candidate || '').split(',').indexOf(this.userId + '') != -1 && !this.datas.is_finished
|
return (this.datas.candidate || '').split(',').indexOf(this.userId + '') != -1 && !this.datas.is_finished
|
||||||
},
|
},
|
||||||
isShowWarningBtn(){
|
isShowWarningBtn() {
|
||||||
let is = (this.userId == this.datas.start_user_id) && this.datas?.is_finished != true;
|
let is = (this.userId == this.datas.start_user_id) && this.datas?.is_finished != true;
|
||||||
(this.datas.node_infos || []).map(h=>{
|
(this.datas.node_infos || []).map(h => {
|
||||||
if( h.type != 'starter' && h.is_finished == true && h.identitylink?.userid != this.userId) {
|
if (h.type != 'starter' && h.is_finished == true && h.identitylink?.userid != this.userId) {
|
||||||
is = false;
|
is = false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -254,29 +262,29 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
init(){
|
init() {
|
||||||
this.modalTransferIndex = window.modalTransferIndex = window.modalTransferIndex + 1
|
this.modalTransferIndex = window.modalTransferIndex = window.modalTransferIndex + 1
|
||||||
if(this.$route.query.id){
|
if (this.$route.query.id) {
|
||||||
this.data.id = this.$route.query.id;
|
this.data.id = this.$route.query.id;
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 把时间转成几小时前
|
// 把时间转成几小时前
|
||||||
getTimeAgo(time,type) {
|
getTimeAgo(time, type) {
|
||||||
const currentTime = new Date();
|
const currentTime = new Date();
|
||||||
const timeDiff = (currentTime - new Date((time + '').replace(/-/g,"/"))) / 1000; // convert to seconds
|
const timeDiff = (currentTime - new Date((time + '').replace(/-/g, "/"))) / 1000; // convert to seconds
|
||||||
if (timeDiff < 60) {
|
if (timeDiff < 60) {
|
||||||
return type == 2 ? "0"+this.$L('分钟') : this.$L('刚刚');
|
return type == 2 ? "0" + this.$L('分钟') : this.$L('刚刚');
|
||||||
} else if (timeDiff < 3600) {
|
} else if (timeDiff < 3600) {
|
||||||
const minutes = Math.floor(timeDiff / 60);
|
const minutes = Math.floor(timeDiff / 60);
|
||||||
return type == 2 ? `${minutes}${this.$L('分钟')}` : `${minutes} ${this.$L('分钟前')}`;
|
return type == 2 ? `${minutes}${this.$L('分钟')}` : `${minutes} ${this.$L('分钟前')}`;
|
||||||
} else if(timeDiff < 3600 * 24) {
|
} else if (timeDiff < 3600 * 24) {
|
||||||
const hours = Math.floor(timeDiff / 3600);
|
const hours = Math.floor(timeDiff / 3600);
|
||||||
return type == 2 ? `${hours}${this.$L('小时')}` : `${hours} ${this.$L('小时前')}`;
|
return type == 2 ? `${hours}${this.$L('小时')}` : `${hours} ${this.$L('小时前')}`;
|
||||||
} else {
|
} else {
|
||||||
const days = Math.floor(timeDiff / 3600 / 24);
|
const days = Math.floor(timeDiff / 3600 / 24);
|
||||||
return type == 2 ? `${days+1}${this.$L('天')}` : `${days+1} ${this.$L('天')}`;
|
return type == 2 ? `${days + 1}${this.$L('天')}` : `${days + 1} ${this.$L('天')}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 时间转为周几
|
// 时间转为周几
|
||||||
@ -284,21 +292,21 @@ export default {
|
|||||||
return ['周日', '周一', '周二', '周三', '周四', '周五', '周六'][new Date(dateString).getDay()];
|
return ['周日', '周一', '周二', '周三', '周四', '周五', '周六'][new Date(dateString).getDay()];
|
||||||
},
|
},
|
||||||
// 获取时间差
|
// 获取时间差
|
||||||
getTimeDifference(startTime,endTime) {
|
getTimeDifference(startTime, endTime) {
|
||||||
const currentTime = new Date((endTime + '').replace(/-/g,"/"));
|
const currentTime = new Date((endTime + '').replace(/-/g, "/"));
|
||||||
const endTimes = new Date((startTime + '').replace(/-/g,"/"));
|
const endTimes = new Date((startTime + '').replace(/-/g, "/"));
|
||||||
const timeDiff = (currentTime - endTimes) / 1000; // convert to seconds
|
const timeDiff = (currentTime - endTimes) / 1000; // convert to seconds
|
||||||
if (timeDiff < 60) {
|
if (timeDiff < 60) {
|
||||||
return {time:timeDiff,unit:this.$L('秒')};
|
return {time: timeDiff, unit: this.$L('秒')};
|
||||||
} else if (timeDiff < 3600) {
|
} else if (timeDiff < 3600) {
|
||||||
const minutes = Math.floor(timeDiff / 60);
|
const minutes = Math.floor(timeDiff / 60);
|
||||||
return {time:minutes,unit:this.$L('分钟')};
|
return {time: minutes, unit: this.$L('分钟')};
|
||||||
} else if(timeDiff < 3600 * 24) {
|
} else if (timeDiff < 3600 * 24) {
|
||||||
const hours = (currentTime - endTimes) / (1000 * 60 * 60);
|
const hours = (currentTime - endTimes) / (1000 * 60 * 60);
|
||||||
return {time:hours,unit:this.$L('小时')};
|
return {time: hours, unit: this.$L('小时')};
|
||||||
} else {
|
} else {
|
||||||
const days = Math.floor(timeDiff / 3600 / 24);
|
const days = Math.floor(timeDiff / 3600 / 24);
|
||||||
return {time:days + 1,unit:this.$L('天')};
|
return {time: days + 1, unit: this.$L('天')};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取详情
|
// 获取详情
|
||||||
@ -308,13 +316,13 @@ export default {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
url: 'approve/process/detail',
|
url: 'approve/process/detail',
|
||||||
data: {
|
data: {
|
||||||
id:this.data.id,
|
id: this.data.id,
|
||||||
}
|
}
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
var show = true;
|
var show = true;
|
||||||
data.node_infos = data.node_infos.map(item=>{
|
data.node_infos = data.node_infos.map(item => {
|
||||||
item._show = show;
|
item._show = show;
|
||||||
if( item.identitylink?.state==2 || item.identitylink?.state==3 ){
|
if (item.identitylink?.state == 2 || item.identitylink?.state == 3) {
|
||||||
show = false;
|
show = false;
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
@ -330,15 +338,15 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 通过
|
// 通过
|
||||||
approve(type){
|
approve(type) {
|
||||||
$A.modalInput({
|
$A.modalInput({
|
||||||
title: `审批`,
|
title: `审批`,
|
||||||
placeholder: `请输入审批意见`,
|
placeholder: `请输入审批意见`,
|
||||||
type:"textarea",
|
type: "textarea",
|
||||||
okText: type == 1 ? "同意" : "拒绝",
|
okText: type == 1 ? "同意" : "拒绝",
|
||||||
okType: type == 1 ? "primary" : "error",
|
okType: type == 1 ? "primary" : "error",
|
||||||
onOk: (desc) => {
|
onOk: (desc) => {
|
||||||
if (type !=1 && !desc) {
|
if (type != 1 && !desc) {
|
||||||
return `请输入审批意见`
|
return `请输入审批意见`
|
||||||
}
|
}
|
||||||
this.$store.dispatch("call", {
|
this.$store.dispatch("call", {
|
||||||
@ -350,9 +358,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(({msg}) => {
|
}).then(({msg}) => {
|
||||||
$A.messageSuccess(msg);
|
$A.messageSuccess(msg);
|
||||||
if(this.$route.name=='manage-approve-details' || this.$route.name=='manage-messenger'){
|
if (this.$route.name == 'manage-approve-details' || this.$route.name == 'manage-messenger') {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}else{
|
} else {
|
||||||
this.$emit('approve')
|
this.$emit('approve')
|
||||||
}
|
}
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
@ -363,7 +371,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 撤销
|
// 撤销
|
||||||
revocation(){
|
revocation() {
|
||||||
$A.modalConfirm({
|
$A.modalConfirm({
|
||||||
content: "你确定要撤销吗?",
|
content: "你确定要撤销吗?",
|
||||||
loading: true,
|
loading: true,
|
||||||
@ -379,9 +387,9 @@ export default {
|
|||||||
}).then(({msg}) => {
|
}).then(({msg}) => {
|
||||||
$A.messageSuccess(msg);
|
$A.messageSuccess(msg);
|
||||||
resolve();
|
resolve();
|
||||||
if(this.$route.name=='manage-approve-details' || this.$route.name=='manage-messenger'){
|
if (this.$route.name == 'manage-approve-details' || this.$route.name == 'manage-messenger') {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}else{
|
} else {
|
||||||
this.$emit('revocation')
|
this.$emit('revocation')
|
||||||
}
|
}
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
@ -394,29 +402,31 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 评论
|
// 评论
|
||||||
comment(){
|
comment() {
|
||||||
this.commentData.content = ""
|
this.commentData.content = ""
|
||||||
this.commentData.pictures = []
|
this.commentData.pictures = []
|
||||||
this.commentShow = true;
|
this.commentShow = true;
|
||||||
},
|
},
|
||||||
// 提交评论
|
// 提交评论
|
||||||
confirmComment(){
|
confirmComment() {
|
||||||
this.loadIng = 1;
|
this.commentLoad++;
|
||||||
this.$store.dispatch("call", {
|
this.$store.dispatch("call", {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: 'approve/process/addGlobalComment',
|
url: 'approve/process/addGlobalComment',
|
||||||
data: {
|
data: {
|
||||||
proc_inst_id:this.data.id,
|
proc_inst_id: this.data.id,
|
||||||
content:JSON.stringify({
|
content: JSON.stringify({
|
||||||
'content': this.commentData.content,
|
'content': this.commentData.content,
|
||||||
'pictures': this.commentData.pictures.map(h =>{ return h.path; })
|
'pictures': this.commentData.pictures.map(h => {
|
||||||
|
return h.path;
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).then(({msg}) => {
|
}).then(({msg}) => {
|
||||||
$A.messageSuccess("添加成功");
|
$A.messageSuccess("添加成功");
|
||||||
if(this.$route.name=='manage-approve-details' || this.$route.name=='manage-messenger'){
|
if (this.$route.name == 'manage-approve-details' || this.$route.name == 'manage-messenger') {
|
||||||
this.getInfo(true)
|
this.getInfo(true)
|
||||||
}else{
|
} else {
|
||||||
this.$emit('approve')
|
this.$emit('approve')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.scrollToBottom()
|
this.scrollToBottom()
|
||||||
@ -426,7 +436,7 @@ export default {
|
|||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
$A.modalError(msg);
|
$A.modalError(msg);
|
||||||
}).finally(_ => {
|
}).finally(_ => {
|
||||||
this.loadIng--;
|
this.commentLoad--;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 滚动到容器底部
|
// 滚动到容器底部
|
||||||
@ -438,7 +448,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取内容
|
// 获取内容
|
||||||
getContent(content){
|
getContent(content) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(content).content || ''
|
return JSON.parse(content).content || ''
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -446,7 +456,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取图片
|
// 获取图片
|
||||||
getPictures(content){
|
getPictures(content) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(content).pictures || []
|
return JSON.parse(content).pictures || []
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -455,12 +465,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 打开图片
|
// 打开图片
|
||||||
onViewPicture(currentUrl) {
|
onViewPicture(currentUrl) {
|
||||||
this.$store.dispatch("previewImage", $A.apiUrl('../'+currentUrl) )
|
this.$store.dispatch("previewImage", $A.apiUrl('../' + currentUrl))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -148,7 +148,7 @@
|
|||||||
@on-clickoutside="operateVisible = false"
|
@on-clickoutside="operateVisible = false"
|
||||||
transfer>
|
transfer>
|
||||||
<div :style="{userSelect:operateVisible ? 'none' : 'auto', height: operateStyles.height}"></div>
|
<div :style="{userSelect:operateVisible ? 'none' : 'auto', height: operateStyles.height}"></div>
|
||||||
<DropdownMenu slot="list">
|
<DropdownMenu slot="list" class="messenger-dialog-operation">
|
||||||
<DropdownItem @click.native="handleTopClick">
|
<DropdownItem @click.native="handleTopClick">
|
||||||
{{ $L(operateItem.top_at ? '取消置顶' : '置顶') }}
|
{{ $L(operateItem.top_at ? '取消置顶' : '置顶') }}
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
|
|||||||
18
resources/assets/sass/pages/page-approve.scss
vendored
18
resources/assets/sass/pages/page-approve.scss
vendored
@ -227,6 +227,12 @@
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.time-text {
|
||||||
|
> span + span {
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.approve-record-timeline {
|
.approve-record-timeline {
|
||||||
@ -337,6 +343,7 @@
|
|||||||
border-top: 1px solid #F4F4F5;
|
border-top: 1px solid #F4F4F5;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
@ -344,6 +351,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.approve-load {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 24px;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
z-index: 9;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
.comment {
|
.comment {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-left: 45px;
|
margin-left: 45px;
|
||||||
|
|||||||
22
resources/assets/sass/pages/page-messenger.scss
vendored
22
resources/assets/sass/pages/page-messenger.scss
vendored
@ -591,6 +591,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.messenger-dialog-operation {
|
||||||
|
.item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> i {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
line-height: 18px;
|
||||||
|
font-size: 18px;
|
||||||
|
margin-right: 8px;
|
||||||
|
padding: 0;
|
||||||
|
color: #bbbbbb;
|
||||||
|
|
||||||
|
&.ivu-icon {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body.window-touch {
|
body.window-touch {
|
||||||
.page-messenger {
|
.page-messenger {
|
||||||
.messenger-wrapper {
|
.messenger-wrapper {
|
||||||
|
|||||||
@ -5,40 +5,40 @@
|
|||||||
"path": "18",
|
"path": "18",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"list": [
|
"list": [
|
||||||
{"name": "爱你", "key": "爱你 爱你哟 爱老虎油 爱你啦 亲亲 亲一个 啵啵 比心 笔芯 爱心", "path": "1.gif"},
|
{"name": "爱你", "key": "爱你哟 爱老虎油 爱你啦 亲亲 亲一个 啵啵", "path": "1.gif"},
|
||||||
{"name": "搬砖", "key": "搬砖 工作 努力", "path": "2.gif"},
|
{"name": "搬砖", "key": "工作 努力", "path": "2.gif"},
|
||||||
{"name": "不愧是精英", "key": "不愧是精英 精英 大佬 厉害 真棒 你真棒 牛逼 6 666 不愧是你 还得是你", "path": "3.gif"},
|
{"name": "不愧是精英", "key": "精英 大佬 厉害 真棒 你真棒 牛逼", "path": "3.gif"},
|
||||||
{"name": "不想理你", "key": "生气 不理 不开心 哼 不想理你", "path": "4.gif"},
|
{"name": "不想理你", "key": "生气 不理 不开心", "path": "4.gif"},
|
||||||
{"name": "不想面对", "key": "不想面对 瑟瑟发抖 体重 担忧 不想理你 又胖了", "path": "5.gif"},
|
{"name": "不想面对", "key": "瑟瑟发抖 体重", "path": "5.gif"},
|
||||||
{"name": "沉迷工作", "key": "工作 认真 做事 干活 电脑 沉迷工作", "path": "6.gif"},
|
{"name": "沉迷工作", "key": "工作 认真 做事 干活 电脑", "path": "6.gif"},
|
||||||
{"name": "打卡了么", "key": "打卡 上班 报 记得打卡", "path": "7.gif"},
|
{"name": "打卡了么", "key": "打卡 上班 报", "path": "7.gif"},
|
||||||
{"name": "发生了啥", "key": "冒泡 浮出水面 发生了啥 八卦 露头 我看看 怎么个事 怎么了", "path": "8.gif"},
|
{"name": "发生了啥", "key": "冒泡 浮出水面 八卦 露头", "path": "8.gif"},
|
||||||
{"name": "给你个眼神", "key": "眼神 真的 质疑 疑问 不确定 给你个眼神", "path": "9.gif"},
|
{"name": "给你个眼神", "key": "眼神 真的 质疑 疑问 不确定", "path": "9.gif"},
|
||||||
{"name": "恭喜发财", "key": "恭喜发财 新年好 新年 拜年", "path": "10.gif"},
|
{"name": "恭喜发财", "key": "新年好 新年 拜年", "path": "10.gif"},
|
||||||
{"name": "跪谢", "key": "谢谢 感动 跪 多谢 THANKS THANK YOU 谢了", "path": "11.gif"},
|
{"name": "跪谢", "key": "谢谢 感动 跪", "path": "11.gif"},
|
||||||
{"name": "Hi", "key": "Hi 打招呼 欢迎 招呼 你好 哈喽 哈啰 hello 大家好", "path": "12.gif"},
|
{"name": "Hi", "key": "打招呼 欢迎 招呼 你好", "path": "12.gif"},
|
||||||
{"name": "欢迎欢迎", "key": "欢迎 新人 兴奋 开心 庆祝 喝彩 气氛组", "path": "13.gif"},
|
{"name": "欢迎欢迎", "key": "欢迎 新人 兴奋 开心 庆祝 喝彩 气氛组", "path": "13.gif"},
|
||||||
{"name": "加油", "key": "加油 喝彩 气氛组", "path": "14.gif"},
|
{"name": "加油", "key": "喝彩 气氛组", "path": "14.gif"},
|
||||||
{"name": "静静看着你", "key": "静静 看着 不说话 沉默 静静看着你 无语 看你表演", "path": "15.gif"},
|
{"name": "静静看着你", "key": "静静 看着 不说话 沉默", "path": "15.gif"},
|
||||||
{"name": "开会啦", "key": "开会 会 通知 敲锣 开会啦 开会了", "path": "16.gif"},
|
{"name": "开会啦", "key": "开会 会 通知 敲锣", "path": "16.gif"},
|
||||||
{"name": "可以吗", "key": "可以吗 害羞 不好意思 脸红 可以 可以不", "path": "17.gif"},
|
{"name": "可以吗", "key": "害羞 不好意思", "path": "17.gif"},
|
||||||
{"name": "迷之自信", "key": "自信 迷之自信 自我欣赏 自恋 我真帅", "path": "18.gif"},
|
{"name": "迷之自信", "key": "自信 自我欣赏", "path": "18.gif"},
|
||||||
{"name": "明白", "key": "明白 收到 好的 收 OK", "path": "19.gif"},
|
{"name": "明白", "key": "收到 好的 收", "path": "19.gif"},
|
||||||
{"name": "摸摸", "key": "摸摸 摸头 你真乖 乖 棒", "path": "20.gif"},
|
{"name": "摸摸", "key": "摸头 你真乖 乖 棒", "path": "20.gif"},
|
||||||
{"name": "你真棒", "key": "大拇指 你真棒 太棒了 太棒啦 棒棒棒 棒", "path": "21.gif"},
|
{"name": "你真棒", "key": "大拇指 太棒了 太棒啦 棒棒棒 棒", "path": "21.gif"},
|
||||||
{"name": "佩服", "key": "佩服 五体投地 崇拜 仰慕 牛逼 厉害", "path": "22.gif"},
|
{"name": "佩服", "key": "五体投地 崇拜 仰慕 牛逼 厉害", "path": "22.gif"},
|
||||||
{"name": "撒花", "key": "撒花 欢迎 花 开心 耶 真好 真棒", "path": "23.gif"},
|
{"name": "撒花", "key": "欢迎 花 开心", "path": "23.gif"},
|
||||||
{"name": "生日快乐", "key": "生日快乐 吃蛋糕 蛋糕 生日", "path": "24.gif"},
|
{"name": "生日快乐", "key": "吃蛋糕 蛋糕", "path": "24.gif"},
|
||||||
{"name": "收到", "key": "明白 收到 好的 收 已阅 已读", "path": "25.gif"},
|
{"name": "收到", "key": "明白 好的 收 已阅 已读", "path": "25.gif"},
|
||||||
{"name": "送你花花", "key": "送花 送你花 花 兴奋 开心 庆祝 喝彩 气氛组", "path": "26.gif"},
|
{"name": "送你花花", "key": "送花 送你花 花 兴奋 开心 庆祝 喝彩 气氛组", "path": "26.gif"},
|
||||||
{"name": "在线吃瓜", "key": "吃瓜 八卦 看戏 看热闹 在线吃瓜 凑热闹 吃瓜群众 围观", "path": "27.gif"},
|
{"name": "在线吃瓜", "key": "吃瓜 八卦", "path": "27.gif"},
|
||||||
{"name": "我错了", "key": "认错 错了 哭 难过 悲伤 我错了 对不起 道歉", "path": "28.gif"},
|
{"name": "我错了", "key": "认错 错了 哭 难过", "path": "28.gif"},
|
||||||
{"name": "我太难了", "key": "我太难了 太难了 难过 不开心 委屈", "path": "29.gif"},
|
{"name": "我太难了", "key": "太难了 难过 不开心 委屈", "path": "29.gif"},
|
||||||
{"name": "笑而不语", "key": "笑 不说话 静静 不发表 沉默", "path": "30.gif"},
|
{"name": "笑而不语", "key": "笑 不说话 静静 不发表", "path": "30.gif"},
|
||||||
{"name": "行行好吧", "key": "行行好 乞丐 乞求 请求 求助 给点吧", "path": "31.gif"},
|
{"name": "行行好吧", "key": "行行好 乞丐 乞求 请求 求助", "path": "31.gif"},
|
||||||
{"name": "幸福", "key": "幸福 满足 洗澡 泡澡 开心", "path": "32.gif"},
|
{"name": "幸福", "key": "满足 洗澡 泡澡", "path": "32.gif"},
|
||||||
{"name": "赞", "key": "大拇指 赞 点赞 厉害 你真棒 太棒了 太棒啦 棒棒棒 棒 6 666 牛", "path": "33.gif"},
|
{"name": "赞", "key": "大拇指 点赞 厉害 你真棒 太棒了 太棒啦 棒棒棒 棒", "path": "33.gif"},
|
||||||
{"name": "走人了", "key": "下班 闪人 走人 溜人 走了 关机", "path": "34.gif"}
|
{"name": "走人了", "key": "下班 闪人 走人 溜人", "path": "34.gif"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user