|
|
@ -74,14 +74,14 @@ |
|
|
|
<uni-forms-item label="设计时速"> |
|
|
|
<uni-forms-item label="设计时速"> |
|
|
|
<input v-if="isEdit" type="number" class="BorderNone Height100" v-model="formData.designSpeed" |
|
|
|
<input v-if="isEdit" type="number" class="BorderNone Height100" v-model="formData.designSpeed" |
|
|
|
placeholder="请输入设计时速" /> |
|
|
|
placeholder="请输入设计时速" /> |
|
|
|
<text class="Height100 Flex Flex_end Flex_C_S-Center" |
|
|
|
<text class="Height100 Flex Flex_end Flex_C_S-Center" v-else>{{ formData.designSpeed |
|
|
|
v-else>{{ formData.designSpeed }}Km/h</text> |
|
|
|
}}Km/h</text> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms-item> |
|
|
|
<uni-forms-item label="限速"> |
|
|
|
<uni-forms-item label="限速"> |
|
|
|
<input v-if="isEdit" type="number" class="BorderNone Height100" v-model="formData.limitSpeed" |
|
|
|
<input v-if="isEdit" type="number" class="BorderNone Height100" v-model="formData.limitSpeed" |
|
|
|
placeholder="请输入限速" /> |
|
|
|
placeholder="请输入限速" /> |
|
|
|
<text class="Height100 Flex Flex_C_S-Center Flex_end" |
|
|
|
<text class="Height100 Flex Flex_C_S-Center Flex_end" v-else>{{ formData.limitSpeed |
|
|
|
v-else>{{ formData.limitSpeed }}Km/h</text> |
|
|
|
}}Km/h</text> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms> |
|
|
|
</uni-forms> |
|
|
|
<view class="photo"> |
|
|
|
<view class="photo"> |
|
|
@ -113,20 +113,20 @@ |
|
|
|
<uni-forms-item label="平峰流量"> |
|
|
|
<uni-forms-item label="平峰流量"> |
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100" |
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100" |
|
|
|
v-model="formData.normalTraffic" placeholder="请输入平峰流量" /> |
|
|
|
v-model="formData.normalTraffic" placeholder="请输入平峰流量" /> |
|
|
|
<text class="Height100 Flex Flex_end Flex_C_S-Center" |
|
|
|
<text class="Height100 Flex Flex_end Flex_C_S-Center" v-else>{{ formData.normalTraffic |
|
|
|
v-else>{{ formData.normalTraffic }}辆</text> |
|
|
|
}}辆</text> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms-item> |
|
|
|
<uni-forms-item label="大车占比"> |
|
|
|
<uni-forms-item label="大车占比"> |
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100" |
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100" |
|
|
|
v-model="formData.largeVehicleRate" placeholder="请输入大车占比" /> |
|
|
|
v-model="formData.largeVehicleRate" placeholder="请输入大车占比" /> |
|
|
|
<text class="Height100 Flex Flex_end Flex_C_S-Center" |
|
|
|
<text class="Height100 Flex Flex_end Flex_C_S-Center" v-else>{{ formData.largeVehicleRate |
|
|
|
v-else>{{ formData.largeVehicleRate }}%</text> |
|
|
|
}}%</text> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms-item> |
|
|
|
<uni-forms-item label="非机动车流量"> |
|
|
|
<uni-forms-item label="非机动车流量"> |
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100" |
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100" |
|
|
|
v-model="formData.nonvehicleTraffic" placeholder="请输入非机动车流量" /> |
|
|
|
v-model="formData.nonvehicleTraffic" placeholder="请输入非机动车流量" /> |
|
|
|
<text class="Height100 Flex Flex_end Flex_C_S-Center" |
|
|
|
<text class="Height100 Flex Flex_end Flex_C_S-Center" v-else>{{ formData.nonvehicleTraffic |
|
|
|
v-else>{{ formData.nonvehicleTraffic }}辆</text> |
|
|
|
}}辆</text> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms> |
|
|
|
</uni-forms> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -146,6 +146,10 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<u-checkbox-group v-model="checked" iconPlacement="right" placement="row"> |
|
|
|
|
|
|
|
<u-checkbox v-for="(item,index) in troubleshootingData" :label="item.itemname" activeColor="#2663BF" |
|
|
|
|
|
|
|
:name="item.id"></u-checkbox> |
|
|
|
|
|
|
|
</u-checkbox-group> |
|
|
|
<u-popup :show="showInvestigation" @close="showInvestigation = false"> |
|
|
|
<u-popup :show="showInvestigation" @close="showInvestigation = false"> |
|
|
|
<InvestigationItem @select="select2"></InvestigationItem> |
|
|
|
<InvestigationItem @select="select2"></InvestigationItem> |
|
|
|
</u-popup> |
|
|
|
</u-popup> |
|
|
@ -509,7 +513,10 @@ |
|
|
|
addInvestigationInfo: { |
|
|
|
addInvestigationInfo: { |
|
|
|
type: '', |
|
|
|
type: '', |
|
|
|
index: 0 |
|
|
|
index: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//选中排查数据 |
|
|
|
|
|
|
|
troubleshootingData: [], |
|
|
|
|
|
|
|
checked: [], |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
@ -519,19 +526,43 @@ |
|
|
|
this.showInvestigation2Item = v; |
|
|
|
this.showInvestigation2Item = v; |
|
|
|
}, |
|
|
|
}, |
|
|
|
select2(v, list) { |
|
|
|
select2(v, list) { |
|
|
|
this.showInvestigation = false; |
|
|
|
// this.showInvestigation = false; |
|
|
|
let id = 0; |
|
|
|
// let id = 0; |
|
|
|
this.investigationSelectList.map((r) => { |
|
|
|
// this.investigationSelectList.map((r) => { |
|
|
|
if (r.nid == v.nid) { |
|
|
|
// if (r.nid == v.nid) { |
|
|
|
id = r.nid; |
|
|
|
// id = r.nid; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// if (!id) { |
|
|
|
|
|
|
|
// v.extraConfigs = list; |
|
|
|
|
|
|
|
// this.investigationSelectList.push(v); |
|
|
|
|
|
|
|
// this.showInvestigation = false; |
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
|
|
// this.$.toast("已添加"); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
list.dangerItems.forEach(item => { |
|
|
|
|
|
|
|
// 假设this.troubleshootingData中没有与当前item.id相同的id |
|
|
|
|
|
|
|
let found = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 遍历this.troubleshootingData数组来查找id |
|
|
|
|
|
|
|
this.troubleshootingData.forEach(item2 => { |
|
|
|
|
|
|
|
if (item.id === item2.id) { |
|
|
|
|
|
|
|
// 如果找到了,设置found为true并退出循环 |
|
|
|
|
|
|
|
found = true; |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (!id) { |
|
|
|
|
|
|
|
v.extraConfigs = list; |
|
|
|
// 如果在this.troubleshootingData中没有找到相同的id,则将其添加到result数组中 |
|
|
|
this.investigationSelectList.push(v); |
|
|
|
if (!found) { |
|
|
|
this.showInvestigation = false; |
|
|
|
this.troubleshootingData.push(item); |
|
|
|
} else { |
|
|
|
} |
|
|
|
this.$.toast("已添加"); |
|
|
|
}); |
|
|
|
|
|
|
|
// this.troubleshootingData = result |
|
|
|
|
|
|
|
this.showInvestigation = false |
|
|
|
|
|
|
|
let isId = this.investigationSelectList.some(item => item.nid === list.nid); |
|
|
|
|
|
|
|
if (!isId) { |
|
|
|
|
|
|
|
this.investigationSelectList.push(list) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
select3(v) { |
|
|
|
select3(v) { |
|
|
@ -580,11 +611,11 @@ |
|
|
|
] |
|
|
|
] |
|
|
|
// console.log(this.hiddenDangerList2) |
|
|
|
// console.log(this.hiddenDangerList2) |
|
|
|
|
|
|
|
|
|
|
|
if(v.hdPic){ |
|
|
|
if (v.hdPic) { |
|
|
|
this.fileList = [{ |
|
|
|
this.fileList = [{ |
|
|
|
url: v.hdPic |
|
|
|
url: v.hdPic |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.fileList = []; |
|
|
|
this.fileList = []; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -668,7 +699,8 @@ |
|
|
|
.globalRequest( |
|
|
|
.globalRequest( |
|
|
|
"/hiddenDanger/highDanger/getImportDangerDisplayDetail", { |
|
|
|
"/hiddenDanger/highDanger/getImportDangerDisplayDetail", { |
|
|
|
nuserid: this.$.getData("token"), |
|
|
|
nuserid: this.$.getData("token"), |
|
|
|
businessId |
|
|
|
businessId, |
|
|
|
|
|
|
|
dangerId: '26' |
|
|
|
}, |
|
|
|
}, |
|
|
|
"GET" |
|
|
|
"GET" |
|
|
|
) |
|
|
|
) |
|
|
@ -841,7 +873,7 @@ |
|
|
|
len = !len ? 36 : len; |
|
|
|
len = !len ? 36 : len; |
|
|
|
binary = !binary ? 16 : binary; |
|
|
|
binary = !binary ? 16 : binary; |
|
|
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" |
|
|
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" |
|
|
|
.replace(/[xy]/g, function(c) { |
|
|
|
.replace(/[xy]/g, function (c) { |
|
|
|
var r = (Math.random() * binary) | 0, |
|
|
|
var r = (Math.random() * binary) | 0, |
|
|
|
v = c == "x" ? r : (r & 0x3) | 0x8; |
|
|
|
v = c == "x" ? r : (r & 0x3) | 0x8; |
|
|
|
return v.toString(binary); |
|
|
|
return v.toString(binary); |
|
|
@ -929,7 +961,7 @@ |
|
|
|
if (item.businessId) { |
|
|
|
if (item.businessId) { |
|
|
|
delete item.businessId |
|
|
|
delete item.businessId |
|
|
|
} |
|
|
|
} |
|
|
|
if (item.pcCount||item.pcCount==null) { |
|
|
|
if (item.pcCount || item.pcCount == null) { |
|
|
|
delete item.pcCount |
|
|
|
delete item.pcCount |
|
|
|
} |
|
|
|
} |
|
|
|
if (item.dangerProblem) { |
|
|
|
if (item.dangerProblem) { |
|
|
@ -946,18 +978,18 @@ |
|
|
|
...this.formData, |
|
|
|
...this.formData, |
|
|
|
businessId: this.businessId, |
|
|
|
businessId: this.businessId, |
|
|
|
extraConfigs: extraConfigs, |
|
|
|
extraConfigs: extraConfigs, |
|
|
|
describe:describe, |
|
|
|
describe: describe, |
|
|
|
// describe: [{ |
|
|
|
// describe: [{ |
|
|
|
// "bigCategory": "1", |
|
|
|
// "bigCategory": "1", |
|
|
|
// "bigCategoryName": "道路线性断面", |
|
|
|
// "bigCategoryName": "道路线性断面", |
|
|
|
// "smallCategory": "2", |
|
|
|
// "smallCategory": "2", |
|
|
|
// "smallCategoryName": "平面线形", |
|
|
|
// "smallCategoryName": "平面线形", |
|
|
|
// "hdTerm": "4", |
|
|
|
// "hdTerm": "4", |
|
|
|
// "hdTermName": "急弯接桥、隧道、涵洞的", |
|
|
|
// "hdTermName": "急弯接桥、隧道、涵洞的", |
|
|
|
// "hdDesc": "", |
|
|
|
// "hdDesc": "", |
|
|
|
// "hdPic": "", |
|
|
|
// "hdPic": "", |
|
|
|
// "hdInfo": "" |
|
|
|
// "hdInfo": "" |
|
|
|
// }], |
|
|
|
// }], |
|
|
|
temporary, |
|
|
|
temporary, |
|
|
|
}, |
|
|
|
}, |
|
|
|
"POST" |
|
|
|
"POST" |
|
|
@ -966,11 +998,11 @@ |
|
|
|
console.log(res); |
|
|
|
console.log(res); |
|
|
|
if (res.code === 200) { |
|
|
|
if (res.code === 200) { |
|
|
|
this.$.toast("保存成功"); |
|
|
|
this.$.toast("保存成功"); |
|
|
|
setTimeout(() => { |
|
|
|
// setTimeout(() => { |
|
|
|
uni.navigateBack({ |
|
|
|
// uni.navigateBack({ |
|
|
|
delta: 2, // 默认值是1,表示返回的页面层数 |
|
|
|
// delta: 2, // 默认值是1,表示返回的页面层数 |
|
|
|
}); |
|
|
|
// }); |
|
|
|
}, 1000); |
|
|
|
// }, 1000); |
|
|
|
|
|
|
|
|
|
|
|
// this.data = res.result; |
|
|
|
// this.data = res.result; |
|
|
|
// this.rname = this.data[0].name; |
|
|
|
// this.rname = this.data[0].name; |
|
|
@ -1275,4 +1307,12 @@ |
|
|
|
padding: 0 20rpx; |
|
|
|
padding: 0 20rpx; |
|
|
|
overflow-x: auto; |
|
|
|
overflow-x: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.u-checkbox-group--row { |
|
|
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
padding: 0 20rpx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.u-checkbox { |
|
|
|
|
|
|
|
margin-bottom: 30rpx; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |