From 7affdc596091a32dee82fb7bff6a244361e14933 Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期六, 02 十二月 2023 21:03:56 +0800
Subject: [PATCH] fix: 11-30漏洞修复
---
admin-web/src/views/stock/ledger/inventoryAlert/index.vue | 6
admin-web/src/views/mixins/listPage.js | 235 +++++++++++++++++++++++-----------------------
admin-web/src/utils/base.js | 14 --
admin-web/public/static/config.js | 4
4 files changed, 128 insertions(+), 131 deletions(-)
diff --git a/admin-web/public/static/config.js b/admin-web/public/static/config.js
index 2c5f21a..b7e2788 100644
--- a/admin-web/public/static/config.js
+++ b/admin-web/public/static/config.js
@@ -4,8 +4,8 @@
// 涓婁紶璺緞
ftpUrl: 'https://yqzx.jinmingyuan.com/lowConsum',//寮�鍙�
// 鎺ュ彛璇锋眰鍦板潃
- apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//寮�鍙�
- // apiBaseURL: 'http://172.16.60.155:8083/lowConsum',//寮�鍙�
+ // apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//寮�鍙�
+ apiBaseURL: 'http://172.16.60.155:8083/lowConsum',//寮�鍙�
// apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//寮�鍙�
debug: false //璋冭瘯寮�鍏� true鏃朵細杈撳嚭璇锋眰鏃ュ織
};
diff --git a/admin-web/src/utils/base.js b/admin-web/src/utils/base.js
index 74c10b5..76b7d74 100644
--- a/admin-web/src/utils/base.js
+++ b/admin-web/src/utils/base.js
@@ -31,18 +31,12 @@
url = SettingIplatform.ftpUrl + obj.url
}
window.open(decodeURI(url))
- /* var doc = document.createElement('a')
+ var doc = document.createElement('a')
doc.href = url
- doc.download = filename
doc.target = '_blank'
- doc.click()*/
- /* const loading = Loading.service({
- lock: true,
- text: '姝e湪涓嬭浇...',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- download(obj.url, obj.name, null, loading)*/
+ doc.rel = "noreferrer noopener"
+ doc.click()
+ document.body.removeChild(doc);
}
// 涓婁紶鏂囦欢
diff --git a/admin-web/src/views/mixins/listPage.js b/admin-web/src/views/mixins/listPage.js
index 5aba8aa..416cae5 100644
--- a/admin-web/src/views/mixins/listPage.js
+++ b/admin-web/src/views/mixins/listPage.js
@@ -3,121 +3,124 @@
import * as dataExport from "@/api/exportExcel"
export default {
- data() {
- return {
- loading: false,
- list: [],
- items: [],
- filterFrom: {},
- editSetting: {
- title: '',
- id: '',
- orgId: '',
- show: false,
- },
- detailSetting: {
- title: '璇︽儏',
- id: '',
- show: false,
- },
- pageNum: 1,
- pageSize: 10,
- total: 0,
- }
- },
- computed: {
- ...mapGetters(['userInfo']),
- clientHeight() {
- return document.documentElement.clientHeight;
- },
- },
- created() {
- },
- filters: {
- formatTime(time) {
- if (!time) return '-';
- return DateFormatter.LongToDateTime(time);
- },
- },
- methods: {
- // 瀵煎嚭
- handleExport(api, fileName, params) {
- console.log(fileName)
- let loading = this.$loading({
- lock: true,
- text: '瀵煎嚭涓紝璇风◢鍊�...',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)',
- });
- // 鍒ゆ柇鎬绘潯鏁版槸鍚﹀ぇ浜庢渶澶ф敮鎸佹潯鏁�
- dataExport[api](params)
- .then((res) => {
- const blob = new Blob([res], {type: 'application/vnd.ms-excel'});
- if ('download' in document.createElement('a')) {
- // 闈濱E涓嬭浇
- const elink = document.createElement('a');
- elink.download = `${fileName}.xls`;
- elink.style.display = 'none';
- elink.href = URL.createObjectURL(blob);
- document.body.appendChild(elink);
- elink.click();
- URL.revokeObjectURL(elink.href);
- document.body.removeChild(elink);
- } else {
- // IE10+涓嬭浇
- navigator.msSaveBlob(blob, `${fileName}.xls`);
- }
- this.$message.success('瀵煎嚭鎴愬姛锛�');
- loading.close();
- })
- .catch(() => {
- loading.close();
- });
- },
- // 鏂板
- handleAdd() {
- this.editSetting.id = null;
- this.editSetting.info = null;
- this.editSetting.title = '鏂板';
- this.editSetting.show = true;
- },
- // 缂栬緫
- handleEdit(row) {
- this.editSetting.id = row.id;
- this.editSetting.info = null;
- this.editSetting.title = '缂栬緫';
- this.editSetting.show = true;
- },
- // 璇︽儏
- handleDetail(row) {
- this.detailSetting.id = row.id;
- this.detailSetting.title = '璇︽儏';
- this.detailSetting.show = true;
- },
- // 鍒嗛〉
- handleSizeChange(pageSize) {
- this.pageSize = pageSize;
- this.search({pageNum: 1});
- },
- handleCurrentChange(pageNum) {
- this.pageNum = pageNum;
- this.search();
- },
- // 鏌ヨtable鍒楄〃
- search(pageNum) {
- if (pageNum) {
- this.pageNum = pageNum
- }
- this.fetchData();
- },
- refreshData() {
- this.pageNum = 1;
- this.pageSize = 10;
- this.search();
- },
- fifterForm(params) {
- this.filterFrom = Object.assign(this.filterFrom, params);
- this.search(1);
- },
+ data() {
+ return {
+ loading: false,
+ list: [],
+ items: [],
+ filterFrom: {},
+ editSetting: {
+ title: '',
+ id: '',
+ orgId: '',
+ show: false,
+ },
+ detailSetting: {
+ title: '璇︽儏',
+ id: '',
+ show: false,
+ },
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
}
+ },
+ computed: {
+ ...mapGetters(['userInfo']),
+ clientHeight() {
+ return document.documentElement.clientHeight;
+ },
+ },
+ created() {
+ },
+ filters: {
+ formatTime(time) {
+ if (!time) return '-';
+ return DateFormatter.LongToDateTime(time);
+ },
+ },
+ methods: {
+ // 瀵煎嚭
+ handleExport(api, fileName, params) {
+ console.log(fileName)
+ let loading = this.$loading({
+ lock: true,
+ text: '瀵煎嚭涓紝璇风◢鍊�...',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)',
+ });
+ // 鍒ゆ柇鎬绘潯鏁版槸鍚﹀ぇ浜庢渶澶ф敮鎸佹潯鏁�
+ dataExport[api](params)
+ .then((res) => {
+ const blob = new Blob([res], {type: 'application/vnd.ms-excel'});
+ if ('download' in document.createElement('a')) {
+ // 闈濱E涓嬭浇
+ const elink = document.createElement('a');
+ elink.download = `${fileName}.xls`;
+ elink.style.display = 'none';
+ const URL = window.URL || window.webkitURL
+ const href = URL.createObjectURL(blob)
+ elink.href = href;
+ document.body.appendChild(elink);
+ elink.click();
+ URL.revokeObjectURL(elink.href);
+ document.body.removeChild(elink);
+ window.URL.revokeObjectURL(href)
+ } else {
+ // IE10+涓嬭浇
+ navigator.msSaveBlob(blob, `${fileName}.xls`);
+ }
+ this.$message.success('瀵煎嚭鎴愬姛锛�');
+ loading.close();
+ })
+ .catch(() => {
+ loading.close();
+ });
+ },
+ // 鏂板
+ handleAdd() {
+ this.editSetting.id = null;
+ this.editSetting.info = null;
+ this.editSetting.title = '鏂板';
+ this.editSetting.show = true;
+ },
+ // 缂栬緫
+ handleEdit(row) {
+ this.editSetting.id = row.id;
+ this.editSetting.info = null;
+ this.editSetting.title = '缂栬緫';
+ this.editSetting.show = true;
+ },
+ // 璇︽儏
+ handleDetail(row) {
+ this.detailSetting.id = row.id;
+ this.detailSetting.title = '璇︽儏';
+ this.detailSetting.show = true;
+ },
+ // 鍒嗛〉
+ handleSizeChange(pageSize) {
+ this.pageSize = pageSize;
+ this.search({pageNum: 1});
+ },
+ handleCurrentChange(pageNum) {
+ this.pageNum = pageNum;
+ this.search();
+ },
+ // 鏌ヨtable鍒楄〃
+ search(pageNum) {
+ if (pageNum) {
+ this.pageNum = pageNum
+ }
+ this.fetchData();
+ },
+ refreshData() {
+ this.pageNum = 1;
+ this.pageSize = 10;
+ this.search();
+ },
+ fifterForm(params) {
+ this.filterFrom = Object.assign(this.filterFrom, params);
+ this.search(1);
+ },
+ }
}
diff --git a/admin-web/src/views/stock/ledger/inventoryAlert/index.vue b/admin-web/src/views/stock/ledger/inventoryAlert/index.vue
index 21937cd..59dd041 100644
--- a/admin-web/src/views/stock/ledger/inventoryAlert/index.vue
+++ b/admin-web/src/views/stock/ledger/inventoryAlert/index.vue
@@ -52,7 +52,7 @@
options: [],
cascader: [
{key: 'warehouseId', queryKey: 'agencyId'},
- {key: 'goodsTemplateId', queryKey: 'agencyId'},
+ {key: 'baseGoodsTemplateId', queryKey: 'agencyId'},
],
optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null},
},
@@ -121,7 +121,7 @@
dialogShow: false,
fileSettings: {
data: {},
- uploadUrl: getBaseUrl() + "/pc/fin/sys/tenant/import", // 涓婁紶鍦板潃
+ uploadUrl: getBaseUrl() + "/pc/warehouse/warningConfig/import", // 涓婁紶鍦板潃
accept: '.xls', // 鏍煎紡
type: 'text', // 鍥炴樉褰㈠紡
loading: false // 瀵煎叆鏁堟灉
@@ -129,7 +129,7 @@
/* 妯℃澘涓嬭浇 */
templateSettings: {
templateName: '瀵煎叆妯℃澘.xls', // 鍚嶇О
- templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 涓嬭浇鍦板潃
+ templateUrl: SettingIplatform.apiBaseURL + '/pc/warehouse/warningConfig/getWarnConfImportTemplate' // 涓嬭浇鍦板潃
},
onSuccess: null
},
--
Gitblit v1.9.1