Commit 3b7782ac authored by “yiyousong”'s avatar “yiyousong”

pref:修改应用文档下载

parent d3328e22
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
"@vue/cli-service": "~5.0.0", "@vue/cli-service": "~5.0.0",
"browserslist": "^4.21.4", "browserslist": "^4.21.4",
"caniuse-lite": "^1.0.30001442", "caniuse-lite": "^1.0.30001442",
"filemanager-webpack-plugin": "^8.0.0",
"less": "^4.0.0", "less": "^4.0.0",
"less-loader": "^8.0.0", "less-loader": "^8.0.0",
"postcss": "^8.4.12", "postcss": "^8.4.12",
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<div <div
class="list flex aic jcb" class="list flex aic jcb"
v-for="(i, j) in listArr[active].curInfo" v-for="(i, j) in listArr[active].curInfo"
:key="j"
> >
<div class="app-name">{{ i.appName }}</div> <div class="app-name">{{ i.appName }}</div>
<img <img
......
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
<div class="PoliticsShow-Container"> <div class="PoliticsShow-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button <a-button type="primary" class="addclass" @click="openDetails()">
type="primary"
class="addclass"
@click="openDetails()"
>
<span>新增</span> <span>新增</span>
</a-button> </a-button>
</div> </div>
...@@ -30,10 +26,7 @@ ...@@ -30,10 +26,7 @@
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-button <a-button type="primary" class="addclass" @click="getList()"
type="primary"
class="addclass"
@click="getList()"
>搜索</a-button >搜索</a-button
> >
</span> </span>
...@@ -50,7 +43,7 @@ ...@@ -50,7 +43,7 @@
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
> >
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record">
<a-button <a-button
type="link" type="link"
v-if="record.appFileUrl" v-if="record.appFileUrl"
...@@ -197,7 +190,7 @@ export default { ...@@ -197,7 +190,7 @@ export default {
handleDowload(url) { handleDowload(url) {
let arr = url.split("/"); let arr = url.split("/");
const a = document.createElement("a"); const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL + "/" + url; a.href = url;
a.download = arr[arr.length - 1]; a.download = arr[arr.length - 1];
a.click(); a.click();
}, },
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
> >
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record">
<a-button <a-button
type="link" type="link"
v-if="record.docFileUrl" v-if="record.docFileUrl"
...@@ -161,8 +161,9 @@ export default { ...@@ -161,8 +161,9 @@ export default {
}, },
handleDowload(url) { handleDowload(url) {
let arr = url.split("/"); let arr = url.split("/");
console.log(process.env.VUE_APP_API_BASE_URL + "/" + url);
const a = document.createElement("a"); const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL + "/" + url; a.href = url;
a.download = arr[arr.length - 1]; a.download = arr[arr.length - 1];
a.click(); a.click();
}, },
......
const { defineConfig } = require("@vue/cli-service"); const { defineConfig } = require("@vue/cli-service");
const FileManagerPlugin = require("filemanager-webpack-plugin"); // 压缩文件夹
const isDev = process.env.NODE_ENV === "development";
let plugins = [];
// 避免打本地启项目时自动打zip包
if (!isDev) {
plugins.push(
new FileManagerPlugin({
events: {
onEnd: {
// mkdir: ["./dist"],
delete: ["./zip/"],
copy: [{ source: "./dist", destination: "./zip/dist" }],
archive: [{ source: "./zip", destination: "./zip/门户系统.zip" }],
},
},
})
);
}
module.exports = defineConfig({ module.exports = defineConfig({
transpileDependencies: true, transpileDependencies: true,
lintOnSave: false, lintOnSave: false,
// 打包目录 // 打包目录
outputDir: "dist", outputDir: "dist",
configureWebpack: { configureWebpack: {
plugins: [...plugins], plugins: [],
}, },
devServer: { devServer: {
proxy: { proxy: {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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