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
*.rar
*.zip
*.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>
<el-tree-select
v-model="val"
node-key="label"
:data="mailStore.mailCategorys"
filterable
@current-change="handleCategoryChange"
placeholder="请选择信件分类"
/>
</template>
@ -13,21 +12,6 @@ const mailStore = useMailStore();
//
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>
<style lang="scss" scoped>
</style>

2
src/layout/components/Header.vue

@ -4,7 +4,7 @@
<a href="/">
<img src="/logo.png" alt="" />
</a>
<span>长沙公安局长信箱即接即办系统</span>
<span>长沙市公安局局长信箱即接即办平台</span>
</div>
<NoticeMessage />
<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"
:default-expanded-keys="getExpandedKeys()"
clearable
check-strictly
node-key="id"
:props="{
value: 'id',
label: 'name'
}"
placeholder="请选择上级部门"
placeholder="请选择归属部门"
filterable
/>
</el-form-item>

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

@ -28,7 +28,7 @@
</el-form-item>
<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
v-for="(item, index) in optionsData.role"
@ -47,6 +47,7 @@
clearable
node-key="id"
filterable
check-strictly
:props="{
value: 'id',
label: 'name'

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

@ -226,21 +226,11 @@ const form = ref({
content: "",
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>>({
source: [{ required: true, message: "请选择途径来源" }],
contactName: [
{ required: true, validator: validateName },
{ required: true, message: "请输入姓名" },
],
contactIdCard: [
{ required: true, validator: validatorIdCard },
@ -253,7 +243,7 @@ const rules = reactive<FormRules<FormData>>({
required: true,
message:
"请您尽量完整的描述您的信件内容,如发生事件、涉及单位、设计对象姓名、警号以及具体事项",
trigger: "blur",
trigger: "blur"
},
],
});

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

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

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

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

Loading…
Cancel
Save