From 3959e507bfa99cc4ced2a6f48f9b4358334d34c4 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 19 十二月 2023 17:34:45 +0800
Subject: [PATCH] 1. 调试表单选项组件的双向绑定逻辑
---
src/views/notice/NoticeManage.vue | 59 +++++++++++++++++++++++++++++++++--------------------------
1 files changed, 33 insertions(+), 26 deletions(-)
diff --git a/src/views/notice/NoticeManage.vue b/src/views/notice/NoticeManage.vue
index 1a6e822..35c111f 100644
--- a/src/views/notice/NoticeManage.vue
+++ b/src/views/notice/NoticeManage.vue
@@ -118,18 +118,18 @@
/>
<el-table-column width="160" prop="ecCreator" label="鍒涘缓浜�" />
<!-- <el-table-column prop="ecPicurl" label="鍥剧墖" /> -->
- <!-- <el-table-column prop="ecReceiverid" label="绛炬敹浜�" /> -->
+ <el-table-column prop="ecReceiverid" label="绛炬敹浜�" />
</el-table>
<!-- <el-affix :offset="0" position="bottom"> -->
- <el-pagination
- class="el-pagination"
- v-model:current-page="currentPage"
- v-model:page-size="pageSize"
- :page-sizes="[10, 20, 50, 100]"
- :background="true"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- />
+ <el-pagination
+ class="el-pagination"
+ v-model:current-page="currentPage"
+ v-model:page-size="pageSize"
+ :page-sizes="[10, 20, 50, 100]"
+ :background="true"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="total"
+ />
<!-- </el-affix> -->
<CompNoticeAddDrawer
v-model:drawer="drawer"
@@ -138,9 +138,9 @@
</template>
<script>
-import noticeApi from '@/api/noticeApi';
+import noticeApi from '@/api/fytz/noticeApi';
import { useDateFormat } from '@vueuse/core';
-import { enumScene_1 } from '@/enum/scene';
+import { enumScene } from '@/enum/scene';
import { enumDistrict } from '@/enum/district';
import { enumNotice } from '@/enum/notice';
@@ -156,7 +156,7 @@
loading: false,
drawer: false,
districts: enumDistrict(),
- sceneTypes: enumScene_1(),
+ sceneTypes: enumScene(1),
noticeTypes: enumNotice(),
formSearch: {
district: '',
@@ -173,12 +173,12 @@
// }
currentPage(nValue, oValue) {
if (nValue != oValue) {
- this.onNoticeType()
+ this.onNoticeType();
}
},
pageSize(nValue, oValue) {
if (nValue != oValue) {
- this.onNoticeType()
+ this.onNoticeType();
}
},
},
@@ -204,13 +204,13 @@
type: noticeType,
subtype: noticeSubType,
page: this.currentPage,
- perPage: this.pageSize
+ perPage: this.pageSize,
})
.then((res) => {
if (res.success) {
this.tableData = res.data;
- this.currentPage = res.head.page
- this.total = res.head.totalCount
+ this.currentPage = res.head.page;
+ this.total = res.head.totalCount;
}
})
.finally(() => {
@@ -219,15 +219,21 @@
// noticeApi.getNotification().then()
},
districtFormatter(row) {
- let district = '鏈缃�';
- this.districts.forEach((d) => {
- if (d.value == row.ecExtension1) {
- district = d.label;
- return;
- }
- });
- if (row.ecExtension1 == null) {
+ let district = '';
+ if (row.ecExtension1 == null || row.ecExtension1 == '0;') {
district = '鍏ㄩ儴';
+ } else if (row.ecExtension1 == '-1') {
+ district = '鏈缃�';
+ } else {
+ row.ecExtension1.split(';').forEach((t) => {
+ this.districts.forEach((d) => {
+ if (t == d.value) {
+ district += d.label + '銆�';
+ return;
+ }
+ });
+ });
+ district = district.slice(0, district.length - 1)
}
return district;
},
@@ -246,6 +252,7 @@
}
});
});
+ scene = scene.slice(0, scene.length - 1)
}
return scene;
},
--
Gitblit v1.9.3