YM-WMS-WCS/dist/js/chunk-2bec94fe.ad1c416e.js
2023-04-14 15:56:50 +08:00

1 line
7.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2bec94fe"],{"0abe":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"120px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.dataFormSubmitHandle()}}},[r("el-form-item",{attrs:{prop:"name",label:t.$t("role.name")}},[r("el-input",{attrs:{placeholder:t.$t("role.name")},model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),r("el-form-item",{attrs:{prop:"remark",label:t.$t("role.remark")}},[r("el-input",{attrs:{placeholder:t.$t("role.remark")},model:{value:t.dataForm.remark,callback:function(e){t.$set(t.dataForm,"remark",e)},expression:"dataForm.remark"}})],1),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{size:"mini",label:t.$t("role.menuList")}},[r("el-tree",{ref:"menuListTree",attrs:{data:t.menuList,props:{label:"name",children:"children"},"node-key":"id",accordion:"","show-checkbox":""}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{size:"mini",label:t.$t("role.deptList")}},[r("el-tree",{ref:"deptListTree",attrs:{data:t.deptList,props:{label:"name",children:"children"},"node-key":"id",accordion:"","show-checkbox":""}})],1)],1)],1)],1)},a=[],i=(r("99af"),r("4160"),r("d3b7"),r("3ca3"),r("159b"),r("ddb0"),r("2909")),o=r("5530"),s=r("b047c"),c=r.n(s),u=r("3d7b"),d={mixins:[u["a"]],data:function(){return{urlOptions:{submitURL:"/sys/role/",infoURL:"/sys/role"},visible:!1,menuList:[],deptList:[],dataForm:{id:"",name:"",menuIdList:[],deptIdList:[],remark:""}}},computed:{dataRule:function(){return{name:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}]}}},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.$refs.menuListTree.setCheckedKeys([]),e.$refs.deptListTree.setCheckedKeys([]),Promise.all([e.getMenuList(),e.getDeptList()]).then((function(){e.dataForm.id&&e.getInfo()}))}))},getMenuList:function(){var t=this;return this.$http.get("/sys/menu/select").then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.msg);t.menuList=r.data})).catch((function(){}))},getDeptList:function(){var t=this;return this.$http.get("/sys/dept/list").then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.msg);t.deptList=r.data})).catch((function(){}))},getInfo:function(){var t=this;this.$http.get("/sys/role/".concat(this.dataForm.id)).then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.msg);t.dataForm=Object(o["a"])(Object(o["a"])({},t.dataForm),r.data),t.dataForm.menuIdList.forEach((function(e){return t.$refs.menuListTree.setChecked(e,!0)})),t.$refs.deptListTree.setCheckedKeys(t.dataForm.deptIdList)})).catch((function(){}))},dataFormSubmitHandle:c()((function(){var t=this;this.$refs["dataForm"].validate((function(e){if(!e)return!1;t.dataForm.menuIdList=[].concat(Object(i["a"])(t.$refs.menuListTree.getHalfCheckedKeys()),Object(i["a"])(t.$refs.menuListTree.getCheckedKeys())),t.dataForm.deptIdList=t.$refs.deptListTree.getCheckedKeys(),t.$http[t.dataForm.id?"put":"post"]("/sys/role",t.dataForm).then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.visible=!1,t.$emit("successSubmit")}})})).catch((function(){}))}))}),1e3,{leading:!0,trailing:!1})}},f=d,m=r("2877"),l=Object(m["a"])(f,n,a,!1,null,null,null);e["default"]=l.exports},2909:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r("6b75");function a(t){if(Array.isArray(t))return Object(n["a"])(t)}r("a4d3"),r("e01a"),r("d28b"),r("a630"),r("d3b7"),r("3ca3"),r("ddb0");function i(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}var o=r("06c5");function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){return a(t)||i(t)||Object(o["a"])(t)||s()}},"3d7b":function(t,e,r){"use strict";r("99af"),r("4160"),r("159b");e["a"]={data:function(){return{urlOptions:{submitURL:"",infoURL:"",getOption:!1,optionArrUrl:[],optionArr:{}},visible:!1,setData:!1,isGetCode:!1}},created:function(){},activated:function(){},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.visible=!0,this.urlOptions.getOption&&this.getArr(),this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.dataForm.id?e.$http.get("".concat(e.urlOptions.infoURL,"/").concat(e.dataForm.id)).then((function(t){var r=t.data;if(0!==r.code)return e.$message.error(r.msg);e.dataForm=r.data,e.setData&&e.setDataForm()})).catch((function(){})):e.isGetCode&&e.getCode()}))},getArr:function(){var t=this;this.urlOptions.optionArrUrl.forEach((function(e,r){t.$http.get(e,{params:{page:1,limit:500}}).then((function(e){var n=e.data;if(0!==n.code)return t.$message.error(n.msg);t.$set(t.urlOptions.optionArr,"arr".concat(r),n.data.list)})).catch((function(){}))}))},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(!e)return!1;t.$http[t.dataForm.id?"put":"post"](t.urlOptions.submitURL,t.dataForm).then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.visible=!1,t.$emit("successSubmit")}})})).catch((function(){}))}))},formClear:function(){this.$refs.dataForm.resetFields()}}}},"408c":function(t,e,r){var n=r("2b3e"),a=function(){return n.Date.now()};t.exports=a},b047c:function(t,e,r){var n=r("1a8c"),a=r("408c"),i=r("b4b0"),o="Expected a function",s=Math.max,c=Math.min;function u(t,e,r){var u,d,f,m,l,p,h=0,b=!1,v=!1,$=!0;if("function"!=typeof t)throw new TypeError(o);function g(e){var r=u,n=d;return u=d=void 0,h=e,m=t.apply(n,r),m}function y(t){return h=t,l=setTimeout(k,e),b?g(t):m}function F(t){var r=t-p,n=t-h,a=e-r;return v?c(a,f-n):a}function L(t){var r=t-p,n=t-h;return void 0===p||r>=e||r<0||v&&n>=f}function k(){var t=a();if(L(t))return O(t);l=setTimeout(k,F(t))}function O(t){return l=void 0,$&&u?g(t):(u=d=void 0,m)}function x(){void 0!==l&&clearTimeout(l),h=0,u=p=d=l=void 0}function T(){return void 0===l?m:O(a())}function w(){var t=a(),r=L(t);if(u=arguments,d=this,p=t,r){if(void 0===l)return y(p);if(v)return clearTimeout(l),l=setTimeout(k,e),g(p)}return void 0===l&&(l=setTimeout(k,e)),m}return e=i(e)||0,n(r)&&(b=!!r.leading,v="maxWait"in r,f=v?s(i(r.maxWait)||0,e):f,$="trailing"in r?!!r.trailing:$),w.cancel=x,w.flush=T,w}t.exports=u},b4b0:function(t,e,r){var n=r("1a8c"),a=r("ffd6"),i=NaN,o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;function f(t){if("number"==typeof t)return t;if(a(t))return i;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var r=c.test(t);return r||u.test(t)?d(t.slice(2),r?2:8):s.test(t)?i:+t}t.exports=f},ffd6:function(t,e,r){var n=r("3729"),a=r("1310"),i="[object Symbol]";function o(t){return"symbol"==typeof t||a(t)&&n(t)==i}t.exports=o}}]);