(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-06ce4ff3","chunk-004e11de","chunk-299d5891","chunk-2d0ab927"],{"145d":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("win-sm",{attrs:{title:t.setting.title,width:"800px",loading:t.loading},on:{close:t.close}},[r("el-alert",{staticStyle:{"margin-bottom":"10px"},attrs:{title:"温馨提示:用户初始密码为123456",type:"warning",closable:!1,"show-icon":""}}),t._v(" "),r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"当前机构"}},[r("el-input",{staticStyle:{width:"250px"},attrs:{disabled:""},model:{value:t.setting.tenantName,callback:function(e){t.$set(t.setting,"tenantName",e)},expression:"setting.tenantName"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"部门",prop:"sysDeptId"}},[r("el-select",{model:{value:t.formData.sysDeptId,callback:function(e){t.$set(t.formData,"sysDeptId",e)},expression:"formData.sysDeptId"}},t._l(t.deptmentOptions,(function(t,e){return r("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),r("el-form-item",{attrs:{label:"人员姓名",prop:"userName"}},[r("el-input",{staticStyle:{width:"250px"},attrs:{clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.userName,callback:function(e){t.$set(t.formData,"userName",e)},expression:"formData.userName"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"登录名",prop:"userCode"}},[r("el-input",{staticStyle:{width:"250px"},attrs:{clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.userCode,callback:function(e){t.$set(t.formData,"userCode",e)},expression:"formData.userCode"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"手机号",prop:"userPhone"}},[r("el-input",{staticStyle:{width:"250px"},attrs:{clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.userPhone,callback:function(e){t.$set(t.formData,"userPhone",e)},expression:"formData.userPhone"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"性别",prop:"sex"}},[r("el-radio-group",{model:{value:t.formData.sex,callback:function(e){t.$set(t.formData,"sex",e)},expression:"formData.sex"}},[r("el-radio",{attrs:{label:1,border:""}},[t._v("男")]),t._v(" "),r("el-radio",{attrs:{label:2,border:""}},[t._v("女")])],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"status"}},[r("el-radio-group",{model:{value:t.formData.status,callback:function(e){t.$set(t.formData,"status",e)},expression:"formData.status"}},[r("el-radio",{attrs:{label:1,border:""}},[t._v("启用")]),t._v(" "),r("el-radio",{attrs:{label:0,border:""}},[t._v("禁用")])],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"顺序号",prop:"seq"}},[r("el-input-number",{attrs:{clearable:"",min:1,max:99,"show-word-limit":""},model:{value:t.formData.seq,callback:function(e){t.$set(t.formData,"seq",e)},expression:"formData.seq"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"备注",prop:"remark"}},[r("el-input",{attrs:{type:"textarea",rows:3,maxlength:"100","show-word-limit":""},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"角色配置",prop:"roleSetting"}},[r("el-checkbox",{on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")]),t._v(" "),r("div",{staticStyle:{margin:"15px 0"}}),t._v(" "),r("el-checkbox-group",{on:{change:t.handleCheckedCitiesChange},model:{value:t.checkedList,callback:function(e){t.checkedList=e},expression:"checkedList"}},t._l(t.roleOptions,(function(e,n){return r("el-checkbox",{key:e.role_id,attrs:{label:e.role_id}},[t._v(t._s(e.role_name))])})),1)],1)],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)],1)},o=[],a=r("e694"),i=r("f6e8"),s=r("6f7e"),c=r("3528"),l=r("c24f"),u=r("8eb74");function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function h(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */h=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),s=new I(n||[]);return o(i,"_invoke",{value:O(t,r,s)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",y={};function b(){}function w(){}function x(){}var k={};l(k,i,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S($([])));_&&_!==r&&n.call(_,i)&&(k=_);var D=x.prototype=b.prototype=Object.create(k);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,s){var c=d(t[o],t,a);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==f(u)&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(u).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,s)}))}s(c.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=E(s,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?v:m,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=d(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function $(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:$(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function d(t,e,r,n,o,a,i){try{var s=t[a](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){d(a,n,o,i,s,"next",t)}function s(t){d(a,n,o,i,s,"throw",t)}i(void 0)}))}}var m={components:{winSm:a["a"],myButton:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){var t=this,e=function(e,r,n){t.checkedList.length<1?n(new Error("至少选择一个")):n()};return{deptmentOptions:[],loading:!0,checkAll:!1,checkedList:[],roleList:[{id:1,label:"王涵1"},{id:2,label:"王涵2"}],queryParams:{pageNum:1,pageSize:10,roleName:void 0,roleKey:void 0,status:void 0,orgId:1},roleOptions:[],roleCheckStrictly:!0,defaultProps:{children:"childList",label:"name"},formData:{sysDeptId:"",userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null},rules:{sysDeptId:[{required:!0,message:"请选择部门",trigger:"change"}],userName:[{required:!0,message:"请输入人员姓名",trigger:"blur"}],userCode:[{required:!0,message:"请输入登录名",trigger:"blur"}],userPhone:[{required:!0,message:"请输入手机号",trigger:"blur"}],sex:[{required:!0,message:"请选择性别",trigger:"change"}],seq:[{required:!0,message:"请输入顺序号",trigger:"blur"}],roleSetting:[{validator:e,required:!0,trigger:"blur"}]}}},created:function(){var t=p(h().mark((function t(){return h().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.title=this.setting.title,null==this.setting.id){t.next=4;break}return t.next=4,this.getInfo();case 4:return t.next=6,this.getAllRole();case 6:return t.next=8,this.getDeptmentOptions();case 8:this.loading=!1;case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{getAllRole:function(){var t=p(h().mark((function t(){var e=this;return h().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.data_scope=this.$store.getters.userInfo?this.$store.getters.userInfo.lv:"",t.next=3,c["k"]({dataScope:this.setting.data_scope}).then((function(t){e.roleOptions=t||[],e.loading=!1}));case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getDeptmentOptions:function(){var t=p(h().mark((function t(){var e=this;return h().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["d"])({tenantId:this.setting.tenantId}).then((function(t){e.deptmentOptions=t}));case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),handleCheckAllChange:function(t){this.checkedList=t?this.roleOptions.map((function(t){return t.role_id})):[]},handleCheckedCitiesChange:function(t){var e=t.length;this.checkAll=e===this.roleOptions.length},getInfo:function(){var t=p(h().mark((function t(){var e=this;return h().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.title=this.setting.title,t.next=3,l["h"]({id:this.setting.id}).then((function(t){var r=t.data;e.formData=Object.assign(e.formData,r),null!=e.formData.projectStart&&e.formData.projectStart>0&&(e.formData.projectStart=s["LongToDateTime"](e.formData.projectStart)),null!=e.formData.projectEnd&&e.formData.projectEnd>0&&(e.formData.projectEnd=s["LongToDateTime"](e.formData.projectEnd)),e.checkedList=t.list.map((function(t){return t.role_id})),t.list.length==e.roleOptions.length&&e.handleCheckedCitiesChange(t.list)}));case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),close:function(){this.formData={sysDeptId:"",userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null},this.$emit("close")},save:function(){var t=this;this.$refs.ruleForm.validate((function(e){if(e){var r=Object.assign({},t.formData);if(r.roleList=t.checkedList,r.tenantId=t.setting.tenantId,r.tenantCode=t.setting.tenantCode,0==r.ctiStatus&&(r.agentJid="",r.workgroupJid="",r.clientNumber="",r.clientPwd=""),null!=r.projectStart&&null!=r.projectEnd&&(r.projectStart=s["DateToLong"](r.projectStart),r.projectEnd=s["DateToLong"](r.projectEnd),r.projectStart>=r.projectEnd))return void t.$message.error("服务结束时间不能小于或者等于服务开始时间");if(null==r.projectStart&&null!=r.projectEnd||null!=r.projectStart&&null==r.projectEnd)return void t.$message.error("服务开始时间和服务结束时间必须成对出现");if(t.loading)return;t.loading=!0,r.id?l["k"](r).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})).catch((function(){t.loading=!1})):l["a"](r).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})).catch((function(){t.loading=!1}))}else t.$message.error("校验未通过,请检查。")}))},getWorkgroupsAll:function(){var t=this;callCenter.getWorkgroupsAll().then((function(e){t.workgroups=e.workgroups}))},getWorkgroupAgents:function(t){var e=this;this.formData.agentJid="",this.formData.clientNumber="",this.formData.clientPwd="",this.agentExtendEntiry.agentId="",this.formData.workgroupJid=this.workgroup.workgroupJID,callCenter.getWorkgroupAgents(t).then((function(t){e.agents=t.agents}))},onClickAgent:function(t){this.formData.agentJid=t.agentExtendEntiry.agentId,this.formData.clientNumber=t.agentExtendEntiry.ccClientNumber,this.formData.clientPwd=t.agentExtendEntiry.ccClientPWD}}},g=m,v=r("2877"),y=Object(v["a"])(g,n,o,!1,null,null,null);e["default"]=y.exports},"169e":function(t,e,r){"use strict";r.r(e),e["default"]=[{type:"text",dataIndex:"userName",label:"用户姓名",placeholder:"请输入",defaultValue:""},{type:"text",dataIndex:"userCode",label:"编号",placeholder:"请输入",defaultValue:""},{type:"select",dataIndex:"status",label:"状态",placeholder:"请选择",defaultValue:"1",options:[{label:"启用",value:"1"},{label:"禁用",value:"0"}]}]},"2a3d":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("win",{attrs:{title:t.setting.title,width:"800px",loading:t.loading},on:{close:t.close}},[r("el-form",{staticClass:"demo-ruleForm",attrs:{model:t.formData,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"角色配置",prop:"roleSetting"}},[r("el-checkbox",{on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")]),t._v(" "),r("div",{staticStyle:{margin:"15px 0"}}),t._v(" "),r("el-checkbox-group",{on:{change:t.handleCheckedCitiesChange},model:{value:t.checkedList,callback:function(e){t.checkedList=e},expression:"checkedList"}},t._l(t.roleOptions,(function(e,n){return r("el-checkbox",{key:e.role_id,attrs:{label:e.role_id}},[t._v(t._s(e.role_name))])})),1)],1)],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)],1)},o=[],a=r("f7d1"),i=r("f6e8"),s=r("3528"),c=r("c24f");function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),s=new I(n||[]);return o(i,"_invoke",{value:O(t,r,s)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",y={};function b(){}function w(){}function x(){}var k={};f(k,i,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S($([])));_&&_!==r&&n.call(_,i)&&(k=_);var D=x.prototype=b.prototype=Object.create(k);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,s){var c=d(t[o],t,a);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,s)}))}s(c.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var c=E(s,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?v:m,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=d(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function $(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:$(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function f(t,e,r,n,o,a,i){try{var s=t[a](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){f(a,n,o,i,s,"next",t)}function s(t){f(a,n,o,i,s,"throw",t)}i(void 0)}))}}var d={components:{win:a["a"],myButton:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,data_scope:null,checkAll:!1,checkedList:[],roleList:[{id:1,label:"王涵1"},{id:2,label:"王涵2"}],queryParams:{pageNum:1,pageSize:10,roleName:void 0,roleKey:void 0,status:0,orgId:1},roleOptions:[],roleCheckStrictly:!0,defaultProps:{children:"childList",label:"name"},formData:{userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null}}},created:function(){var t=h(u().mark((function t(){return u().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.title=this.setting.title,null==this.setting.id){t.next=4;break}return t.next=4,this.getInfo();case 4:return t.next=6,this.getAllRole();case 6:this.loading=!1;case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{getAllRole:function(){var t=h(u().mark((function t(){var e=this;return u().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.data_scope=this.$store.getters.userInfo?this.$store.getters.userInfo.lv:"",t.next=3,s["k"]({dataScope:this.setting.data_scope}).then((function(t){e.roleOptions=t||[],e.loading=!1}));case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),handleCheckAllChange:function(t){this.checkedList=t?this.roleOptions.map((function(t){return t.role_id})):[]},handleCheckedCitiesChange:function(t){var e=t.length;this.checkAll=e===this.roleOptions.length},getInfo:function(){var t=h(u().mark((function t(){var e=this;return u().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,c["h"]({id:this.setting.id}).then((function(t){var r=t.data;e.formData=Object.assign(e.formData,r),e.checkedList=t.list.map((function(t){return t.role_id})),t.list.length===e.roleOptions.length&&e.handleCheckedCitiesChange(t.list)}));case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),close:function(){this.formData={userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null},this.$emit("close")},save:function(){var t=this,e=Object.assign({},this.formData);if(e.roleList=this.checkedList,e.id){if(this.loading)return;this.loading=!0,c["m"](e).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})).catch((function(){t.loading=!1}))}}}},p=d,m=r("2877"),g=Object(m["a"])(p,n,o,!1,null,null,null);e["default"]=g.exports},3528:function(t,e,r){"use strict";r.d(e,"j",(function(){return o})),r.d(e,"k",(function(){return a})),r.d(e,"i",(function(){return i})),r.d(e,"a",(function(){return s})),r.d(e,"m",(function(){return c})),r.d(e,"g",(function(){return l})),r.d(e,"f",(function(){return u})),r.d(e,"h",(function(){return f})),r.d(e,"b",(function(){return h})),r.d(e,"l",(function(){return d})),r.d(e,"c",(function(){return p})),r.d(e,"d",(function(){return m})),r.d(e,"e",(function(){return g}));var n=r("b775");function o(t){return Object(n["a"])({url:"/system/role/list",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/pc/fin/sys/server/selectByDataScope",method:"get",params:t})}function i(t){return Object(n["a"])({url:"/system/role/view/"+t,method:"get"})}function s(t){return Object(n["a"])({url:"/system/role/add",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/system/role/edit",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/system/role/dataScope",method:"put",data:t})}function u(t){return Object(n["a"])({url:"/system/role/edit",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/system/role/remove/"+t,method:"get"})}function h(t){return Object(n["a"])({url:"/system/role/select/authUser/allocatedList",method:"get",params:t})}function d(t){return Object(n["a"])({url:"/system/role/select/authUser/unallocatedList",method:"get",params:t})}function p(t){return Object(n["a"])({url:"/system/role/select/authUser/cancel",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/system/role/authUser/cancelAll",method:"post",params:t})}function g(t){return Object(n["a"])({url:"/system/role/select/authUser/all",method:"post",params:t})}},"433d":function(t,e,r){"use strict";var n=r("c559"),o={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};e["a"]=o},"43d4":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("div",{staticClass:"app-container"},[r("el-row",{attrs:{gutter:15}},[r("el-col",{attrs:{span:5}},[r("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[r("my-tree",{ref:"searchTree",attrs:{"tree-list":t.treeDataList},on:{setNode:t.nodeClick,search:t.search}})],1)],1),t._v(" "),r("el-col",{attrs:{span:19}},[r("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:t.items},on:{search:t.fifterForm}})],1),t._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:t.filterFrom,table:t.table}})],1)],1)],1)],1)],1),t._v(" "),t.editSetting.show?r("edit",{attrs:{setting:t.editSetting},on:{close:function(e){t.editSetting.show=!1},search:t.search}}):t._e(),t._v(" "),t.editRoleSetting.show?r("editRole",{attrs:{setting:t.editRoleSetting},on:{close:function(e){t.editRoleSetting.show=!1},search:t.search}}):t._e()],1)},o=[],a=r("befe"),i=r("80cb"),s=r("f6e8"),c=r("433d"),l=r("169e"),u=r("145d"),f=r("2a3d"),h=r("6ec5"),d=r("c24f"),p=(r("6f7e"),{name:"index",components:{MyButton:s["a"],MyTableV2:i["a"],myTree:a["a"],edit:u["default"],editRole:f["default"]},data:function(){var t=this;return{items:l["default"],treeDataList:[],filterFrom:{tenantCode:null,userName:null,userCode:null},curOrgId:null,tenantId:null,tenantCode:null,tenantName:null,data_scope:0,editSetting:{title:"",id:"",tenantId:"",show:!1},editRoleSetting:{title:"",data_scope:0,id:"",show:!1},table:{showIndex:!0,expand:!1,url:c["a"].apiBaseURL+"/pc/fin/sys/tenant/user/select/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"新增",click:function(){t.showAdd(null)}}]},columns:[{title:"人员姓名",field:"userName",align:"left",minWidth:140},{title:"登录名",field:"userCode",align:"left",minWidth:140},{title:"手机号",field:"userPhone",align:"center",width:110},{title:"所属机构",field:"tenantName",align:"center",minWidth:150},{title:"部门",field:"sysDeptName",align:"center"},{field:"status",title:"状态",align:"center",width:80,switch:function(e){var r={};return 1==e.status?Object.assign(r,{value:!0,label:"启用",click:function(){t.updState(e)}}):Object.assign(r,{value:!1,label:"禁用",click:function(){t.updState(e)}}),r}}],operation:{show:!0,width:"250",attr:[{title:"角色",events:function(e){t.showEditRole(e.id)}},{title:"编辑",events:function(e){t.showAdd(e.id)}},{title:"密码初始化",events:function(e){t.updPassWord(e)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){this.initTreeData(),this.data_scope=this.$store.getters.userInfo?this.$store.getters.userInfo.lv:"",0===this.data_scope&&(this.data_scope=1),this.editSetting.data_scope=this.data_scope,this.editRoleSetting.data_scope=this.data_scope},methods:{importUser:function(){var t=this;this.importSetting.dialogShow=!0,this.importSetting.onSuccess=function(e,r){1===e.code?(t.$message.success(e.msg),t.search(1)):t.$message.warning(e.msg),r()}},initTreeData:function(){var t=this;h["l"]().then((function(e){var r=e||[];t.treeDataList.splice(0,t.treeDataList.length),t.treeDataList=r,t.treeDataList&&t.treeDataList.length>0&&(t.tenantId=t.treeDataList[0].id,t.tenantName=t.treeDataList[0].label,t.tenantCode=t.treeDataList[0].code)}))},updState:function(t){var e=this,r=0===t.status?"启用":"禁用";e.$modal.confirm("确认要"+r+'"'+t.userName+'"吗?').then((function(){var n=Object.assign({},t);n.status=1===t.status?0:1,d["p"](n).then((function(n){n&&(t.status=1===t.status?0:1,e.$modal.msgSuccess(r+"成功"))}))}))},nodeClick:function(t){t=t||{},this.p=Object.assign({},{id:t.id,name:t.name,code:t.code,lv:t.lv});var e=Number(this.data_scope)+(t.lv-1);void 0!=this.p.code&&null!=this.p.code?(this.filterFrom.tenantCode=this.p.code,this.tenantId=this.p.id,this.tenantName=this.p.name,this.editSetting.tenantCode=this.p.code,this.editSetting.data_scope=e,this.editRoleSetting.data_scope=e):this.filterFrom.tenantCode=0,this.table.paging.page.pageNum=1,this.search(1)},updPassWord:function(t){var e=this;this.$modal.confirm('是否确认初始化名称为"'+t.userName+'"的密码?').then((function(){d["l"](t).then((function(t){}))})).then((function(t){e.$modal.confirm("初始化密码成功,新密码为:123456").then((function(t){})).catch((function(){})),e.search()})).catch((function(){}))},search:function(t){void 0!=t?this.$refs.myTable.search({pageNum:t}):this.$refs.myTable.search()},fifterForm:function(t){this.filterFrom=Object.assign(this.filterFrom,t),this.search()},showAdd:function(t){var e="添加";null!=t&&(e="编辑"),this.tenantName?(this.editSetting.tenantId=this.tenantId,this.editSetting.tenantName=this.tenantName,this.editSetting.id=t,this.editSetting.title=e,this.editSetting.show=!0):this.$message.warning("请选择您要添加人员的机构!")},del:function(t){var e=this;t.isDelete=0,this.$modal.confirm('是否要删除"'+t.userName+'"的账号?').then((function(){d["p"](t).then((function(t){}))})).then((function(t){e.$message.success("删除成功!"),e.search()})).catch((function(){}))},showEditRole:function(t){var e="添加";null!=t&&(e="编辑角色"),this.editRoleSetting.id=t,this.editRoleSetting.title=e,this.editRoleSetting.show=!0},reset:function(){this.filterFrom.tenantCode=null,this.filterFrom.userName=null,this.filterFrom.userCode=null,this.filterFrom.status=1,this.search(1)}}}),m=p,g=r("2877"),v=Object(g["a"])(m,n,o,!1,null,"ff5ab22c",null);e["default"]=v.exports},"6ec5":function(t,e,r){"use strict";r.d(e,"l",(function(){return a})),r.d(e,"a",(function(){return i})),r.d(e,"g",(function(){return s})),r.d(e,"c",(function(){return c})),r.d(e,"j",(function(){return l})),r.d(e,"f",(function(){return u})),r.d(e,"d",(function(){return f})),r.d(e,"e",(function(){return h})),r.d(e,"p",(function(){return d})),r.d(e,"n",(function(){return p})),r.d(e,"m",(function(){return m})),r.d(e,"k",(function(){return g})),r.d(e,"s",(function(){return v})),r.d(e,"r",(function(){return y})),r.d(e,"q",(function(){return b})),r.d(e,"o",(function(){return w})),r.d(e,"b",(function(){return x})),r.d(e,"i",(function(){return k})),r.d(e,"h",(function(){return S}));var n=r("b775"),o=r("433d");function a(t){return n["a"].get(o["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:t})}function i(t){return Object(n["a"])({url:"/pc/base/category/add",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/pc/base/category/edit",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/pc/base/warehouse/add",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/pc/base/warehouse/edit",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/pc/base/warehouse/del",method:"delete",data:t})}function f(){return Object(n["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function h(t){return Object(n["a"])({url:"/pc/base/category/del",method:"delete",data:t})}function d(t){return Object(n["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:t})}function p(t){return Object(n["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:t})}function m(t){return Object(n["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:t})}function g(t){return n["a"].get(o["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function v(t){return Object(n["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:t})}function y(t){return Object(n["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:t})}function b(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:t})}function w(t){return Object(n["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:t})}function x(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:t})}function k(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:t})}function S(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:t})}},"6f7e":function(t,e,r){"use strict";function n(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString().replace(/\s/g,"").replace(/-/g,"").replace(/:/g,"");return e}function o(t){return("00"+t).substr(t.length)}function a(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),r=e.slice(0,4),n=e.slice(4,6),o=e.slice(6,8),a=e.slice(8,10),i=e.slice(10,12),s=e.slice(12,14),c=r+"-"+n+"-"+o+" "+a+":"+i+":"+s;return c}function i(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),r=e.slice(0,4),n=e.slice(4,6),o=e.slice(6,8),a=r+"-"+n+"-"+o;return a}function s(t,e){try{t instanceof Date||(t=new Date(t)),void 0!=e&&""!=e||(e="yyyy-MM-dd hh:mm:ss"),/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in r)if(new RegExp("(".concat(n,")")).test(e)){var a=r[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:o(a))}return e}catch(i){return"-"}}function c(){var t=new Date,e=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),i=t.getSeconds().toString().padStart(2,"0");return"".concat(e,"-").concat(r,"-").concat(n," ").concat(o,":").concat(a,":").concat(i)}function l(){var t=new Date,e=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0");return"".concat(e,"-").concat(r,"-").concat(n)}function u(t){if(t){t instanceof Date||(t=new Date(t.replace(/-/g,"/")));var e=t.getTime(),r=6e4,n=60*r,o=24*n,a=7*o,i=30*o,s=(new Date).getTime(),c=s-e;if(!(c<0)){var l=c/r,u=c/n,f=c/o,h=c/a,d=c/i,p="";if(d>=1&&d<=3)p=" "+parseInt(d)+"月前";else if(h>=1&&h<=3)p=" "+parseInt(h)+"周前";else if(f>=1&&f<=6)p=" "+parseInt(f)+"天前";else if(u>=1&&u<=23)p=" "+parseInt(u)+"小时前";else if(l>=1&&l<=59)p=" "+parseInt(l)+"分钟前";else if(c>=0&&c<=r)p="刚刚";else{var m=new Date;m.setTime(e);var g=m.getFullYear(),v=m.getMonth()+1<10?"0"+(m.getMonth()+1):m.getMonth()+1,y=m.getDate()<10?"0"+m.getDate():m.getDate();m.getHours()<10?m.getHours():m.getHours(),m.getMinutes()<10?m.getMinutes():m.getMinutes(),m.getSeconds()<10?m.getSeconds():m.getSeconds();p=g+"-"+v+"-"+y}return p}}}r.r(e),r.d(e,"DateToLong",(function(){return n})),r.d(e,"LongToDateTime",(function(){return a})),r.d(e,"LongToDate",(function(){return i})),r.d(e,"formatDate",(function(){return s})),r.d(e,"formattedDate",(function(){return c})),r.d(e,"formattedDateDuan",(function(){return l})),r.d(e,"timeago",(function(){return u}))},"8eb74":function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return s}));var n=r("b775");function o(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/department/add",method:"post",data:t})}function a(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/department/edit",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/department/detail",method:"get",params:t})}function s(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/department/list/all",method:"get",params:t})}}}]);