Procházet zdrojové kódy

事项清单 首页 展示(树+table )

Luka před 1 měsícem
rodič
revize
a50a039fe8

+ 9 - 0
src/api/address/index.ts

@@ -0,0 +1,9 @@
+import request from '@/utils/request';
+
+// 查询单位机构tree列表
+export function getDeptTree() {
+	return request({
+		url: '/system/user/deptTree',
+		method: 'get',
+	});
+}

+ 105 - 103
src/permission.ts

@@ -26,109 +26,111 @@ router.beforeEach((to, from, next) => {
 			pageSize: 10,
 		};
 
-        to.meta.title && useSettingsStore().setTitle(to.meta.title);
-        /* has token*/
-        if (to.path === '/login') {
-            next({ path: '/' });
-            NProgress.done();
-        } else {
-            /* TODO 暂时隐藏登陆逻辑 */
-            // if (useUserStore().roles.length === 0) {
-            //     isRelogin.show = true;
-            //     // 判断当前用户是否已拉取完user_info信息
-            //     useUserStore()
-            //         .getInfo()
-            //         .then(() => {
-            //             isRelogin.show = false;
-            //             usePermissionStore()
-            //                 .generateRoutes()
-            //                 .then(accessRoutes => {
-            //                     // 根据roles权限生成可访问的路由表
-            //                     accessRoutes.forEach(route => {
-            //                         if (!isHttp(route.path)) {
-            //                             router.addRoute(route); // 动态添加可访问路由表
-            //                         }
-            //                     });
-            //                     next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
-            //                 });
-            //         })
-            //         .catch(err => {
-            //             useUserStore()
-            //                 .logOut()
-            //                 .then(() => {
-            //                     ElMessage.error(err);
-            //                     next({ path: '/' });
-            //                 });
-            //         });
-            // } else {
-            //     next();
-            // }
-            next();
-        }
-    } else {
-        // TODO 暂时使用 待联调登陆的时候删除
-        setToken('Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiI5V3ZQVmZidzlyajJFbTl6c1pkTGdPdG4weVB5VExreSIsImNsaWVudGlkIjoiZTVjZDdlNDg5MWJmOTVkMWQxOTIwNmNlMjRhN2IzMmUiLCJ0ZW5hbnRJZCI6IjAwMDAwMCIsInVzZXJJZCI6MSwidXNlck5hbWUiOiJhZG1pbiIsImRlcHRJZCI6MTAzLCJkZXB0TmFtZSI6IueglOWPkemDqOmXqCIsImRlcHRDYXRlZ29yeSI6IiJ9.kwUOvSGXLVGJJxJE4Lvplov6vyItS-_NhKdw5cOwis4');
-        next();
-        // 没有token
-        if (whiteList.indexOf(to.path) !== -1) {
-            // 在免登录白名单,直接进入
-            next();
-        } else if (to.fullPath.includes('code=')) {
-            const codeFromUrl = to.fullPath.split('=')[1];
-            callback(codeFromUrl).then((res: any) => {
-                setToken(res.token);
-                to.meta.title && useSettingsStore().setTitle(to.meta.title);
-                /* has token*/
-                if (to.path === '/login') {
-                    next({ path: '/' });
-                    NProgress.done();
-                } else {
-                    if (useUserStore().roles.length === 0) {
-                        isRelogin.show = true;
-                        // 判断当前用户是否已拉取完user_info信息
-                        useUserStore()
-                            .getInfo()
-                            .then(() => {
-                                isRelogin.show = false;
-                                usePermissionStore()
-                                    .generateRoutes()
-                                    .then(accessRoutes => {
-                                        // 根据roles权限生成可访问的路由表
-                                        accessRoutes.forEach(route => {
-                                            if (!isHttp(route.path)) {
-                                                router.addRoute(route); // 动态添加可访问路由表
-                                            }
-                                        });
-                                        next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
-                                    });
-                            })
-                            .catch(err => {
-                                useUserStore()
-                                    .logOut()
-                                    .then(() => {
-                                        ElMessage.error(err);
-                                        next({ path: '/' });
-                                    });
-                            });
-                    } else {
-                        next();
-                    }
-                }
-                next();
-            });
-        } else if (process.env.NODE_ENV === 'production') {
-            // 单点登录
-            if (to.fullPath.includes('manage')) {
-                next('/login');
-            } else {
-                location.href = `${import.meta.env.VITE_APP_BASE_API}/thirdPartyLogin`;
-            }
-        } else {
-            // next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
-            next('/login');
-            NProgress.done();
-        }
-    }
+		to.meta.title && useSettingsStore().setTitle(to.meta.title);
+		/* has token*/
+		if (to.path === '/login') {
+			next({ path: '/' });
+			NProgress.done();
+		} else {
+			/* TODO 暂时隐藏登陆逻辑 */
+			// if (useUserStore().roles.length === 0) {
+			//     isRelogin.show = true;
+			//     // 判断当前用户是否已拉取完user_info信息
+			//     useUserStore()
+			//         .getInfo()
+			//         .then(() => {
+			//             isRelogin.show = false;
+			//             usePermissionStore()
+			//                 .generateRoutes()
+			//                 .then(accessRoutes => {
+			//                     // 根据roles权限生成可访问的路由表
+			//                     accessRoutes.forEach(route => {
+			//                         if (!isHttp(route.path)) {
+			//                             router.addRoute(route); // 动态添加可访问路由表
+			//                         }
+			//                     });
+			//                     next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
+			//                 });
+			//         })
+			//         .catch(err => {
+			//             useUserStore()
+			//                 .logOut()
+			//                 .then(() => {
+			//                     ElMessage.error(err);
+			//                     next({ path: '/' });
+			//                 });
+			//         });
+			// } else {
+			//     next();
+			// }
+			next();
+		}
+	} else {
+		// TODO 暂时使用 待联调登陆的时候删除
+		setToken(
+			'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJleTJ4blVTTUJsSG9oMzB2SVZZUTZlVk1KYkdSVmxIeCIsImNsaWVudGlkIjoiZTVjZDdlNDg5MWJmOTVkMWQxOTIwNmNlMjRhN2IzMmUiLCJ0ZW5hbnRJZCI6IjAwMDAwMCIsInVzZXJJZCI6MSwidXNlck5hbWUiOiJhZG1pbiIsImRlcHRJZCI6MTAzLCJkZXB0TmFtZSI6IueglOWPkemDqOmXqCIsImRlcHRDYXRlZ29yeSI6IiJ9.XYV-L7rGYJDUKs25RtjPrFORH-CHz79DUJ-NCB61sVo'
+		);
+		next();
+		// 没有token
+		if (whiteList.indexOf(to.path) !== -1) {
+			// 在免登录白名单,直接进入
+			next();
+		} else if (to.fullPath.includes('code=')) {
+			const codeFromUrl = to.fullPath.split('=')[1];
+			callback(codeFromUrl).then((res: any) => {
+				setToken(res.token);
+				to.meta.title && useSettingsStore().setTitle(to.meta.title);
+				/* has token*/
+				if (to.path === '/login') {
+					next({ path: '/' });
+					NProgress.done();
+				} else {
+					if (useUserStore().roles.length === 0) {
+						isRelogin.show = true;
+						// 判断当前用户是否已拉取完user_info信息
+						useUserStore()
+							.getInfo()
+							.then(() => {
+								isRelogin.show = false;
+								usePermissionStore()
+									.generateRoutes()
+									.then(accessRoutes => {
+										// 根据roles权限生成可访问的路由表
+										accessRoutes.forEach(route => {
+											if (!isHttp(route.path)) {
+												router.addRoute(route); // 动态添加可访问路由表
+											}
+										});
+										next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
+									});
+							})
+							.catch(err => {
+								useUserStore()
+									.logOut()
+									.then(() => {
+										ElMessage.error(err);
+										next({ path: '/' });
+									});
+							});
+					} else {
+						next();
+					}
+				}
+				next();
+			});
+		} else if (process.env.NODE_ENV === 'production') {
+			// 单点登录
+			if (to.fullPath.includes('manage')) {
+				next('/login');
+			} else {
+				location.href = `${import.meta.env.VITE_APP_BASE_API}/thirdPartyLogin`;
+			}
+		} else {
+			// next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
+			next('/login');
+			NProgress.done();
+		}
+	}
 });
 
 router.afterEach(() => {

+ 17 - 46
src/views/addressBook/components/treeSelect.vue

@@ -30,7 +30,8 @@
 <script setup lang="ts">
 import { ref, computed } from 'vue';
 import { ElTree } from 'element-plus';
-import { fa } from 'element-plus/es/locale';
+import { getDeptTree } from '@/api/address/index';
+import { el } from 'element-plus/es/locale';
 
 const emit = defineEmits(['treeCheck']);
 
@@ -52,51 +53,21 @@ const checkedKeys = ref<(string | number)[]>([]);
 // 树形组件实例
 const treeRef = ref<InstanceType<typeof ElTree>>();
 // 树形结构数据(模拟后端返回数据)
-const treeData = ref<Tree[]>([
-	{
-		id: 1,
-		label: '交通部根节点',
-		children: [
-			{ id: 11, label: 'XXXXXXXX机构11' },
-			{
-				id: 12,
-				label: 'XXXXXXXX机构12',
-				children: [
-					{ id: 121, label: 'XXXXXXXX机构121' },
-					{ id: 122, label: 'XXXXXXXX机构123' },
-					{ id: 123, label: 'XXXXXXXX机构123' },
-					{ id: 124, label: 'XXXXXXXX机构124' },
-					{ id: 125, label: 'XXXXXXXX机构125' },
-					{ id: 126, label: 'XXXXXXXX机构126' },
-				],
-			},
-			{
-				id: 13,
-				label: 'XXXXXXXX机构13',
-				children: [
-					{ id: 131, label: 'XXXXXXXX机构131' },
-					{ id: 132, label: 'XXXXXXXX机构132' },
-					{ id: 133, label: 'XXXXXXXX机构133' },
-					{ id: 134, label: 'XXXXXXXX机构134' },
-					{ id: 135, label: 'XXXXXXXX机构135' },
-					{ id: 136, label: 'XXXXXXXX机构136' },
-				],
-			},
-			{
-				id: 14,
-				label: 'XXXXXXXX机构14',
-				children: [
-					{ id: 141, label: 'XXXXXXXX机构141' },
-					{ id: 142, label: 'XXXXXXXX机构142' },
-					{ id: 143, label: 'XXXXXXXX机构143' },
-					{ id: 144, label: 'XXXXXXXX机构144' },
-					{ id: 145, label: 'XXXXXXXX机构145' },
-					{ id: 146, label: 'XXXXXXXX机构146' },
-				],
-			},
-		],
-	},
-]);
+const treeData = ref<Tree[]>();
+
+onMounted(async () => {
+	getTree();
+});
+// 过滤节点(搜索功能)
+const getTree = () => {
+	getDeptTree().then((res: any) => {
+		if (res.code == 200) {
+			treeData.value = res.data;
+		} else {
+			treeData.value = [];
+		}
+	});
+};
 
 // 过滤节点(搜索功能)
 const filterNode = (value: string, data: any) => {

+ 12 - 12
src/views/addressBook/config/content.config.ts

@@ -1,24 +1,24 @@
 const contentConfig = {
 	pageName: 'ntlo',
 	header: {
-		title: '行内联络员',
+		title: '',
 	},
 	pageListParams: {
-		type: 'industry',
+		industryType: '1',
 	},
 	propsList: [
 		{ type: 'index', label: '序号' },
-		{ type: 'normal', label: '单位名称', sortable: true, prop: 'contactDeptName' },
-		{ type: 'normal', label: '所属部门', sortable: true, prop: 'relName', width: 140 },
-		{ type: 'normal', label: '职务', prop: 'dutyName', sortable: true, width: 140 },
-		{ type: 'normal', label: '联络人姓名', prop: 'userName', width: 140 },
-		{ type: 'normal', label: '联系方式', prop: 'mobilePhone', width: 140 },
-		{ type: 'normal', label: '固定电话', prop: 'telephone', width: 140 },
-		{ type: 'normal', label: '短信接收人', prop: 'msgReceiver', width: 140 },
-		{ type: 'normal', label: '传真号', prop: 'faxNum', width: 140 },
-		{ type: 'normal', label: '微信号', prop: 'wx', width: 140 },
+		{ type: 'normal', label: '单位名称', sortable: true, prop: 'unitName' },
+		{ type: 'normal', label: '所属部门', sortable: true, prop: 'belongsDept', width: 140 },
+		{ type: 'normal', label: '职务', prop: 'position', sortable: true, width: 140 },
+		{ type: 'normal', label: '联络人姓名', prop: 'contactName', width: 140 },
+		{ type: 'normal', label: '联系方式', prop: 'contactNumber', width: 140 },
+		{ type: 'normal', label: '固定电话', prop: 'fixedTelephone', width: 140 },
+		{ type: 'custom', label: '短信接收人', slotName: 'msgRecipient', prop: 'msgRecipient', width: 140 },
+		{ type: 'normal', label: '传真号', prop: 'faxNumber', width: 140 },
+		{ type: 'normal', label: '微信号', prop: 'wxNumber', width: 140 },
 		{ type: 'normal', label: '电子邮箱', prop: 'email', width: 140 },
-		{ type: 'normal', label: '通讯录状态', prop: 'status', width: 180 },
+		{ type: 'custom', label: '通讯录状态', slotName: 'abStatus', prop: 'abStatus', width: 180 },
 		{ type: 'handler', label: '操作', slotName: 'operate', width: 180, fixed: 'right' },
 	],
 };

+ 11 - 12
src/views/addressBook/config/content.nonIndustry.config.ts

@@ -1,24 +1,23 @@
 const contentConfig = {
 	pageName: 'ntlo',
 	header: {
-		title: '行外联络员',
+		title: '',
 	},
 	pageListParams: {
-		type: 'nonIndustry',
+		industryType: '2',
 	},
 	propsList: [
 		{ type: 'index', label: '序号' },
-		{ type: 'normal', label: '单位名称', sortable: true, prop: 'contactDeptName' },
-		{ type: 'normal', label: '所属部门', sortable: true, prop: 'relName', width: 140 },
-		{ type: 'normal', label: '职务', prop: 'dutyName', sortable: true, width: 140 },
-		{ type: 'normal', label: '联络人姓名', prop: 'userName', width: 140 },
-		{ type: 'normal', label: '联系方式', prop: 'mobilePhone', width: 140 },
-		{ type: 'normal', label: '固定电话', prop: 'telephone', width: 140 },
-		{ type: 'normal', label: '短信接收人', prop: 'msgReceiver', width: 140 },
-		{ type: 'normal', label: '传真号', prop: 'faxNum', width: 140 },
-		{ type: 'normal', label: '微信号', prop: 'wx', width: 140 },
+		{ type: 'normal', label: '单位名称', sortable: true, prop: 'unitName' },
+		{ type: 'normal', label: '所属部门', sortable: true, prop: 'belongsDept', width: 140 },
+		{ type: 'normal', label: '职务', prop: 'position', sortable: true, width: 140 },
+		{ type: 'normal', label: '联络人姓名', prop: 'contactName', width: 140 },
+		{ type: 'normal', label: '联系方式', prop: 'contactNumber', width: 140 },
+		{ type: 'normal', label: '固定电话', prop: 'fixedTelephone', width: 140 },
+		{ type: 'normal', label: '传真号', prop: 'faxNumber', width: 140 },
+		{ type: 'normal', label: '微信号', prop: 'wxNumber', width: 140 },
 		{ type: 'normal', label: '电子邮箱', prop: 'email', width: 140 },
-		{ type: 'normal', label: '通讯录状态', prop: 'status', width: 180 },
+		{ type: 'custom', label: '通讯录状态', slotName: 'abStatus', prop: 'abStatus', width: 180 },
 		{ type: 'handler', label: '操作', slotName: 'operate', width: 180, fixed: 'right' },
 	],
 };

+ 14 - 16
src/views/addressBook/config/search.config.ts

@@ -5,45 +5,43 @@ interface Inew {
 
 const searchConfig = {
 	pageName: 'ntlo',
-	pageListParams: {
-		type: 'industry',
-		deptIds: '',
-	},
+	// pageListParams: {
+	// 	industryType: '1',
+	// 	belongsDept: '',
+	// },
 	formItems: [
 		{
 			label: '姓名',
-			prop: 'rentalCompanyCode',
+			prop: 'contactName',
 			type: 'input',
-			placeholder: '请输入姓名',
+			placeholder: '请输入联络员姓名',
 		},
 		{
 			label: '部门',
-			prop: 'unitLevel',
-			type: 'select',
-			options: [] as Array<Inew>,
-			multiple: true,
-			placeholder: '请选择部门',
+			prop: 'belongsDept',
+			type: 'input',
+			placeholder: '请输入联络员部门',
 		},
 		{
 			label: '联系电话',
-			prop: 'rentalCompanyCode',
+			prop: 'contactNumber',
 			type: 'input',
 			placeholder: '请输入联系电话',
 		},
 		{
 			label: '短信接收人',
-			prop: 'person',
+			prop: 'msgRecipient',
 			type: 'select',
 			options: [] as Array<Inew>,
-			multiple: true,
+			multiple: false,
 			placeholder: '请选择短信接收人',
 		},
 		{
 			label: '通讯录状态',
-			prop: 'status',
+			prop: 'abStatus',
 			type: 'select',
 			options: [] as Array<Inew>,
-			multiple: true,
+			multiple: false,
 			placeholder: '请选择通讯录状态',
 		},
 	],

+ 12 - 14
src/views/addressBook/config/search.nonIndustry.config.ts

@@ -5,37 +5,35 @@ interface Inew {
 
 const searchConfig = {
 	pageName: 'ntlo',
-	pageListParams: {
-		type: 'nonIndustry',
-		deptIds: '',
-	},
+	// pageListParams: {
+	// 	industryType: '2',
+	// 	belongsDept: '',
+	// },
 	formItems: [
 		{
 			label: '姓名',
-			prop: 'rentalCompanyCode',
+			prop: 'contactName',
 			type: 'input',
-			placeholder: '请输入姓名',
+			placeholder: '请输入联络员姓名',
 		},
 		{
 			label: '部门',
-			prop: 'unitLevel',
-			type: 'select',
-			options: [] as Array<Inew>,
-			multiple: true,
-			placeholder: '请选择部门',
+			prop: 'belongsDept',
+			type: 'input',
+			placeholder: '请输入联络员部门',
 		},
 		{
 			label: '联系电话',
-			prop: 'rentalCompanyCode',
+			prop: 'contactNumber',
 			type: 'input',
 			placeholder: '请输入联系电话',
 		},
 		{
 			label: '通讯录状态',
-			prop: 'status',
+			prop: 'abStatus',
 			type: 'select',
 			options: [] as Array<Inew>,
-			multiple: true,
+			multiple: false,
 			placeholder: '请选择通讯录状态',
 		},
 	],

+ 58 - 20
src/views/addressBook/index.vue

@@ -6,14 +6,36 @@
 				<div class="table-box">
 					<pageSearch
 						ref="searchTableRef"
-						:searchConfig="activeTab === 'industry' ? searchConfig : searchNonIndustryConfig"
+						:searchConfig="activeTab === '1' ? searchConfig : searchNonIndustryConfig"
 					/>
 					<pageContent
 						ref="tableListRef"
 						:total="total"
-						:contentConfig="activeTab === 'industry' ? contentConfig : contentNonIndustryConfig"
+						:contentConfig="activeTab === '1' ? contentConfig : contentNonIndustryConfig"
 						:pageList="tableData"
 					>
+						<!-- 短信接收人 -->
+						<template #msgRecipient="scope">
+							<template :index="index" v-for="(item, index) in bj_msg_recipient">
+								<el-tag
+									:index="index"
+									v-if="item.value == scope.row.msgRecipient"
+									:type="scope.row.msgRecipient == '1' ? 'success' : 'danger'"
+									>{{ item.label }}</el-tag
+								>
+							</template>
+						</template>
+						<!-- 通讯录状态 -->
+						<template #abStatus="scope">
+							<template :index="index" v-for="(item, index) in bj_ab_status">
+								<el-tag
+									:index="index"
+									v-if="item.value == scope.row.abStatus"
+									:type="scope.row.abStatus == '1' ? 'success' : 'danger'"
+									>{{ item.label }}</el-tag
+								>
+							</template>
+						</template>
 						<template #button>
 							<el-button type="primary" @click="onImport()">导入</el-button>
 							<el-button type="primary" @click="onImport()">下载模版</el-button>
@@ -32,7 +54,7 @@
 			</div>
 		</el-tab-pane>
 	</el-tabs>
-	<pageDetail :modalConfig="activeTab === 'industry' ? detailConfig : detailNonIndustryConfig" ref="modalRef">
+	<pageDetail :modalConfig="activeTab === '1' ? detailConfig : detailNonIndustryConfig" ref="modalRef">
 	</pageDetail>
 </template>
 
@@ -49,9 +71,16 @@ import pageDetail from './components/detail.vue';
 import useSystemStore from '@/store/main';
 import TreeSelect from './components/treeSelect.vue';
 import { type TabsPaneContext } from 'element-plus';
+import { outTypeList } from '@/libs/commonMeth';
+
+const bj_msg_recipient = outTypeList('bj_msg_recipient'); //短信接收人
+const bj_ab_status: any = outTypeList('bj_ab_status'); //通讯录状态
 // 使用pinia数据
 const systemStore = useSystemStore();
-const { pageDetailInfo } = storeToRefs(systemStore);
+const { pageDetailInfo, searchObj } = storeToRefs(systemStore);
+watch(searchObj, newval => {
+	console.log('=====' + JSON.stringify(newval));
+});
 
 const total = ref(0);
 const pageSize = ref([10, 20, 30]);
@@ -60,7 +89,7 @@ const tableListRef = ref<InstanceType<typeof pageContent>>();
 
 const tabs = reactive([
 	{
-		key: 'industry',
+		key: '1',
 		label: '行业内联络员',
 		total: 0,
 		tableData: [],
@@ -68,7 +97,7 @@ const tabs = reactive([
 		showDetail: true,
 	},
 	{
-		key: 'nonIndustry',
+		key: '2',
 		label: '行业外联络员',
 		total: 0,
 		tableData: [],
@@ -77,7 +106,7 @@ const tabs = reactive([
 	},
 ]);
 
-const activeTab = ref('industry');
+const activeTab = ref('1');
 
 // 操作弹框
 import usePageModal from '@/components/components/hooks/usePageDetails';
@@ -85,22 +114,23 @@ const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick,
 	usePageModal();
 
 const getTreeCheck = async data => {
-	// console.log(await tableListRef.value);
-	// console.log(data);
+	console.log(data);
+	// console.log(searchObj);
 	if (tableListRef.value) {
-		if (activeTab.value == 'industry') {
-			searchConfig.pageListParams.deptIds = data.join();
-		} else {
-			searchNonIndustryConfig.pageListParams.deptIds = data.join();
-		}
-
-		await tableListRef.value[0].fetchPageListData({ deptIds: data.join() });
+		// if (activeTab.value == '1') {
+		// 	console.log(data.join());
+		// 	searchConfig.pageListParams.belongsDept = data.join();
+		// 	console.log(searchConfig);
+		// } else {
+		// 	searchNonIndustryConfig.pageListParams.belongsDept = data.join();
+		// }
+
+		await tableListRef.value[0].fetchPageListData({ belongsDept: data.join() });
 	}
 };
 const treeSelectdRef = ref<InstanceType<typeof TreeSelect>>();
 const searchTableRef = ref<InstanceType<typeof pageSearch>>();
 const handleClick = async (tab: TabsPaneContext) => {
-	console.log(tab.props.name);
 	setTimeout(() => {
 		if (treeSelectdRef.value) {
 			treeSelectdRef.value[0].handleReset(false);
@@ -154,11 +184,19 @@ function onDelete(value: any) {
 		});
 }
 
-// 筛选-状态赋值
+// 筛选-状态赋值 bj_notification_status
 async function searchItem() {
 	searchConfig.formItems.forEach(item => {
-		if (item.prop === 'status') {
-			// item.options = searchList.value;
+		if (item.prop === 'msgRecipient') {
+			item.options = bj_msg_recipient;
+		}
+		if (item.prop === 'abStatus') {
+			item.options = bj_ab_status;
+		}
+	});
+	searchNonIndustryConfig.formItems.forEach(item => {
+		if (item.prop === 'abStatus') {
+			item.options = bj_ab_status;
 		}
 	});
 }

+ 41 - 55
src/views/myPublish/index.vue

@@ -1,36 +1,22 @@
 <template>
 	<div class="sensitive-words">
-			<pageSearch ref="searchTableRef" :searchConfig="searchConfig" />
+		<pageSearch ref="searchTableRef" :searchConfig="searchConfig" />
 
-			<pageContent ref="tableListRef" :total="total" :contentConfig="contentConfig" :pageList="tableData">
-					<template #button>
-							<el-button type="primary" @click="handleAdd()">新增</el-button>
-							<el-button type="primary" @click="handleAdd()">导出</el-button>
-					</template>
-					<template #operate="scope">
-							<el-button type="primary" link @click="handleEdit(scope.row.rentalCompanyId)">
-									查看
-							</el-button>
-							<el-button type="primary" link @click="handleEdit(scope.row.rentalCompanyId)">
-									编辑
-							</el-button>
-							<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)">
-									删除
-							</el-button>
-							<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)">
-									撤回
-							</el-button>
-							<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)">
-									重新发布
-							</el-button>
-							<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)">
-									补正信息
-							</el-button>
-							<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)">
-									结案操作
-							</el-button>
-					</template>
-			</pageContent>
+		<pageContent ref="tableListRef" :total="total" :contentConfig="contentConfig" :pageList="tableData">
+			<template #button>
+				<el-button type="primary" @click="handleAdd()">新增</el-button>
+				<el-button type="primary" @click="handleAdd()">导出</el-button>
+			</template>
+			<template #operate="scope">
+				<el-button type="primary" link @click="handleEdit(scope.row.rentalCompanyId)"> 查看 </el-button>
+				<el-button type="primary" link @click="handleEdit(scope.row.rentalCompanyId)"> 编辑 </el-button>
+				<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"> 删除 </el-button>
+				<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"> 撤回 </el-button>
+				<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"> 重新发布 </el-button>
+				<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"> 补正信息 </el-button>
+				<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"> 结案操作 </el-button>
+			</template>
+		</pageContent>
 	</div>
 </template>
 
@@ -55,7 +41,7 @@ const total = ref(0);
 const pageSize = ref([10, 20, 30]);
 const tableData = ref([]);
 const tableListRef = ref();
-const router = useRouter()
+const router = useRouter();
 
 // 操作弹框
 import usePageModal from '@/components/components/hooks/usePageDetails';
@@ -70,44 +56,44 @@ const handleEdit = async (id: string) => {
 // 新增按钮
 const handleAdd = () => {
 	router.push({
-    name: 'addPublish',
-    query: { type: 'add' }
-  });
+		name: 'addPublish',
+		query: { type: 'add' },
+	});
 };
 const searchTableRef = ref();
 const onClickDeleta = async (row: any) => {
 	ElMessageBox.confirm('确认删除此条数据吗?', '删除', {
-			confirmButtonText: '确认',
-			cancelButtonText: '取消',
-			type: 'warning',
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
 	}).then(() => {
-			// 删除后的回调
+		// 删除后的回调
 	});
 };
 // 删除按钮
 function handleDelete(value: any) {
 	ElMessageBox.confirm('是否删除这条数据?', '删除提示', {
-			confirmButtonText: '确定',
-			cancelButtonText: '取消',
-			type: 'warning',
+		confirmButtonText: '确定',
+		cancelButtonText: '取消',
+		type: 'warning',
 	})
-			.then(() => {
-					systemStore.deletePageDataAction(contentConfig.pageName, value);
-			})
-			.catch(() => {
-					ElMessage({
-							type: 'info',
-							message: '取消删除',
-					});
+		.then(() => {
+			systemStore.deletePageDataAction(contentConfig.pageName, value);
+		})
+		.catch(() => {
+			ElMessage({
+				type: 'info',
+				message: '取消删除',
 			});
+		});
 }
 
 // 筛选-状态赋值
 async function searchItem() {
 	searchConfig.formItems.forEach(item => {
-			if (item.prop === 'status') {
-					// item.options = searchList.value;
-			}
+		if (item.prop === 'status') {
+			// item.options = searchList.value;
+		}
 	});
 }
 searchItem();
@@ -124,9 +110,9 @@ searchItem();
 	position: relative;
 
 	.status-tip {
-			position: absolute;
-			top: 2px;
-			left: 60px;
+		position: absolute;
+		top: 2px;
+		left: 60px;
 	}
 }
 

+ 54 - 54
vite.config.ts

@@ -3,58 +3,58 @@ import createVitePlugins from './vite/plugins';
 import path from 'path';
 
 export default defineConfig(({ mode, command }) => {
-    const env = loadEnv(mode, process.cwd());
-    const { VITE_APP_ENV } = env;
-    return {
-        plugins: createVitePlugins(env, command === 'build'),
-        // 部署生产环境和开发环境下的URL。
-        // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
-        // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
-        base: VITE_APP_ENV === 'production' ? '/' : '/',
-        server: {
-            port: 80,
-            host: true,
-            open: true,
-            proxy: {
-                // https://cn.vitejs.dev/config/#server-proxy
-                '/dev-api': {
-                    target: 'http://localhost:8080',
-                    changeOrigin: true,
-                    rewrite: p => p.replace(/^\/dev-api/, ''),
-                },
-            },
-        },
-        resolve: {
-            alias: {
-                // 设置路径
-                '~': path.resolve(__dirname, './'),
-                // 设置别名
-                '@': path.resolve(__dirname, './src'),
-            },
-        },
-        build: {
-            // chunkSizeWarningLimit: 1500,
-            rollupOptions: {
-                output: {
-                    manualChunks(id) {
-                        if (id.includes('element-plus/theme')) {
-                            return 'ele';
-                        }
-                        // if (id.includes('node_modules')) {
-                        //     return id.toString().split('node_modules/.pnpm/')[1].split('/').toString();
-                        // }
-                    },
-                },
-            },
-            minify: 'terser',
-            terserOptions: {
-                compress: {
-                    // eslint-disable-next-line camelcase
-                    drop_console: true,
-                    // eslint-disable-next-line camelcase
-                    drop_debugger: true,
-                }
-            },
-        },
-    };
+	const env = loadEnv(mode, process.cwd());
+	const { VITE_APP_ENV } = env;
+	return {
+		plugins: createVitePlugins(env, command === 'build'),
+		// 部署生产环境和开发环境下的URL。
+		// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
+		// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
+		base: VITE_APP_ENV === 'production' ? '/' : '/',
+		server: {
+			port: 80,
+			host: true,
+			open: true,
+			proxy: {
+				// https://cn.vitejs.dev/config/#server-proxy
+				'/dev-api': {
+					target: 'http://u68b4f5c.natappfree.cc/',
+					changeOrigin: true,
+					rewrite: p => p.replace(/^\/dev-api/, ''),
+				},
+			},
+		},
+		resolve: {
+			alias: {
+				// 设置路径
+				'~': path.resolve(__dirname, './'),
+				// 设置别名
+				'@': path.resolve(__dirname, './src'),
+			},
+		},
+		build: {
+			// chunkSizeWarningLimit: 1500,
+			rollupOptions: {
+				output: {
+					manualChunks(id) {
+						if (id.includes('element-plus/theme')) {
+							return 'ele';
+						}
+						// if (id.includes('node_modules')) {
+						//     return id.toString().split('node_modules/.pnpm/')[1].split('/').toString();
+						// }
+					},
+				},
+			},
+			minify: 'terser',
+			terserOptions: {
+				compress: {
+					// eslint-disable-next-line camelcase
+					drop_console: true,
+					// eslint-disable-next-line camelcase
+					drop_debugger: true,
+				},
+			},
+		},
+	};
 });