maotao 9 mēneši atpakaļ
vecāks
revīzija
fda1f8cc6f
51 mainītis faili ar 2148 papildinājumiem un 642 dzēšanām
  1. 7 2
      components/IncidentListFilter.vue
  2. 8 3
      components/InspectionListFilter.vue
  3. 1 1
      components/repairsFilter.vue
  4. 5 1
      components/repositoryFilter.vue
  5. 12 3
      http/api.js
  6. 52 52
      http/http.js
  7. 3 2
      interceptor/routeInterceptor.js
  8. 123 63
      pages/assign/assign.vue
  9. 69 37
      pages/buildIncident/buildIncident.vue
  10. 1 0
      pages/categoryThree/categoryThree.vue
  11. 1 0
      pages/categoryTwo/categoryTwo.vue
  12. 78 63
      pages/changeUser/changeUser.vue
  13. 62 32
      pages/consumableList/consumableList.vue
  14. 87 48
      pages/handler/handler.vue
  15. 15 2
      pages/homePage/homePage.vue
  16. 88 8
      pages/incidentDetail/incidentDetail.vue
  17. 36 25
      pages/incidentList/incidentList.vue
  18. 5 14
      pages/initBind/initBind.vue
  19. 8 4
      pages/my/my.vue
  20. 151 53
      pages/repair/config.vue
  21. 31 15
      pages/repair/deptSelect.vue
  22. 33 20
      pages/repair/home.vue
  23. 70 26
      pages/repair/rapidRep.vue
  24. 113 64
      pages/repair/rapidRepNext.vue
  25. 145 28
      pages/repair/repairsDetail.vue
  26. 10 7
      pages/repair/repairsList.vue
  27. 18 15
      pages/repository/repository.vue
  28. 10 4
      pages/repositoryDetails/repositoryDetails.vue
  29. 7 2
      pages/searchArea/searchArea.vue
  30. 6 2
      pages/searchDept/searchDept.vue
  31. 7 1
      pages/searchPlace/searchPlace.vue
  32. 6 2
      pages/searchUser/searchUser.vue
  33. 4 5
      pages/synergeticAdd/synergeticAdd.vue
  34. 8 6
      pages/workHourManagementOne/workHourManagementOne.vue
  35. 6 2
      pages/workHourManagementTwo/workHourManagementTwo.vue
  36. 1 0
      share/useLoginSuccess.js
  37. 3 1
      share/useUploadFile.js
  38. 9 1
      share/useWechatAuth.js
  39. BIN
      static/img/300.jpg
  40. 11 4
      stores/loginUser.js
  41. 33 2
      uni_modules/sy-audio/components/sy-audio/sy-audio.vue
  42. 539 0
      uni_modules/sy-audio/static/font/demo.css
  43. 234 0
      uni_modules/sy-audio/static/font/demo_index.html
  44. 8 22
      uni_modules/sy-audio/static/font/iconfont.css
  45. 1 0
      uni_modules/sy-audio/static/font/iconfont.js
  46. 23 0
      uni_modules/sy-audio/static/font/iconfont.json
  47. BIN
      uni_modules/sy-audio/static/font/iconfont.ttf
  48. BIN
      uni_modules/sy-audio/static/font/iconfont.woff
  49. BIN
      uni_modules/sy-audio/static/font/iconfont.woff2
  50. BIN
      uni_modules/sy-audio/static/img/audio.png
  51. BIN
      uni_modules/sy-audio/static/img/audio_play.gif

+ 7 - 2
components/IncidentListFilter.vue

@@ -237,9 +237,14 @@
237
 		  idx: 0,
237
 		  idx: 0,
238
 		  sum: 9999,
238
 		  sum: 9999,
239
 			building:{
239
 			building:{
240
-				hosId: loginUserStore.loginUser.user.currentHospital.id,
240
+				hosId: null
241
 			}
241
 			}
242
 		};
242
 		};
243
+		if(loginUserStore.loginUser.user.currentHospital.parent){
244
+			postData.building.hosId = loginUserStore.loginUser.user.currentHospital.parent.id
245
+		}else{
246
+			postData.building.hosId = loginUserStore.loginUser.user.currentHospital.id
247
+		}
243
 		getFetchDataList("simple/data", "building", postData)
248
 		getFetchDataList("simple/data", "building", postData)
244
 		  .then((res) => {
249
 		  .then((res) => {
245
 				uni.hideLoading();
250
 				uni.hideLoading();
@@ -315,7 +320,7 @@
315
 		getCategoryList()
320
 		getCategoryList()
316
     // searchData.hospital = evt.hospital;
321
     // searchData.hospital = evt.hospital;
317
     for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
322
     for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
318
-      if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_all") {
323
+      if (loginUserStore.loginUser.menu[i].link == "all") {
319
         tabs.splice(0, 0 , { name: '全部事件', value: 'all' });
324
         tabs.splice(0, 0 , { name: '全部事件', value: 'all' });
320
       }
325
       }
321
     }
326
     }

+ 8 - 3
components/InspectionListFilter.vue

@@ -162,9 +162,14 @@
162
 		  idx: 0,
162
 		  idx: 0,
163
 		  sum: 9999,
163
 		  sum: 9999,
164
 			building:{
164
 			building:{
165
-				hosId: loginUserStore.loginUser.user.currentHospital.id,
165
+				hosId: null,
166
 			}
166
 			}
167
 		};
167
 		};
168
+		if(loginUserStore.loginUser.user.currentHospital.parent){
169
+			postData.building.hosId = loginUserStore.loginUser.user.currentHospital.parent.id
170
+		}else{
171
+			postData.building.hosId = loginUserStore.loginUser.user.currentHospital.id
172
+		}
168
 		getFetchDataList("simple/data", "building", postData)
173
 		getFetchDataList("simple/data", "building", postData)
169
 		  .then((res) => {
174
 		  .then((res) => {
170
 				uni.hideLoading();
175
 				uni.hideLoading();
@@ -174,7 +179,7 @@
174
 		  });
179
 		  });
175
   }
180
   }
176
   
181
   
