Parcourir la source

拉取最新代码

maotao il y a 10 mois
Parent
commit
3778ddb753

+ 69 - 5
pages/assign/assign.vue

@@ -10,8 +10,14 @@
10
       <!-- 故障处理 -->
10
       <!-- 故障处理 -->
11
       <template v-if="dataInfo.tabActiveValue === 'direct'">
11
       <template v-if="dataInfo.tabActiveValue === 'direct'">
12
         <view class="form_item column" v-if="dataInfo.category.hasSimple != 1">
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
         </view>
21
         </view>
16
         <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
22
         <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
17
           <view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
23
           <view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
@@ -83,7 +89,13 @@
83
       <!-- 补单-下一步 -->
89
       <!-- 补单-下一步 -->
84
       <template v-if="dataInfo.tabActiveValue === 'supplement' && !dataInfo.supplementFlag">
90
       <template v-if="dataInfo.tabActiveValue === 'supplement' && !dataInfo.supplementFlag">
85
         <view class="form_item column" v-if="dataInfo.category.hasSimple != 1">
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
           <uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
99
           <uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
88
         </view>
100
         </view>
89
         <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
101
         <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
@@ -206,6 +218,9 @@
206
   // 主题颜色
218
   // 主题颜色
207
   const primaryColor = ref(defaultColor)
219
   const primaryColor = ref(defaultColor)
208
   
220
   
221
+	// 知识库id
222
+	const solutionId = ref(null)
223
+	
209
   // 数据
224
   // 数据
