石广澎
2023-12-02 7affdc596091a32dee82fb7bff6a244361e14933
fix: 11-30漏洞修复
4个文件已修改
259 ■■■■ 已修改文件
admin-web/public/static/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/utils/base.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/mixins/listPage.js 235 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/ledger/inventoryAlert/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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时会输出请求日志
};
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: '正在下载...',
    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);
}
// 上传文件
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')) {
                        // 非IE下载
                        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')) {
            // 非IE下载
            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);
    },
  }
}
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
      },