@@ -63,10 +63,10 @@ | |||||
<p class="btn" @click="goDetail()" v-if="taskStatus === '2' && $route.params.surveyStatus !== '3'">新增</p> | <p class="btn" @click="goDetail()" v-if="taskStatus === '2' && $route.params.surveyStatus !== '3'">新增</p> | ||||
</div> | </div> | ||||
<van-popup v-model="showContractorPopup" position="bottom"> | <van-popup v-model="showContractorPopup" position="bottom"> | ||||
<van-search v-model="searchKeyword" placeholder="请输入姓名搜索" /> | |||||
<van-picker | <van-picker | ||||
title="请选择新户主" | |||||
show-toolbar | show-toolbar | ||||
:columns="contractorList" | |||||
:columns="filteredContractors" | |||||
@confirm="onConfirmContractorOptions" | @confirm="onConfirmContractorOptions" | ||||
@cancel="showContractorPopup = false" | @cancel="showContractorPopup = false" | ||||
> | > | ||||
@@ -98,6 +98,7 @@ | |||||
showContractorPopup: false, // 控制承包方信息弹出层的显示和隐藏 | showContractorPopup: false, // 控制承包方信息弹出层的显示和隐藏 | ||||
transferMemberId: null, // 转出的成员ID | transferMemberId: null, // 转出的成员ID | ||||
taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成 | taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成 | ||||
searchKeyword: '', // 弹出框查询关键字 | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -105,6 +106,13 @@ | |||||
this.getList(); | this.getList(); | ||||
this.getContractorList(); | this.getContractorList(); | ||||
}, | }, | ||||
computed: { | |||||
filteredContractors() { | |||||
return this.contractorList.filter(item => { | |||||
return item.cbfmc.indexOf(this.searchKeyword) !== -1; | |||||
}) | |||||
} | |||||
}, | |||||
methods: { | methods: { | ||||
getList(){ | getList(){ | ||||
listJtcy({cbfbm: this.$route.params.cbfbm, translate_dict: 1}).then(response => { | listJtcy({cbfbm: this.$route.params.cbfbm, translate_dict: 1}).then(response => { | ||||
@@ -185,6 +193,7 @@ | |||||
return false; | return false; | ||||
} | } | ||||
this.transferMemberId = item.id; | this.transferMemberId = item.id; | ||||
this.searchKeyword = ''; | |||||
this.showContractorPopup = true; | this.showContractorPopup = true; | ||||
}, | }, | ||||
onConfirmContractorOptions(value) { | onConfirmContractorOptions(value) { | ||||
@@ -261,14 +270,6 @@ | |||||
border: none; | border: none; | ||||
} | } | ||||
/deep/ .van-search__content{ | |||||
background: rgba(255,255,255,.5); | |||||
} | |||||
/deep/ .van-search{ | |||||
padding: 0; | |||||
flex: 1; | |||||
} | |||||
/deep/ .van-ellipsis{ | /deep/ .van-ellipsis{ | ||||
overflow: initial; | overflow: initial; | ||||
} | } | ||||
@@ -62,9 +62,10 @@ | |||||
</template> | </template> | ||||
</van-swipe-cell> | </van-swipe-cell> | ||||
<van-popup v-model="showContractorPopup" position="bottom"> | <van-popup v-model="showContractorPopup" position="bottom"> | ||||
<van-search v-model="searchKeyword" placeholder="请输入姓名搜索" /> | |||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="contractorList" | |||||
:columns="filteredContractors" | |||||
@confirm="onConfirmContractorOptions" | @confirm="onConfirmContractorOptions" | ||||
@cancel="showContractorPopup = false" | @cancel="showContractorPopup = false" | ||||
> | > | ||||
@@ -99,6 +100,7 @@ | |||||
showContractorPopup: false, // 控制承包方信息弹出层的显示和隐藏 | showContractorPopup: false, // 控制承包方信息弹出层的显示和隐藏 | ||||
transferLandId: null, // 转出的承包地块ID | transferLandId: null, // 转出的承包地块ID | ||||
taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成 | taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成 | ||||
searchKeyword: '', // 弹出框查询关键字 | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -106,6 +108,13 @@ | |||||
this.getList(); | this.getList(); | ||||
this.getContractorList(); | this.getContractorList(); | ||||
}, | }, | ||||
computed: { | |||||
filteredContractors() { | |||||
return this.contractorList.filter(item => { | |||||
return item.cbfmc.indexOf(this.searchKeyword) !== -1; | |||||
}) | |||||
} | |||||
}, | |||||
methods: { | methods: { | ||||
getList(){ | getList(){ | ||||
listCbdkxx({cbfbm: this.$route.params.cbfbm, translate_dict: 1}).then(response => { | listCbdkxx({cbfbm: this.$route.params.cbfbm, translate_dict: 1}).then(response => { | ||||
@@ -166,6 +175,7 @@ | |||||
}, | }, | ||||
transferLand(id) { | transferLand(id) { | ||||
this.transferLandId = id; | this.transferLandId = id; | ||||
this.searchKeyword = ''; | |||||
this.showContractorPopup = true; | this.showContractorPopup = true; | ||||
}, | }, | ||||
onConfirmContractorOptions(value) { | onConfirmContractorOptions(value) { | ||||
@@ -237,15 +247,6 @@ | |||||
border: none; | border: none; | ||||
} | } | ||||
/deep/ .van-search__content{ | |||||
background: rgba(255,255,255,.5); | |||||
} | |||||
/deep/ .van-search{ | |||||
padding: 0; | |||||
flex: 1; | |||||
} | |||||
/deep/ .van-ellipsis{ | /deep/ .van-ellipsis{ | ||||
overflow: initial; | overflow: initial; | ||||
} | } | ||||
@@ -16,7 +16,7 @@ | |||||
v-model="value" | v-model="value" | ||||
shape="round" | shape="round" | ||||
background="transparent" | background="transparent" | ||||
placeholder="请输入地块代码搜索" | |||||
placeholder="请输入地块名称搜索" | |||||
@search="onSearch" | @search="onSearch" | ||||
></van-search> | ></van-search> | ||||
@@ -78,7 +78,7 @@ | |||||
// 查询参数 | // 查询参数 | ||||
queryParams: { | queryParams: { | ||||
deptId: null, | deptId: null, | ||||
dkbm: null, | |||||
dkmc: null, | |||||
dklb: null, | dklb: null, | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:20, | pageSize:20, | ||||
@@ -132,7 +132,7 @@ | |||||
}); | }); | ||||
}, | }, | ||||
onSearch(){ | onSearch(){ | ||||
this.queryParams.dkbm = this.value; | |||||
this.queryParams.dkmc = this.value; | |||||
this.queryData(); | this.queryData(); | ||||
}, | }, | ||||
landCategoryChange(dictValue, dictLabel) { | landCategoryChange(dictValue, dictLabel) { | ||||
@@ -53,7 +53,7 @@ | |||||
right-icon="arrow-down" | right-icon="arrow-down" | ||||
readonly | readonly | ||||
clickable | clickable | ||||
@click="showLandCategory = true" | |||||
@click="openLandCategoryPopup" | |||||
/> | /> | ||||
<van-popup v-model="showLandCategory" position="bottom"> | <van-popup v-model="showLandCategory" position="bottom"> | ||||
<van-picker | <van-picker | ||||
@@ -213,13 +213,16 @@ | |||||
}, | }, | ||||
created() { | created() { | ||||
this.taskStatus = Cookies.get('taskStatus'); | this.taskStatus = Cookies.get('taskStatus'); | ||||
console.log(this.$route.query); | |||||
console.log(this.$route.params); | |||||
this.getDicts("land_ownership").then(response => { | this.getDicts("land_ownership").then(response => { | ||||
this.syqxzOptions = response.data; | this.syqxzOptions = response.data; | ||||
}); | }); | ||||
this.getDicts("land_type").then(response => { | this.getDicts("land_type").then(response => { | ||||
this.dklbOptions = response.data; | this.dklbOptions = response.data; | ||||
// 新增地块信息的时候,去除地块类别中的承包地块选项 | |||||
if (!this.$route.query.id) { | |||||
let index = this.dklbOptions.findIndex(item => item.dictValue === '10'); | |||||
this.dklbOptions.splice(index, 1); | |||||
} | |||||
}); | }); | ||||
this.getDicts("land_grade").then(response => { | this.getDicts("land_grade").then(response => { | ||||
this.dldjOptions = response.data; | this.dldjOptions = response.data; | ||||
@@ -238,7 +241,9 @@ | |||||
if (this.$route.query.id) { | if (this.$route.query.id) { | ||||
this.titleName = '修改地块信息'; | this.titleName = '修改地块信息'; | ||||
this.isDisabled = true; | this.isDisabled = true; | ||||
this.getDetail(); | |||||
setTimeout(() => { | |||||
this.getDetail(); | |||||
}, 500); | |||||
} else { | } else { | ||||
this.titleName = '新增地块信息'; | this.titleName = '新增地块信息'; | ||||
this.resetForm(); | this.resetForm(); | ||||
@@ -270,11 +275,11 @@ | |||||
deptId: null, | deptId: null, | ||||
dkbm: null, | dkbm: null, | ||||
dkmc: null, | dkmc: null, | ||||
syqxz: null, | |||||
dklb: null, | |||||
tdlylx: null, | |||||
dldj: null, | |||||
tdyt: null, | |||||
syqxz: '30', | |||||
dklb: '99', | |||||
tdlylx: '01', | |||||
dldj: '01', | |||||
tdyt: '1', | |||||
sfjbnt: '1', | sfjbnt: '1', | ||||
scmjm: null, | scmjm: null, | ||||
zjrxm: null, | zjrxm: null, | ||||
@@ -285,6 +290,11 @@ | |||||
dkbzxx: null, | dkbzxx: null, | ||||
theGeom: null | theGeom: null | ||||
}; | }; | ||||
this.syqxzText = '集体土地所有权'; | |||||
this.dklbText = '其他集体土地'; | |||||
this.tdlylxText = '【1】耕地'; | |||||
this.dldjText = '一等地'; | |||||
this.tdytText = '种植业'; | |||||
}, | }, | ||||
getCoordinates() { | getCoordinates() { | ||||
getDept(this.$route.query.deptId).then(response => { | getDept(this.$route.query.deptId).then(response => { | ||||
@@ -303,6 +313,15 @@ | |||||
this.showOwnership = false; | this.showOwnership = false; | ||||
}, | }, | ||||
onConfirmLandCategoryOptions(value){ | onConfirmLandCategoryOptions(value){ | ||||
/* if (this.$route.query.id && this.form.dklb === '10') { | |||||
this.$toast({ | |||||
icon: 'fail', | |||||
message: '当前地块为承包地块,不能修改地块类别', | |||||
duration: '2000' | |||||
}) | |||||
this.showLandCategory = false; | |||||
return ; | |||||
} */ | |||||
this.form.dklb = value.dictValue; | this.form.dklb = value.dictValue; | ||||
this.dklbText = value.dictLabel; | this.dklbText = value.dictLabel; | ||||
this.showLandCategory = false; | this.showLandCategory = false; | ||||
@@ -367,20 +386,6 @@ | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
/* this.form.deptId = this.$route.params.deptId; | |||||
this.form.cbfbm = this.$route.params.cbfbm; | |||||
addCbdkxx(this.form).then(response => { | |||||
if (response.code == 200) { | |||||
this.$toast({ | |||||
icon: 'success', | |||||
message: '保存成功', | |||||
duration:"1000", | |||||
onClose: () => { | |||||
this.goBack(); | |||||
} | |||||
}); | |||||
} | |||||
}); */ | |||||
} | } | ||||
}).catch(() => { | }).catch(() => { | ||||
this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | ||||
@@ -399,7 +404,26 @@ | |||||
}); | }); | ||||
}, | }, | ||||
goBack() { | goBack() { | ||||
history.back(-1); | |||||
// history.back(-1); | |||||
this.$router.push({ | |||||
path:'/contracted/village/massif', | |||||
query: { | |||||
deptId: this.$route.query.deptId, | |||||
deptName: this.$route.query.deptName, | |||||
} | |||||
}); | |||||
}, | |||||
openLandCategoryPopup() { | |||||
// 修改时 && 地块类别为承包地块 不允许打开地块类别弹出层 | |||||
if (this.$route.query.id && this.form.dklb === '10') { | |||||
this.$toast({ | |||||
icon: 'fail', | |||||
message: '当前地块为承包地块,不能修改地块类别', | |||||
duration: '2000' | |||||
}) | |||||
return ; | |||||
} | |||||
this.showLandCategory = true; | |||||
} | } | ||||
}, | }, | ||||
}; | }; | ||||