|
|
|
@ -6,8 +6,8 @@ |
|
|
|
<div style="width: 50%"> |
|
|
|
<div style="width: 50%"> |
|
|
|
<el-form-item label="信件分类" prop="mailCategory"> |
|
|
|
<el-form-item label="信件分类" prop="mailCategory"> |
|
|
|
<mail-category-select |
|
|
|
<mail-category-select |
|
|
|
v-model="form.mailCategoryName" |
|
|
|
v-model="form.mailCategory" |
|
|
|
@change="handleCategoryChange" |
|
|
|
@current-change="handleCategoryChange" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -39,7 +39,10 @@ |
|
|
|
<el-form-item |
|
|
|
<el-form-item |
|
|
|
label="处理流程" |
|
|
|
label="处理流程" |
|
|
|
prop="simpleFlowFlag" |
|
|
|
prop="simpleFlowFlag" |
|
|
|
v-if="form.mailFirstCategory === '工作建议类' || form.mailFirstCategory === '咨询求助类'" |
|
|
|
v-if=" |
|
|
|
|
|
|
|
form.mailFirstCategory === '工作建议类' || |
|
|
|
|
|
|
|
form.mailFirstCategory === '咨询求助类' |
|
|
|
|
|
|
|
" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-radio-group v-model="form.simpleFlowFlag" class="ml-4"> |
|
|
|
<el-radio-group v-model="form.simpleFlowFlag" class="ml-4"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
@ -74,13 +77,13 @@ |
|
|
|
label="下发单位" |
|
|
|
label="下发单位" |
|
|
|
v-if="form.mailCategory === '感谢信'" |
|
|
|
v-if="form.mailCategory === '感谢信'" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex gap" style="width: 100%;"> |
|
|
|
<div class="flex gap" style="width: 100%"> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
|
v-model="form.secondDeptId" |
|
|
|
v-model="form.secondDeptId" |
|
|
|
placeholder="请选择二级办理单位" |
|
|
|
placeholder="请选择二级办理单位" |
|
|
|
filterable |
|
|
|
filterable |
|
|
|
clearable |
|
|
|
clearable |
|
|
|
style="width: 50%;" |
|
|
|
style="width: 50%" |
|
|
|
@change="handleChangeDept" |
|
|
|
@change="handleChangeDept" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
@ -95,7 +98,7 @@ |
|
|
|
placeholder="请选择三级办理单位" |
|
|
|
placeholder="请选择三级办理单位" |
|
|
|
filterable |
|
|
|
filterable |
|
|
|
clearable |
|
|
|
clearable |
|
|
|
style="width: 50%;" |
|
|
|
style="width: 50%" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in threeDepts" |
|
|
|
v-for="item in threeDepts" |
|
|
|
@ -121,14 +124,20 @@ const props = defineProps({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
mailId: { |
|
|
|
mailId: { |
|
|
|
type: String, |
|
|
|
type: String, |
|
|
|
default: '', |
|
|
|
default: "", |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let form = reactive({}); |
|
|
|
let form = reactive({}); |
|
|
|
watch(() => props.mailId, (val) => { |
|
|
|
watch( |
|
|
|
form = reactive({}); |
|
|
|
() => props.mailId, |
|
|
|
}) |
|
|
|
(val) => { |
|
|
|
|
|
|
|
formRef.value.resetFields(); |
|
|
|
|
|
|
|
form.mailFirstCategory = null; |
|
|
|
|
|
|
|
form.mailSecondCategory = null; |
|
|
|
|
|
|
|
form.mailThreeCategory = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const formRef = ref(); |
|
|
|
const formRef = ref(); |
|
|
|
|
|
|
|
|
|
|
|
@ -159,12 +168,9 @@ const rules = { |
|
|
|
], |
|
|
|
], |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const emits = defineEmits(["update:data"]); |
|
|
|
const emits = defineEmits(["update:data"]); |
|
|
|
|
|
|
|
|
|
|
|
function handleCategoryChange(data, node) { |
|
|
|
function handleCategoryChange(data, node) { |
|
|
|
form.mailCategory = data.label; |
|
|
|
|
|
|
|
if (node.level === 1) { |
|
|
|
if (node.level === 1) { |
|
|
|
form.mailFirstCategory = data.label; |
|
|
|
form.mailFirstCategory = data.label; |
|
|
|
form.mailSecondCategory = null; |
|
|
|
form.mailSecondCategory = null; |
|
|
|
@ -195,7 +201,7 @@ function getSecondDepts() { |
|
|
|
|
|
|
|
|
|
|
|
function getThreeDepts(secondDeptId) { |
|
|
|
function getThreeDepts(secondDeptId) { |
|
|
|
listThree({ |
|
|
|
listThree({ |
|
|
|
secondDeptId |
|
|
|
secondDeptId, |
|
|
|
}).then((data) => { |
|
|
|
}).then((data) => { |
|
|
|
threeDepts.value = data; |
|
|
|
threeDepts.value = data; |
|
|
|
}); |
|
|
|
}); |
|
|
|
@ -203,7 +209,7 @@ function getThreeDepts(secondDeptId) { |
|
|
|
|
|
|
|
|
|
|
|
function handleChangeDept(val) { |
|
|
|
function handleChangeDept(val) { |
|
|
|
form.threeDeptId = null; |
|
|
|
form.threeDeptId = null; |
|
|
|
getThreeDepts(val) |
|
|
|
getThreeDepts(val); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function validate() { |
|
|
|
function validate() { |
|
|
|
@ -211,6 +217,7 @@ function validate() { |
|
|
|
formRef.value.validate((valid) => { |
|
|
|
formRef.value.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
emits("update:data", form); |
|
|
|
emits("update:data", form); |
|
|
|
|
|
|
|
|
|
|
|
resolve(true); |
|
|
|
resolve(true); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
reject(); |
|
|
|
reject(); |
|
|
|
|