update code

dev-login
haha 2023-09-06 23:54:50 +08:00
parent 0f81beb7d9
commit db3b88db30
3 changed files with 11 additions and 9 deletions

View File

@ -518,7 +518,7 @@
</div>
<span slot="reference" style="cursor: pointer;">{{row.files.length}} </span>
</el-popover>
<span v-else>0</span>
<span v-else>/</span>
</template>
</el-table-column>
</el-table>
@ -786,7 +786,7 @@ export default {
methods: {
doDownFile(it){
if (it && it.url) {
this.$api.downFile( it.url,{},it.original);
this.$api.downFile( "/jhapi"+it.url,{},it.original);
}
},
fmtDate(d) {

View File

@ -122,12 +122,14 @@ service.interceptors.response.use(res => {
// 通用下载方法
export function download(url, params, filename, config={}) {
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
return service.get(url, params, {
transformRequest: [(params) => { return tansParams(params) }],
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
responseType: 'blob',
return axios({
url:url,
method:"get",
params:params||{},
responseType: 'blob',
...config
}).then(async (data) => {
}).then(async ({data}) => {
const isBlob = blobValidate(data);
if (isBlob) {
const blob = new Blob([data])

View File

@ -23,8 +23,8 @@ module.exports = defineConfig({
}
},
'/jhapi':{
//target: `http://62.234.3.186/jhapi/`,
target: `http://127.0.0.1:8090/jhapi/`,
target: `http://62.234.3.186/jhapi/`,
//target: `http://127.0.0.1:8090/jhapi/`,
changeOrigin: true,
pathRewrite: {
'^/jhapi':'/'