YM-WMS-WCS/dist/js/chunk-58875ae8.995a5b92.js
2023-04-21 16:53:32 +08:00

1 line
16 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-58875ae8","chunk-48ba882a"],{2909:function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var r=a("6b75");function i(t){if(Array.isArray(t))return Object(r["a"])(t)}a("a4d3"),a("e01a"),a("d28b"),a("a630"),a("d3b7"),a("3ca3"),a("ddb0");function s(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}var o=a("06c5");function n(){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 d(t){return i(t)||s(t)||Object(o["a"])(t)||n()}},"3d7b":function(t,e,a){"use strict";a("99af"),a("4160"),a("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 a=t.data;if(0!==a.code)return e.$message.error(a.msg);e.dataForm=a.data,e.setData&&e.setDataForm()})).catch((function(){})):e.isGetCode&&e.getCode()}))},getArr:function(){var t=this;this.urlOptions.optionArrUrl.forEach((function(e,a){t.$http.get(e,{params:{page:1,limit:500}}).then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.msg);t.$set(t.urlOptions.optionArr,"arr".concat(a),r.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 a=e.data;if(0!==a.code)return t.$message.error(a.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,a){var r=a("2b3e"),i=function(){return r.Date.now()};t.exports=i},"805b":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-card",{staticClass:"aui-card--fill",attrs:{shadow:"never"}},[a("div",{staticClass:"mod-sys__user"},[a("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),a("base-table",{attrs:{"table-props":t.tableProps,page:t.listQuery.page,limit:t.listQuery.limit,"table-data":t.tableData}},[t.tableBtn.length?a("method-btn",{attrs:{slot:"handleBtn",width:80,label:"操作","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),a("pagination",{attrs:{limit:t.listQuery.limit,page:t.listQuery.page,total:t.listQuery.total},on:{"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},"update:page":function(e){return t.$set(t.listQuery,"page",e)},pagination:t.getDataList}}),a("base-dialog",{attrs:{dialogTitle:t.addOrEditTitle,dialogVisible:t.addOrUpdateVisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[a("add-or-update",{ref:"addOrUpdate",on:{successSubmit:t.successSubmit}})],1)],1)])},i=[],s=a("ed26"),o=a("b2fc"),n=a("12cb"),d=a("fc23"),l=[{prop:"username",label:n["a"].t("user.username")},{prop:"deptName",label:n["a"].t("user.deptName")},{prop:"email",label:n["a"].t("user.email")},{prop:"mobile",label:n["a"].t("user.mobile")},{prop:"gender",label:n["a"].t("user.gender"),filter:Object(d["a"])("sex")},{prop:"status",label:n["a"].t("user.status"),filter:Object(d["a"])("userStatus")},{prop:"createDate",label:n["a"].t("user.createDate")}],u=[{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}],c={mixins:[s["a"]],data:function(){return{urlOptions:{getDataListURL:"/sys/user/page",deleteURL:"/sys/user",exportUrl:"/sys/user/export"},tableProps:l,tableBtn:u,addDeleteURL:!0,formConfig:[{type:"input",label:n["a"].t("user.username"),placeholder:n["a"].t("user.username"),param:"username"},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"button",btnName:"新增",name:"add",color:"primary",plain:!0}]}},components:{AddOrUpdate:o["default"]},methods:{buttonClick:function(t){switch(t.btnName){case"search":this.listQuery.username=t.username,this.listQuery.page=1,this.getDataList();break;case"add":this.addOrEditTitle="新增",this.addOrUpdateVisible=!0,this.addOrUpdateHandle();break;default:console.log(t)}}}},m=c,p=a("2877"),f=Object(p["a"])(m,r,i,!1,null,null,null);e["default"]=f.exports},ae6d:function(t,e,a){"use strict";var r=a("c092"),i=a.n(r);i.a},b047c:function(t,e,a){var r=a("1a8c"),i=a("408c"),s=a("b4b0"),o="Expected a function",n=Math.max,d=Math.min;function l(t,e,a){var l,u,c,m,p,f,h=0,b=!1,g=!1,v=!0;if("function"!=typeof t)throw new TypeError(o);function $(e){var a=l,r=u;return l=u=void 0,h=e,m=t.apply(r,a),m}function y(t){return h=t,p=setTimeout(O,e),b?$(t):m}function F(t){var a=t-f,r=t-h,i=e-a;return g?d(i,c-r):i}function L(t){var a=t-f,r=t-h;return void 0===f||a>=e||a<0||g&&r>=c}function O(){var t=i();if(L(t))return w(t);p=setTimeout(O,F(t))}function w(t){return p=void 0,v&&l?$(t):(l=u=void 0,m)}function x(){void 0!==p&&clearTimeout(p),h=0,l=f=u=p=void 0}function U(){return void 0===p?m:w(i())}function k(){var t=i(),a=L(t);if(l=arguments,u=this,f=t,a){if(void 0===p)return y(f);if(g)return clearTimeout(p),p=setTimeout(O,e),$(f)}return void 0===p&&(p=setTimeout(O,e)),m}return e=s(e)||0,r(a)&&(b=!!a.leading,g="maxWait"in a,c=g?n(s(a.maxWait)||0,e):c,v="trailing"in a?!!a.trailing:v),k.cancel=x,k.flush=U,k}t.exports=l},b2fc:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("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.dataFormSubmit()}}},[a("el-form-item",{attrs:{prop:"username",label:t.$t("user.username")}},[a("el-input",{attrs:{placeholder:t.$t("user.username")},model:{value:t.dataForm.username,callback:function(e){t.$set(t.dataForm,"username",e)},expression:"dataForm.username"}})],1),a("el-form-item",{attrs:{prop:"deptName",label:t.$t("user.deptName")}},[a("ren-dept-tree",{attrs:{placeholder:t.$t("dept.title"),"dept-name":t.dataForm.deptName},on:{"update:deptName":function(e){return t.$set(t.dataForm,"deptName",e)},"update:dept-name":function(e){return t.$set(t.dataForm,"deptName",e)}},model:{value:t.dataForm.deptId,callback:function(e){t.$set(t.dataForm,"deptId",e)},expression:"dataForm.deptId"}})],1),a("el-form-item",{class:{"is-required":!t.dataForm.id},attrs:{prop:"password",label:t.$t("user.password")}},[a("el-input",{attrs:{type:"password",placeholder:t.$t("user.password")},model:{value:t.dataForm.password,callback:function(e){t.$set(t.dataForm,"password",e)},expression:"dataForm.password"}})],1),a("el-form-item",{class:{"is-required":!t.dataForm.id},attrs:{prop:"confirmPassword",label:t.$t("user.confirmPassword")}},[a("el-input",{attrs:{type:"password",placeholder:t.$t("user.confirmPassword")},model:{value:t.dataForm.confirmPassword,callback:function(e){t.$set(t.dataForm,"confirmPassword",e)},expression:"dataForm.confirmPassword"}})],1),a("el-form-item",{attrs:{prop:"realName",label:t.$t("user.realName")}},[a("el-input",{attrs:{placeholder:t.$t("user.realName")},model:{value:t.dataForm.realName,callback:function(e){t.$set(t.dataForm,"realName",e)},expression:"dataForm.realName"}})],1),a("el-form-item",{attrs:{prop:"gender",label:t.$t("user.gender")}},[a("ren-radio-group",{attrs:{"dict-type":"gender"},model:{value:t.dataForm.gender,callback:function(e){t.$set(t.dataForm,"gender",e)},expression:"dataForm.gender"}})],1),a("el-form-item",{attrs:{prop:"email",label:t.$t("user.email")}},[a("el-input",{attrs:{placeholder:t.$t("user.email")},model:{value:t.dataForm.email,callback:function(e){t.$set(t.dataForm,"email",e)},expression:"dataForm.email"}})],1),a("el-form-item",{attrs:{prop:"mobile",label:t.$t("user.mobile")}},[a("el-input",{attrs:{placeholder:t.$t("user.mobile")},model:{value:t.dataForm.mobile,callback:function(e){t.$set(t.dataForm,"mobile",e)},expression:"dataForm.mobile"}})],1),a("el-form-item",{staticClass:"role-list",attrs:{prop:"roleIdList",label:t.$t("user.roleIdList")}},[a("el-select",{attrs:{multiple:"",placeholder:t.$t("user.roleIdList")},model:{value:t.dataForm.roleIdList,callback:function(e){t.$set(t.dataForm,"roleIdList",e)},expression:"dataForm.roleIdList"}},t._l(t.roleList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),a("el-form-item",{attrs:{prop:"status",label:t.$t("user.status"),size:"mini"}},[a("el-radio-group",{model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},[a("el-radio",{attrs:{label:0}},[t._v(t._s(t.$t("user.status0")))]),a("el-radio",{attrs:{label:1}},[t._v(t._s(t.$t("user.status1")))])],1)],1)],1)},i=[],s=(a("99af"),a("4de4"),a("d3b7"),a("3ca3"),a("ddb0"),a("2909")),o=a("5530"),n=a("b047c"),d=a.n(n),l=a("61f7"),u=a("3d7b"),c={mixins:[u["a"]],data:function(){return{urlOptions:{submitURL:"/sys/user/",infoURL:"/sys/user"},visible:!1,roleList:[],roleIdListDefault:[],dataForm:{id:"",username:"",deptId:"",deptName:"",password:"",confirmPassword:"",realName:"",gender:0,email:"",mobile:"",roleIdList:[],status:1}}},computed:{dataRule:function(){var t=this,e=function(e,a,r){if(!t.dataForm.id&&!/\S/.test(a))return r(new Error(t.$t("validate.required")));r()},a=function(e,a,r){return t.dataForm.id||/\S/.test(a)?t.dataForm.password!==a?r(new Error(t.$t("user.validate.confirmPassword"))):void r():r(new Error(t.$t("validate.required")))},r=function(e,a,r){if(a&&!Object(l["a"])(a))return r(new Error(t.$t("validate.format",{attr:t.$t("user.email")})));r()},i=function(e,a,r){if(a&&!Object(l["b"])(a))return r(new Error(t.$t("validate.format",{attr:t.$t("user.mobile")})));r()};return{username:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],deptName:[{required:!0,message:this.$t("validate.required"),trigger:"change"}],password:[{validator:e,trigger:"blur"}],confirmPassword:[{validator:a,trigger:"blur"}],realName:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],email:[{validator:r,trigger:"blur"}],mobile:[{validator:i,trigger:"blur"}]}}},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.visible=!0,this.dataForm.deptId="",this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.roleIdListDefault=[],Promise.all([e.getRoleList()]).then((function(){e.dataForm.id&&e.getInfo()}))}))},getRoleList:function(){var t=this;return this.$http.get("/sys/role/list").then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.roleList=a.data})).catch((function(){}))},getInfo:function(){var t=this;this.$http.get("/sys/user/".concat(this.dataForm.id)).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.dataForm=Object(o["a"])(Object(o["a"])(Object(o["a"])({},t.dataForm),a.data),{},{roleIdList:[]});for(var r=0;r<a.data.roleIdList.length;r++)t.roleList.filter((function(t){return t.id===a.data.roleIdList[r]}))[0]?t.dataForm.roleIdList.push(a.data.roleIdList[r]):t.roleIdListDefault.push(a.data.roleIdList[r])})).catch((function(){}))},dataFormSubmit:d()((function(){var t=this;this.$refs["dataForm"].validate((function(e){if(!e)return!1;t.$http[t.dataForm.id?"put":"post"]("/sys/user",Object(o["a"])(Object(o["a"])({},t.dataForm),{},{roleIdList:[].concat(Object(s["a"])(t.dataForm.roleIdList),Object(s["a"])(t.roleIdListDefault))})).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.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})}},m=c,p=(a("ae6d"),a("2877")),f=Object(p["a"])(m,r,i,!1,null,null,null);e["default"]=f.exports},b4b0:function(t,e,a){var r=a("1a8c"),i=a("ffd6"),s=NaN,o=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function c(t){if("number"==typeof t)return t;if(i(t))return s;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var a=d.test(t);return a||l.test(t)?u(t.slice(2),a?2:8):n.test(t)?s:+t}t.exports=c},c092:function(t,e,a){},ed26:function(t,e,a){"use strict";a("d3b7"),a("3ca3"),a("ddb0"),a("2b3d");e["a"]={data:function(){return{urlOptions:{getDataListURL:"",deleteURL:"",statusUrl:"",exportUrl:""},addOrEditTitle:"",tableData:[],listQuery:{limit:10,page:1,total:1},addDeleteURL:!1,dataListLoading:!1,addOrUpdateVisible:!1}},created:function(){},activated:function(){this.getDataList()},methods:{getDataList:function(){var t=this;this.dataListLoading=!0,this.$http.get(this.urlOptions.getDataListURL,{params:this.listQuery}).then((function(e){var a=e.data;if(t.dataListLoading=!1,0!==a.code)return t.tableData=[],t.listQuery.total=0,t.$message.error(a.msg);t.tableData=a.data.list,t.listQuery.total=a.data.total})).catch((function(){t.dataListLoading=!1}))},sizeChangeHandle:function(t){this.listQuery.limit=t,this.listQuery.page=1,this.getDataList()},currentChangeHandle:function(t){this.listQuery.page=t,this.getDataList()},addOrUpdateHandle:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){e.$refs.addOrUpdate.init(t)}))},cancel:function(t){this.$refs["popover-"+t].showPopper=!1},changeStatus:function(t){var e=this;this.$http.post(this.urlOptions.statusUrl,{id:t}).then((function(a){var r=a.data;if(0!==r.code)return e.$message.error(r.msg);e.$refs["popover-"+t].showPopper=!1,e.$message({message:e.$t("prompt.success"),type:"success",duration:500,onClose:function(){e.getDataList()}})})).catch((function(){}))},handleClick:function(t){var e=this;"edit"===t.type?(this.addOrUpdateVisible=!0,this.addOrEditTitle="编辑",this.$nextTick((function(){e.$refs.addOrUpdate.init(t.data.id)}))):"delete"===t.type?this.deleteHandle(t.data.id,t.data._pageIndex):this.btnFun(t)},deleteHandle:function(t,e){var a=this;this.$confirm("确定对[序号=".concat(e,"]进行删除操作?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.$http.delete(a.urlOptions.deleteURL+(a.addDeleteURL?"/"+t:""),{data:[t]}).then((function(t){var e=t.data;e&&0===e.code?a.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){a.getDataList()}}):a.$message.error(e.msg)}))})).catch((function(){}))},buttonClick:function(t){switch(t.btnName){case"search":this.listQuery.xm1=t.xm1,this.listQuery.xm2=t.xm2,this.listQuery.page=1,this.getDataList();break;case"add":this.addOrEditTitle="新增",this.addOrUpdateVisible=!0,this.addOrUpdateHandle();break;default:console.log(t)}},handleCancel:function(){this.$refs.addOrUpdate.formClear(),this.addOrUpdateVisible=!1,this.addOrEditTitle=""},handleConfirm:function(){this.$refs.addOrUpdate.dataFormSubmit()},successSubmit:function(){this.handleCancel(),this.getDataList()},exportHandle:function(t){this.$http.get(this.urlOptions.exportUrl,{responseType:"blob"}).then((function(e){var a=e.data,r=new Date,i=r.getFullYear(),s=r.getMonth()+1,o=r.getDate();s>=1&&s<=9&&(s="0"+s),o>=0&&o<=9&&(o="0"+o);var n=i+"-"+s+"-"+o,d=new Blob([a]),l=document.createElement("a"),u=window.URL.createObjectURL(d);l.href=u,l.download="".concat(t+n,".xls"),document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(u)})).catch((function(){}))}}}},fc23:function(t,e,a){"use strict";var r=a("12cb"),i={sex:{0:"男",1:"女"},userStatus:{0:r["a"].t("user.status0"),1:r["a"].t("user.status1")},menuType:{0:r["a"].t("menu.type0"),1:r["a"].t("menu.type1")},logOperation:{0:r["a"].t("logLogin.operation0"),1:r["a"].t("logLogin.operation1")},logStatus:{0:r["a"].t("logLogin.status0"),1:r["a"].t("logLogin.status1")},scheduleStatus:{0:r["a"].t("schedule.status0"),1:r["a"].t("schedule.status1")}};e["a"]=function(t){return function(e){var a;return null===i||void 0===i||null===(a=i[t])||void 0===a?void 0:a[e]}}},ffd6:function(t,e,a){var r=a("3729"),i=a("1310"),s="[object Symbol]";function o(t){return"symbol"==typeof t||i(t)&&r(t)==s}t.exports=o}}]);