177
-  // 获取故障现象列表
182
+  // 获取巡检单
178
   function getInspectionFormList(){
183
   function getInspectionFormList(){
179
     uni.showLoading({
184
     uni.showLoading({
180
       title: "加载中",
185
       title: "加载中",
@@ -186,10 +191,10 @@
186
       sum: 9999,
191
       sum: 9999,
187
       account: loginUserStore.loginUser.user.account,
192
       account: loginUserStore.loginUser.user.account,
188
       inspectionForm: {
193
       inspectionForm: {
194
+				hosId:loginUserStore.loginUser.user.currentHospital.id,
189
         status: {value: "1"},
195
         status: {value: "1"},
190
       },
196
       },
191
     }
197
     }
192
-    
193
     api_inspectionForm(postData).then(res => {
198
     api_inspectionForm(postData).then(res => {
194
       uni.hideLoading();
199
       uni.hideLoading();
195
       if(res.status == 200){
200
       if(res.status == 200){

+ 1 - 1
components/repairsFilter.vue

@@ -40,7 +40,7 @@
40
   const emit = defineEmits(['cancelEmit', 'confirmEmit']);
40
   const emit = defineEmits(['cancelEmit', 'confirmEmit']);
41
   const loginUserStore = useLoginUserStore();
41
   const loginUserStore = useLoginUserStore();
42
 	const repositorySearchStore = repositoryListSearchStore();
42
 	const repositorySearchStore = repositoryListSearchStore();
43
-  
43
+	
44
   // 页面数据
44
   // 页面数据
45
   const pageData = reactive({
45
   const pageData = reactive({
46
     pageRouter: 'default',
46
     pageRouter: 'default',

+ 5 - 1
components/repositoryFilter.vue

@@ -7,7 +7,7 @@
7
 					<input class="uni-input" v-model="searchData.title" placeholder="请输入标题" />
7
 					<input class="uni-input" v-model="searchData.title" placeholder="请输入标题" />
8
 				</text>
8
 				</text>
9
       </view>
9
       </view>
10
-      <view class="category">
10
+      <view class="category" v-if="props.viewType!='repairs'">
11
         <text class="name">故障现象</text>
11
         <text class="name">故障现象</text>
12
         <text class="value">
12
         <text class="value">
13
 					<uni-data-picker @change="categoryChange" v-model="searchData.category" :localdata="pageData.categoryList" popup-title="请选择故障信息" :map="{text:'category',value:'id'}">
13
 					<uni-data-picker @change="categoryChange" v-model="searchData.category" :localdata="pageData.categoryList" popup-title="请选择故障信息" :map="{text:'category',value:'id'}">
@@ -41,6 +41,10 @@
41
   const loginUserStore = useLoginUserStore();
41
   const loginUserStore = useLoginUserStore();
42
 	const repositorySearchStore = repositoryListSearchStore();
42
 	const repositorySearchStore = repositoryListSearchStore();
43
   
43
   
44
+	const props = defineProps({
45
+		viewType:null
46
+	})
47
+	
44
   // 页面数据
48
   // 页面数据
45
   const pageData = reactive({
49
   const pageData = reactive({
46
     pageRouter: 'default',
50
     pageRouter: 'default',

+ 12 - 3
http/api.js

@@ -18,7 +18,7 @@ export function api_wechatAuth(data){
18
  * 绑定工号
18
  * 绑定工号
19
  */
19
  */
20
 export function api_bindAccount(data){
20
 export function api_bindAccount(data){
21
-  return post("/auth/bindAccount", data);
21
+  return post("/data/isBindAccount", data);
22
 }
22
 }
23
 
23
 
24
 /**
24
 /**
@@ -123,7 +123,7 @@ export function api_incidentTask(type, data){
123
  * 获取汇总单信息
123
  * 获取汇总单信息
124
  */
124
  */
125
 export function api_querySummaryDoc(data){
125
 export function api_querySummaryDoc(data){
126
-  return post("/bpm/data/querySummaryDoc", data);
126
+  return post("/incident/data/querySummaryDoc", data);
127
 }
127
 }
128
 
128
 
129
 /**
129
 /**
@@ -137,7 +137,7 @@ export function api_consumable(data){
137
  * 添加/修改/删除耗材
137
  * 添加/修改/删除耗材
138
  */
138
  */
139
 export function api_addSummaryDoc(data){
139
 export function api_addSummaryDoc(data){
140
-  return post("/bpm/data/addSummaryDoc", data);
140
+  return post("/incident/data/addSummaryDoc", data);
141
 }
141
 }
142
 
142
 
143
 /**
143
 /**
@@ -303,3 +303,12 @@ export function getFetchDataList(type, target, data){
303
   return post("/" + type + "/fetchDataList/" + target, data);
303
   return post("/" + type + "/fetchDataList/" + target, data);
304
 }
304
 }
305
 
305
 
306
+// 报修资产扫描
307
+export function api_repairScanCode(data){
308
+  return post("/repair/scanCode", data);
309
+}
310
+
311
+// 报修工单撤回
312
+export function api_repairCancel(data){
313
+  return post("/flow/incident/task/cancel", data);
314
+}

+ 52 - 52
http/http.js

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

+ 3 - 2
interceptor/routeInterceptor.js

@@ -1,11 +1,12 @@
1
 import { useLoginUserStore } from '@/stores/loginUser'
1
 import { useLoginUserStore } from '@/stores/loginUser'
2
 const loginUserStore = useLoginUserStore()
2
 const loginUserStore = useLoginUserStore()
3
-
3
+// 白名单
4
 let repaireRouterList = [
4
 let repaireRouterList = [
5
     "/pages/homePage/homePage", //登录页
5
     "/pages/homePage/homePage", //登录页
6
     "/pages/initBind/initBind", //绑定工号
6
     "/pages/initBind/initBind", //绑定工号
7
     "/pages/repairEntrance/repairEntrance", //报修入口页
7
     "/pages/repairEntrance/repairEntrance", //报修入口页
8
-		"/pages/repository/repository", //报修入口页
8
+		"/pages/repository/repository", //知识库
9
+		"/pages/repositoryDetails/repositoryDetails", //知识库详情
9
   ]
10
   ]
10
   let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
11
   let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
11
   //用遍历的方式分别为uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器
12
   //用遍历的方式分别为uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器

+ 123 - 63
pages/assign/assign.vue

@@ -9,7 +9,7 @@
9
 		<view class="body page_padding view-body">
9
 		<view class="body page_padding view-body">
10
       <!-- 故障处理 -->
10
       <!-- 故障处理 -->
11
       <template v-if="dataInfo.tabActiveValue === 'direct'">
11
       <template v-if="dataInfo.tabActiveValue === 'direct'">
12
-        <view class="form_item column" v-if="dataInfo.category.hasSimple != 1">
12
+        <view class="form_item column" v-if="HandleData.simpleness != 1">
13
           <view class="title title-width">
13
           <view class="title title-width">
14
 						<text class="required newicon newicon-bitian"></text>
14
 						<text class="required newicon newicon-bitian"></text>
15
 						<view class="title-fl-sb">
15
 						<view class="title-fl-sb">
@@ -19,7 +19,7 @@
19
 					</view>
19
 					</view>
20
 					<uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
20
 					<uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
21
         </view>
21
         </view>
22
-        <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
22
+        <view class="form_item" v-if="HandleData.simpleness != 1">
23
           <view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
23
           <view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
24
           <view class="value category" @click="selectCategory">
24
           <view class="value category" @click="selectCategory">
25
             <text class="categoryName ellipsis-multiline">{{dataInfo.category.mutiCategory}}</text>
25
             <text class="categoryName ellipsis-multiline">{{dataInfo.category.mutiCategory}}</text>
@@ -34,7 +34,7 @@
34
 						:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.handleCategory}">
34
 						:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.handleCategory}">
35
 					</uni-data-picker>
35
 					</uni-data-picker>
36
 				</view>
36
 				</view>
37
-        <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
37
+        <view class="form_item" v-if="HandleData.simpleness != 1">
38
           <view class="title select"><text class="required newicon newicon-bitian"></text>处理结果:</view>
38
           <view class="title select"><text class="required newicon newicon-bitian"></text>处理结果:</view>
39
           <!-- <uni-data-select class="value" v-model="dataInfo.closecode" :localdata="dataInfo.closecodeList" :clear="false" placeholder="请选择处理结果" :class="{formRed: isSubmit && !dataInfo.closecode}"></uni-data-select> -->
39
           <!-- <uni-data-select class="value" v-model="dataInfo.closecode" :localdata="dataInfo.closecodeList" :clear="false" placeholder="请选择处理结果" :class="{formRed: isSubmit && !dataInfo.closecode}"></uni-data-select> -->
40
 					<uni-data-picker class="value" placeholder="请选择处理结果"
40
 					<uni-data-picker class="value" placeholder="请选择处理结果"
@@ -88,7 +88,7 @@
88
       
88
       
89
       <!-- 补单-下一步 -->
89
       <!-- 补单-下一步 -->
90
       <template v-if="dataInfo.tabActiveValue === 'supplement' && !dataInfo.supplementFlag">
90
       <template v-if="dataInfo.tabActiveValue === 'supplement' && !dataInfo.supplementFlag">
91
-        <view class="form_item column" v-if="dataInfo.category.hasSimple != 1">
91
+        <view class="form_item column" v-if="HandleData.simpleness != 1">
92
 					<view class="title title-width">
92
 					<view class="title title-width">
93
 						<text class="required newicon newicon-bitian"></text>
93
 						<text class="required newicon newicon-bitian"></text>
94
 						<view class="title-fl-sb">
94
 						<view class="title-fl-sb">
@@ -98,7 +98,7 @@
98
 					</view>
98
 					</view>
99
           <uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
99
           <uni-easyinput class="value" type="textarea" v-model="dataInfo.handleDescription" placeholder="请输入解决方案" :class="{formRed: isSubmit && !dataInfo.handleDescription.trim()}" />
100
         </view>
100
         </view>
101
-        <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
101
+        <view class="form_item" v-if="HandleData.simpleness != 1">
102
           <view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
102
           <view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
103
           <view class="value category" @click="selectCategory('assign_supplement')">
103
           <view class="value category" @click="selectCategory('assign_supplement')">
104
             <text class="categoryName ellipsis-multiline">{{dataInfo.category.mutiCategory}}</text>
104
             <text class="categoryName ellipsis-multiline">{{dataInfo.category.mutiCategory}}</text>
@@ -112,7 +112,7 @@
112
         		:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.handleCategory}">
112
         		:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.handleCategory}">
113
         	</uni-data-picker>
113
         	</uni-data-picker>
114
         </view>
114
         </view>
115
-        <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
115
+        <view class="form_item" v-if="HandleData.simpleness != 1">
116
           <view class="title select"><text class="required newicon newicon-bitian"></text>处理结果:</view>
116
           <view class="title select"><text class="required newicon newicon-bitian"></text>处理结果:</view>
117
         	<uni-data-picker class="value" placeholder="请选择处理结果"
117
         	<uni-data-picker class="value" placeholder="请选择处理结果"
118
         		:localdata="dataInfo.closecodeList" v-model="dataInfo.closecode" 
118
         		:localdata="dataInfo.closecodeList" v-model="dataInfo.closecode" 
@@ -224,6 +224,11 @@
224
 	// 楼层id
224
 	// 楼层id
225
 	const floorId = ref(null)
225
 	const floorId = ref(null)
226
 	
226
 	
227
+	// 是否简单处理
228
+	const HandleData = reactive({
229
+		simpleness:null
230
+	})
231
+	
227
 	// 协同人员
232
 	// 协同人员
228
 	const synergeticArr = ref(null)
233
 	const synergeticArr = ref(null)
229
 	
234
 	
@@ -542,9 +547,9 @@
542
       getHandleCategorys();
547
       getHandleCategorys();
543
       getClosecodes();
548
       getClosecodes();
544
     }else if(dataInfo.tabActiveValue === 'supplement'){
549
     }else if(dataInfo.tabActiveValue === 'supplement'){
550
+			getDicGu();
545
       getHandleCategorys();
551
       getHandleCategorys();
546
       getClosecodes();
552
       getClosecodes();
547
-      getUsers();
548
     }else if(dataInfo.tabActiveValue === 'assign'){
553
     }else if(dataInfo.tabActiveValue === 'assign'){
549
       getGroups();
554
       getGroups();
550
     }
555
     }
@@ -575,10 +580,21 @@
575
 		};
580
 		};
576
 		api_getDictionary(postData).then((data) => {
581
 		api_getDictionary(postData).then((data) => {
577
 			userTypes.value = data;
582
 			userTypes.value = data;
578
-			getUsers();
583
+			getUsers('');
579
 		});
584
 		});
580
   }
585
   }
581
-  
586
+	
587
+  function getDicGu(){
588
+		let postData = {
589
+			"key": 'usertype',
590
+			"type": "list",
591
+		};
592
+		api_getDictionary(postData).then((data) => {
593
+			userTypes.value = data;
594
+			getUsers('har');
595
+		});
596
+	}
597
+	
582
   // 选择是否转派到人
598
   // 选择是否转派到人
583
   function changeIsAssignUser(){
599
   function changeIsAssignUser(){
584
     dataInfo.userId = undefined;
600
     dataInfo.userId = undefined;
@@ -595,14 +611,15 @@
595
       "idx": 0,
611
       "idx": 0,
596
       "sum": 9999,
612
       "sum": 9999,
597
       "group2": {
613
       "group2": {
598
-        "hospitals": loginUserStore.loginUser.user.currentHospital.id,
614
+        "hospitals": dutyList.value.id,
599
       }
615
       }
600
     };
616
     };
601
     api_group(postData).then(res => {
617
     api_group(postData).then(res => {
602
       uni.hideLoading();
618
       uni.hideLoading();
603
       if(res.status == 200){
619
       if(res.status == 200){
604
         res.list = res.list || [];
620
         res.list = res.list || [];
605
-        dataInfo.groupList = res.list.map(v => ({
621
+				let arr = res.list.filter(i=>i.type==3)
622
+        dataInfo.groupList = arr.map(v => ({
606
           text: v.groupName,
623
           text: v.groupName,
607
           value: v.id,
624
           value: v.id,
608
         }));
625
         }));
@@ -619,7 +636,7 @@
619
    * 获取用户列表
636
    * 获取用户列表
620
    * @param {boolean} noGroup 是否查询组里的用户
637
    * @param {boolean} noGroup 是否查询组里的用户
621
    */
638
    */
622
-  function getUsers(noGroup = false){
639
+  function getUsers(type,noGroup = false){
623
     uni.showLoading({
640
     uni.showLoading({
624
       title: "加载中",
641
       title: "加载中",
625
       mask: true,
642
       mask: true,
@@ -628,11 +645,22 @@
628
       "idx": 0,
645
       "idx": 0,
629
       "sum": 9999,
646
       "sum": 9999,
630
       "user": {
647
       "user": {
631
-        "hospital": loginUserStore.loginUser.user.currentHospital.id,
648
+				roledata:{
649
+					rolecode:'',
650
+				},
651
+				roleCodes:'',
652
+        "hospital": dutyList.value.id,
632
         "groupdata": (dataInfo.groupId && !noGroup) ? { "id": dataInfo.groupId } : undefined,
653
         "groupdata": (dataInfo.groupId && !noGroup) ? { "id": dataInfo.groupId } : undefined,
633
         userTypeIds:String(userTypes.value.map(v => v.id)),
654
         userTypeIds:String(userTypes.value.map(v => v.id)),
634
       }
655
       }
635
     };
656
     };
657
+		if(type=='har'){
658
+			postData.user.roledata.rolecode = 'first-line support'
659
+			delete postData.user.roleCodes
660
+		}else{
661
+			postData.user.roleCodes = 'first-line support,second-line support'
662
+			delete postData.user.roledata.rolecode
663
+		}
636
     api_user(postData).then(res => {
664
     api_user(postData).then(res => {
637
       uni.hideLoading();
665
       uni.hideLoading();
638
       if(res.status == 200){
666
       if(res.status == 200){
@@ -761,6 +789,15 @@
761
   // 提交
789
   // 提交
762
   function submit(){
790
   function submit(){
763
     isSubmit.value = true;
791
     isSubmit.value = true;
792
+		if(dataInfo.incidentData.priority){
793
+		  dataInfo.incidentData.priorityId = dataInfo.incidentData.priority
794
+		}
795
+		// dataInfo.incidentData.duty = dutyList.value.id
796
+		if(loginUserStore.loginUser.user.currentHospital.parent){
797
+			dataInfo.incidentData.hosId = loginUserStore.loginUser.user.currentHospital.parent.id
798
+		}else{
799
+			dataInfo.incidentData.hosId = loginUserStore.loginUser.user.currentHospital.id
800
+		}
764
     if(dataInfo.tabActiveValue === 'direct'){
801
     if(dataInfo.tabActiveValue === 'direct'){
765
       submitHandler();
802
       submitHandler();
766
     }else if(dataInfo.tabActiveValue === 'supplement'){
803
     }else if(dataInfo.tabActiveValue === 'supplement'){
@@ -874,6 +911,8 @@
874
     //   return;
911
     //   return;
875
     // }
912
     // }
876
     
913
     
914
+		postData.incident.place = {}
915
+		postData.incident.place.id = floorId.value
877
     if(dataInfo.userId){
916
     if(dataInfo.userId){
878
       // 派人
917
       // 派人
879
       postData.incident.assignee = dataInfo.userId;
918
       postData.incident.assignee = dataInfo.userId;
@@ -908,7 +947,7 @@
908
   // 处理提交
947
   // 处理提交
909
   function submitHandler(){
948
   function submitHandler(){
910
     console.log(dataInfo);
949
     console.log(dataInfo);
911
-    if(!dataInfo.handleDescription.trim() && dataInfo.category.hasSimple != 1){
950
+    if(!dataInfo.handleDescription.trim() && HandleData.simpleness != 1){
912
       uni.showToast({
951
       uni.showToast({
913
       	icon: 'none',
952
       	icon: 'none',
914
         title: '请填写解决方案'
953
         title: '请填写解决方案'
@@ -916,7 +955,7 @@
916
       return;
955
       return;
917
     }
956
     }
918
     
957
     
919
-    if(!dataInfo.category.id && dataInfo.category.hasSimple != 1){
958
+    if(!dataInfo.category.id && HandleData.simpleness != 1){
920
       uni.showToast({
959
       uni.showToast({
921
       	icon: 'none',
960
       	icon: 'none',
922
         title: '请选择故障现象'
961
         title: '请选择故障现象'
@@ -932,7 +971,7 @@
932
       return;
971
       return;
933
     }
972
     }
934
     
973
     
935
-    if(!dataInfo.closecode && dataInfo.category.hasSimple != 1){
974
+    if(!dataInfo.closecode && HandleData.simpleness != 1){
936
       uni.showToast({
975
       uni.showToast({
937
       	icon: 'none',
976
       	icon: 'none',
938
         title: '请选择处理结果'
977
         title: '请选择处理结果'
@@ -1098,7 +1137,7 @@
1098
   // 补单提交
1137
   // 补单提交
1099
   function submitSupplement(){
1138
   function submitSupplement(){
1100
     console.log(dataInfo);
1139
     console.log(dataInfo);
1101
-    if(!dataInfo.handleDescription.trim() && dataInfo.category.hasSimple != 1){
1140
+    if(!dataInfo.handleDescription.trim() && HandleData.simpleness != 1){
1102
       uni.showToast({
1141
       uni.showToast({
1103
       	icon: 'none',
1142
       	icon: 'none',
1104
         title: '请填写解决方案'
1143
         title: '请填写解决方案'
@@ -1106,7 +1145,7 @@
1106
       return;
1145
       return;
1107
     }
1146
     }
1108
     
1147
     
1109
-    if(!dataInfo.category.id && dataInfo.category.hasSimple != 1){
1148
+    if(!dataInfo.category.id && HandleData.simpleness != 1){
1110
       uni.showToast({
1149
       uni.showToast({
1111
       	icon: 'none',
1150
       	icon: 'none',
1112
         title: '请选择故障现象'
1151
         title: '请选择故障现象'
@@ -1122,7 +1161,7 @@
1122
       return;
1161
       return;
1123
     }
1162
     }
1124
     
1163
     
1125
-    if(!dataInfo.closecode && dataInfo.category.hasSimple != 1){
1164
+    if(!dataInfo.closecode && HandleData.simpleness != 1){
1126
       uni.showToast({
1165
       uni.showToast({
1127
       	icon: 'none',
1166
       	icon: 'none',
1128
         title: '请选择处理结果'
1167
         title: '请选择处理结果'
@@ -1213,7 +1252,7 @@
1213
   function menuAuthHandle(){
1252
   function menuAuthHandle(){
1214
     let shijianliebiao_supplement = false;//故障处理权限
1253
     let shijianliebiao_supplement = false;//故障处理权限
1215
     for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
1254
     for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
1216
-        if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_supplement") {
1255
+        if (loginUserStore.loginUser.menu[i].link == "replenishment") {
1217
           shijianliebiao_supplement = true
1256
           shijianliebiao_supplement = true
1218
         }
1257
         }
1219
     }
1258
     }
@@ -1285,8 +1324,9 @@
1285
 				
1324
 				
1286
 				let storeData = handlerStore.handler.data
1325
 				let storeData = handlerStore.handler.data
1287
 				if(storeData.type == 'rep'){
1326
 				if(storeData.type == 'rep'){
1327
+					dataInfo.handleDescription = null;
1288
 					if(storeData.handleDescription){
1328
 					if(storeData.handleDescription){
1289
-						dataInfo.handleDescription = getHtml(storeData.handleDescription);
1329
+						dataInfo.handleDescription = storeData.handleDescription;
1290
 						solutionId.value = storeData.solutionId
1330
 						solutionId.value = storeData.solutionId
1291
 					}
1331
 					}
1292
 					if(storeData.tabType == 'direct'){
1332
 					if(storeData.tabType == 'direct'){
@@ -1303,33 +1343,35 @@
1303
 			     dataInfo.incidentData.category = dataInfo.category;
1343
 			     dataInfo.incidentData.category = dataInfo.category;
1304
 					 if(dataInfo.incidentData.place.floor){
1344
 					 if(dataInfo.incidentData.place.floor){
1305
 					 	floorId.value = JSON.parse(JSON.stringify(dataInfo.incidentData.place.floor.id))
1345
 					 	floorId.value = JSON.parse(JSON.stringify(dataInfo.incidentData.place.floor.id))
1346
+					 }else{
1347
+						floorId.value = JSON.parse(JSON.stringify(dataInfo.incidentData.place.id))
1306
 					 }
1348
 					 }
1307
 					 console.log(111)
1349
 					 console.log(111)
1308
 					 getIntroduceCount(dataInfo.category.id)
1350
 					 getIntroduceCount(dataInfo.category.id)
1309
 			    // 处理责任科室
1351
 			    // 处理责任科室
1310
-			    if(dataInfo.category.branchType == 1){
1311
-			      // 分院区
1312
-			      if(dataInfo.incidentData.branch){
1313
-			        let dutyConfig = dataInfo.category.branchUserGroups.find(v=>v.branchId == dataInfo.incidentData.branch);
1314
-			        if(dutyConfig && dutyConfig.dutyId && dutyConfig.dutyName){
1315
-			          dataInfo.incidentData.duty = {id:dutyConfig.dutyId,dept:dutyConfig.dutyName};
1316
-			        }else{
1317
-			          dataInfo.incidentData.duty = undefined;
1318
-			        }
1319
-			      }else{
1320
-			        dataInfo.incidentData.duty = undefined;
1321
-			      }
1322
-			    }else{
1323
-			      // 不分院区
1324
-			      dataInfo.incidentData.duty = dataInfo.category.dutyDepartment;
1325
-			    }
1352
+			  //   if(dataInfo.category.branchType == 1){
1353
+			  //     // 分院区
1354
+			  //     if(dataInfo.incidentData.branch){
1355
+			  //       let dutyConfig = dataInfo.category.branchUserGroups.find(v=>v.branchId == dataInfo.incidentData.branch);
1356
+			  //       if(dutyConfig && dutyConfig.dutyId && dutyConfig.dutyName){
1357
+			  //         dataInfo.incidentData.duty = {id:dutyConfig.dutyId,dept:dutyConfig.dutyName};
1358
+			  //       }else{
1359
+			  //         dataInfo.incidentData.duty = undefined;
1360
+			  //       }
1361
+			  //     }else{
1362
+			  //       dataInfo.incidentData.duty = undefined;
1363
+			  //     }
1364
+			  //   }else{
1365
+			  //     // 不分院区
1366
+					// 	// dataInfo.incidentData.hosId = loginUserStore.loginUser.user.currentHospital.id;
1367
+						
1368
+					// }
1326
 					getDuty()
1369
 					getDuty()
1327
 			  }
1370
 			  }
1328
 			}else if(incidentBuildStore.incidentBuild.data){
1371
 			}else if(incidentBuildStore.incidentBuild.data){
1329
 				console.log(222)
1372
 				console.log(222)
1330
 			  // 初始化
1373
 			  // 初始化
1331
 			  Object.assign(dataInfo.incidentData, incidentBuildStore.incidentBuild.data);
1374
 			  Object.assign(dataInfo.incidentData, incidentBuildStore.incidentBuild.data);
1332
-				console.log(8889889,dataInfo.incidentData)
1333
 				if(dataInfo.incidentData.category){
1375
 				if(dataInfo.incidentData.category){
1334
 					if(dataInfo.incidentData.synergetic){
1376
 					if(dataInfo.incidentData.synergetic){
1335
 						synergeticArr.value = dataInfo.incidentData.synergetic.map(v => v.name).join(',')
1377
 						synergeticArr.value = dataInfo.incidentData.synergetic.map(v => v.name).join(',')
@@ -1337,29 +1379,28 @@
1337
 			    dataInfo.category = dataInfo.incidentData.category;
1379
 			    dataInfo.category = dataInfo.incidentData.category;
1338
 			    getIntroduceCount(dataInfo.category.id)
1380
 			    getIntroduceCount(dataInfo.category.id)
1339
 			    // 处理责任科室
1381
 			    // 处理责任科室
1340
-			    if(dataInfo.category.branchType == 1){
1341
-			      // 分院区
1342
-			      if(dataInfo.incidentData.branch){
1343
-			        let dutyConfig = dataInfo.category.branchUserGroups.find(v=>v.branchId == dataInfo.incidentData.branch);
1344
-			        if(dutyConfig && dutyConfig.dutyId && dutyConfig.dutyName){
1345
-			          dataInfo.incidentData.duty = {id:dutyConfig.dutyId,dept:dutyConfig.dutyName};
1346
-			        }else{
1347
-			          dataInfo.incidentData.duty = undefined;
1348
-			        }
1349
-			      }else{
1350
-			        dataInfo.incidentData.duty = undefined;
1351
-			      }
1352
-			    }else{
1353
-			      // 不分院区
1354
-			      dataInfo.incidentData.duty = dataInfo.category.dutyDepartment;
1355
-			    }
1382
+			    // if(dataInfo.category.branchType == 1){
1383
+			    //   // 分院区
1384
+			    //   if(dataInfo.incidentData.branch){
1385
+			    //     let dutyConfig = dataInfo.category.branchUserGroups.find(v=>v.branchId == dataInfo.incidentData.branch);
1386
+			    //     if(dutyConfig && dutyConfig.dutyId && dutyConfig.dutyName){
1387
+			    //       dataInfo.incidentData.duty = {id:dutyConfig.dutyId,dept:dutyConfig.dutyName};
1388
+			    //     }else{
1389
+			    //       dataInfo.incidentData.duty = undefined;
1390
+			    //     }
1391
+			    //   }else{
1392
+			    //     dataInfo.incidentData.duty = undefined;
1393
+			    //   }
1394
+			    // }else{
1395
+			    //   // 不分院区
1396
+			    //   dataInfo.incidentData.hosId = loginUserStore.loginUser.user.currentHospital.id;
1397
+			    // }
1356
 			  }
1398
 			  }
1357
 				if(dataInfo.incidentData.place.floor){
1399
 				if(dataInfo.incidentData.place.floor){
1358
 					floorId.value = JSON.parse(JSON.stringify(dataInfo.incidentData.place.floor.id))
1400
 					floorId.value = JSON.parse(JSON.stringify(dataInfo.incidentData.place.floor.id))
1359
-				}
1360
-			  // if(dataInfo.incidentData.priority){
1361
-			  //   dataInfo.incidentData.priority = { id: dataInfo.incidentData.priority };
1362
-			  // }
1401
+				}else{
1402
+					floorId.value = JSON.parse(JSON.stringify(dataInfo.incidentData.place.id))
1403
+				 }
1363
 				getDuty()
1404
 				getDuty()
1364
 			  if(dataInfo.incidentData.source){
1405
 			  if(dataInfo.incidentData.source){
1365
 			    dataInfo.incidentData.source = { id: dataInfo.incidentData.source };
1406
 			    dataInfo.incidentData.source = { id: dataInfo.incidentData.source };
@@ -1371,7 +1412,7 @@
1371
 		})
1412
 		})
1372
 	}
1413
 	}
1373
 	
1414
 	
1374
-	// 获取故障现象是否绑定责任科室
1415
+	// 获取故障现象绑定的科室
1375
 	function getDuty(){
1416
 	function getDuty(){
1376
 		let postData = {
1417
 		let postData = {
1377
 		  idx: 0,
1418
 		  idx: 0,
@@ -1382,19 +1423,38 @@
1382
 		  },
1423
 		  },
1383
 		};
1424
 		};
1384
 		getFetchDataList("simple/data", "incidentCategoryConfig", postData).then(res => {
1425
 		getFetchDataList("simple/data", "incidentCategoryConfig", postData).then(res => {
1385
-			dutyList.value = res.list.find(i=>i.priority == dataInfo.incidentData.priority) 
1386
-			// console.log(1111,dutyList.value)
1387
-			console.log(999,dataInfo.incidentData)
1426
+			let item = res.list.find(i=>i.categoryId == dataInfo.incidentData.category.id) 
1427
+			dutyList.value = item.dutyDTO
1428
+			dataInfo.incidentData.duty = dutyList.value.id
1429
+			initForm()
1430
+			console.log(1111,dutyList.value)
1388
 		})
1431
 		})
1389
 	}
1432
 	}
1390
 	
1433
 	
1434
+	// 获取是否开启汇总单
1435
+	function getHosConfig(){
1436
+		let postData = {
1437
+			idx: 0,
1438
+			sum: 9999,
1439
+			hospitalConfig:{
1440
+				hosId: loginUserStore.loginUser.user.currentHospital.id,
1441
+				model: "itsm"
1442
+			}
1443
+		};
1444
+		getFetchDataList("simple/data", "hospitalConfig", postData)
1445
+			.then((res) => {
1446
+				// SummaryData.value = res.list.find(i=>i.key=='itsmSummarySheet')
1447
+				HandleData.simpleness = res.list.find(i=>i.key=='itsmSimpleHandle').value
1448
+			});
1449
+	}
1450
+		
1391
   onLoad((option) => {
1451
   onLoad((option) => {
1452
+		getHosConfig()
1392
     menuAuthHandle()
1453
     menuAuthHandle()
1393
 		getDic()
1454
 		getDic()
1394
     if(!dataInfo.tabActiveValue){
1455
     if(!dataInfo.tabActiveValue){
1395
       dataInfo.tabActiveValue = dataInfo.tabs[0].value;
1456
       dataInfo.tabActiveValue = dataInfo.tabs[0].value;
1396
     }
1457
     }
1397
-    initForm()
1398
   })
1458
   })
1399
 </script>
1459
 </script>
1400
 
1460
 

+ 69 - 37
pages/buildIncident/buildIncident.vue

@@ -5,10 +5,15 @@
5
       <view class="form_item">
5
       <view class="form_item">
6
         <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
6
         <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
7
         <!-- <uni-data-select class="value" v-model="incidentData.branch" :localdata="dataInfo.branchList" :clear="false" placeholder="请选择院区" :class="{formRed: isSubmit && !incidentData.branch}" @change="changeBranch"></uni-data-select> -->
7
         <!-- <uni-data-select class="value" v-model="incidentData.branch" :localdata="dataInfo.branchList" :clear="false" placeholder="请选择院区" :class="{formRed: isSubmit && !incidentData.branch}" @change="changeBranch"></uni-data-select> -->
8
-				<uni-data-picker class="value" placeholder="请选择院区" 
8
+<!-- 				<uni-data-picker class="value" placeholder="请选择院区" 
9
 					:localdata="dataInfo.branchList" v-model="incidentData.branch" :clear-icon="false"
9
 					:localdata="dataInfo.branchList" v-model="incidentData.branch" :clear-icon="false"
10
 					:class="{formRed: isSubmit && !incidentData.branch}" @change="changeBranch">
10
 					:class="{formRed: isSubmit && !incidentData.branch}" @change="changeBranch">
11
-				</uni-data-picker>
11
+				</uni-data-picker> -->
12
+				<view class="value size-14">
13
+					{{loginUserStore.loginUser.user.currentHospital.parent?
14
+					loginUserStore.loginUser.user.currentHospital.parent.hosName:
15
+					loginUserStore.loginUser.user.currentHospital.hosName}}
16
+				</view>
12
 			</view>
17
 			</view>
13
       <view class="form_item">
18
       <view class="form_item">
14
         <view class="title"><text class="required newicon newicon-bitian"></text>报修科室:</view>
19
         <view class="title"><text class="required newicon newicon-bitian"></text>报修科室:</view>
@@ -212,40 +217,46 @@
212
 
217
 
213
   // 获取院区列表
218
   // 获取院区列表
214
   function getBranchs(){
219
   function getBranchs(){
215
-    uni.showLoading({
216
-      title: "加载中",
217
-      mask: true,
218
-    });
219
-    let postData = {
220
-      "idx": 0,
221
-      "sum": 9999,
222
-    };
223
-    api_branch(postData).then(res => {
224
-      uni.hideLoading();
225
-      if(res.status == 200){
226
-        res.list = res.list || [];
227
-        dataInfo.branchList = res.list.map(v => ({
228
-          text: v.hosName,
229
-          value: v.id,
230
-        }));
220
+		if(loginUserStore.loginUser.user.currentHospital.parent){
221
+			incidentData.branch = loginUserStore.loginUser.user.currentHospital.parent.id
222
+		}else{
223
+			incidentData.branch = loginUserStore.loginUser.user.currentHospital.id
224
+		}
225
+   //  uni.showLoading({
226
+   //    title: "加载中",
227
+   //    mask: true,
228
+   //  });
229
+   //  let postData = {
230
+   //    "idx": 0,
231
+   //    "sum": 9999,
232
+			// parent:{id:loginUserStore.loginUser.user.currentHospital.id}
233
+   //  };
234
+    // api_branch(postData).then(res => {
235
+    //   uni.hideLoading();
236
+    //   if(res.status == 200){
237
+        // res.list = res.list || [];
238
+        // dataInfo.branchList = res.list.map(v => ({
239
+        //   text: v.hosName,
240
+        //   value: v.id,
241
+        // }));
231
 
242
 
232
-        if(!incidentBuildStore.incidentBuild.data){
233
-          if(loginUserStore.loginUser.user.duty){
234
-            // 当前的所属责任科室
235
-            incidentData.branch = loginUserStore.loginUser.user.duty.branch;
236
-          }else if(loginUserStore.loginUser.user.branch){
237
-            // 当前的所属院区
238
-            incidentData.branch = loginUserStore.loginUser.user.branch.id;
239
-          }
240
-        }
243
+        // if(!incidentBuildStore.incidentBuild.data){
244
+        //   if(loginUserStore.loginUser.user.duty){
245
+        //     // 当前的所属责任科室
246
+        //     incidentData.branch = loginUserStore.loginUser.user.duty.branch;
247
+        //   }else if(loginUserStore.loginUser.user.branch){
248
+        //     // 当前的所属院区
249
+        //     incidentData.branch = loginUserStore.loginUser.user.branch.id;
250
+        //   }
251
+        // }
241
 
252
 
242
-      }else{
243
-        uni.showToast({
244
-          icon: 'none',
245
-          title: res.msg || '请求数据失败!'
246
-        });
247
-      }
248
-    })
253
+    //   }else{
254
+    //     uni.showToast({
255
+    //       icon: 'none',
256
+    //       title: res.msg || '请求数据失败!'
257
+    //     });
258
+    //   }
259
+    // })
249
   }
260
   }
250
 
261
 
251
   // 获取故障来源列表
262
   // 获取故障来源列表
@@ -266,7 +277,7 @@
266
         value: v.id,
277
         value: v.id,
267
         key: v.value,
278
         key: v.value,
268
       }));
279
       }));
269
-      let discover = dataInfo.sourceList.find(v => v.key === 'discover');
280
+      let discover = dataInfo.sourceList.find(v => v.key === 'leader');
270
       if(discover){
281
       if(discover){
271
         incidentData.source = discover.value;
282
         incidentData.source = discover.value;
272
       }
283
       }
@@ -321,6 +332,22 @@
321
     return uploadFile(imgObj, 'incident', dataInfo.incidentId)
332
     return uploadFile(imgObj, 'incident', dataInfo.incidentId)
322
   }
333
   }
323
 	
334
 	
335
+	// 获取优先级
336
+	function getPriorityData(){
337
+		let postData = {
338
+			idx: 0,
339
+			sum: 9999,
340
+			incidentCategoryConfig: {
341
+				categoryId: incidentData.category.id,
342
+				dutyId: loginUserStore.loginUser.user.currentHospital.id,
343
+			},
344
+		};
345
+		getFetchDataList("simple/data", "incidentCategoryConfig", postData).then(res => {
346
+			let item = res.list.find(i=>i.categoryId == incidentData.category.id) 
347
+			incidentData.priority = item.priority
348
+		})
349
+	}
350
+	
324
   // 提交
351
   // 提交
325
   function submit(){
352
   function submit(){
326
     isSubmit.value = true;
353
     isSubmit.value = true;
@@ -396,7 +423,6 @@
396
       // 不分院区
423
       // 不分院区
397
       incidentData.duty = incidentData.category.dutyDepartment;
424
       incidentData.duty = incidentData.category.dutyDepartment;
398
     }
425
     }
399
-
400
     incidentData.title = incidentData.category.category;
426
     incidentData.title = incidentData.category.category;
401
     incidentBuildStore.setIncidentBuildData(incidentData, 'buildIncident');
427
     incidentBuildStore.setIncidentBuildData(incidentData, 'buildIncident');
402
     uni.navigateTo({
428
     uni.navigateTo({
@@ -420,9 +446,12 @@
420
 				if(incidentData.department){
446
 				if(incidentData.department){
421
 					incidentData.place = incidentData.department || undefined;
447
 					incidentData.place = incidentData.department || undefined;
422
 					incidentData.houseNumber = incidentData.department.address || '';
448
 					incidentData.houseNumber = incidentData.department.address || '';
423
-					incidentData.contactsInformation = incidentData.department.phone ? incidentData.department.phone.split(',')[0] : '';
449
+					incidentData.contactsInformation = incidentData.department.manyPhone ? incidentData.department.manyPhone.split(',')[0] : '';
424
 				}
450
 				}
425
       }
451
       }
452
+			if(incidentData.category && incidentData.category.id){
453
+				getPriorityData()
454
+			}
426
     }
455
     }
427
     getBranchs();
456
     getBranchs();
428
     getSources();
457
     getSources();
@@ -499,6 +528,9 @@
499
           font-size: 22rpx;
528
           font-size: 22rpx;
500
         }
529
         }
501
       }
530
       }
531
+			.size-14{
532
+				font-size: 26rpx;
533
+			}
502
     }
534
     }
503
   }
535
   }
504
 }
536
 }

+ 1 - 0
pages/categoryThree/categoryThree.vue

@@ -108,6 +108,7 @@
108
       // idx: dataInfo.idx,
108
       // idx: dataInfo.idx,
109
       // sum: 9999,
109
       // sum: 9999,
110
       category: {
110
       category: {
111
+				dutyIds:loginUserStore.loginUser.user.currentHospital.id,
111
         parent: {
112
         parent: {
112
           id: dataInfo.parentId,
113
           id: dataInfo.parentId,
113
         },
114
         },

+ 1 - 0
pages/categoryTwo/categoryTwo.vue

@@ -66,6 +66,7 @@
66
       // idx: dataInfo.idx,
66
       // idx: dataInfo.idx,
67
       // sum: 9999,
67
       // sum: 9999,
68
       category: {
68
       category: {
69
+				dutyIds:loginUserStore.loginUser.user.currentHospital.id,
69
         parent: {
70
         parent: {
70
           id: dataInfo.parentId,
71
           id: dataInfo.parentId,
71
         },
72
         },

+ 78 - 63
pages/changeUser/changeUser.vue

@@ -91,7 +91,7 @@
91
 <script setup>
91
 <script setup>
92
   import { ref, reactive } from 'vue'
92
   import { ref, reactive } from 'vue'
93
   import { onLoad } from '@dcloudio/uni-app'
93
   import { onLoad } from '@dcloudio/uni-app'
94
-  import { api_group, api_incidentDetail, api_user, api_incidentTask, api_branch, api_dutyDepartment } from "@/http/api.js"
94
+  import { api_group, api_department, api_incidentDetail, api_user, api_incidentTask, api_branch, api_dutyDepartment } from "@/http/api.js"
95
   import { defaultColor } from '@/static/js/theme.js'
95
   import { defaultColor } from '@/static/js/theme.js'
96
   import { useSetTitle } from '@/share/useSetTitle.js'
96
   import { useSetTitle } from '@/share/useSetTitle.js'
97
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
97
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -189,10 +189,10 @@
189
         let transferFlag = false;//转派权限
189
         let transferFlag = false;//转派权限
190
         let assignFlag = false;//指派权限
190
         let assignFlag = false;//指派权限
191
         for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
191
         for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
192
-            if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_assign") {
192
+            if (loginUserStore.loginUser.menu[i].link == "assign") {
193
                 assignFlag = true
193
                 assignFlag = true
194
             }
194
             }
195
-            if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_transfer") {
195
+            if (loginUserStore.loginUser.menu[i].link == "receive") {
196
                 transferFlag = true
196
                 transferFlag = true
197
             }
197
             }
198
         }
198
         }
@@ -235,42 +235,53 @@
235
   
235
   
236
   // 获取院区列表
236
   // 获取院区列表
237
   function getBranchs(){
237
   function getBranchs(){
238
-    uni.showLoading({
239
-      title: "加载中",
240
-      mask: true,
241
-    });
242
-    let postData = {
243
-      "idx": 0,
244
-      "sum": 9999,
245
-    };
246
-    api_branch(postData).then(res => {
247
-      uni.hideLoading();
248
-      if(res.status == 200){
249
-        res.list = res.list || [];
250
-        dataInfo.branchList = res.list.map(v => ({
251
-          text: v.hosName,
252
-          value: v.id,
253
-        }));
238
+		let arr = loginUserStore.loginUser.hospital.filter(i=>i.parent==undefined)
239
+		dataInfo.branchList = arr.map(v => ({
240
+		  text: v.hosName,
241
+		  value: v.id,
242
+		}));
243
+  //   uni.showLoading({
244
+  //     title: "加载中",
245
+  //     mask: true,
246
+  //   });
247
+  //   let postData = {
248
+  //     "idx": 0,
249
+  //     "sum": 9999,
250
+		// 	hospital:{
251
+		// 		selectType:"level1",
252
+		// 	}
253
+			
254
+		// 	// parent:{id:loginUserStore.loginUser.user.currentHospital.id}
255
+  //   };
256
+		
257
+  //   api_branch(postData).then(res => {
258
+  //     uni.hideLoading();
259
+  //     if(res.status == 200){
260
+  //       res.list = res.list || [];
261
+  //       dataInfo.branchList = res.list.map(v => ({
262
+  //         text: v.hosName,
263
+  //         value: v.id,
264
+  //       }));
254
         
265
         
255
-        if(loginUserStore.loginUser.user.duty){
256
-          // 当前的所属责任科室
257
-          dataInfo.branchId = loginUserStore.loginUser.user.duty.branch;
258
-          changeBranch();
266
+  //       if(loginUserStore.loginUser.user.duty){
267
+  //         // 当前的所属责任科室
268
+  //         dataInfo.branchId = loginUserStore.loginUser.user.duty.branch;
269
+  //         changeBranch();
259
           
270
           
260
-          dataInfo.dutyId = loginUserStore.loginUser.user.duty.id;
261
-          changeDuty();
262
-        }else if(loginUserStore.loginUser.user.branch){
263
-          // 当前的所属院区
264
-          dataInfo.branchId = loginUserStore.loginUser.user.branch.id;
265
-          changeBranch();
266
-        }
267
-      }else{
268
-        uni.showToast({
269
-          icon: 'none',
270
-          title: res.msg || '请求数据失败!'
271
-        });
272
-      }
273
-    })
271
+  //         dataInfo.dutyId = loginUserStore.loginUser.user.duty.id;
272
+  //         changeDuty();
273
+  //       }else if(loginUserStore.loginUser.user.branch){
274
+  //         // 当前的所属院区
275
+  //         dataInfo.branchId = loginUserStore.loginUser.user.branch.id;
276
+  //         changeBranch();
277
+  //       }
278
+  //     }else{
279
+  //       uni.showToast({
280
+  //         icon: 'none',
281
+  //         title: res.msg || '请求数据失败!'
282
+  //       });
283
+  //     }
284
+  //   })
274
   }
285
   }
275
   
286
   
276
   // 获取责任科室列表
287
   // 获取责任科室列表
@@ -282,16 +293,19 @@
282
     let postData = {
293
     let postData = {
283
       "idx": 0,
294
       "idx": 0,
284
       "sum": 9999,
295
       "sum": 9999,
285
-      "dutyDepartment": {
286
-        "branch": dataInfo.branchId,
287
-      }
296
+			hospital: {
297
+				parent:{
298
+					id:dataInfo.branchId
299
+				},
300
+				type:{value:6}
301
+			}
288
     };
302
     };
289
-    api_dutyDepartment(postData).then(res => {
303
+    api_branch(postData).then(res => {
290
       uni.hideLoading();
304
       uni.hideLoading();
291
       if(res.status == 200){
305
       if(res.status == 200){
292
         res.list = res.list || [];
306
         res.list = res.list || [];
293
         dataInfo.dutyList = res.list.map(v => ({
307
         dataInfo.dutyList = res.list.map(v => ({
294
-          text: v.dept,
308
+          text: v.hosName,
295
           value: v.id,
309
           value: v.id,
296
         }));
310
         }));
297
       }else{
311
       }else{
@@ -312,27 +326,27 @@
312
     
326
     
313
     let duty = undefined;
327
     let duty = undefined;
314
     if(dataInfo.tabActiveValue === 'redeploy'){
328
     if(dataInfo.tabActiveValue === 'redeploy'){
315
-      duty = dataInfo.incidentData.duty;
329
+      duty = dataInfo.incidentData.duty.id;
316
     }else if(dataInfo.tabActiveValue === 'assign'){
330
     }else if(dataInfo.tabActiveValue === 'assign'){
317
-      duty = { id: dataInfo.dutyId };
331
+      duty = dataInfo.dutyId;
318
     }
332
     }
319
     
333
     
320
     let postData = {
334
     let postData = {
321
       "idx": 0,
335
       "idx": 0,
322
       "sum": 9999,
336
       "sum": 9999,
323
-      "group": {
324
-          "duty": duty,
325
-          "selectType": "nouser"
337
+      "group2": {
338
+				"hospitals": duty
326
       }
339
       }
327
     };
340
     };
328
     api_group(postData).then(res => {
341
     api_group(postData).then(res => {
329
       uni.hideLoading();
342
       uni.hideLoading();
330
       if(res.status == 200){
343
       if(res.status == 200){
331
         res.list = res.list || [];
344
         res.list = res.list || [];
332
-        dataInfo.groupList = res.list.map(v => ({
333
-          text: v.groupName,
334
-          value: v.id,
335
-        }));
345
+				let arr = res.list.filter(i=>i.type==3)
346
+				dataInfo.groupList = arr.map(v => ({
347
+				  text: v.groupName,
348
+				  value: v.id,
349
+				}));
336
       }else{
350
       }else{
337
         uni.showToast({
351
         uni.showToast({
338
           icon: 'none',
352
           icon: 'none',
@@ -355,16 +369,17 @@
355
           "groupdata":{
369
           "groupdata":{
356
             "id": dataInfo.groupId,
370
             "id": dataInfo.groupId,
357
           },
371
           },
358
-          "roledata": {
359
-              "rolecode": "first-line support"
360
-          },
361
-          "roledata2": {
362
-              "rolecode": "second-line support"
363
-          },
364
-          "selectType": "1",
365
-          "selectDetails": 1,
366
-          "simple": true,
367
-          "engineer": 1
372
+					roleCodes: 'first-line support,second-line support'
373
+          // "roledata": {
374
+          //     "rolecode": "first-line support"
375
+          // },
376
+          // "roledata2": {
377
+          //     "rolecode": "second-line support"
378
+          // },
379
+          // "selectType": "1",
380
+          // "selectDetails": 1,
381
+          // "simple": true,
382
+          // "engineer": 1
368
       }
383
       }
369
     };
384
     };
370
     api_user(postData).then(res => {
385
     api_user(postData).then(res => {
@@ -418,7 +433,7 @@
418
   function changeIsAssignUser(){
433
   function changeIsAssignUser(){
419
     dataInfo.userId = undefined;
434
     dataInfo.userId = undefined;
420
   }
435
   }
421
-  
436
+	
422
   // 提交
437
   // 提交
423
   function submit(){
438
   function submit(){
424
     isSubmit.value = true;
439
     isSubmit.value = true;
@@ -541,7 +556,7 @@
541
     }
556
     }
542
     
557
     
543
     postData.incident.duty = { id: dataInfo.dutyId };
558
     postData.incident.duty = { id: dataInfo.dutyId };
544
-    
559
+		postData.incident.hosId = dataInfo.branchId
545
     api_incidentTask(dataInfo.tabActiveValue, postData).then(res => {
560
     api_incidentTask(dataInfo.tabActiveValue, postData).then(res => {
546
       uni.hideLoading();
561
       uni.hideLoading();
547
       if(res.state == 200){
562
       if(res.state == 200){

+ 62 - 32
pages/consumableList/consumableList.vue

@@ -1,12 +1,12 @@
1
 <template>
1
 <template>
2
   <view class="consumableList">
2
   <view class="consumableList">
3
-    <view class="head" v-if="isFlag">
3
+    <view class="head" >
4
       <uni-search-bar v-model="dataInfo.keyWord" placeholder="请搜索耗材" bgColor="#F8F8F8" @input="search" cancelButton="none" focus :radius="18" />
4
       <uni-search-bar v-model="dataInfo.keyWord" placeholder="请搜索耗材" bgColor="#F8F8F8" @input="search" cancelButton="none" focus :radius="18" />
5
     </view>
5
     </view>
6
-    <view class="body" v-if="dataInfo.list.length" :class="{ mt0: !isFlag }">
6
+    <view class="body" v-if="dataInfo.list.length">
7
       <view class="body_item ellipsis" v-for="data in dataInfo.list" :key="data.id" @click="numberClick(data, 'addConsumable')">
7
       <view class="body_item ellipsis" v-for="data in dataInfo.list" :key="data.id" @click="numberClick(data, 'addConsumable')">
8
         {{data.name}}
8
         {{data.name}}
9
-        <template v-if="data.brandModel">({{data.brandModel}})</template>
9
+        <template v-if="data.model">({{data.model}})</template>
10
         <template v-if="data.unit">({{data.unit}})</template>
10
         <template v-if="data.unit">({{data.unit}})</template>
11
       </view>
11
       </view>
12
     </view>
12
     </view>
@@ -25,7 +25,7 @@
25
   import { ref, reactive} from 'vue'
25
   import { ref, reactive} from 'vue'
26
   import NumberModal from '@/components/NumberModal.vue';
26
   import NumberModal from '@/components/NumberModal.vue';
27
   import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
27
   import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
28
-  import { api_consumable, api_incidentDetail, api_addSummaryDoc, api_incidentCategoryConsumable } from "@/http/api.js"
28
+  import { api_consumable, getFetchDataList, api_incidentDetail, api_addSummaryDoc, api_incidentCategoryConsumable } from "@/http/api.js"
29
   import { defaultColor } from '@/static/js/theme.js'
29
   import { defaultColor } from '@/static/js/theme.js'
30
   import { useSetTitle } from '@/share/useSetTitle.js'
30
   import { useSetTitle } from '@/share/useSetTitle.js'
31
   import { useLoginUserStore } from '@/stores/loginUser'
31
   import { useLoginUserStore } from '@/stores/loginUser'
@@ -51,6 +51,8 @@
51
     evtNumber: 1,//弹窗返回的数量
51
     evtNumber: 1,//弹窗返回的数量
52
     selectData: {},//选择的对象
52
     selectData: {},//选择的对象
53
     selectType: {},//选择的对象类型
53
     selectType: {},//选择的对象类型
54
+		itsmZeroStock:null, //是否支持零库存
55
+		itsmParentConsumable:null //是否支持父级科室耗材
54
   })
56
   })
55
   
57
   
56
   // 点击修改数量
58
   // 点击修改数量
@@ -126,7 +128,7 @@
126
       uni.hideLoading();
128
       uni.hideLoading();
127
       if(res.status == 200){
129
       if(res.status == 200){
128
         dataInfo.incidentData = res.data || {};
130
         dataInfo.incidentData = res.data || {};
129
-        getList(0);
131
+				getHosConfig()
130
       }else{
132
       }else{
131
         uni.showToast({
133
         uni.showToast({
132
           icon: 'none',
134
           icon: 'none',
@@ -180,12 +182,12 @@
180
   }
182
   }
181
   
183
   
182
   // 获取列表信息
184
   // 获取列表信息
183
-  async function getList(idx){
185
+   function getList(idx){
184
     // 判断是否满足故障耗材配置
186
     // 判断是否满足故障耗材配置
185
-    await getIncidentCategoryConsumable();
186
-    if(!isFlag.value){
187
-      return;
188
-    }
187
+    // await getIncidentCategoryConsumable();
188
+    // if(!isFlag.value){
189
+    //   return;
190
+    // }
189
     
191
     
190
     if(dataInfo.keyWord.trim() === ''){
192
     if(dataInfo.keyWord.trim() === ''){
191
       dataInfo.list = [];
193
       dataInfo.list = [];
@@ -207,32 +209,60 @@
207
       idx: dataInfo.idx,
209
       idx: dataInfo.idx,
208
       sum: 20,
210
       sum: 20,
209
       consumable: {
211
       consumable: {
210
-        keyWord: dataInfo.keyWord,
211
-        dutyDTO: dataInfo.incidentData.duty,
212
-        showZero: true,
212
+        name: dataInfo.keyWord,
213
+				upHosId:loginUserStore.loginUser.user.currentHospital.id,
214
+        hosId: loginUserStore.loginUser.user.currentHospital.id
213
       }
215
       }
214
     }
216
     }
215
-    
216
-    api_consumable(postData).then(res => {
217
-      uni.hideLoading();
218
-      uni.stopPullDownRefresh();
219
-      if(res.status == 200){
220
-        let list = res.list || [];
221
-        if(list.length){
222
-          dataInfo.hasMore = true;
223
-          dataInfo.list = dataInfo.idx === 0 ? list : dataInfo.list.concat(list);
224
-        }else{
225
-          dataInfo.hasMore = false;
226
-        }
227
-      }else{
228
-        uni.showToast({
229
-          icon: 'none',
230
-          title: res.msg || '请求数据失败!'
231
-        });
232
-      }
233
-    })
217
+		if(dataInfo.itsmParentConsumable.value==1){
218
+			delete postData.consumable.hosId
219
+		}else{
220
+			delete postData.consumable.upHosId
221
+		}
222
+		getFetchDataList("simple/data", "consumable", postData)
223
+		  .then((res) => {
224
+				uni.hideLoading();
225
+				uni.stopPullDownRefresh();
226
+				if(res.status == 200){
227
+				  let list = res.list || [];
228
+				  if(list.length){
229
+				    dataInfo.hasMore = true;
230
+						if(dataInfo.itsmZeroStock.value==0){
231
+							let arr = dataInfo.idx === 0 ? list : dataInfo.list.concat(list)
232
+							dataInfo.list = arr.filter(i=>i.stock!=0)
233
+						}else{
234
+							dataInfo.list = dataInfo.idx === 0 ? list : dataInfo.list.concat(list);
235
+						}
236
+					}else{
237
+				    dataInfo.hasMore = false;
238
+				  }
239
+				}else{
240
+				  uni.showToast({
241
+				    icon: 'none',
242
+				    title: res.msg || '请求数据失败!'
243
+				  });
244
+				}
245
+		  });
234
   }
246
   }
235
   
247
   
248
+	// 获取院区配置是否支持零库存/是否支持父级科室耗材
249
+	function getHosConfig(){
250
+		let postData = {
251
+		  idx: 0,
252
+		  sum: 9999,
253
+			hospitalConfig:{
254
+				hosId: loginUserStore.loginUser.user.currentHospital.id,
255
+				model: "itsm"
256
+			}
257
+		};
258
+		getFetchDataList("simple/data", "hospitalConfig", postData)
259
+		  .then((res) => {
260
+				dataInfo.itsmZeroStock = res.list.find(i=>i.key=='itsmZeroStock')
261
+				dataInfo.itsmParentConsumable = res.list.find(i=>i.key=='itsmParentConsumable')
262
+				getList(0);
263
+		  });
264
+	}
265
+	
236
   onLoad((option) => {
266
   onLoad((option) => {
237
     dataInfo.incidentId = option.incidentId;
267
     dataInfo.incidentId = option.incidentId;
238
     dataInfo.summaryId = option.summaryId;
268
     dataInfo.summaryId = option.summaryId;

+ 87 - 48
pages/handler/handler.vue

@@ -75,7 +75,7 @@
75
       
75
       
76
       <!-- 故障处理 -->
76
       <!-- 故障处理 -->
77
       <template v-if="dataInfo.tabActiveValue === 'doing' && !isInSummaryOrder">
77
       <template v-if="dataInfo.tabActiveValue === 'doing' && !isInSummaryOrder">
78
-        <view class="form_item column" v-if="dataInfo.category.hasSimple != 1">
78
+        <view class="form_item column" v-if="HandleData.simpleness != 1">
79
           <view class="title title-width">
79
           <view class="title title-width">
80
 						<text class="required newicon newicon-bitian"></text>
80
 						<text class="required newicon newicon-bitian"></text>
81
 						<view class="title-fl-sb">
81
 						<view class="title-fl-sb">
@@ -89,7 +89,7 @@
89
 				  <view class="title"><text class="required newicon newicon-bitian"></text>是否归还备用机:</view>
89
 				  <view class="title"><text class="required newicon newicon-bitian"></text>是否归还备用机:</view>
90
 					<uni-data-checkbox v-model="dataInfo.returnBackupMachine" :localdata="machineData"></uni-data-checkbox>
90
 					<uni-data-checkbox v-model="dataInfo.returnBackupMachine" :localdata="machineData"></uni-data-checkbox>
91
 				</view>
91
 				</view>
92
-        <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
92
+        <view class="form_item" v-if="HandleData.simpleness != 1">
93
           <view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
93
           <view class="title"><text class="required newicon newicon-bitian"></text>故障现象:</view>
94
           <view class="value category" @click="selectCategory">
94
           <view class="value category" @click="selectCategory">
95
             <text class="categoryName ellipsis-multiline">{{dataInfo.category.mutiCategory}}</text>
95
             <text class="categoryName ellipsis-multiline">{{dataInfo.category.mutiCategory}}</text>
@@ -104,7 +104,7 @@
104
 						:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.handleCategory}">
104
 						:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.handleCategory}">
105
 					</uni-data-picker>
105
 					</uni-data-picker>
106
 				</view>
106
 				</view>
107
-        <view class="form_item" v-if="dataInfo.category.hasSimple != 1">
107
+        <view class="form_item" v-if="HandleData.simpleness != 1">
108
           <view class="title select"><text class="required newicon newicon-bitian"></text>处理结果:</view>
108
           <view class="title select"><text class="required newicon newicon-bitian"></text>处理结果:</view>
109
           <!-- <uni-data-select class="value" v-model="dataInfo.closecode" :localdata="dataInfo.closecodeList" :clear="false" placeholder="请选择处理结果" :class="{formRed: isSubmit && !dataInfo.closecode}"></uni-data-select> -->
109
           <!-- <uni-data-select class="value" v-model="dataInfo.closecode" :localdata="dataInfo.closecodeList" :clear="false" placeholder="请选择处理结果" :class="{formRed: isSubmit && !dataInfo.closecode}"></uni-data-select> -->
110
 					<uni-data-picker class="value" placeholder="请选择处理结果"
110
 					<uni-data-picker class="value" placeholder="请选择处理结果"
@@ -175,7 +175,7 @@
175
   import NumberModal from '@/components/NumberModal.vue';
175
   import NumberModal from '@/components/NumberModal.vue';
176
   import { onLoad } from '@dcloudio/uni-app'
176
   import { onLoad } from '@dcloudio/uni-app'
177
   import { generateNumberArray } from '@/utils/index.js'
177
   import { generateNumberArray } from '@/utils/index.js'
178
-  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"
178
+  import { api_group, api_incidentDetail, getFetchDataList, api_getSolution, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_getDictionary, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
179
   import { defaultColor } from '@/static/js/theme.js'
179
   import { defaultColor } from '@/static/js/theme.js'
180
   import { useSetTitle } from '@/share/useSetTitle.js'
180
   import { useSetTitle } from '@/share/useSetTitle.js'
181
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
181
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -251,13 +251,20 @@
251
 	
251
 	
252
   // 是否提交
252
   // 是否提交
253
   const isSubmit = ref(false)
253
   const isSubmit = ref(false)
254
+	
255
+	// 是否开启汇总单
256
+	const SummaryData = ref(false)
254
   
257
   
258
+	// 是否简单处理
259
+	const HandleData = reactive({
260
+		simpleness:null
261
+	})
255
   // 处理图片
262
   // 处理图片
256
   const handlerImgRef = ref(null)
263
   const handlerImgRef = ref(null)
257
   
264
   
258
   // 是否进入汇总单
265
   // 是否进入汇总单
259
   const isInSummaryOrder = computed(() => {
266
   const isInSummaryOrder = computed(() => {
260
-    return dataInfo.tabActiveValue === 'doing' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && (dataInfo.incidentData.handlingPersonnelUser.id == loginUserStore.loginUser.user.id);
267
+    return dataInfo.tabActiveValue === 'doing' && SummaryData.value.value == 1 && (dataInfo.incidentData.handlingPersonnelUser.id == loginUserStore.loginUser.user.id);
261
   })
268
   })
262
   
269
   
263
   // 上一步或者返回列表
270
   // 上一步或者返回列表
@@ -533,24 +540,30 @@
533
       title: "加载中",
540
       title: "加载中",
534
       mask: true,
541
       mask: true,
535
     });
542
     });
536
-
543
+		let title = null;
537
     api_incidentDetail(dataInfo.incidentId).then(res => {
544
     api_incidentDetail(dataInfo.incidentId).then(res => {
538
       uni.hideLoading();
545
       uni.hideLoading();
539
       if(res.status == 200){
546
       if(res.status == 200){
540
         dataInfo.incidentData = res.data || {};
547
         dataInfo.incidentData = res.data || {};
548
+				dataInfo.summaryId = res.data.summaryId;
541
 				newProvideBackupMachine.value = dataInfo.incidentData.provideBackupMachine
549
 				newProvideBackupMachine.value = dataInfo.incidentData.provideBackupMachine
542
-        if(dataInfo.isSummaryNext){
543
-          // 汇总单-下一步
544
-          dataInfo.incidentData.duty.addSummary = 0;
545
-        }
550
+        let storeData = handlerStore.handler.data
551
+        if(storeData && storeData.type!='rep'){
552
+					if(dataInfo.isSummaryNext){
553
+					  // 汇总单-下一步
554
+					  dataInfo.incidentData.duty.addSummary = 0;
555
+					}
556
+				}
546
         
557
         
547
         // 跳转页面选择了选项并且工单ID一致
558
         // 跳转页面选择了选项并且工单ID一致
548
         if(handlerStore.handler.data && handlerStore.handler.data.incidentId == dataInfo.incidentId){
559
         if(handlerStore.handler.data && handlerStore.handler.data.incidentId == dataInfo.incidentId){
549
-          Object.assign(dataInfo, handlerStore.handler.data);
560
+         if(dataInfo.handleDescription){
561
+         	dataInfo.handleDescription = null;
562
+         }
563
+					Object.assign(dataInfo, handlerStore.handler.data);
550
 					getIntroduceCount(dataInfo.category.id)
564
 					getIntroduceCount(dataInfo.category.id)
551
-					if(dataInfo.handleDescription){
552
-						dataInfo.handleDescription = getHtml(dataInfo.handleDescription);
553
-					}
565
+
566
+					
554
           handlerStore.clearHandlerData();
567
           handlerStore.clearHandlerData();
555
         }else{
568
         }else{
556
           handlerStore.clearHandlerData();
569
           handlerStore.clearHandlerData();
@@ -560,7 +573,7 @@
560
           getIntroduceCount(dataInfo.category.id)
573
           getIntroduceCount(dataInfo.category.id)
561
           let chuli = false;//故障处理权限
574
           let chuli = false;//故障处理权限
562
           for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
575
           for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
563
-              if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_chuli") {
576
+              if (loginUserStore.loginUser.menu[i].link == "handle") {
564
                 chuli = true
577
                 chuli = true
565
               }
578
               }
566
           }
579
           }
@@ -616,7 +629,7 @@
616
       mask: true,
629
       mask: true,
617
     });
630
     });
618
     let postData = {
631
     let postData = {
619
-      "key": 'incident_handleCategory',
632
+      "key": 'incident_handle_type',
620
       "type": "list",
633
       "type": "list",
621
     };
634
     };
622
     api_getDictionary(postData).then(res => {
635
     api_getDictionary(postData).then(res => {
@@ -684,7 +697,6 @@
684
       uni.hideLoading();
697
       uni.hideLoading();
685
       if(res.status == 200){
698
       if(res.status == 200){
686
         dataInfo.summaryObj = {...{consumableList:[], workHourManagementList: []}, ...res };
699
         dataInfo.summaryObj = {...{consumableList:[], workHourManagementList: []}, ...res };
687
-        console.log(dataInfo.summaryObj)
688
         dataInfo.summaryId = res.summaryId;
700
         dataInfo.summaryId = res.summaryId;
689
       }else if(res.status == 201){
701
       }else if(res.status == 201){
690
         // 事件第一次绑定汇总单
702
         // 事件第一次绑定汇总单
@@ -707,8 +719,9 @@
707
   
719
   
708
   // 添加工时
720
   // 添加工时
709
   function addWorkHourManagement(){
721
   function addWorkHourManagement(){
722
+		let hosId = dataInfo.incidentData.duty.id
710
     uni.navigateTo({
723
     uni.navigateTo({
711
-      url: `/pages/workHourManagementOne/workHourManagementOne?incidentId=${dataInfo.incidentId}&summaryId=${dataInfo.summaryId}`
724
+      url: `/pages/workHourManagementOne/workHourManagementOne?incidentId=${dataInfo.incidentId}&summaryId=${dataInfo.summaryId}&hosId=${hosId}`
712
     })
725
     })
713
   }
726
   }
714
   
727
   
@@ -717,7 +730,7 @@
717
     isSubmit.value = true;
730
     isSubmit.value = true;
718
     if(dataInfo.tabActiveValue === 'doing' && isInSummaryOrder.value){
731
     if(dataInfo.tabActiveValue === 'doing' && isInSummaryOrder.value){
719
       uni.navigateTo({
732
       uni.navigateTo({
720
-        url: `/pages/handler/handler?incidentId=${dataInfo.incidentId}&isSummaryNext=1`,
733
+        url: `/pages/handler/handler?incidentId=${dataInfo.incidentId}&isSummaryNext=1&type=0`,
721
       });
734
       });
722
     }else if(dataInfo.tabActiveValue === 'doing' && !isInSummaryOrder.value){
735
     }else if(dataInfo.tabActiveValue === 'doing' && !isInSummaryOrder.value){
723
       submitHandler();
736
       submitHandler();
@@ -750,7 +763,7 @@
750
   // 处理提交
763
   // 处理提交
751
   function submitHandler(){
764
   function submitHandler(){
752
     console.log(dataInfo);
765
     console.log(dataInfo);
753
-    if(!dataInfo.handleDescription.trim() && dataInfo.category.hasSimple != 1){
766
+    if(!dataInfo.handleDescription.trim() && HandleData.simpleness != 1){
754
       uni.showToast({
767
       uni.showToast({
755
       	icon: 'none',
768
       	icon: 'none',
756
         title: '请填写解决方案'
769
         title: '请填写解决方案'
@@ -766,7 +779,7 @@
766
 		  return;
779
 		  return;
767
 		}
780
 		}
768
 		
781
 		
769
-    if(!dataInfo.category.id && dataInfo.category.hasSimple != 1){
782
+    if(!dataInfo.category.id && HandleData.simpleness != 1){
770
       uni.showToast({
783
       uni.showToast({
771
       	icon: 'none',
784
       	icon: 'none',
772
         title: '请选择故障现象'
785
         title: '请选择故障现象'
@@ -782,7 +795,7 @@
782
       return;
795
       return;
783
     }
796
     }
784
     
797
     
785
-    if(!dataInfo.closecode && dataInfo.category.hasSimple != 1){
798
+    if(!dataInfo.closecode && HandleData.simpleness != 1){
786
       uni.showToast({
799
       uni.showToast({
787
       	icon: 'none',
800
       	icon: 'none',
788
         title: '请选择处理结果'
801
         title: '请选择处理结果'
@@ -891,32 +904,38 @@
891
   
904
   
892
 	// 获取知识库数量
905
 	// 获取知识库数量
893
 	function getIntroduceCount(categoryId){
906
 	function getIntroduceCount(categoryId){
894
-	  uni.showLoading({
895
-	    title: "加载中",
896
-	    mask: true,
897
-	  });
898
-	  let postData = {
899
-	    idx: 0,
900
-	    sum: 9999,
901
-	    solution: {
902
-				category:{
903
-					id:categoryId,
904
-				},
905
-				status:{id:72},
906
-	    }
907
-	  }
908
-	  
909
-	  api_getSolution(postData).then(res => {
910
-	    uni.hideLoading();
911
-	    if(res.status == 200){
912
-				dataInfo.introduceCount = res.totalNum
913
-	    }else{
914
-	      uni.showToast({
915
-	        icon: 'none',
916
-	        title: res.msg || '请求数据失败!'
917
-	      });
918
-	    }
919
-	  })
907
+		uni.showLoading({
908
+		  title: "加载中",
909
+		  mask: true,
910
+		});
911
+		let query = {
912
+		  "key": 'solution_status',
913
+		  "type": "list",
914
+		};
915
+		api_getDictionary(query).then(res=>{
916
+			 let typeId = res.find(v => v.value == '3');
917
+			 let postData = {
918
+			   idx: 0,
919
+			   sum: 9999,
920
+			   solution: {
921
+					deleteFlag:0,
922
+					hosId: loginUserStore.loginUser.user.currentHospital.id,
923
+			 		categoryId:categoryId,
924
+			 		status:{id:typeId.id},
925
+			   }
926
+			 }
927
+			 api_getSolution(postData).then(res => {
928
+			   uni.hideLoading();
929
+			   if(res.status == 200){
930
+			 		dataInfo.introduceCount = res.totalNum
931
+			   }else{
932
+			     uni.showToast({
933
+			       icon: 'none',
934
+			       title: res.msg || '请求数据失败!'
935
+			     });
936
+			   }
937
+			 })
938
+		})
920
 	}
939
 	}
921
 	
940
 	
922
 	// 获取文本内容
941
 	// 获取文本内容
@@ -926,6 +945,25 @@
926
 	  return tempDiv.textContent || tempDiv.innerText || '';
945
 	  return tempDiv.textContent || tempDiv.innerText || '';
927
 	}
946
 	}
928
 	
947
 	
948
+	// 获取是否开启汇总单、简易处理
949
+	function getHosConfig(){
950
+		let postData = {
951
+		  idx: 0,
952
+		  sum: 9999,
953
+			hospitalConfig:{
954
+				hosId: loginUserStore.loginUser.user.currentHospital.id,
955
+				model: "itsm"
956
+			}
957
+		};
958
+		getFetchDataList("simple/data", "hospitalConfig", postData)
959
+		  .then((res) => {
960
+				if(dataInfo.isSummaryNext!=1){
961
+					SummaryData.value = res.list.find(i=>i.key=='itsmSummarySheet')
962
+				}
963
+				HandleData.simpleness = res.list.find(i=>i.key=='itsmSimpleHandle').value
964
+			});
965
+	}
966
+	
929
   onLoad((option) => {
967
   onLoad((option) => {
930
 		let storeData = handlerStore.handler.data
968
 		let storeData = handlerStore.handler.data
931
 		if(storeData && storeData.type=='rep'){
969
 		if(storeData && storeData.type=='rep'){
@@ -936,6 +974,7 @@
936
 			dataInfo.incidentId = option.incidentId;
974
 			dataInfo.incidentId = option.incidentId;
937
 			dataInfo.isSummaryNext = option.isSummaryNext == 1;
975
 			dataInfo.isSummaryNext = option.isSummaryNext == 1;
938
 		}
976
 		}
977
+		getHosConfig()
939
     getIncidentDetail();
978
     getIncidentDetail();
940
   })
979
   })
941
 </script>
980
 </script>

+ 15 - 2
pages/homePage/homePage.vue

@@ -10,7 +10,7 @@
10
   import { encryptByEnAESLogin } from '@/utils/index.js'
10
   import { encryptByEnAESLogin } from '@/utils/index.js'
11
   import { onLoad } from '@dcloudio/uni-app'
11
   import { onLoad } from '@dcloudio/uni-app'
12
   import { defaultColor } from '@/static/js/theme.js'
12
   import { defaultColor } from '@/static/js/theme.js'
13
-  import { api_wechatLoginEncrypt, api_loginEncrypt, api_systemConfiguration } from "@/http/api.js"
13
+  import { api_wechatLoginEncrypt, api_loginEncrypt, api_systemConfiguration, api_getDictionary} from "@/http/api.js"
14
   import { useWechatAuth } from '@/share/useWechatAuth.js'
14
   import { useWechatAuth } from '@/share/useWechatAuth.js'
15
   import { useLoginSuccess } from '@/share/useLoginSuccess.js'
15
   import { useLoginSuccess } from '@/share/useLoginSuccess.js'
16
   import { useSetTitle } from '@/share/useSetTitle.js'
16
   import { useSetTitle } from '@/share/useSetTitle.js'
@@ -42,6 +42,7 @@
42
         if (res.status == 200) {
42
         if (res.status == 200) {
43
           loginSuccess(res.user);
43
           loginSuccess(res.user);
44
 					getConfig();
44
 					getConfig();
45
+					changeGroup();
45
         } else if (res.status == 501) {
46
         } else if (res.status == 501) {
46
           uni.showModal({
47
           uni.showModal({
47
             title: '提示',
48
             title: '提示',
@@ -50,7 +51,7 @@
50
             confirmColor: defaultColor,
51
             confirmColor: defaultColor,
51
             confirmText: '取消',
52
             confirmText: '取消',
52
           });
53
           });
53
-        } else if (res.status == 403) {
54
+        } else if (res.status == 555) {
54
           uni.reLaunch({
55
           uni.reLaunch({
55
             url: `/pages/initBind/initBind?wechat=${res.wechat}`
56
             url: `/pages/initBind/initBind?wechat=${res.wechat}`
56
           })
57
           })
@@ -78,6 +79,7 @@
78
     api_loginEncrypt(postData).then(res => {
79
     api_loginEncrypt(postData).then(res => {
79
       uni.hideLoading();
80
       uni.hideLoading();
80
 			getConfig();
81
 			getConfig();
82
+			changeGroup();
81
       if (res.state == 200) {
83
       if (res.state == 200) {
82
         loginSuccess(res.data);
84
         loginSuccess(res.data);
83
       } else {
85
       } else {
@@ -99,6 +101,17 @@
99
 		})
101
 		})
100
 	}
102
 	}
101
 	
103
 	
104
+	// 获取工作组
105
+	function changeGroup(){
106
+		let postData = {
107
+			"key": 'usertype',
108
+			"type": "list",
109
+		};
110
+		api_getDictionary(postData).then((data) => {
111
+			uni.setStorageSync('groupData',JSON.stringify(data))
112
+		});
113
+	}
114
+	
102
   onLoad((option) => {
115
   onLoad((option) => {
103
     uni.clearStorageSync();
116
     uni.clearStorageSync();
104
     // 获取当前页面的实例
117
     // 获取当前页面的实例

+ 88 - 8
pages/incidentDetail/incidentDetail.vue

@@ -31,9 +31,21 @@
31
           <view class="deital_item">
31
           <view class="deital_item">
32
             <text class="name">报修图片:</text>
32
             <text class="name">报修图片:</text>
33
             <view class="value img">
33
             <view class="value img">
34
-              <image class="imgItem" :src="img.thumbFilePath" mode="aspectFill" v-for="(img, i) in dataInfo.repairImgs" :key="i" @click="previewImg(i, 'repairImgs')"></image>
34
+              <image class="resourceItem" :src="img.thumbFilePath" mode="aspectFill" v-for="(img, i) in dataInfo.repairImgs" :key="i" @click="previewImg(i, 'repairImgs')"></image>
35
             </view>
35
             </view>
36
           </view>
36
           </view>
37
+					<view class="deital_item">
38
+					  <text class="name">报修视频:</text>
39
+					  <view class="value img">
40
+							<image class="resourceItem" src="/static/img/300.jpg" v-for="(img, i) in dataInfo.repairVideo" :key="i" @click="videoView(img)"></image>
41
+					  </view>
42
+					</view>
43
+					<view class="deital_item">
44
+					  <text class="name">报修录音:</text>
45
+					  <view class="value img" v-if="dataInfo.repairAudio.length>0">
46
+							<sy-audio class="resourceItem-audio" ref="audio" isCountDown :src="img.thumbFilePath" v-for="(img, i) in dataInfo.repairAudio" :key="i" ></sy-audio>
47
+					  </view>
48
+					</view>
37
           <view class="deital_item">
49
           <view class="deital_item">
38
             <text class="name">联系人:</text>
50
             <text class="name">联系人:</text>
39
             <text class="value">{{dataInfo.incidentData.contacts || '无'}}</text>
51
             <text class="value">{{dataInfo.incidentData.contacts || '无'}}</text>
@@ -204,6 +216,14 @@
204
     <view class="foot_common_btns">
216
     <view class="foot_common_btns">
205
       <button @click="goBack" type="default" class="primaryButton btn">返回</button>
217
       <button @click="goBack" type="default" class="primaryButton btn">返回</button>
206
     </view>
218
     </view>
219
+		<uni-popup ref="popup" background-color="#fff" type="center" :before-close="true">
220
+			<view class="popup-content">
221
+				<video :src="videoUrl" controls></video>
222
+			</view>
223
+			<view class="foot_common_btns">
224
+			  <button @click="closePop" type="default" class="primaryButton btn">关闭</button>
225
+			</view>
226
+		</uni-popup>
207
     <IncidentAttachment v-if="dataInfo.isAttachment" @knowEmit="knowAttachment" :incidentData="dataInfo.incidentData"></IncidentAttachment>
227
     <IncidentAttachment v-if="dataInfo.isAttachment" @knowEmit="knowAttachment" :incidentData="dataInfo.incidentData"></IncidentAttachment>
208
   </view>
228
   </view>
209
 </template>
229
 </template>
@@ -212,7 +232,7 @@
212
   import { ref, reactive } from 'vue'
232
   import { ref, reactive } from 'vue'
213
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
233
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
214
   import { onLoad } from '@dcloudio/uni-app'
234
   import { onLoad } from '@dcloudio/uni-app'
215
-  import { api_listAttachment, api_incidentDetail, api_querySummaryDoc, api_incidentLog } from "@/http/api.js"
235
+  import { api_listAttachment, getFetchDataList, api_incidentDetail, api_querySummaryDoc, api_incidentLog } from "@/http/api.js"
216
   import { defaultColor } from '@/static/js/theme.js'
236
   import { defaultColor } from '@/static/js/theme.js'
217
   import { useSetTitle } from '@/share/useSetTitle.js'
237
   import { useSetTitle } from '@/share/useSetTitle.js'
218
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
238
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -232,7 +252,10 @@
232
 
252
 
233
   // 主题颜色
253
   // 主题颜色
234
   const primaryColor = ref(defaultColor)
254
   const primaryColor = ref(defaultColor)
235
-
255
+	
256
+	const videoUrl = ref(null)
257
+	const popup = ref(null)
258
+	
236
   // 数据
259
   // 数据
237
   const dataInfo = reactive({
260
   const dataInfo = reactive({
238
     tabs: [
261
     tabs: [
@@ -245,6 +268,8 @@
245
     incidentId: undefined,//事件ID
268
     incidentId: undefined,//事件ID
246
     incidentData: {},//事件对象
269
     incidentData: {},//事件对象
247
     repairImgs: [],//报修图片
270
     repairImgs: [],//报修图片
271
+		repairVideo:[], //视频
272
+		repairAudio:[], //录音
248
     handlerImgs: [],//处理图片
273
     handlerImgs: [],//处理图片
249
     summaryObj: {
274
     summaryObj: {
250
       consumableList: [],//耗材列表
275
       consumableList: [],//耗材列表
@@ -254,6 +279,7 @@
254
     resolveLogs: [],//评价
279
     resolveLogs: [],//评价
255
     callbackLogs: [],//回访
280
     callbackLogs: [],//回访
256
     isAttachment: false,//录音开关
281
     isAttachment: false,//录音开关
282
+		summaryData:null
257
   })
283
   })
258
 
284
 
259
   // 点击录音
285
   // 点击录音
@@ -369,9 +395,8 @@
369
         let logs = dataInfo.incidentData.logs || [];
395
         let logs = dataInfo.incidentData.logs || [];
370
         dataInfo.resolveLogs = logs.filter(v => v.logType.value == 'resolve').slice(0, 1);
396
         dataInfo.resolveLogs = logs.filter(v => v.logType.value == 'resolve').slice(0, 1);
371
         dataInfo.callbackLogs = logs.filter(v => v.logType.value == 'callback').slice(0, 1);
397
         dataInfo.callbackLogs = logs.filter(v => v.logType.value == 'callback').slice(0, 1);
372
-				console.log(41414,dataInfo.incidentData)
373
         // 维修汇总单
398
         // 维修汇总单
374
-        if(dataInfo.incidentData.state.value == 'close' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && dataInfo.incidentData.summaryId){
399
+        if(dataInfo.incidentData.state.value == 'close' && dataInfo.summaryData.value == 1 && dataInfo.incidentData.summaryId){
375
           let flag = dataInfo.tabs.some(v => v.value === '2');
400
           let flag = dataInfo.tabs.some(v => v.value === '2');
376
           !flag && dataInfo.tabs.splice(1, 0, {id: 2, name: '维修汇总单', value: '2', num: ''});
401
           !flag && dataInfo.tabs.splice(1, 0, {id: 2, name: '维修汇总单', value: '2', num: ''});
377
         }
402
         }
@@ -386,7 +411,18 @@
386
       }
411
       }
387
     })
412
     })
388
   }
413
   }
389
-
414
+	
415
+	function videoView(item){
416
+		videoUrl.value = item.thumbFilePath
417
+		setTimeout(_=>{
418
+			popup.value.open()
419
+		},100)
420
+	}
421
+	
422
+	function closePop(){
423
+		popup.value.close()
424
+	}
425
+	
390
   // 获取报修图片
426
   // 获取报修图片
391
   function getRepairImgs(){
427
   function getRepairImgs(){
392
     uni.showLoading({
428
     uni.showLoading({
@@ -394,7 +430,7 @@
394
       mask: true,
430
       mask: true,
395
     });
431
     });
396
     api_listAttachment('wechatRequesterIncident', dataInfo.incidentId).then(res => {
432
     api_listAttachment('wechatRequesterIncident', dataInfo.incidentId).then(res => {
397
-      uni.hideLoading();
433
+      // uni.hideLoading();
398
       res.data = res.data || [];
434
       res.data = res.data || [];
399
       res.data.forEach(v => {
435
       res.data.forEach(v => {
400
         v.previewUrl = location.origin + "/file" + v.relativeFilePath;
436
         v.previewUrl = location.origin + "/file" + v.relativeFilePath;
@@ -402,6 +438,22 @@
402
       })
438
       })
403
       dataInfo.repairImgs = res.data;
439
       dataInfo.repairImgs = res.data;
404
     })
440
     })
441
+		api_listAttachment('wechatIncidentVideo', dataInfo.incidentId).then(res => {
442
+		  res.data = res.data || [];
443
+		  res.data.forEach(v => {
444
+		    v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
445
+		  })
446
+			dataInfo.repairVideo = res.data
447
+		})
448
+		
449
+		api_listAttachment('wechatIncidentRecord', dataInfo.incidentId).then(res => {
450
+		  uni.hideLoading();
451
+		  res.data = res.data || [];
452
+		  res.data.forEach(v => {
453
+		    v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
454
+		  })
455
+			dataInfo.repairAudio = res.data
456
+		})
405
   }
457
   }
406
 
458
 
407
   // 获取处理图片
459
   // 获取处理图片
@@ -423,11 +475,27 @@
423
 
475
 
424
   onLoad((option) => {
476
   onLoad((option) => {
425
     dataInfo.incidentId = option.incidentId;
477
     dataInfo.incidentId = option.incidentId;
426
-    getIncidentDetail();
478
+		// 获取是否开启汇总单、简易处理
479
+		let postData = {
480
+			idx: 0,
481
+			sum: 9999,
482
+			hospitalConfig:{
483
+				hosId: loginUserStore.loginUser.user.currentHospital.id,
484
+				model: "itsm"
485
+			}
486
+		};
487
+		getFetchDataList("simple/data", "hospitalConfig", postData)
488
+		.then((res) => {
489
+			dataInfo.summaryData = res.list.find(i=>i.key=='itsmSummarySheet')
490
+			getIncidentDetail();
491
+		});
427
   })
492
   })
428
 </script>
493
 </script>
429
 
494
 
430
 <style lang="scss" scoped>
495
 <style lang="scss" scoped>
496
+.popup-content{
497
+	padding: 40rpx;
498
+}
431
 .incidentDetail{
499
 .incidentDetail{
432
   height: 100%;
500
   height: 100%;
433
   display: flex;
501
   display: flex;
@@ -550,6 +618,18 @@
550
               margin-right: 0;
618
               margin-right: 0;
551
             }
619
             }
552
           }
620
           }
621
+					.resourceItem{
622
+						width: 150rpx;
623
+						height: 150rpx;
624
+						margin-right: 24rpx;
625
+						&:last-of-type{
626
+						  margin-right: 0;
627
+						}
628
+					}
629
+					.resourceItem-audio{
630
+						width: 300rpx;
631
+						height: 60rpx;
632
+					}
553
         }
633
         }
554
       }
634
       }
555
     }
635
     }

+ 36 - 25
pages/incidentList/incidentList.vue

@@ -81,7 +81,8 @@
81
   import { useLoginUserStore } from '@/stores/loginUser'
81
   import { useLoginUserStore } from '@/stores/loginUser'
82
   import { useIncidentNumStore } from '@/stores/incidentNum'
82
   import { useIncidentNumStore } from '@/stores/incidentNum'
83
   import { useIncidentListSearchStore } from '@/stores/incidentListSearch'
83
   import { useIncidentListSearchStore } from '@/stores/incidentListSearch'
84
-
84
+	import { useHandlerStore } from '@/stores/handler'
85
+		
85
   useSetTitle();
86
   useSetTitle();
86
   const loginUserStore = useLoginUserStore();
87
   const loginUserStore = useLoginUserStore();
87
   const incidentNumStore = useIncidentNumStore();
88
   const incidentNumStore = useIncidentNumStore();
@@ -92,7 +93,8 @@
92
   const { currentLogOverTime }  = computedCurrentLogOverTime();
93
   const { currentLogOverTime }  = computedCurrentLogOverTime();
93
   const { makePhoneCall }  = useMakePhoneCall();
94
   const { makePhoneCall }  = useMakePhoneCall();
94
   const { setTabbar }  = useSetTabbar();
95
   const { setTabbar }  = useSetTabbar();
95
-
96
+	const handlerStore = useHandlerStore();
97
+	
96
   // 主题颜色
98
   // 主题颜色
97
   const primaryColor = ref(defaultColor)
99
   const primaryColor = ref(defaultColor)
98
 
100
 
@@ -101,16 +103,20 @@
101
 
103
 
102
   // 判断是否显示接单按钮
104
   // 判断是否显示接单按钮
103
   const computedReceive = computed(() => (data) => {
105
   const computedReceive = computed(() => (data) => {
104
-    let inUser = data.currentLog && data.currentLog.workerId == loginUserStore.loginUser.user.id;
105
-    let inGroup = false;
106
-    loginUserStore.loginUser.user.group.forEach(item => {
107
-        if(data.currentLog){
108
-            if (item.id == data.currentLog.groupId) {
109
-                inGroup = true;
110
-            }
111
-        }
112
-    })
113
-    return data.state.value === 'pending' && (inUser || inGroup) && qiangdan.value;
106
+    let inUser = data.handlingPersonnelUser && data.handlingPersonnelUser.id == loginUserStore.loginUser.user.id;
107
+		let inUser2 = data.currentLog.workerId == loginUserStore.loginUser.user.id; 
108
+		let inGroup = false;
109
+		if(loginUserStore.loginUser.user&&loginUserStore.loginUser.user.group){
110
+			loginUserStore.loginUser.user.group.forEach(item => {
111
+			    if(data.currentLog){
112
+			        if (item.id == data.candidateGroupId) {
113
+			            inGroup = true;
114
+			        }
115
+			    }
116
+			})
117
+		}
118
+    
119
+    return data.state.value === 'pending' && (inUser || inUser2 || inGroup) && qiangdan.value;
114
   })
120
   })
115
 
121
 
116
   // 转换协同人
122
   // 转换协同人
@@ -201,6 +207,7 @@
201
 
207
 
202
   // 处理按钮
208
   // 处理按钮
203
   function handler(type, incidentId){
209
   function handler(type, incidentId){
210
+		handlerStore.clearHandlerData();
204
     uni.navigateTo({
211
     uni.navigateTo({
205
       url: `/pages/${type}/${type}?incidentId=${incidentId}`
212
       url: `/pages/${type}/${type}?incidentId=${incidentId}`
206
     })
213
     })
@@ -208,6 +215,7 @@
208
 
215
 
209
   // 接单调用方案
216
   // 接单调用方案
210
   function receiveFn(incidentData){
217
   function receiveFn(incidentData){
218
+		let placeId = JSON.parse(JSON.stringify(incidentData.place.id))
211
     uni.showLoading({
219
     uni.showLoading({
212
       title: "加载中",
220
       title: "加载中",
213
       mask: true,
221
       mask: true,
@@ -216,7 +224,8 @@
216
     let postData = {
224
     let postData = {
217
       incident: incidentData,
225
       incident: incidentData,
218
     }
226
     }
219
-
227
+		postData.incident.place = {}
228
+		postData.incident.place.id = placeId
220
     api_incidentTask('receive', postData).then(res => {
229
     api_incidentTask('receive', postData).then(res => {
221
       uni.hideLoading();
230
       uni.hideLoading();
222
       if(res.state == 200){
231
       if(res.state == 200){
@@ -272,22 +281,24 @@
272
     if(!postData.incident){
281
     if(!postData.incident){
273
         postData.incident = {};
282
         postData.incident = {};
274
     }
283
     }
275
-
284
+		let hospital = loginUserStore.loginUser.user.currentHospital?
285
+		loginUserStore.loginUser.user.currentHospital:
286
+		loginUserStore.loginUser.hospital[0]
276
     if(postData.incident.queryTask === 'all' || postData.incident.queryTask === 'callback'){
287
     if(postData.incident.queryTask === 'all' || postData.incident.queryTask === 'callback'){
277
-      if(loginUserStore.loginUser.user.duty){
278
-        // 当前的所属责任科室
279
-        postData.incident.duty = loginUserStore.loginUser.user.duty;
280
-      }else if(loginUserStore.loginUser.user.branch){
281
-        // 当前的所属院区
282
-        postData.incident.branch = loginUserStore.loginUser.user.branch.id;
283
-      }
288
+			if(hospital.type && hospital.type.value == 6){ // 当前是责任科室
289
+        postData.incident.duty = hospital;
290
+      }else{ // 当前是院区
291
+				postData.incident.hosId = hospital.id;
292
+			}
284
     }else{
293
     }else{
285
       delete postData.incident.duty;
294
       delete postData.incident.duty;
286
-      delete postData.incident.branch;
295
+      delete postData.incident.hosId;
287
     }
296
     }
288
 
297
 
289
     if(postData.incident.queryTask === 'todo' || postData.incident.queryTask === 'owns' || postData.incident.queryTask === 'todoingAll'){
298
     if(postData.incident.queryTask === 'todo' || postData.incident.queryTask === 'owns' || postData.incident.queryTask === 'todoingAll'){
290
-        postData.incident.candidateGroups = loginUserStore.loginUser.user.group.map(v => v.id).toString();
299
+        if(loginUserStore.loginUser.user && loginUserStore.loginUser.user.group){
300
+					postData.incident.candidateGroups = loginUserStore.loginUser.user.group.map(v => v.id).toString();
301
+				}
291
     }else{
302
     }else{
292
         delete postData.incident.candidateGroups;
303
         delete postData.incident.candidateGroups;
293
     }
304
     }
@@ -368,10 +379,10 @@
368
     }
379
     }
369
 
380
 
370
     for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
381
     for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
371
-      if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_assign") {
382
+      if (loginUserStore.loginUser.menu[i].link == "assign") {
372
         assignFlag.value = true;
383
         assignFlag.value = true;
373
       }
384
       }
374
-      if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_qiangdan") {
385
+      if (loginUserStore.loginUser.menu[i].link == "receive") {
375
         qiangdan.value = true
386
         qiangdan.value = true
376
       }
387
       }
377
     }
388
     }

+ 5 - 14
pages/initBind/initBind.vue

@@ -71,7 +71,7 @@
71
     });
71
     });
72
     api_bindAccount({
72
     api_bindAccount({
73
       account: postData.account,
73
       account: postData.account,
74
-      wechat: options.wechat,
74
+      // weChatAccount: options.wechat,
75
       type: type || undefined,
75
       type: type || undefined,
76
     }).then(res => {
76
     }).then(res => {
77
       uni.hideLoading();
77
       uni.hideLoading();
@@ -80,7 +80,7 @@
80
           // 查询
80
           // 查询
81
           uni.showModal({
81
           uni.showModal({
82
             title: '提示',
82
             title: '提示',
83
-            content: `您输入的工号为“${postData.account}”对应姓名“${res.data ? res.data.name : ''}”,您确认绑定吗?`,
83
+            content: `您输入的工号为“${postData.account}”对应姓名“${res ? res.userName : ''}”,您确认绑定吗?`,
84
             confirmColor: defaultColor,
84
             confirmColor: defaultColor,
85
             confirmText: '确认',
85
             confirmText: '确认',
86
             success: function(res) {
86
             success: function(res) {
@@ -93,20 +93,11 @@
93
           // 绑定
93
           // 绑定
94
           wechatAuth();
94
           wechatAuth();
95
         }
95
         }
96
-      } else if (res.status == 403) {
97
-        //未查询到
98
-        uni.showModal({
99
-          title: '提示',
100
-          content: `您填写的工号“${postData.account}”,未查询到!请确认工号是否正确,如有问题请联系管理员。`,
101
-          showCancel: false,
102
-          confirmColor: defaultColor,
103
-          confirmText: '取消',
104
-        });
105
-      } else if (res.status == 401) {
96
+      }  else if (res.status == 500) {
106
         //已被绑定
97
         //已被绑定
107
         uni.showModal({
98
         uni.showModal({
108
           title: '提示',
99
           title: '提示',
109
-          content: `您填写工号为“${postData.account}”对应姓名为“${res.data ? res.data.name : ''}”已经被绑定,如有误请联系管理员处理。`,
100
+          content: res.data,
110
           showCancel: false,
101
           showCancel: false,
111
           confirmColor: defaultColor,
102
           confirmColor: defaultColor,
112
           confirmText: '取消',
103
           confirmText: '取消',
@@ -114,7 +105,7 @@
114
       } else {
105
       } else {
115
         uni.showToast({
106
         uni.showToast({
116
           icon: 'none',
107
           icon: 'none',
117
-          title: res.msg || '请求数据失败!'
108
+          title: res.data || '请求数据失败!'
118
         });
109
         });
119
       }
110
       }
120
     })
111
     })

+ 8 - 4
pages/my/my.vue

@@ -4,11 +4,11 @@
4
       <view class="top">
4
       <view class="top">
5
         <view class="top_name">Hi,{{loginUserStore.loginUser.user.name}}</view>
5
         <view class="top_name">Hi,{{loginUserStore.loginUser.user.name}}</view>
6
         <view class="top_count">
6
         <view class="top_count">
7
-          <view class="top_count_item" @click="toIncident('todoingAll', 1543)">
7
+          <view class="top_count_item" @click="toIncident('todoingAll', 20407)">
8
             <view class="name">待接单</view>
8
             <view class="name">待接单</view>
9
             <view class="value">{{dataInfo.todo}}</view>
9
             <view class="value">{{dataInfo.todo}}</view>
10
           </view>
10
           </view>
11
-          <view class="top_count_item" @click="toIncident('todoingAll', 1544)">
11
+          <view class="top_count_item" @click="toIncident('todoingAll', 20408)">
12
             <view class="name">处理中</view>
12
             <view class="name">处理中</view>
13
             <view class="value">{{dataInfo.doing}}</view>
13
             <view class="value">{{dataInfo.doing}}</view>
14
           </view>
14
           </view>
@@ -87,12 +87,16 @@
87
     uni.showLoading({
87
     uni.showLoading({
88
       title: "加载中",
88
       title: "加载中",
89
     });
89
     });
90
+		let group = []
91
+		if(loginUserStore.loginUser.user && loginUserStore.loginUser.user.group){
92
+			group = loginUserStore.loginUser.user.group
93
+		}
90
     let postData = {
94
     let postData = {
91
       incidentList: [
95
       incidentList: [
92
         {
96
         {
93
           "queryTask": "todo",
97
           "queryTask": "todo",
94
           "assignee": loginUserStore.loginUser.user.id,
98
           "assignee": loginUserStore.loginUser.user.id,
95
-          "candidateGroups": loginUserStore.loginUser.user.group.map(v => v.id).toString()
99
+          "candidateGroups": group.map(v => v.id).toString()
96
         },
100
         },
97
         {
101
         {
98
           "queryTask": "doing",
102
           "queryTask": "doing",
@@ -101,7 +105,7 @@
101
         {
105
         {
102
           "queryTask": "owns",
106
           "queryTask": "owns",
103
           "assignee": loginUserStore.loginUser.user.id,
107
           "assignee": loginUserStore.loginUser.user.id,
104
-          "candidateGroups": loginUserStore.loginUser.user.group.map(v => v.id).toString()
108
+          "candidateGroups": group.map(v => v.id).toString()
105
         },
109
         },
106
         {
110
         {
107
           "queryTask": "resolve",
111
           "queryTask": "resolve",

+ 151 - 53
pages/repair/config.vue

@@ -15,7 +15,7 @@
15
 					<view class="bottom_list_item">
15
 					<view class="bottom_list_item">
16
 					  <view class="name"><text class="required newicon newicon-bitian"></text>院区名称</view>
16
 					  <view class="name"><text class="required newicon newicon-bitian"></text>院区名称</view>
17
 						<uni-data-picker class="value" placeholder="请选择院区名称"
17
 						<uni-data-picker class="value" placeholder="请选择院区名称"
18
-							v-model="dataForm.branch" :localdata="branchData"
18
+							v-model="dataForm.branch" :localdata="branchData" @change="branchChange"
19
 							:clear-icon="false" :class="{formRed: isSubmit && !dataForm.branch}">
19
 							:clear-icon="false" :class="{formRed: isSubmit && !dataForm.branch}">
20
 						</uni-data-picker>
20
 						</uni-data-picker>
21
 						<text class="newicon newicon-youjiantou icon"></text>
21
 						<text class="newicon newicon-youjiantou icon"></text>
@@ -23,7 +23,7 @@
23
 					<view class="bottom_list_item" v-if="deptRepair.valueconfig==1">
23
 					<view class="bottom_list_item" v-if="deptRepair.valueconfig==1">
24
 					  <view class="name"><text class="required newicon newicon-bitian"></text>科室名称</view>
24
 					  <view class="name"><text class="required newicon newicon-bitian"></text>科室名称</view>
25
 						<uni-data-picker class="value" placeholder="请选择报修科室"
25
 						<uni-data-picker class="value" placeholder="请选择报修科室"
26
-							v-model="dataForm.dept" :localdata="deptData"
26
+							v-model="dataForm.dept" :localdata="deptData" 
27
 							:clear-icon="false" :class="{formRed: isSubmit && !dataForm.dept}">
27
 							:clear-icon="false" :class="{formRed: isSubmit && !dataForm.dept}">
28
 						</uni-data-picker>
28
 						</uni-data-picker>
29
 						<text class="newicon newicon-youjiantou icon"></text>
29
 						<text class="newicon newicon-youjiantou icon"></text>
@@ -48,8 +48,8 @@
48
 
48
 
49
 <script setup>
49
 <script setup>
50
   import { ref, reactive } from 'vue'
50
   import { ref, reactive } from 'vue'
51
-  import { onLoad, onTabItemTap } from '@dcloudio/uni-app'
52
-  import { api_userSave, api_department, api_branch, api_systemConfiguration} from "@/http/api.js"
51
+  import { onLoad, onShow, onHide, onTabItemTap } from '@dcloudio/uni-app'
52
+  import { api_userSave, api_user, api_department, api_getDictionary ,api_branch, api_systemConfiguration} from "@/http/api.js"
53
   import { defaultColor } from '@/static/js/theme.js'
53
   import { defaultColor } from '@/static/js/theme.js'
54
   import { useSetTitle } from '@/share/useSetTitle.js'
54
   import { useSetTitle } from '@/share/useSetTitle.js'
55
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
55
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -83,6 +83,8 @@
83
 		branch:''
83
 		branch:''
84
 	})
84
 	})
85
 	
85
 	
86
+	const userTypes = ref(null)
87
+	
86
 	const userData = reactive(loginUserStore.loginUser.user)
88
 	const userData = reactive(loginUserStore.loginUser.user)
87
 	
89
 	
88
 	const commonDeptDTO = ref([])
90
 	const commonDeptDTO = ref([])
@@ -92,14 +94,27 @@
92
 	
94
 	
93
   // 数据
95
   // 数据
94
   const dataInfo = reactive({
96
   const dataInfo = reactive({
95
-    todo: 0,
96
-    doing: 0,
97
-    owns: 0,
98
-    resolve: 0,
97
+    num: 0,
99
   })
98
   })
100
   
99
   
101
   // 保存
100
   // 保存
102
   function addInfo(){
101
   function addInfo(){
102
+		if(!dataForm.branch){
103
+			uni.showToast({
104
+			  icon: 'none',
105
+			  title: '院区不能为空'
106
+			});
107
+			return
108
+		}
109
+		
110
+		if(!dataForm.dept){
111
+			uni.showToast({
112
+			  icon: 'none',
113
+			  title: '报修科室不能为空'
114
+			});
115
+			return
116
+		}
117
+		
103
 		uni.showLoading({
118
 		uni.showLoading({
104
 		  title: "加载中",
119
 		  title: "加载中",
105
 		  mask: true,
120
 		  mask: true,
@@ -118,6 +133,13 @@
118
 		}
133
 		}
119
 		let postData = {
134
 		let postData = {
120
 			...loginUserStore.loginUser.user,
135
 			...loginUserStore.loginUser.user,
136
+			// ...userData,
137
+			hospital:{
138
+				id:dataForm.branch
139
+			},
140
+			dept:{
141
+				id:dataForm.dept
142
+			},
121
 			commonDept:commonDeptData.value,
143
 			commonDept:commonDeptData.value,
122
 			commonDeptDTO:arr
144
 			commonDeptDTO:arr
123
 		}
145
 		}
@@ -139,7 +161,15 @@
139
 			}
161
 			}
140
 		})
162
 		})
141
   }
163
   }
142
-  
164
+	
165
+	// 选择院区
166
+	function branchChange(){
167
+		dataForm.dept = null
168
+		commonDeptName.value = null
169
+		commonDeptData.value = null
170
+		getRepairTypes()
171
+	}
172
+	
143
 	// 获取科室列表
173
 	// 获取科室列表
144
 	function getRepairTypes(){
174
 	function getRepairTypes(){
145
 	  uni.showLoading({
175
 	  uni.showLoading({
@@ -148,14 +178,13 @@
148
 	  });
178
 	  });
149
 	  let postData = {
179
 	  let postData = {
150
 			department: {
180
 			department: {
151
-			  hospital: loginUserStore.loginUser.user.currentHospital.id,
181
+			  hospital: dataForm.branch?dataForm.branch:loginUserStore.loginUser.user.currentHospital.id,
152
 			},
182
 			},
153
 			idx:0,
183
 			idx:0,
154
 			sum:9999
184
 			sum:9999
155
 		}
185
 		}
156
 	  api_department(postData).then(res => {
186
 	  api_department(postData).then(res => {
157
 	    uni.hideLoading();
187
 	    uni.hideLoading();
158
-			getBranch()
159
 	    res = res.list || [];
188
 	    res = res.list || [];
160
 	    deptData.value = res.map(v => ({
189
 	    deptData.value = res.map(v => ({
161
 	      text: v.dept,
190
 	      text: v.dept,
@@ -166,24 +195,11 @@
166
 	
195
 	
167
 	// 获取院区列表
196
 	// 获取院区列表
168
 	function getBranch(){
197
 	function getBranch(){
169
-		let postData = {
170
-			// hosId:loginUserStore.loginUser.user.currentHospital.id,
171
-			idx:0,
172
-			sum:9999
173
-		}
174
-		// if(loginUserStore.loginUser.user.duty){
175
-		//   postData.branch = loginUserStore.loginUser.user.currentHospital.id;
176
-		// }else if(loginUserStore.loginUser.user.branch){
177
-		//   postData.branch = loginUserStore.loginUser.user.branch.id;
178
-		// }
179
-		api_branch(postData).then(res => {
180
-		  uni.hideLoading();
181
-		  res = res.list || [];
182
-		  branchData.value = res.map(v => ({
183
-		    text: v.hosName,
184
-		    value: v.id,
185
-		  }));
186
-		})
198
+		let arr = loginUserStore.loginUser.hospital.filter(i=>i.parent==undefined)
199
+		branchData.value = arr.map(v => ({
200
+		  text: v.hosName,
201
+		  value: v.id,
202
+		}));
187
 	}
203
 	}
188
 	
204
 	
189
 	// 选择常用科室
205
 	// 选择常用科室
@@ -194,8 +210,9 @@
194
 		if(!data){
210
 		if(!data){
195
 			data = 'none'
211
 			data = 'none'
196
 		}
212
 		}
213
+		let deptId = dataForm.branch?dataForm.branch:loginUserStore.loginUser.user.currentHospital.id
197
 		uni.navigateTo({
214
 		uni.navigateTo({
198
-		  url: '/pages/repair/deptSelect?data='+JSON.stringify(data)
215
+		  url: `/pages/repair/deptSelect?data=${JSON.stringify(data)}&commonDeptName=${commonDeptName.value}&deptId=${deptId}`
199
 		})
216
 		})
200
 	}
217
 	}
201
 	
218
 	
@@ -203,44 +220,125 @@
203
   function onLoadFn(){
220
   function onLoadFn(){
204
 		let data = JSON.parse(uni.getStorageSync('sysData'))
221
 		let data = JSON.parse(uni.getStorageSync('sysData'))
205
 		deptRepair.value = data.find(i=>i.keyconfig=='deptRepair')
222
 		deptRepair.value = data.find(i=>i.keyconfig=='deptRepair')
206
-		getRepairTypes()
223
+		getBranch()
207
   }
224
   }
208
-  
225
+	
226
+	function getUserInfo(){
227
+		let user = loginUserStore.loginUser.user
228
+		let userId = null
229
+		if(user.currentHospital.parent){
230
+			userId = user.currentHospital.parent.id
231
+		}else{
232
+			userId = user.currentHospital.id
233
+		}
234
+		let postData = {
235
+		  idx: 0,
236
+		  sum: 999,
237
+		  user: {
238
+				hospital:{
239
+					id:userId
240
+				},
241
+		    name: user.name,
242
+				userTypeIds: String(userTypes.value.map(v => v.id))
243
+		  }
244
+		}
245
+		api_user(postData).then(res => {
246
+		  if(res.status == 200){
247
+		    let item = res.list.find(i=>i.id==user.id)
248
+		    if(item){
249
+					if(item.hospital.parent){
250
+						dataForm.branch = item.hospital.parent.id
251
+					}else{
252
+						dataForm.branch = item.hospital.id
253
+					}
254
+					if(item.dept){
255
+						dataForm.dept = item.dept.id
256
+					}
257
+					getRepairTypes()
258
+					let id = []
259
+					let name = []
260
+					if(item.commonDeptDTO){
261
+						for(let i of item.commonDeptDTO){
262
+							id.push(i.id)
263
+							name.push(i.dept)
264
+						}
265
+						commonDeptData.value = id.join(',')
266
+						commonDeptName.value = name.join('/')
267
+					}
268
+		    }else{
269
+					// let data = uni.getStorageSync('configData')
270
+					// if(data){
271
+					// 	data = JSON.parse(data)
272
+					// 	dataForm.dept = data.dept
273
+					// 	dataForm.branch = data.branch
274
+					// }else{
275
+						if(user.currentHospital.parent){
276
+							dataForm.branch = user.currentHospital.parent.id
277
+						}else{
278
+							dataForm.branch = user.currentHospital.id
279
+						}
280
+						if(user.dept){
281
+							dataForm.dept = user.dept.id
282
+						}
283
+					// }
284
+					if(user.commonDeptDTO){
285
+						let name = []
286
+						for(let i of user.commonDeptDTO){
287
+							name.push(i.dept)
288
+						}
289
+						commonDeptData.value = user.commonDept
290
+						commonDeptName.value = name.join('/')
291
+					}
292
+					getRepairTypes()
293
+				}
294
+		  }else{
295
+		    uni.showToast({
296
+		      icon: 'none',
297
+		      title: res.msg || '请求数据失败!'
298
+		    });
299
+		  }
300
+		})
301
+	}
302
+	
303
+	onHide(opt=>{
304
+		dataInfo.num = 0
305
+		dataForm.branch = null
306
+	})
307
+	
308
+	onShow((option) => {
309
+		userTypes.value = JSON.parse(uni.getStorageSync('groupData')) 
310
+		onLoadFn()
311
+		if(dataInfo.num==0){
312
+			getUserInfo()
313
+		}
314
+	})
315
+			
209
   onLoad((option) => {
316
   onLoad((option) => {
317
+		userTypes.value = JSON.parse(uni.getStorageSync('groupData')) 
318
+		onLoadFn();
319
+		dataInfo.num = 1
210
 		if(option.data){
320
 		if(option.data){
211
 			let data = JSON.parse(option.data)
321
 			let data = JSON.parse(option.data)
212
 			commonDeptData.value = data.data.join(',')
322
 			commonDeptData.value = data.data.join(',')
213
 			commonDeptName.value = data.name.join('/')
323
 			commonDeptName.value = data.name.join('/')
214
 			commonDeptDTO.value = data.name
324
 			commonDeptDTO.value = data.name
215
-		}else{
216
-			let user = loginUserStore.loginUser.user
217
-			if(user){
218
-				dataForm.branch = user.currentHospital.id
219
-				dataForm.dept = user.dept.id
220
-				if(user.commonDeptDTO){
221
-					let dept = user.commonDeptDTO.map(i=>{
222
-						return i.dept
223
-					})
224
-					commonDeptName.value = dept.join('/')
225
-				}else{
226
-					commonDeptName.value = user.commonDeptName
227
-				}
325
+			let data2 = uni.getStorageSync('configData')
326
+			if(data2){
327
+				data2 = JSON.parse(data2)
328
+				dataForm.dept = data2.dept
329
+				dataForm.branch = data2.branch
228
 			}
330
 			}
229
-		}
230
-		let data = uni.getStorageSync('configData')
231
-		if(data){
232
-			data = JSON.parse(data)
233
-			dataForm.dept = data.dept
234
-			dataForm.branch = data.branch
331
+			getRepairTypes()
332
+		}else{
333
+			getUserInfo()
235
 		}
334
 		}
236
 		for(let i = 0; i<5; i++){
335
 		for(let i = 0; i<5; i++){
237
 			setTabbar(i)
336
 			setTabbar(i)
238
 		}
337
 		}
239
-    onLoadFn();
240
   })
338
   })
241
   
339
   
242
   onTabItemTap(e => {
340
   onTabItemTap(e => {
243
-    onLoadFn();
341
+    // onLoadFn();
244
   })
342
   })
245
 </script>
343
 </script>
246
 
344
 

+ 31 - 15
pages/repair/deptSelect.vue

@@ -49,7 +49,7 @@
49
 	const deptSelectName = ref(null)
49
 	const deptSelectName = ref(null)
50
 	const checkBox = ref([])
50
 	const checkBox = ref([])
51
 	const optionData = ref(null)
51
 	const optionData = ref(null)
52
-	
52
+	const deptId = ref(null)
53
 	// 是否提交
53
 	// 是否提交
54
 	const isSubmit = ref(false)
54
 	const isSubmit = ref(false)
55
   
55
   
@@ -78,16 +78,11 @@
78
 	  });
78
 	  });
79
 	  let postData = {
79
 	  let postData = {
80
 			department: {
80
 			department: {
81
-			  hospital: loginUserStore.loginUser.user.currentHospital.id,
81
+			  hospital: Number(deptId.value),
82
 			},
82
 			},
83
 			idx:0,
83
 			idx:0,
84
 			sum:9999
84
 			sum:9999
85
 		}
85
 		}
86
-		// if(loginUserStore.loginUser.user.duty){
87
-		//   postData.department.branch = loginUserStore.loginUser.user.duty.id;
88
-		// }else if(loginUserStore.loginUser.user.branch){
89
-		//   postData.department.branch = loginUserStore.loginUser.user.branch.id;
90
-		// }
91
 	  api_department(postData).then(res => {
86
 	  api_department(postData).then(res => {
92
 	    uni.hideLoading();
87
 	    uni.hideLoading();
93
 	    res = res.list || [];
88
 	    res = res.list || [];
@@ -110,6 +105,18 @@
110
 	}
105
 	}
111
 	
106
 	
112
 	function submit(){
107
 	function submit(){
108
+		let isId = null
109
+		for(let x of deptSelectName.value){
110
+			isId = deptData.value.find(i=>i.value == x.value)
111
+		}
112
+		if(!isId){
113
+			deptSelectName.value = []
114
+			uni.showToast({
115
+				icon: 'none',
116
+			  title: '请先选择科室'
117
+			});
118
+			return
119
+		}
113
 		if(!deptSelectName.value){
120
 		if(!deptSelectName.value){
114
 			uni.showToast({
121
 			uni.showToast({
115
 				icon: 'none',
122
 				icon: 'none',
@@ -133,22 +140,31 @@
133
 	}
140
 	}
134
 	
141
 	
135
   // 初始化
142
   // 初始化
136
-  function onLoadFn(){
137
-		getRepairTypes()
138
-  }
143
+  // function onLoadFn(){
144
+		// getRepairTypes()
145
+  // }
139
   
146
   
140
   onLoad((option) => {
147
   onLoad((option) => {
141
-		console.log(888,option)
148
+		console.log(123,option)
149
+		let name = option.commonDeptName.split('/')
142
 		if(option.data!='none'){
150
 		if(option.data!='none'){
143
 			let data = JSON.parse(option.data).split(',')
151
 			let data = JSON.parse(option.data).split(',')
144
 			optionData.value = data
152
 			optionData.value = data
153
+			deptSelectName.value = []
154
+			for(let i in optionData.value){
155
+				deptSelectName.value.push({
156
+					value:optionData.value[i],
157
+					text:name[i]
158
+				})
159
+			}
145
 		}
160
 		}
146
-    onLoadFn();
161
+		deptId.value = option.deptId
162
+    getRepairTypes();
147
   })
163
   })
148
   
164
   
149
-  onTabItemTap(e => {
150
-    onLoadFn();
151
-  })
165
+  // onTabItemTap(e => {
166
+  //   onLoadFn();
167
+  // })
152
 </script>
168
 </script>
153
 
169
 
154
 <style scoped>
170
 <style scoped>

+ 33 - 20
pages/repair/home.vue

@@ -1,13 +1,13 @@
1
 <template>
1
 <template>
2
 	<view class="home">
2
 	<view class="home">
3
-		<view class="home_item" v-if="isDept.valueconfig==1" @click="repairsView(1)">
3
+		<view class="home_item" v-if="isDept.valueconfig==1">
4
 		  <view class="title">科室报修</view>
4
 		  <view class="title">科室报修</view>
5
 		  <view class="content">
5
 		  <view class="content">
6
-				<view>
6
+				<view @click="repairsView(1,'pending,handler,reassign')">
7
 					<view class="con-title">处理中</view>
7
 					<view class="con-title">处理中</view>
8
 					<view class="con-value">{{repairData.deptHandlerCount}}</view>
8
 					<view class="con-value">{{repairData.deptHandlerCount}}</view>
9
 				</view>
9
 				</view>
10
-				<view>
10
+				<view @click="repairsView(1,'close0')">
11
 					<view class="con-title">待评价</view>
11
 					<view class="con-title">待评价</view>
12
 					<view class="con-value">{{repairData.deptCloseCount}}</view>
12
 					<view class="con-value">{{repairData.deptCloseCount}}</view>
13
 				</view>
13
 				</view>
@@ -17,14 +17,14 @@
17
 				</view>
17
 				</view>
18
 		  </view>
18
 		  </view>
19
 		</view>
19
 		</view>
20
-		<view class="home_item" @click="repairsView(0)">
20
+		<view class="home_item">
21
 		  <view class="title">我的报修</view>
21
 		  <view class="title">我的报修</view>
22
 		  <view class="content">
22
 		  <view class="content">
23
-				<view>
23
+				<view @click="repairsView(0,'pending,handler,reassign')">
24
 					<view class="con-title">处理中</view>
24
 					<view class="con-title">处理中</view>
25
 					<view class="con-value">{{repairData.userHandlerCount}}</view>
25
 					<view class="con-value">{{repairData.userHandlerCount}}</view>
26
 				</view>
26
 				</view>
27
-				<view>
27
+				<view @click="repairsView(0,'close0')">
28
 					<view class="con-title">待评价</view>
28
 					<view class="con-title">待评价</view>
29
 					<view class="con-value">{{repairData.userCloseCount}}</view>
29
 					<view class="con-value">{{repairData.userCloseCount}}</view>
30
 				</view>
30
 				</view>
@@ -60,7 +60,7 @@
60
 	import { SM } from "@/http/http.js"
60
 	import { SM } from "@/http/http.js"
61
 	import { ref, reactive } from 'vue'
61
 	import { ref, reactive } from 'vue'
62
 	import { onLoad,onShow } from '@dcloudio/uni-app'
62
 	import { onLoad,onShow } from '@dcloudio/uni-app'
63
-	import { api_systemConfiguration, api_getNotice, api_getCount } from "@/http/api.js"
63
+	import { api_systemConfiguration, api_repairScanCode, api_getNotice, api_getCount } from "@/http/api.js"
64
 	import { useSetTitle } from '@/share/useSetTitle.js'
64
 	import { useSetTitle } from '@/share/useSetTitle.js'
65
 	import { repositoryListSearchStore } from '@/stores/repositorySearch'
65
 	import { repositoryListSearchStore } from '@/stores/repositorySearch'
66
 	import { useSetTabbar } from '@/share/useSetTabbar.js'
66
 	import { useSetTabbar } from '@/share/useSetTabbar.js'
@@ -69,6 +69,7 @@
69
 	// 数据
69
 	// 数据
70
 	const isDept = ref({})
70
 	const isDept = ref({})
71
 	const isRepair = ref({})
71
 	const isRepair = ref({})
72
+	const isPublic = ref({})
72
 	const noticeData = ref('')
73
 	const noticeData = ref('')
73
 	const repairData = ref({})
74
 	const repairData = ref({})
74
 	const repositorySearchStore = repositoryListSearchStore();
75
 	const repositorySearchStore = repositoryListSearchStore();
@@ -77,14 +78,14 @@
77
 	function repository(){
78
 	function repository(){
78
 		repositorySearchStore.clearRepositoryListSearchData()
79
 		repositorySearchStore.clearRepositoryListSearchData()
79
 		uni.navigateTo({
80
 		uni.navigateTo({
80
-		  url: `/pages/repository/repository?type=view`
81
+		  url: `/pages/repository/repository?type=view&entranceType=repairs`
81
 		})
82
 		})
82
 	}
83
 	}
83
 	
84
 	
84
 	// 报修列表
85
 	// 报修列表
85
-	function repairsView(type){
86
+	function repairsView(type,value){
86
 	  uni.navigateTo({
87
 	  uni.navigateTo({
87
-	    url: '/pages/repair/repairsList?type='+type
88
+	    url: `/pages/repair/repairsList?type=${type}&value=${value}`
88
 	  })
89
 	  })
89
 	}
90
 	}
90
 	
91
 	
@@ -110,14 +111,15 @@
110
 		  mask: true,
111
 		  mask: true,
111
 		});
112
 		});
112
 		api_getCount({}).then(res=>{
113
 		api_getCount({}).then(res=>{
114
+			uni.hideLoading();
113
 			repairData.value = res.data
115
 			repairData.value = res.data
114
-			getNotice()
116
+			// getNotice()
115
 		})
117
 		})
116
 	}
118
 	}
117
 	
119
 	
118
 	// 快速报修
120
 	// 快速报修
119
 	function addRepairs(){
121
 	function addRepairs(){
120
-		if(isDept.value.valueconfig==0 && isRepair.value.valueconfig==0){
122
+		if(isDept.value.valueconfig==0 && isPublic.value.valueconfig==0){
121
 			uni.showToast({
123
 			uni.showToast({
122
 				icon: 'none',
124
 				icon: 'none',
123
 			  title: '请先开启科室报修或公共报修'
125
 			  title: '请先开启科室报修或公共报修'
@@ -131,16 +133,26 @@
131
 	
133
 	
132
 	// 扫资产报修
134
 	// 扫资产报修
133
 	function scanCodes(){
135
 	function scanCodes(){
134
-		uni.showToast({
135
-			icon: 'none',
136
-		  title: '暂未开通'
136
+		uni.showLoading({
137
+		  title: "加载中",
138
+		  mask: true,
137
 		});
139
 		});
138
-		return;
139
 		SM().then((res) => {
140
 		SM().then((res) => {
140
-		  let postData = {
141
-		    code: ress1,
142
-		    account: loginUserStore.loginUser.user.account,
143
-		  };
141
+			api_repairScanCode({
142
+				code:res
143
+			}).then((res2) => {
144
+			  uni.hideLoading();
145
+			  if (res2.state == 200) {
146
+					uni.navigateTo({
147
+					  url: `/pages/repair/rapidRep?property=${res2.data.name}&assetId=${res2.data.id}`
148
+					})
149
+			  } else {
150
+			    uni.showToast({
151
+			      icon: 'none',
152
+			      title: res2.msg || '请求数据失败!'
153
+			    });
154
+			  }
155
+			});
144
 		})
156
 		})
145
 	}
157
 	}
146
 	
158
 	
@@ -163,6 +175,7 @@
163
 		let data = JSON.parse(uni.getStorageSync('sysData'))
175
 		let data = JSON.parse(uni.getStorageSync('sysData'))
164
 		isDept.value = data.find(i=>i.keyconfig=='deptRepair')
176
 		isDept.value = data.find(i=>i.keyconfig=='deptRepair')
165
 		isRepair.value = data.find(i=>i.keyconfig=='cmdbRepair')
177
 		isRepair.value = data.find(i=>i.keyconfig=='cmdbRepair')
178
+		isPublic.value = data.find(i=>i.keyconfig=='publicRepair')
166
 	})
179
 	})
167
 	
180
 	
168
 
181
 

+ 70 - 26
pages/repair/rapidRep.vue

@@ -10,7 +10,7 @@
10
 			</view> -->
10
 			</view> -->
11
 			<view class="form_item" v-if="cmdbRepair.valueconfig==1">
11
 			<view class="form_item" v-if="cmdbRepair.valueconfig==1">
12
 				<view class="title select">关联资产:</view>
12
 				<view class="title select">关联资产:</view>
13
-				<input class="item-input" placeholder="请扫描资产卡二维码" v-model="dataInfo.property"/>
13
+				<input class="item-input" disabled placeholder="请扫描资产卡二维码" v-model="dataInfo.property"/>
14
 				<text class="newicon newicon-saoma icon" @click="scanCodes"></text>
14
 				<text class="newicon newicon-saoma icon" @click="scanCodes"></text>
15
 			</view>
15
 			</view>
16
 			<view class="form_item">
16
 			<view class="form_item">
@@ -20,12 +20,12 @@
20
 					 limit="4" @success="handlerImgSuccess" file-mediatype="all" mode="grid"
20
 					 limit="4" @success="handlerImgSuccess" file-mediatype="all" mode="grid"
21
 					@fail="handlerImgFail" @select="handlerImgSelect" @delete="handlerImgDelete">
21
 					@fail="handlerImgFail" @select="handlerImgSelect" @delete="handlerImgDelete">
22
 					</uni-file-picker>
22
 					</uni-file-picker>
23
-					<view class="imgTips">(支持JPG/PNG格式图片,单张大小3M以内,录像支持30秒)</view>
23
+					<view class="imgTips">(支持JPG/PNG格式图片,单张大小10M以内,录像支持30秒)</view>
24
 				</view>
24
 				</view>
25
 			</view>
25
 			</view>
26
 			<view class="form_item">
26
 			<view class="form_item">
27
 				<view class="title">录音:</view>
27
 				<view class="title">录音:</view>
28
-				<view class="chunk" v-if="!dataInfo.localId" @longpress="examineRecord($event)" @touchend="recStop($event)">长按录音</view>
28
+				<view class="chunk" v-if="!dataInfo.localId" @touchstart.stop="examineRecord($event)">点击录音</view>
29
 				<view class="chunk-2" v-if="dataInfo.localId">
29
 				<view class="chunk-2" v-if="dataInfo.localId">
30
 					<view class="chunk-2-2" @click="playAudio">
30
 					<view class="chunk-2-2" @click="playAudio">
31
 						<view>播放录音</view>
31
 						<view>播放录音</view>
@@ -44,7 +44,7 @@
44
 				<image class="mask-img" src="../../static/img/audio_play.gif" mode=""></image>
44
 				<image class="mask-img" src="../../static/img/audio_play.gif" mode=""></image>
45
 			</view>
45
 			</view>
46
 			<view class="mask-bottom">
46
 			<view class="mask-bottom">
47
-				<view class="mask-bottom-txt">松开完成</view>
47
+				<view class="mask-bottom-txt" @touchend.stop="recStop($event)">结束录音</view>
48
 			</view>
48
 			</view>
49
 		</view>
49
 		</view>
50
 	</view>
50
 	</view>
@@ -56,7 +56,7 @@
56
   import NumberModal from '@/components/NumberModal.vue';
56
   import NumberModal from '@/components/NumberModal.vue';
57
   import { onLoad } from '@dcloudio/uni-app'
57
   import { onLoad } from '@dcloudio/uni-app'
58
   import { generateNumberArray } from '@/utils/index.js'
58
   import { generateNumberArray } from '@/utils/index.js'
59
-  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"
59
+  import { api_group, api_repairScanCode, api_incidentDetail, api_getSolution, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_getDictionary, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
60
   import { defaultColor } from '@/static/js/theme.js'
60
   import { defaultColor } from '@/static/js/theme.js'
61
   import { useSetTitle } from '@/share/useSetTitle.js'
61
   import { useSetTitle } from '@/share/useSetTitle.js'
62
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
62
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -94,7 +94,7 @@
94
     incidentData: {},//事件对象
94
     incidentData: {},//事件对象
95
     description: '',//故障描述
95
     description: '',//故障描述
96
 		property:'', //资产
96
 		property:'', //资产
97
-		assetId:'',//资产id
97
+		assetId:null,//资产id
98
     handlerImgList: [],//处理图片列表
98
     handlerImgList: [],//处理图片列表
99
 		localId:'' ,//录音本地id
99
 		localId:'' ,//录音本地id
100
 		serverId:'',//录音服务器id
100
 		serverId:'',//录音服务器id
@@ -150,6 +150,10 @@
150
 	// 录音状态
150
 	// 录音状态
151
 	const isrecordType = ref(false);
151
 	const isrecordType = ref(false);
152
 	
152
 	
153
+	const longPressTimer = ref(null); // 长按定时器
154
+	
155
+	const touchStartTime = ref(0); // 触摸开始时间
156
+				
153
   // 上一步或者返回列表
157
   // 上一步或者返回列表
154
   function goBackOrToList(){
158
   function goBackOrToList(){
155
 		uni.setStorageSync('repairData','')
159
 		uni.setStorageSync('repairData','')
@@ -178,7 +182,7 @@
178
 		    wx.ready(function() {
182
 		    wx.ready(function() {
179
 					// 开始录音
183
 					// 开始录音
180
 					wx.startRecord({
184
 					wx.startRecord({
181
-						success: function() {		
185
+						success: function(res) {	
182
 							isrecordType.value = true
186
 							isrecordType.value = true
183
 						},					
187
 						},					
184
 						cancel: function() {
188
 						cancel: function() {
@@ -214,16 +218,27 @@
214
 	
218
 	
215
 	// 开始录音
219
 	// 开始录音
216
 	function examineRecord(e) {
220
 	function examineRecord(e) {
217
-		// uni.vibrateLong({
218
-		// 	success: function () {
219
-		// 		console.log('success');
220
-		// 	}
221
-		// });
222
-		recOpen()
221
+		// touchStartTime.value = e.timeStamp;
222
+		// 设置长按定时器
223
+		// longPressTimer.value = setTimeout(() => {
224
+			// 长按事件处理
225
+			recOpen()
226
+		// }, 300);
223
 	}
227
 	}
224
 	
228
 	
225
 	// 结束录音
229
 	// 结束录音
226
 	function recStop(e) {
230
 	function recStop(e) {
231
+		// clearTimeout(longPressTimer.value);
232
+		// 如果手指松开时间太短,则不是长按
233
+		// const touchEndTime = e.timeStamp;
234
+		// if (touchEndTime - touchStartTime.value < 1000) {
235
+		// 	// 处理快速点击
236
+		// 	uni.showToast({
237
+		// 	  icon: 'none',
238
+		// 	  title: '长按时间太短'
239
+		// 	});
240
+		// 	return
241
+		// }
227
 		if(isrecordType.value){
242
 		if(isrecordType.value){
228
 			wx.stopRecord({
243
 			wx.stopRecord({
229
 				success: function (res) {
244
 				success: function (res) {
@@ -269,8 +284,26 @@
269
 	
284
 	
270
 	// 扫码资产码
285
 	// 扫码资产码
271
 	function scanCodes(){
286
 	function scanCodes(){
287
+		uni.showLoading({
288
+		  title: "加载中",
289
+		  mask: true,
290
+		});
291
+
272
 		SM().then((res) => {
292
 		SM().then((res) => {
273
-			dataInfo.assetId = res;
293
+			api_repairScanCode({
294
+				code:res
295
+			}).then((res2) => {
296
+			  uni.hideLoading();
297
+			  if (res2.state == 200) {
298
+			    dataInfo.property = res2.data.name
299
+					dataInfo.assetId = res2.data.id
300
+			  } else {
301
+			    uni.showToast({
302
+			      icon: 'none',
303
+			      title: res2.msg || '请求数据失败!'
304
+			    });
305
+			  }
306
+			});
274
 		})
307
 		})
275
 	}
308
 	}
276
 	
309
 	
@@ -317,10 +350,16 @@
317
   // 选择上传图片
350
   // 选择上传图片
318
   function handlerImgSelect(e){
351
   function handlerImgSelect(e){
319
 		console.log(6666,e.tempFiles)
352
 		console.log(6666,e.tempFiles)
353
+		// 10*1024*1024 //10M
320
 		if(e.tempFiles[0].extname=='mp4' ||
354
 		if(e.tempFiles[0].extname=='mp4' ||
321
 			e.tempFiles[0].extname=='avi' || 
355
 			e.tempFiles[0].extname=='avi' || 
322
 			e.tempFiles[0].extname=='mpeg' || 
356
 			e.tempFiles[0].extname=='mpeg' || 
323
-			e.tempFiles[0].extname=='wmv'){
357
+			e.tempFiles[0].extname=='wmv' ||
358
+			e.tempFiles[0].extname=='mov' ||
359
+			e.tempFiles[0].extname=='3gp' ||
360
+			e.tempFiles[0].extname=='flv' ||
361
+			e.tempFiles[0].extname=='mkv'
362
+			){
324
 				let item = dataInfo.handlerImgList.findIndex(i=>i.extname==e.tempFiles[0].extname)
363
 				let item = dataInfo.handlerImgList.findIndex(i=>i.extname==e.tempFiles[0].extname)
325
 				if(item!=-1){
364
 				if(item!=-1){
326
 					uni.showToast({
365
 					uni.showToast({
@@ -340,7 +379,11 @@
340
 					e.tempFiles[0].extname=='mp4' ||
379
 					e.tempFiles[0].extname=='mp4' ||
341
 					e.tempFiles[0].extname=='avi' || 
380
 					e.tempFiles[0].extname=='avi' || 
342
 					e.tempFiles[0].extname=='mpeg' || 
381
 					e.tempFiles[0].extname=='mpeg' || 
343
-					e.tempFiles[0].extname=='wmv'
382
+					e.tempFiles[0].extname=='wmv' ||
383
+					e.tempFiles[0].extname=='mov' ||
384
+					e.tempFiles[0].extname=='3gp' ||
385
+					e.tempFiles[0].extname=='flv' ||
386
+					e.tempFiles[0].extname=='mkv'
344
 					){
387
 					){
345
 					}else{
388
 					}else{
346
 						uni.showToast({
389
 						uni.showToast({
@@ -400,7 +443,11 @@
400
       incident: dataInfo.incidentData
443
       incident: dataInfo.incidentData
401
     }
444
     }
402
     postData.incident.description = dataInfo.description;
445
     postData.incident.description = dataInfo.description;
403
-    postData.incident.assetId = dataInfo.assetId;
446
+		if(dataInfo.assetId){
447
+			postData.incident.assetId = dataInfo.assetId;
448
+		}else{
449
+			delete postData.incident.assetId 
450
+		}
404
     return api_incidentTask(dataInfo.tabActiveValue, postData);
451
     return api_incidentTask(dataInfo.tabActiveValue, postData);
405
   }
452
   }
406
   
453
   
@@ -410,17 +457,14 @@
410
   }
457
   }
411
 	
458
 	
412
   onLoad((option) => {
459
   onLoad((option) => {
413
-		// let storeData = handlerStore.handler.data
414
-		// if(storeData && storeData.type=='rep'){
415
-		// 	solutionId.value = storeData.solutionId
416
-		// 	dataInfo.isSummaryNext = storeData.isSummaryNext
417
-		// 	dataInfo.incidentId = storeData.incidentId;
418
-		// }else{
419
-		// 	dataInfo.incidentId = option.incidentId;
420
-		// 	dataInfo.isSummaryNext = option.isSummaryNext == 1;
421
-		// }
422
 		let data = JSON.parse(uni.getStorageSync('sysData'))
460
 		let data = JSON.parse(uni.getStorageSync('sysData'))
423
 		cmdbRepair.value = data.find(i=>i.keyconfig=='cmdbRepair')
461
 		cmdbRepair.value = data.find(i=>i.keyconfig=='cmdbRepair')
462
+		if(option){
463
+			if(option.property && option.assetId){
464
+				dataInfo.property = option.property
465
+				dataInfo.assetId = option.assetId
466
+			}
467
+		}
424
     getIncidentDetail();
468
     getIncidentDetail();
425
   })
469
   })
426
 </script>
470
 </script>

+ 113 - 64
pages/repair/rapidRepNext.vue

@@ -5,28 +5,28 @@
5
         {{tab.name}}<text v-if="tab.num !== ''">({{tab.num}})</text>
5
         {{tab.name}}<text v-if="tab.num !== ''">({{tab.num}})</text>
6
       </view>
6
       </view>
7
     </view>
7
     </view>
8
-		<view class="body view-body" :class="{ page_padding: !(dataInfo.tabActiveValue === 'doing' && isInSummaryOrder), bg: (dataInfo.tabActiveValue === 'doing' && isInSummaryOrder) }">
8
+		<view class="body view-body page_padding">
9
       <!-- 科内报修 -->
9
       <!-- 科内报修 -->
10
       <template v-if="dataInfo.tabActiveValue === 'doing'">
10
       <template v-if="dataInfo.tabActiveValue === 'doing'">
11
-				<view class="form_item" v-if="isRepair.valueconfig==1">
11
+				<view class="form_item">
12
 				  <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
12
 				  <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
13
 					<uni-data-picker class="value" placeholder="请选择院区"
13
 					<uni-data-picker class="value" placeholder="请选择院区"
14
-						v-model="dataInfo.branch" :localdata="branchData"
14
+						v-model="dataInfo.branch" :localdata="branchData" @change="doingDeptChange"
15
 						:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.branch}">
15
 						:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.branch}">
16
 					</uni-data-picker>
16
 					</uni-data-picker>
17
 				</view>
17
 				</view>
18
         <view class="form_item">
18
         <view class="form_item">
19
           <view class="title select"><text class="required newicon newicon-bitian"></text>报修科室:</view>
19
           <view class="title select"><text class="required newicon newicon-bitian"></text>报修科室:</view>
20
-        	<uni-data-picker class="value" placeholder="请选择报修科室"
20
+        	<uni-data-picker class="value" placeholder="请选择报修科室" 
21
         		v-model="dataInfo.department" :localdata="dataInfo.repairTypeList"
21
         		v-model="dataInfo.department" :localdata="dataInfo.repairTypeList"
22
         		:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.department}">
22
         		:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.department}">
23
         	</uni-data-picker>
23
         	</uni-data-picker>
24
         </view>
24
         </view>
25
-				<view class="candidate" v-if="candidateData.commonDeptDTO.length">
26
-					<view class="candidate-item" v-for="item in candidateData.commonDeptDTO" :key="item" @click="itemCandidate(item)">{{item.dept}}</view>
25
+				<view class="candidate" v-if="itemUser">
26
+					<view class="candidate-item" v-for="(item, index) in itemUser.commonDeptDTO" :key="item" @click="itemCandidate(item)">{{item.dept}}</view>
27
 				</view>
27
 				</view>
28
 				
28
 				
29
-				<view class="form_item column" v-if="isRepair.valueconfig==1">
29
+				<view class="form_item column">
30
 					<view class="title"><text class="required newicon newicon-bitian"></text>详细地址:</view>
30
 					<view class="title"><text class="required newicon newicon-bitian"></text>详细地址:</view>
31
 					<uni-easyinput class="value" type="textarea" v-model="dataInfo.address" placeholder="请输入详细地址"  :class="{formRed: isSubmit && !dataInfo.address }" />
31
 					<uni-easyinput class="value" type="textarea" v-model="dataInfo.address" placeholder="请输入详细地址"  :class="{formRed: isSubmit && !dataInfo.address }" />
32
 				</view>
32
 				</view>
@@ -47,6 +47,13 @@
47
 
47
 
48
       <!-- 公共报修 -->
48
       <!-- 公共报修 -->
49
       <template v-if="dataInfo.tabActiveValue === 'overtime'">
49
       <template v-if="dataInfo.tabActiveValue === 'overtime'">
50
+				<view class="form_item" v-if="isRepair.valueconfig==1">
51
+				  <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
52
+					<uni-data-picker class="value" placeholder="请选择院区" @change="overDeptChange"
53
+						v-model="dataInfo.branch" :localdata="branchData"
54
+						:clear-icon="false" :class="{formRed: isSubmit && !dataInfo.branch}">
55
+					</uni-data-picker>
56
+				</view>
50
        <view class="form_item" v-if="isRepair.valueconfig==1">
57
        <view class="form_item" v-if="isRepair.valueconfig==1">
51
          <view class="title select"><text class="required newicon newicon-bitian"></text>楼栋:</view>
58
          <view class="title select"><text class="required newicon newicon-bitian"></text>楼栋:</view>
52
        	<uni-data-picker class="value" placeholder="请选择楼栋" @change="areaChange"
59
        	<uni-data-picker class="value" placeholder="请选择楼栋" @change="areaChange"
@@ -70,12 +77,12 @@
70
        
77
        
71
        <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contacts}">
78
        <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contacts}">
72
        	<view class="title select"><text class="required newicon newicon-bitian"></text>联系人:</view>
79
        	<view class="title select"><text class="required newicon newicon-bitian"></text>联系人:</view>
73
-       	<input class="item-input value" focus placeholder="请输入联系人" v-model="dataInfo.contacts"/>
80
+       	<input class="item-input value" placeholder="请输入联系人" v-model="dataInfo.contacts"/>
74
        </view>
81
        </view>
75
        
82
        
76
        <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contactsInformation}">
83
        <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contactsInformation}">
77
        	<view class="title select"><text class="required newicon newicon-bitian"></text>联系电话:</view>
84
        	<view class="title select"><text class="required newicon newicon-bitian"></text>联系电话:</view>
78
-       	<input class="item-input value" focus placeholder="请输入联系电话" v-model="dataInfo.contactsInformation"/>
85
+       	<input class="item-input value" placeholder="请输入联系电话" v-model="dataInfo.contactsInformation"/>
79
        </view>
86
        </view>
80
       </template>
87
       </template>
81
 		</view>
88
 		</view>
@@ -166,6 +173,7 @@
166
 		branch:'', //院区
173
 		branch:'', //院区
167
   })
174
   })
168
   
175
   
176
+	
169
 	// 故障处理用是否提供备用机
177
 	// 故障处理用是否提供备用机
170
 	const newProvideBackupMachine = ref(0)
178
 	const newProvideBackupMachine = ref(0)
171
 	
179
 	
@@ -178,6 +186,9 @@
178
   // 处理图片
186
   // 处理图片
179
   const handlerImgRef = ref(null)
187
   const handlerImgRef = ref(null)
180
   
188
   
189
+	// 用户信息
190
+	const itemUser = ref(null)
191
+		
181
   // 是否进入汇总单
192
   // 是否进入汇总单
182
   const isInSummaryOrder = computed(() => {
193
   const isInSummaryOrder = computed(() => {
183
     return dataInfo.tabActiveValue === 'doing' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && (dataInfo.incidentData.handlingPersonnelUser.id == loginUserStore.loginUser.user.id);
194
     return dataInfo.tabActiveValue === 'doing' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && (dataInfo.incidentData.handlingPersonnelUser.id == loginUserStore.loginUser.user.id);
@@ -203,13 +214,17 @@
203
   // 初始化表单
214
   // 初始化表单
204
   function initForm(){
215
   function initForm(){
205
     if(dataInfo.tabActiveValue === 'doing'){
216
     if(dataInfo.tabActiveValue === 'doing'){
206
-      getRepairTypes()
217
+      // getRepairTypes()
218
+			getUserInfo()
207
     }else if(dataInfo.tabActiveValue === 'overtime'){
219
     }else if(dataInfo.tabActiveValue === 'overtime'){
208
 			getbuildingList()
220
 			getbuildingList()
209
     }
221
     }
210
   }
222
   }
211
   
223
   
212
 	function itemCandidate(item){
224
 	function itemCandidate(item){
225
+		// console.log(55,index)
226
+		// let arr = loginUserStore.loginUser.user.commonDept.split(',')
227
+		// console.log(66,arr)
213
 		dataInfo.department = item.id
228
 		dataInfo.department = item.id
214
 	}
229
 	}
215
 	
230
 	
@@ -217,6 +232,30 @@
217
 		dataInfo.address = item.name
232
 		dataInfo.address = item.name
218
 	}
233
 	}
219
 	
234
 	
235
+	function getUserInfo(){
236
+		let user = loginUserStore.loginUser.user
237
+		let postData = {
238
+		  idx: 0,
239
+		  sum: 999,
240
+		  user: {
241
+				hospital:{
242
+					id:user.currentHospital.id
243
+				},
244
+		    name: user.name,
245
+		  }
246
+		}
247
+		api_user(postData).then(res => {
248
+		  if(res.status == 200){
249
+		    itemUser.value = res.list.find(i=>i.id==user.id)
250
+		  }else{
251
+		    uni.showToast({
252
+		      icon: 'none',
253
+		      title: res.msg || '请求数据失败!'
254
+		    });
255
+		  }
256
+		})
257
+	}
258
+	
220
   // 点击tab
259
   // 点击tab
221
   function clickTab(tabValue){
260
   function clickTab(tabValue){
222
     if(dataInfo.tabActiveValue == tabValue){
261
     if(dataInfo.tabActiveValue == tabValue){
@@ -242,6 +281,7 @@
242
     		dataInfo.contactsInformation = data.contactsInformation//手机
281
     		dataInfo.contactsInformation = data.contactsInformation//手机
243
 				dataInfo.branch = data.branch//院区
282
 				dataInfo.branch = data.branch//院区
244
     		dataInfo.areaId = data.areaId//楼栋
283
     		dataInfo.areaId = data.areaId//楼栋
284
+				getRepairTypes()
245
     	}
285
     	}
246
     }
286
     }
247
 		if(uni.getStorageSync('repairData')){
287
 		if(uni.getStorageSync('repairData')){
@@ -257,13 +297,35 @@
257
 		let data = JSON.parse(uni.getStorageSync('sysData'))
297
 		let data = JSON.parse(uni.getStorageSync('sysData'))
258
 		isDept.value = data.find(i=>i.keyconfig=='deptRepair')
298
 		isDept.value = data.find(i=>i.keyconfig=='deptRepair')
259
 		isRepair.value = data.find(i=>i.keyconfig=='publicRepair')
299
 		isRepair.value = data.find(i=>i.keyconfig=='publicRepair')
260
-		
300
+		if(isDept.value.valueconfig==1 && isRepair.value.valueconfig==1){
301
+			dataInfo.tabs = [
302
+				{id: 5, name: '科内报修', value: 'doing', num: ''},
303
+				{id: 6, name: '公共报修', value: 'overtime', num: ''},
304
+			]
305
+			dataInfo.tabActiveValue = 'doing'
306
+		}else if(isDept.value.valueconfig==1){
307
+			dataInfo.tabs = [
308
+				{id: 5, name: '科内报修', value: 'doing', num: ''},
309
+			]
310
+			dataInfo.tabActiveValue = 'doing'
311
+		}else if(isRepair.value.valueconfig==1){
312
+			dataInfo.tabs = [
313
+				{id: 6, name: '公共报修', value: 'overtime', num: ''},
314
+			]
315
+			dataInfo.tabActiveValue = 'overtime'
316
+			getbuildingList()
317
+		}
261
 		let user = loginUserStore.loginUser.user
318
 		let user = loginUserStore.loginUser.user
262
 		if(user){
319
 		if(user){
263
-			dataInfo.branch = user.currentHospital.id
320
+			if(user.currentHospital.parent){
321
+				dataInfo.branch = user.currentHospital.parent.id
322
+			}else{
323
+				dataInfo.branch = user.currentHospital.id
324
+			}
264
 			dataInfo.contacts = user.name
325
 			dataInfo.contacts = user.name
265
 			dataInfo.contactsInformation = user.phone
326
 			dataInfo.contactsInformation = user.phone
266
 			dataInfo.department = user.dept.id
327
 			dataInfo.department = user.dept.id
328
+			getRepairTypes()
267
 		}
329
 		}
268
 		
330
 		
269
 		let postData = {
331
 		let postData = {
@@ -279,18 +341,21 @@
279
   
341
   
280
 	// 获取院区列表
342
 	// 获取院区列表
281
 	function getBranch(){
343
 	function getBranch(){
282
-		let postData = {
283
-			idx:0,
284
-			sum:9999
285
-		}
286
-		api_branch(postData).then(res => {
287
-		  uni.hideLoading();
288
-		  res = res.list || [];
289
-		  branchData.value = res.map(v => ({
290
-		    text: v.hosName,
291
-		    value: v.id,
292
-		  }));
293
-		})
344
+		let arr = loginUserStore.loginUser.hospital.filter(i=>i.parent==undefined)
345
+		branchData.value = arr.map(v => ({
346
+		  text: v.hosName,
347
+		  value: v.id,
348
+		}));
349
+	}
350
+	
351
+	// 科内报修选择院区
352
+	function doingDeptChange(){
353
+		getRepairTypes()
354
+	}
355
+	
356
+	// 公区报修选择院区
357
+	function overDeptChange(){
358
+		getbuildingList()
294
 	}
359
 	}
295
 	
360
 	
296
   // 获取报修科室列表
361
   // 获取报修科室列表
@@ -301,7 +366,7 @@
301
     });
366
     });
302
     let postData = {
367
     let postData = {
303
 			department: {
368
 			department: {
304
-			  hospital: loginUserStore.loginUser.user.currentHospital.id,
369
+			  hospital: dataInfo.branch,
305
 			},
370
 			},
306
 			idx:0,
371
 			idx:0,
307
 			sum:9999
372
 			sum:9999
@@ -312,7 +377,9 @@
312
       dataInfo.repairTypeList = res.map(v => ({
377
       dataInfo.repairTypeList = res.map(v => ({
313
         text: v.dept,
378
         text: v.dept,
314
         value: v.id,
379
         value: v.id,
380
+				floor: v.floor
315
       }));
381
       }));
382
+			
316
     })
383
     })
317
   }
384
   }
318
   
385
   
@@ -326,7 +393,7 @@
326
 		  idx: 0,
393
 		  idx: 0,
327
 		  sum: 9999,
394
 		  sum: 9999,
328
 			building:{
395
 			building:{
329
-				hosId: loginUserStore.loginUser.user.currentHospital.id,
396
+				hosId: dataInfo.branch,
330
 			}
397
 			}
331
 		};
398
 		};
332
 		getFetchDataList("simple/data", "building", postData)
399
 		getFetchDataList("simple/data", "building", postData)
@@ -351,7 +418,7 @@
351
 	    sum: 9999,
418
 	    sum: 9999,
352
 			floor: {
419
 			floor: {
353
 			  buildId:e,
420
 			  buildId:e,
354
-				hosId:loginUserStore.loginUser.user.currentHospital.id
421
+				hosId:dataInfo.branch
355
 			}
422
 			}
356
 	  };
423
 	  };
357
 		
424
 		
@@ -374,18 +441,22 @@
374
   
441
   
375
   // 处理提交事件
442
   // 处理提交事件
376
   function handlerOrder(){
443
   function handlerOrder(){
444
+		let postData = {
445
+		  incident: dataInfo.incidentData,
446
+			serverId: ''
447
+		}
448
+		postData.incident.place = {}
377
 		if(dataInfo.tabActiveValue === 'doing'){
449
 		if(dataInfo.tabActiveValue === 'doing'){
378
 			let data = repairIncident.value.find(i=>i.value=='dept')
450
 			let data = repairIncident.value.find(i=>i.value=='dept')
379
 			dataInfo.incidentData.repairIncidentType.id = data.id
451
 			dataInfo.incidentData.repairIncidentType.id = data.id
452
+			let deptItem = dataInfo.repairTypeList.find(i=>i.value == dataInfo.department)
453
+			postData.incident.place.id = deptItem.floor.id
380
 		}else if(dataInfo.tabActiveValue === 'overtime'){
454
 		}else if(dataInfo.tabActiveValue === 'overtime'){
381
 			let data = repairIncident.value.find(i=>i.value=='public')
455
 			let data = repairIncident.value.find(i=>i.value=='public')
382
 			dataInfo.incidentData.repairIncidentType.id = data.id
456
 			dataInfo.incidentData.repairIncidentType.id = data.id
457
+			postData.incident.place.id = dataInfo.placeId;
383
 		}
458
 		}
384
 		dataInfo.incidentData.department.id = dataInfo.department
459
 		dataInfo.incidentData.department.id = dataInfo.department
385
-    let postData = {
386
-      incident: dataInfo.incidentData,
387
-			serverId: ''
388
-    }
389
     postData.incident.description = dataInfo.description;
460
     postData.incident.description = dataInfo.description;
390
 		if(dataInfo.serverId){
461
 		if(dataInfo.serverId){
391
 			postData.serverId = dataInfo.serverId;
462
 			postData.serverId = dataInfo.serverId;
@@ -397,8 +468,7 @@
397
 		postData.incident.contacts = dataInfo.contacts;
468
 		postData.incident.contacts = dataInfo.contacts;
398
 		postData.incident.contactsInformation = dataInfo.contactsInformation;
469
 		postData.incident.contactsInformation = dataInfo.contactsInformation;
399
 		postData.incident.hosId = dataInfo.branch;
470
 		postData.incident.hosId = dataInfo.branch;
400
-		postData.incident.place = {}
401
-		postData.incident.place.id = dataInfo.placeId;
471
+
402
 		// postData.incident.buildId = dataInfo.areaId; //areaId:楼栋   
472
 		// postData.incident.buildId = dataInfo.areaId; //areaId:楼栋   
403
   //   postData.incident.floorId = dataInfo.placeId;//placeId:楼层
473
   //   postData.incident.floorId = dataInfo.placeId;//placeId:楼层
404
 		// buildId
474
 		// buildId
@@ -478,7 +548,16 @@
478
   
548
   
479
   // 处理图片
549
   // 处理图片
480
   function handlerOrderImg(imgObj){
550
   function handlerOrderImg(imgObj){
481
-    return uploadFile(imgObj, 'wechatRequesterIncident', dataInfo.incidentId)
551
+		let allData = null
552
+		if(imgObj.extname=='mp4' ||
553
+			imgObj.extname=='avi' || 
554
+			imgObj.extname=='mpeg' || 
555
+			imgObj.extname=='wmv'){
556
+				allData = uploadFile(imgObj, 'wechatIncidentVideo', dataInfo.incidentId)
557
+			}else{
558
+				allData = uploadFile(imgObj, 'wechatRequesterIncident', dataInfo.incidentId)
559
+			}
560
+		return allData
482
   }
561
   }
483
   
562
   
484
   // 处理提交
563
   // 处理提交
@@ -547,36 +626,6 @@
547
       mask: true,
626
       mask: true,
548
     });
627
     });
549
 		handlerOrder()
628
 		handlerOrder()
550
-		return
551
-		if(dataInfo.handlerImgList.length){
552
-		  // 有图片
553
-		  // handlerImgRef.value.upload();
554
-		}else{
555
-		  // 没有图片
556
-		  let handlerOrder$ = handlerOrder();
557
-		  let requestList = [handlerOrder$];
558
-		  Promise.all(requestList).then(resList => {
559
-		    uni.hideLoading();
560
-		    if(resList[0].state == 200){
561
-		      uni.showToast({
562
-		      	icon: 'none',
563
-		        title: '报修成功',
564
-		        mask: true,
565
-		      });
566
-		      setTimeout(() => {
567
-						uni.setStorageSync('rapidRepNext','')
568
-		        uni.reLaunch({
569
-		          url: '/pages/repair/home',
570
-		        })
571
-		      }, 1500)
572
-		    }else{
573
-		      uni.showToast({
574
-		        icon: 'none',
575
-		        title: resList[0].msg || '请求数据失败!'
576
-		      });
577
-		    }
578
-		  })
579
-		}
580
   }
629
   }
581
 	
630
 	
582
 	// 获取文本内容
631
 	// 获取文本内容

+ 145 - 28
pages/repair/repairsDetail.vue

@@ -22,7 +22,7 @@
22
           </view>
22
           </view>
23
 					<view class="deital_item">
23
 					<view class="deital_item">
24
 					  <text class="name">关联资产:</text>
24
 					  <text class="name">关联资产:</text>
25
-					  <text class="value">{{dataInfo.incidentData.description || '无'}}</text>
25
+					  <text class="value">{{dataInfo.incidentData.assetDTO && dataInfo.incidentData.assetDTO.name || '无'}}</text>
26
 					</view>
26
 					</view>
27
           <view class="deital_item">
27
           <view class="deital_item">
28
             <text class="name">图片视频:</text>
28
             <text class="name">图片视频:</text>
@@ -35,7 +35,7 @@
35
 					<view class="deital_item">
35
 					<view class="deital_item">
36
 					  <text class="name">录音:</text>
36
 					  <text class="name">录音:</text>
37
 					  <view class="value img" v-if="dataInfo.repairAudio.length>0">
37
 					  <view class="value img" v-if="dataInfo.repairAudio.length>0">
38
-							<sy-audio class="imgItem" ref="audio" isCountDown :src="img.thumbFilePath" v-for="(img, i) in dataInfo.repairAudio" :key="i" ></sy-audio>
38
+							<sy-audio class="resourceItem-audio" ref="audio" isCountDown :src="img.thumbFilePath" v-for="(img, i) in dataInfo.repairAudio" :key="i" ></sy-audio>
39
 					  </view>
39
 					  </view>
40
 					</view>
40
 					</view>
41
           <view class="deital_item">
41
           <view class="deital_item">
@@ -180,8 +180,21 @@
180
     </scroll-view>
180
     </scroll-view>
181
     <view class="foot_common_btns">
181
     <view class="foot_common_btns">
182
       <button @click="goBack" type="default" class="primaryButton btn">返回</button>
182
       <button @click="goBack" type="default" class="primaryButton btn">返回</button>
183
-    </view>
183
+			<button v-if="stateId==20413" @click="recall" type="default" class="primaryButton btn">撤销</button>
184
+		</view>
184
     <IncidentAttachment v-if="dataInfo.isAttachment" @knowEmit="knowAttachment" :incidentData="dataInfo.incidentData"></IncidentAttachment>
185
     <IncidentAttachment v-if="dataInfo.isAttachment" @knowEmit="knowAttachment" :incidentData="dataInfo.incidentData"></IncidentAttachment>
186
+		
187
+		<uni-popup ref="inputDialog" background-color="#fff" type="center" :before-close="true">
188
+			<view class="ch-class">撤销原因</view>
189
+			<view class="popup-content">
190
+				<input type="text" focus placeholder="请输入撤销原因" v-model="recallValue">
191
+			</view>
192
+			<view class="foot_common_btns">
193
+				<button @click="closeDialog" size="mini" type="default" class="primaryButton btn">取消</button>
194
+			  <button @click="dialogInputConfirm" size="mini" type="default" class="primaryButton btn">确定</button>
195
+			</view>
196
+		</uni-popup>
197
+				
185
 		<uni-popup ref="popup" background-color="#fff" type="center" :before-close="true">
198
 		<uni-popup ref="popup" background-color="#fff" type="center" :before-close="true">
186
 			<view class="popup-content">
199
 			<view class="popup-content">
187
 				<video :src="videoUrl" controls></video>
200
 				<video :src="videoUrl" controls></video>
@@ -196,8 +209,8 @@
196
 <script setup>
209
 <script setup>
197
   import { ref, reactive } from 'vue'
210
   import { ref, reactive } from 'vue'
198
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
211
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
199
-  import { onLoad } from '@dcloudio/uni-app'
200
-  import { api_listAttachment, api_incidentDetail, api_querySummaryDoc, api_incidentLog } from "@/http/api.js"
212
+  import { onLoad, onShow } from '@dcloudio/uni-app'
213
+  import { api_listAttachment, getFetchDataList, api_incidentDetail, api_repairCancel, api_querySummaryDoc, api_incidentLog } from "@/http/api.js"
201
   import { defaultColor } from '@/static/js/theme.js'
214
   import { defaultColor } from '@/static/js/theme.js'
202
   import { useSetTitle } from '@/share/useSetTitle.js'
215
   import { useSetTitle } from '@/share/useSetTitle.js'
203
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
216
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -217,11 +230,14 @@
217
 
230
 
218
   // 主题颜色
231
   // 主题颜色
219
   const primaryColor = ref(defaultColor)
232
   const primaryColor = ref(defaultColor)
220
-	
233
+	// 撤回原因
234
+	const recallValue = ref(null)
221
 	const isDept = ref(null)
235
 	const isDept = ref(null)
222
 	const videoUrl = ref(null)
236
 	const videoUrl = ref(null)
223
 	const popup = ref(null)
237
 	const popup = ref(null)
224
-
238
+	const inputDialog = ref(null)
239
+	const stateId = ref(null)
240
+	
225
   // 数据
241
   // 数据
226
   const dataInfo = reactive({
242
   const dataInfo = reactive({
227
     tabs: [
243
     tabs: [
@@ -245,6 +261,7 @@
245
     resolveLogs: [],//评价
261
     resolveLogs: [],//评价
246
     callbackLogs: [],//回访
262
     callbackLogs: [],//回访
247
     isAttachment: false,//录音开关
263
     isAttachment: false,//录音开关
264
+		summaryData: null
248
   })
265
   })
249
 
266
 
250
   // 点击录音
267
   // 点击录音
@@ -308,7 +325,9 @@
308
 	
325
 	
309
 	function videoView(item){
326
 	function videoView(item){
310
 		videoUrl.value = item.thumbFilePath
327
 		videoUrl.value = item.thumbFilePath
311
-		popup.value.open()
328
+		setTimeout(_=>{
329
+			popup.value.open()
330
+		},100)
312
 	}
331
 	}
313
 	
332
 	
314
 	function closePop(){
333
 	function closePop(){
@@ -366,12 +385,13 @@
366
       uni.hideLoading();
385
       uni.hideLoading();
367
       if(res.status == 200){
386
       if(res.status == 200){
368
         dataInfo.incidentData = res.data || {};
387
         dataInfo.incidentData = res.data || {};
388
+				stateId.value = res.data.state.id
369
         let logs = dataInfo.incidentData.logs || [];
389
         let logs = dataInfo.incidentData.logs || [];
370
         dataInfo.resolveLogs = logs.filter(v => v.logType.value == 'resolve').slice(0, 1);
390
         dataInfo.resolveLogs = logs.filter(v => v.logType.value == 'resolve').slice(0, 1);
371
         dataInfo.callbackLogs = logs.filter(v => v.logType.value == 'callback').slice(0, 1);
391
         dataInfo.callbackLogs = logs.filter(v => v.logType.value == 'callback').slice(0, 1);
372
 
392
 
373
         // 维修汇总单
393
         // 维修汇总单
374
-        if(dataInfo.incidentData.state.value == 'close' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && dataInfo.incidentData.summaryId){
394
+        if(dataInfo.incidentData.state.value == 'close' && dataInfo.summaryData.value == 1 && dataInfo.incidentData.summaryId){
375
           let flag = dataInfo.tabs.some(v => v.value === '2');
395
           let flag = dataInfo.tabs.some(v => v.value === '2');
376
           !flag && dataInfo.tabs.splice(1, 0, {id: 2, name: '维修汇总单', value: '2', num: ''});
396
           !flag && dataInfo.tabs.splice(1, 0, {id: 2, name: '维修汇总单', value: '2', num: ''});
377
         }
397
         }
@@ -394,26 +414,29 @@
394
       mask: true,
414
       mask: true,
395
     });
415
     });
396
     api_listAttachment('wechatRequesterIncident', dataInfo.incidentId).then(res => {
416
     api_listAttachment('wechatRequesterIncident', dataInfo.incidentId).then(res => {
397
-      uni.hideLoading();
398
       res.data = res.data || [];
417
       res.data = res.data || [];
399
       res.data.forEach(v => {
418
       res.data.forEach(v => {
400
-        // v.previewUrl = location.origin + "/file" + v.relativeFilePath;
401
         v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
419
         v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
402
       })
420
       })
403
-			dataInfo.repairImgs = []
404
-			dataInfo.repairVideo = []
405
-			dataInfo.repairAudio = []
406
-			for(let i of res.data){
407
-				if(i.suffix=='jpg' || i.suffix=='png' || i.suffix=='gif'){
408
-					dataInfo.repairImgs.push(i)
409
-				}else if(i.suffix=='mp4' || i.suffix=='avi' || 
410
-					i.suffix=='mpeg' || i.suffix=='wmv'){
411
-					dataInfo.repairVideo.push(i)
412
-				}else if(i.extra1=='wechatIncidentRecord'){
413
-					dataInfo.repairAudio.push(i)
414
-				}
415
-			}
421
+			dataInfo.repairImgs = res.data
416
     })
422
     })
423
+		
424
+		api_listAttachment('wechatIncidentVideo', dataInfo.incidentId).then(res => {
425
+		  res.data = res.data || [];
426
+		  res.data.forEach(v => {
427
+		    v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
428
+		  })
429
+			dataInfo.repairVideo = res.data
430
+		})
431
+		
432
+		api_listAttachment('wechatIncidentRecord', dataInfo.incidentId).then(res => {
433
+		  uni.hideLoading();
434
+		  res.data = res.data || [];
435
+		  res.data.forEach(v => {
436
+		    v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
437
+		  })
438
+			dataInfo.repairAudio = res.data
439
+		})
417
   }
440
   }
418
 
441
 
419
   // 获取处理图片
442
   // 获取处理图片
@@ -432,16 +455,106 @@
432
       dataInfo.handlerImgs = res.data;
455
       dataInfo.handlerImgs = res.data;
433
     })
456
     })
434
   }
457
   }
435
-
436
-  onLoad((option) => {
437
-    dataInfo.incidentId = option.incidentId;
458
+	
459
+	function closeDialog(){
460
+		inputDialog.value.close()
461
+	}
462
+	
463
+	function dialogInputConfirm(){
464
+		if(!recallValue.value){
465
+			uni.showToast({
466
+				icon: 'none',
467
+			  title: '撤销原因不能为空'
468
+			});
469
+			return
470
+		}
471
+		uni.showLoading({
472
+		  title: "加载中",
473
+		  mask: true,
474
+		});
475
+		let query={
476
+			incident: {...dataInfo.incidentData, ...{cancelRemark: recallValue.value}}
477
+		}
478
+		api_repairCancel(query).then(res=>{
479
+			uni.hideLoading();
480
+			if(res.state==200){
481
+				inputDialog.value.close()
482
+				uni.showToast({
483
+					icon: 'none',
484
+				  title: '撤销成功'
485
+				});
486
+				setTimeout(_=>{
487
+					goBack()
488
+				},500)
489
+			}else{
490
+				uni.showToast({
491
+					icon: 'none',
492
+				  title: res.msg
493
+				});
494
+			}
495
+		})
496
+	}
497
+	
498
+	function recall(){
499
+		inputDialog.value.open()
500
+	}
501
+	
502
+	onShow((option) =>{
438
 		let data = JSON.parse(uni.getStorageSync('sysData'))
503
 		let data = JSON.parse(uni.getStorageSync('sysData'))
439
 		isDept.value = data.find(i=>i.keyconfig=='deptRepair')
504
 		isDept.value = data.find(i=>i.keyconfig=='deptRepair')
440
-    getIncidentDetail();
505
+		// 获取是否开启汇总单、简易处理
506
+		let postData = {
507
+			idx: 0,
508
+			sum: 9999,
509
+			hospitalConfig:{
510
+				hosId: loginUserStore.loginUser.user.currentHospital.id,
511
+				model: "itsm"
512
+			}
513
+		};
514
+		getFetchDataList("simple/data", "hospitalConfig", postData)
515
+		.then((res) => {
516
+			dataInfo.summaryData = res.list.find(i=>i.key=='itsmSummarySheet')
517
+			getIncidentDetail();
518
+		});
519
+	})
520
+	
521
+  onLoad((option) => {
522
+    dataInfo.incidentId = option.incidentId;
523
+		// let data = JSON.parse(uni.getStorageSync('sysData'))
524
+		// isDept.value = data.find(i=>i.keyconfig=='deptRepair')
525
+		// // 获取是否开启汇总单、简易处理
526
+		// let postData = {
527
+		// 	idx: 0,
528
+		// 	sum: 9999,
529
+		// 	hospitalConfig:{
530
+		// 		hosId: loginUserStore.loginUser.user.currentHospital.id,
531
+		// 		model: "itsm"
532
+		// 	}
533
+		// };
534
+		// getFetchDataList("simple/data", "hospitalConfig", postData)
535
+		// .then((res) => {
536
+		// 	dataInfo.summaryData = res.list.find(i=>i.key=='itsmSummarySheet')
537
+		// 	getIncidentDetail();
538
+		// });
441
   })
539
   })
442
 </script>
540
 </script>
443
 
541
 
542
+<style scoped>
543
+	>>>.uni-input{
544
+		height: 80rpx;
545
+		background: #eee;
546
+	}
547
+	
548
+	>>>.uni-popup .uni-popup__wrapper{
549
+		padding: 20rpx 40rpx;
550
+		border-radius: 5px;
551
+	}
552
+</style>
444
 <style lang="scss" scoped>
553
 <style lang="scss" scoped>
554
+.ch-class{
555
+	text-align: center;
556
+	font-size: 32rpx;
557
+}
445
 .popup-content{
558
 .popup-content{
446
 	padding: 40rpx;
559
 	padding: 40rpx;
447
 }
560
 }
@@ -568,6 +681,10 @@
568
               margin-right: 0;
681
               margin-right: 0;
569
             }
682
             }
570
           }
683
           }
684
+					.resourceItem-audio{
685
+						width: 300rpx;
686
+						height: 60rpx;
687
+					}
571
 					.videoItem{
688
 					.videoItem{
572
 						width: 150rpx;
689
 						width: 150rpx;
573
 						height: 150rpx;
690
 						height: 150rpx;

+ 10 - 7
pages/repair/repairsList.vue

@@ -17,23 +17,23 @@
17
         <view class="body_item_content">
17
         <view class="body_item_content">
18
 					<view class="body_item_content_p" v-if="data.place || data.houseNumber">
18
 					<view class="body_item_content_p" v-if="data.place || data.houseNumber">
19
 					  <text class="name ellipsis">详细地址:{{data.place ? data.place.building.buildingName : ''}}{{data.place ? data.place.floorName : ''}}{{data.houseNumber}}</text>
19
 					  <text class="name ellipsis">详细地址:{{data.place ? data.place.building.buildingName : ''}}{{data.place ? data.place.floorName : ''}}{{data.houseNumber}}</text>
20
+						<view class="status" :style="stateStyle(data.state)">{{data.state ? data.state.name : ''}}</view>
20
 					</view>
21
 					</view>
21
           <view class="body_item_content_p" v-if="data.rsPrice">
22
           <view class="body_item_content_p" v-if="data.rsPrice">
22
             <text class="name ellipsis">维修总价:{{data.rsPrice}}</text>
23
             <text class="name ellipsis">维修总价:{{data.rsPrice}}</text>
23
-            <view class="status" :style="stateStyle(data.state)">{{data.state ? data.state.name : ''}}</view>
24
           </view>
24
           </view>
25
           <view class="body_item_content_p">
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>
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>
27
           </view>
28
-					<view class="body_item_content_p" v-if="data.currentLog && data.currentLog.remark">
29
-					  <text class="name ellipsis">维修说明:{{data.currentLog.remark}}</text>
28
+					<view class="body_item_content_p" v-if="data.currentLog && data.currentLog.logType.value=='overtime'">
29
+					  <text class="name ellipsis">维修说明:{{data.overtimeRemark}}</text>
30
 					</view>
30
 					</view>
31
         </view>
31
         </view>
32
 
32
 
33
         <view class="body_item_foot">
33
         <view class="body_item_foot">
34
           <view class="foot_info">
34
           <view class="foot_info">
35
             <view class="name">维修人员:{{data.assigneeName || '暂无'}}</view>
35
             <view class="name">维修人员:{{data.assigneeName || '暂无'}}</view>
36
-            <text class="date">{{formatDate(data.acceptDate, 'yyyy-MM-dd HH:mm')}}</text>
36
+            <text class="date">{{formatDate(data.startDate, 'yyyy-MM-dd HH:mm')}}</text>
37
           </view>
37
           </view>
38
           <view class="btns">
38
           <view class="btns">
39
             <button v-if="!data.wxdegree && (data.state.name=='待评价'|| data.state.name=='已关闭')" @click.stop="handler('changeUser', data)" type="default" class="primaryButton btn">评价</button>
39
             <button v-if="!data.wxdegree && (data.state.name=='待评价'|| data.state.name=='已关闭')" @click.stop="handler('changeUser', data)" type="default" class="primaryButton btn">评价</button>
@@ -92,8 +92,10 @@
92
   import { useLoginUserStore } from '@/stores/loginUser'
92
   import { useLoginUserStore } from '@/stores/loginUser'
93
   import { useIncidentNumStore } from '@/stores/incidentNum'
93
   import { useIncidentNumStore } from '@/stores/incidentNum'
94
   import { useIncidentListSearchStore } from '@/stores/incidentListSearch'
94
   import { useIncidentListSearchStore } from '@/stores/incidentListSearch'
95
-
95
+	import { repositoryListSearchStore } from '@/stores/repositorySearch'
96
+	
96
   useSetTitle();
97
   useSetTitle();
98
+	const repositorySearchStore = repositoryListSearchStore();
97
   const loginUserStore = useLoginUserStore();
99
   const loginUserStore = useLoginUserStore();
98
   const incidentNumStore = useIncidentNumStore();
100
   const incidentNumStore = useIncidentNumStore();
99
   const incidentListSearchStore = useIncidentListSearchStore();
101
   const incidentListSearchStore = useIncidentListSearchStore();
@@ -209,7 +211,6 @@
209
 
211
 
210
   // 确认筛选
212
   // 确认筛选
211
   function conformFilter(evtFilter){
213
   function conformFilter(evtFilter){
212
-		console.log(777,evtFilter)
213
     dataInfo.stateValue = evtFilter.category;
214
     dataInfo.stateValue = evtFilter.category;
214
     dataInfo.isFilter = false;
215
     dataInfo.isFilter = false;
215
     getList(0);
216
     getList(0);
@@ -386,7 +387,9 @@
386
 
387
 
387
   onLoad((option) => {
388
   onLoad((option) => {
388
 		dataInfo.tabActiveId = Number(option.type)
389
 		dataInfo.tabActiveId = Number(option.type)
389
-		console.log(222,Number(option.type))
390
+		dataInfo.stateValue = option.value
391
+		dataInfo.evtFilter.category = option.value
392
+		repositorySearchStore.setRepositoryListSearchData(dataInfo.evtFilter)
390
     onLoadFn();
393
     onLoadFn();
391
   })
394
   })
392
 	
395
 	

+ 18 - 15
pages/repository/repository.vue

@@ -12,7 +12,7 @@
12
 					</view>
12
 					</view>
13
 					<view class="sign">
13
 					<view class="sign">
14
 						<view>引入次数:{{data.introduceCount || 0}}</view>
14
 						<view>引入次数:{{data.introduceCount || 0}}</view>
15
-						<view>{{data.createtime}}</view>
15
+						<view>{{formatDate(data.createTime, 'yyyy-MM-dd HH:mm:ss')}}</view>
16
 					</view>
16
 					</view>
17
 				</view>
17
 				</view>
18
 				<view class="btn-style">
18
 				<view class="btn-style">
@@ -33,7 +33,7 @@
33
 			<button @click="goBack" type="default" class="primaryButton btn">返回</button>
33
 			<button @click="goBack" type="default" class="primaryButton btn">返回</button>
34
 		</view>
34
 		</view>
35
 		<repositoryFilter v-if="isFilter" @cancelEmit="cancelFilter" 
35
 		<repositoryFilter v-if="isFilter" @cancelEmit="cancelFilter" 
36
-		@confirmEmit="conformFilter" :evt="evtFilter"></repositoryFilter>
36
+		@confirmEmit="conformFilter" :evt="evtFilter" :viewType="entranceType"></repositoryFilter>
37
   </view>
37
   </view>
38
 </template>
38
 </template>
39
 
39
 
@@ -46,7 +46,10 @@
46
   import { useHandlerStore } from '@/stores/handler'
46
   import { useHandlerStore } from '@/stores/handler'
47
 	import repositoryFilter from '@/components/repositoryFilter.vue';
47
 	import repositoryFilter from '@/components/repositoryFilter.vue';
48
 	import { useLoginUserStore } from '@/stores/loginUser'
48
 	import { useLoginUserStore } from '@/stores/loginUser'
49
+	import { filterFormatDate } from '@/filters/filterFormatDate.js'
50
+	
49
   useSetTitle();
51
   useSetTitle();
52
+	const { formatDate }  = filterFormatDate();
50
 	const loginUserStore = useLoginUserStore();
53
 	const loginUserStore = useLoginUserStore();
51
 	const handlerStore = useHandlerStore();
54
 	const handlerStore = useHandlerStore();
52
 	
55
 	
@@ -61,6 +64,8 @@
61
 	// 入口类型
64
 	// 入口类型
62
 	const entrance = ref(null)
65
 	const entrance = ref(null)
63
 	
66
 	
67
+	const entranceType = ref(null)
68
+	
64
 	// 筛选数据
69
 	// 筛选数据
65
 	const evtFilter = ref({})
70
 	const evtFilter = ref({})
66
 	
71
 	
@@ -82,7 +87,7 @@
82
   function toCategoryTwo(data){
87
   function toCategoryTwo(data){
83
     uni.navigateTo({
88
     uni.navigateTo({
84
       url: `/pages/repositoryDetails/repositoryDetails?incidentId=${dataInfo.incidentId}
89
       url: `/pages/repositoryDetails/repositoryDetails?incidentId=${dataInfo.incidentId}
85
-			&solutionnumber=${data.solutionNumber}&editType=${entrance.value}`
90
+			&solutionnumber=${data.solutionNumber}&editType=${entrance.value}&entranceType=${entranceType.value}`
86
     })
91
     })
87
   }
92
   }
88
 	
93
 	
@@ -92,7 +97,7 @@
92
 		let type = handlerStore.handler.data.operateType
97
 		let type = handlerStore.handler.data.operateType
93
 		let storeInfo = handlerStore.handler.data
98
 		let storeInfo = handlerStore.handler.data
94
 		storeInfo.introduceCount = introduceCount.value
99
 		storeInfo.introduceCount = introduceCount.value
95
-		storeInfo.handleDescription = data.content
100
+		storeInfo.handleDescription = '引用知识库解决,知识库编号' + data.solutionNumber
96
 		storeInfo.solutionId = data.id
101
 		storeInfo.solutionId = data.id
97
 		storeInfo.type = 'rep'
102
 		storeInfo.type = 'rep'
98
 		storeInfo.isSummaryNext = 1
103
 		storeInfo.isSummaryNext = 1
@@ -149,6 +154,9 @@
149
 				status:{id:dicData.value.id},
154
 				status:{id:dicData.value.id},
150
       }
155
       }
151
     }
156
     }
157
+		if(entranceType.value=='repairs'){
158
+			delete postData.solution.hosId
159
+		}
152
     if(typeof(categoryId)=='number' || typeof(categoryId)=='string'){
160
     if(typeof(categoryId)=='number' || typeof(categoryId)=='string'){
153
 			postData.solution.categoryId = categoryId
161
 			postData.solution.categoryId = categoryId
154
 		}else{
162
 		}else{
@@ -164,23 +172,17 @@
164
 		}else if(loginUserStore.loginUser.user.branch){
172
 		}else if(loginUserStore.loginUser.user.branch){
165
 		  postData.solution.branch = loginUserStore.loginUser.user.branch.id;
173
 		  postData.solution.branch = loginUserStore.loginUser.user.branch.id;
166
 		}
174
 		}
167
-		// if(entrance.value=='view'){
168
-		// 	postData.solution.selectType = "keySearch"
169
-		// 	postData.solution.tabType = "publish"
170
-		// }
171
     api_getSolution(postData).then(res => {
175
     api_getSolution(postData).then(res => {
172
       uni.hideLoading();
176
       uni.hideLoading();
173
-      // uni.stopPullDownRefresh();
174
       if(res.status == 200){
177
       if(res.status == 200){
175
         let list = res.list || [];
178
         let list = res.list || [];
176
 				introduceCount.value = res.totalNum
179
 				introduceCount.value = res.totalNum
177
 				dataInfo.list = list
180
 				dataInfo.list = list
178
-        // if(list.length){
179
-        //   dataInfo.hasMore = true;
180
-        //   dataInfo.list = dataInfo.idx === 0 ? list : dataInfo.list.concat(list);
181
-        // }else{
182
-        //   dataInfo.hasMore = false;
183
-        // }
181
+				if(entranceType.value=='repairs'){
182
+					dataInfo.list = list.filter(i=>i.repairVisible==1)
183
+				}else{
184
+					dataInfo.list = list
185
+				}
184
       }else{
186
       }else{
185
         uni.showToast({
187
         uni.showToast({
186
           icon: 'none',
188
           icon: 'none',
@@ -205,6 +207,7 @@
205
   onLoad((option) => {
207
   onLoad((option) => {
206
     dataInfo.incidentId = option.incidentId;
208
     dataInfo.incidentId = option.incidentId;
207
 		entrance.value = option.type
209
 		entrance.value = option.type
210
+		entranceType.value = option.entranceType
208
     getDic()
211
     getDic()
209
   })
212
   })
210
   
213
   

+ 10 - 4
pages/repositoryDetails/repositoryDetails.vue

@@ -6,7 +6,7 @@
6
 			<text>版本号:{{dataInfo.data.versionNumber}}</text>
6
 			<text>版本号:{{dataInfo.data.versionNumber}}</text>
7
 			<text>{{formatDate(dataInfo.data.createTime, 'yyyy-MM-dd HH:mm:ss')}}</text>
7
 			<text>{{formatDate(dataInfo.data.createTime, 'yyyy-MM-dd HH:mm:ss')}}</text>
8
 		</view>
8
 		</view>
9
-		<view class="theme" v-if="dataInfo.data.type">{{dataInfo.data.type.name}}</view>
9
+		<!-- <view class="theme" v-if="dataInfo.data.type">{{dataInfo.data.type.name}}</view> -->
10
 		<view class="content" v-html="dataInfo.data.content"></view>
10
 		<view class="content" v-html="dataInfo.data.content"></view>
11
 		<view class="file-list" v-for="item in dataInfo.fileData" :key="item">
11
 		<view class="file-list" v-for="item in dataInfo.fileData" :key="item">
12
 			<view class="file-item" @click="downloadFile(item)">{{item.name}}</view>
12
 			<view class="file-item" @click="downloadFile(item)">{{item.name}}</view>
@@ -60,6 +60,7 @@
60
 	// Popup状态
60
 	// Popup状态
61
 	const popup = ref(null)
61
 	const popup = ref(null)
62
 	
62
 	
63
+	const entranceType = ref(null)
63
   // 数据
64
   // 数据
64
   const dataInfo = reactive({
65
   const dataInfo = reactive({
65
     data: [],//数据
66
     data: [],//数据
@@ -92,7 +93,7 @@
92
 		let type = handlerStore.handler.data.operateType
93
 		let type = handlerStore.handler.data.operateType
93
 		let storeInfo = handlerStore.handler.data
94
 		let storeInfo = handlerStore.handler.data
94
 		storeInfo.introduceCount = introduceCount.value
95
 		storeInfo.introduceCount = introduceCount.value
95
-		storeInfo.handleDescription = dataInfo.data.content
96
+		storeInfo.handleDescription = '引用知识库解决,知识库编号' + dataInfo.data.solutionNumber
96
 		storeInfo.solutionId = dataInfo.data.id
97
 		storeInfo.solutionId = dataInfo.data.id
97
 		storeInfo.type = 'rep'
98
 		storeInfo.type = 'rep'
98
 		storeInfo.isSummaryNext = 1
99
 		storeInfo.isSummaryNext = 1
@@ -136,7 +137,9 @@
136
         solutionNumber: dataInfo.solutionnumber,
137
         solutionNumber: dataInfo.solutionnumber,
137
       }
138
       }
138
     }
139
     }
139
-    
140
+    if(entranceType.value=='repairs'){
141
+			delete postData.solution.hosId
142
+		}
140
     api_getSolution(postData).then(res => {
143
     api_getSolution(postData).then(res => {
141
       uni.hideLoading();
144
       uni.hideLoading();
142
       if(res.status == 200){
145
       if(res.status == 200){
@@ -144,7 +147,7 @@
144
 				introduceCount.value = res.totalNum
147
 				introduceCount.value = res.totalNum
145
         dataInfo.data = list[0]
148
         dataInfo.data = list[0]
146
 				// mutiCategory.value = list[0].category.mutiCategory
149
 				// mutiCategory.value = list[0].category.mutiCategory
147
-				getHandlerImgs('knowledge',list[0].id)
150
+				getHandlerImgs('solution',list[0].id)
148
       }else{
151
       }else{
149
         uni.showToast({
152
         uni.showToast({
150
           icon: 'none',
153
           icon: 'none',
@@ -163,6 +166,9 @@
163
 		if(option.editType){
166
 		if(option.editType){
164
 			editType.value = option.editType
167
 			editType.value = option.editType
165
 		}
168
 		}
169
+		if(option.entranceType){
170
+			entranceType.value = option.entranceType
171
+		}
166
     getList();
172
     getList();
167
   })
173
   })
168
 
174
 

+ 7 - 2
pages/searchArea/searchArea.vue

@@ -67,12 +67,17 @@
67
     // if(dataInfo.idx === 0){
67
     // if(dataInfo.idx === 0){
68
     //   dataInfo.list = [];
68
     //   dataInfo.list = [];
69
     // }
69
     // }
70
-
70
+		let hosId = null
71
+		if(loginUserStore.loginUser.user.currentHospital.parent){
72
+			hosId = loginUserStore.loginUser.user.currentHospital.parent.id
73
+		}else{
74
+			hosId = loginUserStore.loginUser.user.currentHospital.id
75
+		}
71
     let postData = {
76
     let postData = {
72
       idx: 0,
77
       idx: 0,
73
       sum: 9999,
78
       sum: 9999,
74
 			building:{
79
 			building:{
75
-				hosId: loginUserStore.loginUser.user.currentHospital.id,
80
+				hosId: hosId,
76
 			}
81
 			}
77
     };
82
     };
78
     getFetchDataList("simple/data", "building", postData)
83
     getFetchDataList("simple/data", "building", postData)

+ 6 - 2
pages/searchDept/searchDept.vue

@@ -73,14 +73,18 @@
73
       idx: dataInfo.idx,
73
       idx: dataInfo.idx,
74
       sum: 20,
74
       sum: 20,
75
       department: {
75
       department: {
76
-				hospital:loginUserStore.loginUser.user.currentHospital.id,
76
+				hospital:'',
77
         // branch: dataInfo.incidentData.branch,
77
         // branch: dataInfo.incidentData.branch,
78
         // searchType: 'quickStart',
78
         // searchType: 'quickStart',
79
         // selectType: 'pinyin_qs',
79
         // selectType: 'pinyin_qs',
80
         dept: dataInfo.keyWord,
80
         dept: dataInfo.keyWord,
81
       }
81
       }
82
     }
82
     }
83
-    
83
+    if(loginUserStore.loginUser.user.currentHospital.parent){
84
+    	postData.department.hospital = loginUserStore.loginUser.user.currentHospital.parent.id
85
+    }else{
86
+    	postData.department.hospital = loginUserStore.loginUser.user.currentHospital.id
87
+    }
84
     api_department(postData).then(res => {
88
     api_department(postData).then(res => {
85
       uni.hideLoading();
89
       uni.hideLoading();
86
       uni.stopPullDownRefresh();
90
       uni.stopPullDownRefresh();

+ 7 - 1
pages/searchPlace/searchPlace.vue

@@ -117,11 +117,17 @@
117
     //     });
117
     //     });
118
     //   }
118
     //   }
119
     // })
119
     // })
120
+		let hosId = null
121
+		if(loginUserStore.loginUser.user.currentHospital.parent){
122
+			hosId = loginUserStore.loginUser.user.currentHospital.parent.id
123
+		}else{
124
+			hosId = loginUserStore.loginUser.user.currentHospital.id
125
+		}
120
 		let postData = {
126
 		let postData = {
121
 		  idx: 0,
127
 		  idx: 0,
122
 		  sum: 9999,
128
 		  sum: 9999,
123
 			floor:{
129
 			floor:{
124
-				hosId: loginUserStore.loginUser.user.currentHospital.id,
130
+				hosId: hosId,
125
 				buildId:dataInfo.parentId
131
 				buildId:dataInfo.parentId
126
 			}
132
 			}
127
 		};
133
 		};

+ 6 - 2
pages/searchUser/searchUser.vue

@@ -78,12 +78,16 @@
78
         // simple: true,
78
         // simple: true,
79
         // engineer: undefined,
79
         // engineer: undefined,
80
         // selectType: "pinyin_all",
80
         // selectType: "pinyin_all",
81
-				hospital:loginUserStore.loginUser.user.currentHospital.id,
81
+				hospital:'',
82
         name: dataInfo.keyWord,
82
         name: dataInfo.keyWord,
83
 				userTypeIds:String(userTypes.value.map(v => v.id))
83
 				userTypeIds:String(userTypes.value.map(v => v.id))
84
       }
84
       }
85
     }
85
     }
86
-    
86
+    if(loginUserStore.loginUser.user.currentHospital.parent){
87
+    	postData.user.hospital = loginUserStore.loginUser.user.currentHospital.parent.id
88
+    }else{
89
+    	postData.user.hospital = loginUserStore.loginUser.user.currentHospital.id
90
+    }
87
     api_user(postData).then(res => {
91
     api_user(postData).then(res => {
88
       uni.hideLoading();
92
       uni.hideLoading();
89
       uni.stopPullDownRefresh();
93
       uni.stopPullDownRefresh();

+ 4 - 5
pages/synergeticAdd/synergeticAdd.vue

@@ -61,7 +61,7 @@
61
     dataInfo.paramData.synergetic = dataInfo.userSelectedList;
61
     dataInfo.paramData.synergetic = dataInfo.userSelectedList;
62
     handlerStore.setHandlerData(dataInfo.paramData, handlerStore.handler.type, handlerStore.handler.sign);
62
     handlerStore.setHandlerData(dataInfo.paramData, handlerStore.handler.type, handlerStore.handler.sign);
63
     uni.navigateTo({
63
     uni.navigateTo({
64
-      url: `/pages/${handlerStore.handler.type}/${handlerStore.handler.type}?incidentId=${dataInfo.incidentId}`,
64
+      url: `/pages/${handlerStore.handler.type}/${handlerStore.handler.type}?incidentId=${dataInfo.incidentId}&isSummaryNext=1`,
65
     })
65
     })
66
   }
66
   }
67
   
67
   
@@ -81,6 +81,9 @@
81
       idx: dataInfo.idx,
81
       idx: dataInfo.idx,
82
       sum: 20,
82
       sum: 20,
83
       user: {
83
       user: {
84
+				hospital:{
85
+					id:dataInfo.paramData.incidentData.duty.id?dataInfo.paramData.incidentData.duty.id:dataInfo.paramData.incidentData.duty
86
+				},
84
         roledata: {
87
         roledata: {
85
           "rolecode": "first-line support"
88
           "rolecode": "first-line support"
86
         },
89
         },
@@ -89,10 +92,6 @@
89
       }
92
       }
90
     }
93
     }
91
     
94
     
92
-    if(dataInfo.incidentData.duty){
93
-      postData.user.currentDuty = dataInfo.incidentData.duty.id;
94
-    }
95
-    
96
     api_user(postData).then(res => {
95
     api_user(postData).then(res => {
97
       uni.hideLoading();
96
       uni.hideLoading();
98
       uni.stopPullDownRefresh();
97
       uni.stopPullDownRefresh();

+ 8 - 6
pages/workHourManagementOne/workHourManagementOne.vue

@@ -20,7 +20,7 @@
20
 <script setup>
20
 <script setup>
21
   import { ref, reactive} from 'vue'
21
   import { ref, reactive} from 'vue'
22
   import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
22
   import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
23
-  import { api_workHourManagement } from "@/http/api.js"
23
+  import { api_workHourManagement,getFetchDataList } from "@/http/api.js"
24
   import { defaultColor } from '@/static/js/theme.js'
24
   import { defaultColor } from '@/static/js/theme.js'
25
   import { useSetTitle } from '@/share/useSetTitle.js'
25
   import { useSetTitle } from '@/share/useSetTitle.js'
26
   import { useLoginUserStore } from '@/stores/loginUser'
26
   import { useLoginUserStore } from '@/stores/loginUser'
@@ -40,12 +40,13 @@
40
     hasMore: true,//是否有更多数据
40
     hasMore: true,//是否有更多数据
41
     incidentId: undefined,//事件ID
41
     incidentId: undefined,//事件ID
42
     summaryId: undefined,//汇总单ID
42
     summaryId: undefined,//汇总单ID
43
+		hosId:null //工单责任科室
43
   })
44
   })
44
   
45
   
45
   // 跳转二级工时管理列表
46
   // 跳转二级工时管理列表
46
   function toWorkHourManagementTwo(data){
47
   function toWorkHourManagementTwo(data){
47
     uni.navigateTo({
48
     uni.navigateTo({
48
-      url: `/pages/workHourManagementTwo/workHourManagementTwo?incidentId=${dataInfo.incidentId}&summaryId=${dataInfo.summaryId}&parentId=${data.id}&parentName=${data.workName}`
49
+      url: `/pages/workHourManagementTwo/workHourManagementTwo?incidentId=${dataInfo.incidentId}&summaryId=${dataInfo.summaryId}&parentId=${data.id}&parentName=${data.workName}&hosId=${dataInfo.hosId}`
49
     })
50
     })
50
   }
51
   }
51
   
52
   
@@ -66,10 +67,10 @@
66
       sum: 9999,
67
       sum: 9999,
67
       workHourManagement: {
68
       workHourManagement: {
68
         treeLevel: 1,
69
         treeLevel: 1,
70
+				hosId:dataInfo.hosId,
69
       }
71
       }
70
     }
72
     }
71
-    
72
-    api_workHourManagement(postData).then(res => {
73
+    getFetchDataList("simple/data", "workHourManagement", postData).then(res => {
73
       uni.hideLoading();
74
       uni.hideLoading();
74
       uni.stopPullDownRefresh();
75
       uni.stopPullDownRefresh();
75
       if(res.status == 200){
76
       if(res.status == 200){
@@ -89,11 +90,12 @@
89
       }
90
       }
90
     })
91
     })
91
   }
92
   }
92
-  
93
+	
93
   onLoad((option) => {
94
   onLoad((option) => {
94
     dataInfo.incidentId = option.incidentId;
95
     dataInfo.incidentId = option.incidentId;
95
     dataInfo.summaryId = option.summaryId;
96
     dataInfo.summaryId = option.summaryId;
96
-    getList(0);
97
+		dataInfo.hosId = option.hosId;
98
+		getList(0);
97
   })
99
   })
98
   
100
   
99
   onPullDownRefresh(() => {
101
   onPullDownRefresh(() => {

+ 6 - 2
pages/workHourManagementTwo/workHourManagementTwo.vue

@@ -20,7 +20,7 @@
20
 <script setup>
20
 <script setup>
21
   import { ref, reactive} from 'vue'
21
   import { ref, reactive} from 'vue'
22
   import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
22
   import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
23
-  import { api_workHourManagement, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
23
+  import { api_workHourManagement, getFetchDataList, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
24
   import { defaultColor } from '@/static/js/theme.js'
24
   import { defaultColor } from '@/static/js/theme.js'
25
   import { useSetTitle } from '@/share/useSetTitle.js'
25
   import { useSetTitle } from '@/share/useSetTitle.js'
26
   import { useLoginUserStore } from '@/stores/loginUser'
26
   import { useLoginUserStore } from '@/stores/loginUser'
@@ -44,6 +44,7 @@
44
     parentName: '',//一级工时管理名称
44
     parentName: '',//一级工时管理名称
45
     workHourManagementList: [],//二级工时管理列表-回显
45
     workHourManagementList: [],//二级工时管理列表-回显
46
     workHourManagementSelectedList: [],//二级工时管理列表-已选择
46
     workHourManagementSelectedList: [],//二级工时管理列表-已选择
47
+		hosId:null
47
   })
48
   })
48
   
49
   
49
   // 获取汇总单信息
50
   // 获取汇总单信息
@@ -132,13 +133,15 @@
132
       idx: dataInfo.idx,
133
       idx: dataInfo.idx,
133
       sum: 9999,
134
       sum: 9999,
134
       workHourManagement: {
135
       workHourManagement: {
136
+				treeLevel:2,
137
+				hosId:dataInfo.hosId,
135
         parent: {
138
         parent: {
136
           id: dataInfo.parentId,
139
           id: dataInfo.parentId,
137
         }
140
         }
138
       }
141
       }
139
     }
142
     }
140
     
143
     
141
-    api_workHourManagement(postData).then(res => {
144
+    getFetchDataList("simple/data", "workHourManagement", postData).then(res => {
142
       uni.hideLoading();
145
       uni.hideLoading();
143
       uni.stopPullDownRefresh();
146
       uni.stopPullDownRefresh();
144
       if(res.status == 200){
147
       if(res.status == 200){
@@ -164,6 +167,7 @@
164
     dataInfo.summaryId = option.summaryId;
167
     dataInfo.summaryId = option.summaryId;
165
     dataInfo.parentId = option.parentId;
168
     dataInfo.parentId = option.parentId;
166
     dataInfo.parentName = option.parentName;
169
     dataInfo.parentName = option.parentName;
170
+		dataInfo.hosId = option.hosId;
167
     getQuerySummaryDoc();
171
     getQuerySummaryDoc();
168
   })
172
   })
169
   
173
   

+ 1 - 0
share/useLoginSuccess.js

@@ -5,6 +5,7 @@ export function useLoginSuccess() {
5
    * 登录成功后的操作
5
    * 登录成功后的操作
6
    */
6
    */
7
   const loginSuccess = (user) => {
7
   const loginSuccess = (user) => {
8
+		loginUserStore.setLoginHospital(user.infoPermission.hospitals);
8
     loginUserStore.setLoginUser(user.user);
9
     loginUserStore.setLoginUser(user.user);
9
     loginUserStore.setLoginUserMenu(user.menu);
10
     loginUserStore.setLoginUserMenu(user.menu);
10
     // 判断用户标识是否为处理人
11
     // 判断用户标识是否为处理人

+ 3 - 1
share/useUploadFile.js

@@ -25,7 +25,9 @@ export function useUploadFile() {
25
    */
25
    */
26
   const uploadFile = async (imgObj, type, incidentId) => {
26
   const uploadFile = async (imgObj, type, incidentId) => {
27
 		console.log('44444', type)
27
 		console.log('44444', type)
28
-		if(imgObj.extname=='mp4' || imgObj.extname=='avi' || imgObj.extname=='mpeg' || imgObj.extname=='wmv'){
28
+		if(imgObj.extname=='mp4' || imgObj.extname=='avi' || imgObj.extname=='mpeg' || 
29
+			imgObj.extname=='wmv' || imgObj.extname=='mov' || imgObj.extname=='3gp' ||
30
+			imgObj.extname=='flv' || imgObj.extname=='mkv'){
29
 			return uni.uploadFile({
31
 			return uni.uploadFile({
30
 			  url: api_uploadAttachment(type, incidentId),
32
 			  url: api_uploadAttachment(type, incidentId),
31
 			  filePath: imgObj.path,
33
 			  filePath: imgObj.path,

+ 9 - 1
share/useWechatAuth.js

@@ -1,4 +1,4 @@
1
-import { api_wechatAuth, api_systemConfiguration} from "@/http/api.js"
1
+import { api_wechatAuth, api_systemConfiguration, api_getDictionary} from "@/http/api.js"
2
 import { useLoginSuccess } from '@/share/useLoginSuccess.js'
2
 import { useLoginSuccess } from '@/share/useLoginSuccess.js'
3
 const { loginSuccess } = useLoginSuccess()
3
 const { loginSuccess } = useLoginSuccess()
4
 export function useWechatAuth() {
4
 export function useWechatAuth() {
@@ -24,6 +24,14 @@ export function useWechatAuth() {
24
 				}).then(res2=>{
24
 				}).then(res2=>{
25
 					uni.setStorageSync('sysData',JSON.stringify(res2.list))
25
 					uni.setStorageSync('sysData',JSON.stringify(res2.list))
26
 				})
26
 				})
27
+				
28
+				let postData = {
29
+					"key": 'usertype',
30
+					"type": "list",
31
+				};
32
+				api_getDictionary(postData).then((data) => {
33
+					uni.setStorageSync('groupData',JSON.stringify(data))
34
+				});
27
       }
35
       }
28
     });
36
     });
29
   }
37
   }

BIN
static/img/300.jpg


+ 11 - 4
stores/loginUser.js

@@ -7,14 +7,20 @@ export const useLoginUserStore = defineStore(
7
     const loginUser = reactive({
7
     const loginUser = reactive({
8
       user: {},
8
       user: {},
9
       menu: [],
9
       menu: [],
10
+			hospital:[],
10
       sysName: '',
11
       sysName: '',
11
     });
12
     });
12
 
13
 
13
-    // 设置当前登录用户
14
-    function setLoginUser(data) {
15
-      loginUser.user = data;
14
+    // 设置当前登录用户院区
15
+    function setLoginHospital(data) {
16
+      loginUser.hospital = data;
16
     }
17
     }
17
-
18
+		
19
+		// 设置当前登录用户
20
+		function setLoginUser(data) {
21
+			loginUser.user = data;
22
+		}
23
+				
18
     // 设置当前登录用户菜单
24
     // 设置当前登录用户菜单
19
     function setLoginUserMenu(data) {
25
     function setLoginUserMenu(data) {
20
       loginUser.menu = data;
26
       loginUser.menu = data;
@@ -28,6 +34,7 @@ export const useLoginUserStore = defineStore(
28
     return {
34
     return {
29
       loginUser,
35
       loginUser,
30
       setLoginUser,
36
       setLoginUser,
37
+			setLoginHospital,
31
       setLoginUserMenu,
38
       setLoginUserMenu,
32
       setLoginUserTitle,
39
       setLoginUserTitle,
33
     };
40
     };

+ 33 - 2
uni_modules/sy-audio/components/sy-audio/sy-audio.vue

@@ -2,7 +2,11 @@
2
 	<view class="audio_center">
2
 	<view class="audio_center">
3
 		<view class="audio_center_cover">
3
 		<view class="audio_center_cover">
4
 			<image v-if="audioCover" class="audio_center_cover_img" mode="aspectFill" :src="audioCover"></image>
4
 			<image v-if="audioCover" class="audio_center_cover_img" mode="aspectFill" :src="audioCover"></image>
5
-			<view class="iconfont" @tap="clickAudio" :class="audio_status ?'icon-play-stop':'icon-play-cell'"></view>
5
+			<view class="audio-icon" @tap="clickAudio">
6
+				<!-- <view v-if="!audio_status">点击播放</view> -->
7
+				<image class="audio-img" v-if="!audio_status" src="../../static/img/audio.png"></image>
8
+				<image class="audio-play" v-if="audio_status" src="../../static/img/audio_play.gif"></image>
9
+			</view>
6
 		</view>
10
 		</view>
7
 		<view class="audio_center_right">
11
 		<view class="audio_center_right">
8
 			<view v-if="stringObject(src) == 'string'" class="single">
12
 			<view v-if="stringObject(src) == 'string'" class="single">
@@ -224,7 +228,34 @@
224
 
228
 
225
 <style lang="scss" scoped>
229
 <style lang="scss" scoped>
226
 	@import url('../../static/font/iconfont.css');
230
 	@import url('../../static/font/iconfont.css');
227
-
231
+	.icon-play{
232
+		// color: #49b856  !important;
233
+	}
234
+	.audio-icon{
235
+		width: 100%;
236
+		display: flex;
237
+		align-items: center;
238
+		justify-content: center;
239
+		// background: #49b856 !important;
240
+	}
241
+	.audio-img{
242
+		width: 100rpx;
243
+		height: 100rpx;
244
+		// position: relative;
245
+		// background-color: transparent;
246
+		// mix-blend-mode: multiply;
247
+	}
248
+	.audio-play{
249
+		width: 100rpx;
250
+		height: 100rpx;
251
+		// position: relative;
252
+		// background-color: transparent;
253
+		// mix-blend-mode: multiply;
254
+	}
255
+	.audio_center_cover{
256
+		width: 100% !important;
257
+		background: #fff !important;
258
+	}
228
 	::v-deep uni-slider,
259
 	::v-deep uni-slider,
229
 	::v-deep slider {
260
 	::v-deep slider {
230
 		margin: 0;
261
 		margin: 0;

+ 539 - 0
uni_modules/sy-audio/static/font/demo.css

@@ -0,0 +1,539 @@
1
+/* Logo 字体 */
2
+@font-face {
3
+  font-family: "iconfont logo";
4
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
5
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
6
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
7
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
8
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
9
+}
10
+
11
+.logo {
12
+  font-family: "iconfont logo";
13
+  font-size: 160px;
14
+  font-style: normal;
15
+  -webkit-font-smoothing: antialiased;
16
+  -moz-osx-font-smoothing: grayscale;
17
+}
18
+
19
+/* tabs */
20
+.nav-tabs {
21
+  position: relative;
22
+}
23
+
24
+.nav-tabs .nav-more {
25
+  position: absolute;
26
+  right: 0;
27
+  bottom: 0;
28
+  height: 42px;
29
+  line-height: 42px;
30
+  color: #666;
31
+}
32
+
33
+#tabs {
34
+  border-bottom: 1px solid #eee;
35
+}
36
+
37
+#tabs li {
38
+  cursor: pointer;
39
+  width: 100px;
40
+  height: 40px;
41
+  line-height: 40px;
42
+  text-align: center;
43
+  font-size: 16px;
44
+  border-bottom: 2px solid transparent;
45
+  position: relative;
46
+  z-index: 1;
47
+  margin-bottom: -1px;
48
+  color: #666;
49
+}
50
+
51
+
52
+#tabs .active {
53
+  border-bottom-color: #f00;
54
+  color: #222;
55
+}
56
+
57
+.tab-container .content {
58
+  display: none;
59
+}
60
+
61
+/* 页面布局 */
62
+.main {
63
+  padding: 30px 100px;
64
+  width: 960px;
65
+  margin: 0 auto;
66
+}
67
+
68
+.main .logo {
69
+  color: #333;
70
+  text-align: left;
71
+  margin-bottom: 30px;
72
+  line-height: 1;
73
+  height: 110px;
74
+  margin-top: -50px;
75
+  overflow: hidden;
76
+  *zoom: 1;
77
+}
78
+
79
+.main .logo a {
80
+  font-size: 160px;
81
+  color: #333;
82
+}
83
+
84
+.helps {
85
+  margin-top: 40px;
86
+}
87
+
88
+.helps pre {
89
+  padding: 20px;
90
+  margin: 10px 0;
91
+  border: solid 1px #e7e1cd;
92
+  background-color: #fffdef;
93
+  overflow: auto;
94
+}
95
+
96
+.icon_lists {
97
+  width: 100% !important;
98
+  overflow: hidden;
99
+  *zoom: 1;
100
+}
101
+
102
+.icon_lists li {
103
+  width: 100px;
104
+  margin-bottom: 10px;
105
+  margin-right: 20px;
106
+  text-align: center;
107
+  list-style: none !important;
108
+  cursor: default;
109
+}
110
+
111
+.icon_lists li .code-name {
112
+  line-height: 1.2;
113
+}
114
+
115
+.icon_lists .icon {
116
+  display: block;
117
+  height: 100px;
118
+  line-height: 100px;
119
+  font-size: 42px;
120
+  margin: 10px auto;
121
+  color: #333;
122
+  -webkit-transition: font-size 0.25s linear, width 0.25s linear;
123
+  -moz-transition: font-size 0.25s linear, width 0.25s linear;
124
+  transition: font-size 0.25s linear, width 0.25s linear;
125
+}
126
+
127
+.icon_lists .icon:hover {
128
+  font-size: 100px;
129
+}
130
+
131
+.icon_lists .svg-icon {
132
+  /* 通过设置 font-size 来改变图标大小 */
133
+  width: 1em;
134
+  /* 图标和文字相邻时,垂直对齐 */
135
+  vertical-align: -0.15em;
136
+  /* 通过设置 color 来改变 SVG 的颜色/fill */
137
+  fill: currentColor;
138
+  /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
139
+      normalize.css 中也包含这行 */
140
+  overflow: hidden;
141
+}
142
+
143
+.icon_lists li .name,
144
+.icon_lists li .code-name {
145
+  color: #666;
146
+}
147
+
148
+/* markdown 样式 */
149
+.markdown {
150
+  color: #666;
151
+  font-size: 14px;
152
+  line-height: 1.8;
153
+}
154
+
155
+.highlight {
156
+  line-height: 1.5;
157
+}
158
+
159
+.markdown img {
160
+  vertical-align: middle;
161
+  max-width: 100%;
162
+}
163
+
164
+.markdown h1 {
165
+  color: #404040;
166
+  font-weight: 500;
167
+  line-height: 40px;
168
+  margin-bottom: 24px;
169
+}
170
+
171
+.markdown h2,
172
+.markdown h3,
173
+.markdown h4,
174
+.markdown h5,
175
+.markdown h6 {
176
+  color: #404040;
177
+  margin: 1.6em 0 0.6em 0;
178
+  font-weight: 500;
179
+  clear: both;
180
+}
181
+
182
+.markdown h1 {
183
+  font-size: 28px;
184
+}
185
+
186
+.markdown h2 {
187
+  font-size: 22px;
188
+}
189
+
190
+.markdown h3 {
191
+  font-size: 16px;
192
+}
193
+
194
+.markdown h4 {
195
+  font-size: 14px;
196
+}
197
+
198
+.markdown h5 {
199
+  font-size: 12px;
200
+}
201
+
202
+.markdown h6 {
203
+  font-size: 12px;
204
+}
205
+
206
+.markdown hr {
207
+  height: 1px;
208
+  border: 0;
209
+  background: #e9e9e9;
210
+  margin: 16px 0;
211
+  clear: both;
212
+}
213
+
214
+.markdown p {
215
+  margin: 1em 0;
216
+}
217
+
218
+.markdown>p,
219
+.markdown>blockquote,
220
+.markdown>.highlight,
221
+.markdown>ol,
222
+.markdown>ul {
223
+  width: 80%;
224
+}
225
+
226
+.markdown ul>li {
227
+  list-style: circle;
228
+}
229
+
230
+.markdown>ul li,
231
+.markdown blockquote ul>li {
232
+  margin-left: 20px;
233
+  padding-left: 4px;
234
+}
235
+
236
+.markdown>ul li p,
237
+.markdown>ol li p {
238
+  margin: 0.6em 0;
239
+}
240
+
241
+.markdown ol>li {
242
+  list-style: decimal;
243
+}
244
+
245
+.markdown>ol li,
246
+.markdown blockquote ol>li {
247
+  margin-left: 20px;
248
+  padding-left: 4px;
249
+}
250
+
251
+.markdown code {
252
+  margin: 0 3px;
253
+  padding: 0 5px;
254
+  background: #eee;
255
+  border-radius: 3px;
256
+}
257
+
258
+.markdown strong,
259
+.markdown b {
260
+  font-weight: 600;
261
+}
262
+
263
+.markdown>table {
264
+  border-collapse: collapse;
265
+  border-spacing: 0px;
266
+  empty-cells: show;
267
+  border: 1px solid #e9e9e9;
268
+  width: 95%;
269
+  margin-bottom: 24px;
270
+}
271
+
272
+.markdown>table th {
273
+  white-space: nowrap;
274
+  color: #333;
275
+  font-weight: 600;
276
+}
277
+
278
+.markdown>table th,
279
+.markdown>table td {
280
+  border: 1px solid #e9e9e9;
281
+  padding: 8px 16px;
282
+  text-align: left;
283
+}
284
+
285
+.markdown>table th {
286
+  background: #F7F7F7;
287
+}
288
+
289
+.markdown blockquote {
290
+  font-size: 90%;
291
+  color: #999;
292
+  border-left: 4px solid #e9e9e9;
293
+  padding-left: 0.8em;
294
+  margin: 1em 0;
295
+}
296
+
297
+.markdown blockquote p {
298
+  margin: 0;
299
+}
300
+
301
+.markdown .anchor {
302
+  opacity: 0;
303
+  transition: opacity 0.3s ease;
304
+  margin-left: 8px;
305
+}
306
+
307
+.markdown .waiting {
308
+  color: #ccc;
309
+}
310
+
311
+.markdown h1:hover .anchor,
312
+.markdown h2:hover .anchor,
313
+.markdown h3:hover .anchor,
314
+.markdown h4:hover .anchor,
315
+.markdown h5:hover .anchor,
316
+.markdown h6:hover .anchor {
317
+  opacity: 1;
318
+  display: inline-block;
319
+}
320
+
321
+.markdown>br,
322
+.markdown>p>br {
323
+  clear: both;
324
+}
325
+
326
+
327
+.hljs {
328
+  display: block;
329
+  background: white;
330
+  padding: 0.5em;
331
+  color: #333333;
332
+  overflow-x: auto;
333
+}
334
+
335
+.hljs-comment,
336
+.hljs-meta {
337
+  color: #969896;
338
+}
339
+
340
+.hljs-string,
341
+.hljs-variable,
342
+.hljs-template-variable,
343
+.hljs-strong,
344
+.hljs-emphasis,
345
+.hljs-quote {
346
+  color: #df5000;
347
+}
348
+
349
+.hljs-keyword,
350
+.hljs-selector-tag,
351
+.hljs-type {
352
+  color: #a71d5d;
353
+}
354
+
355
+.hljs-literal,
356
+.hljs-symbol,
357
+.hljs-bullet,
358
+.hljs-attribute {
359
+  color: #0086b3;
360
+}
361
+
362
+.hljs-section,
363
+.hljs-name {
364
+  color: #63a35c;
365
+}
366
+
367
+.hljs-tag {
368
+  color: #333333;
369
+}
370
+
371
+.hljs-title,
372
+.hljs-attr,
373
+.hljs-selector-id,
374
+.hljs-selector-class,
375
+.hljs-selector-attr,
376
+.hljs-selector-pseudo {
377
+  color: #795da3;
378
+}
379
+
380
+.hljs-addition {
381
+  color: #55a532;
382
+  background-color: #eaffea;
383
+}
384
+
385
+.hljs-deletion {
386
+  color: #bd2c00;
387
+  background-color: #ffecec;
388
+}
389
+
390
+.hljs-link {
391
+  text-decoration: underline;
392
+}
393
+
394
+/* 代码高亮 */
395
+/* PrismJS 1.15.0
396
+https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
397
+/**
398
+ * prism.js default theme for JavaScript, CSS and HTML
399
+ * Based on dabblet (http://dabblet.com)
400
+ * @author Lea Verou
401
+ */
402
+code[class*="language-"],
403
+pre[class*="language-"] {
404
+  color: black;
405
+  background: none;
406
+  text-shadow: 0 1px white;
407
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
408
+  text-align: left;
409
+  white-space: pre;
410
+  word-spacing: normal;
411
+  word-break: normal;
412
+  word-wrap: normal;
413
+  line-height: 1.5;
414
+
415
+  -moz-tab-size: 4;
416
+  -o-tab-size: 4;
417
+  tab-size: 4;
418
+
419
+  -webkit-hyphens: none;
420
+  -moz-hyphens: none;
421
+  -ms-hyphens: none;
422
+  hyphens: none;
423
+}
424
+
425
+pre[class*="language-"]::-moz-selection,
426
+pre[class*="language-"] ::-moz-selection,
427
+code[class*="language-"]::-moz-selection,
428
+code[class*="language-"] ::-moz-selection {
429
+  text-shadow: none;
430
+  background: #b3d4fc;
431
+}
432
+
433
+pre[class*="language-"]::selection,
434
+pre[class*="language-"] ::selection,
435
+code[class*="language-"]::selection,
436
+code[class*="language-"] ::selection {
437
+  text-shadow: none;
438
+  background: #b3d4fc;
439
+}
440
+
441
+@media print {
442
+
443
+  code[class*="language-"],
444
+  pre[class*="language-"] {
445
+    text-shadow: none;
446
+  }
447
+}
448
+
449
+/* Code blocks */
450
+pre[class*="language-"] {
451
+  padding: 1em;
452
+  margin: .5em 0;
453
+  overflow: auto;
454
+}
455
+
456
+:not(pre)>code[class*="language-"],
457
+pre[class*="language-"] {
458
+  background: #f5f2f0;
459
+}
460
+
461
+/* Inline code */
462
+:not(pre)>code[class*="language-"] {
463
+  padding: .1em;
464
+  border-radius: .3em;
465
+  white-space: normal;
466
+}
467
+
468
+.token.comment,
469
+.token.prolog,
470
+.token.doctype,
471
+.token.cdata {
472
+  color: slategray;
473
+}
474
+
475
+.token.punctuation {
476
+  color: #999;
477
+}
478
+
479
+.namespace {
480
+  opacity: .7;
481
+}
482
+
483
+.token.property,
484
+.token.tag,
485
+.token.boolean,
486
+.token.number,
487
+.token.constant,
488
+.token.symbol,
489
+.token.deleted {
490
+  color: #905;
491
+}
492
+
493
+.token.selector,
494
+.token.attr-name,
495
+.token.string,
496
+.token.char,
497
+.token.builtin,
498
+.token.inserted {
499
+  color: #690;
500
+}
501
+
502
+.token.operator,
503
+.token.entity,
504
+.token.url,
505
+.language-css .token.string,
506
+.style .token.string {
507
+  color: #9a6e3a;
508
+  background: hsla(0, 0%, 100%, .5);
509
+}
510
+
511
+.token.atrule,
512
+.token.attr-value,
513
+.token.keyword {
514
+  color: #07a;
515
+}
516
+
517
+.token.function,
518
+.token.class-name {
519
+  color: #DD4A68;
520
+}
521
+
522
+.token.regex,
523
+.token.important,
524
+.token.variable {
525
+  color: #e90;
526
+}
527
+
528
+.token.important,
529
+.token.bold {
530
+  font-weight: bold;
531
+}
532
+
533
+.token.italic {
534
+  font-style: italic;
535
+}
536
+
537
+.token.entity {
538
+  cursor: help;
539
+}

+ 234 - 0
uni_modules/sy-audio/static/font/demo_index.html

@@ -0,0 +1,234 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+  <meta charset="utf-8"/>
5
+  <title>iconfont Demo</title>
6
+  <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
7
+  <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
8
+  <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
9
+  <link rel="stylesheet" href="demo.css">
10
+  <link rel="stylesheet" href="iconfont.css">
11
+  <script src="iconfont.js"></script>
12
+  <!-- jQuery -->
13
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
14
+  <!-- 代码高亮 -->
15
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
16
+  <style>
17
+    .main .logo {
18
+      margin-top: 0;
19
+      height: auto;
20
+    }
21
+
22
+    .main .logo a {
23
+      display: flex;
24
+      align-items: center;
25
+    }
26
+
27
+    .main .logo .sub-title {
28
+      margin-left: 0.5em;
29
+      font-size: 22px;
30
+      color: #fff;
31
+      background: linear-gradient(-45deg, #3967FF, #B500FE);
32
+      -webkit-background-clip: text;
33
+      -webkit-text-fill-color: transparent;
34
+    }
35
+  </style>
36
+</head>
37
+<body>
38
+  <div class="main">
39
+    <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
40
+      <img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
41
+      
42
+    </a></h1>
43
+    <div class="nav-tabs">
44
+      <ul id="tabs" class="dib-box">
45
+        <li class="dib active"><span>Unicode</span></li>
46
+        <li class="dib"><span>Font class</span></li>
47
+        <li class="dib"><span>Symbol</span></li>
48
+      </ul>
49
+      
50
+      <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=4695290" target="_blank" class="nav-more">查看项目</a>
51
+      
52
+    </div>
53
+    <div class="tab-container">
54
+      <div class="content unicode" style="display: block;">
55
+          <ul class="icon_lists dib-box">
56
+          
57
+            <li class="dib">
58
+              <span class="icon iconfont">&#xe636;</span>
59
+                <div class="name">语音播放</div>
60
+                <div class="code-name">&amp;#xe636;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon iconfont">&#xe6c5;</span>
65
+                <div class="name">录音</div>
66
+                <div class="code-name">&amp;#xe6c5;</div>
67
+              </li>
68
+          
69
+          </ul>
70
+          <div class="article markdown">
71
+          <h2 id="unicode-">Unicode 引用</h2>
72
+          <hr>
73
+
74
+          <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
75
+          <ul>
76
+            <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
77
+            <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
78
+          </ul>
79
+          <blockquote>
80
+            <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
81
+          </blockquote>
82
+          <p>Unicode 使用步骤如下:</p>
83
+          <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
84
+<pre><code class="language-css"
85
+>@font-face {
86
+  font-family: 'iconfont';
87
+  src: url('iconfont.woff2?t=1727258322633') format('woff2'),
88
+       url('iconfont.woff?t=1727258322633') format('woff'),
89
+       url('iconfont.ttf?t=1727258322633') format('truetype');
90
+}
91
+</code></pre>
92
+          <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
93
+<pre><code class="language-css"
94
+>.iconfont {
95
+  font-family: "iconfont" !important;
96
+  font-size: 16px;
97
+  font-style: normal;
98
+  -webkit-font-smoothing: antialiased;
99
+  -moz-osx-font-smoothing: grayscale;
100
+}
101
+</code></pre>
102
+          <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
103
+<pre>
104
+<code class="language-html"
105
+>&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
106
+</code></pre>
107
+          <blockquote>
108
+            <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
109
+          </blockquote>
110
+          </div>
111
+      </div>
112
+      <div class="content font-class">
113
+        <ul class="icon_lists dib-box">
114
+          
115
+          <li class="dib">
116
+            <span class="icon iconfont icon-yuyinbofang"></span>
117
+            <div class="name">
118
+              语音播放
119
+            </div>
120
+            <div class="code-name">.icon-yuyinbofang
121
+            </div>
122
+          </li>
123
+          
124
+          <li class="dib">
125
+            <span class="icon iconfont icon-luyin"></span>
126
+            <div class="name">
127
+              录音
128
+            </div>
129
+            <div class="code-name">.icon-luyin
130
+            </div>
131
+          </li>
132
+          
133
+        </ul>
134
+        <div class="article markdown">
135
+        <h2 id="font-class-">font-class 引用</h2>
136
+        <hr>
137
+
138
+        <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
139
+        <p>与 Unicode 使用方式相比,具有如下特点:</p>
140
+        <ul>
141
+          <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
142
+          <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
143
+        </ul>
144
+        <p>使用步骤如下:</p>
145
+        <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
146
+<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
147
+</code></pre>
148
+        <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
149
+<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
150
+</code></pre>
151
+        <blockquote>
152
+          <p>"
153
+            iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
154
+        </blockquote>
155
+      </div>
156
+      </div>
157
+      <div class="content symbol">
158
+          <ul class="icon_lists dib-box">
159
+          
160
+            <li class="dib">
161
+                <svg class="icon svg-icon" aria-hidden="true">
162
+                  <use xlink:href="#icon-yuyinbofang"></use>
163
+                </svg>
164
+                <div class="name">语音播放</div>
165
+                <div class="code-name">#icon-yuyinbofang</div>
166
+            </li>
167
+          
168
+            <li class="dib">
169
+                <svg class="icon svg-icon" aria-hidden="true">
170
+                  <use xlink:href="#icon-luyin"></use>
171
+                </svg>
172
+                <div class="name">录音</div>
173
+                <div class="code-name">#icon-luyin</div>
174
+            </li>
175
+          
176
+          </ul>
177
+          <div class="article markdown">
178
+          <h2 id="symbol-">Symbol 引用</h2>
179
+          <hr>
180
+
181
+          <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
182
+            这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
183
+          <ul>
184
+            <li>支持多色图标了,不再受单色限制。</li>
185
+            <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
186
+            <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
187
+            <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
188
+          </ul>
189
+          <p>使用步骤如下:</p>
190
+          <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
191
+<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
192
+</code></pre>
193
+          <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
194
+<pre><code class="language-html">&lt;style&gt;
195
+.icon {
196
+  width: 1em;
197
+  height: 1em;
198
+  vertical-align: -0.15em;
199
+  fill: currentColor;
200
+  overflow: hidden;
201
+}
202
+&lt;/style&gt;
203
+</code></pre>
204
+          <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
205
+<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
206
+  &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
207
+&lt;/svg&gt;
208
+</code></pre>
209
+          </div>
210
+      </div>
211
+
212
+    </div>
213
+  </div>
214
+  <script>
215
+  $(document).ready(function () {
216
+      $('.tab-container .content:first').show()
217
+
218
+      $('#tabs li').click(function (e) {
219
+        var tabContent = $('.tab-container .content')
220
+        var index = $(this).index()
221
+
222
+        if ($(this).hasClass('active')) {
223
+          return
224
+        } else {
225
+          $('#tabs li').removeClass('active')
226
+          $(this).addClass('active')
227
+
228
+          tabContent.hide().eq(index).fadeIn()
229
+        }
230
+      })
231
+    })
232
+  </script>
233
+</body>
234
+</html>

+ 8 - 22
uni_modules/sy-audio/static/font/iconfont.css

@@ -1,6 +1,8 @@
1
 @font-face {
1
 @font-face {
2
-  font-family: "iconfont"; /* Project id 3988464 */
3
-  src: url('../../static/font/iconfont.ttf') format('truetype');
2
+  font-family: "iconfont"; /* Project id 4695290 */
3
+  src: url('iconfont.woff2?t=1727258322633') format('woff2'),
4
+       url('iconfont.woff?t=1727258322633') format('woff'),
5
+       url('iconfont.ttf?t=1727258322633') format('truetype');
4
 }
6
 }
5
 
7
 
6
 .iconfont {
8
 .iconfont {
@@ -11,27 +13,11 @@
11
   -moz-osx-font-smoothing: grayscale;
13
   -moz-osx-font-smoothing: grayscale;
12
 }
14
 }
13
 
15
 
14
-.icon-play-stop:before {
15
-  content: "\e662";
16
+.icon-yuyinbofang:before {
17
+  content: "\e636";
16
 }
18
 }
17
 
19
 
18
-.icon-play-stop-new:before {
19
-  content: "\e605";
20
-}
21
-
22
-.icon-play-cell-new:before {
23
-  content: "\ea83";
24
-}
25
-
26
-.icon-play-nav:before {
27
-  content: "\e63c";
28
-}
29
-
30
-.icon-play-next:before {
31
-  content: "\e63e";
32
-}
33
-
34
-.icon-play-cell:before {
35
-  content: "\ea82";
20
+.icon-luyin:before {
21
+  content: "\e6c5";
36
 }
22
 }
37
 
23
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
uni_modules/sy-audio/static/font/iconfont.js


+ 23 - 0
uni_modules/sy-audio/static/font/iconfont.json

@@ -0,0 +1,23 @@
1
+{
2
+  "id": "4695290",
3
+  "name": "新运维",
4
+  "font_family": "iconfont",
5
+  "css_prefix_text": "icon-",
6
+  "description": "",
7
+  "glyphs": [
8
+    {
9
+      "icon_id": "12025079",
10
+      "name": "语音播放",
11
+      "font_class": "yuyinbofang",
12
+      "unicode": "e636",
13
+      "unicode_decimal": 58934
14
+    },
15
+    {
16
+      "icon_id": "4024735",
17
+      "name": "录音",
18
+      "font_class": "luyin",
19
+      "unicode": "e6c5",
20
+      "unicode_decimal": 59077
21
+    }
22
+  ]
23
+}

BIN
uni_modules/sy-audio/static/font/iconfont.ttf


BIN
uni_modules/sy-audio/static/font/iconfont.woff


BIN
uni_modules/sy-audio/static/font/iconfont.woff2


BIN
uni_modules/sy-audio/static/img/audio.png


BIN
uni_modules/sy-audio/static/img/audio_play.gif