Commit faf1d97d authored by ytbdmhy's avatar ytbdmhy

mhy

parent d4640a5c
<template>
<div>
<div class="op">
<div class="add" style="margin-left:0">
<el-select
ref="town"
clearable
size="mini"
v-model="townName"
@change="selectTown"
placeholder="请选择乡/镇">
<el-option
v-for="item in townList"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</div>
<div class="add" style="margin-left: 20px">
<el-select
ref="village"
size="mini"
clearable
v-model="villageName"
placeholder="请选择村">
<el-option
v-for="item2 in villageList"
:key="item2.value"
:label="item2.label"
:value="item2.label">
</el-option>
</el-select>
</div>
<Candode v-on:childByValue="childByValue"></Candode>
<div class="nam">
<el-input v-model="name" size="mini" placeholder="请输入姓名" clearable></el-input>
</div>
......@@ -122,7 +92,6 @@
@current-change="current_change"
>
</el-pagination>
<div>
<el-dialog title="详细信息" :visible.sync="dialogTableVisible" width="1200px">
<el-form :model="data" label-width="auto">
......@@ -254,16 +223,17 @@
.idc {
margin-left: 20px;
min-width: 200px
/*min-width: 200px;*/
}
.nam {
margin-left: 20px
margin-left: 20px;
/*min-width: 200px;*/
}
.grantState {
margin-left: 20px;
/*min-width: 200px;*/
margin-left: 20px
}
.el-table .warning-row {
......@@ -286,9 +256,12 @@
<script>
import CryptoJS from 'crypto-js'
import {Loading} from 'element-ui';
import {listtown} from '../../utils/address'
import Candode from "../Core/candode"
export default {
components:{
Candode
},
data() {
return {
list: [],
......@@ -312,25 +285,18 @@
tableData: [],
dialogTableVisible: false,
data: {},
townList: [],
townId: "",
townName: "",
villageList: [],
villageId: "",
villageName: "",
townList: "",
}
},
methods: {
//搜索
search() {
console.log(this.$refs.town.value);
console.log(this.$refs.village.value);
let data = {
idCard: this.idCard ? this.Encrypt(this.idCard) : "",
name: this.name ? this.Encrypt(this.name) : "",
grantState: this.grantState,
town: this.$refs.town.value,
village: this.$refs.village.value,
townName: this.townList?this.townList[0]:"",
villageName:this.townList?this.townList[1]:"",
};
this.$api.getlist.getGrantList(data).then((res) => {
for (var i in res.data.list) {
......@@ -355,8 +321,8 @@
idCard: this.idCard ? this.Encrypt(this.idCard) : "",
name: this.name ? this.Encrypt(this.name) : "",
grantState: this.grantState,
town: this.$refs.town.value,
village: this.$refs.village.value,
townName: this.townList?this.townList[0]:"",
villageName:this.townList?this.townList[1]:"",
};
Loading.service();
this.$api.getlist.getGrantList(data).then((res) => {
......@@ -425,32 +391,12 @@
})
.catch(_ => {});
},
selectTown(town) {
this.villageList.length = 0;
this.villageName = "";
for (let i in listtown) {
if (listtown[i].town_name === town) {
for (let j in listtown[i].chirld) {
this.villageList.push({
pro: listtown[i].town_id,
value: listtown[i].chirld[j].village_id,
label: listtown[i].chirld[j].village_name
});
}
return;
}
}
}
childByValue(val){
this.townList = val;
},
},
created() {
Loading.service();
for (let i in listtown) {
this.townList.push({
value: listtown[i].town_id,
label: listtown[i].town_name,
children: []
});
}
let data = {};
this.$api.getlist.getGrantList(data).then((res) => {
let loadingInstance = Loading.service();
......
......@@ -139,7 +139,7 @@
Candode
},
data() {
return {
townList:'',
activities: [],
......
......@@ -292,9 +292,9 @@
sessionStorage.setItem("treAppItems", JSON.stringify(this.$route.params.treApp));
}
this.form = JSON.parse(sessionStorage.getItem("treAppInfo"));
this.form.name = this.decrypt(this.form.name);
this.form.identity_number = this.decrypt(this.form.identity_number);
this.form.telphoneValue = this.decrypt(this.form.telphoneValue);
this.form.name = this.form.name ? this.decrypt(this.form.name) : "";
this.form.identity_number = this.form.identity_number ? this.decrypt(this.form.identity_number) : "";
this.form.telphoneValue = this.form.telphoneValue ? this.decrypt(this.form.telphoneValue) : "";
var obj = JSON.parse(sessionStorage.getItem("treAppItems"));
if (obj.bankpic) {
this.bb = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment