|
@@ -18,33 +18,33 @@
|
|
|
<el-input v-model="state.queryParams.ProvinceNo" placeholder="省本地编号" clearable @keyup.enter="queryList" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <transition name="el-zoom-in-top" v-show="!searchCol">
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
- <el-form-item label="来电人姓名" prop="FromName">
|
|
|
- <el-input v-model="state.queryParams.FromName" placeholder="来电人姓名" clearable @keyup.enter="queryList" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </transition>
|
|
|
- <transition name="el-zoom-in-top" v-show="!searchCol">
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
- <el-form-item label="事发地址" prop="AreaCodes">
|
|
|
- <el-cascader
|
|
|
- :options="state.areaOptions"
|
|
|
- filterable
|
|
|
- :show-all-levels="false"
|
|
|
- :props="{ checkStrictly: true, value: 'id', label: 'areaName', multiple: true }"
|
|
|
- placeholder="请选择事发地址"
|
|
|
- clearable
|
|
|
- class="w100"
|
|
|
- v-model="state.queryParams.AreaCodes"
|
|
|
- collapse-tags
|
|
|
- collapse-tags-tooltip
|
|
|
- :max-collapse-tags="2"
|
|
|
- >
|
|
|
- </el-cascader>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </transition>
|
|
|
+ <transition name="el-zoom-in-top" v-show="!searchCol">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label="来电人姓名" prop="FromName">
|
|
|
+ <el-input v-model="state.queryParams.FromName" placeholder="来电人姓名" clearable @keyup.enter="queryList" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
+ <transition name="el-zoom-in-top" v-show="!searchCol">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label="事发地址" prop="AreaCodes">
|
|
|
+ <el-cascader
|
|
|
+ :options="state.areaOptions"
|
|
|
+ filterable
|
|
|
+ :show-all-levels="false"
|
|
|
+ :props="{ checkStrictly: true, value: 'id', label: 'areaName', multiple: true }"
|
|
|
+ placeholder="请选择事发地址"
|
|
|
+ clearable
|
|
|
+ class="w100"
|
|
|
+ v-model="state.queryParams.AreaCodes"
|
|
|
+ collapse-tags
|
|
|
+ collapse-tags-tooltip
|
|
|
+ :max-collapse-tags="2"
|
|
|
+ >
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
<transition name="el-zoom-in-top" v-show="!searchCol">
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
<el-form-item label="转接来源" prop="TransferPhone">
|
|
@@ -165,13 +165,13 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</transition>
|
|
|
- <transition name="el-zoom-in-top">
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol">
|
|
|
- <el-form-item label="来电号码" prop="FromPhone">
|
|
|
- <el-input v-model="state.queryParams.FromPhone" placeholder="来电号码" clearable @keyup.enter="queryList" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </transition>
|
|
|
+ <transition name="el-zoom-in-top">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol">
|
|
|
+ <el-form-item label="来电号码" prop="FromPhone">
|
|
|
+ <el-input v-model="state.queryParams.FromPhone" placeholder="来电号码" clearable @keyup.enter="queryList" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
<transition name="el-zoom-in-top">
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol">
|
|
|
<el-form-item label="联系电话" prop="PhoneNo">
|
|
@@ -285,115 +285,59 @@
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
<el-card shadow="never">
|
|
|
- <!-- 功能按钮 -->
|
|
|
- <div class="mb20 flex-center-between">
|
|
|
- <div>
|
|
|
+ <!-- 表格 -->
|
|
|
+ <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"
|
|
|
+ @export-current="exportCurrent"
|
|
|
+ @export-all="exportAll"
|
|
|
+ >
|
|
|
+ <!-- 表格 header 按钮 -->
|
|
|
+ <template #tableHeader="scope">
|
|
|
<el-button type="primary" @click="onCreateRepeatEvent"> <SvgIcon name="ele-Plus" class="mr5" /> 创建重复性事件 </el-button>
|
|
|
- <el-button type="primary" @click="onObserve" v-auth="'business:order:observe'" :disabled="!multipleSelection.length">
|
|
|
+ <el-button type="primary" @click="onObserve" v-auth="'business:order:observe'" :disabled="!scope.isSelected">
|
|
|
<SvgIcon name="ele-View" class="mr5" />设置观察件
|
|
|
</el-button>
|
|
|
- <el-button type="primary" @click="onEnd" v-auth="'business:order:end'" :disabled="!multipleSelection.length">
|
|
|
+ <el-button type="primary" @click="onEnd" v-auth="'business:order:end'" :disabled="!scope.isSelected">
|
|
|
<SvgIcon name="ele-Stopwatch" class="mr5" />设置终结件
|
|
|
</el-button>
|
|
|
- </div>
|
|
|
- <!-- 筛选按钮 -->
|
|
|
-<!-- <el-popover trigger="click" width="165" placement="bottom-end">
|
|
|
- <el-scrollbar wrap-class="scrollbar-wrapper" max-height="400px">
|
|
|
- <el-checkbox-group v-model="checkedColumns">
|
|
|
- <el-checkbox v-for="item in checkBoxGroup" :key="item.prop" :label="item.label" :value="item.prop"></el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-scrollbar>
|
|
|
- <template #reference>
|
|
|
- <el-button><SvgIcon name="ele-Operation" /></el-button>
|
|
|
- </template>
|
|
|
- </el-popover>-->
|
|
|
- </div>
|
|
|
- <!-- 表格 -->
|
|
|
- <el-table
|
|
|
- :data="state.tableData"
|
|
|
- v-loading="state.loading"
|
|
|
- row-key="id"
|
|
|
- @sort-change="sortChange"
|
|
|
- ref="multipleTableRef"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- stripe
|
|
|
- :key="reload"
|
|
|
- >
|
|
|
- <el-table-column type="selection" width="55" />
|
|
|
- <el-table-column label="超期状态" width="80" align="center" v-if="checkedColumns.includes('超期状态')">
|
|
|
- <template #default="{ row }">
|
|
|
- <span :class="'overdue-status-' + row.expiredStatus" :title="row.expiredStatusText"></span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="no" label="工单编码" show-overflow-tooltip width="150" v-if="checkedColumns.includes('工单编码')"></el-table-column>
|
|
|
- <el-table-column width="100" label="省/市工单" prop="isProvince" v-if="checkedColumns.includes('省/市工单')">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ row.isProvince ? '省工单' : '市工单' }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="currentStepName" label="办理节点" show-overflow-tooltip width="150" v-if="checkedColumns.includes('办理节点')"></el-table-column>
|
|
|
- <el-table-column label="工单状态" show-overflow-tooltip width="100" prop="statusText" v-if="checkedColumns.includes('工单状态')"></el-table-column>
|
|
|
- <el-table-column label="标题" show-overflow-tooltip width="300" v-if="checkedColumns.includes('标题')">
|
|
|
- <template #default="{ row }">
|
|
|
- <order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="受理时间" show-overflow-tooltip width="170" v-if="checkedColumns.includes('受理时间')">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.startTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="expiredTime" label="工单期满时间" show-overflow-tooltip width="170" v-if="checkedColumns.includes('工单期满时间')">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.expiredTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="办结时间" show-overflow-tooltip width="170" v-if="checkedColumns.includes('办结时间')">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.filedTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="orgLevelOneName" label="一级部门" show-overflow-tooltip width="170" v-if="checkedColumns.includes('一级部门')"></el-table-column>
|
|
|
- <el-table-column prop="actualHandleOrgName" label="接办部门" show-overflow-tooltip width="170" v-if="checkedColumns.includes('接办部门')"></el-table-column>
|
|
|
- <el-table-column prop="acceptType" label="受理类型" show-overflow-tooltip width="150" v-if="checkedColumns.includes('受理类型')"></el-table-column>
|
|
|
- <el-table-column prop="counterSignTypeText" label="中心会签" show-overflow-tooltip width="100" v-if="checkedColumns.includes('中心会签')"></el-table-column>
|
|
|
- <el-table-column prop="sourceChannel" label="来源方式" show-overflow-tooltip width="100" v-if="checkedColumns.includes('来源方式')"></el-table-column>
|
|
|
- <el-table-column prop="hotspotName" label="热点分类" show-overflow-tooltip width="200" v-if="checkedColumns.includes('热点分类')"></el-table-column>
|
|
|
- <el-table-column prop="tagNames" label="工单标签" show-overflow-tooltip width="200" v-if="checkedColumns.includes('工单标签')"></el-table-column>
|
|
|
- <el-table-column prop="employeeName" label="受理人" show-overflow-tooltip width="120" v-if="checkedColumns.includes('受理人')">
|
|
|
- <template #default="{ row }">
|
|
|
- <span
|
|
|
- >{{ row.acceptorName }} <span v-if="row.acceptorStaffNo">[{{ row.acceptorStaffNo }}]</span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" width="140" fixed="right" align="center">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'business:order:edit'">
|
|
|
- 修改
|
|
|
- </el-button>
|
|
|
- <order-detail :order="row" @updateList="queryList" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <template #empty>
|
|
|
- <Empty />
|
|
|
</template>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <!-- 分页 -->
|
|
|
- <pagination
|
|
|
- :total="state.total"
|
|
|
- v-model:page="state.queryParams.PageIndex"
|
|
|
- v-model:limit="state.queryParams.PageSize"
|
|
|
- @pagination="queryList"
|
|
|
- />
|
|
|
+ <template #expiredStatus="{ row }">
|
|
|
+ <span :class="'overdue-status-' + row.expiredStatus" :title="row.expiredStatusText"></span>
|
|
|
+ </template>
|
|
|
+ <template #isProvince="{ row }">
|
|
|
+ <span>{{ row.isProvince ? '省工单' : '市工单' }}</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 #operation="{ row }">
|
|
|
+ <el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'business:order:edit'">
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
+ <order-detail :order="row" @updateList="queryList" />
|
|
|
+ </template>
|
|
|
+ </ProTable>
|
|
|
</el-card>
|
|
|
+
|
|
|
<!-- 编辑重复性事件 -->
|
|
|
<repeat-event-edit ref="repeatEventEditRef" @updateList="queryList" />
|
|
|
</div>
|
|
|
</template>
|
|
|
-<script setup lang="ts" name="order">
|
|
|
-import { defineAsyncComponent, onMounted, reactive, ref, watch } from 'vue';
|
|
|
+<script setup lang="tsx" name="order">
|
|
|
+import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
import type { FormInstance } from 'element-plus';
|
|
|
import { ElButton, ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import { throttle } from '@/utils/tools';
|
|
@@ -404,7 +348,7 @@ import { formatDate } from '@/utils/formatTime';
|
|
|
import { listBaseData, orderList } from '@/api/business/order';
|
|
|
import { addObserve } from '@/api/query/observe';
|
|
|
import { addEnd } from '@/api/query/end';
|
|
|
-import { treeArea } from "@/api/auxiliary/area";
|
|
|
+import { treeArea } from '@/api/auxiliary/area';
|
|
|
|
|
|
// 引入组件
|
|
|
const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
@@ -412,11 +356,12 @@ const RepeatEventEdit = defineAsyncComponent(() => import('@/views/business/repe
|
|
|
const HotSpotSelect = defineAsyncComponent(() => import('@/components/Hotspot/index.vue')); // 选择热点
|
|
|
|
|
|
// 定义变量内容
|
|
|
-const state = reactive(<any>{
|
|
|
+const paginationModel = reactive({});
|
|
|
+const state = reactive({
|
|
|
queryParams: {
|
|
|
- // 查询条件
|
|
|
PageIndex: 1, // 当前页
|
|
|
PageSize: 10, // 每页条数
|
|
|
+ // 查询条件
|
|
|
No: null, // 工单编码
|
|
|
ProvinceNo: null, // 省本地编号
|
|
|
EmergencyLevels: [], // 紧急程度
|
|
@@ -424,9 +369,9 @@ const state = reactive(<any>{
|
|
|
IsScreen: null, // 是否甄别
|
|
|
CurrentStepCode: null, // 当前办理节点
|
|
|
IsOverTime: null, // 是否超期
|
|
|
- FromName: null, // 来电人姓名
|
|
|
- AreaCodes: [], // 事发地址
|
|
|
- FromPhone: null, // 来电号码
|
|
|
+ FromName: null, // 来电人姓名
|
|
|
+ AreaCodes: [], // 事发地址
|
|
|
+ FromPhone: null, // 来电号码
|
|
|
Keyword: null, // 关键字
|
|
|
Content: null, // 工单内容
|
|
|
AcceptTypes: null, // 受理类型
|
|
@@ -459,110 +404,56 @@ const state = reactive(<any>{
|
|
|
orgsOptions: [], // 部门
|
|
|
pushTypeOptions: [], //推送分类
|
|
|
orgData: [], // 机构数据
|
|
|
- areaOptions: [], // 省市区数据
|
|
|
+ areaOptions: [], // 省市区数据
|
|
|
});
|
|
|
const ruleFormRef = ref<RefType>(); // 表单ref
|
|
|
const searchCol = ref(true); // 展开/收起
|
|
|
const route = useRoute(); // 路由
|
|
|
const router = useRouter(); // 路由
|
|
|
-const checkedColumns = ref<EmptyArrayType>([
|
|
|
- '超期状态',
|
|
|
- '工单编码',
|
|
|
- '省/市工单',
|
|
|
- '办理节点',
|
|
|
- '工单状态',
|
|
|
- '标题',
|
|
|
- '受理时间',
|
|
|
- '工单期满时间',
|
|
|
- '办结时间',
|
|
|
- '一级部门',
|
|
|
- '接办部门',
|
|
|
- '受理类型',
|
|
|
- '中心会签',
|
|
|
- '来源方式',
|
|
|
- '热点分类',
|
|
|
- '工单标签',
|
|
|
- '受理人',
|
|
|
-]); // 筛选列
|
|
|
-
|
|
|
-const checkBoxGroup = ref<EmptyArrayType>([
|
|
|
- {
|
|
|
- prop: 'cq',
|
|
|
- label: '超期状态',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'no',
|
|
|
- label: '工单编码',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'isProvince',
|
|
|
- label: '省/市工单',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'currentStepName',
|
|
|
- label: '办理节点',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'statusText',
|
|
|
- label: '工单状态',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'title',
|
|
|
- label: '标题',
|
|
|
- },
|
|
|
+const proTableRef = ref<RefType>(); // 表格ref
|
|
|
+// 表格配置项
|
|
|
+const columns = ref<any[]>([
|
|
|
+ { type: 'selection', fixed: 'left', width: 55 },
|
|
|
+ { prop: 'expiredStatus', label: '超期状态', align: 'center' },
|
|
|
+ { prop: 'no', label: '工单编码', width: 150 },
|
|
|
+ { prop: 'isProvince', label: '省/市工单', width: 100 },
|
|
|
+ { prop: 'currentStepName', 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: '一级部门',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'actualHandleOrgName',
|
|
|
- label: '接办部门',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'acceptType',
|
|
|
- label: '受理类型',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'counterSignTypeText',
|
|
|
- label: '中心会签',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'sourceChannel',
|
|
|
- label: '来源方式',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'hotspotName',
|
|
|
- label: '热点分类',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'tagNames',
|
|
|
- label: '工单标签',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'employeeName',
|
|
|
- label: '受理人',
|
|
|
- },
|
|
|
+ { prop: 'orgLevelOneName', label: '一级部门', width: 170 },
|
|
|
+ { prop: 'actualHandleOrgName', label: '接办部门', width: 170 },
|
|
|
+ { prop: 'acceptType', label: '受理类型', width: 150 },
|
|
|
+ { prop: 'counterSignTypeText', label: '中心会签', width: 100 },
|
|
|
+ { prop: 'sourceChannel', label: '来源方式', width: 100 },
|
|
|
+ { prop: 'hotspotName', label: '热点分类', width: 200 },
|
|
|
+ { prop: 'tagNames', label: '工单标签', width: 200 },
|
|
|
+ { prop: 'employeeName', label: '受理人', width: 120 },
|
|
|
+ { prop: 'operation', label: '操作', fixed: 'right', width: 140, align: 'center' },
|
|
|
]);
|
|
|
-const reload = ref<string>('');
|
|
|
-watch(
|
|
|
- () => checkedColumns.value,
|
|
|
- (val) => {
|
|
|
- reload.value = String(Math.random());
|
|
|
- console.log(val)
|
|
|
- }
|
|
|
-);
|
|
|
// 获取选择组织name值
|
|
|
const cascadeRef = ref<RefType>();
|
|
|
const getKnowledgeList = () => {
|
|
@@ -596,30 +487,31 @@ const timeStartChangeDone = (val: string[]) => {
|
|
|
};
|
|
|
// 获取查询条件基础信息
|
|
|
const getBaseData = async () => {
|
|
|
- try {
|
|
|
- const res: any = await listBaseData();
|
|
|
- const mappings: any = {
|
|
|
- acceptTypeOptions: 'acceptTypeOptions',
|
|
|
- channelOptions: 'channelOptions',
|
|
|
- emergencyLevelOptions: 'emergencyLevelOptions',
|
|
|
- orgsOptions: 'orgsOptions',
|
|
|
- pushTypeOptions: 'pushTypeOptions',
|
|
|
- orderStatusOptions: 'orderStatusOptions',
|
|
|
- identityTypeOptions: 'identityTypeOptions',
|
|
|
- currentStepOptions: 'currentStepOptions',
|
|
|
- };
|
|
|
- for (const key in mappings) {
|
|
|
- state[key] = res.result?.[mappings[key]] ?? [];
|
|
|
- }
|
|
|
- const area = await treeArea();
|
|
|
- state.areaOptions = area.result ?? []; //省市区数据
|
|
|
- } catch (error) {
|
|
|
- console.log(error);
|
|
|
- }
|
|
|
+ try {
|
|
|
+ const res: any = await listBaseData();
|
|
|
+ const mappings: any = {
|
|
|
+ acceptTypeOptions: 'acceptTypeOptions',
|
|
|
+ channelOptions: 'channelOptions',
|
|
|
+ emergencyLevelOptions: 'emergencyLevelOptions',
|
|
|
+ orgsOptions: 'orgsOptions',
|
|
|
+ pushTypeOptions: 'pushTypeOptions',
|
|
|
+ orderStatusOptions: 'orderStatusOptions',
|
|
|
+ identityTypeOptions: 'identityTypeOptions',
|
|
|
+ currentStepOptions: 'currentStepOptions',
|
|
|
+ };
|
|
|
+ for (const key in mappings) {
|
|
|
+ state[key] = res.result?.[mappings[key]] ?? [];
|
|
|
+ }
|
|
|
+ const area = await treeArea();
|
|
|
+ state.areaOptions = area.result ?? []; //省市区数据
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
};
|
|
|
/** 获取列表 */
|
|
|
const queryList = () => {
|
|
|
let request = other.deepClone(state.queryParams);
|
|
|
+ request = { ...request, ...paginationModel };
|
|
|
Reflect.deleteProperty(request, 'crTime'); // 删除无用的参数
|
|
|
Reflect.deleteProperty(request, 'exTime'); // 删除无用的参数
|
|
|
Reflect.deleteProperty(request, 'doneTime'); // 删除无用的参数
|
|
@@ -634,10 +526,6 @@ const queryList = () => {
|
|
|
state.loading = false;
|
|
|
});
|
|
|
};
|
|
|
-// 表格排序
|
|
|
-const sortChange = (column: any) => {
|
|
|
- console.log(column);
|
|
|
-};
|
|
|
const hotSpotRef = ref<RefType>();
|
|
|
/** 重置按钮操作 */
|
|
|
const resetQuery = throttle((formEl: FormInstance | undefined) => {
|
|
@@ -650,20 +538,14 @@ const resetQuery = throttle((formEl: FormInstance | undefined) => {
|
|
|
hotSpotRef.value.reset();
|
|
|
queryList();
|
|
|
}, 300);
|
|
|
-// 表格多选
|
|
|
-const multipleTableRef = ref<RefType>();
|
|
|
-const multipleSelection = ref<any>([]);
|
|
|
-const handleSelectionChange = (val: any[]) => {
|
|
|
- multipleSelection.value = val;
|
|
|
-};
|
|
|
// 导出
|
|
|
const onExport = () => {
|
|
|
console.log('导出');
|
|
|
};
|
|
|
// 设置终结件
|
|
|
const onObserve = () => {
|
|
|
- const titles = multipleSelection.value.map((item: any) => item.title).join(',');
|
|
|
- const ids = multipleSelection.value.map((item: any) => {
|
|
|
+ const titles = proTableRef.value.selectedList.map((item: any) => item.title).join(',');
|
|
|
+ const ids = proTableRef.value.selectedList.map((item: any) => {
|
|
|
return {
|
|
|
orderId: item.id,
|
|
|
};
|
|
@@ -678,6 +560,7 @@ const onObserve = () => {
|
|
|
.then(() => {
|
|
|
addObserve({ orderIds: ids }).then(() => {
|
|
|
ElMessage.success('操作成功');
|
|
|
+ proTableRef.value.clearSelection();
|
|
|
queryList();
|
|
|
});
|
|
|
})
|
|
@@ -685,8 +568,8 @@ const onObserve = () => {
|
|
|
};
|
|
|
// 设置终结件
|
|
|
const onEnd = () => {
|
|
|
- const titles = multipleSelection.value.map((item: any) => item.title).join(',');
|
|
|
- const ids = multipleSelection.value.map((item: any) => {
|
|
|
+ const titles = proTableRef.value.selectedList.map((item: any) => item.title).join(',');
|
|
|
+ const ids = proTableRef.value.selectedList.map((item: any) => {
|
|
|
return {
|
|
|
orderId: item.id,
|
|
|
};
|
|
@@ -701,6 +584,7 @@ const onEnd = () => {
|
|
|
.then(() => {
|
|
|
addEnd({ orderIds: ids }).then(() => {
|
|
|
ElMessage.success('操作成功');
|
|
|
+ proTableRef.value.clearSelection();
|
|
|
queryList();
|
|
|
});
|
|
|
})
|
|
@@ -722,6 +606,12 @@ const onOrderEdit = (row: any) => {
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
+const exportCurrent = () => {
|
|
|
+ console.log('导出当前页', proTableRef.value);
|
|
|
+};
|
|
|
+const exportAll = () => {
|
|
|
+ console.log('导出全部', proTableRef.value);
|
|
|
+};
|
|
|
onMounted(() => {
|
|
|
getBaseData();
|
|
|
queryList();
|