Browse Source

BUG修复

master
wxc 2 years ago
parent
commit
97ead1d80f
  1. 1
      .gitignore
  2. BIN
      public/imgs/login_logo.png
  3. 18
      src/components/MailCategorySelect.vue
  4. 2
      src/layout/components/Header.vue
  5. 3
      src/views/permission/admin/edit.vue
  6. 3
      src/views/permission/admin/index.vue
  7. 16
      src/views/work/components/AddMail.vue
  8. 2
      src/views/work/components/ConfirmedCompletion.vue
  9. 37
      src/views/work/components/templates/MailTypeForm.vue

1
.gitignore vendored

@ -12,5 +12,6 @@ dist
*.map *.map
*.rar *.rar
*.zip
*.d.ts *.d.ts

BIN
public/imgs/login_logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 47 KiB

18
src/components/MailCategorySelect.vue

@ -1,9 +1,8 @@
<template> <template>
<el-tree-select <el-tree-select
v-model="val" node-key="label"
:data="mailStore.mailCategorys" :data="mailStore.mailCategorys"
filterable filterable
@current-change="handleCategoryChange"
placeholder="请选择信件分类" placeholder="请选择信件分类"
/> />
</template> </template>
@ -13,21 +12,6 @@ const mailStore = useMailStore();
// //
mailStore.getMailCategorys(); mailStore.getMailCategorys();
const val = ref('');
const props = defineProps({
value: {
type: String,
default: ''
}
})
const emit = defineEmits(['update:value', 'change'])
const handleCategoryChange = (data, node) => {
emit('update:value', data.label)
emit('change', data, node)
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

2
src/layout/components/Header.vue

@ -4,7 +4,7 @@
<a href="/"> <a href="/">
<img src="/logo.png" alt="" /> <img src="/logo.png" alt="" />
</a> </a>
<span>长沙公安局长信箱即接即办系统</span> <span>长沙市公安局局长信箱即接即办平台</span>
</div> </div>
<NoticeMessage /> <NoticeMessage />
<section class="flex gap userinfo v-center pointer" @click.stop="dropdownShow = true"> <section class="flex gap userinfo v-center pointer" @click.stop="dropdownShow = true">

3
src/views/permission/admin/edit.vue

@ -49,12 +49,13 @@
:data="optionsData.dept" :data="optionsData.dept"
:default-expanded-keys="getExpandedKeys()" :default-expanded-keys="getExpandedKeys()"
clearable clearable
check-strictly
node-key="id" node-key="id"
:props="{ :props="{
value: 'id', value: 'id',
label: 'name' label: 'name'
}" }"
placeholder="请选择上级部门" placeholder="请选择归属部门"
filterable filterable
/> />
</el-form-item> </el-form-item>

3
src/views/permission/admin/index.vue

@ -28,7 +28,7 @@
</el-form-item> </el-form-item>
<el-form-item label="角色"> <el-form-item label="角色">
<el-select v-model="formData.role" style="width: 180px"> <el-select v-model="formData.role" clearable style="width: 180px">
<el-option label="全部" value="" /> <el-option label="全部" value="" />
<el-option <el-option
v-for="(item, index) in optionsData.role" v-for="(item, index) in optionsData.role"
@ -47,6 +47,7 @@
clearable clearable
node-key="id" node-key="id"
filterable filterable
check-strictly
:props="{ :props="{
value: 'id', value: 'id',
label: 'name' label: 'name'

16
src/views/work/components/AddMail.vue

@ -226,21 +226,11 @@ const form = ref({
content: "", content: "",
fileList: [], fileList: [],
}); });
const validateName = (rule: any, value: string, callback: any) => {
if (!value) {
callback(new Error("请输入姓名"));
} else if (value.length < 2) {
callback(new Error("姓名长度不能少于2位"));
} else if (!/^[a-zA-Z\u4e00-\u9fa5]+$/.test(value)) {
callback(new Error("请输入中文姓名"));
} else {
callback();
}
};
const rules = reactive<FormRules<FormData>>({ const rules = reactive<FormRules<FormData>>({
source: [{ required: true, message: "请选择途径来源" }], source: [{ required: true, message: "请选择途径来源" }],
contactName: [ contactName: [
{ required: true, validator: validateName }, { required: true, message: "请输入姓名" },
], ],
contactIdCard: [ contactIdCard: [
{ required: true, validator: validatorIdCard }, { required: true, validator: validatorIdCard },
@ -253,7 +243,7 @@ const rules = reactive<FormRules<FormData>>({
required: true, required: true,
message: message:
"请您尽量完整的描述您的信件内容,如发生事件、涉及单位、设计对象姓名、警号以及具体事项", "请您尽量完整的描述您的信件内容,如发生事件、涉及单位、设计对象姓名、警号以及具体事项",
trigger: "blur", trigger: "blur"
}, },
], ],
}); });

2
src/views/work/components/ConfirmedCompletion.vue

@ -94,7 +94,7 @@
</el-form-item> </el-form-item>
<el-divider /> <el-divider />
<h2>认定办结意见</h2> <h2>认定办结意见*</h2>
<el-form-item <el-form-item
prop="completionComment" prop="completionComment"
class="mb-40 label-position-top" class="mb-40 label-position-top"

37
src/views/work/components/templates/MailTypeForm.vue

@ -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();

Loading…
Cancel
Save