|
@@ -8,6 +8,12 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
+ @click="exportFile"
|
|
|
+ >导出品牌</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
@click="UpdateBrand"
|
|
|
>更新品牌信息</el-button
|
|
|
>
|
|
@@ -66,6 +72,7 @@ import getTableState from "@/state/tableRef";
|
|
|
import auth from "@/state/viewAuth";
|
|
|
import comDialog from "@/components/dialog";
|
|
|
import comPagination from "@/components/pagination";
|
|
|
+import { dowmBlobfile } from "@/util/file";
|
|
|
import axios from 'axios'
|
|
|
import { dateFormat } from '@/util'
|
|
|
import {
|
|
@@ -74,6 +81,7 @@ import {
|
|
|
updateCategory,
|
|
|
deleteCategory,
|
|
|
getBrandupdateBrandInfo,
|
|
|
+ exporBrandList,
|
|
|
} from '@/request/config'
|
|
|
|
|
|
|
|
@@ -128,6 +136,17 @@ export default {
|
|
|
return { ...state, loading, headList, time, auth};
|
|
|
},
|
|
|
methods: {
|
|
|
+ async exportFile(){
|
|
|
+ await axios({
|
|
|
+ method: 'get',
|
|
|
+ url: exporBrandList,
|
|
|
+ params: { },
|
|
|
+ responseType: 'blob'
|
|
|
+ }).then(res => {
|
|
|
+ dowmBlobfile(res,'导出品牌信息')
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
async UpdateBrand(){
|
|
|
await axios.get(getBrandupdateBrandInfo, {})
|
|
|
this.$message({
|