123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <template>
- <div class="snapshot-statistics-handle-order-container layout-padding">
- <div class="layout-padding-auto layout-padding-view pd20">
- <vxe-grid v-bind="gridOptions" ref="gridRef">
- <template #form>
- <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline :disabled="gridOptions.loading">
- <el-form-item prop="crTime">
- <statistical-time v-model="state.queryParams.crTime" @change="handleQuery" ref="statisticalTimeRef" :disabled="state.loading" />
- </el-form-item>
- <el-form-item label="行业" prop="IndustryId">
- <el-select v-model="state.queryParams.IndustryId" class="w100" placeholder="请选择行业" @change="queryList" clearable>
- <el-option v-for="item in industry" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- </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(ruleFormRef)" class="default-button" :loading="state.loading">
- <SvgIcon name="ele-Refresh" class="mr5" />重置
- </el-button>
- </el-form-item>
- </el-form>
- </template>
- </vxe-grid>
- </div>
- </div>
- </template>
- <script lang="tsx" setup name="snapshotStatisticsHandleOrder">
- import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
- import { FormInstance } from 'element-plus';
- import { defaultDate } from '@/utils/constants';
- import { getGridReplyCount } from '@/api/snapshot/statistics';
- import Other from '@/utils/other';
- // 引入组件
- const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
- // 定义变量内容
- const state = reactive<any>({
- loading: false,
- queryParams: {
- // 查询参数
- crTime: defaultDate, // 时间默认今天开始到今天结束
- StartTime: null,
- EndTime: null,
- IndustryId:null,
- },
- total: 0, // 总条数
- });
- const gridOptions = reactive<any>({
- loading: false,
- border: true,
- showOverflow: true,
- columnConfig: {
- resizable: true,
- },
- scrollY: {
- enabled: true,
- gt: 100,
- },
- toolbarConfig: {
- zoom: true,
- custom: true,
- refresh: {
- queryMethod: () => {
- handleQuery();
- },
- },
- },
- customConfig: {
- storage: true,
- },
- id: 'snapshotStatisticsHandleOrder',
- rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
- height: 'auto',
- columns: [
- {
- field: 'no',
- title: '部门名称',
- width: 200,
- fixed: 'left',
- },
- {
- field: 'no',
- title: '信件总量',
- width: 100,
- fixed: 'left',
- },
- {
- field: 'county',
- title: '已办件数',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'county',
- title: '在办件数',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '办结率',
- width: 100,
- },
- {
- field: 'county',
- title: '20分钟内接件',
- width: 120,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'county',
- title: '20分钟后接件',
- width: 120,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '工单及时响应率',
- width: 120,
- },
- {
- field: 'no',
- title: '退回件',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '办件总时长(小时)',
- width: 140,
- },
- {
- field: 'no',
- title: '3日内办结',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '3至5日办结',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '5至7日办结',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '7日外办结',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '按时办结率',
- width: 100,
- },
- {
- field: 'no',
- title: '满意量',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '不满意量',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- {
- field: 'no',
- title: '满意率',
- width: 100,
- },
- {
- field: 'no',
- title: '二次办理',
- width: 100,
- slots: {
- default({ row }) {
- return (
- <el-button type="primary" onClick={() => linkDetail(row)} link>
- {row.sumCount}
- </el-button>
- );
- },
- },
- },
- ],
- data: [],
- });
- /** 搜索按钮操作 节流操作 */
- const handleQuery = () => {
- state.queryParams.PageIndex = 1;
- queryList();
- };
- const requestParams = ref<EmptyObjectType>({});
- // 获取参数列表
- const queryList = () => {
- state.loading = true;
- gridOptions.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'); // 删除无用的参数
- getGridReplyCount(requestParams.value)
- .then((res) => {
- state.loading = false;
- gridOptions.data = res.result.items ?? [];
- state.total = res.result.total ?? 0;
- gridOptions.loading = false;
- })
- .finally(() => {
- state.loading = false;
- gridOptions.loading = false;
- });
- };
- // 重置表单
- const ruleFormRef = ref<any>(null); // 表单ref
- const statisticalTimeRef = ref<RefType>();
- const resetQuery = (formEl: FormInstance | undefined) => {
- if (!formEl) return;
- formEl.resetFields();
- statisticalTimeRef.value.reset();
- queryList();
- };
- // 跳转详情
- const linkDetail = (row: any) => {};
- const industry = ref<EmptyArrayType>([]);
- // 页面加载时
- onMounted(() => {
- queryList();
- });
- </script>
|