|
@@ -351,13 +351,13 @@
|
|
|
<el-input v-model="state.ruleForm.street" placeholder="请填写详细地址" clearable> </el-input>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="7" :xl="7" :offset="1">
|
|
|
- <el-button type="primary" link><SvgIcon name="ele-Location" size="16px" /> 地图定位</el-button>
|
|
|
+ <el-button type="primary" link @click="selectLocation"><SvgIcon name="ele-Location" size="16px" /> 地图定位</el-button>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <div v-if="state.ruleForm.address" class="color-danger mb10 flex-center-align" style="margin-left: 110px">
|
|
|
- 【{{ state.ruleForm.address }}】下存在多起【热点类型】时间,点击前往查看或右侧添加重复性事件
|
|
|
- <el-button type="primary" link> 查看详情</el-button>
|
|
|
+ <div v-if="showRepeatEvent" class="color-danger mb10" style="margin-left: 110px">
|
|
|
+ 【{{ state.ruleForm.address }}】下存在多起【热点类型】事件,点击前往查看或右侧添加重复性事件
|
|
|
+ <el-button type="primary" link style="padding: 0 0 3px" @click="onRepeatEvent"> 查看详情</el-button>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
@@ -451,200 +451,29 @@
|
|
|
<el-tab-pane label="知识库" name="knowledge">
|
|
|
<el-tabs v-model="knowledgeActive" @tab-change="handleKnowledge">
|
|
|
<el-tab-pane label="中心知识库" name="center">
|
|
|
- <div class="knowledge-container">
|
|
|
- <el-input
|
|
|
- v-model="state.KnowledgeKeyword"
|
|
|
- class="knowledge-input mb20"
|
|
|
- placeholder="请填写搜索内容"
|
|
|
- @keyup.enter="knowledgeRetrievalPaged(state.KnowledgeKeyword)"
|
|
|
- >
|
|
|
- <template #prefix>
|
|
|
- <SvgIcon name="ele-Search" size="16px" />
|
|
|
- </template>
|
|
|
- <template #suffix>
|
|
|
- <el-button
|
|
|
- class="knowledge-search-button"
|
|
|
- type="primary"
|
|
|
- :loading="state.loading"
|
|
|
- round
|
|
|
- @click="knowledgeRetrievalPaged(state.KnowledgeKeyword)"
|
|
|
- >
|
|
|
- <SvgIcon name="ele-Search" size="16px" color="#fff" />
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- <div>
|
|
|
- <span class="mr10" v-if="state.hotWords.length">搜索热词</span>
|
|
|
- <el-tag
|
|
|
- v-for="(item, index) in state.hotWords"
|
|
|
- :key="index"
|
|
|
- class="mr10 mb10"
|
|
|
- style="cursor: pointer"
|
|
|
- @click="knowledgeRetrievalPaged(item)"
|
|
|
- round
|
|
|
- >
|
|
|
- {{ item }}
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- <ul class="mt10" v-loading="state.loading">
|
|
|
- <el-empty description="暂无数据" v-if="!state.knowledgeList.length" class="mb20">
|
|
|
- <template #image>
|
|
|
- <span></span>
|
|
|
- </template>
|
|
|
- </el-empty>
|
|
|
- <li v-for="(item, index) in state.knowledgeList" :key="index" class="mb20 knowledge-item" @click="onPreview(item)" v-else>
|
|
|
- <p class="font16">
|
|
|
- <SvgIcon name="iconfont icon-dian" size="16px" /> <b>{{ item.title }}</b>
|
|
|
- </p>
|
|
|
- <p class="pt6 indent text-ellipsis2" v-html="item.content"></p>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <!-- 分页 -->
|
|
|
- <pagination
|
|
|
- :total="state.knowledgeTotal"
|
|
|
- v-model:page="state.knowledgeQuery.PageIndex"
|
|
|
- v-model:limit="state.knowledgeQuery.PageSize"
|
|
|
- @pagination="knowledgeRetrievalPaged(state.KnowledgeKeyword)"
|
|
|
- :pageSizes="[5, 10, 15, 20]"
|
|
|
- layout="total, prev, pager, next"
|
|
|
- class="pt10"
|
|
|
- />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="部门知识库" name="org">
|
|
|
- <div class="knowledge-container">
|
|
|
- <el-input
|
|
|
- v-model="state.KnowledgeKeyword"
|
|
|
- class="knowledge-input mb20"
|
|
|
- placeholder="请填写搜索内容"
|
|
|
- @keyup.enter="knowledgeRetrievalPaged(state.KnowledgeKeyword)"
|
|
|
- >
|
|
|
- <template #prefix>
|
|
|
- <SvgIcon name="ele-Search" size="16px" />
|
|
|
- </template>
|
|
|
- <template #suffix>
|
|
|
- <el-button
|
|
|
- class="knowledge-search-button"
|
|
|
- type="primary"
|
|
|
- :loading="state.loading"
|
|
|
- round
|
|
|
- @click="knowledgeRetrievalPaged(state.KnowledgeKeyword)"
|
|
|
- >
|
|
|
- <SvgIcon name="ele-Search" size="16px" color="#fff" />
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- <div>
|
|
|
- <span class="mr10" v-if="state.hotWords.length">搜索热词</span>
|
|
|
- <el-tag
|
|
|
- v-for="(item, index) in state.hotWords"
|
|
|
- :key="index"
|
|
|
- class="mr10 mb10"
|
|
|
- style="cursor: pointer"
|
|
|
- @click="knowledgeRetrievalPaged(item)"
|
|
|
- round
|
|
|
- >
|
|
|
- {{ item }}
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- <ul class="mt10" v-loading="state.loading">
|
|
|
- <el-empty description="暂无数据" v-if="!state.knowledgeList.length" class="mb20">
|
|
|
- <template #image>
|
|
|
- <span></span>
|
|
|
- </template>
|
|
|
- </el-empty>
|
|
|
- <li v-for="(item, index) in state.knowledgeList" :key="index" class="mb20 knowledge-item" @click="onPreview(item)" v-else>
|
|
|
- <p class="font16">
|
|
|
- <SvgIcon name="iconfont icon-dian" size="16px" /> <b>{{ item.title }}</b>
|
|
|
- </p>
|
|
|
- <p class="pt6 indent text-ellipsis2" v-html="item.content"></p>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <!-- 分页 -->
|
|
|
- <pagination
|
|
|
- :total="state.knowledgeTotal"
|
|
|
- v-model:page="state.knowledgeQuery.PageIndex"
|
|
|
- v-model:limit="state.knowledgeQuery.PageSize"
|
|
|
- @pagination="knowledgeRetrievalPaged(state.KnowledgeKeyword)"
|
|
|
- :pageSizes="[5, 10, 15, 20]"
|
|
|
- layout="total, prev, pager, next"
|
|
|
- class="pt10"
|
|
|
- />
|
|
|
</el-tab-pane>
|
|
|
+ <Knowledge :type="knowledgeActive" :formData="state.ruleForm" ref="knowledgeActiveRef" v-if="knowledgeActive==='center'"/>
|
|
|
+ <Knowledge :type="knowledgeActive" :formData="state.ruleForm" ref="knowledgeActiveRef" v-if="knowledgeActive==='org'"/>
|
|
|
</el-tabs>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="重复性事件" name="repeat"> </el-tab-pane>
|
|
|
+ <el-tab-pane label="重复性事件" name="repeat">
|
|
|
+ <repeat-event />
|
|
|
+ </el-tab-pane>
|
|
|
<el-tab-pane label="历史工单" name="history">
|
|
|
- <el-form :model="state.queryParams" ref="queryParamsRef" :inline="true" @submit.native.prevent>
|
|
|
- <el-form-item label="关键词" prop="Keyword">
|
|
|
- <el-input v-model="state.queryParams.Keyword" placeholder="工单标题/工单编码" clearable @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" @click="handleQuery" :loading="state.historyOrderLoading">
|
|
|
- <SvgIcon name="ele-Search" class="mr5" />查询
|
|
|
- </el-button>
|
|
|
- <el-button @click="resetQuery(queryParamsRef)" :loading="state.historyOrderLoading" class="default-button">
|
|
|
- <SvgIcon name="ele-Refresh" class="mr5" />重置
|
|
|
- </el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-table
|
|
|
- :data="state.tableData"
|
|
|
- v-loading="state.historyOrderLoading"
|
|
|
- row-key="id"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- max-height="300"
|
|
|
- ref="multipleTableRef"
|
|
|
- >
|
|
|
- <el-table-column type="selection" label="重复件" width="80" :reserve-selection="true" v-if="state.ruleForm.isRepeat === 'true'" />
|
|
|
- <el-table-column prop="phoneNo" label="工单标题" show-overflow-tooltip width="180">
|
|
|
- <template #default="{ row }">
|
|
|
- {{ row.title }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="hotspotName" label="热点分类" show-overflow-tooltip> </el-table-column>
|
|
|
- <el-table-column prop="no" label="工单编码" show-overflow-tooltip> </el-table-column>
|
|
|
- <el-table-column prop="currentStepName" label="当前环节" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="statusText" label="状态" width="70" fixed="right" align="center">
|
|
|
- <template #default="{ row }">
|
|
|
- <!-- 草稿 -->
|
|
|
- <span class="color-info" v-if="row.status === 0">{{ row.statusText }}</span>
|
|
|
- <!-- 待签收 -->
|
|
|
- <span class="color-success" v-if="row.status === 10">{{ row.statusText }}</span>
|
|
|
- <!-- 办理中 -->
|
|
|
- <span class="color-primary" v-if="row.status === 20">{{ row.statusText }}</span>
|
|
|
- <!-- 会签中 -->
|
|
|
- <span class="color-primary" v-if="row.status === 30">{{ row.statusText }}</span>
|
|
|
- <!-- 退回 -->
|
|
|
- <span class="color-danger" v-if="row.status === 40">{{ row.statusText }}</span>
|
|
|
- <!-- 办理完成 -->
|
|
|
- <span class="color-success" v-if="row.status === 50">{{ row.statusText }}</span>
|
|
|
- <!-- 已归档 -->
|
|
|
- <span class="color-info" v-if="row.status === 60">{{ row.statusText }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="statusText" label="操作" width="170" fixed="right" align="center">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-button @click="onSupply(row)" link type="primary" v-auth="'business:order:supply'"> 补充 </el-button>
|
|
|
- <el-button @click="onRevoke(row)" link type="primary" v-auth="'business:order:revoke'"> 撤销 </el-button>
|
|
|
- <el-button @click="onSupervise(row)" link type="primary"> 督办 </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination
|
|
|
- :total="state.total"
|
|
|
- v-model:page="state.queryParams.PageIndex"
|
|
|
- v-model:limit="state.queryParams.PageSize"
|
|
|
- @pagination="searchHistory"
|
|
|
- />
|
|
|
+ <History :formData="state.ruleForm" :orderId="state.orderId" @handleSelectionChange="handleSelectionChange" ref="historyRef"/>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-card>
|
|
|
<el-card shadow="never">
|
|
|
<el-tabs v-model="rightBottomActive" @tab-change="handleRightBottom">
|
|
|
- <el-tab-pane label="语音助手" name="voice"> </el-tab-pane>
|
|
|
- <el-tab-pane label="市民画像" name="draw"> </el-tab-pane>
|
|
|
+ <el-tab-pane label="语音助手" name="voice">
|
|
|
+ <voice-assistant />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="市民画像" name="draw">
|
|
|
+ <citizen-portrait />
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-card>
|
|
|
</el-scrollbar>
|
|
@@ -653,15 +482,13 @@
|
|
|
<!-- 拓展表单 -->
|
|
|
<order-expand-form ref="ExpandFormRef" @saveExpandForm="saveExpandForm" :orderDetail="orderDetailInfo" :extra="extra" />
|
|
|
<!-- 历史工单 -->
|
|
|
- <order-history ref="HistoryOrderRef" @saveSelect="saveSelect"> </order-history>
|
|
|
- <!-- 补充信息 -->
|
|
|
- <order-supply ref="SupplyRef" @onSupplySuccess="onSupplySuccess" />
|
|
|
- <!-- 工单撤销 -->
|
|
|
- <order-revoke ref="orderRevokeRef" @onRevokeSuccess="onRevokeSuccess" />
|
|
|
- <!-- 工单督办 -->
|
|
|
- <order-super-vise ref="orderSuperviseRef" @onSuperviseSuccess="onSuperviseSuccess" />
|
|
|
+ <order-history ref="HistoryOrderRef" @saveSelect="saveSelect" />
|
|
|
+ <!-- 重复事件列表 -->
|
|
|
+ <repeat-event-dialog ref="repeatEventDialogRef" />
|
|
|
<!-- 流程审批 -->
|
|
|
- <process-approval ref="processApprovalRef" @orderProcessSuccess="orderProcessSuccess"> </process-approval>
|
|
|
+ <process-approval ref="processApprovalRef" @orderProcessSuccess="orderProcessSuccess" />
|
|
|
+ <!-- 地图选点 -->
|
|
|
+ <map-dialog ref="mapDialogRef" @confirm="selectMap"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -674,22 +501,24 @@ import { useRoute, useRouter } from 'vue-router';
|
|
|
import { useTelStatus } from '/@/stores/telStatus';
|
|
|
import { throttle } from '/@/utils/tools';
|
|
|
import { commonEnum } from '/@/utils/constants';
|
|
|
-import { auth } from '/@/utils/authFunction';
|
|
|
-import { orderBaseDataAdd, orderAdd, hotSpotType, historyOrder, orderEdit, orderDetail, orderBaseExt } from '/@/api/business/order';
|
|
|
+import { orderBaseDataAdd, orderAdd, hotSpotType, orderEdit, orderDetail, orderBaseExt } from '/@/api/business/order';
|
|
|
import { useUserInfo } from '/@/stores/userInfo';
|
|
|
import { treeArea } from '/@/api/system/area';
|
|
|
-import { knowPopScreen, getKeyWord } from '/@/api/knowledge';
|
|
|
import mittBus from '/@/utils/mitt';
|
|
|
|
|
|
// 引入组件
|
|
|
+const Knowledge = defineAsyncComponent(() => import('/@/views/business/order/accept/Knowledge.vue')); // 知识库
|
|
|
+const History = defineAsyncComponent(() => import('/@/views/business/order/accept/History.vue')); // 历史工单
|
|
|
+const RepeatEvent = defineAsyncComponent(() => import('/@/views/business/order/accept/Repeat-event.vue')); // 重复事件
|
|
|
+const VoiceAssistant = defineAsyncComponent(() => import('/@/views/business/order/accept/Voice-assistant.vue')); // 重复事件
|
|
|
+const CitizenPortrait = defineAsyncComponent(() => import('/@/views/business/order/accept/Citizen-portrait.vue')); // 市民坏画像
|
|
|
+const RepeatEventDialog = defineAsyncComponent(() => import('/@/views/business/order/components/Order-repeat-event.vue')); // 重复事件弹窗列表
|
|
|
const OrderExpandForm = defineAsyncComponent(() => import('/@/views/business/order/components/Order-expand-form.vue')); // 拓展表单
|
|
|
-const OrderHistory = defineAsyncComponent(() => import('/@/views/business/order/components/Order-history.vue')); // 历史工单
|
|
|
+const OrderHistory = defineAsyncComponent(() => import('/@/views/business/order/components/Order-history.vue')); // 历史工单弹窗列表
|
|
|
const CommonAdvice = defineAsyncComponent(() => import('/@/components/CommonAdvice/index.vue')); // 常用意见
|
|
|
-const OrderSupply = defineAsyncComponent(() => import('/@/views/business/order/components/Order-supply.vue')); // 补充信息
|
|
|
const AnnexList = defineAsyncComponent(() => import('/@/components/AnnexList/index.vue')); // 附件列表
|
|
|
-const OrderRevoke = defineAsyncComponent(() => import('/@/views/business/order/components/Order-revoke.vue')); // 撤销组件
|
|
|
-const OrderSuperVise = defineAsyncComponent(() => import('/@/views/business/supervise/components/Order-supervise.vue')); // 工单督办
|
|
|
const ProcessApproval = defineAsyncComponent(() => import('/@/components/ProcessApproval/index.vue')); // 流程审批
|
|
|
+const MapDialog = defineAsyncComponent(() => import('/@/views/business/order/components/Map-Dialog.vue')); // 地图定位
|
|
|
// 定义变量内容
|
|
|
const state = reactive<any>({
|
|
|
createBy: 'manual', // 工单创建方式 默认手动创建 tel:来电弹单 letter:互联网来信 默认表示手动创建
|
|
@@ -731,8 +560,7 @@ const state = reactive<any>({
|
|
|
callAddress: '', // 来电归属地
|
|
|
},
|
|
|
formLoading: false, // 表单加载状态
|
|
|
- historyOrderLoading: false, // 历史工单加载状态
|
|
|
- loading: false, // 知识检索加载状态
|
|
|
+
|
|
|
acceptTypeOptions: [], // 受理类型
|
|
|
channelOptions: [], // 来源频道
|
|
|
emergencyLevelOptions: [], // 紧急程度
|
|
@@ -755,28 +583,8 @@ const state = reactive<any>({
|
|
|
},
|
|
|
],
|
|
|
orgData: [], // 机构数据
|
|
|
- tableData: [], // 历史工单
|
|
|
- total: 0, // 历史工单总条数
|
|
|
- queryParams: {
|
|
|
- PageIndex: 1, // 当前页
|
|
|
- PageSize: 10, // 每页条数
|
|
|
- Keyword: '', // 关键字
|
|
|
- },
|
|
|
- KnowledgeKeyword: '', //知识检索内容
|
|
|
- hotWords: [], // 知识检索热点
|
|
|
- knowledgeList: [], //知识检索列表
|
|
|
- external: [], // 知识检索展开
|
|
|
- hotspotExternal: [], // 热点分类展开
|
|
|
- knowledgeQuery: {
|
|
|
- // 知识库查询
|
|
|
- PageIndex: 1, // 当前页
|
|
|
- PageSize: 5, // 每页条数
|
|
|
- Keyword: '', // 关键字
|
|
|
- },
|
|
|
- knowledgeTotal: 0, // 知识库总条数
|
|
|
orderId: '', // 工单id
|
|
|
});
|
|
|
-const queryParamsRef = ref<RefType>(); // 历史工单查询参数
|
|
|
const useTelStatusStore = useTelStatus(); // 来电弹屏
|
|
|
const { telStatusInfo } = storeToRefs(useTelStatusStore); // 来电弹屏信息
|
|
|
const storesUserInfo = useUserInfo(); // 用户信息
|
|
@@ -814,7 +622,7 @@ const createFilter = (queryString: string) => {
|
|
|
};
|
|
|
};
|
|
|
links.value = loadAll();
|
|
|
-
|
|
|
+// 选择企业
|
|
|
const handleSelect = (item: Record<string, any>) => {
|
|
|
console.log(item);
|
|
|
};
|
|
@@ -840,32 +648,15 @@ const load = async (node: any, resolve: any) => {
|
|
|
resolve(res.result);
|
|
|
};
|
|
|
// 选择热点分类
|
|
|
+const knowledgeActiveRef = ref<RefType>()
|
|
|
const hotSpotChange = (val: any, e: any) => {
|
|
|
state.hotspotExternal = [];
|
|
|
state.external = [];
|
|
|
state.hotspotExternal = getParentId(e, state.external);
|
|
|
state.ruleForm.hotspotSpliceName = val.hotSpotFullName;
|
|
|
state.ruleForm.hotspotName = val.hotSpotName;
|
|
|
- knowledgeRetrievalPaged(val.hotSpotName);
|
|
|
+ knowledgeActiveRef.value.knowledgeRetrievalPaged(val.hotSpotName);
|
|
|
};
|
|
|
-// 知识检索
|
|
|
-const knowledgeRetrievalPaged = async (val?: string) => {
|
|
|
- state.knowledgeQuery.Keyword = val ?? '';
|
|
|
- state.KnowledgeKeyword = val ?? '';
|
|
|
- try {
|
|
|
- state.loading = true;
|
|
|
- const res: any = await knowPopScreen(state.knowledgeQuery);
|
|
|
- state.knowledgeList = res.result?.items ?? [];
|
|
|
- state.knowledgeTotal = res.result?.total ?? 0;
|
|
|
- state.loading = false;
|
|
|
- } catch (error) {
|
|
|
- state.loading = false;
|
|
|
- }
|
|
|
-};
|
|
|
-// 手机号码脱敏处理
|
|
|
-// const phoneNumber = computed(() => {
|
|
|
-// return desensitizationPhone(telStatusInfo.value.onCallArr[0]?.from);
|
|
|
-// });
|
|
|
// 递归查找父级Id
|
|
|
const getParentId = (val: any, arr: string[]) => {
|
|
|
if (val.data.parentId) {
|
|
@@ -889,11 +680,33 @@ const selectOrderType = (val: any) => {
|
|
|
});
|
|
|
};
|
|
|
const areaRef = ref<RefType>();
|
|
|
+const showRepeatEvent = ref<boolean>(false); //是否展示重复性事件
|
|
|
// 获取事发地址
|
|
|
const changeArea = () => {
|
|
|
const currentNode = areaRef.value.getCheckedNodes();
|
|
|
state.ruleForm.address = currentNode[0].pathLabels.join(''); // 事发地址
|
|
|
+ showRepeatEvent.value = true;
|
|
|
+ rightActive.value = 'repeat';
|
|
|
};
|
|
|
+// 地图选点
|
|
|
+const mapDialogRef = ref<RefType>();
|
|
|
+const selectLocation = ()=>{
|
|
|
+ const location = {
|
|
|
+ longitude: state.ruleForm.longitude,
|
|
|
+ latitude: state.ruleForm.latitude,
|
|
|
+ adcode: state.ruleForm.areaCode,
|
|
|
+ street: state.ruleForm.street
|
|
|
+ }
|
|
|
+ mapDialogRef.value.openDialog(location);
|
|
|
+}
|
|
|
+// 地图选点
|
|
|
+const selectMap = (location:any)=>{
|
|
|
+ ruleFormRef.value.resetFields('areaCode');
|
|
|
+ state.ruleForm.longitude = location.longitude;
|
|
|
+ state.ruleForm.latitude = location.latitude;
|
|
|
+ state.ruleForm.areaCode = location.adcode;
|
|
|
+ state.ruleForm.street = location.street;
|
|
|
+}
|
|
|
const ExpandFormRef = ref<RefType>();
|
|
|
// 打开拓展表单
|
|
|
const showExpandForm = () => {
|
|
@@ -997,12 +810,23 @@ const submit = throttle((formEl: FormInstance | undefined) => {
|
|
|
handleForm(orderDetail);
|
|
|
});
|
|
|
}, 300);
|
|
|
+// 选中常用意见
|
|
|
+const chooseAdvice = (item: any) => {
|
|
|
+ state.ruleForm.content += item.content;
|
|
|
+};
|
|
|
+// 流程提交成功
|
|
|
+const orderProcessSuccess = () => {
|
|
|
+ // 关闭当前 tagsView
|
|
|
+ mittBus.emit('onCurrentContextmenuClick', Object.assign({}, { contextMenuClickId: 1, ...route }));
|
|
|
+ mittBus.emit('clearCache', 'order');
|
|
|
+ router.push({
|
|
|
+ path: '/business/order/index',
|
|
|
+ });
|
|
|
+};
|
|
|
// 选择是否重复
|
|
|
const isRepeatChange = (val: string) => {
|
|
|
if (val === 'false') clearRepeat();
|
|
|
};
|
|
|
-const multipleSelection = ref<any[]>([]); // 重复件表格选中项
|
|
|
-const multipleTableRef = ref<RefType>(); // 重复件表格ref
|
|
|
// 清除重复件
|
|
|
const clearRepeat = () => {
|
|
|
ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
|
|
@@ -1014,7 +838,7 @@ const clearRepeat = () => {
|
|
|
autofocus: false,
|
|
|
})
|
|
|
.then(() => {
|
|
|
- multipleTableRef.value!.clearSelection();
|
|
|
+ historyRef.value.clearRepeat();
|
|
|
setTimeout(() => {
|
|
|
state.ruleForm.duplicateTitle = '';
|
|
|
state.ruleForm.duplicateIds = [];
|
|
@@ -1031,140 +855,38 @@ const selectRepeat = () => {
|
|
|
};
|
|
|
// 弹窗确定选择重复件
|
|
|
const saveSelect = (row: any) => {
|
|
|
- multipleTableRef.value!.clearSelection();
|
|
|
+ historyRef.value.clearRepeat();
|
|
|
state.ruleForm.duplicateIds = row.map((item: any) => item.id);
|
|
|
state.ruleForm.duplicateTitle = '已选择';
|
|
|
- multipleSelection.value = row;
|
|
|
- for (let i of multipleSelection.value) {
|
|
|
- for (let j of state.tableData) {
|
|
|
- if (i.id === j.id) {
|
|
|
- setTimeout(() => {
|
|
|
- multipleTableRef.value!.toggleRowSelection(j, true);
|
|
|
- }, 0);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ historyRef.value.dialogConfirmRepeat(row)
|
|
|
HistoryOrderRef.value.closeDialog();
|
|
|
};
|
|
|
-// 右边表格选中重复件
|
|
|
+// 右侧选择历史工单
|
|
|
const handleSelectionChange = (row: any) => {
|
|
|
- if (row && row.length) {
|
|
|
- state.ruleForm.duplicateIds = row.map((item: any) => item.id);
|
|
|
- state.ruleForm.duplicateTitle = '已选择';
|
|
|
- multipleSelection.value = row;
|
|
|
- } else {
|
|
|
- state.ruleForm.duplicateIds = [];
|
|
|
- state.ruleForm.duplicateTitle = '';
|
|
|
- multipleSelection.value = [];
|
|
|
- }
|
|
|
-};
|
|
|
-// 选中常用意见
|
|
|
-const chooseAdvice = (item: any) => {
|
|
|
- state.ruleForm.content += item.content;
|
|
|
-};
|
|
|
-// 流程提交成功
|
|
|
-const orderProcessSuccess = () => {
|
|
|
- // 关闭当前 tagsView
|
|
|
- mittBus.emit('onCurrentContextmenuClick', Object.assign({}, { contextMenuClickId: 1, ...route }));
|
|
|
- mittBus.emit('clearCache', 'order');
|
|
|
- router.push({
|
|
|
- path: '/business/order/index',
|
|
|
- });
|
|
|
-};
|
|
|
-/** 搜索按钮操作 */
|
|
|
-const handleQuery = throttle(() => {
|
|
|
- state.queryParams.PageIndex = 1;
|
|
|
- searchHistory();
|
|
|
-}, 500);
|
|
|
-/** 重置按钮操作 */
|
|
|
-const resetQuery = throttle((formEl: FormInstance | undefined) => {
|
|
|
- if (!formEl) return;
|
|
|
- formEl.resetFields();
|
|
|
- handleQuery();
|
|
|
-}, 300);
|
|
|
-/** 获取历史工单 */
|
|
|
-const searchHistory = throttle(async (orderDetail?: any) => {
|
|
|
- if (!auth('business:order:history')) ElMessage.error('抱歉,您没有权限查询历史工单!');
|
|
|
- else {
|
|
|
- state.historyOrderLoading = true;
|
|
|
- let request = {
|
|
|
- ...state.queryParams,
|
|
|
- PhoneNo: state.ruleForm.contact,
|
|
|
- OrderId: state.orderId, //传入id 排除重复工单选择自己
|
|
|
- };
|
|
|
- try {
|
|
|
- const response = await historyOrder(request);
|
|
|
- state.tableData = response?.result.items ?? [];
|
|
|
- state.total = response?.result.total;
|
|
|
- state.historyOrderLoading = false;
|
|
|
- if (orderDetail) {
|
|
|
- if (orderDetail.result.duplicateIds && orderDetail.result.duplicateIds.length) {
|
|
|
- // 是否重复
|
|
|
- state.ruleForm.isRepeat = 'true';
|
|
|
- state.ruleForm.duplicateTitle = '已选择';
|
|
|
- multipleSelection.value = orderDetail.result.duplicateIds;
|
|
|
- for (let i of multipleSelection.value) {
|
|
|
- for (let j of state.tableData) {
|
|
|
- if (i === j.id) {
|
|
|
- setTimeout(() => {
|
|
|
- multipleTableRef.value!.toggleRowSelection(j, true);
|
|
|
- }, 0);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- state.ruleForm.isRepeat = 'false';
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- state.historyOrderLoading = false;
|
|
|
- }
|
|
|
- }
|
|
|
-}, 300);
|
|
|
-// 补充信息
|
|
|
-const SupplyRef = ref<RefType>();
|
|
|
-const onSupply = (val: any) => {
|
|
|
- SupplyRef.value.openDialog(val);
|
|
|
-};
|
|
|
-// 补充意见提交成功
|
|
|
-const onSupplySuccess = () => {
|
|
|
- searchHistory();
|
|
|
-};
|
|
|
-// 撤销
|
|
|
-const orderRevokeRef = ref<RefType>();
|
|
|
-const onRevoke = (row: any) => {
|
|
|
- orderRevokeRef.value.openDialog(row);
|
|
|
-};
|
|
|
-// 撤销提交成功
|
|
|
-const onRevokeSuccess = () => {
|
|
|
- searchHistory();
|
|
|
-};
|
|
|
-// 督办
|
|
|
-const orderSuperviseRef = ref<RefType>(); // 工单督办
|
|
|
-const onSupervise = () => {
|
|
|
- orderSuperviseRef.value.openDialog(state.ruleForm);
|
|
|
-};
|
|
|
-// 督办提交成功
|
|
|
-const onSuperviseSuccess = () => {
|
|
|
- // 刷新列表
|
|
|
- searchHistory();
|
|
|
-};
|
|
|
-// 预览知识
|
|
|
-const onPreview = (row: any) => {
|
|
|
- router.push({
|
|
|
- name: 'knowledgePreview',
|
|
|
- params: {
|
|
|
- id: row.id,
|
|
|
- tagsViewName: '知识预览',
|
|
|
- },
|
|
|
- });
|
|
|
+ if (row && row.length) {
|
|
|
+ state.ruleForm.duplicateIds = row.map((item: any) => item.id);
|
|
|
+ state.ruleForm.duplicateTitle = '已选择';
|
|
|
+ } else {
|
|
|
+ state.ruleForm.duplicateIds = [];
|
|
|
+ state.ruleForm.duplicateTitle = '';
|
|
|
+ }
|
|
|
};
|
|
|
+const historyRef = ref<RefType>();// 历史工单组件
|
|
|
+const searchHistory = (val?:any)=>{
|
|
|
+ historyRef.value.searchHistory(val);
|
|
|
+ rightActive.value = 'history';
|
|
|
+}
|
|
|
const rightActive = ref<string>('knowledge'); // 右侧顶部Tab
|
|
|
const handleRight = (val: string) => {};
|
|
|
const knowledgeActive = ref<string>('center'); // 知识库顶部Tab
|
|
|
const handleKnowledge = (val: string) => {};
|
|
|
const rightBottomActive = ref<string>('voice'); // 右侧底部Tab
|
|
|
const handleRightBottom = (val: string) => {};
|
|
|
+// 查看重复事件
|
|
|
+const repeatEventDialogRef = ref<RefType>();
|
|
|
+const onRepeatEvent = ()=>{
|
|
|
+ repeatEventDialogRef.value.openDialog();
|
|
|
+}
|
|
|
const extra = ref<any>({
|
|
|
ext: {},
|
|
|
area: {},
|
|
@@ -1172,10 +894,8 @@ const extra = ref<any>({
|
|
|
const orderDetailInfo = ref({});
|
|
|
onBeforeMount(async () => {
|
|
|
state.formLoading = true;
|
|
|
- state.historyOrderLoading = true;
|
|
|
- state.loading = true;
|
|
|
try {
|
|
|
- const [area, res, hotspot] = await Promise.all([treeArea(), orderBaseDataAdd(), getKeyWord()]);
|
|
|
+ const [area, res] = await Promise.all([treeArea(), orderBaseDataAdd()]);
|
|
|
state.acceptTypeOptions = res.result?.acceptTypeOptions ?? [];
|
|
|
state.channelOptions = res.result?.channelOptions ?? [];
|
|
|
state.emergencyLevelOptions = res.result?.emergencyLevelOptions ?? [];
|
|
@@ -1188,7 +908,6 @@ onBeforeMount(async () => {
|
|
|
state.ruleForm.seats = `${userInfos.value.name} [${userInfos.value.staffNo}]`;
|
|
|
|
|
|
state.areaOptions = area.result ?? []; //省市区数据
|
|
|
- state.hotWords = hotspot.result ?? []; // 知识库热词
|
|
|
// historyParams.createBy createBy 代表来源 tel:来电弹单 letter:互联网来信 默认表示手动创建
|
|
|
console.log(historyParams, route.params);
|
|
|
if (historyParams.createBy) {
|
|
@@ -1206,7 +925,6 @@ onBeforeMount(async () => {
|
|
|
dicDataValue: state.ruleForm.sourceChannelCode,
|
|
|
dicDataName: state.ruleForm.sourceChannel,
|
|
|
};
|
|
|
- searchHistory(); // 查询历史订单
|
|
|
}
|
|
|
}
|
|
|
if (route.params.id) {
|
|
@@ -1216,7 +934,13 @@ onBeforeMount(async () => {
|
|
|
// 如果获取到id 调用查询详情
|
|
|
state.ruleForm = response.result;
|
|
|
orderDetailInfo.value = response.result;
|
|
|
- searchHistory(response);
|
|
|
+ if (response.result.duplicateIds && response.result.duplicateIds.length) {
|
|
|
+ // 是否重复
|
|
|
+ state.ruleForm.isRepeat = 'true';
|
|
|
+ state.ruleForm.duplicateTitle = '已选择';
|
|
|
+ } else {
|
|
|
+ state.ruleForm.isRepeat = 'false';
|
|
|
+ }
|
|
|
if (state.ruleForm.orderType === 1) {
|
|
|
// 工单类型 选择了12315市场监管受理单
|
|
|
state.acceptTypeOptions = state.acceptTypeOptions.map((item: any) => {
|
|
@@ -1271,19 +995,13 @@ onBeforeMount(async () => {
|
|
|
dicDataValue: state.ruleForm.pushTypeCode,
|
|
|
dicDataName: state.ruleForm.pushType,
|
|
|
};
|
|
|
- knowledgeRetrievalPaged(state.ruleForm.hotspotName);
|
|
|
+ knowledgeActiveRef.value.knowledgeRetrievalPaged(state.ruleForm.hotspotName);
|
|
|
state.formLoading = false;
|
|
|
- state.historyOrderLoading = false;
|
|
|
- state.loading = false;
|
|
|
}
|
|
|
} catch (error) {
|
|
|
state.formLoading = false;
|
|
|
- state.historyOrderLoading = false;
|
|
|
- state.loading = false;
|
|
|
} finally {
|
|
|
- state.formLoading = false;
|
|
|
- state.historyOrderLoading = false;
|
|
|
- state.loading = false;
|
|
|
+ state.formLoading = false
|
|
|
}
|
|
|
});
|
|
|
onMounted(async () => {
|
|
@@ -1293,54 +1011,12 @@ onMounted(async () => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-.box {
|
|
|
- background-color: var(--el-color-white);
|
|
|
- border-radius: 8px;
|
|
|
-}
|
|
|
-
|
|
|
:deep(.el-divider--horizontal) {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
|
|
|
.order-add-container {
|
|
|
color: var(--hotline-color-text-main);
|
|
|
- .right-content {
|
|
|
- .knowledge-container {
|
|
|
- position: relative;
|
|
|
|
|
|
- .knowledge-input {
|
|
|
- :deep(.el-input__wrapper) {
|
|
|
- border-radius: 20px;
|
|
|
- background: var(--hotline-bg-main-color);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .knowledge-search-button {
|
|
|
- height: calc(100% - 6px);
|
|
|
- }
|
|
|
-
|
|
|
- .knowledge-item {
|
|
|
- &:last-child {
|
|
|
- margin-bottom: 0;
|
|
|
- }
|
|
|
-
|
|
|
- cursor: pointer;
|
|
|
-
|
|
|
- &:hover {
|
|
|
- color: var(--el-color-primary);
|
|
|
- }
|
|
|
-
|
|
|
- .indent {
|
|
|
- text-indent: 1em;
|
|
|
- color: var(--hotline-color-text-main-light);
|
|
|
- line-height: 20px;
|
|
|
-
|
|
|
- &:hover {
|
|
|
- color: var(--el-color-primary);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
</style>
|