|
@@ -0,0 +1,177 @@
|
|
|
+<template>
|
|
|
+ <div class="statistics-center-report-manage-container layout-padding">
|
|
|
+ <div class="layout-padding-auto layout-padding-view pd20">
|
|
|
+ <ProTable
|
|
|
+ ref="proTableRef"
|
|
|
+ :columns="columns"
|
|
|
+ :data="state.tableData"
|
|
|
+ @updateTable="queryList"
|
|
|
+ :loading="state.loading"
|
|
|
+ :total="state.total"
|
|
|
+ v-model:page-index="state.queryParams.PageIndex"
|
|
|
+ v-model:page-size="state.queryParams.PageSize"
|
|
|
+ role-key="orgId"
|
|
|
+ >
|
|
|
+ <template #table-search>
|
|
|
+ <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
|
|
|
+ <el-form-item label="报告名称" prop="Title">
|
|
|
+ <el-input v-model="state.queryParams.Title" placeholder="报告名称" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态" prop="ErrorName">
|
|
|
+ <el-select v-model="state.queryParams.ErrorName" placeholder="请选择报告状态" clearable @change="handleQuery">
|
|
|
+ <el-option v-for="item in reTransactErrorType" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="生成时间" prop="crTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="state.queryParams.crTime"
|
|
|
+ type="datetimerange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ @change="handleQuery"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ :default-time="defaultTimeStartEnd"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
|
|
|
+ <SvgIcon name="ele-Refresh" class="mr5" />重置
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
+ <template #title="{ row }">
|
|
|
+ <order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
+ </template>
|
|
|
+ <template #operation="{ row }">
|
|
|
+ <el-button type="primary" link @click="viewEvent">查看预警事件</el-button>
|
|
|
+ <el-button type="primary" link @click="viewReport">查看报告</el-button>
|
|
|
+ <el-button type="primary" link @click="deleteReport">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </ProTable>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script setup lang="tsx" name="statisticsCenterReportManage">
|
|
|
+import { onMounted, reactive, ref, defineAsyncComponent } from 'vue';
|
|
|
+import { ElMessageBox, FormInstance, ElMessage } from 'element-plus';
|
|
|
+import { centerEmergencyList } from '@/api/statistics/center';
|
|
|
+import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
|
+import Other from '@/utils/other';
|
|
|
+import { formatDate } from '@/utils/formatTime';
|
|
|
+
|
|
|
+// 引入组件
|
|
|
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
+// 表格配置项
|
|
|
+const columns = ref<any[]>([
|
|
|
+ { prop: 'no', label: '报告名称', minWidth: 140 },
|
|
|
+ { prop: 'arrangeTitle', label: '备注', minWidth: 200 },
|
|
|
+ { prop: 'hotspotSpliceName', label: '状态', minWidth: 200 },
|
|
|
+ {
|
|
|
+ prop: 'creationTime',
|
|
|
+ label: '生成时间',
|
|
|
+ minWidth: 160,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row?.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'operation', label: '操作', fixed: 'right', width: 240, align: 'center' },
|
|
|
+]);
|
|
|
+const searchCol = ref(true); // 展开/收起
|
|
|
+// 展开/收起
|
|
|
+const closeSearch = () => {
|
|
|
+ searchCol.value = !searchCol.value;
|
|
|
+};
|
|
|
+// 定义变量内容
|
|
|
+const ruleFormRef = ref<RefType>(); // 表单ref
|
|
|
+const state = reactive<any>({
|
|
|
+ queryParams: {
|
|
|
+ // 查询条件
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 20,
|
|
|
+ Title: null, // 关键词
|
|
|
+ No: null,
|
|
|
+ HotspotSpliceName: null,
|
|
|
+ AcceptType: null,
|
|
|
+ SourceChannel: null,
|
|
|
+ crTime: [], // 创建时间
|
|
|
+ StartTime: null,
|
|
|
+ EndTime: null,
|
|
|
+ bjTime: [], // 办结时间
|
|
|
+ FiledStartTime: null,
|
|
|
+ FiledEndTime: null,
|
|
|
+ },
|
|
|
+ tableData: [], //表单
|
|
|
+ loading: false, // 加载
|
|
|
+ total: 0, // 总数
|
|
|
+});
|
|
|
+/** 搜索按钮操作 */
|
|
|
+const handleQuery = () => {
|
|
|
+ state.queryParams.PageIndex = 1;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+/** 获取列表 */
|
|
|
+const requestParams = ref({});
|
|
|
+const queryList = () => {
|
|
|
+ state.loading = true;
|
|
|
+ requestParams.value = Other.deepClone(state.queryParams);
|
|
|
+ requestParams.value.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
+ requestParams.value.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
+ Reflect.deleteProperty(requestParams.value, 'crTime');
|
|
|
+ centerEmergencyList(requestParams.value)
|
|
|
+ .then((res: any) => {
|
|
|
+ state.tableData = res.result?.items ?? [];
|
|
|
+ state.total = res.result?.total ?? 0;
|
|
|
+ state.loading = false;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ state.loading = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+/** 重置按钮操作 */
|
|
|
+const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return;
|
|
|
+ formEl.resetFields();
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+// 查看预警世间
|
|
|
+const viewEvent = () => {};
|
|
|
+// 查看报告
|
|
|
+const viewReport = () => {};
|
|
|
+// 删除报告
|
|
|
+const deleteReport = () => {
|
|
|
+ ElMessageBox.confirm('确定删除该报告吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!',
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
+};
|
|
|
+const reTransactErrorType = ref([]);
|
|
|
+onMounted(() => {
|
|
|
+ queryList();
|
|
|
+});
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+.statistics-center-emergency-List-container {
|
|
|
+ .arrow {
|
|
|
+ transition: transform var(--el-transition-duration);
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .arrow.is-reverse {
|
|
|
+ transform: rotateZ(-180deg);
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|