Commit 05a8d0f9 by 王勇飞

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

parents 851c1106 560eb614
...@@ -19,23 +19,7 @@ module.exports = function (app) { ...@@ -19,23 +19,7 @@ module.exports = function (app) {
app.use(bodyParser.json({ limit: '50mb' })); app.use(bodyParser.json({ limit: '50mb' }));
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true })); app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));
routes(app);//初始化路由 routes(app);//初始化路由
app.use(history( app.use(history());
{
rewrites: [
{
from: /.*/,
to: function (context) {
if (context.parsedUrl.pathname.indexOf("autologin") >= 0) {
return context.parsedUrl.pathname
} else {
return '/index.html';
}
}
}
]
}
));
app.use(express.static(path.join(settings.basepath, '/app/front/entry/public'))); app.use(express.static(path.join(settings.basepath, '/app/front/entry/public')));
// development only // development only
if ('development' == app.get('env')) { if ('development' == app.get('env')) {
......
...@@ -7,7 +7,7 @@ const companyS = System.getObject("service.common.companySve") ...@@ -7,7 +7,7 @@ const companyS = System.getObject("service.common.companySve")
const settings = require("../settings.js") const settings = require("../settings.js")
let channelCache = {}; let channelCache = {};
module.exports = function (app) { module.exports = function (app) {
app.get("/autologin", async function (req, res, next) { app.post("/autologin", async function (req, res, next) {
let appkey = req.query.appkey.trim() let appkey = req.query.appkey.trim()
if (!appkey) { if (!appkey) {
res.end("没有资质宝appkey,请联系资质宝服务提供方") res.end("没有资质宝appkey,请联系资质宝服务提供方")
...@@ -70,7 +70,8 @@ module.exports = function (app) { ...@@ -70,7 +70,8 @@ module.exports = function (app) {
uf = await userS.registerByTantent(reguser) uf = await userS.registerByTantent(reguser)
} }
let rtnobj = await userS.loginApp(appkey, userName) let rtnobj = await userS.loginApp(appkey, userName)
res.redirect(rtnobj.homePage + "?code=" + rtnobj.code) let rtn = JSON.stringify({ openurl: rtnobj.homePage + "?code=" + rtnobj.code })
res.end(rtn)
}) })
app.post("*", async function (req, res, next) { app.post("*", async function (req, res, next) {
try { try {
......
<!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.0f8b4b36.js rel=prefetch><link href=/js/chunk-037694a5.7c2329e7.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.98937017.js rel=prefetch><link href=/js/chunk-175acaff.85235a4c.js rel=prefetch><link href=/js/chunk-1792c498.57f47ac5.js rel=prefetch><link href=/js/chunk-1a0615f2.cd4ac125.js rel=prefetch><link href=/js/chunk-1b756945.f2391a13.js rel=prefetch><link href=/js/chunk-21b5182a.64203a99.js rel=prefetch><link href=/js/chunk-22347577.172e21a4.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.9ae15683.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.cce6bf6e.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-3385141a.a6e1a986.js rel=prefetch><link href=/js/chunk-3a0bcea0.192dd1cf.js rel=prefetch><link href=/js/chunk-3f4029e7.1d420943.js rel=prefetch><link href=/js/chunk-477a8e91.eee26140.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.f3ce9ea9.js rel=prefetch><link href=/js/chunk-61b0b1e5.1acef6f6.js rel=prefetch><link href=/js/chunk-65e97401.1b34c47c.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.24a79dac.js rel=prefetch><link href=/js/chunk-e7e51fa0.6af24251.js rel=prefetch><link href=/js/chunk-ff3eaeb0.50a29bf2.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.5390a097.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.5390a097.js></script></body></html> <!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.0f8b4b36.js rel=prefetch><link href=/js/chunk-037694a5.7e50cc17.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.f0101a17.js rel=prefetch><link href=/js/chunk-175acaff.ca3f7e65.js rel=prefetch><link href=/js/chunk-1792c498.57f47ac5.js rel=prefetch><link href=/js/chunk-1a0615f2.01639b03.js rel=prefetch><link href=/js/chunk-1b756945.f2391a13.js rel=prefetch><link href=/js/chunk-21b5182a.74708748.js rel=prefetch><link href=/js/chunk-22347577.172e21a4.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.9ae15683.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.cce6bf6e.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-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.eee26140.js rel=prefetch><link href=/js/chunk-480215f6.bc2748bf.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.f3ce9ea9.js rel=prefetch><link href=/js/chunk-61b0b1e5.e4ead4e0.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.45869bef.js rel=prefetch><link href=/js/chunk-e7e51fa0.2dc827c3.js rel=prefetch><link href=/js/chunk-ff3eaeb0.73991da8.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.90bfad79.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.90bfad79.js></script></body></html>
\ No newline at end of file \ 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-037694a5"],{"82bd":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var r=t.adjustHeight;return[e.isshowlist?n("SplitPanel",[n("ArchEditor",{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"}),n("ArticleInfo",{ref:"articleInfo",attrs:{slot:"right",tblheight:r-60,beforesave:e.beforesave,beforedit:e.beforedit,beforeadd:e.beforeadd},on:{articleShow:e.articleShow},slot:"right"})],1):n("div",{staticStyle:{height:"100%",weight:"100%"}},[n("List",{attrs:{"item-layout":"vertical"}},[n("ListItem",[n("ListItemMeta",{attrs:{title:e.currow.title,description:e.currow.desc}}),n("div",{domProps:{innerHTML:e._s(e.currow.htmlcontent)}}),n("template",{slot:"extra"},[n("Button",{attrs:{type:"primary"},on:{click:e.rtnback}},[e._v("返回")])],1)],2)],1)],1)]}}])})},a=[],o=n("ea4c"),i=o["a"],s=n("9ca4"),l=Object(s["a"])(i,r,a,!1,null,null,null);t["default"]=l.exports},a526:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"article_info",modelName:"article",packageName:"common",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)},a=[],o=(n("163d"),n("06d3")),i=(n("7e1e"),{name:"articleinfo_page",data:function(){return{}},components:{BizTable:o["a"]},props:{tblheight:Number,beforesave:{type:Function,default:function(){return function(e,t,n){return n(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){"show"==e&&this.$emit("articleShow",t)},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,n){return"isPubed"==t?e["isPubed"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>':"created_at"==t||"updated_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}}),s=i,l=n("9ca4"),c=Object(l["a"])(s,r,a,!1,null,null,null);t["a"]=c.exports},ea4c:function(e,t,n){"use strict";(function(e){n("9a33"),n("60b7");var r=n("391e"),a=n("7e1e"),o=n("302e"),i=n("832e"),s=n("a526");n("f121");t["a"]={name:"treeinfo_page",props:{},components:{ArchEditor:o["a"],SplitPanel:i["a"],PageSpace:r["a"],ArticleInfo:s["a"]},data:function(){return{isshowlist:!0,metainfo:{name:"平台指南",main:[{title:"授权信息",key:"baseinfo",cols:2,ctls:[]}],lists:null}}},mounted:function(){},methods:{rtnback:function(){this.isshowlist=!0},articleShow:function(e){this.isshowlist=!1,this.currow=e},onselnode:function(e,t,n){this.$refs.articleInfo.searchWhere({archpath:n.code})},orgsave:function(e,t){var n=this;Object(a["m"])("/web/common/treearchCtl/saveSysArchJSON",{sysArchJSON:e,curdata:t}).then((function(e){var r=e.data;if(console.log("ddddddddddddddddd",r),0==r.status){var a=r.data.sysArchJSON;console.log("save org...............................",a),n.$refs.orgtree.treedata=a,n.$refs.orgtree.refreshTree(),n.$Message.success("当前操作成功完成"),n.$refs.articleInfo.searchWhere({archpath:t.code})}}))},beforeadd:function(e,t){return this.$refs.orgtree.currentData?t({value:!0,message:null}):t({value:!1,message:"请选择目录节点"})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return this.$refs.orgtree.currentData&&(t.archpath=this.$refs.orgtree.currentData.orgpath),n(t)},setHeight:function(){var t=e("#orgdiv"),n=t.get()[0],r=window.innerHeight-n.offsetTop;t.css("height",r+"px"),this.$refs.userinfo.setHeight(r-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,n){if("isMain"==t){var r=this.$refs.orgtree.currentNode,a=this.$refs.orgtree.findParentByNode(r),o=n.formModel;if(o.orgtag&&o.orgtag.indexOf(a.code)<0){var i=o.orgtag.split(",").push(a.code).join(",");o.orgtag=i}else o.orgtag=a.code}"isPosition"==t&&(e?(n.setCtlVisable("isMain",!0),n.setCtlVisable("orgtag",!0),n.setCtlVisable("roles",!0)):(n.setCtlVisable("isMain",!1),n.setCtlVisable("orgtag",!1),n.setCtlVisable("roles",!1)))},initData:function(e){Object(a["j"])().then((function(t){var n=t.data;if(0!=n.status)throw new Error("获取组织数据出错");var r=n.data.sysArchJSON;e(r)}))}}}}).call(this,n("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-037694a5"],{"82bd":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var n=t.adjustHeight;return[e.isshowlist?a("SplitPanel",[a("ArchEditor",{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"}),a("ArticleInfo",{ref:"articleInfo",attrs:{slot:"right",tblheight:n-60,beforesave:e.beforesave,beforedit:e.beforedit,beforeadd:e.beforeadd},on:{articleShow:e.articleShow},slot:"right"})],1):a("div",{staticStyle:{height:"100%",weight:"100%"}},[a("List",{attrs:{"item-layout":"vertical"}},[a("ListItem",[a("ListItemMeta",{attrs:{title:e.currow.title,description:e.currow.desc}}),a("div",{domProps:{innerHTML:e._s(e.currow.htmlcontent)}}),a("template",{slot:"extra"},[a("Button",{attrs:{type:"primary"},on:{click:e.rtnback}},[e._v("返回")])],1)],2)],1)],1)]}}])})},r=[],o=a("ea4c"),i=o["a"],s=a("9ca4"),l=Object(s["a"])(i,n,r,!1,null,null,null);t["default"]=l.exports},a526:function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"article_info",modelName:"article",packageName:"common",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)},r=[],o=(a("163d"),a("06d3")),i=(a("7e1e"),{name:"articleinfo_page",data:function(){return{}},components:{BizTable:o["a"]},props:{tblheight:Number,beforesave:{type:Function,default:function(){return function(e,t,a){return a(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){"show"==e&&this.$emit("articleShow",t)},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,a){return"isPubed"==t?e["isPubed"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>':"created_at"==t||"updated_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}}),s=i,l=a("9ca4"),c=Object(l["a"])(s,n,r,!1,null,null,null);t["a"]=c.exports},ea4c:function(e,t,a){"use strict";(function(e){a("9a33"),a("60b7");var n=a("391e"),r=a("7e1e"),o=a("302e"),i=a("832e"),s=a("a526");a("f121");t["a"]={name:"treeinfo_page",props:{},components:{ArchEditor:o["a"],SplitPanel:i["a"],PageSpace:n["a"],ArticleInfo:s["a"]},data:function(){return{isshowlist:!0,metainfo:{name:"平台指南",main:[{title:"授权信息",key:"baseinfo",cols:2,ctls:[]}],lists:null}}},mounted:function(){},methods:{rtnback:function(){this.isshowlist=!0},articleShow:function(e){this.isshowlist=!1,this.currow=e},onselnode:function(e,t,a){this.$refs.articleInfo.searchWhere({archpath:a.code})},orgsave:function(e,t,a){var n=this;Object(r["m"])("/web/common/treearchCtl/saveSysArchJSON",{sysArchJSON:e,curdata:t,olddata:a}).then((function(e){var a=e.data;if(console.log("ddddddddddddddddd",a),0==a.status){var r=a.data.sysArchJSON;console.log("save org...............................",r),n.$refs.orgtree.treedata=r,n.$refs.orgtree.refreshTree(),n.$Message.success("当前操作成功完成"),n.$refs.articleInfo.searchWhere({archpath:t.code})}}))},beforeadd:function(e,t){return this.$refs.orgtree.currentData?t({value:!0,message:null}):t({value:!1,message:"请选择目录节点"})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return this.$refs.orgtree.currentData&&(t.archpath=this.$refs.orgtree.currentData.orgpath),a(t)},setHeight:function(){var t=e("#orgdiv"),a=t.get()[0],n=window.innerHeight-a.offsetTop;t.css("height",n+"px"),this.$refs.userinfo.setHeight(n-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,a){if("isMain"==t){var n=this.$refs.orgtree.currentNode,r=this.$refs.orgtree.findParentByNode(n),o=a.formModel;if(o.orgtag&&o.orgtag.indexOf(r.code)<0){var i=o.orgtag.split(",").push(r.code).join(",");o.orgtag=i}else o.orgtag=r.code}"isPosition"==t&&(e?(a.setCtlVisable("isMain",!0),a.setCtlVisable("orgtag",!0),a.setCtlVisable("roles",!0)):(a.setCtlVisable("isMain",!1),a.setCtlVisable("orgtag",!1),a.setCtlVisable("roles",!1)))},initData:function(e){Object(r["j"])().then((function(t){var a=t.data;if(0!=a.status)throw new Error("获取组织数据出错");var n=a.data.sysArchJSON;e(n)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15d6294e"],{"14fe":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var r=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{showTotal:"",formatCol:e.formatCol,modelName:"deliverybill",metaName:"alldeliver_info",packageName:"bizchance",baseUrl:e.baseUrl,tblheight:r-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,morebefore:e.beforemore,addbefore:e.beforeadd,sumfields:e.smf,colVisable:e.colVisable},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),a("RefTable",{ref:"reftbl",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!1},on:{onrefselect:e.onrefselect}}),a("RefTable",{ref:"reftblSuper",attrs:{modelName:"company",metaName:"simple_companyinfo",packageName:"common",isMulti:!1},on:{onrefselect:e.onrefselect}})]}}])})},s=[],i=(a("cc57"),a("b449"),a("9666")),n=(a("163d"),a("6d57"),a("3c70")),o=a("06d3"),u=a("391e"),l=a("db7f"),f=a("f121"),c=a("7e1e"),d=f["a"].deliverUrl.pro,h={name:"alldeliver_page",data:function(){return{baseUrl:d,smf:[{field:"cost_price",label:"服务费合计(元)"}],deliverNumber:""}},components:{PageSpace:u["a"],BizTable:o["a"],RefTable:n["a"]},watch:{$route:function(e){if(e.query.spname){if(e.query.bizStatus){var t="waittosettle,settling,settled";t.indexOf(e.query.bizStatus)>=0?this.$refs.bt.initWhereData={facilitator_name:e.query.spname,settle_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:e.query.spname,delivery_status:e.query.bizStatus,dateType:e.query.dateType}}else this.$refs.bt.initWhereData={facilitator_name:e.query.spname,dateType:e.query.dateType};this.$refs.bt.fetchData()}else{if(e.query.bizStatus){var a="waittosettle,settling,settled";a.indexOf(e.query.bizStatus)>=0?this.$refs.bt.initWhereData={settle_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={delivery_status:e.query.bizStatus,dateType:e.query.dateType}}this.$refs.bt.fetchData()}}},mounted:function(){if(this.$route.query.spname){if(this.$route.query.bizStatus){var e="waittosettle,settling,settled";e.indexOf(this.$route.query.bizStatus)>=0?this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,settle_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,delivery_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}}else this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,dateType:this.$route.query.dateType};this.$refs.bt.fetchData()}else{if(this.$route.query.bizStatus){var t="waittosettle,settling,settled";t.indexOf(this.$route.query.bizStatus)>=0?this.$refs.bt.initWhereData={settle_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={delivery_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}}this.$refs.bt.fetchData()}},methods:{colVisable:function(e){return"facilitator_name"!=e.key||1==this.$store.state.user.userobj.company.id},oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforemore:function(e,t){return e.settlebill_memo=e.settlebill?e.settlebill.memo:"",t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){var a=this;if("bizdetails"===e&&alert("wait"),"settlewriteoff"===e){if(0==this.$refs.bt.currentSels.length)return void this.$Modal.error({title:"提示",content:"请选择要进行结算核销的交付单,改变页码可以增加结算核销的明细. "});var r=[],s=this.$refs.bt.currentSels[0].facilitator_name,i=this.$refs.bt.currentSels[0].facilitator_id,n=!1;if(this.$refs.bt.currentSels.forEach((function(e){"waittosettle"==e.settle_status?r.push(e.id):n=!0})),n)return void this.$Modal.error({title:"提示",content:"请选择未结算的交付进行结算核销."});Object(c["m"])("/web/bizchance/deliverybillCtl/settleApplyForTacent",{ids:r,spname:s,spid:Number(i)},d).then((function(e){var t=e.data;0==t.status?(a.$Message.success("当前选择的结算核销已经完成,请到结算管理进行查看."),a.$refs.bt.fetchData()):a.$Message.error("当前选择的结算核销失败,请联系管理员或稍后重试.")}))}"allocation"===e&&(this.deliverNumber=t.deliverNumber,1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):this.$refs.reftbl.showrefwindow([]))},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){var r=e[t];if("businessType"===t){var s=l["a"].businessType[r];return s}if("delivery_status"===t){var i=l["a"].deliver_status[r];return i}if("sourceName"===t){var n=l["a"].source[r];return n}if("settle_status"==t){var o=l["a"].settle_status[r];return o}},onrefselect:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.deliverNumber&&t.length>0&&t[0])){e.next=18;break}if(e.prev=1,1!=this.$store.state.user.userobj.company.id){e.next=7;break}return e.next=5,Object(c["e"])({deliverNumber:this.deliverNumber,facilitatorId:t[0].id,facilitatorName:t[0].name});case 5:e.next=9;break;case 7:return e.next=9,Object(c["e"])({deliverNumber:this.deliverNumber,salesmanId:t[0].id,salesmanName:t[0].userName,salesmanOpcode:t[0].opath,salesmanPhone:t[0].mobile});case 9:this.$refs.bt.fetchData(),this.$Message.success("分配成功"),e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 16:e.next=19;break;case 18:this.$Message.error("请勾人员");case 19:case"end":return e.stop()}}),e,this,[[1,13]])})));function t(t){return e.apply(this,arguments)}return t}()}},m=h,b=a("9ca4"),p=Object(b["a"])(m,r,s,!1,null,null,null);t["default"]=p.exports},"391e":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},s=[],i=a("9ee1"),n=i["a"],o=a("9ca4"),u=Object(o["a"])(n,r,s,!1,null,null,null);t["a"]=u.exports},"3c70":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[a("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},s=[],i=a("06d3"),n={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:i["a"]},mounted:function(){},methods:{showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t,a){},onnew:function(){},onedit:function(){},formatCol:function(e,t,a){return e[t]}}},o=n,u=a("9ca4"),l=Object(u["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},"9ee1":function(e,t,a){"use strict";(function(e){a("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),r=a.get()[0],s=window.innerHeight-r.offsetTop-t.advalue;t.frameHeight=s,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15d6294e"],{"14fe":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var r=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{showTotal:"",formatCol:e.formatCol,modelName:"deliverybill",metaName:"alldeliver_info",packageName:"bizchance",baseUrl:e.baseUrl,tblheight:r-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,morebefore:e.beforemore,addbefore:e.beforeadd,sumfields:e.smf,colVisable:e.colVisable},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),a("RefTable",{ref:"reftbl",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!1},on:{onrefselect:e.onrefselect}}),a("RefTable",{ref:"reftblSuper",attrs:{modelName:"company",metaName:"simple_companyinfo",packageName:"common",isMulti:!1},on:{onrefselect:e.onrefselect}})]}}])})},s=[],i=(a("cc57"),a("b449"),a("9666")),n=(a("163d"),a("6d57"),a("3c70")),o=a("06d3"),u=a("391e"),l=a("db7f"),f=a("f121"),c=a("7e1e"),d=f["a"].deliverUrl.pro,h={name:"alldeliver_page",data:function(){return{baseUrl:d,smf:[{field:"cost_price",label:"服务费合计(元)"}],deliverNumber:""}},components:{PageSpace:u["a"],BizTable:o["a"],RefTable:n["a"]},watch:{$route:function(e){if(e.query.spname){if(e.query.bizStatus){var t="waittosettle,settling,settled";t.indexOf(e.query.bizStatus)>=0?this.$refs.bt.initWhereData={facilitator_name:e.query.spname,settle_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:e.query.spname,delivery_status:e.query.bizStatus,dateType:e.query.dateType}}else this.$refs.bt.initWhereData={facilitator_name:e.query.spname,dateType:e.query.dateType};this.$refs.bt.fetchData()}else{if(e.query.bizStatus){var a="waittosettle,settling,settled";a.indexOf(e.query.bizStatus)>=0?this.$refs.bt.initWhereData={settle_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={delivery_status:e.query.bizStatus,dateType:e.query.dateType}}this.$refs.bt.fetchData()}}},mounted:function(){if(this.$route.query.spname){if(this.$route.query.bizStatus){var e="waittosettle,settling,settled";e.indexOf(this.$route.query.bizStatus)>=0?this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,settle_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,delivery_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}}else this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,dateType:this.$route.query.dateType};this.$refs.bt.fetchData()}else{if(this.$route.query.bizStatus){var t="waittosettle,settling,settled";t.indexOf(this.$route.query.bizStatus)>=0?this.$refs.bt.initWhereData={settle_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={delivery_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}}this.$refs.bt.fetchData()}},methods:{colVisable:function(e){return"facilitator_name"!=e.key||1==this.$store.state.user.userobj.company.id},oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforemore:function(e,t){return e.settlebill_memo=e.settlebill?e.settlebill.memo:"",t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){var a=this;if("bizdetails"===e&&alert("wait"),"settlewriteoff"===e){if(0==this.$refs.bt.currentSels.length)return void this.$Modal.error({title:"提示",content:"请选择要进行结算核销的交付单,改变页码可以增加结算核销的明细. "});var r=[],s=this.$refs.bt.currentSels[0].facilitator_name,i=this.$refs.bt.currentSels[0].facilitator_id,n=!1;if(this.$refs.bt.currentSels.forEach((function(e){"waittosettle"==e.settle_status?r.push(e.id):n=!0})),n)return void this.$Modal.error({title:"提示",content:"请选择未结算的交付进行结算核销."});Object(c["m"])("/web/bizchance/deliverybillCtl/settleApplyForTacent",{ids:r,spname:s,spid:Number(i)},d).then((function(e){var t=e.data;0==t.status?(a.$Message.success("当前选择的结算核销已经完成,请到结算管理进行查看."),a.$refs.bt.fetchData()):a.$Message.error("当前选择的结算核销失败,请联系管理员或稍后重试.")}))}"allocation"===e&&(this.deliverNumber=t.deliverNumber,1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):(this.$refs.reftbl.showrefwindow([]),this.$refs.reftbl.setInitWhereData({isAllocated:1,isDelivery:1})))},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){var r=e[t];if("businessType"===t){var s=l["a"].businessType[r];return s}if("delivery_status"===t){var i=l["a"].deliver_status[r];return i}if("sourceName"===t){var n=l["a"].source[r];return n}if("settle_status"==t){var o=l["a"].settle_status[r];return o}},onrefselect:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.deliverNumber&&t.length>0&&t[0])){e.next=18;break}if(e.prev=1,1!=this.$store.state.user.userobj.company.id){e.next=7;break}return e.next=5,Object(c["e"])({deliverNumber:this.deliverNumber,facilitatorId:t[0].id,facilitatorName:t[0].name});case 5:e.next=9;break;case 7:return e.next=9,Object(c["e"])({deliverNumber:this.deliverNumber,salesmanId:t[0].id,salesmanName:t[0].userName,salesmanOpcode:t[0].opath,salesmanPhone:t[0].mobile});case 9:this.$refs.bt.fetchData(),this.$Message.success("分配成功"),e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 16:e.next=19;break;case 18:this.$Message.error("请勾人员");case 19:case"end":return e.stop()}}),e,this,[[1,13]])})));function t(t){return e.apply(this,arguments)}return t}()}},b=h,m=a("9ca4"),p=Object(m["a"])(b,r,s,!1,null,null,null);t["default"]=p.exports},"391e":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},s=[],i=a("9ee1"),n=i["a"],o=a("9ca4"),u=Object(o["a"])(n,r,s,!1,null,null,null);t["a"]=u.exports},"3c70":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[a("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},s=[],i=a("06d3"),n={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:i["a"]},mounted:function(){},methods:{setInitWhereData:function(e){this.$refs.bt2.initWhereData=e},showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t,a){},onnew:function(){},onedit:function(){},formatCol:function(e,t,a){return e[t]}}},o=n,u=a("9ca4"),l=Object(u["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},"9ee1":function(e,t,a){"use strict";(function(e){a("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),r=a.get()[0],s=window.innerHeight-r.offsetTop-t.advalue;t.frameHeight=s,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-175acaff"],{"05ea":function(t,e,n){"use strict";var i=n("98ed"),o=n.n(i);o.a},"302e":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{height:"100%"},attrs:{id:"orgcard"}},[n("Card",{staticStyle:{height:"100%"}},[n("Alert",{attrs:{type:"error"}},[n("template",{slot:"desc"},[n("Icon",{attrs:{type:"ios-alert-outline"}}),t._v("双击编辑,单击选择\n "),n("br"),t._v("\n      当前节点:\n "+t._s(t.currentData?t.currentData.title:"请选择操作节点")+"\n ")],1)],2),t.isupdate?t._e():n("Tree",{staticClass:"ptree",attrs:{data:t.treedata,render:t.renderContent}}),n("Drawer",{ref:"eddrawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},on:{"on-visible-change":t.ondrawvisable},model:{value:t.showedform,callback:function(e){t.showedform=e},expression:"showedform"}},[n("NodeForm",{ref:"nodeform",attrs:{fminfo:t.nodeinfo,isEditForm:""},on:{controlctl:t.controlctl},scopedSlots:t._u([{key:"default",fn:function(e){return[n("Button",{attrs:{type:"text"},on:{click:function(n){return t.doexec("ok",e.fm)}}},[t._v("保存")]),n("Button",{attrs:{type:"text"},on:{click:function(n){return t.doexec("cancel",e.fm)}}},[t._v("取消")])]}}])})],1)],1)],1)},o=[],r=n("7dfe"),s=r["a"],a=(n("8d99"),n("9ca4")),l=Object(a["a"])(s,i,o,!1,null,null,null);e["a"]=l.exports},"32fc":function(t,e,n){},"391e":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[t._t("default",null,{adjustHeight:t.frameHeight})],2)},o=[],r=n("9ee1"),s=r["a"],a=n("9ca4"),l=Object(a["a"])(s,i,o,!1,null,null,null);e["a"]=l.exports},"7dfe":function(t,e,n){"use strict";(function(t){n("e697"),n("163d"),n("c904"),n("6d57"),n("60b7");var i=n("0086");n("f121");e["a"]={name:"jsoneditor",props:{initData:{type:Function,default:function(){var t=this;return function(e){e(t.originalRoot)}}},metainfo:{type:Object}},components:{NodeForm:i["a"]},data:function(){var t=this,e="root"+this.$store.state.user.userobj.company.id,n="/"+e;return{oldnodedata:null,isupdate:!1,rootNode:null,currentData:null,currentNode:null,code:"root",treedata:[],originalMetaInfo:[{title:"基本信息",key:"baseinfo",cols:1,ctls:[{type:"number",label:"序号",prop:"seq",placeHolder:"请输入序号",style:{width:"165px"},rules:[]},{type:"input",label:"编码",prop:"code",placeHolder:"请输入编码",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"标题",prop:"title",placeHolder:"请输入节点标题",style:"",rules:[{required:!0,message:" ",trigger:"blur"}],default:"点击修改"}]},{title:"节点路径",key:"baseinfo",cols:3,ctls:[{type:"input",label:"KEY",prop:"nodeKey",placeHolder:"请输入编码",disabled:!0,style:"",rules:[]},{type:"input",label:"路径",prop:"orgpath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"input",label:"标题路径",prop:"titlepath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"number",label:"级别",prop:"level",disabled:!0,placeHolder:"",style:{width:"165px"},rules:[]}]}],originalRoot:{title:"使用者定义",code:e,expand:!0,orgpath:n,render:function(e,n){var i=n.root,o=n.node,r=n.data;return e("span",{style:{display:"inline-block",width:"100%"}},[e("span",{on:{dblclick:function(){t.onselnode(o,r)},click:function(){t.currentData=r,t.currentNode=o,t.rootNode=i,t.selclick(i,o,r)}}},[e("Icon",{props:{type:"ios-folder-outline"},style:{marginRight:"8px"}}),e("span",{},[r.title])]),e("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[e("Button",{props:Object.assign({},t.buttonProps,{icon:"md-add",type:"text"}),style:{width:"64px"},on:{click:function(){t.append(r)}}})])])},children:[]},showedform:!1,buttonProps:{type:"default",size:"small"},nodeinfo:{},treeheight:0}},mounted:function(){this.initTree()},created:function(){this.metainfo&&(this.nodeinfo=Object.assign(this.nodeinfo,this.metainfo),this.nodeinfo.main=this.nodeinfo.main.concat(this.originalMetaInfo)),window.modiTreeNodeByCode=function(t,e,n,i){i||(i=0),i++,t.forEach((function(t){t.nodeKey==e.nodeKey&&(t=Object.assign(t,e)),t.children?(n?(t.orgpath=n.orgpath+"/"+t.code,t.titlepath=n.titlepath+"/"+t.title,t.level=i):(t.orgpath=t.code,t.titlepath=t.title,t.level=i),t.children.sort((function(t,e){return Number(t.seq)>Number(e.seq)})),modiTreeNodeByCode(t.children,e,t,i)):n?(t.orgpath=n.orgpath+"/"+t.code,t.titlepath=n.titlepath+"/"+t.title,t.level=i):(t.orgpath=t.code,t.titlepath=t.title,t.level=i)}))}},methods:{selclick:function(t,e,n){this.$emit("onselnode",t,e,n)},setCtlVisable:function(t,e){this.$refs.nodeform.setCtlVisable(t,e)},controlctl:function(t,e,n){this.$emit("controlctl",t,e,n)},ondrawvisable:function(t){this.$emit("drawaction",t,this.$refs.nodeform)},resetForm:function(){this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel.children=[]},refreshTree:function(){var t=this;this.isupdate=!0,this.$nextTick((function(){t.isupdate=!1}))},doexec:function(t,e){var n=this;"ok"==t?this.$refs.nodeform.validate((function(t){if(console.log("ddddddddddddddddd",t),t){var e=n.$refs.nodeform.getNewModel();modiTreeNodeByCode(n.treedata,e,null),n.showedform=!1,n.$emit("modisave",n.treedata,e,n.oldnodedata),n.resetForm(),console.log(n.treedata)}})):(this.showedform=!1,this.resetForm())},deepclone:function(t){var e=JSON.stringify(t);return JSON.parse(e)},onselnode:function(t,e){this.showedform=!0,this.currentData=e,this.currentNode=t;var n=this.deepclone(e);this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel=n,this.oldnodedata=this.deepclone(e),this.$refs.nodeform.forminfo.main.forEach((function(t){t.ctls.forEach((function(t){"code"==t.prop&&(e.code.indexOf("root")>=0?t.disabled=!0:t.disabled=!1)}))}))},initTree:function(){var t=this;this.$nextTick((function(){t.initData&&0==t.treedata.length&&t.initData((function(e){console.log("mmmmmmmmmmmmmmmm",e),!e||e&&e[0]&&(!e.children||e.children&&0==e.children.length)||e&&0==e.length?(t.originalRoot=Object.assign(t.originalRoot,e&&e[0]?e[0]:[]),t.treedata=[t.originalRoot]):(e[0].render=t.originalRoot.render,t.treedata=e)}))}))},setHeight:function(){var e=t("#orgcard"),n=e.get()[0],i=window.innerHeight-n.offsetTop-30;e.css("height",i+"px"),this.treeheight=i},setSelCss:function(e){t("span",".ptree").removeClass("spansel"),t(e.target).parent().parent().addClass("spansel")},renderContent:function(t,e){var n=this,i=e.root,o=e.node,r=e.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",{on:{dblclick:function(t){n.setSelCss(t),n.onselnode(o,r)},click:function(t){n.setSelCss(t),n.currentData=r,n.currentNode=o,n.rootNode=i,n.selclick(i,o,r)}}},[t("Icon",{props:{type:r.children&&r.children.length>0?"ios-folder-outline":"ios-paper-outline"},style:{marginRight:"8px"}}),t("span",r.title)]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-add"}),style:{marginRight:"8px"},on:{click:function(){n.append(r)}}}),t("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-remove"}),on:{click:function(){n.remove(i,o,r)}}})])])},append:function(t){var e=t.children||[],n=this.$refs.nodeform.getNewModel();console.log("new model.........................",n),n.expand=!0,e.push(n),this.$set(t,"children",e)},remove:function(t,e,n){var i=t.find((function(t){return t===e})).parent,o=t.find((function(t){return t.nodeKey===i})).node,r=o.children.indexOf(n);o.children.splice(r,1),this.$emit("deletenode",this.treedata,n)},findParentByNode:function(t){var e=this.rootNode.find((function(e){return e===t})).parent,n=this.rootNode.find((function(t){return t.nodeKey===e})).node;return n}}}}).call(this,n("a336"))},8091:function(t,e,n){"use strict";var i=n("b61e"),o=n.n(i);o.a},"832e":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"split-pane-page-wrapper"},[n("split-pane",{on:{"on-moving":t.handleMoving},model:{value:t.offset,callback:function(e){t.offset=e},expression:"offset"}},[n("div",{staticClass:"pane left-pane",attrs:{slot:"left"},slot:"left"},[t._t("left")],2),n("div",{staticClass:"pane right-pane",attrs:{slot:"right"},slot:"right"},[t._t("right")],2)])],1)},o=[],r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"outerWrapper",class:t.wrapperClasses},[t.isHorizontal?n("div",{class:t.prefix+"-horizontal"},[n("div",{class:[t.prefix+"-pane","left-pane"],style:{right:t.anotherOffset+"%"}},[t._t("left")],2),n("div",{class:t.prefix+"-trigger-con",style:{left:t.offset+"%"},on:{mousedown:t.handleMousedown}},[t._t("trigger",[n("trigger",{attrs:{mode:"vertical"}})])],2),n("div",{class:[t.prefix+"-pane","right-pane"],style:{left:t.offset+"%"}},[t._t("right")],2)]):n("div",{class:t.prefix+"-vertical"},[n("div",{class:[t.prefix+"-pane","top-pane"],style:{bottom:t.anotherOffset+"%"}},[t._t("top")],2),n("div",{class:t.prefix+"-trigger-con",style:{top:t.offset+"%"},on:{mousedown:t.handleMousedown}},[t._t("trigger",[n("trigger",{attrs:{mode:"horizontal"}})])],2),n("div",{class:[t.prefix+"-pane","bottom-pane"],style:{top:t.offset+"%"}},[t._t("bottom")],2)])])},s=[],a=(n("163d"),n("90de")),l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.classes},[n("div",{class:t.barConClasses},t._m(0),0)])},c=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return t._l(8,(function(e){return n("i",{key:"trigger-"+e,class:t.prefix+"-bar"})}))}],d={name:"Trigger",props:{mode:String},data:function(){return{prefix:"ivu-split-trigger",initOffset:0}},computed:{isVertical:function(){return"vertical"===this.mode},classes:function(){return[this.prefix,this.isVertical?"".concat(this.prefix,"-vertical"):"".concat(this.prefix,"-horizontal")]},barConClasses:function(){return["".concat(this.prefix,"-bar-con"),this.isVertical?"vertical":"horizontal"]}}},f=d,u=(n("ac12"),n("9ca4")),p=Object(u["a"])(f,l,c,!1,null,null,null),h=p.exports,m={name:"SplitPane",components:{Trigger:h},props:{value:{type:[Number,String],default:.5},mode:{validator:function(t){return Object(a["g"])(t,["horizontal","vertical"])},default:"horizontal"},min:{type:[Number,String],default:"40px"},max:{type:[Number,String],default:"40px"}},data:function(){return{prefix:"ivu-split",offset:0,oldOffset:0,isMoving:!1}},computed:{wrapperClasses:function(){return["".concat(this.prefix,"-wrapper"),this.isMoving?"no-select":""]},isHorizontal:function(){return"horizontal"===this.mode},anotherOffset:function(){return 100-this.offset},valueIsPx:function(){return"string"===typeof this.value},offsetSize:function(){return this.isHorizontal?"offsetWidth":"offsetHeight"},computedMin:function(){return this.getComputedThresholdValue("min")},computedMax:function(){return this.getComputedThresholdValue("max")}},methods:{px2percent:function(t,e){return parseFloat(t)/parseFloat(e)},getComputedThresholdValue:function(t){var e=this.$refs.outerWrapper[this.offsetSize];return this.valueIsPx?"string"===typeof this[t]?this[t]:e*this[t]:"string"===typeof this[t]?this.px2percent(this[t],e):this[t]},getMin:function(t,e){return this.valueIsPx?"".concat(Math.min(parseFloat(t),parseFloat(e)),"px"):Math.min(t,e)},getMax:function(t,e){return this.valueIsPx?"".concat(Math.max(parseFloat(t),parseFloat(e)),"px"):Math.max(t,e)},getAnotherOffset:function(t){var e=0;return e=this.valueIsPx?"".concat(this.$refs.outerWrapper[this.offsetSize]-parseFloat(t),"px"):1-t,e},handleMove:function(t){var e=this.isHorizontal?t.pageX:t.pageY,n=e-this.initOffset,i=this.$refs.outerWrapper[this.offsetSize],o=this.valueIsPx?"".concat(parseFloat(this.oldOffset)+n,"px"):this.px2percent(i*this.oldOffset+n,i),r=this.getAnotherOffset(o);parseFloat(o)<=parseFloat(this.computedMin)&&(o=this.getMax(o,this.computedMin)),parseFloat(r)<=parseFloat(this.computedMax)&&(o=this.getAnotherOffset(this.getMax(r,this.computedMax))),t.atMin=this.value===this.computedMin,t.atMax=this.valueIsPx?this.getAnotherOffset(this.value)===this.computedMax:this.getAnotherOffset(this.value).toFixed(5)===this.computedMax.toFixed(5),this.$emit("input",o),this.$emit("on-moving",t)},handleUp:function(){this.isMoving=!1,Object(a["e"])(document,"mousemove",this.handleMove),Object(a["e"])(document,"mouseup",this.handleUp),this.$emit("on-move-end")},handleMousedown:function(t){this.initOffset=this.isHorizontal?t.pageX:t.pageY,this.oldOffset=this.value,this.isMoving=!0,Object(a["f"])(document,"mousemove",this.handleMove),Object(a["f"])(document,"mouseup",this.handleUp),this.$emit("on-move-start")}},watch:{value:function(){this.offset=1e4*(this.valueIsPx?this.px2percent(this.value,this.$refs.outerWrapper[this.offsetSize]):this.value)/100}},mounted:function(){var t=this;this.$nextTick((function(){t.offset=1e4*(t.valueIsPx?t.px2percent(t.value,t.$refs.outerWrapper[t.offsetSize]):t.value)/100}))}},g=m,v=(n("05ea"),Object(u["a"])(g,r,s,!1,null,null,null)),x=v.exports,b=x,y=n("83ae"),w={name:"split_pane_page",components:{SplitPane:b,Icons:y["a"]},data:function(){return{offset:.2,offsetVertical:"250px"}},methods:{handleMoving:function(t){console.log(t.atMin,t.atMax)}}},M=w,$=(n("8091"),Object(u["a"])(M,i,o,!1,null,null,null));e["a"]=$.exports},"8d99":function(t,e,n){"use strict";var i=n("a064"),o=n.n(i);o.a},"98ed":function(t,e,n){},"9ee1":function(t,e,n){"use strict";(function(t){n("163d");e["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var e=this;this.setHeight(),t(window).resize((function(){e.setHeight()}))},methods:{setHeight:function(){var e=this;this.$nextTick((function(){var n=t("#framediv"),i=n.get()[0],o=window.innerHeight-i.offsetTop-e.advalue;e.frameHeight=o,e.$emit("sizechange",e.frameHeight)}))}}}}).call(this,n("a336"))},a064:function(t,e,n){},ac12:function(t,e,n){"use strict";var i=n("32fc"),o=n.n(i);o.a},b61e:function(t,e,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-175acaff"],{"05ea":function(t,e,n){"use strict";var i=n("98ed"),o=n.n(i);o.a},"302e":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{height:"100%"},attrs:{id:"orgcard"}},[n("Card",{staticStyle:{height:"100%"}},[n("Alert",{attrs:{type:"error"}},[n("template",{slot:"desc"},[n("Icon",{attrs:{type:"ios-alert-outline"}}),t._v("双击编辑,单击选择\n "),n("br"),t._v("\n      当前节点:\n "+t._s(t.currentData?t.currentData.title:"请选择操作节点")+"\n ")],1)],2),t.isupdate?t._e():n("Tree",{staticClass:"ptree",attrs:{data:t.treedata,render:t.renderContent}}),n("Drawer",{ref:"eddrawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},on:{"on-visible-change":t.ondrawvisable},model:{value:t.showedform,callback:function(e){t.showedform=e},expression:"showedform"}},[n("NodeForm",{ref:"nodeform",attrs:{fminfo:t.nodeinfo,isEditForm:""},on:{controlctl:t.controlctl},scopedSlots:t._u([{key:"default",fn:function(e){return[n("Button",{attrs:{type:"text"},on:{click:function(n){return t.doexec("ok",e.fm)}}},[t._v("保存")]),n("Button",{attrs:{type:"text"},on:{click:function(n){return t.doexec("cancel",e.fm)}}},[t._v("取消")])]}}])})],1)],1)],1)},o=[],r=n("7dfe"),s=r["a"],a=(n("8d99"),n("9ca4")),l=Object(a["a"])(s,i,o,!1,null,null,null);e["a"]=l.exports},"32fc":function(t,e,n){},"391e":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[t._t("default",null,{adjustHeight:t.frameHeight})],2)},o=[],r=n("9ee1"),s=r["a"],a=n("9ca4"),l=Object(a["a"])(s,i,o,!1,null,null,null);e["a"]=l.exports},"7dfe":function(t,e,n){"use strict";(function(t){n("e697"),n("163d"),n("c904"),n("6d57"),n("60b7");var i=n("0086");n("f121");e["a"]={name:"jsoneditor",props:{initData:{type:Function,default:function(){var t=this;return function(e){e(t.originalRoot)}}},metainfo:{type:Object}},components:{NodeForm:i["a"]},data:function(){var t=this,e="root"+this.$store.state.user.userobj.company.id,n="/"+e;return{oldnodedata:null,isupdate:!1,rootNode:null,currentData:null,currentNode:null,code:"root",treedata:[],originalMetaInfo:[{title:"基本信息",key:"baseinfo",cols:1,ctls:[{type:"number",label:"序号",prop:"seq",placeHolder:"请输入序号",style:{width:"165px"},rules:[]},{type:"input",label:"编码",prop:"code",placeHolder:"请输入编码",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"标题",prop:"title",placeHolder:"请输入节点标题",style:"",rules:[{required:!0,message:" ",trigger:"blur"}],default:"点击修改"}]},{title:"节点路径",key:"baseinfo",cols:3,ctls:[{type:"input",label:"KEY",prop:"nodeKey",placeHolder:"请输入编码",disabled:!0,style:"",rules:[]},{type:"input",label:"路径",prop:"orgpath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"input",label:"标题路径",prop:"titlepath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"number",label:"级别",prop:"level",disabled:!0,placeHolder:"",style:{width:"165px"},rules:[]}]}],originalRoot:{title:"使用者定义",code:e,expand:!0,orgpath:n,render:function(e,n){var i=n.root,o=n.node,r=n.data;return e("span",{style:{display:"inline-block",width:"100%"}},[e("span",{on:{dblclick:function(){t.onselnode(o,r)},click:function(){t.currentData=r,t.currentNode=o,t.rootNode=i,t.selclick(i,o,r)}}},[e("Icon",{props:{type:"ios-folder-outline"},style:{marginRight:"8px"}}),e("span",{},[r.title])]),e("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[e("Button",{props:Object.assign({},t.buttonProps,{icon:"md-add",type:"text"}),style:{width:"64px"},on:{click:function(){t.append(r)}}})])])},children:[]},showedform:!1,buttonProps:{type:"default",size:"small"},nodeinfo:{},treeheight:0}},mounted:function(){this.initTree()},created:function(){this.metainfo&&(this.nodeinfo=Object.assign(this.nodeinfo,this.metainfo),this.nodeinfo.main=this.nodeinfo.main.concat(this.originalMetaInfo)),window.modiTreeNodeByCode=function(t,e,n,i){i||(i=0),i++,t.forEach((function(t){t.nodeKey==e.nodeKey&&(t=Object.assign(t,e)),t.children?(n?(t.orgpath=n.orgpath+"/"+t.code,t.titlepath=n.titlepath+"/"+t.title,t.level=i):(t.orgpath=t.code,t.titlepath=t.title,t.level=i),t.children.sort((function(t,e){return Number(t.seq)>Number(e.seq)})),modiTreeNodeByCode(t.children,e,t,i)):n?(t.orgpath=n.orgpath+"/"+t.code,t.titlepath=n.titlepath+"/"+t.title,t.level=i):(t.orgpath=t.code,t.titlepath=t.title,t.level=i),t.nodeKey==e.nodeKey&&(e.orgpath=t.orgpath)}))}},methods:{selclick:function(t,e,n){this.$emit("onselnode",t,e,n)},setCtlVisable:function(t,e){this.$refs.nodeform.setCtlVisable(t,e)},controlctl:function(t,e,n){this.$emit("controlctl",t,e,n)},ondrawvisable:function(t){this.$emit("drawaction",t,this.$refs.nodeform)},resetForm:function(){this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel.children=[]},refreshTree:function(){var t=this;this.isupdate=!0,this.$nextTick((function(){t.isupdate=!1}))},doexec:function(t,e){var n=this;"ok"==t?this.$refs.nodeform.validate((function(t){if(console.log("ddddddddddddddddd",t),t){var e=n.$refs.nodeform.getNewModel();modiTreeNodeByCode(n.treedata,e,null),n.showedform=!1,n.$emit("modisave",n.treedata,e,n.oldnodedata),n.resetForm(),console.log(n.treedata)}})):(this.showedform=!1,this.resetForm())},deepclone:function(t){var e=JSON.stringify(t);return JSON.parse(e)},onselnode:function(t,e){this.showedform=!0,this.currentData=e,this.currentNode=t;var n=this.deepclone(e);this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel=n,this.oldnodedata=this.deepclone(e),this.$refs.nodeform.forminfo.main.forEach((function(t){t.ctls.forEach((function(t){"code"==t.prop&&(e.code.indexOf("root")>=0?t.disabled=!0:t.disabled=!1)}))}))},initTree:function(){var t=this;this.$nextTick((function(){t.initData&&0==t.treedata.length&&t.initData((function(e){console.log("mmmmmmmmmmmmmmmm",e),!e||e&&e[0]&&(!e.children||e.children&&0==e.children.length)||e&&0==e.length?(t.originalRoot=Object.assign(t.originalRoot,e&&e[0]?e[0]:[]),t.treedata=[t.originalRoot]):(e[0].render=t.originalRoot.render,t.treedata=e)}))}))},setHeight:function(){var e=t("#orgcard"),n=e.get()[0],i=window.innerHeight-n.offsetTop-30;e.css("height",i+"px"),this.treeheight=i},setSelCss:function(e){t("span",".ptree").removeClass("spansel"),t(e.target).parent().parent().addClass("spansel")},renderContent:function(t,e){var n=this,i=e.root,o=e.node,r=e.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",{on:{dblclick:function(t){n.setSelCss(t),n.onselnode(o,r)},click:function(t){n.setSelCss(t),n.currentData=r,n.currentNode=o,n.rootNode=i,n.selclick(i,o,r)}}},[t("Icon",{props:{type:r.children&&r.children.length>0?"ios-folder-outline":"ios-paper-outline"},style:{marginRight:"8px"}}),t("span",r.title)]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-add"}),style:{marginRight:"8px"},on:{click:function(){n.append(r)}}}),t("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-remove"}),on:{click:function(){n.remove(i,o,r)}}})])])},append:function(t){var e=t.children||[],n=this.$refs.nodeform.getNewModel();console.log("new model.........................",n),n.expand=!0,e.push(n),this.$set(t,"children",e)},remove:function(t,e,n){var i=t.find((function(t){return t===e})).parent,o=t.find((function(t){return t.nodeKey===i})).node,r=o.children.indexOf(n);o.children.splice(r,1),this.$emit("deletenode",this.treedata,n)},findParentByNode:function(t){var e=this.rootNode.find((function(e){return e===t})).parent,n=this.rootNode.find((function(t){return t.nodeKey===e})).node;return n},findByNode:function(t){}}}}).call(this,n("a336"))},8091:function(t,e,n){"use strict";var i=n("b61e"),o=n.n(i);o.a},"832e":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"split-pane-page-wrapper"},[n("split-pane",{on:{"on-moving":t.handleMoving},model:{value:t.offset,callback:function(e){t.offset=e},expression:"offset"}},[n("div",{staticClass:"pane left-pane",attrs:{slot:"left"},slot:"left"},[t._t("left")],2),n("div",{staticClass:"pane right-pane",attrs:{slot:"right"},slot:"right"},[t._t("right")],2)])],1)},o=[],r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"outerWrapper",class:t.wrapperClasses},[t.isHorizontal?n("div",{class:t.prefix+"-horizontal"},[n("div",{class:[t.prefix+"-pane","left-pane"],style:{right:t.anotherOffset+"%"}},[t._t("left")],2),n("div",{class:t.prefix+"-trigger-con",style:{left:t.offset+"%"},on:{mousedown:t.handleMousedown}},[t._t("trigger",[n("trigger",{attrs:{mode:"vertical"}})])],2),n("div",{class:[t.prefix+"-pane","right-pane"],style:{left:t.offset+"%"}},[t._t("right")],2)]):n("div",{class:t.prefix+"-vertical"},[n("div",{class:[t.prefix+"-pane","top-pane"],style:{bottom:t.anotherOffset+"%"}},[t._t("top")],2),n("div",{class:t.prefix+"-trigger-con",style:{top:t.offset+"%"},on:{mousedown:t.handleMousedown}},[t._t("trigger",[n("trigger",{attrs:{mode:"horizontal"}})])],2),n("div",{class:[t.prefix+"-pane","bottom-pane"],style:{top:t.offset+"%"}},[t._t("bottom")],2)])])},s=[],a=(n("163d"),n("90de")),l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.classes},[n("div",{class:t.barConClasses},t._m(0),0)])},c=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return t._l(8,(function(e){return n("i",{key:"trigger-"+e,class:t.prefix+"-bar"})}))}],d={name:"Trigger",props:{mode:String},data:function(){return{prefix:"ivu-split-trigger",initOffset:0}},computed:{isVertical:function(){return"vertical"===this.mode},classes:function(){return[this.prefix,this.isVertical?"".concat(this.prefix,"-vertical"):"".concat(this.prefix,"-horizontal")]},barConClasses:function(){return["".concat(this.prefix,"-bar-con"),this.isVertical?"vertical":"horizontal"]}}},f=d,u=(n("ac12"),n("9ca4")),p=Object(u["a"])(f,l,c,!1,null,null,null),h=p.exports,m={name:"SplitPane",components:{Trigger:h},props:{value:{type:[Number,String],default:.5},mode:{validator:function(t){return Object(a["g"])(t,["horizontal","vertical"])},default:"horizontal"},min:{type:[Number,String],default:"40px"},max:{type:[Number,String],default:"40px"}},data:function(){return{prefix:"ivu-split",offset:0,oldOffset:0,isMoving:!1}},computed:{wrapperClasses:function(){return["".concat(this.prefix,"-wrapper"),this.isMoving?"no-select":""]},isHorizontal:function(){return"horizontal"===this.mode},anotherOffset:function(){return 100-this.offset},valueIsPx:function(){return"string"===typeof this.value},offsetSize:function(){return this.isHorizontal?"offsetWidth":"offsetHeight"},computedMin:function(){return this.getComputedThresholdValue("min")},computedMax:function(){return this.getComputedThresholdValue("max")}},methods:{px2percent:function(t,e){return parseFloat(t)/parseFloat(e)},getComputedThresholdValue:function(t){var e=this.$refs.outerWrapper[this.offsetSize];return this.valueIsPx?"string"===typeof this[t]?this[t]:e*this[t]:"string"===typeof this[t]?this.px2percent(this[t],e):this[t]},getMin:function(t,e){return this.valueIsPx?"".concat(Math.min(parseFloat(t),parseFloat(e)),"px"):Math.min(t,e)},getMax:function(t,e){return this.valueIsPx?"".concat(Math.max(parseFloat(t),parseFloat(e)),"px"):Math.max(t,e)},getAnotherOffset:function(t){var e=0;return e=this.valueIsPx?"".concat(this.$refs.outerWrapper[this.offsetSize]-parseFloat(t),"px"):1-t,e},handleMove:function(t){var e=this.isHorizontal?t.pageX:t.pageY,n=e-this.initOffset,i=this.$refs.outerWrapper[this.offsetSize],o=this.valueIsPx?"".concat(parseFloat(this.oldOffset)+n,"px"):this.px2percent(i*this.oldOffset+n,i),r=this.getAnotherOffset(o);parseFloat(o)<=parseFloat(this.computedMin)&&(o=this.getMax(o,this.computedMin)),parseFloat(r)<=parseFloat(this.computedMax)&&(o=this.getAnotherOffset(this.getMax(r,this.computedMax))),t.atMin=this.value===this.computedMin,t.atMax=this.valueIsPx?this.getAnotherOffset(this.value)===this.computedMax:this.getAnotherOffset(this.value).toFixed(5)===this.computedMax.toFixed(5),this.$emit("input",o),this.$emit("on-moving",t)},handleUp:function(){this.isMoving=!1,Object(a["e"])(document,"mousemove",this.handleMove),Object(a["e"])(document,"mouseup",this.handleUp),this.$emit("on-move-end")},handleMousedown:function(t){this.initOffset=this.isHorizontal?t.pageX:t.pageY,this.oldOffset=this.value,this.isMoving=!0,Object(a["f"])(document,"mousemove",this.handleMove),Object(a["f"])(document,"mouseup",this.handleUp),this.$emit("on-move-start")}},watch:{value:function(){this.offset=1e4*(this.valueIsPx?this.px2percent(this.value,this.$refs.outerWrapper[this.offsetSize]):this.value)/100}},mounted:function(){var t=this;this.$nextTick((function(){t.offset=1e4*(t.valueIsPx?t.px2percent(t.value,t.$refs.outerWrapper[t.offsetSize]):t.value)/100}))}},g=m,v=(n("05ea"),Object(u["a"])(g,r,s,!1,null,null,null)),x=v.exports,b=x,y=n("83ae"),w={name:"split_pane_page",components:{SplitPane:b,Icons:y["a"]},data:function(){return{offset:.2,offsetVertical:"250px"}},methods:{handleMoving:function(t){console.log(t.atMin,t.atMax)}}},M=w,$=(n("8091"),Object(u["a"])(M,i,o,!1,null,null,null));e["a"]=$.exports},"8d99":function(t,e,n){"use strict";var i=n("a064"),o=n.n(i);o.a},"98ed":function(t,e,n){},"9ee1":function(t,e,n){"use strict";(function(t){n("163d");e["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var e=this;this.setHeight(),t(window).resize((function(){e.setHeight()}))},methods:{setHeight:function(){var e=this;this.$nextTick((function(){var n=t("#framediv"),i=n.get()[0],o=window.innerHeight-i.offsetTop-e.advalue;e.frameHeight=o,e.$emit("sizechange",e.frameHeight)}))}}}}).call(this,n("a336"))},a064:function(t,e,n){},ac12:function(t,e,n){"use strict";var i=n("32fc"),o=n.n(i);o.a},b61e:function(t,e,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1a0615f2"],{"391e":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},r=[],o=n("9ee1"),i=o["a"],s=n("9ca4"),c=Object(s["a"])(i,a,r,!1,null,null,null);t["a"]=c.exports},"3c70":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[n("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},r=[],o=n("06d3"),i={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:o["a"]},mounted:function(){},methods:{setInitWhereData:function(e){this.$refs.bt2.initWhereData=e},showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t,n){},onnew:function(){},onedit:function(){},formatCol:function(e,t,n){return e[t]}}},s=i,c=n("9ca4"),u=Object(c["a"])(s,a,r,!1,null,null,null);t["a"]=u.exports},"93e6":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var a=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"channel_info",modelName:"channel",packageName:"common",tblheight:a-120,refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),n("RefTable",{ref:"reftbl",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!0},on:{onrefselect:e.onrefselect}})]}}])})},r=[],o=(n("b449"),n("9666")),i=(n("9a33"),n("3c70")),s=n("06d3"),c=n("391e"),u=(n("60b7"),n("7e1e")),f={name:"appinfo_page",data:function(){return{channelId:-1}},components:{PageSpace:c["a"],BizTable:s["a"],RefTable:i["a"]},methods:{oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t){"authorize"==e&&(this.channelId=t.id,this.$refs.reftbl.showrefwindow(t.userids?t.userids.split(","):[]))},validmethod:function(e,t,n){return n()},formatCol:function(e,t,n){return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]},onrefselect:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.map((function(e){return e.id})),e.prev=1,e.next=4,Object(u["a"])({channelId:this.channelId,userids:n.join()});case 4:this.$refs.bt.fetchData(),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 10:case"end":return e.stop()}}),e,this,[[1,7]])})));function t(t){return e.apply(this,arguments)}return t}()}},l=f,d=n("9ca4"),m=Object(d["a"])(l,a,r,!1,null,null,null);t["default"]=m.exports},"9ee1":function(e,t,n){"use strict";(function(e){n("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var n=e("#framediv"),a=n.get()[0],r=window.innerHeight-a.offsetTop-t.advalue;t.frameHeight=r,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1a0615f2"],{"391e":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},o=[],r=n("9ee1"),i=r["a"],s=n("9ca4"),c=Object(s["a"])(i,a,o,!1,null,null,null);t["a"]=c.exports},"3c70":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[n("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},o=[],r=n("06d3"),i={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:r["a"]},mounted:function(){},methods:{showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t,n){},onnew:function(){},onedit:function(){},formatCol:function(e,t,n){return e[t]}}},s=i,c=n("9ca4"),u=Object(c["a"])(s,a,o,!1,null,null,null);t["a"]=u.exports},"93e6":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var a=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"channel_info",modelName:"channel",packageName:"common",tblheight:a-120,refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),n("RefTable",{ref:"reftbl",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!0},on:{onrefselect:e.onrefselect}})]}}])})},o=[],r=(n("b449"),n("9666")),i=(n("9a33"),n("3c70")),s=n("06d3"),c=n("391e"),u=(n("60b7"),n("7e1e")),f={name:"appinfo_page",data:function(){return{channelId:-1}},components:{PageSpace:c["a"],BizTable:s["a"],RefTable:i["a"]},methods:{oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t){"authorize"==e&&(this.channelId=t.id,this.$refs.reftbl.showrefwindow(t.userids?t.userids.split(","):[]))},validmethod:function(e,t,n){return n()},formatCol:function(e,t,n){return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]},onrefselect:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.map((function(e){return e.id})),e.prev=1,e.next=4,Object(u["a"])({channelId:this.channelId,userids:n.join()});case 4:this.$refs.bt.fetchData(),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 10:case"end":return e.stop()}}),e,this,[[1,7]])})));function t(t){return e.apply(this,arguments)}return t}()}},l=f,d=n("9ca4"),m=Object(d["a"])(l,a,o,!1,null,null,null);t["default"]=m.exports},"9ee1":function(e,t,n){"use strict";(function(e){n("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var n=e("#framediv"),a=n.get()[0],o=window.innerHeight-a.offsetTop-t.advalue;t.frameHeight=o,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("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.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61b0b1e5"],{"302e":function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{height:"100%"},attrs:{id:"orgcard"}},[n("Card",{staticStyle:{height:"100%"}},[n("Alert",{attrs:{type:"error"}},[n("template",{slot:"desc"},[n("Icon",{attrs:{type:"ios-alert-outline"}}),e._v("双击编辑,单击选择\n "),n("br"),e._v("\n      当前节点:\n "+e._s(e.currentData?e.currentData.title:"请选择操作节点")+"\n ")],1)],2),e.isupdate?e._e():n("Tree",{staticClass:"ptree",attrs:{data:e.treedata,render:e.renderContent}}),n("Drawer",{ref:"eddrawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},on:{"on-visible-change":e.ondrawvisable},model:{value:e.showedform,callback:function(t){e.showedform=t},expression:"showedform"}},[n("NodeForm",{ref:"nodeform",attrs:{fminfo:e.nodeinfo,isEditForm:""},on:{controlctl:e.controlctl},scopedSlots:e._u([{key:"default",fn:function(t){return[n("Button",{attrs:{type:"text"},on:{click:function(n){return e.doexec("ok",t.fm)}}},[e._v("保存")]),n("Button",{attrs:{type:"text"},on:{click:function(n){return e.doexec("cancel",t.fm)}}},[e._v("取消")])]}}])})],1)],1)],1)},i=[],r=n("7dfe"),a=r["a"],s=(n("8d99"),n("9ca4")),l=Object(s["a"])(a,o,i,!1,null,null,null);t["a"]=l.exports},"7dfe":function(e,t,n){"use strict";(function(e){n("e697"),n("163d"),n("c904"),n("6d57"),n("60b7");var o=n("0086");n("f121");t["a"]={name:"jsoneditor",props:{initData:{type:Function,default:function(){var e=this;return function(t){t(e.originalRoot)}}},metainfo:{type:Object}},components:{NodeForm:o["a"]},data:function(){var e=this,t="root"+this.$store.state.user.userobj.company.id,n="/"+t;return{oldnodedata:null,isupdate:!1,rootNode:null,currentData:null,currentNode:null,code:"root",treedata:[],originalMetaInfo:[{title:"基本信息",key:"baseinfo",cols:1,ctls:[{type:"number",label:"序号",prop:"seq",placeHolder:"请输入序号",style:{width:"165px"},rules:[]},{type:"input",label:"编码",prop:"code",placeHolder:"请输入编码",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"标题",prop:"title",placeHolder:"请输入节点标题",style:"",rules:[{required:!0,message:" ",trigger:"blur"}],default:"点击修改"}]},{title:"节点路径",key:"baseinfo",cols:3,ctls:[{type:"input",label:"KEY",prop:"nodeKey",placeHolder:"请输入编码",disabled:!0,style:"",rules:[]},{type:"input",label:"路径",prop:"orgpath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"input",label:"标题路径",prop:"titlepath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"number",label:"级别",prop:"level",disabled:!0,placeHolder:"",style:{width:"165px"},rules:[]}]}],originalRoot:{title:"使用者定义",code:t,expand:!0,orgpath:n,render:function(t,n){var o=n.root,i=n.node,r=n.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",{on:{dblclick:function(){e.onselnode(i,r)},click:function(){e.currentData=r,e.currentNode=i,e.rootNode=o,e.selclick(o,i,r)}}},[t("Icon",{props:{type:"ios-folder-outline"},style:{marginRight:"8px"}}),t("span",{},[r.title])]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t("Button",{props:Object.assign({},e.buttonProps,{icon:"md-add",type:"text"}),style:{width:"64px"},on:{click:function(){e.append(r)}}})])])},children:[]},showedform:!1,buttonProps:{type:"default",size:"small"},nodeinfo:{},treeheight:0}},mounted:function(){this.initTree()},created:function(){this.metainfo&&(this.nodeinfo=Object.assign(this.nodeinfo,this.metainfo),this.nodeinfo.main=this.nodeinfo.main.concat(this.originalMetaInfo)),window.modiTreeNodeByCode=function(e,t,n,o){o||(o=0),o++,e.forEach((function(e){e.nodeKey==t.nodeKey&&(e=Object.assign(e,t)),e.children?(n?(e.orgpath=n.orgpath+"/"+e.code,e.titlepath=n.titlepath+"/"+e.title,e.level=o):(e.orgpath=e.code,e.titlepath=e.title,e.level=o),e.children.sort((function(e,t){return Number(e.seq)>Number(t.seq)})),modiTreeNodeByCode(e.children,t,e,o)):n?(e.orgpath=n.orgpath+"/"+e.code,e.titlepath=n.titlepath+"/"+e.title,e.level=o):(e.orgpath=e.code,e.titlepath=e.title,e.level=o)}))}},methods:{selclick:function(e,t,n){this.$emit("onselnode",e,t,n)},setCtlVisable:function(e,t){this.$refs.nodeform.setCtlVisable(e,t)},controlctl:function(e,t,n){this.$emit("controlctl",e,t,n)},ondrawvisable:function(e){this.$emit("drawaction",e,this.$refs.nodeform)},resetForm:function(){this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel.children=[]},refreshTree:function(){var e=this;this.isupdate=!0,this.$nextTick((function(){e.isupdate=!1}))},doexec:function(e,t){var n=this;"ok"==e?this.$refs.nodeform.validate((function(e){if(console.log("ddddddddddddddddd",e),e){var t=n.$refs.nodeform.getNewModel();modiTreeNodeByCode(n.treedata,t,null),n.showedform=!1,n.$emit("modisave",n.treedata,t,n.oldnodedata),n.resetForm(),console.log(n.treedata)}})):(this.showedform=!1,this.resetForm())},deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},onselnode:function(e,t){this.showedform=!0,this.currentData=t,this.currentNode=e;var n=this.deepclone(t);this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel=n,this.oldnodedata=this.deepclone(t),this.$refs.nodeform.forminfo.main.forEach((function(e){e.ctls.forEach((function(e){"code"==e.prop&&(t.code.indexOf("root")>=0?e.disabled=!0:e.disabled=!1)}))}))},initTree:function(){var e=this;this.$nextTick((function(){e.initData&&0==e.treedata.length&&e.initData((function(t){console.log("mmmmmmmmmmmmmmmm",t),!t||t&&t[0]&&(!t.children||t.children&&0==t.children.length)||t&&0==t.length?(e.originalRoot=Object.assign(e.originalRoot,t&&t[0]?t[0]:[]),e.treedata=[e.originalRoot]):(t[0].render=e.originalRoot.render,e.treedata=t)}))}))},setHeight:function(){var t=e("#orgcard"),n=t.get()[0],o=window.innerHeight-n.offsetTop-30;t.css("height",o+"px"),this.treeheight=o},setSelCss:function(t){e("span",".ptree").removeClass("spansel"),e(t.target).parent().parent().addClass("spansel")},renderContent:function(e,t){var n=this,o=t.root,i=t.node,r=t.data;return e("span",{style:{display:"inline-block",width:"100%"}},[e("span",{on:{dblclick:function(e){n.setSelCss(e),n.onselnode(i,r)},click:function(e){n.setSelCss(e),n.currentData=r,n.currentNode=i,n.rootNode=o,n.selclick(o,i,r)}}},[e("Icon",{props:{type:r.children&&r.children.length>0?"ios-folder-outline":"ios-paper-outline"},style:{marginRight:"8px"}}),e("span",r.title)]),e("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-add"}),style:{marginRight:"8px"},on:{click:function(){n.append(r)}}}),e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-remove"}),on:{click:function(){n.remove(o,i,r)}}})])])},append:function(e){var t=e.children||[],n=this.$refs.nodeform.getNewModel();console.log("new model.........................",n),n.expand=!0,t.push(n),this.$set(e,"children",t)},remove:function(e,t,n){var o=e.find((function(e){return e===t})).parent,i=e.find((function(e){return e.nodeKey===o})).node,r=i.children.indexOf(n);i.children.splice(r,1),this.$emit("deletenode",this.treedata,n)},findParentByNode:function(e){var t=this.rootNode.find((function(t){return t===e})).parent,n=this.rootNode.find((function(e){return e.nodeKey===t})).node;return n}}}}).call(this,n("a336"))},"8d99":function(e,t,n){"use strict";var o=n("a064"),i=n.n(o);i.a},"93e4":function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OrgEditor",{ref:"functree",attrs:{initData:e.initData(),metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode}})},i=[],r=(n("60b7"),n("7e1e")),a=n("302e"),s=(n("f121"),{name:"treeinfo_page",props:{},components:{OrgEditor:a["a"]},data:function(){return{appkey:"",metainfo:{name:"节点编辑",main:[{title:"可授权范围",key:"baseinfo",cols:2,ctls:[{type:"checkgroup",dicName:"authType",label:"权限",prop:"auths",labelField:"name",valueField:"id",style:{},isHide:!1}]}],lists:null}}},mounted:function(){this.appkey=this.$route.query.appkey},methods:{onselnode:function(e,t,n){},orgsave:function(e,t){var n=this;Object(r["m"])("/web/common/appCtl/saveFuncTree",{funcJson:e,curdata:t,appkey:this.appkey}).then((function(e){var t=e.data;if(console.log("ddddddddddddddddd",t),0==t.status){var o=t.data.funcJson;console.log("save org...............................",o),n.$refs.functree.treedata=o,n.$refs.functree.refreshTree(),n.$Message.success("当前操作成功完成")}}))},drawaction:function(e,t){},controlctl:function(e,t,n){},initData:function(){var e=this,t=e.appkey;return function(e){Object(r["f"])({appkey:t}).then((function(t){var n=t.data;if(0!=n.status)throw new Error("获取功能清单数据出错");var o=n.data.funcJson;e(o)}))}}}}),l=s,d=n("9ca4"),c=Object(d["a"])(l,o,i,!1,null,null,null);t["default"]=c.exports},a064:function(e,t,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61b0b1e5"],{"302e":function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{height:"100%"},attrs:{id:"orgcard"}},[n("Card",{staticStyle:{height:"100%"}},[n("Alert",{attrs:{type:"error"}},[n("template",{slot:"desc"},[n("Icon",{attrs:{type:"ios-alert-outline"}}),e._v("双击编辑,单击选择\n "),n("br"),e._v("\n      当前节点:\n "+e._s(e.currentData?e.currentData.title:"请选择操作节点")+"\n ")],1)],2),e.isupdate?e._e():n("Tree",{staticClass:"ptree",attrs:{data:e.treedata,render:e.renderContent}}),n("Drawer",{ref:"eddrawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},on:{"on-visible-change":e.ondrawvisable},model:{value:e.showedform,callback:function(t){e.showedform=t},expression:"showedform"}},[n("NodeForm",{ref:"nodeform",attrs:{fminfo:e.nodeinfo,isEditForm:""},on:{controlctl:e.controlctl},scopedSlots:e._u([{key:"default",fn:function(t){return[n("Button",{attrs:{type:"text"},on:{click:function(n){return e.doexec("ok",t.fm)}}},[e._v("保存")]),n("Button",{attrs:{type:"text"},on:{click:function(n){return e.doexec("cancel",t.fm)}}},[e._v("取消")])]}}])})],1)],1)],1)},i=[],r=n("7dfe"),a=r["a"],s=(n("8d99"),n("9ca4")),l=Object(s["a"])(a,o,i,!1,null,null,null);t["a"]=l.exports},"7dfe":function(e,t,n){"use strict";(function(e){n("e697"),n("163d"),n("c904"),n("6d57"),n("60b7");var o=n("0086");n("f121");t["a"]={name:"jsoneditor",props:{initData:{type:Function,default:function(){var e=this;return function(t){t(e.originalRoot)}}},metainfo:{type:Object}},components:{NodeForm:o["a"]},data:function(){var e=this,t="root"+this.$store.state.user.userobj.company.id,n="/"+t;return{oldnodedata:null,isupdate:!1,rootNode:null,currentData:null,currentNode:null,code:"root",treedata:[],originalMetaInfo:[{title:"基本信息",key:"baseinfo",cols:1,ctls:[{type:"number",label:"序号",prop:"seq",placeHolder:"请输入序号",style:{width:"165px"},rules:[]},{type:"input",label:"编码",prop:"code",placeHolder:"请输入编码",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"标题",prop:"title",placeHolder:"请输入节点标题",style:"",rules:[{required:!0,message:" ",trigger:"blur"}],default:"点击修改"}]},{title:"节点路径",key:"baseinfo",cols:3,ctls:[{type:"input",label:"KEY",prop:"nodeKey",placeHolder:"请输入编码",disabled:!0,style:"",rules:[]},{type:"input",label:"路径",prop:"orgpath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"input",label:"标题路径",prop:"titlepath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"number",label:"级别",prop:"level",disabled:!0,placeHolder:"",style:{width:"165px"},rules:[]}]}],originalRoot:{title:"使用者定义",code:t,expand:!0,orgpath:n,render:function(t,n){var o=n.root,i=n.node,r=n.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",{on:{dblclick:function(){e.onselnode(i,r)},click:function(){e.currentData=r,e.currentNode=i,e.rootNode=o,e.selclick(o,i,r)}}},[t("Icon",{props:{type:"ios-folder-outline"},style:{marginRight:"8px"}}),t("span",{},[r.title])]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t("Button",{props:Object.assign({},e.buttonProps,{icon:"md-add",type:"text"}),style:{width:"64px"},on:{click:function(){e.append(r)}}})])])},children:[]},showedform:!1,buttonProps:{type:"default",size:"small"},nodeinfo:{},treeheight:0}},mounted:function(){this.initTree()},created:function(){this.metainfo&&(this.nodeinfo=Object.assign(this.nodeinfo,this.metainfo),this.nodeinfo.main=this.nodeinfo.main.concat(this.originalMetaInfo)),window.modiTreeNodeByCode=function(e,t,n,o){o||(o=0),o++,e.forEach((function(e){e.nodeKey==t.nodeKey&&(e=Object.assign(e,t)),e.children?(n?(e.orgpath=n.orgpath+"/"+e.code,e.titlepath=n.titlepath+"/"+e.title,e.level=o):(e.orgpath=e.code,e.titlepath=e.title,e.level=o),e.children.sort((function(e,t){return Number(e.seq)>Number(t.seq)})),modiTreeNodeByCode(e.children,t,e,o)):n?(e.orgpath=n.orgpath+"/"+e.code,e.titlepath=n.titlepath+"/"+e.title,e.level=o):(e.orgpath=e.code,e.titlepath=e.title,e.level=o),e.nodeKey==t.nodeKey&&(t.orgpath=e.orgpath)}))}},methods:{selclick:function(e,t,n){this.$emit("onselnode",e,t,n)},setCtlVisable:function(e,t){this.$refs.nodeform.setCtlVisable(e,t)},controlctl:function(e,t,n){this.$emit("controlctl",e,t,n)},ondrawvisable:function(e){this.$emit("drawaction",e,this.$refs.nodeform)},resetForm:function(){this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel.children=[]},refreshTree:function(){var e=this;this.isupdate=!0,this.$nextTick((function(){e.isupdate=!1}))},doexec:function(e,t){var n=this;"ok"==e?this.$refs.nodeform.validate((function(e){if(console.log("ddddddddddddddddd",e),e){var t=n.$refs.nodeform.getNewModel();modiTreeNodeByCode(n.treedata,t,null),n.showedform=!1,n.$emit("modisave",n.treedata,t,n.oldnodedata),n.resetForm(),console.log(n.treedata)}})):(this.showedform=!1,this.resetForm())},deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},onselnode:function(e,t){this.showedform=!0,this.currentData=t,this.currentNode=e;var n=this.deepclone(t);this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel=n,this.oldnodedata=this.deepclone(t),this.$refs.nodeform.forminfo.main.forEach((function(e){e.ctls.forEach((function(e){"code"==e.prop&&(t.code.indexOf("root")>=0?e.disabled=!0:e.disabled=!1)}))}))},initTree:function(){var e=this;this.$nextTick((function(){e.initData&&0==e.treedata.length&&e.initData((function(t){console.log("mmmmmmmmmmmmmmmm",t),!t||t&&t[0]&&(!t.children||t.children&&0==t.children.length)||t&&0==t.length?(e.originalRoot=Object.assign(e.originalRoot,t&&t[0]?t[0]:[]),e.treedata=[e.originalRoot]):(t[0].render=e.originalRoot.render,e.treedata=t)}))}))},setHeight:function(){var t=e("#orgcard"),n=t.get()[0],o=window.innerHeight-n.offsetTop-30;t.css("height",o+"px"),this.treeheight=o},setSelCss:function(t){e("span",".ptree").removeClass("spansel"),e(t.target).parent().parent().addClass("spansel")},renderContent:function(e,t){var n=this,o=t.root,i=t.node,r=t.data;return e("span",{style:{display:"inline-block",width:"100%"}},[e("span",{on:{dblclick:function(e){n.setSelCss(e),n.onselnode(i,r)},click:function(e){n.setSelCss(e),n.currentData=r,n.currentNode=i,n.rootNode=o,n.selclick(o,i,r)}}},[e("Icon",{props:{type:r.children&&r.children.length>0?"ios-folder-outline":"ios-paper-outline"},style:{marginRight:"8px"}}),e("span",r.title)]),e("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-add"}),style:{marginRight:"8px"},on:{click:function(){n.append(r)}}}),e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-remove"}),on:{click:function(){n.remove(o,i,r)}}})])])},append:function(e){var t=e.children||[],n=this.$refs.nodeform.getNewModel();console.log("new model.........................",n),n.expand=!0,t.push(n),this.$set(e,"children",t)},remove:function(e,t,n){var o=e.find((function(e){return e===t})).parent,i=e.find((function(e){return e.nodeKey===o})).node,r=i.children.indexOf(n);i.children.splice(r,1),this.$emit("deletenode",this.treedata,n)},findParentByNode:function(e){var t=this.rootNode.find((function(t){return t===e})).parent,n=this.rootNode.find((function(e){return e.nodeKey===t})).node;return n},findByNode:function(e){}}}}).call(this,n("a336"))},"8d99":function(e,t,n){"use strict";var o=n("a064"),i=n.n(o);i.a},"93e4":function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OrgEditor",{ref:"functree",attrs:{initData:e.initData(),metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode}})},i=[],r=(n("60b7"),n("7e1e")),a=n("302e"),s=(n("f121"),{name:"treeinfo_page",props:{},components:{OrgEditor:a["a"]},data:function(){return{appkey:"",metainfo:{name:"节点编辑",main:[{title:"可授权范围",key:"baseinfo",cols:2,ctls:[{type:"checkgroup",dicName:"authType",label:"权限",prop:"auths",labelField:"name",valueField:"id",style:{},isHide:!1}]}],lists:null}}},mounted:function(){this.appkey=this.$route.query.appkey},methods:{onselnode:function(e,t,n){},orgsave:function(e,t){var n=this;Object(r["m"])("/web/common/appCtl/saveFuncTree",{funcJson:e,curdata:t,appkey:this.appkey}).then((function(e){var t=e.data;if(console.log("ddddddddddddddddd",t),0==t.status){var o=t.data.funcJson;console.log("save org...............................",o),n.$refs.functree.treedata=o,n.$refs.functree.refreshTree(),n.$Message.success("当前操作成功完成")}}))},drawaction:function(e,t){},controlctl:function(e,t,n){},initData:function(){var e=this,t=e.appkey;return function(e){Object(r["f"])({appkey:t}).then((function(t){var n=t.data;if(0!=n.status)throw new Error("获取功能清单数据出错");var o=n.data.funcJson;e(o)}))}}}}),l=s,d=n("9ca4"),c=Object(d["a"])(l,o,i,!1,null,null,null);t["default"]=c.exports},a064:function(e,t,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65e97401"],{"079a":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var a=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{tblheight:a-120,formatCol:e.formatCol,modelName:"user",metaName:"tanent_info",packageName:"auth",isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec}})]}}])}),n("RefTable",{ref:"reftbl",attrs:{metaName:"refapp_info",modelName:"app",isMulti:!0,packageName:"common"},on:{onrefselect:e.onrefselect}})],1)},o=[],i=(n("cc57"),n("9a33"),n("6d57"),n("06d3")),s=n("3c70"),r=n("391e"),c=n("c24f"),f=n("60b7"),u={name:"userinfo_page",data:function(){return{isshowref:!1,companyid:-1}},components:{BizTable:i["a"],PageSpace:r["a"],RefTable:s["a"]},mounted:function(){},methods:{onrefselect:function(e){var t=this,n={},a=[];e.forEach((function(e){a.push({appid:e.id,title:e.title})})),n["appids"]=a,n["postcmpid"]=this.companyid,Object(f["a"])(n).then((function(e){var n=e.data;0==n.status?(t.$refs.bt.fetchData(),t.$Message.success("应用授权完成")):t.$Message.error("应用授权失败")}))},okselects:function(){var e=this,t={},n=[];this.$refs.bt2.currentSels.forEach((function(e){n.push({appid:e.id,title:e.title})})),t["appids"]=n,t["postcmpid"]=this.companyid,Object(f["a"])(t).then((function(t){var n=t.data;0==n.status?(e.$refs.bt.fetchData(),e.$Message.success("应用授权完成")):e.$Message.error("应用授权失败")}))},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return t.roles=[1],n(t)},onexec:function(e,t,n){var a=this;if(n&&"allowornot"==e&&this.$Modal.confirm({title:"提示",content:"<p>您真的要禁用租户及相关所有用户吗?</p>",loading:!0,onOk:function(){Object(c["a"])({isEnabled:t.isEnabled,company_id:t.company_id}).then((function(e){var o=e.data;0==o.status?(a.$Modal.remove(),a.$Message.success("当前操作成功完成."),t.isEnabled?n.title="禁用":n.title="启用",a.$refs.bt.fetchData()):a.$Message.error("当前操作失败,请稍后重试或联系管理员.")}))}}),"allowapps"==e){this.companyid=t.company_id;var o=t.company.appids?t.company.appids.split(","):[],i=o.map((function(e){return e.split("|")[0]}));this.$refs.reftbl.showrefwindow(i)}"refselect"==e&&console.log(this.$refs.bt2.currentSels)},onnew:function(){this.$refs.bt.setFormCtlVisable("userName",!0)},onedit:function(){this.$refs.bt.setFormCtlVisable("userName",!1)},formatCol:function(e,t,n){if("roleName"==t){var a=e.Roles.map((function(e){return e.name})).join(",");return e.roles=e.Roles.map((function(e){return e.id})),"<span>".concat(a,"</span>")}if("isEnabled"==t)return"<span>".concat(e[t]?"是":"否","</span>");if("created_at"==t)return"<span>".concat(new Date(e[t]).toLocaleString(),"</span>");if("appauths"==t){if(e.company&&e.company.appids){var o=e.company.appids.split(","),i=o.map((function(e){return"<div>".concat(e.split("|")[1],"</div>")})).join(" ");return i}return""}return"cmpName"==t&&e.company?"<span>".concat(e.company.name,"</span>"):e[t]}}},l=u,d=n("9ca4"),m=Object(d["a"])(l,a,o,!1,null,null,null);t["default"]=m.exports},"391e":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},o=[],i=n("9ee1"),s=i["a"],r=n("9ca4"),c=Object(r["a"])(s,a,o,!1,null,null,null);t["a"]=c.exports},"3c70":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[n("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},o=[],i=n("06d3"),s={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:i["a"]},mounted:function(){},methods:{showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t,n){},onnew:function(){},onedit:function(){},formatCol:function(e,t,n){return e[t]}}},r=s,c=n("9ca4"),f=Object(c["a"])(r,a,o,!1,null,null,null);t["a"]=f.exports},"9ee1":function(e,t,n){"use strict";(function(e){n("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var n=e("#framediv"),a=n.get()[0],o=window.innerHeight-a.offsetTop-t.advalue;t.frameHeight=o,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))}}]); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65e97401"],{"079a":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var a=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{tblheight:a-120,formatCol:e.formatCol,modelName:"user",metaName:"tanent_info",packageName:"auth",isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec}})]}}])}),n("RefTable",{ref:"reftbl",attrs:{metaName:"refapp_info",modelName:"app",isMulti:!0,packageName:"common"},on:{onrefselect:e.onrefselect}})],1)},o=[],i=(n("cc57"),n("9a33"),n("6d57"),n("06d3")),s=n("3c70"),r=n("391e"),c=n("c24f"),f=n("60b7"),u={name:"userinfo_page",data:function(){return{isshowref:!1,companyid:-1}},components:{BizTable:i["a"],PageSpace:r["a"],RefTable:s["a"]},mounted:function(){},methods:{onrefselect:function(e){var t=this,n={},a=[];e.forEach((function(e){a.push({appid:e.id,title:e.title})})),n["appids"]=a,n["postcmpid"]=this.companyid,Object(f["a"])(n).then((function(e){var n=e.data;0==n.status?(t.$refs.bt.fetchData(),t.$Message.success("应用授权完成")):t.$Message.error("应用授权失败")}))},okselects:function(){var e=this,t={},n=[];this.$refs.bt2.currentSels.forEach((function(e){n.push({appid:e.id,title:e.title})})),t["appids"]=n,t["postcmpid"]=this.companyid,Object(f["a"])(t).then((function(t){var n=t.data;0==n.status?(e.$refs.bt.fetchData(),e.$Message.success("应用授权完成")):e.$Message.error("应用授权失败")}))},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return t.roles=[1],n(t)},onexec:function(e,t,n){var a=this;if(n&&"allowornot"==e&&this.$Modal.confirm({title:"提示",content:"<p>您真的要禁用租户及相关所有用户吗?</p>",loading:!0,onOk:function(){Object(c["a"])({isEnabled:t.isEnabled,company_id:t.company_id}).then((function(e){var o=e.data;0==o.status?(a.$Modal.remove(),a.$Message.success("当前操作成功完成."),t.isEnabled?n.title="禁用":n.title="启用",a.$refs.bt.fetchData()):a.$Message.error("当前操作失败,请稍后重试或联系管理员.")}))}}),"allowapps"==e){this.companyid=t.company_id;var o=t.company.appids?t.company.appids.split(","):[],i=o.map((function(e){return e.split("|")[0]}));this.$refs.reftbl.showrefwindow(i)}"refselect"==e&&console.log(this.$refs.bt2.currentSels)},onnew:function(){this.$refs.bt.setFormCtlVisable("userName",!0)},onedit:function(){this.$refs.bt.setFormCtlVisable("userName",!1)},formatCol:function(e,t,n){if("roleName"==t){var a=e.Roles.map((function(e){return e.name})).join(",");return e.roles=e.Roles.map((function(e){return e.id})),"<span>".concat(a,"</span>")}if("isEnabled"==t)return"<span>".concat(e[t]?"是":"否","</span>");if("created_at"==t)return"<span>".concat(new Date(e[t]).toLocaleString(),"</span>");if("appauths"==t){if(e.company&&e.company.appids){var o=e.company.appids.split(","),i=o.map((function(e){return"<div>".concat(e.split("|")[1],"</div>")})).join(" ");return i}return""}return"cmpName"==t&&e.company?"<span>".concat(e.company.name,"</span>"):e[t]}}},l=u,d=n("9ca4"),m=Object(d["a"])(l,a,o,!1,null,null,null);t["default"]=m.exports},"391e":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},o=[],i=n("9ee1"),s=i["a"],r=n("9ca4"),c=Object(r["a"])(s,a,o,!1,null,null,null);t["a"]=c.exports},"3c70":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[n("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},o=[],i=n("06d3"),s={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:i["a"]},mounted:function(){},methods:{setInitWhereData:function(e){this.$refs.bt2.initWhereData=e},showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t,n){},onnew:function(){},onedit:function(){},formatCol:function(e,t,n){return e[t]}}},r=s,c=n("9ca4"),f=Object(c["a"])(r,a,o,!1,null,null,null);t["a"]=f.exports},"9ee1":function(e,t,n){"use strict";(function(e){n("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var n=e("#framediv"),a=n.get()[0],o=window.innerHeight-a.offsetTop-t.advalue;t.frameHeight=o,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))}}]);
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9947983a"],{"391e":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},n=[],i=a("9ee1"),r=i["a"],o=a("9ca4"),u=Object(o["a"])(r,s,n,!1,null,null,null);t["a"]=u.exports},"3c70":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[a("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},n=[],i=a("06d3"),r={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:i["a"]},mounted:function(){},methods:{showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t,a){},onnew:function(){},onedit:function(){},formatCol:function(e,t,a){return e[t]}}},o=r,u=a("9ca4"),c=Object(u["a"])(o,s,n,!1,null,null,null);t["a"]=c.exports},"4b45":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var s=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{showTotal:"",formatCol:e.formatCol,modelName:"bizopt",metaName:"allchance_info",packageName:"bizchance",baseUrl:e.baseUrl,tblheight:s-120,refvalidatemethod:e.validmethod,isMulti:!1,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd,colVisable:e.colVisable},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),a("RefTable",{ref:"reftbl",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!1},on:{onrefselect:e.onrefselect}}),a("RefTable",{ref:"reftblSuper",attrs:{modelName:"company",metaName:"simple_companyinfo",packageName:"common",isMulti:!1},on:{onrefselect:e.onrefselect}})]}}])})},n=[],i=(a("cc57"),a("b449"),a("9666")),r=a("3c70"),o=a("06d3"),u=a("391e"),c=a("db7f"),f=a("f121"),l=a("a59a"),d=a("7e1e"),h=f["a"].deliverUrl.pro,b={name:"allchance_page",data:function(){return{baseUrl:h,row:null,businessMode:""}},components:{PageSpace:u["a"],BizTable:o["a"],RefTable:r["a"]},created:function(){},watch:{$route:function(e){e.query.spname?(e.query.bizStatus?this.$refs.bt.initWhereData={facilitator_name:e.query.spname,business_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:e.query.spname},this.$refs.bt.fetchData()):e.query.bizStatus&&(this.$refs.bt.initWhereData={business_status:e.query.bizStatus,dateType:e.query.dateType},this.$refs.bt.fetchData())}},mounted:function(){this.$route.query.spname?(this.$route.query.bizStatus?this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,business_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,dateType:this.$route.query.dateType},this.$refs.bt.fetchData()):this.$route.query.bizStatus&&(this.$refs.bt.initWhereData={business_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType},this.$refs.bt.fetchData())},methods:{colVisable:function(e){return"facilitator_name"!=e.key||1==this.$store.state.user.userobj.company.id},oninitbtn:function(e){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){"submit_case"===e?(console.log("turn to case page: ",t),this.$router.push({name:"bizcase",query:{bizType:t.business_type,bizCode:t.demand_code}})):"bizdetails"===e?alert("detail"):"allocation"===e&&(this.businessMode=t.demand_code,1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):this.$refs.reftbl.showrefwindow([]))},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){if("expand"==t){this.row=e;var s="<span>xxxxxxx</span>",n=Object.assign({},this.$data),i=l["default"].extend({components:{},template:"<div>".concat(s,"</div>"),data:function(){return n},methods:{}}),r=new i;return r}var o=e[t];if("business_type"===t){var u=c["a"].business_type[o];return u}if("business_status"===t){var f=c["a"].business_status[o];return f}if("source"===t){var d=c["a"].source[o];return d}},onrefselect:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.businessMode&&t.length>0&&t[0])){e.next=18;break}if(e.prev=1,1!=this.$store.state.user.userobj.company.id){e.next=7;break}return e.next=5,Object(d["d"])({businessMode:this.businessMode,facilitatorId:t[0].id,facilitatorName:t[0].name});case 5:e.next=9;break;case 7:return e.next=9,Object(d["d"])({businessMode:this.businessMode,salesmanId:t[0].id,salesmanName:t[0].userName,salesmanOpcode:t[0].opath,salesmanPhone:t[0].mobile});case 9:this.$refs.bt.fetchData(),this.$Message.success("分配成功"),e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 16:e.next=19;break;case 18:this.$Message.error("请勾人员");case 19:case"end":return e.stop()}}),e,this,[[1,13]])})));function t(t){return e.apply(this,arguments)}return t}()}},m=b,p=a("9ca4"),y=Object(p["a"])(m,s,n,!1,null,null,null);t["default"]=y.exports},"9ee1":function(e,t,a){"use strict";(function(e){a("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),s=a.get()[0],n=window.innerHeight-s.offsetTop-t.advalue;t.frameHeight=n,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9947983a"],{"391e":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},n=[],i=a("9ee1"),r=i["a"],o=a("9ca4"),u=Object(o["a"])(r,s,n,!1,null,null,null);t["a"]=u.exports},"3c70":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Modal",{attrs:{width:850,title:"参照选择","ok-text":"确定","cancel-text":"取消"},on:{"on-ok":e.okselects},model:{value:e.isshowref,callback:function(t){e.isshowref=t},expression:"isshowref"}},[a("BizTable",{ref:"bt2",attrs:{formatCol:e.formatCol,metaName:e.metaName,modelName:e.modelName,packageName:e.packageName,tblheight:500,isMulti:e.isMulti,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit}})],1)],1)},n=[],i=a("06d3"),r={name:"reftable_window",data:function(){return{isshowref:!1}},props:["metaName","packageName","modelName","isMulti"],components:{BizTable:i["a"]},mounted:function(){},methods:{setInitWhereData:function(e){this.$refs.bt2.initWhereData=e},showrefwindow:function(e){this.isshowref=!0,this.$refs.bt2.setCheckState(e)},okselects:function(){this.$emit("onrefselect",this.$refs.bt2.currentSels)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t,a){},onnew:function(){},onedit:function(){},formatCol:function(e,t,a){return e[t]}}},o=r,u=a("9ca4"),c=Object(u["a"])(o,s,n,!1,null,null,null);t["a"]=c.exports},"4b45":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var s=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{showTotal:"",formatCol:e.formatCol,modelName:"bizopt",metaName:"allchance_info",packageName:"bizchance",baseUrl:e.baseUrl,tblheight:s-120,refvalidatemethod:e.validmethod,isMulti:!1,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd,colVisable:e.colVisable},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),a("RefTable",{ref:"reftbl",attrs:{metaName:"simple_user_info",modelName:"user",packageName:"auth",isMulti:!1},on:{onrefselect:e.onrefselect}}),a("RefTable",{ref:"reftblSuper",attrs:{modelName:"company",metaName:"simple_companyinfo",packageName:"common",isMulti:!1},on:{onrefselect:e.onrefselect}})]}}])})},n=[],i=(a("cc57"),a("b449"),a("9666")),r=a("3c70"),o=a("06d3"),u=a("391e"),c=a("db7f"),f=a("f121"),l=a("a59a"),d=a("7e1e"),h=f["a"].deliverUrl.pro,b={name:"allchance_page",data:function(){return{baseUrl:h,row:null,businessMode:""}},components:{PageSpace:u["a"],BizTable:o["a"],RefTable:r["a"]},created:function(){},watch:{$route:function(e){e.query.spname?(e.query.bizStatus?this.$refs.bt.initWhereData={facilitator_name:e.query.spname,business_status:e.query.bizStatus,dateType:e.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:e.query.spname},this.$refs.bt.fetchData()):e.query.bizStatus&&(this.$refs.bt.initWhereData={business_status:e.query.bizStatus,dateType:e.query.dateType},this.$refs.bt.fetchData())}},mounted:function(){this.$route.query.spname?(this.$route.query.bizStatus?this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,business_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType}:this.$refs.bt.initWhereData={facilitator_name:this.$route.query.spname,dateType:this.$route.query.dateType},this.$refs.bt.fetchData()):this.$route.query.bizStatus&&(this.$refs.bt.initWhereData={business_status:this.$route.query.bizStatus,dateType:this.$route.query.dateType},this.$refs.bt.fetchData())},methods:{colVisable:function(e){return"facilitator_name"!=e.key||1==this.$store.state.user.userobj.company.id},oninitbtn:function(e){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){"submit_case"===e?(console.log("turn to case page: ",t),this.$router.push({name:"bizcase",query:{bizType:t.business_type,bizCode:t.demand_code}})):"bizdetails"===e?alert("detail"):"allocation"===e&&(this.businessMode=t.demand_code,1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):(this.$refs.reftbl.showrefwindow([]),this.$refs.reftbl.setInitWhereData({isAllocated:1,isSalesman:1})))},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){if("expand"==t){this.row=e;var s="<span>xxxxxxx</span>",n=Object.assign({},this.$data),i=l["default"].extend({components:{},template:"<div>".concat(s,"</div>"),data:function(){return n},methods:{}}),r=new i;return r}var o=e[t];if("business_type"===t){var u=c["a"].business_type[o];return u}if("business_status"===t){var f=c["a"].business_status[o];return f}if("source"===t){var d=c["a"].source[o];return d}},onrefselect:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.businessMode&&t.length>0&&t[0])){e.next=18;break}if(e.prev=1,1!=this.$store.state.user.userobj.company.id){e.next=7;break}return e.next=5,Object(d["d"])({businessMode:this.businessMode,facilitatorId:t[0].id,facilitatorName:t[0].name});case 5:e.next=9;break;case 7:return e.next=9,Object(d["d"])({businessMode:this.businessMode,salesmanId:t[0].id,salesmanName:t[0].userName,salesmanOpcode:t[0].opath,salesmanPhone:t[0].mobile});case 9:this.$refs.bt.fetchData(),this.$Message.success("分配成功"),e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 16:e.next=19;break;case 18:this.$Message.error("请勾人员");case 19:case"end":return e.stop()}}),e,this,[[1,13]])})));function t(t){return e.apply(this,arguments)}return t}()}},m=b,p=a("9ca4"),y=Object(p["a"])(m,s,n,!1,null,null,null);t["default"]=y.exports},"9ee1":function(e,t,a){"use strict";(function(e){a("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),s=a.get()[0],n=window.innerHeight-s.offsetTop-t.advalue;t.frameHeight=n,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7e51fa0"],{"14ed":function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("OrgEditor",{ref:"functree",attrs:{initData:e.initData(),metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode}})],1)},i=[],r=(n("60b7"),n("7e1e")),a=n("302e"),s=(n("f121"),{name:"treeinfo_page",props:{},components:{OrgEditor:a["a"]},data:function(){return{appkey:"",metainfo:{name:"节点编辑",main:[{title:"层级",key:"baseinfo",cols:2,ctls:[{type:"input",rules:[],label:"级别",prop:"level",disabled:!0,style:{},isHide:!1}]}],lists:null}}},mounted:function(){this.appkey=this.$route.query.appkey},methods:{onselnode:function(e,t,n){},orgsave:function(e,t){var n=this;Object(r["m"])("/web/common/treearchCtl/saveRegions",{regionJson:e}).then((function(e){var t=e.data;if(console.log("ddddddddddddddddd",t),0==t.status){var o=t.data.regionJson;console.log("save org...............................",o),n.$refs.functree.treedata=o,n.$refs.functree.refreshTree(),n.$Message.success("当前操作成功完成")}}))},drawaction:function(e,t){},controlctl:function(e,t,n){},initData:function(){var e=this;e.appkey;return function(e){Object(r["i"])().then((function(t){var n=t.data;if(0!=n.status)throw new Error("获取功能清单数据出错");var o=n.data.regionJson;e(o)}))}}}}),l=s,d=n("9ca4"),c=Object(d["a"])(l,o,i,!1,null,null,null);t["default"]=c.exports},"302e":function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{height:"100%"},attrs:{id:"orgcard"}},[n("Card",{staticStyle:{height:"100%"}},[n("Alert",{attrs:{type:"error"}},[n("template",{slot:"desc"},[n("Icon",{attrs:{type:"ios-alert-outline"}}),e._v("双击编辑,单击选择\n "),n("br"),e._v("\n      当前节点:\n "+e._s(e.currentData?e.currentData.title:"请选择操作节点")+"\n ")],1)],2),e.isupdate?e._e():n("Tree",{staticClass:"ptree",attrs:{data:e.treedata,render:e.renderContent}}),n("Drawer",{ref:"eddrawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},on:{"on-visible-change":e.ondrawvisable},model:{value:e.showedform,callback:function(t){e.showedform=t},expression:"showedform"}},[n("NodeForm",{ref:"nodeform",attrs:{fminfo:e.nodeinfo,isEditForm:""},on:{controlctl:e.controlctl},scopedSlots:e._u([{key:"default",fn:function(t){return[n("Button",{attrs:{type:"text"},on:{click:function(n){return e.doexec("ok",t.fm)}}},[e._v("保存")]),n("Button",{attrs:{type:"text"},on:{click:function(n){return e.doexec("cancel",t.fm)}}},[e._v("取消")])]}}])})],1)],1)],1)},i=[],r=n("7dfe"),a=r["a"],s=(n("8d99"),n("9ca4")),l=Object(s["a"])(a,o,i,!1,null,null,null);t["a"]=l.exports},"7dfe":function(e,t,n){"use strict";(function(e){n("e697"),n("163d"),n("c904"),n("6d57"),n("60b7");var o=n("0086");n("f121");t["a"]={name:"jsoneditor",props:{initData:{type:Function,default:function(){var e=this;return function(t){t(e.originalRoot)}}},metainfo:{type:Object}},components:{NodeForm:o["a"]},data:function(){var e=this,t="root"+this.$store.state.user.userobj.company.id,n="/"+t;return{oldnodedata:null,isupdate:!1,rootNode:null,currentData:null,currentNode:null,code:"root",treedata:[],originalMetaInfo:[{title:"基本信息",key:"baseinfo",cols:1,ctls:[{type:"number",label:"序号",prop:"seq",placeHolder:"请输入序号",style:{width:"165px"},rules:[]},{type:"input",label:"编码",prop:"code",placeHolder:"请输入编码",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"标题",prop:"title",placeHolder:"请输入节点标题",style:"",rules:[{required:!0,message:" ",trigger:"blur"}],default:"点击修改"}]},{title:"节点路径",key:"baseinfo",cols:3,ctls:[{type:"input",label:"KEY",prop:"nodeKey",placeHolder:"请输入编码",disabled:!0,style:"",rules:[]},{type:"input",label:"路径",prop:"orgpath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"input",label:"标题路径",prop:"titlepath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"number",label:"级别",prop:"level",disabled:!0,placeHolder:"",style:{width:"165px"},rules:[]}]}],originalRoot:{title:"使用者定义",code:t,expand:!0,orgpath:n,render:function(t,n){var o=n.root,i=n.node,r=n.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",{on:{dblclick:function(){e.onselnode(i,r)},click:function(){e.currentData=r,e.currentNode=i,e.rootNode=o,e.selclick(o,i,r)}}},[t("Icon",{props:{type:"ios-folder-outline"},style:{marginRight:"8px"}}),t("span",{},[r.title])]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t("Button",{props:Object.assign({},e.buttonProps,{icon:"md-add",type:"text"}),style:{width:"64px"},on:{click:function(){e.append(r)}}})])])},children:[]},showedform:!1,buttonProps:{type:"default",size:"small"},nodeinfo:{},treeheight:0}},mounted:function(){this.initTree()},created:function(){this.metainfo&&(this.nodeinfo=Object.assign(this.nodeinfo,this.metainfo),this.nodeinfo.main=this.nodeinfo.main.concat(this.originalMetaInfo)),window.modiTreeNodeByCode=function(e,t,n,o){o||(o=0),o++,e.forEach((function(e){e.nodeKey==t.nodeKey&&(e=Object.assign(e,t)),e.children?(n?(e.orgpath=n.orgpath+"/"+e.code,e.titlepath=n.titlepath+"/"+e.title,e.level=o):(e.orgpath=e.code,e.titlepath=e.title,e.level=o),e.children.sort((function(e,t){return Number(e.seq)>Number(t.seq)})),modiTreeNodeByCode(e.children,t,e,o)):n?(e.orgpath=n.orgpath+"/"+e.code,e.titlepath=n.titlepath+"/"+e.title,e.level=o):(e.orgpath=e.code,e.titlepath=e.title,e.level=o)}))}},methods:{selclick:function(e,t,n){this.$emit("onselnode",e,t,n)},setCtlVisable:function(e,t){this.$refs.nodeform.setCtlVisable(e,t)},controlctl:function(e,t,n){this.$emit("controlctl",e,t,n)},ondrawvisable:function(e){this.$emit("drawaction",e,this.$refs.nodeform)},resetForm:function(){this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel.children=[]},refreshTree:function(){var e=this;this.isupdate=!0,this.$nextTick((function(){e.isupdate=!1}))},doexec:function(e,t){var n=this;"ok"==e?this.$refs.nodeform.validate((function(e){if(console.log("ddddddddddddddddd",e),e){var t=n.$refs.nodeform.getNewModel();modiTreeNodeByCode(n.treedata,t,null),n.showedform=!1,n.$emit("modisave",n.treedata,t,n.oldnodedata),n.resetForm(),console.log(n.treedata)}})):(this.showedform=!1,this.resetForm())},deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},onselnode:function(e,t){this.showedform=!0,this.currentData=t,this.currentNode=e;var n=this.deepclone(t);this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel=n,this.oldnodedata=this.deepclone(t),this.$refs.nodeform.forminfo.main.forEach((function(e){e.ctls.forEach((function(e){"code"==e.prop&&(t.code.indexOf("root")>=0?e.disabled=!0:e.disabled=!1)}))}))},initTree:function(){var e=this;this.$nextTick((function(){e.initData&&0==e.treedata.length&&e.initData((function(t){console.log("mmmmmmmmmmmmmmmm",t),!t||t&&t[0]&&(!t.children||t.children&&0==t.children.length)||t&&0==t.length?(e.originalRoot=Object.assign(e.originalRoot,t&&t[0]?t[0]:[]),e.treedata=[e.originalRoot]):(t[0].render=e.originalRoot.render,e.treedata=t)}))}))},setHeight:function(){var t=e("#orgcard"),n=t.get()[0],o=window.innerHeight-n.offsetTop-30;t.css("height",o+"px"),this.treeheight=o},setSelCss:function(t){e("span",".ptree").removeClass("spansel"),e(t.target).parent().parent().addClass("spansel")},renderContent:function(e,t){var n=this,o=t.root,i=t.node,r=t.data;return e("span",{style:{display:"inline-block",width:"100%"}},[e("span",{on:{dblclick:function(e){n.setSelCss(e),n.onselnode(i,r)},click:function(e){n.setSelCss(e),n.currentData=r,n.currentNode=i,n.rootNode=o,n.selclick(o,i,r)}}},[e("Icon",{props:{type:r.children&&r.children.length>0?"ios-folder-outline":"ios-paper-outline"},style:{marginRight:"8px"}}),e("span",r.title)]),e("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-add"}),style:{marginRight:"8px"},on:{click:function(){n.append(r)}}}),e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-remove"}),on:{click:function(){n.remove(o,i,r)}}})])])},append:function(e){var t=e.children||[],n=this.$refs.nodeform.getNewModel();console.log("new model.........................",n),n.expand=!0,t.push(n),this.$set(e,"children",t)},remove:function(e,t,n){var o=e.find((function(e){return e===t})).parent,i=e.find((function(e){return e.nodeKey===o})).node,r=i.children.indexOf(n);i.children.splice(r,1),this.$emit("deletenode",this.treedata,n)},findParentByNode:function(e){var t=this.rootNode.find((function(t){return t===e})).parent,n=this.rootNode.find((function(e){return e.nodeKey===t})).node;return n}}}}).call(this,n("a336"))},"8d99":function(e,t,n){"use strict";var o=n("a064"),i=n.n(o);i.a},a064:function(e,t,n){}}]); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7e51fa0"],{"14ed":function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("OrgEditor",{ref:"functree",attrs:{initData:e.initData(),metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode}})],1)},i=[],r=(n("60b7"),n("7e1e")),a=n("302e"),s=(n("f121"),{name:"treeinfo_page",props:{},components:{OrgEditor:a["a"]},data:function(){return{appkey:"",metainfo:{name:"节点编辑",main:[{title:"层级",key:"baseinfo",cols:2,ctls:[{type:"input",rules:[],label:"级别",prop:"level",disabled:!0,style:{},isHide:!1}]}],lists:null}}},mounted:function(){this.appkey=this.$route.query.appkey},methods:{onselnode:function(e,t,n){},orgsave:function(e,t){var n=this;Object(r["m"])("/web/common/treearchCtl/saveRegions",{regionJson:e}).then((function(e){var t=e.data;if(console.log("ddddddddddddddddd",t),0==t.status){var o=t.data.regionJson;console.log("save org...............................",o),n.$refs.functree.treedata=o,n.$refs.functree.refreshTree(),n.$Message.success("当前操作成功完成")}}))},drawaction:function(e,t){},controlctl:function(e,t,n){},initData:function(){var e=this;e.appkey;return function(e){Object(r["i"])().then((function(t){var n=t.data;if(0!=n.status)throw new Error("获取功能清单数据出错");var o=n.data.regionJson;e(o)}))}}}}),l=s,d=n("9ca4"),c=Object(d["a"])(l,o,i,!1,null,null,null);t["default"]=c.exports},"302e":function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{height:"100%"},attrs:{id:"orgcard"}},[n("Card",{staticStyle:{height:"100%"}},[n("Alert",{attrs:{type:"error"}},[n("template",{slot:"desc"},[n("Icon",{attrs:{type:"ios-alert-outline"}}),e._v("双击编辑,单击选择\n "),n("br"),e._v("\n      当前节点:\n "+e._s(e.currentData?e.currentData.title:"请选择操作节点")+"\n ")],1)],2),e.isupdate?e._e():n("Tree",{staticClass:"ptree",attrs:{data:e.treedata,render:e.renderContent}}),n("Drawer",{ref:"eddrawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},on:{"on-visible-change":e.ondrawvisable},model:{value:e.showedform,callback:function(t){e.showedform=t},expression:"showedform"}},[n("NodeForm",{ref:"nodeform",attrs:{fminfo:e.nodeinfo,isEditForm:""},on:{controlctl:e.controlctl},scopedSlots:e._u([{key:"default",fn:function(t){return[n("Button",{attrs:{type:"text"},on:{click:function(n){return e.doexec("ok",t.fm)}}},[e._v("保存")]),n("Button",{attrs:{type:"text"},on:{click:function(n){return e.doexec("cancel",t.fm)}}},[e._v("取消")])]}}])})],1)],1)],1)},i=[],r=n("7dfe"),a=r["a"],s=(n("8d99"),n("9ca4")),l=Object(s["a"])(a,o,i,!1,null,null,null);t["a"]=l.exports},"7dfe":function(e,t,n){"use strict";(function(e){n("e697"),n("163d"),n("c904"),n("6d57"),n("60b7");var o=n("0086");n("f121");t["a"]={name:"jsoneditor",props:{initData:{type:Function,default:function(){var e=this;return function(t){t(e.originalRoot)}}},metainfo:{type:Object}},components:{NodeForm:o["a"]},data:function(){var e=this,t="root"+this.$store.state.user.userobj.company.id,n="/"+t;return{oldnodedata:null,isupdate:!1,rootNode:null,currentData:null,currentNode:null,code:"root",treedata:[],originalMetaInfo:[{title:"基本信息",key:"baseinfo",cols:1,ctls:[{type:"number",label:"序号",prop:"seq",placeHolder:"请输入序号",style:{width:"165px"},rules:[]},{type:"input",label:"编码",prop:"code",placeHolder:"请输入编码",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"标题",prop:"title",placeHolder:"请输入节点标题",style:"",rules:[{required:!0,message:" ",trigger:"blur"}],default:"点击修改"}]},{title:"节点路径",key:"baseinfo",cols:3,ctls:[{type:"input",label:"KEY",prop:"nodeKey",placeHolder:"请输入编码",disabled:!0,style:"",rules:[]},{type:"input",label:"路径",prop:"orgpath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"input",label:"标题路径",prop:"titlepath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"number",label:"级别",prop:"level",disabled:!0,placeHolder:"",style:{width:"165px"},rules:[]}]}],originalRoot:{title:"使用者定义",code:t,expand:!0,orgpath:n,render:function(t,n){var o=n.root,i=n.node,r=n.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",{on:{dblclick:function(){e.onselnode(i,r)},click:function(){e.currentData=r,e.currentNode=i,e.rootNode=o,e.selclick(o,i,r)}}},[t("Icon",{props:{type:"ios-folder-outline"},style:{marginRight:"8px"}}),t("span",{},[r.title])]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t("Button",{props:Object.assign({},e.buttonProps,{icon:"md-add",type:"text"}),style:{width:"64px"},on:{click:function(){e.append(r)}}})])])},children:[]},showedform:!1,buttonProps:{type:"default",size:"small"},nodeinfo:{},treeheight:0}},mounted:function(){this.initTree()},created:function(){this.metainfo&&(this.nodeinfo=Object.assign(this.nodeinfo,this.metainfo),this.nodeinfo.main=this.nodeinfo.main.concat(this.originalMetaInfo)),window.modiTreeNodeByCode=function(e,t,n,o){o||(o=0),o++,e.forEach((function(e){e.nodeKey==t.nodeKey&&(e=Object.assign(e,t)),e.children?(n?(e.orgpath=n.orgpath+"/"+e.code,e.titlepath=n.titlepath+"/"+e.title,e.level=o):(e.orgpath=e.code,e.titlepath=e.title,e.level=o),e.children.sort((function(e,t){return Number(e.seq)>Number(t.seq)})),modiTreeNodeByCode(e.children,t,e,o)):n?(e.orgpath=n.orgpath+"/"+e.code,e.titlepath=n.titlepath+"/"+e.title,e.level=o):(e.orgpath=e.code,e.titlepath=e.title,e.level=o),e.nodeKey==t.nodeKey&&(t.orgpath=e.orgpath)}))}},methods:{selclick:function(e,t,n){this.$emit("onselnode",e,t,n)},setCtlVisable:function(e,t){this.$refs.nodeform.setCtlVisable(e,t)},controlctl:function(e,t,n){this.$emit("controlctl",e,t,n)},ondrawvisable:function(e){this.$emit("drawaction",e,this.$refs.nodeform)},resetForm:function(){this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel.children=[]},refreshTree:function(){var e=this;this.isupdate=!0,this.$nextTick((function(){e.isupdate=!1}))},doexec:function(e,t){var n=this;"ok"==e?this.$refs.nodeform.validate((function(e){if(console.log("ddddddddddddddddd",e),e){var t=n.$refs.nodeform.getNewModel();modiTreeNodeByCode(n.treedata,t,null),n.showedform=!1,n.$emit("modisave",n.treedata,t,n.oldnodedata),n.resetForm(),console.log(n.treedata)}})):(this.showedform=!1,this.resetForm())},deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},onselnode:function(e,t){this.showedform=!0,this.currentData=t,this.currentNode=e;var n=this.deepclone(t);this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel=n,this.oldnodedata=this.deepclone(t),this.$refs.nodeform.forminfo.main.forEach((function(e){e.ctls.forEach((function(e){"code"==e.prop&&(t.code.indexOf("root")>=0?e.disabled=!0:e.disabled=!1)}))}))},initTree:function(){var e=this;this.$nextTick((function(){e.initData&&0==e.treedata.length&&e.initData((function(t){console.log("mmmmmmmmmmmmmmmm",t),!t||t&&t[0]&&(!t.children||t.children&&0==t.children.length)||t&&0==t.length?(e.originalRoot=Object.assign(e.originalRoot,t&&t[0]?t[0]:[]),e.treedata=[e.originalRoot]):(t[0].render=e.originalRoot.render,e.treedata=t)}))}))},setHeight:function(){var t=e("#orgcard"),n=t.get()[0],o=window.innerHeight-n.offsetTop-30;t.css("height",o+"px"),this.treeheight=o},setSelCss:function(t){e("span",".ptree").removeClass("spansel"),e(t.target).parent().parent().addClass("spansel")},renderContent:function(e,t){var n=this,o=t.root,i=t.node,r=t.data;return e("span",{style:{display:"inline-block",width:"100%"}},[e("span",{on:{dblclick:function(e){n.setSelCss(e),n.onselnode(i,r)},click:function(e){n.setSelCss(e),n.currentData=r,n.currentNode=i,n.rootNode=o,n.selclick(o,i,r)}}},[e("Icon",{props:{type:r.children&&r.children.length>0?"ios-folder-outline":"ios-paper-outline"},style:{marginRight:"8px"}}),e("span",r.title)]),e("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-add"}),style:{marginRight:"8px"},on:{click:function(){n.append(r)}}}),e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-remove"}),on:{click:function(){n.remove(o,i,r)}}})])])},append:function(e){var t=e.children||[],n=this.$refs.nodeform.getNewModel();console.log("new model.........................",n),n.expand=!0,t.push(n),this.$set(e,"children",t)},remove:function(e,t,n){var o=e.find((function(e){return e===t})).parent,i=e.find((function(e){return e.nodeKey===o})).node,r=i.children.indexOf(n);i.children.splice(r,1),this.$emit("deletenode",this.treedata,n)},findParentByNode:function(e){var t=this.rootNode.find((function(t){return t===e})).parent,n=this.rootNode.find((function(e){return e.nodeKey===t})).node;return n},findByNode:function(e){}}}}).call(this,n("a336"))},"8d99":function(e,t,n){"use strict";var o=n("a064"),i=n.n(o);i.a},a064:function(e,t,n){}}]);
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ff3eaeb0"],{"302e":function(e,t,o){"use strict";var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticStyle:{height:"100%"},attrs:{id:"orgcard"}},[o("Card",{staticStyle:{height:"100%"}},[o("Alert",{attrs:{type:"error"}},[o("template",{slot:"desc"},[o("Icon",{attrs:{type:"ios-alert-outline"}}),e._v("双击编辑,单击选择\n "),o("br"),e._v("\n      当前节点:\n "+e._s(e.currentData?e.currentData.title:"请选择操作节点")+"\n ")],1)],2),e.isupdate?e._e():o("Tree",{staticClass:"ptree",attrs:{data:e.treedata,render:e.renderContent}}),o("Drawer",{ref:"eddrawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},on:{"on-visible-change":e.ondrawvisable},model:{value:e.showedform,callback:function(t){e.showedform=t},expression:"showedform"}},[o("NodeForm",{ref:"nodeform",attrs:{fminfo:e.nodeinfo,isEditForm:""},on:{controlctl:e.controlctl},scopedSlots:e._u([{key:"default",fn:function(t){return[o("Button",{attrs:{type:"text"},on:{click:function(o){return e.doexec("ok",t.fm)}}},[e._v("保存")]),o("Button",{attrs:{type:"text"},on:{click:function(o){return e.doexec("cancel",t.fm)}}},[e._v("取消")])]}}])})],1)],1)],1)},i=[],r=o("7dfe"),a=r["a"],s=(o("8d99"),o("9ca4")),l=Object(s["a"])(a,n,i,!1,null,null,null);t["a"]=l.exports},"7dfe":function(e,t,o){"use strict";(function(e){o("e697"),o("163d"),o("c904"),o("6d57"),o("60b7");var n=o("0086");o("f121");t["a"]={name:"jsoneditor",props:{initData:{type:Function,default:function(){var e=this;return function(t){t(e.originalRoot)}}},metainfo:{type:Object}},components:{NodeForm:n["a"]},data:function(){var e=this,t="root"+this.$store.state.user.userobj.company.id,o="/"+t;return{oldnodedata:null,isupdate:!1,rootNode:null,currentData:null,currentNode:null,code:"root",treedata:[],originalMetaInfo:[{title:"基本信息",key:"baseinfo",cols:1,ctls:[{type:"number",label:"序号",prop:"seq",placeHolder:"请输入序号",style:{width:"165px"},rules:[]},{type:"input",label:"编码",prop:"code",placeHolder:"请输入编码",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"标题",prop:"title",placeHolder:"请输入节点标题",style:"",rules:[{required:!0,message:" ",trigger:"blur"}],default:"点击修改"}]},{title:"节点路径",key:"baseinfo",cols:3,ctls:[{type:"input",label:"KEY",prop:"nodeKey",placeHolder:"请输入编码",disabled:!0,style:"",rules:[]},{type:"input",label:"路径",prop:"orgpath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"input",label:"标题路径",prop:"titlepath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"number",label:"级别",prop:"level",disabled:!0,placeHolder:"",style:{width:"165px"},rules:[]}]}],originalRoot:{title:"使用者定义",code:t,expand:!0,orgpath:o,render:function(t,o){var n=o.root,i=o.node,r=o.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",{on:{dblclick:function(){e.onselnode(i,r)},click:function(){e.currentData=r,e.currentNode=i,e.rootNode=n,e.selclick(n,i,r)}}},[t("Icon",{props:{type:"ios-folder-outline"},style:{marginRight:"8px"}}),t("span",{},[r.title])]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t("Button",{props:Object.assign({},e.buttonProps,{icon:"md-add",type:"text"}),style:{width:"64px"},on:{click:function(){e.append(r)}}})])])},children:[]},showedform:!1,buttonProps:{type:"default",size:"small"},nodeinfo:{},treeheight:0}},mounted:function(){this.initTree()},created:function(){this.metainfo&&(this.nodeinfo=Object.assign(this.nodeinfo,this.metainfo),this.nodeinfo.main=this.nodeinfo.main.concat(this.originalMetaInfo)),window.modiTreeNodeByCode=function(e,t,o,n){n||(n=0),n++,e.forEach((function(e){e.nodeKey==t.nodeKey&&(e=Object.assign(e,t)),e.children?(o?(e.orgpath=o.orgpath+"/"+e.code,e.titlepath=o.titlepath+"/"+e.title,e.level=n):(e.orgpath=e.code,e.titlepath=e.title,e.level=n),e.children.sort((function(e,t){return Number(e.seq)>Number(t.seq)})),modiTreeNodeByCode(e.children,t,e,n)):o?(e.orgpath=o.orgpath+"/"+e.code,e.titlepath=o.titlepath+"/"+e.title,e.level=n):(e.orgpath=e.code,e.titlepath=e.title,e.level=n)}))}},methods:{selclick:function(e,t,o){this.$emit("onselnode",e,t,o)},setCtlVisable:function(e,t){this.$refs.nodeform.setCtlVisable(e,t)},controlctl:function(e,t,o){this.$emit("controlctl",e,t,o)},ondrawvisable:function(e){this.$emit("drawaction",e,this.$refs.nodeform)},resetForm:function(){this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel.children=[]},refreshTree:function(){var e=this;this.isupdate=!0,this.$nextTick((function(){e.isupdate=!1}))},doexec:function(e,t){var o=this;"ok"==e?this.$refs.nodeform.validate((function(e){if(console.log("ddddddddddddddddd",e),e){var t=o.$refs.nodeform.getNewModel();modiTreeNodeByCode(o.treedata,t,null),o.showedform=!1,o.$emit("modisave",o.treedata,t,o.oldnodedata),o.resetForm(),console.log(o.treedata)}})):(this.showedform=!1,this.resetForm())},deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},onselnode:function(e,t){this.showedform=!0,this.currentData=t,this.currentNode=e;var o=this.deepclone(t);this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel=o,this.oldnodedata=this.deepclone(t),this.$refs.nodeform.forminfo.main.forEach((function(e){e.ctls.forEach((function(e){"code"==e.prop&&(t.code.indexOf("root")>=0?e.disabled=!0:e.disabled=!1)}))}))},initTree:function(){var e=this;this.$nextTick((function(){e.initData&&0==e.treedata.length&&e.initData((function(t){console.log("mmmmmmmmmmmmmmmm",t),!t||t&&t[0]&&(!t.children||t.children&&0==t.children.length)||t&&0==t.length?(e.originalRoot=Object.assign(e.originalRoot,t&&t[0]?t[0]:[]),e.treedata=[e.originalRoot]):(t[0].render=e.originalRoot.render,e.treedata=t)}))}))},setHeight:function(){var t=e("#orgcard"),o=t.get()[0],n=window.innerHeight-o.offsetTop-30;t.css("height",n+"px"),this.treeheight=n},setSelCss:function(t){e("span",".ptree").removeClass("spansel"),e(t.target).parent().parent().addClass("spansel")},renderContent:function(e,t){var o=this,n=t.root,i=t.node,r=t.data;return e("span",{style:{display:"inline-block",width:"100%"}},[e("span",{on:{dblclick:function(e){o.setSelCss(e),o.onselnode(i,r)},click:function(e){o.setSelCss(e),o.currentData=r,o.currentNode=i,o.rootNode=n,o.selclick(n,i,r)}}},[e("Icon",{props:{type:r.children&&r.children.length>0?"ios-folder-outline":"ios-paper-outline"},style:{marginRight:"8px"}}),e("span",r.title)]),e("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-add"}),style:{marginRight:"8px"},on:{click:function(){o.append(r)}}}),e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-remove"}),on:{click:function(){o.remove(n,i,r)}}})])])},append:function(e){var t=e.children||[],o=this.$refs.nodeform.getNewModel();console.log("new model.........................",o),o.expand=!0,t.push(o),this.$set(e,"children",t)},remove:function(e,t,o){var n=e.find((function(e){return e===t})).parent,i=e.find((function(e){return e.nodeKey===n})).node,r=i.children.indexOf(o);i.children.splice(r,1),this.$emit("deletenode",this.treedata,o)},findParentByNode:function(e){var t=this.rootNode.find((function(t){return t===e})).parent,o=this.rootNode.find((function(e){return e.nodeKey===t})).node;return o}}}}).call(this,o("a336"))},8442:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("OrgEditor",{ref:"functree",attrs:{initData:e.initData(),metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode}})],1)},i=[],r=(o("60b7"),o("7e1e")),a=o("302e"),s=(o("f121"),{name:"treeinfo_page",props:{},components:{OrgEditor:a["a"]},data:function(){return{appkey:"",metainfo:{name:"节点编辑",main:[{title:"附件信息",key:"baseinfo",cols:2,ctls:[{type:"upload",rules:[],label:"列表图片",prop:"listimg",disabled:!0,style:{},isHide:!1},{type:"input",rules:[],label:"类别简介",prop:"simpleDesc",disabled:!1,style:"width:300px",isHide:!1},{type:"upload",rules:[],label:"详情图片",prop:"detailimg",disabled:!0,style:{},isHide:!1},{type:"textarea",rules:[],label:"详情描述",prop:"desc",disabled:!0,style:"width:300px",isHide:!1}]}],lists:null}}},mounted:function(){this.appkey=this.$route.query.appkey},methods:{onselnode:function(e,t,o){},orgsave:function(e,t){var o=this;Object(r["m"])("/web/common/treearchCtl/saveProductcats",{productcatJson:e}).then((function(e){var t=e.data;if(console.log("ddddddddddddddddd",t),0==t.status){var n=t.data.productcatJson;console.log("save org...............................",n),o.$refs.functree.treedata=n,o.$refs.functree.refreshTree(),o.$Message.success("当前操作成功完成")}}))},drawaction:function(e,t){},controlctl:function(e,t,o){},initData:function(){var e=this;e.appkey;return function(e){Object(r["h"])().then((function(t){var o=t.data;if(0!=o.status)throw new Error("获取功能清单数据出错");var n=o.data.productcatJson;e(n)}))}}}}),l=s,d=o("9ca4"),c=Object(d["a"])(l,n,i,!1,null,null,null);t["default"]=c.exports},"8d99":function(e,t,o){"use strict";var n=o("a064"),i=o.n(n);i.a},a064:function(e,t,o){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ff3eaeb0"],{"302e":function(e,t,o){"use strict";var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticStyle:{height:"100%"},attrs:{id:"orgcard"}},[o("Card",{staticStyle:{height:"100%"}},[o("Alert",{attrs:{type:"error"}},[o("template",{slot:"desc"},[o("Icon",{attrs:{type:"ios-alert-outline"}}),e._v("双击编辑,单击选择\n "),o("br"),e._v("\n      当前节点:\n "+e._s(e.currentData?e.currentData.title:"请选择操作节点")+"\n ")],1)],2),e.isupdate?e._e():o("Tree",{staticClass:"ptree",attrs:{data:e.treedata,render:e.renderContent}}),o("Drawer",{ref:"eddrawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},on:{"on-visible-change":e.ondrawvisable},model:{value:e.showedform,callback:function(t){e.showedform=t},expression:"showedform"}},[o("NodeForm",{ref:"nodeform",attrs:{fminfo:e.nodeinfo,isEditForm:""},on:{controlctl:e.controlctl},scopedSlots:e._u([{key:"default",fn:function(t){return[o("Button",{attrs:{type:"text"},on:{click:function(o){return e.doexec("ok",t.fm)}}},[e._v("保存")]),o("Button",{attrs:{type:"text"},on:{click:function(o){return e.doexec("cancel",t.fm)}}},[e._v("取消")])]}}])})],1)],1)],1)},i=[],r=o("7dfe"),a=r["a"],s=(o("8d99"),o("9ca4")),l=Object(s["a"])(a,n,i,!1,null,null,null);t["a"]=l.exports},"7dfe":function(e,t,o){"use strict";(function(e){o("e697"),o("163d"),o("c904"),o("6d57"),o("60b7");var n=o("0086");o("f121");t["a"]={name:"jsoneditor",props:{initData:{type:Function,default:function(){var e=this;return function(t){t(e.originalRoot)}}},metainfo:{type:Object}},components:{NodeForm:n["a"]},data:function(){var e=this,t="root"+this.$store.state.user.userobj.company.id,o="/"+t;return{oldnodedata:null,isupdate:!1,rootNode:null,currentData:null,currentNode:null,code:"root",treedata:[],originalMetaInfo:[{title:"基本信息",key:"baseinfo",cols:1,ctls:[{type:"number",label:"序号",prop:"seq",placeHolder:"请输入序号",style:{width:"165px"},rules:[]},{type:"input",label:"编码",prop:"code",placeHolder:"请输入编码",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"标题",prop:"title",placeHolder:"请输入节点标题",style:"",rules:[{required:!0,message:" ",trigger:"blur"}],default:"点击修改"}]},{title:"节点路径",key:"baseinfo",cols:3,ctls:[{type:"input",label:"KEY",prop:"nodeKey",placeHolder:"请输入编码",disabled:!0,style:"",rules:[]},{type:"input",label:"路径",prop:"orgpath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"input",label:"标题路径",prop:"titlepath",placeHolder:"",disabled:!0,style:"",rules:[]},{type:"number",label:"级别",prop:"level",disabled:!0,placeHolder:"",style:{width:"165px"},rules:[]}]}],originalRoot:{title:"使用者定义",code:t,expand:!0,orgpath:o,render:function(t,o){var n=o.root,i=o.node,r=o.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",{on:{dblclick:function(){e.onselnode(i,r)},click:function(){e.currentData=r,e.currentNode=i,e.rootNode=n,e.selclick(n,i,r)}}},[t("Icon",{props:{type:"ios-folder-outline"},style:{marginRight:"8px"}}),t("span",{},[r.title])]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t("Button",{props:Object.assign({},e.buttonProps,{icon:"md-add",type:"text"}),style:{width:"64px"},on:{click:function(){e.append(r)}}})])])},children:[]},showedform:!1,buttonProps:{type:"default",size:"small"},nodeinfo:{},treeheight:0}},mounted:function(){this.initTree()},created:function(){this.metainfo&&(this.nodeinfo=Object.assign(this.nodeinfo,this.metainfo),this.nodeinfo.main=this.nodeinfo.main.concat(this.originalMetaInfo)),window.modiTreeNodeByCode=function(e,t,o,n){n||(n=0),n++,e.forEach((function(e){e.nodeKey==t.nodeKey&&(e=Object.assign(e,t)),e.children?(o?(e.orgpath=o.orgpath+"/"+e.code,e.titlepath=o.titlepath+"/"+e.title,e.level=n):(e.orgpath=e.code,e.titlepath=e.title,e.level=n),e.children.sort((function(e,t){return Number(e.seq)>Number(t.seq)})),modiTreeNodeByCode(e.children,t,e,n)):o?(e.orgpath=o.orgpath+"/"+e.code,e.titlepath=o.titlepath+"/"+e.title,e.level=n):(e.orgpath=e.code,e.titlepath=e.title,e.level=n),e.nodeKey==t.nodeKey&&(t.orgpath=e.orgpath)}))}},methods:{selclick:function(e,t,o){this.$emit("onselnode",e,t,o)},setCtlVisable:function(e,t){this.$refs.nodeform.setCtlVisable(e,t)},controlctl:function(e,t,o){this.$emit("controlctl",e,t,o)},ondrawvisable:function(e){this.$emit("drawaction",e,this.$refs.nodeform)},resetForm:function(){this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel.children=[]},refreshTree:function(){var e=this;this.isupdate=!0,this.$nextTick((function(){e.isupdate=!1}))},doexec:function(e,t){var o=this;"ok"==e?this.$refs.nodeform.validate((function(e){if(console.log("ddddddddddddddddd",e),e){var t=o.$refs.nodeform.getNewModel();modiTreeNodeByCode(o.treedata,t,null),o.showedform=!1,o.$emit("modisave",o.treedata,t,o.oldnodedata),o.resetForm(),console.log(o.treedata)}})):(this.showedform=!1,this.resetForm())},deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},onselnode:function(e,t){this.showedform=!0,this.currentData=t,this.currentNode=e;var o=this.deepclone(t);this.$refs.nodeform.resetForm(),this.$refs.nodeform.formModel=o,this.oldnodedata=this.deepclone(t),this.$refs.nodeform.forminfo.main.forEach((function(e){e.ctls.forEach((function(e){"code"==e.prop&&(t.code.indexOf("root")>=0?e.disabled=!0:e.disabled=!1)}))}))},initTree:function(){var e=this;this.$nextTick((function(){e.initData&&0==e.treedata.length&&e.initData((function(t){console.log("mmmmmmmmmmmmmmmm",t),!t||t&&t[0]&&(!t.children||t.children&&0==t.children.length)||t&&0==t.length?(e.originalRoot=Object.assign(e.originalRoot,t&&t[0]?t[0]:[]),e.treedata=[e.originalRoot]):(t[0].render=e.originalRoot.render,e.treedata=t)}))}))},setHeight:function(){var t=e("#orgcard"),o=t.get()[0],n=window.innerHeight-o.offsetTop-30;t.css("height",n+"px"),this.treeheight=n},setSelCss:function(t){e("span",".ptree").removeClass("spansel"),e(t.target).parent().parent().addClass("spansel")},renderContent:function(e,t){var o=this,n=t.root,i=t.node,r=t.data;return e("span",{style:{display:"inline-block",width:"100%"}},[e("span",{on:{dblclick:function(e){o.setSelCss(e),o.onselnode(i,r)},click:function(e){o.setSelCss(e),o.currentData=r,o.currentNode=i,o.rootNode=n,o.selclick(n,i,r)}}},[e("Icon",{props:{type:r.children&&r.children.length>0?"ios-folder-outline":"ios-paper-outline"},style:{marginRight:"8px"}}),e("span",r.title)]),e("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-add"}),style:{marginRight:"8px"},on:{click:function(){o.append(r)}}}),e("Button",{props:Object.assign({},this.buttonProps,{icon:"ios-remove"}),on:{click:function(){o.remove(n,i,r)}}})])])},append:function(e){var t=e.children||[],o=this.$refs.nodeform.getNewModel();console.log("new model.........................",o),o.expand=!0,t.push(o),this.$set(e,"children",t)},remove:function(e,t,o){var n=e.find((function(e){return e===t})).parent,i=e.find((function(e){return e.nodeKey===n})).node,r=i.children.indexOf(o);i.children.splice(r,1),this.$emit("deletenode",this.treedata,o)},findParentByNode:function(e){var t=this.rootNode.find((function(t){return t===e})).parent,o=this.rootNode.find((function(e){return e.nodeKey===t})).node;return o},findByNode:function(e){}}}}).call(this,o("a336"))},8442:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("OrgEditor",{ref:"functree",attrs:{initData:e.initData(),metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode}})],1)},i=[],r=(o("60b7"),o("7e1e")),a=o("302e"),s=(o("f121"),{name:"treeinfo_page",props:{},components:{OrgEditor:a["a"]},data:function(){return{appkey:"",metainfo:{name:"节点编辑",main:[{title:"附件信息",key:"baseinfo",cols:2,ctls:[{type:"upload",rules:[],label:"列表图片",prop:"listimg",disabled:!0,style:{},isHide:!1},{type:"input",rules:[],label:"类别简介",prop:"simpleDesc",disabled:!1,style:"width:300px",isHide:!1},{type:"upload",rules:[],label:"详情图片",prop:"detailimg",disabled:!0,style:{},isHide:!1},{type:"textarea",rules:[],label:"详情描述",prop:"desc",disabled:!0,style:"width:300px",isHide:!1}]}],lists:null}}},mounted:function(){this.appkey=this.$route.query.appkey},methods:{onselnode:function(e,t,o){},orgsave:function(e,t){var o=this;Object(r["m"])("/web/common/treearchCtl/saveProductcats",{productcatJson:e}).then((function(e){var t=e.data;if(console.log("ddddddddddddddddd",t),0==t.status){var n=t.data.productcatJson;console.log("save org...............................",n),o.$refs.functree.treedata=n,o.$refs.functree.refreshTree(),o.$Message.success("当前操作成功完成")}}))},drawaction:function(e,t){},controlctl:function(e,t,o){},initData:function(){var e=this;e.appkey;return function(e){Object(r["h"])().then((function(t){var o=t.data;if(0!=o.status)throw new Error("获取功能清单数据出错");var n=o.data.productcatJson;e(n)}))}}}}),l=s,d=o("9ca4"),c=Object(d["a"])(l,n,i,!1,null,null,null);t["default"]=c.exports},"8d99":function(e,t,o){"use strict";var n=o("a064"),i=o.n(n);i.a},a064:function(e,t,o){}}]);
\ No newline at end of file
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