master
lion 3 years ago
parent b35320720b
commit 72effbbb01

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

@ -21,9 +21,9 @@
<view v-if="!formshow">
<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-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>
</u-form-item>
@ -151,6 +151,7 @@
askName:"",
lawName:"",
buildName:"",
confirmText:"确认",
dateparams: {
year: true,
month: true,
@ -268,7 +269,7 @@
var that = this;
this.loadAskContent();
this.loadLawTypes();
this.loadBuild();
// this.loadBuild();
this.loadBuildType();
if(options.id){
this.infoId = options.id;
@ -309,6 +310,16 @@
},
methods: {
selectBuildList(){
var that = this
// that.rainArr.buildList = []
that.loadBuild()
console.log("123",that.rainArr.buildList)
// if(that.rainArr.buildList){
// }
},
confirmBuildTypeName(val){
console.log(val)
var that = this
@ -317,6 +328,11 @@
},
confirmBuildType(val){
var that = this
console.log(val)
if(!val[0].value){
that.form.name = that.buildName
return
}
let buildinfo = val[0].extra;
that.buildName = val[0].label
that.form.building_site_id = val[0].value
@ -444,16 +460,27 @@
that.util.request({
api: '/api/mobile/rain-inspection/all-building-site',
method: "get",
data: {},
data: {
keyword:that.buildName
},
utilSuccess: function(result) {
// that.rainArr.buildList = result
let arr=[];
if(result.length>0){
for(var m of result){
m.extra = m
arr.push(m)
}
that.confirmText = "确认"
}else{
arr.push({
name:that.buildName
})
that.confirmText = "新增"
}
that.rainArr.buildList = arr
console.log(that.rainArr.buildList)
that.buildShow = true
},
utilFail: function(res) {
that.util.alert(res);

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

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

Loading…
Cancel
Save