master
lion 3 years ago
parent b35320720b
commit 72effbbb01

@ -21,7 +21,7 @@
</view> </view>
</u-col> </u-col>
</u-row> </u-row>
<u-row gutter="16"> <!-- <u-row gutter="16">
<u-col span="12"> <u-col span="12">
@ -30,7 +30,7 @@
<text class="navtxt">工单执行</text> <text class="navtxt">工单执行</text>
</view> </view>
</u-col> </u-col>
</u-row> </u-row> -->
<u-row gutter="16"> <u-row gutter="16">

@ -21,9 +21,9 @@
<view v-if="!formshow"> <view v-if="!formshow">
<u-form-item label="工地名称" label-position="top" prop="type" required> <u-form-item label="工地名称" label-position="top" prop="type" required>
<u-input placeholder="请选择工地" v-model="buildName" type="select" :border="true" @click="buildShow = true" /> <u-input placeholder="请输入工地名称以查询或新建" v-model="buildName" type="input" :border="true" @confirm="selectBuildList" />
<!-- <u-picker :show="typeShow" keyName="name" :columns="rainArr.rainTypes" @confirm="confirmType"></u-picker> --> <!-- <u-picker :show="typeShow" keyName="name" :columns="rainArr.rainTypes" @confirm="confirmType"></u-picker> -->
<u-select v-model="buildShow" mode="single-column" value-name="id" label-name="name" :list="rainArr.buildList" <u-select :confirm-text="confirmText" v-model="buildShow" mode="single-column" value-name="id" label-name="name" :list="rainArr.buildList"
@confirm="confirmBuildType"></u-select> @confirm="confirmBuildType"></u-select>
</u-form-item> </u-form-item>
@ -151,6 +151,7 @@
askName:"", askName:"",
lawName:"", lawName:"",
buildName:"", buildName:"",
confirmText:"确认",
dateparams: { dateparams: {
year: true, year: true,
month: true, month: true,
@ -268,7 +269,7 @@
var that = this; var that = this;
this.loadAskContent(); this.loadAskContent();
this.loadLawTypes(); this.loadLawTypes();
this.loadBuild(); // this.loadBuild();
this.loadBuildType(); this.loadBuildType();
if(options.id){ if(options.id){
this.infoId = options.id; this.infoId = options.id;
@ -309,6 +310,16 @@
}, },
methods: { methods: {
selectBuildList(){
var that = this
// that.rainArr.buildList = []
that.loadBuild()
console.log("123",that.rainArr.buildList)
// if(that.rainArr.buildList){
// }
},
confirmBuildTypeName(val){ confirmBuildTypeName(val){
console.log(val) console.log(val)
var that = this var that = this
@ -317,6 +328,11 @@
}, },
confirmBuildType(val){ confirmBuildType(val){
var that = this var that = this
console.log(val)
if(!val[0].value){
that.form.name = that.buildName
return
}
let buildinfo = val[0].extra; let buildinfo = val[0].extra;
that.buildName = val[0].label that.buildName = val[0].label
that.form.building_site_id = val[0].value that.form.building_site_id = val[0].value
@ -444,16 +460,27 @@
that.util.request({ that.util.request({
api: '/api/mobile/rain-inspection/all-building-site', api: '/api/mobile/rain-inspection/all-building-site',
method: "get", method: "get",
data: {}, data: {
keyword:that.buildName
},
utilSuccess: function(result) { utilSuccess: function(result) {
// that.rainArr.buildList = result // that.rainArr.buildList = result
let arr=[]; let arr=[];
for(var m of result){ if(result.length>0){
m.extra = m for(var m of result){
arr.push(m) m.extra = m
arr.push(m)
}
that.confirmText = "确认"
}else{
arr.push({
name:that.buildName
})
that.confirmText = "新增"
} }
that.rainArr.buildList = arr that.rainArr.buildList = arr
console.log(that.rainArr.buildList) that.buildShow = true
}, },
utilFail: function(res) { utilFail: function(res) {
that.util.alert(res); that.util.alert(res);

@ -12,12 +12,13 @@
</view> </view>
<view :class="mask?'list listfixed':'list'" style="padding-top: 100rpx;"> <view :class="mask?'list listfixed':'list'" style="padding-top: 100rpx;">
<u-dropdown ref="uDropdown" @open="openmask" @close="closemask" :class="mask?'':'overflowmask'" > <u-dropdown ref="uDropdown" @open="openmask" @close="closemask" :class="mask?'':'overflowmask'" >
<!-- <u-dropdown-item v-model="areaId" :title="areaStatus==''?'所属片区':areaStatus" @change="toChangeAreaStatus" <u-dropdown-item v-model="typeId" :title="typeStatus==''?'巡查类型':typeStatus" @change="toChangeTypeStatus"
:options="areaList"> :options="typeList">
</u-dropdown-item> --> </u-dropdown-item>
<u-dropdown-item v-model="statusId" :title="proStatus==''?'状态':proStatus" @change="toChangeStatus" <u-dropdown-item v-model="statusId" :title="proStatus==''?'状态':proStatus" @change="toChangeStatus"
:options="statusList"> :options="statusList">
</u-dropdown-item> </u-dropdown-item>
</u-dropdown> </u-dropdown>
<block v-for="(item, index) in dataList"> <block v-for="(item, index) in dataList">
<u-card :title="item.created_at" padding="20" margin="20rpx" :border="true" <u-card :title="item.created_at" padding="20" margin="20rpx" :border="true"
@ -111,7 +112,19 @@
title: "", title: "",
stat: [], stat: [],
statusId:"", statusId:"",
proStatus:"", proStatus:"",
typeId:"",
typeStatus:"",
typeList: [{
label: "所有",
value: ''
}, {
label: "日常雨水设施",
value: 1
}, {
label: "在建工地",
value: 2
}],
statusList: [{ statusList: [{
label: "所有", label: "所有",
value: '' value: ''
@ -168,6 +181,15 @@
console.log(this.proStatus ) console.log(this.proStatus )
this.loadPage(1); this.loadPage(1);
this.$refs.uDropdown.close(); this.$refs.uDropdown.close();
},
toChangeTypeStatus: function(value) {
for(var m of this.typeList){
if(value == m.value){
this.typeStatus = m.label
}
}
this.loadPage(1);
this.$refs.uDropdown.close();
}, },
toedit(id){ toedit(id){
@ -194,8 +216,7 @@
data: { data: {
page: page, page: page,
page_size: 4, page_size: 4,
keyword: that.keyword, keyword: that.keyword
area_id:that.areaId
}, },
utilSuccess: function(r) { utilSuccess: function(r) {
var res = r.data; var res = r.data;

@ -12,9 +12,9 @@
</view> </view>
<view :class="mask?'list listfixed':'list'" style="padding-top: 100rpx;"> <view :class="mask?'list listfixed':'list'" style="padding-top: 100rpx;">
<u-dropdown ref="uDropdown" @open="openmask" @close="closemask" :class="mask?'':'overflowmask'" > <u-dropdown ref="uDropdown" @open="openmask" @close="closemask" :class="mask?'':'overflowmask'" >
<!-- <u-dropdown-item v-model="areaId" :title="areaStatus==''?'所属片区':areaStatus" @change="toChangeAreaStatus" <u-dropdown-item v-model="typeId" :title="typeStatus==''?'养护类型':typeStatus" @change="toChangeTypeStatus"
:options="areaList"> :options="typeList">
</u-dropdown-item> --> </u-dropdown-item>
<u-dropdown-item v-model="statusId" :title="proStatus==''?'状态':proStatus" @change="toChangeStatus" <u-dropdown-item v-model="statusId" :title="proStatus==''?'状态':proStatus" @change="toChangeStatus"
:options="statusList"> :options="statusList">
</u-dropdown-item> </u-dropdown-item>
@ -111,7 +111,28 @@
title: "", title: "",
stat: [], stat: [],
statusId:"", statusId:"",
proStatus:"", proStatus:"",
typeId:"",
typeStatus:"",
typeList: [{
label: "所有",
value: ''
}, {
value:1,
label:"雨水管道疏挖"
},
{
value:2,
label:"雨水管道疏通"
},
{
value:3,
label:"汛期助排"
},
{
value:4,
label:"污泥外运"
}],
statusList: [{ statusList: [{
label: "所有", label: "所有",
value: '' value: ''
@ -171,6 +192,15 @@
console.log(this.proStatus ) console.log(this.proStatus )
this.loadPage(1); this.loadPage(1);
this.$refs.uDropdown.close(); this.$refs.uDropdown.close();
},
toChangeTypeStatus: function(value) {
for(var m of this.typeList){
if(value == m.value){
this.typeStatus = m.label
}
}
this.loadPage(1);
this.$refs.uDropdown.close();
}, },
tagClick(index) { tagClick(index) {
this.options1[index].active = !this.options1[index].active; this.options1[index].active = !this.options1[index].active;

Loading…
Cancel
Save