|
@@ -164,14 +164,14 @@
|
|
|
<!-- <p class="table-title">信息列表</p> -->
|
|
|
<div>
|
|
|
<el-button type="primary" @click="onAddWorkOrder"> <SvgIcon name="ele-Plus" class="mr5" />新建工单 </el-button>
|
|
|
- <!-- <el-button type="primary" :disabled="!state.multipleSelection.length" v-waves @click="onImportTable">
|
|
|
- <SvgIcon name="iconfont icon-daochu" class="mr5" />导出
|
|
|
- </el-button> -->
|
|
|
+ <el-button type="primary" :disabled="!state.multipleSelection.length" v-waves @click="onImportTable">
|
|
|
+ <SvgIcon name="iconfont icon-daochu" class="mr5" />导出
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 表格 -->
|
|
|
<el-table :data="state.tableList" v-loading="state.loading" row-key="id" @selection-change="handleSelectionChange" @sort-change="sortChange">
|
|
|
- <!-- <el-table-column type="selection" width="55" :reserve-selection="true" /> -->
|
|
|
+ <el-table-column type="selection" width="55" :reserve-selection="true" />
|
|
|
<el-table-column type="index" width="60" label="序号" />
|
|
|
<!-- sortable="custom" 工单编码排序 -->
|
|
|
<el-table-column label="工单编码" prop="no" show-overflow-tooltip width="150">
|
|
@@ -265,9 +265,11 @@
|
|
|
import { defineAsyncComponent, ref, reactive, onMounted, onActivated } from 'vue';
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
|
|
import type { FormInstance } from 'element-plus';
|
|
|
-import { useRouter } from 'vue-router';
|
|
|
+import { storeToRefs } from 'pinia';
|
|
|
+import { useThemeConfig } from '/@/stores/themeConfig';
|
|
|
+import { useRouter, useRoute } from 'vue-router';
|
|
|
import { formatDate } from '/@/utils/formatTime';
|
|
|
-// import table2excel from 'js-table2excel';
|
|
|
+import table2excel from 'js-table2excel';
|
|
|
import { listBaseData, orderList, hotspottype, orderDelete } from '/@/api/business/order';
|
|
|
|
|
|
// 引入组件
|
|
@@ -370,6 +372,9 @@ const state = reactive(<any>{
|
|
|
orgData: [],
|
|
|
});
|
|
|
const cascaderRef = ref();
|
|
|
+const route = useRoute();
|
|
|
+const storesThemeConfig = useThemeConfig();
|
|
|
+const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
|
// 热点分类远程搜索
|
|
|
const HotspotProps = {
|
|
|
label: 'hotSpotName',
|
|
@@ -568,15 +573,25 @@ const onDeleteOrder = (row: any) => {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
};
|
|
|
-// 导出列表
|
|
|
-// const onImportTable = () => {
|
|
|
-// const tabeHeader = [
|
|
|
-// { key: 'phoneNo', colWidth: '', title: '电话号码', type: 'text', isCheck: true },
|
|
|
-// { key: 'duration', colWidth: '', title: '黑名单时长(秒)', type: 'text', isCheck: true },
|
|
|
-// { key: 'creationTime', colWidth: '', title: '创建时间', type: 'text', isCheck: true },
|
|
|
-// ];
|
|
|
-// table2excel(tabeHeader, state.multipleSelection, `${formatDate(new Date(), 'YYYY-mm-dd HH-MM')}`);
|
|
|
-// };
|
|
|
+//导出列表
|
|
|
+const onImportTable = () => {
|
|
|
+ const tabeHeader = [
|
|
|
+ { key: 'no', colWidth: '', title: '工单编码', type: 'text', isCheck: true },
|
|
|
+ { key: 'title', colWidth: '', title: '标题', type: 'text', isCheck: true },
|
|
|
+ { key: 'statusText', colWidth: '', title: '工单状态', type: 'text', isCheck: true },
|
|
|
+ { key: 'currentStepName', colWidth: '', title: '当前环节', type: 'text', isCheck: true },
|
|
|
+ { key: 'acceptTypeText', colWidth: '', title: '受理类型', type: 'text', isCheck: true },
|
|
|
+ { key: 'hotspot', colWidth: '', title: '热点分类', type: 'text', isCheck: true },
|
|
|
+ { key: 'emergencyLevelText', colWidth: '', title: '紧急程度', type: 'text', isCheck: true },
|
|
|
+ { key: 'expiredTime', colWidth: '', title: '办理期限', type: 'text', isCheck: true },
|
|
|
+ { key: 'employeeName', colWidth: '', title: '受理坐席', type: 'text', isCheck: true },
|
|
|
+ ];
|
|
|
+ table2excel(
|
|
|
+ tabeHeader,
|
|
|
+ state.multipleSelection,
|
|
|
+ `${themeConfig.value.globalTitle}-${route.meta.title} ${formatDate(new Date(), 'YYYY-mm-dd HH-MM')}`
|
|
|
+ );
|
|
|
+};
|
|
|
onMounted(async () => {
|
|
|
getBaseData();
|
|
|
getList(state.activeName);
|