|
@@ -10,8 +10,14 @@
|
10
|
10
|
<!-- 故障处理 -->
|
11
|
11
|
<template v-if="dataInfo.tabActiveValue === 'direct'">
|
12
|
12
|
<view class="form_item column" v-if="dataInfo.category.hasSimple != 1">
|
13
|
|
- <view class="title"><text class="required newicon newicon-bitian"></text>解决方案:</view>
|
14
|
|
- <uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
|
|
13
|
+ <view class="title title-width">
|
|
14
|
+ <text class="required newicon newicon-bitian"></text>
|
|
15
|
+ <view class="title-fl-sb">
|
|
16
|
+ 解决方案:
|
|
17
|
+ <view @click="importRep('reissue','direct')" class="import-rep">引入知识库({{dataInfo.introduceCount}})</view>
|
|
18
|
+ </view>
|
|
19
|
+ </view>
|
|
20
|
+ <uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
|
15
|
21
|
</view>
|
16
|
22
|
<view class="form_item" v-if="dataInfo.category.hasSimple != 1">
|
17
|
23
|
<view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
|
|
@@ -83,7 +89,13 @@
|
83
|
89
|
<!-- 补单-下一步 -->
|
84
|
90
|
<template v-if="dataInfo.tabActiveValue === 'supplement' && !dataInfo.supplementFlag">
|
85
|
91
|
<view class="form_item column" v-if="dataInfo.category.hasSimple != 1">
|
86
|
|
- <view class="title"><text class="required newicon newicon-bitian"></text>解决方案:</view>
|
|
92
|
+ <view class="title title-width">
|
|
93
|
+ <text class="required newicon newicon-bitian"></text>
|
|
94
|
+ <view class="title-fl-sb">
|
|
95
|
+ 解决方案:
|
|
96
|
+ <view @click="importRep('reissue','reissue')" class="import-rep">引入知识库({{dataInfo.introduceCount}})</view>
|
|
97
|
+ </view>
|
|
98
|
+ </view>
|
87
|
99
|
<uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
|
88
|
100
|
</view>
|
89
|
101
|
<view class="form_item" v-if="dataInfo.category.hasSimple != 1">
|
|
@@ -206,6 +218,9 @@
|
206
|
218
|
// 主题颜色
|
207
|
219
|
const primaryColor = ref(defaultColor)
|
208
|
220
|
|
|
221
|
+ // 知识库id
|
|
222
|
+ const solutionId = ref(null)
|
|
223
|
+
|
209
|
224
|
// 数据
|
210
|
225
|
const dataInfo = reactive({
|
211
|
226
|
tabs: [
|
|
@@ -248,6 +263,7 @@
|
248
|
263
|
responseHandleTime: undefined,//补单-接单时间
|
249
|
264
|
handleTime: undefined,//补单-解决时间
|
250
|
265
|
handlingPersonnelUserId: undefined,//补单-处理人
|
|
266
|
+ introduceCount :0 //引入次数
|
251
|
267
|
})
|
252
|
268
|
|
253
|
269
|
// 是否提交
|
|
@@ -492,6 +508,8 @@
|
492
|
508
|
dataInfo.selectData = {};//选择的对象
|
493
|
509
|
dataInfo.selectType = {};//选择的对象类型
|
494
|
510
|
dataInfo.handleDescription = '';//解决方案
|
|
511
|
+ solutionId.value = null;//引用知识库id
|
|
512
|
+ dataInfo.introduceCount = 0;//引用知识库次数
|
495
|
513
|
dataInfo.handleCategory = undefined;//处理方式
|
496
|
514
|
dataInfo.handleCategoryList = [];//处理方式列表
|
497
|
515
|
dataInfo.closecode = undefined;//处理结果
|
|
@@ -737,8 +755,8 @@
|
737
|
755
|
async function handlerOrder(){
|
738
|
756
|
let postData = {
|
739
|
757
|
incident: dataInfo.incidentData,
|
|
758
|
+ solutionId: solutionId.value
|
740
|
759
|
}
|
741
|
|
-
|
742
|
760
|
let result = await beforeBuild();
|
743
|
761
|
if(result[0].status == 200 && result[1].status == 200){
|
744
|
762
|
postData.incident.repairType = result[0].list.length ? result[0].list[0].valueconfig : undefined;
|
|
@@ -757,7 +775,6 @@
|
757
|
775
|
postData.incident.category = dataInfo.category;
|
758
|
776
|
postData.incident.synergetic = dataInfo.synergetic;
|
759
|
777
|
postData.incident.directProcess = 1;//直接解决
|
760
|
|
-
|
761
|
778
|
return api_incidentTask('accept', postData);
|
762
|
779
|
}
|
763
|
780
|
|
|
@@ -765,6 +782,7 @@
|
765
|
782
|
async function supplementOrder(){
|
766
|
783
|
let postData = {
|
767
|
784
|
incident: dataInfo.incidentData,
|
|
785
|
+ solutionId: solutionId.value
|
768
|
786
|
}
|
769
|
787
|
|
770
|
788
|
let result = await beforeBuild();
|
|
@@ -848,6 +866,15 @@
|
848
|
866
|
return uploadFile(imgObj, 'wechatRequesterIncident', dataInfo.incidentId)
|
849
|
867
|
}
|
850
|
868
|
|
|
869
|
+ // 引入知识库
|
|
870
|
+ function importRep(type,tabType){
|
|
871
|
+ handlerStore.setHandlerData(dataInfo, 'assign', 'assign');
|
|
872
|
+ uni.navigateTo({
|
|
873
|
+ url: `/pages/repository/repository?incidentId=${dataInfo.incidentId}
|
|
874
|
+ &operateType=${type}&tabType=${tabType}`
|
|
875
|
+ })
|
|
876
|
+ }
|
|
877
|
+
|
851
|
878
|
// 处理提交
|
852
|
879
|
function submitHandler(){
|
853
|
880
|
console.log(dataInfo);
|
|
@@ -1171,6 +1198,13 @@
|
1171
|
1198
|
}
|
1172
|
1199
|
}
|
1173
|
1200
|
|
|
1201
|
+ // 获取文本内容
|
|
1202
|
+ function getHtml(html) {
|
|
1203
|
+ const tempDiv = document.createElement('div');
|
|
1204
|
+ tempDiv.innerHTML = html;
|
|
1205
|
+ return tempDiv.textContent || tempDiv.innerText || '';
|
|
1206
|
+ }
|
|
1207
|
+
|
1174
|
1208
|
onLoad((option) => {
|
1175
|
1209
|
menuAuthHandle()
|
1176
|
1210
|
// 跳转页面选择了选项
|
|
@@ -1244,6 +1278,21 @@
|
1244
|
1278
|
if(!dataInfo.tabActiveValue){
|
1245
|
1279
|
dataInfo.tabActiveValue = dataInfo.tabs[0].value;
|
1246
|
1280
|
}
|
|
1281
|
+
|
|
1282
|
+ if(option.type&&decodeURIComponent(option.type=='rep')){
|
|
1283
|
+ let handleDescription = decodeURIComponent(option.handleDescription)
|
|
1284
|
+ solutionId.value = JSON.parse(decodeURIComponent(option.solutionId))
|
|
1285
|
+ dataInfo.introduceCount = decodeURIComponent(option.introduceCount!="undefined"?option.introduceCount:0)
|
|
1286
|
+ if(option.tabType&&decodeURIComponent(option.tabType)=='direct'){
|
|
1287
|
+ dataInfo.tabActiveValue = 'direct'
|
|
1288
|
+ }else{
|
|
1289
|
+ dataInfo.tabActiveValue = 'supplement'
|
|
1290
|
+ dataInfo.supplementFlag = false
|
|
1291
|
+ }
|
|
1292
|
+ if(handleDescription!='undefined'){
|
|
1293
|
+ dataInfo.handleDescription = getHtml(handleDescription);
|
|
1294
|
+ }
|
|
1295
|
+ }
|
1247
|
1296
|
initForm()
|
1248
|
1297
|
})
|
1249
|
1298
|
</script>
|
|
@@ -1374,9 +1423,24 @@
|
1374
|
1423
|
height: auto;
|
1375
|
1424
|
flex-direction: column;
|
1376
|
1425
|
align-items: flex-start;
|
|
1426
|
+ .import-rep{
|
|
1427
|
+ padding: 5rpx 10rpx;
|
|
1428
|
+ border-radius: 50rpx;
|
|
1429
|
+ background: #d1fcd5;
|
|
1430
|
+ color: #49b856;
|
|
1431
|
+ font-size: 24rpx;
|
|
1432
|
+ }
|
1377
|
1433
|
.title{
|
1378
|
1434
|
margin-right: 0;
|
1379
|
1435
|
}
|
|
1436
|
+ .title-width{
|
|
1437
|
+ width: 100%;
|
|
1438
|
+ }
|
|
1439
|
+ .title-fl-sb{
|
|
1440
|
+ display: flex;
|
|
1441
|
+ justify-content: space-between;
|
|
1442
|
+ width: 100%;
|
|
1443
|
+ }
|
1380
|
1444
|
.value{
|
1381
|
1445
|
margin-top: 10rpx;
|
1382
|
1446
|
padding-left: 20rpx;
|