整合代码
This commit is contained in:
@@ -19,68 +19,34 @@
|
|||||||
<ai-select placeholder="民族" v-model="search.nation"
|
<ai-select placeholder="民族" v-model="search.nation"
|
||||||
:selectList="resident.dict.getDict('nation')"
|
:selectList="resident.dict.getDict('nation')"
|
||||||
@change="page.current=1,refreshTable()"/>
|
@change="page.current=1,refreshTable()"/>
|
||||||
<el-date-picker
|
<ai-search label="出生日期">
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker
|
||||||
v-model="search.birthStart"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
style="width:250px;border-radius:0;"
|
v-model="search.birthStart"
|
||||||
type="date"
|
type="date"
|
||||||
size="small"
|
size="small"
|
||||||
unlink-panels
|
placeholder="选择开始日期"
|
||||||
placeholder="选择出生开始日期"
|
@change="page.current=1,refreshTable()"
|
||||||
@change="page.current=1,refreshTable()"
|
/>
|
||||||
/>
|
<el-date-picker
|
||||||
<el-date-picker
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
v-model="search.birthEnd"
|
||||||
v-model="search.birthEnd"
|
type="date"
|
||||||
style="width:250px;border-radius:0;"
|
size="small"
|
||||||
type="date"
|
placeholder="选择结束日期"
|
||||||
size="small"
|
@change="page.current=1,refreshTable()"
|
||||||
placeholder="选择出生结束日期"
|
/>
|
||||||
unlink-panels
|
</ai-search>
|
||||||
@change="page.current=1,refreshTable()"
|
|
||||||
/>
|
<ai-select placeholder="政治面貌" v-model="search.politicsStatus"
|
||||||
<el-select
|
:selectList="resident.dict.getDict('politicsStatus')"
|
||||||
v-model="search.politicsStatus"
|
@change="page.current=1,refreshTable()"/>
|
||||||
placeholder="政治面貌"
|
<ai-select placeholder="是否户主" v-model="search.householdName"
|
||||||
size="small"
|
:selectList="resident.dict.getDict('householdName')"
|
||||||
@change="page.current=1,refreshTable()"
|
@change="page.current=1,refreshTable()"/>
|
||||||
clearable
|
<ai-select placeholder="宗教信仰" v-model="search.faithType"
|
||||||
>
|
:selectList="resident.dict.getDict('faithType')"
|
||||||
<el-option
|
@change="page.current=1,refreshTable()"/>
|
||||||
v-for="(item,i) in resident.dict.getDict('politicsStatus')"
|
|
||||||
:key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
v-model="search.householdName"
|
|
||||||
placeholder="是否户主"
|
|
||||||
size="small"
|
|
||||||
@change="page.current=1,refreshTable()"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in resident.dict.getDict('householdName')"
|
|
||||||
:key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
v-model="search.faithType"
|
|
||||||
placeholder="宗教信仰"
|
|
||||||
@change="page.current=1,refreshTable()"
|
|
||||||
size="small"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in resident.dict.getDict('faithType')"
|
|
||||||
:key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input
|
<el-input
|
||||||
@@ -232,30 +198,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick() {
|
|
||||||
this.tableData = [];
|
|
||||||
this.multipleSelection = [];
|
|
||||||
this.searchInit()
|
|
||||||
},
|
|
||||||
searchInit() {
|
|
||||||
let tempAreaId = this.search.areaId;
|
|
||||||
this.search = {
|
|
||||||
fileStatus: "",
|
|
||||||
sex: "",
|
|
||||||
nation: "",
|
|
||||||
education: "",
|
|
||||||
politicsStatus: "",
|
|
||||||
birth: [],
|
|
||||||
faithType: "",
|
|
||||||
householdName: "",
|
|
||||||
areaId: "",
|
|
||||||
con: "",
|
|
||||||
maritalStatus: ""
|
|
||||||
};
|
|
||||||
this.search.areaId = tempAreaId;
|
|
||||||
this.page = {current: 1, size: 10, total: 0};
|
|
||||||
this.refreshTable()
|
|
||||||
},
|
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.deleteIds = [];
|
this.deleteIds = [];
|
||||||
this.multipleSelection = val;
|
this.multipleSelection = val;
|
||||||
@@ -263,41 +205,6 @@ export default {
|
|||||||
this.deleteIds.push(e.id);
|
this.deleteIds.push(e.id);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
exportrExcle() {
|
|
||||||
if (this.deleteIds.length == 0) {
|
|
||||||
if (this.search.birth) {
|
|
||||||
this.search.birth = this.search.birth.join(",");
|
|
||||||
}
|
|
||||||
this.resident.instance
|
|
||||||
.post(`/app/appresident/exportAll`, null, {
|
|
||||||
params: {
|
|
||||||
...this.search,
|
|
||||||
...this.page
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
if (res && res.code == 0) {
|
|
||||||
this.$message.success(res.data);
|
|
||||||
if (typeof this.search.birth == "string") {
|
|
||||||
this.search.birth = this.search.birth.split(",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.resident.instance.post(`/app/appresident/exportByIds`, {
|
|
||||||
ids: this.deleteIds,
|
|
||||||
areaId: this.user.info.areaId
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.code == 0) {
|
|
||||||
this.$message.success(res.data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleSizeChange(val) {
|
|
||||||
this.page.size = val;
|
|
||||||
this.refreshTable()
|
|
||||||
},
|
|
||||||
detailShow(row) {
|
detailShow(row) {
|
||||||
this.$router.push({query: {type: this.active, id: row.id}})
|
this.$router.push({query: {type: this.active, id: row.id}})
|
||||||
},
|
},
|
||||||
@@ -349,5 +256,15 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.ResidentList {
|
.ResidentList {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
::v-deep.AiSearch {
|
||||||
|
.el-input + .el-input > .el-input__inner {
|
||||||
|
border-left-color: transparent;
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
border-left-color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user