|
|
@ -2,7 +2,25 @@ |
|
|
|
<div class="g-main"> |
|
|
|
<div class="m-table"> |
|
|
|
<div class="u-table-btn1"> |
|
|
|
|
|
|
|
<el-dropdown |
|
|
|
size="small" |
|
|
|
type="primary" |
|
|
|
style="margin: 0 10px; height: 30px" |
|
|
|
trigger="hover" |
|
|
|
> |
|
|
|
<el-button type="primary" size="small"> |
|
|
|
表格导入<i class="el-icon-arrow-down el-icon--right"></i> |
|
|
|
</el-button> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item |
|
|
|
v-for="(item, index) in resiClass" |
|
|
|
:key="index" |
|
|
|
@click.native="handleImportType(item.value)" |
|
|
|
> |
|
|
|
{{ item.label }} |
|
|
|
</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
<el-upload |
|
|
|
:headers="$getElUploadHeaders()" |
|
|
|
ref="upload" |
|
|
@ -17,24 +35,7 @@ |
|
|
|
:on-success="handleExcelSuccess" |
|
|
|
:before-upload="beforeExcelUpload" |
|
|
|
:http-request="uploadHttpRequest" |
|
|
|
> |
|
|
|
<el-dropdown |
|
|
|
size="small" |
|
|
|
type="primary" |
|
|
|
style="margin: 0 10px; height: 30px" |
|
|
|
@command="(command) => handleImportType(command)" |
|
|
|
trigger="hover" |
|
|
|
> |
|
|
|
<el-button type="primary"> |
|
|
|
表格导入<i class="el-icon-arrow-down el-icon--right"></i> |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-dropdown-menu slot="dropdown" > |
|
|
|
<el-dropdown-item v-for="(item,index) in resiClass" :key="index" :command="item.value" >{{item.label}}</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
</el-upload> |
|
|
|
|
|
|
|
></el-upload> |
|
|
|
<el-button |
|
|
|
class="diy-button--white" |
|
|
|
size="small" |
|
|
@ -151,30 +152,29 @@ export default { |
|
|
|
dataList: [ |
|
|
|
// { |
|
|
|
// index: "key1", |
|
|
|
// srcField: "value1_from_exist", |
|
|
|
// srcField: "所属房屋", |
|
|
|
// exist: true, |
|
|
|
// field: "value1_from_exist" |
|
|
|
// field: "所属房屋", |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// index: "key2", |
|
|
|
// srcField: "value2_from_exist", |
|
|
|
// srcField: "基础信息", |
|
|
|
// exist: true, |
|
|
|
// field: "value2_from_exist" |
|
|
|
// field: "基础信息", |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// index: "key3", |
|
|
|
// srcField: "value3_from_notExist", |
|
|
|
// srcField: "房屋信息", |
|
|
|
// exist: false, |
|
|
|
// field: "" |
|
|
|
// field: "房屋信息", |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// index: "key4", |
|
|
|
// srcField: "value4_from_notExist", |
|
|
|
// srcField: "本地户籍", |
|
|
|
// exist: false, |
|
|
|
// field: "" |
|
|
|
// field: "本地户籍", |
|
|
|
// }, |
|
|
|
], |
|
|
|
|
|
|
|
dataListLoading: false, |
|
|
|
total: 0, |
|
|
|
pageSize: 20, |
|
|
@ -196,7 +196,7 @@ export default { |
|
|
|
fileData: null, |
|
|
|
resiClass: [], |
|
|
|
|
|
|
|
importType :'' |
|
|
|
importType: "", |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -214,7 +214,7 @@ export default { |
|
|
|
async mounted() { |
|
|
|
// await this.loadData(); |
|
|
|
await this.loadPersonGroup(); |
|
|
|
this.getResident() |
|
|
|
this.getResident(); |
|
|
|
|
|
|
|
this.sHeight = this.$refs.divEditBtn.offsetHeight + 300; |
|
|
|
}, |
|
|
@ -222,7 +222,9 @@ export default { |
|
|
|
diaClose() { |
|
|
|
this.formShow = false; |
|
|
|
}, |
|
|
|
|
|
|
|
handleDropdownClick(event) { |
|
|
|
event.stopPropagation(); |
|
|
|
}, |
|
|
|
async loadPersonGroup() { |
|
|
|
const url = "/oper/customize/icformitemgroup/list"; |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/isServiceProject/service/serviceScopeTree' |
|
|
@ -283,18 +285,14 @@ export default { |
|
|
|
// this.$message.error(msg ) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleImportType(command){ |
|
|
|
this.importType = command |
|
|
|
// this.$refs.upload.click(); |
|
|
|
this.$refs['upload'].$children[0].$refs.input.click() |
|
|
|
handleImportType(command) { |
|
|
|
this.importType = command; |
|
|
|
this.$refs["upload"].$children[0].$refs.input.click(); |
|
|
|
}, |
|
|
|
handleChangeScope(value) { |
|
|
|
// console.log('value', value) |
|
|
|
|
|
|
|
this.orgIdArray = value; |
|
|
|
this.scopeList = []; |
|
|
|
let selArray = this.$refs["myCascader"].getCheckedNodes(); |
|
|
|
|
|
|
|
// console.log('selArray', selArray) |
|
|
|
|
|
|
|
selArray.forEach((element, index) => { |
|
|
@ -367,6 +365,8 @@ export default { |
|
|
|
}, |
|
|
|
// 上传大图标成功 |
|
|
|
handleExcelSuccess(res, file) { |
|
|
|
console.log(res, file); |
|
|
|
if (!res) return; |
|
|
|
if (res.code === 0 && res.msg === "success") { |
|
|
|
console.log("resss---ppp", res); |
|
|
|
} else { |
|
|
@ -395,13 +395,13 @@ export default { |
|
|
|
this.$message.error("上传文件大小不能超过 10MB!"); |
|
|
|
} |
|
|
|
|
|
|
|
if(!this.importType){ |
|
|
|
this.$message.error('请选择导入的类别') |
|
|
|
if (!this.importType) { |
|
|
|
this.$message.error("请选择导入的类别"); |
|
|
|
} |
|
|
|
return fileType && isLt1M; |
|
|
|
}, |
|
|
|
async uploadHttpRequest(file) { |
|
|
|
if(!this.importType) return |
|
|
|
if (!this.importType) return; |
|
|
|
this.importLoading = true; |
|
|
|
this.importBtnTitle = "正在上传中..."; |
|
|
|
const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 |
|
|
@ -552,8 +552,8 @@ export default { |
|
|
|
text-align: center; |
|
|
|
color: #aaaaaa; |
|
|
|
} |
|
|
|
::v-deep .upload-btn{ |
|
|
|
.el-button{ |
|
|
|
::v-deep .upload-btn { |
|
|
|
.el-button { |
|
|
|
padding: 7px 20px; |
|
|
|
} |
|
|
|
} |
|
|
|