|
|
@ -336,6 +336,7 @@ export default { |
|
|
|
// .post('epmetuser/icresiuser/exportExcel', params) |
|
|
|
axios({ |
|
|
|
url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/exportExcel', |
|
|
|
// url: 'epmetuser/icresiuser/exportExcel', |
|
|
|
method: 'post', |
|
|
|
data: params, |
|
|
|
responseType: 'blob' |
|
|
@ -344,10 +345,6 @@ export default { |
|
|
|
console.log('resllll', res) |
|
|
|
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) |
|
|
|
console.log('filename', fileName) |
|
|
|
// var headerData = res.headers |
|
|
|
// this.download(res, '人员数据.xlsx') |
|
|
|
// console.log('res', res) |
|
|
|
// const fileName = '人员数据.xlsx' |
|
|
|
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) |
|
|
|
var url = window.URL.createObjectURL(blob) |
|
|
|
var aLink = document.createElement('a') |
|
|
@ -780,6 +777,20 @@ export default { |
|
|
|
return this.$message.error('网络错误') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getTreeData(data){ |
|
|
|
if (!Array.isArray(data)) return [] |
|
|
|
let arr = data.map(item => { |
|
|
|
let _item = {} |
|
|
|
if (item.children) { |
|
|
|
if (item.children.length === 0) _item = { ...item, children: undefined } |
|
|
|
else _item = { ...item, children: this.getTreeData(item.children)} |
|
|
|
} else { |
|
|
|
_item = { ...item } |
|
|
|
} |
|
|
|
return _item |
|
|
|
}) |
|
|
|
return arr |
|
|
|
}, |
|
|
|
async getFormList(type) { |
|
|
|
await this.$http |
|
|
|
.post('/oper/customize/icform/getcustomerform', { |
|
|
@ -799,7 +810,7 @@ export default { |
|
|
|
if (item.optionSourceType === 'remote') { |
|
|
|
await this.getOptionsList(item.optionSourceValue).then( |
|
|
|
(res) => { |
|
|
|
item.options = res |
|
|
|
item.options = this.getTreeData(res) |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
@ -810,7 +821,7 @@ export default { |
|
|
|
n.tableName = item.tableName |
|
|
|
if (n.optionSourceType === 'remote' && type !== 'edit') { |
|
|
|
await this.getOptionsList(n.optionSourceValue).then((res) => { |
|
|
|
n.options = res |
|
|
|
n.options = this.getTreeData(res) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|