对外报告管理下载功能

This commit is contained in:
zyx.net
2022-07-28 14:10:56 +08:00
parent b60802f0a4
commit e8832637ed
2 changed files with 16 additions and 18 deletions
@@ -125,6 +125,7 @@ export default {
addModel(menuId) {
this.visible = true
this.title = this.$t('UploadFile')
this.disabled = false
this.menuId = menuId
this.formInline = {}
this.$nextTick(() => {
+15 -18
View File
@@ -383,7 +383,7 @@ export default {
// this.infoId = this.$route.query.infoId
// console.log('info', this.$route.query)
this.loadMenuData()
this.loadData()
// this.loadData()
this.generateList(this.gData)
},
methods: {
@@ -459,6 +459,12 @@ export default {
// this.data = this.toTree(res.result)
this.data = res.result
this.menuId = this.data[0].key
console.log(this.menuId)
let queryParam = {
supFolder: this.menuId
}
this.loadData(JSON.parse(JSON.stringify(queryParam)))
this.gData = [...this.data]
Object.assign(this, {
expandedKeys: this.expandedKeys,
@@ -698,6 +704,7 @@ export default {
},
//获取列表数据
loadData(item) {
this.queryParams.supFolder = this.menuId
let params = {
...this.queryParams,
...item,
@@ -784,23 +791,6 @@ export default {
this.parameter.info_id = this.infoId
this.parameter.menu_id = this.menuId
},
//导出
handleExportManage() {
if (JSON.stringify(this.parameter) == '{}') {
this.parameter.info_id = this.infoId
this.parameter.menu_id = this.menuId
}
// console.log('menuId',this.menuId)
let dateName = moment(new Date()).format('YYYY-MM-DD HH-mm-ss')
let name = this.$route.query.infoNumber + ' ' + dateName + '.zip'
let query = {
exportName: this.$route.query.infoNumber + ' ' + dateName,
idList: this.selectedRowKeys.join(','),
parameter: this.parameter
}
downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query, this.selectClear)
},
onChange(value,dateString){
if (this.queryParams.createTime && this.queryParams.createTime.length > 0) {
let dateOne = moment(dateString[0]).format('YYYY-MM-DD')
@@ -825,6 +815,13 @@ export default {
handleEdit(item) {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
//下载
download(item){
let query = {
id: item.fileKey
}
downloadFile('/sys/common/downLoadFile', item.fileName, query, this.Deselect)
},
//删除
batchDel(val) {
console.log(this.menuId)