Browse Source

,内容暂时用居民信息字智能导入下拉选中上传实现典占位

V1.0
mk 2 years ago
parent
commit
a099dd8af5
  1. 2
      src/views/components/resiSearch.vue
  2. 1015
      src/views/modules/base/smartImport.vue
  3. 48
      src/views/modules/communityService/labelConfig/addForm.vue

2
src/views/components/resiSearch.vue

@ -902,7 +902,7 @@ export default {
const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'resident_category'})
this.resiClass = data.data
} catch (error) {
console.log(error,'获取配偶情况字典');
console.log(error,'获取居民类别字典');
}
},
computedBirth(age) {

1015
src/views/modules/base/smartImport.vue

File diff suppressed because it is too large

48
src/views/modules/communityService/labelConfig/addForm.vue

@ -99,7 +99,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="对应值" align="center" >
<el-table-column label="对应值" align="center">
<template slot-scope="scope">
<template v-for="item in scope.row.correspondingOpction">
<el-select
@ -186,7 +186,13 @@
</el-select>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="120" v-if="formType!='info'">
<el-table-column
fixed="right"
label="操作"
align="center"
width="120"
v-if="formType != 'info'"
>
<template slot-scope="scope">
<!-- <img
src="@/assets/img/icon-del.png"
@ -206,11 +212,15 @@
<el-button
type="danger"
@click="handleClickDelete(scope.$index)"
v-if="scope.$index != tableData.length - 1||(tableData.length - 1>=1&&scope.$index !='0' )"
v-if="
scope.$index != tableData.length - 1 ||
(tableData.length - 1 >= 1 && scope.$index != '0')
"
size="small"
icon="el-icon-minus"
circle
> </el-button>
>
</el-button>
<!-- <img
src="@/assets/img/icon-add.png"
@click="handleClickAddRow"
@ -258,7 +268,7 @@ export default {
],
},
timeout: null,
tagObj:{},
tagObj: {},
searchList: [],
tableData: [
{
@ -295,14 +305,14 @@ export default {
methods: {
async initForm(type, row) {
this.formType = type;
if(type == 'info'){
if (type == "info") {
await this.getFormEdit(row.tagId);
}else if(type == 'edit'){
} else if (type == "edit") {
await this.getFormEdit(row.tagId);
this.formData.tagName = row.tagName;
}
this.tagId = row.tagId;
this.tagObj = row
this.tagObj = row;
for (let i in this.tableData) {
this.handleChangeSource(this.tableData[i], [i], type);
this.handleChangeFieldsType(this.tableData[i], [i], type);
@ -310,7 +320,6 @@ export default {
this.handleChangeFieldsName(this.tableData[i], [i], type);
}, 300);
}
},
querySearchAsync(val, cb) {
console.log(this.searchList);
@ -319,11 +328,11 @@ export default {
var results = val
? searchList.filter(this.createStateFilter(val))
: searchList;
if(results.length == 0){
this.handleClickAddRow()
this.formType = 'add'
}else{
this.formType = 'info'
if (results.length == 0) {
this.handleClickAddRow();
this.formType = "add";
} else {
this.formType = "info";
}
clearTimeout(this.timeout);
this.timeout = setTimeout(() => {
@ -574,7 +583,7 @@ export default {
}
});
} else {
this.$emit("dialogOk",this.tagObj);
this.$emit("dialogOk", this.tagObj);
return this.tagId;
}
},
@ -588,7 +597,7 @@ export default {
rules: this.tableData,
tagId: this.tagId,
};
} else if(this.formType == "add"){
} else if (this.formType == "add") {
url = "/governance/resiSearchTag/addResiSearchTag";
params = {
tagName: this.formData.tagName,
@ -598,7 +607,7 @@ export default {
const { data, msg, code } = await requestPost(url, params);
if (code == 0) {
this.$message.success("操作成功");
this.$emit("dialogOk",{tagId:data.id,tagName:data.tagName});
this.$emit("dialogOk", { tagId: data.id, tagName: data.tagName });
} else if (code >= 8000) {
this.$message.error(msg);
}
@ -689,18 +698,21 @@ export default {
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
.imgBtn {
width: 25px;
height: 25px;
margin-top: 3px;
cursor: pointer;
}
.div_btn {
display: flex;
justify-content: flex-end;
margin-top: 10px;
}
.my_form{
.my_form {
padding: 10px 50px 0;
}
</style>

Loading…
Cancel
Save