Browse Source

拉取最新代码

maotao 8 months ago
parent
commit
1f3fbc85b9

+ 314 - 0
components/repairsFilter.vue

@@ -0,0 +1,314 @@
1
+<template>
2
+  <view class="container" @touchmove.stop.prevent v-if="pageData.pageRouter === 'default'">
3
+    <view class="container_form">
4
+      <view class="category">
5
+        <text class="name">状态</text>
6
+        <text class="value">
7
+					<uni-data-picker @change="categoryChange" v-model="searchData.category" :localdata="pageData.categoryList" popup-title="请选择状态" :map="{text:'category',value:'id'}">
8
+						
9
+					</uni-data-picker>
10
+				</text>
11
+      </view>
12
+			<view class="category">
13
+				<label class="uni-list-cell uni-list-cell-pd">
14
+					<text class="name">待评价</text>
15
+					<checkbox value="1" color="#49b856" :checked="searchData.evaluate" />
16
+				</label>
17
+			</view>
18
+    </view>
19
+    <view class="container_foot">
20
+      <view class="clear" @click="clear">清除选项</view>
21
+      <view class="foot_btns">
22
+        <view class="cancel" @click="cancel">取消</view>
23
+        <view class="confirm" @click="confirm">确认</view>
24
+      </view>
25
+    </view>
26
+  </view>
27
+  <view class="mask" @touchmove.stop.prevent></view>
28
+  <view class="line" @touchmove.stop.prevent></view>
29
+  
30
+</template>
31
+
32
+<script setup>
33
+  import { defineEmits, ref, reactive, defineProps } from 'vue'
34
+  import { onLoad } from '@dcloudio/uni-app'
35
+  import { useLoginUserStore } from '@/stores/loginUser'
36
+	import { repositoryListSearchStore } from '@/stores/repositorySearch'
37
+  import { api_area, api_incidentcategory } from "@/http/api.js"
38
+  import { transform } from '@/utils/index.js'
39
+		
40
+  const emit = defineEmits(['cancelEmit', 'confirmEmit']);
41
+  const loginUserStore = useLoginUserStore();
42
+	const repositorySearchStore = repositoryListSearchStore();
43
+  
44
+  // 页面数据
45
+  const pageData = reactive({
46
+    pageRouter: 'default',
47
+    areaList: [],
48
+    categoryList: [],
49
+  });
50
+	
51
+  const searchData = reactive({
52
+		evaluate:false,
53
+    hospital: {},
54
+    selected: 'todoingAll',
55
+    area: {id: 0, area: '全部'},
56
+    category: {},
57
+    acceptDate: [],
58
+		categoryChangeData:[]
59
+  })
60
+  
61
+  // 清空
62
+  function clear(){
63
+    searchData.category = {};
64
+    searchData.acceptDate = [];
65
+		searchData.evaluate = false;
66
+		searchData.categoryChangeData = [];
67
+		repositorySearchStore.clearRepositoryListSearchData()
68
+  }
69
+  
70
+  // 取消
71
+  function cancel(){
72
+    emit('cancelEmit')
73
+  }
74
+  
75
+  // 确认
76
+  function confirm(){
77
+		repositorySearchStore.setRepositoryListSearchData(searchData)
78
+    emit('confirmEmit', searchData);
79
+  }
80
+
81
+  function categoryChange(val){
82
+		searchData.categoryChangeData = val.detail.value
83
+	}
84
+	
85
+  // 获取故障现象列表
86
+  function getCategoryList(){
87
+    uni.showLoading({
88
+      title: "加载中",
89
+      mask: true,
90
+    });
91
+    
92
+    let postData = {
93
+      idx: 0,
94
+      sum: 9999,
95
+      incidentcategory: {
96
+
97
+			},
98
+    }
99
+    if(loginUserStore.loginUser.user.duty){
100
+      postData.incidentcategory.duty = loginUserStore.loginUser.user.duty.id;
101
+    }else if(loginUserStore.loginUser.user.branch){
102
+      postData.incidentcategory.branch = loginUserStore.loginUser.user.branch.id;
103
+    }
104
+    
105
+    api_incidentcategory(postData).then(res => {
106
+      uni.hideLoading();
107
+      if(res.status == 200){
108
+        let list = res.list || [];
109
+				list = list.map(i=> ({...i, parentid: i.parent?.id}))
110
+				pageData.categoryList = transform(list, 'id', 'parentid')
111
+      }else{
112
+        uni.showToast({
113
+          icon: 'none',
114
+          title: res.msg || '请求数据失败!'
115
+        });
116
+      }
117
+    })
118
+  }
119
+	
120
+  // 页面路由跳转
121
+  function clickPageRouter(type){
122
+    pageData.pageRouter = type;
123
+    switch(type){
124
+      case 'category':
125
+        getCategoryList('one');
126
+      break;
127
+    }
128
+  }
129
+	
130
+  onLoad((option) => {
131
+		getCategoryList()
132
+		let data = repositorySearchStore.repositorySearch.data
133
+    searchData.category = data && data.category;
134
+		searchData.title = data && data.title;
135
+		searchData.categoryChangeData = data && data.categoryChangeData
136
+		searchData.evaluate = data && data.evaluate
137
+  })
138
+</script>
139
+
140
+<style lang="scss" scoped>
141
+.uni-checkbox-input:hover{
142
+	border-color:#49b856;
143
+}
144
+.mask{
145
+  position: fixed;
146
+  left: 0;
147
+  top: 0;
148
+  right: 0;
149
+  bottom: 0;
150
+  background-color: rgba(0, 0, 0, 0.4);
151
+  z-index: 999;
152
+}
153
+.line{
154
+  content: '';
155
+  position: fixed;
156
+  top: 0;
157
+  left: 0;
158
+  z-index: 9999;
159
+  height: 8rpx;
160
+  width: 100%;
161
+  background-color: #EBEBEB;
162
+}
163
+.container{
164
+  position: fixed;
165
+  left: 125rpx;
166
+  top: 0;
167
+  right: 0;
168
+  bottom: 0;
169
+  z-index: 9999;
170
+  background-color: #F7F7F7;
171
+  display: flex;
172
+  flex-direction: column;
173
+  justify-content: space-between;
174
+  
175
+  .container_form{
176
+    height: 100%;
177
+    display: flex;
178
+    flex-direction: column;
179
+    flex: 1;
180
+    min-height: 0;
181
+		.item{
182
+			padding: 32rpx;
183
+		}
184
+  }
185
+  
186
+  .hospital{
187
+    display: flex;
188
+		align-items: center;
189
+    padding: 32rpx 24rpx 24rpx;
190
+    background-color: #fff;
191
+    .name{
192
+      font-size: 28rpx;
193
+      flex-shrink: 0;
194
+      margin-right: 24rpx;
195
+    }
196
+    .value{
197
+			width: 100%;
198
+      font-size: 22rpx;
199
+			.uni-input{
200
+				font-size: 26rpx;
201
+			}
202
+    }
203
+  }
204
+  
205
+  .areas{
206
+    flex: 1;
207
+    min-height: 0;
208
+    margin-top: 16rpx;
209
+    background-color: #fff;
210
+    .areas_item{
211
+      padding: 24rpx;
212
+      border-bottom: 1rpx solid #DEDEDE;
213
+    }
214
+  }
215
+  
216
+  .categorys{
217
+    flex: 1;
218
+    min-height: 0;
219
+    margin-top: 16rpx;
220
+    background-color: #fff;
221
+    .categorys_item{
222
+      padding: 24rpx;
223
+      border-bottom: 1rpx solid #DEDEDE;
224
+    }
225
+  }
226
+  
227
+  .tabs{
228
+    margin-top: 16rpx;
229
+    background-color: #FBFBFB;
230
+    display: flex;
231
+    flex-wrap: wrap;
232
+    justify-content: space-between;
233
+    gap: 16rpx 0;
234
+    padding: 24rpx 16rpx;
235
+    .tab{
236
+      width: 180rpx;
237
+      height: 60rpx;
238
+      display: flex;
239
+      justify-content: center;
240
+      align-items: center;
241
+      background-color: #F7F7F7;
242
+      font-size: 28rpx;
243
+      position: relative;
244
+      .newicon-xuanzejiaobiao{
245
+        opacity: 0;
246
+        position: absolute;
247
+        right: 0;
248
+        bottom: 0;
249
+        font-size: 38rpx;
250
+        color: #53B9BB;
251
+      }
252
+      &.active{
253
+        background-color: rgba(149, 220, 231, 0.30);
254
+        .newicon-xuanzejiaobiao{
255
+          opacity: 1;
256
+        }
257
+      }
258
+    }
259
+  }
260
+  
261
+  .area,
262
+  .category,
263
+  .acceptDate{
264
+    display: flex;
265
+    justify-content: space-between;
266
+    align-items: center;
267
+    padding: 24rpx;
268
+    background-color: #fff;
269
+    margin-top: 24rpx;
270
+    .name{
271
+      font-size: 28rpx;
272
+      flex-shrink: 0;
273
+      margin-right: 24rpx;
274
+    }
275
+		.value{
276
+			flex:1;
277
+		}
278
+  }
279
+  
280
+  .container_foot{
281
+    .clear{
282
+      padding: 24rpx;
283
+      font-size: 28rpx;
284
+      background-color: #fff;
285
+      margin: 0 16rpx;
286
+      display: flex;
287
+      align-items: center;
288
+      justify-content: center;
289
+    }
290
+    .foot_btns{
291
+      margin-top: 24rpx;
292
+      display: flex;
293
+      border-top: 1rpx solid #BFBFBF;
294
+      .cancel{
295
+        flex: 1;
296
+        background-color: #fff;
297
+        font-size: 32rpx;
298
+        padding: 24rpx;
299
+        display: flex;
300
+        justify-content: center;
301
+      }
302
+      .confirm{
303
+        flex: 1;
304
+        font-size: 32rpx;
305
+        padding: 24rpx;
306
+        background-color: $uni-primary;
307
+        display: flex;
308
+        justify-content: center;
309
+        color: #fff;
310
+      }
311
+    }
312
+  }
313
+}
314
+</style>

+ 15 - 0
http/api.js

@@ -214,3 +214,18 @@ export function api_getSolution(data){
214 214
 export function api_loginEncrypt(data){
215 215
   return post("/auth/loginEncrypt", data);
216 216
 }
217
+
218
+/**
219
+ * 报修端-公告
220
+ */
221
+export function api_getNotice(data){
222
+  return post("/user/data/fetchDataList/notice", data);
223
+}
224
+
225
+/**
226
+ * 报修端-首页
227
+ */
228
+export function api_getCount(data){
229
+  return post("/repair/incident/count", data);
230
+}
231
+

+ 59 - 0
http/http.js

@@ -1,4 +1,7 @@
1 1
 export const path = `${location.origin}/service`
2
+// #ifdef H5
3
+import wx from 'weixin-jsapi'
4
+// #endif
2 5
 // get方法
3 6
 export function get(url, data = {}) {
4 7
   url = path + url;
@@ -62,3 +65,59 @@ export function post(url, data = {}) {
62 65
     })
63 66
   });
64 67
 }
68
+
69
+// 扫一扫
70
+export function SM() {
71
+  // #ifndef H5
72
+  return new Promise((resolve, reject) => {
73
+    uni.scanCode({
74
+      onlyFromCamera: true,
75
+      success: function(res) {
76
+        let str = res.result.replace(/[\s\/]/g, '') || 'none';
77
+        str = str.replace(/CODABAR,/i, '');
78
+        str = str.replace(/CODE_128,/i, '');
79
+        resolve(str);
80
+      },
81
+      fail(err) {
82
+        reject(err);
83
+      }
84
+    });
85
+  });
86
+  // #endif
87
+  // #ifdef H5
88
+  return new Promise((resolve, reject) => {
89
+    let param = {
90
+      requestUrl: location.href.split('#')[0]
91
+    };
92
+    post("/wechat/getJsConfig", param).then(res => {
93
+      if (res) {
94
+        wx.config({
95
+          debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
96
+          appId: res.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
97
+          timestamp: res.timestamp, // 必填,生成签名的时间戳
98
+          nonceStr: res.nonceStr, // 必填,生成签名的随机串
99
+          signature: res.signature, // 必填,签名,见附录1
100
+          jsApiList: res.jsApiList // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
101
+        });
102
+        wx.ready(function() {
103
+          wx.scanQRCode({
104
+            desc: "scanQRCode desc",
105
+            needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
106
+            scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
107
+            success: function(res) {
108
+              // 当needResult 为 1 时,扫码返回的结果
109
+              let str = res.resultStr.replace(/[\s\/]/g, '') || 'none';
110
+              str = str.replace(/CODABAR,/i, '');
111
+              str = str.replace(/CODE_128,/i, '');
112
+              resolve(str);
113
+            },
114
+            cancel(err){
115
+              reject(err);
116
+            }
117
+          });
118
+        });
119
+      }
120
+    })
121
+  });
122
+  // #endif
123
+}

