ソースを参照

拉取最新代码

maotao 10 ヶ月 前
コミット
36adc4a731

+ 43 - 6
pages/assign/assign.vue

@@ -186,7 +186,7 @@
186 186
       </template>
187 187
       <template v-else>
188 188
         <button @click="previous" type="default" class="primaryButton btn" v-if="dataInfo.tabActiveValue === 'supplement'">上一步</button>
189
-        <button @click="goBack" type="default" class="cancelButton btn" v-else>返回</button>
189
+        <button @click="goBackView" type="default" class="cancelButton btn" v-else>返回</button>
190 190
         <button @click="submit" type="default" class="primaryButton btn">提交</button>
191 191
       </template>
192 192
     </view>
@@ -197,7 +197,7 @@
197 197
   import { ref, reactive, computed } from 'vue'
198 198
   import { onLoad } from '@dcloudio/uni-app'
199 199
   import { generateNumberArray } from '@/utils/index.js'
200
-  import { api_group, api_incidentDetail, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_getDictionary, api_querySummaryDoc, api_addSummaryDoc, api_systemConfiguration, api_sj } from "@/http/api.js"
200
+  import { api_group, api_incidentDetail, api_getSolution, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_getDictionary, api_querySummaryDoc, api_addSummaryDoc, api_systemConfiguration, api_sj } from "@/http/api.js"
201 201
   import { defaultColor } from '@/static/js/theme.js'
202 202
   import { useSetTitle } from '@/share/useSetTitle.js'
203 203
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -263,7 +263,7 @@
263 263
     responseHandleTime: undefined,//补单-接单时间
264 264
     handleTime: undefined,//补单-解决时间
265 265
     handlingPersonnelUserId: undefined,//补单-处理人
266
-		introduceCount :0 //引入次数
266
+		// introduceCount :0 //引入次数
267 267
   })
268 268
   
269 269
   // 是否提交
@@ -299,6 +299,12 @@
299 299
     })
300 300
   }
301 301
   
302
+	// 返回引用知识库
303
+	function goBackView(){
304
+		handlerStore.setHandlerData(dataInfo, 'assign', 'assign');
305
+		goBack()
306
+	}
307
+	
302 308
   // 上传处理图片成功
