Commit 36fdc16d authored by xinzhedeai's avatar xinzhedeai

企业信息导出

parent df575cc8
...@@ -819,6 +819,29 @@ var reqApis = function(){ ...@@ -819,6 +819,29 @@ var reqApis = function(){
} }
], ],
otherBtn: [ otherBtn: [
{
type: 'primary', icon: 'el-icon-document', name: '导出', showYN: true, 'callback': function () {
// reqApi.common.toExports.call(this);
this.$confirm('您确认要导出该页数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then((e) => {
var loading = this.$loading({
lock: true,
text: '请稍后.....',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var param = reqApi.getBaseParams.call(this);
this.pageApi.downloadEnterpriseExcel(param).then((res) => {
loading.close();
var name = this.pageApi.name + '数据' + Tools.Dates.format('yyyy-MM-dd HH:mm:ss');
Tools.downloadFile(res, name, 'xlsx')
})
})
}
},
{ {
fn: 'toAdd', type: 'primary', icon: 'el-icon-plus', name: '添加企业', 'callback': function () { fn: 'toAdd', type: 'primary', icon: 'el-icon-plus', name: '添加企业', 'callback': function () {
reqApi.common.toAdd.call(this); reqApi.common.toAdd.call(this);
...@@ -1035,6 +1058,9 @@ var reqApis = function(){ ...@@ -1035,6 +1058,9 @@ var reqApis = function(){
uploadjyfile: function (data) { uploadjyfile: function (data) {
return reqPublic('api/companyAnnualInfo/import', 'post', data) return reqPublic('api/companyAnnualInfo/import', 'post', data)
}, },
downloadEnterpriseExcel: function (param) {
return reqPublic('api/company/exportExcel', 'get', param, { responseType: 'blob' })
},
}, },
product: { // 产品信息 product: { // 产品信息
name: '企业产品信息', name: '企业产品信息',
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-button type="text" style="font-size: 18px;">公司数:{{ table.total }}</el-button> <el-button type="text" style="font-size: 18px;">公司数:{{ table.total }}</el-button>
<el-button <el-button
v-for="(item, key) in form.config.otherBtn" v-for="(item, key) in form.config.otherBtn"
v-show="item.name==='添加企业' || showYN" v-show="item.name==='添加企业' || showYN || item.showYN"
size="mini" size="mini"
:type="item.type" :type="item.type"
:icon="item.icon" :icon="item.icon"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment