|
@@ -5,28 +5,26 @@
|
|
|
<div v-show="showSearch">
|
|
|
<el-form ref="queryFormRef" :model="queryParams" label-width="100px">
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="5">
|
|
|
- <el-form-item label="处理状态:">
|
|
|
- <el-select v-model="queryParams.disposeStatus" placeholder="全部" clearable>
|
|
|
- <el-option v-for="item in disposeStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-segmented v-model="queryParams.dispose_status" :options="disposeStatusOptions" size="large" block @change="handleDisposeStatus" />
|
|
|
</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
<el-col :span="5">
|
|
|
<el-form-item label="发布单位:">
|
|
|
- <el-input v-model="queryParams.publishUnit" placeholder="请输入内容" clearable></el-input>
|
|
|
+ <el-input v-model="queryParams.publish_group" placeholder="请输入内容" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="5">
|
|
|
<el-form-item label="发布状态:">
|
|
|
- <el-select v-model="queryParams.publishStatus" placeholder="请选择">
|
|
|
+ <el-select v-model="queryParams.publish_status" placeholder="请选择">
|
|
|
<el-option v-for="item in publishStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="5">
|
|
|
<el-form-item label="审批状态:">
|
|
|
- <el-select v-model="queryParams.approvalStatus" placeholder="请选择">
|
|
|
+ <el-select v-model="queryParams.examine_status" placeholder="请选择">
|
|
|
<el-option v-for="item in approvalStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -44,43 +42,43 @@
|
|
|
<!-- 表格组件 -->
|
|
|
<el-table ref="multipleTable" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange">
|
|
|
<el-table-column label="序号" align="center" prop="id" />
|
|
|
- <el-table-column label="发布单位" align="center" prop="publishUnit" />
|
|
|
- <el-table-column label="信息内容" align="center" prop="informationContent" />
|
|
|
- <el-table-column label="发布时间" align="center" prop="publishTime" />
|
|
|
- <el-table-column label="发布渠道" align="center" prop="publishChannel" />
|
|
|
- <el-table-column label="发布申请人" align="center" prop="applyPerson" />
|
|
|
- <el-table-column label="待处理人" align="center" prop="pendingPerson" />
|
|
|
- <el-table-column label="发布状态" align="center" prop="publishStatus">
|
|
|
+ <el-table-column label="发布单位" align="center" prop="publish_group" />
|
|
|
+ <el-table-column label="信息内容" align="center" prop="content" />
|
|
|
+ <el-table-column label="发布时间" align="center" prop="publish_time" />
|
|
|
+ <el-table-column label="发布渠道" align="center" prop="publish_channel" />
|
|
|
+ <el-table-column label="发布申请人" align="center" prop="nick_name" />
|
|
|
+ <el-table-column label="待处理人" align="center" prop="examine_user" />
|
|
|
+ <el-table-column label="发布状态" align="center" prop="publish_status">
|
|
|
<template #default="scope">
|
|
|
<div class="common-flex">
|
|
|
- <i :class="getStatusClass(scope.row.publishStatus)"></i>
|
|
|
- <dict-tag :options="publishStatusOptions" :value="scope.row.publishStatus" />
|
|
|
+ <i :class="getStatusClass(scope.row.publish_status)"></i>
|
|
|
+ <dict-tag :options="publishStatusOptions" :value="scope.row.publish_status" />
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="审批状态" align="center" prop="approvalStatus">
|
|
|
+ <el-table-column label="审批状态" align="center" prop="examine_status">
|
|
|
<template #default="scope">
|
|
|
<div class="common-flex">
|
|
|
- <i :class="getStatusClass2(scope.row.approvalStatus)"></i>
|
|
|
- <dict-tag :options="approvalStatusOptions" :value="scope.row.approvalStatus" />
|
|
|
+ <i :class="getStatusClass2(scope.row.examine_status)"></i>
|
|
|
+ <dict-tag :options="approvalStatusOptions" :value="scope.row.examine_status" />
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="发布统计" align="center" prop="statistics">
|
|
|
<template #default="scope">
|
|
|
<div class="statistics-container">
|
|
|
- <p>选择人数: {{ scope.row.userCount }}</p>
|
|
|
- <p>成功: {{ scope.row.successCount }}</p>
|
|
|
- <p>失败: {{ scope.row.errorCount }}</p>
|
|
|
- <p>发送中: {{ scope.row.sendingCount }}</p>
|
|
|
+ <p>选择人数: {{ scope.row.user_count }}</p>
|
|
|
+ <p>成功: {{ scope.row.user_ok_count }}</p>
|
|
|
+ <p>失败: {{ scope.row.user_err_count }}</p>
|
|
|
+ <p>发送中: {{ scope.row.user_sending_count }}</p>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template #default="scope">
|
|
|
<el-text class="common-btn-text-primary" @click="handleView(scope.row)">查看</el-text>
|
|
|
- <el-text class="common-btn-text-primary" @click="handleUpdate(scope.row)">编辑</el-text>
|
|
|
- <el-text class="common-btn-text-primary" @click="handleApproval(scope.row)">审批</el-text>
|
|
|
+ <el-text class="common-btn-text-primary" v-if="(scope.row && scope.row.is_my_edit)" @click="handleUpdate(scope.row)">编辑</el-text>
|
|
|
+ <el-text class="common-btn-text-primary" v-if="(scope.row && scope.row.is_my_examine)" @click="handleApproval(scope.row)">审批</el-text>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -104,19 +102,19 @@ const loading = ref(true);
|
|
|
const ids = ref([]);
|
|
|
const selectedRow = ref(null);
|
|
|
const initFormData = reactive({
|
|
|
- publishUnit: '',
|
|
|
- publishStatus: '',
|
|
|
- approvalStatus: '',
|
|
|
- disposeStatus: '',
|
|
|
- informationContent: '',
|
|
|
- publishTime: '',
|
|
|
- publishChannel: '',
|
|
|
- applyPerson: '',
|
|
|
- pendingPerson: '',
|
|
|
- userCount: '',
|
|
|
- successCount: '',
|
|
|
- errorCount: '',
|
|
|
- sendingCount: '',
|
|
|
+ publish_group: '',
|
|
|
+ publish_status: '',
|
|
|
+ examine_status: '',
|
|
|
+ dispose_status: '',
|
|
|
+ content: '',
|
|
|
+ publish_time: '',
|
|
|
+ publish_channel: '',
|
|
|
+ nick_name: '',
|
|
|
+ examine_user: '',
|
|
|
+ user_count: '',
|
|
|
+ user_ok_count: '',
|
|
|
+ user_err_count: '',
|
|
|
+ user_sending_count: '',
|
|
|
id: ''
|
|
|
});
|
|
|
// 表单数据
|
|
@@ -125,31 +123,35 @@ const data = reactive({
|
|
|
queryParams: {
|
|
|
page: 1,
|
|
|
page_size: 10,
|
|
|
- publishUnit: '',
|
|
|
- publishStatus: '',
|
|
|
- approvalStatus: '',
|
|
|
- disposeStatus: ''
|
|
|
+ publish_group: '',
|
|
|
+ publish_status: '',
|
|
|
+ examine_status: '',
|
|
|
+ dispose_status: '0'
|
|
|
}
|
|
|
});
|
|
|
const { queryParams, form } = toRefs(data);
|
|
|
const total = ref(0);
|
|
|
|
|
|
const publishStatusOptions = reactive([
|
|
|
- { value: '发布中', label: '发布中' },
|
|
|
- { value: '已发布', label: '已发布' },
|
|
|
- { value: '未提交', label: '未提交' }
|
|
|
+ { value: '0', label: '全部' },
|
|
|
+ { value: '1', label: '草稿' },
|
|
|
+ { value: '2', label: '审批中' },
|
|
|
+ { value: '3', label: '发布中' },
|
|
|
+ { value: '4', label: '已发布' }
|
|
|
]);
|
|
|
|
|
|
const approvalStatusOptions = reactive([
|
|
|
- { value: '审批通过', label: '审批通过' },
|
|
|
- { value: '待审批', label: '待审批' },
|
|
|
- { value: '审批中', label: '审批中' },
|
|
|
- { value: '未提交', label: '未提交' }
|
|
|
+ { value: '0', label: '全部' },
|
|
|
+ { value: '1', label: '待审批' },
|
|
|
+ { value: '2', label: '审批中' },
|
|
|
+ { value: '3', label: '审批通过' },
|
|
|
+ { value: '9', label: '审批不通过' }
|
|
|
]);
|
|
|
+
|
|
|
const disposeStatusOptions = reactive([
|
|
|
- { value: '全部', label: '全部' },
|
|
|
- { value: '待处理', label: '待处理' },
|
|
|
- { value: '已处理', label: '已处理' }
|
|
|
+ { value: '0', label: '全部' },
|
|
|
+ { value: '1', label: '待处理' },
|
|
|
+ { value: '2', label: '已处理' }
|
|
|
]);
|
|
|
|
|
|
const getStatusClass = (value) => {
|
|
@@ -173,31 +175,40 @@ const getStatusClass2 = (value) => {
|
|
|
return 'dot-grey';
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+const handleDisposeStatus = (val: any) => {
|
|
|
+ queryParams.value.dispose_status = val;
|
|
|
+ handleSearch();
|
|
|
+}
|
|
|
+
|
|
|
const handleSearch = () => {
|
|
|
queryParams.value.page = 1;
|
|
|
getList();
|
|
|
};
|
|
|
|
|
|
const resetSearch = () => {
|
|
|
- queryParams.value = { page: 1, page_size: 10, publishUnit: '', publishStatus: '', approvalStatus: '' };
|
|
|
+ queryParams.value = { page: 1, page_size: 10, publish_group: '', publish_status: '', examine_status: '', dispose_status: '0' };
|
|
|
handleSearch();
|
|
|
};
|
|
|
|
|
|
const handleSelectionChange = (selection) => {
|
|
|
ids.value = selection.map((item) => item.eventId);
|
|
|
selectedRow.value = selection.length === 1 ? selection[0] : null;
|
|
|
- single.value = selection.length != 1;
|
|
|
- multiple.value = !selection.length;
|
|
|
};
|
|
|
|
|
|
+// 查看详情对话框
|
|
|
let informationDetailState = reactive({
|
|
|
show: false,
|
|
|
eventId: ''
|
|
|
});
|
|
|
+
|
|
|
+// 编辑对话框
|
|
|
let informationViewState = reactive({
|
|
|
show: false,
|
|
|
eventId: ''
|
|
|
});
|
|
|
+
|
|
|
+// 审批对话框
|
|
|
let informationApprovalState = reactive({
|
|
|
show: false,
|
|
|
eventId: ''
|
|
@@ -222,6 +233,7 @@ const handleApproval = (row) => {
|
|
|
informationApprovalState.show = true;
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
const handleCancel = () => {
|
|
|
informationDetailState.show = false;
|
|
|
informationViewState.show = false;
|
|
@@ -236,18 +248,20 @@ const getList = () => {
|
|
|
// 映射返回的数据到 tableData
|
|
|
tableData.value = res.data.map((item) => ({
|
|
|
id: item.id,
|
|
|
- publishUnit: item.publish_group || '未知',
|
|
|
- informationContent: item.content || '未知',
|
|
|
- publishTime: item.publish_time || '未知',
|
|
|
- publishChannel: item.publish_channel || '未知',
|
|
|
- applyPerson: item.nick_name || '未知',
|
|
|
- pendingPerson: item.dept_name || '未知',
|
|
|
- publishStatus: item.publish_status,
|
|
|
- approvalStatus: item.examine_status,
|
|
|
- userCount: item.user_count || 0,
|
|
|
- successCount: item.user_ok_count || 0,
|
|
|
- errorCount: item.user_err_count || 0,
|
|
|
- sendingCount: item.user_sending_count || 0
|
|
|
+ publish_group: item.publish_group || '未知',
|
|
|
+ content: item.content || '未知',
|
|
|
+ publish_time: item.publish_time || '未知',
|
|
|
+ publish_channel: item.publish_channel || '未知',
|
|
|
+ nick_name: item.nick_name || '未知',
|
|
|
+ examine_user: item.examine_user || '未知',
|
|
|
+ publish_status: item.publish_status,
|
|
|
+ examine_status: item.examine_status,
|
|
|
+ user_count: item.user_count || 0,
|
|
|
+ user_ok_count: item.user_ok_count || 0,
|
|
|
+ user_err_count: item.user_err_count || 0,
|
|
|
+ user_sending_count: item.user_sending_count || 0,
|
|
|
+ is_my_examine: item.is_my_examine || false,
|
|
|
+ is_my_edit: item.is_my_edit || false
|
|
|
}));
|
|
|
total.value = res.total;
|
|
|
} else {
|