+ 1 - 1
interceptor/routeInterceptor.js

@@ -14,7 +14,7 @@ let repaireRouterList = [
14 14
         // 调用前拦截
15 15
         const url = e.url.split('?')[0];
16 16
         // 报修人不可以访问除了登录页,绑定工号页,报修入口页的其他页面
17
-        if (!repaireRouterList.includes(url) && loginUserStore.loginUser.user && loginUserStore.loginUser.user
17
+        if (!repaireRouterList.includes(url) && !url.includes("repair") && loginUserStore.loginUser.user && loginUserStore.loginUser.user
18 18
           .engineer !== 1) {
19 19
           uni.reLaunch({
20 20
             url: "/pages/repairEntrance/repairEntrance"

+ 2 - 2
manifest.json

@@ -62,8 +62,8 @@
62 62
         "devServer" : {
63 63
             "proxy" : {
64 64
                 "/service" : {
65
-                    "target" : "http://192.168.3.111", //请求的目标域名
66
-										// "target" : "http://192.168.4.163", //宋程玉本地
65
+                    // "target" : "http://192.168.3.111", //请求的目标域名
66
+										"target" : "http://192.168.4.163", //宋程玉本地
67 67
                     "changeOrigin" : true, //是否跨域
68 68
                     "secure" : false
69 69
                 },

+ 5 - 0
node_modules/.package-lock.json

@@ -248,6 +248,11 @@
248 248
         "node": ">= 0.10"
249 249
       }
250 250
     },
251
+    "node_modules/recorder-core": {
252
+      "version": "1.3.24040900",
253
+      "resolved": "https://registry.npmmirror.com/recorder-core/-/recorder-core-1.3.24040900.tgz",
254
+      "integrity": "sha512-QVOXHqrQhQ5FMgXTKh4P7oc31Qex2Q5skgBT972+0wrtwHr76zMnrybo48/VyUhS75whRxMFJ5yQpv+wj333Bw=="
255
+    },
251 256
     "node_modules/resolve": {
252 257
       "version": "1.22.8",
253 258
       "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.8.tgz",

+ 6 - 0
package-lock.json

@@ -8,6 +8,7 @@
8 8
         "crypto-js": "^4.2.0",
9 9
         "date-fns": "^3.6.0",
10 10
         "lodash-es": "^4.17.21",
11
+        "recorder-core": "^1.3.24040900",
11 12
         "weixin-jsapi": "^1.1.0"
12 13
       },
13 14
       "devDependencies": {
@@ -292,6 +293,11 @@
292 293
         "node": ">= 0.10"
293 294
       }
294 295
     },
296
+    "node_modules/recorder-core": {
297
+      "version": "1.3.24040900",
298
+      "resolved": "https://registry.npmmirror.com/recorder-core/-/recorder-core-1.3.24040900.tgz",
299
+      "integrity": "sha512-QVOXHqrQhQ5FMgXTKh4P7oc31Qex2Q5skgBT972+0wrtwHr76zMnrybo48/VyUhS75whRxMFJ5yQpv+wj333Bw=="
300
+    },
295 301
     "node_modules/resolve": {
296 302
       "version": "1.22.8",
297 303
       "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.8.tgz",

+ 1 - 0
package.json

@@ -6,6 +6,7 @@
6 6
     "crypto-js": "^4.2.0",
7 7
     "date-fns": "^3.6.0",
8 8
     "lodash-es": "^4.17.21",
9
+    "recorder-core": "^1.3.24040900",
9 10
     "weixin-jsapi": "^1.1.0"
10 11
   },
11 12
   "devDependencies": {

+ 50 - 3
pages.json

@@ -181,6 +181,38 @@
181 181
 	       "titleNView": false
182 182
 	     }
183 183
 	   }
184
+	 },
185
+	 {
186
+		 "path": "pages/repair/home",
187
+		 "style": {
188
+			 "h5": {
189
+				 "titleNView": false
190
+			 }
191
+		 }
192
+	 },
193
+	 {
194
+		 "path": "pages/repair/repairsList",
195
+		 "style": {
196
+			 "h5": {
197
+				 "titleNView": false
198
+			 }
199
+		 }
200
+	 },
201
+	 {
202
+		 "path": "pages/repair/rapidRep",
203
+		 "style": {
204
+			 "h5": {
205
+				 "titleNView": false
206
+			 }
207
+		 }
208
+	 },
209
+	 {
210
+		 "path": "pages/repair/rapidRepNext",
211
+		 "style": {
212
+			 "h5": {
213
+				 "titleNView": false
214
+			 }
215
+		 }
184 216
 	 }
185 217
   ],
186 218
   "globalStyle": {
@@ -193,16 +225,31 @@
193 225
     "selectedColor": "#49B856",
194 226
     "borderStyle": "black",
195 227
     "backgroundColor": "#ffffff",
196
-    "list": [{
228
+    "list": [
229
+			// {
230
+			//   "pagePath": "pages/repair/home",
231
+			//   "iconPath": "static/img/icon_index.png",
232
+			//   "selectedIconPath": "static/img/icon_index_active.png",
233
+			//   "text": "首页"
234
+			// },
235
+			{
197 236
       "pagePath": "pages/incidentList/incidentList",
198 237
       "iconPath": "static/img/icon_incidentList.png",
199 238
       "selectedIconPath": "static/img/icon_incidentList_active.png",
200 239
       "text": "故障"
201
-    }, {
240
+			}, 
241
+			{
242
+			"pagePath": "pages/repair/home",
243
+			"iconPath": "static/img/icon_repairList.png",
244
+			"selectedIconPath": "static/img/icon_repairList_active.png",
245
+			"text": "我的报修"
246
+			},
247
+			{
202 248
       "pagePath": "pages/my/my",
203 249
       "iconPath": "static/img/icon_my.png",
204 250
       "selectedIconPath": "static/img/icon_my_active.png",
205 251
       "text": "我的"
206
-    }]
252
+			},
253
+		]
207 254
   }
208 255
 }

+ 271 - 0
pages/repair/home.vue

