|
|
@@ -1,16 +1,96 @@
|
|
|
<template>
|
|
|
<div class="sensitive-words">
|
|
|
- <pageSearch ref="searchTableRef" :searchConfig="searchConfig" />
|
|
|
+ <pageSearch ref="searchTableRef" :searchConfig="searchConfig">
|
|
|
+ <template #publishingUnit="scope">
|
|
|
+ <el-tree-select
|
|
|
+ v-model="scope.value"
|
|
|
+ :data="treeData"
|
|
|
+ node-key="id"
|
|
|
+ filterable
|
|
|
+ @change="newVal => onMessageChange(scope, newVal)"
|
|
|
+ placeholder="请选择发布单位"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #deliveryUnit="scope">
|
|
|
+ <el-tree-select
|
|
|
+ v-model="scope.value"
|
|
|
+ :data="treeData"
|
|
|
+ node-key="id"
|
|
|
+ filterable
|
|
|
+ @change="newVal => onMessageChange(scope, newVal)"
|
|
|
+ placeholder="请选择发出单位"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #lonmMiddle="scope">
|
|
|
+ <el-tree-select
|
|
|
+ v-model="scope.value"
|
|
|
+ :data="treeData"
|
|
|
+ node-key="id"
|
|
|
+ filterable
|
|
|
+ @change="newVal => onMessageChange(scope, newVal)"
|
|
|
+ placeholder="请选择接收单位"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </pageSearch>
|
|
|
|
|
|
<pageContent ref="tableListRef" :total="total" :contentConfig="contentConfig" :pageList="tableData">
|
|
|
<template #button>
|
|
|
<el-button type="primary" @click="handleAdd()">新增</el-button>
|
|
|
</template>
|
|
|
+ <!-- 通报类型 -->
|
|
|
+ <template #notificationType="scope">
|
|
|
+ <template :index="index" v-for="(item, index) in bj_notification_type">
|
|
|
+ <el-tag :index="index" v-if="item.value == scope.row.notificationType" type="success">{{
|
|
|
+ item.label
|
|
|
+ }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <!-- 通报事项类别 -->
|
|
|
+ <template #conm="scope">
|
|
|
+ <template :index="index" v-for="(item, index) in bj_category_onm">
|
|
|
+ <el-tag :index="index" v-if="item.value == scope.row.conm" type="primary">{{ item.label }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 发布状态 -->
|
|
|
+ <template #releaseStatus="scope">
|
|
|
+ <template :index="index" v-for="(item, index) in bj_nl_released_status">
|
|
|
+ <el-tag
|
|
|
+ :index="index"
|
|
|
+ v-if="item.value == scope.row.releaseStatus"
|
|
|
+ :type="
|
|
|
+ scope.row.releaseStatus == '1' ? 'primary' : scope.row.releaseStatus == '2' ? 'success' : 'info'
|
|
|
+ "
|
|
|
+ >{{ item.label }}</el-tag
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </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="handleEdit(scope.row.rentalCompanyId)"
|
|
|
+ v-if="scope.row.releaseStatus == 1"
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ @click="handleDelete(scope.row.rentalCompanyId)"
|
|
|
+ v-if="scope.row.releaseStatus == 1"
|
|
|
+ >
|
|
|
+ 启用
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ @click="handleDelete(scope.row.rentalCompanyId)"
|
|
|
+ v-if="scope.row.releaseStatus == 2"
|
|
|
+ >
|
|
|
+ 废止
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</pageContent>
|
|
|
<pageDetail :modalConfig="detailConfig" ref="modalRef"> </pageDetail>
|
|
|
@@ -25,6 +105,15 @@ import pageSearch from '@/components/components/pageSearch.vue';
|
|
|
import detailConfig from './config/detail.config';
|
|
|
import pageDetail from './components/detail.vue';
|
|
|
import useSystemStore from '@/store/main';
|
|
|
+import { outTypeList, outDeptTree } from '@/libs/commonMeth';
|
|
|
+import { TreeOptions } from '@/types/global';
|
|
|
+
|
|
|
+// 通报事项类别 bj_category_onm
|
|
|
+
|
|
|
+const bj_notification_type = outTypeList('bj_notification_type'); //通报类型
|
|
|
+const bj_category_onm = outTypeList('bj_category_onm'); //通报事项类别
|
|
|
+const bj_nl_released_status = outTypeList('bj_nl_released_status'); //通报事项清单发布状态
|
|
|
+
|
|
|
// 使用pinia数据
|
|
|
const systemStore = useSystemStore();
|
|
|
const { pageDetailInfo } = storeToRefs(systemStore);
|
|
|
@@ -36,14 +125,25 @@ const tableListRef = ref();
|
|
|
|
|
|
// 操作弹框
|
|
|
import usePageModal from '@/components/components/hooks/usePageDetails';
|
|
|
+import PageSearch from '@/components/components/pageSearch.vue';
|
|
|
const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick, handlePageDetail } =
|
|
|
usePageModal();
|
|
|
|
|
|
+// const onUnitChange = async (row: any, val) => {
|
|
|
+// console.log(row);
|
|
|
+// console.log('+++++++++++++++++++++++');
|
|
|
+// console.log(val);
|
|
|
+// };
|
|
|
+
|
|
|
const handleEdit = async (id: string) => {
|
|
|
await handlePageDetail(id);
|
|
|
await handleEditDataClick();
|
|
|
};
|
|
|
|
|
|
+const onMessageChange = (scope, newVal) => {
|
|
|
+ scope.onInput(newVal);
|
|
|
+};
|
|
|
+
|
|
|
// 新增按钮
|
|
|
const handleAdd = () => {
|
|
|
handleNewDataClick();
|
|
|
@@ -70,12 +170,93 @@ function handleDelete(value: any) {
|
|
|
// 筛选-状态赋值
|
|
|
async function searchItem() {
|
|
|
searchConfig.formItems.forEach(item => {
|
|
|
- if (item.prop === 'status') {
|
|
|
- // item.options = searchList.value;
|
|
|
+ if (item.prop === 'notificationType') {
|
|
|
+ item.options = bj_notification_type;
|
|
|
+ }
|
|
|
+ if (item.prop === 'conm') {
|
|
|
+ item.options = bj_category_onm;
|
|
|
+ }
|
|
|
+ if (item.prop === 'releaseStatus') {
|
|
|
+ item.options = bj_nl_released_status;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
searchItem();
|
|
|
+const treeData = ref<TreeOptions[]>();
|
|
|
+onMounted(async () => {
|
|
|
+ // treeData.value = await outDeptTree();
|
|
|
+ treeData.value = [
|
|
|
+ {
|
|
|
+ id: '1',
|
|
|
+ label: 'Level one 1',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '1-1',
|
|
|
+ label: 'Level two 1-1',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '1-1-1',
|
|
|
+ label: 'Level three 1-1-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '2',
|
|
|
+ label: 'Level one 2',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '2-1',
|
|
|
+ label: 'Level two 2-1',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '2-1-1',
|
|
|
+ label: 'Level three 2-1-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '2-2',
|
|
|
+ label: 'Level two 2-2',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '2-2-1',
|
|
|
+ label: 'Level three 2-2-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '3',
|
|
|
+ label: 'Level one 3',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '3-1',
|
|
|
+ label: 'Level two 3-1',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '3-1-1',
|
|
|
+ label: 'Level three 3-1-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '3-2',
|
|
|
+ label: 'Level two 3-2',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: '3-2-1',
|
|
|
+ label: 'Level three 3-2-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|