{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\system\\SysMsg.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\system\\SysMsg.vue","mtime":1675071993225},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapState } from 'vuex';\nimport portal from '@/api/portal';\nimport ImgFileUpload from '@/components/common/ImgFileUpload.vue';\nexport default {\n  components: {\n    ImgFileUpload: ImgFileUpload\n  },\n  computed: mapState({\n    submitUrl: function submitUrl() {\n      return \"\".concat(window.context.portal, \"/portal/commonBasic/v1/\");\n    },\n    downLoad: function downLoad() {\n      return \"\".concat(window.context.portal, \"/uc/AuthorizationModel/v1/uploadAuthorizationFile\");\n    },\n    headers: function headers(state) {\n      return {\n        Authorization: \"Bearer \".concat(state.login.currentUser.token)\n      };\n    }\n  }),\n  data: function data() {\n    return {\n      sysMsg: {\n        id: '',\n        sysName: '',\n        sysVersion: '',\n        sysCompanyName: '',\n        // sysCopyrihte: '',\n        //sysCompanyShortName: '',\n        //sysCompanyAddress: '',\n        sysCompanyLegal: '',\n        //sysCompanyEmail: '',\n        sysCompanyPhone: '',\n        expireDate: '',\n        sysMemo: ''\n      },\n      accept: '.lic',\n      files: [],\n      uploadingFiles: {},\n      saveMethod: 'PUT',\n      downLoading: false,\n      dialogVisible: false,\n      grantData: {}\n    };\n  },\n  mounted: function mounted() {\n    this.$validator = this.$root.$validator;\n  },\n  created: function created() {\n    this.loadData();\n  },\n  methods: {\n    loadData: function loadData() {\n      var _this = this;\n\n      portal.loadSysMsg({}).then(function (res) {\n        _this.sysMsg = res.rows[0];\n      }, function (error) {\n        reject(error);\n      });\n      portal.querySystemAuthorization({}).then(function (res) {\n        //   console.log(res, 'res授权')\n        _this.grantData = res;\n      }, function (error) {\n        reject(error);\n      });\n    },\n    afterSaveData: function afterSaveData() {\n      this.loadData();\n    },\n    download: function download() {\n      var _this2 = this;\n\n      this.downLoading = true;\n      portal.downloadFileLic().then(function (res) {\n        _this2.downLoading = false; // const content = res\n        // const blob = new Blob([content])\n        // const fileName = 'license.lic'\n        // const elink = document.createElement('a')\n        // elink.download = fileName\n        // elink.style.display = 'none'\n        // elink.href = URL.createObjectURL(blob)\n        // document.body.appendChild(elink)\n        // elink.click()\n        // URL.revokeObjectURL(elink.href) // 释放URL 对象\n        // document.body.removeChild(elink)\n        // this.downLoading = false\n      });\n    },\n    error: function error(response, file, fileList) {\n      this.$message.error('文件上传失败');\n      delete this.uploadingFiles[Base64.encode(file.name)];\n    },\n    success: function success(response, file, fileList) {\n      this.$message.success(response);\n      console.log(response, file, fileList);\n    },\n    beforeAvatarUpload: function beforeAvatarUpload(file) {\n      // 文件类型限制\n      var name = file.name ? file.name : '';\n      var ext = name ? name.substr(name.lastIndexOf('.') + 1, name.length) : true;\n      var isExt = this.accept.indexOf(ext) < 0;\n      this.isChecking = !isExt;\n\n      if (isExt) {\n        if (this.accept == 'false') {\n          this.$message.error('请配置可上传文件的格式!');\n        } else {\n          this.$message.error('上传的附件只能是 ' + this.accept + '格式!');\n        }\n\n        return !isExt;\n      }\n\n      this.uploadingFiles[Base64.encode(name)] = 'eror';\n    },\n    // queryData() {\n    //   this.dialogVisible = true\n    //   portal.querySystemAuthorization({}).then(\n    //     (res) => {\n    //       //   console.log(res, 'res授权')\n    //       this.grantData = res\n    //     },\n    //     (error) => {\n    //       reject(error)\n    //     }\n    //   )\n    // },\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n    }\n  }\n};",null]}