|
@@ -1,11 +1,11 @@
|
1
|
1
|
<template>
|
2
|
2
|
<view class="buildIncident">
|
3
|
3
|
<!-- 原来的scroll-view -->
|
4
|
|
- <view class="body view-body">
|
|
4
|
+ <view class="body view-body">
|
5
|
5
|
<view class="form_item">
|
6
|
6
|
<view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
|
7
|
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
|
9
|
:localdata="dataInfo.branchList" v-model="incidentData.branch" :clear-icon="false"
|
10
|
10
|
:class="{formRed: isSubmit && !incidentData.branch}" @change="changeBranch">
|
11
|
11
|
</uni-data-picker>
|
|
@@ -56,10 +56,10 @@
|
56
|
56
|
</view>
|
57
|
57
|
</view>
|
58
|
58
|
<view class="form_item">
|
59
|
|
- <view class="title select"><text class="required newicon newicon-bitian"></text>故障来源:</view>
|
60
|
|
- <!-- <uni-data-select readonly class="value" v-model="incidentData.source" :localdata="dataInfo.sourceList" placeholder="请选择故障来源" :class="{formRed: isSubmit && !incidentData.source}"></uni-data-select> -->
|
61
|
|
- <uni-data-picker class="value" placeholder="请选择故障来源"
|
62
|
|
- :localdata="dataInfo.sourceList" v-model="incidentData.source"
|
|
59
|
+ <view class="title select"><text class="required newicon newicon-bitian"></text>报修来源:</view>
|
|
60
|
+ <!-- <uni-data-select readonly class="value" v-model="incidentData.source" :localdata="dataInfo.sourceList" placeholder="请选择报修来源" :class="{formRed: isSubmit && !incidentData.source}"></uni-data-select> -->
|
|
61
|
+ <uni-data-picker class="value" placeholder="请选择报修来源"
|
|
62
|
+ :localdata="dataInfo.sourceList" v-model="incidentData.source"
|
63
|
63
|
:clear-icon="false" :class="{formRed: isSubmit && !incidentData.source}">
|
64
|
64
|
</uni-data-picker>
|
65
|
65
|
</view>
|
|
@@ -67,7 +67,7 @@
|
67
|
67
|
<view class="title select"><text class="required newicon newicon-bitian"></text>优先级:</view>
|
68
|
68
|
<!-- <uni-data-select placement="top" readonly class="value" v-model="incidentData.priority" :localdata="dataInfo.priorityList" placeholder="请选择优先级" :class="{formRed: isSubmit && !incidentData.priority}"></uni-data-select> -->
|
69
|
69
|
<uni-data-picker placement="top" class="value" placeholder="请选择优先级"
|
70
|
|
- :localdata="dataInfo.priorityList" v-model="incidentData.priority"
|
|
70
|
+ :localdata="dataInfo.priorityList" v-model="incidentData.priority"
|
71
|
71
|
:clear-icon="false" :class="{formRed: isSubmit && !incidentData.priority}">
|
72
|
72
|
</uni-data-picker>
|
73
|
73
|
</view>
|
|
@@ -119,7 +119,7 @@
|
119
|
119
|
|
120
|
120
|
// 主题颜色
|
121
|
121
|
const primaryColor = ref(defaultColor)
|
122
|
|
-
|
|
122
|
+
|
123
|
123
|
// 工单对象
|
124
|
124
|
const incidentData = reactive({
|
125
|
125
|
"deleteFlag": 0,
|
|
@@ -148,7 +148,7 @@
|
148
|
148
|
// 数据
|
149
|
149
|
const dataInfo = reactive({
|
150
|
150
|
branchList: [], //院区列表
|
151
|
|
- sourceList: [], //故障来源列表
|
|
151
|
+ sourceList: [], //报修来源列表
|
152
|
152
|
priorityList: [], //优先级列表
|
153
|
153
|
})
|
154
|
154
|
|
|
@@ -206,7 +206,7 @@
|
206
|
206
|
url: `/pages/searchDept/searchDept`
|
207
|
207
|
})
|
208
|
208
|
}
|
209
|
|
-
|
|
209
|
+
|
210
|
210
|
// 跳转到搜索报修人
|
211
|
211
|
function selectRequester(){
|
212
|
212
|
incidentBuildStore.setIncidentBuildData(incidentData, 'buildIncident', 'requester');
|
|
@@ -266,7 +266,7 @@
|
266
|
266
|
// })
|
267
|
267
|
}
|
268
|
268
|
|
269
|
|
- // 获取故障来源列表
|
|
269
|
+ // 获取报修来源列表
|
270
|
270
|
function getSources(sourceValue){
|
271
|
271
|
uni.showLoading({
|
272
|
272
|
title: "加载中",
|
|
@@ -323,7 +323,7 @@
|
323
|
323
|
incidentData.place = undefined;
|
324
|
324
|
incidentData.houseNumber = undefined;
|
325
|
325
|
}
|
326
|
|
-
|
|
326
|
+
|
327
|
327
|
// 处理提交事件
|
328
|
328
|
function handlerOrder(){
|
329
|
329
|
let postData = {
|
|
@@ -342,7 +342,7 @@
|
342
|
342
|
function handlerOrderImg(imgObj){
|
343
|
343
|
return uploadFile(imgObj, 'incident', dataInfo.incidentId)
|
344
|
344
|
}
|
345
|
|
-
|
|
345
|
+
|
346
|
346
|
// 获取优先级
|
347
|
347
|
function getPriorityData(){
|
348
|
348
|
let postData = {
|
|
@@ -360,7 +360,7 @@
|
360
|
360
|
}
|
361
|
361
|
})
|
362
|
362
|
}
|
363
|
|
-
|
|
363
|
+
|
364
|
364
|
// 提交
|
365
|
365
|
function submit(){
|
366
|
366
|
isSubmit.value = true;
|
|
@@ -399,7 +399,7 @@
|
399
|
399
|
if(!incidentData.source){
|
400
|
400
|
uni.showToast({
|
401
|
401
|
icon: 'none',
|
402
|
|
- title: '请选择故障来源'
|
|
402
|
+ title: '请选择报修来源'
|
403
|
403
|
});
|
404
|
404
|
return;
|
405
|
405
|
}
|