物业之前,新工作台

This commit is contained in:
Zy
2026-04-16 21:03:35 +08:00
parent cf9a1f1585
commit 4184f1c55d
91 changed files with 1781 additions and 588 deletions

View File

@@ -32,7 +32,9 @@
<el-col :span="12">
<el-form-item label="是否发布" prop="publishStatus">
<el-radio-group v-model="form.publishStatus">
<el-radio v-for="dict in com_publish_status" :key="dict.value" :value="Number(dict.value)">{{ dict.label }}</el-radio>
<el-radio v-for="dict in com_publish_status" :key="dict.value" :value="Number(dict.value)">{{
dict.value === '0' ? dict.label : '发布'
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@@ -65,7 +67,6 @@
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { addComplaintType, getComplaintType, updateComplaintType } from '@/api/system/ComplainType';
import { addNotice, getNotice } from '@/api/system/NoticePc/index';
import { updateNotice } from '@/api/system/NoticePc';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -79,8 +80,8 @@ const form = ref({
'id': null,
'author': '',
'noticeTitle': '',
'urgencyLevel': '0',
'publishStatus': '1',
'urgencyLevel': 0,
'publishStatus': 1,
'noticeContent': ''
});
const rules = {
@@ -103,7 +104,6 @@ function init() {
...form.value,
...res.data
};
console.log(form.value);
});
}
@@ -116,6 +116,7 @@ if (route.query.id) {
const submitForm = () => {
formRef.value?.validate(async (valid: boolean) => {
if (valid) {
form.value.villageId = Number(localStorage.getItem('villageid'));
if (userid.value) {
updateNotice(form.value).then(() => {
ElMessage.success('编辑成功');

View File

@@ -40,7 +40,7 @@
<el-table v-loading="loading" border :data="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="公告标题" align="center" prop="noticeTitle" />
<el-table-column label="作者" align="center" prop="author" />
<el-table-column label="作者" width="120" align="center" prop="author" />
<el-table-column label="紧急程度" align="center" prop="urgencyLevel">
<template #default="scope">
<dict-tag :options="com_noticepc_level" :value="scope.row.urgencyLevel"></dict-tag>
@@ -51,8 +51,8 @@
<dict-tag :options="com_publish_status" :value="scope.row.publishStatus"></dict-tag>
</template>
</el-table-column>
<el-table-column label="已读" align="center" prop="readNum" />
<el-table-column label="未读" align="center" prop="unReadNum" />
<el-table-column label="已读" width="120" align="center" prop="readNum" />
<el-table-column label="未读" width="120" align="center" prop="unReadNum" />
<el-table-column label="发布人" align="center" prop="publishBy" />
<el-table-column label="发布日期" align="center" prop="publishTime" width="100">
<template #default="scope">
@@ -90,7 +90,6 @@ const multiple = ref(true);
const total = ref(0);
const queryFormRef = ref<ElFormInstance>();
const noticeFormRef = ref<ElFormInstance>();
const dialog = reactive<DialogOption>({
visible: false,
@@ -110,6 +109,7 @@ const initFormData: NoticeForm = {
const data = reactive<PageData<NoticeForm, NoticeQuery>>({
form: { ...initFormData },
queryParams: {
villageId: Number(localStorage.getItem('villageid')),
pageNum: 1,
pageSize: 10,
noticeTitle: undefined,