|
|
|
@ -105,20 +105,36 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div ref="mailInfoRef"> |
|
|
|
<div ref="mailInfoRef"> |
|
|
|
<div class="col mb-10" v-if="mail.mailCategory"> |
|
|
|
<template v-if="mail.mailCategory"> |
|
|
|
<label style="width: 56px">信件分类</label> |
|
|
|
<div class="col mb-10" > |
|
|
|
<span style="width: calc(100% - 74px)"> |
|
|
|
<label style="width: 56px">信件分类</label> |
|
|
|
<span v-if="mail.mailFirstCategory">{{ |
|
|
|
<span style="width: calc(100% - 74px)"> |
|
|
|
mail.mailFirstCategory |
|
|
|
<mail-category-select v-model="form.mailCategory" @current-change="handleCategoryChange" size="small" v-if="mailCategoryEditable" /> |
|
|
|
}}</span> |
|
|
|
<template v-else> |
|
|
|
<span v-if="mail.mailSecondCategory">{{ |
|
|
|
<span v-if="mail.mailFirstCategory">{{ |
|
|
|
" > " + mail.mailSecondCategory |
|
|
|
mail.mailFirstCategory |
|
|
|
}}</span> |
|
|
|
}}</span> |
|
|
|
<span v-if="mail.mailThreeCategory">{{ |
|
|
|
<span v-if="mail.mailSecondCategory">{{ |
|
|
|
" > " + mail.mailThreeCategory |
|
|
|
" > " + mail.mailSecondCategory |
|
|
|
}}</span> |
|
|
|
}}</span> |
|
|
|
</span> |
|
|
|
<span v-if="mail.mailThreeCategory">{{ |
|
|
|
</div> |
|
|
|
" > " + mail.mailThreeCategory |
|
|
|
|
|
|
|
}}</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex end" v-perms="['mail:updateMailCategory']"> |
|
|
|
|
|
|
|
<div v-if="mailCategoryEditable"> |
|
|
|
|
|
|
|
<el-button size="small" @click="mailCategoryEditable = false">取消</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-button size="small" type="primary" @click="handleUpdateMailCategory">提交</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<el-button type="primary" size="small" plain v-else @click="handleMailCategoryEditable">修改信件分类</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
<div |
|
|
|
class="col" |
|
|
|
class="col" |
|
|
|
v-if="mail.mailLevel" |
|
|
|
v-if="mail.mailLevel" |
|
|
|
@ -493,7 +509,7 @@ import ExtensionApprovalReturn from "./ExtensionApprovalReturn.vue"; |
|
|
|
|
|
|
|
|
|
|
|
import RemainingTime from "./RemainingTime.vue"; |
|
|
|
import RemainingTime from "./RemainingTime.vue"; |
|
|
|
|
|
|
|
|
|
|
|
import { getMailFlowDetail, flowNext, extensionApproval } from "@/api/mail"; |
|
|
|
import { getMailFlowDetail, flowNext, extensionApproval, updateMailCategory } from "@/api/mail"; |
|
|
|
import { getMailDetail } from "@/api/work"; |
|
|
|
import { getMailDetail } from "@/api/work"; |
|
|
|
import { addFav, delFav } from "@/api/work/fav"; |
|
|
|
import { addFav, delFav } from "@/api/work/fav"; |
|
|
|
import { useDictData } from "@/hooks/useDictOptions"; |
|
|
|
import { useDictData } from "@/hooks/useDictOptions"; |
|
|
|
@ -864,6 +880,42 @@ function getFlowHandler(item) { |
|
|
|
} |
|
|
|
} |
|
|
|
return `${item.handlerDeptName} ${item.handlerName}`; |
|
|
|
return `${item.handlerDeptName} ${item.handlerName}`; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const mailCategoryEditable = ref(false); |
|
|
|
|
|
|
|
const form = reactive({}); |
|
|
|
|
|
|
|
function handleMailCategoryEditable() { |
|
|
|
|
|
|
|
mailCategoryEditable.value = true |
|
|
|
|
|
|
|
form.mailId = props.mailId |
|
|
|
|
|
|
|
form.mailCategory = mail.value.mailCategory; |
|
|
|
|
|
|
|
form.mailFirstCategory = mail.value.mailFirstCategory; |
|
|
|
|
|
|
|
form.mailSecondCategory = mail.value.mailSecondCategory; |
|
|
|
|
|
|
|
form.mailThreeCategory = mail.value.mailThreeCategory; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function handleCategoryChange(data, node) { |
|
|
|
|
|
|
|
if (node.level === 1) { |
|
|
|
|
|
|
|
form.mailFirstCategory = data.label; |
|
|
|
|
|
|
|
form.mailSecondCategory = null; |
|
|
|
|
|
|
|
form.mailThreeCategory = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
debugger |
|
|
|
|
|
|
|
if (node.level === 2) { |
|
|
|
|
|
|
|
form.mailFirstCategory = node.parent.data.label; |
|
|
|
|
|
|
|
form.mailSecondCategory = data.label; |
|
|
|
|
|
|
|
form.mailThreeCategory = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (node.level === 3) { |
|
|
|
|
|
|
|
form.mailFirstCategory = node.parent.parent.data.label; |
|
|
|
|
|
|
|
form.mailSecondCategory = node.parent.data.label; |
|
|
|
|
|
|
|
form.mailThreeCategory = data.label; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleUpdateMailCategory() { |
|
|
|
|
|
|
|
updateMailCategory(form).then(() => { |
|
|
|
|
|
|
|
mailCategoryEditable.value = false |
|
|
|
|
|
|
|
getDetail() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.dialog-header { |
|
|
|
.dialog-header { |
|
|
|
|