|
@@ -0,0 +1,189 @@
|
|
|
+<template>
|
|
|
+ <div class="statistics-department-detail-delay-container layout-pd">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <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"
|
|
|
+ >
|
|
|
+ <template #expiredStatus="{ row }">
|
|
|
+ <span :class="'overdue-status-' + row.order?.expiredStatus" :title="row.order?.expiredStatusText"></span>
|
|
|
+ </template>
|
|
|
+ <template #isProvince="{ row }">
|
|
|
+ <span>{{ row.order?.isProvince ? '省工单' : '市工单' }}</span>
|
|
|
+ </template>
|
|
|
+ <template #title="{ row }">
|
|
|
+ <order-detail :order="row.order" @updateList="queryList">{{ row.order?.title }}</order-detail>
|
|
|
+ </template>
|
|
|
+ <template #employeeName="{ row }">
|
|
|
+ <span
|
|
|
+ >{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <!-- 表格操作 -->
|
|
|
+ <template #operation="{ row }">
|
|
|
+ <el-button link type="primary" @click="onDetail(row)" title="查看延期详情"> 延期详情 </el-button>
|
|
|
+ <order-detail :order="row.order" @updateList="queryList" />
|
|
|
+ </template>
|
|
|
+ </ProTable>
|
|
|
+ </el-card>
|
|
|
+ <!-- 延期详情 -->
|
|
|
+ <delay-detail-com ref="delayDetailRef" @updateList="queryList" />
|
|
|
+ <!-- 延期修改 -->
|
|
|
+ <delay-edit ref="delayEditRef" @updateList="queryList" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script setup lang="tsx" name="statisticsDepartmentDetailDelay">
|
|
|
+import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
+import { ElButton, FormInstance } from 'element-plus';
|
|
|
+import { formatDate } from '@/utils/formatTime';
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
+import { delayDetail } from "@/api/business/delay";
|
|
|
+import { departmentDelayDetail } from "@/api/statistics/department";
|
|
|
+
|
|
|
+// 引入组件
|
|
|
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
+const DelayDetailCom = defineAsyncComponent(() => import('@/views/business/delay/components/Delay-detail.vue')); // 延期详情
|
|
|
+const DelayEdit = defineAsyncComponent(() => import('@/views/business/delay/components/Delay-edit.vue')); // 延期修改
|
|
|
+
|
|
|
+const proTableRef = ref<RefType>(); // 表格ref
|
|
|
+// 表格配置项
|
|
|
+const columns = ref<any[]>([
|
|
|
+ { prop: 'expiredStatus', label: '超期状态', align: 'center',fixed: 'left',width: 80},
|
|
|
+ { prop: 'no', label: '工单编码', width: 150 },
|
|
|
+ { prop: 'isProvince', label: '省/市工单', width: 100 },
|
|
|
+ { prop: 'title', label: '工单标题', width: 300 },
|
|
|
+ { prop: 'order.actualHandleStepName', label: '办理节点', width: 120 },
|
|
|
+ { prop: 'delayStateText', label: '延期申请状态', width: 120 },
|
|
|
+ {
|
|
|
+ prop: 'order.startTime',
|
|
|
+ label: '受理时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.order?.startTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'employeeName', label: '受理人', width: 120 },
|
|
|
+ { prop: 'order.hotspotName', label: '热点分类', width: 120 },
|
|
|
+ { prop: 'order.acceptType', label: '受理类型', width: 120 },
|
|
|
+ {prop: 'order.orgLevelOneName', label: '一级部门', width: 120 },
|
|
|
+ { prop: 'order.actualHandleOrgName', label: '接办部门', width: 120 },
|
|
|
+ {
|
|
|
+ prop: 'order.actualHandleTime',
|
|
|
+ label: '接办时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.order?.actualHandleTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'creationTime',
|
|
|
+ label: '延期申请时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'creatorName', label: '延期申请人', width: 120 },
|
|
|
+ { prop: 'creatorOrgName', label: '延期申请部门', width: 120 },
|
|
|
+ { prop: 'delayNum', label: '延期申请时限', width: 120 },
|
|
|
+ { prop: 'delayUnitText', label: '延期申请单位', width: 120 },
|
|
|
+ { prop: 'delayReason', label: '申请理由', width: 120 },
|
|
|
+ {
|
|
|
+ prop: 'beforeDelay',
|
|
|
+ label: '申请前期满时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.beforeDelay, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'afterDelay',
|
|
|
+ label: '通过后期满时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.afterDelay, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'operation', label: '操作', fixed: 'right', width: 170, align: 'center' },
|
|
|
+]);
|
|
|
+// 定义变量内容
|
|
|
+const ruleFormRef = ref<RefType>(); // 表单ref
|
|
|
+const router = useRouter(); // 路由
|
|
|
+const state = reactive({
|
|
|
+ queryParams: {
|
|
|
+ // 查询条件
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 10,
|
|
|
+ Keyword: null, // 关键字
|
|
|
+ },
|
|
|
+ tableData: [{}], //表单
|
|
|
+ loading: false, // 加载
|
|
|
+ total: 0, // 总数
|
|
|
+});
|
|
|
+// 手动查询,将页码设置为1
|
|
|
+const handleQuery = () => {
|
|
|
+ state.queryParams.PageIndex = 1;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+/** 获取列表 */
|
|
|
+const historyParams = history.state;
|
|
|
+const queryList = () => {
|
|
|
+ state.loading = true;
|
|
|
+ const request = {
|
|
|
+ PageIndex: state.queryParams.PageIndex,
|
|
|
+ PageSize: state.queryParams.PageSize,
|
|
|
+ StartTime: historyParams?.StartTime,
|
|
|
+ EndTime: historyParams?.EndTime,
|
|
|
+ OrgCode: historyParams?.OrgCode,
|
|
|
+ Type: historyParams?.Type,
|
|
|
+ };
|
|
|
+ departmentDelayDetail(request)
|
|
|
+ .then((res) => {
|
|
|
+ state.tableData = res.result?.items ?? [];
|
|
|
+ state.total = res.result?.total ?? 0;
|
|
|
+ state.loading = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ state.loading = false;
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/** 重置按钮操作 */
|
|
|
+const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return;
|
|
|
+ formEl.resetFields();
|
|
|
+ queryList();
|
|
|
+}
|
|
|
+// 延期详情
|
|
|
+const delayDetailRef = ref<RefType>();
|
|
|
+const delayEditRef = ref<RefType>();
|
|
|
+const onDetail = async (row: any) => {
|
|
|
+ try {
|
|
|
+ const { result } = await delayDetail(row.id);
|
|
|
+ if (result.handle) {
|
|
|
+ // 退回到了开始 需要重新打开编辑页面在发起流程
|
|
|
+ delayEditRef.value.openDialog(row);
|
|
|
+ } else {
|
|
|
+ delayDetailRef.value.openDialog(row);
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+};
|
|
|
+// 导出
|
|
|
+const onExport = () => {
|
|
|
+ console.log('导出');
|
|
|
+};
|
|
|
+onMounted(async () => {
|
|
|
+ queryList();
|
|
|
+});
|
|
|
+</script>
|