|
@@ -42,6 +42,7 @@
|
|
|
:pagination="false"
|
|
|
:toolButton="['refresh', 'setting', 'exportAll']"
|
|
|
@export-all="exportTable($event, true)"
|
|
|
+ :key="Math.random()"
|
|
|
>
|
|
|
</ProTable>
|
|
|
</el-card>
|
|
@@ -50,368 +51,14 @@
|
|
|
<script setup lang="tsx" name="statisticsOrderDetailSourceTime">
|
|
|
import { onMounted, reactive, ref } from 'vue';
|
|
|
import { FormInstance } from 'element-plus';
|
|
|
-import { orderSourceList, orderSourceListExport } from '@/api/statistics/order';
|
|
|
+import { orderSourceTime, orderSourceTimeExport, orderSourceTimeHeader } from '@/api/statistics/order';
|
|
|
import { defaultDate, shortcuts } from '@/utils/constants';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { downloadFileByStream } from '@/utils/tools';
|
|
|
import Other from '@/utils/other';
|
|
|
|
|
|
// 表格配置项
|
|
|
-const columns = ref<any[]>([
|
|
|
- { prop: 'time', label: '日期', align: 'center', minWidth: 100, fixed: 'left' },
|
|
|
- {
|
|
|
- prop: 'subtotal',
|
|
|
- label: '小计',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.subtotal}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.subtotal}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'phone',
|
|
|
- label: '电话',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.phone}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.phone}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'web',
|
|
|
- label: '因特网',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.web}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.web}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'rests',
|
|
|
- label: '其他',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.rests}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.rests}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'created',
|
|
|
- label: '自建',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.created}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.created}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'weChat',
|
|
|
- label: '微信',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.weChat}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.weChat}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'app',
|
|
|
- label: 'APP',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.app}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.app}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'wisdomYB',
|
|
|
- label: '智慧宜宾',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.wisdomYB}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.wisdomYB}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'platform',
|
|
|
- label: '综治平台',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.platform}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.platform}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'platform12328',
|
|
|
- label: '省12328平台',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.platform12328}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.platform12328}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'mayorAndNetizens',
|
|
|
- label: '市长和网民',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.mayorAndNetizens}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.mayorAndNetizens}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'mediaYB',
|
|
|
- label: '宜宾融媒体',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.mediaYB}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.mediaYB}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'platform12345',
|
|
|
- label: '省12345平台',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.platform12345}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.platform12345}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'interaction',
|
|
|
- label: '省政民互动',
|
|
|
- minWidth: 120,
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.interaction}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.interaction}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'serviceYB',
|
|
|
- label: '宜办事',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.serviceYB}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.serviceYB}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'cityTransfer',
|
|
|
- label: '市州互转',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.cityTransfer}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.serviceYB}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'platform110',
|
|
|
- label: '宜宾110平台',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.platform110}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.platform110}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'noService',
|
|
|
- label: '办不成事反映窗口',
|
|
|
- align: 'center',
|
|
|
- minWidth: 150,
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.noService}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.noService}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'iyb',
|
|
|
- label: 'i宜宾',
|
|
|
- align: 'center',
|
|
|
- render: (scope) => {
|
|
|
- return (
|
|
|
- <>
|
|
|
- {scope.row.time !== '合计' ? (
|
|
|
- <el-button type="primary" link onClick={() => linkDetail(scope)}>
|
|
|
- {scope.row.iyb}
|
|
|
- </el-button>
|
|
|
- ) : (
|
|
|
- <span>{scope.row.iyb}</span>
|
|
|
- )}
|
|
|
- </>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
-]);
|
|
|
+const columns = ref<any[]>([]);
|
|
|
// 定义变量内容
|
|
|
const ruleFormRef = ref<RefType>(); // 表单ref
|
|
|
const state = reactive<any>({
|
|
@@ -434,20 +81,45 @@ const handleQuery = () => {
|
|
|
queryList();
|
|
|
};
|
|
|
/** 获取列表 */
|
|
|
-const queryList = () => {
|
|
|
+const queryList = async () => {
|
|
|
state.loading = true;
|
|
|
- let request = Other.deepClone(state.queryParams);
|
|
|
- request.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
- request.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
- Reflect.deleteProperty(request, 'crTime');
|
|
|
- orderSourceList(request)
|
|
|
- .then((res: any) => {
|
|
|
- state.tableData = res.result ?? [];
|
|
|
- state.loading = false;
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- state.loading = false;
|
|
|
+ try {
|
|
|
+ let request = Other.deepClone(state.queryParams);
|
|
|
+ request.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
+ request.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
+ Reflect.deleteProperty(request, 'crTime');
|
|
|
+ const dataRes = await orderSourceTime(request);
|
|
|
+ const headerRes = await orderSourceTimeHeader();
|
|
|
+ console.log(dataRes, headerRes);
|
|
|
+ columns.value = headerRes.result.map((item: any) => {
|
|
|
+ return {
|
|
|
+ prop: item.value.replace(item.value[0], item.value[0].toLowerCase()),
|
|
|
+ label: item.key,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 120,
|
|
|
+ };
|
|
|
});
|
|
|
+ columns.value.unshift(
|
|
|
+ {
|
|
|
+ prop: 'time',
|
|
|
+ label: '时间段',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 120,
|
|
|
+ fixed: 'left',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'subtotal',
|
|
|
+ label: '小计',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 100,
|
|
|
+ }
|
|
|
+ );
|
|
|
+ state.tableData = dataRes.result;
|
|
|
+ state.loading = false;
|
|
|
+ } catch (e) {
|
|
|
+ state.loading = false;
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
};
|
|
|
/** 重置按钮操作 */
|
|
|
const resetQuery = (formEl: FormInstance | undefined) => {
|
|
@@ -455,20 +127,6 @@ const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
formEl.resetFields();
|
|
|
queryList();
|
|
|
};
|
|
|
-// 查看明细
|
|
|
-const router = useRouter();
|
|
|
-const linkDetail = (scope: any) => {
|
|
|
- router.push({
|
|
|
- name: 'statisticsDetailSourceOrder',
|
|
|
- query: {
|
|
|
- IdentityType: scope.row.IdentityType,
|
|
|
- startTime: state.queryParams.crTime[0],
|
|
|
- endTime: state.queryParams.crTime[1],
|
|
|
- Time: scope.row.time,
|
|
|
- SourceChannel:scope.column.label
|
|
|
- },
|
|
|
- });
|
|
|
-};
|
|
|
// 表格导出
|
|
|
const exportTable = (columnInfos: any, isExportAll = false) => {
|
|
|
let request = Other.deepClone(state.queryParams);
|
|
@@ -481,7 +139,7 @@ const exportTable = (columnInfos: any, isExportAll = false) => {
|
|
|
isExportAll,
|
|
|
};
|
|
|
state.loading = true;
|
|
|
- orderSourceListExport(req)
|
|
|
+ orderSourceTimeExport(req)
|
|
|
.then((res: any) => {
|
|
|
state.loading = false;
|
|
|
downloadFileByStream(res);
|
|
@@ -491,6 +149,7 @@ const exportTable = (columnInfos: any, isExportAll = false) => {
|
|
|
});
|
|
|
};
|
|
|
// 查看图表
|
|
|
+const router = useRouter();
|
|
|
const onDetail = () => {
|
|
|
router.push({
|
|
|
name: 'statisticsOrderTimeSource',
|