Commit 54dec365 by 王勇飞

Merge branch 'gsb-center-manage' of gitlab.gongsibao.com:jiangyong/zhichan into gsb-center-manage

parents de2de96e 7d87220a
......@@ -8,59 +8,64 @@ class CompanyCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(CompanyCtl));
}
async update(p,q,req){
let u= await super.update(p,q,req)
//缓存失效
await this.cacheManager["CompanyCache"].invalidate(p.companykey)
let company=await this.cacheManager["CompanyCache"].cache(p.companykey)
return system.getResult(company)
async update (p, q, req) {
let u = await super.update(p, q, req)
//缓存失效
await this.cacheManager["CompanyCache"].invalidate(p.companykey)
let company = await this.cacheManager["CompanyCache"].cache(p.companykey)
return system.getResult(company)
}
async getMyApps(p,q,req){
async getMyApps (p, q, req) {
let userfind = await this.cacheManager["UserCache"].cache(p.username)
let isSuper=userfind.isSuper
if(userfind.company.appids && userfind.company.appids!=""){
let appsarray=userfind.company.appids.split(",")
let appidsquery=appsarray.map(astr=>{
return astr.split("|")[0]
let isSuper = userfind.isSuper
if (userfind.company.appids && userfind.company.appids != "") {
let appsarray = userfind.company.appids.split(",")
let appidsquery = appsarray.map(astr => {
return astr.split("|")[0]
})
let apps=await this.service.getMyApps(appidsquery,isSuper)
let apps = await this.service.getMyApps(appidsquery, isSuper)
return system.getResult(apps)
}else{
} else {
return []
}
}
async bindApps(p,q,req){
let appids=p.appids
let cmpid=p.postcmpid
let appids2=appids.map(item=>{
return item.appid+"|"+item.title
})
let appidstrs=appids2.join(",")
await this.service.bindApps(appidstrs,cmpid)
async bindApps (p, q, req) {
let appids = p.appids
let cmpid = p.postcmpid
let appids2 = appids.map(item => {
return item.appid + "|" + item.title
})
let appidstrs = appids2.join(",")
await this.service.bindApps(appidstrs, cmpid)
return system.getResult(appids)
}
async setOrgs(p,q,req){
async setOrgs (p, q, req) {
//let companynew=await this.service.findById(p.company_id)
let orgs=await this.service.setOrgs(p)
let orgs = await this.service.setOrgs(p)
return system.getResult(orgs)
}
async getOrgs(p,q,req){
}
async getOrgs (p, q, req) {
//let companynew=await this.cacheManager["CompanyCache"].cache(req.xctx.fromcompanykey)
let companynew=await this.service.findById(p.company_id)
let orgjsonstr=companynew.orgJson
let rtnjson=null
if(orgjsonstr && orgjsonstr!=""){
rtnjson=JSON.parse(companynew.orgJson)
}else{
rtnjson=[]
let companynew = await this.service.findById(p.company_id)
let orgjsonstr = companynew.orgJson
let rtnjson = null
if (orgjsonstr && orgjsonstr != "") {
rtnjson = JSON.parse(companynew.orgJson)
} else {
rtnjson = []
}
return system.getResult({orgJson:rtnjson})
}
return system.getResult({ orgJson: rtnjson })
}
async getWatchOrgNodes (p, q, req) {
let wns = await this.service.getWatchOrgNodes(p.company_id)
return wns
}
async refQuery(pobj, qobj, req) {
let rtn=await this.service.refQuery(pobj);
async refQuery (pobj, qobj, req) {
let rtn = await this.service.refQuery(pobj);
return rtn
}
}
module.exports = CompanyCtl;
......@@ -100,6 +100,12 @@ class AliHandler {
"currentStatus": "isClosed"
}
break
case "followingUp":
stau = {
"businessMode": actionBody.intentionBizId,
"currentStatus": "followingUp"
}
break
default:
return system.getResultError("status 状态值错误");
}
......
......@@ -31,6 +31,32 @@ class CompanyService extends ServiceBase {
return appids
})
}
buildNoPositionNode (treejson, rtnArray) {
treejson.forEach((n) => {
if (n.children) {
this.buildNoPositionNode(n.children, rtnArray)
}
if (typeof n.isPosition == "undefined") {
rtnArray.push(n)
} else {
if (!n.isPosition) {
rtnArray.push(n)
}
}
})
}
async getWatchOrgNodes (cmid) {
let rtn = []
let companynew = await this.findById(cmid)
let orgjsonstr = companynew.orgJson
if (orgjsonstr && orgjsonstr != "") {
let treejson = JSON.parse(companynew.orgJson)
this.buildNoPositionNode(treejson, rtn)
}
return rtn
}
async setOrgs (p, cmk) {
var self = this
let curNodeData = p.curdata
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-175acaff.7a825095.css rel=prefetch><link href=/css/chunk-1b756945.9e7173ae.css rel=prefetch><link href=/css/chunk-21b5182a.6e6ae301.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-34953cb0.71e3d438.css rel=prefetch><link href=/css/chunk-480215f6.84fd9662.css rel=prefetch><link href=/css/chunk-5ccefbbb.9e7173ae.css rel=prefetch><link href=/css/chunk-61b0b1e5.9e7173ae.css rel=prefetch><link href=/css/chunk-8e32057a.e8e9a917.css rel=prefetch><link href=/css/chunk-e7e51fa0.9e7173ae.css rel=prefetch><link href=/css/chunk-ff3eaeb0.9e7173ae.css rel=prefetch><link href=/js/chunk-0109d85c.d8a39ef0.js rel=prefetch><link href=/js/chunk-037694a5.a74514c3.js rel=prefetch><link href=/js/chunk-0aa2a834.9028f9e8.js rel=prefetch><link href=/js/chunk-137dcf78.d8fcc61f.js rel=prefetch><link href=/js/chunk-14b9857b.35e42781.js rel=prefetch><link href=/js/chunk-15d6294e.42eb4739.js rel=prefetch><link href=/js/chunk-175acaff.ca3f7e65.js rel=prefetch><link href=/js/chunk-1792c498.4841b7fc.js rel=prefetch><link href=/js/chunk-1a0615f2.370fcaf1.js rel=prefetch><link href=/js/chunk-1b756945.d840b734.js rel=prefetch><link href=/js/chunk-21b5182a.74708748.js rel=prefetch><link href=/js/chunk-22347577.2275ebec.js rel=prefetch><link href=/js/chunk-24a41303.88feac34.js rel=prefetch><link href=/js/chunk-25d9ab36.087a7b9f.js rel=prefetch><link href=/js/chunk-2aeda6fa.2bd11851.js rel=prefetch><link href=/js/chunk-2b3066fa.372380fb.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.ca1865db.js rel=prefetch><link href=/js/chunk-2d0e68e0.1a313c84.js rel=prefetch><link href=/js/chunk-2d0efc5d.662e1339.js rel=prefetch><link href=/js/chunk-2d20828f.7627562b.js rel=prefetch><link href=/js/chunk-3385141a.a6e1a986.js rel=prefetch><link href=/js/chunk-34953cb0.2fc03dd6.js rel=prefetch><link href=/js/chunk-3a0bcea0.192dd1cf.js rel=prefetch><link href=/js/chunk-477a8e91.c522ef77.js rel=prefetch><link href=/js/chunk-480215f6.5b09744b.js rel=prefetch><link href=/js/chunk-4b58f216.e79a0ff7.js rel=prefetch><link href=/js/chunk-5ccefbbb.0f021a99.js rel=prefetch><link href=/js/chunk-5e7b929d.9e85be22.js rel=prefetch><link href=/js/chunk-61b0b1e5.322b588f.js rel=prefetch><link href=/js/chunk-65e97401.3b9c7780.js rel=prefetch><link href=/js/chunk-8e32057a.5b0635fd.js rel=prefetch><link href=/js/chunk-9947983a.dea0cc2e.js rel=prefetch><link href=/js/chunk-e7e51fa0.c45982a9.js rel=prefetch><link href=/js/chunk-ff3eaeb0.d3d1af72.js rel=prefetch><link href=/css/app.4189c8e8.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.96b005b6.js rel=preload as=script><link href=/js/chunk-vendors.9ae5f635.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.4189c8e8.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.9ae5f635.js></script><script src=/js/app.96b005b6.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-175acaff.d8eef113.css rel=prefetch><link href=/css/chunk-1b756945.9e7173ae.css rel=prefetch><link href=/css/chunk-21b5182a.6e6ae301.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-3f4029e7.84fd9662.css rel=prefetch><link href=/css/chunk-5ccefbbb.9e7173ae.css rel=prefetch><link href=/css/chunk-61b0b1e5.9e7173ae.css rel=prefetch><link href=/css/chunk-738a8724.71e3d438.css rel=prefetch><link href=/css/chunk-8e32057a.e8e9a917.css rel=prefetch><link href=/css/chunk-e7e51fa0.9e7173ae.css rel=prefetch><link href=/css/chunk-ff3eaeb0.9e7173ae.css rel=prefetch><link href=/js/chunk-0109d85c.d8a39ef0.js rel=prefetch><link href=/js/chunk-037694a5.a74514c3.js rel=prefetch><link href=/js/chunk-0aa2a834.9028f9e8.js rel=prefetch><link href=/js/chunk-137dcf78.d8fcc61f.js rel=prefetch><link href=/js/chunk-14b9857b.35e42781.js rel=prefetch><link href=/js/chunk-15d6294e.922618a9.js rel=prefetch><link href=/js/chunk-175acaff.ca3f7e65.js rel=prefetch><link href=/js/chunk-1792c498.4841b7fc.js rel=prefetch><link href=/js/chunk-1a0615f2.ef0c5c08.js rel=prefetch><link href=/js/chunk-1b756945.d840b734.js rel=prefetch><link href=/js/chunk-21b5182a.64203a99.js rel=prefetch><link href=/js/chunk-22347577.2275ebec.js rel=prefetch><link href=/js/chunk-24a41303.88feac34.js rel=prefetch><link href=/js/chunk-25d9ab36.087a7b9f.js rel=prefetch><link href=/js/chunk-2aeda6fa.2bd11851.js rel=prefetch><link href=/js/chunk-2b3066fa.71705e35.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.ca1865db.js rel=prefetch><link href=/js/chunk-2d0e68e0.1a313c84.js rel=prefetch><link href=/js/chunk-2d0efc5d.662e1339.js rel=prefetch><link href=/js/chunk-2d20828f.7627562b.js rel=prefetch><link href=/js/chunk-3385141a.a6e1a986.js rel=prefetch><link href=/js/chunk-3a0bcea0.192dd1cf.js rel=prefetch><link href=/js/chunk-3f4029e7.497354cb.js rel=prefetch><link href=/js/chunk-477a8e91.c522ef77.js rel=prefetch><link href=/js/chunk-4b58f216.e79a0ff7.js rel=prefetch><link href=/js/chunk-5ccefbbb.0f021a99.js rel=prefetch><link href=/js/chunk-5e7b929d.9e85be22.js rel=prefetch><link href=/js/chunk-61b0b1e5.322b588f.js rel=prefetch><link href=/js/chunk-65e97401.3b9c7780.js rel=prefetch><link href=/js/chunk-738a8724.54f77353.js rel=prefetch><link href=/js/chunk-8e32057a.99a05e99.js rel=prefetch><link href=/js/chunk-9947983a.9674b58b.js rel=prefetch><link href=/js/chunk-e7e51fa0.c45982a9.js rel=prefetch><link href=/js/chunk-ff3eaeb0.d3d1af72.js rel=prefetch><link href=/css/app.4f840f8a.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.4206fad3.js rel=preload as=script><link href=/js/chunk-vendors.d7971afc.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.4f840f8a.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.d7971afc.js></script><script src=/js/app.4206fad3.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b3066fa","chunk-2d0d61ef"],{"70cc":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"user_info",packageName:"auth",tblheight:e.tblheight,isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec,oninitbtn:e.oninitbtn}})],1)},n=[],a=(r("cc57"),r("163d"),r("06d3")),s=r("7e1e"),i={name:"userinfo_page",data:function(){return{}},components:{BizTable:a["a"]},props:{tblheight:Number,beforesave:{type:Function,default:function(){return function(e,t,r){return r(t)}}},beforedit:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}},beforeadd:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}}},methods:{onexec:function(e,t){var r=this;"enablebtn"==e&&Object(s["n"])("/web/auth/userCtl/allowOrNotToOne",{curid:t.id,isEnabled:t.isEnabled}).then((function(e){var t=e.data;0==t.status?(r.$refs.bt.fetchData(),r.$Message.success("当前操作已经成功完成.")):r.$Message.error("当前操作未完成.")}))},oninitbtn:function(e,t){"enablebtn"==e.key&&(t.isEnabled?e.title="停用":e.title="启用")},searchWhere:function(e){this.$refs.bt.initWhereData=e,this.$refs.bt.fetchData()},setHeight:function(e){this.$refs.bt.setHeight(e)},onnew:function(){this.$refs.bt.setFormCtlVisable("userName",!0)},onedit:function(){this.$refs.bt.setFormCtlVisable("userName",!1)},formatCol:function(e,t,r){if("isEnabled"==t)return e["isEnabled"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("isAllocated"==t)return e["isAllocated"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("roleName"==t){var o=e.Roles.map((function(e){return e.name})).join(",");return e.roles=e.Roles.map((function(e){return e.id})),"<span>".concat(o,"</span>")}return"isAdmin"==t||"isSuper"==t?"<span>".concat(e[t]?"是":"否","</span>"):"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},l=i,c=r("9ca4"),f=Object(c["a"])(l,o,n,!1,null,null,null);t["default"]=f.exports},d610:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[r("SplitPanel",[r("OrgEditor",{ref:"orgtree",attrs:{slot:"left",initData:e.initData,metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode},slot:"left"}),r("UserInfo",{ref:"userinfo",attrs:{slot:"right",tblheight:o-60,beforesave:e.beforesave,beforedit:e.beforedit,beforeadd:e.beforeadd},slot:"right"})],1)]}}])})},n=[],a=r("efa5"),s=a["a"],i=r("9ca4"),l=Object(i["a"])(s,o,n,!1,null,null,null);t["default"]=l.exports},efa5:function(e,t,r){"use strict";(function(e){r("9a33"),r("60b7");var o=r("391e"),n=r("7e1e"),a=r("302e"),s=r("832e"),i=r("70cc");r("f121");t["a"]={name:"treeinfo_page",props:{},components:{OrgEditor:a["a"],SplitPanel:s["a"],UserInfo:i["default"],PageSpace:o["a"]},data:function(){return{metainfo:{name:"节点编辑",main:[{title:"授权信息",key:"baseinfo",cols:2,ctls:[{type:"switch",label:"是否岗位",prop:"isPosition",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:""},{type:"switch",label:"是否负责人",prop:"isMain",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:"",isHide:!0},{type:"input",label:"监控",prop:"orgtag",placeHolder:"输入监控的部门编码(非岗位),逗号分隔",style:"",rules:[],isHide:!0},{type:"model-select",refModel:"auth.role",isMulti:!0,label:"角色",prop:"roles",labelField:"name",valueField:"id",style:{"margin-left":"10px",width:"165px"},isHide:!0}]}],lists:null}}},mounted:function(){},methods:{onselnode:function(e,t,r){this.$refs.userinfo.searchWhere({opath:r.code})},orgsave:function(e,t,r){var o=this;Object(n["n"])("/web/common/companyCtl/setOrgs",{orgJson:e,curdata:t,olddata:r}).then((function(e){var r=e.data;if(console.log("ddddddddddddddddd",r),0==r.status){var n=r.data.orgJson;console.log("save org...............................",n),o.$refs.orgtree.treedata=n,o.$refs.orgtree.refreshTree(),o.$Message.success("当前操作成功完成"),o.$refs.userinfo.searchWhere({opath:t.code})}}))},beforeadd:function(e,t){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition?t({value:!0,message:null}):t({value:!1,message:"请选择岗位节点"})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,r){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition&&(t.opath=this.$refs.orgtree.currentData.orgpath+"/"+t.userName,t.ptags=this.$refs.orgtree.currentData.orgtag,t.roles=this.$refs.orgtree.currentData.roles?this.$refs.orgtree.currentData.roles:[]),console.log("before.save",e,t),r(t)},setHeight:function(){var t=e("#orgdiv"),r=t.get()[0],o=window.innerHeight-r.offsetTop;t.css("height",o+"px"),this.$refs.userinfo.setHeight(o-120)},drawaction:function(e,t){t.formModel.isPosition?(t.setCtlVisable("isMain",!0),t.setCtlVisable("orgtag",!0),t.setCtlVisable("roles",!0)):(t.setCtlVisable("isMain",!1),t.setCtlVisable("orgtag",!1),t.setCtlVisable("roles",!1))},controlctl:function(e,t,r){if("isMain"==t){var o=this.$refs.orgtree.currentNode,n=this.$refs.orgtree.findParentByNode(o),a=r.formModel;if(a.orgtag&&a.orgtag.indexOf(n.code)<0){var s=a.orgtag.split(",").push(n.code).join(",");a.orgtag=s}else a.orgtag=n.code}"isPosition"==t&&(e?(r.setCtlVisable("isMain",!0),r.setCtlVisable("orgtag",!0),r.setCtlVisable("roles",!0)):(r.setCtlVisable("isMain",!1),r.setCtlVisable("orgtag",!1),r.setCtlVisable("roles",!1)))},initData:function(e){Object(n["h"])().then((function(t){var r=t.data;if(0!=r.status)throw new Error("获取组织数据出错");var o=r.data.orgJson;e(o)}))}}}}).call(this,r("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b3066fa","chunk-2d0d61ef"],{"70cc":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"user_info",packageName:"auth",tblheight:e.tblheight,isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec,oninitbtn:e.oninitbtn}})],1)},n=[],a=(r("cc57"),r("163d"),r("06d3")),s=r("7e1e"),i={name:"userinfo_page",data:function(){return{}},components:{BizTable:a["a"]},props:{tblheight:Number,beforesave:{type:Function,default:function(){return function(e,t,r){return r(t)}}},beforedit:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}},beforeadd:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}}},methods:{onexec:function(e,t){var r=this;"enablebtn"==e&&Object(s["n"])("/web/auth/userCtl/allowOrNotToOne",{curid:t.id,isEnabled:t.isEnabled}).then((function(e){var t=e.data;0==t.status?(r.$refs.bt.fetchData(),r.$Message.success("当前操作已经成功完成.")):r.$Message.error("当前操作未完成.")}))},oninitbtn:function(e,t){"enablebtn"==e.key&&(t.isEnabled?e.title="停用":e.title="启用")},searchWhere:function(e){this.$refs.bt.initWhereData=e,this.$refs.bt.fetchData()},setHeight:function(e){this.$refs.bt.setHeight(e)},onnew:function(){this.$refs.bt.setFormCtlVisable("userName",!0)},onedit:function(){this.$refs.bt.setFormCtlVisable("userName",!1)},formatCol:function(e,t,r){if("isEnabled"==t)return e["isEnabled"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("isAllocated"==t)return e["isAllocated"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("roleName"==t){var o=e.Roles.map((function(e){return e.name})).join(",");return e.roles=e.Roles.map((function(e){return e.id})),"<span>".concat(o,"</span>")}return"isAdmin"==t||"isSuper"==t?"<span>".concat(e[t]?"是":"否","</span>"):"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},l=i,c=r("9ca4"),f=Object(c["a"])(l,o,n,!1,null,null,null);t["default"]=f.exports},d610:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[r("SplitPanel",[r("OrgEditor",{ref:"orgtree",attrs:{slot:"left",initData:e.initData,metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode},slot:"left"}),r("UserInfo",{ref:"userinfo",attrs:{slot:"right",tblheight:o-60,beforesave:e.beforesave,beforedit:e.beforedit,beforeadd:e.beforeadd},slot:"right"})],1)]}}])})},n=[],a=r("efa5"),s=a["a"],i=r("9ca4"),l=Object(i["a"])(s,o,n,!1,null,null,null);t["default"]=l.exports},efa5:function(e,t,r){"use strict";(function(e){r("9a33"),r("60b7");var o=r("391e"),n=r("7e1e"),a=r("302e"),s=r("832e"),i=r("70cc");r("f121");t["a"]={name:"treeinfo_page",props:{},components:{OrgEditor:a["a"],SplitPanel:s["a"],UserInfo:i["default"],PageSpace:o["a"]},data:function(){return{metainfo:{name:"节点编辑",main:[{title:"授权信息",key:"baseinfo",cols:2,ctls:[{type:"switch",label:"是否岗位",prop:"isPosition",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:""},{type:"switch",label:"是否负责人",prop:"isMain",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:"",isHide:!0},{type:"dreftag",label:"监控",prop:"orgtag",refModel:"common.company",isMulti:!1,labelField:"orgpath",valueField:"orgpath",refMethod:"getWatchOrgNodes",placeHolder:"请选择监控节点",style:"",canclose:!0,rules:[]},{type:"model-select",refModel:"auth.role",isMulti:!0,label:"角色",prop:"roles",labelField:"name",valueField:"id",style:{"margin-left":"10px",width:"165px"},isHide:!0}]}],lists:null}}},mounted:function(){},methods:{onselnode:function(e,t,r){this.$refs.userinfo.searchWhere({opath:r.code})},orgsave:function(e,t,r){var o=this;Object(n["n"])("/web/common/companyCtl/setOrgs",{orgJson:e,curdata:t,olddata:r}).then((function(e){var r=e.data;if(console.log("ddddddddddddddddd",r),0==r.status){var n=r.data.orgJson;console.log("save org...............................",n),o.$refs.orgtree.treedata=n,o.$refs.orgtree.refreshTree(),o.$Message.success("当前操作成功完成"),o.$refs.userinfo.searchWhere({opath:t.code})}}))},beforeadd:function(e,t){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition?t({value:!0,message:null}):t({value:!1,message:"请选择岗位节点"})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,r){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition&&(t.opath=this.$refs.orgtree.currentData.orgpath+"/"+t.userName,t.ptags=this.$refs.orgtree.currentData.orgtag,t.roles=this.$refs.orgtree.currentData.roles?this.$refs.orgtree.currentData.roles:[]),console.log("before.save",e,t),r(t)},setHeight:function(){var t=e("#orgdiv"),r=t.get()[0],o=window.innerHeight-r.offsetTop;t.css("height",o+"px"),this.$refs.userinfo.setHeight(o-120)},drawaction:function(e,t){t.formModel.isPosition?(t.setCtlVisable("isMain",!0),t.setCtlVisable("orgtag",!0),t.setCtlVisable("roles",!0)):(t.setCtlVisable("isMain",!1),t.setCtlVisable("orgtag",!1),t.setCtlVisable("roles",!1))},controlctl:function(e,t,r){if("isMain"==t){var o=this.$refs.orgtree.currentNode,n=this.$refs.orgtree.findParentByNode(o),a=r.formModel;if(a.orgtag&&a.orgtag.indexOf(n.code)<0){var s=a.orgtag.split(",").push(n.code).join(",");a.orgtag=s}else a.orgtag=n.code}"isPosition"==t&&(e?(r.setCtlVisable("isMain",!0),r.setCtlVisable("orgtag",!0),r.setCtlVisable("roles",!0)):(r.setCtlVisable("isMain",!1),r.setCtlVisable("orgtag",!1),r.setCtlVisable("roles",!1)))},initData:function(e){Object(n["h"])().then((function(t){var r=t.data;if(0!=r.status)throw new Error("获取组织数据出错");var o=r.data.orgJson;e(o)}))}}}}).call(this,r("a336"))}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment