|
@@ -1,6 +1,29 @@
|
|
|
<template>
|
|
|
<div class="statistics-order-detail-hotspot-area-container layout-padding">
|
|
|
- <div class="layout-padding-auto layout-padding-view pd20">
|
|
|
+ <div class="layout-padding-auto layout-padding-view pd20">
|
|
|
+ <el-form :model="state.queryParams" ref="queryParamsRef" inline @submit.native.prevent>
|
|
|
+ <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=""
|
|
|
+ :clearable="false"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ :default-time="defaultTimeStartEnd"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button @click="resetQuery(queryParamsRef)" :loading="state.loading" class="default-button">
|
|
|
+ <SvgIcon name="ele-Refresh" class="mr5" />重置
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
<vxe-toolbar
|
|
|
ref="toolbarRef"
|
|
|
:loading="state.loading"
|
|
@@ -12,7 +35,7 @@
|
|
|
>
|
|
|
<template #buttons>
|
|
|
<el-button type="primary" @click="onJbExport" :disabled="isChecked" :loading="state.loading"
|
|
|
- ><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出
|
|
|
+ ><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</vxe-toolbar>
|
|
@@ -57,7 +80,7 @@
|
|
|
<vxe-column field="no" title="工单编码" width="140"></vxe-column>
|
|
|
<vxe-column field="title" title="工单标题" width="200">
|
|
|
<template #default="{ row }">
|
|
|
- <order-detail :order="row" @updateList="queryList(true)">{{ row.title }}</order-detail>
|
|
|
+ <order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column field="creationTime" title="受理时间" width="160">
|
|
@@ -105,24 +128,38 @@ import {
|
|
|
statisticsOrderHotDetailExport,
|
|
|
statisticsOrderHotDetail,
|
|
|
statisticsOrderHotSatisfyDetail,
|
|
|
- statisticsOrderHotSatisfyDetailExport, statisticsOrderHotAcceptDetail, statisticsOrderHotAcceptDetailExport, departmentHotSmallDetailExport, departmentHotSmallDetail,
|
|
|
+ statisticsOrderHotSatisfyDetailExport,
|
|
|
+ statisticsOrderHotAcceptDetail,
|
|
|
+ statisticsOrderHotAcceptDetailExport,
|
|
|
+ departmentHotSmallDetailExport,
|
|
|
+ departmentHotSmallDetail,
|
|
|
} from '@/api/statistics/order';
|
|
|
import { useRoute } from 'vue-router';
|
|
|
-import { centerEnterpriseSpecialistLetterDetail, centerEnterpriseSpecialistLetterDetailExport, centerUnreceivedDetail, centerUnreceivedDetailExport } from '@/api/statistics/center';
|
|
|
+import {
|
|
|
+ centerEnterpriseSpecialistLetterDetail,
|
|
|
+ centerEnterpriseSpecialistLetterDetailExport,
|
|
|
+ centerUnreceivedDetail,
|
|
|
+ centerUnreceivedDetailExport,
|
|
|
+} from '@/api/statistics/center';
|
|
|
import { exportAssignment } from '@/utils/tools';
|
|
|
+import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
|
+import { FormInstance } from 'element-plus';
|
|
|
|
|
|
// 引入组件
|
|
|
const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
|
|
|
|
|
|
// 定义变量内容
|
|
|
-const state = reactive({
|
|
|
+const state = reactive<any>({
|
|
|
queryParams: {
|
|
|
// 查询条件
|
|
|
PageIndex: 1,
|
|
|
PageSize: 20,
|
|
|
State: null, // 特提状态
|
|
|
Keyword: null, // 关键字
|
|
|
+ crTime: [],
|
|
|
+ StartTime: null,
|
|
|
+ EndTime: null,
|
|
|
},
|
|
|
tableData: [], //表单
|
|
|
loading: false, // 加载
|
|
@@ -183,11 +220,11 @@ const queryList = () => {
|
|
|
PageIndex: state.queryParams.PageIndex,
|
|
|
PageSize: state.queryParams.PageSize,
|
|
|
HotspotId: routeQueryParams.HotspotId,
|
|
|
- HotspotName: routeQueryParams.HotspotName,
|
|
|
+ HotspotName: routeQueryParams.HotspotName,
|
|
|
StartTime: routeQueryParams.StartTime,
|
|
|
EndTime: routeQueryParams.EndTime,
|
|
|
- TypeId:routeQueryParams.TypeId,
|
|
|
- TitleCode:routeQueryParams.TitleCode
|
|
|
+ TypeId: routeQueryParams.TypeId,
|
|
|
+ TitleCode: routeQueryParams.TitleCode,
|
|
|
};
|
|
|
statisticsOrderHotSatisfyDetail(requestParams.value)
|
|
|
.then((res: any) => {
|
|
@@ -262,6 +299,19 @@ const queryList = () => {
|
|
|
break;
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+const queryParamsRef = ref<RefType>(); // 表单ref
|
|
|
+// 手动查询,将页码设置为1
|
|
|
+const handleQuery = () => {
|
|
|
+ state.queryParams.PageIndex = 1;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+/** 重置按钮操作 */
|
|
|
+const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return;
|
|
|
+ formEl.resetFields();
|
|
|
+ queryList();
|
|
|
+};
|
|
|
// 交办单导出
|
|
|
const onJbExport = () => {
|
|
|
const ids = checkTable.value.map((item: any) => item.id);
|
|
@@ -294,5 +344,8 @@ onMounted(() => {
|
|
|
if (tableRef.value && toolbarRef.value) {
|
|
|
tableRef.value.connect(toolbarRef.value);
|
|
|
}
|
|
|
+ if (routeQueryParams.StartTime && routeQueryParams.EndTime) {
|
|
|
+ state.queryParams.crTime = [routeQueryParams.StartTime, routeQueryParams.EndTime];
|
|
|
+ }
|
|
|
});
|
|
|
</script>
|