303 309
   function handlerImgSuccess(e){
304 310
     dataInfo.handlerImgList.forEach(v => {
@@ -509,7 +515,6 @@
509 515
     dataInfo.selectType = {};//选择的对象类型
510 516
     dataInfo.handleDescription = '';//解决方案
511 517
 		solutionId.value = null;//引用知识库id
512
-		dataInfo.introduceCount = 0;//引用知识库次数
513 518
     dataInfo.handleCategory = undefined;//处理方式
514 519
     dataInfo.handleCategoryList = [];//处理方式列表
515 520
     dataInfo.closecode = undefined;//处理结果
@@ -1199,6 +1204,36 @@
1199 1204
     }
1200 1205
   }
1201 1206
   
1207
+	// 获取知识库数量
1208
+	function getIntroduceCount(categoryId){
1209
+	  uni.showLoading({
1210
+	    title: "加载中",
1211
+	    mask: true,
1212
+	  });
1213
+	  let postData = {
1214
+	    idx: 0,
1215
+	    sum: 9999,
1216
+	    solution: {
1217
+				category:{
1218
+					id:categoryId,
1219
+				},
1220
+				status:{id:72},
1221
+	    }
1222
+	  }
1223
+	  
1224
+	  api_getSolution(postData).then(res => {
1225
+	    uni.hideLoading();
1226
+	    if(res.status == 200){
1227
+				dataInfo.introduceCount = res.totalNum
1228
+	    }else{
1229
+	      uni.showToast({
1230
+	        icon: 'none',
1231
+	        title: res.msg || '请求数据失败!'
1232
+	      });
1233
+	    }
1234
+	  })
1235
+	}
1236
+	
1202 1237
 	// 获取文本内容
1203 1238
 	function getHtml(html) {
1204 1239
 	  const tempDiv = document.createElement('div');
@@ -1237,7 +1272,8 @@
1237 1272
       
1238 1273
       if(dataInfo.category){
1239 1274
          dataInfo.incidentData.category = dataInfo.category;
1240
-        
1275
+				 console.log(111)
1276
+				 getIntroduceCount(dataInfo.category.id)
1241 1277
         // 处理责任科室
1242 1278
         if(dataInfo.category.branchType == 1){
1243 1279
           // 分院区
@@ -1257,11 +1293,12 @@
1257 1293
         }
1258 1294
       }
1259 1295
     }else if(incidentBuildStore.incidentBuild.data){
1296
+			console.log(222)
1260 1297
       // 初始化
1261 1298
       Object.assign(dataInfo.incidentData, incidentBuildStore.incidentBuild.data);
1262 1299
       if(dataInfo.incidentData.category){
1263 1300
         dataInfo.category = dataInfo.incidentData.category;
1264
-        
1301
+        getIntroduceCount(dataInfo.category.id)
1265 1302
         // 处理责任科室
1266 1303
         if(dataInfo.category.branchType == 1){
1267 1304
           // 分院区

+ 28 - 0
pages/repository/repository.vue

@@ -16,10 +16,16 @@
16 16
 					<button @click.stop="importData(data)" type="default" class="primaryButton btn">引入</button>
17 17
 				</view>
18 18
       </view>
19
+			<view class="back-style" @click="goBack">
20
+				<text class="newicon newicon-fanhui1"></text>
21
+			</view>
19 22
     </view>
20 23
     <view class="zanwu" v-else>
21 24
       <text class="newicon newicon-zanwu"></text>
22 25
     </view>
26
+		<view v-if="dataInfo.list.length==0" class="btn-view">
27
+			<button @click="goBack" type="default" class="primaryButton btn">返回</button>
28
+		</view>
23 29
   </view>
24 30
 </template>
25 31
 
@@ -214,5 +220,27 @@
214 220
     bottom: 0;
215 221
     background-color: #fff;
216 222
   }
223
+	.btn-view{
224
+		position: fixed;
225
+		bottom: 40rpx;
226
+		width: 93.5%; 
227
+		padding: 24rpx 0 0 24rpx;
228
+	}
229
+	.back-style{
230
+		background: #D6D6D6;
231
+		width: 100rpx;
232
+		height: 100rpx;
233
+		border-radius: 50%;
234
+		display: flex;
235
+		justify-content: center;
236
+		align-items: center;
237
+		position: fixed;
238
+		right: 30rpx;
239
+		bottom: 30rpx;
240
+		text{
241
+			font-size: 50rpx;
242
+			color: #fff;
243
+		}
244
+	}
217 245
 }
218 246
 </style>

+ 10 - 40
pages/repositoryDetails/repositoryDetails.vue

@@ -12,7 +12,10 @@
12 12
 			<view class="file-item" @click="downloadFile(item)">{{item.name}}</view>
13 13
 			<text class="newicon newicon-xiazai" @click="downloadFile(item)"></text>
14 14
 		</view>
15
-		<button @click="importData" type="default" class="primaryButton btn btn-style">引入</button>
15
+		<view class="foot_common_btns btn-style">
16
+			<button @click="goBack" type="default" class="cancelButton btn">返回</button>
17
+			<button @click="importData" type="default" class="primaryButton btn ">引入</button>
18
+		</view>
16 19
   </view>
17 20
 </template>
18 21
 
@@ -53,47 +56,13 @@
53 56
   // 下载附件
54 57
   function downloadFile(item){
55 58
     console.log(666,item)
56
-		// 下载文件资源到本地
59
+		let url = location.origin + "/file" + item.relativeFilePath
57 60
 		uni.downloadFile({
58
-			url: item.previewUrl,  // 后端返回的线上文件路径
59
-			success: function(res) {
61
+			url: url, //仅为示例,并非真实的资源
62
+			success: (res) => {
60 63
 				if (res.statusCode === 200) {
61
-					// 文件到本地
62
-					uni.saveFile({
63
-						tempFilePath: res.tempFilePath, //临时路径
64
-						success: function(data) {
65
-							uni.showToast({
66
-								icon: 'none',
67
-								mask: true,
68
-								title: '保存成功',
69
-								duration: 2000
70
-							})
71
-							//ios手机直接打开文件,手动存储文件到手机,Android手机从根目录创建文件夹,保存文件并改名
72
-							setTimeout(() => {
73
-								//打开文档查看
74
-								uni.openDocument({
75
-									filePath: data.savedFilePath,
76
-									success: function(ress) {
77
-										console.log("成功打开文件")
78
-									},
79
-									fail() {
80
-										console.log("打开文件失败")
81
-									}
82
-								})
83
-							}, 1000)
84
-						}
85
-					})
86 64
 					console.log('下载成功');
87 65
 				}
88
-			},
89
-			fail: function(res) {
90
-				console.log(res.errMsg);
91
-			},
92
-			complete: function(res) {
93
-				console.log(res.statusCode);
94
-			},
95
-			progress: function(res) {
96
-				console.log('下载进度' + res.progress);
97 66
 			}
98 67
 		});
99 68
   }
@@ -199,7 +168,7 @@
199 168
 	.content{
200 169
 		padding-bottom: 24rpx;
201 170
 		border-bottom: 1px solid #eee;
202
-		overflow-y: scroll;
171
+		// overflow-y: scroll;
203 172
 	}
204 173
   .file-list{
205 174
     display: flex;
@@ -217,7 +186,8 @@
217 186
 	.btn-style{
218 187
 		position: fixed;
219 188
 		bottom: 40rpx;
220
-		width: 93%; 
189
+		width: 93.5%; 
190
+		padding: 0;
221 191
 	}
222 192
 }
223 193
 </style>

+ 26 - 3
static/font/demo_index.html

@@ -55,6 +55,12 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon newicon">&#xe634;</span>
59
+                <div class="name">返回</div>
60
+                <div class="code-name">&amp;#xe634;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
58 64
               <span class="icon newicon">&#xe660;</span>
59 65
                 <div class="name">上传</div>
60 66
                 <div class="code-name">&amp;#xe660;</div>
@@ -222,9 +228,9 @@
222 228
 <pre><code class="language-css"
223 229
 >@font-face {
224 230
   font-family: 'newicon';
225
-  src: url('iconfont.woff2?t=1718174994993') format('woff2'),
226
-       url('iconfont.woff?t=1718174994993') format('woff'),
227
-       url('iconfont.ttf?t=1718174994993') format('truetype');
231
+  src: url('iconfont.woff2?t=1718344479829') format('woff2'),
232
+       url('iconfont.woff?t=1718344479829') format('woff'),
233
+       url('iconfont.ttf?t=1718344479829') format('truetype');
228 234
 }
229 235
 </code></pre>
230 236
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -251,6 +257,15 @@
251 257
         <ul class="icon_lists dib-box">
252 258
           
253 259
           <li class="dib">
260
+            <span class="icon newicon newicon-fanhui1"></span>
261
+            <div class="name">
262
+              返回
263
+            </div>
264
+            <div class="code-name">.newicon-fanhui1
265
+            </div>
266
+          </li>
267
+          
268
+          <li class="dib">
254 269
             <span class="icon newicon newicon-shangchuan"></span>
255 270
             <div class="name">
256 271
               上传
@@ -504,6 +519,14 @@
504 519
           
505 520
             <li class="dib">
506 521
                 <svg class="icon svg-icon" aria-hidden="true">
522
+                  <use xlink:href="#newicon-fanhui1"></use>
523
+                </svg>
524
+                <div class="name">返回</div>
525
+                <div class="code-name">#newicon-fanhui1</div>
526
+            </li>
527
+          
528
+            <li class="dib">
529
+                <svg class="icon svg-icon" aria-hidden="true">
507 530
                   <use xlink:href="#newicon-shangchuan"></use>
508 531
                 </svg>
509 532
                 <div class="name">上传</div>

+ 7 - 3
static/font/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "newicon"; /* Project id 4304860 */
3
-  src: url('iconfont.woff2?t=1718174994993') format('woff2'),
4
-       url('iconfont.woff?t=1718174994993') format('woff'),
5
-       url('iconfont.ttf?t=1718174994993') format('truetype');
3
+  src: url('iconfont.woff2?t=1718344479829') format('woff2'),
4
+       url('iconfont.woff?t=1718344479829') format('woff'),
5
+       url('iconfont.ttf?t=1718344479829') format('truetype');
6 6
 }
7 7
 
8 8
 .newicon {
@@ -13,6 +13,10 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.newicon-fanhui1:before {
17
+  content: "\e634";
18
+}
19
+
16 20
 .newicon-shangchuan:before {
17 21
   content: "\e660";
18 22
 }

File diff suppressed because it is too large
+ 1 - 1
static/font/iconfont.js


+ 7 - 0
static/font/iconfont.json

@@ -6,6 +6,13 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "9645687",
10
+      "name": "返回",
11
+      "font_class": "fanhui1",
12
+      "unicode": "e634",
13
+      "unicode_decimal": 58932
14
+    },
15
+    {
9 16
       "icon_id": "1301374",
10 17
       "name": "上传",
11 18
       "font_class": "shangchuan",

BIN
static/font/iconfont.ttf


BIN
static/font/iconfont.woff


BIN
static/font/iconfont.woff2