|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="todo-center-container layout-padding">
|
|
|
- <div class="layout-padding-auto layout-padding-view pd20">
|
|
|
- <ProTable
|
|
|
+ <div class="layout-padding-auto layout-padding-view pd15">
|
|
|
+ <!-- <ProTable
|
|
|
ref="proTableRef"
|
|
|
:columns="columns"
|
|
|
:data="state.tableData"
|
|
@@ -41,13 +41,129 @@
|
|
|
<template #title="{ row }">
|
|
|
<order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
</template>
|
|
|
- <!-- 表格操作 -->
|
|
|
+ <!– 表格操作 –>
|
|
|
<template #operation="{ row }">
|
|
|
<el-button link type="primary" @click="onSign(row)" title="签收工单" v-if="row.canSign" v-auth="'todo:center:sign'"> 签收 </el-button>
|
|
|
<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'todo:center:edit'"> 修改 </el-button>
|
|
|
<el-button link type="primary" @click="onMigration(row)" title="平级移动" v-auth="'todo:center:migration'"> 平级移动 </el-button>
|
|
|
</template>
|
|
|
- </ProTable>
|
|
|
+ </ProTable>-->
|
|
|
+ <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent class="mb10" inline>
|
|
|
+ <el-form-item label="工单标题" prop="Title">
|
|
|
+ <el-input v-model.trim="state.queryParams.Title" placeholder="工单标题" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工单编码" prop="No">
|
|
|
+ <el-input v-model.trim="state.queryParams.No" placeholder="工单编码" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
+ </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="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <vxe-toolbar
|
|
|
+ ref="toolbarRef"
|
|
|
+ :loading="state.loading"
|
|
|
+ custom
|
|
|
+ :refresh="{
|
|
|
+ queryMethod: handleQuery,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <template #buttons>
|
|
|
+ <el-button type="primary" @click="onJbExport" :loading="state.loading" :disabled="isChecked" v-auth="'todo:center:jbdExport'"
|
|
|
+ ><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="onAssignOrders" :loading="state.loading" v-auth="'todo:center:assignOrders'"
|
|
|
+ ><SvgIcon name="ele-List" class="mr5" />分配工单
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template #tools> </template>
|
|
|
+ </vxe-toolbar>
|
|
|
+ <div style="overflow: hidden; width: 100%; height: 100%; flex: 1">
|
|
|
+ <!-- :export-config="{modes: ['current', 'all'],types:['xlsx'],filename:'测试'}"-->
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ :loading="state.loading"
|
|
|
+ :data="state.tableData"
|
|
|
+ :sort-config="{ remote: true }"
|
|
|
+ :column-config="{ resizable: true }"
|
|
|
+ :row-config="{ isCurrent: true, isHover: true, height: 30 }"
|
|
|
+ ref="tableRef"
|
|
|
+ @sort-change="sortChange"
|
|
|
+ @checkbox-all="selectAllChangeEvent"
|
|
|
+ @checkbox-change="selectChangeEvent"
|
|
|
+ height="auto"
|
|
|
+ auto-resize
|
|
|
+ show-overflow
|
|
|
+ :print-config="{}"
|
|
|
+ :scrollY="{ enabled: true, gt: 0 }"
|
|
|
+ id="todoCenter"
|
|
|
+ :custom-config="{ storage: true }"
|
|
|
+ >
|
|
|
+ <vxe-column type="checkbox" width="60" align="center"></vxe-column>
|
|
|
+ <vxe-column field="expiredStatusText" title="超期状态" width="90" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span :class="'overdue-status-' + row.expiredStatus" :title="row.expiredStatusText"></span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="no" title="工单编码" width="140"></vxe-column>
|
|
|
+ <vxe-column field="isProvinceText" title="省/市工单" width="90"></vxe-column>
|
|
|
+ <vxe-column field="isUrgentText" title="是否紧急" width="90">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span class="color-danger font-bold">{{ row.isUrgentText }}</span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="currentStepName" title="当前节点" width="100"></vxe-column>
|
|
|
+ <vxe-column field="statusText" title="工单状态" width="100"></vxe-column>
|
|
|
+ <vxe-column field="title" title="工单标题" width="200">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="centerToOrgHandlerName" title="派单员" width="120"></vxe-column>
|
|
|
+ <vxe-column field="startTime" title="受理时间" sortable width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ formatDate(row.startTime, 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="expiredTime" title="工单期满时间" sortable width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ formatDate(row.expiredTime, 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="filedTime" title="办结时间" sortable width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ formatDate(row.filedTime, 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="orgLevelOneName" title="一级部门" width="140"></vxe-column>
|
|
|
+ <vxe-column field="actualHandleOrgName" title="接办部门" width="140"></vxe-column>
|
|
|
+ <vxe-column field="acceptType" title="受理类型" width="100"></vxe-column>
|
|
|
+ <vxe-column field="counterSignTypeText" title="是否会签" width="90"></vxe-column>
|
|
|
+ <vxe-column field="sourceChannel" title="来源渠道" width="100"></vxe-column>
|
|
|
+ <vxe-column field="hotspotName" title="热点分类" width="150"></vxe-column>
|
|
|
+ <vxe-column field="sensitive" title="敏感词" width="150"></vxe-column>
|
|
|
+ <vxe-column field="acceptorName" title="受理人" width="120"></vxe-column>
|
|
|
+ <vxe-column field="reTransactNum" title="重办次数" width="90"></vxe-column>
|
|
|
+ <vxe-column title="操作" fixed="right" width="130" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button link type="primary" @click="onSign(row)" title="签收工单" v-if="row.canSign" v-auth="'todo:center:sign'"> 签收 </el-button>
|
|
|
+ <el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'todo:center:edit'">
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
+ <el-button link type="primary" @click="onMigration(row)" title="平级移动" v-auth="'todo:center:migration'"> 平级移动 </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ </vxe-table>
|
|
|
+ </div>
|
|
|
+ <vxe-pager
|
|
|
+ v-model:currentPage="state.queryParams.PageIndex"
|
|
|
+ v-model:pageSize="state.queryParams.PageSize"
|
|
|
+ :total="state.total"
|
|
|
+ @page-change="queryList"
|
|
|
+ :layouts="['PrevPage', 'Number', 'NextPage', 'Sizes', 'FullJump', 'Total']"
|
|
|
+ >
|
|
|
+ </vxe-pager>
|
|
|
</div>
|
|
|
<!-- 工单平移 -->
|
|
|
<order-migration ref="orderMigrationRef" @updateList="queryList" />
|
|
@@ -121,7 +237,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="tsx" name="todoCenter">
|
|
|
-import { defineAsyncComponent, onActivated, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
|
|
+import { computed, defineAsyncComponent, onActivated, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
|
|
import type { FormInstance } from 'element-plus';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
@@ -158,8 +274,8 @@ const state = reactive<any>({
|
|
|
StepName: null, // 当前节点名称
|
|
|
IsUrgent: null,
|
|
|
CenterToOrgHandlerName: null, // 派单员
|
|
|
- SortField:null,
|
|
|
- SortRule:null,
|
|
|
+ SortField: null,
|
|
|
+ SortRule: null,
|
|
|
},
|
|
|
tableData: [], //表单
|
|
|
loading: false, // 加载
|
|
@@ -179,7 +295,7 @@ const columns = ref<any[]>([
|
|
|
{
|
|
|
prop: 'isUrgentText',
|
|
|
label: '是否紧急',
|
|
|
- render: (scope:any) => {
|
|
|
+ render: (scope: any) => {
|
|
|
return <span class="color-danger font-bold">{scope.row.isUrgentText}</span>;
|
|
|
},
|
|
|
},
|
|
@@ -191,7 +307,7 @@ const columns = ref<any[]>([
|
|
|
prop: 'startTime',
|
|
|
label: '受理时间',
|
|
|
minWidth: 160,
|
|
|
- render: (scope:any) => {
|
|
|
+ render: (scope: any) => {
|
|
|
return <span>{formatDate(scope.row.startTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
},
|
|
|
sortable: 'custom',
|
|
@@ -200,7 +316,7 @@ const columns = ref<any[]>([
|
|
|
prop: 'expiredTime',
|
|
|
label: '工单期满时间',
|
|
|
minWidth: 160,
|
|
|
- render: (scope:any) => {
|
|
|
+ render: (scope: any) => {
|
|
|
return <span>{formatDate(scope.row.expiredTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
},
|
|
|
sortable: 'custom',
|
|
@@ -209,7 +325,7 @@ const columns = ref<any[]>([
|
|
|
prop: 'filedTime',
|
|
|
label: '办结时间',
|
|
|
minWidth: 160,
|
|
|
- render: (scope:any) => {
|
|
|
+ render: (scope: any) => {
|
|
|
return <span>{formatDate(scope.row.filedTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
},
|
|
|
sortable: 'custom',
|
|
@@ -250,9 +366,9 @@ const getBaseData = async () => {
|
|
|
};
|
|
|
// 排序
|
|
|
const sortChange = (val: any) => {
|
|
|
- state.queryParams.SortField = val.order ? val.prop : null;
|
|
|
+ state.queryParams.SortField = val.order ? val.field : null;
|
|
|
// 0 升序 1 降序
|
|
|
- state.queryParams.SortRule = val.order ? (val.order == 'descending' ? 1 : 0) : null;
|
|
|
+ state.queryParams.SortRule = val.order ? (val.order == 'desc' ? 1 : 0) : null;
|
|
|
handleQuery();
|
|
|
};
|
|
|
// 手动查询,将页码设置为1
|
|
@@ -322,8 +438,8 @@ const onOrderEdit = (row: any) => {
|
|
|
};
|
|
|
// 交办单导出
|
|
|
const onJbExport = () => {
|
|
|
- const ids = proTableRef.value.selectedList.map((item: any) => item.id);
|
|
|
- ElMessageBox.confirm(`您确定导出选中的${proTableRef.value.selectedList.length}个工单的交办单,是否继续?`, '提示', {
|
|
|
+ const ids = checkTable.value.map((item: any) => item.id);
|
|
|
+ ElMessageBox.confirm(`您确定导出选中的工单交办单,是否继续?`, '提示', {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
@@ -374,9 +490,33 @@ const onAssignOrders = () => {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
};
|
|
|
+const tableRef = ref<RefType>();
|
|
|
+const checkTable = ref<EmptyArrayType>([]);
|
|
|
+const selectAllChangeEvent = ({ checked }) => {
|
|
|
+ if (tableRef.value) {
|
|
|
+ const records = tableRef.value.getCheckboxRecords();
|
|
|
+ checkTable.value = records;
|
|
|
+ console.log(checked ? '所有勾选事件' : '所有取消事件', records);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const selectChangeEvent = ({ checked }) => {
|
|
|
+ if (tableRef.value) {
|
|
|
+ const records = tableRef.value.getCheckboxRecords();
|
|
|
+ checkTable.value = records;
|
|
|
+ console.log(checked ? '勾选事件' : '取消事件', records);
|
|
|
+ }
|
|
|
+};
|
|
|
+const isChecked = computed(() => {
|
|
|
+ return !Boolean(checkTable.value.length);
|
|
|
+});
|
|
|
+const toolbarRef = ref<RefType>();
|
|
|
onMounted(() => {
|
|
|
getBaseData();
|
|
|
queryList();
|
|
|
+ if (tableRef.value && toolbarRef.value) {
|
|
|
+ tableRef.value.connect(toolbarRef.value);
|
|
|
+ }
|
|
|
});
|
|
|
onActivated(() => {
|
|
|
mittBus.on('clearCachePage', () => {
|
|
@@ -387,4 +527,11 @@ onActivated(() => {
|
|
|
onBeforeUnmount(() => {
|
|
|
mittBus.off('clearCachePage');
|
|
|
});
|
|
|
-</script>
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.todo-center-container {
|
|
|
+ .table {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|