diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue
index dd0d877..0c442e1 100644
--- a/pages/investigation/task.vue
+++ b/pages/investigation/task.vue
@@ -87,7 +87,7 @@
-
{{ formData.laneCount }}
车道
@@ -95,25 +95,34 @@
-
- {{ formData.roadStructure }}
+
+ {{ formData.roadStructure?initDic(formData.roadStructure, columnsEnumPicker):'请选择路面结构' }}
+
+ {{ initDic(formData.roadStructure, columnsEnumPicker) }}
-
- {{ formData.sideProtec }}
+ {{ formData.sideProtec?initDic(formData.sideProtec, columnsEnum2Picker):'请选择路侧防护' }}
+
+
+ {{ initDic(formData.sideProtec, columnsEnum2Picker) }}
-
- {{ formData.centerSeparate }}
+
+ {{ formData.centerSeparate?initDic(formData.centerSeparate, columnsEnum2Picker):'请选择中央隔离' }}
+
+ {{ initDic(formData.centerSeparate, columnsEnum2Picker) }}
@@ -140,6 +149,12 @@
+
+
+
-
+
@@ -512,6 +527,8 @@
this.type = e.type;
await this.getRoadTypes()
+ await this.getEnumValues1()
+ await this.getEnumValues2()
await this.getBaseData(e.id);
await this.getStreetCommunity()
}
@@ -825,6 +842,15 @@
columnsdlPicker: [
],
+ showEnumPicker: false,
+ columnsEnumPicker: [
+
+ ],
+ showEnum2Picker: false,
+ columnsEnum2Picker: [
+
+ ],
+ showEnum3Picker: false,
nidZD: '',
lockZD: false,
nidYH: '',
@@ -991,11 +1017,21 @@
},
pickerdlConfirm(e) {
- console.log(e)
this.showdlPicker = false
this.$set(this.formData, 'roadType', e.value[0].enumvalue)
this.$set(this.formData, 'roadTypeName', e.value[0].label)
},
+ // 数据回显
+ initDic(val, arr, label='label', value = 'enumvalue') {
+ // console.log(val==0)
+ let str = '- -'
+ for (let item of arr[0]) {
+ if (item[value] == val) {
+ str = item[label]
+ }
+ }
+ return str
+ },
pickerdlCancel(e) {
this.showdlPicker = false
},
@@ -1003,6 +1039,29 @@
this.showtimePicker = false
this.$set(this.formData, 'peakHours', e.value[0] + ' - ' + e.value[1])
},
+ pickerEnumCancel(e) {
+ this.showEnumPicker = false
+ },
+ pickerEnumConfirm(e) {
+ this.showEnumPicker = false
+ this.$set(this.formData, 'roadStructure', e.value[0].enumvalue)
+ },
+ pickerEnum2Cancel(e) {
+ this.showEnum2Picker = false
+ },
+ pickerEnum2Confirm(e) {
+ this.showEnum2Picker = false
+ this.$set(this.formData, 'sideProtec', e.value[0].enumvalue)
+ },
+ pickerEnum3Cancel(e) {
+ this.showEnum3Picker = false
+ },
+ pickerEnum3Confirm(e) {
+ this.showEnum3Picker = false
+ this.$set(this.formData, 'centerSeparate', e.value[0].enumvalue)
+ },
+
+
pickertimeCancel(e) {
this.showtimePicker = false
},
@@ -1237,11 +1296,10 @@
});
},
getRoadTypes() {
-
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getRoadTypes", {
-
+ enumType: '303'
},
"GET"
)
@@ -1257,7 +1315,46 @@
}
});
},
-
+ getEnumValues1() {
+ this.$request
+ .globalRequest(
+ "/hiddenDanger/highDanger/getEnumValues", {
+ enumType: '3119'
+ },
+ "GET"
+ )
+ .then((res) => {
+ if (res.code === 200) {
+ console.log(res.result)
+ // console.log(res)
+ let arr = res.result
+ for (let item of arr) {
+ item.label = item.enumName
+ }
+ this.columnsEnumPicker = [arr]
+ }
+ });
+ },
+ getEnumValues2() {
+ this.$request
+ .globalRequest(
+ "/hiddenDanger/highDanger/getEnumValues", {
+ enumType: '973'
+ },
+ "GET"
+ )
+ .then((res) => {
+ if (res.code === 200) {
+ console.log(res.result)
+ // console.log(res)
+ let arr = res.result
+ for (let item of arr) {
+ item.label = item.enumName
+ }
+ this.columnsEnum2Picker = [arr]
+ }
+ });
+ },
getBaseDefaultData() {
this.$request
.globalRequest(
@@ -1316,7 +1413,10 @@
if (res.code === 200) {
for (let k in res.result) {
if (res.result[k] == 0) {
- res.result[k] = ""
+ if(k!='sideProtec'&&k!='centerSeparate'&&k!='roadStructure'){
+ res.result[k] = ""
+ }
+
}
}
this.formData = {