Commit faf1d97d authored by ytbdmhy's avatar ytbdmhy

mhy

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