diff --git a/pages/investigation/index.vue b/pages/investigation/index.vue index 689a844..7969195 100644 --- a/pages/investigation/index.vue +++ b/pages/investigation/index.vue @@ -112,8 +112,8 @@ search: '', tabbarShow: true, queryType: '1', - pageStatus: '' - + pageStatus: '', + totalResultList: [] } }, // 页面加载 @@ -181,6 +181,9 @@ this.status = '2'; break; } + this.totalResultList.forEach(item => { + this.totalData[item.status] = item.count + }) this.getList() }, @@ -190,6 +193,7 @@ }, 'GET').then(res => { if (res.code === 200) { // console.log(res.result) + this.totalResultList = res.result res.result.forEach(item => { this.totalData[item.status] = item.count }) diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue index c54eece..4bcc9e0 100644 --- a/pages/investigation/task.vue +++ b/pages/investigation/task.vue @@ -70,9 +70,9 @@ - {{ formData.roadType?formData.roadType:'请选择道路类型' }} - {{ formData.roadType }} + {{ formData.roadTypeName?formData.roadTypeName:'请选择道路类型' }} + {{ formData.roadTypeName }} @@ -344,12 +344,15 @@ + - {{ item.hdTermName||item.dangerProblem }} + {{ item.dangerProblem }} @@ -493,7 +496,7 @@ this.getChartsData(); this.getChartsData2() }, - onLoad(e) { + async onLoad(e) { this.boxHeight = uni.getSystemInfoSync().windowHeight; if (e.id) { this.businessId = e.id; @@ -501,10 +504,10 @@ this.name = e.taskName this.sectionName = e.sectionName this.type = e.type; - - this.getBaseData(e.id); - this.getStreetCommunity() - this.getRoadTypes() + + await this.getRoadTypes() + await this.getBaseData(e.id); + await this.getStreetCommunity() } this.getLocationInfo(); this.getSystemInfo() @@ -974,8 +977,10 @@ }, pickerdlConfirm(e) { + console.log(e) this.showdlPicker = false - this.$set(this.formData, 'roadType', e.value[0].label) + this.$set(this.formData, 'roadType', e.value[0].enumvalue) + this.$set(this.formData, 'roadTypeName', e.value[0].label) }, pickerdlCancel(e) { this.showdlPicker = false @@ -1249,7 +1254,18 @@ if (res.code === 200) { // console.log(res,11111) if (!this.formData.roadType) { + console.log('123123', res.result.sectionType) this.$set(this.formData, 'roadType', res.result.sectionType) + // this.columnsdlPicker.forEach(item => { + // if(item.enumvalue == res.result.sectionType) { + // this.$set(this.formData, 'roadType', item.enumName) + // } + // }) + this.columnsdlPicker[0].forEach(item => { + if(item.enumvalue == res.result.sectionType) { + this.$set(this.formData, 'roadTypeName', item.enumName) + } + }) } if (!this.formData.roadWidth) { this.$set(this.formData, 'roadWidth', res.result.width) @@ -1294,6 +1310,12 @@ ...this.formData, ...res.result }; + console.log('this.columnsdlPicker', this.columnsdlPicker) + this.columnsdlPicker[0]?.forEach(item => { + if(item.enumvalue == this.formData.roadType) { + this.$set(this.formData, 'roadTypeName', item.enumName) + } + }) this.getStreetCommunityByXq() this.getBaseDefaultData() } @@ -1336,6 +1358,7 @@ this.investigationSelectList.map((r) => { this.troubleshootingData = [...this.troubleshootingData, ...r.dangerItems] }); + console.log('this.troubleshootingData', this.troubleshootingData) // console.log(this.troubleshootingData, 11111) this.checked = this.troubleshootingData.map(r => { if (r.checked == 1) { @@ -1351,6 +1374,7 @@ } } + this.initCheckedSelect() // console.log(this.troubleshootingData) // this.$request // .globalRequest( @@ -1440,7 +1464,7 @@ "GET" ) .then((res) => { - if (res.code === 200) { + if (res.code === 200 && res.result.length != 0) { this.hiddenDangerList.push(...res.result) console.log(this.troubleshootingData, 123) console.log(res.result, 321) @@ -1474,11 +1498,12 @@ .then((res) => { if (res.code == 200) { this.troubleshootingData[index].extraConfigs.push(...res.result) + // console.log('656666666666666666666666666666666', this.troubleshootingData) } - + console.log('222333333333333333334444444444', this.checked, index) if (this.checked.length - 1 == index) { // alert(1111) - this.initCheckedSelect(index) + // this.initCheckedSelect(index) } @@ -1693,8 +1718,9 @@ if (this.type == 'view') { return uni.navigateBack(); } + console.log('this.checkedthis.checked', this.checked) let checkedArr = this.troubleshootingData.filter(r => this.checked.includes(r.id)) - // console.log(11111111, checkedArr) + console.log(11111111, checkedArr) let extraConfigs = []; checkedArr.map((r) => { @@ -1718,8 +1744,9 @@ }); }); + console.log('this.hiddenDangerListthis.hiddenDangerList', this.hiddenDangerList) let describe = JSON.parse(JSON.stringify(this.hiddenDangerList)) - console.log(describe) + console.log('describedescribedescribedescribedescribedescribedescribe', describe) try { for (let item of describe) { if (item.nid) { @@ -2063,6 +2090,7 @@ } }) this.nidYH = '' + console.log('this.hiddenDangerList', this.hiddenDangerList) } }, };