210
   const dataInfo = reactive({
225
   const dataInfo = reactive({
211
     tabs: [
226
     tabs: [
@@ -248,6 +263,7 @@
248
     responseHandleTime: undefined,//补单-接单时间
263
     responseHandleTime: undefined,//补单-接单时间
249
     handleTime: undefined,//补单-解决时间
264
     handleTime: undefined,//补单-解决时间
250
     handlingPersonnelUserId: undefined,//补单-处理人
265
     handlingPersonnelUserId: undefined,//补单-处理人
266
+		introduceCount :0 //引入次数
251
   })
267
   })
252
   
268
   
253
   // 是否提交
269
   // 是否提交
@@ -492,6 +508,8 @@
492
     dataInfo.selectData = {};//选择的对象
508
     dataInfo.selectData = {};//选择的对象
493
     dataInfo.selectType = {};//选择的对象类型
509
     dataInfo.selectType = {};//选择的对象类型
494
     dataInfo.handleDescription = '';//解决方案
510
     dataInfo.handleDescription = '';//解决方案
511
+		solutionId.value = null;//引用知识库id
512
+		dataInfo.introduceCount = 0;//引用知识库次数
495
     dataInfo.handleCategory = undefined;//处理方式
513
     dataInfo.handleCategory = undefined;//处理方式
496
     dataInfo.handleCategoryList = [];//处理方式列表
514
     dataInfo.handleCategoryList = [];//处理方式列表
497
     dataInfo.closecode = undefined;//处理结果
515
     dataInfo.closecode = undefined;//处理结果
@@ -737,8 +755,8 @@
737
   async function handlerOrder(){
755
   async function handlerOrder(){
738
     let postData = {
756
     let postData = {
739
       incident: dataInfo.incidentData,
757
       incident: dataInfo.incidentData,
758
+			solutionId: solutionId.value
740
     }
759
     }
741
-    
742
     let result = await beforeBuild();
760
     let result = await beforeBuild();
743
     if(result[0].status == 200 && result[1].status == 200){
761
     if(result[0].status == 200 && result[1].status == 200){
744
       postData.incident.repairType = result[0].list.length ? result[0].list[0].valueconfig : undefined;
762
       postData.incident.repairType = result[0].list.length ? result[0].list[0].valueconfig : undefined;
@@ -757,7 +775,6 @@
757
     postData.incident.category = dataInfo.category;
775
     postData.incident.category = dataInfo.category;
758
     postData.incident.synergetic = dataInfo.synergetic;
776
     postData.incident.synergetic = dataInfo.synergetic;
759
     postData.incident.directProcess = 1;//直接解决
777
     postData.incident.directProcess = 1;//直接解决
760
-    
761
     return api_incidentTask('accept', postData);
778
     return api_incidentTask('accept', postData);
762
   }
779
   }
763
   
780
   
@@ -765,6 +782,7 @@
765
   async function supplementOrder(){
782
   async function supplementOrder(){
766
     let postData = {
783
     let postData = {
767
       incident: dataInfo.incidentData,
784
       incident: dataInfo.incidentData,
785
+			solutionId: solutionId.value
768
     }
786
     }
769
     
787
     
770
     let result = await beforeBuild();
788
     let result = await beforeBuild();
@@ -848,6 +866,15 @@
848
     return uploadFile(imgObj, 'wechatRequesterIncident', dataInfo.incidentId)
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
   function submitHandler(){
879
   function submitHandler(){
853
     console.log(dataInfo);
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
   onLoad((option) => {
1208
   onLoad((option) => {
1175
     menuAuthHandle()
1209
     menuAuthHandle()
1176
     // 跳转页面选择了选项
1210
     // 跳转页面选择了选项
@@ -1244,6 +1278,21 @@
1244
     if(!dataInfo.tabActiveValue){
1278
     if(!dataInfo.tabActiveValue){
1245
       dataInfo.tabActiveValue = dataInfo.tabs[0].value;
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
     initForm()
1296
     initForm()
1248
   })
1297
   })
1249
 </script>
1298
 </script>
@@ -1374,9 +1423,24 @@
1374
         height: auto;
1423
         height: auto;
1375
         flex-direction: column;
1424
         flex-direction: column;
1376
         align-items: flex-start;
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
         .title{
1433
         .title{
1378
           margin-right: 0;
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
         .value{
1444
         .value{
1381
           margin-top: 10rpx;
1445
           margin-top: 10rpx;
1382
           padding-left: 20rpx;
1446
           padding-left: 20rpx;

+ 1 - 1
pages/handler/handler.vue

@@ -218,7 +218,7 @@
218
     category: {},//故障现象
218
     category: {},//故障现象
219
     synergetic: [],//协同人员
219
     synergetic: [],//协同人员
220
     isSummaryNext: false,//汇总单-下一步
220
     isSummaryNext: false,//汇总单-下一步
221
-		introduceCount :0
221
+		introduceCount :0 //引入次数
222
   })
222
   })
223
   
223
   
224
 	// 知识库id
224
 	// 知识库id

+ 9 - 3
pages/repository/repository.vue

@@ -36,6 +36,9 @@
36
 	// 操作类型
36
 	// 操作类型
37
 	const operateType = ref(null)
37
 	const operateType = ref(null)
38
 	
38
 	
39
+	// tab类型
40
+	const tabType = ref(null)
41
+	
39
   // 数据
42
   // 数据
40
   const dataInfo = reactive({
43
   const dataInfo = reactive({
41
     list: [],//工单列表
44
     list: [],//工单列表
@@ -48,7 +51,8 @@
48
   function toCategoryTwo(data){
51
   function toCategoryTwo(data){
49
     uni.navigateTo({
52
     uni.navigateTo({
50
       url: `/pages/repositoryDetails/repositoryDetails?incidentId=${dataInfo.incidentId}
53
       url: `/pages/repositoryDetails/repositoryDetails?incidentId=${dataInfo.incidentId}
51
-			&solutionnumber=${data.solutionnumber}&operateType=${operateType.value}`
54
+			&solutionnumber=${data.solutionnumber}&operateType=${operateType.value}
55
+			&tabType=${tabType.value}`
52
     })
56
     })
53
   }
57
   }
54
 	
58
 	
@@ -58,12 +62,13 @@
58
 		if(operateType.value=='malfunction'){ //故障处理
62
 		if(operateType.value=='malfunction'){ //故障处理
59
 			url = '/pages/handler/handler'
63
 			url = '/pages/handler/handler'
60
 		}else if(operateType.value=='reissue'){ //补单
64
 		}else if(operateType.value=='reissue'){ //补单
61
-			url = '/pages/handler/handler'
65
+			url = '/pages/assign/assign'
62
 		}
66
 		}
63
 		uni.navigateTo({
67
 		uni.navigateTo({
64
 		  url: `${url}?incidentId=${encodeURIComponent(JSON.stringify(dataInfo.incidentId))}
68
 		  url: `${url}?incidentId=${encodeURIComponent(JSON.stringify(dataInfo.incidentId))}
65
 			&handleDescription=${encodeURIComponent(data.content)}&solutionId=${encodeURIComponent(JSON.stringify(data.id))}&isSummaryNext=1&type=${encodeURIComponent('rep')}
69
 			&handleDescription=${encodeURIComponent(data.content)}&solutionId=${encodeURIComponent(JSON.stringify(data.id))}&isSummaryNext=1&type=${encodeURIComponent('rep')}
66
-			&introduceCount=${encodeURIComponent(data.introduceCount)}`
70
+			&introduceCount=${encodeURIComponent(data.introduceCount)}
71
+			&tabType=${encodeURIComponent(tabType.value)}`
67
 		})
72
 		})
68
 	}
73
 	}
69
 	
74
 	
@@ -117,6 +122,7 @@
117
   onLoad((option) => {
122
   onLoad((option) => {
118
     dataInfo.incidentId = option.incidentId;
123
     dataInfo.incidentId = option.incidentId;
119
 		operateType.value = option.operateType;
124
 		operateType.value = option.operateType;
125
+		tabType.value = option.tabType
120
     getList(0);
126
     getList(0);
121
   })
127
   })
122
   
128
   

+ 9 - 3
pages/repositoryDetails/repositoryDetails.vue

@@ -32,6 +32,9 @@
32
 	// 操作类型
32
 	// 操作类型
33
 	const operateType = ref(null)
33
 	const operateType = ref(null)
34
 	
34
 	
35
+	// tab类型
36
+	const tabType = ref(null)
37
+	
35
   // 数据
38
   // 数据
36
   const dataInfo = reactive({
39
   const dataInfo = reactive({
37
     data: [],//数据
40
     data: [],//数据
@@ -94,12 +97,14 @@
94
 		if(operateType.value=='malfunction'){ //故障处理
97
 		if(operateType.value=='malfunction'){ //故障处理
95
 			url = '/pages/handler/handler'
98
 			url = '/pages/handler/handler'
96
 		}else if(operateType.value=='reissue'){ //补单
99
 		}else if(operateType.value=='reissue'){ //补单
97
-			url = '/pages/handler/handler'
100
+			url = '/pages/assign/assign'
98
 		}
101
 		}
99
 		uni.navigateTo({
102
 		uni.navigateTo({
100
 		  url: `${url}?incidentId=${encodeURIComponent(JSON.stringify(dataInfo.incidentId))}
103
 		  url: `${url}?incidentId=${encodeURIComponent(JSON.stringify(dataInfo.incidentId))}
101
 			&handleDescription=${encodeURIComponent(dataInfo.data.content)}&solutionId=${encodeURIComponent(JSON.stringify(dataInfo.data.id))}
104
 			&handleDescription=${encodeURIComponent(dataInfo.data.content)}&solutionId=${encodeURIComponent(JSON.stringify(dataInfo.data.id))}
102
-			&isSummaryNext=1&type=${encodeURIComponent('rep')}&introduceCount=${encodeURIComponent(dataInfo.data.introduceCount)}`
105
+			&isSummaryNext=1&type=${encodeURIComponent('rep')}
106
+			&introduceCount=${encodeURIComponent(dataInfo.data.introduceCount)}
107
+			&tabType=${encodeURIComponent(tabType.value)}`
103
 		})
108
 		})
104
 	}
109
 	}
105
 	
110
 	
@@ -148,8 +153,9 @@
148
   
153
   
149
   onLoad((option) => {
154
   onLoad((option) => {
150
     dataInfo.incidentId = option.incidentId;
155
     dataInfo.incidentId = option.incidentId;
151
-		dataInfo.solutionnumber = option.solutionnumber 
156
+		dataInfo.solutionnumber = option.solutionnumber ;
152
 		operateType.value = option.operateType;
157
 		operateType.value = option.operateType;
158
+		tabType.value = option.tabType;
153
     getList();
159
     getList();
154
   })
160
   })
155
 
161