chunk-commons.a699b2b3.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-commons"],{"095c":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-upload",{staticClass:"avatar-uploader quill-img",attrs:{action:e.uploadImgUrl,name:"file",headers:e.headers,"show-file-list":!1,"on-success":e.quillImgSuccess,"on-error":e.uploadError,"before-upload":e.quillImgBefore,accept:".jpg,.jpeg,.png,.gif"}}),i("quill-editor",{ref:"quillEditor",staticClass:"editor",attrs:{options:e.editorOption},on:{blur:function(t){return e.onEditorBlur(t)},focus:function(t){return e.onEditorFocus(t)},change:function(t){return e.onEditorChange(t)}},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}})],1)},s=[],r=i("ade3"),o=(i("c5f6"),i("5f87")),a=i("953d"),c=(i("a753"),i("8096"),i("14e1"),[["bold","italic","underline","strike"],["blockquote","code-block"],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{align:[]}],["clean"],["link","image","video"]]),l={props:{value:{type:String},maxSize:{type:Number,default:4e3}},components:{quillEditor:a["quillEditor"]},data:function(){var e,t;return t={content:this.value,uploadImgUrl:"",editorOption:(e={placeholder:"",theme:"snow"},Object(r["a"])(e,"placeholder","请输入内容"),Object(r["a"])(e,"modules",{toolbar:{container:c,handlers:{image:function(e){e?document.querySelector(".quill-img input").click():this.quill.format("image",!1)}}}}),e)},Object(r["a"])(t,"uploadImgUrl","/prod-api/common/upload"),Object(r["a"])(t,"headers",{Authorization:"Bearer "+Object(o["a"])()}),t},watch:{value:function(){this.content=this.value}},methods:{onEditorBlur:function(){},onEditorFocus:function(){},onEditorChange:function(){this.$emit("input",this.content)},quillImgBefore:function(e){var t=e.type;return"image/jpeg"===t||"image/png"===t||(this.$message.error("请插入图片类型文件(jpg/jpeg/png)"),!1)},quillImgSuccess:function(e,t){var i=this.$refs.quillEditor.quill;if(200==e.code){var n=i.getSelection().index;i.insertEmbed(n,"image",e.url),i.setSelection(n+1)}else this.$message.error("图片插入失败")},uploadError:function(){this.$message.error("图片插入失败")}}},u=l,h=(i("4ff4"),i("2877")),d=Object(h["a"])(u,n,s,!1,null,null,null);t["a"]=d.exports},"4ff4":function(e,t,i){"use strict";i("8243")},"6ce7":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-row",{staticStyle:{padding:"10px",margin:"0px","background-color":"#ECECEC","min-height":"545px",overflow:"auto"},attrs:{gutter:20}},[i("el-col",{staticStyle:{"padding-right":"10px","max-height":"614px",overflow:"auto","border-right":"3px solid #eee"},attrs:{span:6,xs:24}},[i("el-card",{staticClass:"box-card",staticStyle:{display:"none"}},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[e._v("组织机构")]),i("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(t){return e.clickLeft("0")}}},[i("i",{class:{"el-icon-arrow-down":!e.showOrgan,"el-icon-arrow-up":e.showOrgan}})])],1),i("div",{directives:[{name:"show",rawName:"v-show",value:e.showOrgan,expression:"showOrgan"}]}),i("div",{directives:[{name:"show",rawName:"v-show",value:!e.showOrgan,expression:"!showOrgan"}]},[e._v("点击右上角图标展开")])]),i("el-card",{staticClass:"box-card",staticStyle:{display:"none"}},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[e._v("常用联系人")]),i("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(t){return e.clickLeft("1")}}},[i("i",{class:{"el-icon-caret-bottom":!e.showContact,"el-icon-caret-top":e.showContact}})])],1),i("div",{directives:[{name:"show",rawName:"v-show",value:e.showContact,expression:"showContact"}]}),i("div",{directives:[{name:"show",rawName:"v-show",value:!e.showContact,expression:"!showContact"}]},[e._v("点击右上角图标展开")])]),i("el-tabs",{attrs:{type:"border-card"}},[i("el-tab-pane",{attrs:{label:"组织机构"}},[i("el-tree",{ref:"tree",attrs:{data:e.deptOptions,"node-key":"id",props:e.defaultProps,"expand-on-click-node":!1,"filter-node-method":e.filterNode,"default-expand-all":""},on:{"node-click":e.handleNodeClick}})],1),i("el-tab-pane",{attrs:{label:"常用联系人"}},[i("el-tree",{ref:"tree",attrs:{data:e.contactsOptions,"node-key":"id",props:e.defaultProps,"expand-on-click-node":!1,"filter-node-method":e.filterNode,"default-expand-all":"","show-checkbox":""},on:{"node-click":e.contactsNodeClick,"check-change":e.handleCheck2}})],1)],1),i("p",{staticStyle:{"padding-top":"20px","text-align":"center"}},[e._v("已选择 "),i("span",{staticStyle:{color:"red"}},[e._v(e._s(e.userIdsArr.length)+" ")]),e._v("人")])],1),i("el-col",{staticStyle:{padding:"10px","background-color":"#fff","min-height":"525px"},attrs:{span:18,xs:24}},[i("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{label:"用户名称",prop:"nickName"}},[i("el-input",{staticStyle:{width:"240px"},attrs:{placeholder:"请输入用户名称",clearable:"",size:"small","suffix-icon":"el-icon-search"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.nickName,callback:function(t){e.$set(e.queryParams,"nickName",t)},expression:"queryParams.nickName"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),i("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"userList",attrs:{data:e.userList,"row-key":"userName"},on:{select:e.handleSelection,"select-all":e.selectAll,"selection-change":e.handleSelectionChange,"row-click":e.handleCurrentChange}},[i("el-table-column",{attrs:{type:"selection",width:"50",align:"center"}}),i("el-table-column",{attrs:{label:"用户账号",align:"center",prop:"userName","show-overflow-tooltip":!0}}),i("el-table-column",{attrs:{label:"用户名称",align:"center",prop:"nickName","show-overflow-tooltip":!0}}),i("el-table-column",{attrs:{label:"部门",align:"center",prop:"dept.deptName","show-overflow-tooltip":!0}}),i("el-table-column",{attrs:{label:"岗位",align:"center",prop:"posts","show-overflow-tooltip":!0}}),i("el-table-column",{attrs:{label:"手机号码",align:"center",prop:"phonenumber",width:"120"}})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1)],1)},s=[],r=(i("6762"),i("2fdb"),i("28a5"),i("c0c7")),o=i("fcb7"),a=i("ca17"),c=i.n(a),l=(i("542c"),i("7988")),u={name:"index",components:{Treeselect:c.a},props:["userIds"],data:function(){return{viewFlag:"1",seledate:null,userIdsArr:[],selectInput:"",arrID:[],multipleSelection:null,names:[],accounts:[],total:0,userList:null,deptOptions:void 0,defaultProps:{children:"children",label:"label"},showOrgan:!0,showContact:!1,queryParams:{pageNum:1,pageSize:10,userName:void 0,phonenumber:void 0,status:0,deptId:void 0,groupId:void 0},contactsOptions:void 0}},watch:{userIds:{immediate:!0,handler:function(){""!=this.userIds?this.userIdsArr=this.userIds.split(","):this.userIdsArr=[]}}},created:function(){this.getList(),this.getTreeselect(),""!=this.userIds?this.userIdsArr=this.userIds.split(","):this.userIdsArr=[],this.getContactsTree()},methods:{getList:function(){var e=this;"1"==this.viewFlag?(this.loading=!0,Object(r["h"])(this.addDateRange(this.queryParams,this.dateRange)).then((function(t){e.userList=t.rows,e.total=t.total,e.loading=!1,e.$nextTick((function(){this.checked(this.userIds)}))}))):this.getContactsList(this.seledate.id)},getTreeselect:function(){var e=this;Object(o["g"])().then((function(t){e.deptOptions=t.data}))},filterNode:function(e,t){return!e||-1!==t.label.indexOf(e)},handleNodeClick:function(e){this.viewFlag="1",this.queryParams.deptId=e.id,this.getList()},handleQuery:function(){this.queryParams.page=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},selectAll:function(e){if(e.length>0);else for(var t=0;t<this.userList.length;t++)this.$emit("removeFunction",this.userList[t].userName,this.userList[t].nickName)},handleSelection:function(e,t){this.userIdsArr.includes(t.userName)?this.$emit("removeFunction",t.userName,t.nickName):console.log(t.userName+"不存在")},handleSelectionChange:function(e){this.names=e.map((function(e){return e.nickName})),this.accounts=e.map((function(e){return e.userName})),this.$emit("fatherFunction",this.accounts.join(","),this.names.join(","))},handleCurrentChange:function(e,t,i){var n=!1;if(this.userIdsArr.length>0){for(var s=0;s<this.userIdsArr.length;s++)if(this.userIdsArr[s]==e.userName){n=!0;break}1==n?(this.$refs.userList.toggleRowSelection(e,!1),this.$emit("removeFunction",e.userName,e.nickName)):(this.$refs.userList.toggleRowSelection(e,!0),this.$emit("fatherFunction",e.userName,e.nickName))}else this.$refs.userList.toggleRowSelection(e,!0),this.$emit("fatherFunction",e.userName,e.nickName)},checked:function(e){var t=[];t=e.split(",");for(var i=0;i<this.userList.length;i++)for(var n=0;n<t.length;n++)t[n]==this.userList[i].userName&&this.$refs.userList.toggleRowSelection(this.userList[i],!0)},getContactsTree:function(){var e=this;Object(l["h"])().then((function(t){e.contactsOptions=t.data}))},getContactsList:function(e){var t=this;this.loading=!0,Object(l["e"])(e,this.addDateRange(this.queryParams,this.dateRange)).then((function(e){t.userList=e.rows,t.total=e.total,t.loading=!1}))},contactsNodeClick:function(e){this.viewFlag="2",this.resetForm("queryForm"),this.queryParams.page=1,this.seledate=e,this.getContactsList(e.id)},handleCheck:function(e,t){var i=this;Object(l["d"])(e.id).then((function(e){var n=e.data;t?i.$nextTick((function(){this.checked(n.accounts)})):i.checkCancle(n.accounts)}))},handleCheck2:function(e,t){var i=this;this.loading=!0,this.queryParams.groupId=e.id,Object(l["f"])(e.id,this.addDateRange(this.queryParams,this.dateRange)).then((function(e){i.userList=e.rows,i.total=e.total,i.loading=!1,i.$nextTick((function(){for(var e=0;e<this.userList.length;e++)t?this.$refs.userList.toggleRowSelection(this.userList[e],!0):(this.$refs.userList.toggleRowSelection(this.userList[e],!1),this.$emit("removeFunction",this.userList[e].userName,this.userList[e].nickName))}))}))},handleCheck1:function(e,t){console.log("check事件开始"),console.log(e),console.log(t),console.log("check事件结束")},checkCancle:function(e){var t=[];t=e.split(",");for(var i=0;i<this.userList.length;i++)for(var n=0;n<t.length;n++)t[n]==this.userList[i].userName&&(this.$refs.userList.toggleRowSelection(this.userList[i],!1),this.$emit("removeFunction",this.userList[i].userName,this.userList[i].nickName))},clickLeft:function(e){"0"==e&&(this.showOrgan=!this.showOrgan),"1"==e&&(this.showContact=!this.showContact)}}},h=u,d=(i("d24f"),i("2877")),p=Object(d["a"])(h,n,s,!1,null,null,null);t["a"]=p.exports},"7e36":function(e,t,i){},"7f56":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:this.title,visible:e.childOpen,width:"1100px","append-to-body":"","destroy-on-close":!0},on:{"update:visible":function(t){e.childOpen=t}}},[this.open?i("SelectRen",{ref:"renlist",attrs:{userIds:e.receiverAccount},on:{fatherFunction:e.selectChange,removeFunction:e.removeSelectuser}}):e._e(),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.cancel}},[e._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:e.submitRen}},[e._v("选 定")])],1)],1)},s=[],r=(i("6762"),i("2fdb"),i("28a5"),i("6ce7")),o={name:"selectUserByDept",components:{SelectRen:r["a"]},props:["title","open","inputAccount","inputName"],data:function(){return{childOpen:!1,receiverName:"",receiverAccount:""}},created:function(){this.receiverAccount=this.inputAccount,this.receiverName=this.inputName},methods:{cancel:function(){this.filterText="",this.receiverAccount=this.inputAccount,this.receiverName=this.inputName,this.childOpen=!1},submitRen:function(){this.$emit("ok",this.receiverAccount,this.receiverName),this.childOpen=!1},selectChange:function(e,t){var i=[],n=[];""!=this.receiverAccount&&(i=this.receiverAccount.split(",")),""!=this.receiverName&&(n=this.receiverName.split(","));var s=[],r=[];""!=e&&(s=e.split(",")),""!=t&&(r=t.split(","));for(var o=0,a=s.length;o<a;o++)i.includes(s[o])||(i.push(s[o]),n.push(r[o]));this.receiverAccount=i.join(","),this.receiverName=n.join(","),console.log(this.receiverName)},removeSelectuser:function(e,t){for(var i=this.receiverAccount.split(","),n=this.receiverName.split(","),s=0;s<i.length;s++)if(i[s]==e){i.splice(s,1),n.splice(s,1);break}this.receiverAccount=i.join(","),this.receiverName=n.join(",")}},watch:{open:function(e){this.childOpen=this.open},inputAccount:function(e){this.receiverAccount=this.inputAccount,this.receiverName=this.inputName}}},a=o,c=i("2877"),l=Object(c["a"])(a,n,s,!1,null,null,null);t["a"]=l.exports},8243:function(e,t,i){},d24f:function(e,t,i){"use strict";i("7e36")}}]);