master
lion 4 years ago
parent 81909d5959
commit 0a18ecfd47

@ -135,7 +135,6 @@
}, },
onLoad(options) { onLoad(options) {
this.loadDep() this.loadDep()
this.loadPage(1);
}, },
methods: { methods: {
loadDep(){ loadDep(){
@ -148,6 +147,7 @@
}, },
utilSuccess: function(res) { utilSuccess: function(res) {
that.depList = res that.depList = res
that.loadPage(1);
}, },
utilFail: function(res) { utilFail: function(res) {
that.util.alert(res); that.util.alert(res);

@ -52,12 +52,16 @@
<u-col span="3"> <u-col span="3">
<view class="demo-layout bg-purple-light">{{item.feedback_department.name}}</view> <view class="demo-layout bg-purple-light">{{item.feedback_department.name}}</view>
</u-col> </u-col>
<!-- <u-col span="3">
<view class="demo-layout bg-purple">提交日期</view> </u-row>
</u-col> <u-row gutter="16">
<u-col span="3"> <u-col span="3">
<view class="demo-layout bg-purple-light">{{item.created_at}}</view> <view class="demo-layout bg-purple">所属道路</view>
</u-col> --> </u-col>
<u-col span="9">
<view class="demo-layout bg-purple-light">{{item.road_name}}</view>
</u-col>
</u-row> </u-row>
<u-row gutter="16"> <u-row gutter="16">
<u-col span="3"> <u-col span="3">
@ -244,6 +248,7 @@
} }
for (var m of dataList) { for (var m of dataList) {
m.created_at = m.created_at.split("T")[0] m.created_at = m.created_at.split("T")[0]
m.road_name = m.road?m.road.name:""
switch(m.status){ switch(m.status){
case 1: case 1:
m.statusName = "已提交" m.statusName = "已提交"

@ -1,5 +1,8 @@
<template> <template>
<view class="content"> <view class="content">
<view>
所属道路{{roadName}}
</view>
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<u-form-item label="问题类型" label-position="top" prop="typeName" required> <u-form-item label="问题类型" label-position="top" prop="typeName" required>
<u-input v-model="form.typeName" type="select" :border="true" @click="typeshow = true" /> <u-input v-model="form.typeName" type="select" :border="true" @click="typeshow = true" />
@ -42,7 +45,8 @@
return { return {
otherData: { otherData: {
token: "" token: ""
}, },
roadName:"",
unitshow: false, unitshow: false,
typeshow: false, typeshow: false,
contentshow: false, contentshow: false,
@ -95,6 +99,10 @@
if(options.id){ if(options.id){
this.infoId = options.id; this.infoId = options.id;
this.showInfo(this.infoId); this.showInfo(this.infoId);
}
if(options.roadid){
this.form.road_id = options.roadid
this.roadName = options.roadname
} }
this.action = this.util.HOST + "/api/mobile/upload-file"; this.action = this.util.HOST + "/api/mobile/upload-file";
this.otherData.token = uni.getStorageSync("userInfo_token").access_token; this.otherData.token = uni.getStorageSync("userInfo_token").access_token;
@ -198,7 +206,8 @@
that.form = result; that.form = result;
that.form.typeName = result.ask_type_detail.value; that.form.typeName = result.ask_type_detail.value;
that.form.contentName = result.ask_content_detail.value; that.form.contentName = result.ask_content_detail.value;
that.form.unitName = result.feedback_department.name that.form.unitName = result.feedback_department.name
that.roadName = result.road?result.road.name:""
let _files = []; let _files = [];
for (var mod of result.common_inspection_files) { for (var mod of result.common_inspection_files) {
let m = Object.assign({}, mod); let m = Object.assign({}, mod);

@ -38,7 +38,7 @@
} }
,{ ,{
"path" : "role/role/role", "path" : "road/road/road",
"style" : "style" :
{ {
"navigationBarTitleText": "选择道路", "navigationBarTitleText": "选择道路",

@ -90,22 +90,26 @@
}); });
}, },
toview(type) { toview(type) {
let url = "/packageA/pages/generalPatrol/generalPatrol"; // let url = "/packageA/pages/generalPatrol/generalPatrol";
let url = "/road/road/road?type=general"
if (type == 2) { if (type == 2) {
url = "/pages/mine/mine" url = "/pages/mine/mine"
} }
if (type == 3) { if (type == 3) {
// url = "/road/road/road?type=daily"
url = "/packageB/pages/dailyInspection/dailyInspection" url = "/packageB/pages/dailyInspection/dailyInspection"
} }
if (type == 4) { if (type == 4) {
url = "/rainmaintain/rainmaintain/rainmaintain" url = "/road/road/road?type=rainmaintain"
// url = "/rainmaintain/rainmaintain/rainmaintain"
} }
if (type == 5) { if (type == 5) {
url = "/raininspection/raininspection/raininspection" url = "/road/road/road?type=raininspection"
// url = "/raininspection/raininspection/raininspection"
} }
if (type == 6) { // if (type == 6) {
url = "/order/order/order/order" // url = "/order/order/order/order"
} // }
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })

@ -1,5 +1,8 @@
<template> <template>
<view class="content"> <view class="content">
<view>
所属道路{{roadName}}
</view>
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<u-form-item v-if='!showInfoId' label="巡查类型" label-position="top" prop="type" required> <u-form-item v-if='!showInfoId' label="巡查类型" label-position="top" prop="type" required>
<u-input placeholder="请选择巡查类型" v-model="typeName" type="select" :border="true" @click="typeShow = true" /> <u-input placeholder="请选择巡查类型" v-model="typeName" type="select" :border="true" @click="typeShow = true" />
@ -138,6 +141,7 @@
otherData: { otherData: {
token: "" token: ""
}, },
roadName:"",
instype:1, instype:1,
typeShow:false, typeShow:false,
askShow:false, askShow:false,
@ -223,6 +227,7 @@
filesList:[], filesList:[],
dealFilesList:[], dealFilesList:[],
form:{ form:{
road_id:'',
content:"", content:"",
ask_content_id:"", ask_content_id:"",
is_unusual:0, is_unusual:0,
@ -277,9 +282,12 @@
setTimeout(function(){ setTimeout(function(){
that.showInfo(that.infoId); that.showInfo(that.infoId);
},1000) },1000)
} }
if(options.roadid){
this.form.road_id = options.roadid
this.roadName = options.roadname
}
this.action = this.util.HOST + "/api/mobile/upload-file"; this.action = this.util.HOST + "/api/mobile/upload-file";
this.otherData.token = uni.getStorageSync("userInfo_token").access_token; this.otherData.token = uni.getStorageSync("userInfo_token").access_token;
}, },
@ -537,6 +545,7 @@
that.form = result.rain_equipment_info; that.form = result.rain_equipment_info;
that.form.rain_equipment_id = result.rain_equipment_id; that.form.rain_equipment_id = result.rain_equipment_id;
that.askName = result.rain_equipment_info.ask_content_detail.value that.askName = result.rain_equipment_info.ask_content_detail.value
that.roadName = result.rain_equipment_info.road?result.rain_equipment_info.road.name:""
let _files = []; let _files = [];
for (var mod of result.rain_equipment_info.rain_equipment_files) { for (var mod of result.rain_equipment_info.rain_equipment_files) {
let m = Object.assign({}, mod); let m = Object.assign({}, mod);
@ -574,7 +583,7 @@
that.form.latitude = result.building_site_info.building_site.latitude; that.form.latitude = result.building_site_info.building_site.latitude;
that.form.longitude = result.building_site_info.building_site.longitude; that.form.longitude = result.building_site_info.building_site.longitude;
that.form.address = result.building_site_info.building_site.address; that.form.address = result.building_site_info.building_site.address;
console.log("a",that.rainArr.buildTypes); that.roadName = result.building_site_info.road?result.building_site_info.road.name:""
for(var m of that.rainArr.buildTypes){ for(var m of that.rainArr.buildTypes){
if(result.building_site_info.building_site.type==m.id){ if(result.building_site_info.building_site.type==m.id){
that.buildtypeName = m.value; that.buildtypeName = m.value;

@ -44,6 +44,12 @@
</u-col> </u-col>
<u-col span="9"> <u-col span="9">
<view class="demo-layout bg-purple-light">{{item.area_info.name}}</view> <view class="demo-layout bg-purple-light">{{item.area_info.name}}</view>
</u-col>
<u-col span="3">
<view class="demo-layout bg-purple">所属道路</view>
</u-col>
<u-col span="9">
<view class="demo-layout bg-purple-light">{{item.road_name}}</view>
</u-col> </u-col>
</u-row> </u-row>
<!-- <u-row gutter="16"> <!-- <u-row gutter="16">
@ -266,9 +272,11 @@
switch(m.type){ switch(m.type){
case 1: case 1:
m.typeName = "日常雨水设施" m.typeName = "日常雨水设施"
m.road_name = m.rain_equipment_info.road?m.rain_equipment_info.road.name:""
break break
case 2: case 2:
m.typeName = "在建工地" m.typeName = "在建工地"
m.road_name = m.building_site_info.road? m.building_site_info.road.name:""
break break
default: default:

@ -1,5 +1,8 @@
<template> <template>
<view class="content"> <view class="content">
<view>
所属道路{{roadName}}
</view>
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<u-form-item v-if='!showInfoId' label="养护类型" label-position="top" prop="type" required> <u-form-item v-if='!showInfoId' label="养护类型" label-position="top" prop="type" required>
<u-input placeholder="请选择养护类型" v-model="typeName" type="select" :border="true" @click="typeShow = true" /> <u-input placeholder="请选择养护类型" v-model="typeName" type="select" :border="true" @click="typeShow = true" />
@ -88,6 +91,7 @@
otherData: { otherData: {
token: "" token: ""
}, },
roadName:"",
typeShow:false, typeShow:false,
dateShow:false, dateShow:false,
formshow:true, formshow:true,
@ -145,6 +149,7 @@
filesList:[], filesList:[],
dealFilesList:[], dealFilesList:[],
form:{ form:{
road_id:"",
type:1, type:1,
content:"", content:"",
is_solve:0, is_solve:0,
@ -192,6 +197,11 @@
this.showInfoId = true this.showInfoId = true
this.showInfo(this.infoId); this.showInfo(this.infoId);
} }
if(options.roadid){
this.form.road_id = options.roadid
this.roadName = options.roadname
}
this.action = this.util.HOST + "/api/mobile/upload-file"; this.action = this.util.HOST + "/api/mobile/upload-file";
this.otherData.token = uni.getStorageSync("userInfo_token").access_token; this.otherData.token = uni.getStorageSync("userInfo_token").access_token;
@ -328,6 +338,7 @@
that.form = result.circulation_info; that.form = result.circulation_info;
that.form.circulation_id = result.circulation_id; that.form.circulation_id = result.circulation_id;
that.roadName = result.circulation_info.road.name
let _files = []; let _files = [];
for (var mod of result.circulation_info.circulation_files) { for (var mod of result.circulation_info.circulation_files) {
let m = Object.assign({}, mod); let m = Object.assign({}, mod);
@ -355,6 +366,7 @@
that.lawshow = false that.lawshow = false
that.form = result.help_discharge_info; that.form = result.help_discharge_info;
that.form.help_discharge_id = result.help_discharge_id; that.form.help_discharge_id = result.help_discharge_id;
that.roadName = result.help_discharge_info.road.name
let discharge_files = []; let discharge_files = [];
for (var mod of result.help_discharge_info.help_discharge_files) { for (var mod of result.help_discharge_info.help_discharge_files) {
let m = Object.assign({}, mod); let m = Object.assign({}, mod);
@ -381,6 +393,7 @@
that.formshow = false that.formshow = false
that.form = result.mire_info; that.form = result.mire_info;
that.form.mire_id = result.mire_id; that.form.mire_id = result.mire_id;
that.roadName = result.mire_info.road.name
let mire_files = []; let mire_files = [];
for (var mod of result.mire_info.mire_files) { for (var mod of result.mire_info.mire_files) {
let m = Object.assign({}, mod); let m = Object.assign({}, mod);

@ -43,6 +43,12 @@
</u-col> </u-col>
<u-col span="9"> <u-col span="9">
<view class="demo-layout bg-purple-light">{{item.area_info.name}}</view> <view class="demo-layout bg-purple-light">{{item.area_info.name}}</view>
</u-col>
<u-col span="3">
<view class="demo-layout bg-purple">所属道路</view>
</u-col>
<u-col span="9">
<view class="demo-layout bg-purple-light">{{item.road_name}}</view>
</u-col> </u-col>
</u-row> </u-row>
<!-- <u-row gutter="16"> <!-- <u-row gutter="16">
@ -284,15 +290,22 @@
switch(m.type){ switch(m.type){
case 1: case 1:
m.typeName = "雨水管道疏挖" m.typeName = "雨水管道疏挖"
m.road_name = m.circulation_info.road?m.circulation_info.road.name:""
break break
case 2: case 2:
m.typeName = "雨水管道疏通" m.typeName = "雨水管道疏通"
m.road_name = m.circulation_info.road?m.circulation_info.road.name:""
break break
case 3: case 3:
m.typeName = "汛期助排" m.typeName = "汛期助排"
m.road_name = m.help_discharge_info.road?m.help_discharge_info.road.name:""
break break
case 4: case 4:
m.typeName = "污泥外运" m.typeName = "污泥外运"
m.road_name = m.mire_info.road?m.mire_info.road.name:""
break break
default: default:

@ -4,14 +4,14 @@
<view class="box-header"> <view class="box-header">
<view class="search-wrap"> <view class="search-wrap">
<!-- 如果使用u-search组件必须要给v-model绑定一个变量 --> <!-- 如果使用u-search组件必须要给v-model绑定一个变量 -->
<u-search v-model="keyword" placeholder="请输入关键词查看更多道信息" @search="tosearch()" height="56" <u-search v-model="keyword" placeholder="请输入关键词查看更多信息" @search="tosearch()" height="56"
:action-style="{color: '#fff'}"> :action-style="{color: '#fff'}">
</u-search> </u-search>
</view> </view>
</view> </view>
<view :class="mask?'list listfixed':'list'" style="padding-top: 100rpx;"> <view :class="mask?'list listfixed':'list'" style="padding-top: 100rpx;">
<view class='showclear' v-if='showClear'>附近:</view> <view class='showclear' v-if='showClear'>附近:</view>
<u-radio-group :wrap="true"> <u-radio-group :wrap="true">
<u-radio <u-radio
@change="radioChange" @change="radioChange"
@ -27,7 +27,7 @@
</view> </view>
<view class="box-footer"> <view class="box-footer">
<u-button type="primary">确认</u-button> <u-button type="primary" @click="towhichtype"></u-button>
</view> </view>
</view> </view>
@ -56,7 +56,9 @@
longitude:"", longitude:"",
latitude:"", latitude:"",
showClear:false, showClear:false,
towhere:"", totype:"",
road_id:"",
road_name:""
} }
}, },
@ -75,22 +77,42 @@
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;
that.totype=options.type
uni.getLocation({ uni.getLocation({
type: "gcj02", type: "gcj02",
geocode:true, geocode:true,
success(res) { success(res) {
console.log(res)
that.latitude = res.latitude; that.latitude = res.latitude;
that.longitude = res.longitude; that.longitude = res.longitude;
that.loadPage(1); that.loadPage(1);
} }
}) })
}, },
methods: { methods: {
towhichtype(){
let totype = this.totype
let url = "/packageA/pages/generalPatrol/generalPatrol";
if (totype == 'general') {
url ="/packageA/pages/generalPatrol/generalPatrol?roadid="+this.road_id+"&roadname="+this.road_name
}
if (totype == 'daily') {
url = "/packageB/pages/dailyInspection/dailyInspection?roadid="+this.road_id+"&roadname="+this.road_name
}
if (totype == 'rainmaintain') {
url = "/rainmaintain/rainmaintain/rainmaintain?roadid="+this.road_id+"&roadname="+this.road_name
}
if (totype == 'raininspection') {
url = "/raininspection/raininspection/raininspection?roadid="+this.road_id+"&roadname="+this.road_name
}
uni.navigateTo({
url: url
})
},
radioChange(val){ radioChange(val){
console.log("val",val) let arr = val.split(",")
this.road_id = arr[0]
this.road_name = arr[1]
}, },
tosearch() { tosearch() {
this.latitude="" this.latitude=""
@ -118,7 +140,6 @@
name: that.keyword, name: that.keyword,
}, },
utilSuccess: function(r) { utilSuccess: function(r) {
console.log("r",that.longitude)
if(that.longitude!=""){ if(that.longitude!=""){
// var res = r; // var res = r;
that.showClear = true that.showClear = true
@ -152,13 +173,10 @@
} else { } else {
dataList.push(...res); dataList.push(...res);
} }
console.log(dataList)
that.currentPage = page; that.currentPage = page;
that.dataList = dataList; that.dataList = dataList;
} }
console.log("res",res)
Loading…
Cancel
Save