{"remainingRequest":"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\\SysSetting.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\system\\SysSetting.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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nconst FileUpload = () => import(\"@/components/common/FileUpload.vue\");\r\nimport portal from \"@/api/portal.js\";\r\nimport req from \"@/request.js\";\r\nexport default {\r\n name: \"sysSetting\",\r\n components: {\r\n FileUpload,\r\n },\r\n data() {\r\n return {\r\n isSubmit:false,\r\n saveUrl: `${window.context.portal}/sys/sysProperties/v1/save`,\r\n sysSettingData:{manageLogo:[],frontLogo:[],ico:[],manageName:\"\",frontName:\"\"},\r\n currentProperty: { encrypt: 1 ,name:\"系统Logo/名称\",alias:\"sysSetting\",description:\"当前系统的管理端Logo、应用端Logo、登录页Logo和名称。\",value:\"\"}\r\n }\r\n },\r\n watch: {\r\n \"currentProperty.value\": {\r\n handler(newVal, oldVal) {\r\n const this_ = this;\r\n if (newVal) {\r\n setTimeout(function(){\r\n this_.init();\r\n },1000);\r\n }\r\n },\r\n immediate: true,\r\n deep: true\r\n }\r\n },\r\n mounted() {\r\n this.init();\r\n },\r\n methods: {\r\n //查看系统设置\r\n init(){\r\n const this_ = this;\r\n this_.sysSettingData={manageLogo:[],frontLogo:[],ico:[],manageName:\"\",frontName:\"\"},\r\n portal.getDecryptBySysSetting().then(response => {\r\n if(response && response.value){\r\n this_.sysSettingData = JSON.parse(response.value);\r\n setTimeout(function(){\r\n if(this_.sysSettingData.manageLogo.length>0){\r\n this_.$refs.manageLogo.setFiles(this_.sysSettingData.manageLogo);\r\n }\r\n if(this_.sysSettingData.frontLogo.length>0){\r\n this_.$refs.frontLogo.setFiles(this_.sysSettingData.frontLogo);\r\n }\r\n if(this_.sysSettingData.ico.length>0){\r\n this_.$refs.ico.setFiles(this_.sysSettingData.ico);\r\n }\r\n },1000);\r\n this_.currentProperty.id = response.id;\r\n }\r\n });\r\n },\r\n //保存前\r\n beforeSaveData() {\r\n const this_ = this;\r\n this_.isSubmit = true;\r\n if(this_.$refs.manageLogo.getFiles().length>0){\r\n this.sysSettingData.manageLogo = this_.$refs.manageLogo.getFiles();\r\n }\r\n if(this_.$refs.frontLogo.getFiles().length>0){\r\n this_.sysSettingData.frontLogo = this_.$refs.frontLogo.getFiles();\r\n }\r\n if(this_.$refs.ico.getFiles().length>0){\r\n this_.sysSettingData.ico = this_.$refs.ico.getFiles();\r\n }\r\n if(this_.sysSettingData.manageLogo.length==0 && this_.sysSettingData.frontLogo.length==0 && this_.sysSettingData.ico.length==0\r\n && this_.sysSettingData.manageName==\"\" && this_.sysSettingData.frontName==\"\"){\r\n this_.isSubmit = false;\r\n this_.$message.warning(\"请填写其中一项再保存\");\r\n return;\r\n }\r\n this_.currentProperty.value = JSON.stringify(this_.sysSettingData);\r\n },\r\n //清空系统设置\r\n handleClear(){\r\n const this_ = this;\r\n if(!this_.currentProperty.id){\r\n this_.$message.warning(\"请先保存数据再清空\");\r\n return;\r\n }\r\n req.remove(`${window.context.portal}/sys/sysProperties/v1/remove?ids=${this_.currentProperty.id}`).then(response => {\r\n if(response.data){\r\n if(response.data.state){\r\n this_.sysSettingData = {manageLogo:[],frontLogo:[],ico:[],manageName:\"\",frontName:\"\"};\r\n this_.currentProperty = { encrypt: 1 ,name:\"系统Logo/名称\",alias:\"sysSetting\",description:\"当前系统的管理端Logo、应用端Logo、登录页Logo和名称。\",value:\"\"};\r\n this_.$refs.manageLogo.setFiles([]);\r\n this_.$refs.frontLogo.setFiles([]);\r\n this_.$refs.ico.setFiles([]);\r\n this_.$forceUpdate();\r\n this_.$message.success(\"清空成功,请重新登录后查看\");\r\n }\r\n }\r\n });\r\n }\r\n }\r\n};\r\n",null]}