|
@@ -46,6 +46,11 @@
|
|
|
v-model:page-size="state.queryParams.PageSize"
|
|
|
:key="Math.random()"
|
|
|
>
|
|
|
+ <template #tableHeader="scope">
|
|
|
+ <el-button type="primary" @click="onJbExport" :disabled="!scope.isSelected" :loading="state.loading" v-auth="'todo:seats:jbdExport'"
|
|
|
+ ><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
<template #expiredStatus="{ row }">
|
|
|
<span :class="'overdue-status-' + row.expiredStatus" :title="row.expiredStatusText"></span>
|
|
|
</template>
|
|
@@ -70,10 +75,12 @@
|
|
|
</template>
|
|
|
<script setup lang="tsx" name="todoOrder">
|
|
|
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
-import { FormInstance } from 'element-plus';
|
|
|
+import { ElMessage, ElMessageBox, FormInstance } from "element-plus";
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { orderListTodo } from '@/api/todo/order';
|
|
|
+import { exportJbOrder } from "@/api/business/order";
|
|
|
+import { downloadZip } from "@/utils/tools";
|
|
|
// 引入组件
|
|
|
const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
// 定义变量内容
|
|
@@ -97,7 +104,8 @@ const router = useRouter(); // 路由
|
|
|
const proTableRef = ref<RefType>(); // 表格ref
|
|
|
// 表格配置项
|
|
|
const columns = ref<any[]>([
|
|
|
- { prop: 'expiredStatus', label: '超期状态', align: 'center',fixed: 'left' },
|
|
|
+ { type: 'selection', fixed: 'left', width: 55, align: 'center' },
|
|
|
+ { prop: 'expiredStatus', label: '超期状态', align: 'center' },
|
|
|
{ prop: 'no', label: '工单编码', width: 150 },
|
|
|
{ prop: 'isProvince', label: '省/市工单', width: 100 },
|
|
|
{ prop: 'actualHandleStepName', label: '办理节点', width: 150 },
|
|
@@ -180,6 +188,29 @@ const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
formEl.resetFields();
|
|
|
queryList();
|
|
|
};
|
|
|
+// 交办单导出
|
|
|
+const onJbExport = () => {
|
|
|
+ const ids = proTableRef.value.selectedList.map((item: any) => item.id);
|
|
|
+ ElMessageBox.confirm(`您确定导出选中的${proTableRef.value.selectedList.length}个工单的交办单,是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ draggable: true,
|
|
|
+ cancelButtonClass: 'default-button',
|
|
|
+ autofocus: false,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ state.loading = true;
|
|
|
+ exportJbOrder(ids)
|
|
|
+ .then((res: any) => {
|
|
|
+ downloadZip(res);
|
|
|
+ state.loading = false;
|
|
|
+ ElMessage.success('导出成功');
|
|
|
+ })
|
|
|
+ .catch(() => {state.loading = false;});
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+};
|
|
|
const historyParams = history.state;
|
|
|
onMounted(() => {
|
|
|
if (historyParams.IsCountersign) {
|