@@ -0,0 +1,271 @@
1
+<template>
2
+	<view class="home">
3
+		<view class="home_item" v-if="isDept.valueconfig==1" @click="repairsView(1)">
4
+		  <view class="title">科室报修</view>
5
+		  <view class="content">
6
+				<view>
7
+					<view class="con-title">处理中</view>
8
+					<view class="con-value">{{repairData.deptHandlerCount}}</view>
9
+				</view>
10
+				<view>
11
+					<view class="con-title">待评价</view>
12
+					<view class="con-value">{{repairData.deptCloseCount}}</view>
13
+				</view>
14
+				<view>
15
+					<view class="con-title">本月维修费用(元)</view>
16
+					<view class="con-value-gr">{{repairData.deptCurrentMonthPrice}}</view>
17
+				</view>
18
+		  </view>
19
+		</view>
20
+		<view class="home_item" @click="repairsView(0)">
21
+		  <view class="title">我的报修</view>
22
+		  <view class="content">
23
+				<view>
24
+					<view class="con-title">处理中</view>
25
+					<view class="con-value">{{repairData.userCloseCount}}</view>
26
+				</view>
27
+				<view>
28
+					<view class="con-title">待评价</view>
29
+					<view class="con-value">{{repairData.userHandlerCount}}</view>
30
+				</view>
31
+		  </view>
32
+		</view>
33
+		<view class="home_item">
34
+			<uni-notice-bar show-icon scrollable background-color="#ffffff" color="#000"
35
+			:text="noticeData" />
36
+		</view>
37
+		<view class="home_item home-disp">
38
+			<view class="bottom-left" @click="addRepairs">
39
+				<view class="bottom-left-box">
40
+					<text class="newicon newicon-kuaisubaoxiu icon"></text>
41
+					<view>快速报修</view>
42
+				</view>
43
+			</view>
44
+			<view class="bottom-right mar-t-20">
45
+				<view class="bottom-right-item" v-if="isRepair.valueconfig==1" @click="scanCodes">
46
+					<text class="newicon newicon-saoma icon"></text>
47
+					<view class="name1">扫资产报修</view>
48
+				</view>
49
+				<view class="bottom-right-item" @click="repository">
50
+					<text class="newicon newicon-zhishiku1 icon"></text>
51
+					<view class="name2">知识库</view>
52
+				</view>
53
+			</view>
54
+			
55
+		</view>
56
+	</view>
57
+</template>
58
+
59
+<script setup>
60
+	import { SM } from "@/http/http.js"
61
+	import { ref, reactive } from 'vue'
62
+	import { onLoad,onShow } from '@dcloudio/uni-app'
63
+	import { api_systemConfiguration, api_getNotice, api_getCount } from "@/http/api.js"
64
+	import { useSetTitle } from '@/share/useSetTitle.js'
65
+	import { repositoryListSearchStore } from '@/stores/repositorySearch'
66
+	useSetTitle();
67
+	
68
+	// 数据
69
+	const sysData = ref({})
70
+	const isDept = ref({})
71
+	const isRepair = ref({})
72
+	const noticeData = ref('')
73
+	const repairData = ref({})
74
+	const repositorySearchStore = repositoryListSearchStore();
75
+	
76
+	// 知识库
77
+	function repository(){
78
+		repositorySearchStore.clearRepositoryListSearchData()
79
+		uni.navigateTo({
80
+		  url: `/pages/repository/repository?type=view`
81
+		})
82
+	}
83
+	
84
+	// 报修列表
85
+	function repairsView(type){
86
+	  uni.navigateTo({
87
+	    url: '/pages/repair/repairsList?type='+type
88
+	  })
89
+	}
90
+	
91
+	// 获取公告
92
+	function getNotice(){
93
+		api_getNotice({
94
+			idx: 0,
95
+			sum: 3,
96
+			type:'wxRepair',
97
+			notice: {
98
+			  status: 1
99
+			}
100
+		}).then(res=>{
101
+			uni.hideLoading();
102
+			getHtml(res.list[0])
103
+		})
104
+	}
105
+	
106
+	// 获取报修数量
107
+	function getCount(){
108
+		api_getCount({}).then(res=>{
109
+			repairData.value = res.data
110
+			getNotice()
111
+		})
112
+	}
113
+	
114
+	// 快速报修
115
+	function addRepairs(){
116
+		uni.navigateTo({
117
+		  url: '/pages/repair/rapidRep'
118
+		})
119
+	}
120
+	
121
+	// 扫资产报修
122
+	function scanCodes(){
123
+		SM().then((res) => {
124
+		  uni.showLoading({
125
+		    title: "加载中",
126
+		    mask: true,
127
+		  });
128
+			uni.hideLoading();
129
+		})
130
+	}
131
+	
132
+	// 获取文本内容
133
+	function getHtml(data) {
134
+	  const tempDiv = document.createElement('div');
135
+	  tempDiv.innerHTML = data.content;
136
+		noticeData.value = tempDiv.textContent || tempDiv.innerText || '';
137
+	}
138
+	
139
+	onLoad((option) => {
140
+		
141
+	})
142
+	
143
+	onShow((option) => {
144
+		uni.showLoading({
145
+		  title: "加载中",
146
+		});
147
+	  api_systemConfiguration({
148
+			idx: 0,
149
+			sum: 9999,
150
+		}).then(res=>{
151
+			sysData.value = res.list
152
+			isDept.value = res.list.find(i=>i.keyconfig=='deptRepair')
153
+			isRepair.value = res.list.find(i=>i.keyconfig=='cmdbRepair')
154
+			uni.setStorageSync('sysData',JSON.stringify(res.list))
155
+			getCount()
156
+		})
157
+	})
158
+	
159
+
160
+</script>
161
+
162
+<style lang="scss" scoped>
163
+	.home{
164
+		height: 100vh;
165
+		padding: 20rpx;
166
+		background: #fff;
167
+		.home_item{
168
+			padding: 20rpx;
169
+			box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
170
+			border-radius: 10rpx;
171
+			margin-bottom: 30rpx;
172
+			.title{
173
+			  font-size: 26rpx;
174
+			  color: $uni-primary;
175
+			  padding-left: 18rpx;
176
+			  position: relative;
177
+				margin-bottom: 20rpx;
178
+			  &:before{
179
+			    content: '';
180
+			    width: 8rpx;
181
+			    height: 25rpx;
182
+			    background-color: $uni-primary;
183
+			    position: absolute;
184
+			    left: 0;
185
+			    top: 50%;
186
+			    transform: translateY(-50%);
187
+			  }
188
+			}
189
+			.content{
190
+				display: flex;
191
+				align-items: center;
192
+				justify-content: space-around;
193
+				text-align: center;
194
+				.con-title{
195
+					color: #949494;
196
+					font-size: 24rpx;
197
+					margin-bottom: 15rpx;
198
+				}
199
+				.con-value{
200
+					color: #000;
201
+					font-size: 50rpx;
202
+				}
203
+				.con-value-gr{
204
+					color: #49B856;
205
+					font-size: 50rpx;
206
+				}
207
+			}
208
+			.uni-noticebar{
209
+				margin: 0 !important;
210
+				padding: 0 !important;
211
+			}
212
+		}
213
+		.home-disp{
214
+			display: flex;
215
+			justify-content: space-around;
216
+			.bottom-left{
217
+				height: 380rpx;
218
+				background: linear-gradient( 269deg, #54B99C 0%, #7AC481 100%);
219
+				border-radius: 10rpx;
220
+				flex: 1.5;
221
+				margin-right: 20rpx;
222
+				display: flex;
223
+				align-items: center;
224
+				justify-content: center;
225
+				color: #FFFFFF;
226
+				margin-top: 20rpx;
227
+				.bottom-left-box{
228
+					text-align: center;
229
+					.icon{
230
+						font-size: 100rpx;
231
+						position: relative;
232
+						top: -20rpx;
233
+					}
234
+				}
235
+			}
236
+			.mar-t-20{
237
+				margin-top: 20rpx;
238
+			}
239
+			.bottom-right{
240
+				flex: 2;
241
+				.bottom-right-item{
242
+					height: 175rpx;
243
+					background: #FFFFFF;
244
+					border-radius: 10rpx;
245
+					border: 2rpx solid #6FC073;
246
+					margin-bottom: 20rpx;
247
+					display: flex;
248
+					align-items: center;
249
+					justify-content: center;
250
+					position: relative;
251
+					.icon{
252
+						font-size: 50rpx;
253
+						color: #6FC073;
254
+						position: absolute;
255
+						left: 60rpx;
256
+					}
257
+					.name1{
258
+						font-size: 32rpx;
259
+						position: absolute;
260
+						right: 50rpx;
261
+					}
262
+					.name2{
263
+						font-size: 32rpx;
264
+						position: absolute;
265
+						right: 80rpx;
266
+					}
267
+				}
268
+			}
269
+		}
270
+	}
271
+</style>

+ 590 - 0
pages/repair/rapidRep.vue

@@ -0,0 +1,590 @@
1
+<template>
2
+	<view class="handler">
3
+		<view class="body view-body">
4
+			<view class="form_item column">
5
+				<view class="title"><text class="required newicon newicon-bitian"></text>故障描述:</view>
6
+				<uni-easyinput class="value" type="textarea" v-model="dataInfo.deferralRemark" placeholder="请输入故障描述" :class="{formRed: isSubmit && !dataInfo.deferralRemark.trim()}" />
7
+			</view>
8
+			<view class="candidate">
9
+				<view class="candidate-item" v-for="item in candidateData" :key="item" @click="itemCandidate(item)">{{item.name}}</view>
10
+			</view>
11
+			<view class="form_item" v-if="cmdbRepair.valueconfig==1">
12
+				<view class="title select">关联资产:</view>
13
+				<input class="item-input" focus placeholder="请扫描资产卡二维码" v-model="dataInfo.property"/>
14
+				<text class="newicon newicon-saoma icon" @click="scanCodes"></text>
15
+			</view>
16
+			<view class="form_item">
17
+				<view class="title">照片录像:</view>
18
+				<view class="value">
19
+					<uni-file-picker ref="handlerImgRef" v-model="dataInfo.handlerImgList"
20
+					 limit="4" @success="handlerImgSuccess" 
21
+					@fail="handlerImgFail" @select="handlerImgSelect" @delete="handlerImgDelete">
22
+					</uni-file-picker>
23
+					<view class="imgTips">(支持JPG/PNG格式图片,单张大小3M以内,录像支持30秒)</view>
24
+				</view>
25
+			</view>
26
+			<view class="form_item">
27
+				<view class="title">录音:</view>
28
+				<view class="chunk" v-if="!dataInfo.recBlob" @click="examineRecord" @mouseup="recStop">按住录音</view>
29
+				<view v-if="dataInfo.recBlob">
30
+					<!-- <audio src="dataInfo.recBlob" controls></audio> -->
31
+					<icon type="clear" size="26" @click="clearRec"/>
32
+				</view>
33
+			</view>
34
+		</view>
35
+		<view class="foot_common_btns">
36
+			<button @click="goBackOrToList" type="default" class="cancelButton btn">返回</button>
37
+			<button @click="submit" type="default" class="primaryButton btn">下一步</button>
38
+		</view>
39
+	</view>
40
+</template>
41
+
42
+<script setup>
43
+	import { SM } from "@/http/http.js"
44
+  import { ref, reactive, computed } from 'vue'
45
+  import NumberModal from '@/components/NumberModal.vue';
46
+  import { onLoad } from '@dcloudio/uni-app'
47
+  import { generateNumberArray } from '@/utils/index.js'
48
+  import { api_group, api_incidentDetail, api_getSolution, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_getDictionary, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
49
+  import { defaultColor } from '@/static/js/theme.js'
50
+  import { useSetTitle } from '@/share/useSetTitle.js'
51
+  import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
52
+  import { useUploadFile } from '@/share/useUploadFile.js'
53
+  import { useGoBack } from '@/share/useGoBack.js'
54
+  import { useLoginUserStore } from '@/stores/loginUser'
55
+  import { useHandlerStore } from '@/stores/handler'
56
+  
57
+	import Recorder from 'recorder-core';
58
+	import 'recorder-core/src/engine/mp3';
59
+  import 'recorder-core/src/engine/mp3-engine';
60
+  import 'recorder-core/src/engine/wav';
61
+  import 'recorder-core/src/extensions/waveview';
62
+			
63
+  useSetTitle();
64
+  const loginUserStore = useLoginUserStore();
65
+  const handlerStore = useHandlerStore();
66
+  const { makePhoneCall }  = useMakePhoneCall();
67
+  const { uploadFile }  = useUploadFile();
68
+  const { goBack }  = useGoBack();
69
+  
70
+  // 主题颜色
71
+  const primaryColor = ref(defaultColor)
72
+	
73
+  // 数据
74
+  const dataInfo = reactive({
75
+    tabs: [
76
+      // {id: 5, name: '故障处理', value: 'doing', num: ''},
77
+      // {id: 6, name: '延期处理', value: 'overtime', num: ''},
78
+    ],
79
+    tabActiveValue: 0,//当前选择的tab
80
+    incidentId: undefined,//事件ID
81
+    incidentData: {},//事件对象
82
+    deferralRemark: '',//故障描述
83
+		property:'', //资产
84
+    handlerImgList: [],//处理图片列表
85
+		recBlob:'' //录音
86
+  })
87
+  
88
+	// 故障处理用是否提供备用机
89
+	const newProvideBackupMachine = ref(0)
90
+	
91
+	// 知识库id
92
+	const solutionId = ref(null)
93
+	
94
+  // 是否提交
95
+  const isSubmit = ref(false)
96
+  
97
+  // 处理图片
98
+  const handlerImgRef = ref(null)
99
+  
100
+  const candidateData = ref([
101
+		{name:'马桶肃杀'},
102
+		{name:'马桶肃杀'},
103
+		{name:'马桶肃杀'},
104
+		{name:'马桶肃杀'},
105
+		{name:'马桶肃杀'},
106
+		{name:'马桶肃杀'},
107
+		{name:'马桶肃杀'},
108
+		{name:'马桶肃杀'},
109
+		{name:'马桶肃杀'},
110
+	])
111
+  
112
+	const cmdbRepair = ref(null)
113
+	
114
+	let rec = null;
115
+	let wave = null;
116
+	const recwave = ref(null);
117
+	
118
+  // 上一步或者返回列表
119
+  function goBackOrToList(){
120
+		uni.setStorageSync('repairData','')
121
+    goBack();
122
+  }
123
+	
124
+	function itemCandidate(item){
125
+		dataInfo.deferralRemark = item.name
126
+	}
127
+	
128
+	// 获取录音权限
129
+	function recOpen() {
130
+		rec = Recorder({
131
+		    type: 'wav', //录音格式,可以换成wav等其他格式
132
+		    sampleRate: 16000, //录音的采样率,越大细节越丰富越细腻
133
+		    bitRate: 16, //录音的比特率,越大音质越好
134
+		    onProcess: (buffers, powerLevel, bufferDuration, bufferSampleRate) => {
135
+					if (wave) {
136
+						wave.input(buffers[buffers.length - 1], powerLevel, bufferSampleRate);
137
+					}
138
+				},
139
+		  });
140
+		  if (!rec) {
141
+		    alert('当前浏览器不支持录音功能!');
142
+		    return;
143
+		  }
144
+		  //打开录音,获得权限
145
+		  rec.open(
146
+		    () => {
147
+		      console.log('录音已打开');
148
+					startRecord()
149
+		      if (recwave.value) {
150
+		        //创建音频可视化图形绘制对象
151
+		        wave = Recorder.WaveView({ elem: recwave.value });
152
+		      }
153
+		    },
154
+		    (msg, isUserNotAllow) => {
155
+		      //用户拒绝了录音权限,或者浏览器不支持录音
156
+		      console.log((isUserNotAllow ? 'UserNotAllow,' : '') + '无法录音:' + msg);
157
+		    },
158
+		  );
159
+
160
+		// uni.getSetting({
161
+		//   success(res) {
162
+		//     // 判断是否开启了录音权限
163
+		//     if (res.authSetting['scope.record']) {
164
+		// 			startRecord()
165
+		//     } else {
166
+		// 			uni.showToast({
167
+		// 				icon: 'none',
168
+		// 			  title: '录音权限未开启,无法录音',
169
+		// 			  mask: true,
170
+		// 			});
171
+		//     }
172
+		//   }
173
+		// })
174
+	}
175
+	
176
+	// 检查录音
177
+	function examineRecord() {
178
+		recOpen()
179
+	}
180
+	
181
+  function startRecord(){
182
+		if (!rec) {
183
+			console.error('未打开录音');
184
+			return;
185
+		}
186
+		rec.start();
187
+	}
188
+	
189
+	// 结束录音
190
+	function recStop() {
191
+	  if (!rec) {
192
+	    console.error('未打开录音');
193
+	    return;
194
+	  }
195
+	  rec.stop(
196
+	    (blob, duration) => {
197
+	      //blob就是我们要的录音文件对象,可以上传,或者本地播放
198
+	      dataInfo.recBlob = blob;
199
+	      //简单利用URL生成本地文件地址,此地址只能本地使用,比如赋值给audio.src进行播放,赋值给a.href然后a.click()进行下载(a需提供download="xxx.mp3"属性)
200
+	      const localUrl = (window.URL || window.webkitURL).createObjectURL(blob);
201
+	      console.log('录音成功', blob, localUrl, '时长:' + duration + 'ms');
202
+	      // upload(blob); //把blob文件上传到服务器
203
+	      rec.close(); //关闭录音,释放录音资源,当然可以不释放,后面可以连续调用start
204
+	      rec = null;
205
+	    },
206
+	    (err) => {
207
+	      console.error('结束录音出错:' + err);
208
+	      rec.close(); //关闭录音,释放录音资源,当然可以不释放,后面可以连续调用start
209
+	      rec = null;
210
+	    },
211
+	  );
212
+	}
213
+	
214
+	// 删除录音
215
+	function clearRec(){
216
+		dataInfo.recBlob = null
217
+	}
218
+	
219
+	// 扫码资产码
220
+	function scanCodes(){
221
+		SM().then((res) => {
222
+		  uni.showLoading({
223
+		    title: "加载中",
224
+		    mask: true,
225
+		  });
226
+			uni.hideLoading();
227
+		})
228
+	}
229
+	
230
+  // 上传处理图片成功
231
+  function handlerImgSuccess(e){
232
+    dataInfo.handlerImgList.forEach(v => {
233
+      v.url = v.path;
234
+    })
235
+    console.log(dataInfo.handlerImgList);
236
+    let handlerOrder$ = handlerOrder();
237
+    let requestList = [handlerOrder$];
238
+    dataInfo.handlerImgList.forEach(v => {
239
+      let handlerOrderImg$ = handlerOrderImg(v);
240
+      requestList.push(handlerOrderImg$);
241
+    })
242
+    
243
+    Promise.all(requestList).then(resList => {
244
+      uni.hideLoading();
245
+      console.log(resList);
246
+      if(resList[0].state == 200){
247
+        uni.showToast({
248
+        	icon: 'none',
249
+          title: '处理成功',
250
+          mask: true,
251
+        });
252
+        setTimeout(() => {
253
+          uni.reLaunch({
254
+            url: '/pages/incidentList/incidentList',
255
+          })
256
+        }, 1500)
257
+      }else{
258
+        uni.showToast({
259
+          icon: 'none',
260
+          title: resList[0].msg || '请求数据失败!'
261
+        });
262
+      }
263
+    })
264
+  }
265
+  
266
+  // 上传处理图片失败
267
+  function handlerImgFail(e){
268
+    dataInfo.handlerImgList.forEach(v => {
269
+      v.url = v.path;
270
+    })
271
+    console.log(dataInfo.handlerImgList);
272
+  }
273
+  
274
+  // 选择上传图片
275
+  function handlerImgSelect(e){
276
+    dataInfo.handlerImgList = dataInfo.handlerImgList.concat(e.tempFiles);
277
+    console.log(dataInfo.handlerImgList);
278
+  }
279
+  
280
+  // 删除上传图片
281
+  function handlerImgDelete(e){
282
+    dataInfo.handlerImgList = dataInfo.handlerImgList.filter(v => e.tempFile.uuid != v.uuid);
283
+    console.log(dataInfo.handlerImgList);
284
+  }
285
+  
286
+  // 获取事件详情
287
+  function getIncidentDetail(){
288
+		if(uni.getStorageSync('repairData')){
289
+			let data = JSON.parse(uni.getStorageSync('repairData'))
290
+			if(data){
291
+				dataInfo.deferralRemark = data.deferralRemark
292
+				dataInfo.property = data.property
293
+				dataInfo.handlerImgList = data.handlerImgList
294
+				dataInfo.recBlob = data.recBlob
295
+			}
296
+		}
297
+  }
298
+  
299
+  // 下一步
300
+  function submit(){
301
+		isSubmit.value = true;
302
+		if(dataInfo.deferralRemark==''){
303
+		  uni.showToast({
304
+		  	icon: 'none',
305
+		    title: '请选择输入故障描述'
306
+		  });
307
+		  return;
308
+		}
309
+		uni.setStorageSync('repairData',JSON.stringify(dataInfo))
310
+		uni.navigateTo({
311
+		  url: `/pages/repair/rapidRepNext`,
312
+		});
313
+  }
314
+  
315
+  // 处理提交事件
316
+  function handlerOrder(){
317
+		dataInfo.incidentData.returnBackupMachine = dataInfo.returnBackupMachine
318
+    let postData = {
319
+      incident: dataInfo.incidentData,
320
+			solutionId:solutionId.value
321
+    }
322
+    postData.incident.handleDescription = dataInfo.handleDescription;
323
+    postData.incident.handleCategory = {id: dataInfo.handleCategory};
324
+    postData.incident.closecode = {id: dataInfo.closecode};
325
+    postData.incident.category = dataInfo.category;
326
+    postData.incident.synergetic = dataInfo.synergetic;
327
+    
328
+    return api_incidentTask(dataInfo.tabActiveValue, postData);
329
+  }
330
+  
331
+  // 处理图片
332
+  function handlerOrderImg(imgObj){
333
+    return uploadFile(imgObj, 'incident', dataInfo.incidentId)
334
+  }
335
+	
336
+  onLoad((option) => {
337
+		// let storeData = handlerStore.handler.data
338
+		// if(storeData && storeData.type=='rep'){
339
+		// 	solutionId.value = storeData.solutionId
340
+		// 	dataInfo.isSummaryNext = storeData.isSummaryNext
341
+		// 	dataInfo.incidentId = storeData.incidentId;
342
+		// }else{
343
+		// 	dataInfo.incidentId = option.incidentId;
344
+		// 	dataInfo.isSummaryNext = option.isSummaryNext == 1;
345
+		// }
346
+		let data = JSON.parse(uni.getStorageSync('sysData'))
347
+		cmdbRepair.value = data.find(i=>i.keyconfig=='cmdbRepair')
348
+    getIncidentDetail();
349
+  })
350
+</script>
351
+
352
+<style lang="scss" scoped>
353
+.handler{
354
+  height: 100%;
355
+  display: flex;
356
+  flex-direction: column;
357
+  justify-content: space-between;
358
+	padding: 0 30rpx;
359
+  .head{
360
+    height: 88rpx;
361
+    display: flex;
362
+    position: fixed;
363
+    z-index: 99;
364
+    width: 100%;
365
+    background-color: #fff;
366
+    font-size: 30rpx;
367
+    .tab{
368
+      flex: 1;
369
+      display: flex;
370
+      justify-content: center;
371
+      align-items: center;
372
+      border-bottom: 4rpx solid transparent;
373
+      &.active{
374
+        color: $uni-primary;
375
+        border-color: $uni-primary;
376
+      }
377
+    }
378
+  }
379
+  .body{
380
+    box-sizing: border-box;
381
+    flex: 1;
382
+    min-height: 0;
383
+    &.bg{
384
+      background-color: #F7F7F7;
385
+    }
386
+    .summaryItem{
387
+      &:first-of-type{
388
+        .summaryItem_head{
389
+          border-bottom: 1rpx solid #DDDDDD;
390
+        }
391
+      }
392
+      .summary_total{
393
+        padding: 20rpx 0;
394
+        display: flex;
395
+        justify-content: center;
396
+        align-items: center;
397
+      }
398
+      .summaryItem_head{
399
+        padding: 24rpx;
400
+        font-size: 26rpx;
401
+        color: #3A3A3A;
402
+      }
403
+      .summaryItem_body{
404
+        font-size: 30rpx;
405
+        background-color: #fff;
406
+        .summaryItem_bodyItem{
407
+          padding: 24rpx;
408
+          border-bottom: 1rpx solid #DDDDDD;
409
+          .summaryItem_bodyItem_top{
410
+            display: flex;
411
+            justify-content: space-between;
412
+            align-items: center;
413
+            .value{
414
+              padding-left: 48rpx;
415
+              flex-shrink: 0;
416
+            }
417
+          }
418
+          .summaryItem_bodyItem_bottom{
419
+            margin-top: 24rpx;
420
+            display: flex;
421
+            justify-content: space-between;
422
+            align-items: center;
423
+            .name{
424
+              text-align: right;
425
+              flex: 1;
426
+            }
427
+            .value{
428
+              width: 240rpx;
429
+              text-align: right;
430
+              padding-left: 48rpx;
431
+              flex-shrink: 0;
432
+            }
433
+          }
434
+        }
435
+      }
436
+      .summaryItem_foot{
437
+        font-size: 30rpx;
438
+        background-color: #fff;
439
+        &.total{
440
+          margin-top: 24rpx;
441
+        }
442
+        .summaryItem_foot_total{
443
+          padding: 24rpx 0;
444
+          display: flex;
445
+          justify-content: center;
446
+          align-items: center;
447
+        }
448
+        .summaryItem_foot_add{
449
+          border-top: 1rpx solid #DDDDDD;
450
+          padding: 24rpx 0;
451
+          display: flex;
452
+          justify-content: center;
453
+          align-items: center;
454
+          .newicon-icon-test{
455
+            font-size: 30rpx;
456
+            font-weight: bold;
457
+          }
458
+        }
459
+      }
460
+    }
461
+    .form_item_column{
462
+      padding-top: 24rpx;
463
+      min-height: 86rpx;
464
+      .form_item{
465
+        padding-top: 0;
466
+        min-height: auto;
467
+      }
468
+    }
469
+		.candidate{
470
+			display: flex;
471
+			flex-wrap: wrap;
472
+			.candidate-item{
473
+				padding: 6rpx 15rpx;
474
+				font-size: 26rpx;
475
+				color: #949494;
476
+				background: #E9E9E9;
477
+				border-radius: 50rpx;
478
+				margin-right: 20rpx;
479
+				margin-top: 15rpx;
480
+			}
481
+		}
482
+    .form_item{
483
+      display: flex;
484
+      align-items: center;
485
+      padding-top: 24rpx;
486
+      min-height: 86rpx;
487
+			position: relative;
488
+			.chunk{
489
+				width: 100%;
490
+				height: 70rpx;
491
+				line-height: 70rpx;
492
+				text-align: center;
493
+				background: #F7F8FA;
494
+				box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
495
+				border-radius: 10rpx;
496
+			}
497
+      &.column{
498
+        height: auto;
499
+        flex-direction: column;
500
+        align-items: flex-start;
501
+				.import-rep{
502
+					padding: 5rpx 10rpx;
503
+					border-radius: 50rpx;
504
+					background: #d1fcd5;
505
+					color: #49b856;
506
+					font-size: 24rpx;
507
+				}
508
+        .title{
509
+          margin-right: 0;
510
+        }
511
+				.title-width{
512
+					width: 100%;
513
+				}
514
+				.title-fl-sb{
515
+					display: flex;
516
+					justify-content: space-between;
517
+					width: 100%;
518
+				}
519
+        .value{
520
+          margin-top: 10rpx;
521
+          // padding-left: 20rpx;
522
+          box-sizing: border-box;
523
+        }
524
+        .tips{
525
+          padding: 24rpx;
526
+          text-align: center;
527
+          font-size: 22rpx;
528
+          color: #909399;
529
+          width: 100%;
530
+          box-sizing: border-box;
531
+        }
532
+      }
533
+      .title{
534
+        font-size: 26rpx;
535
+        display: flex;
536
+        align-items: center;
537
+        margin-right: 12rpx;
538
+        flex-shrink: 0;
539
+        &.select{
540
+          width: calc(5em + 20rpx);
541
+        }
542
+      }
543
+      .value{
544
+        width: 100%;
545
+        &.category{
546
+          width: 100%;
547
+          display: flex;
548
+          justify-content: space-between;
549
+          align-items: center;
550
+          .categoryName{
551
+            font-size: 26rpx;
552
+            color: #555;
553
+            flex: 1;
554
+          }
555
+          .newicon-weibiaoti2010104{
556
+            color: $uni-primary;
557
+            margin-left: 24rpx;
558
+          }
559
+        }
560
+        .imgTips{
561
+          color: #909399;
562
+          font-size: 22rpx;
563
+					margin-top: 10rpx;
564
+        }
565
+      }
566
+			.item-input{
567
+				border: 1px solid #DBDBDB;
568
+				height: 70rpx;
569
+				line-height: 70rpx;
570
+				padding: 0 10rpx;
571
+				border-radius: 4rpx;
572
+				width: 100%;
573
+				font-size: 14px;
574
+			}
575
+			.icon{
576
+				position: absolute;
577
+				right: 20rpx;
578
+				color: #49b856;
579
+			}
580
+      .synergeticNames{
581
+        font-size: 26rpx;
582
+        margin-right: 24rpx;
583
+      }
584
+      .synergeticAdd{
585
+        flex-shrink: 0;
586
+      }
587
+    }
588
+  }
589
+}
590
+</style>

+ 713 - 0
pages/repair/rapidRepNext.vue

@@ -0,0 +1,713 @@
1
+<template>
2
+  <view class="handler">
3
+    <view class="head">
4
+      <view class="tab" :class="{active: tab.value === dataInfo.tabActiveValue}" v-for="tab in dataInfo.tabs" :key="tab.id" @click="clickTab(tab.value)">
5
+        {{tab.name}}<text v-if="tab.num !== ''">({{tab.num}})</text>
6
+      </view>
7
+    </view>
8
+		<view class="body view-body" :class="{ page_padding: !(dataInfo.tabActiveValue === 'doing' && isInSummaryOrder), bg: (dataInfo.tabActiveValue === 'doing' && isInSummaryOrder) }">
9
+      <!-- 科内报修 -->
10
+      <template v-if="dataInfo.tabActiveValue === 'doing'">
11
+        <view class="form_item">
12
+          <view class="title select"><text class="required newicon newicon-bitian"></text>报修科室:</view>
13
+        	<uni-data-picker class="value" placeholder="请选择报修科室"
14
+        		v-model="dataInfo.dept" :localdata="dataInfo.repairTypeList"
15
+        		:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.dept}">
16
+        	</uni-data-picker>
17
+        </view>
18
+				<view class="candidate">
19
+					<view class="candidate-item" v-for="item in candidateData" :key="item" @click="itemCandidate(item)">{{item.name}}</view>
20
+				</view>
21
+				
22
+				<view class="form_item column">
23
+					<view class="title"><text class="required newicon newicon-bitian"></text>详细地址:</view>
24
+					<uni-easyinput class="value" type="textarea" v-model="dataInfo.addres" placeholder="请输入详细地址"  :class="{formRed: isSubmit && !dataInfo.addres }" />
25
+				</view>
26
+				<view class="candidate">
27
+					<view class="candidate-item" v-for="item in addresData" :key="item" @click="itemAddres(item)">{{item.name}}</view>
28
+				</view>
29
+				
30
+				<view class="form_item" :class="{formRed: isSubmit && !dataInfo.name}">
31
+					<view class="title select"><text class="required newicon newicon-bitian"></text>联系人:</view>
32
+					<input class="item-input" placeholder="请输入联系人" v-model="dataInfo.name" />
33
+				</view>
34
+				
35
+				<view class="form_item" :class="{formRed: isSubmit && !dataInfo.phone}">
36
+					<view class="title select"><text class="required newicon newicon-bitian"></text>联系电话:</view>
37
+					<input class="item-input" placeholder="请输入联系电话" v-model="dataInfo.phone"/>
38
+				</view>
39
+      </template>
40
+      
41
+      <!-- 公告报修 -->
42
+      <template v-if="dataInfo.tabActiveValue === 'overtime'">
43
+       <view class="form_item">
44
+         <view class="title select"><text class="required newicon newicon-bitian"></text>楼层楼栋:</view>
45
+       	<uni-data-picker class="value" placeholder="请选择楼层楼栋"
46
+       		v-model="dataInfo.building" :localdata="dataInfo.buildingTypeList"
47
+       		:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.building}">
48
+       	</uni-data-picker>
49
+       </view>
50
+       
51
+       <view class="form_item column">
52
+       	<view class="title"><text class="required newicon newicon-bitian"></text>详细地址:</view>
53
+       	<uni-easyinput class="value" type="textarea" v-model="dataInfo.addres" placeholder="请输入详细地址" :class="{formRed: isSubmit && !dataInfo.addres}" />
54
+       </view>
55
+       
56
+       <view class="form_item" :class="{formRed: isSubmit && !dataInfo.name}">
57
+       	<view class="title select"><text class="required newicon newicon-bitian"></text>联系人:</view>
58
+       	<input class="item-input value" focus placeholder="请输入联系人" v-model="dataInfo.name"/>
59
+       </view>
60
+       
61
+       <view class="form_item" :class="{formRed: isSubmit && !dataInfo.phone}">
62
+       	<view class="title select"><text class="required newicon newicon-bitian"></text>联系电话:</view>
63
+       	<input class="item-input value" focus placeholder="请输入联系电话" v-model="dataInfo.phone"/>
64
+       </view>
65
+      </template>
66
+		</view>
67
+    <view class="foot_common_btns">
68
+      <button @click="goBackOrToList" type="default" class="primaryButton btn">上一步</button>
69
+      <button @click="submit" type="default" class="primaryButton btn">提交</button>
70
+    </view>
71
+    <NumberModal v-if="dataInfo.isNumber" @cancelEmit="cancelNumber" @confirmEmit="conformNumber" @removeEmit="removeNumber" :selectData="dataInfo.selectData" :selectType="dataInfo.selectType" :evtNumber="dataInfo.evtNumber" showRemove></NumberModal>
72
+  </view>
73
+</template>
74
+
75
+<script setup>
76
+  import { ref, reactive, computed } from 'vue'
77
+  import NumberModal from '@/components/NumberModal.vue';
78
+  import { onLoad } from '@dcloudio/uni-app'
79
+  import { generateNumberArray } from '@/utils/index.js'
80
+  import { api_group, api_incidentDetail, api_getSolution, api_area, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_department, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
81
+  import { defaultColor } from '@/static/js/theme.js'
82
+  import { useSetTitle } from '@/share/useSetTitle.js'
83
+  import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
84
+  import { useUploadFile } from '@/share/useUploadFile.js'
85
+  import { useGoBack } from '@/share/useGoBack.js'
86
+  import { useLoginUserStore } from '@/stores/loginUser'
87
+  import { useHandlerStore } from '@/stores/handler'
88
+  
89
+  useSetTitle();
90
+  const loginUserStore = useLoginUserStore();
91
+  const handlerStore = useHandlerStore();
92
+  const { makePhoneCall }  = useMakePhoneCall();
93
+  const { uploadFile }  = useUploadFile();
94
+  const { goBack }  = useGoBack();
95
+  
96
+  // 主题颜色
97
+  const primaryColor = ref(defaultColor)
98
+  
99
+	// 备用机选项
100
+	const machineData = ref([
101
+		{
102
+			text:'是',
103
+			value:1
104
+		},
105
+		{
106
+			text:'否',
107
+			value:0
108
+		},
109
+	])
110
+	
111
+	const candidateData = ref([
112
+		{name:'马桶肃杀'},
113
+		{name:'马桶肃杀'},
114
+		{name:'马桶肃杀'},
115
+		{name:'马桶肃杀'},
116
+		{name:'马桶肃杀'},
117
+		{name:'马桶肃杀'},
118
+		{name:'马桶肃杀'},
119
+		{name:'马桶肃杀'},
120
+		{name:'马桶肃杀'},
121
+	])
122
+	
123
+	const addresData = ref([
124
+		{name:'护士站'},
125
+		{name:'卫生间'},
126
+		{name:'更衣室'},
127
+		{name:'治疗室'}
128
+	])
129
+	
130
+  // 数据
131
+  const dataInfo = reactive({
132
+    tabs: [
133
+      {id: 5, name: '科内报修', value: 'doing', num: ''},
134
+      {id: 6, name: '公共报修', value: 'overtime', num: ''},
135
+    ],
136
+    tabActiveValue: 'doing',//当前选择的tab
137
+    incidentId: undefined,//事件ID
138
+    incidentData: {},//事件对象
139
+		repairTypeList:[],//科室数据
140
+		buildingTypeList:[],//楼栋数据
141
+    dept:'',//报修科室
142
+		addres:'',//详细地址
143
+		name:'',//联系人
144
+		phone:'',//手机
145
+		building:''//楼栋
146
+  })
147
+  
148
+	// 故障处理用是否提供备用机
149
+	const newProvideBackupMachine = ref(0)
150
+	
151
+	// 知识库id
152
+	const solutionId = ref(null)
153
+	
154
+  // 是否提交
155
+  const isSubmit = ref(false)
156
+  
157
+  // 处理图片
158
+  const handlerImgRef = ref(null)
159
+  
160
+  // 是否进入汇总单
161
+  const isInSummaryOrder = computed(() => {
162
+    return dataInfo.tabActiveValue === 'doing' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && (dataInfo.incidentData.handlingPersonnelUser.id == loginUserStore.loginUser.user.id);
163
+  })
164
+  
165
+  // 上一步或者返回列表
166
+  function goBackOrToList(){
167
+		uni.setStorageSync('rapidRepNext',JSON.stringify(dataInfo))
168
+    goBack();
169
+  }
170
+  
171
+  // 重置
172
+  function reset(){
173
+		dataInfo.dept = '',//报修科室
174
+		dataInfo.addres = '',//详细地址
175
+		dataInfo.name = '',//联系人
176
+		dataInfo.phone = ''//手机
177
+		dataInfo.building = ''//楼栋
178
+  }
179
+  
180
+  // 初始化表单
181
+  function initForm(){
182
+    if(dataInfo.tabActiveValue === 'doing'){
183
+      getRepairTypes()
184
+    }else if(dataInfo.tabActiveValue === 'overtime'){
185
+			getbuildingList()
186
+    }
187
+  }
188
+  
189
+	function itemCandidate(item){
190
+		dataInfo.dept = item.id
191
+	}
192
+	
193
+	function itemAddres(item){
194
+		dataInfo.addres = item.name
195
+	}
196
+	
197
+  // 点击tab
198
+  function clickTab(tabValue){
199
+    if(dataInfo.tabActiveValue == tabValue){
200
+      return;
201
+    }
202
+    dataInfo.tabActiveValue = tabValue;
203
+    isSubmit.value = false;
204
+    reset();
205
+    dataInfo.category = dataInfo.incidentData.category || {};
206
+    dataInfo.synergetic = dataInfo.incidentData.synergetic || [];
207
+		newProvideBackupMachine.value = dataInfo.incidentData.provideBackupMachine
208
+    initForm();
209
+  }
210
+  
211
+  // 获取事件详情
212
+  function getIncidentDetail(){
213
+    if(uni.getStorageSync('rapidRepNext')){
214
+    	let data = JSON.parse(uni.getStorageSync('rapidRepNext'))
215
+    	if(data){
216
+    		dataInfo.dept = data.dept//报修科室
217
+    		dataInfo.addres = data.addres//详细地址
218
+    		dataInfo.name = data.name//联系人
219
+    		dataInfo.phone = data.phone//手机
220
+    		dataInfo.building = data.building//楼栋
221
+    	}
222
+    }
223
+  }
224
+  
225
+  // 获取报修科室列表
226
+  function getRepairTypes(){
227
+    uni.showLoading({
228
+      title: "加载中",
229
+      mask: true,
230
+    });
231
+    let postData = {
232
+			department: {
233
+			  branch: dataInfo.incidentData.branch,
234
+			},
235
+			idx:0,
236
+			sum:9999
237
+		}
238
+		if(loginUserStore.loginUser.user.duty){
239
+		  postData.department.branch = loginUserStore.loginUser.user.duty.id;
240
+		}else if(loginUserStore.loginUser.user.branch){
241
+		  postData.department.branch = loginUserStore.loginUser.user.branch.id;
242
+		}
243
+    api_department(postData).then(res => {
244
+      uni.hideLoading();
245
+      res = res.list || [];
246
+      dataInfo.repairTypeList = res.map(v => ({
247
+        text: v.dept,
248
+        value: v.id,
249
+      }));
250
+    })
251
+  }
252
+  
253
+  // 获取楼栋
254
+  function getbuildingList(){
255
+    uni.showLoading({
256
+      title: "加载中",
257
+      mask: true,
258
+    });
259
+    let postData = {
260
+      idx: 0,
261
+      sum: 9999,
262
+      area: {
263
+        branch: '',
264
+      }
265
+    };
266
+		if(loginUserStore.loginUser.user.duty){
267
+		  postData.area.branch = loginUserStore.loginUser.user.duty.id;
268
+		}else if(loginUserStore.loginUser.user.branch){
269
+		  postData.area.branch = loginUserStore.loginUser.user.branch.id;
270
+		}
271
+    api_area(postData).then(res => {
272
+      uni.hideLoading();
273
+      res = res.list || [];
274
+      dataInfo.buildingTypeList = res.map(v => ({
275
+        text: v.area,
276
+        value: v.id
277
+      }));
278
+    })
279
+  }
280
+  
281
+  // 提交
282
+  function submit(){
283
+		isSubmit.value = true;
284
+    submitHandler()
285
+  }
286
+  
287
+  // 处理提交事件
288
+  function handlerOrder(){
289
+		dataInfo.incidentData.returnBackupMachine = dataInfo.returnBackupMachine
290
+    let postData = {
291
+      incident: dataInfo.incidentData,
292
+			solutionId:solutionId.value
293
+    }
294
+    postData.incident.handleDescription = dataInfo.handleDescription;
295
+    postData.incident.handleCategory = {id: dataInfo.handleCategory};
296
+    postData.incident.closecode = {id: dataInfo.closecode};
297
+    postData.incident.category = dataInfo.category;
298
+    postData.incident.synergetic = dataInfo.synergetic;
299
+    
300
+    return api_incidentTask(dataInfo.tabActiveValue, postData);
301
+  }
302
+  
303
+  // 处理图片
304
+  function handlerOrderImg(imgObj){
305
+    return uploadFile(imgObj, 'incident', dataInfo.incidentId)
306
+  }
307
+  
308
+  // 处理提交
309
+  function submitHandler(){
310
+    console.log(dataInfo);
311
+		if(dataInfo.tabActiveValue=='doing'){
312
+			if(dataInfo.dept==''){
313
+			  uni.showToast({
314
+			  	icon: 'none',
315
+			    title: '请选择报修科室'
316
+			  });
317
+			  return;
318
+			}
319
+		}else{
320
+			if(dataInfo.building==''){
321
+			  uni.showToast({
322
+			  	icon: 'none',
323
+			    title: '请选择楼层楼栋'
324
+			  });
325
+			  return;
326
+			}
327
+		}
328
+
329
+    if(dataInfo.addres==''){
330
+      uni.showToast({
331
+      	icon: 'none',
332
+        title: '请输入详细地址'
333
+      });
334
+      return;
335
+    }
336
+    
337
+    if(dataInfo.name==''){
338
+      uni.showToast({
339
+      	icon: 'none',
340
+        title: '请输入联系人'
341
+      });
342
+      return;
343
+    }
344
+    
345
+    if(dataInfo.phone==''){
346
+      uni.showToast({
347
+      	icon: 'none',
348
+        title: '请输入联系电话'
349
+      });
350
+      return;
351
+    }
352
+    console.log(dataInfo.handlerImgList)
353
+    uni.showLoading({
354
+      title: "加载中",
355
+      mask: true,
356
+    });
357
+    
358
+		// 没有图片
359
+		let handlerOrder$ = handlerOrder();
360
+		let requestList = [handlerOrder$];
361
+		Promise.all(requestList).then(resList => {
362
+			uni.hideLoading();
363
+			console.log(resList);
364
+			if(resList[0].state == 200){
365
+				uni.showToast({
366
+					icon: 'none',
367
+					title: '处理成功',
368
+					mask: true,
369
+				});
370
+				setTimeout(() => {
371
+					uni.reLaunch({
372
+						url: '/pages/incidentList/incidentList',
373
+					})
374
+				}, 1500)
375
+			}else{
376
+				uni.showToast({
377
+					icon: 'none',
378
+					title: resList[0].msg || '请求数据失败!'
379
+				});
380
+			}
381
+		})
382
+    uni.setStorageSync('rapidRepNext','')
383
+  }
384
+  
385
+  // 延期处理提交
386
+  function submitOvertime(){
387
+    if(!dataInfo.repairTypeId){
388
+      uni.showToast({
389
+      	icon: 'none',
390
+        title: '请选择延期原因'
391
+      });
392
+      return;
393
+    }
394
+    
395
+    if(!dataInfo.deferralRemark.trim()){
396
+      uni.showToast({
397
+      	icon: 'none',
398
+        title: '请填写延期说明'
399
+      });
400
+      return;
401
+    }
402
+    
403
+    if(!dataInfo.deferralDayId){
404
+      uni.showToast({
405
+      	icon: 'none',
406
+        title: '请选择延期天数'
407
+      });
408
+      return;
409
+    }
410
+    
411
+    uni.showLoading({
412
+      title: "加载中",
413
+      mask: true,
414
+    });
415
+    dataInfo.incidentData.provideBackupMachine = dataInfo.provideBackupMachine
416
+    let postData = {
417
+      incident: dataInfo.incidentData,
418
+    }
419
+    
420
+    postData.incident.currentLog = {
421
+      remark: dataInfo.deferralRemark,
422
+      extra1: dataInfo.repairTypeId,
423
+      extra2: dataInfo.deferralDayId,
424
+    }
425
+    
426
+    api_incidentTask(dataInfo.tabActiveValue, postData).then(res => {
427
+      uni.hideLoading();
428
+      if(res.state == 200){
429
+        uni.showToast({
430
+        	icon: 'none',
431
+          title: '延期处理成功',
432
+          mask: true,
433
+        });
434
+        setTimeout(() => {
435
+          uni.reLaunch({
436
+            url: '/pages/incidentList/incidentList',
437
+          })
438
+        }, 1500)
439
+      }else{
440
+        uni.showToast({
441
+          icon: 'none',
442
+          title: res.msg || '请求数据失败!'
443
+        });
444
+      }
445
+    })
446
+  }
447
+  
448
+	// 获取知识库数量
449
+	function getIntroduceCount(categoryId){
450
+	  uni.showLoading({
451
+	    title: "加载中",
452
+	    mask: true,
453
+	  });
454
+	  let postData = {
455
+	    idx: 0,
456
+	    sum: 9999,
457
+	    solution: {
458
+				category:{
459
+					id:categoryId,
460
+				},
461
+				status:{id:72},
462
+	    }
463
+	  }
464
+	  
465
+	  api_getSolution(postData).then(res => {
466
+	    uni.hideLoading();
467
+	    if(res.status == 200){
468
+				dataInfo.introduceCount = res.totalNum
469
+	    }else{
470
+	      uni.showToast({
471
+	        icon: 'none',
472
+	        title: res.msg || '请求数据失败!'
473
+	      });
474
+	    }
475
+	  })
476
+	}
477
+	
478
+	// 获取文本内容
479
+	function getHtml(html) {
480
+	  const tempDiv = document.createElement('div');
481
+	  tempDiv.innerHTML = html;
482
+	  return tempDiv.textContent || tempDiv.innerText || '';
483
+	}
484
+	
485
+  onLoad((option) => {
486
+		initForm()
487
+    getIncidentDetail();
488
+  })
489
+</script>
490
+
491
+<style lang="scss" scoped>
492
+.handler{
493
+  height: 100%;
494
+  display: flex;
495
+  flex-direction: column;
496
+  justify-content: space-between;
497
+  .head{
498
+    height: 88rpx;
499
+    display: flex;
500
+    position: fixed;
501
+    z-index: 99;
502
+    width: 100%;
503
+    background-color: #fff;
504
+    font-size: 30rpx;
505
+    .tab{
506
+      flex: 1;
507
+      display: flex;
508
+      justify-content: center;
509
+      align-items: center;
510
+      border-bottom: 4rpx solid transparent;
511
+      &.active{
512
+        color: $uni-primary;
513
+        border-color: $uni-primary;
514
+      }
515
+    }
516
+  }
517
+  .body{
518
+    margin-top: 88rpx;
519
+    box-sizing: border-box;
520
+    flex: 1;
521
+    min-height: 0;
522
+    &.bg{
523
+      background-color: #F7F7F7;
524
+    }
525
+    .summaryItem{
526
+      &:first-of-type{
527
+        .summaryItem_head{
528
+          border-bottom: 1rpx solid #DDDDDD;
529
+        }
530
+      }
531
+      .summary_total{
532
+        padding: 20rpx 0;
533
+        display: flex;
534
+        justify-content: center;
535
+        align-items: center;
536
+      }
537
+      .summaryItem_head{
538
+        padding: 24rpx;
539
+        font-size: 26rpx;
540
+        color: #3A3A3A;
541
+      }
542
+      .summaryItem_body{
543
+        font-size: 30rpx;
544
+        background-color: #fff;
545
+        .summaryItem_bodyItem{
546
+          padding: 24rpx;
547
+          border-bottom: 1rpx solid #DDDDDD;
548
+          .summaryItem_bodyItem_top{
549
+            display: flex;
550
+            justify-content: space-between;
551
+            align-items: center;
552
+            .value{
553
+              padding-left: 48rpx;
554
+              flex-shrink: 0;
555
+            }
556
+          }
557
+          .summaryItem_bodyItem_bottom{
558
+            margin-top: 24rpx;
559
+            display: flex;
560
+            justify-content: space-between;
561
+            align-items: center;
562
+            .name{
563
+              text-align: right;
564
+              flex: 1;
565
+            }
566
+            .value{
567
+              width: 240rpx;
568
+              text-align: right;
569
+              padding-left: 48rpx;
570
+              flex-shrink: 0;
571
+            }
572
+          }
573
+        }
574
+      }
575
+      .summaryItem_foot{
576
+        font-size: 30rpx;
577
+        background-color: #fff;
578
+        &.total{
579
+          margin-top: 24rpx;
580
+        }
581
+        .summaryItem_foot_total{
582
+          padding: 24rpx 0;
583
+          display: flex;
584
+          justify-content: center;
585
+          align-items: center;
586
+        }
587
+        .summaryItem_foot_add{
588
+          border-top: 1rpx solid #DDDDDD;
589
+          padding: 24rpx 0;
590
+          display: flex;
591
+          justify-content: center;
592
+          align-items: center;
593
+          .newicon-icon-test{
594
+            font-size: 30rpx;
595
+            font-weight: bold;
596
+          }
597
+        }
598
+      }
599
+    }
600
+    .form_item_column{
601
+      padding-top: 24rpx;
602
+      min-height: 86rpx;
603
+      .form_item{
604
+        padding-top: 0;
605
+        min-height: auto;
606
+      }
607
+    }
608
+		.candidate{
609
+			display: flex;
610
+			flex-wrap: wrap;
611
+			.candidate-item{
612
+				padding: 6rpx 15rpx;
613
+				font-size: 26rpx;
614
+				color: #949494;
615
+				background: #E9E9E9;
616
+				border-radius: 50rpx;
617
+				margin-right: 20rpx;
618
+				margin-top: 15rpx;
619
+			}
620
+		}
621
+    .form_item{
622
+      display: flex;
623
+      align-items: center;
624
+      padding-top: 24rpx;
625
+      min-height: 86rpx;
626
+      &.column{
627
+        height: auto;
628
+        flex-direction: column;
629
+        align-items: flex-start;
630
+				.import-rep{
631
+					padding: 5rpx 10rpx;
632
+					border-radius: 50rpx;
633
+					background: #d1fcd5;
634
+					color: #49b856;
635
+					font-size: 24rpx;
636
+				}
637
+        .title{
638
+          margin-right: 0;
639
+        }
640
+				.title-width{
641
+					width: 100%;
642
+				}
643
+				.title-fl-sb{
644
+					display: flex;
645
+					justify-content: space-between;
646
+					width: 100%;
647
+				}
648
+        .value{
649
+          margin-top: 10rpx;
650
+          padding-left: 20rpx;
651
+          box-sizing: border-box;
652
+        }
653
+        .tips{
654
+          padding: 24rpx;
655
+          text-align: center;
656
+          font-size: 22rpx;
657
+          color: #909399;
658
+          width: 100%;
659
+          box-sizing: border-box;
660
+        }
661
+      }
662
+      .title{
663
+        font-size: 26rpx;
664
+        display: flex;
665
+        align-items: center;
666
+        margin-right: 12rpx;
667
+        flex-shrink: 0;
668
+        &.select{
669
+          width: calc(5em + 20rpx);
670
+        }
671
+      }
672
+      .value{
673
+        width: 100%;
674
+        &.category{
675
+          width: 100%;
676
+          display: flex;
677
+          justify-content: space-between;
678
+          align-items: center;
679
+          .categoryName{
680
+            font-size: 26rpx;
681
+            color: #555;
682
+            flex: 1;
683
+          }
684
+          .newicon-weibiaoti2010104{
685
+            color: $uni-primary;
686
+            margin-left: 24rpx;
687
+          }
688
+        }
689
+        .imgTips{
690
+          color: #909399;
691
+          font-size: 22rpx;
692
+        }
693
+      }
694
+			.item-input{
695
+				border: 1px solid #DBDBDB;
696
+				height: 70rpx;
697
+				line-height: 70rpx;
698
+				padding: 0 10rpx;
699
+				border-radius: 4rpx;
700
+				width: 100%;
701
+				font-size: 14px;
702
+			}
703
+      .synergeticNames{
704
+        font-size: 26rpx;
705
+        margin-right: 24rpx;
706
+      }
707
+      .synergeticAdd{
708
+        flex-shrink: 0;
709
+      }
710
+    }
711
+  }
712
+}
713
+</style>

+ 516 - 0
pages/repair/repairsList.vue

@@ -0,0 +1,516 @@
1
+<template>
2
+  <view class="incidentList">
3
+    <view class="head">
4
+      <view class="tab" :class="{active: tab.id === dataInfo.tabActiveId}" v-for="tab in dataInfo.tabs" :key="tab.id" @click="clickTab(tab.id)">
5
+        {{tab.name}}<text v-if="tab.num !== ''">({{tab.num}})</text>
6
+      </view>
7
+      <view class="filter" @click="filterClick">
8
+        <text class="newicon newicon-shaixuan"></text>
9
+      </view>
10
+    </view>
11
+    <view class="body" v-if="dataInfo.list.length">
12
+      <view class="body_item" v-for="data in dataInfo.list" :key="data.id" @click="toIncidentDetail(data)">
13
+        <view class="body_item_head ellipsis-multiline">
14
+          {{data.description}}
15
+        </view>
16
+
17
+        <view class="body_item_content">
18
+					<view class="body_item_content_p" v-if="data.place || data.houseNumber">
19
+					  <text class="name ellipsis">详细地址:{{data.place ? data.place.area.area : ''}}{{data.place ? data.place.place : ''}}{{data.houseNumber}}</text>
20
+					</view>
21
+          <view class="body_item_content_p" v-if="data.department">
22
+            <text class="name ellipsis">维修总价:{{data.department.dept}}</text>
23
+            <view class="status" :style="stateStyle(data.state)">{{data.state ? data.state.name : ''}}</view>
24
+          </view>
25
+          <view class="body_item_content_p">
26
+						 <view class="name ellipsis" @click.stop="makePhoneCall(data.contactsInformation)">维修人员电话:{{data.contactsInformation || '暂无'}}<uni-icons v-if="data.contactsInformation" type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons></view>
27
+          </view>
28
+					<view class="body_item_content_p" v-if="data.department">
29
+					  <text class="name ellipsis">维修说明:{{data.department.dept}}</text>
30
+					</view>
31
+        </view>
32
+
33
+        <view class="body_item_foot">
34
+          <view class="foot_info">
35
+            <view class="name">维修人员:{{data.assigneeName || '暂无'}}</view>
36
+            <text class="date">{{formatDate(data.acceptDate, 'yyyy-MM-dd HH:mm')}}</text>
37
+          </view>
38
+          <view class="btns">
39
+            <button @click.stop="handler('changeUser', data.id)" type="default" class="primaryButton btn">评价</button>
40
+            <!-- <button @click.stop="handler('handler', data.id)" type="default" class="primaryButton btn" v-if="data.state.value === 'handler' && data.handlingPersonnelUser && data.handlingPersonnelUser.id == loginUserStore.loginUser.user.id">处理</button> -->
41
+            <!-- <button @click.stop="receive(data)" type="default" class="primaryButton btn" v-if="computedReceive(data)">接单</button> -->
42
+          </view>
43
+        </view>
44
+				<div class="sign-style" v-if="deptRepair && publicRepair">科</div>
45
+      </view>
46
+    </view>
47
+    <view class="zanwu" v-else>
48
+      <text class="newicon newicon-zanwu"></text>
49
+    </view>
50
+    <repairsFilter v-if="dataInfo.isFilter" @cancelEmit="cancelFilter" @confirmEmit="conformFilter" :evt="dataInfo.evtFilter"></repairsFilter>
51
+    <IncidentAttachment v-if="dataInfo.isAttachment" @knowEmit="knowAttachment" :incidentData="dataInfo.incidentData"></IncidentAttachment>
52
+  </view>
53
+</template>
54
+
55
+<script setup>
56
+  import repairsFilter from '@/components/repairsFilter.vue';
57
+  import IncidentAttachment from '@/components/IncidentAttachment.vue';
58
+  import { startOfDay, endOfDay, format, add } from 'date-fns'
59
+  import { ref, reactive, computed } from 'vue'
60
+  import { onLoad, onShow, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
61
+  import { api_getDictionary, api_incident, api_incident_count, api_incidentTask } from "@/http/api.js"
62
+  import { filterFormatDate } from '@/filters/filterFormatDate.js'
63
+  import { computedPriorityStyle } from '@/filters/computedPriorityStyle.js'
64
+  import { computedStateStyle } from '@/filters/computedStateStyle.js'
65
+  import { computedCurrentLogOverTime } from '@/filters/computedCurrentLogOverTime.js'
66
+  import { defaultColor } from '@/static/js/theme.js'
67
+  import { useSetTitle } from '@/share/useSetTitle.js'
68
+  import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
69
+  import { useLoginUserStore } from '@/stores/loginUser'
70
+  import { useIncidentNumStore } from '@/stores/incidentNum'
71
+  import { useIncidentListSearchStore } from '@/stores/incidentListSearch'
72
+
73
+  useSetTitle();
74
+  const loginUserStore = useLoginUserStore();
75
+  const incidentNumStore = useIncidentNumStore();
76
+  const incidentListSearchStore = useIncidentListSearchStore();
77
+  const { formatDate }  = filterFormatDate();
78
+  const { priorityStyle }  = computedPriorityStyle();
79
+  const { stateStyle }  = computedStateStyle();
80
+  const { currentLogOverTime }  = computedCurrentLogOverTime();
81
+  const { makePhoneCall }  = useMakePhoneCall();
82
+
83
+  // 主题颜色
84
+  const primaryColor = ref(defaultColor)
85
+
86
+  const assignFlag = ref(false);//指派权限
87
+  const qiangdan = ref(false);//接单权限
88
+	const deptRepair = ref({});//科内报修
89
+	const publicRepair = ref({});//公共报修
90
+	
91
+  // 判断是否显示接单按钮
92
+  const computedReceive = computed(() => (data) => {
93
+    let inUser = data.currentLog && data.currentLog.workerId == loginUserStore.loginUser.user.id;
94
+    let inGroup = false;
95
+    loginUserStore.loginUser.user.group.forEach(item => {
96
+        if(data.currentLog){
97
+            if (item.id == data.currentLog.groupId) {
98
+                inGroup = true;
99
+            }
100
+        }
101
+    })
102
+    return data.state.value === 'pending' && (inUser || inGroup) && qiangdan.value;
103
+  })
104
+
105
+  // 转换协同人
106
+  const computedSynergetic = computed(() => (synergetic) => {
107
+    return (synergetic && synergetic.length) ? synergetic.map(v => v.name).join(',') : ''
108
+  })
109
+
110
+  // 数据
111
+  const dataInfo = reactive({
112
+    tabs: [{id: 0, name: '我的报修', value: 'all', num: ''},],
113
+    tabActiveId: 0,//当前选择的tab
114
+    list: [],//工单列表
115
+    idx: 0,//页码
116
+    hasMore: true,//是否有更多数据
117
+    isFilter: false,//筛选框开关
118
+    isAttachment: false,//图片和录音开关
119
+    incidentId: undefined,
120
+    evtFilter: {
121
+      hospital: {},
122
+      selected: 'todoingAll',
123
+      area: {id: 0, area: '全部'},
124
+      category: {id: 0, category: '全部'},
125
+      acceptDate: [],
126
+    },//筛选框数据
127
+  })
128
+
129
+  // 工单详情
130
+  function toIncidentDetail(data){
131
+    uni.navigateTo({
132
+      url: `/pages/incidentDetail/incidentDetail?incidentId=${data.id}`
133
+    })
134
+  }
135
+
136
+  // 获取tab选项
137
+  function getTabs(){
138
+    uni.showLoading({
139
+      title: "加载中",
140
+      mask: true,
141
+    });
142
+		let data = JSON.parse(uni.getStorageSync('sysData'))
143
+		deptRepair.value = data.find(i=>i.keyconfig=='deptRepair')
144
+		publicRepair.value = data.find(i=>i.keyconfig=='publicRepair')
145
+		if(deptRepair.value){
146
+			 dataInfo.tabs = [
147
+				 {id: 0, name: '我的报修', value: 'all', num: ''},
148
+				 {id: 1, name: '科内报修', value: '2', num: ''}
149
+			 ]
150
+		}else{
151
+			dataInfo.tabs = [
152
+				{id: 0, name: '我的报修', value: 'all', num: ''},
153
+			]
154
+		}
155
+		getList(0);
156
+  }
157
+
158
+  // 点击tab
159
+  function clickTab(tabId){
160
+		console.log(tabId)
161
+    dataInfo.tabActiveId = tabId;
162
+    getList(0);
163
+  }
164
+
165
+  // 点击筛选
166
+  function filterClick(){
167
+    dataInfo.isFilter = true;
168
+  }
169
+
170
+  // 确认筛选
171
+  function conformFilter(evtFilter){
172
+    dataInfo.evtFilter = evtFilter;
173
+    dataInfo.isFilter = false;
174
+    getList(0);
175
+  }
176
+
177
+  // 关闭筛选
178
+  function cancelFilter(){
179
+    dataInfo.isFilter = false;
180
+  }
181
+
182
+  // 点击图片和录音
183
+  function attachmentClick(incidentData){
184
+    dataInfo.incidentData = incidentData;
185
+    dataInfo.isAttachment = true;
186
+  }
187
+
188
+  // 知道了图片和录音
189
+  function knowAttachment(){
190
+    dataInfo.isAttachment = false;
191
+  }
192
+
193
+  // 处理按钮
194
+  function handler(type, incidentId){
195
+    uni.navigateTo({
196
+      url: `/pages/${type}/${type}?incidentId=${incidentId}`
197
+    })
198
+  }
199
+
200
+  // 接单调用方案
201
+  function receiveFn(incidentData){
202
+    uni.showLoading({
203
+      title: "加载中",
204
+      mask: true,
205
+    });
206
+
207
+    let postData = {
208
+      incident: incidentData,
209
+    }
210
+
211
+    api_incidentTask('receive', postData).then(res => {
212
+      uni.hideLoading();
213
+      if(res.state == 200){
214
+        getList(0);
215
+        uni.showToast({
216
+        	icon: 'none',
217
+          title: '接单成功',
218
+        });
219
+      }else{
220
+        uni.showToast({
221
+          icon: 'none',
222
+          title: res.msg || '请求数据失败!'
223
+        });
224
+      }
225
+    })
226
+  }
227
+  // 接单按钮
228
+  function receive(incidentData){
229
+    uni.showModal({
230
+      title: '提示',
231
+      content: `您确认要接单吗?`,
232
+      confirmColor: defaultColor,
233
+      confirmText: '确认',
234
+      success: function(res) {
235
+        if (res.confirm) {
236
+          receiveFn(incidentData);
237
+        }
238
+      }
239
+    });
240
+  }
241
+
242
+  // 获取列表信息
243
+  function getList(idx){
244
+    uni.showLoading({
245
+      title: "加载中",
246
+      mask: true,
247
+    });
248
+    dataInfo.idx = idx === undefined ? dataInfo.idx : idx;
249
+    if(dataInfo.idx === 0){
250
+      dataInfo.list = [];
251
+    }
252
+    let postData = {
253
+        "idx": dataInfo.idx,
254
+        "sum": 10,
255
+        "incident": {
256
+            "queryTask": dataInfo.evtFilter.selected || undefined,
257
+            "assignee": loginUserStore.loginUser.user.id,
258
+            "statusId": dataInfo.tabActiveId || undefined,
259
+        }
260
+    }
261
+
262
+    // 请求参数调整
263
+    if(!postData.incident){
264
+        postData.incident = {};
265
+    }
266
+
267
+    if(postData.incident.queryTask === 'all' || postData.incident.queryTask === 'callback'){
268
+      if(loginUserStore.loginUser.user.duty){
269
+        // 当前的所属责任科室
270
+        postData.incident.duty = loginUserStore.loginUser.user.duty;
271
+      }else if(loginUserStore.loginUser.user.branch){
272
+        // 当前的所属院区
273
+        postData.incident.branch = loginUserStore.loginUser.user.branch.id;
274
+      }
275
+    }else{
276
+      delete postData.incident.duty;
277
+      delete postData.incident.branch;
278
+    }
279
+
280
+    if(postData.incident.queryTask === 'todo' || postData.incident.queryTask === 'owns' || postData.incident.queryTask === 'todoingAll'){
281
+        postData.incident.candidateGroups = loginUserStore.loginUser.user.group.map(v => v.id).toString();
282
+    }else{
283
+        delete postData.incident.candidateGroups;
284
+    }
285
+
286
+    if(dataInfo.evtFilter && dataInfo.evtFilter.category && dataInfo.evtFilter.category.id){
287
+      postData.incident.levelCategory = { id: dataInfo.evtFilter.category.id };
288
+    }
289
+
290
+    if(dataInfo.evtFilter && Array.isArray(dataInfo.evtFilter.acceptDate) && dataInfo.evtFilter.acceptDate.length){
291
+      postData.incident.acceptDate = format(startOfDay(new Date(dataInfo.evtFilter.acceptDate[0])), 'yyyy-MM-dd HH:mm:ss');
292
+      postData.incident.acceptDateEnd = format(endOfDay(dataInfo.evtFilter.acceptDate[1]), 'yyyy-MM-dd HH:mm:ss');
293
+    }
294
+
295
+    if(dataInfo.evtFilter && dataInfo.evtFilter.area && dataInfo.evtFilter.area.id){
296
+      postData.incident.area = dataInfo.evtFilter.area
297
+    }
298
+
299
+    // incidentListSearchStore.setIncidentListSearchData(dataInfo);
300
+    api_incident(postData).then(res => {
301
+      uni.hideLoading();
302
+      uni.stopPullDownRefresh();
303
+      if(res.status == 200){
304
+        let list = res.list || [];
305
+        if(list.length){
306
+          dataInfo.hasMore = true;
307
+          dataInfo.list = dataInfo.idx === 0 ? list : dataInfo.list.concat(list);
308
+        }else{
309
+          dataInfo.hasMore = false;
310
+        }
311
+      }else{
312
+        uni.showToast({
313
+          icon: 'none',
314
+          title: res.msg || '请求数据失败!'
315
+        });
316
+      }
317
+    })
318
+
319
+    getCount(postData.incident);
320
+  }
321
+
322
+  // 获取列表数量
323
+  function getCount(incident = {}){
324
+    let postData = {
325
+      wxCount: 'true',
326
+      incidentList: [],
327
+    }
328
+    dataInfo.tabs.forEach(v => {
329
+        postData.incidentList.push({...incident, ...{statusId: v.id || undefined}});
330
+    })
331
+
332
+    api_incident_count(postData).then(res => {
333
+      if(res.state == 200){
334
+        let myData = res.data || [];
335
+        dataInfo.tabs.forEach((v, i) => {
336
+            v.num = myData[i];
337
+        })
338
+      }else{
339
+        uni.showToast({
340
+          icon: 'none',
341
+          title: res.msg || '请求数据失败!'
342
+        });
343
+      }
344
+    })
345
+  }
346
+
347
+  // 初始化
348
+  function onLoadFn(){
349
+    // 我的-数量跳转
350
+    // if(incidentNumStore.incidentNum.data){
351
+    //   dataInfo.evtFilter.selected = incidentNumStore.incidentNum.data.queryTask;
352
+    //   dataInfo.tabActiveId = incidentNumStore.incidentNum.data.statusId;
353
+    //   incidentNumStore.clearIncidentNumData();
354
+    // }else if(incidentListSearchStore.incidentListSearch.data){
355
+    //   // 缓存的搜索条件
356
+    //   Object.assign(dataInfo, incidentListSearchStore.incidentListSearch.data);
357
+    // }
358
+
359
+    // for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
360
+    //   if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_assign") {
361
+    //     assignFlag.value = true;
362
+    //   }
363
+    //   if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_qiangdan") {
364
+    //     qiangdan.value = true
365
+    //   }
366
+    // }
367
+    getTabs();
368
+  }
369
+
370
+  onLoad((option) => {
371
+		dataInfo.tabActiveId = Number(option.type)
372
+		console.log(222,Number(option.type))
373
+    onLoadFn();
374
+  })
375
+	
376
+	onShow((option) =>{
377
+		
378
+	})
379
+	
380
+  onTabItemTap(e => {
381
+    // onLoadFn();
382
+  })
383
+
384
+  onPullDownRefresh(() => {
385
+    // getList(0)
386
+  })
387
+
388
+  onReachBottom(() => {
389
+    dataInfo.idx += 1;
390
+    if (dataInfo.hasMore) {
391
+      getList(); // 当触底时加载更多数据
392
+    }
393
+  })
394
+</script>
395
+
396
+<style lang="scss" scoped>
397
+page{
398
+  height: calc(100vh - var(--window-bottom));
399
+}
400
+.incidentList{
401
+  display: flex;
402
+  flex-direction: column;
403
+  justify-content: space-between;
404
+  .head{
405
+    height: 88rpx;
406
+    display: flex;
407
+    position: fixed;
408
+    z-index: 99;
409
+    width: 100%;
410
+    background-color: #fff;
411
+    font-size: 30rpx;
412
+    .tab{
413
+      flex: 1;
414
+      display: flex;
415
+      justify-content: center;
416
+      align-items: center;
417
+      border-bottom: 4rpx solid transparent;
418
+      &.active{
419
+        color: $uni-primary;
420
+        border-color: $uni-primary;
421
+      }
422
+    }
423
+    .filter{
424
+      width: 84rpx;
425
+      display: flex;
426
+      justify-content: center;
427
+      align-items: center;
428
+      .newicon-shaixuan{
429
+        font-size: 36rpx;
430
+        color: #2C2C2C;
431
+      }
432
+    }
433
+  }
434
+  .body{
435
+    margin-bottom: var(--window-bottom);
436
+    margin-top: 88rpx;
437
+    border-top: 6rpx solid #EBEBEB;
438
+    .body_item{
439
+      border-bottom: 8rpx solid #EBEBEB;
440
+			position: relative;
441
+			.sign-style{
442
+				position: absolute;
443
+				right: 0;
444
+				top: 0;
445
+			}
446
+      .body_item_head{
447
+        word-break: break-all;
448
+        text-align: justify;
449
+        text-align: left;
450
+        margin: 24rpx;
451
+        font-size: 30rpx;
452
+      }
453
+      .body_item_content{
454
+        border-top: 1rpx solid #D8D8D8;
455
+        padding: 24rpx 24rpx 24rpx 48rpx;
456
+        .body_item_content_p{
457
+          color: #6A6A6A;
458
+          font-size: 26rpx;
459
+          display: flex;
460
+          justify-content: space-between;
461
+          align-items: center;
462
+          margin-bottom: 24rpx;
463
+          &:last-of-type{
464
+            margin-bottom: 0;
465
+          }
466
+          .name{
467
+            flex: 1;
468
+          }
469
+          .status{
470
+            padding: 4rpx 10rpx;
471
+            border-radius: 20rpx;
472
+            background-color: #DBE8FE;
473
+            font-size: 22rpx;
474
+            color: #006CF9;
475
+          }
476
+          .icon_all{
477
+            .mic-filled,
478
+            .image-filled
479
+            {
480
+              margin-left: 16rpx;
481
+            }
482
+          }
483
+        }
484
+      }
485
+      .body_item_foot{
486
+        border-top: 1rpx solid #D8D8D8;
487
+        font-size: 26rpx;
488
+        padding: 24rpx;
489
+        .foot_info{
490
+          display: flex;
491
+          justify-content: space-between;
492
+          align-items: center;
493
+          .phone-filled{
494
+            margin-left: 5rpx;
495
+          }
496
+        }
497
+      }
498
+    }
499
+  }
500
+  .zanwu{
501
+    box-sizing: border-box;
502
+    margin-bottom: var(--window-bottom);
503
+    margin-top: 88rpx;
504
+    border-top: 6rpx solid #EBEBEB;
505
+    height: calc(100vh - var(--window-bottom) - 88rpx);
506
+    display: flex;
507
+    justify-content: center;
508
+    background-color: #F7F7F7;
509
+    .newicon-zanwu{
510
+      font-size: 256rpx;
511
+      color: #D6D6D6;
512
+      margin-top: 140rpx;
513
+    }
514
+  }
515
+}
516
+</style>

+ 3 - 1
pages/repairEntrance/repairEntrance.vue

@@ -19,7 +19,9 @@
19 19
    * 进入报修
20 20
    */
21 21
   function goToRepair() {
22
-    location.href = location.origin + '/req';
22
+		uni.reLaunch({
23
+		  url: '/pages/repair/home'
24
+		})
23 25
   }
24 26
 </script>
25 27
 

+ 49 - 3
static/font/demo_index.html

@@ -55,6 +55,18 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon newicon">&#xe661;</span>
59
+                <div class="name">扫一扫</div>
60
+                <div class="code-name">&amp;#xe661;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon newicon">&#xe63d;</span>
65
+                <div class="name">知识库</div>
66
+                <div class="code-name">&amp;#xe63d;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
58 70
               <span class="icon newicon">&#xe634;</span>
59 71
                 <div class="name">返回</div>
60 72
                 <div class="code-name">&amp;#xe634;</div>
@@ -228,9 +240,9 @@
228 240
 <pre><code class="language-css"
229 241
 >@font-face {
230 242
   font-family: 'newicon';
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');
243
+  src: url('iconfont.woff2?t=1721722303907') format('woff2'),
244
+       url('iconfont.woff?t=1721722303907') format('woff'),
245
+       url('iconfont.ttf?t=1721722303907') format('truetype');
234 246
 }
235 247
 </code></pre>
236 248
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -257,6 +269,24 @@
257 269
         <ul class="icon_lists dib-box">
258 270
           
259 271
           <li class="dib">
272
+            <span class="icon newicon newicon-saoma"></span>
273
+            <div class="name">
274
+              扫一扫
275
+            </div>
276
+            <div class="code-name">.newicon-saoma
277
+            </div>
278
+          </li>
279
+          
280
+          <li class="dib">
281
+            <span class="icon newicon newicon-zhishiku1"></span>
282
+            <div class="name">
283
+              知识库
284
+            </div>
285
+            <div class="code-name">.newicon-zhishiku1
286
+            </div>
287
+          </li>
288
+          
289
+          <li class="dib">
260 290
             <span class="icon newicon newicon-fanhui1"></span>
261 291
             <div class="name">
262 292
               返回
@@ -519,6 +549,22 @@
519 549
           
520 550
             <li class="dib">
521 551
                 <svg class="icon svg-icon" aria-hidden="true">
552
+                  <use xlink:href="#newicon-saoma"></use>
553
+                </svg>
554
+                <div class="name">扫一扫</div>
555
+                <div class="code-name">#newicon-saoma</div>
556
+            </li>
557
+          
558
+            <li class="dib">
559
+                <svg class="icon svg-icon" aria-hidden="true">
560
+                  <use xlink:href="#newicon-zhishiku1"></use>
561
+                </svg>
562
+                <div class="name">知识库</div>
563
+                <div class="code-name">#newicon-zhishiku1</div>
564
+            </li>
565
+          
566
+            <li class="dib">
567
+                <svg class="icon svg-icon" aria-hidden="true">
522 568
                   <use xlink:href="#newicon-fanhui1"></use>
523 569
                 </svg>
524 570
                 <div class="name">返回</div>

+ 11 - 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=1718344479829') format('woff2'),
4
-       url('iconfont.woff?t=1718344479829') format('woff'),
5
-       url('iconfont.ttf?t=1718344479829') format('truetype');
3
+  src: url('iconfont.woff2?t=1721722303907') format('woff2'),
4
+       url('iconfont.woff?t=1721722303907') format('woff'),
5
+       url('iconfont.ttf?t=1721722303907') format('truetype');
6 6
 }
7 7
 
8 8
 .newicon {
@@ -13,6 +13,14 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.newicon-saoma:before {
17
+  content: "\e661";
18
+}
19
+
20
+.newicon-zhishiku1:before {
21
+  content: "\e63d";
22
+}
23
+
16 24
 .newicon-fanhui1:before {
17 25
   content: "\e634";
18 26
 }

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


+ 14 - 0
static/font/iconfont.json

@@ -6,6 +6,20 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "6757421",
10
+      "name": "扫一扫",
11
+      "font_class": "saoma",
12
+      "unicode": "e661",
13
+      "unicode_decimal": 58977
14
+    },
15
+    {
16
+      "icon_id": "35679393",
17
+      "name": "知识库",
18
+      "font_class": "zhishiku1",
19
+      "unicode": "e63d",
20
+      "unicode_decimal": 58941
21
+    },
22
+    {
9 23
       "icon_id": "9645687",
10 24
       "name": "返回",
11 25
       "font_class": "fanhui1",

BIN
static/font/iconfont.ttf


BIN
static/font/iconfont.woff


BIN
static/font/iconfont.woff2


+ 1 - 0
static/scss/common.scss

@@ -135,6 +135,7 @@ uni-toast,
135 135
   .uni-select,
136 136
   .uni-easyinput__content,
137 137
   .uni-date-x,
138
+	.item-input,
138 139
   .uni-data-tree-input .input-value{
139 140
     border: 1px solid red!important;
140 141
   }