diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue
index 4fb21cd..91c6251 100644
--- a/pages/investigation/task.vue
+++ b/pages/investigation/task.vue
@@ -37,7 +37,7 @@
- {{ formData.roadType }}
+ {{ formData.roadType }}
@@ -45,7 +45,7 @@
- {{ formData.roadWidth }}
+ {{ formData.roadWidth }}
米
@@ -53,7 +53,7 @@
- {{ formData.laneCount }}
+ {{ formData.laneCount }}
辆
@@ -61,7 +61,7 @@
- {{ formData.roadStructure }}
+ {{ formData.roadStructure }}
@@ -69,7 +69,7 @@
- {{ formData.sideProtec }}
+ {{ formData.sideProtec }}
@@ -77,7 +77,7 @@
- {{ formData.centerSeparate }}
+ {{ formData.centerSeparate }}
@@ -85,7 +85,7 @@
- {{ formData.designSpeed }}
+ {{ formData.designSpeed }}
Km/h
@@ -93,7 +93,7 @@
- {{ formData.limitSpeed }}
+ {{ formData.limitSpeed }}
Km/h
@@ -111,7 +111,7 @@
- {{ formData.maxTraffic }}
+ {{ formData.maxTraffic }}
辆
@@ -119,7 +119,7 @@
- {{ formData.peakTraffic }}
+ {{ formData.peakTraffic }}
辆
@@ -127,7 +127,7 @@
- {{ formData.peakHours }}
+ {{ formData.peakHours }}
@@ -135,16 +135,16 @@
- {{ formData.normalTraffic }}
+ {{ formData.normalTraffic }}
辆
-
+
- {{ formData.largeVehicleRate }}
+ {{ formData.largeVehicleRate }}
%
@@ -152,7 +152,7 @@
- {{ formData.nonvehicleTraffic }}
+ {{ formData.nonvehicleTraffic }}
辆
@@ -162,12 +162,11 @@
重点排查
-
-
+
+
{{ item.name }}
-
+
新增排查
@@ -176,15 +175,16 @@
-
+
-
+
+
+
+
-
-
-
-
+
-
+
新增隐患
@@ -342,25 +342,18 @@
-
-
-
-
+
+
+
@@ -393,7 +386,7 @@
onLoad(e) {
if (e.id) {
this.businessId = e.id;
-
+
this.type = e.type;
this.getBaseData(e.id);
}
@@ -568,7 +561,7 @@
extraConfigs: [],
describeArr: [],
temporary: '',
- type:''
+ type: ''
};
},
methods: {
@@ -577,14 +570,14 @@
this.showInvestigation2 = true;
this.showInvestigation2Item = v;
},
-
- showInvestigationTag2(v){
+
+ showInvestigationTag2(v) {
console.log(v, this.investigationSelectList)
- if(this.checked.includes(v.id)){
+ if (this.checked.includes(v.id)) {
this.showInvestigation2 = true;
this.showInvestigation2Item = v
}
-
+
},
select2(v, list, list2) {
list.dangerItems.forEach(item => {
@@ -651,7 +644,7 @@
// } else {
// this.$.toast("已添加");
// }
-
+
},
select3(v) {
// this.investigationSelectList.map((r) => {
@@ -663,7 +656,7 @@
this.showInvestigation2Item = {};
this.showInvestigation2 = false;
this.troubleshootingData.map(r => {
- if(r.id == v.id){
+ if (r.id == v.id) {
r.checkedSelect = v.checkedSelect
r.extraConfigs = v.extraConfigs
}
@@ -755,8 +748,8 @@
)
.then((res) => {
if (res.code === 200) {
- for(let k in res.result){
- if(res.result[k] == 0) {
+ for (let k in res.result) {
+ if (res.result[k] == 0) {
res.result[k] = ""
}
}
@@ -796,11 +789,11 @@
// todo 无数据结构
this.investigationSelectList = res.result;
this.investigationSelectList.map((r) => {
-
- this.troubleshootingData = [...this.troubleshootingData,...r.dangerItems]
+
+ this.troubleshootingData = [...this.troubleshootingData, ...r.dangerItems]
});
this.checked = this.troubleshootingData.map(r => {
- if(r.checked == 1){
+ if (r.checked == 1) {
return r.id
}
})
@@ -1040,13 +1033,16 @@
}
},
submit(temporary) {
-
+ //查看情况下 直接返回上一页
+ if (this.type == 'view') {
+ return uni.navigateBack();
+ }
let checkedArr = this.troubleshootingData.filter(r => this.checked.includes(r.id))
console.log(checkedArr)
-
+
let extraConfigs = [];
checkedArr.map((r) => {
- if(!r.extraConfigs) return
+ if (!r.extraConfigs) return
r.extraConfigs.map((s) => {
s.scenesId = r.nid;
s.dangerId = r.id;
@@ -1079,38 +1075,38 @@
} catch (e) {
//TODO handle the exception
}
-
- checkedArr.map(r =>{
+
+ checkedArr.map(r => {
describe.push({
hdTerm: r.id,
hdDesc: r.checkedSelect ? r.checkedSelect.hdDesc : '',
hdPic: r.checkedSelect ? r.checkedSelect.hdPic : '',
hdInfo: r.checkedSelect ? r.checkedSelect.hdPic : '',
- pcType:1
+ pcType: 1
})
})
console.log(this.investigationSelectList);
console.log(this.troubleshootingData);
console.log({
...this.formData,
- businessId: this.businessId,
- extraConfigs: extraConfigs,
- describe: describe,
+ businessId: this.businessId,
+ extraConfigs: extraConfigs,
+ describe: describe,
});
this.extraConfigs = extraConfigs
this.describeArr = describe
this.temporary = temporary
- console.log(this.extraConfigs,this.describeArr)
- if(!temporary) {
+ console.log(this.extraConfigs, this.describeArr)
+ if (!temporary) {
this.postSaveManualInvestigation()
return
}
- if(this.extraConfigs.length <= 0 || this.describeArr.length <= 0) {
+ if (this.extraConfigs.length <= 0 || this.describeArr.length <= 0) {
this.modalShow = true
} else {
this.postSaveManualInvestigation()
}
-
+
},
postSaveManualInvestigation() {
this.$request
@@ -1138,7 +1134,7 @@
.then((res) => {
console.log(res);
if (res.code === 200) {
- if(this.temporary) {
+ if (this.temporary) {
this.$.toast("保存成功");
} else {
this.$.toast("暂存成功");
@@ -1452,6 +1448,7 @@
padding: 0 20rpx;
overflow-x: auto;
}
+
.u-checkbox-group--row {
flex-direction: column;
padding: 0 20rpx;
@@ -1460,33 +1457,34 @@
margin-bottom: 30rpx;
}
}
-
-::v-deep ::-webkit-scrollbar {
- // 滚动条整体样式
- display: block;
- width: 16rpx !important;
- height: 16rpx !important;
- -webkit-appearance: auto !important;
- background: transparent;
- overflow: auto !important;
-}
-
-::v-deep ::-webkit-scrollbar-thumb {
- // 滚动条里面小方块
- border-radius: 16rpx !important;
- box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
- background-color: #f7f7f7 !important;
-}
-
-::v-deep ::-webkit-scrollbar-track {
- // 滚动条
- border-radius: 16rpx !important;
- box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
- background-color: #dad8d8 !important;
-}
-.formInput {
- width: 90%;
- margin-right: 4px;
- font-size: 14px;
-}
+
+ ::v-deep ::-webkit-scrollbar {
+ // 滚动条整体样式
+ display: block;
+ width: 16rpx !important;
+ height: 16rpx !important;
+ -webkit-appearance: auto !important;
+ background: transparent;
+ overflow: auto !important;
+ }
+
+ ::v-deep ::-webkit-scrollbar-thumb {
+ // 滚动条里面小方块
+ border-radius: 16rpx !important;
+ box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
+ background-color: #f7f7f7 !important;
+ }
+
+ ::v-deep ::-webkit-scrollbar-track {
+ // 滚动条
+ border-radius: 16rpx !important;
+ box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
+ background-color: #dad8d8 !important;
+ }
+
+ .formInput {
+ width: 90%;
+ margin-right: 4px;
+ font-size: 14px;
+ }
\ No newline at end of file