|
@@ -3,17 +3,17 @@
|
|
|
<el-dialog v-model="state.isShowDialog" width="60%" draggable title="新增时限">
|
|
|
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="100px" scroll-to-error>
|
|
|
<el-row :gutter="5">
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="8">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="配置名称" prop="timeLimitName" :rules="[{ required: true, message: '请输入配置名称', trigger: 'blur' }]">
|
|
|
<el-input v-model="state.ruleForm.timeLimitName" placeholder="请输入配置名称" clearable max-length="50"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="10" :md="10" :lg="10" :xl="8">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="业务名称" prop="workflowObj" :rules="[{ required: true, message: '请选择业务名称', trigger: 'change' }]">
|
|
|
<el-select
|
|
|
v-model="state.ruleForm.workflowObj"
|
|
|
placeholder="请选择业务名称"
|
|
|
- class="w100"
|
|
|
+ style="width: calc(100% - 60px);"
|
|
|
value-key="key"
|
|
|
@change="(val:any)=>{
|
|
|
state.ruleForm.workflowCode = val.key;
|
|
@@ -22,14 +22,8 @@
|
|
|
>
|
|
|
<el-option v-for="item in state.moduleOptions" :key="item.key" :label="item.value" :value="item" />
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="2" :md="2" :lg="2" :xl="8" v-if="state.ruleForm.workflowCode === 'Order'">
|
|
|
- <el-form-item label="" label-width="10px">
|
|
|
- <el-tooltip placement="top-start">
|
|
|
- <div style="height: 34px" class="flex-center-align">
|
|
|
- <SvgIcon name="ele-InfoFilled" size="24px" color="var(--el-color-primary)" />
|
|
|
- </div>
|
|
|
+ <el-tooltip placement="top-start" v-if="state.ruleForm.workflowCode === 'Order'">
|
|
|
+ <SvgIcon name="ele-InfoFilled" size="24px" color="var(--el-color-primary)" class="ml15"/>
|
|
|
<template #content>
|
|
|
说明:时限计算优先级依次为指定优先级、组合、时限最短。<br />
|
|
|
若已配置指定参数优先级的,则先按指定的优先级计算办理期限;
|
|
@@ -41,7 +35,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <el-collapse v-model="state.collapseArr" class="collapse-box" v-loading="state.loading" v-if="state.ruleForm.workflowCode === 'Order'">
|
|
|
+ <el-collapse v-model="state.collapseArr" class="collapse-box mt20" style="border-top:none" v-loading="state.loading" v-if="state.ruleForm.workflowCode === 'Order'">
|
|
|
<p class="border-title mb10">参数信息</p>
|
|
|
<!-- 参数多选 -->
|
|
|
<div class="pl20 pr20">
|
|
@@ -209,7 +203,7 @@
|
|
|
<template #default="{ row }">
|
|
|
<div class="flex-center-align">
|
|
|
<span class="omit text-no-wrap" :title="row.combinationDisplayParam">{{ row.combinationDisplayParam }}</span>
|
|
|
- <el-button class="ml3" text title="查看" type="primary" @click="chooseCombination(row)">
|
|
|
+ <el-button class="ml3" text title="配置参数" type="primary" @click="chooseCombination(row)">
|
|
|
<SvgIcon name="ele-Edit" size="16px" />
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -270,7 +264,14 @@
|
|
|
<el-row :gutter="5">
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="受理类型" prop="acceptType" :rules="[{ required: false, message: '请选择受理类型', trigger: 'change' }]">
|
|
|
- <el-select v-model="state.paramForm.acceptType" placeholder="请选择受理类型" class="w100" value-key="key">
|
|
|
+ <el-select
|
|
|
+ v-model="state.paramForm.acceptType"
|
|
|
+ placeholder="请选择受理类型"
|
|
|
+ class="w100"
|
|
|
+ value-key="key"
|
|
|
+ clearable
|
|
|
+ @clear="clearCombinationParam('AcceptType')"
|
|
|
+ >
|
|
|
<el-option v-for="item in state.result.acceptType" :key="item.key" :label="item.value" :value="item" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -291,48 +292,90 @@
|
|
|
@node-click="getComHotspot"
|
|
|
ref="hotspotComRef"
|
|
|
:default-expanded-keys="state.hotspotExternalCom"
|
|
|
+ clearable
|
|
|
+ @clear="clearCombinationParam('HotPots')"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="来源渠道" prop="sourceChannel" :rules="[{ required: false, message: '请选择来源渠道', trigger: 'change' }]">
|
|
|
- <el-select v-model="state.paramForm.sourceChannel" placeholder="请选择来源渠道" class="w100" value-key="key" filterable>
|
|
|
+ <el-select
|
|
|
+ v-model="state.paramForm.sourceChannel"
|
|
|
+ placeholder="请选择来源渠道"
|
|
|
+ class="w100"
|
|
|
+ value-key="key"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ @clear="clearCombinationParam('SourceChannel')"
|
|
|
+ >
|
|
|
<el-option v-for="item in state.result.sourceChannel" :key="item.key" :label="item.value" :value="item" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="来电人身份" prop="identityType" :rules="[{ required: false, message: '请选择来电人身份', trigger: 'change' }]">
|
|
|
- <el-select v-model="state.paramForm.identityType" placeholder="请选择来电人身份" class="w100" value-key="key" filterable>
|
|
|
+ <el-select
|
|
|
+ v-model="state.paramForm.identityType"
|
|
|
+ placeholder="请选择来电人身份"
|
|
|
+ class="w100"
|
|
|
+ value-key="key"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ @clear="clearCombinationParam('IdentityType')"
|
|
|
+ >
|
|
|
<el-option v-for="item in state.result.identityType" :key="item.key" :label="item.value" :value="item" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="工单类型" prop="orderType" :rules="[{ required: false, message: '请选择工单类型', trigger: 'change' }]">
|
|
|
- <el-select v-model="state.paramForm.orderType" placeholder="请选择工单类型" class="w100" value-key="key" filterable>
|
|
|
+ <el-select
|
|
|
+ v-model="state.paramForm.orderType"
|
|
|
+ placeholder="请选择工单类型"
|
|
|
+ class="w100"
|
|
|
+ value-key="key"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ @clear="clearCombinationParam('OrderType')"
|
|
|
+ >
|
|
|
<el-option v-for="item in state.result.orderType" :key="item.key" :label="item.value" :value="item" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="证件类型" prop="certType" :rules="[{ required: false, message: '请选择证件类型类', trigger: 'change' }]">
|
|
|
- <el-select v-model="state.paramForm.certType" placeholder="请选择证件类型" class="w100" value-key="dicDataValue" filterable>
|
|
|
+ <el-select
|
|
|
+ v-model="state.paramForm.certType"
|
|
|
+ placeholder="请选择证件类型"
|
|
|
+ class="w100"
|
|
|
+ value-key="dicDataValue"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ @clear="clearCombinationParam('LicenceType')"
|
|
|
+ >
|
|
|
<el-option v-for="item in state.result.certType" :key="item.dicDataValue" :label="item.dicDataName" :value="item" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="紧急程度" prop="emergencyLevel" :rules="[{ required: false, message: '请选择紧急程度', trigger: 'change' }]">
|
|
|
- <el-select v-model="state.paramForm.emergencyLevel" placeholder="请选择紧急程度" class="w100" value-key="key" filterable>
|
|
|
+ <el-select
|
|
|
+ v-model="state.paramForm.emergencyLevel"
|
|
|
+ placeholder="请选择紧急程度"
|
|
|
+ class="w100"
|
|
|
+ value-key="key"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ @clear="clearCombinationParam('EmergencyLevel')"
|
|
|
+ >
|
|
|
<el-option v-for="item in state.result.emergencyLevel" :key="item.key" :label="item.value" :value="item" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="默认参数" prop="emergencyLevel" :rules="[{ required: false, message: '请选择默认参数', trigger: 'change' }]">
|
|
|
- <el-select v-model="state.paramForm.emergencyLevel" placeholder="请选择默认参数" class="w100" value-key="key" filterable>
|
|
|
- <el-option v-for="item in state.result.emergencyLevel" :key="item.key" :label="item.value" :value="item" />
|
|
|
+ <el-select v-model="state.paramForm.emergencyLevel" placeholder="请选择默认参数" class="w100" value-key="key" filterable clearable>
|
|
|
+ <el-option v-for="item in state.result.emergencyLevel" :key="item.key" :label="item.value" :value="item" @clear="clearCombinationParam('EmergencyLevel')" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col> -->
|
|
@@ -352,9 +395,11 @@
|
|
|
import { ref, reactive } from 'vue';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import { guid } from '/@/utils/tools';
|
|
|
+import { removeDuplicate } from '/@/utils/arrayOperation';
|
|
|
import draggable from 'vuedraggable';
|
|
|
import { hotspottype } from '/@/api/business/order';
|
|
|
import { timelimitAdd, timelimitUpdate } from '/@/api/system/timeLimit';
|
|
|
+import { ConsoleLogger } from '@microsoft/signalr/dist/esm/Utils';
|
|
|
// 定义子组件向父组件传值/事件
|
|
|
const emit = defineEmits(['updateList', 'openDialog', 'closeDialog']);
|
|
|
const paramTypeNameType = {
|
|
@@ -413,6 +458,19 @@ const getParentId = (val: any, arr: string[]) => {
|
|
|
}
|
|
|
return arr;
|
|
|
};
|
|
|
+const resetState = () => {
|
|
|
+ state.parameterList = [];
|
|
|
+ state.paramArr = [];
|
|
|
+ state.currentParm = null;
|
|
|
+ state.selectArray = [];
|
|
|
+ state.paramSelect = [];
|
|
|
+ state.priority = [];
|
|
|
+ state.combination = [];
|
|
|
+ state.hotspotExternal = [];
|
|
|
+ state.external = [];
|
|
|
+ state.hotspotExternalCom = [];
|
|
|
+ state.externalCom = [];
|
|
|
+};
|
|
|
const openDialog = (baseData: any) => {
|
|
|
state.ruleForm.workflowCode = '';
|
|
|
const { baseData: stateBaseData = [], timeType = [], moduleOptions = [] } = baseData;
|
|
@@ -420,6 +478,7 @@ const openDialog = (baseData: any) => {
|
|
|
state.baseData = stateBaseData; //基础数据
|
|
|
state.timeType = timeType; //单位
|
|
|
state.moduleOptions = moduleOptions; //业务名称
|
|
|
+ resetState();
|
|
|
ruleFormRef.value?.resetFields();
|
|
|
state.isShowDialog = true;
|
|
|
emit('openDialog');
|
|
@@ -617,73 +676,78 @@ const getComHotspot = (val: any, e: any) => {
|
|
|
state.hotspotExternalCom = getParentId(e, state.externalCom);
|
|
|
state.paramForm.hotspotSpliceName = val.hotSpotFullName;
|
|
|
};
|
|
|
+// 删除组合参数
|
|
|
+const clearCombinationParam = (val: any) => {
|
|
|
+ let item = state.combination.find((item: any) => item.id === state.paramForm.id);
|
|
|
+ item.combinationParam = item.combinationParam.filter((v: any) => v.paramType !== val);
|
|
|
+};
|
|
|
// 参数组合确定
|
|
|
const onConfirmCom = () => {
|
|
|
let comName: string[] = [];
|
|
|
- const index = state.combination.findIndex((item: any) => item.id === state.paramForm.id);
|
|
|
- if (index != -1) {
|
|
|
- if (state.combination[index].acceptType?.value) {
|
|
|
- state.combination[index].combinationParam.push({
|
|
|
- paramName: state.combination[index].acceptType.value,
|
|
|
- paramValue: state.combination[index].acceptType.key,
|
|
|
+ let item = state.combination.find((item: any) => item.id === state.paramForm.id);
|
|
|
+ if (item) {
|
|
|
+ if (item.acceptType?.value) {
|
|
|
+ item.combinationParam.push({
|
|
|
+ paramName: item.acceptType.value,
|
|
|
+ paramValue: item.acceptType.key,
|
|
|
hotParamParent: '',
|
|
|
paramType: 'AcceptType',
|
|
|
});
|
|
|
- comName.push(`受理类型-${state.combination[index].acceptType.value}`);
|
|
|
+ comName.push(`受理类型-${item.acceptType.value}`);
|
|
|
}
|
|
|
- if (state.combination[index]?.hotspot) {
|
|
|
- state.combination[index].combinationParam.push({
|
|
|
- paramName: state.combination[index].hotspotSpliceName,
|
|
|
- paramValue: state.combination[index].hotspot,
|
|
|
+ if (item?.hotspot) {
|
|
|
+ item.combinationParam.push({
|
|
|
+ paramName: item.hotspotSpliceName,
|
|
|
+ paramValue: item.hotspot,
|
|
|
hotParamParent: state.hotspotExternalCom.join(','),
|
|
|
paramType: 'HotPots',
|
|
|
});
|
|
|
- comName.push(`热点分类-${state.combination[index].hotspotSpliceName}`);
|
|
|
+ comName.push(`热点分类-${item.hotspotSpliceName}`);
|
|
|
}
|
|
|
- if (state.combination[index].identityType?.value) {
|
|
|
- state.combination[index].combinationParam.push({
|
|
|
- paramName: state.combination[index].identityType.value,
|
|
|
- paramValue: state.combination[index].identityType.key,
|
|
|
+ if (item.identityType?.value) {
|
|
|
+ item.combinationParam.push({
|
|
|
+ paramName: item.identityType.value,
|
|
|
+ paramValue: item.identityType.key,
|
|
|
hotParamParent: '',
|
|
|
paramType: 'IdentityType',
|
|
|
});
|
|
|
- comName.push(`来电人身份-${state.combination[index].identityType.value}`);
|
|
|
+ comName.push(`来电人身份-${item.identityType.value}`);
|
|
|
}
|
|
|
- if (state.combination[index].sourceChannel?.value) {
|
|
|
- state.combination[index].combinationParam.push({
|
|
|
- paramName: state.combination[index].sourceChannel.value,
|
|
|
- paramValue: state.combination[index].sourceChannel.key,
|
|
|
+ if (item.sourceChannel?.value) {
|
|
|
+ item.combinationParam.push({
|
|
|
+ paramName: item.sourceChannel.value,
|
|
|
+ paramValue: item.sourceChannel.key,
|
|
|
hotParamParent: '',
|
|
|
paramType: 'SourceChannel',
|
|
|
});
|
|
|
- comName.push(`来源渠道-${state.combination[index].sourceChannel.value}`);
|
|
|
+ comName.push(`来源渠道-${item.sourceChannel.value}`);
|
|
|
}
|
|
|
- if (state.combination[index].orderType?.value) {
|
|
|
- state.combination[index].combinationParam.push({
|
|
|
- paramName: state.combination[index].orderType.value,
|
|
|
- paramValue: state.combination[index].orderType.key,
|
|
|
+ if (item.orderType?.value) {
|
|
|
+ item.combinationParam.push({
|
|
|
+ paramName: item.orderType.value,
|
|
|
+ paramValue: item.orderType.key,
|
|
|
hotParamParent: '',
|
|
|
paramType: 'OrderType',
|
|
|
});
|
|
|
- comName.push(`工单类型-${state.combination[index].orderType.value}`);
|
|
|
+ comName.push(`工单类型-${item.orderType.value}`);
|
|
|
}
|
|
|
- if (state.combination[index].certType?.dicDataName) {
|
|
|
- state.combination[index].combinationParam.push({
|
|
|
- paramName: state.combination[index].certType.dicDataName,
|
|
|
- paramValue: state.combination[index].certType.dicDataValue,
|
|
|
+ if (item.certType?.dicDataName) {
|
|
|
+ item.combinationParam.push({
|
|
|
+ paramName: item.certType.dicDataName,
|
|
|
+ paramValue: item.certType.dicDataValue,
|
|
|
hotParamParent: '',
|
|
|
paramType: 'LicenceType',
|
|
|
});
|
|
|
- comName.push(`证件类型-${state.combination[index].certType.dicDataName}`);
|
|
|
+ comName.push(`证件类型-${item.certType.dicDataName}`);
|
|
|
}
|
|
|
- if (state.combination[index].emergencyLevel?.value) {
|
|
|
- state.combination[index].combinationParam.push({
|
|
|
- paramName: state.combination[index].emergencyLevel.value,
|
|
|
- paramValue: state.combination[index].emergencyLevel.key,
|
|
|
+ if (item.emergencyLevel?.value) {
|
|
|
+ item.combinationParam.push({
|
|
|
+ paramName: item.emergencyLevel.value,
|
|
|
+ paramValue: item.emergencyLevel.key,
|
|
|
hotParamParent: '',
|
|
|
paramType: 'EmergencyLevel',
|
|
|
});
|
|
|
- comName.push(`紧急程度-${state.combination[index].emergencyLevel.value}`);
|
|
|
+ comName.push(`紧急程度-${item.emergencyLevel.value}`);
|
|
|
}
|
|
|
// if(state.paramForm.emergencyLevel.value){
|
|
|
// state.paramForm.push({
|
|
@@ -696,14 +760,14 @@ const onConfirmCom = () => {
|
|
|
// }
|
|
|
}
|
|
|
state.paramForm.hotParamParent = state.hotspotExternalCom.join(',');
|
|
|
-
|
|
|
- if (state.combination[index].combinationParam.length < 2) {
|
|
|
+ item.combinationParam = removeDuplicate(item.combinationParam, 'paramType');
|
|
|
+ if (item.combinationParam.length < 2) {
|
|
|
ElMessageBox.alert('一个组合中至少包含两个参数', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- state.combination[index].combinationDisplayParam = comName.join('&');
|
|
|
+ item.combinationDisplayParam = comName.join('&');
|
|
|
state.paramDialog = false;
|
|
|
};
|
|
|
// 定义一个函数来检查某个属性是否存在,如果不存在就给出提示信息,并返回false
|