|
|
|
@ -18,7 +18,7 @@ |
|
|
|
</el-button> |
|
|
|
<el-button @click="userSetting" type="primary">{{ buttons.settingTable}}</el-button> |
|
|
|
<download-excel |
|
|
|
:fields="exportDataStandard" |
|
|
|
:fields="fields()" |
|
|
|
:data="exportData" |
|
|
|
type="xls" |
|
|
|
:name="exportName" |
|
|
|
@ -88,6 +88,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
searchSysLanguagePackList, |
|
|
|
searchSysLanguageParam, |
|
|
|
@ -103,6 +104,7 @@ import { |
|
|
|
import {userFavoriteList,saveUserFavorite,removeUserFavorite} from '@/api/userFavorite.js' |
|
|
|
|
|
|
|
import column from "../common/column"; |
|
|
|
import {formatDate} from "element-ui/src/utils/date-util"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
column:column |
|
|
|
@ -317,12 +319,12 @@ export default { |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
exportDataStandard: { |
|
|
|
"功能编码": "functionId", |
|
|
|
"序列化编码": "objectId", |
|
|
|
"类型": "objectType", |
|
|
|
"语言值": "languageValue" |
|
|
|
// "功能编码": "functionId", |
|
|
|
// "序列化编码": "objectId", |
|
|
|
// "类型": "objectType", |
|
|
|
// "语言值": "languageValue" |
|
|
|
}, |
|
|
|
exportName: "页面功能语言", |
|
|
|
exportName: "页面功能语言"+formatDate(new Date(),"yyyy-MM-dd hh:mm:ss"), |
|
|
|
exportHeader: ["页面功能语言"], |
|
|
|
exportFooter: [], |
|
|
|
exportDefaultValue: "这一行这一列没有数据", |
|
|
|
@ -625,9 +627,28 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//动态列名 |
|
|
|
fields(){ |
|
|
|
let json = "{" |
|
|
|
this.columnList.forEach((item,index) =>{ |
|
|
|
|
|
|
|
if (index == this.columnList.length-1 ){ |
|
|
|
json +="\""+item.columnLabel+"\"" +":"+"\""+item.columnProp+"\"" |
|
|
|
}else { |
|
|
|
json += "\""+item.columnLabel+"\"" +":"+"\""+item.columnProp+"\""+ "," |
|
|
|
} |
|
|
|
}) |
|
|
|
json +="}" |
|
|
|
console.log(json ) |
|
|
|
let s = eval("(" + json + ")") |
|
|
|
return s |
|
|
|
}, |
|
|
|
createExportData() { |
|
|
|
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
|
|
|
// TODO:构造需要下载的数据返回 |
|
|
|
this.exportDataStandard = this.columnList |
|
|
|
this.exportName = "页面功能语言"+formatDate(new Date(),"yyyy-MM-dd hh:mm:ss") |
|
|
|
if(this.dataListSelections.length>0){ |
|
|
|
return this.dataListSelections; |
|
|
|
} |
|
|
|
@ -638,7 +659,7 @@ export default { |
|
|
|
console.log("数据开始") |
|
|
|
}, |
|
|
|
finishDownload() { |
|
|
|
console.log("数据下载完成") |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
|