EMS2.0-Documents/7.部署文档/Linux安装/项目前端文件/IEMS/js/chunk-524bad04.33fd87c1.js

2 lines
4.9 KiB
JavaScript
Raw Normal View History

2024-11-28 09:29:02 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-524bad04"],{"2a58":function(t,e,i){},5381:function(t,e,i){"use strict";i("2a58")},"64ab":function(t,e,i){"use strict";i.r(e);var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"decorate"}),i("div",{staticClass:"personalization"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("home.personalization")))]),i("el-form",{ref:"form",attrs:{rules:t.rules,model:t.form,"label-width":"200px"}},[i("el-form-item",{attrs:{label:t.$t("personalization.logo"),prop:"logoPath"}},[i("el-upload",{ref:"upload",attrs:{action:"","file-list":t.fileList,"list-type":"picture-card","before-upload":t.beforeUpload,"on-success":t.handleFileSuccess,"on-error":t.handleFileError,"on-remove":t.handleRemove,"http-request":t.uploadFile}},[i("i",{staticClass:"el-icon-plus"})])],1),i("el-form-item",{attrs:{label:t.$t("personalization.name"),prop:"unitName"}},[i("el-input",{staticStyle:{width:"720px"},attrs:{maxlength:"50","show-word-limit":""},model:{value:t.form.unitName,callback:function(e){t.$set(t.form,"unitName",e)},expression:"form.unitName"}})],1),i("el-form-item",{attrs:{label:t.$t("personalization.enName"),prop:"enUnitName"}},[i("el-input",{staticStyle:{width:"720px"},attrs:{maxlength:"120","show-word-limit":""},model:{value:t.form.enUnitName,callback:function(e){t.$set(t.form,"enUnitName",e)},expression:"form.enUnitName"}})],1),i("el-form-item",{attrs:{label:t.$t("personalization.screen"),prop:"title"}},[i("el-input",{staticStyle:{width:"720px"},attrs:{maxlength:"50","show-word-limit":""},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),i("el-form-item",{attrs:{label:t.$t("personalization.enScreen"),prop:"enTitle"}},[i("el-input",{staticStyle:{width:"720px"},attrs:{maxlength:"120","show-word-limit":""},model:{value:t.form.enTitle,callback:function(e){t.$set(t.form,"enTitle",e)},expression:"form.enTitle"}})],1),i("el-form-item",[i("span",{staticClass:"btn-item long",on:{click:t.setLogoConfig}},[t._v(t._s(t.$t("btn.save")))])])],1)],1),i("i",{staticClass:"iconfont icon-"})])},n=[],a=(i("d3b7"),i("159b"),i("ac1f"),i("00b4"),i("3785")),l=i("91b6"),s={data:function(){return{total:0,flag:1,list:[],form:{logoPath:"",unitName:"",enUnitName:"",title:"",enTitle:""},rules:{logoPath:[{required:!0,message:this.$t("pEnter")+this.$t("personalization.logo"),trigger:"change"}],unitName:[{required:!0,message:this.$t("pEnter")+this.$t("personalization.name"),trigger:"blur"}],enUnitName:[{required:!0,message:this.$t("pEnter")+this.$t("personalization.enName"),trigger:"change"}],title:[{required:!0,message:this.$t("pEnter")+this.$t("personalization.screen"),trigger:"blur"}],enTitle:[{required:!0,message:this.$t("pEnter")+this.$t("personalization.enScreen"),trigger:"blur"}]},addDialog:!1,seleteData:{},checkList:[],deviceList:[],typeCode:"",deviceTypeList:[],scope:{},fileList:[],File:[]}},created:function(){this.url=this.$store.state.user.url+"/trajectory-service",this.getList()},methods:{getList:function(){var t=this;Object(a["b"])().then((function(e){console.log(e),t.form=e.data||{logoPath:"",unitName:"",enUnitName:"",title:"",enTitle:""},t.fileList=[{name:"logo",url:e.data.logoPath}]}))},setLogoConfig:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return console.log("error submit!!"),!1;t.File.forEach((function(e){Object(l["a"])(e,t.url)})),t.File=[],Object(a["h"])(t.form).then((function(){t.$notify({title:t.$t("title.success"),message:t.$t("title.updateSuccess"),type:"success",duration:3e3})}))}))},beforeUpload:function(t){if(console.log(this.form.photo),this.form.logoPath)return this.$message.error(this.$t("photoUp.pDel")),!1;console.log(t,"file");var e=/^image\/(jpeg|png|jpg|(svg\+xml))$/.test(t.type),i=t.size/1024/1024<5;return e?i?e&&i:(this.$message.error(this.$t("photoUp.size")),!1):(this.$message.error(this.$t("photoUp.format")),!1)},handleFileSuccess:function(t){console.log(t,"handleFileSuccess"),200===t.status&&console.log(t,"200")},handleFile
//# sourceMappingURL=chunk-524bad04.33fd87c1.js.map