123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <template>
- <div class="judicial-statistics-detail-satisfaction-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.expiredStatus" :title="row.expiredStatusText"></span>
- </template>
- <template #title="{ row }">
- <order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
- </template>
- <template #employeeName="{ row }">
- <span
- >{{ row.acceptorName }} <span v-if="row.acceptorStaffNo">[{{ row.acceptorStaffNo }}]</span>
- </span>
- </template>
- <template #isTheClueTrue="{row}">
- <span>{{ row.isTheClueTrue !== null ? (row.isTheClueTrue ? '是' : '否') : '' }}</span>
- </template>
- <template #isProvince="{ row }">
- <span>{{ row.isProvince ? '省工单' : '市工单' }}</span>
- </template>
- <!-- 表格操作 -->
- <template #operation="{ row }">
- <el-button link type="primary" @click="visitDetail(row)" title="查看回访详情"> 回访详情 </el-button>
- <order-detail :order="row.order" @updateList="queryList" />
- </template>
- </ProTable>
- </el-card>
- <!-- 回访详情 -->
- <visit-detail-com ref="visitDetailRef" @updateList="queryList" />
- </div>
- </template>
- <script setup lang="tsx" name="judicialStatisticsDetailSatisfied">
- import { onMounted, reactive, ref, defineAsyncComponent } from 'vue';
- import { FormInstance } from 'element-plus';
- import { departmentSatisfactionDetail } from '@/api/judicial';
- import dayjs from 'dayjs';
- import { formatDate } from '@/utils/formatTime';
- import { useRoute } from 'vue-router';
- // 引入组件
- const VisitDetailCom = defineAsyncComponent(() => import('@/views/business/visit/component/Visit-detail.vue')); // 回访
- const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
- // 表格配置项
- const columns = ref<any[]>([
- { prop: 'expiredStatus', label: '超期状态', align: 'center' },
- { prop: 'no', label: '工单编码', width: 150 },
- { prop: 'provinceNo', label: '省编号', width: 200 },
- { prop: 'isProvince', label: '省/市工单', width: 100 },
- { prop: 'actualHandleStepName', label: '办理节点', width: 150 },
- { prop: 'statusText', label: '工单状态', width: 100 },
- { prop: 'title', label: '工单标题', width: 300 },
- {
- prop: 'startTime',
- label: '受理时间',
- width: 170,
- render: (scope) => {
- return <span>{formatDate(scope.row.startTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
- },
- },
- {
- prop: 'expiredTime',
- label: '工单期满时间',
- width: 170,
- render: (scope) => {
- return <span>{formatDate(scope.row.expiredTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
- },
- },
- {
- prop: 'filedTime',
- label: '办结时间',
- width: 170,
- render: (scope) => {
- return <span>{formatDate(scope.row.filedTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
- },
- },
- { prop: 'orgLevelOneName', label: '一级部门', width: 170 },
- { prop: 'actualHandleOrgName', label: '接办部门', width: 170 },
- { prop: 'acceptType', label: '受理类型', width: 150 },
- { prop: 'sourceChannel', label: '来源方式', width: 100 },
- { prop: 'hotspotName', label: '热点分类', width: 200 },
- {
- prop: 'isPassTheBuckOrder',
- label: '是否推诿工单',
- width: 120,
- render: (scope) => {
- return <span>{scope.row.isPassTheBuckOrder ? '是' : '否'}</span>;
- },
- },
- {
- prop: 'isTheClueTrue',
- label: '线索是否属实',
- width: 120
- },
- { prop: 'eventTypeName', label: '事项类型', width: 200 },
- { prop: 'operation', label: '操作', fixed: 'right', width: 170, align: 'center' },
- ]);
- // 定义变量内容
- const ruleFormRef = ref<RefType>(); // 表单ref
- const state = reactive({
- queryParams: {
- // 查询条件
- PageIndex: 1,
- PageSize: 10,
- TypeId: '1', //
- LineNum: null,
- crTime: [],
- },
- tableData: [], //表单
- loading: false, // 加载
- total: 0, // 总数
- });
- /** 搜索按钮操作 */
- const handleQuery = () => {
- // state.queryParams.PageIndex = 1;
- queryList();
- };
- const historyParams = history.state;
- const route = useRoute();
- if (historyParams.StartDate) {
- state.queryParams.crTime = [dayjs(historyParams.StartDate).format('YYYY-MM-DD'), dayjs(historyParams.EndDate).format('YYYY-MM-DD')];
- }
- /** 获取列表 */
- const queryList = () => {
- state.loading = true;
- const request = {
- StartDate: historyParams.StartDate,
- EndDate: historyParams.EndDate,
- TypeId: historyParams.TypeId,
- OrgCode: route.params.id,
- DateValue: historyParams.DateValue,
- PageIndex: state.queryParams.PageIndex,
- PageSize: state.queryParams.PageSize,
- };
- departmentSatisfactionDetail(request)
- .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 visitDetailRef = ref<RefType>();
- const visitDetail = (row: any) => {
- const rowData = {
- ...row,
- orderId: row.id,
- id: row.visitId,
- };
- if ([10, 20].includes(row.visitState)) {
- visitDetailRef.value.openDialog(rowData, '回访');
- } else {
- visitDetailRef.value.openDialog(rowData, '回访详情');
- }
- };
- onMounted(() => {
- queryList();
- });
- </script>
|