Commit 77b4cb5b by 蒋勇

d

parent 03b8df99
#!/bin/bash
FROM registry.cn-beijing.aliyuncs.com/hantang2/node105:v2
MAINTAINER jy "jiangyong@gongsibao.com"
ADD center-manage /apps/center-manage/
WORKDIR /apps/center-manage/
ADD im-center /apps/im-center/
WORKDIR /apps/im-center/
RUN cnpm install -S
CMD ["node","/apps/center-manage/main.js"]
CMD ["node","/apps/im-center/main.js"]
......
node_modules/
app/config/localsettings.js
*.sh
\ No newline at end of file
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/main.js"
}
]
}
\ No newline at end of file
const system = require("../system");
const uuidv4 = require('uuid/v4');
const settings = require("../../config/settings");
class APIBase{
constructor() {
this.cacheManager = system.getObject("db.common.cacheManager");
this.logClient=system.getObject("util.logClient");
}
getUUID() {
var uuid = uuidv4();
var u = uuid.replace(/\-/g, "");
return u;
}
async setContextParams(pobj, qobj, req) {
let custtags = req.headers["x-consumetag"]?req.headers["x-consumetag"].split("|"):null;
//当自由用户注册时,需要根据前端传来的companykey,查询出公司,给companyid赋值
req.xctx = {
appkey: req.headers["xappkey"],//用于系统管理区分应用,比如角色
companyid: custtags?custtags[0].split("_")[1]:null,
password: custtags?custtags[1].split("_")[1]:null,
username: req.headers["x-consumer-username"],
credid: req.headers["x-credential-identifier"],
companykey:req.headers["x-company-key"],//专用于自由用户注册,自由用户用于一定属于某个存在的公司
codename:req.headers["xcodename"],
codetitle:req.headers["xcodetitle"]?decodeURI(req.headers["xcodetitle"]):'',
}
if(!req.xctx.appkey){
return [-200,"请求头缺少应用x-app-key"]
}else{
let app=await this.cacheManager["AppCache"].cache(req.xctx.appkey);
req.xctx.appid=app.id;
pobj.app_id=app.id;//传递参数对象里注入app_id
}
//平台注册时,companyid,companykey都为空
//自由注册时,companykey不能为空
// if(!req.xctx.companyid && !req.xctx.companykey){
// return [-200,"请求头缺少应用x-app-key"]
// }
if(!req.xctx.companyid && req.xctx.companykey){
let comptmp=await this.cacheManager["CompanyCache"].cache(req.xctx.companykey);
req.xctx.companyid=comptmp.id;
}
if(req.xctx.companyid){//在请求传递数据对象注入公司id
pobj.company_id=req.xctx.companyid;
}
}
async doexec(gname, methodname, pobj, query, req) {
try {
let xarg=await this.setContextParams(pobj, query, req);
if(xarg && xarg[0]<0){
return system.getResultFail(...xarg);
}
var rtn = await this[methodname](pobj, query, req);
this.logClient.log(pobj,req,rtn)
return rtn;
} catch (e) {
this.logClient.log(pobj,req,null,e.stack)
console.log(e.stack, "api调用异常--error...................");
var rtnerror = system.getResultFail(-200, "出现异常,请联系管理员");
return rtnerror;
}
}
}
module.exports = APIBase;
const system = require("../system");
const uuidv4 = require('uuid/v4');
class DocBase {
constructor() {
this.apiDoc = {
group: "逻辑分组",
groupDesc: "",
name: "",
desc: "请对当前类进行描述",
exam: "概要示例",
methods: []
};
this.initClassDoc();
}
initClassDoc() {
this.descClass();
this.descMethods();
}
descClass() {
var classDesc = this.classDesc();
this.apiDoc.group = classDesc.groupName;
this.apiDoc.groupDesc = this.examDescHtml(classDesc.groupDesc);
this.apiDoc.name = classDesc.name;
this.apiDoc.desc = this.examDescHtml(classDesc.desc);
this.apiDoc.exam = this.examHtml();
}
examDescHtml(desc) {
// var tmpDesc = desc.replace(/\\/g, "<br/>");
return desc;
}
examHtml() {
var exam = this.exam();
exam = exam.replace(/\\/g, "<br/>");
return exam;
}
exam() {
throw new Error("请在子类中定义类操作示例");
}
classDesc() {
throw new Error(`
请重写classDesc对当前的类进行描述,返回如下数据结构
{
groupName:"auth",
groupDesc:"认证相关的包"
desc:"关于认证的类",
exam:"",
}
`);
}
descMethods() {
var methoddescs = this.methodDescs();
for (var methoddesc of methoddescs) {
for (var paramdesc of methoddesc.paramdescs) {
this.descMethod(methoddesc.methodDesc, methoddesc.methodName
, paramdesc.paramDesc, paramdesc.paramName, paramdesc.paramType,
paramdesc.defaultValue, methoddesc.rtnTypeDesc, methoddesc.rtnType);
}
}
}
methodDescs() {
throw new Error(`
请重写methodDescs对当前的类的所有方法进行描述,返回如下数据结构
[
{
methodDesc:"生成访问token",
methodName:"getAccessKey",
paramdescs:[
{
paramDesc:"访问appkey",
paramName:"appkey",
paramType:"string",
defaultValue:"x",
},
{
paramDesc:"访问secret",
paramName:"secret",
paramType:"string",
defaultValue:null,
}
],
rtnTypeDesc:"xxxx",
rtnType:"xxx"
}
]
`);
}
descMethod(methodDesc, methodName, paramDesc, paramName, paramType, defaultValue, rtnTypeDesc, rtnType) {
var mobj = this.apiDoc.methods.filter((m) => {
if (m.name == methodName) {
return true;
} else {
return false;
}
})[0];
var param = {
pname: paramName,
ptype: paramType,
pdesc: paramDesc,
pdefaultValue: defaultValue,
};
if (mobj != null) {
mobj.params.push(param);
} else {
this.apiDoc.methods.push(
{
methodDesc: methodDesc ? methodDesc : "",
name: methodName,
params: [param],
rtnTypeDesc: rtnTypeDesc,
rtnType: rtnType
}
);
}
}
}
module.exports = DocBase;
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class AccessAuthAPI extends APIBase {
constructor() {
super();
this.userSve = system.getObject("service.auth.userSve");
}
//不从平台应用列表入口登录时
//先要调用平台登录接口
//返回token,利用这个token再去登录某个具体APP
//会话存储具体APP的用户信息
//每个前端应用打开时,先检查是否存在token
//如果存在,就去访问获取用户信息,---调用本接口--即刻
//进入或登录某个具体应用
//前提是已经具备了统一管理的账号,并且已经在统一管理账号登录,客户端具备了token
//进入某个具体应用时,需要指定 x-appkey请求头
//
async loginToApp(p,q,req){
let appkey=req.xctx.appkey;
}
async getBizUserForBizChance(p,q,req){
let s= await this.userSve.getBizUserForBizChance(p.clientMobile,p.spName,p.productCatName,p.regionName)
return system.getResult(s)
}
async getBizUserForDelivery(p,q,req){
let s= await this.userSve.getBizUserForDelivery(p.clientMobile,p.spName,p.productCatName,p.skucode,p.regionName)
return system.getResult(s)
}
classDesc() {
return {
groupName: "auth",
groupDesc: "认证相关的包",
name: "AccessAuthAPI",
desc: "关于认证的类",
exam: `
post http://p.apps.com/api/auth/accessAuth/getAccessKey
{
appKey:xxxxx,
secret:yyyyyy
}
`,
};
}
methodDescs() {
return [
{
methodDesc: "生成访问token,访问地址:http://......../api/auth/accessAuth/getAccessKey,访问token需要放置到后续API方法调用的请求头中",
methodName: "getAccessKey",
paramdescs: [
{
paramDesc: "访问appkey",
paramName: "appkey",
paramType: "string",
defaultValue: "",
},
{
paramDesc: "访问secret",
paramName: "secret",
paramType: "string",
defaultValue: "",
}
],
rtnTypeDesc: "返回JSON对象字符串",
rtnType: "json object {accessKey: xxxxxx, app: {xxx:xxx}},注意app,是当前app信息,详细见后面示例"
},
];
}
exam() {
return ``
}
}
module.exports = AccessAuthAPI;
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class RoleAuthAPI extends APIBase {
constructor() {
super();
this.authS=system.getObject("service.auth.authSve");
}
async findAuthsByRole(p,q,req){
var tmpRoles=p.roles;
var appid=p.appid;
var comid=p.companyid;
var auths=await this.authS.findAuthsByRole(tmpRoles,appid,comid);
return system.getResult(auths);
}
exam(){
return `
xxxxxxxxx
yyyyyyyyy
zzzzzzzzz
ooooooo
`;
}
classDesc() {
return {
groupName: "auth",
groupDesc: "角色授权相关的API",
name: "RoleAuthAPI",
desc: "角色授权相关的API",
exam: "",
};
}
methodDescs() {
return [
{
methodDesc: "按照角色获取权限,访问地址:/api/auth/roleAuth/findAuthsByRole",
methodName: "findAuthsByRole",
paramdescs: [
{
paramDesc: "应用的ID",
paramName: "appid",
paramType: "int",
defaultValue: "x",
},
{
paramDesc: "角色列表",
paramName: "roles",
paramType: "array",
defaultValue: null,
}
],
rtnTypeDesc: "逗号分隔的",
rtnType: "string"
}
];
}
}
module.exports = RoleAuthAPI;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class AppAPI extends APIBase {
constructor() {
super();
this.appS = system.getObject("service.common.appSve");
}
async create(pobj,q,req){
// console.log("oooooooooooooooooooooooooooooooooooooooooooooooo")
// console.log(req.xctx)
let rtn=this.appS.create(pobj,q,req);
return system.getResult(rtn);
}
async del(pobj,q,req){
let rtn=this.appS.delete(pobj,q,req);
return system.getResult(rtn);
}
classDesc() {
return {
groupName: "auth",
groupDesc: "认证相关的包",
name: "AccessAuthAPI",
desc: "关于认证的类",
exam: `
post http://p.apps.com/api/auth/accessAuth/getAccessKey
{
appKey:xxxxx,
secret:yyyyyy
}
`,
};
}
methodDescs() {
return [
];
}
exam() {
return ``
}
}
module.exports = AppAPI;
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class ChannelAPI extends APIBase {
constructor() {
super();
this.channelS=system.getObject("service.common.channelSve")
}
async getChannels(hostname){
let cacheManager = system.getObject("db.common.cacheManager");
let channels=await cacheManager["ChannelCache"].cache(hostname)
return channels;
}
async channelHandle(channelobj,path,data){
let rtn=await this.channelS.channelHandle(channelobj,path,data)
return rtn;
}
classDesc() {
return {
groupName: "auth",
groupDesc: "认证相关的包",
name: "AccessAuthAPI",
desc: "关于认证的类",
exam: `
post http://p.apps.com/api/auth/accessAuth/getAccessKey
{
appKey:xxxxx,
secret:yyyyyy
}
`,
};
}
methodDescs() {
return [
];
}
exam() {
return ``
}
}
module.exports = ChannelAPI;
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class ProductAPI extends APIBase {
constructor() {
super();
this.productpriceS = system.getObject("service.product.productpriceSve")
}
/**
*
* @param {*} p productname-产品名称/sp名称
* @param {*} q
* @param {*} req
* 返回值[
* label:'',
* code:''
* ]
*/
async findRegionsByProductName (p, q, req) {
let pname = p.productname;
let sp = p.sp;
let rs = await this.productpriceS.findRegionsByProductName(pname, sp)
return system.getResult(rs);
}
async findCostBySkuCode (p, q, req) {
let skucode = p.skucode;
let rs = await this.productpriceS.findCostBySkuCode(skucode)
return system.getResult({ cost: rs });
}
classDesc () {
return {
groupName: "auth",
groupDesc: "认证相关的包",
name: "AccessAuthAPI",
desc: "关于认证的类",
exam: `
post http://p.apps.com/api/auth/accessAuth/getAccessKey
{
appKey:xxxxx,
secret:yyyyyy
}
`,
};
}
methodDescs () {
return [
];
}
exam () {
return ``
}
}
module.exports = ProductAPI;
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
const crypto = require('crypto');
var fs=require("fs");
var accesskey='3KV9nIwW8qkTGlrPmAe3HnR3fzM6r5';
var accessKeyId='LTAI4GC5tSKvqsH2hMqj6pvd';
var url="https://gsb-zc.oss-cn-beijing.aliyuncs.com";
class OSSAPI extends APIBase{
constructor(){
super()
}
async getOssConfig(){
var policyText = {
"expiration":"2119-12-31T16:00:00.000Z",
"conditions":[
["content-length-range",0,1048576000],
["starts-with","$key","zc"]
]
};
var b = new Buffer(JSON.stringify(policyText));
var policyBase64 = b.toString('base64');
var signature= crypto.createHmac('sha1',accesskey).update(policyBase64).digest().toString('base64'); //base64
var data={
OSSAccessKeyId:accessKeyId,
policy:policyBase64,
Signature:signature,
Bucket:'gsb-zc',
success_action_status:201,
url:url
};
return system.getResult(data);
};
async upfile(srckey,dest){
var oss=System.getObject("util.ossClient");
var result=await oss.upfile(srckey,"/tmp/"+dest);
return result;
};
async downfile(srckey){
var oss=System.getObject("util.ossClient");
var downfile=await oss.downfile(srckey).then(function(){
downfile="/tmp/"+srckey;
return downfile;
});
return downfile;
};
}
module.exports=OSSAPI;
const system = require("../system");
const settings = require("../../config/settings");
const uuidv4 = require('uuid/v4');
class CtlBase {
constructor(gname, sname) {
this.serviceName = sname;
this.service = system.getObject("service." + gname + "." + sname);
this.cacheManager = system.getObject("db.common.cacheManager");
this.logClient = system.getObject("util.logClient");
}
getUUID () {
var uuid = uuidv4();
var u = uuid.replace(/\-/g, "");
return u;
}
static getServiceName (ClassObj) {
return ClassObj["name"].substring(0, ClassObj["name"].lastIndexOf("Ctl")).toLowerCase() + "Sve";
}
async update (pobj, qobj, req) {
const up = await this.service.update(pobj);
return system.getResult(up);
}
async create (pobj, qobj, req) {
const up = await this.service.create(pobj);
return system.getResult(up);
}
async delete (pobj, qobj, req) {
const up = await this.service.delete(pobj);
return system.getResult(up);
}
async findAndCountAll (pobj, qobj, req) {
//设置查询条件
console.log(pobj)
const rs = await this.service.findAndCountAll(pobj);
return system.getResult(rs);
}
async refQuery (pobj, qobj, req) {
//pobj.refwhere.app_id=pobj.app_id;//角色过滤按照公司过滤
pobj.refwhere.company_id = pobj.company_id;
let rtn = await this.service.refQuery(pobj);
return rtn
}
async setContextParams (pobj, qobj, req) {
let custtags = req.headers["x-consumetag"] ? req.headers["x-consumetag"].split("|") : null;
let lastindex = custtags ? custtags.length - 1 : 0;
//当自由用户注册时,需要根据前端传来的companykey,查询出公司,给companyid赋值
req.xctx = {
appkey: req.headers["xappkey"],//用于系统管理区分应用,比如角色
fromappkey: req.headers["xfromappkey"],//来源APP,如果没有来源与appkey相同
companyid: custtags ? custtags[0].split("_")[1] : null,
fromcompanykey: req.headers["xfromcompanykey"],//专用于自由用户注册,自由用户用于一定属于某个存在的公司
password: custtags ? custtags[lastindex].split("_")[1] : null,
username: req.headers["x-consumer-username"],
userid: req.headers["x-consumer-custom-id"],
credid: req.headers["x-credential-identifier"],
regrole: req.headers["xregrole"],
bizpath: req.headers["xbizpath"],
codename: req.headers["xcodename"],
codetitle: req.headers["xcodetitle"] ? decodeURI(req.headers["xcodetitle"]) : '',
opath: req.headers['xopath'],
ptags: req.headers['xptags'],
}
//添加组织结构路径,如果是上级,取上级
if (req.xctx.ptags && req.xctx.ptags != "") {
pobj.opath = req.xctx.ptags
} else {
if (!pobj.opath || pobj.opath == "") {
pobj.opath = req.xctx.opath
}
}
if (!req.xctx.appkey) {
return [-200, "请求头缺少应用x-app-key"]
} else {
let app = await this.cacheManager["AppCache"].cache(req.xctx.fromappkey);
req.xctx.appid = app.id;
if (!pobj.app_id) {
pobj.app_id = app.id;//传递参数对象里注入app_id
}
}
//平台注册时,companyid,companykey都为空
//自由注册时,companykey不能为空
// if(!req.xctx.companyid && !req.xctx.companykey){
// return [-200,"请求头缺少应用x-app-key"]
// }
if (!req.xctx.companyid && req.xctx.fromcompanykey && req.xctx.fromcompanykey != "null" && req.xctx.fromcompanykey != "undefined") {
let comptmp = await this.cacheManager["CompanyCache"].cache(req.xctx.fromcompanykey);
req.xctx.companyid = comptmp.id;
}
if (req.xctx.companyid) {//在请求传递数据对象注入公司id
pobj.company_id = req.xctx.companyid;
}
if (req.xctx.userid) {//在请求传递数据对象注入公司id
pobj.userid = req.xctx.userid;
pobj.username = req.xctx.username;
}
pobj.bizpath = req.xctx.bizpath;
}
async doexec (methodname, pobj, query, req) {
try {
let xarg = await this.setContextParams(pobj, query, req);
if (xarg && xarg[0] < 0) {
return system.getResultFail(...xarg);
}
var rtn = await this[methodname](pobj, query, req);
this.logClient.log(pobj, req, rtn, null)
return rtn;
} catch (e) {
this.logClient.log(pobj, req, null, e.stack)
console.log(e.stack, "出现异常,请联系管理员.......");
return system.getResultFail(-200, e.message ? e.message : "出现异常,请联系管理员");
}
}
}
module.exports = CtlBase;
/*
地址:http://192.168.1.128:401/api/queueAction/producer/springBoard
请求方式:post
参数:
{
"actionType": "produceLogsData",// Y 功能名称
"actionBody": {
"opTitle": "",// N 操作的业务标题
"identifyCode": "logs001",// Y 操作的业务标识
"messageBody": {//日志的描述信息
"opUrl": "http://192.168.1.189:4012/api/test/testApi/springBoard",// N 操作的业务Url
"message": ""// Y 日志消息描述
}
}
}
logs-sytxpublic-msgq-service--日志服务
*/
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings=require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class AuthCtl extends CtlBase{
constructor(){
super("auth",CtlBase.getServiceName(AuthCtl));
}
async saveAuths(pobj,query,req){
var auths=pobj.auths;
var xrtn=await this.service.saveAuths(auths,pobj.app_id,pobj.company_id);
return system.getResult(xrtn);
}
async findAuthsByRoles(pobj,query,req){
var roleids=pobj.roleids;
var xrtn=await this.service.findAuthsByRole(roleids,pobj.app_id,pobj.company_id);
return system.getResult(xrtn);
}
}
module.exports=AuthCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings=require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
class DataauthCtl extends CtlBase{
constructor(){
super("auth",CtlBase.getServiceName(DataauthCtl));
}
async saveauth(qobj,querybij,req){
var arys=qobj.arys;
var uid=qobj.uid;
var refmodel=qobj.modelname;
var u=await this.service.saveauth({
user_id:uid,
modelname:refmodel,
auths:arys.join(","),
app_id:req.appid,
});
return system.getResult(u);
}
async fetchInitAuth(qobj,querybij,req){
var uid=qobj.uid;
var refmodel=qobj.modelname;
var authtmp=await this.service.findOne({user_id:uid,modelname:refmodel,app_id:req.appid});
if(authtmp){
var auths= authtmp.auths;
var arys=auths.split(",");
return system.getResult(arys);
}else{
return system.getResultSuccess([]);
}
}
}
module.exports=DataauthCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings=require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
class OrgCtl extends CtlBase{
constructor(){
super("auth",CtlBase.getServiceName(OrgCtl));
// this.compSvr=system.getObject("service.common.companySve");
}
//检查是否已经存在主要岗位
async checkMainPosition(p,q,req){
return this.service.checkMainPosition(p,q,req);
}
async changePos(p,q,req){
var toorgid=p.orgid;
var uid=p.uid;
var rtn= await this.service.changePos(toorgid,uid);
return system.getResult(rtn);
}
async create(p,q,req){
return super.create(p,q,req);
}
async delete(p,q,req){
return super.delete(p,q,req);
}
async update(p,q,req){
return super.update(p,q,req);
}
async initOrgs(p,q,req){
var tocompany=req.session.tocompany;
var cmkey=p.comkey;
if(cmkey){
tocompany =await this.compSvr.findOne({companykey:cmkey});
}
//按照公司名称查询,是否存在节点,不存在,就创建根节点
//如果存在就按照名称查询出当前和她的字节点
var rtn=await this.service.initOrgs(tocompany,req.appid);
return system.getResult(rtn);
}
async findOrgById(p,q,req){
var rtn=await this.service.findOrgById(p.id);
return system.getResult(rtn);
}
}
module.exports=OrgCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings=require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
var cacheBaseComp = null;
class RoleCtl extends CtlBase {
constructor() {
super("auth",CtlBase.getServiceName(RoleCtl));
this.redisClient=system.getObject("util.redisClient");
}
async initNewInstance(pobj,queryobj, req) {
var rtn = {};
rtn.roles = [];
return system.getResultSuccess(rtn);
}
async create(pobj,queryobj, req) {
let r=await super.create(pobj,queryobj, req)
return system.getResult(r);
}
}
module.exports = RoleCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class UserCtl extends CtlBase {
constructor() {
super("auth", CtlBase.getServiceName(UserCtl));
}
async logout (pobj, qobj, req) {
let rtn = await this.service.logout(pobj)
return system.getResult(rtn)
}
async pmgetUserByCode (pobj, qobj, req) {
let code = pobj.code
let rtn = await this.service.pmgetUserByCode(code)
return system.getResult(rtn)
}
async loginApp (pobj, qobj, req) {
let appkey = pobj.fromAppKey
let uname = pobj.username
let rtn = await this.service.loginApp(appkey, uname)
return system.getResult(rtn);
}
async resetPassword (pobj, qobj, req) {
await this.service.resetPassword(req.xctx.username, pobj.onepassword)
return system.getResult({});
}
async allowOrNot (pobj, qobj, req) {
await this.service.updateByWhere({ isEnabled: !pobj.isEnabled }, { company_id: pobj.company_id })
return system.getResult({});
}
async allowOrNotToOne (pobj, qobj, req) {
await this.service.updateByWhere({ isEnabled: !pobj.isEnabled }, { id: pobj.curid })
return system.getResult({});
}
async initNewInstance (queryobj, req) {
var rtn = {};
rtn.roles = [];
return system.getResultSuccess(rtn);
}
//获取验证码,发送给指定手机
// async sendVCode(pobj, qobj, req) {
// var mobile = pobj.mobile;
// let v = await this.smsS.sendVCode(mobile);
// return system.getResult({ vcodestr: v });
// }
async exit (pobj, qobj, req) {
}
//应用的自由用户注册,无需验证,需要前端头设置公司KEY
async pmregisterByFreeUser (p, q, req) {
//检查是否有用户名和密码
if (!pobj.userName || !pobj.password) {
return system.getResult(null, "请检查用户名和密码是否存在")
}
//p.company_id = req.xctx.companyid;//控制基类里已经添加
if (!p.company_id) {
return system.getResultFail(-201, "自有用户创建需要提供公司KEY");
}
let rtn = await this.service.pmregisterByFreeUser(p, q);
return rtn;
}
async create (p, q, req) {
//检查是否有用户名和密码
if (!p.userName) {
return system.getResult(null, "请检查用户名和密码是否存在")
}
let rtn = await this.service.registerByTantent(p, q);
return system.getResult(rtn);
}
//登录后的租户创建属于租户的用户
//需要在控制器里取出公司ID
//和租户绑定同一家公司
//按照用户名和密码进行注册
//控制器端检查用户名和密码非空
async registerByTantent (p, q, req) {
//检查是否有用户名和密码
if (!pobj.userName) {
return system.getResult(null, "请检查用户名和密码是否存在")
}
let rtn = await this.service.registerByTantent(p, q);
return rtn;
}
//租户用户名和密码的租户注册
async pmregister (pobj, qobj, req) {
//平台注册设置平台的应用ID
pobj.app_id = settings.pmappid;
//检查是否有用户名和密码
if (!pobj.userName || !pobj.password) {
return system.getResult(null, "请检查用户名和密码是否存在")
}
var rtn = await this.service.pmregister(pobj);
return system.getResult(rtn);
}
async pmlogin (pobj, qobj, req) {
//平台注册设置平台的应用ID
let rtn = await this.service.pmlogin(pobj, qobj, req);
return system.getResult(rtn);
}
async getUserInfo (pobj, qobj, req) {
let uname = req.xctx.username;
let rtn = await this.service.getUserInfo(uname);
return system.getResult(rtn);
}
//按照电话创建自由用户
async pmloginByVCodeForFreeUser (p, q, req) {
if (!pobj.mobile || !pobj.vcode) {
return system.getResult(null, "请检查手机号和验证码是否存在")
}
p.companykey = req.xctx.companykey;
if (!p.companykey) {
return system.getResult(null, "自有用户创建需要提供公司KEY");
}
let rtn = await this.service.pmloginByVCodeForFreeUser(p, q);
return rtn;
}
async pmloginByVCode (pobj, qobj, req) {
let rtn = await this.service.pmloginByVCode(pobj, qobj);
return system.getResult(rtn);
}
async pmSendVCode (pobj, qobj, req) {
let rtn = await this.service.sendVCode(pobj, qobj);
return system.getResult(rtn);
}
}
module.exports = UserCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;
class AppCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(AppCtl));
this.userCtl = system.getObject("service.auth.userSve");
this.comS = system.getObject("service.common.companySve");
}
async findAndCountAll(pobj, qobj, req) {
let comtemp = await this.comS.findById(pobj.company_id)
pobj.myappstrs = comtemp.appids
let rtn = await super.findAndCountAll(pobj, qobj, req)
return rtn
}
async findAllApps(p, q, req) {
var rtns = await this.service.findAllApps(p.userid);
return system.getResult(rtns);
}
async getApp(p, q, req) {
let app = await this.cacheManager["AppCache"].cache(p.appkey, null);
return system.getResult({ funcJson: JSON.parse(app.functionJSON) });
}
async buildFrontRouter(p, q, req) {
let appkey = p.appkeyForRoute
let app = await this.cacheManager["AppCache"].cache(appkey, null);
let funcJSONOBJ = JSON.parse(app.functionJSON)
if (!funcJSONOBJ || funcJSONOBJ.length === 0) {
return system.getResultError("请先建立功能数据")
}
let rtn = await this.service.buildFrontRouter(funcJSONOBJ, app.id)
return system.getResult(rtn)
}
async getFuncs(p, q, req) {
let appkey = p.appkey
let app = await this.cacheManager["AppCache"].cache(appkey, null);
return system.getResult({ funcJson: JSON.parse(app.functionJSON) })
//return system.getResult({funcJson:[]})
}
async saveFuncTree(p, q, req) {
let rtn = await this.service.saveFuncTree(p)
return system.getResult(rtn)
}
async create(pobj, queryobj, req) {
pobj.creator_id = pobj.userid;//设置创建者
return super.create(pobj, queryobj, req)
}
async update(pobj, queryobj, req) {
return super.update(pobj, queryobj, req);
}
async initNewInstance(pobj, queryobj, req) {
var rtn = {};
rtn.appkey = this.getUUID();
rtn.secret = this.getUUID();
return system.getResult(rtn);
}
async resetPass(pobj, queryobj, req) {
pobj.password = await super.encryptPasswd(settings.defaultpwd);
var rtn = this.service.resetPass(pobj);
return system.getResult(rtn);
}
async createAdminUser(pobj, queryobj, req) {
pobj.password = settings.defaultpwd;
var rtn = this.service.createAdminUser(pobj);
return system.getResult(rtn);
}
async create(pobj, queryobj, req) {
//设置创建者,需要同时创建app管理员、默认密码、电话
pobj.creator_id = pobj.userid;
// pobj.password=super.encryptPasswd(settings.defaultpwd);
//构造默认的应用相关的URL
pobj.authUrl = settings.protocalPrefix + pobj.domainName + "/auth";
// pobj.uiconfigUrl = settings.protocalPrefix + pobj.domainName + "/api/meta/config/fetchAppConfig";
// pobj.opCacheUrl = settings.protocalPrefix + pobj.domainName + "/api/meta/opCache/opCacheData";
// pobj.notifyCacheCountUrl = settings.protocalPrefix + pobj.domainName + "/api/meta/opCache/recvNotificationForCacheCount";
var app = await super.create(pobj, queryobj, req);
return system.getResult(app);
}
async fetchApiCallData(pobj, queryobj, req) {
var curappkey = pobj.curappkey;
//检索出作为访问时的app呼出调用数据
var rtn = await this.service.fetchApiCallData(curappkey);
return system.getResultSuccess(rtn);
}
//接受缓存计数通知接口
async recvNotificationForCacheCount(p, q, req) {
return this.service.recvNotificationForCacheCount(p);
}
}
module.exports = AppCtl;
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class ArticleCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(ArticleCtl));
}
async create (p, q, req) {
p.creator_id = p.userid
p.creator = p.username
let rtn = await this.service.create(p, q, req)
return system.getResult(rtn)
}
}
module.exports = ArticleCtl;
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class AttachmentCtl extends CtlBase {
constructor() {
super("common",CtlBase.getServiceName(AttachmentCtl));
}
}
module.exports = AttachmentCtl;
var system = require("../../../system")
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const uuidv4 = require('uuid/v4');
class CachSearchesCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(CachSearchesCtl));
}
async initNewInstance(queryobj, qobj) {
return system.getResultSuccess({});
}
async findAndCountAll(pobj, gobj, req) {
pobj.opCacheUrl = req.session.app.opCacheUrl;
pobj.appid = req.appid;
return await this.service.findAndCountAllCache(pobj);
}
async delCache(queryobj, qobj, req) {
var param = { key: queryobj.key, appid: req.appid, opCacheUrl: req.session.app.opCacheUrl };
return await this.service.delCache(param);
}
async clearAllCache(queryobj, qobj, req) {
var param = { appid: req.appid, opCacheUrl: req.session.app.opCacheUrl };
return await this.service.clearAllCache(param);
}
}
module.exports = CachSearchesCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class ChannelCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(ChannelCtl));
}
async refQuery(pobj, qobj, req) {
let rtn = await this.service.refQuery(pobj);
return rtn
}
async authorizeUser(pobj, qobj, req) {
if (!pobj.channelId) {
return system.getResult(null, "channelId can not be empty,100290");
}
await this.service.authorizeUser(pobj);
return system.getResult("SUCCESS");
}
}
module.exports = ChannelCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class CompanyCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(CompanyCtl));
}
async update (p, q, req) {
let u = await super.update(p, q, req)
//缓存失效
await this.cacheManager["CompanyCache"].invalidate(p.companykey)
let company = await this.cacheManager["CompanyCache"].cache(p.companykey)
return system.getResult(company)
}
async getMyApps (p, q, req) {
let userfind = await this.cacheManager["UserCache"].cache(p.username)
let isSuper = userfind.isSuper
if (userfind.company.appids && userfind.company.appids != "") {
let appsarray = userfind.company.appids.split(",")
let appidsquery = appsarray.map(astr => {
return astr.split("|")[0]
})
let apps = await this.service.getMyApps(appidsquery, isSuper)
return system.getResult(apps)
} else {
return []
}
}
async bindApps (p, q, req) {
let appids = p.appids
let cmpid = p.postcmpid
let appids2 = appids.map(item => {
return item.appid + "|" + item.title
})
let appidstrs = appids2.join(",")
await this.service.bindApps(appidstrs, cmpid)
return system.getResult(appids)
}
async setOrgs (p, q, req) {
//let companynew=await this.service.findById(p.company_id)
let orgs = await this.service.setOrgs(p)
return system.getResult(orgs)
}
async getOrgs (p, q, req) {
//let companynew=await this.cacheManager["CompanyCache"].cache(req.xctx.fromcompanykey)
let companynew = await this.service.findById(p.company_id)
let orgjsonstr = companynew.orgJson
let rtnjson = null
if (orgjsonstr && orgjsonstr != "") {
rtnjson = JSON.parse(companynew.orgJson)
} else {
rtnjson = []
}
return system.getResult({ orgJson: rtnjson })
}
async getWatchOrgNodes (p, q, req) {
let wns = await this.service.getWatchOrgNodes(p.company_id)
return wns
}
async refQuery (pobj, qobj, req) {
let rtn = await this.service.refQuery(pobj);
return rtn
}
}
module.exports = CompanyCtl;
var system = require("../../../system")
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;
class MetaCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(MetaCtl));
}
}
module.exports = MetaCtl;
var system = require("../../../system")
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const uuidv4 = require('uuid/v4');
var moment = require("moment");
class OplogCtl extends CtlBase {
constructor() {
super("common",CtlBase.getServiceName(OplogCtl));
//this.appS=system.getObject("service.appSve");
}
async initNewInstance(qobj) {
var u = uuidv4();
var aid = u.replace(/\-/g, "");
var rd = { name: "", appid: aid }
return system.getResult(rd);
}
async debug(obj) {
obj.logLevel = "debug";
return this.create(obj);
}
async info(obj) {
obj.logLevel = "info";
return this.create(obj);
}
async warn(obj) {
obj.logLevel = "warn";
return this.create(obj);
}
async error(obj) {
obj.logLevel = "error";
return this.create(obj);
}
async fatal(obj) {
obj.logLevel = "fatal";
return this.create(obj);
}
/*
返回20位业务订单号
prefix:业务前缀
*/
async getBusUid_Ctl(prefix) {
prefix = (prefix || "");
if (prefix) {
prefix = prefix.toUpperCase();
}
var prefixlength = prefix.length;
var subLen = 8 - prefixlength;
var uidStr = "";
if (subLen > 0) {
uidStr = await this.getUidInfo_Ctl(subLen, 60);
}
var timStr = moment().format("YYYYMMDDHHmm");
return prefix + timStr + uidStr;
}
/*
len:返回长度
radix:参与计算的长度,最大为62
*/
async getUidInfo_Ctl(len, radix) {
var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');//长度62,到yz长度为长36
var uuid = [], i;
radix = radix || chars.length;
if (len) {
for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
} else {
var r;
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
uuid[14] = '4';
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | Math.random() * 16;
uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
}
}
}
return uuid.join('');
}
}
module.exports = OplogCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class PathtomethodCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(PathtomethodCtl));
this.appS=system.getObject("service.common.appSve")
}
}
module.exports = PathtomethodCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings=require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;
class PConfigCtl extends CtlBase {
constructor() {
super("common",CtlBase.getServiceName(PConfigCtl));
this.userCtl = system.getObject("service.auth.userSve");
}
async initNewInstance(pobj,queryobj, req) {
var rtn = {};
return system.getResult(rtn);
}
async create(pobj,queryobj, req) {
pobj.app_id=req.appid;
pobj.appkey=req.appkey;
var rtn=await super.create(pobj,queryobj, req);
return system.getResult(rtn);
}
async update(pobj,queryobj, req) {
pobj.app_id=req.appid;
pobj.appkey=req.appkey;
var rtn=await super.update(pobj);
return system.getResult(rtn);
}
}
module.exports = PConfigCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class PushCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(PushCtl));
}
async findAndCountAll(pobj, qobj, req) {
let query = {
pageSize: pobj.pageInfo.pageSize,
pageIndex: pobj.pageInfo.pageNo
};
let search = pobj.search;
if (search.messageBody)
query.messageBody = search.messageBody;
if (search.identify_code)
query.identifyCode = search.identify_code;
if (search.request_id)
query.requestIdInfo = search.request_id;
let actionType;
switch (pobj.bizpath) {
case "/sysmag/pushfail":
actionType = "getPushFailureList";
break;
case "/sysmag/pusherror":
actionType = "getPushErrorList";
break
}
let rtn = await system.postJsonTypeReq(settings.pushUrl(), {
"actionType": actionType,
"actionBody": query
});
if (rtn.statusCode === 200) {
rtn = rtn.data;
if (rtn && rtn.status === 1) {
return system.getResult({
results: {
count: rtn.totalCount,
rows: rtn && rtn.data || []
}
});
} else {
return system.getResultFail(rtn && rtn.message || '请联系管理员');
}
} else {
return system.getResultFail(rtn)
}
}
async repush(pobj, qobj, req) {
let rtn = await system.postJsonTypeReq(settings.pushUrl(), {
"actionType": "pushAgainFailureLog",
"actionBody": {
id: pobj.id
}
});
if (rtn.statusCode === 200) {
return rtn.data;
} else {
return system.getResultFail(rtn)
}
}
}
module.exports = PushCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;
class RouteCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(RouteCtl));
this.appS=system.getObject("service.common.appSve")
}
async create(p,q,req){
let appid=p.app_id;
let apptmp= await this.appS.findById(appid)
let routedata={
name:p.name,
hosts:p.shosts.split(","),
paths:p.spaths.split(","),
isstrip:false,
app_id:appid,
shosts:p.shosts,
spaths:p.spaths
}
let rtn= await this.service.create(apptmp.name, routedata, req);
return system.getResult(rtn)
}
}
module.exports = RouteCtl;
var system = require("../../../system")
var settings = require("../../../../config/settings");
class SocketNotifyCtl{
constructor(){
}
setSocketServer(s){
this.socketServer=s;
}
//异步推送消息到客户端
notifyClientMsg(user,msg){
var uk= this.buildPrivateChannel(user);
var msgHandler=this.socketServer.users[uk];
msgHandler.notifyClient(uk,msg);
}
buildPrivateChannel(user){
var ukchannel= user.app_id+"¥"+user.id;
return ukchannel;
}
buildMsgTarget(user){
var ukchannel= user.app_id+"¥"+user.id;
var nickName=user.nickName;
var imgUrl=user.imgUrl;
var rtn=ukchannel+"¥"+nickName+"¥"+imgUrl;
return rtn;
}
}
module.exports=SocketNotifyCtl;
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class TreearchCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(TreearchCtl));
}
async getTreeArchByCode (p, q, req) {
let code = p.code;
let archName = p.archName;
let rtn = await this.service.getTreeArchByCode(archName, code)
return system.getResult(rtn)
}
async getRegions (p, q, req) {
let regionjson = await this.service.getRegions();
return system.getResult({ regionJson: regionjson })
}
async getSysArchJSON (p, q, req) {
let sysArchJSON = await this.service.getSysArchJSON();
return system.getResult({ sysArchJSON: sysArchJSON })
}
async saveSysArchJSON (p, q, req) {
let sysArchJSON = await this.service.saveSysArchJSON(p.sysArchJSON, p);
return system.getResult({ sysArchJSON: sysArchJSON })
}
async saveRegions (p, q, req) {
let regionjson = await this.service.saveRegions(p.regionJson);
return system.getResult({ regionJson: regionjson })
}
async getProductcats (p, q, req) {
let productcatJson = await this.service.getProductcats();
return system.getResult({ productcatJson: productcatJson })
}
async saveProductcats (p, q, req) {
let productcatJson = await this.service.saveProductcats(p.productcatJson);
return system.getResult({ productcatJson: productcatJson })
}
}
module.exports = TreearchCtl;
var system=require("../../../system")
const CtlBase = require("../../ctl.base");
const crypto = require('crypto');
var fs=require("fs");
var accesskey='3KV9nIwW8qkTGlrPmAe3HnR3fzM6r5';
var accessKeyId='LTAI4GC5tSKvqsH2hMqj6pvd';
var url="https://gsb-zc.oss-cn-beijing.aliyuncs.com";
class UploadCtl extends CtlBase{
constructor(){
super("common",CtlBase.getServiceName(UploadCtl));
this.cmdPdf2HtmlPattern = "docker run -i --rm -v /tmp/:/pdf 0c pdf2htmlEX --zoom 1.3 '{fileName}'";
this.restS=system.getObject("util.execClient");
this.cmdInsertToFilePattern = "sed -i 's/id=\"page-container\"/id=\"page-container\" contenteditable=\"true\"/'";
//sed -i 's/1111/&BBB/' /tmp/input.txt
//sed 's/{position}/{content}/g' {path}
}
async getOssConfig(){
var policyText = {
"expiration":"2119-12-31T16:00:00.000Z",
"conditions":[
["content-length-range",0,1048576000],
["starts-with","$key","zc"]
]
};
var b = new Buffer(JSON.stringify(policyText));
var policyBase64 = b.toString('base64');
var signature= crypto.createHmac('sha1',accesskey).update(policyBase64).digest().toString('base64'); //base64
var data={
OSSAccessKeyId:accessKeyId,
policy:policyBase64,
Signature:signature,
Bucket:'gsb-zc',
success_action_status:201,
url:url
};
return data;
};
async upfile(srckey,dest){
var oss=system.getObject("util.ossClient");
var result=await oss.upfile(srckey,"/tmp/"+dest);
return result;
};
async downfile(srckey){
var oss=system.getObject("util.ossClient");
var downfile=await oss.downfile(srckey).then(function(){
downfile="/tmp/"+srckey;
return downfile;
});
return downfile;
};
async pdf2html(obj){
var srckey=obj.key;
var downfile=await this.downfile(srckey);
var cmd=this.cmdPdf2HtmlPattern.replace(/\{fileName\}/g, srckey);
var rtn=await this.restS.exec(cmd);
var path="/tmp/"+srckey.split(".pdf")[0]+".html";
var a=await this.insertToFile(path);
fs.unlink("/tmp/"+srckey);
var result=await this.upfile(srckey.split(".pdf")[0]+".html",srckey.split(".pdf")[0]+".html");
return result.url;
};
async insertToFile(path){
var cmd=this.cmdInsertToFilePattern+" "+path;
return await this.restS.exec(cmd);
};
}
module.exports=UploadCtl;
var system = require("../../../system");
const http = require("http");
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class logCtl extends CtlBase {
constructor() {
super("common", CtlBase.getServiceName(logCtl));
this.logClient = system.getObject("util.logClient");
}
async findAndCountAll(pobj, qobj, req) {
try {
let rtn = await this.logClient.logList(pobj);
return system.getResult({
results: {
count: rtn.totalCount,
rows: rtn && rtn.list && rtn.list.map(item => {
let { opTitle, identifyCode, messageBody, resultInfo, errorInfo, requestId, created_at } = item;
messageBody = messageBody ? JSON.parse(messageBody) : {}
resultInfo = resultInfo ? JSON.parse(resultInfo) : {}
let status;
if (resultInfo && (resultInfo.status === 0 || !resultInfo.status || resultInfo.status === 1)) {
status = "SUCCESS"
} else {
status = "FAIL"
}
if (errorInfo && errorInfo !== "null") {
status = "FAIL"
}
return {
opTitle: opTitle,
url: `${messageBody.gname}/${messageBody.qname}/${messageBody.method}`,
user: messageBody.param && messageBody.param.username || '',
ip: messageBody.param && messageBody.param.clientIp,
created_at,
requestId,
status,
info: {
opTitle, identifyCode, messageBody, resultInfo, errorInfo, requestId, created_at
}
}
}) || []
}
});
} catch (err) {
return system.getResult(null, err.message);
}
}
}
module.exports = logCtl;
var system = require("../../../system");
const http = require("http");
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
class MsgCtl extends CtlBase {
constructor() {
super("msg", CtlBase.getServiceName(MsgCtl));
}
/**
* 创建消息
* @param {
* msgType,
* app_id,
* app_key(跳转链接时需要)
// * company_id(需要给某个交付商发送,暂时不考虑)
* sender (如果不传默认系统发的)
* sender_id
* emergency_level(紧急级别暂时不考虑)
* jump_address (详情跳转地址)
* target:[{id:"",name:''}] 发送给目标人 (非系统消息时必填)
* } pobj
* @param {*} qobj
* @param {*} req
*/
async create(pobj, qobj, req) {
if (!pobj.title) {
return system.getResult(null, "title can not be empty,100290");
}
if (!pobj.content) {
return system.getResult(null, "content can not be empty,100290");
}
if (!pobj.sender || (pobj.sender_id !== 0 && !pobj.sender_id)) {
return system.getResult(null, "发送者信息 can not be empty,100290");
}
if (pobj.jump_address && !pobj.app_key) {
return system.getResult(null, "需要跳转时,app_key不能为空");
}
if (!pobj.msgType) {
return system.getResult(null, "msgType can not be empty,100290");
}
if (pobj.msgType !== system.Msg.SYS && !pobj.target) {
return system.getResult(null, "非系统公告,target 不能为空");
}
if (pobj.msgType === system.Msg.SINGLE && Object.prototype.toString.call(pobj.target) !== '[object Object]') {
return system.getResult(null, "单条消息时,target格式是对象");
}
if ((pobj.msgType === system.Msg.SINGLE && pobj.target) && !pobj.target.id) {
return system.getResult(null, "单条消息时,目标用户id不能为空");
}
if (pobj.msgType === system.Msg.MULTI && Object.prototype.toString.call(pobj.target) !== "[object Array]") {
return system.getResult(null, "多条消息时,target格式是数组");
}
if ((pobj.msgType === system.Msg.MULTI && pobj.target) && pobj.target.length <= 0) {
return system.getResult(null, "多条消息时,target数组不能为空");
}
if ((pobj.msgType === system.Msg.MULTI && pobj.target) && pobj.target.length > 0) {
for (let val of pobj.target) {
if (!val.id) {
return system.getResult(null, "目标用户id不能为空");
}
}
}
try {
const rs = await this.service.create(pobj, qobj, req);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async createSysMessage(pobj, qobj, req) {
if (!pobj.title) {
return system.getResult(null, "title can not be empty,100290");
}
if (!pobj.content) {
return system.getResult(null, "content can not be empty,100290");
}
try {
const rs = await this.service.create({
...pobj,
msgType: system.Msg.SYS,
sender: pobj.username,
sender_id: pobj.userid,
company_id: pobj.company_id
}, qobj, req);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
/**
* 返回未提醒 消息
* @param {*} pobj
* @param {*} qobj
* @param {*} req
*/
async findRemindMessage(pobj, qobj, req) {
if (!pobj.userid) {
return system.getResult(null, "userid can not be empty,100290");
}
try {
const rs = await this.service.findRemindMessage(pobj, qobj, req);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
/**
* 查询 未读消息条数
* @param {*} pobj
* @param {*} qobj
* @param {*} req
*/
async findUnreadCount(pobj, qobj, req) {
if (!pobj.userid) {
return system.getResult(null, "userid can not be empty,100290");
}
pobj.is_read = false;
try {
const rs = await this.service.findUnreadCount(pobj, qobj, req);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
/**
* 更新已读未读
* @param {
* all true| false 全部已读未读
* } pobj
* @param {*} qobj
* @param {*} req
*/
async updateStatus(pobj, qobj, req) {
if (!pobj.userid) {
return system.getResult(null, "userid can not be empty,100290");
}
if (!pobj.id && !pobj.all) {
return system.getResult(null, "id can not be empty,100290");
}
try {
const rs = await this.service.updateStatus(pobj, qobj, req);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
/**
* 查询系统公告
* @param {*} pobj
* @param {*} qobj
* @param {*} req
*/
async findSystemMsgCount(pobj, qobj, req) {
try {
pobj.type = 'recently';
const rs = await this.service.findSystemMsgCount(pobj, qobj, req);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
/**
* 消息列表
* @param {*} pobj
* @param {*} qobj
* @param {*} req
*/
async list(pobj, qobj, req) {
if (!pobj.msgType) {
return system.getResult(null, "msgType can not be empty,100290");
}
if (!pobj.userid) {
return system.getResult(null, "userid can not be empty,100290");
}
try {
const rs = await this.service.list(pobj, qobj, req);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
/**
* 各个消息类型条数统计
*/
async groupCount(pobj, qobj, req) {
if (!pobj.userid) {
return system.getResult(null, "userid can not be empty,100290");
}
try {
const rs = await this.service.groupCount(pobj, qobj, req);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
}
module.exports = MsgCtl;
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;
class PricecatCtl extends CtlBase {
constructor() {
super("product", CtlBase.getServiceName(PricecatCtl));
this.pricestrategyService=system.getObject("service.product.pricestrategySve")
}
async buildPriceStrategy(p,q,req){
let pricetypes=p.pricetypes
let rtn=await this.pricestrategyService.buildPriceStrategy(pricetypes)
if(rtn){
if(rtn.status==-1){
return system.getResult(null,rtn.msg)
}else{
return system.getResult({})
}
}
return system.getResult({})
}
}
module.exports = PricecatCtl;
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class PricestrategyCtl extends CtlBase {
constructor() {
super("product", CtlBase.getServiceName(PricestrategyCtl));
}
async refQuery(pobj, qobj, req) {
let rtn=await this.service.refQuery(pobj);
return rtn
}
}
module.exports = PricestrategyCtl;
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class ProductCtl extends CtlBase {
constructor() {
super("product", CtlBase.getServiceName(ProductCtl));
// this.pricestrategyService=system.getObject("service.product.pricestrategySve")
}
async create(p,q,req){
let pn=await this.service.create(p)
return system.getResult(pn)
}
}
module.exports = ProductCtl;
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class ProductcostCtl extends CtlBase {
constructor() {
super("product", CtlBase.getServiceName(ProductcostCtl));
// this.pricestrategyService=system.getObject("service.product.pricestrategySve")
}
}
module.exports = ProductcostCtl;
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class ProductpriceCtl extends CtlBase {
constructor() {
super("product", CtlBase.getServiceName(ProductpriceCtl));
// this.pricestrategyService=system.getObject("service.product.pricestrategySve")
}
async updownProduct(p,q,req){
let updownid=p.curid
let rtn=await this.service.updownProduct(updownid)
return system.getResult(rtn)
}
}
module.exports = ProductpriceCtl;
const system = require("../../../system");
const settings = require("../../../../config/settings");
function exp(db, DataTypes) {
var base = {
code: {
type: DataTypes.STRING(50),
unique: true
},
name: DataTypes.STRING(1000),
};
return base;
}
module.exports = exp;
const system = require("../../system");
const settings = require("../../../config/settings");
const appconfig = system.getSysConfig();
function exp(db, DataTypes) {
var base = {
//继承的表引用用户信息user_id
code: DataTypes.STRING(100),
name: DataTypes.STRING(500),
creator: DataTypes.STRING(100),//创建者
updator: DataTypes.STRING(100),//更新者
auditor: DataTypes.STRING(100),//审核者
opNotes: DataTypes.STRING(500),//操作备注
auditStatusName: {
type:DataTypes.STRING(50),
defaultValue:"待审核",
},
auditStatus: {//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
type: DataTypes.ENUM,
values: Object.keys(appconfig.pdict.audit_status),
set: function (val) {
this.setDataValue("auditStatus", val);
this.setDataValue("auditStatusName", appconfig.pdict.audit_status[val]);
},
defaultValue:"dsh",
},
sourceTypeName: DataTypes.STRING(50),
sourceType: {//来源类型 "order": "订单","expensevoucher": "费用单","receiptvoucher": "收款单", "trademark": "商标单"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.source_type),
set: function (val) {
this.setDataValue("sourceType", val);
this.setDataValue("sourceTypeName", appconfig.pdict.source_type[val]);
}
},
sourceOrderNo: DataTypes.STRING(100),//来源单号
};
return base;
}
module.exports = exp;
const system = require("../system")
const settings = require("../../config/settings.js");
class CacheBase {
constructor() {
this.db = system.getObject("db.common.connection").getCon();
this.redisClient = system.getObject("util.redisClient");
this.desc = this.desc();
this.prefix = this.prefix();
this.cacheCacheKeyPrefix = "sadd_base:cachekey";
this.isdebug = this.isdebug();
}
isdebug() {
return false;
}
desc() {
throw new Error("子类需要定义desc方法,返回缓存描述");
}
prefix() {
throw new Error("子类需要定义prefix方法,返回本缓存的前缀");
}
async cache(inputkey, val, ex, ...items) {
const cachekey = this.prefix + inputkey;
var cacheValue = await this.redisClient.get(cachekey);
if (!cacheValue || cacheValue == "undefined" || cacheValue == "null" || this.isdebug) {
var objvalstr = await this.buildCacheVal(cachekey, inputkey, val, ex, ...items);
if (!objvalstr) {
return null;
}
if (ex) {
await this.redisClient.setWithEx(cachekey, objvalstr, ex);
} else {
await this.redisClient.set(cachekey, objvalstr);
}
//缓存当前应用所有的缓存key及其描述
this.redisClient.sadd(this.cacheCacheKeyPrefix, [cachekey + "|" + this.desc]);
return JSON.parse(objvalstr);
} else {
// this.redisClient.setWithEx(cachekey, cacheValue, ex);
return JSON.parse(cacheValue);
}
}
async getCache(inputkey, ex) {
const cachekey = this.prefix + inputkey;
var cacheValue = await this.redisClient.get(cachekey);
if (!cacheValue || cacheValue == "undefined" || cacheValue == "null") {
return null;
} else {
if (ex) {
this.redisClient.set(cachekey, cacheValue, ex);
}
return JSON.parse(cacheValue);
}
}
async invalidate(inputkey) {
const cachekey = this.prefix + inputkey;
this.redisClient.delete(cachekey);
return 0;
}
async buildCacheVal(cachekey, inputkey, val, ex, ...items) {
throw new Error("子类中实现构建缓存值的方法,返回字符串");
}
}
module.exports = CacheBase;
const CacheBase=require("../cache.base");
const system=require("../../system");
//缓存首次登录的赠送的宝币数量
class CacheLocker extends CacheBase{
constructor(){
super();
this.prefix="locker_";
}
desc(){
}
prefix(){
}
async init(tradekey){
const key=this.prefix+tradekey;
return this.redisClient.rpushWithEx(key,"1",1800);
}
async enter(tradekey){
const key=this.prefix+tradekey;
return this.redisClient.rpop(key);
}
async release(tradekey){
const key=this.prefix+tradekey;
return this.redisClient.rpushWithEx(key,"1",1800);
}
}
module.exports=CacheLocker;
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class AliCache extends CacheBase {
constructor() {
super();
//this.userDao = system.getObject("db.auth.userDao");
}
isdebug() {
return settings.env == "dev";
}
desc() {
return "缓存缓存阿里队列信息";
}
prefix() {
return "g_aliInfo_cm:"
}
async buildCacheVal(cachekey, inputkey, val, ex, ...items) {
if (val) {
return val;
}
return null;
}
}
module.exports = AliCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class AppCache extends CacheBase{
constructor(){
super();
this.prefix="g_centerappkey:";
this.appDao=system.getObject("db.common.appDao");
}
isdebug(){
return settings.env=="dev";
}
desc(){
return "缓存本地应用对象";
}
prefix(){
return "g_applocal_cm:"
}
async buildCacheVal(cachekey,inputkey, val, ex, ...items) {
const configValue=await this.appDao.findOne({appkey:inputkey});
if (configValue) {
return JSON.stringify(configValue);
}
return null;
}
}
module.exports=AppCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class ChannelCache extends CacheBase {
constructor() {
super();
this.channelDao = system.getObject("db.common.channelDao");
}
isdebug () {
return true;
}
desc () {
return "缓存本地应用对象";
}
prefix () {
return "g_channel_cm:"
}
async buildCacheVal (cachekey, inputkey, val, ex, ...items) {
const configValue = await this.channelDao.model.findOne(
{
where: { routehost: inputkey },
include: [{ model: this.db.models.pathtomethod, as: "pts" }]
});
if (configValue) {
return JSON.stringify(configValue);
}
return null;
}
}
module.exports = ChannelCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class ClientBindBizUserCache extends CacheBase{
constructor(){
super();
}
isdebug(){
return settings.env=="dev";
}
desc(){
return "缓存本地应用对象";
}
prefix(){
return "g_client2bizuser_cm:"
}
async buildCacheVal(cachekey,inputkey, val, ex, ...items) {
return JSON.stringify(val);
}
}
module.exports=ClientBindBizUserCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class CodeCache extends CacheBase{
constructor(){
super();
this.userDao=system.getObject("db.auth.userDao");
}
isdebug(){
return false
// return settings.env=="dev";
}
desc(){
return "缓存code子系统用户登录信息对象";
}
prefix(){
return "g_code_userlocal_cm:"
}
async buildCacheVal(cachekey,inputkey, val, ex, ...items) {
if (val) {
return JSON.stringify(val);
}
return null;
}
}
module.exports=CodeCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class CompanyCache extends CacheBase{
constructor(){
super();
this.prefix="g_centercompanykey:";
this.companyDao=system.getObject("db.common.companyDao");
}
isdebug(){
return settings.env=="dev";
}
desc(){
return "缓存统一公司对象";
}
prefix(){
return "gc_companylocal_cm:"
}
async buildCacheVal(cachekey,inputkey, val, ex, ...items) {
const configValue=await this.companyDao.findOne({companykey:inputkey});
if (configValue) {
return JSON.stringify(configValue);
}
return null;
}
}
module.exports=CompanyCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class LoopDistributionUserCache extends CacheBase {
constructor() {
super();
this.userDao = system.getObject("db.auth.userDao");
this.channelDao = system.getObject("db.common.channelDao");
}
isdebug() {
return settings.env == "dev";
}
desc() {
return "缓存阿里订单轮循环分配的业务员信息";
}
prefix() {
return "g_loopDistributionUserInfo_cm:"
}
async buildCacheVal(cachekey, inputkey, val, ex, ...items) {
if (val) {
return val;
}
return null;
}
}
module.exports = LoopDistributionUserCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
class MagCache extends CacheBase {
constructor() {
super();
this.prefix = "magCache";
}
desc() {
return "管理当前缓存的key";
}
prefix() {
return "g_magcache:";
}
async getCacheSmembersByKey(key) {
return this.redisClient.smembers(key);
}
async delCacheBySrem(key, value) {
return this.redisClient.srem(key, value)
}
async keys(p) {
return this.redisClient.keys(p);
}
async get(k) {
return this.redisClient.get(k);
}
async del(k) {
return this.redisClient.delete(k);
}
async clearAll() {
console.log("xxxxxxxxxxxxxxxxxxxclearAll............");
return this.redisClient.flushall();
}
}
module.exports = MagCache;
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class TxCache extends CacheBase {
constructor() {
super();
//this.userDao = system.getObject("db.auth.userDao");
}
isdebug() {
return settings.env == "dev";
}
desc() {
return "缓存缓存腾讯队列信息";
}
prefix() {
return "g_txInfo_cm:"
}
async buildCacheVal(cachekey, inputkey, val, ex, ...items) {
if (val) {
return val;
}
return null;
}
}
module.exports = TxCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class UserCache extends CacheBase {
constructor() {
super();
this.userDao = system.getObject("db.auth.userDao");
this.channelDao = system.getObject("db.common.channelDao");
}
isdebug () {
return settings.env == "dev";
}
desc () {
return "缓存本地应用对象";
}
prefix () {
return "g_userlocal_cm:"
}
async buildCacheVal (cachekey, inputkey, val, ex, ...items) {
const configValue = await this.userDao.model.findAll({
where: { userName: inputkey, app_id: settings.pmappid, isEnabled: true },
attributes: ['id', 'userName', 'nickName', 'headUrl', 'jwtkey', 'jwtsecret', 'created_at', 'isSuper', 'isAdmin', 'isAllocated', 'mail', 'mobile', 'opath', 'ptags'],
include: [
{ model: this.db.models.company, attributes: ['id', 'name', 'companykey', 'appids', "code"], raw: true },
{ model: this.db.models.role, as: "Roles", attributes: ["id", "code"], }
],
});
if (configValue && configValue[0]) {
let data = JSON.parse(JSON.stringify(configValue[0]));
if (data.company.id != 1 && data.company.appids) {
let tmpids = data.company.appids.split(",")
let tmpid = tmpids[0]
if (tmpid && tmpid != "" && tmpids.length == 1) {
let app = await this.db.models.app.findById(tmpid)
data.defaultAppkey = app.appkey
}
}
let channelDatas = await this.channelDao.findAll({});
channelDatas = JSON.parse(JSON.stringify(channelDatas));
channelDatas.forEach(item => {
if (item.userids && item.userids.split(",").includes(data.id.toString())) {
data.channel = {
id: item.id,
code: item.code,
name: item.name
}
}
});
// 获取渠道信息
return JSON.stringify(data);
}
return null;
}
}
module.exports = UserCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
//缓存首次登录的赠送的宝币数量
class VCodeCache extends CacheBase {
constructor() {
super();
this.smsUtil = system.getObject("util.smsClient");
}
// isdebug() {
// return settings.env == "dev";
// }
desc () {
return "缓存给手机发送的验证码60妙";
}
prefix () {
return "g_vcode_cm:"
}
async buildCacheVal (cachekey, inputkey, val, ex, ...items) {
//inputkey采用appkey_mobile的形式
var mobile = inputkey;
var tmplCode = val;
var signName = items ? items[0] : "";
var vcode = await this.smsUtil.getUidStr(6, 10);
if (!tmplCode && !signName) {
console.log("=====================================", mobile, vcode)
this.smsUtil.sendMsg(mobile, vcode);
} //tmplCode为发送短信编码,需在阿里开通,signName为短信头描述信息,二者没有传递则用默认的发送验证码
else {
this.smsUtil.aliSendMsg(mobile, tmplCode, signName, JSON.stringify({ code: vcode }));
}
return JSON.stringify({ vcode: vcode });
}
}
module.exports = VCodeCache;
const system = require("../system");
class Dao {
constructor(modelName) {
this.modelName = modelName;
var db = system.getObject("db.common.connection").getCon();
this.db = db;
console.log("........set dao model..........");
console.log(this.modelName)
this.model = db.models[this.modelName];
console.log(this.modelName);
}
preCreate (u) {
return u;
}
async create (u, t) {
var u2 = this.preCreate(u);
if (t) {
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
console.log(this.model);
return this.model.create(u2, { transaction: t }).then(u => {
return u;
});
} else {
return this.model.create(u2).then(u => {
return u;
});
}
}
static getModelName (ClassObj) {
return ClassObj["name"].substring(0, ClassObj["name"].lastIndexOf("Dao")).toLowerCase()
}
async refQuery (qobj) {
var w = qobj.refwhere ? qobj.refwhere : {};
if (qobj.levelinfo) {
w[qobj.levelinfo.levelfield] = qobj.levelinfo.level;
}
if (qobj.parentinfo) {
w[qobj.parentinfo.parentfield] = qobj.parentinfo.parentcode;
}
//如果需要控制数据权限
if (qobj.datapriv) {
w["id"] = { [this.db.Op.in]: qobj.datapriv };
}
if (qobj.likestr) {
w[qobj.fields[0]] = { [this.db.Op.like]: "%" + qobj.likestr + "%" };
return this.model.findAll({ where: w, attributes: qobj.fields });
} else {
return this.model.findAll({ where: w, attributes: qobj.fields });
}
}
async bulkDelete (ids, t) {
if (t) {
var en = await this.model.destroy({ where: { id: { [this.db.Op.in]: ids } }, transaction: t });
return en;
} else {
var en = await this.model.destroy({ where: { id: { [this.db.Op.in]: ids } } });
return en
}
}
async bulkDeleteByWhere (whereParam, t) {
var en = null;
if (t != null && t != 'undefined') {
whereParam.transaction = t;
return await this.model.destroy(whereParam);
} else {
return await this.model.destroy(whereParam);
}
}
async delete (qobj, t) {
var en = null
if (t != null && t != 'undefined') {
en = await this.model.findOne({ where: { id: qobj.id }, transaction: t });
if (en != null) {
await en.destroy({ transaction: t });
return en
}
} else {
en = await this.model.findOne({ where: { id: qobj.id } });
if (en != null) {
return en.destroy();
}
}
return null;
}
extraModelFilter (pobj) {
//return {"key":"include","value":{model:this.db.models.app}};
return null;
}
extraWhere (obj, where) {
return where;
}
orderBy (qobj) {
//return {"key":"include","value":{model:this.db.models.app}};
if (!qobj.orderInfo || qobj.orderInfo.length == 0) {
return [["created_at", "DESC"]];
} else {
return qobj.orderInfo;
}
}
buildQuery (qobj) {
var linkAttrs = [];
const pageNo = qobj.pageInfo.pageNo;
const pageSize = qobj.pageInfo.pageSize;
const search = qobj.search;
var qc = {};
//设置分页查询条件
qc.limit = pageSize;
qc.offset = (pageNo - 1) * pageSize;
//默认的查询排序
qc.order = this.orderBy(qobj);
//构造where条件
qc.where = {};
if (search) {
Object.keys(search).forEach(k => {
console.log(search[k], ":search[k]search[k]search[k]");
if (search[k] && search[k] != 'undefined' && search[k] != "") {
if ((k.indexOf("Date") >= 0 || k.indexOf("_at") >= 0)) {
if (search[k] != "" && search[k]) {
var stdate = new Date(search[k][0]);
var enddate = new Date(search[k][1]);
qc.where[k] = { [this.db.Op.between]: [stdate, enddate] };
}
}
else if (k.indexOf("id") >= 0) {
qc.where[k] = search[k];
}
else if (k.indexOf("channelCode") >= 0) {
qc.where[k] = search[k];
}
else if (k.indexOf("Type") >= 0) {
qc.where[k] = search[k];
}
else if (k.indexOf("Status") >= 0) {
qc.where[k] = search[k];
}
else if (k.indexOf("status") >= 0) {
qc.where[k] = search[k];
}
else {
if (k.indexOf("~") >= 0) {
linkAttrs.push(k);
} else {
qc.where[k] = { [this.db.Op.like]: "%" + search[k] + "%" };
}
}
}
});
}
this.extraWhere(qobj, qc.where, qc, linkAttrs);
var extraFilter = this.extraModelFilter(qobj);
if (extraFilter) {
qc[extraFilter.key] = extraFilter.value;
}
console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm");
console.log(qc);
return qc;
}
buildaggs (qobj) {
var aggsinfos = [];
if (qobj.aggsinfo) {
qobj.aggsinfo.sum.forEach(aggitem => {
var t1 = [this.db.fn('SUM', this.db.col(aggitem.field)), aggitem.field + "~" + "sum"];
aggsinfos.push(t1);
});
qobj.aggsinfo.avg.forEach(aggitem => {
var t2 = [this.db.fn('AVG', this.db.col(aggitem.field)), aggitem.field + "~" + "avg"];
aggsinfos.push(t2);
});
}
return aggsinfos;
}
async findAggs (qobj, qcwhere) {
var aggArray = this.buildaggs(qobj);
if (aggArray.length != 0) {
qcwhere["attributes"] = {};
qcwhere["attributes"] = aggArray;
qcwhere["raw"] = true;
//提高效率去掉关联和排序,数据记录数量,为聚合
let tmpwhere = {
attributes: qcwhere.attributes,
raw: true,
where: qcwhere.where
}
var aggResult = await this.model.findOne(tmpwhere);
return aggResult;
} else {
return {};
}
}
convertAggResult (aggresult) {
return aggresult
}
async findAndCountAll (qobj, t) {
var qc = this.buildQuery(qobj);
let findList = {}
let count = await this.findCount({ where: qc.where })
var rows = await this.model.findAll(qc);
findList["count"] = count
findList["rows"] = rows
var aggresult = await this.findAggs(qobj, qc);
let convertAggResult = this.convertAggResult(aggresult);
var rtn = {};
rtn.results = findList;
rtn.aggresult = convertAggResult;
return rtn;
}
preUpdate (obj) {
return obj;
}
async update (obj, tm) {
var obj2 = this.preUpdate(obj);
if (tm != null && tm != 'undefined') {
await this.model.update(obj2, { where: { id: obj2.id }, transaction: tm });
let n = await this.model.findOne({ where: { id: obj2.id }, transaction: tm });
return n
} else {
await this.model.update(obj2, { where: { id: obj2.id } });
let n = await this.model.findById(obj2.id)
return n
}
}
async bulkCreate (ids, t) {
if (t != null && t != 'undefined') {
return await this.model.bulkCreate(ids, { transaction: t });
} else {
return await this.model.bulkCreate(ids);
}
}
async updateByWhere (setObj, whereObj, t) {
let inWhereObj = {}
if (t && t != 'undefined') {
if (whereObj && whereObj != 'undefined') {
inWhereObj["where"] = whereObj;
inWhereObj["transaction"] = t;
} else {
inWhereObj["transaction"] = t;
}
} else {
inWhereObj["where"] = whereObj;
}
return this.model.update(setObj, inWhereObj);
}
async customExecAddOrPutSql (sql, paras = null) {
return this.db.query(sql, paras);
}
async customQuery (sql, paras, t) {
var tmpParas = null;//||paras=='undefined'?{type: this.db.QueryTypes.SELECT }:{ replacements: paras, type: this.db.QueryTypes.SELECT };
if (t && t != 'undefined') {
if (paras == null || paras == 'undefined') {
tmpParas = { type: this.db.QueryTypes.SELECT };
tmpParas.transaction = t;
} else {
tmpParas = { replacements: paras, type: this.db.QueryTypes.SELECT };
tmpParas.transaction = t;
}
} else {
tmpParas = paras == null || paras == 'undefined' ? { type: this.db.QueryTypes.SELECT } : { replacements: paras, type: this.db.QueryTypes.SELECT };
}
return this.db.query(sql, tmpParas);
}
async findCount (whereObj = null) {
return this.model.count(whereObj, { logging: false }).then(c => {
return c;
});
}
async findSum (fieldName, whereObj = null) {
return this.model.sum(fieldName, whereObj);
}
async getPageList (pageIndex, pageSize, whereObj = null, orderObj = null, attributesObj = null, includeObj = null) {
var tmpWhere = {};
tmpWhere.limit = pageSize;
tmpWhere.offset = (pageIndex - 1) * pageSize;
if (whereObj != null) {
tmpWhere.where = whereObj;
}
if (orderObj != null && orderObj.length > 0) {
tmpWhere.order = orderObj;
}
if (attributesObj != null && attributesObj.length > 0) {
tmpWhere.attributes = attributesObj;
}
if (includeObj != null && includeObj.length > 0) {
tmpWhere.include = includeObj;
tmpWhere.distinct = true;
} else {
tmpWhere.raw = true;
}
return await this.model.findAndCountAll(tmpWhere);
}
async findOne (obj, attributes = []) {
if (attributes.length > 0) {
return this.model.findOne({ "where": obj, attributes, row: true });
} else {
return this.model.findOne({ "where": obj, row: true });
}
}
async findOneWithTm (obj, t) {
return this.model.findOne({ "where": obj, transaction: t });
}
async findById (oid) {
return this.model.findById(oid);
}
async findAll (obj, include = [], other = {}) {
return this.model.findAll({ "where": obj, include, row: true, ...other });
}
}
module.exports = Dao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class AuthDao extends Dao{
constructor(){
super(Dao.getModelName(AuthDao));
}
extraWhere(qobj,qw,qc){
qc.raw=true;
return qw;
}
}
module.exports=AuthDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class DataauthDao extends Dao{
constructor(){
super(Dao.getModelName(DataauthDao));
}
extraWhere(qobj,qw,qc){
qc.raw=true;
return qw;
}
}
module.exports=DataauthDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class OrgDao extends Dao{
constructor(){
super(Dao.getModelName(OrgDao));
}
extraWhere(qobj,qw,qc){
qc.raw=true;
return qw;
}
}
module.exports=OrgDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class RoleDao extends Dao{
constructor(){
super(Dao.getModelName(RoleDao));
}
async findOne(paramappid,t){
var app= await this.model.findOne({where:{appid:paramappid}},{transaction:t});
return app;
}
extraWhere(obj,w,qc,linkAttrs){
// if(obj.codepath && obj.codepath!=""){
// // if(obj.codepath.indexOf("userarch")>0){//说明是应用管理员的查询
// // console.log(obj);
// // w["app_id"]=obj.appid;
// // }
// }
//w["app_id"]=obj.app_id;//不考虑应用的区别
w["company_id"]=obj.company_id;
return w;
}
extraModelFilter(){
return {"key":"include","value":[{model:this.db.models.app,}]};
}
async preUpdate(u){
return u;
}
async update(obj){
var obj2=await this.preUpdate(obj);
await this.model.update(obj2,{where:{id:obj2.id}});
var role=await this.model.findOne({where:{id:obj2.id}});
return role;
}
async preCreate(u){
return u;
}
async create(u,t){
var self=this;
var u2= await this.preCreate(u);
if(t){
var role= await this.model.create(u2,{transaction: t});
return role;
}else{
var role= await this.model.create(u2);
return role;
}
}
}
module.exports=RoleDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class UserDao extends Dao {
constructor() {
super(Dao.getModelName(UserDao));
}
async getAuths(userid) {
var self = this;
return this.model.findOne({
where: { id: userid },
include: [{ model: self.db.models.account, attributes: ["id", "isSuper", "referrerOnlyCode"] },
{
model: self.db.models.role, as: "Roles", attributes: ["id", "code"], include: [
{ model: self.db.models.product, as: "Products", attributes: ["id", "code"] }
]
},
],
});
}
async getUserByUsername(username, appkey, t) {
var app = await this.appDao.findOne(appkey);
var tUser = await this.model.findOne({
where: { userName: username, app_id: app.id },
include: [{ model: this.db.models.app, raw: true },
// {model:this.db.models.partnerinfo,attributes:["id","user_id","app_id","userName","applyType","applyName","workPic","tagInfo","mobile","tel","applyProvince","applyCity",
// "applyArea","applyAddr","identityCardPic","identityCard","businessLicensePic","businessLicenseNum","entName","cardNo","realName"]},
{ model: this.db.models.account, attributes: ["id", "isSuper", "referrerOnlyCode"], raw: true },
{
model: this.db.models.role, as: "Roles", attributes: ["id", "code"], include: [
{ model: this.db.models.product, as: "Products", attributes: ["id", "code"], raw: true }
]
},
]
}, { transaction: t });
// if(tUser!=null){
// tUser=tUser.get({plain:true});
// tUser.partnerinfo=await this.partnerinfoDao.model.findOne({where:{onlyCode:tUser.onlyCode},raw:true});
// }
return tUser;
}
async getUserByOpenId(popenid, appkey, t) {
var app = await this.appDao.findOne(appkey);
var tUser = await this.model.findOne({
where: { openId: popenid },
include: [{ model: this.db.models.app, raw: true },
// {model:this.db.models.partnerinfo,attributes:["id","user_id","app_id","userName","applyType","applyName","workPic","tagInfo","mobile","tel","applyProvince","applyCity",
// "applyArea","applyAddr","identityCardPic","identityCard","businessLicensePic","businessLicenseNum","entName","cardNo","realName"]},
{ model: this.db.models.account, attributes: ["id", "isSuper", "referrerOnlyCode"], raw: true },
{
model: this.db.models.role, as: "Roles", attributes: ["id", "code"], include: [
{ model: this.db.models.product, as: "Products", attributes: ["id", "code"], raw: true }
]
},
]
}, { transaction: t });
if (tUser != null) {
tUser = tUser.get({ plain: true });
tUser.partnerinfo = await this.partnerinfoDao.model.findOne({ where: { onlyCode: tUser.onlyCode }, raw: true });
}
// console.log("tUser.partnerinfo...................................>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>999sy");
// console.log(tUser);
return tUser;
}
async setAccount(user, account, t) {
var user = await user.setAccount(account, { transaction: t });
return user;
}
async setApp(user, app, t) {
//按照APPId,获取app对象
var user = await user.setApp(app, { transaction: t });
return user;
}
extraModelFilter() {
//return {"key":"include","value":[{model:this.db.models.app,},{model:this.db.models.role,as:"Roles",attributes:["id","name"],joinTableAttributes:['created_at']}]};
return {
"key": "include", "value": [
// {model:this.db.models.app,},
{ model: this.db.models.company, },
{ model: this.db.models.role, as: "Roles", attributes: ["id", "name"] }]
};
}
extraWhere(obj, w, qc, linkAttrs) {
console.log("----=========")
console.log(obj)
if (obj.bizpath && obj.bizpath != "") {
if (obj.bizpath.indexOf("tanents_info") > 0) {//说明是超级管理员的查询
w["isAdmin"] = true;
} else {
w["isAdmin"] = false;
w["company_id"] = obj.company_id;
// 为空说明是管理员,不需设置组织结构过滤
if (obj.opath && obj.opath != "") {
w["opath"] = { [this.db.Op.like]: `%${obj.opath}%` }
}
}
}
if (linkAttrs.length > 0) {
var search = obj.search;
var lnkKey = linkAttrs[0];
var strq = "$" + lnkKey.replace("~", ".") + "$";
w[strq] = { [this.db.Op.like]: "%" + search[lnkKey] + "%" };
}
return w;
}
async preUpdate(u) {
if (u.roles && u.roles.length >= 0) {
var roles = await this.db.models.role.findAll({ where: { id: { [this.db.Op.in]: u.roles } } });
u.roles = roles
}
return u;
}
async update(obj) {
var obj2 = await this.preUpdate(obj);
await this.model.update(obj2, { where: { id: obj2.id } });
var user = await this.model.findOne({ where: { id: obj2.id } });
if (obj2.roles) {
user.setRoles(obj2.roles);
}
return user;
}
async findAndCountAll(qobj, t) {
var users = await super.findAndCountAll(qobj, t);
return users;
}
async preCreate(u) {
// var roles=await this.db.models.role.findAll({where:{id:{[this.db.Op.like]:u.roles}}});
// console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
// console.log(roles);
// console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
// u.roles=roles
return u;
}
async create(u, t) {
var self = this;
var u2 = await this.preCreate(u);
if (t) {
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
console.log(u2);
return this.model.create(u2, { transaction: t }).then(user => {
return user;
});
} else {
return this.model.create(u2).then(user => {
return user;
});
}
}
//修改用户(user表)公司的唯一码
async putUserCompanyOnlyCode(userId, company_only_code, result) {
var customerObj = { companyOnlyCode: company_only_code };
var putSqlWhere = { where: { id: userId } };
this.updateByWhere(customerObj, putSqlWhere);
return result;
}
}
module.exports = UserDao;
// var u=new UserDao();
// var roledao=system.getObject("db.roleDao");
// (async ()=>{
// var users=await u.model.findAll({where:{app_id:1}});
// var role=await roledao.model.findOne({where:{code:"guest"}});
// console.log(role);
// for(var i=0;i<users.length;i++){
// await users[i].setRoles([role]);
// console.log(i);
// }
//
// })();
const system=require("../../../system");
const Dao=require("../../dao.base");
class AppDao extends Dao{
constructor(){
super(Dao.getModelName(AppDao));
}
extraWhere(obj,w,qc,linkAttrs){
if(obj.bizpath && obj.bizpath!=""){
if(obj.bizpath.indexOf("my_app")>0){//说明是租户查询自己创建的应用
let appstrs=obj.myappstrs
let appsarray=appstrs.split(",")
let appidsquery=appsarray.map(astr=>{
return astr.split("|")[0]
})
w["id"]= {[this.db.Op.in]:appidsquery};
}
}
if(linkAttrs.length>0){
var search=obj.search;
var lnkKey=linkAttrs[0];
var strq="$"+lnkKey.replace("~",".")+"$";
w[strq]= {[this.db.Op.like]:"%"+search[lnkKey]+"%"};
}
return w;
}
}
module.exports=AppDao;
// var u=new UserDao();
// var roledao=system.getObject("db.roleDao");
// (async ()=>{
// var users=await u.model.findAll({where:{app_id:1}});
// var role=await roledao.model.findOne({where:{code:"guest"}});
// console.log(role);
// for(var i=0;i<users.length;i++){
// await users[i].setRoles([role]);
// console.log(i);
// }
//
// })();
const system=require("../../../system");
const Dao=require("../../dao.base");
class ArticleDao extends Dao{
constructor(){
super(Dao.getModelName(ArticleDao));
}
orderBy(qobj) {
//return {"key":"include","value":{model:this.db.models.app}};
if(!qobj.orderInfo || qobj.orderInfo.length==0){
return [["created_at", "ASC"]];
}else{
return qobj.orderInfo;
}
}
}
module.exports=ArticleDao;
// var u=new UserDao();
// var roledao=system.getObject("db.roleDao");
// (async ()=>{
// var users=await u.model.findAll({where:{app_id:1}});
// var role=await roledao.model.findOne({where:{code:"guest"}});
// console.log(role);
// for(var i=0;i<users.length;i++){
// await users[i].setRoles([role]);
// console.log(i);
// }
//
// })();
const fs=require("fs");
const settings=require("../../../../config/settings");
class CacheManager{
constructor(){
//await this.buildCacheMap();
this.buildCacheMap();
}
buildCacheMap(){
var self=this;
self.doc={};
var cachePath=settings.basepath+"/app/base/db/cache/";
const files=fs.readdirSync(cachePath);
if(files){
files.forEach(function(r){
var classObj=require(cachePath+"/"+r);
self[classObj.name]=new classObj();
var refTmp=self[classObj.name];
if(refTmp.prefix){
self.doc[refTmp.prefix]=refTmp.desc;
}
else{
console.log("请在"+classObj.name+"缓存中定义prefix");
}
});
}
}
}
module.exports=CacheManager;
// var cm= new CacheManager();
// cm["InitGiftCache"].cacheGlobalVal("hello").then(function(){
// cm["InitGiftCache"].cacheGlobalVal().then(x=>{
// console.log(x);
// });
// });
const Sequelize = require('sequelize');
const settings = require("../../../../config/settings")
const fs = require("fs")
const path = require("path");
var glob = require("glob");
const Op = Sequelize.Op
class DbFactory {
constructor() {
const dbConfig = settings.database();
this.db = new Sequelize(dbConfig.dbname,
dbConfig.user,
dbConfig.password,
{
...dbConfig.config,
operatorsAliases: {
$eq: Op.eq,
$ne: Op.ne,
$gte: Op.gte,
$gt: Op.gt,
$lte: Op.lte,
$lt: Op.lt,
$not: Op.not,
$in: Op.in,
$notIn: Op.notIn,
$is: Op.is,
$like: Op.like,
$notLike: Op.notLike,
$iLike: Op.iLike,
$notILike: Op.notILike,
$regexp: Op.regexp,
$notRegexp: Op.notRegexp,
$iRegexp: Op.iRegexp,
$notIRegexp: Op.notIRegexp,
$between: Op.between,
$notBetween: Op.notBetween,
$overlap: Op.overlap,
$contains: Op.contains,
$contained: Op.contained,
$adjacent: Op.adjacent,
$strictLeft: Op.strictLeft,
$strictRight: Op.strictRight,
$noExtendRight: Op.noExtendRight,
$noExtendLeft: Op.noExtendLeft,
$and: Op.and,
$or: Op.or,
$any: Op.any,
$all: Op.all,
$values: Op.values,
$col: Op.col
}
});
this.db.Sequelize = Sequelize;
this.db.Op = Sequelize.Op;
this.initModels();
this.initRelations();
}
async initModels() {
var self = this;
var modelpath = path.normalize(path.join(__dirname, '../..')) + "/models/";
var models = glob.sync(modelpath + "/**/*.js");
console.log(models.length);
models.forEach(function (m) {
console.log(m);
self.db.import(m);
});
console.log("init models....");
}
async initRelations() {
this.db.models.dataauth.belongsTo(this.db.models.user, { constraints: false, });
/*建立用户和角色之间的关系*/
this.db.models.user.belongsToMany(this.db.models.role, { as: "Roles", through: 'p_userrole', constraints: false, });
this.db.models.role.belongsToMany(this.db.models.user, { as: "Users", through: 'p_userrole', constraints: false, });
/*组织机构自引用*/
//this.db.models.org.belongsTo(this.db.models.org,{constraints: false,});
//this.db.models.org.hasMany(this.db.models.org,{constraints: false,});
//组织机构和角色是多对多关系,建立兼职岗位,给岗位赋予多个角色,从而同步修改用户的角色
//通过岗位接口去修改用户的角色
//this.db.models.role.belongsToMany(this.db.models.org,{through: this.db.models.orgrole,constraints: false,});
//this.db.models.org.belongsToMany(this.db.models.role,{through: this.db.models.orgrole,constraints: false,});
//组织机构和用户是1对多,
// this.db.models.user.belongsTo(this.db.models.org,{constraints: false,});
// this.db.models.org.hasMany(this.db.models.user,{constraints: false,});
this.db.models.user.belongsTo(this.db.models.app, { constraints: false, });
this.db.models.role.belongsTo(this.db.models.app, { constraints: false, });
this.db.models.auth.belongsTo(this.db.models.app, { constraints: false, });
this.db.models.auth.belongsTo(this.db.models.company, { constraints: false, });
this.db.models.auth.belongsTo(this.db.models.role, { constraints: false, });
this.db.models.app.belongsTo(this.db.models.user, { as: "creator", constraints: false, });
this.db.models.user.belongsTo(this.db.models.company, { constraints: false, });
this.db.models.company.hasMany(this.db.models.user, { as: 'us', constraints: false, });
this.db.models.role.belongsTo(this.db.models.company, { constraints: false, });
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
this.db.models.route.belongsTo(this.db.models.app, { constraints: false, });
this.db.models.plugin.belongsTo(this.db.models.app, { constraints: false, });
//渠道和渠道路径方法映射
this.db.models.pathtomethod.belongsTo(this.db.models.channel, { constraints: false, });
this.db.models.channel.hasMany(this.db.models.pathtomethod, { as: "pts", constraints: false, });
//产品相关
this.db.models.productprice.belongsTo(this.db.models.product, { constraints: false, });
this.db.models.product.hasMany(this.db.models.productprice, { as: "skus", constraints: false, });
this.db.models.product.belongsTo(this.db.models.company, { constraints: false, });
//产品价格引用定价策略
this.db.models.productprice.belongsTo(this.db.models.pricestrategy, { constraints: false, });
this.db.models.productprice.belongsTo(this.db.models.company, { constraints: false, });
//成本项目属于productprice
this.db.models.productcost.belongsTo(this.db.models.productprice, { constraints: false, });
this.db.models.productprice.hasMany(this.db.models.productcost, { as: "costs", constraints: false, });
// 消息 -> 用户消息关联 1:n
this.db.models.msg.hasMany(this.db.models.msguser, { constraints: false });
this.db.models.msguser.belongsTo(this.db.models.msg, { constraints: false });
}
//async getCon(){,用于使用替换table模型内字段数据使用
getCon() {
var that = this;
// await this.db.authenticate().then(()=>{
// console.log('Connection has been established successfully.');
// }).catch(err => {
// console.error('Unable to connect to the database:', err);
// throw err;
// });
//同步模型
if (settings.env == "dev") {
//console.log(pa);
// pconfigObjs.forEach(p=>{
// console.log(p.get({plain:true}));
// });
// await this.db.models.user.create({nickName:"dev","description":"test user",openId:"testopenid",unionId:"testunionid"})
// .then(function(user){
// var acc=that.db.models.account.build({unionId:"testunionid",nickName:"dev"});
// acc.save().then(a=>{
// user.setAccount(a);
// });
// });
}
return this.db;
}
}
module.exports = DbFactory;
// const dbf=new DbFactory();
// dbf.getCon().then((db)=>{
// //console.log(db);
// // db.models.user.create({nickName:"jy","description":"cccc",openId:"xxyy",unionId:"zz"})
// // .then(function(user){
// // var acc=db.models.account.build({unionId:"zz",nickName:"jy"});
// // acc.save().then(a=>{
// // user.setAccount(a);
// // });
// // console.log(user);
// // });
// // db.models.user.findAll().then(function(rs){
// // console.log("xxxxyyyyyyyyyyyyyyyyy");
// // console.log(rs);
// // })
// });
// const User = db.define('user', {
// firstName: {
// type: Sequelize.STRING
// },
// lastName: {
// type: Sequelize.STRING
// }
// });
// db
// .authenticate()
// .then(() => {
// console.log('Co+nnection has been established successfully.');
//
// User.sync(/*{force: true}*/).then(() => {
// // Table created
// return User.create({
// firstName: 'John',
// lastName: 'Hancock'
// });
// });
//
// })
// .catch(err => {
// console.error('Unable to connect to the database:', err);
// });
//
// User.findAll().then((rows)=>{
// console.log(rows[0].firstName);
// });
const system=require("../../../system");
const Dao=require("../../dao.base");
class MsgHistoryDao extends Dao{
constructor(){
super(Dao.getModelName(MsgHistoryDao));
}
extraWhere(obj,w){
if(obj.ukstr && obj.ukstr!=""){
// w={[this.db.Op.or]:[
// {[this.db.Op.and]:[{sender:obj.ukstr},{target:obj.extra}]},
// {[this.db.Op.and]:[{sender:obj.extra},{target:obj.ukstr}]},
// ]
// };
w[this.db.Op.or]=[
{[this.db.Op.and]:[{sender:obj.ukstr},{target:obj.extra}]},
{[this.db.Op.and]:[{sender:obj.extra},{target:obj.ukstr}]},
];
}
return w;
}
orderBy(){
//return {"key":"include","value":{model:this.db.models.app}};
return [["id","DESC"]];
}
}
module.exports=MsgHistoryDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class MsgNoticeDao extends Dao{
constructor(){
super(Dao.getModelName(MsgNoticeDao));
}
async saveNotice(msg, t) {
var noticeFrom = await super.findOne({fromId : msg.senderId, toId : msg.targetId});
if(noticeFrom) {
var set = {lastMsgId:msg.id};
if(msg.businessLicense_id) {
set.businessLicense_id = msg.businessLicense_id;
}
await super.updateByWhere(set, {where:{id:noticeFrom.id}}, t);
} else {
noticeFrom = {
fromuser: msg.sender,
fromId:msg.senderId,
touser: msg.target,
toId:msg.targetId,
isAccepted:true,
lastMsgId:msg.id,
businessLicense_id : msg.businessLicense_id || 0
};
await super.create(noticeFrom, t);
}
var noticeTo = await super.findOne({fromId : msg.targetId, toId : msg.senderId});
if(noticeTo) {
var set = {lastMsgId:msg.id};
if(msg.businessLicense_id) {
set.businessLicense_id = msg.businessLicense_id;
}
await super.updateByWhere(set, {where:{id:noticeTo.id}}, t);
} else {
noticeTo = {
fromuser: msg.target,
fromId:msg.targetId,
touser: msg.sender,
toId:msg.senderId,
isAccepted:true,
lastMsgId:msg.id,
businessLicense_id : msg.businessLicense_id || 0
};
await super.create(noticeTo, t);
}
}
orderBy(){
//return {"key":"include","value":{model:this.db.models.app}};
return [["id","DESC"]];
}
}
module.exports=MsgNoticeDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class MsguserDao extends Dao {
constructor() {
super(Dao.getModelName(MsguserDao));
}
}
module.exports = MsguserDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class PricecatDao extends Dao{
constructor(){
super(Dao.getModelName(PricecatDao));
}
orderBy(qobj) {
//return {"key":"include","value":{model:this.db.models.app}};
if(!qobj.orderInfo || qobj.orderInfo.length==0){
return [["seq", "ASC"]];
}else{
return qobj.orderInfo;
}
}
}
module.exports=PricecatDao;
// var u=new UserDao();
// var roledao=system.getObject("db.roleDao");
// (async ()=>{
// var users=await u.model.findAll({where:{app_id:1}});
// var role=await roledao.model.findOne({where:{code:"guest"}});
// console.log(role);
// for(var i=0;i<users.length;i++){
// await users[i].setRoles([role]);
// console.log(i);
// }
//
// })();
const system = require("../../../system");
const Dao = require("../../dao.base");
class ProductDao extends Dao {
constructor() {
super(Dao.getModelName(ProductDao));
}
extraWhere(obj,w,qc,linkAttrs){
if(obj.bizpath && obj.bizpath!=""){
if(obj.bizpath.indexOf("productdef")>0){//说明是租户查询自己创建的应用
w["company_id"]= obj.company_id;
}
}
if(linkAttrs.length>0){
var search=obj.search;
var lnkKey=linkAttrs[0];
var strq="$"+lnkKey.replace("~",".")+"$";
w[strq]= {[this.db.Op.like]:"%"+search[lnkKey]+"%"};
}
return w;
}
extraModelFilter() {
//return {"key":"include","value":[{model:this.db.models.app,},{model:this.db.models.role,as:"Roles",attributes:["id","name"],joinTableAttributes:['created_at']}]};
return {
"key": "include", "value": [
{ model: this.db.models.productprice, as: "skus", attributes: ["id", "pricestrategy_id"] }]
}
}
}
module.exports = ProductDao;
\ No newline at end of file
const system=require("../../../system");
const Dao=require("../../dao.base");
class ProductcostDao extends Dao{
constructor(){
super(Dao.getModelName(ProductcostDao));
}
extraModelFilter(){
//return {"key":"include","value":[{model:this.db.models.app,},{model:this.db.models.role,as:"Roles",attributes:["id","name"],joinTableAttributes:['created_at']}]};
return {"key":"include","value":[
{model:this.db.models.productprice,attributes:["id","lowpriceref"]}]};
}
}
module.exports=ProductcostDao;
// var u=new UserDao();
// var roledao=system.getObject("db.roleDao");
// (async ()=>{
// var users=await u.model.findAll({where:{app_id:1}});
// var role=await roledao.model.findOne({where:{code:"guest"}});
// console.log(role);
// for(var i=0;i<users.length;i++){
// await users[i].setRoles([role]);
// console.log(i);
// }
//
// })();
const system=require("../../../system");
const Dao=require("../../dao.base");
class ProductpriceDao extends Dao{
constructor(){
super(Dao.getModelName(ProductpriceDao));
}
extraWhere(obj,w,qc,linkAttrs){
if(obj.bizpath && obj.bizpath!=""){
if(obj.bizpath.indexOf("platformprice")>0){//说明是租户查询自己创建的应用
w["company_id"]= obj.company_id;
}
}
if(linkAttrs.length>0){
var search=obj.search;
var lnkKey=linkAttrs[0];
var strq="$"+lnkKey.replace("~",".")+"$";
w[strq]= {[this.db.Op.like]:"%"+search[lnkKey]+"%"};
}
return w;
}
extraModelFilter(){
//return {"key":"include","value":[{model:this.db.models.app,},{model:this.db.models.role,as:"Roles",attributes:["id","name"],joinTableAttributes:['created_at']}]};
return {"key":"include","value":[
{model:this.db.models.pricestrategy,attributes:["id","optionunion"]},
{model:this.db.models.product,attributes:["id","name"]}]};
}
}
module.exports=ProductpriceDao;
// var u=new UserDao();
// var roledao=system.getObject("db.roleDao");
// (async ()=>{
// var users=await u.model.findAll({where:{app_id:1}});
// var role=await roledao.model.findOne({where:{code:"guest"}});
// console.log(role);
// for(var i=0;i<users.length;i++){
// await users[i].setRoles([role]);
// console.log(i);
// }
//
// })();
const system = require("../system");
const settings = require("../../config/settings.js");
const reclient = system.getObject("util.redisClient");
const md5 = require("MD5");
//获取平台配置兑换率
//初次登录的赠送数量
//创建一笔交易
//同时增加账户数量,增加系统平台账户
var dbf = system.getObject("db.common.connection");
var db = dbf.getCon();
db.sync({ force: true }).then(async () => {
// const apps = await system.getObject("service.common.appSve");
// const usS = await system.getObject("service.auth.userSve");
// let appnew = await apps.create({
// "name": "center-app",
// "domainName": "t9.com",
// "backend": "192.168.1.148",
// "isSystem": true,
// "title": "center-app"
// });
// let Role = db.models["role"];
// await Role.create({ code: "ta", name: "租户", isSystem: true, app_id: appnew.id, company_id: settings.pmcompanyid })
// await Role.create({ code: "pr", name: "个人", isSystem: true, app_id: appnew.id, company_id: settings.pmcompanyid })
// let usuper = await usS.pmregister({ userName: "sm", password: "951753", isSuper: true, isAdmin: true, isSystem: true, isEnabled: true, nickName: "superman", app_id: appnew.id, company_id: settings.id })
// appnew.creator_id = usuper.user.id
// await appnew.save()
//创建role
// if(settings.env=="prod"){
// reclient.flushall(()=>{
// console.log("clear caches ok.....");
// });
// }
// reclient.flushall(()=>{
// console.log("clear caches ok.....");
// });
});
module.exports = {
"config": {
"pdict": {
"app_type": { "api": "API服务","web": "PCWEB","app":"移动APP","xcx":"小程序","access":"接入"},
"data_priv": { "auth.role": "角色", "auth.user": "用户" },
"noticeType": {"sms": "短信", "email": "邮件","wechat":"微信"},
"authType": {"add": "新增", "edit": "编辑","delete":"删除","export":"导出","show":"查看"},
"mediaType": {"vd": "视频", "ad": "音频","qt":"其它"},
"usageType": {"kt": "课堂","taxkt":"财税课堂", "qt": "其它"},
"opstatus": {"0": "失败", "1": "成功"},
"sex": {"male": "男", "female": "女"},
"logLevel": {"debug": 0, "info": 1, "warn": 2, "error": 3, "fatal": 4},
"msgType": { "sys": "系统", "single": "单点", "multi": "群发"},
"node_type":{"org":"组织","arc":"文档"}
}
}
}
const fs=require("fs");
const path=require("path");
const appPath=path.normalize(__dirname+"/app");
const bizsPath=path.normalize(__dirname+"/bizs");
var appJsons={
config:require(appPath+"/"+"platform.js").config
}
module.exports=appJsons;
module.exports = (db, DataTypes) => {
return db.define("auth", {
rolecode: DataTypes.STRING,
bizcode: DataTypes.STRING,
codepath: DataTypes.STRING,
authstrs: DataTypes.STRING
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_auths',
validate: {
}
});
}
module.exports = (db, DataTypes) => {
return db.define("dataauth", {
modelname: DataTypes.STRING,
auths: DataTypes.STRING,
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_dataauths',
validate: {
}
});
}
const system=require("../../../system");
const settings=require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("org", {
code: {
type:DataTypes.STRING(64),
allowNull: false,
},
name: {
type:DataTypes.STRING(64),
allowNull: false,
},
isLeaf:{
type:DataTypes.BOOLEAN,
defaultValue: true
},
orgpath: {
type:DataTypes.STRING,
allowNull: false,
},
nodeType: {//默认为组织
type:DataTypes.ENUM,
allowNull: false,
values: Object.keys(appconfig.pdict.node_type),
defaultValue:'org'
},
isPosition:{//是否是岗位
type:DataTypes.BOOLEAN,
defaultValue: false
},
isMain:{//是否是主岗
type:DataTypes.BOOLEAN,
defaultValue: false
},
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_org',
validate: {
}
});
}
\ No newline at end of file
module.exports = (db, DataTypes) => {
return db.define("orgrole", {
},{
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
tableName: 'p_orgrole',
validate: {
},
});
}
\ No newline at end of file
module.exports = (db, DataTypes) => {
return db.define("role", {
name: DataTypes.STRING,
code: DataTypes.STRING,
description: DataTypes.STRING,
isSystem: {//是否系统数据,0否,1是
type: DataTypes.BOOLEAN,
defaultValue: false,
},
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_role',
validate: {
}
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("user", {
userName: {
type: DataTypes.STRING,
allowNull: false,
},
password: {
type: DataTypes.STRING,
allowNull: false,
},
nickName: {
type: DataTypes.STRING,
allowNull: true,
},
sex: {
type: DataTypes.ENUM,
allowNull: true,
values: Object.keys(appconfig.pdict.sex),
},
mobile: DataTypes.STRING,
mail: {
type: DataTypes.STRING,
allowNull: true,
},
headUrl: DataTypes.STRING,
isAdmin: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
isAllocated: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
isSuper: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
isSystem: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
center_id: DataTypes.STRING,
jwtkey: DataTypes.STRING,
jwtsecret: DataTypes.STRING,
isEnabled: {
type: DataTypes.BOOLEAN,
defaultValue: true
},
opath: DataTypes.STRING,//作业务时,需要在业务表冗余当前处理人的opath
ptags: DataTypes.STRING,//权限标签,逗号分隔,可以按照标签查看opath中含有标签的数据
skilltags: DataTypes.STRING,// 技能标签
regiontags: {
type: DataTypes.STRING,
allowNull: true,
},// 区域标签
openid: {
type: DataTypes.STRING,
allowNull: true,
},
unid: {
type: DataTypes.STRING,
allowNull: true,
},
isDelivery: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
isSalesman: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
isAllArea: {
type: DataTypes.BOOLEAN,
defaultValue: false
}
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_user',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("app", {
appkey:{
type: DataTypes.STRING,
allowNull: true,
},
title:{
type: DataTypes.STRING,
allowNull: false,
},
name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
domainName: DataTypes.STRING,//域名
backend:DataTypes.STRING,//域名
backport:DataTypes.INTEGER,//后台端口
homePage: DataTypes.STRING,//首页
functionJSON: DataTypes.TEXT,//功能清单地址--前端通过loadJson下载数据
docUrl: DataTypes.STRING,//接口文档地址
configUrl: DataTypes.STRING,//基础信息配置信息地址
logoUrl: DataTypes.STRING,//应用Logo
bkimageUrl: DataTypes.STRING,//应用背景图
showimgUrl: DataTypes.STRING,//应用显示图标
detailimgUrl: DataTypes.STRING,//应用详情介绍地址
opCacheUrl: DataTypes.STRING,//操作缓存地址
description: DataTypes.STRING,//应用描述
isSystem: {
type: DataTypes.BOOLEAN,
defaultValue: false
},//是否启用
isEnabled: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false
},//是否启用
isPublish: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false
},//是否对外
appType: {
type: DataTypes.ENUM,
allowNull: true,
values: Object.keys(appconfig.pdict.app_type),
},
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_app',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("article", {
title: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
desc: {//概述
type: DataTypes.STRING,
allowNull: true,
},//和us
listimg: {//简图
type: DataTypes.STRING,
allowNull: true,
},//和us
isPubed:{
type:DataTypes.BOOLEAN,
defaultValue: false
},
htmlcontent: {
type: DataTypes.STRING,
allowNull: true,
},//和user的from相同,在注册user时,去创建
tags: {
type: DataTypes.STRING,
allowNull: true,
},//和user的from相同,在注册user时,去创建
archpath:{//文档路径
type: DataTypes.STRING,
allowNull: false,
},
seq:{
type: DataTypes.INTEGER,
allowNull: true,
defaultValue:0
},
creator_id:{
type: DataTypes.INTEGER,
allowNull: false,
},
creator:{
type: DataTypes.STRING,
allowNull: false,
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_article',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
module.exports = (db, DataTypes) => {
return db.define("attachment", {
name: DataTypes.STRING,
urlstr:DataTypes.STRING,
description: DataTypes.STRING,
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_attachments',
validate: {
}
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("channel", {
code: {
type: DataTypes.STRING,
allowNull: false,
},
name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
routehost: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
userids: {
type: DataTypes.STRING,
allowNull: true,
},
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_channel',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("company", {
code:{//存放简码
type: DataTypes.STRING,
allowNull: true,
},
name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
companykey: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from
address: {
type: DataTypes.STRING,
allowNull: true,
},//和user的from
mail: {
type: DataTypes.STRING,
allowNull: true,
},//和user的from
phone: {
type: DataTypes.STRING,
allowNull: true,
},
licenseUrl: {
type: DataTypes.STRING,
allowNull: true,
},
orgJson: DataTypes.TEXT,//功能清
appids:DataTypes.STRING,
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_company',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("pathtomethod", {
path:{
type: DataTypes.STRING,
allowNull: false,
},
method: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
desc:{
type: DataTypes.STRING,
allowNull: false,
},
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_pathtomethod',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("plugin", {
name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_plugin',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("region", {
code: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
level: {
type: DataTypes.INTEGER,
allowNull: false,
},//和user的from相同,在注册user时,去创建
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'fh_regions',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("route", {
name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
center_id: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
shosts:{
type: DataTypes.STRING,
allowNull: false,
},
spaths:{
type: DataTypes.STRING,
allowNull: false,
}
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_route',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("treearch", {
regionJSON: DataTypes.TEXT,//功能清单地址--前端通过loadJson下载数据
productcatJSON:DataTypes.TEXT,
sysArchJSON:DataTypes.TEXT,//系统的文档树
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_treearchs',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("msg", {
msgType: {
type: DataTypes.ENUM,
allowNull: false,
values: Object.keys(appconfig.pdict.msgType),
},
app_id: {
type: DataTypes.INTEGER,
allowNull: true
},
app_key: {
type: DataTypes.STRING,
allowNull: true
},
company_id: {
type: DataTypes.INTEGER,
allowNull: true
},
sender: {
type: DataTypes.STRING,
allowNull: true
},
sender_id: {
type: DataTypes.INTEGER,
allowNull: true
},
title: {
type: DataTypes.STRING,
allowNull: false
},
emergency_level: {
type: DataTypes.INTEGER,
defaultValue: 0
},
content: {
type: DataTypes.TEXT('long'),
allowNull: false,
},
jump_address: {
type: DataTypes.STRING,
allowNull: true
},
other: {
allowNull: true,
type: DataTypes.JSON
},
is_undo: {
type: DataTypes.BOOLEAN,
defaultValue: false
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'msg_history',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
module.exports = (db, DataTypes) => {
return db.define("msguser", {
user_id: {
type: DataTypes.INTEGER,
allowNull: false
},
user: {
type: DataTypes.STRING,
allowNull: true
},
is_read: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
is_remind: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
msg_id: {
type: DataTypes.INTEGER,
defaultValue: false
}
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'msg_history_p_user_relationships',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
//定价类型
return db.define("pricecat", {
seq:{
type: DataTypes.INTEGER,
allowNull: false,
},
code:{
type: DataTypes.STRING,
allowNull: false,
},
name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
options: {
type: DataTypes.STRING,
allowNull: false,
}//和user的from相同,在注册user时,去创建
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_pricecat',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
//定价类型
return db.define("pricestrategy", {
codeunion:{
type: DataTypes.STRING,
allowNull: false,
},
nameunion: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
optionunion: {
type: DataTypes.STRING,
allowNull: false,
}//和user的from相同,在注册user时,去创建
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_pricestrategy',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
//定价类型
return db.define("product", {
sptags:{//交付商标签
type: DataTypes.STRING,
allowNull: true,
},
channeltags:{//渠道标签
type: DataTypes.STRING,
allowNull: true,
},
industrytags:{//行业标签
type: DataTypes.STRING,
allowNull: true,
},
code:{
type: DataTypes.STRING,
allowNull: false,
},
regionpath:{
type: DataTypes.STRING,
allowNull: false,
},
productcatpath:{
type: DataTypes.STRING,
allowNull: false,
},
name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
desc: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_product',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
module.exports = (db, DataTypes) => {
//定价类型
return db.define("productcost", {
costdesc: {//成本描述
type: DataTypes.STRING,
allowNull: true,
},
expensetype: {//费用类型
type: DataTypes.STRING,
allowNull: true,
},
costratio: {
type: DataTypes.DECIMAL(10, 2),
allowNull: true,
},
costamount: {
type: DataTypes.DECIMAL(10, 2),
allowNull: true,
set (value) {
this.setDataValue('costamount', value * 100);
},
get () {
const resValue = this.getDataValue('costamount');
return resValue / 100;
}
},
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_productcost',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
module.exports = (db, DataTypes) => {
//定价类型
return db.define("productprice", {
sptags: {//交付商标签
type: DataTypes.STRING,
allowNull: true,
},
channeltags: {//渠道标签
type: DataTypes.STRING,
allowNull: true,
},
skucode: {//自定义简码
type: DataTypes.STRING,
allowNull: true,
},
skuname: {//自定义名称
type: DataTypes.STRING,
allowNull: true,
},
pname: {//产品名称
type: DataTypes.STRING,
allowNull: true,
},
strategyitems: {//定价策略
type: DataTypes.STRING,
allowNull: true,
},
lowpriceref: {
type: DataTypes.DECIMAL(10, 2),
allowNull: true,
defaultValue: 0,
set (value) {
this.setDataValue('lowpriceref', value * 100);
},
get () {
const resValue = this.getDataValue('lowpriceref');
return resValue / 100;
}
},
hignpriceref: {
type: DataTypes.DECIMAL(10, 2),
allowNull: true,
defaultValue: 0,
set (value) {
this.setDataValue('hignpriceref', value * 100);
},
get () {
const resValue = this.getDataValue('hignpriceref');
return resValue / 100;
}
},
deliverfile: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: ''
},
extrafile: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: ''
},//和user的from相同,在注册user时,去创建
desc: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: ''
},//和user的from
isEnabled: {
type: DataTypes.BOOLEAN,
defaultValue: false
}
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_productprice',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
//定价类型
return db.define("xproduct", {
path_code:{
type: DataTypes.STRING,
allowNull: false,
},
path_name:{
type: DataTypes.STRING,
allowNull: false,
},
region_id:{
type: DataTypes.STRING,
allowNull: false,
},
region_name: {
type: DataTypes.STRING,
allowNull: false,
},//和user的from相同,在注册user时,去创建
servicer_name:{
type: DataTypes.STRING,
allowNull: false,
}
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'x_product',
getterMethods: {
spName() {
return servicer_name
}
},
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
//定价类型
return db.define("xproductprice", {
price_code:{
type: DataTypes.STRING,
allowNull: false,
},
product_name:{
type: DataTypes.STRING,
allowNull: false,
},
price_name:{
type: DataTypes.STRING,
allowNull: false,
},
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'tx_product_price',
getterMethods: {
spName() {
return servicer_name
}
},
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class AccountService extends ServiceBase{
constructor(){
super("auth",ServiceBase.getDaoName(AccountService));
//this.appDao=system.getObject("db.appDao");
}
}
module.exports=AccountService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class AuthService extends ServiceBase{
constructor(){
super("auth",ServiceBase.getDaoName(AuthService));
}
//字符串数组参数
//前端角色查询,按照来源应用和来源公司查询
async findAuthsByRole(roleids,appid,comid){
//{where:{id:{[this.db.Op.in]:ids}}}
//var newattrs=rolecodestr.split(",");
var aths=await this.dao.model.findAll({
attributes:["bizcode","authstrs","codepath"],
where:{role_id:{[this.db.Op.in]:roleids}}});
//因为是按照角色ID,所以不需要按照公司
// where:{role_id:{[this.db.Op.in]:roleids},app_id:appid,company_id:comid}});
return aths;
}
async saveAuths(auths,appid,cmid){
//先按照code 和 bizcode查询
var self=this;
console.log("yyyyyyyyyvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv");
console.log(auths);
return self.db.transaction(async function (t){
for(var i=0;i<auths.length;i++){
var tmpAuth=auths[i];
tmpAuth.app_id=appid;
tmpAuth.company_id=cmid;
var objrtn=await self.dao.model.findOrCreate({
defaults:tmpAuth,
where:{role_id:tmpAuth.role_id,bizcode:tmpAuth.bizcode},//注意这里bizcode存储的是节点的code值
transaction:t,
});
console.log("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv");
console.log(objrtn);
if(!objrtn[1].created){
//就执行更新操作
await objrtn[0].update(tmpAuth,{where:{role_id:tmpAuth.role_id,bizcode:tmpAuth.bizcode},transaction:t})
}
}
var aths=await self.dao.model.findAll({where:{role_id:tmpAuth.role_id,app_id:tmpAuth.app_id},transaction:t});
return aths;
});
}
}
module.exports=AuthService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base")
const settings=require("../../../../config/settings")
class DataauthService extends ServiceBase{
constructor(){
super("auth",ServiceBase.getDaoName(DataauthService));
}
async saveauth(obj){
//先按照uid,modelname,检查是否存在,不存在创建,存在更新
var oldauth= await this.dao.findOne({user_id:obj.user_id,modelname:obj.modelname,app_id:obj.add_id});
if(!oldauth){
return this.dao.create(obj);
}else{
obj.id=oldauth.id;
return this.dao.update(obj);
}
}
}
module.exports=DataauthService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class OrgService extends ServiceBase{
constructor(){
super("auth",ServiceBase.getDaoName(OrgService));
}
async delete(p,q,req){
var self=this;
var orgid=p.id;
var uone=await this.db.models.user.findOne({where:{org_id:orgid}});
if(!uone){
//先检查是否组织下有人员存在
return this.db.transaction(async function (t) {
var inst=await self.dao.model.findById(orgid);
var parentid=inst.org_id;
await inst.destroy({force:true,transaction:t});
//删除组织对应的角色
self.db.models.orgrole.destroy({where:{org_id:orgid},force:true,transaction:t});
//查询出父元素
var orgparent=await self.dao.model.findOne({
order:[["code","ASC"]],
where:{id:parentid},transaction:t,
include:[
{model:self.db.models.org,as:"orgs",order:[["code","ASC"]],include:[
{model:self.db.models.org,as:"orgs",order:[["code","ASC"]]}
]}
]});
return orgparent.orgs;
});
}else{
return null;
}
}
async update(p,q,req){
var self=this;
var cmkey=p.comkey;//如果是来自租户界面的修改
return this.db.transaction(async function (t) {
p.isLeaf=p.isPosition;
var orgupdate=await self.dao.model.findOne({where:{id:p.id},transaction:t});
await self.dao.model.update(p,{where:{id:p.id},transaction:t});
var usersupdate=await self.db.models.user.findAll({where:{org_id:orgupdate.id}});
//如果节点名称或岗位性质发生变化
//if(p.name!=orgupdate.name || p.isMain!=orgupdate.isMain){
for(var ud of usersupdate){
ud.opath=p.orgpath;
var n=p.orgpath.lastIndexOf("/");
ud.ppath=p.isMain?p.orgpath.substring(0,n):p.orgpath;
await ud.save({transaction:t});
}
//}
if(p.Roles && !cmkey){//如果不是来自租户界面的修改
var roles=await self.db.models.role.findAll({where:{id:{[self.db.Op.in]:p.Roles}}});
await orgupdate.setRoles(roles,{transaction:t});
//同时要给这个岗位下的user,更新角色 todo
for(var ud of usersupdate){
await ud.setRoles(roles,{transaction:t});
}
}
var orgparent=await self.dao.model.findOne({
order:[["code","ASC"]],
where:{id:orgupdate.org_id},transaction:t,
include:[
{model:self.db.models.org,as:"orgs",order:[["code","ASC"]],include:[
{model:self.db.models.org,as:"orgs",order:[["code","ASC"]],include:[
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]},
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]},
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]});
return orgparent.orgs;
});
}
async checkMainPosition(p,q,req){
var orgmain=await this.dao.model.findOne({where:{org_id:p.org_id,isMain:true}});
if(orgmain){
return {"isHave":true};
}else{
return null;
}
}
async changePos(toorgid,uid){
//查询出当前用户,设置当前用户的orgid为修改目标
var self=this;
return this.db.transaction(async function (t) {
var ufind=await self.db.models.user.findById(uid);
var org=await self.dao.model.findOne({
where:{id:toorgid},
include:[
{model:self.db.models.role,as:"roles"},
]});
ufind.org_id=toorgid;
ufind.opath=org.orgpath;
if(org.isMain){//如果是主岗
var n=org.orgpath.lastIndexOf("/");
ufind.ppath=org.orgpath.substring(0,n);
}else{
ufind.ppath= org.orgpath;
}
await ufind.save({transaction:t});
await ufind.setRoles(org.roles,{transaction:t});
return ufind;
});
//查询出目标org,关联查询出角色
//设置当前用户的角色
}
async create(p,q,req){
var self=this;
var cmkey=p.comkey;
return this.db.transaction(async function (t) {
if(cmkey){
var tmpcompany =await self.db.models.company.findOne({where:{companykey:cmkey},transaction:t});
p.company_id=tmpcompany.id;
}
var roles=await self.db.models.role.findAll({where:{id:{[self.db.Op.in]:p.Roles}}});
p.isLeaf=p.isPosition;
p.app_id=null;
var orgnew=await self.dao.model.create(p,{transaction:t});
if(roles && roles.length>0){
await orgnew.setRoles(roles,{transaction:t});
}
var orgparent=await self.dao.model.findOne({
order:[["code","ASC"]],
where:{id:orgnew.org_id},transaction:t,
include:[
{model:self.db.models.org,as:"orgs",order:[["code","ASC"]],include:[
{model:self.db.models.org,as:"orgs",order:[["code","ASC"]],include:[
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]},
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]},
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]});
return orgparent.orgs;
});
}
async findOrgById(id){
var org=await this.dao.model.findOne({
order:[["code","ASC"]],
where:{id:id},
include:[
{model:this.db.models.org,as:"orgs",order:[["code","ASC"]],include:[
{model:this.db.models.org,as:"orgs",order:[["code","ASC"]],include:[
{model:this.db.models.role,as:"roles",attributes:['id','code','name']},
]},
{model:this.db.models.role,as:"roles",attributes:['id','code','name']},
]},
{model:this.db.models.role,as:"roles",attributes:['id','code','name']},
]});
return org.orgs;
}
async initOrgs(company,appid){
var self=this;
return this.db.transaction(async function (t) {
var org=await self.dao.model.findOne({
order:[["code","ASC"]],
//where:{name:company.name,company_id:company.id,app_id:appid},transaction:t,
where:{name:company.name,company_id:company.id},transaction:t,
include:[
{model:self.db.models.org,as:"orgs", order:[["code","ASC"]],include:[
{model:self.db.models.org,as:"orgs",order:[["code","ASC"]],include:[
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]},
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]},
{model:self.db.models.role,as:"roles",attributes:['id','code','name']},
]});
if(org!=null){
return org;
}else{
var root= await self.dao.model.create({
code:"root"+company.id,
name:company.name,
isLeaf:false,
isPostion:false,
isMain:false,
orgpath:"/",
company_id:company.id,
app_id:null,
},{transaction:t});
return root;
}
});
}
}
module.exports=OrgService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class RoleService extends ServiceBase{
constructor(){
super("auth",ServiceBase.getDaoName(RoleService));
//this.appDao=system.getObject("db.appDao");
}
async findOneByCode(code){
return this.dao.model.findOne({where:{code:code}});
}
}
module.exports=RoleService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base")
const settings = require("../../../../config/settings")
const jwt = require('jsonwebtoken');
class UserService extends ServiceBase {
constructor() {
super("auth", ServiceBase.getDaoName(UserService));
this.companyDao = system.getObject("db.common.companyDao");
this.roleDao = system.getObject("db.auth.roleDao");
this.authS = system.getObject("service.auth.authSve");
}
async pmgetUserByCode (code) {
let ux = await this.cacheManager["CodeCache"].getCache(code);
return ux;
}
async loginApp (appkey, uname) {
let rtn = {}
let app = await this.cacheManager["AppCache"].cache(appkey);
let userLogined = await this.cacheManager["UserCache"].cache(uname);
rtn.user = userLogined
if (userLogined) {
let token = await this.cmakejwt(userLogined.jwtkey, userLogined.jwtsecret, null);
rtn.token = token;
}
let roleids = userLogined.Roles.map(item => {
return item.id
})
let auths = await this.authS.findAuthsByRole(roleids)
rtn.user.access = auths
let code = this.getUUID()
this.cacheManager["CodeCache"].cache(code, rtn, 60000);
// let url=app.homePage+"?code="+code
return { code, homePage: app.homePage };
}
//登录后的租户创建属于租户的用户
//需要在控制器里取出公司ID
//和租户绑定同一家公司
//按照用户名和密码进行注册
//控制器端检查用户名和密码非空
async registerByTantent (p, q) {
// 需要默认添加访客角色,为了控制单点从平台登录时看到的菜单和功能
if (p.roles && p.roles.length > 0) {
if (p.roles.indexOf(settings.pmroleid["pr"]) < 0) {
p.roles.push(settings.pmroleid["pr"])
}
}
p.rolecodes = (p.roles && p.roles.length > 0) ? p.roles : [settings.pmroleid["pr"]];
let rtn = await this.pmregister(p, q)
return rtn;
}
//应用的自由用户注册,无需验证,需要前端头设置公司KEY
async pmregisterByFreeUser (p, q) {
p.rolecodes = [settings.pmroleid["pr"]];
let rtn = await this.pmregister(p, q)
return rtn;
}
//平台租户注册接口方法
//控制器端检查用户名和密码非空
async pmregister (p, q) {
var self = this;
let tmppwd = p.password;
if (!tmppwd) {
tmppwd = settings.defaultpwd;
}
p.password = this.getEncryptStr(tmppwd);
if (!p.nickName) {
p.nickName = p.userName;
}
//检查是否已经存在同名账号
let existOne = await this.dao.model.findOne({ where: { userName: p.userName } })
if (existOne) {
throw new Error("平台中已存在相同的账号.");
}
return this.db.transaction(async function (t) {
//对于租户类型注册,创建一个默认公司,公司名称xxxx的公司
//如果非租户类型,需要按照传递进来的公司companykey,来查询公司,按照companykey缓存到redis
let cmpkey = self.getUUID();
let rolecodes = p.rolecodes ? p.rolecodes : [settings.pmroleid["ta"]];
if (rolecodes[0] == settings.pmroleid["ta"]) {//如果注册时,角色是租户,那么需要创建默认公司
p.isAdmin = true;//租户默认就是管理员的权限
let cmp = await self.companyDao.create({ name: p.userName + "的公司", companykey: cmpkey }, t);
p.company_id = cmp.id;
}
//如果是用户注册,平台用户应该只属于平台应用
let roleappid = p.app_id;//先取出当前应用的id,给后续的取角色用,角色是按照应用和公司区分
//目前升级为角色不再按照应用区分,只按照公司区分
p.app_id = settings.pmappid
let u = await self.dao.create(p, t)
//设置默认角色,租户
//设置默认普通角色,由于有了租户概念,所以注册时,需要知道当前租户和应用的id 才可以设置默认角色 todo
//如果是非租户,那么按照当前应用ID是找不到指定的角色,所以是空的
/*if (p.isAdmin) {
//var roles = await self.roleDao.model.findAll({ where: { id: { [self.db.Op.in]: rolecodes }, app_id: roleappid, company_id: settings.pmcompanyid }, transaction: t });
var roles = await self.roleDao.model.findAll({ where: { id: { [self.db.Op.in]: rolecodes }}, transaction: t });
if (roles && roles.length > 0) {
await u.setRoles(roles, { transaction: t });
}
} else {
var roles = await self.roleDao.model.findAll({ where: { id: { [self.db.Op.in]: rolecodes }, app_id: roleappid, company_id: p.company_id }, transaction: t });
if (roles && roles.length > 0) {
await u.setRoles(roles, { transaction: t });
}
}*/
var roles = await self.roleDao.model.findAll({ where: { id: { [self.db.Op.in]: rolecodes } }, transaction: t });
if (roles && roles.length > 0) {
await u.setRoles(roles, { transaction: t });
}
//创建统一账号 to add extra fields
let cred = await self.cregister(u.userName, p.company_id, p.password, u.id + "")
console.log("......................................");
if (cred) {
u.center_id = cred.consumer.id;
u.jwtkey = cred.key;
u.jwtsecret = cred.secret;
try {
await u.save({ transaction: t });
} catch (e) {
console.log(e);
await self.cunregister(p.userName);
throw new Error("保存用户失败");
}
return { user: u, companykey: cmpkey };
} else {
throw new Error("创建统一账号失败");
}
});
}
async logout (pobj) {
await this.cacheManager["UserCache"].invalidate(pobj.username);
return {}
}
//平台登录
//登录接口封装kong-url
//登录路由放行
//p里面含有appkey,company_id,userName,password
async pmlogin (p, q, req) {
var self = this;
//先要按照用户名,在统一账户中查找存在性
//如果不存在
console.log(UserService.consumerUrl(p.userName))
let consumer = await this.cget(UserService.consumerUrl(p.userName));
if (!consumer.data) {
return null;
} else {
console.log(JSON.stringify(consumer.data))
let password = consumer.data.tags[1].split("_")[1];
let passwd = system.desEncript(p.password)
let inpassword = this.getEncryptStr(passwd);
if (password != inpassword) {
return null;
}
}
var rtn = {}
return this.db.transaction(async function (t) {
//从缓存中取得
// let userfind = await self.dao.model.findOne({
// where: { userName: p.userName, app_id: settings.pmappid },
// attributes: ['userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin'],
// include: [{ model: self.db.models.company, raw: true, attributes: ["companykey"] }]
// });
let userfind = await self.cacheManager["UserCache"].cache(p.userName)
if (userfind) {
let token = await self.cmakejwt(userfind.jwtkey, userfind.jwtsecret, null);
rtn.token = token;
let roleids = userfind.Roles.map(item => {
return item.id
})
let auths = await self.authS.findAuthsByRole(roleids)
userfind["access"] = auths
delete userfind["jwtkey"]
delete userfind["jwtsecret"]
rtn.user = userfind;
return rtn;
} else {
return null;
}
})
}
async getUserInfo (uname) {
// let userfind = await this.dao.model.findOne({
// where: { userName: uname, app_id: settings.pmappid },
// attributes: ['userName', 'nickName',"headUrl",'isSuper','isAdmin'],
// include: [{ model: this.db.models.company, raw: true, attributes: ["companykey"] }]
// });
let userfind = await this.cacheManager["UserCache"].cache(uname)
//添加当前用户的权限信息
let roleids = userfind.Roles.map(item => {
return item.id
})
let auths = await this.authS.findAuthsByRole(roleids)
userfind["access"] = auths
delete userfind["jwtkey"]
delete userfind["jwtsecret"]
return userfind;
}
//自由用户的电话登录和注册
//需要存在公司KEY
async pmloginByVCodeForFreeUser (p, q) {
p.rolecodes = [settings.pmroleid["pr"]];
let rtn = await this.pmloginByVCode(p, q, req)
return system.getResult(rtn);
}
//平台租户注册与登录
//用户验证码登录
//
async pmloginByVCode (p, q, req) {
var rtn = {}
//检查传递过来的手机验证码是否与缓存的一致
let mobile = p.mobile;
let vcode = p.vcode;
let cachevcode = await this.cacheManager["VCodeCache"].getCache(mobile, 60)
if (vcode != cachevcode.vcode) {
return null;
} else {
//检查是否在库里存在
//appkey--company_id---需要控制器基类里设置到p对象里
let user = await this.cacheManager["UserCache"].cache(mobile)
if (user) {
let roleids = user.Roles.map(item => {
return item.id
})
let auths = await this.authS.findAuthsByRole(roleids)
user["access"] = auths
//生成token
let token = await this.cmakejwt(user.jwtkey, user.jwtsecret, null);
rtn.token = token;
rtn.user = user;
return rtn;
} else {
//先按照用户名查续身份信息,获取key,secret,
let regrtn = await this.pmregister({ userName: mobile, nickName: mobile, rolecodes: p.rolecodes, company_id: p.company_id, app_id: p.app_id });
let token = await this.cmakejwt(regrtn.user.jwtkey, regrtn.user.jwtsecret, null);
// rtn.token = token;
// rtn.user = u;
let userfind = await this.cacheManager["UserCache"].cache(mobile)
let roleids = userfind.Roles.map(item => {
return item.id
})
let auths = await this.authS.findAuthsByRole(roleids)
userfind["access"] = auths
regrtn.user = userfind
regrtn.token = token
return regrtn;
}
}
//不一致那么就
}
//发送手机验证码并缓存
async sendVCode (p, q, req) {
let mobile = p.mobile;
let vcodeobj = await this.cacheManager["VCodeCache"].cache(mobile, null, 60);
return vcodeobj.vcode;
}
async reSendVCode (p, q, req) {
let mobile = p.mobile;
await this.cacheManager["VCodeCache"].invalidate(mobile);
let vcodeobj = await this.cacheManager["VCodeCache"].cache(mobile, null, 60);
return vcodeobj.vcode;
}
//修改中心密码
async cmodifypwd (uname, newpwd, cmpid) {
try {
let rtn = await system.postJsonTypeReq(UserService.consumerUrl(uname), { tags: ["cmp_" + cmpid, "pass_" + newpwd] }, "PATCH")
console.log(rtn)
if (rtn.statusCode == 200) {
return rtn.data;
}
return null;
} catch (e) {
console.log(e);
return null;
}
}
//创建统一账号及jwt身份
async cregister (uname, cmpid, pass, uid) {
try {
var rtn2 = null;
let rtn = await system.postJsonTypeReq(UserService.newConsumerUrl(), { username: uname, custom_id: uid, tags: ["cmp_" + cmpid, "pass_" + pass] })
console.log(rtn)
if (rtn.statusCode == 409) {
throw new Error("已经存在相同的统一账号名称!");
} else {
//创建身份
rtn2 = await system.post3wFormTypeReq(UserService.newJwtCredUrl(uname))
}
if (rtn.statusCode == 201 && rtn2.statusCode == 201) {
return rtn2.data;
}
return null;
} catch (e) {
console.log(e);
return null;
}
}
//plkey--对应消费者jwt身份的key,插件解码token后,获取iss-key,查询出身份,利用
//身份中的secret验证签名
async jwtsign (plkey, secretstr, opts) {
let promise = new Promise(function (resv, rej) {
jwt.sign({ exp: Math.floor(Date.now() / 1000) + (60 * 60), iss: plkey }, secretstr, opts, function (err, rtn) {
if (err) {
rej(err);
} else {
resv(rtn);
}
});
});
return promise;
}
//只要登录 生成新的访问jwttoken
async cmakejwt (key, secret, opts) {
var token = await this.jwtsign(key, secret, opts);
return token;
}
//删除统一账号
async cunregister (uname) {
try {
let rtn = await system.delReq(UserService.consumerUrl(uname))
if (rtn.statusCode == 204) {
return {};
}
return null;
} catch (e) {
return null;
}
}
//登录统一账号
async clogin (uname) {
//检查是否存在重名
}
//按用户名查询统一用户
async findCUser (uname) {
}
async resetPassword (uname, pwd) {
let inpassword = this.getEncryptStr(pwd);
var self = this;
return this.db.transaction(async function (t) {
let up = await self.dao.updateByWhere({ password: inpassword }, { userName: uname }, t);
//令缓存失效
await self.cacheManager["UserCache"].invalidate(uname);
let cacheUser = await self.cacheManager["UserCache"].cache(uname);
//修改认证中心的tag密码
let modi = await self.cmodifypwd(uname, inpassword, cacheUser.company.id)
if (!modi) {
throw new Error("修改中心密码出错")
}
return cacheUser;
});
}
//修改
async update (qobj, tm = null) {
var self = this;
return this.db.transaction(async function (t) {
delete qobj['company_id']
//delete qobj['opath']
let up = await self.dao.update(qobj, t);
//令缓存失效
await self.cacheManager["UserCache"].invalidate(qobj.userName);
let cacheUser = await self.cacheManager["UserCache"].cache(qobj.userName);
return cacheUser;
});
}
//选择业务员为商机
//按照客户电话,建立和业务员的映射关系
//如果已经分配过,那么优先分配
/**
*
* @param {*} clientMobile 客户电话
* @param {*} spName 服务商名称
* @param {*} productCatName 产品类型名称
* @param {*} regionName 区域
*/
async getBizUserForBizChance (clientMobile, spName, productCatName, regionName, companyFind) {
var self = this
clientMobile = clientMobile + "_" + spName + "_" + regionName + "_" + productCatName
//按照服务商名字查询到公司,按照公司查询出users,条件是可以接受派单任务,并且技能标签含有,产品类别名称
return this.db.transaction(async function (t) {
//先检查缓存是否存在bizuser
var resultcache = await self.cacheManager["ClientBindBizUserCache"].getCache(clientMobile)
let isGoExec = false
if (!resultcache) {
isGoExec = true
} else {
let uname = resultcache.userName
let ucache = await self.cacheManager["UserCache"].cache(uname)
if (!ucache.isAllocated) {//解决修改为不接单
isGoExec = true
await self.cacheManager["ClientBindBizUserCache"].invalidate(clientMobile)
}
}
if (isGoExec) {
// let companyFind = await self.companyDao.model.findOne({
// where: { name: spName }, include: [
// {
// model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery'], raw: true
// }
// ], excludes: ['orgJson'], transaction: t
// });
// console.log(companyFind)
let users = companyFind.us
let cansels = users.filter(u => {
if (regionName && regionName != "" && u.regiontags) {
if (u.isAllocated && u.isSalesman && u.skilltags.indexOf(productCatName) >= 0 && u.regiontags.indexOf(regionName) >= 0) {
return true
} else {
return false
}
} else {
if (u.isAllocated && u.isSalesman && u.isAllArea && u.skilltags.indexOf(productCatName) >= 0) {
return true
} else {
return false
}
}
})
let lngth = cansels.length
if (lngth > 0) {
let randindex = Math.floor(Math.random() * lngth)
let selresult = cansels[randindex]
//添加到缓存,按照客户电话key--缓存到业务员的对象
let tmp = {
userId: selresult.id,
userName: selresult.userName,
mobile: selresult.mobile,
opath: selresult.opath,
compId: companyFind.id
}
await self.cacheManager["ClientBindBizUserCache"].cache(clientMobile, tmp)
return tmp
} else {
return null
}
} else {
if (resultcache) {//不继续,直接返回缓存
return resultcache
} else {
return null
}
}
})
}
/**
*
* @param {*} clientMobile 客户电话
* @param {*} spName 服务商名称
* @param {*} productCatName 产品类型名称
* @param {*} skucode 最小销售货品编码,来自渠道上架的码
* @param {*} regionName 区域
*/
async getBizUserForDelivery (xclientMobile, spName, productCatName, skucode, regionName, companyFind) {
let clientMobile = 'fordeliver' + xclientMobile + "_" + spName + "_" + regionName + "_" + productCatName
var self = this
//按照服务商名字查询到公司,按照公司查询出users,条件是可以接受派单任务,并且技能标签含有,产品类别名称
return this.db.transaction(async function (t) {
//按照产品简码,查询服务成本
let productpricetmp = await self.db.models.productprice.findOne({
where: { skucode: skucode },
include: [
{ model: self.db.models.productcost, where: { expensetype: 'service' }, as: "costs", attributes: ['id', 'expensetype', 'costamount'] }
],
raw: true,
transaction: t
}
)
let costAmount = 0
//获取服务费成本
if (productpricetmp['costs.costamount']) {
costAmount = Number(productpricetmp['costs.costamount'])
}
console.log("skucode==================", costAmount, productpricetmp)
//先检查缓存是否存在bizuser todo key再加个字母d
var resultcache = await self.cacheManager["ClientBindBizUserCache"].getCache(clientMobile)
let isGoExec = false
if (!resultcache) {
isGoExec = true
} else {
let uname = resultcache.userName
let ucache = await self.cacheManager["UserCache"].cache(uname)
if (!ucache.isAllocated) {//解决修改为不接单
isGoExec = true
await self.cacheManager["ClientBindBizUserCache"].invalidate(clientMobile)
}
}
if (isGoExec) {
// let companyFind = await self.companyDao.model.findOne({
// where: { name: spName }, include: [
// {
// model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery'], raw: true
// }
// ], excludes: ['orgJson'], transaction: t
// });
let users = companyFind.us
let cansels = users.filter(u => {
if (regionName && regionName != "" && u.regiontags) {
if (u.isAllocated && u.isDelivery && u.skilltags.indexOf(productCatName) >= 0 && u.regiontags.indexOf(regionName) >= 0) {
return true
} else {
return false
}
} else {
if (u.isAllocated && u.isDelivery && u.isAllArea && u.skilltags.indexOf(productCatName) >= 0) {
return true
} else {
return false
}
}
})
let lngth = cansels.length
if (lngth > 0) {
let randindex = Math.floor(Math.random() * lngth)
let selresult = cansels[randindex]
//添加到缓存,按照客户电话key--缓存到业务员的对象
let tmp = {
userId: selresult.id,
userName: selresult.userName,
mobile: selresult.mobile,
opath: selresult.opath,
cost: costAmount,
compId: companyFind.id
}
await self.cacheManager["ClientBindBizUserCache"].cache(clientMobile, tmp)
return tmp
} else {
return null
}
} else {
if (resultcache) {//不继续,直接返回缓存
resultcache["cost"] = costAmount
return resultcache
} else {
return null
}
}
})
}
async findCostBySkuCode (skucode) {
let productpricetmp = await this.db.models.productprice.findOne({
where: { skucode: skucode, isEnabled: true },
include: [
{ model: this.db.models.productcost, where: { expensetype: 'service' }, as: "costs", attributes: ['id', 'expensetype', 'costamount'] }
],
raw: true,
}
)
let costAmount = 0
//获取服务费成本
if (productpricetmp && productpricetmp['costs.costamount']) {
costAmount = Number(productpricetmp['costs.costamount'])
} else {
console.log("skucode not find product:", skucode)
}
return costAmount
}
/**
* 阿里交付单分配规则-轮循分配(交付单处理业务员和交付员不是一个同一人)
* @param {*} xclientMobile 客户电话
* @param {*} spName 服务商名称
* @param {*} productCatName 产品类型名称
* @param {*} skucode 最小销售货品编码,来自渠道上架的码
* @param {*} regionName 区域
*/
async getBizUserForAliDelivery (xclientMobile, spName, productCatName, skucode, regionName, companyFind) {
// let clientMobile = 'fordeliver' + xclientMobile + "_" + spName + "_" + regionName
let self = this
//按照服务商名字查询到公司,按照公司查询出users,条件是可以接受派单任务,并且技能标签含有,产品类别名称
return this.db.transaction(async function (t) {
let costAmount = 0
//检查缓存是否存在bizuser
let resultcache = await self.cacheManager["LoopDistributionUserCache"].getCache("LoopDistributionUserCache");
let isGoExec = false;
if (!resultcache) {
isGoExec = true;
}
else { //如果有用户数据,那么根据算法分配并返回一条业务员数据
let userArrCache = Object.keys(resultcache);
if (userArrCache == 0) {//如果缓存中没有用户数据,从数据库查找
isGoExec = true;
} else {
let userData;
let userInfo, userKey;
let num = resultcache[userArrCache[0]].num;
for (let key in resultcache) {
if (resultcache[key].num <= num) {
num = resultcache[key].num;
userData = resultcache[key];
userKey = key;
}
}
userInfo = userData.userInfo;
//查看是否接单,该用户是否接单,不接单就使缓存失效,接单就直接返回该业务员
let uname = userKey;
let ucache = await self.cacheManager["UserCache"].cache(uname);
if (!ucache.isAllocated) {//解决修改为不接单
isGoExec = true
await self.cacheManager["LoopDistributionUserCache"].invalidate("LoopDistributionUserCache");
} else {
userData.num += 1; //该业务员数据+1,并保存到缓存中,返回用户数据
await self.cacheManager["LoopDistributionUserCache"].cache("LoopDistributionUserCache", JSON.stringify(resultcache));
return userInfo;
}
}
}
//查询数据库user表来获取交付员信息 需要根据是否是"交付员"字段筛选(派单规则是将交付单派给交付员)
if (isGoExec) {
// let companyFind = await self.companyDao.model.findOne({
// where: { name: spName }, include: [
// {
// model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery'], raw: true
// }
// ], excludes: ['orgJson'], transaction: t
// });
let users = companyFind.us;
//按名单筛选
// let deliveryList = ["", "", "", "", ""];
// let cansels = users.filter(u => {
// if (regionName && deliveryList.indexOf(u.userName) >= 0) {
// return true;
// } else {
// return false;
// }
// });
//按条件筛选
let cansels = users.filter(u => {
if (regionName && regionName != "" && u.regiontags) {
if (u.isAllocated && u.isDelivery && u.skilltags.indexOf(productCatName) >= 0 && u.regiontags.indexOf(regionName) >= 0) {
return true
} else {
return false
}
} else {
if (u.isAllocated && u.isDelivery && u.isAllArea && u.skilltags.indexOf(productCatName) >= 0) {
return true
} else {
return false
}
}
})
console.log('------------1', JSON.stringify(cansels));
let lngth = cansels.length
if (lngth > 0) {
let obj = {};
for (let i = 0; i < lngth; i++) {
let selresult = cansels[i];
let tmp = {
userId: selresult.id,
userName: selresult.userName,
mobile: selresult.mobile,
opath: selresult.opath,
cost: costAmount,
compId: companyFind.id
}
obj[selresult.userName] = {
userInfo: tmp,
num: 0
}
}
console.log('------------2', JSON.stringify(obj));
let resultUserKey = Object.keys(obj)[0];
let resultUser = obj[resultUserKey].userInfo;
obj[resultUserKey].num += 1;
await self.cacheManager["LoopDistributionUserCache"].cache("LoopDistributionUserCache", JSON.stringify(obj));
return resultUser;
} else {
return null;
}
}
})
}
/**
*根据业务员openid查找该用户信息
*@param {*} openid 业务员唯一标识
*/
async getSalesmanInfo (openid) {
let userfind = await this.dao.model.findOne({
where: { openid: openid }
});
return userfind;
}
}
module.exports = UserService;
// let userS=new UserService()
// userS.getBizUserForBizChance("13381139519",'好生日','工商注册').then(rtn=>{
// console.log(rtn)
// })
// let cacheManager = system.getObject("db.common.cacheManager");
// start();
// async function start() {
// try {
// // let result = await cacheManager["LoopDistributionUserCache"].cache("wyf", JSON.stringify({name: "test2", idx: 2}));
// let result = await cacheManager["AliCache"].getCache("8a6ce4069a8f104c70405fd1ae5be5023f62d065");
// // let result = await cacheManager["LoopDistributionUserCache"].invalidate("LoopDistributionUserCache");
// console.log('----=-=-=-:' + JSON.stringify(result));
// } catch (error) {
// console.log("err:" + error);
// }
// }
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class ArticleService extends ServiceBase{
constructor(){
super(ServiceBase.getDaoName(ArticleService));
this.newschannelDao=system.getObject("db.newschannelDao");
}
//获取频道列表
async findChannel(obj){
// const apps=await super.findAndCountAll(obj);
var usageType = obj.usageType;
if(usageType==null||usageType==""||usageType=="undefined"){
return {code:-101,msg:"参数有误",data:null};
}
try {
var sqlwhere = {
where: {usageType:usageType},
attributes: ["id", "code", "title", "bgimg", "isPubed", "usageType", "app_id"],
order: [["orderNo", 'ASC']],
raw: true
};
var list = await this.newschannelDao.model.findAll(sqlwhere);
if (list == null || list.length == 0) {
return {code:0,msg:"没有信息",data:null};
}else {
return {code:1,msg:"操作成功",data:list};
}
}catch (e) {
return {code:-1,msg:"操作失败",data:null};
}
}
//获取该频道所有列表
async findAndCountAll2(obj){
// const apps=await super.findAndCountAll(obj);
var newschannel = obj.newschannel_id;
var pageSize=obj.page_size;
var currentPage=obj.current_page;
if(newschannel==null||newschannel==""||newschannel=="undefined"){
return {code:-101,msg:"参数有误",data:null};
}
if(pageSize==null||pageSize==""||pageSize=="undefined"){
pageSize="";
}
if(currentPage==null||currentPage==""||currentPage=="undefined"){
currentPage="";
}
try {
var sqlwhere = {
where: {newschannel_id:newschannel},
attributes: ["id","code", "title", "listimg", "videourl", "desc", "mediaType", "usageType",
"test","newschannel_id", "app_id"],
order: [["orderNo", 'ASC']],
raw: true
};
if(pageSize!=""&&currentPage!=""){
var tPageSize=Number(pageSize);
var tCurrentPage=Number(currentPage);
if(tCurrentPage<1){
tCurrentPage=1;
}
if(tPageSize>50){
tPageSize=50;
}
if(tPageSize<1){
tPageSize=1;
}
sqlwhere.limit=tPageSize;
sqlwhere.offset= (tCurrentPage - 1) * tPageSize;
}
var list = await this.dao.model.findAll(sqlwhere);
if (list == null || list.length == 0) {
return {code:0,msg:"没有信息",data:null};
}else {
return {code:1,msg:"操作成功",data:list};
}
}catch (e) {
return {code:-1,msg:"操作失败",data:null};
}
// apps.forEach(a=>{
// if(a.content && a.content!=""){
// a.content=decodeURIComponent(a.content);
// }
// });
// console.log("xxxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyxxxxxxxxxxxxxxxxx");
// for(var arch of apps.rows){
// var c=arch.content.toString("utf-8") ;
// console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
// console.log(c);
// if(c && c!=""){
// arch.content=c;
// }
// }
// return apps;
}
//获取详细信息
async findArticle(obj){
// const apps=await super.findAndCountAll(obj);
var id = obj.id;
if(id==null||id==""||id=="undefined"){
return {code:-101,msg:"参数有误",data:null};
}
try {
var sqlwhere = {
where: {id:id},
attributes: ["id","code", "title", "listimg", "videourl", "desc", "content", "mediaType", "usageType",
"test", "app_id"],
order: [["created_at", 'desc']],
raw: true
};
var list = await this.dao.model.findOne(sqlwhere);
if (list == null || list.length == 0) {
return {code:0,msg:"没有信息",data:null};
}else {
return {code:1,msg:"操作成功",data:list};
}
}catch (e) {
return {code:-1,msg:"操作失败",data:null};
}
}
}
module.exports=ArticleService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class NewschannelService extends ServiceBase{
constructor(){
super(ServiceBase.getDaoName(NewschannelService));
//this.appDao=system.getObject("db.appDao");
}
async findAgreenment(queryobj,qobj,req){
return this.dao.findAgreenment();
}
async findPrev5(queryobj,qobj){
return this.dao.findPrev5();
}
}
module.exports=NewschannelService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class SloganpictureService extends ServiceBase{
constructor(){
super(ServiceBase.getDaoName(SloganpictureService));
//this.appDao=system.getObject("db.appDao");
}
async findAndCountAll(obj){
const apps=await super.findAndCountAll(obj);
// apps.forEach(a=>{
// if(a.content && a.content!=""){
// a.content=decodeURIComponent(a.content);
// }
// });
// console.log("xxxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyxxxxxxxxxxxxxxxxx");
// for(var arch of apps.rows){
// var c=arch.content.toString("utf-8") ;
// console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
// console.log(c);
// if(c && c!=""){
// arch.content=c;
// }
// }
return apps;
}
}
module.exports=SloganpictureService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
const fs = require("fs")
class AppService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(AppService));
this.userS = system.getObject("service.auth.userSve");
this.routeDao = system.getObject("db.common.routeDao");
this.ossC = system.getObject("util.ossClient");
}
async getApp(p) {
let app = this.cacheManager["AppCache"].cache(p.appkey, null);
return app;
}
// 组装 前端 路由
async makeRoute(cds, parent) {
let results = [];
for (let item of cds) {
let tmpResult = {};
tmpResult.name = item.code;
tmpResult.path = `/${item.code}`;
tmpResult.component = "replace yours"
tmpResult.meta = {
hideInMenu: false,
title: item.title,
notCache: false,
icon: 'replace yours'
}
if (item.children && item.children.length > 0) {
tmpResult.children = [];
tmpResult.children = await this.makeRoute(item.children, item);
}
results.push(tmpResult);
}
return results
}
async buildFrontRouter(funcJSON, appid) {
var self = this;
return this.db.transaction(async function (t) {
let results = await self.makeRoute(funcJSON[0].children, null);
let keyfile = self.getUUID() + ".json"
let dirfile = "/tmp/" + keyfile
fs.writeFileSync(dirfile, JSON.stringify(results));
let result = await self.ossC.upfile(keyfile, dirfile);
let upurl = result.url
let upobj = { id: appid, docUrl: upurl }
fs.unlinkSync(dirfile)
await self.db.models.app.update(upobj, { where: { id: appid }, transaction: t })
return { uprul: upurl }
})
}
async findAllApps(uid) {
var apps = null;
var dicRtn = {};
var wheresql = {};
if (uid) {
wheresql[this.db.Op.and] = {
[this.db.Op.or]:
[
{ isPublish: false, creator_id: uid },
{ isEnabled: true, isPublish: true }
],
};
apps = await this.dao.model.findAll({
where: wheresql,
attributes: ['id', 'name', 'appkey', 'showimgUrl', 'appType', 'docUrl', 'homePage']
});
} else {
wheresql = { isEnabled: true, isPublish: true };
apps = await this.dao.model.findAll({
where: wheresql,
attributes: ['id', 'name', 'appkey', 'showimgUrl', 'appType', 'docUrl', 'homePage']
});
}
for (var app of apps) {
var tmk = uiconfig.config.pdict.app_type[app.appType];
if (!dicRtn[tmk]) {
dicRtn[tmk] = [];
dicRtn[tmk].push(app);
} else {
dicRtn[tmk].push(app);
}
}
return dicRtn;
}
//创建应用
//每个应用建立两个路由,一个api路由
//对api路由启用jwt插件
async create(pobj, qobj, req) {
var self = this;
return this.db.transaction(async function (t) {
var app = await self.dao.create(pobj, t);
//创建后台应用服务
let urltmp = "http://" + app.backend
if (app.backport) {
urltmp += ":" + app.backport
}
//先检查后端服务是否存在,如果存在
let svobj = await self.cjsonregister(AppService.newServiceUrl(), { name: app.name, url: urltmp })
//添加路由,下面的绕过jwt检查
let ps = ["/web/auth/userCtl/pmgetUserByCode", "/web/auth/userCtl/pmlogin", "/web/auth/userCtl/pmregister", "/web/auth/userCtl/pmSendVCode", "/web/auth/userCtl/pmloginByVCode"]
let routeobj = await self.cjsonregister(AppService.newRouteUrl(app.name),
{ name: app.name, paths: ps, hosts: [app.domainName], strip_path: false })
//如下要经过jwt检查
let ps2 = ["/api", "/web"]
let routeapi = await self.cjsonregister(AppService.newRouteUrl(app.name), { name: app.name + "_api", hosts: [app.domainName], paths: ps2, strip_path: false })
let r1 = await self.routeDao.create({ name: app.name, center_id: routeobj.id, app_id: app.id, shosts: app.domainName, spaths: ps.join(",") }, t);
let r2 = await self.routeDao.create({ name: app.name + "_api", center_id: routeapi.id, app_id: app.id, shosts: app.domainName, spaths: ps2.join(",") }, t);
//给api路由启动插件
await self.cjsonregister(AppService.bindPluginUrl(app.name + "_api"), { name: "jwt" })
if (svobj && routeobj && r1 && r2) {
try {
app.appkey = svobj.id;
await app.save({ transaction: t });
} catch (e) {
await self.cdel(AppService.routeUrl(app.name))
await self.cdel(AppService.routeUrl(app.name + "_api"))
await self.cdel(AppService.serviceUrl(app.name))
}
} else {
throw new Error("创建应用服务失败");
}
return app;
});
}
async translateInitSels(funcobjs) {
funcobjs.forEach((item) => {
console.log(item.title)
if (item.children && item.children.length > 0) {
this.translateInitSels(item.children)
} else {
if (item.auths && item.auths.length > 0) {
item.sels = []
}
}
})
}
async saveFuncTree(pobj) {
var self = this;
return this.db.transaction(async function (t) {
//如果存在functionJSON,那么就需要转换,构建编码路径
if (pobj.funcJson) {
// let funcobjs = JSON.parse(pobj.functionJSON)
await self.translateInitSels(pobj.funcJson)
pobj.functionJSON = JSON.stringify(pobj.funcJson)
}
let appcache = await self.cacheManager["AppCache"].cache(pobj.appkey);
let upobj = { id: appcache.id, functionJSON: pobj.functionJSON }
await self.dao.update(upobj, t)
//令缓存失效
await self.cacheManager["AppCache"].invalidate(pobj.appkey);
let appcache2 = await self.dao.model.findById(appcache.id, { transaction: t });
return { funcJson: JSON.parse(appcache2.functionJSON) }
})
}
//应用
async update(pobj, qobj) {
var self = this;
return this.db.transaction(async function (t) {
//如果存在functionJSON,那么就需要转换,构建编码路径
if (pobj.functionJSON != "") {
let funcobjs = JSON.parse(pobj.functionJSON)
//await self.translateWithBizCode(funcobjs,null)
pobj.functionJSON = JSON.stringify(funcobjs)
}
await self.dao.update(pobj, t)
let upobj = await self.dao.findById(pobj.id)
//令缓存失效
await self.cacheManager["AppCache"].invalidate(upobj.appkey);
return upobj
})
}
//删除应用
async delete(pobj, qobj) {
var self = this;
return this.db.transaction(async function (t) {
let delobj = await self.dao.delete(pobj, t)
//令缓存失效
await self.cacheManager["AppCache"].invalidate(delobj.appkey);
//删除路由
await self.cdel(AppService.routeUrl(pobj.name));
//删除api路由
await self.cdel(AppService.routeUrl(pobj.name + "_api"));
//删除服务
await self.cdel(AppService.serviceUrl(pobj.name));
return {}
})
}
async findAndCountAll(obj) {
var self = this;
const apps = await super.findAndCountAll(obj);
return apps;
}
}
module.exports = AppService;
// (async ()=>{
// let u=new AppService();
// // let x=await u.cregister("jiangong")
// // console.log(x)
// // let x=await u.cunregister("jiangong")
// // console.log(x)
// // let t=await u.cmakejwt()
// // console.log(t)
// //let ux=await u.cjsonregister(AppService.newRouteUrl("test-service2"),{name:"test-service2",hosts:["ttest1.com"]})
// //let ux=await u.cjsonregister(AppService.newServiceUrl(),{name:"test-service3",url:"http://zhichan.gongsibao.com"})
// //let ux=await u.cdel(AppService.routeUrl("test-service2"))
// //let ux=await u.cdel(AppService.serviceUrl("test-service2"))
// // let ux=await u.create({name:"test4-service",backend:"zhichan-service",domainName:"domain.com"})
// // console.log(ux);
// // let delrtn=await u.delete({id:2,name:"test4-service"})
// // console.log(delrtn);
// })()
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const uuidv4 = require('uuid/v4');
class CachSearchesSve {
constructor() {
this.cacheManager = system.getObject("db.common.cacheManager");
this.appDao = system.getObject("db.common.appDao");
this.authUtils = system.getObject("util.businessManager.authUtils");
}
getUUID() {
var uuid = uuidv4();
var u = uuid.replace(/\-/g, "");
return u;
}
async buildCacheRtn(pageValues) {
var ps = pageValues.map(k => {
var tmpList = k.split("|");
if (tmpList.length == 2) {
return { name: tmpList[0], val: tmpList[1], key: k };
}
});
return ps;
}
async findAndCountAllCache(obj) {
const pageNo = obj.pageInfo.pageNo;
const pageSize = obj.pageInfo.pageSize;
const limit = pageSize;
const offset = (pageNo - 1) * pageSize;
var search_name = obj.search && obj.search.name ? obj.search.name : "";
var cacheCacheKeyPrefix = "sadd_base_appkeys:" + settings.appKey + "_cachekey";
if (obj.appid == settings.platformid) {
var cacheList = await this.cacheManager["MagCache"].getCacheSmembersByKey(cacheCacheKeyPrefix);
if (search_name) {
cacheList = cacheList.filter(f => f.indexOf(search_name) >= 0);
}
var pageValues = cacheList.slice(offset, offset + limit);
var kobjs = await this.buildCacheRtn(pageValues);
var tmpList = { results: { rows: kobjs, count: cacheList.length } };
return system.getResult(tmpList);
} else {
var body = {
pageInfo: obj.pageInfo,
search: obj.search
};
var tmpList = await this.opOtherAppCache("findAndCountAll", body, obj.opCacheUrl);
return tmpList;
}
}
async delCache(obj) {
if (obj.appid == settings.platformid) {
var keyList = obj.key.split("|");
if (keyList.length == 2) {
var cacheCacheKeyPrefix = "sadd_base_appkeys:" + settings.appKey + "_cachekey";
await this.cacheManager["MagCache"].delCacheBySrem(cacheCacheKeyPrefix, obj.key);
await this.cacheManager["MagCache"].del(keyList[0]);
return { status: 0 };
}
} else {
var body = {
del_cachekey: obj.key
};
return await this.opOtherAppCache("delCache", body, obj.opCacheUrl);
}
}
async clearAllCache(obj) {
if (obj.appid == settings.platformid) {
await this.cacheManager["MagCache"].clearAll();
return { status: 0 };
}
return await this.opOtherAppCache("clearAllCache", {}, obj.opCacheUrl);
}
//app调用次数
async findAndCountAlldetail(obj) {
var apicallAccu = await this.cacheManager["ApiAccuCache"].getApiCallAccu(obj);
var result = { rows: [], count: 0 };
var keys = await this.cacheManager["MagCache"].keys("api_call_" + appkey + "*");
var detail = null;
for (let j = 0; j < keys.length; j++) {
var d = keys[j];
var pathdetail = d.substr(d.lastIndexOf("_") + 1, d.length);
var apicalldetailAccu = await this.cacheManager["ApiCallCountCache"].getApiCallCount(appkey, pathdetail);
var detail = { "detailPath": d, "detailCount": apicalldetailAccu.callcount };
}
result.rows = detail;
}
//操作别的应用的缓存
async opOtherAppCache(action_type, body = null, opCacheUrl) {
var appData = await this.authUtils.getTokenInfo(settings.appKey, settings.secret);
if (appData.status != 0) {
return appData;
}
//按照访问token
const restS = await system.getObject("util.restClient");
var restResult = await restS.execPostWithAK(
{
action_type: action_type,
body: body
},
opCacheUrl, appData.data.accessKey);
if (restResult && restResult.status == 0) {
return restResult;
}
return system.getResultFail();
}
}
module.exports = CachSearchesSve;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
class ChannelService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(ChannelService));
this.handlers = {}
}
async channelHandle(channelobj, path, datajson) {
let p = channelobj.pts.filter(item => {
return item.path == path
})
if (p.length == 0) {
throw Error("请配置渠道流量的路径方法映射")
}
let fileName = channelobj.code
let method = p[0].method
if (!this.handlers[fileName]) {
this.handlers[fileName] = require("./channelhandlers/" + fileName + ".js")
}
if (!this.handlers[fileName][method]) {
throw Error(`请在${fileName}文件中定义渠道流量的处理方法${method}`)
}
let rtn = await this.handlers[fileName][method](datajson, channelobj);
return rtn;
}
async create(p, q, req) {
let self = this
return this.db.transaction(async function (t) {
let u = await self.dao.create(p, t)
//创建路由--针对于特定来源渠道域名的路由,给中台服务添加路由
try {
let ps = ["/"]
let routeobj = await self.cjsonregister(ChannelService.newRouteUrl(settings.pmappname),
{ name: p.code, paths: ps, hosts: [p.routehost], strip_path: false })
} catch (e) {
await self.cdel(ChannelService.routeUrl(p.code))
throw new Error("创建渠道报错")
}
return u
})
}
async update(p, q, req) {
let self = this
return this.db.transaction(async function (t) {
let old = await self.dao.findOne({ id: p.id })
let u = await self.dao.update(p, t)
//创建路由--针对于特定来源渠道域名的路由,给中台服务添加路由
try {
await self.cdel(ChannelService.routeUrl(old.code))
let ps = ["/"]
let routeobj = await self.cjsonregister(ChannelService.newRouteUrl(settings.pmappname),
{ name: p.code, paths: ps, hosts: [p.routehost], strip_path: false })
} catch (e) {
throw new Error("创建渠道报错")
}
return u
})
}
async delete(p, q, req) {
let self = this
return this.db.transaction(async function (t) {
let u = await self.dao.delete(p, t)
//创建路由--针对于特定来源渠道域名的路由,给中台服务添加路由
try {
await self.cdel(ChannelService.routeUrl(u.code))
} catch (e) {
throw new Error("创建渠道报错")
}
return u
})
}
async authorizeUser(p, q, req) {
await this.dao.updateByWhere({
userids: p.userids
}, {
id: p.channelId
})
}
}
module.exports = ChannelService;
\ No newline at end of file
var system = require("../../../../system");
const sha235 = require("sha256");
var settings = require("../../../../../config/settings");
class AliHandler {
constructor() {
this.icUrl = settings.icUrl() + "/web/bizchance";
this.userService = system.getObject("service.auth.userSve");
this.cmpService = system.getObject("service.common.companySve");
this.msgService = system.getObject("service.msg.msgSve")
this.cacheManager = system.getObject("db.common.cacheManager");
}
/**
* 需要调用生成者接口,把数据丢入队列
* 组装生产者需要的数据结构
* @param {*} datajson
*/
//新商机处理
async addChance (datajson) {
console.log("put in queue [addChance]", datajson);
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["AliCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/bizoptCtl/insertInfo";
let { actionBody } = datajson;
var params = {
businessMode: actionBody.intentionBizId,
servicerCode: "10",
servicerName: "公司宝",
serviceName: actionBody.area,
contactsPhone: actionBody.phone || actionBody.mobile,
currentStatus: "beforeSubmission",
channelSource: "阿里云",
channelNumber: "aliCloud",
memoInfo: actionBody.description,
}
if (actionBody.type_code) {
if (actionBody.type_code == "icpsq") {
params.businessType = "/qcfw/icp/";
params.businessName = "icp";
}
if (actionBody.type_code == "edisq") {
params.businessType = "/qcfw/edi/";
params.businessName = "edi"
}
}
var rtn = await rc.execPost3({ "d": params }, requrl);
var j = JSON.parse(rtn.stdout);
console.log(JSON.stringify(j), "RRRRRRRRRRRRRRR");
if (j.status == 1) {
await this.cacheManager["AliCache"].cache(cachestr, JSON.stringify({ cachestr: cachestr }), 180000);//插入redis缓存
}
return j;
}
}
catch (error) {
console.log("TTTTTTTTTTTTTT");
console.log(error);
return system.getResultError(error);
}
}
async updateChanceStatus (datajson) {
console.log("put in queue [updateChanceStatus]" + JSON.stringify(datajson) + "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD");
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["AliCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
} else {
let { actionBody } = datajson;
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/bizoptCtl/updateStatusByDemandCode";
var stau;
switch (actionBody.status) {
case "createSolution":
stau = {
"businessMode": actionBody.intentionBizId,
"currentStatus": "beforeConfirmation"
}
break
case "closeNeed":
stau = {
"businessMode": actionBody.intentionBizId,
"currentStatus": "isClosed"
}
break
case "followingUp":
stau = {
"businessMode": actionBody.intentionBizId,
"currentStatus": "followingUp"
}
break
default:
return system.getResultError("status 状态值错误");
}
let rtn = await rc.execPost3({ "d": stau }, requrl);//更新商机状态为已完成
var j = JSON.parse(rtn.stdout);
return j
}
} catch (error) {
return system.getResultError(error);
}
}
//退回商机处理
async needClose (datajson) {
console.log("put in queue" + JSON.stringify(datajson) + "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD");
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["AliCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/schemeCtl/updateStatusByDemandCode";
var params = {
"d": {
"businessMode": datajson.actionBody.NeedNum,
"schemeNumber": datajson.actionBody.SolutionNum,
"currentStatus": "isReject",
"statusReason": datajson.actionBody.RefusalContent
}
}
var rtn = await rc.execPost3(params, requrl);
var j = JSON.parse(rtn.stdout);
if (j.status == 0) {
await this.cacheManager["AliCache"].cache(cachestr, JSON.stringify({ cachestr: cachestr }), 180000);//插入缓存
//给业务员发信息
var selUrl = this.icUrl + "/schemeCtl/findInfoByDemandCode";
var selpar = {
"d": {
"businessMode": datajson.actionBody.NeedNum
}
}
rtn = await rc.execPost3(selpar, selUrl);
var jj = JSON.parse(rtn.stdout);
console.log("jj------------------------------" + rtn.stdout);
if (jj.status == 0 && jj.data) {
var msg = {
"title": "你有退回的商机,请尽快处理",
"content": "商机编号" + jj.data.businessMode + ",商机类型是" + jj.data.businessName,
"sender": "管理员",
"sender_id": 0,
"msgType": "single",
"target": { "id": jj.data.clerkId, "name": jj.data.clerkName },
}
if (jj.data.businessType == "ICP" || jj.data.businessType == "EDI" || jj.data.businessType == "ICPANNUALREPORT" || jj.data.businessType == "EDIANNUALREPORT") {
msg.app_key = "5ae2da88-0ced-4b7a-98ea-60d5e1ff7e2e";
msg.jump_address = "allDispose"
}
else {
msg.app_key = "42d814c1-4daa-4643-88b2-f5dd3ec853f3";
msg.jump_address = "myChance"
}
var msgInfo = await this.msgService.create(msg);
console.log("msgInfo -----------------------------" + msgInfo);
}
return {
"status": 1, //1代表成功,否则失败
"msg": "成功",
"data": "",
"requestId": ""
}
}
else {
return j;
}
}
}
catch (error) {
return system.getResultError(error);
}
}
//交付单处理
async pushOrderDelivery (datajson, channelobj) {
console.log("put in queue-----------------------------------------------------------------------------------------------------", datajson);
try {
console.log("交付单数据:" + JSON.stringify(datajson));
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["AliCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
console.log("pushOrderDelivery 已缓存:" + cachestr + ", 缓存内容: " + JSON.stringify(cacheInfo));
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
// else {
// var rc = system.getObject("util.execClient");
// var requrl = this.icUrl + "/deliverybillCtl/findInfoByDeliverCode";
// var delInfo = await rc.execPost3({ "d": { "deliverNumber": datajson.actionBody.orderNo } }, requrl);
// console.log("jdelInfo---------------------------------------------" + delInfo.stdout);
// var jdelInfo = JSON.parse(delInfo.stdout);
// if (jdelInfo.status == 0) {
// return {
// "status": 1, //1代表成功,否则失败
// "msg": "数据已存在",
// "data": "",
// "requestId": ""
// }
// }
// else {}
// }
let rc = system.getObject("util.execClient");
let obj = await this.actionBodyHandler(datajson.actionBody);
let requrl = this.icUrl + "/deliverybillCtl/dealAliDeliveryInfo";
// var bizurl = this.icUrl + "/bizoptCtl/updateStatusByDemandCode";
//渠道名称和渠道编码
obj.channelSource = channelobj.name;
obj.channelNumber = channelobj.code;
//如果订单状态为已支付
if (datajson.actionBody.needsolution.status && datajson.actionBody.needsolution.status == "PAID") {
//查询业务员信息并填充到obj
if (datajson.actionBody.needsolution.salesmanInfo.salesmanChannelId) {
//去数据库查询该业务员信息
try {
let resInfo = await this.userService.getSalesmanInfo(datajson.actionBody.needsolution.salesmanInfo.salesmanChannelId);
obj.salesmanOpcode = resInfo.opath;
obj.salesmanName = resInfo.nickName;
obj.servicerCode = resInfo.company_id;
} catch (error) {
console.log("salesmanChannelId: " + datajson.actionBody.needsolution.salesmanInfo.salesmanChannelId + "获取业务员opcode失败:" + error)
}
}
//分配交付员
var ConsultTypeName = "";
if (obj.businessName && obj.businessName != 'undefined') {
console.log("productTypeName-----------------------------" + obj.businessName);
ConsultTypeName = obj.businessName;
}
try {
let companyFind = await this.cmpService.dao.model.findOne({
where: { name: obj.serviceName }, include: [
{
model: this.cmpService.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery'], raw: true
}
], excludes: ['orgJson']
});
if (companyFind) {
obj.servicerCode = companyFind.id;
}
//暂时不自动分配
// var deliveryInfo = await this.userService.getBizUserForAliDelivery(obj.baseInfo.contactsName, obj.servicerName, ConsultTypeName, obj.skuCode, obj.serviceName, companyFind);
} catch (error) {
console.log("分配交付员失败.", error);
}
// if (deliveryInfo && deliveryInfo != 'undefined') {
// obj.clerkOpcode = deliveryInfo.opath;//交付员opcode
// obj.clerkId = deliveryInfo.userId;//交付员id
// // obj.costPrice = deliveryInfo.cost;//成本
// obj.clerkName = deliveryInfo.nickName;//交付员名称
// // obj.clerkPhone = deliveryInfo.mobile;//交付人员电话
// // obj.servicerCode = deliveryInfo.compId;
// }
//设置成本
obj.costPrice = await this.userService.findCostBySkuCode(obj.skuCode)
//异步更新需求状态 channelNeedNo
if (datajson.actionBody && datajson.actionBody.channelNeedNo) {
var stau = {
"businessMode": datajson.actionBody.channelNeedNo,
"currentStatus": "isFinished"
}
rc.execPost3({ "d": stau }, this.icUrl + "/bizoptCtl/updateStatusByDemandCode");//更新商机状态为已完成
}
}
console.log("推送数据obj: " + JSON.stringify(obj));
var rtn = await rc.execPost3({ "d": obj }, requrl);
console.log("pushOrderDelivery插入数据成功---------------------------------" + rtn.stdout);
let cacheDeliveryInfo = await this.cacheManager["AliCache"].cache(cachestr, JSON.stringify({ cachestr: cachestr }), 180);
console.log("交付单缓存信息: " + JSON.stringify(cacheDeliveryInfo));
return {
"status": 1, //1代表成功,否则失败
"msg": "",
"data": "",
"requestId": ""
}
}
catch (error) {
console.log("error-------------------------------------" + error);
return system.getResultError(error);
}
}
//客户状态处理
async deliveryNotify (datajson) {
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["AliCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/deliverybillCtl/updateFileAndStatusByDelivertCode";
var params = {
"d": {
"deliverNumber": datajson.actionBody.orderNo,
"baseInfo": {}
// "deliverStatus": "closed",
// "statusReason": datajson.actionBody.refusalContent
}
}
let title = "";
if (datajson.actionBody.needsolution.status == "USER_CONFIRMED") {//用户已确认递交文件
title = "用户已确认递交文件";
params.d.deliverStatus = "userConfirmationResolve";
params.d.customerMaterial = datajson.actionBody.needsolution.customerMaterial;
}
else if (datajson.actionBody.needsolution.status == "CLOSE") {//方案关闭
title = "方案已关闭";
params.d.deliverStatus = "closed";
}
var rtn = await rc.execPost3(params, requrl);
var j = JSON.parse(rtn.stdout);
if (j.status == 0) {
await this.cacheManager["AliCache"].cache(cachestr, JSON.stringify({ cachestr: cachestr }), 180);//插入缓存
//给业务员发信息
var selUrl = this.icUrl + "/deliverybillCtl/findInfoByDeliverCode";
var selpar = {
"d": {
"deliverNumber": datajson.actionBody.orderNo
}
}
rtn = await rc.execPost3(selpar, selUrl);
var jj = JSON.parse(rtn.stdout);
console.log("jj-------------------------" + rtn.stdout);
if (jj.status == 0 && jj.data) {
var msg = {
"title": "你有" + title + "的交付单,请尽快处理",
"content": "交付单编号" + jj.data.delivery_code + ",产品类型是" + jj.data.product_name,
"sender": "管理员",
"sender_id": 0,
"msgType": "single",
"target": { "id": jj.data.salesman_id, "name": jj.data.salesman_name },
}
if (jj.data.product_code == "ICP" || jj.data.product_code == "EDI" || jj.data.product_code == "ICPANNUALREPORT" || jj.data.product_code == "EDIANNUALREPORT") {
msg.app_key = "5ae2da88-0ced-4b7a-98ea-60d5e1ff7e2e";
msg.jump_address = "deliveryAll"
}
else {
msg.app_key = "42d814c1-4daa-4643-88b2-f5dd3ec853f3";
msg.jump_address = "myDeliver"
}
this.msgService.create(msg);
}
return {
"status": 1, //1代表成功,否则失败
"msg": "",
"data": "",
"requestId": ""
}
}
else {
return j;
}
}
}
catch (error) {
return system.getResultError(error);
}
}
async actionBodyHandler (actionBody) {
let data = actionBody;
let obj = {};
obj.baseInfo = {};
obj.companyInfo = {};
obj.registeredInfo = {};
obj.positionInfo = {};
obj.regInfo = {};
obj.express_info = {};
if (data.orderNo) {//交付单编号
obj.deliverNumber = data.orderNo;
}
if (data.servicer) {//服务商信息
if (data.servicer.name) {//服务商名称
obj.servicerName = data.servicer.name;
}
}
if (data.channelNeedNo) {//需求编号
obj.businessMode = data.channelNeedNo;
}
if (data.channelSolutionNo) {//方案编号
obj.schemeNumber = data.channelSolutionNo;
}
if (data.needsolution.solution.Area) {//服务地区编码和服务地区
obj.serviceCode = data.needsolution.solution.Area;
obj.serviceName = data.needsolution.solution.Area;
obj.baseInfo.serviceName = data.needsolution.solution.Area;
}
if (data.needsolution.solution.CompanyName) {//公司名称
obj.baseInfo.companyName = data.needsolution.solution.CompanyName;
obj.companyName = data.needsolution.solution.CompanyName;
}
if (data.needsolution.solution.CompanyAddress) {//公司地址
obj.baseInfo.companyAddress = data.needsolution.solution.CompanyAddress;
}
if (data.needsolution.bizType) { //产品编码
if (data.needsolution.bizType == "icpsq") {
obj.businessType = "ICP";
}
if (data.needsolution.bizType == "edisq") {
obj.businessType = "EDI";
}
}
if (data.needsolution.typeName) { //产品名称
if (data.needsolution.typeName == "icp申请") {
obj.businessName = "icp";
}
if (data.needsolution.typeName == "edi申请") {
obj.businessName = "edi";
}
}
if (data.skuCode) { //产品的sku
obj.skuCode = data.skuCode;
}
if (data.needsolution.status) { //交付单状态码
if (data.needsolution.status == "PAID") {//已支付
obj.deliverStatus = "received";
}
if (data.needsolution.status == "USER_UPLOADED") {//已上传
obj.deliverStatus = "collecting";
}
}
if (data.needsolution.customerRemark) { //状态原因
obj.statusReason = data.needsolution.customerRemark;
}
// if (data.needsolution.status) { //成本
// obj.costPrice = data.needsolution.status;
// }
if (data.needsolution.totalSum) { //价格
obj.sellingPrice = data.needsolution.totalSum;
}
if (data.needsolution.salesmanInfo) {//业务员id
if (data.needsolution.salesmanInfo.salesmanId) {
obj.salesmanId = data.needsolution.salesmanInfo.salesmanId;
}
if (data.needsolution.salesmanInfo.salesmanName) {//业务员name
obj.salesmanName = data.needsolution.salesmanInfo.salesmanName;
}
if (data.needsolution.salesmanInfo.salesmanMobile) {//业务员手机
obj.salesmanPhone = data.needsolution.salesmanInfo.salesmanMobile;
}
}
if (data.needsolution.customerInfo) {//联系人
if (data.needsolution.customerInfo.publishName) {
obj.baseInfo.contactsName = data.needsolution.customerInfo.publishName;
}
if (data.needsolution.customerInfo.publishMobile) {//联系电话
obj.baseInfo.contactsPhone = data.needsolution.customerInfo.publishMobile;
}
if (data.needsolution.customerRemark) {//备注信息
obj.baseInfo.memoInfo = data.needsolution.customerRemark;
}
}
if (data.needsolution.customerMaterial) {//客户上传所有材料
obj.baseInfo.customerMaterial = data.needsolution.customerMaterial;
}
if (data.needsolution.solutionFlowList) {//流程记录
obj.baseInfo.solutionFlowList = data.needsolution.solutionFlowList;
}
return obj;
}
}
module.exports = new AliHandler();
// (async ()=>{
// var task = new AliHandler();
// var d = await task.userService.getBizUserForDelivery("16512345678","公司宝","公司注册","sv_business_registration_category_limited1","北京");
// console.log("ddddddddddddd");
// console.log(JSON.stringify(d));
// console.log("dddddddddddddd");
// })()
// let userService = system.getObject("service.auth.userSve");
// start();
// async function start() {
// console.log('开始:')
// try {
// let result = await userService.getBizUserForAliDelivery(" ", "公司宝", "icp", "sv_vat_shareholder_domestic1015", "北京市");
// console.log('=-=-=-=-=-=:'+JSON.stringify(result));
// } catch (error) {
// console.log("getBizUserForAliDelivery err: "+ error);
// }
// }
// let userService = system.getObject("service.auth.userSve");
// start();
// async function start() {
// let resInfo = await userService.getSalesmanInfo("5ddf5f5d8b13b0000a3f2b18");
// console.log("ceshi:" + JSON.stringify(resInfo));
// }
\ No newline at end of file
var system = require("../../../../system");
const sha235 = require("sha256");
var settings = require("../../../../../config/settings");
class TxHandler {
constructor() {
this.icUrl = settings.icUrl() + "/web/bizchance";
this.userService = system.getObject("service.auth.userSve");
this.msgService = system.getObject("service.msg.msgSve")
this.cacheManager = system.getObject("db.common.cacheManager");
}
/**
* 需要调用生成者接口,把数据丢入队列
* 组装生产者需要的数据结构
* @param {*} datajson
*/
//新商机处理
async addChance(datajson) {
console.log("put in queue", datajson);
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
//获取分配的业务员信息
var ConsultTypeName = datajson.actionBody.ConsultTypeName.split("/")[2];
var salesmanInfo = await this.userService.getBizUserForBizChance(datajson.actionBody.ContactsMobile, datajson.actionBody.ServicerName, ConsultTypeName, datajson.actionBody.RegionName);
console.log("salesman " + salesmanInfo);
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/bizoptCtl/insertInfo";
var params = {
"businessMode": datajson.actionBody.NeedNum,
"servicerName": datajson.actionBody.ServicerName,
"serviceCode": datajson.actionBody.RegionId,
"serviceName": datajson.actionBody.RegionName,
"contactsName": datajson.actionBody.ContactsName,
"contactsPhone": datajson.actionBody.ContactsMobile,
"businessType": datajson.actionBody.ConsultType,
"businessName": datajson.actionBody.ConsultTypeName,
"currentStatus" : "beforeSubmission",
"channelSource": "tencentCloud",
"sourceNumber":"tx"
}
if (datajson.actionBody.Notes && datajson.actionBody.Notes != 'undefined') {
params.memoInfo = datajson.actionBody.Notes;
}
if (datajson.actionBody.CompanyName && datajson.actionBody.CompanyName != 'undefined') {
params.companyName = datajson.actionBody.CompanyName;
}
if (datajson.actionBody.UserName && datajson.actionBody.UserName != 'undefined') {
params.UserName = datajson.actionBody.UserName;
}
if (salesmanInfo && salesmanInfo != 'undefined') {
params.salesmanOpcode = salesmanInfo.opath;
params.salesmanId = salesmanInfo.userId;
params.clerkName = salesmanInfo.userName;
params.clerkPhone = salesmanInfo.mobile;
params.servicerCode = salesmanInfo.compId
}
var rtn = await rc.execPost3({ "d": params }, requrl);
var j = JSON.parse(rtn.stdout);
console.log(JSON.stringify(j), "RRRRRRRRRRRRRRR");
if (j.status == 1) {
await this.cacheManager["TxCache"].cache(cachestr, JSON.stringify({cachestr: cachestr}), 180);//插入redis缓存
//给业务员发信息
var msg = {
"title": "你有新的商机,请尽快处理",
"content": "商机编号" + params.businessMode + ",商机类型是" + params.businessName + ",服务地区是" + params.serviceName,
"sender": "管理员",
"sender_id":0,
"msgType": "single",
"target": { "id": params.salesmanId, "name": params.clerkName },
}
if (params.businessType == "/qcfw/icp/" || params.businessType == "/qcfw/edi/" || params.businessType == "/qcfw/icpannals/" || params.businessType == "/qcfw/ediannals/") {
msg.app_key = "5ae2da88-0ced-4b7a-98ea-60d5e1ff7e2e";
msg.jump_address = "allDispose"
}
else {
msg.app_key = "42d814c1-4daa-4643-88b2-f5dd3ec853f3";
msg.jump_address = "myChance"
}
await this.msgService.create(msg);
}
return j;
}
}
catch (error) {
console.log("TTTTTTTTTTTTTT");
console.log(error);
return system.getResultError(error);
}
}
//退回商机处理
async needClose(datajson) {
console.log("put in queue" + JSON.stringify(datajson) + "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD");
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/schemeCtl/updateStatusByDemandCode";
var params = {
"d": {
"businessMode": datajson.actionBody.NeedNum,
"schemeNumber": datajson.actionBody.SolutionNum,
"currentStatus": "isReject",
"statusReason": datajson.actionBody.RefusalContent
}
}
var rtn = await rc.execPost3(params, requrl);
var j = JSON.parse(rtn.stdout);
if (j.status == 0) {
await this.cacheManager["TxCache"].cache(cachestr, JSON.stringify({cachestr: cachestr}), 180);//插入缓存
//给业务员发信息
var selUrl = this.icUrl + "/schemeCtl/findInfoByDemandCode";
var selpar = {
"d": {
"businessMode": datajson.actionBody.NeedNum
}
}
rtn = await rc.execPost3(selpar, selUrl);
var jj = JSON.parse(rtn.stdout);
console.log("jj------------------------------" + rtn.stdout);
if (jj.status == 0 && jj.data){
var msg = {
"title": "你有退回的商机,请尽快处理",
"content": "商机编号" + jj.data.businessMode + ",商机类型是" + jj.data.businessName,
"sender": "管理员",
"sender_id":0,
"msgType": "single",
"target": { "id": jj.data.clerkId, "name": jj.data.clerkName },
}
if (jj.data.businessType == "ICP" || jj.data.businessType == "EDI" || jj.data.businessType == "ICPANNUALREPORT" || jj.data.businessType == "EDIANNUALREPORT") {
msg.app_key = "5ae2da88-0ced-4b7a-98ea-60d5e1ff7e2e";
msg.jump_address = "allDispose"
}
else {
msg.app_key = "42d814c1-4daa-4643-88b2-f5dd3ec853f3";
msg.jump_address = "myChance"
}
var msgInfo = await this.msgService.create(msg);
console.log("msgInfo -----------------------------" + msgInfo);
}
return {
"status": 1, //1代表成功,否则失败
"msg": "成功",
"data": "",
"requestId": ""
}
}
else {
return j;
}
}
}
catch (error) {
return system.getResultError(error);
}
}
//交付单处理
async orderSubmit(datajson) {
console.log("put in queue-----------------------------------------------------------------------------------------------------", datajson);
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/deliverybillCtl/findInfoByDeliverCode";
var delInfo = await rc.execPost3({ "d": { "deliverNumber": datajson.actionBody.orderNum } }, requrl);
console.log("jdelInfo---------------------------------------------" + delInfo.stdout);
var jdelInfo = JSON.parse(delInfo.stdout);
if (jdelInfo.status == 0) {
return {
"status": 1, //1代表成功,否则失败
"msg": "数据已存在",
"data": "",
"requestId": ""
}
}
else {
//获取分配的业务员信息
var ConsultTypeName = "";
console.log("productTypeName-----------------------------" + datajson.actionBody.productTypeName);
if (datajson.actionBody.productTypeName && datajson.actionBody.productTypeName != 'undefined') {
ConsultTypeName = datajson.actionBody.productTypeName.split("/")[2];
}
console.log("ConsultTypeName-----------------------------" + ConsultTypeName);
var salesmanInfo = await this.userService.getBizUserForDelivery(datajson.actionBody.orderSnapshot.contactsPhone, datajson.actionBody.servicerName, ConsultTypeName, datajson.actionBody.txPriceCode, datajson.actionBody.regionName);
requrl = this.icUrl + "/deliverybillCtl/insertInfo";
var bizurl = this.icUrl + "/bizoptCtl/updateStatusByDemandCode";
var params = {
"channelSource": "tencentCloud",
"sourceNumber":"tx",
"deliverNumber": datajson.actionBody.orderNum,
"servicerName": datajson.actionBody.servicerName,
"serviceCode": datajson.actionBody.regionId,
"serviceName": datajson.actionBody.regionName,
"businessType": datajson.actionBody.productType,
"businessName": ConsultTypeName,
"skuCode": datajson.actionBody.txPriceCode,
"txOrderNum": datajson.actionBody.txOrderNum,
"deliverStatus": "received",
"baseInfo": {
"txOrderNum": datajson.actionBody.txOrderNum,
"isAdviser": "已分配",//是否分配顾问
"contactsName": datajson.actionBody.orderSnapshot.contactsName,
"contactsPhone": datajson.actionBody.orderSnapshot.contactsPhone,
"payStatus": "待交付"
},
"companyInfo": {},
"registeredInfo": {},
"positionInfo": {},
"regInfo": {},
"express_info": {}
}
if (salesmanInfo && salesmanInfo != 'undefined') {
params.clerkOpcode = salesmanInfo.opath;
params.clerkId = salesmanInfo.userId;
params.clerkName = salesmanInfo.userName;
//params.clerkPhone = salesmanInfo.mobile;
params.costPrice = salesmanInfo.cost;
params.servicerCode = salesmanInfo.compId;
params.baseInfo.clerkName = salesmanInfo.userName;
params.baseInfo.clerkPhone = salesmanInfo.mobile
}
if (!params.servicerCode || params.servicerCode == 'undefined') {
if (datajson.actionBody.orderSnapshot.servicerCode && datajson.actionBody.orderSnapshot.servicerCode != 'undefined') {
params.servicerCode = datajson.actionBody.orderSnapshot.servicerCode;//fuwushang id
}
}
if (datajson.actionBody.orderSnapshot.needNum && datajson.actionBody.orderSnapshot.needNum != 'undefined') {
params.businessMode = datajson.actionBody.orderSnapshot.needNum;//商机编号
}
if (datajson.actionBody.realTotalCost && datajson.actionBody.realTotalCost != 'undefined') {
params.sellingPrice = datajson.actionBody.realTotalCost;//价格
}
// if (datajson.actionBody.orderSnapshot.channelSource && datajson.actionBody.orderSnapshot.channelSource != 'undefined') {
// params.channelSource = datajson.actionBody.orderSnapshot.channelSource;//渠道名称
// }
// if (datajson.actionBody.orderSnapshot.channelNumber && datajson.actionBody.orderSnapshot.channelNumber != 'undefined') {
// params.channelNumber = datajson.actionBody.orderSnapshot.channelNumber;//渠道编码
// }
if (datajson.actionBody.orderSnapshot.hasOwnProperty("isWhether")) {
if (datajson.actionBody.orderSnapshot.isWhether === true || datajson.actionBody.orderSnapshot.isWhether === "yes") {
params.baseInfo.isWhether = "yes";//是否刻章
}
else {
params.baseInfo.isWhether = "no";//是否刻章
}
}
if (datajson.actionBody.orderSnapshot.hasOwnProperty("financial")) {
if (datajson.actionBody.orderSnapshot.financial === true || datajson.actionBody.orderSnapshot.financial === "yes") {
params.baseInfo.financial = "yes";
}
else {
params.baseInfo.financial = "no";
}
}
if (datajson.actionBody.orderSnapshot.officialSeal && datajson.actionBody.orderSnapshot.officialSeal != 'undefined') {
params.baseInfo.officialSeal = datajson.actionBody.orderSnapshot.officialSeal;//公章扫描件
}
if (datajson.actionBody.orderSnapshot.businessLicense && datajson.actionBody.orderSnapshot.businessLicense != 'undefined') {
params.baseInfo.businessLicense = datajson.actionBody.orderSnapshot.businessLicense;//营业执照扫描件
}
if (datajson.actionBody.orderSnapshot.taxpayerName && datajson.actionBody.orderSnapshot.taxpayerName != 'undefined') {
params.baseInfo.taxpayerName = datajson.actionBody.orderSnapshot.taxpayerName;//纳税人类型名称
}
else if (datajson.actionBody.orderSnapshot.taxpayerType && datajson.actionBody.orderSnapshot.taxpayerType != 'undefined') {
params.baseInfo.taxpayerName = datajson.actionBody.orderSnapshot.taxpayerType;//纳税人类型名称
}
if (datajson.actionBody.orderSnapshot.buyDuration && datajson.actionBody.orderSnapshot.buyDuration != 'undefined') {
params.baseInfo.buyDuration = datajson.actionBody.orderSnapshot.buyDuration;//购买时长
}
else if (datajson.actionBody.orderSnapshot.timeSpan && datajson.actionBody.orderSnapshot.timeSpan != 'undefined') {
params.baseInfo.buyDuration = datajson.actionBody.orderSnapshot.timeSpan + "年";//购买时长
}
if (datajson.actionBody.orderSnapshot.buyTime && datajson.actionBody.orderSnapshot.buyTime != 'undefined') {
params.baseInfo.buyTime = datajson.actionBody.orderSnapshot.buyTime;//购买时间
}
if (datajson.actionBody.orderSnapshot.isRenew && datajson.actionBody.orderSnapshot.isRenew != 'undefined') {
params.baseInfo.isRenew = datajson.actionBody.orderSnapshot.isRenew;//是否自动续费
}
if (datajson.actionBody.orderSnapshot.memoInfo && datajson.actionBody.orderSnapshot.memoInfo != 'undefined') {
params.baseInfo.memoInfo = datajson.actionBody.orderSnapshot.memoInfo;
}
else if (datajson.actionBody.orderSnapshot.businessContent && datajson.actionBody.orderSnapshot.businessContent != 'undefined') {
params.baseInfo.memoInfo = datajson.actionBody.orderSnapshot.businessContent;
}
if (datajson.actionBody.orderSnapshot.whetherType && datajson.actionBody.orderSnapshot.whetherType != 'undefined') {
params.baseInfo.whetherType = datajson.actionBody.orderSnapshot.whetherType;//刻章类型
}
if (datajson.actionBody.orderSnapshot.hasOwnProperty("annualReport")) {//年报信息
params.baseInfo.annualReport = datajson.actionBody.orderSnapshot.annualReport;
}
else{
if (datajson.actionBody.orderSnapshot.annual_report && datajson.actionBody.orderSnapshot.annual_report != 'undefined') {
params.baseInfo.annualReport = true;//shifouxuyaonianbao
}
else {
params.baseInfo.annualReport = false;
}
}
if (datajson.actionBody.orderSnapshot.hasOwnProperty("addressType")) {//注册地址类型
if (datajson.actionBody.orderSnapshot.addressType === true || datajson.actionBody.orderSnapshot.addressType === "practical") {
params.baseInfo.addressType = "practical";
}
else {
params.baseInfo.addressType = "virtual";
}
}
if (datajson.actionBody.orderSnapshot.subjectType && datajson.actionBody.orderSnapshot.subjectType != 'undefined') {
params.baseInfo.subjectType = datajson.actionBody.orderSnapshot.subjectType;//代理记账主体类型
}
if (datajson.actionBody.orderSnapshot.companyName && datajson.actionBody.orderSnapshot.companyName != 'undefined') {
params.baseInfo.companyName = datajson.actionBody.orderSnapshot.companyName;//公司名称
params.companyInfo.companyName = datajson.actionBody.orderSnapshot.companyName;
}
else if (datajson.actionBody.orderSnapshot.company && datajson.actionBody.orderSnapshot.company != 'undefined') {
params.baseInfo.companyName = datajson.actionBody.orderSnapshot.company;//公司名称
params.companyInfo.companyName = datajson.actionBody.orderSnapshot.company;
}
if (datajson.actionBody.orderSnapshot.companyProperties && datajson.actionBody.orderSnapshot.companyProperties != 'undefined') {
params.companyInfo.companyPropertiesName = datajson.actionBody.orderSnapshot.companyProperties;//公司性质名称
}
else if (datajson.actionBody.orderSnapshot.companyType && datajson.actionBody.orderSnapshot.companyType != 'undefined') {
params.companyInfo.companyPropertiesName = datajson.actionBody.orderSnapshot.companyType;//公司性质名称
}
else if (datajson.actionBody.orderSnapshot.registeredName && datajson.actionBody.orderSnapshot.registeredName != 'undefined') {
params.companyInfo.companyPropertiesName = datajson.actionBody.orderSnapshot.registeredName;//公司性质名称
}
if (datajson.actionBody.orderSnapshot.fullAddress && datajson.actionBody.orderSnapshot.fullAddress != 'undefined') {
params.companyInfo.fullAddress = datajson.actionBody.orderSnapshot.fullAddress;//详细地址
}
else if (datajson.actionBody.orderSnapshot.residenceAddress && datajson.actionBody.orderSnapshot.residenceAddress != 'undefined') {
params.companyInfo.fullAddress = datajson.actionBody.orderSnapshot.residenceAddress;//详细地址
}
if (datajson.actionBody.orderSnapshot.virtualPrice && datajson.actionBody.orderSnapshot.virtualPrice != 'undefined') {
params.companyInfo.virtualPrice = datajson.actionBody.orderSnapshot.virtualPrice;//虚拟地址价格
params.baseInfo.virtualPrice = datajson.actionBody.orderSnapshot.virtualPrice;//虚拟地址价格
}
if (datajson.actionBody.orderSnapshot.residenceAddress && datajson.actionBody.orderSnapshot.residenceAddress != 'undefined') {
params.companyInfo.residenceAddress = datajson.actionBody.orderSnapshot.residenceAddress;//zhusuo
}
if (datajson.actionBody.orderSnapshot.engagedIndustry && datajson.actionBody.orderSnapshot.engagedIndustry != 'undefined') {
params.companyInfo.engagedIndName = datajson.actionBody.orderSnapshot.engagedIndustry;//从事行业名称
}
if (datajson.actionBody.orderSnapshot.businessScope && datajson.actionBody.orderSnapshot.businessScope != 'undefined') {
params.companyInfo.businessScope = datajson.actionBody.orderSnapshot.businessScope;//经营范围
}
if (datajson.actionBody.orderSnapshot.operatingPeriod && datajson.actionBody.orderSnapshot.operatingPeriod != 'undefined') {
params.companyInfo.operatingPeriod = datajson.actionBody.orderSnapshot.operatingPeriod;//经营期限
}
if (datajson.actionBody.orderSnapshot.businessTerm && datajson.actionBody.orderSnapshot.businessTerm != 'undefined') {
params.companyInfo.businessTerm = datajson.actionBody.orderSnapshot.businessTerm;//经营期限
}
if (datajson.actionBody.orderSnapshot.registeredCapital && datajson.actionBody.orderSnapshot.registeredCapital != 'undefined') {
params.companyInfo.registeredCapital = datajson.actionBody.orderSnapshot.registeredCapital;//注册资本
}
if (datajson.actionBody.orderSnapshot.creditCode && datajson.actionBody.orderSnapshot.creditCode != 'undefined') {
params.companyInfo.creditCode = datajson.actionBody.orderSnapshot.creditCode;//统一社会信用代码
}
if (datajson.actionBody.orderSnapshot.establishedTime && datajson.actionBody.orderSnapshot.establishedTime != 'undefined') {
params.companyInfo.establishedTime = datajson.actionBody.orderSnapshot.establishedTime;//成立时间
}
if (datajson.actionBody.orderSnapshot.shareholderName && datajson.actionBody.orderSnapshot.shareholderName != 'undefined') {
params.companyInfo.shareholderName = datajson.actionBody.orderSnapshot.shareholderName;//法人代表
}
var rtn = await rc.execPost3({ "d": params }, requrl);
var j = JSON.parse(rtn.stdout);
console.log("j---------------------------------" + rtn.stdout);
var stau = {
"businessMode": params.businessMode,
"currentStatus": "isFinished",
"statusReason": ""
}
rtn = await rc.execPost3({ "d": stau }, bizurl);//更新商机状态为已完成
var j1 = JSON.parse(rtn.stdout);
console.log("j1---------------------------------" + rtn.stdout);
if (j.status == 0 && j1.status == 0) {
await this.cacheManager["TxCache"].cache(cachestr, JSON.stringify({cachestr: cachestr}), 180);
//给业务员发信息
var msg = {
"title": "你有新的交付单,请尽快处理",
"content": "交付单编号" + params.deliverNumber + ",产品类型是" + params.businessName + ",服务地区是" + params.serviceName,
"sender": "管理员",
"sender_id":0,
"msgType": "single",
"target": { "id": params.clerkId, "name": params.clerkName },
}
if (params.businessType == "/qcfw/icp/" || params.businessType == "/qcfw/edi/" || params.businessType == "/qcfw/icpannals/" || params.businessType == "/qcfw/ediannals/") {
msg.app_key = "5ae2da88-0ced-4b7a-98ea-60d5e1ff7e2e";
msg.jump_address = "deliveryAll"
}
else {
msg.app_key = "42d814c1-4daa-4643-88b2-f5dd3ec853f3";
msg.jump_address = "myDeliver"
}
await this.msgService.create(msg);
return {
"status": 1, //1代表成功,否则失败
"msg": "",
"data": "",
"requestId": ""
}
}
else {
return j;
}
}
}
}
catch (error) {
console.log("error-------------------------------------" + error);
return system.getResultError(error);
}
}
//关闭交付单处理
async orderClose(datajson) {
console.log("put in queue", datajson);
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/deliverybillCtl/updateStatusByDeliverCode";
var params = {
"d": {
"deliverNumber": datajson.actionBody.orderNum,
"deliverStatus": "closed",
"statusReason": datajson.actionBody.refusalContent
}
}
var rtn = await rc.execPost3(params, requrl);
var j = JSON.parse(rtn.stdout);
if (j.status == 0) {
await this.cacheManager["TxCache"].cache(cachestr, JSON.stringify({cachestr: cachestr}), 180);//插入缓存
//给业务员发信息
var selUrl = this.icUrl + "/deliverybillCtl/findInfoByDeliverCode";
var selpar = {
"d":{
"deliverNumber":datajson.actionBody.orderNum
}
}
rtn = await rc.execPost3(selpar, selUrl);
var jj = JSON.parse(rtn.stdout);
console.log("jj-------------------------" + rtn.stdout);
if (jj.status ==0 && jj.data){
var msg = {
"title": "你有关闭的交付单,请尽快处理",
"content": "交付单编号" + jj.data.delivery_code + ",产品类型是" + jj.data.product_name,
"sender": "管理员",
"sender_id":0,
"msgType": "single",
"target": { "id": jj.data.salesman_id, "name": jj.data.salesman_name },
}
if (jj.data.product_code == "ICP" || jj.data.product_code == "EDI" || jj.data.product_code == "ICPANNUALREPORT" || jj.data.product_code == "EDIANNUALREPORT") {
msg.app_key = "5ae2da88-0ced-4b7a-98ea-60d5e1ff7e2e";
msg.jump_address = "deliveryAll"
}
else {
msg.app_key = "42d814c1-4daa-4643-88b2-f5dd3ec853f3";
msg.jump_address = "myDeliver"
}
await this.msgService.create(msg);
}
return {
"status": 1, //1代表成功,否则失败
"msg": "",
"data": "",
"requestId": ""
}
}
else {
return j;
}
}
}
catch (error) {
return system.getResultError(error);
}
}
}
module.exports = new TxHandler();
// (async ()=>{
// var task = new TxHandler();
// var d = await task.userService.getBizUserForDelivery("16512345678","公司宝","公司注册","sv_business_registration_category_limited1","北京");
// console.log("ddddddddddddd");
// console.log(JSON.stringify(d));
// console.log("dddddddddddddd");
// })()
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class CompanyService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(CompanyService));
}
async getMyApps (appids, isSuper) {
let appsrtn = null
if (isSuper) {
appsrtn = await this.db.models.app.findAll({
where:
{
id: { [this.db.Op.ne]: settings.pmappid }
}
})
} else {
appsrtn = await this.db.models.app.findAll({
where:
{
id: { [this.db.Op.in]: appids }
}
})
}
return appsrtn
}
async bindApps (appids, companyid) {
var self = this
return this.db.transaction(async function (t) {
let u = await self.dao.update({ appids: appids, id: companyid }, t)
return appids
})
}
buildNoPositionNode (treejson, rtnArray) {
treejson.forEach((n) => {
if (n.children) {
this.buildNoPositionNode(n.children, rtnArray)
}
if (typeof n.isPosition == "undefined") {
rtnArray.push(n)
} else {
if (!n.isPosition) {
rtnArray.push(n)
}
}
})
}
async getWatchOrgNodes (cmid) {
let rtn = []
let companynew = await this.findById(cmid)
let orgjsonstr = companynew.orgJson
if (orgjsonstr && orgjsonstr != "") {
let treejson = JSON.parse(companynew.orgJson)
this.buildNoPositionNode(treejson, rtn)
}
return rtn
}
async setOrgs (p, cmk) {
var self = this
let curNodeData = p.curdata
let opathstr = curNodeData.orgpath
let oldNodeData = p.olddata//老的节点数据
let strjson = JSON.stringify(p.orgJson)
p.id = p.company_id
p.orgJson = strjson
let oldopath = ''
if (!oldNodeData) {//如果不传老对象,表示当前操作是删除节点操作,检查是否存在用户,如果已经存在
//那么就提示不能删除
let us = await self.db.models.user.findOne({ where: { opath: { [self.db.Op.like]: `%${opathstr}%` } } })
if (us) {
let companytmp = await this.dao.model.findOne({ where: { id: p.company_id } });
return { orgJson: JSON.parse(companytmp.orgJson) }
} else {
let u = await this.dao.update(p)
let companytmp = await this.dao.model.findOne({ where: { id: p.company_id } });
return { orgJson: JSON.parse(companytmp.orgJson) }
}
} else {
oldopath = oldNodeData.orgpath == '' ? '123456' : oldNodeData.orgpath
}
return this.db.transaction(async function (t) {
//更新组织机构
let u = await self.dao.update(p, t)
//更新,还得传输当前节点,查询出当前节点的角色
//按照当前节点的opath查询出所有的用户,更新这些用户的角色信息
if (curNodeData) {
if (curNodeData.isPosition) {
let us = await self.db.models.user.findAll({ where: { opath: { [self.db.Op.like]: `%${oldopath}%` } }, transaction: t })
//查询出角色
let roleids = curNodeData.roles
// let rs=await self.db.models.role.findAll({where:{id:{[self.db.Op.in]:roleids},app_id:p.app_id,company_id:p.company_id},transaction:t})
//需要添加访客角色
if (roleids && roleids.length > 0) {
if (roleids.indexOf(settings.pmroleid["pr"]) < 0) {
roleids.push(settings.pmroleid["pr"])
}
}
let rs = await self.db.models.role.findAll({ where: { id: { [self.db.Op.in]: roleids } }, transaction: t })
for (let u of us) {
await u.setRoles(rs, { transaction: t })
//if (opathstr != oldopath) {
u.opath = opathstr + "/" + u.userName
u.ptags = curNodeData.ptags
u.save({ transaction: t })
// }
//令用户缓存失效
await self.cacheManager["UserCache"].invalidate(u.userName)
}
} else {//不是岗位节点,检查修改后的路径是否和原始一致,如果不一致,那么需要查出原始的用户数据
//把原来的路径替换当前新的code
if (opathstr != oldopath) {
let us2 = await self.db.models.user.findAll({ where: { opath: { [self.db.Op.like]: `%${oldopath}%` } }, transaction: t })
for (let u of us2) {
let curpath = u.opath
let newpath = curpath.replace(oldNodeData.code, curNodeData.code)
u.opath = newpath
u.save({ transaction: t })
//令用户缓存失效
await self.cacheManager["UserCache"].invalidate(u.userName)
}
}
}
}
let companytmp = await self.dao.model.findOne({ where: { id: p.company_id }, transaction: t });
return { orgJson: JSON.parse(companytmp.orgJson) }
})
}
}
module.exports = CompanyService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
const settings=require("../../../../config/settings");
class MetaService extends ServiceBase{
constructor(){
super("common",ServiceBase.getDaoName(MetaService));
this.restS=system.getObject("util.restClient");
}
async getApiDoc(appid){
var p=settings.basepath+"/app/base/db/impl/common/apiDocManager.js";
var ClassObj= require(p) ;
var obj=new ClassObj();
return obj.doc;
}
async getApiDocRemote(appid,docUrl){
var rtn=await this.restS.execPost({}, docUrl);
if(rtn.stdout){
var dod=JSON.parse(rtn.stdout);
if(dod.data){
return dod.data;
}
}
return null;
}
async getUiConfig(appid){
const cfg=await this.cacheManager["UIConfigCache"].cache(appid,null,60);
return cfg;
}
async getRemoteUiConfig(appkey,uiconfigUrl){
const cfg=await this.cacheManager["UIRemoteConfigCache"].cache(appkey,null,120,uiconfigUrl);
return cfg;
}
}
module.exports=MetaService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
class PathtomethodService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(PathtomethodService));
}
}
module.exports = PathtomethodService;
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
class PluginService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(AppService));
this.userS = system.getObject("service.auth.userSve");
}
}
module.exports = PluginService;
// (async ()=>{
// let u=new AppService();
// // let x=await u.cregister("jiangong")
// // console.log(x)
// // let x=await u.cunregister("jiangong")
// // console.log(x)
// // let t=await u.cmakejwt()
// // console.log(t)
// //let ux=await u.cjsonregister(AppService.newRouteUrl("test-service2"),{name:"test-service2",hosts:["ttest1.com"]})
// //let ux=await u.cjsonregister(AppService.newServiceUrl(),{name:"test-service3",url:"http://zhichan.gongsibao.com"})
// //let ux=await u.cdel(AppService.routeUrl("test-service2"))
// //let ux=await u.cdel(AppService.serviceUrl("test-service2"))
// // let ux=await u.create({name:"test4-service",backend:"zhichan-service",domainName:"domain.com"})
// // console.log(ux);
// // let delrtn=await u.delete({id:2,name:"test4-service"})
// // console.log(delrtn);
// })()
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
class RegionService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(RegionService));
}
}
module.exports = RegionService;
// (async ()=>{
// const fs=require("fs")
// let areaS=new RegionService();
// let rs=await areaS.dao.model.findAll({attributes:['code','name','level']})
// console.log(rs.length)
// let codemap={}
// let resultroot={
// code:"root",
// title:"全国区域",
// orgpath:"root",
// level:-1,
// titlepath:"全国区域",
// seq:0,
// children:[]
// }
// function buildP(r){
// let rtn= {
// code:r.code+"",
// title:r.name,
// level:r.level,
// seq:0,
// orgpath:"",
// titlepath:"",
// children:[]
// }
// return rtn;
// }
// for(let r of rs){
// if(r.level==1){//表示省
// let p=buildP(r)
// codemap[String(r.code)]=p
// resultroot.children.push(p)
// }
// if(r.level==2){
// let pcode=String(r.code).substring(0,2)
// let pnode=codemap[pcode]
// let second=buildP(r)
// codemap[r.code]=second
// pnode.children.push(second)
// }
// if(r.level==3){
// let secodecode=String(r.code).substring(0,4)
// let secodenode=codemap[secodecode]
// let threenode=buildP(r)
// secodenode.children.push(threenode)
// }
// }
// fs.writeFileSync("./a.json",JSON.stringify([resultroot]))
// // let x=await u.cregister("jiangong")
// // console.log(x)
// // let x=await u.cunregister("jiangong")
// // console.log(x)
// // let t=await u.cmakejwt()
// // console.log(t)
// //let ux=await u.cjsonregister(AppService.newRouteUrl("test-service2"),{name:"test-service2",hosts:["ttest1.com"]})
// //let ux=await u.cjsonregister(AppService.newServiceUrl(),{name:"test-service3",url:"http://zhichan.gongsibao.com"})
// //let ux=await u.cdel(AppService.routeUrl("test-service2"))
// //let ux=await u.cdel(AppService.serviceUrl("test-service2"))
// // let ux=await u.create({name:"test4-service",backend:"zhichan-service",domainName:"domain.com"})
// // console.log(ux);
// // let delrtn=await u.delete({id:2,name:"test4-service"})
// // console.log(delrtn);
// })()
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
class RouteService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(RouteService));
}
//创建应用
//每个应用建立两个路由,一个api路由
//对api路由启用jwt插件
async create(serviceName, routedata, req) {
var self = this;
return this.db.transaction(async function (t) {
var rtn=null;
try {
//添加路由
let routeobj = await self.cjsonregister(RouteService.newRouteUrl(serviceName), { name: routedata.name, hosts: routedata.hosts, paths: routedata.paths, strip_path: routedata.isstrip })
routedata.center_id = routeobj.id;
rtn = await self.dao.create(routedata, t);
} catch (e) {
console.log(e)
await self.cdel(RouteService.routeUrl(routedata.name));
}
return rtn;
});
}
async delete(qobj) {
var self = this;
return this.db.transaction(async function (t) {
let a=await self.dao.delete(qobj,t);
await self.cdel(RouteService.routeUrl(a.name));
return a
});
}
async findAndCountAll(obj) {
var self = this;
const apps = await super.findAndCountAll(obj);
return apps;
}
}
module.exports = RouteService;
// (async ()=>{
// let u=new AppService();
// // let x=await u.cregister("jiangong")
// // console.log(x)
// // let x=await u.cunregister("jiangong")
// // console.log(x)
// // let t=await u.cmakejwt()
// // console.log(t)
// //let ux=await u.cjsonregister(AppService.newRouteUrl("test-service2"),{name:"test-service2",hosts:["ttest1.com"]})
// //let ux=await u.cjsonregister(AppService.newServiceUrl(),{name:"test-service3",url:"http://zhichan.gongsibao.com"})
// //let ux=await u.cdel(AppService.routeUrl("test-service2"))
// //let ux=await u.cdel(AppService.serviceUrl("test-service2"))
// // let ux=await u.create({name:"test4-service",backend:"zhichan-service",domainName:"domain.com"})
// // console.log(ux);
// // let delrtn=await u.delete({id:2,name:"test4-service"})
// // console.log(delrtn);
// })()
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
class TreeArchService extends ServiceBase {
constructor() {
super("common", ServiceBase.getDaoName(TreeArchService));
}
async getRegions () {
let rs = await this.dao.model.findAll({ attributes: ['regionJSON'] })
return JSON.parse(rs[0].regionJSON)
}
async getSysArchJSON () {
let rs = await this.dao.model.findAll({ attributes: ['sysArchJSON'] })
return JSON.parse(rs[0].sysArchJSON)
}
async saveSysArchJSON (sysArchJSON, p) {
var self = this
return this.db.transaction(async function (t) {
let rs = await self.dao.model.findAll({ transaction: t })
let upobj = rs[0]
upobj.sysArchJSON = JSON.stringify(sysArchJSON)
upobj.save({ transaction: t })
//节点删除,判断是否有子,如果有不能删除
if (!p.olddata) {//表示当卡删除节点动作
let at = await self.db.models.article.findOne({ where: { archpath: p.curdata.orgpath }, transaction: t })
// if (at) {
// }
}
if (p.olddata && p.olddata.orgpath != p.curdata.orgpath) {//如果路径编码修改了
let ats = await self.db.models.article.findAll({ where: { archpath: p.olddata.orgpath }, transaction: t })
for (let at of ats) {
at.archpath = p.curdata.orgpath
await at.save({ transaction: t })
}
}
return sysArchJSON
})
}
async saveRegions (regionJson) {
let rs = await this.dao.model.findAll()
let upobj = rs[0]
upobj.regionJSON = JSON.stringify(regionJson)
upobj.save()
return regionJson
}
async getProductcats () {
let rs = await this.dao.model.findAll({ attributes: ['productcatJSON'] })
return JSON.parse(rs[0].productcatJSON)
}
async saveProductcats (productcatJson) {
let rs = await this.dao.model.findAll()
let upobj = rs[0]
upobj.productcatJSON = JSON.stringify(productcatJson)
upobj.save()
return productcatJson
}
// async itetree(jsontree, level, results) {
// jsontree.forEach(item => {
// if (item.level < level) {
// let cloneobj = { ...item }
// if (results) {
// results.push(cloneobj)
// }
// if (item.children) {
// cloneobj.children = []
// itetree(item.children, level, cloneobj.children)
// }
// } else {
// if (results) {
// results.push(cloneobj)
// }
// }
// })
// }
findNodeByCode (jsontree, code, results) {
jsontree.forEach(item => {
if (item.code == code) {
if (item.children) {
item.children.forEach(c => {
let tmp = { ...c }
tmp.loading = false
if (tmp.children) {
tmp.children = []
}
results.push(tmp)
})
//this.findNodeByCode(item.children, code, results)
}
} else {
if (item.children) {
this.findNodeByCode(item.children, code, results)
}
}
})
}
async getTreeArchByCode (archName, code) {
let results = []
let rs = await this.dao.model.findAll({ attributes: [archName] })
let jsontree = JSON.parse(rs[0][archName])
this.findNodeByCode(jsontree, code, results)
console.log(results)
return results;
}
/**
* 按照字段和及级别读取树部分节点
* @param {*} archName
* @param {*} level
*/
// async getTreeArchs(archName, level) {
// let results = []
// let rs = await this.dao.model.findAll({ attributes: [archName] })
// let jsontree = JSON.parse(rs[0].[archName])
// await this.itetree(jsontree, level, results)
// console.log(results)
// return results;
// }
}
module.exports = TreeArchService;
// (async ()=>{
// const fs=require("fs")
// let treeS=new TreeArchService();
// let s= fs.readFileSync("./a.json")
// await treeS.dao.model.create({id:1,regionJSON:s})
// console.log("insert ok.....")
// // let x=await u.cregister("jiangong")
// // console.log(x)
// // let x=await u.cunregister("jiangong")
// // console.log(x)
// // let t=await u.cmakejwt()
// // console.log(t)
// //let ux=await u.cjsonregister(AppService.newRouteUrl("test-service2"),{name:"test-service2",hosts:["ttest1.com"]})
// //let ux=await u.cjsonregister(AppService.newServiceUrl(),{name:"test-service3",url:"http://zhichan.gongsibao.com"})
// //let ux=await u.cdel(AppService.routeUrl("test-service2"))
// //let ux=await u.cdel(AppService.serviceUrl("test-service2"))
// // let ux=await u.create({name:"test4-service",backend:"zhichan-service",domainName:"domain.com"})
// // console.log(ux);
// // let delrtn=await u.delete({id:2,name:"test4-service"})
// // console.log(delrtn);
// })()
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const moment = require("moment");
class MsgService extends ServiceBase {
constructor() {
super("msg", ServiceBase.getDaoName(MsgService));
this.msguserDao = system.getObject("db.msg.msguserDao");
}
async create(pobj, qobj, req) {
let {
msgType, app_id, app_key, sender, sender_id, title,
content, jump_address, other, target, company_id
} = pobj;
let msg = {
msgType,
app_id,
app_key,
sender: sender,
sender_id: sender_id,
title,
content,
jump_address,
other,
company_id
}
return this.db.transaction(async (t) => {
const msgData = await this.dao.create(msg, t);
if (msgType !== system.Msg.SYS && Object.prototype.toString.call(target) === '[object Object]') {
await this.msguserDao.create({
user_id: target.id,
user: target.name,
msg_id: msgData.id
}, t);
}
if (msgType !== system.Msg.SYS && Object.prototype.toString.call(target) === "[object Array]") {
let msgusers = [];
for (let val of target) {
msgusers.push({
user_id: val.id,
user: val.name,
msg_id: msgData.id
})
}
await this.msguserDao.bulkCreate(msgusers, t);
}
return 'SUCCESS'
})
}
async findRemindMessage(pobj, qobj, req) {
let { userid } = pobj;
const msgData = await this.msguserDao.findAll({
user_id: userid,
is_remind: false
}, [
{
model: this.db.models.msg,
where: {
is_undo: false
},
}
]);
const ids = msgData.map(item => item.id)
if (ids.length > 0) {
this.msguserDao.updateByWhere({
is_remind: true
}, {
id: {
$in: ids
}
});
}
return msgData;
}
async findUnreadCount(pobj, qobj, req) {
let { userid, is_read } = pobj;
const msgCount = await this.msguserDao.findCount({
where: {
user_id: userid,
is_read
}, include: [
{
model: this.db.models.msg,
where: {
is_undo: false
},
attributes: ["id"]
}
]
});
return { count: msgCount };
}
async updateStatus(pobj, qobj, req) {
let { id, userid, all } = pobj;
let where = {
is_read: false,
user_id: userid
};
if (!all) {
where.id = id
}
await this.msguserDao.updateByWhere({
is_read: true
}, where);
return "SUCESS"
}
async findSystemMsgCount(pobj, qobj, req) {
let { type, company_id } = pobj;
let where = {
msgType: system.Msg.SYS,
is_undo: false,
company_id: {
$in: [1, company_id]
}
}
if (type === "recently") {
// 查询 三天内的
where.created_at = {
$between: [
moment().subtract('days', 3).endOf('day').format('YYYY-MM-DD HH:mm:ss'),
moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
}
}
const msgCount = await this.dao.findCount({
where
});
return { count: msgCount };
}
async groupCount(pobj, qobj, req) {
let { userid } = pobj;
let [read, unRead, system] = await Promise.all(
[
this.findUnreadCount({ userid, is_read: true }),
this.findUnreadCount({ userid, is_read: false }),
this.findSystemMsgCount({ type: "all" })
]
);
return {
read: read.count, unRead: unRead.count, system: system.count
}
}
async list(pobj, qobj, req) {
let { userid, msgType, pageSize = 10, pageNo = 1, company_id } = pobj;
let msgData = [];
let other = {
limit: pageSize,
offset: (pageNo - 1) * pageSize,
order: [["created_at", "DESC"]]
};
if (["readed", "unread"].includes(msgType)) {
msgData = await this.msguserDao.findAll({
user_id: userid,
is_read: msgType === "readed"
}, [
{
model: this.db.models.msg,
where: {
is_undo: false
}
}
], other);
}
if (msgType === "sys") {
msgData = await this.dao.findAll({
msgType: system.Msg.SYS,
is_undo: false,
company_id: {
$in: [1, company_id]
}
}, [], other);
msgData = msgData.map(item => {
return {
msg: item
}
})
}
return msgData;
}
}
module.exports = MsgService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class MsgHistoryService extends ServiceBase{
constructor(){
super(ServiceBase.getDaoName(MsgHistoryService));
this.msgnoticeDao = system.getObject("db.msg.msgnoticeDao");
this.userDao = system.getObject("db.auth.userDao");
this.redisClient = system.getObject("util.redisClient");
}
async saveMsg(msg) {
var self = this;
console.log("save msg ", msg);
// 事务
await this.db.transaction(async function (t){
// 1.保存聊天信息
msg = await self.dao.create(msg, t);
// 2.保存好友信息
await self.msgnoticeDao.saveNotice(msg, t);
});
return msg;
}
async pushBusinessLicenseMsg(senderId, targetId, businessLicense_id) {
if(!businessLicense_id) {
return 0;
}
var notice = await this.msgnoticeDao.findOne({fromId : senderId, toId : targetId});
if(notice && notice.businessLicense_id == businessLicense_id) {
return 0;
}
var senderUser = await this.userDao.findById(senderId);
var targetUser = await this.userDao.findById(targetId);
var senderChannel = senderUser.app_id + "¥" + senderUser.id;
var targetChannel = targetUser.app_id + "¥" + targetUser.id;
var sender = senderUser.app_id + "¥" + senderUser.id + "¥" + senderUser.headUrl;
var target = targetUser.app_id + "¥" + targetUser.id + "¥" + targetUser.headUrl;
var msg = {
msgType: "mryzLicense",
sender:sender,
senderId:senderId,
target:target,
targetId:targetId,
content:businessLicense_id,
isRead:false,
businessLicense_id:businessLicense_id
}
var obj = await this.saveMsg(msg);
var bl = await this.businesslicenseDao.findById(businessLicense_id);
msg.businessLicense = bl;
msg.id = obj.id;
msg.created_at = obj.created_at;
this.redisClient.publish(senderChannel, JSON.stringify(msg));
this.redisClient.publish(targetChannel, JSON.stringify(msg));
return 1;
}
async getChatList(senderId, targetId, maxId, pageSize) {
let sql = "SELECT * FROM `msghistory` WHERE id < :maxId AND ((senderId = :senderId AND targetId = :targetId) OR (targetId = :senderId AND senderId = :targetId)) ORDER BY id DESC LIMIT :pageSize "
let params = {senderId:senderId, targetId: targetId, maxId: maxId, pageSize: pageSize};
var list = await this.dao.customQuery(sql, params);
if(!list || list.length == 0) {
return [];
}
var licenseIds = [];
var msgIds = [];
list.forEach(item => {
if(item.msgType == 'mryzLicense') {
licenseIds.push(Number(item.businessLicense_id));
}
msgIds.push(item.id);
});
if(licenseIds.length > 0) {
let licenseSql = "SELECT * FROM yz_business_license WHERE id IN (" + licenseIds.join(",") + ") ";
var licenseList = await this.businesslicenseDao.customQuery(licenseSql);
var licenseMap = [];
licenseList.forEach(item => {
licenseMap["id" + item.id] = item;
});
list.forEach(item => {
if(item.msgType == 'mryzLicense') {
item.businessLicense = licenseMap['id' + item.businessLicense_id];
}
});
}
var self = this;
setTimeout(function(){
self.setRead(senderId, targetId, list);
}, 1000);
return list;
}
async setRead(senderId, targetId, list) {
if(!list || list.length == 0) {
return;
}
var target = await this.userDao.findById(targetId);
if(!target) {
return;
}
var pushIds = [];
for(var item of list) {
if(item.isRead || senderId != item.targetId) {
continue;
}
pushIds.push(item.id);
}
if(pushIds.length == 0) {
return;
}
this.dao.updateByWhere({isRead: true}, {where:{id:{[this.db.Op.in]:pushIds}}});
var channel = target.app_id + "¥" + target.id;
var rs = await this.redisClient.publish(channel, JSON.stringify({type:"readmsg", data : pushIds}));
console.log(rs, "------------------------------------------ publish result ");
}
async readMsg(userId, id) {
var msg = await this.dao.findById(id);
if(!msg || userId != msg.targetId) {
return 0;
}
msg.isRead = true;
await msg.save();
var user = await this.userDao.findById(msg.senderId);
if(!user) {
return 0;
}
var channel = user.app_id + "¥" + user.id;
return await this.redisClient.publish(channel, JSON.stringify({type:"readmsg", data : [msg.id]}));
}
}
module.exports=MsgHistoryService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
class MsgNoticeService extends ServiceBase {
constructor() {
super(ServiceBase.getDaoName(MsgNoticeService));
this.userDao = system.getObject("db.auth.userDao");
this.msghistoryDao = system.getObject("db.msg.msghistoryDao");
}
getApp(appkey) {
return this.cacheManager["AppCache"].cacheApp(appkey);
}
async getUserList(userId) {
var list = await this.dao.model.findAll({
where: {
fromId: userId
},
order: [
["updated_at", "DESC"]
],
raw: true
});
if (!list || list.length == 0) {
return [];
}
var msgIds = [];
var businessLicenseIds = [];
var userIds = [];
for (var item of list) {
msgIds.push(item.lastMsgId);
businessLicenseIds.push(item.businessLicense_id);
userIds.push(item.toId);
}
var msgMap = [];
var businessLicenseMap = [];
var userMap = [];
var unreadMap = [];
// 最后一条聊天记录
if (msgIds.length > 0) {
var msgList = await this.msghistoryDao.customQuery("SELECT * FROM msghistory WHERE id IN (" + msgIds.join(",") + ") ");
msgList.forEach(item => {
msgMap["id" + item.id] = item;
});
}
// 最后一次聊天关联执照
if (businessLicenseIds.length > 0) {
var licenseList = await this.businesslicenseDao.customQuery("SELECT * FROM yz_business_license WHERE id IN (" + businessLicenseIds.join(",") + ") ");
var serviceTypeIds = [];
for (var item of licenseList) {
serviceTypeIds.push(item.serviceTypeOneId);
serviceTypeIds.push(item.serviceTypeTwoId);
}
if (serviceTypeIds.length > 0) {
var sql = "SELECT id, name FROM `p_service_type` WHERE id IN (" + serviceTypeIds.join(",") + ") ";
var typeList = await this.dao.customQuery(sql);
var typeMap = [];
if (typeList && typeList.length > 0) {
for (var t of typeList) {
typeMap["type_id_" + t.id] = t.name;
if (t.id == item.serviceTypeOneId) {
item.serviceTypeOneName = t.name;
} else if (t.id == item.serviceTypeTwoId) {
item.serviceTypeTwoName = t.name;
} else {}
}
}
}
for (var item of licenseList) {
item.serviceTypeOneName = typeMap["type_id_" + item.serviceTypeOneId];
item.serviceTypeTwoName = typeMap["type_id_" + item.serviceTypeTwoId];
}
licenseList.forEach(item => {
businessLicenseMap["id" + item.id] = item;
});
}
// 聊天好友用户信息
if (userIds.length > 0) {
var userList = await this.userDao.customQuery("SELECT * FROM p_user WHERE id IN (" + userIds.join(",") + ") ");
userList.forEach(item => {
userMap["id" + item.id] = item;
});
}
// 未读消息数量
var unreadList = await this.userDao.customQuery("SELECT senderId, COUNT(1) AS num FROM `msghistory` WHERE isRead = 0 AND targetId = " + userId + " GROUP BY senderId ");
unreadList.forEach(item => {
unreadMap["id" + item.senderId] = item.num;
});
var rs = [];
for (var i in list) {
var item = list[i];
item.lastMsg = msgMap["id" + item.lastMsgId];
item.businessLicense = businessLicenseMap["id" + item.businessLicense_id];
item.friend = userMap["id" + item.toId];
item.unreadCount = unreadMap["id" + item.toId] || 0;
rs.push(item);
}
return rs;
}
async countUnread(userId) {
debugger;
var unreadList = await this.userDao.customQuery("SELECT COUNT(1) AS num FROM `msghistory` WHERE isRead = 0 AND targetId = " + userId);
var count = 0;
if (unreadList && unreadList.length > 0) {
count = unreadList[0].num || 0;
}
return count;
}
}
module.exports = MsgNoticeService;
\ No newline at end of file
[{"id":41,"price_code":"sv_business_registration_category_indi7","product_name":"/ic/cpreg/","price_name":"个体工商","created_at":null,"updated_at":null,"deleted_at":null,"version":null},{"id":42,"price_code":"sv_business_registration_category_lp7","product_name":"/ic/cpreg/","price_name":"有限公司","created_at":null,"updated_at":null,"deleted_at":null,"version":null},{"id":43,"price_code":"sv_business_registration_category_sole7","product_name":"/ic/cpreg/","price_name":"个人独资","created_at":null,"updated_at":null,"deleted_at":null,"version":null}]
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
const fs = require("fs")
class PricestrategyService extends ServiceBase {
constructor() {
super("product", ServiceBase.getDaoName(PricestrategyService));
}
async buildPriceStrategy(pricetypes) {
let dks = []
let codeattr=[]
let pricetypenames=[]
pricetypes.forEach(item => {
dks.push(item.options.split(","))
codeattr.push(item.code)
pricetypenames.push(item.name)
})
let codeunion=codeattr.join("~")
//先按照codeunion检查是否已经生成
let se=await this.dao.findOne({codeunion:codeunion})
if(se!=null){
return {status:-1,msg:'定价策略已经存在,无需再次生成'}
}
let nameunion=pricetypenames.join("~")
let dkresults=this.makedks(dks)
let strategys=[]
for(let dk of dkresults){
let tmp={
"codeunion":codeunion,
"nameunion":nameunion,
"optionunion":dk.split("|").join(",")
}
strategys.push(tmp)
}
var self=this;
return this.db.transaction(async function (t) {
let r=await self.dao.bulkCreate(strategys,t)
return {status:0};
});
}
makedks(rows) {
var mid = []
if(rows.length==1){
mid=rows[0]
return mid
}
for (let i = 0; i < rows.length; i++) {
if (mid.length == 0) {
console.log("in..........")
let one = rows[i]
let two = rows[++i]
console.log(two, "..........")
one.forEach(item => {
two.forEach(c => {
mid.push(item + "|" + c)
})
})
} else {
let next = rows[i]
let tmparray = []
mid.forEach(m => {
next.forEach(n => {
tmparray.push(m + "|" + n)
})
})
mid = tmparray
}
}
return mid;
}
}
module.exports = PricestrategyService;
// (async ()=>{
// let u=new AppService();
// // let x=await u.cregister("jiangong")
// // console.log(x)
// // let x=await u.cunregister("jiangong")
// // console.log(x)
// // let t=await u.cmakejwt()
// // console.log(t)
// //let ux=await u.cjsonregister(AppService.newRouteUrl("test-service2"),{name:"test-service2",hosts:["ttest1.com"]})
// //let ux=await u.cjsonregister(AppService.newServiceUrl(),{name:"test-service3",url:"http://zhichan.gongsibao.com"})
// //let ux=await u.cdel(AppService.routeUrl("test-service2"))
// //let ux=await u.cdel(AppService.serviceUrl("test-service2"))
// // let ux=await u.create({name:"test4-service",backend:"zhichan-service",domainName:"domain.com"})
// // console.log(ux);
// // let delrtn=await u.delete({id:2,name:"test4-service"})
// // console.log(delrtn);
// })()
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
class ProductService extends ServiceBase {
constructor() {
super("product", ServiceBase.getDaoName(ProductService));
this.priceDao = system.getObject("db.product.productpriceDao")
}
async findPriceStrategys (stragetyids, t) {
//按照策略id查询出定价策略集合
let pts = await this.db.models.pricestrategy.findAll({ where: { id: { [this.db.Op.in]: stragetyids } }, attributes: ['id', 'optionunion'], transaction: t })
let tmpdic = {}
pts.forEach(p => {
tmpdic[p.id + ''] = p.optionunion
})
return tmpdic
}
async create (p) {
if (!p.name || p.name == "") {
p.name = p.productcatpath + "~" + p.regionpath
}
//策略ids
let stragetyids = p.sts
let skucodemap = p.skucodemap
var self = this;
return this.db.transaction(async function (t) {
let pnew = await self.dao.create(p, t)
let productprices = []
//按照策略id查询出定价策略集合
let tmpdic = await self.findPriceStrategys(stragetyids, t)
stragetyids.forEach(stragetyid => {
if (skucodemap) {
p.skucode = skucodemap[stragetyid]
}
let pps = {
product_id: pnew.id,
pricestrategy_id: stragetyid,
pname: p.name,
strategyitems: tmpdic[stragetyid + ''],
company_id: p.company_id,
skucode: p.skucode ? p.skucode : self.getUUID(),
skuname: p.skuname ? p.skuname : p.name,
sptags: p.sptags,
channeltags: p.channeltags
}
productprices.push(pps)
})
await self.priceDao.bulkCreate(productprices, t)
return pnew;
});
}
async update (p) {
if (!p.name || p.name == "") {
p.name = p.regionpath + "~" + p.productcatpath
}
//策略ids
let stragetyids = p.sts
var self = this;
return this.db.transaction(async function (t) {
let pupdate = await self.dao.update(p, t)
//先按照产品id检查出当前产品的价格策略,检查出不在传入中的,需要删除
//在传入中的不做处理
let currentProduct = await self.dao.model.findOne({
where: { id: p.id }, include: [
{ model: self.db.models.productprice, as: "skus", attributes: ['id', 'pricestrategy_id'], raw: true },
], transaction: t
})
let notInInput = []//需要删除
let skusarray = []
currentProduct.skus.forEach(sku => {
skusarray.push(sku.pricestrategy_id)
if (stragetyids.indexOf(sku.pricestrategy_id) < 0) {
notInInput.push(sku.id)
}
})
//删除
if (notInInput.length > 0) {
await self.priceDao.bulkDelete(notInInput, t)
}
//传入不在查出中的,需要新增
let notintables = []
stragetyids.forEach(st => {
if (skusarray.indexOf(st) < 0) {
notintables.push(st)
}
})
//新增
let productprices = []
let tmpdic = await self.findPriceStrategys(stragetyids, t)
notintables.forEach(stragetyid => {
let pps = {
product_id: p.id,
pricestrategy_id: stragetyid,
pname: p.name,
strategyitems: tmpdic[stragetyid + ''],
company_id: p.company_id,
skucode: self.getUUID(),
skuname: p.name,
}
productprices.push(pps)
})
if (productprices.length > 0) {
await self.priceDao.bulkCreate(productprices, t)
}
return currentProduct;
});
}
}
module.exports = ProductService;
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
class ProductpriceService extends ServiceBase {
constructor() {
super("product", ServiceBase.getDaoName(ProductpriceService));
}
async findCostBySkuCode (skucode) {
let productpricetmp = await this.dao.model.findOne({
where: { skucode: skucode, isEnabled: true },
include: [
{ model: this.db.models.productcost, where: { expensetype: 'service' }, as: "costs", attributes: ['id', 'expensetype', 'costamount'] }
],
raw: true,
}
)
let costAmount = 0
//获取服务费成本
if (productpricetmp && productpricetmp['costs.costamount']) {
costAmount = Number(productpricetmp['costs.costamount'])
} else {
console.log("skucode not find product:", skucode)
}
return costAmount
}
/**
* @param {*} pname 产品名称
* @param {*} spname 服务商名称
*/
async findRegionsByProductName (productname, spname) {
let ps = await this.dao.model.findAll({
where: {
sptags: { [this.db.Op.like]: "%" + spname + "%" },
pname: { [this.db.Op.like]: "%" + productname + "%" },
isEnabled: true
}, attributes: ['pname', 'strategyitems'], raw: true
})
//查询出地区
let rs = await this.db.models.region.findAll({ attributes: ['code', 'name'], raw: true })
//获取地区JSON 对象
let psrtn = []
let cacheregions = {}
ps.forEach(r => {
let rpathstr = r.pname.split("~")[1]
let rpatharray = rpathstr.split("/")
let lstindex = rpatharray.length - 1
let regionName = rpatharray[lstindex]
let regioninfo = {}
regioninfo["label"] = regionName
let exAttrTmp = r.strategyitems
//按照名字去取地区编码
let areainfos = rs.filter(f => {
if (f.name.indexOf(regionName) >= 0) {
return true
} else {
return false
}
})
let codeval = String(areainfos[0].code).padEnd(6, '0')
if ((productname.indexOf("icp") < 0 && productname.indexOf("edi") < 0) && (areainfos[0].name.indexOf("天津") >= 0 || areainfos[0].name.indexOf("北京") >= 0 || areainfos[0].name.indexOf("上海") >= 0 || areainfos[0].name.indexOf("重庆") >= 0)) {
codeval = String(areainfos[0].code + "01").padEnd(6, '0')
}
if (!cacheregions[codeval]) {
cacheregions[codeval] = regioninfo
regioninfo["code"] = codeval
regioninfo["exAttr"] = [exAttrTmp]
psrtn.push(regioninfo)
} else {
let cacheObj = cacheregions[codeval]
cacheObj["exAttr"].push(exAttrTmp)
}
})
return psrtn
}
async updownProduct (uid) {
let p = await this.dao.findById(uid)
p.isEnabled = !p.isEnabled
await p.save()
return {}
}
}
module.exports = ProductpriceService;
// let p=new ProductpriceService()
// p.findRegionsByProductName("个体户注册","gao").then((res)=>{
// console.log(res)
// })
\ No newline at end of file
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const fs=require("fs")
class XProductService extends ServiceBase {
constructor() {
super("xproduct", ServiceBase.getDaoName(XProductService));
}
async buildProductCat() {
let ps = await this.dao.model.findAll({ raw: true })
return ps
}
}
module.exports = XProductService;
function findTitlePath(items, findstr, results) {
items.forEach(item => {
if (item.title.indexOf(findstr) < 0) {
if (item.children && item.children.length > 0) {
return findTitlePath(item.children, findstr, results)
}
} else {
results.push(item.titlepath)
return
}
})
}
(async () => {
let ps = new XProductService()
let ts = system.getObject("service.common.treearchSve")
let products = []
let res = await ps.buildProductCat();
let rs = await ts.getRegions()
let tags=[]
for(let xp of res){
let product = {}
product.code = xp.path_code + xp.id
results = []
//findTitlePath(rs, xp.region_name, results)
if(results.length==0 || !results[0]){
fs.writeFileSync("./a.txt",xp.region_name)
}
//product.regionpath = results[0]//反查国家标准地区名称
product.regionpath=xp.region_name
product.productcatpath = "产品分类" + xp.path_name
product.name = product.productcatpath + "~" + product.regionpath
product.sptags = xp.servicer_name
product.channeltags="腾讯"
product.desc=product.name
product.company_id=1
//构造策略ids
let stsinfos = await ps.db.models.xproductprice.findAll({ where:{product_name:xp.path_code},raw: true })
if(xp.region_name=="重庆" && xp.path_code=="/ic/cpreg/"){
fs.writeFileSync("./b.txt",JSON.stringify(stsinfos))
}
let straid=[]
let skucodemap={}
for(let stinfo of stsinfos){
let tg=stinfo.price_name.replace("EDI","").replace("ICP","").replace("(",",").replace(")","").replace("章","").replace("完成","").replace("\t\r\n","").replace("天","工作日")
//按照price_name去策略表中查询策略id
let strategy=await ps.db.models.pricestrategy.findOne({where:{optionunion:tg}})
if(!strategy){
tags.push(tg)
strategy=await ps.db.models.pricestrategy.findOne({where:{optionunion:"通用"}})
}
straid.push(strategy.id)
skucodemap[strategy.id]=stinfo.price_code
}
//
// console.log(stsinfos.length,"..................")
product.sts=straid
product.skucodemap=skucodemap
products.push(product)
}
let productS=system.getObject("service.product.productSve")
for(let p of products){
await productS.create(p)
}
console.log(JSON.stringify(tags))
// { id: 128,
// path_code: '/ic/gsreg/'+id,----->code
// path_name: '/工商服务/公司注册/',+产品分类---->productcatpath
// region_id: '320400',
// region_name: '常州'}--->regionpath
//通过region_name--解析出regionpath
//path_name--添加“产品分类”
//code,regionpath,productcatpath,name
// let treedata={}
// res.forEach(item=>{
// let pathcodes=item.path_code.split("/")
// let pathnames=item.path_name.split("/")
// let pathcoderesults=pathcodes.slice(1,3)
// let pathnameresults=pathnames.slice(1,3)
// let codekey=pathcoderesults[0]
// if(!treedata[codekey]){
// let tmp={}
// tmp["code"]=pathcoderesults[0]
// tmp["title"]=pathnameresults[0]
// tmp["orgpath"]="/"+pathcoderesults[0]
// tmp["titlepath"]="/"+pathnameresults[0]
// tmp.children=[
// {
// code:pathcoderesults[1],
// title:pathnameresults[1],
// orgpath:item.path_code,
// titlepath:item.path_name
// }
// ]
// treedata[codekey]= tmp
// }else{
// let f=treedata[codekey].children.filter(it=>{
// if(it.code==pathcoderesults[1]){
// return true
// }else{
// return false
// }
// })
// if(f.length==0){
// let n={
// code:pathcoderesults[1],
// title:pathnameresults[1],
// orgpath:item.path_code,
// titlepath:item.path_name
// }
// treedata[codekey].children.push(n)
// }
// }
// })
// let root = {
// title: "产品分类",
// code: "root",
// orgpath: "root",
// children: [
// ]
// }
// Object.keys(treedata).forEach(k=>{
// root.children.push(treedata[k])
// })
// console.log(JSON.stringify(root))
}) ()
const system = require("../system");
var moment = require('moment');
const settings = require("../../config/settings");
const uuidv4 = require('uuid/v4');
class ServiceBase {
constructor(gname, daoName) {
//this.dbf=system.getObject("db.connection");
this.db = system.getObject("db.common.connection").getCon();
this.cacheManager = system.getObject("db.common.cacheManager");
console.log(">>>>>>>>>>>>>>..",daoName)
this.daoName = daoName;
this.dao = system.getObject("db." + gname + "." + daoName);
this.restS = system.getObject("util.restClient");
this.md5 = require("MD5");
}
getEncryptStr(str) {
if (!str) {
throw new Error("字符串不能为空");
}
var md5 = this.md5(str + "_" + settings.salt);
return md5.toString().toLowerCase();
}
getUUID() {
var uuid = uuidv4();
var u = uuid.replace(/\-/g, "");
return u;
}
static getDaoName(ClassObj) {
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>..");
let rtnstr=ClassObj["name"].substring(0, ClassObj["name"].lastIndexOf("Service")).toLowerCase() + "Dao";
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>..",rtnstr);
return rtnstr;
}
async findAndCountAll(obj) {
const apps = await this.dao.findAndCountAll(obj);
return apps;
}
async refQuery(pobj) {
return this.dao.refQuery(pobj);
}
async bulkDelete(ids) {
var en = await this.dao.bulkDelete(ids);
return en;
}
async delete(qobj) {
return this.dao.delete(qobj);
}
async create(qobj) {
return this.dao.create(qobj);
}
async update(qobj, tm = null) {
return this.dao.update(qobj, tm);
}
async updateByWhere(setObj, whereObj, t) {
return this.dao.updateByWhere(setObj, whereObj, t);
}
async customExecAddOrPutSql(sql, paras = null) {
return this.dao.customExecAddOrPutSql(sql, paras);
}
async customQuery(sql, paras, t) {
return this.dao.customQuery(sql, paras, t);
}
async findCount(whereObj = null) {
return this.dao.findCount(whereObj);
}
async findSum(fieldName, whereObj = null) {
return this.dao.findSum(fieldName, whereObj);
}
async getPageList(pageIndex, pageSize, whereObj = null, orderObj = null, attributesObj = null, includeObj = null) {
return this.dao.getPageList(pageIndex, pageSize, whereObj, orderObj, attributesObj, includeObj);
}
async findOne(obj) {
return this.dao.findOne(obj);
}
async findById(oid) {
return this.dao.findById(oid);
}
/*
返回20位业务订单号
prefix:业务前缀
*/
async getBusUid(prefix) {
prefix = (prefix || "");
if (prefix) {
prefix = prefix.toUpperCase();
}
var prefixlength = prefix.length;
var subLen = 8 - prefixlength;
var uidStr = "";
if (subLen > 0) {
uidStr = await this.getUidInfo(subLen, 60);
}
var timStr = moment().format("YYYYMMDDHHmm");
return prefix + timStr + uidStr;
}
/*
len:返回长度
radix:参与计算的长度,最大为62
*/
async getUidInfo(len, radix) {
var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');//长度62,到yz长度为长36
var uuid = [], i;
radix = radix || chars.length;
if (len) {
for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
} else {
var r;
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
uuid[14] = '4';
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | Math.random() * 16;
uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
}
}
}
return uuid.join('');
}
//kong统一处理
//统一注册组件
async cformregister(opurl,opts){
try{
let rtn=await system.post3wFormTypeReq(opurl,opts)
console.log(rtn);
if(rtn.statusCode==409){
//return new Error("已经存在相同的统一账号名称!");
return null;
}
if(rtn.statusCode==201){
return rtn.data;
}else{
throw new Error(rtn.data);
}
}catch(e){
console.log(e);
return null;
}
}
async cget(opurl){
let rtn=await system.getReq(opurl)
return rtn;
}
async cjsonregister(opurl,opts){
try{
let rtn=await system.postJsonTypeReq(opurl,opts)
console.log(",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",rtn);
if(rtn.statusCode==409){
//return new Error("已经存在相同的统一账号名称!");
return null;
}
if(rtn.statusCode==201){
return rtn.data;
}else{
throw new Error(rtn.data);
}
return null;
}catch(e){
console.log(e);
return null;
}
}
async cjsonupate(opurl,opts){
try{
let rtn=await system.postJsonTypeReq(opurl,opts,"PATCH")
console.log(",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",rtn);
if(rtn.statusCode==409){
//return new Error("已经存在相同的统一账号名称!");
return null;
}
if(rtn.statusCode==201){
return rtn.data;
}else{
throw new Error(rtn.data);
}
return null;
}catch(e){
console.log(e);
return null;
}
}
async cdel(opurl){
try{
let rtn=await system.delReq(opurl)
if(rtn.statusCode==204){
return {};
}else{
throw new Error(rtn.data);
}
}catch(e){
console.log(e);
return null;
}
}
static bindPluginUrl(rname){
return settings.kongurl()+"routes/"+rname+"/plugins";
}
static newRouteUrl(sname){
return settings.kongurl()+"services/"+sname+"/routes";
}
static newServiceUrl(){
return settings.kongurl()+"services";
}
static newConsumerUrl(){
return settings.kongurl()+"consumers";
}
static newJwtCredUrl(consumername){
return settings.kongurl()+"consumers/"+consumername+"/jwt";
}
static serviceUrl(sname){
return settings.kongurl()+"services/"+sname;
}
static routeUrl(rname){
return settings.kongurl()+"routes/"+rname;
}
static consumerUrl(consumerName){
return settings.kongurl()+"consumers/"+consumerName;
}
}
module.exports = ServiceBase;
var fs = require("fs");
var objsettings = require("../config/objsettings");
var settings = require("../config/settings");
const request = require('request');
const jwk2pem = require('pem-jwk').jwk2pem
const jwt = require('jsonwebtoken')
const CryptoJS = require("crypto-js")
class System {
static declare (ns) {
var ar = ns.split('.');
var root = System;
for (var i = 0, len = ar.length; i < len; ++i) {
var n = ar[i];
if (!root[n]) {
root[n] = {};
root = root[n];
} else {
root = root[n];
}
}
}
/**
* 验证token
* @param {String} token jwt token
* @param {Object} publicKey 公钥
*/
static verify (token, publicKey) {
return jwt.verify(token, jwk2pem(publicKey));
}
static async delReq (url, qdata) {
let rtn = {}
let promise = new Promise(function (resv, rej) {
request.del({
url: url,
qs: qdata
}, function (error, response, body) {
if (!error) {
rtn.statusCode = response.statusCode
if (body) {
let data = JSON.parse(body)
rtn.data = data
} else {
rtn.data = null
}
resv(rtn);
} else {
rej(error)
}
});
})
return promise;
}
static async getReq (url, qdata) {
let rtn = {}
let promise = new Promise(function (resv, rej) {
request.get({
url: url,
json: true,
qs: qdata
}, function (error, response, body) {
if (!error) {
rtn.statusCode = response.statusCode;
if (body) {
rtn.data = body
} else {
rtn.data = null
}
resv(rtn);
} else {
rej(error);
}
});
})
return promise;
}
static async postJsonTypeReq (url, data, md = "POST") {
let rtn = {}
let promise = new Promise(function (resv, rej) {
request({
url: url,
method: md,
json: true,
headers: {
"content-type": "application/json",
},
body: data
}, function (error, response, body) {
if (!error) {
console.log(body);
rtn.statusCode = response.statusCode
if (body) {
rtn.data = body
} else {
rtn.data = null
}
resv(rtn);
} else {
console.log(error)
rej(error)
}
});
})
return promise;
}
static async post3wFormTypeReq (url, data) {
let rtn = {}
let promise = new Promise(function (resv, rej) {
request.post({
url: url,
form: data
}, function (error, response, body) {
if (!error) {
rtn.statusCode = response.statusCode
let data = JSON.parse(body)
rtn.data = data
resv(rtn);
} else {
console.log(error)
rej(error)
}
});
})
return promise;
}
static async postMpFormTypeReq (url, formdata) {
let promise = new Promise(function (resv, rej) {
request.post({
url: url,
formData: formdata
}, function (error, response, body) {
if (!error && response.statusCode == 200) {
resv(body);
} else {
rej(error)
}
});
})
return promise;
}
/**
* 请求返回成功
* @param {*} data 操作成功返回的数据,有值为成功,无值为失败
* @param {*} okmsg 操作成功的描述
* @param {*} req 请求头信息
*/
static getResult (data, opmsg = "操作成功", req) {
return {
status: !data ? -1 : 0,
msg: opmsg,
data: data,
bizmsg: req && req.session && req.session.bizmsg ? req.session.bizmsg : "empty"
};
}
/**
* 请求返回成功
* @param {*} data 操作成功返回的数据
* @param {*} okmsg 操作成功的描述
*/
static getResultSuccess (data, okmsg = "success") {
return {
status: 0,
msg: okmsg,
data: data,
};
}
/**
* 请求返回失败
* @param {*} status 操作失败状态,默认为-1
* @param {*} errmsg 操作失败的描述,默认为fail
* @param {*} data 操作失败返回的数据
*/
static getResultFail (status = -1, errmsg = "fail", data = null) {
return {
status: status,
msg: errmsg,
data: data,
};
}
/**
* 请求处理异常
* @param {*} errmsg 操作失败的描述,默认为fail
* @param {*} data 操作失败返回的数据
*/
static getResultError (errmsg = "fail", data = null) {
return {
status: -200,
msg: errmsg,
data: data,
};
}
static register (key, ClassObj, groupName, filename) {
if (System.objTable[key] != null) {
throw new Error("相同key的对象已经存在");
} else {
let obj;
if (ClassObj.name === "ServiceBase") {
obj = new ClassObj(groupName, filename.replace("Sve", "Dao"));
} else {
obj = new ClassObj(groupName, filename);
}
System.objTable[key] = obj;
}
return System.objTable[key];
}
static getObject (objpath) {
var pathArray = objpath.split(".");
var packageName = pathArray[0];
var groupName = pathArray[1];
var filename = pathArray[2];
var classpath = "";
if (filename) {
classpath = objsettings[packageName] + "/" + groupName;
} else {
classpath = objsettings[packageName];
filename = groupName;
}
var objabspath = classpath + "/" + filename + ".js";
//判断文件的存在性
//如果不存在,需要查看packageName
//如果packageName=web.service,dao
if (System.objTable[objabspath] != null) {
return System.objTable[objabspath];
} else {
var ClassObj = null;
try {
ClassObj = require(objabspath);
} catch (e) {
// console.log(e)
let fname = objsettings[packageName + "base"];
ClassObj = require(fname);
}
if (ClassObj.name == "Dao") {
let modelname = filename.substring(0, filename.lastIndexOf("Dao"))
return System.register(objabspath, ClassObj, modelname);
}
if (ClassObj.name.indexOf("Ctl") >= 0) {
console.log(ClassObj.name);
}
return System.register(objabspath, ClassObj, groupName, filename);
}
}
static getSysConfig () {
var configPath = settings.basepath + "/app/base/db/metadata/index.js";
// if(settings.env=="dev"){
// console.log("delete "+configPath+"cache config");
// delete require.cache[configPath];
// }
delete require.cache[configPath];
var configValue = require(configPath);
return configValue.config;
}
static get_client_ip (req) {
var ip = req.headers['x-forwarded-for'] ||
req.ip ||
req.connection.remoteAddress ||
req.socket.remoteAddress ||
(req.connection.socket && req.connection.socket.remoteAddress) || '';
var x = ip.match(/(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$/);
if (x) {
return x[0];
} else {
return "localhost";
}
}
/**
* 记录日志信息
* @param {*} opTitle 操作的标题
* @param {*} params 参数
* @param {*} identifyCode 业务标识
* @param {*} resultInfo 返回结果
* @param {*} errorInfo 错误信息
*/
static execLogs (opTitle, params, identifyCode, resultInfo, errorInfo) {
var reqUrl = settings.logUrl();
let isLogData = true
if (params.method && (params.method.indexOf("find") >= 0 || params.method.indexOf("get") >= 0)) {
isLogData = false
}
var param = {
actionType: "produceLogsData",// Y 功能名称
actionBody: {
opTitle: opTitle || "",// N 操作的业务标题
identifyCode: identifyCode || "brg-center-manage",// Y 操作的业务标识
indexName: settings.logindex,// Y es索引值,同一个项目用一个值
messageBody: params, //日志的描述信息
resultInfo: isLogData ? resultInfo : { status: resultInfo.status },//返回信息
errorInfo: errorInfo,//错误信息
requestId: resultInfo.requestId || ""
}
};
console.log(JSON.stringify(param))
let P = new Promise((resv, rej) => {
this.postJsonTypeReq(reqUrl, param).then(res => {
if (res.statusCode == 200) {
resv(res.data)
} else {
rej(null)
}
});
})
return P
}
static desEncript (desstr) {
let deskey = '647a68c9-da01-40d3-9763-1ffa0f64cf3f'
var keyHex = CryptoJS.enc.Utf8.parse(deskey);
// direct decrypt ciphertext
var decrypted = CryptoJS.DES.decrypt({
ciphertext: CryptoJS.enc.Base64.parse(desstr)
}, keyHex, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
});
return decrypted.toString(CryptoJS.enc.Utf8);
}
}
Date.prototype.Format = function (fmt) { //author: meizz
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt))
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
System.Msg = {
// "sys": "系统", "single": "单点", "multi": "群发"
SYS: "sys",
SINGLE: "single",
MULTI: "multi"
}
/*
编码说明,
1000----1999 为请求参数验证和app权限验证
2000----2100 为请求用户信息操作验证,如:注册,登录,获取验证码,修改用户信息,修改用户密码
*/
System.objTable = {};
//访问token失效,请重新获取
System.tokenFail = 1000;
//appKey授权有误
System.appKeyError = 1100;
//应用处于待审核等待启用状态
System.waitAuditApp = 1110;
//获取访问token失败
System.getAppInfoFail = 1130;
//已经存在此用户,注册失败
System.existUserRegFail = 2000;
//用户名或密码错误
System.userLoginFail = 2010;
//用户名错误
System.userNameLoginFail = 2020;
//验证验证码错误
System.verifyVCodeFail = 2030;
//opencode存储的值已经失效
System.verifyOpencodeFail = 2040;
//重复操作
System.redoFail = 2050;
module.exports = System;
// (async ()=>{
// try{
// let d=await System.getReq("http://127.0.0.1:8001x/services")
// console.log(d)
// }catch(e){
// console.log(e);
// }
// })()
//System.execLogs("hello",{"opcode":"xxxxx"},"ddfdf",{requestId:'ddds'},null)
// let str = "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImRjMmM1MzMwMjNhMTExZTlhOTU3NjliODBiNDI4Y2QxIn0.eyJpZCI6IjViZDk2MWJkZWQxN2E5MmI1MDFjZWQ0ZCIsIm5hbWUiOiLpnZLph4kxMSIsImVtcGxveWVlIjoiNWQ5ZWNlODc1Zjk3ZGQzMzEwNzI4ZjY4IiwicGhvbmUiOiI3TFlYZ29ySkdGM2hBbHdqQTZGelFnPT0iLCJvcmdpZCI6IjViY2ZlOTVjYjBhMDFmMDAwOTI4NGJjMyIsInBsYXRmb3JtIjoiZDVmYTU4Yjk3NGExMjBlZTYxMTMzM2MwMDNjOWZlYzAiLCJ1bmlvbmlkIjoib2RuWjR0OERoV1V0N0lXT09maEF0UTdqM1docyIsImp0aSI6Imo3R0hLRGFzNDEzQTQ2OGkiLCJleHAiOjE1OTYwODEzMTEsImlhdCI6MTU5NTQ3NjUxMX0.I196XbcCR3k7r1O8uwoI2HUhow0UhGHKzii5wOR39vLmuNOUatNY7ccQTCHijqysbSCePP43Iuglrl2gLQASf5uAr9uqTzhTc3O4Z5iF3oR2qR1vlBxrzTDF8xuhKHQ4tO6Hbsib0FdOYVeU8fe0g_GZiIcuYIv-f8VsiAGMF9TEES129CDwZacJfVViw4EXVnXSivAzQG4JgGSwUACvPT140bCZ1XPeHi0GXmgtEN77NjWfOGI5RYGC0Gq3CGevlSWERjb3mUscAIjoXsOxlWNwy7dc1u1A7uX1a6bUhLU1wtiQ6md4TnyeR5OdYeVqGlIe3hZGcH_E3QrQMq988Q"
// console.log(str)
// let s = System.verify(str.split(' ')[1], settings.publickey())
// console.log(s)
// var a=[1,2]
// var b=[3,4]
// var c=[5,6]
// var d=[7,8,9]
// var rows=[a,b,c,d]
// console.log(rows.length)
// var mid=[]
// for(let i=0;i<rows.length;i++){
// if(mid.length==0){
// console.log("in..........")
// let one=rows[i]
// let two=rows[++i]
// console.log(two,"..........")
// one.forEach(item=>{
// two.forEach(c=>{
// mid.push(item+"|"+c)
// })
// })
// }else{
// let next=rows[i]
// let tmparray=[]
// mid.forEach(m=>{
// next.forEach(n=>{
// tmparray.push(m+"|"+n)
// })
// })
// mid=tmparray
// }
// }
// console.log(mid)
// [
// {
// "title":"中心功能清单",
// "code":"root",
// "expand":true,
// "orgpath":"root",
// "children":[
// {
// "seq":2,
// "code":"businessManagement",
// "title":"商机管理",
// "nodeKey":1,
// "orgpath":"root/businessManagement",
// "expand":true,
// "children":[
// {
// "auths":[
// "add",
// "edit",
// "delete",
// "export",
// "show"],
// "seq":2,
// "code":"wailtingDispose",
// "title":"待处理商机",
// "nodeKey":2,
// "orgpath":"root/businessManagement/wailtingDispose",
// "expand":true,
// "children":[
// ],
// "sels":[
// ],
// "titlepath":"中心功能清单/商机管理/待处理商机",
// "level":3
// },
// {
// "auths":[
// "add",
// "edit",
// "delete",
// "export",
// "show"],
// "seq":2,
// "code":"allDispose",
// "title":"全部商机",
// "nodeKey":3,
// "orgpath":"root/businessManagement/allDispose",
// "expand":true,
// "children":[
// ],
// "sels":[
// ],
// "titlepath":"中心功能清单/商机管理/全部商机",
// "level":3
// }],
// "titlepath":"中心功能清单/商机管理",
// "level":2
// },
// {
// "auths":[
// "add",
// "edit",
// "delete",
// "export",
// "show"],
// "seq":3,
// "code":"deliveryManagement",
// "title":"资质交付管理",
// "nodeKey":4,
// "orgpath":"root/deliveryManagement",
// "expand":true,
// "children":[
// {
// "auths":[
// "add",
// "edit",
// "delete",
// "export",
// "show"],
// "seq":1,
// "code":"deliveryWaiting",
// "title":"待我处理",
// "nodeKey":5,
// "orgpath":"root/deliveryManagement/deliveryWaiting",
// "expand":true,
// "children":[
// ],
// "sels":[
// ],
// "titlepath":"中心功能清单/资质交付管理/待我处理",
// "level":3
// },
// {
// "auths":[
// "add",
// "edit",
// "delete",
// "export",
// "show"],
// "seq":1,
// "code":"deliveryAll",
// "title":"全部交付单",
// "nodeKey":6,
// "orgpath":"root/deliveryManagement/deliveryAll",
// "expand":true,
// "children":[
// ],
// "sels":[
// ],
// "titlepath":"中心功能清单/资质交付管理/全部交付单",
// "level":3
// }],
// "titlepath":"中心功能清单/资质交付管理",
// "level":2
// },
// {
// "auths":[
// "add",
// "edit",
// "delete",
// "export",
// "show"],
// "seq":4,
// "code":"annualReport",
// "title":"年报交付管理",
// "nodeKey":7,
// "orgpath":"root/annualReport",
// "expand":true,
// "children":[
// {
// "auths":[
// "add",
// "edit",
// "delete",
// "export",
// "show"],
// "seq":1,
// "code":"annualReportWait",
// "title":"待我处理",
// "nodeKey":8,
// "orgpath":"root/annualReport/annualReportWait",
// "expand":true,
// "children":[
// ],
// "titlepath":"中心功能清单/年报交付管理/待我处理",
// "level":3,
// "sels":[
// ]
// },
// {
// "auths":[
// "add",
// "edit",
// "delete",
// "export",
// "show"],
// "seq":2,
// "code":"annualReportAll",
// "title":"全部交付单",
// "nodeKey":9,
// "orgpath":"root/annualReport/annualReportAll",
// "expand":true,
// "children":[
// ],
// "sels":[
// ],
// "titlepath":"中心功能清单/年报交付管理/全部交付单",
// "level":3
// }],
// "titlepath":"中心功能清单/年报交付管理",
// "level":2
// }],
// "nodeKey":0,
// "titlepath":"中心功能清单",
// "level":1
// }]
const system = require("../../system");
const uuidv4 = require('uuid/v4');
class AuthUtils {
constructor() {
this.cacheManager = system.getObject("db.common.cacheManager");
this.exTime = 5 * 3600;//缓存过期时间,5小时
}
getUUID() {
var uuid = uuidv4();
var u = uuid.replace(/\-/g, "");
return u;
}
/**
* 获取访问token信息
* @param {*} appkey 应用key
* @param {*} secret 应用密钥
*/
async getTokenInfo(appkey, secret) {
var rtnKey = this.getUUID();
var cacheAccessKey = await this.cacheManager["ApiAccessKeyCache"].cache(appkey, rtnKey, this.exTime);
if (cacheAccessKey) {
rtnKey = cacheAccessKey.accessKey;
}//获取之前的token值
var appData = await this.cacheManager["ApiAccessKeyCache"].cache(rtnKey, secret, this.exTime, appkey);
if (!appData) {
return system.getResultFail(system.getAppInfoFail, "key或secret错误.");
}
if (!appData.isEnabled) {
return system.getResultFail(system.waitAuditApp, "应用处于待审核等待启用状态.");
}
appData.accessKey = rtnKey;
return system.getResultSuccess(appData);
}
}
module.exports = AuthUtils;
var excel = require('exceljs');
const system=require("../system");
const uuidv4 = require('uuid/v4');
const fs=require("fs");
class ExcelClient {
constructor() {
this.columns = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
this.ossClient=system.getObject("util.ossClient");
this.filedownloadDao = system.getObject("db.filedownloadDao");
}
async download(params) {
var self = this;
var title = params.title || "";
var code = params.code || uuidv4();
var fileName = params.fileName || code + ".xlsx";
var filePath = params.filePath || "/tmp/" + fileName;
var rows = params.rows || [];
var user = params.user || {};
var wb = new excel.Workbook();
wb.properties.date1904 = true;
var sheet = wb.addWorksheet("sheet1");
var headers = rows[0];
console.log(headers, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2 headers");
if(title) {
sheet.addRow([title]);
sheet.getCell("A1").font = {
    name: '微软雅黑',
    family: 4,
    size: 12,
    bold: true
};
sheet.getCell('A1').alignment = { vertical: 'middle', horizontal: 'center' };
var colkey = 0;
if(headers.length > 0) {
colkey = headers.length - 1;
}
var endColumn = this.columns[colkey] || "A";
sheet.mergeCells("A1:" + endColumn + "1");
}
for(var r of rows) {
sheet.addRow(r);
}
wb.xlsx.writeFile(filePath).then(async function(d) {
var rtn = await self.ossClient.upfile(fileName, filePath);
fs.unlink(filePath,function(err){});
var obj = {
user_id : user.id || 0,
userName : user.userName || "",
code : code,
fileName : fileName,
filePath : rtn.url || "",
isDownload : false,
}
var obj = await self.filedownloadDao.create(obj);
});
}
}
module.exports = ExcelClient;
var childproc = require('child_process');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
class ExecClient {
constructor() {
this.cmdPostPattern = "curl -k -H 'Content-type: application/json' -d '{data}' {url}";
this.cmdGetPattern = "curl -G -X GET '{url}'";
this.cmdPostPattern3 = "curl -k -H 'Content-type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJvcnpaWmhXRXBKNVVFZzRZUU5uUmlyVEJXa1FQbnZ6UyIsImlhdCI6MTU5MjcwOTYzNn0.TWk_F6Tz3fRMqspoG24VSt5RiC4ldFembFYcLcAbowE' -H 'XAPPKEY: 647a68c9-da01-40d3-9763-1ffa0f64cf3f' -d '{data}' {url}";
}
async exec(cmd) {
//await后面表达式返回的promise对象,是then的语法糖,await返回then函数的返回值
//异常需要try/catch自己捕获或外部catch捕获
const {stdout, stderr} = await exec(cmd);
return {stdout, stderr};
}
async exec2(cmd) {
return exec(cmd, {encoding: "base64"});
}
FetchPostCmd(subData, url) {
var data = JSON.stringify(subData);
var cmd = this.cmdPostPattern.replace(/\{data\}/g,
data).replace(/\{url\}/g, url);
console.log(cmd);
return cmd;
}
async execPost(subData, url) {
let cmd = this.FetchPostCmd(subData, url);
var result = await this.exec(cmd);
return result;
}
FetchPostCmd3(subData, url) {
var data = JSON.stringify(subData);
var cmd = this.cmdPostPattern3.replace(/\{data\}/g,
data).replace(/\{url\}/g, url);
console.log(cmd);
return cmd;
}
async execPost3(subData, url) {
let cmd = this.FetchPostCmd3(subData, url);
var result = await this.exec(cmd);
return result;
}
async execPost2(subData, url) {
let cmd = this.FetchPostCmd(subData, url);
var result = await this.exec2(cmd);
return result;
}
FetchGetCmd(subData, url) {
var cmd = this.cmdGetPattern.replace(
/\{data\}/g, subData).replace(/\{url\}/g, url);
console.log(cmd);
return cmd;
}
async execGet(subData, url) {
let cmd = this.FetchGetCmd(subData, url);
console.log(cmd);
var result = await this.exec(cmd);
return result;
}
async execGet2(subData, url) {
let cmd = this.FetchGetCmd(subData, url);
console.log(cmd);
var result = await this.exec2(cmd);
return result;
}
async execGetTimeOut(subData, url, timeOut = 5000) {
//timeOut,单位是毫秒
let cmd = this.FetchGetCmd(subData, url);
var options = {
timeout: timeOut,
};
const {stdout, stderr} = await exec(cmd, options);
return {stdout, stderr};
}
}
module.exports = ExecClient;
// var x=new RestClient();
// x.execGet("","http://www.163.com").then(function(r){
// console.log(r.stdout);
// console.log(r.stderr);
// });
// var log4js = require('log4js');
var settings = require("../../config/settings");
const uuidv4 = require('uuid/v4');
const system = require("../system");
class LogClient {
constructor() {
// log4js.configure(settings.basepath+"/app/config/log4js.json");
// this.logerApp=log4js.getLogger("app");
// this.logerHttp=log4js.getLogger("http");
}
getUUID() {
var uuid = uuidv4();
var u = uuid.replace(/\-/g, "");
return u;
}
async log(pobj, req, rtninfo, errinfo) {
rtninfo.requestId = this.getUUID()
req.params.param = pobj
if (!["findSystemMsgCount", "findUnreadCount"].includes(req.params && req.params.method || '')) {
//第三个字段应该存公司id
system.execLogs(settings.appname + "_" + req.xctx.codetitle, req.params, "_" + pobj.company_id + "_", rtninfo, errinfo).then(res => {
if (res && res.status == 1) {
console.log("log.....success")
} else {
console.log("log.....fail")
}
}).catch(e => {
console.log("log.....fail")
})
}
}
async logList(pobj) {
let { search, pageInfo, company_id } = pobj;
let { userName, errorInfo, messageBody, resultInfo, created_at, opTitle, requestId } = search;
let query = {
indexName: `logs-sytxpublic-msgq-${settings.logindex}`,
pageSize: pageInfo.pageSize,
currentPage: pageInfo.pageNo
};
if (company_id && company_id != 1) {
query.identifyCode = `_${company_id}_`;
}
if (opTitle) {
query.opTitle = opTitle;
}
if (requestId) {
query.requestId = requestId;
}
if (userName) {
query.messageBody = userName;
}
if (errorInfo) {
query.errorInfo = errorInfo;
}
if (messageBody) {
query.messageBody = messageBody;
}
if (resultInfo) {
query.resultInfo = resultInfo;
}
if (created_at && created_at[0] && created_at[1]) {
query.startTime = new Date(created_at[0]).getTime();
query.entTime = new Date(created_at[1]).getTime();
}
console.log("请求--------日志");
console.log(settings.logUrl());
console.log(query);
// return {
// "totalCount": 1,
// "pageSize": 20,
// "currentPage": 0,
// "list": [
// {
// "opTitle": "center_manage_首页",
// "identifyCode": "10_",
// "messageBody": "{\"gname\":\"msg\",\"qname\":\"msgCtl\",\"method\":\"findUnreadCount\",\"param\":{\"clientIp\":\"9.223.9.138\",\"agent\":\"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36\",\"classname\":\"msg.msgCtl\",\"app_id\":1,\"company_id\":\"10\",\"userid\":\"15\",\"username\":\"j2\",\"bizpath\":\"/home\",\"is_read\":false},\"actionType\":\"\",\"pushUrl\":\"\"}",
// "resultInfo": "{\"status\":0}",
// "errorInfo": "null",
// "requestId": "19a258474e384a0db939270580f01407",
// "created_at": "2020-07-16T05:18:48.454Z"
// }, {
// "opTitle": "center_manage_消息中心",
// "identifyCode": "10_",
// "messageBody": "{\"gname\":\"msg\",\"qname\":\"msgCtl\",\"method\":\"findUnreadCount\",\"param\":{\"clientIp\":\"9.223.9.138\",\"agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36\",\"classname\":\"msg.msgCtl\",\"app_id\":1,\"company_id\":\"10\",\"userid\":\"15\",\"username\":\"j2\",\"bizpath\":\"/message/message_page\",\"is_read\":false},\"actionType\":\"\",\"pushUrl\":\"\"}",
// "resultInfo": "{\"status\":-1}",
// "errorInfo": "null",
// "requestId": "06d94fbcd05b44a1ae292a21f5931f41",
// "created_at": "2020-07-16T05:51:54.888Z"
// }]
// }
let rtn = await system.postJsonTypeReq(settings.logUrl(), {
"actionType": "queryLogsData",// Y 功能名称
"actionBody": query
});
if (rtn.statusCode === 200) {
rtn = rtn.data;
if (rtn && rtn.status === 1) {
return rtn.data;
} else {
throw new Error(rtn && rtn.message || '请联系管理员');
}
} else {
throw new Error(rtn)
}
}
}
module.exports = LogClient;
var nodemailer = require('nodemailer');
class MailClient{
constructor(){
this.mailer=nodemailer.createTransport({
service: 'aliyun',
secureConnection: true,
port: 465,
auth: {
user: 'czhd_ip@gongsibao.com',
pass: 'HANtang2018'
}
});
}
//嵌入图片
// var mailOptions = {
// from: 'bsspirit ',
// to: 'xxxxx@163.com',
// subject: 'Embedded Image',
// html: '<b>Hello world ✔</b><br/>Embedded image: <img src="cid:00000001"/>',
// attachments: [{
// filename: '01.png',
// path: './img/r-book1.png',
// cid: '00000001'
// }]
// }
//发送邮件
// var mailOptions = {
// from: 'bsspirit ',
// to: 'xxxxx@163.com',
// subject: 'Hello ✔',
// text: 'Hello world ✔',
// html: '<b>Hello world ✔</b>' // html body
// attachments: [
// {
// filename: 'text0.txt',
// content: 'hello world!'
// },
// {
// filename: 'text1.txt',
// path: './attach/text1.txt'
// }
// ]
// };
async sendMsg(to,title,text,html,cc,bcc,atts){
var options={
from: "czhd_ip@gongsibao.com", // sender address
to: to, // list of receivers
cc: cc||'',
bcc: bcc||'',
subject: title, // Subject line
text: text || '', // plaintext body
html: html || '',// html body
attachments: atts||[
]
};
var self=this;
var p=new Promise(function(resv,rej){
self.mailer.sendMail(options, function(error, info){
if(error){
return rej(error);
}else{
return resv(info.response);
}
});
});
return p;
}
}
module.exports=MailClient;
// var d=new MailClient();
// d.sendMsg("zhangjiao@gongsibao.com","test","see","hello txt",null,null,[
// {
// filename: 'text1.jpg',
// path: 'https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_3369154019592833720182216128337mmexport1540195729827.jpg'
// }
// ]).then(r=>{
// console.log(r);
// }).catch(e=>{
// console.log(e);
// });
var co = require('co');
var OSS = require('ali-oss');
class OSSClient {
constructor() {
this.client = new OSS({
endpoint: 'https://oss-cn-beijing.aliyuncs.com',
accessKeyId: 'LTAI4GC5tSKvqsH2hMqj6pvd',
accessKeySecret: '3KV9nIwW8qkTGlrPmAe3HnR3fzM6r5'
});
this.client.useBucket('gsb-zc');
}
async downfile(key) {
var me = this;
var result = await co(function* () {
var result = yield me.client.get(key, '/tmp/' + key);
return result;
});
return result;
}
async upfile(key, filepath) {
var me = this;
var result = await co(function* () {
var result = yield me.client.put(key, filepath);
return result;
})
return result;
}
async putBuffer(key, buf) {
try {
var result = await this.client.put(key, buf);
console.log(result);
return result
} catch (e) {
console.log(e);
return null
}
}
}
module.exports = OSSClient;
// var oss=new OSSClient();
// var key="netsharp_QSzjD4HdKdTmRR6b5486pEA3AbsW8Pr8.jpg"
// oss.upfile(key,"/usr/devws/OMC/igirl-api/r3.jpg").then(function(result){
// console.log(result);
// });
// oss.downfile(key).then(function(result){
// console.log(result);
// });
const system = require("../system");
const redis = require("redis");
const settings = require("../../config/settings");
const bluebird = require("bluebird");
bluebird.promisifyAll(redis);
// const logCtl=system.getObject("web.oplogCtl");
class RedisClient {
constructor() {
const redisConfig = settings.redis();
this.client = redis.createClient({
host: redisConfig.host,
port: redisConfig.port,
password: redisConfig.password,
db: redisConfig.db,
retry_strategy: function (options) {
// if (options.error && options.error.code === 'ECONNREFUSED') {
// // End reconnecting on a specific error and flush all commands with
// // a individual error
// return new Error('The server refused the connection');
// }
if (options.total_retry_time > 1000 * 60 * 60) {
// End reconnecting after a specific timeout and flush all commands
// with a individual error
return new Error('Retry time exhausted');
}
if (options.attempt > 10) {
// End reconnecting with built in error
return 10000;
}
// reconnect after
return Math.min(options.attempt * 100, 3000);
}
});
// return client.multi().get('foo').execAsync().then(function(res) {
// console.log(res); // => 'bar'
// });
this.client.on("error", function (err) {
console.log("Error " + err);
// //日志记录
// logCtl.error({
// optitle:"redis this.client.on异常:",
// op:"base/utils/redisClient/this.client.on",
// content:err,
// clientIp:""
// });
});
this.subclient = this.client.duplicate();
this.subclient.on("error", function (err) {
console.log("Error " + err);
// //日志记录
// logCtl.error({
// optitle:"redis this.subclient.on异常:",
// op:"base/utils/redisClient/this.subclient.on",
// content:err,
// clientIp:""
// });
});
var self = this;
this.subclient.on("message", async function (channel, message) {
console.log(channel, '------------- redis message ------------------- ');
if (self.taskmanager) {
if (channel == "task") {
if (message == "newtask") {
(async (that) => {
var msg2 = await that.rpop("tasklist");
if (msg2) {
console.log("taskName+++++" + msg2);
var msgs2 = msg2.split("_");
var action = msgs2[0];
var taskName = msgs2[1];
var exp = msgs2[2];
await that.taskmanager.addTask(taskName, exp);
}
})(self)
} else {
(async (msg, that) => {
var msgs = msg.split("_");
var action = msgs[0];
if (action == "delete") {
var taskName = msgs[1];
await that.taskmanager.deleteTask(taskName);
}
})(message, self);
}
}
}
if (self.chatserver) {
if (channel != "task") {
var message = JSON.parse(message);
console.log(message, "------------------------------------------ publish message");
if (channel == "brc") {//如果是广播频道,则发送广播到客户端
self.chatserver.server.emit("brc", message);
} else if (self.chatserver.users[channel]) {
if (message.type) {
self.chatserver.users[channel].client.emit(message.type, message.data);
} else {
//持久化
self.chatserver.users[channel].client.emit("chatmsg", message);
}
}
}
}
});
}
async subscribe(channel, chatserver) {
if (!this.chatserver) {
this.chatserver = chatserver;
}
return this.subclient.subscribeAsync(channel);
}
async unsubscribe(channel) {
//this.chatserver=null;
return this.subclient.unsubscribeAsync(channel);
}
async subscribeTask(channel, taskmanager) {
if (!this.taskmanager) {
this.taskmanager = taskmanager;
}
return this.subclient.subscribeAsync(channel);
}
async publish(channel, msg) {
console.log(channel + ":" + msg);
return this.client.publishAsync(channel, msg);
}
async rpush(key, val) {
return this.client.rpushAsync(key, val);
}
async llen(key) {
return this.client.llenAsync(key);
}
async rpushWithEx(key, val, t) {
var p = this.rpush(key, val);
this.client.expire(key, t);
return p;
}
async rpop(key) {
return this.client.rpopAsync(key);
}
async lpop(key) {
return this.client.lpopAsync(key);
}
async lrem(key, val) {
return this.client.lremAsync(key, 1, val);
}
async ltrim(key, s, e) {
return this.client.ltrimAsync(key, s, e);
}
async clearlist(key) {
await this.client.ltrim(key, -1, -1);
await this.client.ltrim(key, 1, -1);
return 0;
}
async flushall() {
console.log("sss");
return this.client.flushallAsync();
}
async keys(p) {
return this.client.keysAsync(p);
}
async set(key, val) {
if (typeof val == "undefined" || typeof key == "undefined") {
console.log("......................cache val undefined");
console.log(key);
return null;
}
return this.client.setAsync(key, val);
}
async setWithEx(key, val, t) {
var p = this.client.setAsync(key, val);
this.client.expire(key, t);
return p;
}
async get(key) {
return this.client.getAsync(key);
}
async delete(key) {
return this.client.delAsync(key);
}
async hmset(key, jsonObj) {
return this.client.hmsetAsync(key, jsonObj);
}
async hmsetWithEx(key, jsonObj, t) {
var p = this.client.hmsetAsync(key, jsonObj);
this.client.expire(key, t);
return p;
}
async hgetall(key) {
return this.client.hgetallAsync(key);
}
async hincrby(key, f, n) {
return this.client.hincrbyAsync(key, f, n);
}
async sadd(key, vals) {
await this.client.saddAsync(key, ...vals);
return this.scard(key);
}
async scard(key) {
return this.client.scardAsync(key);
}
async srem(key, val) {
return this.client.sremAsync(key, val);
}
async sismember(key, val) {
return this.client.sismemberAsync(key, val);
}
async smembers(key) {
return this.client.smembersAsync(key);
}
async exists(key) {
return this.client.existsAsync(key);
}
async incr(key) {
return this.client.incrAsync(key);
}
}
module.exports = RedisClient;
// var client = new RedisClient();
// (async ()=>{
// await client.rpush("tasklist","xxx");
// await client.rpush("tasklist","xxx");
// var len=await client.llen("tasklist");
// //await client.clearlist("tasklist");
// len=await client.llen("tasklist");
// console.log(len);
// })()
// client.keys('*').then(s=>{
// console.log(s);
// });
// let clients = {};
// clients.watcher = redis.createClient({ ... } );
// clients.alterer = clients.watcher.duplicate();
// client.sadd("h",["ok","jy","ok"]).then(function(r){
// console.log(r);
// });
// client.sadd("h","jy").then(function(r){
// console.log(r);
// });
// client.srem("h","jy").then(function(r){
// console.log(r);
// });
// client.smembers("h").then(function(r){
// console.log(r);
// });
// client.sismember("h","ok").then(function(r){
// console.log(r);
// });
// console.dir(client);ti.exec( callback )回调函数参数err:返回null或者Array,出错则返回对应命令序列链中发生错误的错误信息,这个数组中最后一个元素是源自exec本身的一个EXECABORT类型的错误
// r.set("hello","oooo").then(function(result){
// console.log(result);
// });
// r.get("hello").then(function(result){
// console.log(result);
// });
// client.hmset("user_1",{name:"jy",age:13}).then(function(r){
// console.log(r);
//
// });
// client.hincrby("user_1","age",2).then(function(r){
// console.log(r);
// setTimeout(function(){
// client.hgetall("user_1").then(function(u){
// console.log(u);
// });
// },3000);
// });
var childproc = require('child_process');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const querystring = require('querystring');
var settings=require("../../config/settings");
class RestClient{
constructor(){
this.cmdGetPattern = "curl {-G} -k -d '{data}' {url}";
this.cmdPostPattern="curl -k -H 'Content-type: application/json' -d '{data}' {url}";
this.cmdDownLoadFilePattern="curl -G -o {fileName} {url}";
this.cmdPostPattern2="curl -k -H 'Content-type: application/x-www-form-urlencoded' -d '{data}' {url}";
this.cmdPostPatternWithAK="curl -k -H 'Content-type: application/json' -H 'AccessKey:{ak}' -d '{data}' {url}";
//云帐户
// this.cmdPostPattern3="curl -k -H 'Content-type: application/x-www-form-urlencoded' -H 'dealer-id:"+settings.apiconfig.yunzhanghuDealer_id()+"' -H 'request-id:"+parseInt(Date.now() / 1000)+"_gsb"+"' -d '{data}' {url}";
// this.cmdGetPattern3 = "curl {-G} -k {url} --header 'dealer-id:"+settings.apiconfig.yunzhanghuDealer_id()+"'";
//e签宝
//this.cmdPostPattern4="curl -k -H 'Content-type: application/json' -H 'X-Tsign-Open-App-Id:"+settings.apiconfig.eSignBaoAppId()+"' -H 'X-Tsign-Open-App-Secret:"+settings.apiconfig.eSignBaoAppKey()+"' -d '{data}' {url}";
// form-data形式post data参数类型 md5=2&data=1
this.cmdPostPattern5="curl -k --data '{data}' {url}";
}
FetchGetCmd(subData, url) {
var cmd = this.cmdGetPattern.replace(/\{\-G\}/g, "-G").replace(
/\{data\}/g, subData).replace(/\{url\}/g, url);
return cmd;
}
FetchPostCmd(subData, url) {
var data=JSON.stringify(subData);
var cmd= this.cmdPostPattern.replace(/\{data\}/g,
data).replace(/\{url\}/g, url);
return cmd;
}
FetchPostCmdWithAK(subData, url,acck) {
var data=JSON.stringify(subData);
var cmd= this.cmdPostPatternWithAK.replace(/\{data\}/g,
data).replace(/\{url\}/g, url).replace(/\{ak\}/g,acck);
return cmd;
}
FetchPostCmd2(subData, url) {
var data=subData;
var cmd= this.cmdPostPattern2.replace(/\{data\}/g,
data).replace(/\{url\}/g, url);
return cmd;
}
FetchPostCmd3(subData, url) {
var data=subData;
var cmd= this.cmdPostPattern3.replace(/\{data\}/g,
data).replace(/\{url\}/g, url);
return cmd;
}
FetchGetCmd3(url) {
var cmd = this.cmdGetPattern3.replace(/\{\-G\}/g, "-G").replace(/\{url\}/g, url);
return cmd;
}
FetchPostCmd4(subData, url) {
var data=subData;
var cmd= this.cmdPostPattern4.replace(/\{data\}/g,
data).replace(/\{url\}/g, url);
return cmd;
}
FetchPostCmd5(subData, url) {
var data=subData;
var cmd= this.cmdPostPattern5.replace(/\{data\}/g,
data).replace(/\{url\}/g, url);
return cmd;
}
FetchDownLoadCmd(outfname,url) {
// console.log(this.cmdPattern);
var cmd = this.cmdDownLoadFilePattern.replace(/\{fileName\}/g, outfname).replace(
/\{url\}/g, url);
return cmd;
}
async exec(cmd) {
//await后面表达式返回的promise对象,是then的语法糖,await返回then函数的返回值
//异常需要try/catch自己捕获或外部catch捕获
const { stdout, stderr } = await exec(cmd);
return { stdout, stderr };
}
async execDownload(url,outfname){
let cmd=this.FetchDownLoadCmd(outfname,url);
var result=await this.exec(cmd);
return result;
}
async execGet(subData, url){
let cmd=this.FetchGetCmd(subData,url);
var result=await this.exec(cmd);
return result;
}
async execGet2(subData, url){
var data=querystring.stringify(subData);
let cmd=this.FetchGetCmd(data,url);
var result=await this.exec(cmd);
return result;
}
async execPost(subData, url){
let cmd=this.FetchPostCmd(subData,url);
var result=await this.exec(cmd,{
maxBuffer: 4096 * 1024
});
return result;
}
async execPostWithAK(subData, url,ak){
let cmd=this.FetchPostCmdWithAK(subData,url,ak);
var result=await this.exec(cmd,{
maxBuffer:1024*1024*15
});
var rtn=result.stdout;
if(rtn){
return JSON.parse(rtn);
}else{
return null;
}
}
async execPost2(subData, url){
let cmd=this.FetchPostCmd2(subData,url);
console.log(cmd);
var result=await this.exec(cmd);
return result;
}
async execPost3(subData, url){
let cmd=this.FetchPostCmd3(subData,url);
console.log(cmd);
var result=await this.exec(cmd);
return result;
}
async execGet3(url){
let cmd=this.FetchGetCmd3(url);
console.log("execGet3-----01");
console.log(cmd);
var result=await this.exec(cmd);
return result;
}
async execPostESignBao(subData, url){
let cmd=this.FetchPostCmd4(subData,url);
console.log(cmd);
var result=await this.exec(cmd);
return result;
}
async execPostForm(subData, url){
let cmd=this.FetchPostCmd5(subData,url);
console.log(cmd);
var result=await this.exec(cmd);
return result;
}
async execCustomPostESignBao(cmd){
console.log(cmd);
var result=await this.exec(cmd);
return result;
}
test(){
console.log("hello");
}
}
module.exports=RestClient;
// var x=new RestClient();
// x.execGet("","http://www.163.com").then(function(r){
// console.log(r.stdout);
// console.log(r.stderr);
// });
const system = require("../system");
const Core = require('@alicloud/pop-core');
class SmsClient {
constructor() {
this.smsTeml = "http://123.57.156.109:4103/api/Send";
this.restClient = system.getObject("util.restClient");
this.aliclient = new Core({
accessKeyId: 'LTAI4FtNp3wcqFzaADvo1WtZ',
accessKeySecret: 'VBKn1Anx4UmMF0LKNz7PVaCFG1phcg',
endpoint: 'https://dysmsapi.aliyuncs.com',
apiVersion: '2017-05-25'
});
}
async aliSendMsg (to, tmplcode, signName, jsonContent) {
var params = {
"RegionId": "default",
"PhoneNumbers": to,
"SignName": signName,
"TemplateCode": tmplcode,
"TemplateParam": jsonContent
}
var requestOption = {
method: 'POST'
};
this.aliclient.request('SendSms', params, requestOption).then((result) => {
console.log(JSON.stringify(result));
}, (ex) => {
console.log(ex);
})
}
async sendMsg (to, content) {
var txtObj = {
"appId": 8,
"mobilePhone": to,
"content": content
}
return this.restClient.execPost(txtObj, this.smsTeml);
}
async getUidStr (len, radix) {
var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
var uuid = [], i;
radix = radix || chars.length;
if (len) {
for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
} else {
var r;
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
uuid[14] = '4';
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | Math.random() * 16;
uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
}
}
}
return uuid.join('');
}
}
module.exports = SmsClient;
// var sms=new SmsClient();
// sms.aliSendMsg("13381139519","SMS_173946419","iboss",JSON.stringify({code:"hello"}));
// var util = require('util');
// var ssdb = require('ssdb-node');
// const settings = require("../../config/settings");
// const bluebird = require("bluebird");
// bluebird.promisifyAll(ssdb);
// class SsdbClient {
// constructor() {
// this.pool = new ssdb({
// port: 8888,
// host: '192.168.18.26',
// auth: 'lowlogslowlogslowlogslowlogYsy123',
// authCallback:""
// });
// }
// async set(obj) {
// var key = obj.key;
// var value = obj.value;
// return new Promise((resolve, reject) => {
// this.pool.set(key, value, function (err, data) {
// if (err) {
// reject(err)
// } else {
// resolve(data)
// }
// });
// })
// }
// async get(obj) {
// var key = obj.key;
// return new Promise((resolve, reject) => {
// this.pool.get(key, function (err, data) {
// if (err) {
// reject(err)
// } else {
// resolve(data)
// }
// });
// })
// }
// }
// module.exports = SsdbClient;
\ No newline at end of file
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var methodOverride = require('method-override');
var cookierParser = require('cookie-parser');
var bodyParser = require('body-parser');
var multer = require('multer');
var errorHandler = require('errorhandler');
var settings = require('./settings');
var system = require('../base/system');
var routes = require('./routes');
var history = require('connect-history-api-fallback');
module.exports = function (app) {
app.set('port', settings.port);
app.set('views', settings.basepath + '/app/front/entry');
app.set('view engine', 'ejs');
app.use(methodOverride());
app.use(cookierParser());
app.use(bodyParser.json({ limit: '50mb' }));
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));
routes(app);//初始化路由
app.use(history());
app.use(express.static(path.join(settings.basepath, '/app/front/entry/public')));
// development only
if ('development' == app.get('env')) {
app.use(errorHandler());
} else {
app.use(function (err, req, res) {
console.log("prod error handler................................>>>>>>>>>>>>>>>>>");
console.log(err);
//logerApp.error("prod error handler",err);
res.send("link admin");
});
}
};
var path= require('path');
var basepath=path.normalize(path.join(__dirname, '../..'));
var settings = {
webbase:path.join(basepath,"app/base/controller/ctl.base.js"),
web:path.join(basepath,"app/base/controller/impl"),
apibase:path.join(basepath,"app/base/api/api.base.js"),
api:path.join(basepath,"app/base/api/impl"),
util:path.join(basepath,"app/base/utils"),
servicebase:path.join(basepath,"app/base/service/sve.base.js"),
service:path.join(basepath,"app/base/service/impl"),
dbbase:path.join(basepath,"app/base/db/dao.base.js"),
db:path.join(basepath,"app/base/db/impl"),
tool:path.join(basepath,"app/base/tool"),
service2:path.join(basepath,"app/base/service"),
applet:path.join(basepath,"app/base/wxapplet/impl"),
};
module.exports = settings;
var fs=require("fs");
var path=require("path");
var System = require('../base/system');
module.exports = function (app) {
var routePath=__dirname+"/routes";
fs.readdir(routePath,function(err,rs){
if(rs){
rs.forEach(function(r){
var func=require(routePath+"/"+r);
func.call(null,app);
});
}
});
};
var url=require("url");
var qr=require("qr-image")
module.exports = function (app) {
app.get('/api/qc', function(req,res){
var params = url.parse(req.url,true);
var detailLink = params.query.detailLink;
try {
var img = qr.image(detailLink,{size :10});
console.log(detailLink)
res.writeHead(200, {'Content-Type': 'image/png'});
img.pipe(res);
} catch (e) {
res.writeHead(414, {'Content-Type': 'text/html'});
res.end('<h1>414 Request-URI Too Large</h1>');
}
});
};
var url = require("url");
var System = require("../../base/system");
const chnelapi = System.getObject("api.common.channels")
const userS = System.getObject("service.auth.userSve")
const roleS = System.getObject("service.auth.roleSve")
const companyS = System.getObject("service.common.companySve")
const settings = require("../settings.js")
let channelCache = {};
module.exports = function (app) {
app.post("/autologin", async function (req, res, next) {
try {
console.log(req.body)
let appkey = req.body.appkey.trim()
if (!appkey) {
let rd = System.getResult(null, "没有资质宝appkey,请联系资质宝服务提供方")
res.end(JSON.stringify(rd))
return
}
let companykey = req.body.companykey.trim()
if (!companykey) {
let rd = System.getResult(null, "没有公司宝的租户companykey,请联系资质宝服务提供方")
res.end(JSON.stringify(rd))
return
}
//let cooktoken = req.cookies["accessToken"]
let cooktoken = req.body.accesskey
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>........................................")
console.log(cooktoken)
let tv = cooktoken
let sourceUser = System.verify(tv, settings.publickey())
let openid = sourceUser.employee
let userName = openid
let nickName = sourceUser.name
let unid = sourceUser.unionid
let fixedcodes = ["资质宝交付员", '资质宝业务员']
let rolecodes = sourceUser.roles ? sourceUser.roles : []
let rcs = rolecodes.filter(rc => {
if (fixedcodes.indexOf(rc) >= 0) {
return true
} else {
return false
}
})
if (rcs.length == 0) {
let rd = System.getResult(null, "当前登录人没有资质宝访问权限")
res.end(JSON.stringify(rd))
return
}
//先按照openid去查看是否已经存在
let uf = await userS.dao.model.findOne({ where: { openid: openid } })
if (!uf) {
//按照公司companykey查询出要注册公司的所在公司,取公司id
let company = await companyS.dao.model.findOne({ where: { companykey: companykey } })
//构造注册用户对象,需要设置默认角色,默认角色需要按照rolecode查询出角色
let rolesfind = await roleS.dao.model.findAll({ where: { code: { [roleS.db.Op.in]: rcs }, company_id: company.id } })
//根据rolecode--,设置组织路径
let opath = ''
let isSalesman = false
let isDelivery = false
if (rcs[0] == "资质宝业务员") {
opath = "root10/bizgroup01/g1members/" + userName
isSalesman = true
} else {
opath = "root10/dlivergroup/dgroupmembers/" + userName
isDelivery = true
}
//调用pmregister
let reguser = {
company_id: company.id,
userName: userName,
nickName: nickName,
roles: rolesfind.map(r => r.id),
opath: opath,
openid: openid,
isSalesman: isSalesman,
isDelivery: isDelivery,
isAllocated: true,
skilltags: 'icp,edi'
}
uf = await userS.registerByTantent(reguser)
}
let rtnobj = await userS.loginApp(appkey, userName)
let rtntmp = System.getResult({ openurl: rtnobj.homePage + "?code=" + rtnobj.code })
let rtn = JSON.stringify(rtntmp)
res.end(rtn)
} catch (e) {
res.end(JSON.stringify(System.getResult(null, e.message)))
}
})
app.post("*", async function (req, res, next) {
console.log("---- 进来了- ----")
try {
let channel;
// let sourceHost = req.headers["x-forwarded-host"];
let sourceHost = req.hostname;
if (sourceHost in channelCache) {
channel = channelCache[sourceHost];
} else {
channel = await chnelapi.getChannels(sourceHost);
channelCache[sourceHost] = channel;
}
if (!channel) {
next()
} else {
let rtn = await chnelapi.channelHandle(channel, req.path + "/" + req.body.actionType, req.body)
if (rtn != null) {
res.end(JSON.stringify(rtn));
} else {
res.end(JSON.stringify({ status: -1, message: "fail" }));
}
}
} catch (e) {
console.log(e)
res.end(JSON.stringify({ status: -1, message: e }));
}
})
app.get('/api/:gname/:qname/:method', function (req, res) {
// var classPath = req.params["qname"];
var methodName = req.params["method"];
var gname = req.params["gname"];
classPath = gname + "." + classPath;
var tClientIp = System.get_client_ip(req);
req.clientIp = tClientIp;
req.uagent = req.headers["user-agent"];
// req.classname=classPath;
var params = [];
params.push(gname);
params.push(methodName);
params.push(req.body);
params.push(req.query);
params.push(req);
var p = null;
var invokeObj = System.getObject("api." + classPath);
if (invokeObj["doexec"]) {
p = invokeObj["doexec"].apply(invokeObj, params);
}
p.then(r => {
res.end(JSON.stringify(r));
});
});
app.post('/api/:gname/:qname/:method', function (req, res) {
var classPath = req.params["qname"];
var methodName = req.params["method"];
var gname = req.params["gname"];
var params = [];
classPath = gname + "." + classPath;
console.log("====================");
console.log(classPath);
var tClientIp = System.get_client_ip(req);
req.clientIp = tClientIp;
req.uagent = req.headers["user-agent"];
// req.classname=classPath;
params.push(gname);
params.push(methodName);
params.push(req.body);
params.push(req.query);
params.push(req);
var p = null;
var invokeObj = System.getObject("api." + classPath);
if (invokeObj["doexec"]) {
p = invokeObj["doexec"].apply(invokeObj, params);
}
p.then(r => {
res.end(JSON.stringify(r));
});
});
};
var url = require("url");
var system = require("../../base/system");
var metaCtl = system.getObject("web.common.metaCtl");
module.exports = function (app) {
app.get('/web/:gname/:qname/:method', function (req, res) {
var classPath = req.params["qname"];
var methodName = req.params["method"];
var gname = req.params["gname"];
classPath = gname + "." + classPath;
var params = [];
params.push(methodName);
params.push(req.body);
params.push(req.query);
params.push(req);
var p = null;
var invokeObj = system.getObject("web." + classPath);
if (invokeObj["doexec"]) {
p = invokeObj["doexec"].apply(invokeObj, params);
}
p.then(r => {
res.end(JSON.stringify(r));
});
});
app.post('/web/:gname/:qname/:method', function (req, res) {
req.codepath = req.headers["codepath"];
var classPath = req.params["qname"];
var methodName = req.params["method"];
var gname = req.params["gname"];
var params = [];
classPath = gname + "." + classPath;
var tClientIp = system.get_client_ip(req);
req.body.clientIp = tClientIp;
req.body.agent = req.headers["user-agent"];
req.body.classname = classPath;
params.push(methodName);
params.push(req.body);
params.push(req.query);
params.push(req);
var p = null;
var invokeObj = system.getObject("web." + classPath);
if (invokeObj["doexec"]) {
p = invokeObj["doexec"].apply(invokeObj, params);
}
p.then(r => {
res.end(JSON.stringify(r));
});
});
};
var path = require('path');
var ENVINPUT = {
KONG_ADMIAN: process.env.KONG_ADMIAN,
DB_HOST: process.env.DB_HOST,
DB_PORT: process.env.DB_PORT,
DB_USER: process.env.DB_USER,
DB_PWD: process.env.DB_PWD,
DB_NAME: process.env.PAAS_DB_NAME,
REDIS_HOST: process.env.REDIS_HOST,
REDIS_PORT: process.env.REDIS_PORT,
REDIS_PWD: process.env.REDIS_PWD,
REDIS_DB: process.env.PAAS_REDIS_DB,
APP_ENV: process.env.APP_ENV ? process.env.APP_ENV : "dev"
};
var settings = {
env: ENVINPUT.APP_ENV,
salt: "%iatpD1gcxz7iF#B",
defaultpwd: "gsb2020",
basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 80,
logindex: "center_manage",
appname: "center_manage",
publickey: function () {
if (this.env == "dev") {
return {
"kty": "RSA",
"n": "qrie8Rrptw5hGJ9fdI8f6QJuLLbTulWkSmFYDQDPu2aXP65wbRhtPMxn6DA9Qh_o29LqtlNd1L5dhY5ma_hXSwNv-FfiQoUkkdFFZ2H_mODnKaLtV5evho9r3_wGa92dxV_UZQVUurhZ7V6gQk0BzrpUuMqZ1JDOcD4iG_bEEZjuRXWpXtKKj7MoXJyTUrOlCyN1yFo7gxM3ee6rImxfDP4nEhKPnL7HqwTcXCQApLJORRluoThEciVXRs8SYk08MtemZUhCq8QjXTvS52S5u5o_osFqs1DnPYHpiAfydOfEweFCgomt7imD5vIjOlUDEBSGE0mRUFCBnM3Qg_idZQ",
"e": "AQAB",
"kid": "dc2c533023a111e9a95769b80b428cd1",
"alg": "ES256"
}
} else {
return {
"kty": "RSA",
"n": "vkjTlSBYiknVYOJZXAGOyckL3aIdxxcR7iBtGtScfmB5xPop3-ZyYIuBnvCDlqx4r33Hut0bBnEbyOCOWPjsL0szsNZO4Ojbzju3INhiXxqJUPsfuPs82zDEuq-MOF2FnxeGeihPY8Va_YPSjZj9ZeN7eUtRP-nct2N4XftOxQrUPwbMAWnfZskMrjiYD-NRsIcwYaKvkvO9sfjzD9Hkp3OVTnz-doVN7FqWTLGAX8veN2bTWOD5vTqfHwhgxFR0jgZgDHMD262zFBj4ULlLlGr2J9zhWPxEOvod58ll_tHA4Q9HLzmol3u8yGuD7heyRmqnF74qEbbal-Xk67uAyw",
"e": "AQAB",
"kid": "e1703c2001dd11e9b50fd525bc2a7e1d",
"alg": "ES256"
};
}
},
kongurl: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
return localsettings.kongurl;
} else {
return "http://kong-dbproxy.kong:8001/";
}
},
icUrl: function () {
if (this.env == "dev") {
return "http://ic.com:8000";
} else {
return "http://icdeliver-service";
}
},
logUrl: function () {
if (this.env == "dev") {
return "http://192.168.1.128:4019/api/queueAction/producer/springBoard";
} else {
return "http://logs-sytxpublic-msgq-service.chaolai/api/queueAction/producer/springBoard";
}
},
pushUrl: function () {
if (this.env == "dev") {
return "http://192.168.18.101:4018/api/queueAction/producer/springBoard";
} else {
return "http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard";
}
},
pmappname: "center-app",
pmappid: 1,
pmcompanyid: 1,
pmroleid: { "ta": 1, "pr": 2 },
redis: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
return localsettings.redis;
} else {
return {
host: ENVINPUT.REDIS_HOST,
port: ENVINPUT.REDIS_PORT,
password: ENVINPUT.REDIS_PWD,
db: ENVINPUT.REDIS_DB,
};
}
},
database: function () {
if (this.env == "dev") {
var localsettings = require("./localsettings");
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>....")
return localsettings.database;
} else {
return {
dbname: ENVINPUT.DB_NAME,
user: ENVINPUT.DB_USER,
password: ENVINPUT.DB_PWD,
config: {
host: ENVINPUT.DB_HOST,
port: ENVINPUT.DB_PORT,
dialect: 'mysql',
operatorsAliases: false,
pool: {
max: 5,
min: 0,
acquire: 90000000,
idle: 1000000
},
debug: false,
logging: false,
timezone: '+08:00',
dialectOptions: {
requestTimeout: 999999,
// instanceName:'DEV'
} //设置MSSQL超时时间
},
};
}
}
};
settings.ENVINPUT = ENVINPUT;
module.exports = settings;
var Server=require('socket.io');
var system = require('../base/system');
var redisClient=system.getObject("util.redisClient");
const notifyCtl=system.getObject("web.socketNotifyCtl");
const msgHistoryService=system.getObject("service.msghistorySve");
class MsgHandler{
constructor(server,client){
this.server=server;
this.client=client;
this.init();
}
notifyClient(ukchannel,msg){
var msgH={msgType:"system",sender:"s¥s¥s¥s",target:msg.to,content:msg.content};
msgHistoryService.create(msgH).then((m)=>{
redisClient.publish(ukchannel,JSON.stringify(msg));
}).catch(e=>{
console.log(e);
});
}
init(){
var self=this;
//转发通信消息
this.client.on("chatmsg",msg=>{
const from=msg.from;
const to=msg.to;
const msgContent=msg.content;
var arrs=to.split("¥");
var tochannel=arrs[0]+"¥"+arrs[1];
//发布消息
//持久化消息
var msgH={msgType:"single",sender:msg.from,target:msg.to,content:msg.content};
msgHistoryService.create(msgH).then((m)=>{
redisClient.publish(tochannel,JSON.stringify(msg));
}).catch(e=>{
console.log(e);
});
//self.server.users[to].emit("chatmsg",msg);
});
//响应消息处理
this.client.on("replymsg",(msg,fn)=>{
var p=null;
var invokeObj= system.getObject("web."+msg.pkgname+"."+msg.cls);
if(invokeObj[msg.method]){
p=invokeObj[msg.method].apply(invokeObj,[msg.data]);
}
p.then(r=>{
fn(r);
}).then(()=>{
console.log("call success")
}).catch(err=>{
console.log(err)
})
});
}
}
class SocketServer{
constructor(httpServer){
this.server=Server(httpServer,{
serveClient: false,
});
this.users={};
this.init();
this.onlines=0;
}
init(){
var self=this;
//挂载到web应用的控制器
notifyCtl.setSocketServer(self);
//订阅广播频道
redisClient.subscribe("brc",self);
//中间件可以在链接事件发出前调用一次
this.server.use((socket,next)=>{
next();
});
this.server.on('connection', function(client){
console.log("connection.....socket");
//链接登录事件
client.on('login', function(data){
console.log("login...........................................................success");
console.log(data);
console.log(client.remoteAddress);
var uk=data.appid+"¥"+data.id;
client.uk=uk;
client.uid=data.id;
client.username=data.nickName;
client.appname=data.appname;
client.appkey=data.appkey;
client.sex=data.sex;
client.imgUrl=data.imgUrl;
self.users[uk]=new MsgHandler(self,client);
//订阅uk私人频道
var ss = redisClient.subscribe(uk,self);
//加入redisClient列表
redisClient.sadd("onlineset"+"¥"+data.appkey,[uk+"¥"+data.nickName+"¥"+data.imgUrl]).then(n=>{
//当前在线
self.onlines=n;
redisClient.publish("brc",JSON.stringify({"type":"online","content":n}));
});
});
//链接断开事件
client.on('disconnect', async function(r){
console.log("connection.........................................dismiss.............");
if(client.uk) {
await redisClient.srem("onlineset"+"¥"+client.appkey,client.uk+"¥"+client.username+"¥"+client.imgUrl);
await redisClient.publish("brc",JSON.stringify({"type":"online","content":(self.onlines--)}));
delete self.users[client.uk];
redisClient.unsubscribe(client.uk);
//redisClient.unsubscribe("brc");
console.log(client.uk+"¥"+client.username+"¥"+client.imgUrl);
}
});
});
}
}
module.exports=SocketServer;
This source diff could not be displayed because it is too large. You can view the blob instead.
.error-page{width:100%;height:100%;position:relative;background:#f8f8f9}.error-page .content-con{width:700px;height:600px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-60%);transform:translate(-50%,-60%)}.error-page .content-con img{display:block;width:100%;height:100%}.error-page .content-con .text-con{position:absolute;left:0;top:0}.error-page .content-con .text-con h4{position:absolute;left:0;top:0;font-size:80px;font-weight:700;color:#348eed}.error-page .content-con .text-con h5{position:absolute;width:700px;left:0;top:100px;font-size:20px;font-weight:700;color:#67647d}.error-page .content-con .back-btn-group{position:absolute;right:0;bottom:20px}
\ No newline at end of file
.ptree span:hover,.spansel{background-color:#d3d3d3}.ivu-split-wrapper{position:relative;width:100%;height:100%}.ivu-split-pane{position:absolute}.ivu-split-pane.left-pane,.ivu-split-pane.right-pane{top:0;bottom:0}.ivu-split-pane.left-pane{left:0}.ivu-split-pane.right-pane{right:0}.ivu-split-pane.bottom-pane,.ivu-split-pane.top-pane{left:0;right:0}.ivu-split-pane.top-pane{top:0}.ivu-split-pane.bottom-pane{bottom:0}.ivu-split-trigger-con{position:absolute;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:10}.ivu-split-trigger-bar-con{position:absolute;overflow:hidden}.ivu-split-trigger-bar-con.vertical{left:1px;top:50%;height:32px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ivu-split-trigger-bar-con.horizontal{left:50%;top:1px;width:32px;-webkit-transform:translate(-50%);transform:translate(-50%)}.ivu-split-trigger-vertical{width:6px;height:100%;background:#f8f8f9;-webkit-box-shadow:0 0 4px 0 rgba(28,36,56,.4);box-shadow:0 0 4px 0 rgba(28,36,56,.4);cursor:col-resize}.ivu-split-trigger-vertical .ivu-split-trigger-bar{width:4px;height:1px;background:rgba(23,35,61,.25);float:left;margin-top:3px}.ivu-split-trigger-horizontal{height:6px;width:100%;background:#f8f8f9;-webkit-box-shadow:0 0 4px 0 rgba(28,36,56,.4);box-shadow:0 0 4px 0 rgba(28,36,56,.4);cursor:row-resize}.ivu-split-trigger-horizontal .ivu-split-trigger-bar{height:4px;width:1px;background:rgba(23,35,61,.25);float:left;margin-right:3px}.ivu-split-horizontal .ivu-split-trigger-con{top:50%;height:100%;width:0}.ivu-split-vertical .ivu-split-trigger-con{left:50%;height:0;width:100%}.ivu-split .no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.split-pane-page-wrapper{height:100%}.split-pane-page-wrapper .pane{width:100%;height:100%}
\ No newline at end of file
.ptree span:hover,.spansel{background-color:#d3d3d3}
\ No newline at end of file
.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text:focus{outline:0}.w-e-menu-panel,.w-e-menu-panel *,.w-e-text-container,.w-e-text-container *,.w-e-toolbar,.w-e-toolbar *{padding:0;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box}.w-e-clear-fix:after{content:"";display:table;clear:both}.w-e-toolbar .w-e-droplist{position:absolute;left:0;top:0;background-color:#fff;border:1px solid #f1f1f1;border-right-color:#ccc;border-bottom-color:#ccc}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover,.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover{background-color:#f1f1f1}.w-e-toolbar .w-e-droplist .w-e-dp-title{text-align:center;color:#999;line-height:2;border-bottom:1px solid #f1f1f1;font-size:13px}.w-e-toolbar .w-e-droplist ul.w-e-list{list-style:none;line-height:1}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item{color:#333;padding:5px 0}.w-e-toolbar .w-e-droplist ul.w-e-block{list-style:none;text-align:left;padding:5px}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item{display:inline-block;padding:3px 5px}@font-face{font-family:w-e-icon;src:url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABhQAAsAAAAAGAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPBGNtYXAAAAFoAAABBAAAAQQrSf4BZ2FzcAAAAmwAAAAIAAAACAAAABBnbHlmAAACdAAAEvAAABLwfpUWUWhlYWQAABVkAAAANgAAADYQp00kaGhlYQAAFZwAAAAkAAAAJAfEA+FobXR4AAAVwAAAAIQAAACEeAcD7GxvY2EAABZEAAAARAAAAERBSEX+bWF4cAAAFogAAAAgAAAAIAAsALZuYW1lAAAWqAAAAYYAAAGGmUoJ+3Bvc3QAABgwAAAAIAAAACAAAwAAAAMD3gGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8fwDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAOgAAAA2ACAABAAWAAEAIOkG6Q3pEulH6Wbpd+m56bvpxunL6d/qDepc6l/qZepo6nHqefAN8BTxIPHc8fz//f//AAAAAAAg6QbpDekS6UfpZel36bnpu+nG6cvp3+oN6lzqX+pi6mjqcep38A3wFPEg8dzx/P/9//8AAf/jFv4W+Bb0FsAWoxaTFlIWURZHFkMWMBYDFbUVsxWxFa8VpxWiEA8QCQ7+DkMOJAADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACAAD/wAQAA8AABAATAAABNwEnAQMuAScTNwEjAQMlATUBBwGAgAHAQP5Anxc7MmOAAYDA/oDAAoABgP6ATgFAQAHAQP5A/p0yOxcBEU4BgP6A/YDAAYDA/oCAAAQAAAAABAADgAAQACEALQA0AAABOAExETgBMSE4ATEROAExITUhIgYVERQWMyEyNjURNCYjBxQGIyImNTQ2MzIWEyE1EwEzNwPA/IADgPyAGiYmGgOAGiYmGoA4KCg4OCgoOED9AOABAEDgA0D9AAMAQCYa/QAaJiYaAwAaJuAoODgoKDg4/biAAYD+wMAAAAIAAABABAADQAA4ADwAAAEmJy4BJyYjIgcOAQcGBwYHDgEHBhUUFx4BFxYXFhceARcWMzI3PgE3Njc2Nz4BNzY1NCcuAScmJwERDQED1TY4OXY8PT8/PTx2OTg2CwcICwMDAwMLCAcLNjg5djw9Pz89PHY5ODYLBwgLAwMDAwsIBwv9qwFA/sADIAgGBggCAgICCAYGCCkqKlktLi8vLi1ZKiopCAYGCAICAgIIBgYIKSoqWS0uLy8uLVkqKin94AGAwMAAAAAAAgDA/8ADQAPAABsAJwAAASIHDgEHBhUUFx4BFxYxMDc+ATc2NTQnLgEnJgMiJjU0NjMyFhUUBgIAQjs6VxkZMjJ4MjIyMngyMhkZVzo7QlBwcFBQcHADwBkZVzo7Qnh9fcxBQUFBzH19eEI7OlcZGf4AcFBQcHBQUHAAAAEAAAAABAADgAArAAABIgcOAQcGBycRISc+ATMyFx4BFxYVFAcOAQcGBxc2Nz4BNzY1NCcuAScmIwIANTIyXCkpI5YBgJA1i1BQRUZpHh4JCSIYGB5VKCAgLQwMKCiLXl1qA4AKCycbHCOW/oCQNDweHmlGRVArKClJICEaYCMrK2I2NjlqXV6LKCgAAQAAAAAEAAOAACoAABMUFx4BFxYXNyYnLgEnJjU0Nz4BNzYzMhYXByERByYnLgEnJiMiBw4BBwYADAwtICAoVR4YGCIJCR4eaUZFUFCLNZABgJYjKSlcMjI1al1eiygoAYA5NjZiKysjYBohIEkpKCtQRUZpHh48NJABgJYjHBsnCwooKIteXQAAAAACAAAAQAQBAwAAJgBNAAATMhceARcWFRQHDgEHBiMiJy4BJyY1JzQ3PgE3NjMVIgYHDgEHPgEhMhceARcWFRQHDgEHBiMiJy4BJyY1JzQ3PgE3NjMVIgYHDgEHPgHhLikpPRESEhE9KSkuLikpPRESASMjelJRXUB1LQkQBwgSAkkuKSk9ERISET0pKS4uKSk9ERIBIyN6UlFdQHUtCRAHCBICABIRPSkpLi4pKT0REhIRPSkpLiBdUVJ6IyOAMC4IEwoCARIRPSkpLi4pKT0REhIRPSkpLiBdUVJ6IyOAMC4IEwoCAQAABgBA/8AEAAPAAAMABwALABEAHQApAAAlIRUhESEVIREhFSEnESM1IzUTFTMVIzU3NSM1MxUVESM1MzUjNTM1IzUBgAKA/YACgP2AAoD9gMBAQECAwICAwMCAgICAgIACAIACAIDA/wDAQP3yMkCSPDJAku7+wEBAQEBAAAYAAP/ABAADwAADAAcACwAXACMALwAAASEVIREhFSERIRUhATQ2MzIWFRQGIyImETQ2MzIWFRQGIyImETQ2MzIWFRQGIyImAYACgP2AAoD9gAKA/YD+gEs1NUtLNTVLSzU1S0s1NUtLNTVLSzU1SwOAgP8AgP8AgANANUtLNTVLS/61NUtLNTVLS/61NUtLNTVLSwADAAAAAAQAA6AAAwANABQAADchFSElFSE1EyEVITUhJQkBIxEjEQAEAPwABAD8AIABAAEAAQD9YAEgASDggEBAwEBAAQCAgMABIP7g/wABAAAAAAACAB7/zAPiA7QAMwBkAAABIiYnJicmNDc2PwE+ATMyFhcWFxYUBwYPAQYiJyY0PwE2NCcuASMiBg8BBhQXFhQHDgEjAyImJyYnJjQ3Nj8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFxYUBwYPAQ4BIwG4ChMIIxISEhIjwCNZMTFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PCBMKuDFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PDysQIxISEhIjwCNZMQFECAckLS1eLS0kwCIlJSIkLS1eLS0kVxAQDysPWCl0KRQVFRTAKXQpDysQBwj+iCUiJC0tXi0tJFcQEA8rD1gpdCkUFRUUwCl0KQ8rEA8PJC0tXi0tJMAiJQAAAAAFAAD/wAQAA8AAGwA3AFMAXwBrAAAFMjc+ATc2NTQnLgEnJiMiBw4BBwYVFBceARcWEzIXHgEXFhUUBw4BBwYjIicuAScmNTQ3PgE3NhMyNz4BNzY3BgcOAQcGIyInLgEnJicWFx4BFxYnNDYzMhYVFAYjIiYlNDYzMhYVFAYjIiYCAGpdXosoKCgoi15dampdXosoKCgoi15dalZMTHEgISEgcUxMVlZMTHEgISEgcUxMVisrKlEmJiMFHBtWODc/Pzc4VhscBSMmJlEqK9UlGxslJRsbJQGAJRsbJSUbGyVAKCiLXl1qal1eiygoKCiLXl1qal1eiygoA6AhIHFMTFZWTExxICEhIHFMTFZWTExxICH+CQYGFRAQFEM6OlYYGRkYVjo6QxQQEBUGBvcoODgoKDg4KCg4OCgoODgAAAMAAP/ABAADwAAbADcAQwAAASIHDgEHBhUUFx4BFxYzMjc+ATc2NTQnLgEnJgMiJy4BJyY1NDc+ATc2MzIXHgEXFhUUBw4BBwYTBycHFwcXNxc3JzcCAGpdXosoKCgoi15dampdXosoKCgoi15dalZMTHEgISEgcUxMVlZMTHEgISEgcUxMSqCgYKCgYKCgYKCgA8AoKIteXWpqXV6LKCgoKIteXWpqXV6LKCj8YCEgcUxMVlZMTHEgISEgcUxMVlZMTHEgIQKgoKBgoKBgoKBgoKAAAQBl/8ADmwPAACkAAAEiJiMiBw4BBwYVFBYzLgE1NDY3MAcGAgcGBxUhEzM3IzceATMyNjcOAQMgRGhGcVNUbRobSUgGDWVKEBBLPDxZAT1sxizXNC1VJi5QGB09A7AQHh1hPj9BTTsLJjeZbwN9fv7Fj5AjGQIAgPYJDzdrCQcAAAAAAgAAAAAEAAOAAAkAFwAAJTMHJzMRIzcXIyURJyMRMxUhNTMRIwcRA4CAoKCAgKCggP8AQMCA/oCAwEDAwMACAMDAwP8AgP1AQEACwIABAAADAMAAAANAA4AAFgAfACgAAAE+ATU0Jy4BJyYjIREhMjc+ATc2NTQmATMyFhUUBisBEyMRMzIWFRQGAsQcIBQURi4vNf7AAYA1Ly5GFBRE/oRlKjw8KWafn58sPj4B2yJULzUvLkYUFPyAFBRGLi81RnQBRks1NUv+gAEASzU1SwAAAAACAMAAAANAA4AAHwAjAAABMxEUBw4BBwYjIicuAScmNREzERQWFx4BMzI2Nz4BNQEhFSECwIAZGVc6O0JCOzpXGRmAGxgcSSgoSRwYG/4AAoD9gAOA/mA8NDVOFhcXFk41NDwBoP5gHjgXGBsbGBc4Hv6ggAAAAAABAIAAAAOAA4AACwAAARUjATMVITUzASM1A4CA/sCA/kCAAUCAA4BA/QBAQAMAQAABAAAAAAQAA4AAPQAAARUjHgEVFAYHDgEjIiYnLgE1MxQWMzI2NTQmIyE1IS4BJy4BNTQ2Nz4BMzIWFx4BFSM0JiMiBhUUFjMyFhcEAOsVFjUwLHE+PnEsMDWAck5OcnJO/gABLAIEATA1NTAscT4+cSwwNYByTk5yck47bisBwEAdQSI1YiQhJCQhJGI1NExMNDRMQAEDASRiNTViJCEkJCEkYjU0TEw0NEwhHwAAAAcAAP/ABAADwAADAAcACwAPABMAGwAjAAATMxUjNzMVIyUzFSM3MxUjJTMVIwMTIRMzEyETAQMhAyMDIQMAgIDAwMABAICAwMDAAQCAgBAQ/QAQIBACgBD9QBADABAgEP2AEAHAQEBAQEBAQEBAAkD+QAHA/oABgPwAAYD+gAFA/sAAAAoAAAAABAADgAADAAcACwAPABMAFwAbAB8AIwAnAAATESERATUhFR0BITUBFSE1IxUhNREhFSElIRUhETUhFQEhFSEhNSEVAAQA/YABAP8AAQD/AED/AAEA/wACgAEA/wABAPyAAQD/AAKAAQADgPyAA4D9wMDAQMDAAgDAwMDA/wDAwMABAMDA/sDAwMAAAAUAAAAABAADgAADAAcACwAPABMAABMhFSEVIRUhESEVIREhFSERIRUhAAQA/AACgP2AAoD9gAQA/AAEAPwAA4CAQID/AIABQID/AIAAAAAABQAAAAAEAAOAAAMABwALAA8AEwAAEyEVIRchFSERIRUhAyEVIREhFSEABAD8AMACgP2AAoD9gMAEAPwABAD8AAOAgECA/wCAAUCA/wCAAAAFAAAAAAQAA4AAAwAHAAsADwATAAATIRUhBSEVIREhFSEBIRUhESEVIQAEAPwAAYACgP2AAoD9gP6ABAD8AAQA/AADgIBAgP8AgAFAgP8AgAAAAAABAD8APwLmAuYALAAAJRQPAQYjIi8BBwYjIi8BJjU0PwEnJjU0PwE2MzIfATc2MzIfARYVFA8BFxYVAuYQThAXFxCoqBAXFhBOEBCoqBAQThAWFxCoqBAXFxBOEBCoqBDDFhBOEBCoqBAQThAWFxCoqBAXFxBOEBCoqBAQThAXFxCoqBAXAAAABgAAAAADJQNuABQAKAA8AE0AVQCCAAABERQHBisBIicmNRE0NzY7ATIXFhUzERQHBisBIicmNRE0NzY7ATIXFhcRFAcGKwEiJyY1ETQ3NjsBMhcWExEhERQXFhcWMyEyNzY3NjUBIScmJyMGBwUVFAcGKwERFAcGIyEiJyY1ESMiJyY9ATQ3NjsBNzY3NjsBMhcWHwEzMhcWFQElBgUIJAgFBgYFCCQIBQaSBQUIJQgFBQUFCCUIBQWSBQUIJQgFBQUFCCUIBQVJ/gAEBAUEAgHbAgQEBAT+gAEAGwQGtQYEAfcGBQg3Ghsm/iUmGxs3CAUFBQUIsSgIFxYXtxcWFgkosAgFBgIS/rcIBQUFBQgBSQgFBgYFCP63CAUFBQUIAUkIBQYGBQj+twgFBQUFCAFJCAUGBgX+WwId/eMNCwoFBQUFCgsNAmZDBQICBVUkCAYF/eMwIiMhIi8CIAUGCCQIBQVgFQ8PDw8VYAUFCAACAAcASQO3Aq8AGgAuAAAJAQYjIi8BJjU0PwEnJjU0PwE2MzIXARYVFAcBFRQHBiMhIicmPQE0NzYzITIXFgFO/vYGBwgFHQYG4eEGBh0FCAcGAQoGBgJpBQUI/dsIBQUFBQgCJQgFBQGF/vYGBhwGCAcG4OEGBwcGHQUF/vUFCAcG/vslCAUFBQUIJQgFBQUFAAAAAQAjAAAD3QNuALMAACUiJyYjIgcGIyInJjU0NzY3Njc2NzY9ATQnJiMhIgcGHQEUFxYXFjMWFxYVFAcGIyInJiMiBwYjIicmNTQ3Njc2NzY3Nj0BETQ1NDU0JzQnJicmJyYnJicmIyInJjU0NzYzMhcWMzI3NjMyFxYVFAcGIwYHBgcGHQEUFxYzITI3Nj0BNCcmJyYnJjU0NzYzMhcWMzI3NjMyFxYVFAcGByIHBgcGFREUFxYXFhcyFxYVFAcGIwPBGTMyGhkyMxkNCAcJCg0MERAKEgEHFf5+FgcBFQkSEw4ODAsHBw4bNTUaGDExGA0HBwkJCwwQDwkSAQIBAgMEBAUIEhENDQoLBwcOGjU1GhgwMRgOBwcJCgwNEBAIFAEHDwGQDgcBFAoXFw8OBwcOGTMyGRkxMRkOBwcKCg0NEBEIFBQJEREODQoLBwcOAAICAgIMCw8RCQkBAQMDBQxE4AwFAwMFDNRRDQYBAgEICBIPDA0CAgICDAwOEQgJAQIDAwUNRSEB0AINDQgIDg4KCgsLBwcDBgEBCAgSDwwNAgICAg0MDxEICAECAQYMULYMBwEBBwy2UAwGAQEGBxYPDA0CAgICDQwPEQgIAQECBg1P/eZEDAYCAgEJCBEPDA0AAAIAAP+3A/8DtwATADkAAAEyFxYVFAcCBwYjIicmNTQ3ATYzARYXFh8BFgcGIyInJicmJyY1FhcWFxYXFjMyNzY3Njc2NzY3NjcDmygeHhq+TDdFSDQ0NQFtISn9+BcmJy8BAkxMe0c2NiEhEBEEExQQEBIRCRcIDxITFRUdHR4eKQO3GxooJDP+mUY0NTRJSTABSx/9sSsfHw0oek1MGhsuLzo6RAMPDgsLCgoWJRsaEREKCwQEAgABAAAAAAAA9evv618PPPUACwQAAAAAANbEBFgAAAAA1sQEWAAA/7cEAQPAAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAD//wQBAAEAAAAAAAAAAAAAAAAAAAAhBAAAAAAAAAAAAAAAAgAAAAQAAAAEAAAABAAAAAQAAMAEAAAABAAAAAQAAAAEAABABAAAAAQAAAAEAAAeBAAAAAQAAAAEAABlBAAAAAQAAMAEAADABAAAgAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAMlAD8DJQAAA74ABwQAACMD/wAAAAAAAAAKABQAHgBMAJQA+AE2AXwBwgI2AnQCvgLoA34EHgSIBMoE8gU0BXAFiAXgBiIGagaSBroG5AcoB+AIKgkcCXgAAQAAACEAtAAKAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format("truetype");font-weight:400;font-style:normal}[class*=" w-e-icon-"],[class^=w-e-icon-]{font-family:w-e-icon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.w-e-icon-close:before{content:"\F00D"}.w-e-icon-upload2:before{content:"\E9C6"}.w-e-icon-trash-o:before{content:"\F014"}.w-e-icon-header:before{content:"\F1DC"}.w-e-icon-pencil2:before{content:"\E906"}.w-e-icon-paint-brush:before{content:"\F1FC"}.w-e-icon-image:before{content:"\E90D"}.w-e-icon-play:before{content:"\E912"}.w-e-icon-location:before{content:"\E947"}.w-e-icon-undo:before{content:"\E965"}.w-e-icon-redo:before{content:"\E966"}.w-e-icon-quotes-left:before{content:"\E977"}.w-e-icon-list-numbered:before{content:"\E9B9"}.w-e-icon-list2:before{content:"\E9BB"}.w-e-icon-link:before{content:"\E9CB"}.w-e-icon-happy:before{content:"\E9DF"}.w-e-icon-bold:before{content:"\EA62"}.w-e-icon-underline:before{content:"\EA63"}.w-e-icon-italic:before{content:"\EA64"}.w-e-icon-strikethrough:before{content:"\EA65"}.w-e-icon-table2:before{content:"\EA71"}.w-e-icon-paragraph-left:before{content:"\EA77"}.w-e-icon-paragraph-center:before{content:"\EA78"}.w-e-icon-paragraph-right:before{content:"\EA79"}.w-e-icon-terminal:before{content:"\F120"}.w-e-icon-page-break:before{content:"\EA68"}.w-e-icon-cancel-circle:before{content:"\EA0D"}.w-e-icon-font:before{content:"\EA5C"}.w-e-icon-text-heigh:before{content:"\EA5F"}.w-e-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 5px}.w-e-toolbar .w-e-menu{position:relative;text-align:center;padding:5px 10px;cursor:pointer}.w-e-toolbar .w-e-menu i{color:#999}.w-e-toolbar .w-e-menu:hover i{color:#333}.w-e-toolbar .w-e-active:hover i,.w-e-toolbar .w-e-active i{color:#1e88e5}.w-e-text-container .w-e-panel-container{position:absolute;top:0;left:50%;border:1px solid #ccc;border-top:0;-webkit-box-shadow:1px 1px 2px #ccc;box-shadow:1px 1px 2px #ccc;color:#333;background-color:#fff}.w-e-text-container .w-e-panel-container .w-e-panel-close{position:absolute;right:0;top:0;padding:5px;margin:2px 5px 0 0;cursor:pointer;color:#999}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover{color:#333}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title{list-style:none;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;margin:2px 10px 0;border-bottom:1px solid #f1f1f1}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item{padding:3px 5px;color:#999;cursor:pointer;margin:0 3px;position:relative;top:1px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active{color:#333;border-bottom:1px solid #333;cursor:default;font-weight:700}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content{padding:10px 15px;font-size:16px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea{width:100%;border:1px solid #ccc;padding:5px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus{border-color:#1e88e5}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]{border:none;border-bottom:1px solid #ccc;font-size:14px;height:20px;color:#333;text-align:left}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small{width:30px;text-align:center}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block{display:block;width:100%;margin:10px 0}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus{border-bottom:2px solid #1e88e5}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button{font-size:14px;color:#1e88e5;border:none;padding:5px 10px;background-color:#fff;cursor:pointer;border-radius:3px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left{float:left;margin-right:10px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right{float:right;margin-left:10px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray{color:#999}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red{color:#c24f4a}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover{background-color:#f1f1f1}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after{content:"";display:table;clear:both}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item{cursor:pointer;font-size:18px;padding:0 3px;display:inline-block}.w-e-text-container .w-e-panel-container .w-e-up-img-container{text-align:center}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn{display:inline-block;color:#999;cursor:pointer;font-size:60px;line-height:1}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover{color:#333}.w-e-text-container{position:relative}.w-e-text-container .w-e-progress{position:absolute;background-color:#1e88e5;bottom:0;left:0;height:1px}.w-e-text{padding:0 10px;overflow-y:scroll}.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text p,.w-e-text pre,.w-e-text table{margin:10px 0;line-height:1.5}.w-e-text ol,.w-e-text ul{margin:10px 0 10px 20px}.w-e-text blockquote{display:block;border-left:8px solid #d0e5f2;padding:5px 10px;margin:10px 0;line-height:1.4;font-size:100%;background-color:#f1f1f1}.w-e-text code{display:inline-block;background-color:#f1f1f1;border-radius:3px;padding:3px 5px;margin:0 3px}.w-e-text pre code{display:block}.w-e-text table{border-top:1px solid #ccc;border-left:1px solid #ccc}.w-e-text table td,.w-e-text table th{border-bottom:1px solid #ccc;border-right:1px solid #ccc;padding:3px 5px}.w-e-text table th{border-bottom:2px solid #ccc;text-align:center}.w-e-text img{cursor:pointer}.w-e-text img:hover{-webkit-box-shadow:0 0 5px #333;box-shadow:0 0 5px #333}.editor-wrapper *{z-index:100!important}.message-page-con{height:calc(100vh - 176px);display:inline-block;vertical-align:top;position:relative}.message-page-con.message-category-con{border-right:1px solid #e6e6e6;width:200px}.message-page-con.message-list-con{border-right:1px solid #e6e6e6;width:230px}.message-page-con.message-view-con{position:absolute;left:446px;top:16px;right:16px;bottom:16px;overflow:auto;padding:12px 20px 0}.message-page-con.message-view-con .message-view-header{margin-bottom:20px}.message-page-con.message-view-con .message-view-header .message-view-title{display:inline-block}.message-page-con.message-view-con .message-view-header .message-view-time{margin-left:20px}.message-page-con .category-title{display:inline-block;width:65px}.message-page-con .gray-dadge{background:#dcdcdc}.message-page-con .not-unread-list .msg-title{color:#aaa9a9}.message-page-con .not-unread-list .ivu-menu-item .ivu-btn.ivu-btn-text.ivu-btn-small.ivu-btn-icon-only{display:none}.message-page-con .not-unread-list .ivu-menu-item:hover .ivu-btn.ivu-btn-text.ivu-btn-small.ivu-btn-icon-only{display:inline-block}.message-page-con{overflow:auto}.demo-drawer-footer{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.w-e-menu{z-index:2!important}.w-e-text-container{z-index:1!important}
\ No newline at end of file
.error-page{width:100%;height:100%;position:relative;background:#f8f8f9}.error-page .content-con{width:700px;height:600px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-60%);transform:translate(-50%,-60%)}.error-page .content-con img{display:block;width:100%;height:100%}.error-page .content-con .text-con{position:absolute;left:0;top:0}.error-page .content-con .text-con h4{position:absolute;left:0;top:0;font-size:80px;font-weight:700;color:#348eed}.error-page .content-con .text-con h5{position:absolute;width:700px;left:0;top:100px;font-size:20px;font-weight:700;color:#67647d}.error-page .content-con .back-btn-group{position:absolute;right:0;bottom:20px}
\ No newline at end of file
.error-page{width:100%;height:100%;position:relative;background:#f8f8f9}.error-page .content-con{width:700px;height:600px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-60%);transform:translate(-50%,-60%)}.error-page .content-con img{display:block;width:100%;height:100%}.error-page .content-con .text-con{position:absolute;left:0;top:0}.error-page .content-con .text-con h4{position:absolute;left:0;top:0;font-size:80px;font-weight:700;color:#348eed}.error-page .content-con .text-con h5{position:absolute;width:700px;left:0;top:100px;font-size:20px;font-weight:700;color:#67647d}.error-page .content-con .back-btn-group{position:absolute;right:0;bottom:20px}
\ No newline at end of file
.demo-upload-list{display:inline-block;width:60px;height:60px;text-align:center;line-height:60px;border:1px solid transparent;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2);margin-right:4px}.demo-upload-list img{width:100%;height:100%}.demo-upload-list-cover{display:none;position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.6)}.demo-upload-list:hover .demo-upload-list-cover{display:block}.demo-upload-list-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}
\ No newline at end of file
.count-style{font-size:50px}.blockhover:hover{border-color:#d3d3d3;cursor:pointer}
\ No newline at end of file
.ptree span:hover,.spansel{background-color:#d3d3d3}
\ No newline at end of file
.ptree span:hover,.spansel{background-color:#d3d3d3}
\ No newline at end of file
.login{width:100%;height:100%;background-image:url(../img/login-bg.0899ffa6.jpg);background-size:cover;background-position:50%;position:relative}.login-con{position:absolute;right:160px;top:50%;-webkit-transform:translateY(-60%);transform:translateY(-60%);width:350px}.login-con-header{font-size:16px;font-weight:300;text-align:center;padding:30px 0}.login-con .form-con{padding:10px 0 0}.login-con .login-tip{font-size:10px;text-align:center;color:#c3c3c3}
\ No newline at end of file
.ptree span:hover,.spansel{background-color:#d3d3d3}
\ No newline at end of file
.ptree span:hover,.spansel{background-color:#d3d3d3}
\ No newline at end of file
.org-tree-container{display:inline-block;padding:15px;background-color:#fff}.org-tree{display:table;text-align:center}.org-tree:after,.org-tree:before{content:"";display:table;pointer-events:none}.org-tree:after{clear:both;pointer-events:none}.org-tree-node,.org-tree-node-children{position:relative;margin:0 auto;padding:0;list-style-type:none}.org-tree-node-children:after,.org-tree-node-children:before,.org-tree-node:after,.org-tree-node:before{-webkit-transition:all .35s;transition:all .35s;pointer-events:none}.org-tree-node-label{position:relative;display:inline-block}.org-tree-node-label .org-tree-node-label-inner{padding:10px 15px;text-align:center;border-radius:3px;-webkit-box-shadow:0 1px 5px rgba(0,0,0,.15);box-shadow:0 1px 5px rgba(0,0,0,.15)}.org-tree-button-wrapper{position:absolute;top:100%;left:50%;width:0;height:0;z-index:10;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.org-tree-button-wrapper>*{position:absolute;top:50%;left:50%}.org-tree-button-wrapper .org-tree-node-btn{position:relative;display:inline-block;width:20px;height:20px;background-color:#fff;border:1px solid #ccc;border-radius:50%;-webkit-box-shadow:0 0 2px rgba(0,0,0,.15);box-shadow:0 0 2px rgba(0,0,0,.15);cursor:pointer;-webkit-transition:all .35s ease;transition:all .35s ease;-webkit-transform:translate(-50%,9px);transform:translate(-50%,9px)}.org-tree-button-wrapper .org-tree-node-btn:hover{background-color:#e7e8e9;-webkit-transform:translate(-50%,9px) scale(1.15);transform:translate(-50%,9px) scale(1.15)}.org-tree-button-wrapper .org-tree-node-btn:after,.org-tree-button-wrapper .org-tree-node-btn:before{content:"";position:absolute;pointer-events:none}.org-tree-button-wrapper .org-tree-node-btn:before{top:50%;left:4px;right:4px;height:0;border-top:1px solid #ccc}.org-tree-button-wrapper .org-tree-node-btn:after{top:4px;left:50%;bottom:4px;width:0;border-left:1px solid #ccc;pointer-events:none}.org-tree-button-wrapper .org-tree-node-btn.expanded:after{border:none;pointer-events:none}.org-tree-node{padding-top:20px;display:table-cell;vertical-align:top}.org-tree-node.collapsed,.org-tree-node.is-leaf{padding-left:10px;padding-right:10px}.org-tree-node:after,.org-tree-node:before{pointer-events:none;content:"";position:absolute;top:0;left:0;width:50%;height:19px}.org-tree-node:after{left:50%;border-left:1px solid #ddd;pointer-events:none}.org-tree-node:not(:first-child):before,.org-tree-node:not(:last-child):after{border-top:1px solid #ddd;pointer-events:none}.collapsable .org-tree-node.collapsed{padding-bottom:30px}.collapsable .org-tree-node.collapsed .org-tree-node-label:after{content:"";position:absolute;top:100%;left:0;width:50%;height:20px;border-right:1px solid #ddd;pointer-events:none}.org-tree>.org-tree-node{padding-top:0}.org-tree>.org-tree-node:after{border-left:0;pointer-events:none}.org-tree-node-children{padding-top:20px;display:table}.org-tree-node-children:before{content:"";position:absolute;top:0;left:50%;width:0;height:20px;border-left:1px solid #ddd}.org-tree-node-children:after{content:"";display:table;clear:both;pointer-events:none}.horizontal .org-tree-node{display:table-cell;float:none;padding-top:0;padding-left:20px}.horizontal .org-tree-node.collapsed,.horizontal .org-tree-node.is-leaf{padding-top:10px;padding-bottom:10px}.horizontal .org-tree-node:after,.horizontal .org-tree-node:before{width:19px;height:50%;pointer-events:none}.horizontal .org-tree-node:after{top:50%;left:0;border-left:0;pointer-events:none}.horizontal .org-tree-node:only-child:before{top:1px;border-bottom:1px solid #ddd}.horizontal .org-tree-node:not(:first-child):before,.horizontal .org-tree-node:not(:last-child):after{border-top:0;border-left:1px solid #ddd;pointer-events:none}.horizontal .org-tree-node:not(:only-child):after{border-top:1px solid #ddd;pointer-events:none}.horizontal .org-tree-node .org-tree-node-inner{display:table}.horizontal .org-tree-node-label{display:table-cell;vertical-align:middle}.horizontal.collapsable .org-tree-node.collapsed{padding-right:30px}.horizontal.collapsable .org-tree-node.collapsed .org-tree-node-label:after{top:0;left:100%;width:20px;height:50%;border-right:0;border-bottom:.625em solid #ddd;pointer-events:none}.horizontal .org-tree-button-wrapper{position:absolute;top:50%;left:100%;width:0;height:0;z-index:10;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.horizontal .org-tree-button-wrapper>*{position:absolute;top:50%;left:50%}.horizontal .org-tree-button-wrapper .org-tree-node-btn{display:inline-block;-webkit-transform:translate(9PX,-50%);transform:translate(9PX,-50%)}.horizontal>.org-tree-node:only-child:before{border-bottom:0}.horizontal .org-tree-node-children{display:table-cell;padding-top:0;padding-left:20px}.horizontal .org-tree-node-children:before{top:50%;left:0;width:20px;height:0;border-left:0;border-top:1px solid #ddd}.horizontal .org-tree-node-children:after{display:none}.horizontal .org-tree-node-children>.org-tree-node{display:block}
\ No newline at end of file
<svg id="11567813-e781-4e7f-9d62-924af5cdcf5c" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="883.34" height="785.3" viewBox="0 0 883.34 785.3"><defs><linearGradient id="de64225e-aed0-4729-9589-fefa50377364" x1="586.34" y1="777.6" x2="586.34" y2="296.43" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient><linearGradient id="c2d29fed-0e3c-4665-9fc2-6bc8bc700b9c" x1="665.58" y1="818.95" x2="665.58" y2="130.43" gradientTransform="matrix(-1, 0, 0, 1, 1038, 0)" xlink:href="#de64225e-aed0-4729-9589-fefa50377364"/><linearGradient id="c8cc5a91-18e5-403f-9b97-91f48ba2f890" x1="832.33" y1="380.69" x2="1046.36" y2="380.69" gradientTransform="matrix(-1, 0, 0, 1, 1874, 0)" xlink:href="#de64225e-aed0-4729-9589-fefa50377364"/></defs><title>tasting</title><ellipse cx="428.11" cy="662.98" rx="428.11" ry="122.32" fill="#f5f5f5"/><path d="M818.56,450.17s-53,37.48-39,109-74.44,171.26-74.44,171.26.76,0,2.18,0c95.73-.47,160.12-98.82,122-186.63C815.15,511.16,805.28,474,818.56,450.17Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M818.56,450.17s-35,51.08-17.27,100.7-25.15,173-96.14,179.56" transform="translate(-158.33 -57.35)" fill="none" stroke="#535461" stroke-miterlimit="10"/><path d="M867.76,647s-50.21-17.07-62.85,28.39S696.6,711,696.6,711s.54.53,1.57,1.48c69.29,64.64,147.12,58.84,147.54-11.15C845.87,675.32,850.57,650,867.76,647Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M867.76,647s-50.21-17.07-62.85,28.39S696.6,711,696.6,711s.54.53,1.57,1.48c69.29,64.64,147.12,58.84,147.54-11.15C845.87,675.32,850.57,650,867.76,647Z" transform="translate(-158.33 -57.35)" fill="#f5f5f5" opacity="0.2"/><path d="M867.76,647s-41.58,1.93-44.54,38.92S750,755.8,696.6,711" transform="translate(-158.33 -57.35)" fill="none" stroke="#535461" stroke-miterlimit="10"/><path d="M779.61,543.22c3-15,2.31-36.85-22.23-47.49,13.12-21.09,6.95-36-4.91-41.29-.08-5.5-1.52-16.66-11.18-22.65,1.28-10.38,3.36-51.64-43.26-56.26-5.47-9.44-22.59-35-50.48-42.08v-37c-6.72,14.11-49,22.17-49,22.17-48.46,6.77-59.33,34.15-61.78,46.11-6.24.19-11.73,1-14.82,2.94-10.16,6.35-82.68,25.3-77,75.54-1,.34-1.94.68-2.91,1,0,0-39.67,31.65-29,56.82l-4,.29s-23,14.22-15.93,42.24a8.45,8.45,0,0,0-2,7.69l54.69,182.29A5.86,5.86,0,0,0,448,736.7c2.47,1.72,7.6,5.15,15.08,9.31l.06.29.33-.07a245.79,245.79,0,0,0,26.32,12.55l0,.21.33-.06c6.34,2.57,13.29,5.09,20.8,7.41l0,.16.33,0c6.95,2.13,14.37,4.09,22.22,5.75v.1l.33,0c7.37,1.55,15.13,2.83,23.23,3.75v0h.31a246.37,246.37,0,0,0,30,1.52v0h.67v0a246.48,246.48,0,0,0,28.06-2h.33v-.06q11.29-1.46,23.09-4.09l-.08.78.67.07.1-1q11.77-2.68,24-6.69l.33,0,0-.16q10.16-3.37,20.59-7.74l.33.06,0-.22q12.09-5.11,24.5-11.71l.33.07.06-.28q7-3.75,14.11-8a5.88,5.88,0,0,0,2.6-3.36l54.51-182.43a8.46,8.46,0,0,0-2-7.67Z" transform="translate(-158.33 -57.35)" fill="url(#de64225e-aed0-4729-9589-fefa50377364)"/><path d="M695.81,384.81s-24.6-50.5-71.22-45.32,3.24,53.09,3.24,53.09S684.81,397.11,695.81,384.81Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M695.81,384.81s-24.6-50.5-71.22-45.32,3.24,53.09,3.24,53.09S684.81,397.11,695.81,384.81Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M537.84,376.39s0-.66.12-1.82c.83-8.09,7.46-40.67,60.09-48,0,0,40.79-7.77,47.26-21.37v41.44s-8.42,29.14-50.5,38.85S537.84,376.39,537.84,376.39Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M415.47,502.64S385,521.42,406.4,558.32s361.28,0,361.28,0,22-45.32-17.48-61.51S415.47,502.64,415.47,502.64Z" transform="translate(-158.33 -57.35)" fill="#784f69"/><path d="M746.75,458.74c-.08-5.3-1.47-16-10.78-21.82,1.23-10,3.25-49.77-41.69-54.22-5.28-9.1-21.76-33.78-48.65-40.55V306.46c-6.47,13.6-47.26,21.37-47.26,21.37-46.7,6.53-57.18,32.91-59.53,44.43-6,.18-11.3,1-14.28,2.83-9.79,6.12-79.68,24.38-74.25,72.8-.94.32-1.87.66-2.8,1,0,0-55.1,44-15.15,68.31h0s18.39,35.29,72.13,8.09l.17-.11c20.24,5.81,74.47,18,106.66-6.37l2.31-1.75c12.8,7.63,43.13,21.58,68.91,1.75l.22-.17c10,9.41,30.35,21.39,54.81-3.07C766.86,486.31,761.17,465.2,746.75,458.74Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M675.74,509.76s26.55,39.49,61.51,4.53,20.07-58.27,0-58.92S675.74,509.76,675.74,509.76Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M675.74,509.76s26.55,39.49,61.51,4.53,20.07-58.27,0-58.92S675.74,509.76,675.74,509.76Z" transform="translate(-158.33 -57.35)" opacity="0.15"/><path d="M746.32,460.56s6.47-55-77-12.95-62.16,64.1-62.16,64.1,41.44,31.73,75.1,5.83S736.6,483.87,746.32,460.56Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M746.32,460.56s6.47-55-77-12.95-62.16,64.1-62.16,64.1,41.44,31.73,75.1,5.83S736.6,483.87,746.32,460.56Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M682.22,443.72s-31.73-22-80.28,0S496.4,521.42,496.4,521.42,570.86,548,611,517.53,680.28,464.44,682.22,443.72Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M682.22,443.72s-31.73-22-80.28,0S496.4,521.42,496.4,521.42,570.86,548,611,517.53,680.28,464.44,682.22,443.72Z" transform="translate(-158.33 -57.35)" opacity="0.07"/><path d="M616.83,440.49s-64.75-9.06-94.53,9.06S432,515.92,432,515.92s18.39,35.29,72.13,8.09C504.17,524,615.53,454.73,616.83,440.49Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M616.83,440.49s-64.75-9.06-94.53,9.06S432,515.92,432,515.92s18.39,35.29,72.13,8.09C504.17,524,615.53,454.73,616.83,440.49Z" transform="translate(-158.33 -57.35)" opacity="0.03"/><path d="M447.19,447.61s-57.62,46-12.3,69.93c0,0,95.82-62.8,97.77-69.93C532.66,447.61,488,432.07,447.19,447.61Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M572.8,373.8s-38.2-6.47-48.56,0-88.05,26.55-72.52,81.58L475,447S519.71,390.63,572.8,373.8Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M572.8,373.8s-38.2-6.47-48.56,0-88.05,26.55-72.52,81.58L475,447S519.71,390.63,572.8,373.8Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M636.25,382.22s-27.19-25.25-87.41-1.94-80.28,65.39-80.28,65.39l90.32,6.8S609.7,379.63,636.25,382.22Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M636.25,382.22s-27.19-25.25-87.41-1.94-80.28,65.39-80.28,65.39l90.32,6.8S609.7,379.63,636.25,382.22Z" transform="translate(-158.33 -57.35)" opacity="0.07"/><path d="M678.33,385.45s-43.38-14.24-77,5.18-46,57.62-46,57.62l53.74-2.59S651.14,379.63,678.33,385.45Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M678.33,385.45s-43.38-14.24-77,5.18-46,57.62-46,57.62l53.74-2.59S651.14,379.63,678.33,385.45Z" transform="translate(-158.33 -57.35)" opacity="0.03"/><path d="M735.31,437.9s14.89-75.75-83.52-52.44c0,0-55.93,49.21-40.26,62.8S735.31,437.9,735.31,437.9Z" transform="translate(-158.33 -57.35)" fill="#348eed"/><path d="M398.14,549.47l52.7,175.67a5.65,5.65,0,0,0,2.17,3c14.71,10.29,127.89,83.3,266.49,0a5.67,5.67,0,0,0,2.5-3.24l52.53-175.8a5.67,5.67,0,0,0-6.81-7.12l-22.82,5.7a5.67,5.67,0,0,1-2.4.08l-21.45-4a5.67,5.67,0,0,0-3.7.57l-25.46,13.58a5.67,5.67,0,0,1-4,.5L660.5,551.6a5.67,5.67,0,0,0-3.14.11l-31.81,10.41a5.67,5.67,0,0,1-4.35-.34L600.13,551a5.67,5.67,0,0,0-4.31-.36l-27.17,8.67a5.67,5.67,0,0,1-2.12.25l-26.16-1.83a5.67,5.67,0,0,1-1.16-.2l-20.76-5.93a5.67,5.67,0,0,0-2.69-.1L487,557.34a5.67,5.67,0,0,1-3.22-.28l-28-11.09a5.67,5.67,0,0,0-3.09-.31l-22.29,4a5.67,5.67,0,0,1-2.7-.17l-22.46-7.06A5.67,5.67,0,0,0,398.14,549.47Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M398.14,550.76l52.7,175.67a5.65,5.65,0,0,0,2.17,3c14.71,10.29,127.89,83.3,266.49,0a5.67,5.67,0,0,0,2.5-3.24l52.53-175.8a5.67,5.67,0,0,0-6.81-7.12L744.92,549a5.67,5.67,0,0,1-2.4.08l-21.45-4a5.67,5.67,0,0,0-3.7.57l-25.46,13.58a5.67,5.67,0,0,1-4,.5l-27.38-6.84a5.67,5.67,0,0,0-3.14.11l-31.81,10.41a5.67,5.67,0,0,1-4.35-.34l-21.07-10.8a5.67,5.67,0,0,0-4.31-.36l-27.17,8.67a5.67,5.67,0,0,1-2.12.25L540.37,559a5.67,5.67,0,0,1-1.16-.2l-20.76-5.93a5.67,5.67,0,0,0-2.69-.1L487,558.63a5.67,5.67,0,0,1-3.22-.28l-28-11.09a5.67,5.67,0,0,0-3.09-.31l-22.29,4a5.67,5.67,0,0,1-2.7-.17l-22.46-7.06A5.67,5.67,0,0,0,398.14,550.76Z" transform="translate(-158.33 -57.35)" fill="#4d4981"/><polygon points="297.62 430.78 292.11 428.86 289.02 423.91 302.76 406.71 308.27 408.63 311.36 413.58 297.62 430.78" fill="#fff" opacity="0.5"/><polygon points="558.55 459.92 553.03 458 549.95 453.05 563.68 435.85 569.19 437.76 572.28 442.71 558.55 459.92" fill="#fff" opacity="0.5"/><polygon points="443.95 366.03 438.44 364.12 435.35 359.17 449.08 341.96 454.6 343.88 457.68 348.83 443.95 366.03" fill="#fff" opacity="0.5"/><polygon points="474.88 429.29 469.55 431.65 463.91 430.15 462.18 408.2 467.51 405.84 473.15 407.34 474.88 429.29" fill="#fff" opacity="0.5"/><polygon points="385.08 375.41 381.4 379.94 375.69 381.15 364.21 362.37 367.9 357.84 373.61 356.63 385.08 375.41" fill="#fff" opacity="0.5"/><polygon points="378.61 428.5 374.92 433.03 369.22 434.24 357.74 415.46 361.42 410.93 367.13 409.72 378.61 428.5" fill="#fff" opacity="0.5"/><polygon points="536.96 433.67 532.73 437.69 526.91 438.16 517.93 418.06 522.17 414.04 527.98 413.57 536.96 433.67" fill="#fff" opacity="0.5"/><polygon points="508.11 364.79 509.54 359.13 514.2 355.63 532.54 367.81 531.11 373.47 526.45 376.98 508.11 364.79" fill="#fff" opacity="0.5"/><polygon points="313.16 373.16 307.65 371.24 304.56 366.29 318.3 349.09 323.81 351 326.9 355.95 313.16 373.16" fill="#fd6f8d" opacity="0.5"/><polygon points="382.54 340.82 381.19 335.15 383.71 329.88 405.6 332.21 406.95 337.89 404.43 343.16 382.54 340.82" fill="#fd6f8d" opacity="0.5"/><polygon points="488.62 308.54 489.71 302.81 494.16 299.03 513.18 310.11 512.09 315.84 507.64 319.62 488.62 308.54" fill="#fd6f8d" opacity="0.5"/><polygon points="446.21 279.63 451.9 278.33 457.14 280.9 454.59 302.77 448.9 304.06 443.66 301.49 446.21 279.63" fill="#fd6f8d" opacity="0.5"/><polygon points="407.15 452.19 405.8 446.51 408.31 441.24 430.2 443.57 431.55 449.25 429.04 454.52 407.15 452.19" fill="#fd6f8d" opacity="0.5"/><polygon points="326.21 456.34 322.76 451.63 323.02 445.81 344.09 439.42 347.55 444.13 347.28 449.96 326.21 456.34" fill="#fd6f8d" opacity="0.5"/><polygon points="552.8 417.34 548.01 414.01 546.38 408.4 564.25 395.55 569.04 398.88 570.67 404.48 552.8 417.34" fill="#fd6f8d" opacity="0.5"/><polygon points="401.3 421.87 396.51 418.54 394.87 412.94 412.74 400.08 417.53 403.41 419.17 409.01 401.3 421.87" fill="#fd6f8d" opacity="0.5"/><path d="M452.73,545.66l-22.29,4a5.67,5.67,0,0,1-2.7-.17l-.37-.12,40.57,188-40.57-188-22.09-6.94a5.67,5.67,0,0,0-7.13,7l52.7,175.67a5.65,5.65,0,0,0,2.17,3c4.61,3.23,18.91,12.62,40.63,21.42l-39.29-204A5.66,5.66,0,0,0,452.73,545.66Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M767.74,542l-22.82,5.7a5.67,5.67,0,0,1-2.4.08l-21.45-4a5.66,5.66,0,0,0-2,0L681.57,747.48l37.48-203.69a5.67,5.67,0,0,0-1.68.58l-25.46,13.58a5.67,5.67,0,0,1-3.79.55L661.4,755.06a280.26,280.26,0,0,0,44.15-19l40.89-188.75L705.54,736q6.94-3.7,14-7.92a5.67,5.67,0,0,0,2.5-3.24l52.53-175.8A5.67,5.67,0,0,0,767.74,542Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M687.87,558.44,660.5,551.6a5.66,5.66,0,0,0-1.61-.16L638,761.58q11.5-2.61,23.44-6.52l26.72-196.56Z" transform="translate(-158.33 -57.35)" fill="#4d4981"/><g opacity="0.5"><rect x="447.32" y="548.5" width="0.65" height="192.29" transform="translate(-284.25 51.59) rotate(-12.18)" fill="#fff"/><rect x="499.39" y="557.95" width="0.65" height="201.19" transform="translate(-247.01 20.51) rotate(-8.19)" fill="#fff"/><rect x="473.66" y="544.79" width="0.65" height="207.96" transform="translate(-272.5 44.02) rotate(-10.9)" fill="#fff"/><rect x="526.13" y="552.08" width="0.65" height="212.05" transform="translate(-214.22 -8.45) rotate(-5.05)" fill="#fff"/><rect x="555.12" y="559.81" width="0.65" height="207.61" transform="translate(-177.58 -40.75) rotate(-1.68)" fill="#fff"/><rect x="586.67" y="554.95" width="0.65" height="213.91" transform="translate(-162.63 -53.52) rotate(-0.37)" fill="#fff"/><rect x="517.7" y="665.22" width="202.95" height="0.65" transform="translate(-229.51 1199.57) rotate(-87.65)" fill="#fff"/><rect x="542.25" y="657.79" width="212.28" height="0.65" transform="translate(-229.42 1180.31) rotate(-84.28)" fill="#fff"/><rect x="574.78" y="656.84" width="200.2" height="0.65" transform="matrix(0.13, -0.99, 0.99, 0.13, -225.62, 1179.91)" fill="#fff"/><rect x="596.61" y="646.43" width="207.48" height="0.65" transform="translate(-221.08 1160.76) rotate(-79.55)" fill="#fff"/><rect x="629.42" y="642.64" width="193.13" height="0.65" transform="translate(-214.09 1159.48) rotate(-77.81)" fill="#fff"/></g><path d="M207.92,697.1c6-2,15-4.28,22.09-3.47,6.74-2.46,22.6-8.88,33.43-18.39a241,241,0,0,1,.71-28.24c5.54-63-6.92-104.49-6.92-104.49s-9.78-31.67-8.71-57.95c-.63,1.19-1,1.9-1,1.9-.86-22.67-8.58-46.13-14.36-60.74a4.88,4.88,0,0,1-.65-.24l-6.59-15.34a13.31,13.31,0,0,1-1.22-2.83l-1-2.43.31-.13c-.1-.4-.21-.82-.31-1.25h0c-4.13-17.47-7.28-58.9-7.28-58.9C205.33,301,231.63,274,231.63,274l44.63-38.41a5.66,5.66,0,0,0-.44,1.57l.37-.32c.63-1.8,1.32-4,2-6.44a33.93,33.93,0,0,1-4.46-3.77,34.27,34.27,0,0,1-10-17.85c-1.08-5.31-.87-10.78-.65-16.19l.74-18.52a58.81,58.81,0,0,1,1.1-10.8c3.37-14.74,18.43-25,33.54-25.65,4.81-.2,9.61.41,14.4.77a96.85,96.85,0,0,0,11.7.25,2.12,2.12,0,0,0,1.26-.33,1.85,1.85,0,0,0,.55-1.28,6.37,6.37,0,0,0-1.56-4.77,5.94,5.94,0,0,0-2-1.16l1.08.26a5.88,5.88,0,0,0-1.77-.95c3.86.91,7.81,1.86,11.13,4a14.38,14.38,0,0,1,2.6,2.19,11.35,11.35,0,0,1,3.76,7c1.73-1.69,3.39-3.55,4-5.87a5.93,5.93,0,0,0,0-2.84q.39.49.76,1c0-.1,0-.2-.07-.3a29.7,29.7,0,0,1,5.81,12,4.66,4.66,0,0,0,1.05-3.44c.22.68.43,1.37.62,2.07a4.79,4.79,0,0,0,.07-1.38,47.32,47.32,0,0,1,2.31,16.43c0,5.56-2.46,14.21-8.42,16.16-.3.1-.62.18-.94.25a37.35,37.35,0,0,1-25.19,57.05q-.14,1-.28,2.13l-.24,0c-.16,1.5-.29,3.08-.39,4.73a31.84,31.84,0,0,0,4.9,3.94A40.46,40.46,0,0,0,339.85,251a48.63,48.63,0,0,1,19.65,5.84c7.12,4,15,9.79,17.45,16.84,4.12,11.77,26.76,30,42,32.27l5.4-.31.39-.12v.1l1.32-.08.08,0v0l.35,0,0,.08,1.37-.08s.14.63.32,1.75c7.65-2.62,23.88-9.92,45-29.08,23.54-21.35,55.31-17.15,67.56-14.46a2.1,2.1,0,0,1,.56,3.89c-4.94,2.72-12.62,6.67-16.22,7.11,0,0,7.42,7.68-.46,11.78a5.67,5.67,0,0,1-5.93-.57c-3.79-2.77-14.33,3.51-29.59,6.78,0,0-43.08,44.58-64.45,51.48A30.74,30.74,0,0,1,423,347l-1.32-.11-.07.11h-.18l-.16,1.4s-33.25-1.75-44-13.82a17.32,17.32,0,0,1-2.11-2.25l11.56,145.48h-.11l.11,1.38h-8.5a320.62,320.62,0,0,0,2.28,53.63v94.8s.44,8.35-16.89,20.5A647.93,647.93,0,0,0,311,688.79l-2.1,1.82c3.19,29,9.86,83.08,15.42,85.1l-3.43.6c5.91,7.45,22.56,27.89,27.65,28.46,6.23.69,10.38,10.38,0,12.46-9.58,1.92-34.48,4.42-61.65-6.08a9.41,9.41,0,0,1-5.92-10l2-15.28a2.14,2.14,0,0,0-.88.93c-1.38,4.15,0-5.54,0-5.54a433,433,0,0,1-13.38-55.84l-20.52,17.78s-.42-.51-1.13-1.43c-5,11.44-14,34.81-12,51.95,2.77,23.53-23.53,2.77-20.76-11.07,2.24-11.2-7.75-58.64-11.65-76.34A7.89,7.89,0,0,1,207.92,697.1Z" transform="translate(-158.33 -57.35)" fill="url(#c2d29fed-0e3c-4665-9fc2-6bc8bc700b9c)"/><path d="M422.79,313.2s19.6-3.38,48.65-29.73c23-20.85,54-16.74,66-14.12a2,2,0,0,1,.55,3.79c-4.83,2.65-12.33,6.51-15.84,6.95,0,0,7.24,7.5-.45,11.51a5.54,5.54,0,0,1-5.79-.56c-3.7-2.7-14,3.43-28.89,6.62,0,0-58.11,60.14-71.62,50Z" transform="translate(-158.33 -57.35)" fill="#fec3be"/><path d="M322.78,231.44s-5.41,23,0,39.19L298.46,274,276.84,263.2V249s10.14-21.62,7.43-46.62Z" transform="translate(-158.33 -57.35)" fill="#fec3be"/><path d="M253.86,729.44S236.29,763.9,239,786.87s-23,2.7-20.27-10.81c2.19-10.93-7.57-57.26-11.37-74.54a7.7,7.7,0,0,1,5.12-9c8.13-2.67,21.72-6,28.56-.94C251.16,699,253.86,729.44,253.86,729.44Z" transform="translate(-158.33 -57.35)" fill="#8b416f"/><path d="M320.76,767.27s23,29.73,29.06,30.41,10.14,10.14,0,12.16c-9.35,1.87-33.67,4.32-60.2-5.94a9.19,9.19,0,0,1-5.78-9.78l3.81-28.88Z" transform="translate(-158.33 -57.35)" fill="#8b416f"/><path d="M358.6,451.72l22,2.94s-5.14,36.92.26,77.47V624.7s.43,8.15-16.49,20a632.65,632.65,0,0,0-51.24,39.71l-61.32,53.12s-24.33-29.73-20.95-47.3c0,0,40.54-12.84,45.95-33.79,3.1-12,18.82-22,31.69-28.35,16.58-8.19,25.62-26.8,21.08-44.72a34.48,34.48,0,0,0-3.45-8.69c-10.81-18.92-26.35-61.49-26.35-61.49l29.73-56.76Z" transform="translate(-158.33 -57.35)" fill="#4d4981"/><path d="M358.6,451.72l22,2.94s-5.14,36.92.26,77.47V624.7s.43,8.15-16.49,20a632.65,632.65,0,0,0-51.24,39.71l-61.32,53.12s-24.33-29.73-20.95-47.3c0,0,40.54-12.84,45.95-33.79,3.1-12,18.82-22,31.69-28.35,16.58-8.19,25.62-26.8,21.08-44.72a34.48,34.48,0,0,0-3.45-8.69c-10.81-18.92-26.35-61.49-26.35-61.49l29.73-56.76Z" transform="translate(-158.33 -57.35)" opacity="0.05"/><path d="M326.16,769.3s-39.87,6.76-41.22,10.81,0-5.41,0-5.41-23-69.6-17.57-131.09-6.76-102-6.76-102-14.19-45.95-6.08-72.3,93.25-14.87,93.25-14.87S318.05,524,318.73,557.13c0,0-3.38,100-9.46,111.49C309.27,668.62,318.73,766.6,326.16,769.3Z" transform="translate(-158.33 -57.35)" fill="#4d4981"/><path d="M321.43,249s-4.05,25-44.6,14.19l27,205.41s78.38,2.7,77.71-6.76L365.35,337.53Z" transform="translate(-158.33 -57.35)" fill="#fff"/><path d="M320.42,247.66s7.68,8.24,19.52,9.27a47.49,47.49,0,0,1,19.18,5.71c7,3.89,14.63,9.55,17,16.45,4.73,13.51,34.46,35.81,48,31.08l-4.73,40.54s-38.51-2-45.27-16.89l11.49,144.6H375.49s-5.41-39.19-9.46-47.3-12.16-52.7-12.84-63.52-10.81-73-19.6-83.79l-13.18-32.1Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M320.42,249.69s9,7.57,20.87,8.59A47.49,47.49,0,0,1,360.47,264c7,3.89,14.63,9.55,17,16.45,4.73,13.51,34.46,35.81,48,31.08l-4.73,40.54s-38.51-2-45.27-16.89L387,479.76H376.84s-5.41-39.19-9.46-47.3-12.16-52.7-12.84-63.52-10.81-73-19.6-83.79l-14.53-31.42Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M320.42,248.34s9,7.57,20.87,8.59a47.49,47.49,0,0,1,19.18,5.71c7,3.89,14.63,9.55,17,16.45,4.73,13.51,34.46,35.81,48,31.08l-4.73,40.54s-38.51-2-45.27-16.89L387,478.41H376.84s-5.41-39.19-9.46-47.3-12.16-52.7-12.84-63.52-10.81-73-19.6-83.79l-14.53-31.42Z" transform="translate(-158.33 -57.35)" fill="#fd6f8d"/><path d="M286,222.32c.88-6.4-.88-10.4-1.69-17.91l38.51,29.06s-.92,3.93-1.62,9.67a36.73,36.73,0,0,1-5.81.47C301.91,243.61,292.29,233.14,286,222.32Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><circle cx="157.02" cy="147.74" r="36.49" fill="#fec3be"/><path d="M355.17,169.33a46.19,46.19,0,0,0-3-18.06,4.5,4.5,0,0,1-.77,5.83,28.91,28.91,0,0,0-9.17-16.24c2.6.42,3.93,3.65,3.3,6.21s-2.61,4.53-4.51,6.35c.22-3.87-2.33-7.47-5.57-9.6s-7.1-3-10.87-3.94a6.3,6.3,0,0,1,4.17,6.46,1.8,1.8,0,0,1-.54,1.25,2.07,2.07,0,0,1-1.23.33,94.57,94.57,0,0,1-11.42-.24,119.71,119.71,0,0,0-14.06-.75c-14.76.62-29.46,10.65-32.75,25a57.43,57.43,0,0,0-1.07,10.54L267,200.6c-.21,5.28-.42,10.63.64,15.81a33.49,33.49,0,0,0,17.21,22.74c5.3-7.68,5.77-17.55,7.61-26.7a13.51,13.51,0,0,1,2.29-5.9c1.33-1.66,3.67-2.71,5.65-1.92s2.84,3.82,1.19,5.17c1.42,1.73,4.22.44,5.85-1.1a31.56,31.56,0,0,0,9.16-16.35c.66-3.15,1.32-7,4.36-8.09a8.2,8.2,0,0,1,3.27-.22c6.43.44,16.49,3.1,22.73,1.06C352.77,183.2,355.17,174.76,355.17,169.33Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M354.5,168.65a46.19,46.19,0,0,0-3-18.06,4.5,4.5,0,0,1-.77,5.83,28.91,28.91,0,0,0-9.17-16.24c2.6.42,3.93,3.65,3.3,6.21s-2.61,4.53-4.51,6.35c.22-3.87-2.33-7.47-5.57-9.6s-7.1-3-10.87-3.94a6.3,6.3,0,0,1,4.17,6.46,1.8,1.8,0,0,1-.54,1.25,2.07,2.07,0,0,1-1.23.33,94.57,94.57,0,0,1-11.42-.24,119.71,119.71,0,0,0-14.06-.75c-14.76.62-29.46,10.65-32.75,25A57.43,57.43,0,0,0,267,181.84l-.72,18.08c-.21,5.28-.42,10.63.64,15.81a33.49,33.49,0,0,0,17.21,22.74c5.3-7.68,5.77-17.55,7.61-26.7a13.51,13.51,0,0,1,2.29-5.9c1.33-1.66,3.67-2.71,5.65-1.92s2.84,3.82,1.19,5.17c1.42,1.73,4.22.44,5.85-1.1a31.56,31.56,0,0,0,9.16-16.35c.66-3.15,1.32-7,4.36-8.09a8.2,8.2,0,0,1,3.27-.22c6.43.44,16.49,3.1,22.73,1.06C352.09,182.53,354.5,174.08,354.5,168.65Z" transform="translate(-158.33 -57.35)" fill="#fad375"/><path d="M427.18,310.16s5.41,25-4.73,40.54l-5.74-.47,3.13-39.65Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M425.83,310.16s5.41,25-4.73,40.54l-5.74-.47,3.13-39.65Z" transform="translate(-158.33 -57.35)" fill="#fd6f8d"/><path d="M280.55,241.92,237,279.42s-25.68,26.35-14.87,68.92c0,0,4.73,62.16,10.14,64.87,0,0,18.92,37.84,20.27,73.65,0,0,25.34-51,36.83-19.93s38.18,35.47,38.18,35.47L312.65,318.61S275.15,253.4,280.55,241.92Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M279.2,241.92l-43.58,37.5s-25.68,26.35-14.87,68.92c0,0,4.73,62.16,10.14,64.87,0,0,18.92,37.84,20.27,73.65,0,0,26.69-53.72,38.18-22.64s36.83,38.18,36.83,38.18L311.3,318.61S273.8,253.4,279.2,241.92Z" transform="translate(-158.33 -57.35)" fill="#fd6f8d"/><path d="M259.27,400.37s-10.81-7.43-28.38,12.84l43.24,78.38,14.53-22S257.92,409.15,259.27,400.37Z" transform="translate(-158.33 -57.35)" fill="#fec3be"/><path d="M269.74,404.76s-23.91,26.86-33.24,22.55l-8.64-20.11,32.42-13.93Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M269.74,403.41S245.83,430.27,236.5,426l-8.64-20.11,32.42-13.93Z" transform="translate(-158.33 -57.35)" fill="#fd6f8d"/><path d="M287.2,464.54s-11.38,23.33-17.46,24.69l8.78,10.14L291.36,475Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M287.88,465.21s-11.38,23.33-17.46,24.69L279.2,500,292,475.71Z" transform="translate(-158.33 -57.35)" fill="#4d4981"/><path d="M266.36,321s-1.35,48.65,4.05,66.89" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M375.83,330.43s-8.11-2.7-8.11-9.46" transform="translate(-158.33 -57.35)" opacity="0.1"/><g opacity="0.5"><path d="M827.65,331.62c-.06,6.39.7,12.3,2.76,16.93l2,29s.5-.28,1.41-.72c-1.21,11-.34,31.15,21.26,34.94a3.66,3.66,0,0,0,1.33-.66,98,98,0,0,0,4-9.21l.25.08-.25,1.24,1.6.5c-7.79,16.88-6,52-4.27,55.44.73,1.44,1.28,5.68,1.69,10.49a119.67,119.67,0,0,1-1,28c-1,6.39-1.3,14.23,2,17.49,6,5.92,5.33,51.33,5.33,51.33a32.84,32.84,0,0,0,1.39,3l-2.06.29s0,17.77,3.33,30.27c1.92,7.19-.8,16.56-3.45,23.22a46.94,46.94,0,0,0-2.31,28.27c1.95,8.14,6,16.26,14.43,18.93,18.67,5.92,22.67-25,22.67-25s-.67-23.69,0-27c.21-1,1.17-3.84,2.41-7.26a90.46,90.46,0,0,0,5-39l-.77-8.32-3.62.52c-.06-.86-.11-1.76-.16-2.7s-.09-1.62-.13-2.47-.08-1.72-.12-2.62-.08-1.81-.11-2.74q0-.7-.05-1.41c-.15-4.26-.28-8.81-.39-13.31,0-2-.09-4-.12-5.95,0-1.46-.05-2.91-.07-4.31q0-.7,0-1.4c0-2.3-.06-4.5-.07-6.53q0-.61,0-1.2,0-1.18,0-2.26,0-.54,0-1.06c0-.69,0-1.34,0-2s0-1.2,0-1.73,0-1,0-1.48c0-2.47.1-3.57.2-2.66.33,3,1.33,21.06,0-2-1.08-18.59,15.66-62.91,22.15-79.3a57.75,57.75,0,0,1,6,3.58c2.22,25.86-.83,75.43-1.81,90v.06c-.08,1.13-.14,2-.19,2.71v.12l-.05.72v.2l0,.21v.11s-8.67,54-8.67,66.47c0,9.63-4.75,23.56-6.93,29.44-3.17,1.38-5.74,2.8-5.74,2.8l.67,49.36s-7.33,24.35,19.33,30.27,15.33-24.35,15.33-24.35l-2-21.72,9.33-33.56-2.62-.53c5.54-17.7,20.38-66.4,19.29-77.12-1.22-12,4.77-25.08,5.84-27.3h0l.16-.34c-5.72-11.8,11.67-74,19.6-100.84,9.89-4.72,17.06-8.4,17.06-8.4s-.2-.37-.55-1l.55-.28a132.29,132.29,0,0,1-10.23-25.09l.57-.58-.43-1.21c1.36-1.31,2.1-2.08,2.1-2.08s19.33,3.29,14.67-5.92-3.33-23-3.33-23V299.41l9.33,3.07c17.55,2.89,20.69-16.71,20.6-31.74a116.66,116.66,0,0,0-1.26-17.62s-13.33-102-36.67-98.71c-21.86,3.08-41.08-9.71-43.43-11.35q-.43-1.32-.77-2.6a33,33,0,0,0,3.5-4.76c.73,0,1.47-.1,2.17-.18,0-.2,0-.39,0-.59l.67-.07a17.22,17.22,0,0,1,4.76-12.43,16.51,16.51,0,0,1,4.38-3c3.23-1.51,6.88-2,10.05-3.62a11.09,11.09,0,0,0,3-2.29c2-1.8,3.3-4.31,2.61-6.81-.31-1.11-1-2.13-1-3.28,0-1.6,1.25-2.88,2-4.29C994,95,992,89.82,989.25,86s-6.28-7.42-7.29-12c-.41-1.88-.38-3.86-1-5.69-2-5.93-9.66-7.7-16-7.37s-13.14,1.68-18.62-1.44A17.45,17.45,0,0,0,943,57.6a9.16,9.16,0,0,0-4.21,0c-8,1.39-15.37,5.36-22,10a50.64,50.64,0,0,0-7.46,6.1,27.44,27.44,0,0,0-4,4.77c-2.7,4.17-4,9.49-2.31,14.16a14.33,14.33,0,0,0,4.83,6.48,32.62,32.62,0,0,0,6.71,46.18,38.1,38.1,0,0,1-3.76,5.14v-.26s-20.33,10.2-27.67,8.88c-7.16-1.29-25.76,10.62-25.38,34.46,0,.6,0,1.22,0,1.84l-12,37.21a150.56,150.56,0,0,0-7.29,46.26S827.44,308.76,827.65,331.62Zm32.23,15.76,15.86-59.16v12.94l-10,35.54s-2,11.89-3.53,24.52Z" transform="translate(-158.33 -57.35)" fill="url(#c8cc5a91-18e5-403f-9b97-91f48ba2f890)"/></g><path d="M907.17,555.35l.74,8.13a89.47,89.47,0,0,1-4.85,38.15c-1.19,3.35-2.12,6.11-2.32,7.1-.64,3.22,0,26.37,0,26.37s-3.86,30.23-21.87,24.44c-8.1-2.6-12-10.55-13.92-18.5a46.44,46.44,0,0,1,2.23-27.62c2.56-6.51,5.18-15.66,3.33-22.69-3.22-12.22-3.22-29.58-3.22-29.58Z" transform="translate(-158.33 -57.35)" fill="#5a5773"/><path d="M926.46,415.8s-25.08,61.1-23.79,83.6.32,4.82,0,1.93c-.57-5.15,0,56,1.93,63,0,0-26.37,19.29-36.66-6.43,0,0,.64-44.37-5.14-50.16-3.18-3.18-2.87-10.84-1.93-17.09a118.45,118.45,0,0,0,1-27.33c-.39-4.7-.93-8.84-1.63-10.25-1.93-3.86-3.86-47.59,7.72-59.81Z" transform="translate(-158.33 -57.35)" fill="#605d82"/><path d="M901.38,564.36c-1.93-7.07-2.5-68.18-1.93-63,.32,2.89,1.29,20.58,0-1.93s23.79-83.6,23.79-83.6l-56.11-21.58c.26-.33.53-.64.8-.93l58.52,22.51s-25.08,61.1-23.79,83.6.32,4.82,0,1.93c-.57-5.15,0,56,1.93,63,0,0-10.53,7.7-20.88,6.88C892.92,570.54,901.38,564.36,901.38,564.36Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M948.32,613.88l-9,32.8,1.93,21.22s10.93,29.58-14.79,23.79-18.65-29.58-18.65-29.58l-.64-48.23s10.29-5.79,14.79-5.14S948.32,613.88,948.32,613.88Z" transform="translate(-158.33 -57.35)" fill="#5a5773"/><path d="M992.7,400.37S963.12,496.19,970.19,511c0,0-7.07,14.15-5.79,27s-20.58,81.67-20.58,81.67l-32.16-5.79s7.72-19.29,7.72-31.51,8.36-65,8.36-65,7.07-96.47-1.29-106.76Z" transform="translate(-158.33 -57.35)" fill="#605d82"/><g opacity="0.1"><path d="M928.95,418.42c5.33,21.84-.56,102.21-.56,102.21s-8.36,52.73-8.36,65c0,9.33-4.49,22.77-6.62,28.61l-1.74-.31s7.72-19.29,7.72-31.51,8.36-65,8.36-65S933.13,444,928.95,418.42Z" transform="translate(-158.33 -57.35)"/><path d="M970.19,511l-.16.33c-.05-.33-.1-.68-.13-1A7.11,7.11,0,0,0,970.19,511Z" transform="translate(-158.33 -57.35)"/><path d="M927.91,413.75a9.47,9.47,0,0,0-1.45-3.09l66.24-10.29s-.39,1.25-1.06,3.48Z" transform="translate(-158.33 -57.35)"/></g><path d="M838.35,365.64s-9.65,36,19.29,41.16a3.52,3.52,0,0,0,1.29-.64s16.72-32.8,3.86-45.66Z" transform="translate(-158.33 -57.35)" fill="#a1616a"/><path d="M956.69,126.4s-1.93,27,19.29,39.87-45,48.23-45,48.23L896.23,159.2S911,161.13,920,135.41Z" transform="translate(-158.33 -57.35)" fill="#a1616a"/><path d="M970.83,168.2s-32.8,68.17-62.38,3.86L862.79,398.44s70.74,21.87,71.38,32.16,71.38-26.37,71.38-26.37-15.43-28.3-11.58-45.66S970.83,168.2,970.83,168.2Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M970.83,166.92s-32.8,68.17-62.38,3.86L862.79,397.15S933.53,419,934.18,429.3s71.38-26.37,71.38-26.37-15.43-28.3-11.58-45.66S970.83,166.92,970.83,166.92Z" transform="translate(-158.33 -57.35)" fill="#e1e7ef"/><path d="M938.68,631.88s8.36-18.65-10.93-18.65S911.67,630,911.67,630Z" transform="translate(-158.33 -57.35)" fill="#5a5773"/><path d="M894.95,583.65s7.72-19.94-11.58-20.58-9.65,18-9.65,18Z" transform="translate(-158.33 -57.35)" fill="#5a5773"/><path d="M911.35,152.45s-19.61,10-26.69,8.68-25.72,10.93-24.44,35.37L848.6,233a148.9,148.9,0,0,0-7,45.21h0s-16.72,46.3-7.72,66.88l1.93,28.3S850.57,365,866,367.57l-3.86-23.15,17.36-65.6,28.94-70.1Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M911.35,151.16s-19.61,10-26.69,8.68-25.72,10.93-24.44,35.37L848.6,231.68a148.9,148.9,0,0,0-7,45.21h0s-16.72,46.3-7.72,66.88l1.93,28.3s14.79-8.36,30.23-5.79l-3.86-23.15,17.36-65.6,28.94-70.1Z" transform="translate(-158.33 -57.35)" fill="#67647e"/><path d="M878.87,229.3V302l-9.65,34.73s-6.43,37.94-4.5,49.52,32.8,14.15,41.16,4.5,3.86-92,3.86-92l1.61-120.58-1.29-3.86Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M877.58,226.08v72.67l-9.65,34.73s-6.43,37.94-4.5,49.52,32.8,14.15,41.16,4.5,3.86-92,3.86-92L910.06,175Z" transform="translate(-158.33 -57.35)" fill="#67647e"/><path d="M1007.17,286.54l-20.58,64,9.65,27.33s-45.66,48.23-74.6,25.08c0,0-3.22-98.4,3.22-121.55s37.3-101,37.3-101l6.43-20.58,34.08,19.29Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M1008.78,283.32v63s-1.29,13.51,3.22,22.51-14.15,5.79-14.15,5.79-45.66,48.23-74.6,25.08c0,0-3.22-98.4,3.22-121.55s37.3-101,37.3-101l6.43-20.58,34.08,19.29Z" transform="translate(-158.33 -57.35)" fill="#67647e"/><rect x="929.99" y="262.04" width="45" height="7" transform="translate(1535.67 -445.97) rotate(123)" fill="#e6e6e6"/><ellipse cx="937.75" cy="288.24" rx="14.57" ry="8" transform="matrix(0.54, -0.84, 0.84, 0.54, 26.9, 860.32)" opacity="0.1"/><ellipse cx="937.28" cy="288.96" rx="14.57" ry="8" transform="translate(26.08 860.25) rotate(-57)" fill="#e6e6e6"/><ellipse cx="937.28" cy="288.96" rx="11.84" ry="6.5" transform="translate(26.08 860.25) rotate(-57)" opacity="0.1"/><path d="M958.94,145.37s19.61,14.47,42.12,11.25,35.37,96.47,35.37,96.47,8.36,51.45-18.65,46.95L958,280.1s12.86-13.51,10.93-30.87l28.94,11.58-1.29-55.31Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M1035.14,251.81s8.36,51.45-18.65,46.95l-59.81-19.94s12.86-13.51,10.93-30.87l28.94,11.58Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M969,254.73S949,228.34,934.19,241s29.55,35.89,29.55,35.89Z" transform="translate(-158.33 -57.35)" fill="#a1616a"/><path d="M958.94,144.09s19.61,14.47,42.12,11.25,35.37,96.47,35.37,96.47,8.36,51.45-18.65,46.95L958,278.82s12.86-13.51,10.93-30.87l28.94,11.58-1.29-55.31-32.8-27Z" transform="translate(-158.33 -57.35)" fill="#67647e"/><path d="M919.38,136.69l36.66-9s-1.91,2.16.32,10.61c-5.9,6.77-13.15,15.76-22.83,15.76a32,32,0,0,1-19.22-6.37A57.82,57.82,0,0,0,919.38,136.69Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><circle cx="775.84" cy="63.26" r="32.16" fill="#a1616a"/><path d="M922,106.66c-7.46-1.27-15.66-4.58-18.16-11.72-1.6-4.57-.38-9.77,2.23-13.84s6.45-7.2,10.41-10c6.43-4.52,13.52-8.4,21.26-9.76a8.73,8.73,0,0,1,4.06,0,16.76,16.76,0,0,1,3.29,1.8c5.29,3.05,11.87,1.73,18,1.41s13.48,1.41,15.41,7.2c.6,1.79.56,3.72,1,5.56,1,4.5,4.39,8,7,11.75s4.62,8.82,2.42,12.86c-.75,1.37-2,2.63-2,4.19a13,13,0,0,0,1,3.21c.91,3.32-1.74,6.67-4.8,8.25s-6.58,2.07-9.7,3.54a17,17,0,0,0-9.47,15.74c-2.84.33-6.15.5-8.07-1.62-.86-.95-1.28-2.22-2.06-3.23-1-1.32-2.56-2.1-3.84-3.16-6.73-5.53-1.95-13.17-5.76-19.13-2-3.07-5.18-2.13-8.4-2.08A74.22,74.22,0,0,1,922,106.66Z" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M922.63,106c-7.46-1.27-15.66-4.58-18.16-11.72-1.6-4.57-.38-9.77,2.23-13.84s6.45-7.2,10.41-10c6.43-4.52,13.52-8.4,21.26-9.76a8.73,8.73,0,0,1,4.06,0,16.76,16.76,0,0,1,3.29,1.8c5.29,3.05,11.87,1.73,18,1.41s13.48,1.41,15.41,7.2c.6,1.79.56,3.72,1,5.56,1,4.5,4.39,8,7,11.75s4.62,8.82,2.42,12.86c-.75,1.37-2,2.63-2,4.19a13,13,0,0,0,1,3.21c.91,3.32-1.74,6.67-4.8,8.25s-6.58,2.07-9.7,3.54a17,17,0,0,0-9.47,15.74c-2.84.33-6.15.5-8.07-1.62-.86-.95-1.28-2.22-2.06-3.23-1-1.32-2.56-2.1-3.84-3.16-6.73-5.53-1.95-13.17-5.76-19.13-2-3.07-5.18-2.13-8.4-2.08A74.22,74.22,0,0,1,922.63,106Z" transform="translate(-158.33 -57.35)" fill="#4a4347"/><path d="M883.69,214.19s-7.07,36.66-3.86,50.81a47.15,47.15,0,0,1-.84,24.92" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M998,229.62s3.08,24.44-2.05,29.58" transform="translate(-158.33 -57.35)" opacity="0.1"/><path d="M818.42,530.81a1.5,1.5,0,0,0,0-3,1.5,1.5,0,0,0,0,3Z" transform="translate(-158.33 -57.35)"/><rect x="507.29" y="273.65" width="45" height="7" transform="translate(-14.36 -236.96) rotate(22.2)" fill="#e6e6e6"/><ellipse cx="554.85" cy="287.38" rx="8" ry="14.57" transform="translate(-79.18 635.19) rotate(-67.8)" opacity="0.1"/><ellipse cx="555.65" cy="287.7" rx="8" ry="14.57" transform="translate(-78.99 636.12) rotate(-67.8)" fill="#e6e6e6"/><ellipse cx="555.65" cy="287.7" rx="6.5" ry="11.84" transform="translate(-78.99 636.12) rotate(-67.8)" opacity="0.1"/></svg>
\ No newline at end of file
<svg id="26c346b9-da0c-4941-90c9-e7f7f9ba5ac3" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="958.98" height="717.78" viewBox="0 0 958.98 717.78"><defs><linearGradient id="4ef13be0-8e55-4463-b812-64152197208f" x1="768.34" y1="226.6" x2="768.34" y2="91.11" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient><linearGradient id="5bed69c4-1e02-4930-aaf9-54950fab6759" x1="324.42" y1="444.93" x2="324.42" y2="444.59" xlink:href="#4ef13be0-8e55-4463-b812-64152197208f"/><linearGradient id="a88837d3-ccd3-4ab3-a7ec-270b2797a153" x1="437.75" y1="743.35" x2="437.75" y2="288.01" xlink:href="#4ef13be0-8e55-4463-b812-64152197208f"/></defs><title>drone_delivery</title><polygon points="910 277.53 910 213.53 872 213.53 872 277.53 827 277.53 827 178.53 794 178.53 794 104.53 767 104.53 767 28.53 711 28.53 711 104.53 684 104.53 684 178.53 652 178.53 652 89.53 634 89.53 634 44.53 623 44.53 623 89.53 559 89.53 559 373.53 510 373.53 510 343.53 480 343.53 480 373.53 431 373.53 431 277.53 343 277.53 343 213.53 305 213.53 305 277.53 303 277.53 303 400.53 263 400.53 263 328.53 215 328.53 215 400.53 175 400.53 175 178.53 144 178.53 144 104.53 30 104.53 30 178.53 0 178.53 0 569.53 175 569.53 303 569.53 431 569.53 559 569.53 652 569.53 827 569.53 955 569.53 955 277.53 910 277.53" fill="#348eed" opacity="0.25"/><rect x="19" y="201.53" width="42" height="24" fill="#fff" opacity="0.4"/><rect x="233.51" y="292.64" width="42" height="24" transform="translate(388.51 518.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="19" y="248.53" width="42" height="24" fill="#fff" opacity="0.4"/><rect x="233.51" y="339.64" width="42" height="24" transform="translate(388.51 612.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="19" y="295.53" width="42" height="24" fill="#fff" opacity="0.4"/><rect x="233.51" y="386.64" width="42" height="24" transform="translate(388.51 706.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="19" y="342.53" width="42" height="24" fill="#fff" opacity="0.4"/><rect x="233.51" y="433.64" width="42" height="24" transform="translate(388.51 800.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="19" y="389.53" width="42" height="24" fill="#fff" opacity="0.4"/><rect x="233.51" y="480.64" width="42" height="24" transform="translate(388.51 894.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="19" y="436.53" width="42" height="24" fill="#fff" opacity="0.4"/><rect x="233.51" y="527.64" width="42" height="24" transform="translate(388.51 988.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="19" y="483.53" width="42" height="24" fill="#fff" opacity="0.4"/><rect x="233.51" y="574.64" width="42" height="24" transform="translate(388.51 1082.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="190" y="424.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="190" y="442.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="190" y="460.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="446" y="430.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="446" y="448.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="446" y="466.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="190" y="478.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="190" y="496.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="190" y="514.53" width="98" height="12" fill="#fff" opacity="0.4"/><rect x="324" y="300.53" width="27" height="35" fill="#fff" opacity="0.4"/><rect x="503.51" y="391.64" width="27" height="35" transform="translate(913.51 727.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="324" y="356.53" width="27" height="35" fill="#fff" opacity="0.4"/><rect x="503.51" y="447.64" width="27" height="35" transform="translate(913.51 839.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="324" y="412.53" width="27" height="35" fill="#fff" opacity="0.4"/><rect x="503.51" y="503.64" width="27" height="35" transform="translate(913.51 951.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="324" y="468.53" width="27" height="35" fill="#fff" opacity="0.4"/><rect x="503.51" y="559.64" width="27" height="35" transform="translate(913.51 1063.17) rotate(-180)" fill="#fff" opacity="0.4"/><rect x="559" y="112.53" width="36" height="46" fill="#fff" opacity="0.4"/><rect x="559" y="178.53" width="36" height="46" fill="#fff" opacity="0.4"/><rect x="559" y="244.53" width="36" height="46" fill="#fff" opacity="0.4"/><rect x="559" y="310.53" width="36" height="46" fill="#fff" opacity="0.4"/><rect x="559" y="376.53" width="36" height="46" fill="#fff" opacity="0.4"/><rect x="559" y="442.53" width="36" height="46" fill="#fff" opacity="0.4"/><rect x="672.5" y="206.53" width="134" height="39" fill="#fff" opacity="0.4"/><rect x="673" y="290.53" width="134" height="39" fill="#fff" opacity="0.4"/><rect x="673.5" y="374.53" width="134" height="39" fill="#fff" opacity="0.4"/><rect x="674" y="458.53" width="134" height="39" fill="#fff" opacity="0.4"/><rect x="30" y="125.53" width="18" height="38" fill="#fff" opacity="0.4"/><rect x="910" y="300.53" width="45" height="58" fill="#fff" opacity="0.4"/><rect x="910" y="384.53" width="45" height="58" fill="#fff" opacity="0.4"/><rect x="910" y="468.53" width="45" height="58" fill="#fff" opacity="0.4"/><path d="M385.19,167.32h-6.88a4.82,4.82,0,1,0,0-9.63H322.58a4.82,4.82,0,0,0,0,9.63h6.88a4.82,4.82,0,1,0,0,9.63h-9.63a4.82,4.82,0,0,0,0,9.63h55.73a4.82,4.82,0,0,0,0-9.63h9.63a4.82,4.82,0,1,0,0-9.63Z" transform="translate(-120.51 -91.11)" fill="#252223" opacity="0.1"/><path d="M631.19,288.32h-6.88a4.82,4.82,0,1,0,0-9.63H568.58a4.82,4.82,0,0,0,0,9.63h6.88a4.82,4.82,0,1,0,0,9.63h-9.63a4.82,4.82,0,1,0,0,9.63h55.73a4.82,4.82,0,1,0,0-9.63h9.63a4.82,4.82,0,1,0,0-9.63Z" transform="translate(-120.51 -91.11)" fill="#252223" opacity="0.1"/><path d="M1050.19,130.32h-6.88a4.82,4.82,0,1,0,0-9.63H987.58a4.82,4.82,0,0,0,0,9.63h6.88a4.82,4.82,0,1,0,0,9.63h-9.63a4.82,4.82,0,1,0,0,9.63h55.73a4.82,4.82,0,1,0,0-9.63h9.63a4.82,4.82,0,1,0,0-9.63Z" transform="translate(-120.51 -91.11)" fill="#252223" opacity="0.1"/><path d="M918.56,95.65a181.12,181.12,0,0,0-25.21,1.52h0a6,6,0,0,0-12.1,0h0a181.12,181.12,0,0,0-25.21-1.52c-18.65,0-33.78,2-33.78,4.54s15.12,4.54,33.78,4.54a181.12,181.12,0,0,0,25.21-1.52h0a6,6,0,0,0,.39,2.13,4,4,0,0,0-.4,6.53,11.17,11.17,0,0,0-6.63,6.1,10.33,10.33,0,0,0-5.8-2.11L806,113.06a24.54,24.54,0,0,0-19.67-9.85H746.79a24.54,24.54,0,0,0-19.78,10l-59.66,2.67a10.33,10.33,0,0,0-5.43,1.83,11.17,11.17,0,0,0-5.81-5.58,4,4,0,0,0-.95-7.19,6,6,0,0,0,.25-1.73h0a181.11,181.11,0,0,0,25.21,1.52c18.65,0,33.78-2,33.78-4.54s-15.12-4.54-33.78-4.54a181.12,181.12,0,0,0-25.21,1.52h0a6,6,0,0,0-6-6h0a6,6,0,0,0-6,6h0a181.12,181.12,0,0,0-25.21-1.52c-18.65,0-33.78,2-33.78,4.54s15.12,4.54,33.78,4.54a181.12,181.12,0,0,0,25.21-1.52h0a6,6,0,0,0,.39,2.13,4,4,0,0,0-.24,6.66,11.14,11.14,0,0,0-7.21,10.41v7.46A11.14,11.14,0,0,0,647.4,141h4.43a11.11,11.11,0,0,0,8.93-4.5,10.33,10.33,0,0,0,6.76,2.77l58.5,1.64a24.7,24.7,0,0,0,7.25,7.39c-5.6,5.69-27.44,30.92-23.92,75.38,0,0,3.53,6.55,12.6,0,0,0-5.8-49.54,26.67-69.94a8.06,8.06,0,0,0,7.61,5.41h4.15a21.68,21.68,0,1,0,15.91,0h4.15a8.06,8.06,0,0,0,7.61-5.41c32.47,20.4,26.67,69.94,26.67,69.94,9.07,6.55,12.6,0,12.6,0,4-50.92-25.21-76.62-25.21-76.62h-.53a24.7,24.7,0,0,0,5.48-6.06l61.58-1.72a10.34,10.34,0,0,0,7.05-3,11.12,11.12,0,0,0,9.14,4.78h4.43a11.14,11.14,0,0,0,11.14-11.14v-7.46a11.14,11.14,0,0,0-6.6-10.17,4,4,0,0,0-.72-7.31,6,6,0,0,0,.25-1.73h0a181.11,181.11,0,0,0,25.21,1.52c18.65,0,33.78-2,33.78-4.54S937.22,95.65,918.56,95.65Z" transform="translate(-120.51 -91.11)" fill="url(#4ef13be0-8e55-4463-b812-64152197208f)"/><circle cx="647.83" cy="87.06" r="20.44" fill="#348eed"/><circle cx="647.83" cy="87.06" r="13.79" fill="#348eed"/><circle cx="647.83" cy="87.06" r="13.79" fill="#f5f5f5" opacity="0.2"/><circle cx="647.83" cy="87.06" r="9.03" fill="#348eed"/><circle cx="647.83" cy="87.06" r="9.03" opacity="0.25"/><path d="M736.48,147.74S708.91,172,712.71,220c0,0,3.33,6.18,11.89,0,0,0-7.13-60.86,40.41-72.27Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M800.19,147.74S827.77,172,824,220c0,0-3.33,6.18-11.89,0,0,0,7.13-60.86-40.41-72.27Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><rect x="604.32" y="15.26" width="83.68" height="46.36" rx="23.18" ry="23.18" fill="#348eed"/><path d="M738.54,142.22l-65.29-1.83a9.79,9.79,0,0,1-9.52-9.79V128.1a9.79,9.79,0,0,1,9.35-9.78l65.29-2.93a9.79,9.79,0,0,1,10.23,9.78v7.27A9.79,9.79,0,0,1,738.54,142.22Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M797.66,142.22l65.29-1.83a9.79,9.79,0,0,0,9.52-9.79V128.1a9.79,9.79,0,0,0-9.35-9.78l-65.29-2.93a9.79,9.79,0,0,0-10.23,9.78v7.27A9.79,9.79,0,0,0,797.66,142.22Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M738.54,142.22l-65.29-1.83a9.79,9.79,0,0,1-9.52-9.79V128.1a9.79,9.79,0,0,1,9.35-9.78l65.29-2.93a9.79,9.79,0,0,1,10.23,9.78v7.27A9.79,9.79,0,0,1,738.54,142.22Z" transform="translate(-120.51 -91.11)" fill="#f5f5f5" opacity="0.2"/><path d="M797.66,142.22l65.29-1.83a9.79,9.79,0,0,0,9.52-9.79V128.1a9.79,9.79,0,0,0-9.35-9.78l-65.29-2.93a9.79,9.79,0,0,0-10.23,9.78v7.27A9.79,9.79,0,0,0,797.66,142.22Z" transform="translate(-120.51 -91.11)" fill="#f5f5f5" opacity="0.2"/><rect x="523.26" y="22.87" width="25.2" height="28.05" rx="11.17" ry="11.17" fill="#348eed"/><rect x="747.2" y="22.87" width="25.2" height="28.05" rx="11.17" ry="11.17" fill="#348eed"/><rect x="528.49" y="16.69" width="15.21" height="7.61" rx="3.8" ry="3.8" fill="#348eed"/><rect x="529.92" y="3.85" width="11.41" height="17.12" rx="5.71" ry="5.71" fill="#348eed"/><ellipse cx="506.14" cy="12.41" rx="31.86" ry="4.28" fill="#348eed"/><ellipse cx="565.1" cy="12.41" rx="31.86" ry="4.28" fill="#348eed"/><rect x="752.9" y="16.69" width="15.21" height="7.61" rx="3.8" ry="3.8" fill="#348eed"/><rect x="754.33" y="3.85" width="11.41" height="17.12" rx="5.71" ry="5.71" fill="#348eed"/><ellipse cx="730.56" cy="12.41" rx="31.86" ry="4.28" fill="#348eed"/><ellipse cx="789.51" cy="12.41" rx="31.86" ry="4.28" fill="#348eed"/><ellipse cx="506.14" cy="12.41" rx="31.86" ry="4.28" fill="#f5f5f5" opacity="0.2"/><ellipse cx="565.1" cy="12.41" rx="31.86" ry="4.28" fill="#f5f5f5" opacity="0.2"/><ellipse cx="730.56" cy="12.41" rx="31.86" ry="4.28" fill="#f5f5f5" opacity="0.2"/><ellipse cx="789.51" cy="12.41" rx="31.86" ry="4.28" fill="#f5f5f5" opacity="0.2"/><rect x="628.81" y="52.82" width="38.04" height="15.21" rx="7.61" ry="7.61" fill="#348eed"/><rect x="628.81" y="52.82" width="38.04" height="15.21" rx="7.61" ry="7.61" fill="#f5f5f5" opacity="0.2"/><polygon points="682.36 131.85 597.65 131.85 597.65 216.56 682.36 216.56 704 216.56 704 131.85 682.36 131.85" fill="#67647e"/><rect x="682.36" y="131.85" width="21.65" height="84.71" opacity="0.25"/><rect x="608" y="145.97" width="16" height="8.47" opacity="0.25"/><path d="M764.45,213c3.6,5.1,3,11.67,3,11.67s-6.38-1.69-10-6.79-5-10.32-3-11.67S760.85,207.89,764.45,213Z" transform="translate(-120.51 -91.11)" fill="#67647e"/><path d="M770.54,213c-3.6,5.1-3,11.67-3,11.67s6.38-1.69,10-6.79,5-10.32,3-11.67S774.14,207.89,770.54,213Z" transform="translate(-120.51 -91.11)" fill="#67647e"/><path d="M324.48,444.59l-.11.34A2,2,0,0,0,324.48,444.59Z" transform="translate(-120.51 -91.11)" fill="url(#5bed69c4-1e02-4930-aaf9-54950fab6759)"/><path d="M646.39,721.2c.07-.1.14-.19.19-.29l.11-.21c.05-.1.11-.19.15-.29l.08-.21c0-.1.08-.2.11-.3s0-.13.05-.2.05-.2.07-.31,0-.12,0-.19,0-.21,0-.32,0-.11,0-.17,0-.22,0-.33,0-.1,0-.15,0-.23,0-.34l0-.13c0-.12,0-.24-.08-.36l0-.11c0-.13-.08-.25-.12-.38l0-.08q-.07-.2-.16-.39l0-.06q-.09-.21-.2-.41l0,0-.24-.43h0a14.8,14.8,0,0,0-3.43-3.72c-10.31,4.25-23-.61-23-.61s-17-8.49-15.77-6.07c.41.82.2,2.45-.26,4.27-8.14-1.71-12.63-6.08-15.07-10l9.27-10s-37.61-21.23-41.85-32.15-24.87-41.85-24.87-41.85-6.67-24.26-18.8-29.72c0,0-24.19-28.9-38.32-53.68,5-12.49,12-32,10.42-40.33-2-10.38.07-30,.9-36.94,6.71,5.6,34,27.77,44.59,27.24,3.81-.19,7.91-2.23,11.76-4.95,9.16-5.8,17.36-16.28,17.36-16.28-1.24.12-2.25-1-3.07-2.9,10.13-11,31.11-33.64,33.4-34.1,3-.61,19.41-29.11,10.31-35.18s-25.47,15.77-26.08,20c-.41,2.88-13.1,15.52-21.22,23.36,0-.2,0-.31,0-.31l-1.2.6c0-.38,0-.6,0-.6l-20.95,10.47-17.87-24.42s-4.85-26.08-17-30.33S474.48,370,474.48,370a12.49,12.49,0,0,0-.27,1.29c-.61-.81-.94-1.29-.94-1.29s0,.11-.08.29a31.91,31.91,0,0,1-.69-11.42l.17-.1c.07-.47.15-.92.23-1.35a30.35,30.35,0,0,0,12.29-37.59c3.09-2.16,7.57-3.5,11.38-5.14a33.38,33.38,0,0,0,13.69-10.35,12.07,12.07,0,0,0-6.34.13c-.26-2.81,3-6,.46-8.14-1.56-1.33-4.47-1.21-6.69-.55s-4.25,1.74-6.61,2c-4.11.5-8-1.49-10.93-3.64s-5.69-4.67-9.61-5.69c-7.79-2-15.51,2.61-23.33,4.57-12.56,3.14-20,6.5-20.61,14.5a26,26,0,0,0-4.44,3.77,16.55,16.55,0,0,0-5.32,9c-1.06,5.44,1.14,11,3.8,15.84,1.51,2.77,8.77,17.12,13.7,15.23a30.5,30.5,0,0,0,4.54,4.25c-.16,1.65-.39,3.32-.65,5a11.28,11.28,0,0,1-3.57,1.23,42.93,42.93,0,0,1-8.23.72,120.44,120.44,0,0,1-12.91-.79,109,109,0,0,0-12.55-.72,61.25,61.25,0,0,0-6.26.3l-.32,0-1.24.15-.19,0-1.35.22-.15,0-1.1.22-.25.05-1.12.27h0l-1.1.31-.18.05-.86.27-.19.06c-.65.22-1.26.46-1.84.7l-.18.08-.72.31-.13.06-.81.38-.07,0-.7.35-.17.09-.68.35,0,0-.86.45-.52.27-.24.13-.71.36c-6.07,3-64.9,18.8-75.21,50.34l.21.19,0,0,.23.21c-.17.46-.34.92-.49,1.38,0,0,1,.9,2.56,2.36-2.77,12.06-10.19,42.88-14.09,44.34-4.85,1.82-10.31,38.82,2.43,37.61s12.74-30.93,12.74-30.93,8.4-22.52,14.59-33.95a15.94,15.94,0,0,1,2.43,4.71l0,.13,0-.12a3.41,3.41,0,0,1,.07,1.6c.6-1.76,3.71-9.84,10.2-8.76,6.93,1.16,33.11-24.63,35.59-27.1-.06.67-.14,1.51-.22,2.48h0v0c0,.57-.1,1.18-.15,1.84l0,.21,0,.5,0,.33,0,.51,0,.36,0,.51,0,.46-.05.75,0,.61,0,.43,0,.61,0,.41,0,.64,0,.43,0,.7,0,.4-.07,1.1v.15l-.06,1,0,.35,0,.84,0,.4,0,.86,0,.36-.05,1v.2q0,.65-.06,1.31v.08q0,.6-.05,1.2v.35l0,1,0,.4q0,.5,0,1v.34q0,1.37-.09,2.77v.2q0,.59,0,1.18v.36q0,.53,0,1.06v.37q0,.58,0,1.17v.23q0,1.43,0,2.88c0,.1,0,.2,0,.31q0,.56,0,1.12,0,.19,0,.39,0,.53,0,1.07c0,.1,0,.2,0,.3,0,13.23.81,26.7,3.78,34.38a37.78,37.78,0,0,1,2.48,12.92,52.73,52.73,0,0,1-6.12,22.87h0l.71-.22-.13.23.39-.12c-.6,1.25-1,1.94-1,1.94s.88-.28,2.45-.74c-2.24,7.9-3.73,20.06.58,35.32,0,0,2.43,13.34.61,18.2s-3.64,43.67-3.64,43.67-3.64,4.85-10.31,1.82-88.55-13.34-88.55-13.34-.19.33-.51.92c-2.52-.79-6.15-2-8.8-3.11,1-1.38,1.89-2.17,2.64-2.06,0,0-4.37-2.11-9.13-3.78h0l-.87-.3h0l-.85-.28-.06,0-.81-.25-.09,0-.74-.21-.15,0-.7-.18-.18,0-.67-.15-.19,0-.6-.12-.23,0-.54-.09-.26,0-.49-.06-.27,0-.46,0h-.93l-.37,0-.24,0-.33.07-.22,0-.28.1-.2.07a2.36,2.36,0,0,0-.26.15l-.15.09a1.88,1.88,0,0,0-.33.31c-3,3.64-20,73.39-12.13,78.24l.68.41.28.16.36.2.35.18.25.13.38.18.19.09.39.17.14.06.4.15.09,0,.41.13h.05c4.4,1.19,5.86-2.88,11.19-11.6,5.22-8.54,11.93-19.31,17.79-23.3.13.29.26.58.4.86,0,0,61.26,6.67,83.7,14s40,17,54.59,0c13.06-15.23,26.11-64.62,28.66-74.63h0v0l.38-1.5h0l0-.13v-.13l48.52,37,21.23,24.87s29.72,41.85,35.18,42.46S567,722.73,567,722.73l.92-1c.22,1.11.39,2.13.52,3-2,4.81-.15,10.61,1.67,14.43h0l.08.16.21.42.11.22.2.39.1.19.21.4.11.19.16.29.08.15.21.36.09.15.13.21.07.12.16.26.06.1.1.15,0,.07.1.16,0,0,.06.08v0l0,0s63.69-15.16,71.57-20c.25-.15.48-.31.7-.47l.2-.16.4-.32.2-.19.31-.29.18-.21.24-.28Z" transform="translate(-120.51 -91.11)" fill="url(#a88837d3-ccd3-4ab3-a7ec-270b2797a153)"/><path d="M276.5,602.74s-14.18-4.14-14.77-5.91-12.41,32.49-12.41,32.49l11.82,8.27s12.41-7.09,18.91-5.91S276.5,602.74,276.5,602.74Z" transform="translate(-120.51 -91.11)" fill="#4c4c56"/><path d="M581.94,687.22s1.77,16,21.27,17.72-13,16-13,16l-24.81,1.77s-.59-10-4.73-17.72S581.94,687.22,581.94,687.22Z" transform="translate(-120.51 -91.11)" fill="#4c4c56"/><path d="M376.94,507.62s-11.22,17.13-3.54,44.31c0,0,2.36,13,.59,17.72s-3.54,42.54-3.54,42.54-3.54,4.73-10,1.77-86.25-13-86.25-13-13,22.45-5.91,36c0,0,59.67,6.5,81.53,13.59s39,16.54,53.17,0,28.36-74.44,28.36-74.44l47.26,36,20.68,24.22s28.95,40.76,34.27,41.35,30.13,39.58,30.13,39.58l30.13-32.49S557.13,664.18,553,653.54s-24.22-40.76-24.22-40.76-6.5-23.63-18.31-28.95c0,0-42.54-50.81-46.67-74.44S392.89,497,392.89,497Z" transform="translate(-120.51 -91.11)" fill="#5f5d7e"/><path d="M596.71,712s4.14-9.45,3-11.82S615,706.12,615,706.12s12.41,4.73,22.45.59c0,0,8.86,6.5,1.18,11.22s-69.71,19.5-69.71,19.5-9.45-13.59-1.77-21.27Z" transform="translate(-120.51 -91.11)" fill="#986365"/><path d="M553,653.54c-4.14-10.63-24.22-40.76-24.22-40.76s-6.5-23.63-18.31-28.95c0,0-42.54-50.81-46.67-74.44-.85-4.87-4.37-8.26-9.41-10.57l-8.24,24.75-11.25,33.8c-2.17,6.52-4.23,13.79-4,20.53.29-1.12.44-1.74.44-1.74l47.26,36,20.68,24.22s28.95,40.76,34.27,41.35,30.13,39.58,30.13,39.58l30.13-32.49S557.13,664.18,553,653.54Z" transform="translate(-120.51 -91.11)" opacity="0.1"/><path d="M473.23,355.79s-5,12.7,1.48,24.52-2.66,32.79-8.57,34-29.54-14.18-31.31-24.22,7.68-30.72,3-44.31Z" transform="translate(-120.51 -91.11)" fill="#fdc2cc"/><path d="M441.33,377.65s18.31,37.22,38.4,10.63c0,0,20.09,40.76,13.59,47.26A136.22,136.22,0,0,1,478.55,448l-10.63,74.44s-60.26-20.68-85.66-17.13l39-93.34Z" transform="translate(-120.51 -91.11)" opacity="0.1"/><path d="M441.33,375.88s18.31,37.22,38.4,10.63c0,0,20.09,40.76,13.59,47.26a136.22,136.22,0,0,1-14.77,12.41l-10.63,74.44s-60.26-20.68-85.66-17.13l39-93.34Z" transform="translate(-120.51 -91.11)" fill="#d39999"/><path d="M310.77,419s-10,46.08-14.77,47.85-10,37.81,2.36,36.63,12.41-30.13,12.41-30.13,13-34.86,18.31-39S310.77,419,310.77,419Z" transform="translate(-120.51 -91.11)" fill="#fdc2cc"/><path d="M542.95,440.27s26.59-24.81,27.18-28.95,16.54-25.4,25.4-19.5-7.09,33.67-10,34.27-37.81,39-37.81,39Z" transform="translate(-120.51 -91.11)" fill="#fdc2cc"/><path d="M438.67,366.13s-3.25,3.84-25.11,1.48-27.18,1.77-33.08,4.73-63.21,18.31-73.26,49c0,0,22.45,20.09,20.09,25.4,0,0,3-10,10-8.86s34.86-26.59,34.86-26.59-5.32,52,1.77,70.3-3.54,36.63-3.54,36.63,50.22-16,72.67-8.27c0,0,13-58.49,1.77-82.12s4.73-46.08,4.73-46.08Z" transform="translate(-120.51 -91.11)" opacity="0.1"/><path d="M439.26,364.36s-3.25,3.84-25.11,1.48-27.18,1.77-33.08,4.73-63.21,18.31-73.26,49c0,0,22.45,20.09,20.09,25.4,0,0,3-10,10-8.86s34.86-26.59,34.86-26.59-5.32,52,1.77,70.3S371,516.48,371,516.48s50.22-16,72.67-8.27c0,0,13-58.49,1.77-82.12S450.19,380,450.19,380Z" transform="translate(-120.51 -91.11)" opacity="0.1"/><path d="M438.67,364.36s-3.25,3.84-25.11,1.48-27.18,1.77-33.08,4.73-63.21,18.31-73.26,49c0,0,22.45,20.09,20.09,25.4,0,0,3-10,10-8.86s34.86-26.59,34.86-26.59-5.32,52,1.77,70.3-3.54,36.63-3.54,36.63,50.22-16,72.67-8.27c0,0,13-58.49,1.77-82.12S449.6,380,449.6,380Z" transform="translate(-120.51 -91.11)" fill="#ec7580"/><path d="M471.76,375s8.57,12.7,20.38,16.84,16.54,29.54,16.54,29.54l17.72,24.22L547.67,435s.59,28.95,6.5,28.36c0,0-14.77,18.91-26.59,19.5S482.69,455,482.69,455s-3.54,26-1.18,38.4-14.77,50.22-14.77,50.22l-23.63-4.73s12.41-47.26,27.77-54.94c0,0,0-31.9-2.36-39.58s15.36-36.63,13-42.54c-1.33-3.31-6.53-10.4-9.16-16.84A16.85,16.85,0,0,1,471.76,375Z" transform="translate(-120.51 -91.11)" opacity="0.1"/><path d="M473.53,373.81s8.57,12.7,20.38,16.84,16.54,29.54,16.54,29.54l17.72,24.22,21.27-10.63s.59,28.95,6.5,28.36c0,0-14.77,18.91-26.59,19.5s-44.9-27.77-44.9-27.77-3.54,26-1.18,38.4-14.77,50.22-14.77,50.22l-23.63-4.73s12.41-47.26,27.77-54.94c0,0,0-31.9-2.36-39.58s15.36-36.63,13-42.54c-1.33-3.31-6.53-10.4-9.16-16.84A16.85,16.85,0,0,1,473.53,373.81Z" transform="translate(-120.51 -91.11)" opacity="0.1"/><path d="M472.35,373.81s8.57,12.7,20.38,16.84,16.54,29.54,16.54,29.54L527,444.41l21.27-10.63s.59,28.95,6.5,28.36c0,0-14.77,18.91-26.59,19.5s-44.9-27.77-44.9-27.77-3.54,26-1.18,38.4-14.77,50.22-14.77,50.22l-23.63-4.73s12.41-47.26,27.77-54.94c0,0,0-31.9-2.36-39.58s15.36-36.63,13-42.54c-1.33-3.31-6.53-10.4-9.16-16.84A16.85,16.85,0,0,1,472.35,373.81Z" transform="translate(-120.51 -91.11)" fill="#ec7580"/><path d="M473.35,374.81s8.57,12.7,20.38,16.84,16.54,29.54,16.54,29.54L528,445.41l21.27-10.63s.59,28.95,6.5,28.36c0,0-14.77,18.91-26.59,19.5s-44.9-27.77-44.9-27.77-3.54,26-1.18,38.4-14.77,50.22-14.77,50.22l-23.63-4.73s12.41-47.26,27.77-54.94c0,0,0-31.9-2.36-39.58s15.36-36.63,13-42.54c-1.33-3.31-6.53-10.4-9.16-16.84A16.85,16.85,0,0,1,473.35,374.81Z" transform="translate(-120.51 -91.11)" opacity="0.05"/><path d="M267.64,596.83s-17.13-8.27-20.09-4.73-19.5,71.48-11.82,76.21,8.27,1.18,14.77-9.45,15.36-24.81,21.86-24.22c0,0-18.91-6.5-18.31-8.86S263.51,596.24,267.64,596.83Z" transform="translate(-120.51 -91.11)" fill="#986365"/><path d="M438.86,361a29.53,29.53,0,0,0,32.92,1.85,29.93,29.93,0,0,1,1.46-5.9l-35.45-10C439.25,351.12,439.35,356,438.86,361Z" transform="translate(-120.51 -91.11)" opacity="0.1"/><path d="M460.78,337.89c7.2.62,16-.73,18.65-5.63.77-1.41.93-3,1.71-4.37,2.26-4.06,8.72-5.72,13.91-8a32.51,32.51,0,0,0,13.33-10.08,11.76,11.76,0,0,0-6.18.13c-.25-2.73,2.9-5.85.45-7.93-1.52-1.29-4.35-1.17-6.52-.53s-4.13,1.69-6.44,2c-4,.49-7.79-1.45-10.65-3.55s-5.54-4.55-9.36-5.54c-7.58-2-15.11,2.55-22.72,4.45-15.61,3.91-23.18,8.15-18.94,21.72C431.16,330.61,447.68,336.76,460.78,337.89Z" transform="translate(-120.51 -91.11)" fill="#865a61"/><circle cx="336.18" cy="245.18" r="29.54" fill="#fdc2cc"/><path d="M433.73,331.79c1.43-5.8,5.56-11.21,11.31-12.82,4.89-1.37,10.09.12,14.87,1.85s9.65,3.75,14.72,3.45,10.39-3.8,10.77-8.86a4.24,4.24,0,0,0-.37-2.29,5.63,5.63,0,0,0-2.11-2c-7.43-4.74-15.88-8.47-24.69-8.33-7.25.12-14.18,2.84-20.92,5.52-8.5,3.38-18.17,8.11-19.92,17.09-1,5.3,1.11,10.69,3.7,15.43,1.5,2.74,8.76,17.12,13.56,14.75C436.59,354.66,432.81,335.51,433.73,331.79Z" transform="translate(-120.51 -91.11)" opacity="0.1"/><path d="M434.91,330.61c1.43-5.8,5.56-11.21,11.31-12.82,4.89-1.37,10.09.12,14.87,1.85s9.65,3.75,14.72,3.45,10.39-3.8,10.77-8.86a4.24,4.24,0,0,0-.37-2.29,5.63,5.63,0,0,0-2.11-2c-7.43-4.74-15.88-8.47-24.69-8.33-7.25.12-14.18,2.84-20.92,5.52-8.5,3.38-18.17,8.11-19.92,17.09-1,5.3,1.11,10.69,3.7,15.43,1.5,2.74,8.76,17.12,13.56,14.75C437.77,353.48,434,334.33,434.91,330.61Z" transform="translate(-120.51 -91.11)" fill="#865a61"/><path d="M237.51,668.91c-7.68-4.73,8.86-72.67,11.82-76.21,1.29-1.55,5.31-.84,9.42.46-4.66-1.63-9.71-2.83-11.19-1-3,3.54-19.5,71.48-11.82,76.21a13.93,13.93,0,0,0,4.28,1.95A21.65,21.65,0,0,1,237.51,668.91Z" transform="translate(-120.51 -91.11)" fill="#fff" opacity="0.5"/><path d="M640.81,710.34c.8,2,.56,4.39-2.75,6.42-7.68,4.73-69.71,19.5-69.71,19.5a29.62,29.62,0,0,1-1.69-2.87,31.57,31.57,0,0,0,2.28,4.05s62-14.77,69.71-19.5C642.62,715.5,642.17,712.58,640.81,710.34Z" transform="translate(-120.51 -91.11)" fill="#fff" opacity="0.5"/><g opacity="0.05"><path d="M330.47,439.08C325.56,431.18,312,419,312,419c10-30.72,67.35-46.08,73.26-49,3.26-1.63,6.34-3.62,12.12-4.68-9,.66-12.79,3.24-16.84,5.27-5.91,3-63.21,18.31-73.26,49,0,0,21.58,19.31,20.19,25.07A18.49,18.49,0,0,1,330.47,439.08Z" transform="translate(-120.51 -91.11)"/><path d="M327.42,444.67l-.11.33A1.91,1.91,0,0,0,327.42,444.67Z" transform="translate(-120.51 -91.11)"/><path d="M439.35,365.33l-.68-1s-.75.88-3.93,1.54A34.47,34.47,0,0,0,439.35,365.33Z" transform="translate(-120.51 -91.11)"/><path d="M338,436.17a7.88,7.88,0,0,0,2.58-.7A6.42,6.42,0,0,0,338,436.17Z" transform="translate(-120.51 -91.11)"/><path d="M414.86,506.88c10.57-1.16,20.89-1.18,28.24,1.33,0,0,.14-.62.37-1.73C435.41,504.91,425.06,505.46,414.86,506.88Z" transform="translate(-120.51 -91.11)"/><path d="M375.68,514.93c2-4,9.17-19.82,3-35.67-7.09-18.31-1.77-70.3-1.77-70.3s-2,2-5.12,5c-1.09,12.89-3.67,50.84,2.17,65.93,7.09,18.31-3.54,36.63-3.54,36.63S372.39,515.86,375.68,514.93Z" transform="translate(-120.51 -91.11)"/></g><path d="M905.08,706.34c-7.12,3.67-14.58,6.84-21.94,10-27.19,11.48-54.79,23.06-84,27-54.82,7.39-111.44-12.62-165.33-.17-45.15,10.42-82.49,42.35-126.6,56.57-20.51,6.61-41.85,9.2-63.38,9.2H441q-4-.05-7.94-.2c-21.83-.82-43.75-4.05-65.15-8.18-67.57-13-136.34-36.83-188-80.7C330.34,692.33,640.19,650.15,905.08,706.34Z" transform="translate(-120.51 -91.11)" fill="#252223" opacity="0.1"/><path d="M745.48,534.72s19.42,19.42,8.46,48.24,18.8,76.75,18.8,76.75l-.91-.15c-39.89-7-59.71-52.66-37.53-86.55C742.54,560.4,749.31,545.62,745.48,534.72Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M745.48,534.72s11,23.81,0,43.23-1.88,73.93,27.25,81.76" transform="translate(-120.51 -91.11)" fill="none" stroke="#535461" stroke-miterlimit="10"/><path d="M710.89,613.27s22.16-3.53,24.18,16.33,42.62,22.61,42.62,22.61l-.76.51c-33.52,22-65.56,14-60.73-15.2C718,626.66,717.84,615.75,710.89,613.27Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M710.89,613.27s22.16-3.53,24.18,16.33,42.62,22.61,42.62,22.61l-.76.51c-33.52,22-65.56,14-60.73-15.2C718,626.66,717.84,615.75,710.89,613.27Z" transform="translate(-120.51 -91.11)" fill="#f5f5f5" opacity="0.2"/><path d="M710.89,613.27s17.2,3.78,15.79,19.42,25.55,34.39,51,19.53" transform="translate(-120.51 -91.11)" fill="none" stroke="#535461" stroke-miterlimit="10"/><path d="M795.6,656s-13.94-2.79-17.65-6.5-20.44-10.22-22.3-5.57-25.09,20.44-9.29,23.23,37.17,3.72,41.81,1.86S795.6,656,795.6,656Z" transform="translate(-120.51 -91.11)" fill="#a8a8a8"/><path d="M746.35,665.42c15.8,2.79,37.17,3.72,41.81,1.86,3.54-1.42,6-8.21,7-11.38l.46.1s-2.79,11.15-7.43,13-26,.93-41.81-1.86c-4.56-.8-5.86-2.69-5.37-5.09C741.37,663.62,743,664.82,746.35,665.42Z" transform="translate(-120.51 -91.11)" opacity="0.2"/><path d="M1048.26,680s13.21-44.87-2.48-77.89a70.87,70.87,0,0,1-5.73-44.46,119.19,119.19,0,0,1,6.29-20.87" transform="translate(-120.51 -91.11)" fill="none" stroke="#535461" stroke-miterlimit="10" stroke-width="2"/><path d="M1036.58,515.88c0,5.5,10,21.44,10,21.44s10-15.95,10-21.44a10,10,0,0,0-19.91,0Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M1020.12,546.34c3,4.62,20,12.59,20,12.59s-.31-18.8-3.3-23.41a10,10,0,0,0-16.72,10.82Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M1020.84,598.39c4.91,2.48,23.63.77,23.63.77s-9.76-16.07-14.67-18.55a10,10,0,1,0-9,17.78Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M1030.25,637.65c4.42,3.27,23.16,4.75,23.16,4.75s-6.9-17.49-11.32-20.76a10,10,0,0,0-11.84,16Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M1061,560c-3.94,3.83-22.32,7.8-22.32,7.8s4.5-18.25,8.44-22.08A10,10,0,0,1,1061,560Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M1071.46,606.05c-4.91,2.48-23.63.77-23.63.77s9.76-16.07,14.67-18.55a10,10,0,1,1,9,17.78Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M1075.45,652.2c-4.42,3.27-23.16,4.75-23.16,4.75s6.9-17.49,11.32-20.76a10,10,0,0,1,11.84,16Z" transform="translate(-120.51 -91.11)" fill="#348eed"/><path d="M1077,675.61s-24.15-4.83-30.59-11.27-35.42-17.71-38.64-9.66-43.47,35.42-16.1,40.25,64.4,6.44,72.44,3.22S1077,675.61,1077,675.61Z" transform="translate(-120.51 -91.11)" fill="#a8a8a8"/><path d="M991.68,691.94c27.37,4.83,64.4,6.44,72.44,3.22,6.13-2.45,10.39-14.23,12.07-19.72l.81.17s-4.83,19.32-12.88,22.54-45.08,1.61-72.44-3.22c-7.9-1.39-10.16-4.67-9.31-8.81C983.05,688.82,985.8,690.9,991.68,691.94Z" transform="translate(-120.51 -91.11)" opacity="0.2"/></svg>
\ No newline at end of file
<svg id="740546cb-34ca-4331-8221-ac3d3fc9ee67" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1120.61" height="862.52" viewBox="0 0 1120.61 862.52"><defs><linearGradient id="07a0b5f0-40d7-4714-acbe-80fa7c137a96" x1="922.95" y1="714.28" x2="922.95" y2="199.47" gradientTransform="matrix(1, 0.09, -0.09, 1, 45.13, -84.62)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient><linearGradient id="81276d2b-ddf3-474d-b794-9223ea4701e2" x1="329.5" y1="708.38" x2="329.5" y2="197" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#07a0b5f0-40d7-4714-acbe-80fa7c137a96"/></defs><title>co-working</title><path d="M1089.7,507c-41.29,62.11-30.84,148.44-10.05,216.82,7,22.89,14.91,47.08,10.21,72.38-5.75,30.94-29.19,54.77-53.22,68.11-43.79,24.33-94.62,22.33-132.33-5.19-32.59-23.79-54.74-64.38-88-87C760.72,734.4,686.49,754.58,622.39,787c-45.35,22.91-95.14,52.13-138.12,33.8-30.24-12.9-49.84-47.64-59.58-85.15-4.7-18.11-7.78-37.84-17.8-51.81-6-8.3-14-14-22.29-18.63C308.89,622.47,209,654.06,135.75,606,86.32,573.6,56.91,508.46,45.93,439.31S40.36,296.61,47.7,224.23C52.91,172.8,60.38,117.78,89.07,76.55c30.35-43.61,79.58-62.18,123-56.95S293.67,50.73,326.9,82C368.43,121,406.27,170.46,459,184c35.91,9.25,74.61.57,112.35-4,63.1-7.55,125.63-3.35,187.74,1.64,59.47,4.78,119.32,10.39,175.17,30.77,39.52,14.42,70.34,43.14,107.39,62.24,24.15,12.45,51.05,14.63,73.68,31,27.88,20.15,52.52,56.69,42.83,101.84C1148.95,450.48,1111.61,474,1089.7,507Z" transform="translate(-39.7 -18.74)" fill="#348eed" opacity="0.1"/><rect x="880.8" y="256.42" width="40.89" height="61.9" fill="#348eed" opacity="0.1"/><rect x="884.77" y="262.44" width="32.94" height="49.86" fill="#348eed" opacity="0.1"/><rect x="797.8" y="213.42" width="62.8" height="61.9" fill="#348eed" opacity="0.1"/><rect x="803.9" y="219.44" width="50.59" height="49.86" fill="#348eed" opacity="0.1"/><rect x="64.62" y="121.32" width="191.95" height="5.11" fill="#348eed" opacity="0.1"/><rect x="64.62" y="146.31" width="191.95" height="5.11" fill="#348eed" opacity="0.1"/><rect x="388.43" y="452.63" width="19.61" height="219.14" fill="#d6d6e3"/><path d="M1020.54,494.38V292.24A21.25,21.25,0,0,1,1041.79,271h0A21.25,21.25,0,0,1,1063,292.24V536.88a21.25,21.25,0,0,1-21.25,21.25H910.14a21.25,21.25,0,0,1-21.25-21.25h0a21.25,21.25,0,0,1,21.25-21.25h89.15A21.25,21.25,0,0,0,1020.54,494.38Z" transform="translate(-39.7 -18.74)" fill="#aebee1"/><path d="M1020.54,494.38V292.24A21.25,21.25,0,0,1,1041.79,271h0A21.25,21.25,0,0,1,1063,292.24V536.88a21.25,21.25,0,0,1-21.25,21.25H910.14a21.25,21.25,0,0,1-21.25-21.25h0a21.25,21.25,0,0,1,21.25-21.25h89.15A21.25,21.25,0,0,0,1020.54,494.38Z" transform="translate(-39.7 -18.74)" fill="#535461"/><path d="M888.92,535.74a21.25,21.25,0,0,1,21.22-20.11h89.15a21.25,21.25,0,0,0,21.25-21.25V292.24A21.25,21.25,0,0,1,1040.77,271V535.74Z" transform="translate(-39.7 -18.74)" fill="#d6d6e3"/><path d="M232.2,501.2V299.06A21.25,21.25,0,0,0,211,277.81h0a21.25,21.25,0,0,0-21.25,21.25V543.7A21.25,21.25,0,0,0,211,565H342.6a21.25,21.25,0,0,0,21.25-21.25h0a21.25,21.25,0,0,0-21.25-21.25H253.46A21.25,21.25,0,0,1,232.2,501.2Z" transform="translate(-39.7 -18.74)" fill="#aebee1"/><path d="M232.2,501.2V299.06A21.25,21.25,0,0,0,211,277.81h0a21.25,21.25,0,0,0-21.25,21.25V543.7A21.25,21.25,0,0,0,211,565H342.6a21.25,21.25,0,0,0,21.25-21.25h0a21.25,21.25,0,0,0-21.25-21.25H253.46A21.25,21.25,0,0,1,232.2,501.2Z" transform="translate(-39.7 -18.74)" fill="#535461"/><path d="M363.82,542.56a21.25,21.25,0,0,0-21.22-20.11H253.46A21.25,21.25,0,0,1,232.2,501.2V299.06A21.25,21.25,0,0,0,212,277.84V542.56Z" transform="translate(-39.7 -18.74)" fill="#d6d6e3"/><rect x="776.4" y="452.63" width="19.61" height="224.25" fill="#d6d6e3"/><rect x="388.43" y="452.63" width="19.61" height="16.2" opacity="0.1"/><rect x="776.4" y="452.63" width="19.61" height="16.2" opacity="0.1"/><path d="M498.17,337.92q-.47,5.18-1.19,10.5h-2.77v-10.5Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M578.52,447c.06,3.55-2.5,6.46-5.67,6.46H513v-6.24H562.8c2.15,0,3.49-2.6,2.41-4.68l-45.16-91.85a4,4,0,0,0-3.5-2.26H494.21v-10.5h28.21a2.8,2.8,0,0,1,2.45,1.58l51.77,100A17,17,0,0,1,578.52,447Z" transform="translate(-39.7 -18.74)" fill="#535461"/><path d="M468.6,430.34l-.82,1.38-7.67-5.12,23.73-182.47h6.11s.25.84.66,2.44C494.7,262.34,514.79,351.65,468.6,430.34Z" transform="translate(-39.7 -18.74)" fill="#535461"/><path d="M490.6,246.57l-22,183.77-.82,1.38-7.67-5.12,23.73-182.47h6.11S490.19,245,490.6,246.57Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><rect x="376.97" y="329.82" width="189.29" height="14.5" transform="translate(41.16 746.52) rotate(-83.17)" fill="#d6d6e3"/><path d="M403.83,447.07a1.72,1.72,0,0,1-1.71,1.71h-2.56a1.71,1.71,0,0,1-1.71-1.71.83.83,0,0,1,0-.2,1.71,1.71,0,0,1,1.69-1.5h2.56a1.72,1.72,0,0,1,1.65,1.3A1.58,1.58,0,0,1,403.83,447.07Z" transform="translate(-39.7 -18.74)" fill="#e3edf9"/><path d="M411.5,447.07a1.72,1.72,0,0,1-1.71,1.71h-2.56a1.71,1.71,0,0,1-1.71-1.71,1.68,1.68,0,0,1,.07-.47,1.61,1.61,0,0,1,.43-.73,1.67,1.67,0,0,1,1.2-.5h2.56a1.72,1.72,0,0,1,1.57,1A1.76,1.76,0,0,1,411.5,447.07Z" transform="translate(-39.7 -18.74)" fill="#e3edf9"/><path d="M418.32,447.07a1.72,1.72,0,0,1-1.71,1.71h-2.56a1.71,1.71,0,0,1-1.71-1.71,1.62,1.62,0,0,1,.15-.71,1.74,1.74,0,0,1,1.55-1h2.56a1.7,1.7,0,0,1,1.71,1.71Z" transform="translate(-39.7 -18.74)" fill="#e3edf9"/><path d="M426,447.07a1.72,1.72,0,0,1-1.71,1.71h-2.56a1.71,1.71,0,0,1-1.4-2.69l.2-.22a1.67,1.67,0,0,1,1.2-.5h2.56a1.72,1.72,0,0,1,1.24.55A1.65,1.65,0,0,1,426,447.07Z" transform="translate(-39.7 -18.74)" fill="#e3edf9"/><path d="M403.78,446.66a1.58,1.58,0,0,1,.05.41,1.72,1.72,0,0,1-1.71,1.71h-2.56a1.71,1.71,0,0,1-1.71-1.71.83.83,0,0,1,0-.2Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M411.36,446.39a1.76,1.76,0,0,1,.14.67,1.72,1.72,0,0,1-1.71,1.71h-2.56a1.71,1.71,0,0,1-1.71-1.71,1.68,1.68,0,0,1,.07-.47Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M418.07,446.16a1.72,1.72,0,0,1,.26.9,1.72,1.72,0,0,1-1.71,1.71h-2.56a1.71,1.71,0,0,1-1.71-1.71,1.62,1.62,0,0,1,.15-.71Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M426,447.07a1.72,1.72,0,0,1-1.71,1.71h-2.56a1.71,1.71,0,0,1-1.4-2.69l5.2-.18A1.65,1.65,0,0,1,426,447.07Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M441.34,453.89H391.89v-2.25a3.85,3.85,0,0,1,3.72-3.85l39.66-1.37a5.88,5.88,0,0,1,6.08,5.87Z" transform="translate(-39.7 -18.74)" fill="#d6d6e3"/><path d="M685.31,447c-.06,3.55,2.5,6.46,5.67,6.46h59.88v-6.24H701c-2.15,0-3.49-2.6-2.41-4.68l45.16-91.85a4,4,0,0,1,3.5-2.26h22.35v-10.5H741.41A2.8,2.8,0,0,0,739,339.5l-51.77,100A17,17,0,0,0,685.31,447Z" transform="translate(-39.7 -18.74)" fill="#535461"/><path d="M795.24,430.34l.82,1.38,7.67-5.12L780,244.13h-6.11s-.25.84-.66,2.44C769.13,262.34,749,351.65,795.24,430.34Z" transform="translate(-39.7 -18.74)" fill="#535461"/><path d="M773.23,246.57l22,183.77.82,1.38,7.67-5.12L780,244.13h-6.11S773.64,245,773.23,246.57Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><rect x="784.97" y="242.43" width="14.5" height="189.29" transform="translate(-74.16 77.85) rotate(-6.83)" fill="#d6d6e3"/><path d="M860,447.07a1.72,1.72,0,0,0,1.71,1.71h2.56a1.71,1.71,0,0,0,1.71-1.71.83.83,0,0,0,0-.2,1.71,1.71,0,0,0-1.69-1.5h-2.56a1.72,1.72,0,0,0-1.65,1.3A1.58,1.58,0,0,0,860,447.07Z" transform="translate(-39.7 -18.74)" fill="#e3edf9"/><path d="M852.33,447.07a1.72,1.72,0,0,0,1.71,1.71h2.56a1.71,1.71,0,0,0,1.71-1.71,1.68,1.68,0,0,0-.07-.47,1.61,1.61,0,0,0-.43-.73,1.67,1.67,0,0,0-1.2-.5H854a1.72,1.72,0,0,0-1.57,1A1.76,1.76,0,0,0,852.33,447.07Z" transform="translate(-39.7 -18.74)" fill="#e3edf9"/><path d="M845.51,447.07a1.72,1.72,0,0,0,1.71,1.71h2.56a1.71,1.71,0,0,0,1.71-1.71,1.62,1.62,0,0,0-.15-.71,1.74,1.74,0,0,0-1.55-1h-2.56a1.7,1.7,0,0,0-1.71,1.71Z" transform="translate(-39.7 -18.74)" fill="#e3edf9"/><path d="M837.83,447.07a1.72,1.72,0,0,0,1.71,1.71h2.56a1.71,1.71,0,0,0,1.4-2.69l-.2-.22a1.67,1.67,0,0,0-1.2-.5h-2.56a1.72,1.72,0,0,0-1.24.55A1.65,1.65,0,0,0,837.83,447.07Z" transform="translate(-39.7 -18.74)" fill="#e3edf9"/><path d="M860.05,446.66a1.58,1.58,0,0,0-.05.41,1.72,1.72,0,0,0,1.71,1.71h2.56a1.71,1.71,0,0,0,1.71-1.71.83.83,0,0,0,0-.2Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M852.47,446.39a1.76,1.76,0,0,0-.14.67,1.72,1.72,0,0,0,1.71,1.71h2.56a1.71,1.71,0,0,0,1.71-1.71,1.68,1.68,0,0,0-.07-.47Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M845.76,446.16a1.72,1.72,0,0,0-.26.9,1.72,1.72,0,0,0,1.71,1.71h2.56a1.71,1.71,0,0,0,1.71-1.71,1.62,1.62,0,0,0-.15-.71Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M837.83,447.07a1.72,1.72,0,0,0,1.71,1.71h2.56a1.71,1.71,0,0,0,1.4-2.69l-5.2-.18A1.65,1.65,0,0,0,837.83,447.07Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M822.49,453.89h49.45v-2.25a3.85,3.85,0,0,0-3.72-3.85l-39.66-1.37a5.88,5.88,0,0,0-6.08,5.87Z" transform="translate(-39.7 -18.74)" fill="#d6d6e3"/><path d="M1029.47,481c23.07-39.13,14.71-118.06,15.64-119.57.83-1.33-2.35-38.5-23.55-47.58-3.83-7.59-7.6-16.14-7.6-16.14a6.73,6.73,0,0,1-1.22.91q-.25-.68-.49-1.38c-.27-.79-.52-1.6-.77-2.41a15.53,15.53,0,0,0,1.81.46,7.54,7.54,0,0,0,4.84-.43,5.39,5.39,0,0,0,1.39-1.07c1.67-1.11,2.59-3.11,3.37-5l6.17-14.78c2.78-6.67,5.58-13.38,7.06-20.45a57.58,57.58,0,0,0-2.46-31.86c-1.46-3.88-3.48-7.76-6.91-10.08-6.87-4.66-16.43-1.44-24.28-4.17-2.58-.9-4.91-2.42-7.49-3.34-5.57-2-11.86-.93-17.22,1.56s-9.7,6.45-14.39,10c-2.31,1.77-6,3.6-8.72,6-2.64,2.06-4.67,4.55-4.28,7.83.44,3.75,4.39,6,8.07,6.88.61.14,1.24.25,1.86.36a36,36,0,0,0,15.37,59.8,84.36,84.36,0,0,1,4.86,10.93q.27.77.53,1.55c-6.06,1.72-10.8,3.15-11.75,3.94-2.87,2.38,3.14,23.22,3.14,23.22-1.53,1.94-3.09,4.15-4.67,6.52a140.55,140.55,0,0,0-22.16,60.57c-1,7.91-2.3,16-3.95,23.69L870,412.59l-.15,1.77-1.71-.42h0l-5.38-1.33-.21,1.21-.82-.39c-13.33-6.25-35.79-14.23-51-6-16.05,8.64,18.59,20.12,40.82,26.23-7.37.36-14.42,2.13-20,6.27-16.12,12.08,29.47,18.37,51,20.6l.87.09v.46l7.46.69,1.75.16.17,2.66s10.68,1.75,24.95,3.87c-16.29,4.07-36.42,6.89-50.4,8.54-14.82,1.74-27.44,12.06-31.42,26.45a23.52,23.52,0,0,0-.36,12.72c4.16,14.53-.92,121.42-2.07,144.44l-26.35,15.17s-41,5-13.69,14.61a56.16,56.16,0,0,0,7.53,2c-3.6,2.32-3.29,5.35,7.32,9.07,27.33,9.58,90.86-.42,90.86-.42s-1.39-11.26-3.65-20.62l.7.06s-6.56-24.41,3.39-36.72-1.67-106-1.67-106,17.42-7.21,69.49-7.68c42,10.78,62.47-27.81,62.18-47.76C1029.52,481.87,1029.5,481.41,1029.47,481Z" transform="translate(-39.7 -18.74)" fill="url(#07a0b5f0-40d7-4714-acbe-80fa7c137a96)"/><path d="M874.25,420.36l-4.45,18s-4-.9-10-2.44c-20.32-5.26-63.18-17.89-46-27.16,14.81-8,36.62-.22,49.57,5.85,4.74,2.23,8.3,4.23,9.89,5.17C873.93,420.16,874.25,420.36,874.25,420.36Z" transform="translate(-39.7 -18.74)" fill="#f8b9bf"/><path d="M873,425.44l-3.2,13s-4-.9-10-2.44l3.61-21.31c4.74,2.23,8.3,4.23,9.89,5.17Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><polygon points="833.31 420.93 820.89 417.86 824.75 395.1 834.68 397.55 833.31 420.93" fill="#d9dfe8"/><polygon points="833.31 420.93 827.95 419.61 829.97 396.39 834.68 397.55 833.31 420.93" opacity="0.1"/><path d="M992.85,345.4S969,331.62,958.4,371.15s-11.6,57.74-11.6,57.74l-75.32-15.06-2.39,27.51s80.53,26,90.66,24.11,43-57,43-57S1032.63,365.74,992.85,345.4Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><g opacity="0.1"><path d="M874.25,420.36l-4.45,18s-4-.9-10-2.44c-20.32-5.26-63.18-17.89-46-27.16,14.81-8,36.62-.22,49.57,5.85,4.74,2.23,8.3,4.23,9.89,5.17C873.93,420.16,874.25,420.36,874.25,420.36Z" transform="translate(-39.7 -18.74)"/><path d="M873,425.44l-3.2,13s-4-.9-10-2.44l3.61-21.31c4.74,2.23,8.3,4.23,9.89,5.17Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><polygon points="833.31 420.93 820.89 417.86 824.75 395.1 834.68 397.55 833.31 420.93"/><polygon points="833.31 420.93 827.95 419.61 829.97 396.39 834.68 397.55 833.31 420.93" opacity="0.1"/><path d="M992.85,346.4S969,332.62,958.4,372.15s-11.6,57.74-11.6,57.74l-75.32-15.06-2.39,27.51s80.53,26,90.66,24.11,43-57,43-57S1032.63,366.74,992.85,346.4Z" transform="translate(-39.7 -18.74)"/></g><path d="M841.15,651.7,810.4,669.41s-39.84,4.88-13.3,14.18,88.24-.41,88.24-.41-3.43-27.72-8.21-31.59S841.15,651.7,841.15,651.7Z" transform="translate(-39.7 -18.74)" fill="#68739d"/><path d="M961,453s-15.3,8-42.48,14.91c-15.93,4-35.87,6.84-49.65,8.46A35.81,35.81,0,0,0,838.35,502,22.84,22.84,0,0,0,838,514.4c4.53,15.83-2.23,144.51-2.23,144.51l46.7,4.32s-6.37-23.71,3.3-35.66-1.62-102.91-1.62-102.91,16.92-7,67.48-7.46c46.84,12,66.14-39.27,58.91-53.64S961,453,961,453Z" transform="translate(-39.7 -18.74)" fill="#6394e2"/><g opacity="0.1"><path d="M841.15,651.7,810.4,669.41s-39.84,4.88-13.3,14.18,88.24-.41,88.24-.41-3.43-27.72-8.21-31.59S841.15,651.7,841.15,651.7Z" transform="translate(-39.7 -18.74)"/><path d="M961,453s-15.3,8-42.48,14.91c-15.93,4-35.87,6.84-49.65,8.46A35.81,35.81,0,0,0,838.35,502,22.84,22.84,0,0,0,838,514.4c4.53,15.83-2.23,144.51-2.23,144.51l46.7,4.32s-6.37-23.71,3.3-35.66-1.62-102.91-1.62-102.91,16.92-7,67.48-7.46c46.84,12,66.14-39.27,58.91-53.64S961,453,961,453Z" transform="translate(-39.7 -18.74)"/></g><path d="M855.57,662.45l-30.75,17.71S785,685,811.52,694.34s88.24-.41,88.24-.41-3.43-27.72-8.21-31.59S855.57,662.45,855.57,662.45Z" transform="translate(-39.7 -18.74)" fill="#68739d"/><path d="M966,527.95c-50.56.46-67.48,7.46-67.48,7.46s11.29,91,1.62,102.91-3.3,35.66-3.3,35.66l-46.7-4.32s.08-1.52.21-4.24c1.12-22.36,6.05-126.16,2-140.27a22.84,22.84,0,0,1,.35-12.36,35.82,35.82,0,0,1,30.51-25.69c13.77-1.61,33.71-4.41,49.64-8.46l.78-.2c26.7-6.86,41.7-14.71,41.7-14.71s42.31-3.8,49.54,10.57a17,17,0,0,1,1.48,7.25C1026.71,500.94,1006.81,538.42,966,527.95Z" transform="translate(-39.7 -18.74)" fill="#6394e2"/><path d="M895.57,442.79l-1.71,18.5s-4.11-.29-10.22-.93c-20.87-2.17-65.14-8.27-49.49-20,13.46-10.08,36.18-5.68,49.89-1.6,5,1.5,8.84,2.95,10.55,3.64C895.22,442.64,895.57,442.79,895.57,442.79Z" transform="translate(-39.7 -18.74)" fill="#f8b9bf"/><path d="M1019.78,321.84s-6.26,4.9-13.91,10.28c-8.39,1.9-18.13,3.47-25.15,4.49,2.51-8,1-17-1.83-24.89a93.69,93.69,0,0,0-12.55-23.08l42.32-13.21c-3.32,8.41-1.82,18,1,26.34A86.85,86.85,0,0,0,1019.78,321.84Z" transform="translate(-39.7 -18.74)" fill="#f8b9bf"/><path d="M895.09,448l-1.23,13.29s-4.11-.29-10.22-.93l.4-21.61c5,1.5,8.84,2.95,10.55,3.64Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><polygon points="857.52 443.33 844.78 442.15 845.2 419.07 855.39 420.01 857.52 443.33" fill="#d9dfe8"/><path d="M1019.78,321.84s-6.26,4.9-13.91,10.28c-8.39,1.9-18.13,3.47-25.15,4.49,2.51-8,1-17-1.83-24.89,10.34-3,25.13-6.88,30.78-10A86.85,86.85,0,0,0,1019.78,321.84Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M1011.32,302.22s7.08,16.07,11.54,23.33-51.82,14-51.82,14-5.84-20.23-3.05-22.55S1006.61,306.92,1011.32,302.22Z" transform="translate(-39.7 -18.74)" fill="#d9dfe8"/><path d="M1026.43,481.56a50.63,50.63,0,0,1-8.76,11.34c-24.86,23.62-65.61-1-84-14.46,26.7-6.86,41.7-14.71,41.7-14.71s42.31-3.8,49.54,10.57A17,17,0,0,1,1026.43,481.56Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M1017.83,491.21c-28.26,26.84-77-8.7-90.14-19.17-2.13-1.7-3.32-2.75-3.32-2.75,5.19-4.86,9.75-15.16,13.36-27.76A243.61,243.61,0,0,0,945,404.75a136.5,136.5,0,0,1,21.52-58.83c1.53-2.3,3-4.45,4.53-6.33,10.67-13.57,28.6-22.19,28.6-22.19,37.84-11.06,42.93,45.07,41.92,46.69S1050.68,460,1017.83,491.21Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M1021.49,414.48s-24.33,59.4-34.06,62.79c-5.57,1.93-35.32-1.73-59.74-5.22-2.13-1.7-3.32-2.75-3.32-2.75,5.19-4.86,9.75-15.16,13.36-27.76l31.45,1.5s-1.75-18.14,2.87-58.82,30.23-30.6,30.23-30.6C1044.65,367.81,1021.49,414.48,1021.49,414.48Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><polygon points="857.52 443.33 852.02 442.82 850.56 419.57 855.39 420.01 857.52 443.33" opacity="0.1"/><path d="M1001.67,351s-25.61-10.07-30.23,30.6-2.87,58.82-2.87,58.82l-76.73-3.67,1.73,27.56s83.51,13.71,93.24,10.33,34.06-62.79,34.06-62.79S1044,365.18,1001.67,351Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M1003.39,290.78c-1.12-6.08,5.23-6,7.51-11.72l-42.32,13.21a93.4,93.4,0,0,1,7.84,12.47,35.11,35.11,0,0,0,6.73,1.3C993.24,307,996.39,297.07,1003.39,290.78Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><circle cx="984.12" cy="267.59" r="34.96" transform="translate(587.38 1204.16) rotate(-84.72)" fill="#f8b9bf"/><path d="M949.6,236c.43,3.64,4.27,5.86,7.84,6.68s7.44.86,10.57,2.77c5,3.08,6.35,9.92,5.72,15.8-.35,3.32-.85,7.39,1.87,9.32a7.25,7.25,0,0,0,2.8,1,26.26,26.26,0,0,0,8.62.3c1.68-.22,3.41-.6,5-.13,2.62.76,4.17,3.52,4.68,6.19s.23,5.45.64,8.14a16.9,16.9,0,0,0,13.32,13.74,7.33,7.33,0,0,0,4.7-.42c1.9-1,2.87-3.13,3.69-5.12l6-14.36c2.7-6.47,5.42-13,6.86-19.86a55.92,55.92,0,0,0-2.39-30.94c-1.42-3.76-3.38-7.53-6.71-9.79-6.67-4.53-16-1.4-23.58-4-2.51-.87-4.77-2.35-7.27-3.24-5.41-1.93-11.52-.91-16.73,1.52s-9.42,6.26-14,9.75C957.26,226.44,948.85,229.71,949.6,236Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M950.52,235.23c.43,3.64,4.27,5.86,7.84,6.68s7.44.86,10.57,2.77c5,3.08,6.35,9.92,5.72,15.8-.35,3.32-.85,7.39,1.87,9.32a7.25,7.25,0,0,0,2.8,1,26.26,26.26,0,0,0,8.62.3c1.68-.22,3.41-.6,5-.13,2.62.76,4.17,3.52,4.68,6.19s.23,5.45.64,8.14a16.9,16.9,0,0,0,13.32,13.74,7.33,7.33,0,0,0,4.7-.42c1.9-1,2.87-3.13,3.69-5.12l6-14.36c2.7-6.47,5.42-13,6.86-19.86a55.92,55.92,0,0,0-2.39-30.94c-1.42-3.76-3.38-7.53-6.71-9.79-6.67-4.53-16-1.4-23.58-4-2.51-.87-4.77-2.35-7.27-3.24-5.41-1.93-11.52-.91-16.73,1.52s-9.42,6.26-14,9.75C958.19,225.67,949.78,228.94,950.52,235.23Z" transform="translate(-39.7 -18.74)" fill="#b96b6b"/><path d="M979.48,373.34S966.13,425.2,952.84,430s-7.42,6.16-7.42,6.16" transform="translate(-39.7 -18.74)" opacity="0.1"/><rect x="925.9" y="544.58" width="14.51" height="95.37" fill="#d6d6e3"/><rect x="925.9" y="544.58" width="14.51" height="7.07" opacity="0.1"/><path d="M936.57,562.82v2a4.69,4.69,0,0,0,4.69,4.69h63.18a4.69,4.69,0,0,0,4.69-4.69v-2a4.69,4.69,0,0,0-4.69-4.69H941.26a4.69,4.69,0,0,0-4.69,4.69Z" transform="translate(-39.7 -18.74)" fill="#d6d6e3"/><path d="M937.65,559.84h70.41a4.67,4.67,0,0,0-3.62-1.71H941.26A4.67,4.67,0,0,0,937.65,559.84Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><rect x="873.56" y="634.76" width="119.21" height="11.4" rx="5.5" ry="5.5" fill="#d6d6e3"/><circle cx="986.03" cy="653.42" r="7.26" fill="#535461"/><circle cx="880.29" cy="653.42" r="7.26" fill="#535461"/><circle cx="933.16" cy="653.42" r="7.26" fill="#535461"/><rect x="917.74" y="427.44" width="114.03" height="17.62" rx="8.5" ry="8.5" fill="#d6d6e3"/><path d="M980.11,653.5s-5.7,5.63-14.51,0" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M1071.47,455.17v1.39a7.25,7.25,0,0,1-7.25,7.25H964.69a7.25,7.25,0,0,1-7.25-7.25v-1.39Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><rect x="822.44" y="452.63" width="19.61" height="249.86" fill="#d6d6e3"/><rect x="822.44" y="452.63" width="19.61" height="16.2" opacity="0.1"/><rect x="232.94" y="551.4" width="14.51" height="95.37" fill="#d6d6e3"/><rect x="232.94" y="551.4" width="14.51" height="7.07" opacity="0.1"/><path d="M316.17,569.65v2a4.69,4.69,0,0,1-4.69,4.69H248.3a4.69,4.69,0,0,1-4.69-4.69v-2A4.69,4.69,0,0,1,248.3,565h63.18a4.69,4.69,0,0,1,4.69,4.69Z" transform="translate(-39.7 -18.74)" fill="#d6d6e3"/><path d="M315.1,566.66H244.68A4.67,4.67,0,0,1,248.3,565h63.18A4.67,4.67,0,0,1,315.1,566.66Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><rect x="180.59" y="641.58" width="119.21" height="11.4" rx="5.5" ry="5.5" fill="#d6d6e3"/><circle cx="187.33" cy="660.24" r="7.26" fill="#535461"/><circle cx="293.06" cy="660.24" r="7.26" fill="#535461"/><circle cx="240.19" cy="660.24" r="7.26" fill="#535461"/><path d="M272.64,660.32s5.7,5.63,14.51,0" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M642.81,373.22s-16.28-29.59-10.33-55.31a51.17,51.17,0,0,0-2.85-32.24A86.06,86.06,0,0,0,622,271.93" transform="translate(-39.7 -18.74)" fill="none" stroke="#535461" stroke-miterlimit="10" stroke-width="2"/><path d="M625.61,255.69c.85,3.88-3.7,16.67-3.7,16.67s-9.49-9.7-10.35-13.58a7.19,7.19,0,1,1,14-3.09Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M641.94,274.62c-1.39,3.72-12.16,12-12.16,12s-2.7-13.3-1.3-17a7.19,7.19,0,1,1,13.47,5Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M649.5,311.44c-3.08,2.51-16.55,4.2-16.55,4.2s4.39-12.84,7.47-15.35a7.19,7.19,0,1,1,9.08,11.15Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M648.95,340.58c-2.61,3-15.6,6.94-15.6,6.94s2.15-13.4,4.76-16.39a7.19,7.19,0,1,1,10.83,9.45Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M615.2,290.59c3.38,2.09,16.95,2,16.95,2s-6-12.17-9.38-14.26a7.19,7.19,0,1,0-7.57,12.22Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M615,324.69c3.85,1,16.78-3.12,16.78-3.12s-9.37-9.82-13.22-10.8A7.19,7.19,0,0,0,615,324.69Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M619.33,357.85c3.62,1.62,17.07-.24,17.07-.24s-7.58-11.26-11.2-12.88a7.19,7.19,0,0,0-5.87,13.13Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M625.61,255.69c.85,3.88-3.7,16.67-3.7,16.67s-9.49-9.7-10.35-13.58a7.19,7.19,0,1,1,14-3.09Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M641.94,274.62c-1.39,3.72-12.16,12-12.16,12s-2.7-13.3-1.3-17a7.19,7.19,0,1,1,13.47,5Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M649.5,311.44c-3.08,2.51-16.55,4.2-16.55,4.2s4.39-12.84,7.47-15.35a7.19,7.19,0,1,1,9.08,11.15Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M648.95,340.58c-2.61,3-15.6,6.94-15.6,6.94s2.15-13.4,4.76-16.39a7.19,7.19,0,1,1,10.83,9.45Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M615.2,290.59c3.38,2.09,16.95,2,16.95,2s-6-12.17-9.38-14.26a7.19,7.19,0,1,0-7.57,12.22Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M615,324.69c3.85,1,16.78-3.12,16.78-3.12s-9.37-9.82-13.22-10.8A7.19,7.19,0,0,0,615,324.69Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M619.33,357.85c3.62,1.62,17.07-.24,17.07-.24s-7.58-11.26-11.2-12.88a7.19,7.19,0,0,0-5.87,13.13Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M636.19,455.29h0a17.14,17.14,0,0,1-17.11-18.22l4.79-75.9h24.64l4.79,75.9A17.14,17.14,0,0,1,636.19,455.29Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><rect x="83.6" y="63.42" width="14" height="58" fill="#348eed" opacity="0.1"/><rect x="101.6" y="63.42" width="14" height="58" fill="#348eed" opacity="0.1"/><rect x="119.6" y="63.42" width="14" height="58" fill="#348eed" opacity="0.1"/><rect x="137.6" y="63.42" width="14" height="58" fill="#348eed" opacity="0.1"/><rect x="173.6" y="63.42" width="14" height="58" fill="#348eed" opacity="0.1"/><rect x="191.6" y="63.42" width="14" height="58" fill="#348eed" opacity="0.1"/><rect x="83.6" y="74.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="83.6" y="110.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="101.6" y="74.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="101.6" y="110.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="119.6" y="74.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="119.6" y="110.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="137.6" y="74.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="137.6" y="110.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="155.6" y="74.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="155.6" y="110.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="173.6" y="74.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="173.6" y="110.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="191.6" y="74.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="191.6" y="110.42" width="14" height="3" fill="#348eed" opacity="0.1"/><rect x="155.6" y="63.42" width="14" height="58" fill="#348eed" opacity="0.1"/><rect x="257.29" y="82.16" width="14" height="58" transform="translate(-61.94 102.56) rotate(-24.84)" fill="#348eed" opacity="0.1"/><rect x="250.36" y="94.69" width="14" height="3" transform="translate(-56.29 98.27) rotate(-24.84)" fill="#348eed" opacity="0.1"/><rect x="265.48" y="127.36" width="14" height="3" transform="translate(-68.62 107.64) rotate(-24.84)" fill="#348eed" opacity="0.1"/><path d="M428.84,680.21,403.43,664c-.13-22.83-.49-128.82,4.26-143a23.29,23.29,0,0,0,.2-12.61c-3.3-14.41-15.34-25.17-29.93-27.54-13.76-2.24-33.56-5.91-49.5-10.65,14.21-1.47,24.86-2.74,24.86-2.74l.28-2.63,9.15-.44V464l.87-.05c21.37-1.27,66.75-5.5,51.33-18.16-5.29-4.34-12.19-6.39-19.47-7.08,22.26-5.08,57.05-14.92,41.54-24.17-14.74-8.78-37.31-1.88-50.78,3.73l-.83.35-.15-1.21-5.38,1.08h0l-1.71.34-.08-1.76-75.49,11.66a257.66,257.66,0,0,0-3.08-25.81c1.69-11.26,9.55-27.68,6.78-36.49-3.22-10.23-16.44-13.58-22-22.82-1.46-2.41-2.91-4.67-4.33-6.65a70,70,0,0,0-10.65-11.51,48.6,48.6,0,0,1,3.92-17.25,83.57,83.57,0,0,1,5.28-10.6,35.6,35.6,0,0,0,26.44-41c4.78,2.05,10.59,2.26,13.58-1.74l-1.42-.55c.14-.15.28-.3.4-.47-2.91-1.11-6-2.37-8.28-4.39a9.7,9.7,0,0,1-1.45-2.15c-1.38-2.8-1.22-6.16-2.54-9a10.41,10.41,0,0,0-2.59-3.38,17.83,17.83,0,0,0-8.46-4.84c-3.61-1.05-7.41-1.58-10.87-3a36.75,36.75,0,0,0-39.11-11l-1.25.43a16.31,16.31,0,0,0-31.81-7.2,16.27,16.27,0,0,1,4.36-9.74c-.26.22-.53.43-.78.66a16.32,16.32,0,0,0-.71,23.07l.29.28a16.39,16.39,0,0,0,4.09,3.58,16.32,16.32,0,0,1-10.76-13.37c0,.34,0,.68,0,1A16.32,16.32,0,0,0,225,230.13l.45-.05-.24.33a36.71,36.71,0,0,0,3.3,45.45,17,17,0,0,0,2.62,4.2,13.61,13.61,0,0,0,1.21,1.22,15.51,15.51,0,0,0,10.46,4.82q1,1.19,2.13,2.29a59.52,59.52,0,0,1-2.58,8.24,87.34,87.34,0,0,1-7.92,15.27c-21.6,6.14-23.5,42.82-22.72,44.21.93,1.66-3.22,59.26,12.78,128.84-.66,19.89,10.94,52.78,52.12,44.11C328.11,531.81,345,539.7,345,539.7s-4.89,89.57,2.09,102.61c4.37,8.17,1.27,20.17-2,28.64a31.47,31.47,0,0,0-2.88,6.64c-1,2.11-1.73,3.39-1.73,3.39l.7,0c-2.64,9.17-4.51,20.24-4.51,20.24s62.43,12.67,89.89,4.38c10.66-3.22,11.1-6.2,7.64-8.66a55.62,55.62,0,0,0,7.54-1.65C469.22,687,428.84,680.21,428.84,680.21Z" transform="translate(-39.7 -18.74)" fill="url(#81276d2b-ddf3-474d-b794-9223ea4701e2)"/><path d="M293,255a36,36,0,1,1-36-36A36,36,0,0,1,293,255Z" transform="translate(-39.7 -18.74)" fill="#fa595f"/><path d="M374.09,424.13l3.65,18.22s4.06-.73,10.07-2c20.53-4.35,63.91-15.09,47.11-25.11-14.45-8.61-36.58-1.84-49.78,3.66-4.84,2-8.48,3.86-10.11,4.73C374.42,423.94,374.09,424.13,374.09,424.13Z" transform="translate(-39.7 -18.74)" fill="#f8b9bf"/><path d="M375.12,429.27l2.62,13.08s4.06-.73,10.07-2l-2.67-21.45c-4.84,2-8.48,3.86-10.11,4.73Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><polygon points="334.79 424.74 347.33 422.23 344.49 399.32 334.45 401.33 334.79 424.74" fill="#d9dfe8"/><polygon points="334.79 424.74 340.2 423.65 339.21 400.38 334.45 401.33 334.79 424.74" opacity="0.1"/><path d="M258.91,344s24.41-12.72,33.28,27.25,9,58.19,9,58.19l75.92-11.73,1.18,27.59s-81.6,22.43-91.63,20.09-40.48-58.85-40.48-58.85S218.28,362.59,258.91,344Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><g opacity="0.1"><path d="M374.09,424.13l3.65,18.22s4.06-.73,10.07-2c20.53-4.35,63.91-15.09,47.11-25.11-14.45-8.61-36.58-1.84-49.78,3.66-4.84,2-8.48,3.86-10.11,4.73C374.42,423.94,374.09,424.13,374.09,424.13Z" transform="translate(-39.7 -18.74)"/><path d="M375.12,429.27l2.62,13.08s4.06-.73,10.07-2l-2.67-21.45c-4.84,2-8.48,3.86-10.11,4.73Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><polygon points="334.79 424.74 347.33 422.23 344.49 399.32 334.45 401.33 334.79 424.74"/><polygon points="334.79 424.74 340.2 423.65 339.21 400.38 334.45 401.33 334.79 424.74" opacity="0.1"/><path d="M260.91,346s24.41-12.72,33.28,27.25,9,58.19,9,58.19l75.92-11.73,1.18,27.59s-81.6,22.43-91.63,20.09-40.48-58.85-40.48-58.85S220.28,364.59,260.91,346Z" transform="translate(-39.7 -18.74)"/></g><path d="M397,656.71l29.94,19s39.59,6.63,12.66,14.76-88.13-4.3-88.13-4.3,4.65-27.54,9.6-31.19S397,656.71,397,656.71Z" transform="translate(-39.7 -18.74)" fill="#f37291"/><path d="M286,452.9s14.93,8.67,41.78,16.77c15.74,4.75,35.54,8.42,49.22,10.65a35.81,35.81,0,0,1,29.35,27,22.84,22.84,0,0,1-.19,12.36C400.94,535.3,402,664.15,402,664.15l-46.84,2.25s7.41-23.41-1.72-35.77S359.6,527.9,359.6,527.9s-16.59-7.74-67.09-10.43c-47.33,10-64.34-42.15-56.48-56.19S286,452.9,286,452.9Z" transform="translate(-39.7 -18.74)" fill="#96a2d0"/><g opacity="0.1"><path d="M397,656.71l29.94,19s39.59,6.63,12.66,14.76-88.13-4.3-88.13-4.3,4.65-27.54,9.6-31.19S397,656.71,397,656.71Z" transform="translate(-39.7 -18.74)"/><path d="M286,452.9s14.93,8.67,41.78,16.77c15.74,4.75,35.54,8.42,49.22,10.65a35.81,35.81,0,0,1,29.35,27,22.84,22.84,0,0,1-.19,12.36C400.94,535.3,402,664.15,402,664.15l-46.84,2.25s7.41-23.41-1.72-35.77S359.6,527.9,359.6,527.9s-16.59-7.74-67.09-10.43c-47.33,10-64.34-42.15-56.48-56.19S286,452.9,286,452.9Z" transform="translate(-39.7 -18.74)"/></g><path d="M382.08,666.82l29.94,19s39.59,6.63,12.66,14.76-88.13-4.3-88.13-4.3,4.65-27.54,9.6-31.19S382.08,666.82,382.08,666.82Z" transform="translate(-39.7 -18.74)" fill="#f37291"/><path d="M277.64,527.57c50.5,2.69,67.09,10.43,67.09,10.43s-4.79,87.82,2,100.6c7.25,13.56-6.48,37.9-6.48,37.9l46.84-2.25s0-1.52,0-4.24c-.14-22.38-.48-126.3,4.17-140.23a22.84,22.84,0,0,0,.19-12.36,35.82,35.82,0,0,0-29.35-27c-13.69-2.22-33.48-5.89-49.22-10.64l-.77-.24c-26.37-8-41-16.53-41-16.53s-31.19-2.16-39,11.88c-1,1.82-5.31,5.4-5.49,8.29C225.45,502.52,236.46,536.24,277.64,527.57Z" transform="translate(-39.7 -18.74)" fill="#96a2d0"/><path d="M351.81,445.6l.89,18.56s4.12-.11,10.26-.48c20.95-1.25,65.45-5.39,50.33-17.8-13-10.67-35.9-7.27-49.77-3.8-5.09,1.28-9,2.56-10.7,3.17C352.16,445.47,351.81,445.6,351.81,445.6Z" transform="translate(-39.7 -18.74)" fill="#f8b9bf"/><path d="M233,319.29s6,5.17,13.44,10.89c8.3,2.26,18,4.27,24.93,5.6-2.15-8.15-.24-17,2.93-24.79a93.69,93.69,0,0,1,13.56-22.51l-41.7-15.07c2.95,8.55,1,18.1-2.17,26.27A86.85,86.85,0,0,1,233,319.29Z" transform="translate(-39.7 -18.74)" fill="#f8b9bf"/><path d="M352.06,450.83l.64,13.33s4.12-.11,10.26-.48l.56-21.61c-5.09,1.28-9,2.56-10.7,3.17Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><polygon points="309.62 446.05 322.39 445.44 322.99 422.36 312.77 422.85 309.62 446.05" fill="#d9dfe8"/><path d="M227.53,488.58c27,28.07,77.35-5.29,90.89-15.17,2.2-1.61,3.43-2.6,3.43-2.6-5-5.09-13-9.8-16.07-22.55a277,277,0,0,1-5.94-39.52c-.83-10.55,10.07-30.64,6.92-40.66s-16.12-13.31-21.57-22.38c-1.43-2.36-2.85-4.58-4.25-6.52-10.06-14-27.59-23.43-27.59-23.43C216,303,213.07,356.34,214,358S210.66,418.46,227.53,488.58Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M227.25,411.76s21.69,60.42,31.26,64.23c5.48,2.18,35.37-.17,59.91-2.58,2.2-1.61,3.43-2.6,3.43-2.6-5-5.09-9.07-15.58-12.13-28.32l-31.49.11s2.55-18-.27-58.89-28.85-31.9-28.85-31.9C206.18,364.12,227.25,411.76,227.25,411.76Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><polygon points="309.62 446.05 315.13 445.79 317.62 422.62 312.77 422.85 309.62 446.05" opacity="0.1"/><path d="M249.85,349.21s26-8.93,28.85,31.9S279,440,279,440l76.82-.28-2.95,27.46s-84,10-93.6,6.21S228,409.17,228,409.17,206.91,361.52,249.85,349.21Z" transform="translate(-39.7 -18.74)" fill="#348eed"/><path d="M250.8,289c1.39-6-5-6.19-7-12L285.52,292a93.4,93.4,0,0,0-8.38,12.11,35.11,35.11,0,0,1-6.78,1C260.22,305.61,257.51,295.58,250.8,289Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><circle cx="271.07" cy="266.67" r="34.96" transform="translate(-52.19 -5.41) rotate(-2.75)" fill="#f8b9bf"/><path d="M253,375.14s11.06,52.39,24.12,57.74,7.14,6.49,7.14,6.49" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M298.58,404.73s-9.24,2.89-20-10.92" transform="translate(-39.7 -18.74)" opacity="0.1"/><circle cx="189.3" cy="199.26" r="16" fill="#fa595f"/><path d="M217.76,226.45a16,16,0,0,1,0-21.89c-.26.21-.52.42-.76.65a16,16,0,0,0,21.92,23.32c.25-.23.47-.48.69-.72A16,16,0,0,1,217.76,226.45Z" transform="translate(-39.7 -18.74)" fill="#fa595f"/><path d="M226.9,232.49a16,16,0,0,1-16.84-14c0,.33,0,.66,0,1a16,16,0,1,0,31.94-2c0-.34-.07-.66-.11-1A16,16,0,0,1,226.9,232.49Z" transform="translate(-39.7 -18.74)" fill="#fa595f"/><path d="M283.95,231.91c3.73,1.84,8,2.35,12,3.51s8.08,3.28,9.84,7.06c1.29,2.78,1.14,6.07,2.49,8.82,1.94,4,6.42,5.84,10.54,7.41-3.54,4.75-11.14,3.46-16.1.23s-9.23-8-15-9.25a14.08,14.08,0,0,0-14.81,6.59c-1.58,2.77-2.14,6-2.92,9.08-2,8.12-6,16.2-13,20.81s-17.43,4.58-22.92-1.73c-3.2-3.68-4.27-8.69-5.22-13.47a27.37,27.37,0,0,1-.77-6.81c.32-5.74,4.14-10.63,8-14.89,4.55-5,9.39-9.8,14.23-14.57,4.18-4.12,9-11.1,15.3-11.59C272.87,222.53,278,229,283.95,231.91Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><path d="M282.95,230.91c3.73,1.84,8,2.35,12,3.51s8.08,3.28,9.84,7.06c1.29,2.78,1.14,6.07,2.49,8.82,1.94,4,6.42,5.84,10.54,7.41-3.54,4.75-11.14,3.46-16.1.23s-9.23-8-15-9.25a14.08,14.08,0,0,0-14.81,6.59c-1.58,2.77-2.14,6-2.92,9.08-2,8.12-6,16.2-13,20.81s-17.43,4.58-22.92-1.73c-3.2-3.68-4.27-8.69-5.22-13.47a27.37,27.37,0,0,1-.77-6.81c.32-5.74,4.14-10.63,8-14.89,4.55-5,9.39-9.8,14.23-14.57,4.18-4.12,9-11.1,15.3-11.59C271.87,221.53,277,228,282.95,230.91Z" transform="translate(-39.7 -18.74)" fill="#fa595f"/><rect x="141.58" y="434.26" width="114.03" height="17.62" rx="8.5" ry="8.5" fill="#d6d6e3"/><path d="M181.28,462v1.39a7.25,7.25,0,0,0,7.25,7.25h99.53a7.25,7.25,0,0,0,7.25-7.25V462Z" transform="translate(-39.7 -18.74)" opacity="0.1"/><rect x="342.39" y="452.63" width="19.61" height="249.83" fill="#d6d6e3"/><rect x="342.39" y="452.63" width="19.61" height="16.2" opacity="0.1"/><rect x="333.01" y="434.72" width="518.42" height="32.4" fill="#d6d6e3"/></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="bear" unicode="&#58880;" d="M1024 683.008q0-70.656-46.08-121.856 46.08-89.088 46.08-193.536 0-96.256-39.936-181.248t-109.568-147.968-162.816-99.328-199.68-36.352-199.68 36.352-162.304 99.328-109.568 147.968-40.448 181.248q0 104.448 46.08 193.536-46.08 51.2-46.08 121.856 0 37.888 13.824 71.168t37.376 58.368 55.808 39.424 68.096 14.336q43.008 0 78.848-18.432t59.392-50.176q46.08 17.408 96.256 26.624t102.4 9.216 102.4-9.216 96.256-26.624q24.576 31.744 59.904 50.176t78.336 18.432q36.864 0 68.608-14.336t55.296-39.424 37.376-58.368 13.824-71.168zM205.824 268.288q10.24 0 18.944 10.24t15.36 28.672 10.24 42.496 3.584 51.712-3.584 51.712-10.24 41.984-15.36 28.16-18.944 10.24q-9.216 0-17.92-10.24t-15.36-28.16-10.752-41.984-4.096-51.712 4.096-51.712 10.752-42.496 15.36-28.672 17.92-10.24zM512-31.744000000000028q53.248 0 99.84 13.312t81.408 35.84 54.784 52.736 19.968 65.024q0 33.792-19.968 64t-54.784 52.736-81.408 35.84-99.84 13.312-99.84-13.312-81.408-35.84-54.784-52.736-19.968-64q0-34.816 19.968-65.024t54.784-52.736 81.408-35.84 99.84-13.312zM818.176 268.288q10.24 0 18.944 10.24t15.36 28.672 10.24 42.496 3.584 51.712-3.584 51.712-10.24 41.984-15.36 28.16-18.944 10.24q-9.216 0-17.92-10.24t-15.36-28.16-10.752-41.984-4.096-51.712 4.096-51.712 10.752-42.496 15.36-28.672 17.92-10.24zM512 235.51999999999998q39.936 0 68.096-9.728t28.16-24.064-28.16-24.064-68.096-9.728-68.096 9.728-28.16 24.064 28.16 24.064 68.096 9.728z" horiz-adv-x="1024" />
<glyph glyph-name="resize-vertical" unicode="&#59331;" d="M512 896C229.248 896 0 666.752 0 384s229.248-512 512-512 512 229.248 512 512S794.752 896 512 896zM576 192l64 0-128-128-128 128 64 0L448 576l-64 0 128 128 128-128-64 0L576 192z" horiz-adv-x="1024" />
<glyph glyph-name="chuizhifanzhuan" unicode="&#58977;" d="M286.01856 645.08416l472.4224 0 0-146.2784-472.4224 0 0 146.2784ZM87.19872 420.37248l885.80096 0 0-70.87104-885.80096 0 0 70.87104ZM773.55008 268.05248l0-31.0016L270.6688 237.05088l0 31.0016L773.55008 268.05248zM773.55008 121.4208l0-31.0016L270.6688 90.4192l0 31.0016L773.55008 121.4208zM742.54848 240.75776l31.0016 0 0-123.04896-31.0016 0L742.54848 240.75776zM270.70464 240.57856l31.0016 0 0-123.04896-31.0016 0L270.70464 240.57856z" horiz-adv-x="1024" />
<glyph glyph-name="shuipingfanzhuan" unicode="&#58978;" d="M252.76928 596.096l146.2784 0 0-472.42752-146.2784 0 0 472.42752ZM477.48096 810.65472l70.87104 0 0-885.80608-70.87104 0 0 885.80608ZM629.80096 611.2l31.0016 0 0-502.88128-31.0016 0L629.80096 611.2zM776.42752 611.2l31.0016 0 0-502.88128-31.0016 0L776.42752 611.2zM657.09056 580.1984l0 31.0016 123.04896 0 0-31.0016L657.09056 580.1984zM657.27488 108.35456l0 31.0016 123.04896 0 0-31.0016L657.27488 108.35456z" horiz-adv-x="1024" />
<glyph glyph-name="qq" unicode="&#58889;" d="M147.372058 491.394284c-5.28997-13.909921 2.431986-22.698872 0-75.732573-0.682996-14.25092-62.165649-78.762555-86.569511-145.791177-24.192863-66.517625-27.519845-135.978232 9.811944-163.285078 37.419789-27.305846 72.191593 90.879487 76.757567 73.685584 1.961989-7.509958 4.436975-15.317914 7.423958-23.338868a331.945126 331.945126 0 0 1 61.140655-101.162429c5.929967-6.783962-36.009797-19.199892-61.140655-61.99365-25.173858-42.751759 7.209959-120.49032 132.223254-120.49032 161.27909 0 197.288886 56.70368 200.574868 56.447681 12.031932-0.895995 12.841928 0 25.599855 0 15.572912 0 9.129948-1.279993 23.593867 0 7.807956 0.682996 86.186514-67.839617 194.686901-56.447681 184.873956 19.45589 156.586116 81.40754 142.079198 120.48932-15.103915 40.83277-68.692612 59.946662-66.303626 62.549647 44.28775 48.938724 51.285711 79.018554 66.346626 123.9463 6.143965 18.473896 49.066723-101.674426 82.089537-73.685584 13.781922 11.690934 41.301767 60.24566 13.781922 163.285078-27.519845 102.996419-80.767544 126.505286-79.615551 145.791177 2.389987 40.191773 1.023994 68.436614-1.023994 75.732573-9.812945 35.4128-30.378829 27.604844-30.378829 35.4128C858.450044 730.752933 705.10691 896 515.966978 896s-342.398067-165.289067-342.398068-369.192916c0-16.169909-14.378919-4.223976-26.154852-35.4128z" horiz-adv-x="1024" />
<glyph glyph-name="frown" unicode="&#59262;" d="M336 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM688 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM512 832C264.6 832 64 631.4 64 384s200.6-448 448-448 448 200.6 448 448S759.4 832 512 832z m263-711c-34.2-34.2-74-61-118.3-79.8C611 21.8 562.3 12 512 12c-50.3 0-99 9.8-144.8 29.2-44.3 18.7-84.1 45.6-118.3 79.8-34.2 34.2-61 74-79.8 118.3C149.8 285 140 333.7 140 384s9.8 99 29.2 144.8c18.7 44.3 45.6 84.1 79.8 118.3 34.2 34.2 74 61 118.3 79.8C413 746.2 461.7 756 512 756c50.3 0 99-9.8 144.8-29.2 44.3-18.7 84.1-45.6 118.3-79.8 34.2-34.2 61-74 79.8-118.3C874.2 483 884 434.3 884 384s-9.8-99-29.2-144.8c-18.7-44.3-45.6-84.1-79.8-118.2zM512 363c-85.5 0-155.6-67.3-160-151.6-0.2-4.6 3.4-8.4 8-8.4h48.1c4.2 0 7.8 3.2 8.1 7.4C420 259.9 461.5 299 512 299s92.1-39.1 95.8-88.6c0.3-4.2 3.9-7.4 8.1-7.4H664c4.6 0 8.2 3.8 8 8.4-4.4 84.3-74.5 151.6-160 151.6z" horiz-adv-x="1024" />
<glyph glyph-name="meh" unicode="&#59264;" d="M336 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM688 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM512 832C264.6 832 64 631.4 64 384s200.6-448 448-448 448 200.6 448 448S759.4 832 512 832z m263-711c-34.2-34.2-74-61-118.3-79.8C611 21.8 562.3 12 512 12c-50.3 0-99 9.8-144.8 29.2-44.3 18.7-84.1 45.6-118.3 79.8-34.2 34.2-61 74-79.8 118.3C149.8 285 140 333.7 140 384s9.8 99 29.2 144.8c18.7 44.3 45.6 84.1 79.8 118.3 34.2 34.2 74 61 118.3 79.8C413 746.2 461.7 756 512 756c50.3 0 99-9.8 144.8-29.2 44.3-18.7 84.1-45.6 118.3-79.8 34.2-34.2 61-74 79.8-118.3C874.2 483 884 434.3 884 384s-9.8-99-29.2-144.8c-18.7-44.3-45.6-84.1-79.8-118.2zM664 331H360c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h304c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8z" horiz-adv-x="1024" />
<glyph glyph-name="smile" unicode="&#59267;" d="M336 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM688 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM512 832C264.6 832 64 631.4 64 384s200.6-448 448-448 448 200.6 448 448S759.4 832 512 832z m263-711c-34.2-34.2-74-61-118.3-79.8C611 21.8 562.3 12 512 12c-50.3 0-99 9.8-144.8 29.2-44.3 18.7-84.1 45.6-118.3 79.8-34.2 34.2-61 74-79.8 118.3C149.8 285 140 333.7 140 384s9.8 99 29.2 144.8c18.7 44.3 45.6 84.1 79.8 118.3 34.2 34.2 74 61 118.3 79.8C413 746.2 461.7 756 512 756c50.3 0 99-9.8 144.8-29.2 44.3-18.7 84.1-45.6 118.3-79.8 34.2-34.2 61-74 79.8-118.3C874.2 483 884 434.3 884 384s-9.8-99-29.2-144.8c-18.7-44.3-45.6-84.1-79.8-118.2zM664 363h-48.1c-4.2 0-7.8-3.2-8.1-7.4C604 306.1 562.5 267 512 267s-92.1 39.1-95.8 88.6c-0.3 4.2-3.9 7.4-8.1 7.4H360c-4.6 0-8.2-3.8-8-8.4 4.4-84.3 74.5-151.6 160-151.6s155.6 67.3 160 151.6c0.2 4.6-3.4 8.4-8 8.4z" horiz-adv-x="1024" />
<glyph glyph-name="man" unicode="&#59362;" d="M874 776H622c-3.3 0-6-2.7-6-6v-56c0-3.3 2.7-6 6-6h160.4L583.1 508.7c-50 38.5-111 59.3-175.1 59.3-76.9 0-149.3-30-203.6-84.4S120 356.9 120 280s30-149.3 84.4-203.6C258.7 22 331.1-8 408-8s149.3 30 203.6 84.4C666 130.7 696 203.1 696 280c0 64.1-20.8 124.9-59.2 174.9L836 654.1V494c0-3.3 2.7-6 6-6h56c3.3 0 6 2.7 6 6V746c0 16.5-13.5 30-30 30zM408 68c-116.9 0-212 95.1-212 212s95.1 212 212 212 212-95.1 212-212-95.1-212-212-212z" horiz-adv-x="1024" />
<glyph glyph-name="woman" unicode="&#59365;" d="M909.7 739.4l-42.2 42.2c-3.1 3.1-8.2 3.1-11.3 0L764 689.4l-84.2 84.2c-3.1 3.1-8.2 3.1-11.3 0l-42.1-42.1c-3.1-3.1-3.1-8.1 0-11.3l84.2-84.2-135.5-135.3c-50 38.5-111 59.3-175.1 59.3-76.9 0-149.3-30-203.6-84.4S112 348.9 112 272s30-149.3 84.4-203.6C250.7 14 323.1-16 400-16s149.3 30 203.6 84.4C658 122.7 688 195.1 688 272c0 64.2-20.9 125.1-59.3 175.1l135.4 135.4 84.2-84.2c3.1-3.1 8.2-3.1 11.3 0l42.1 42.1c3.1 3.1 3.1 8.1 0 11.3l-84.2 84.2 92.2 92.2c3.1 3.1 3.1 8.2 0 11.3zM400 60c-116.9 0-212 95.1-212 212s95.1 212 212 212 212-95.1 212-212-95.1-212-212-212z" horiz-adv-x="1024" />
</font>
</defs></svg>
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-175acaff.7a825095.css rel=prefetch><link href=/css/chunk-1b756945.9e7173ae.css rel=prefetch><link href=/css/chunk-21b5182a.6e6ae301.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-34953cb0.71e3d438.css rel=prefetch><link href=/css/chunk-480215f6.84fd9662.css rel=prefetch><link href=/css/chunk-5ccefbbb.9e7173ae.css rel=prefetch><link href=/css/chunk-61b0b1e5.9e7173ae.css rel=prefetch><link href=/css/chunk-8e32057a.e8e9a917.css rel=prefetch><link href=/css/chunk-e7e51fa0.9e7173ae.css rel=prefetch><link href=/css/chunk-ff3eaeb0.9e7173ae.css rel=prefetch><link href=/js/chunk-0109d85c.d8a39ef0.js rel=prefetch><link href=/js/chunk-037694a5.a74514c3.js rel=prefetch><link href=/js/chunk-0aa2a834.9e04d151.js rel=prefetch><link href=/js/chunk-137dcf78.d8fcc61f.js rel=prefetch><link href=/js/chunk-14b9857b.35e42781.js rel=prefetch><link href=/js/chunk-15d6294e.42eb4739.js rel=prefetch><link href=/js/chunk-175acaff.ca3f7e65.js rel=prefetch><link href=/js/chunk-1792c498.4841b7fc.js rel=prefetch><link href=/js/chunk-1a0615f2.370fcaf1.js rel=prefetch><link href=/js/chunk-1b756945.d840b734.js rel=prefetch><link href=/js/chunk-21b5182a.74708748.js rel=prefetch><link href=/js/chunk-22347577.2275ebec.js rel=prefetch><link href=/js/chunk-24a41303.88feac34.js rel=prefetch><link href=/js/chunk-25d9ab36.087a7b9f.js rel=prefetch><link href=/js/chunk-291faf05.3991ad7a.js rel=prefetch><link href=/js/chunk-2aeda6fa.2bd11851.js rel=prefetch><link href=/js/chunk-2b3066fa.62e62ad4.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.ca1865db.js rel=prefetch><link href=/js/chunk-2d0e68e0.1a313c84.js rel=prefetch><link href=/js/chunk-2d0efc5d.662e1339.js rel=prefetch><link href=/js/chunk-2d20828f.7627562b.js rel=prefetch><link href=/js/chunk-3385141a.a6e1a986.js rel=prefetch><link href=/js/chunk-34953cb0.2fc03dd6.js rel=prefetch><link href=/js/chunk-3a0bcea0.192dd1cf.js rel=prefetch><link href=/js/chunk-477a8e91.c522ef77.js rel=prefetch><link href=/js/chunk-480215f6.177fc8ec.js rel=prefetch><link href=/js/chunk-4b58f216.e79a0ff7.js rel=prefetch><link href=/js/chunk-4fbb2454.6d97b621.js rel=prefetch><link href=/js/chunk-5ccefbbb.0f021a99.js rel=prefetch><link href=/js/chunk-5e7b929d.9e85be22.js rel=prefetch><link href=/js/chunk-61b0b1e5.322b588f.js rel=prefetch><link href=/js/chunk-65e97401.3b9c7780.js rel=prefetch><link href=/js/chunk-8e32057a.ffe15693.js rel=prefetch><link href=/js/chunk-9947983a.dea0cc2e.js rel=prefetch><link href=/js/chunk-e7e51fa0.c45982a9.js rel=prefetch><link href=/js/chunk-ff3eaeb0.d3d1af72.js rel=prefetch><link href=/css/app.4f840f8a.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.b88d12f7.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.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.9ae5f635.js></script><script src=/js/app.b88d12f7.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0109d85c"],{"391e":function(e,t,r){"use strict";var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},a=[],o=r("9ee1"),n=o["a"],i=r("9ca4"),l=Object(i["a"])(n,s,a,!1,null,null,null);t["a"]=l.exports},"9ee1":function(e,t,r){"use strict";(function(e){r("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 r=e("#framediv"),s=r.get()[0],a=window.innerHeight-s.offsetTop-t.advalue;t.frameHeight=a,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,r("a336"))},d495:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("Row",{attrs:{type:"flex"}},[e.curuser.isAdmin?r("i-col",{attrs:{span:"24"}},[r("FormAccount",{ref:"entinfo",attrs:{fminfo:e.entforminfo,noExpandAuth:"",isNotFixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("Button",{on:{click:e.upentinfo}},[e._v("保存")])]}}],null,!1,3009153987)})],1):e._e(),r("i-col",{staticStyle:{"margin-top":"10px"},attrs:{span:"24"}},[r("FormAccount",{ref:"uinfo",attrs:{fminfo:e.forminfo,noExpandAuth:"",isNotFixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("Button",{on:{click:e.upuserinfo}},[e._v("保存")])]}}])})],1),r("i-col",{staticStyle:{"margin-top":"10px"},attrs:{span:"24"}},[r("FormAccount",{ref:"pwdinfo",attrs:{fminfo:e.pwdinfo,refvalidatemethod:e.validmethod,noExpandAuth:"",isNotFixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("Button",{on:{click:e.uppwdinfo}},[e._v("保存")])]}}])})],1)],1)},a=[],o=r("0086"),n=r("391e"),i=r("7e1e"),l={name:"accountinfo_page",data:function(){return{forminfo:{name:"用户资料",main:[{title:"控制信息",key:"baseinfo",ctls:[{type:"switch",label:"是否接受分配任务",prop:"isAllocated",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:"",rules:[]}]},{title:"基本信息",key:"baseinfo",ctls:[{type:"input",label:"帐户名称",prop:"userName",placeHolder:"请输入帐户名",style:"",disabled:!0,rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"用户昵称",prop:"nickName",placeHolder:"请输入昵称",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"邮件地址",prop:"mail",placeHolder:"请输入邮件",style:"",rules:[{required:!0,message:" ",trigger:"blur"},{type:"email",message:"不正确的地址格式",trigger:"blur"}]},{type:"upload",label:"用户头像",prop:"headUrl",placeHolder:"请上传头像",style:"",rules:[]}]}],lists:[]},pwdinfo:{name:"密码设置",main:[{title:"密码修改",key:"baseinfo",cols:1,ctls:[{type:"password",label:"新设密码",prop:"onepassword",placeHolder:"请输入新密码",style:"",rules:[{required:!0,message:" ",trigger:"blur"},{validator:"validatex",trigger:"blur",iscustom:!0}]},{type:"password",label:"密码确认",prop:"repeatpassword",placeHolder:"请重新输入新密码",style:"",rules:[{required:!0,message:" ",trigger:"blur"},{validator:"validatex",trigger:"blur",iscustom:!0}]}]}],lists:[]},entforminfo:{name:"企业资料",main:[{title:"基本信息",key:"baseinfo",ctls:[{type:"input",label:"名称",prop:"name",placeHolder:"请输入企业名称",style:"",disabled:!0,rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"企业KEY",prop:"companykey",disabled:!0,placeHolder:"请输入昵称",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"电话",prop:"phone",placeHolder:"请输入昵称",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",label:"企业邮件",prop:"mail",placeHolder:"请输入邮件",style:"",rules:[{required:!0,message:" ",trigger:"blur"},{type:"email",message:"不正确的地址格式",trigger:"blur"}]},{type:"input",label:"地址",prop:"address",placeHolder:"请输入邮件",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"upload",label:"营业执照",prop:"licenseUrl",placeHolder:"请上传头像",style:"",rules:[{required:!0,message:" ",trigger:"blur"}]}]}],lists:[]}}},components:{FormAccount:o["a"],PageSpace:n["a"]},created:function(){},mounted:function(){this.userdata.isAdmin&&(this.$refs.entinfo.formModel=this.entdata),this.$refs.uinfo.formModel=this.userdata},computed:{curuser:function(){return this.deepclone(this.$store.state.user.userobj)},entdata:function(){return this.curuser.company},userdata:function(){return this.curuser}},methods:{validmethod:function(e,t,r){var s=this.$refs.pwdinfo.formModel["repeatpassword"],a=this.$refs.pwdinfo.formModel["onepassword"];return console.log(s,a),s!=a?r(new Error("两次输入的密码不一致")):r()},deepclone:function(e){var t=JSON.stringify(e);return JSON.parse(t)},upuserinfo:function(){var e=this;this.$refs.uinfo.validate((function(t){if(t){var r=e.$refs.uinfo.formModel;Object(i["n"])("/web/auth/userCtl/update",r).then((function(t){var r=t.data;if(console.log(r),0==r.status){var s=r.data;console.log("........................................................................user.",s),e.$store.state.user.userobj=s,e.$Message.success("当前操作成功.")}else e.$Message.error("当前操作失败,请重试或联系管理员.")}))}}))},upentinfo:function(){var e=this;this.$refs.entinfo.validate((function(t){if(t){var r=e.$refs.entinfo.formModel;Object(i["n"])("/web/common/companyCtl/update",r).then((function(t){var r=t.data;if(0==r.status){var s=r.data;console.log("............................cmp",s),e.$store.state.user.userobj.company=s,e.$Message.success("当前操作成功.")}else e.$Message.error("当前操作失败,请重试或联系管理员.")}))}}))},uppwdinfo:function(){var e=this;this.$refs.pwdinfo.validate((function(t){if(t){var r=e.$refs.pwdinfo.formModel;Object(i["n"])("/web/auth/userCtl/resetPassword",r).then((function(t){var r=t.data;if(0==r.status){r.data;e.$Message.success("当前操作成功."),e.$refs.pwdinfo.resetForm()}else e.$Message.error("当前操作失败,请重试或联系管理员.")}))}}))}}},u=l,c=r("9ca4"),p=Object(c["a"])(u,s,a,!1,null,null,null);t["default"]=p.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-037694a5"],{"82bd":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[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:a-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)]}}])})},r=[],o=n("ea4c"),i=o["a"],s=n("9ca4"),l=Object(s["a"])(i,a,r,!1,null,null,null);t["default"]=l.exports},a526:function(e,t,n){"use strict";var a=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)},r=[],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,a,r,!1,null,null,null);t["a"]=c.exports},ea4c:function(e,t,n){"use strict";(function(e){n("9a33"),n("60b7");var a=n("391e"),r=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:a["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,n){var a=this;Object(r["n"])("/web/common/treearchCtl/saveSysArchJSON",{sysArchJSON:e,curdata:t,olddata:n}).then((function(e){var n=e.data;if(console.log("ddddddddddddddddd",n),0==n.status){var r=n.data.sysArchJSON;console.log("save org...............................",r),a.$refs.orgtree.treedata=r,a.$refs.orgtree.refreshTree(),a.$Message.success("当前操作成功完成"),a.$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],a=window.innerHeight-n.offsetTop;t.css("height",a+"px"),this.$refs.userinfo.setHeight(a-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 a=this.$refs.orgtree.currentNode,r=this.$refs.orgtree.findParentByNode(a),o=n.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?(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(r["k"])().then((function(t){var n=t.data;if(0!=n.status)throw new Error("获取组织数据出错");var a=n.data.sysArchJSON;e(a)}))}}}}).call(this,n("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0aa2a834"],{"391e":function(e,t,n){"use strict";var r=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)},a=[],i=n("9ee1"),o=i["a"],c=n("9ca4"),s=Object(c["a"])(o,r,a,!1,null,null,null);t["a"]=s.exports},"560c":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[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"product_info",modelName:"product",packageName:"product",tblheight:r-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd,noExpandAuth:""},on:{onexec:e.onexec,oninitbtn:e.oninitbtn,postformsave:e.postformsave}})]}}])})},a=[],i=(n("6d57"),n("cc57"),n("163d"),n("06d3")),o=n("391e"),c=(n("60b7"),{name:"appinfo_page",data:function(){return{}},components:{PageSpace:o["a"],BizTable:i["a"]},methods:{oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t,n){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t){},validmethod:function(e,t,n){return n()},formatCol:function(e,t,n){if("isEnabled"==t){var r=e["isEnabled"]?"已上架":"待上架";return e["isEnabled"]?'<span style="color:green">'.concat(r,"</span>"):'<span style="color:orange">'.concat(r,"</span>")}if("deliverfile"==t){var a=e["deliverfile"];return"<img src='".concat(a,"' style='height:40px'>")}if("extrafile"==t){var i=e["extrafile"];return"<img src='".concat(i,"' style='height:40px'>")}if("lowpriceref"==t)return e["lowpriceref"]=Number(e["lowpriceref"]),"".concat(e["lowpriceref"]);if("hignpriceref"==t)return e["hignpriceref"]=Number(e["hignpriceref"]),"".concat(e["hignpriceref"]);if("pname"==t)return e.pname=e.product.name,e.product.name;if("strategyitems"==t)return e.strategyitems=e.pricestrategy.optionunion,e.pricestrategy.optionunion;if("code"==t){var o=[];return e.skus.forEach((function(e){o.push(e.pricestrategy_id)})),e.sts=o,e["code"]}},postformsave:function(e){var t=[];e.skus.forEach((function(e){t.push(e.pricestrategy_id)})),e.sts=t}}}),s=c,u=n("9ca4"),f=Object(u["a"])(s,r,a,!1,null,null,null);t["default"]=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"),r=n.get()[0],a=window.innerHeight-r.offsetTop-t.advalue;t.frameHeight=a,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-137dcf78"],{"391e":function(e,t,a){"use strict";var n=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)},r=[],i=a("9ee1"),o=i["a"],u=a("9ca4"),s=Object(u["a"])(o,n,r,!1,null,null,null);t["a"]=s.exports},"3ca5":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[a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,tblheight:n-120,metaName:"role_info",packageName:"auth",isMulti:"",savebefore:e.savebefore,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec}})]}}])})},r=[],i=a("06d3"),o=a("391e"),u={name:"roleinfo_page",data:function(){return{}},components:{BizTable:i["a"],PageSpace:o["a"]},methods:{savebefore:function(e,t,a){return a(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,a){return a(t)},onexec:function(e,t){"auth"==e&&this.$router.push({name:"role_auth",query:{roleid:t.id,rolecode:t.code}})},formatCol:function(e,t,a){if("isSystem"==t){var n=e["isSystem"]?"是":"否";return"<span>".concat(n,"</span>")}return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},s=u,c=a("9ca4"),f=Object(c["a"])(s,n,r,!1,null,null,null);t["default"]=f.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"),n=a.get()[0],r=window.innerHeight-n.offsetTop-t.advalue;t.frameHeight=r,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-14b9857b"],{"0eb4":function(t,e,n){},3026:function(t,e,n){t.exports=n.p+"img/error-401.98bba5b1.svg"},9454:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"error-page"},[n("div",{staticClass:"content-con"},[n("img",{attrs:{src:t.src,alt:t.code}}),n("div",{staticClass:"text-con"},[n("h4",[t._v(t._s(t.code))]),n("h5",[t._v(t._s(t.desc))])]),n("back-btn-group",{staticClass:"back-btn-group"})],1)])},c=[],o=(n("0eb4"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backHome}},[t._v("返回首页")]),n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backPrev}},[t._v("返回上一页("+t._s(t.second)+"s)")])],1)}),s=[],a=(n("f548"),{name:"backBtnGroup",data:function(){return{second:5,timer:null}},methods:{backHome:function(){this.$router.replace({name:this.$config.homeName})},backPrev:function(){this.$router.go(-1)}},mounted:function(){var t=this;this.timer=setInterval((function(){0===t.second?t.backPrev():t.second--}),1e3)},beforeDestroy:function(){clearInterval(this.timer)}}),i=a,u=n("9ca4"),l=Object(u["a"])(i,o,s,!1,null,null,null),b=l.exports,f={name:"error_content",components:{backBtnGroup:b},props:{code:String,desc:String,src:String}},d=f,p=Object(u["a"])(d,r,c,!1,null,null,null);e["a"]=p.exports},f94f:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("error-content",{attrs:{code:"401",desc:"Oh~~您没有浏览这个页面的权限~",src:t.src}})},c=[],o=n("3026"),s=n.n(o),a=n("9454"),i={name:"error_401",components:{errorContent:a["a"]},data:function(){return{src:s.a}}},u=i,l=n("9ca4"),b=Object(l["a"])(u,r,c,!1,null,null,null);e["default"]=b.exports}}]);
\ 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:"reftbl_salesman",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,m={name:"alldeliver_page",data:function(){return{baseUrl:d,smf:[{field:"cost_price",label:"服务费合计(元)"}],deliverNumber:"",userType:""}},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["n"])("/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,this.userType="deliverman",1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):(this.$refs.reftbl.showrefwindow([]),this.$refs.reftbl.setInitWhereData({isAllocated:1,isDelivery:1}))),"allocation_salesman"===e&&(this.userType="salesman",this.deliverNumber=t.deliverNumber,1==this.$store.state.user.userobj.company.id?this.$refs.reftblSuper.showrefwindow([]):(this.$refs.reftbl_salesman.showrefwindow([]),this.$refs.reftbl_salesman.setInitWhereData({isAllocated:1,isSalesman:1})))},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){var r=e[t];if("companyName"==t&&e["baseInfo"]){var s=e["baseInfo"]["companyName"];return s}if("businessType"===t){var i=l["a"].businessType[r];return i}if("delivery_status"===t){var n=l["a"].deliver_status[r];return n}if("sourceName"===t){var o=l["a"].source[r];return o}if("settle_status"==t){var u=l["a"].settle_status[r];return u}},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=22;break}if(e.prev=1,1!=this.$store.state.user.userobj.company.id){e.next=7;break}return e.next=5,Object(c["f"])({deliverNumber:this.deliverNumber,facilitatorId:t[0].id,facilitatorName:t[0].name});case 5:e.next=13;break;case 7:if("deliverman"!==this.userType){e.next=10;break}return e.next=10,Object(c["f"])({deliverNumber:this.deliverNumber,deliverymanId:t[0].id,deliverymanName:t[0].nickName,deliverymanOpcode:t[0].opath,deliverymanPhone:t[0].mobile,type:this.userType});case 10:if("salesman"!==this.userType){e.next=13;break}return e.next=13,Object(c["f"])({deliverNumber:this.deliverNumber,salesmanId:t[0].id,salesmanName:t[0].nickName,salesmanOpcode:t[0].opath,salesmanPhone:t[0].mobile,type:this.userType});case 13:this.$refs.bt.fetchData(),this.$Message.success("分配成功"),e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](1),this.$Message.error(e.t0.message);case 20:e.next=23;break;case 22:this.$Message.error("请勾人员");case 23:case"end":return e.stop()}}),e,this,[[1,17]])})));function t(t){return e.apply(this,arguments)}return t}()}},h=m,b=a("9ca4"),p=Object(b["a"])(h,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
(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-1792c498"],{"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)},i=[],n=a("9ee1"),s=n["a"],o=a("9ca4"),l=Object(o["a"])(s,r,i,!1,null,null,null);t["a"]=l.exports},"5f98":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:"settleapply_info",packageName:"bizchance",baseUrl:e.baseUrl,tblheight:r-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd,sumfields:e.smf,colVisable:e.colVisable},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})},i=[],n=(a("163d"),a("6d57"),a("06d3")),s=a("391e"),o=a("db7f"),l=a("f121"),c=a("7e1e"),u=l["a"].deliverUrl.pro,f={name:"alldeliver_page",data:function(){return{baseUrl:u,smf:[{field:"cost_price",label:"服务费合计(元)"}]}},components:{PageSpace:s["a"],BizTable:n["a"]},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})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){var a=this;if("settleapply"===e){if(0==this.$refs.bt.currentSels.length)return void this.$Modal.error({title:"提示",content:"请选择要给交付商结算的交付单,改变页码可以增加结算的明细!"});var r=[],i=this.$refs.bt.currentSels[0].facilitator_name,n=this.$refs.bt.currentSels[0].facilitator_id,s=!1;if(this.$refs.bt.currentSels.forEach((function(e){e.facilitator_name==i?r.push(e.id):s=!0})),s)return void this.$Modal.error({title:"提示",content:"请选择过滤相同的交付商申请结算."});Object(c["n"])("/web/bizchance/deliverybillCtl/settleApply",{ids:r,spname:i,spid:Number(n)},u).then((function(e){var t=e.data;0==t.status?(a.$Message.success("当前的结算申请已经发送给财务审核."),a.$refs.bt.fetchData()):a.$Message.error("当前的结算申请生成失败,请联系管理员或稍后重试.")}))}if("settlewriteoff"===e){if(0==this.$refs.bt.currentSels.length)return void this.$Modal.error({title:"提示",content:"请选择要进行结算核销的交付单,改变页码可以增加结算核销的明细. "});var o=[],l=this.$refs.bt.currentSels[0].facilitator_name,f=this.$refs.bt.currentSels[0].facilitator_id,d=!1;if(this.$refs.bt.currentSels.forEach((function(e){"waittosettle"==e.settle_status?o.push(e.id):d=!0})),d)return void this.$Modal.error({title:"提示",content:"请选择未结算的交付进行结算核销."});Object(c["n"])("/web/bizchance/deliverybillCtl/settleApplyForTacent",{ids:o,spname:l,spid:Number(f)},u).then((function(e){var t=e.data;0==t.status?(a.$Message.success("当前选择的结算核销已经完成,请到结算管理进行查看."),a.$refs.bt.fetchData()):a.$Message.error("当前选择的结算核销失败,请联系管理员或稍后重试.")}))}},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){var r=e[t];if("businessType"===t){var i=o["a"].businessType[r];return i}if("settle_status"===t){var n=o["a"].settle_status[r];return n}if("sourceName"===t){var s=o["a"].source[r];return s}}}},d=f,h=a("9ca4"),b=Object(h["a"])(d,r,i,!1,null,null,null);t["default"]=b.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],i=window.innerHeight-r.offsetTop-t.advalue;t.frameHeight=i,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("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)},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-1b756945"],{"1ded":function(e,t,n){},"232d":function(e,t,n){"use strict";(function(e){n("60b7");var i=n("391e"),a=n("7e1e"),r=n("302e"),o=n("832e"),s=n("a526");n("f121");t["a"]={name:"treeinfo_page",props:{},components:{ArchEditor:r["a"],SplitPanel:o["a"],PageSpace:i["a"],ArticleInfo:s["a"]},data:function(){return{treedata:[],isshowlist:!0,currow:{}}},mounted:function(){this.initData()},methods:{rtnback:function(){this.isshowlist=!0},articleShow:function(e){this.isshowlist=!1,this.currow=e},renderContent:function(e,t){var n=this,i=t.root,a=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(a,r)},click:function(e){n.setSelCss(e),n.currentData=r,n.currentNode=a,n.rootNode=i,n.selclick(i,a,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"}},[])])},setSelCss:function(t){e("span",".ptree").removeClass("spansel"),e(t.target).parent().parent().addClass("spansel")},selclick:function(e,t,n){this.$refs.articleInfo.searchWhere({archpath:n.code})},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)},setHeight:function(){var t=e("#orgdiv"),n=t.get()[0],i=window.innerHeight-n.offsetTop;t.css("height",i+"px"),this.$refs.userinfo.setHeight(i-120)},initData:function(){var e=this;Object(a["k"])().then((function(t){var n=t.data;if(0!=n.status)throw new Error("获取数据出错");e.treedata=n.data.sysArchJSON}))}}}}).call(this,n("a336"))},"25cd":function(e,t,n){"use strict";var i=n("1ded"),a=n.n(i);a.a},a526:function(e,t,n){"use strict";var i=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=[],r=(n("163d"),n("06d3")),o=(n("7e1e"),{name:"articleinfo_page",data:function(){return{}},components:{BizTable:r["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=o,c=n("9ca4"),l=Object(c["a"])(s,i,a,!1,null,null,null);t["a"]=l.exports},a9ab:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var i=t.adjustHeight;return[e.isshowlist?n("SplitPanel",[n("Tree",{staticClass:"ptree",attrs:{slot:"left",data:e.treedata,render:e.renderContent},slot:"left"}),n("ArticleInfo",{ref:"articleInfo",attrs:{slot:"right",tblheight:i-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("h1",[n("Button",{attrs:{icon:"md-arrow-round-back",type:"primary"},on:{click:e.rtnback}},[e._v("返回")]),e._v(" 主题:"+e._s(e.currow.title))],1),n("div",{staticStyle:{"margin-top":"5px"}},[e._v("最后更新时间:"+e._s(new Date(e.currow.updated_at).toLocaleString()))]),n("div",{staticStyle:{width:"100%","margin-top":"10px"},domProps:{innerHTML:e._s(e.currow.htmlcontent)}})])]}}])})},a=[],r=n("232d"),o=r["a"],s=(n("25cd"),n("9ca4")),c=Object(s["a"])(o,i,a,!1,null,null,null);t["default"]=c.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21b5182a"],{"11cc":function(e,t,n){},"2e25":function(e,t,n){},3759:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Card",{attrs:{shadow:""}},[n("div",[n("div",{staticClass:"message-page-con message-category-con"},[n("Menu",{attrs:{width:"auto","active-name":e.currentMessageType},on:{"on-select":e.handleSelect}},[n("MenuItem",{attrs:{name:"sys"}},[n("span",{staticClass:"category-title"},[e._v("系统公告")]),n("Badge",{staticStyle:{"margin-left":"10px"},attrs:{"class-name":"gray-dadge",count:e.messageSysCount}})],1),n("MenuItem",{attrs:{name:"unread"}},[n("span",{staticClass:"category-title"},[e._v("未读消息")]),n("Badge",{staticStyle:{"margin-left":"10px"},attrs:{count:e.messageUnreadCount}})],1),n("MenuItem",{attrs:{name:"readed"}},[n("span",{staticClass:"category-title"},[e._v("已读消息")]),n("Badge",{staticStyle:{"margin-left":"10px"},attrs:{"class-name":"gray-dadge",count:e.messageReadedCount}})],1)],1)],1),n("div",{staticClass:"message-page-con message-list-con"},[n("Scroll",{attrs:{"on-reach-bottom":e.handleReachBottom,height:"600","loading-text":e.text}},[e.listLoading?n("Spin",{attrs:{fix:"",size:"large"}}):e._e(),n("Menu",{class:e.titleClass,attrs:{width:"auto","active-name":""},on:{"on-select":e.handleView}},e._l(e.messageList,(function(t){return n("MenuItem",{key:"msg_"+t.msg_id,attrs:{name:t.msg_id}},[n("div",[n("p",{staticClass:"msg-title"},[e._v(e._s(t.title))]),n("Badge",{attrs:{status:"default",text:t.create_time}})],1)])})),1)],1)],1),n("div",{staticClass:"message-page-con message-view-con"},[e.contentLoading?n("Spin",{attrs:{fix:"",size:"large"}}):e._e(),n("div",{staticClass:"message-view-header"},[n("h2",{staticClass:"message-view-title"},[e._v(e._s(e.showingMsgItem.title))]),n("time",{staticClass:"message-view-time"},[e._v(e._s(e.showingMsgItem.create_time))]),n("a",{directives:[{name:"show",rawName:"v-show",value:e.showingMsgItem.jump_address,expression:"showingMsgItem.jump_address"}],staticStyle:{float:"right"},on:{click:function(t){return e.jumpDetails(e.showingMsgItem)}}},[e._v("查看详情")]),e.addStatus?n("a",{staticStyle:{float:"right"},on:{click:e.addMessageModel}},[e._v("添加系统公告")]):e._e()]),n("div",{domProps:{innerHTML:e._s(e.messageContent)}})],1),n("div",[n("Drawer",{attrs:{title:"发布系统公告",width:"900","mask-closable":!1,styles:e.styles},model:{value:e.messageModel,callback:function(t){e.messageModel=t},expression:"messageModel"}},[n("Form",{ref:"messageForm",attrs:{model:e.formData,"label-position":"top",rules:e.messageFormValidate}},[n("FormItem",{attrs:{label:"标题",prop:"title"}},[n("Input",{attrs:{placeholder:"请输入公告标题"},model:{value:e.formData.title,callback:function(t){e.$set(e.formData,"title",t)},expression:"formData.title"}})],1),n("FormItem",{attrs:{label:"内容",prop:"content"}},[n("editor",{ref:"editor",model:{value:e.formData.content,callback:function(t){e.$set(e.formData,"content",t)},expression:"formData.content"}})],1)],1),n("div",{staticClass:"demo-drawer-footer"},[n("Button",{staticStyle:{"margin-right":"8px"},on:{click:function(t){e.messageModel=!1}}},[e._v("取消")]),n("Button",{attrs:{type:"primary"},on:{click:e.addMessage}},[e._v("提交")])],1)],1)],1)])])},o=[],a=(n("b449"),n("9666")),r=n("a7c7"),s=(n("e697"),n("c24f")),c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editor-wrapper"},[n("div",{attrs:{id:e.editorId}})])},A=[],l=(n("163d"),n("49f2")),d=n.n(l),u=(n("422c"),n("90de")),h={name:"Editor",props:{value:{type:String,default:""},valueType:{type:String,default:"html",validator:function(e){return Object(u["g"])(e,["html","text"])}},changeInterval:{type:Number,default:200},cache:{type:Boolean,default:!0}},computed:{editorId:function(){return"editor".concat(this._uid)}},methods:{setHtml:function(e){this.editor.txt.html(e)}},mounted:function(){var e=this;this.editor=new d.a("#".concat(this.editorId)),this.editor.customConfig.onchange=function(t){var n=e.editor.txt.text();e.cache&&(localStorage.editorCache=t),e.$emit("input","html"===e.valueType?t:n),e.$emit("on-change",t,n)},this.editor.customConfig.onchangeTimeout=this.changeInterval,this.editor.create();var t=this.value||localStorage.editorCache;t&&this.editor.txt.html(t)}},p=h,f=(n("c6fe"),n("9ca4")),m=Object(f["a"])(p,c,A,!1,null,null,null),g=m.exports,v=g,w=n("de52"),E=n.n(w),b={name:"message_page",components:{Editor:v},data:function(){return{listLoading:!0,contentLoading:!1,currentMessageType:this.$route.query.type||"unread",messageContent:"",showingMsgItem:{},messageUnreadCount:0,messageReadedCount:0,messageSysCount:0,messageList:[],pageNo:1,text:"加载中",styles:{height:"calc(100% - 55px)",overflow:"auto",paddingBottom:"53px",position:"static"},messageModel:!1,formData:{title:"",content:""},messageFormValidate:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],content:[{required:!0,message:"请输入内容",trigger:"blur"}]}}},computed:{titleClass:function(){return{"not-unread-list":"unread"!==this.currentMessageType}},addStatus:function(){return!("sys"!==this.currentMessageType||!this.$store.state.user.userobj.isSuper&&!this.$store.state.user.userobj.isAdmin)}},methods:{stopLoading:function(e){this[e]=!1},handleSelect:function(e){this.currentMessageType=e,this.pageNo=1,this.getMsgList(),this.getGroupCount()},handleView:function(e){var t=this;this.contentLoading=!0;var n=this.messageList.find((function(t){return t.msg_id===e}));this.showingMsgItem=n,this.messageContent=n&&n.content||"","unread"===this.currentMessageType&&Object(s["r"])({id:e}).then((function(e){t.pageNo=1,t.getMsgList(),t.getGroupCount()})),this.stopLoading("contentLoading")},getMsgList:function(){var e=this;Object(s["n"])({msgType:this.currentMessageType,pageNo:this.pageNo}).then((function(t){e.messageList=t.map((function(e,t){return{msg_id:e.id||t,title:e.msg.title,create_time:E()(e.msg.created_at).format("YYYY-MM-DD HH:mm:ss"),jump_address:e.msg.jump_address,content:e.msg.content,app_key:e.msg.app_key}}))}))},getGroupCount:function(){var e=this;Object(s["d"])().then((function(t){e.messageUnreadCount=t.unRead,e.messageReadedCount=t.read,e.messageSysCount=t.system,e.stopLoading("listLoading")})).catch((function(){return e.stopLoading("listLoading")}))},handleReachBottom:function(){var e=this;return new Promise((function(t){var n;switch(e.currentMessageType){case"sys":n=e.messageSysCount;break;case"unread":n=e.messageUnreadCount;break;case"readed":n=e.messageReadedCount;break}var i=e.pageTotal(n,10);e.pageNo+1<=i?(e.text="加载中",e.pageNo++,setTimeout((function(){Object(s["n"])({msgType:e.currentMessageType,pageNo:e.pageNo}).then((function(n){var i;(i=e.messageList).push.apply(i,Object(r["a"])(n.map((function(e,t){return{msg_id:e.id||t,title:e.msg.title,create_time:E()(e.msg.created_at).format("YYYY-MM-DD HH:mm:ss"),jump_address:e.msg.jump_address,content:e.msg.content,app_key:e.msg.app_key}})))),t()}))}),1e3)):(e.text="已经到底了",t())}))},pageTotal:function(e,t){return null==e||""==e?0:0!=t&&e%t==0?parseInt(e/t):0!=t&&e%t!=0?parseInt(e/t)+1:void 0},jumpDetails:function(e){e.app_key&&e.jump_address&&Object(s["l"])({fromAppKey:e.app_key}).then((function(t){var n=t.data;0==n.status&&window.open("".concat(n.data.homePage,"?code=").concat(n.data.code,"&route=").concat(e.jump_address),"_blank")}))},addMessageModel:function(){this.messageModel=!0,this.formData={title:"",content:""},this.$refs.editor.setHtml(""),this.$refs["messageForm"].resetFields()},handleChange:function(e,t){this.formData.content=e},addMessage:function(){var e=this;this.$refs["messageForm"].validate(function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!n){t.next=14;break}return t.prev=1,t.next=4,Object(s["b"])({title:e.formData.title,content:e.formData.content});case 4:e.getGroupCount(),e.getMsgList(),e.messageModel=!1,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](1),e.$Message.error(t.t0.message);case 12:t.next=15;break;case 14:e.$Message.error("请完善信息!");case 15:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e){return t.apply(this,arguments)}}())}},mounted:function(){this.listLoading=!0,this.getGroupCount(),this.getMsgList()}},y=b,C=(n("ac69"),Object(f["a"])(y,i,o,!1,null,null,null));t["default"]=C.exports},"422c":function(e,t,n){},"49f2":function(e,t,n){(function(t,n){e.exports=n()})(0,(function(){"use strict";var e=function(){"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;while(--n>=0&&t.item(n)!==this);return n>-1})};function t(e){var t=void 0;return t=document.createElement("div"),t.innerHTML=e,t.children}function n(e){return!!e&&(e instanceof HTMLCollection||e instanceof NodeList)}function i(e){var t=document.querySelectorAll(e);return n(t)?t:[t]}var o=[];function a(e){if(e){if(e instanceof a)return e;this.selector=e;var o=e.nodeType,r=[];9===o||1===o?r=[e]:n(e)||e instanceof Array?r=e:"string"===typeof e&&(e=e.replace("/\n/mg","").trim(),r=0===e.indexOf("<")?t(e):i(e));var s=r.length;if(!s)return this;var c=void 0;for(c=0;c<s;c++)this[c]=r[c];this.length=s}}function r(e){return new a(e)}a.prototype={constructor:a,forEach:function(e){var t=void 0;for(t=0;t<this.length;t++){var n=this[t],i=e.call(n,n,t);if(!1===i)break}return this},clone:function(e){var t=[];return this.forEach((function(n){t.push(n.cloneNode(!!e))})),r(t)},get:function(e){var t=this.length;return e>=t&&(e%=t),r(this[e])},first:function(){return this.get(0)},last:function(){var e=this.length;return this.get(e-1)},on:function(e,t,n){n||(n=t,t=null);var i=[];return i=e.split(/\s+/),this.forEach((function(e){i.forEach((function(i){i&&(o.push({elem:e,type:i,fn:n}),t?e.addEventListener(i,(function(e){var i=e.target;i.matches(t)&&n.call(i,e)})):e.addEventListener(i,n))}))}))},off:function(e,t){return this.forEach((function(n){n.removeEventListener(e,t)}))},attr:function(e,t){return null==t?this[0].getAttribute(e):this.forEach((function(n){n.setAttribute(e,t)}))},addClass:function(e){return e?this.forEach((function(t){var n=void 0;t.className?(n=t.className.split(/\s/),n=n.filter((function(e){return!!e.trim()})),n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")):t.className=e})):this},removeClass:function(e){return e?this.forEach((function(t){var n=void 0;t.className&&(n=t.className.split(/\s/),n=n.filter((function(t){return t=t.trim(),!(!t||t===e)})),t.className=n.join(" "))})):this},css:function(e,t){var n=e+":"+t+";";return this.forEach((function(t){var i=(t.getAttribute("style")||"").trim(),o=void 0,a=[];i?(o=i.split(";"),o.forEach((function(e){var t=e.split(":").map((function(e){return e.trim()}));2===t.length&&a.push(t[0]+":"+t[1])})),a=a.map((function(t){return 0===t.indexOf(e)?n:t})),a.indexOf(n)<0&&a.push(n),t.setAttribute("style",a.join("; "))):t.setAttribute("style",n)}))},show:function(){return this.css("display","block")},hide:function(){return this.css("display","none")},children:function(){var e=this[0];return e?r(e.children):null},childNodes:function(){var e=this[0];return e?r(e.childNodes):null},append:function(e){return this.forEach((function(t){e.forEach((function(e){t.appendChild(e)}))}))},remove:function(){return this.forEach((function(e){if(e.remove)e.remove();else{var t=e.parentElement;t&&t.removeChild(e)}}))},isContain:function(e){var t=this[0],n=e[0];return t.contains(n)},getSizeData:function(){var e=this[0];return e.getBoundingClientRect()},getNodeName:function(){var e=this[0];return e.nodeName},find:function(e){var t=this[0];return r(t.querySelectorAll(e))},text:function(e){if(e)return this.forEach((function(t){t.innerHTML=e}));var t=this[0];return t.innerHTML.replace(/<.*?>/g,(function(){return""}))},html:function(e){var t=this[0];return null==e?t.innerHTML:(t.innerHTML=e,this)},val:function(){var e=this[0];return e.value.trim()},focus:function(){return this.forEach((function(e){e.focus()}))},parent:function(){var e=this[0];return r(e.parentElement)},parentUntil:function(e,t){var n=document.querySelectorAll(e),i=n.length;if(!i)return null;var o=t||this[0];if("BODY"===o.nodeName)return null;var a=o.parentElement,s=void 0;for(s=0;s<i;s++)if(a===n[s])return r(a);return this.parentUntil(e,a)},equal:function(e){return 1===e.nodeType?this[0]===e:this[0]===e[0]},insertBefore:function(e){var t=r(e),n=t[0];return n?this.forEach((function(e){var t=n.parentNode;t.insertBefore(e,n)})):this},insertAfter:function(e){var t=r(e),n=t[0];return n?this.forEach((function(e){var t=n.parentNode;t.lastChild===n?t.appendChild(e):t.insertBefore(e,n.nextSibling)})):this}},r.offAll=function(){o.forEach((function(e){var t=e.elem,n=e.type,i=e.fn;t.removeEventListener(n,i)}))};var s={menus:["head","bold","fontSize","fontName","italic","underline","strikeThrough","foreColor","backColor","link","list","justify","quote","emoticon","image","table","video","code","undo","redo"],fontNames:["宋体","微软雅黑","Arial","Tahoma","Verdana"],colors:["#000000","#eeece0","#1c487f","#4d80bf","#c24f4a","#8baa4a","#7b5ba1","#46acc8","#f9963b","#ffffff"],emotions:[{title:"默认",type:"image",content:[{alt:"[坏笑]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/50/pcmoren_huaixiao_org.png"},{alt:"[舔屏]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/pcmoren_tian_org.png"},{alt:"[污]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/pcmoren_wu_org.png"}]},{title:"新浪",type:"image",content:[{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/7a/shenshou_thumb.gif",alt:"[草泥马]"},{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/60/horse2_thumb.gif",alt:"[神马]"},{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/bc/fuyun_thumb.gif",alt:"[浮云]"}]},{title:"emoji",type:"emoji",content:"😀 😃 😄 😁 😆 😅 😂 😊 😇 🙂 🙃 😉 😓 😪 😴 🙄 🤔 😬 🤐".split(/\s/)}],zIndex:1e4,debug:!1,linkCheck:function(e,t){return!0},linkImgCheck:function(e){return!0},pasteFilterStyle:!0,pasteIgnoreImg:!1,pasteTextHandle:function(e){return e},showLinkImg:!0,linkImgCallback:function(e){},uploadImgMaxSize:5242880,uploadImgShowBase64:!1,uploadFileName:"",uploadImgParams:{},uploadImgHeaders:{},withCredentials:!1,uploadImgTimeout:1e4,uploadImgHooks:{before:function(e,t,n){},success:function(e,t,n){},fail:function(e,t,n){},error:function(e,t){},timeout:function(e,t){}},qiniu:!1},c={_ua:navigator.userAgent,isWebkit:function(){var e=/webkit/i;return e.test(this._ua)},isIE:function(){return"ActiveXObject"in window}};function A(e,t){var n=void 0,i=void 0;for(n in e)if(e.hasOwnProperty(n)&&(i=t.call(e,n,e[n]),!1===i))break}function l(e,t){var n=void 0,i=void 0,o=void 0,a=e.length||0;for(n=0;n<a;n++)if(i=e[n],o=t.call(e,i,n),!1===o)break}function d(e){return e+Math.random().toString().slice(2)}function u(e){return null==e?"":e.replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;").replace(/(\r\n|\r|\n)/g,"<br/>")}function h(e){return"function"===typeof e}function p(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-bold"></i>\n </div>'),this.type="click",this._active=!1}p.prototype={constructor:p,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("bold"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("bold")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var f=function(e,t){var n=e.config.langArgs||[],i=t;return n.forEach((function(e){var t=e.reg,n=e.val;t.test(i)&&(i=i.replace(t,(function(){return n})))})),i},m=function(){};function g(e,t){var n=this,i=e.editor;this.menu=e,this.opt=t;var o=r('<div class="w-e-droplist"></div>'),a=t.$title,s=void 0;a&&(s=a.html(),s=f(i,s),a.html(s),a.addClass("w-e-dp-title"),o.append(a));var c=t.list||[],A=t.type||"list",l=t.onClick||m,d=r('<ul class="'+("list"===A?"w-e-list":"w-e-block")+'"></ul>');o.append(d),c.forEach((function(e){var t=e.$elem,o=t.html();o=f(i,o),t.html(o);var a=e.value,s=r('<li class="w-e-item"></li>');t&&(s.append(t),d.append(s),s.on("click",(function(e){l(a),n.hideTimeoutId=setTimeout((function(){n.hide()}),0)})))})),o.on("mouseleave",(function(e){n.hideTimeoutId=setTimeout((function(){n.hide()}),0)})),this.$container=o,this._rendered=!1,this._show=!1}function v(e){var t=this;this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-header"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new g(this,{width:100,$title:r("<p>设置标题</p>"),type:"list",list:[{$elem:r("<h1>H1</h1>"),value:"<h1>"},{$elem:r("<h2>H2</h2>"),value:"<h2>"},{$elem:r("<h3>H3</h3>"),value:"<h3>"},{$elem:r("<h4>H4</h4>"),value:"<h4>"},{$elem:r("<h5>H5</h5>"),value:"<h5>"},{$elem:r("<p>正文</p>"),value:"<p>"}],onClick:function(e){t._command(e)}})}function w(e){var t=this;this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-text-heigh"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new g(this,{width:160,$title:r("<p>字号</p>"),type:"list",list:[{$elem:r('<span style="font-size: x-small;">x-small</span>'),value:"1"},{$elem:r('<span style="font-size: small;">small</span>'),value:"2"},{$elem:r("<span>normal</span>"),value:"3"},{$elem:r('<span style="font-size: large;">large</span>'),value:"4"},{$elem:r('<span style="font-size: x-large;">x-large</span>'),value:"5"},{$elem:r('<span style="font-size: xx-large;">xx-large</span>'),value:"6"}],onClick:function(e){t._command(e)}})}function E(e){var t=this;this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-font"></i></div>'),this.type="droplist",this._active=!1;var n=e.config,i=n.fontNames||[];this.droplist=new g(this,{width:100,$title:r("<p>字体</p>"),type:"list",list:i.map((function(e){return{$elem:r('<span style="font-family: '+e+';">'+e+"</span>"),value:e}})),onClick:function(e){t._command(e)}})}g.prototype={constructor:g,show:function(){this.hideTimeoutId&&clearTimeout(this.hideTimeoutId);var e=this.menu,t=e.$elem,n=this.$container;if(!this._show){if(this._rendered)n.show();else{var i=t.getSizeData().height||0,o=this.opt.width||100;n.css("margin-top",i+"px").css("width",o+"px"),t.append(n),this._rendered=!0}this._show=!0}},hide:function(){this.showTimeoutId&&clearTimeout(this.showTimeoutId);var e=this.$container;this._show&&(e.hide(),this._show=!1)}},v.prototype={constructor:v,_command:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();t.$textElem.equal(n)||t.cmd.do("formatBlock",e)},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=/^h/i,o=t.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},w.prototype={constructor:w,_command:function(e){var t=this.editor;t.cmd.do("fontSize",e)}},E.prototype={constructor:E,_command:function(e){var t=this.editor;t.cmd.do("fontName",e)}};var b=function(){},y=[];function C(e,t){this.menu=e,this.opt=t}function B(e){this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-link"></i></div>'),this.type="panel",this._active=!1}function x(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-italic"></i>\n </div>'),this.type="click",this._active=!1}function I(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-redo"></i>\n </div>'),this.type="click",this._active=!1}function Q(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-strikethrough"></i>\n </div>'),this.type="click",this._active=!1}function M(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-underline"></i>\n </div>'),this.type="click",this._active=!1}function _(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-undo"></i>\n </div>'),this.type="click",this._active=!1}function k(e){var t=this;this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-list2"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new g(this,{width:120,$title:r("<p>设置列表</p>"),type:"list",list:[{$elem:r('<span><i class="w-e-icon-list-numbered"></i> 有序列表</span>'),value:"insertOrderedList"},{$elem:r('<span><i class="w-e-icon-list2"></i> 无序列表</span>'),value:"insertUnorderedList"}],onClick:function(e){t._command(e)}})}function S(e){var t=this;this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-paragraph-left"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new g(this,{width:100,$title:r("<p>对齐方式</p>"),type:"list",list:[{$elem:r('<span><i class="w-e-icon-paragraph-left"></i> 靠左</span>'),value:"justifyLeft"},{$elem:r('<span><i class="w-e-icon-paragraph-center"></i> 居中</span>'),value:"justifyCenter"},{$elem:r('<span><i class="w-e-icon-paragraph-right"></i> 靠右</span>'),value:"justifyRight"}],onClick:function(e){t._command(e)}})}function D(e){var t=this;this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-pencil2"></i></div>'),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new g(this,{width:120,$title:r("<p>文字颜色</p>"),type:"inline-block",list:i.map((function(e){return{$elem:r('<i style="color:'+e+';" class="w-e-icon-pencil2"></i>'),value:e}})),onClick:function(e){t._command(e)}})}function N(e){var t=this;this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-paint-brush"></i></div>'),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new g(this,{width:120,$title:r("<p>背景色</p>"),type:"inline-block",list:i.map((function(e){return{$elem:r('<i style="color:'+e+';" class="w-e-icon-paint-brush"></i>'),value:e}})),onClick:function(e){t._command(e)}})}function F(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-quotes-left"></i>\n </div>'),this.type="click",this._active=!1}function T(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-terminal"></i>\n </div>'),this.type="panel",this._active=!1}function R(e){this.editor=e,this.$elem=r('<div class="w-e-menu">\n <i class="w-e-icon-happy"></i>\n </div>'),this.type="panel",this._active=!1}function U(e){this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-table2"></i></div>'),this.type="panel",this._active=!1}function Y(e){this.editor=e,this.$elem=r('<div class="w-e-menu"><i class="w-e-icon-play"></i></div>'),this.type="panel",this._active=!1}function L(e){this.editor=e;var t=d("w-e-img");this.$elem=r('<div class="w-e-menu" id="'+t+'"><i class="w-e-icon-image"></i></div>'),e.imgMenuId=t,this.type="panel",this._active=!1}C.prototype={constructor:C,show:function(){var e=this,t=this.menu;if(!(y.indexOf(t)>=0)){var n=t.editor,i=r("body"),o=n.$textContainerElem,a=this.opt,s=r('<div class="w-e-panel-container"></div>'),c=a.width||300;s.css("width",c+"px").css("margin-left",(0-c)/2+"px");var A=r('<i class="w-e-icon-close w-e-panel-close"></i>');s.append(A),A.on("click",(function(){e.hide()}));var l=r('<ul class="w-e-panel-tab-title"></ul>'),d=r('<div class="w-e-panel-tab-content"></div>');s.append(l).append(d);var u=a.height;u&&d.css("height",u+"px").css("overflow-y","auto");var h=a.tabs||[],p=[],m=[];h.forEach((function(e,t){if(e){var i=e.title||"",o=e.tpl||"";i=f(n,i),o=f(n,o);var a=r('<li class="w-e-item">'+i+"</li>");l.append(a);var s=r(o);d.append(s),a._index=t,p.push(a),m.push(s),0===t?(a._active=!0,a.addClass("w-e-active")):s.hide(),a.on("click",(function(e){a._active||(p.forEach((function(e){e._active=!1,e.removeClass("w-e-active")})),m.forEach((function(e){e.hide()})),a._active=!0,a.addClass("w-e-active"),s.show())}))}})),s.on("click",(function(e){e.stopPropagation()})),i.on("click",(function(t){e.hide()})),o.append(s),h.forEach((function(t,n){if(t){var i=t.events||[];i.forEach((function(t){var i=t.selector,o=t.type,a=t.fn||b,r=m[n];r.find(i).on(o,(function(t){t.stopPropagation();var n=a(t);n&&e.hide()}))}))}}));var g=s.find("input[type=text],textarea");g.length&&g.get(0).focus(),this.$container=s,this._hideOtherPanels(),y.push(t)}},hide:function(){var e=this.menu,t=this.$container;t&&t.remove(),y=y.filter((function(t){return t!==e}))},_hideOtherPanels:function(){y.length&&y.forEach((function(e){var t=e.panel||{};t.hide&&t.hide()}))}},B.prototype={constructor:B,onClick:function(e){var t=this.editor,n=void 0;if(this._active){if(n=t.selection.getSelectionContainerElem(),!n)return;t.selection.createRangeByElem(n),t.selection.restoreSelection(),this._createPanel(n.text(),n.attr("href"))}else t.selection.isSelectionEmpty()?this._createPanel("",""):this._createPanel(t.selection.getSelectionText(),"")},_createPanel:function(e,t){var n=this,i=d("input-link"),o=d("input-text"),a=d("btn-ok"),s=d("btn-del"),c=this._active?"inline-block":"none",A=new C(this,{width:300,tabs:[{title:"链接",tpl:'<div>\n <input id="'+o+'" type="text" class="block" value="'+e+'" placeholder="链接文字"/></td>\n <input id="'+i+'" type="text" class="block" value="'+t+'" placeholder="http://..."/></td>\n <div class="w-e-button-container">\n <button id="'+a+'" class="right">插入</button>\n <button id="'+s+'" class="gray right" style="display:'+c+'">删除链接</button>\n </div>\n </div>',events:[{selector:"#"+a,type:"click",fn:function(){var e=r("#"+i),t=r("#"+o),a=e.val(),s=t.val();return n._insertLink(s,a),!0}},{selector:"#"+s,type:"click",fn:function(){return n._delLink(),!0}}]}]});A.show(),this.panel=A},_delLink:function(){if(this._active){var e=this.editor,t=e.selection.getSelectionContainerElem();if(t){var n=e.selection.getSelectionText();e.cmd.do("insertHTML","<span>"+n+"</span>")}}},_insertLink:function(e,t){var n=this.editor,i=n.config,o=i.linkCheck,a=!0;o&&"function"===typeof o&&(a=o(e,t)),!0===a?n.cmd.do("insertHTML",'<a href="'+t+'" target="_blank">'+e+"</a>"):alert(a)},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();i&&("A"===i.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active")))}},x.prototype={constructor:x,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("italic"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("italic")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},I.prototype={constructor:I,onClick:function(e){var t=this.editor;t.cmd.do("redo")}},Q.prototype={constructor:Q,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("strikeThrough"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("strikeThrough")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},M.prototype={constructor:M,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("underline"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("underline")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},_.prototype={constructor:_,onClick:function(e){var t=this.editor;t.cmd.do("undo")}},k.prototype={constructor:k,_command:function(e){var t=this.editor,n=t.$textElem;if(t.selection.restoreSelection(),!t.cmd.queryCommandState(e)){t.cmd.do(e);var i=t.selection.getSelectionContainerElem();if("LI"===i.getNodeName()&&(i=i.parent()),!1!==/^ol|ul$/i.test(i.getNodeName())&&!i.equal(n)){var o=i.parent();o.equal(n)||(i.insertAfter(o),o.remove())}}},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("insertUnOrderedList")||t.cmd.queryCommandState("insertOrderedList")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},S.prototype={constructor:S,_command:function(e){var t=this.editor;t.cmd.do(e)}},D.prototype={constructor:D,_command:function(e){var t=this.editor;t.cmd.do("foreColor",e)}},N.prototype={constructor:N,_command:function(e){var t=this.editor;t.cmd.do("backColor",e)}},F.prototype={constructor:F,onClick:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem(),i=n.getNodeName();if(c.isIE()){var o=void 0,a=void 0;if("P"===i)return o=n.text(),a=r("<blockquote>"+o+"</blockquote>"),a.insertAfter(n),void n.remove();"BLOCKQUOTE"===i&&(o=n.text(),a=r("<p>"+o+"</p>"),a.insertAfter(n),n.remove())}else"BLOCKQUOTE"===i?t.cmd.do("formatBlock","<P>"):t.cmd.do("formatBlock","<BLOCKQUOTE>")},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=/^BLOCKQUOTE$/i,o=t.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},T.prototype={constructor:T,onClick:function(e){var t=this.editor,n=t.selection.getSelectionStartElem(),i=t.selection.getSelectionEndElem(),o=t.selection.isSelectionEmpty(),a=t.selection.getSelectionText(),s=void 0;if(n.equal(i))return o?void(this._active?this._createPanel(n.html()):this._createPanel()):(s=r("<code>"+a+"</code>"),t.cmd.do("insertElem",s),t.selection.createRangeByElem(s,!1),void t.selection.restoreSelection());t.selection.restoreSelection()},_createPanel:function(e){var t=this;e=e||"";var n=e?"edit":"new",i=d("texxt"),o=d("btn"),a=new C(this,{width:500,tabs:[{title:"插入代码",tpl:'<div>\n <textarea id="'+i+'" style="height:145px;;">'+e+'</textarea>\n <div class="w-e-button-container">\n <button id="'+o+'" class="right">插入</button>\n </div>\n <div>',events:[{selector:"#"+o,type:"click",fn:function(){var e=r("#"+i),o=e.val()||e.html();return o=u(o),"new"===n?t._insertCode(o):t._updateCode(o),!0}}]}]});a.show(),this.panel=a},_insertCode:function(e){var t=this.editor;t.cmd.do("insertHTML","<pre><code>"+e+"</code></pre><p><br></p>")},_updateCode:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();n&&(n.html(e),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();if(i){var o=i.parent();"CODE"===i.getNodeName()&&"PRE"===o.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},R.prototype={constructor:R,onClick:function(){this._createPanel()},_createPanel:function(){var e=this,t=this.editor,n=t.config,i=n.emotions||[],o=[];i.forEach((function(t){var n=t.type,i=t.content||[],a="";"emoji"===n&&i.forEach((function(e){e&&(a+='<span class="w-e-item">'+e+"</span>")})),"image"===n&&i.forEach((function(e){var t=e.src,n=e.alt;t&&(a+='<span class="w-e-item"><img src="'+t+'" alt="'+n+'" data-w-e="1"/></span>')})),o.push({title:t.title,tpl:'<div class="w-e-emoticon-container">'+a+"</div>",events:[{selector:"span.w-e-item",type:"click",fn:function(t){var n=t.target,i=r(n),o=i.getNodeName(),a=void 0;return a="IMG"===o?i.parent().html():"<span>"+i.html()+"</span>",e._insert(a),!0}}]})}));var a=new C(this,{width:300,height:200,tabs:o});a.show(),this.panel=a},_insert:function(e){var t=this.editor;t.cmd.do("insertHTML",e)}},U.prototype={constructor:U,onClick:function(){this._active?this._createEditPanel():this._createInsertPanel()},_createInsertPanel:function(){var e=this,t=d("btn"),n=d("row"),i=d("col"),o=new C(this,{width:250,tabs:[{title:"插入表格",tpl:'<div>\n <p style="text-align:left; padding:5px 0;">\n 创建\n <input id="'+n+'" type="text" value="5" style="width:40px;text-align:center;"/>\n 行\n <input id="'+i+'" type="text" value="5" style="width:40px;text-align:center;"/>\n 列的表格\n </p>\n <div class="w-e-button-container">\n <button id="'+t+'" class="right">插入</button>\n </div>\n </div>',events:[{selector:"#"+t,type:"click",fn:function(){var t=parseInt(r("#"+n).val()),o=parseInt(r("#"+i).val());return t&&o&&t>0&&o>0&&e._insert(t,o),!0}}]}]});o.show(),this.panel=o},_insert:function(e,t){var n=void 0,i=void 0,o='<table border="0" width="100%" cellpadding="0" cellspacing="0">';for(n=0;n<e;n++){if(o+="<tr>",0===n)for(i=0;i<t;i++)o+="<th>&nbsp;</th>";else for(i=0;i<t;i++)o+="<td>&nbsp;</td>";o+="</tr>"}o+="</table><p><br></p>";var a=this.editor;a.cmd.do("insertHTML",o),a.cmd.do("enableObjectResizing",!1),a.cmd.do("enableInlineTableEditing",!1)},_createEditPanel:function(){var e=this,t=d("add-row"),n=d("add-col"),i=d("del-row"),o=d("del-col"),a=d("del-table"),r=new C(this,{width:320,tabs:[{title:"编辑表格",tpl:'<div>\n <div class="w-e-button-container" style="border-bottom:1px solid #f1f1f1;padding-bottom:5px;margin-bottom:5px;">\n <button id="'+t+'" class="left">增加行</button>\n <button id="'+i+'" class="red left">删除行</button>\n <button id="'+n+'" class="left">增加列</button>\n <button id="'+o+'" class="red left">删除列</button>\n </div>\n <div class="w-e-button-container">\n <button id="'+a+'" class="gray left">删除表格</button>\n </dv>\n </div>',events:[{selector:"#"+t,type:"click",fn:function(){return e._addRow(),!0}},{selector:"#"+n,type:"click",fn:function(){return e._addCol(),!0}},{selector:"#"+i,type:"click",fn:function(){return e._delRow(),!0}},{selector:"#"+o,type:"click",fn:function(){return e._delCol(),!0}},{selector:"#"+a,type:"click",fn:function(){return e._delTable(),!0}}]}]});r.show()},_getLocationData:function(){var e={},t=this.editor,n=t.selection.getSelectionContainerElem();if(n){var i=n.getNodeName();if("TD"===i||"TH"===i){var o=n.parent(),a=o.children(),r=a.length;a.forEach((function(t,i){if(t===n[0])return e.td={index:i,elem:t,length:r},!1}));var s=o.parent(),c=s.children(),A=c.length;return c.forEach((function(t,n){if(t===o[0])return e.tr={index:n,elem:t,length:A},!1})),e}}},_addRow:function(){var e=this._getLocationData();if(e){var t=e.tr,n=r(t.elem),i=e.td,o=i.length,a=document.createElement("tr"),s="",c=void 0;for(c=0;c<o;c++)s+="<td>&nbsp;</td>";a.innerHTML=s,r(a).insertAfter(n)}},_addCol:function(){var e=this._getLocationData();if(e){var t=e.tr,n=e.td,i=n.index,o=r(t.elem),a=o.parent(),s=a.children();s.forEach((function(e){var t=r(e),n=t.children(),o=n.get(i),a=o.getNodeName().toLowerCase(),s=document.createElement(a);r(s).insertAfter(o)}))}},_delRow:function(){var e=this._getLocationData();if(e){var t=e.tr,n=r(t.elem);n.remove()}},_delCol:function(){var e=this._getLocationData();if(e){var t=e.tr,n=e.td,i=n.index,o=r(t.elem),a=o.parent(),s=a.children();s.forEach((function(e){var t=r(e),n=t.children(),o=n.get(i);o.remove()}))}},_delTable:function(){var e=this.editor,t=e.selection.getSelectionContainerElem();if(t){var n=t.parentUntil("table");n&&n.remove()}},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();"TD"===o||"TH"===o?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},Y.prototype={constructor:Y,onClick:function(){this._createPanel()},_createPanel:function(){var e=this,t=d("text-val"),n=d("btn"),i=new C(this,{width:350,tabs:[{title:"插入视频",tpl:'<div>\n <input id="'+t+'" type="text" class="block" placeholder="格式如:<iframe src=... ></iframe>"/>\n <div class="w-e-button-container">\n <button id="'+n+'" class="right">插入</button>\n </div>\n </div>',events:[{selector:"#"+n,type:"click",fn:function(){var n=r("#"+t),i=n.val().trim();return i&&e._insert(i),!0}}]}]});i.show(),this.panel=i},_insert:function(e){var t=this.editor;t.cmd.do("insertHTML",e+"<p><br></p>")}},L.prototype={constructor:L,onClick:function(){var e=this.editor,t=e.config;t.qiniu||(this._active?this._createEditPanel():this._createInsertPanel())},_createEditPanel:function(){var e=this.editor,t=d("width-30"),n=d("width-50"),i=d("width-100"),o=d("del-btn"),a=[{title:"编辑图片",tpl:'<div>\n <div class="w-e-button-container" style="border-bottom:1px solid #f1f1f1;padding-bottom:5px;margin-bottom:5px;">\n <span style="float:left;font-size:14px;margin:4px 5px 0 5px;color:#333;">最大宽度:</span>\n <button id="'+t+'" class="left">30%</button>\n <button id="'+n+'" class="left">50%</button>\n <button id="'+i+'" class="left">100%</button>\n </div>\n <div class="w-e-button-container">\n <button id="'+o+'" class="gray left">删除图片</button>\n </dv>\n </div>',events:[{selector:"#"+t,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","30%"),!0}},{selector:"#"+n,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","50%"),!0}},{selector:"#"+i,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","100%"),!0}},{selector:"#"+o,type:"click",fn:function(){var t=e._selectedImg;return t&&t.remove(),!0}}]}],r=new C(this,{width:300,tabs:a});r.show(),this.panel=r},_createInsertPanel:function(){var e=this.editor,t=e.uploadImg,n=e.config,i=d("up-trigger"),o=d("up-file"),a=d("link-url"),s=d("link-btn"),c=[{title:"上传图片",tpl:'<div class="w-e-up-img-container">\n <div id="'+i+'" class="w-e-up-btn">\n <i class="w-e-icon-upload2"></i>\n </div>\n <div style="display:none;">\n <input id="'+o+'" type="file" multiple="multiple" accept="image/jpg,image/jpeg,image/png,image/gif,image/bmp"/>\n </div>\n </div>',events:[{selector:"#"+i,type:"click",fn:function(){var e=r("#"+o),t=e[0];if(!t)return!0;t.click()}},{selector:"#"+o,type:"change",fn:function(){var e=r("#"+o),n=e[0];if(!n)return!0;var i=n.files;return i.length&&t.uploadImg(i),!0}}]},{title:"网络图片",tpl:'<div>\n <input id="'+a+'" type="text" class="block" placeholder="图片链接"/></td>\n <div class="w-e-button-container">\n <button id="'+s+'" class="right">插入</button>\n </div>\n </div>',events:[{selector:"#"+s,type:"click",fn:function(){var e=r("#"+a),n=e.val().trim();return n&&t.insertLinkImg(n),!0}}]}],A=[];(n.uploadImgShowBase64||n.uploadImgServer||n.customUploadImg)&&window.FileReader&&A.push(c[0]),n.showLinkImg&&A.push(c[1]);var l=new C(this,{width:300,tabs:A});l.show(),this.panel=l},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t._selectedImg?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var j={};function P(e){this.editor=e,this.menus={}}function H(e){var t=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,n=void 0;return n=null==t?window.clipboardData&&window.clipboardData.getData("text"):t.getData("text/plain"),u(n)}function G(e,t,n){var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,o=void 0,a=void 0;if(null==i?o=window.clipboardData&&window.clipboardData.getData("text"):(o=i.getData("text/plain"),a=i.getData("text/html")),!a&&o&&(a="<p>"+u(o)+"</p>"),a){var r=a.split("</html>");return 2===r.length&&(a=r[0]),a=a.replace(/<(meta|script|link).+?>/gim,""),a=a.replace(/<!--.*?-->/gm,""),a=a.replace(/\s?data-.+?=('|").+?('|")/gim,""),n&&(a=a.replace(/<img.+?>/gim,"")),a=t?a.replace(/\s?(class|style)=('|").*?('|")/gim,""):a.replace(/\s?class=('|").*?('|")/gim,""),a}}function z(e){var t=[],n=H(e);if(n)return t;var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData||{},o=i.items;return o?(A(o,(function(e,n){var i=n.type;/image/i.test(i)&&t.push(n.getAsFile())})),t):t}function J(e){var t=[],n=e.childNodes()||[];return n.forEach((function(e){var n=void 0,i=e.nodeType;if(3===i&&(n=e.textContent,n=u(n)),1===i){n={},n.tag=e.nodeName.toLowerCase();for(var o=[],a=e.attributes||{},s=a.length||0,c=0;c<s;c++){var A=a[c];o.push({name:A.name,value:A.value})}n.attrs=o,n.children=J(r(e))}t.push(n)})),t}function O(e){this.editor=e}function $(e){this.editor=e}function V(e){this.editor=e,this._currentRange=null}function K(e){this.editor=e,this._time=0,this._isShow=!1,this._isRender=!1,this._timeoutId=0,this.$textContainer=e.$textContainerElem,this.$bar=r('<div class="w-e-progress"></div>')}j.bold=p,j.head=v,j.fontSize=w,j.fontName=E,j.link=B,j.italic=x,j.redo=I,j.strikeThrough=Q,j.underline=M,j.undo=_,j.list=k,j.justify=S,j.foreColor=D,j.backColor=N,j.quote=F,j.code=T,j.emoticon=R,j.table=U,j.video=Y,j.image=L,P.prototype={constructor:P,init:function(){var e=this,t=this.editor,n=t.config||{},i=n.menus||[];i.forEach((function(n){var i=j[n];i&&"function"===typeof i&&(e.menus[n]=new i(t))})),this._addToToolbar(),this._bindEvent()},_addToToolbar:function(){var e=this.editor,t=e.$toolbarElem,n=this.menus,i=e.config,o=i.zIndex+1;A(n,(function(e,n){var i=n.$elem;i&&(i.css("z-index",o),t.append(i))}))},_bindEvent:function(){var e=this.menus,t=this.editor;A(e,(function(e,n){var i=n.type;if(i){var o=n.$elem,a=n.droplist;n.panel;"click"===i&&n.onClick&&o.on("click",(function(e){null!=t.selection.getRange()&&n.onClick(e)})),"droplist"===i&&a&&o.on("mouseenter",(function(e){null!=t.selection.getRange()&&(a.showTimeoutId=setTimeout((function(){a.show()}),200))})).on("mouseleave",(function(e){a.hideTimeoutId=setTimeout((function(){a.hide()}),0)})),"panel"===i&&n.onClick&&o.on("click",(function(e){e.stopPropagation(),null!=t.selection.getRange()&&n.onClick(e)}))}}))},changeActive:function(){var e=this.menus;A(e,(function(e,t){t.tryChangeActive&&setTimeout((function(){t.tryChangeActive()}),100)}))}},O.prototype={constructor:O,init:function(){this._bindEvent()},clear:function(){this.html("<p><br></p>")},html:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.html(),i=i.replace(/\u200b/gm,""),i;n.html(e),t.initSelection()},getJSON:function(){var e=this.editor,t=e.$textElem;return J(t)},text:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.text(),i=i.replace(/\u200b/gm,""),i;n.text("<p>"+e+"</p>"),t.initSelection()},append:function(e){var t=this.editor,n=t.$textElem;n.append(r(e)),t.initSelection()},_bindEvent:function(){this._saveRangeRealTime(),this._enterKeyHandle(),this._clearHandle(),this._pasteHandle(),this._tabHandle(),this._imgHandle(),this._dragHandle()},_saveRangeRealTime:function(){var e=this.editor,t=e.$textElem;function n(t){e.selection.saveRange(),e.menus.changeActive()}t.on("keyup",n),t.on("mousedown",(function(e){t.on("mouseleave",n)})),t.on("mouseup",(function(e){n(),t.off("mouseleave",n)}))},_enterKeyHandle:function(){var e=this.editor,t=e.$textElem;function n(t){var n=r("<p><br></p>");n.insertBefore(t),e.selection.createRangeByElem(n,!0),e.selection.restoreSelection(),t.remove()}function i(i){var o=e.selection.getSelectionContainerElem(),a=o.parent();if("<code><br></code>"!==a.html()){if(a.equal(t)){var r=o.getNodeName();"P"!==r&&(o.text()||n(o))}}else n(o)}function o(t){var n=e.selection.getSelectionContainerElem();if(n){var i=n.parent(),o=n.getNodeName(),a=i.getNodeName();if("CODE"===o&&"PRE"===a&&e.cmd.queryCommandSupported("insertHTML")){if(!0===e._willBreakCode){var s=r("<p><br></p>");return s.insertAfter(i),e.selection.createRangeByElem(s,!0),e.selection.restoreSelection(),e._willBreakCode=!1,void t.preventDefault()}var c=e.selection.getRange().startOffset;e.cmd.do("insertHTML","\n"),e.selection.saveRange(),e.selection.getRange().startOffset===c&&e.cmd.do("insertHTML","\n");var A=n.html().length;e.selection.getRange().startOffset+1===A&&(e._willBreakCode=!0),t.preventDefault()}}}t.on("keyup",(function(e){13===e.keyCode&&i(e)})),t.on("keydown",(function(t){13===t.keyCode?o(t):e._willBreakCode=!1}))},_clearHandle:function(){var e=this.editor,t=e.$textElem;t.on("keydown",(function(e){if(8===e.keyCode){var n=t.html().toLowerCase().trim();"<p><br></p>"!==n||e.preventDefault()}})),t.on("keyup",(function(n){if(8===n.keyCode){var i=void 0,o=t.html().toLowerCase().trim();o&&"<br>"!==o||(i=r("<p><br/></p>"),t.html(""),t.append(i),e.selection.createRangeByElem(i,!1,!0),e.selection.restoreSelection())}}))},_pasteHandle:function(){var e=this.editor,t=e.config,n=t.pasteFilterStyle,i=t.pasteTextHandle,o=t.pasteIgnoreImg,a=e.$textElem,r=0;function s(){var e=Date.now(),t=!1;return e-r>=100&&(t=!0),r=e,t}function A(){r=0}a.on("paste",(function(t){if(!c.isIE()&&(t.preventDefault(),s())){var a=G(t,n,o),r=H(t);r=r.replace(/\n/gm,"<br>");var l=e.selection.getSelectionContainerElem();if(l){var d=l.getNodeName();if("CODE"===d||"PRE"===d)return i&&h(i)&&(r=""+(i(r)||"")),void e.cmd.do("insertHTML","<p>"+r+"</p>");if(a)try{i&&h(i)&&(a=""+(i(a)||"")),e.cmd.do("insertHTML",a)}catch(u){i&&h(i)&&(r=""+(i(r)||"")),e.cmd.do("insertHTML","<p>"+r+"</p>")}else A()}}})),a.on("paste",(function(t){if(!c.isIE()&&(t.preventDefault(),s())){var n=z(t);if(n&&n.length){var i=e.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();if("CODE"!==o&&"PRE"!==o){var a=e.uploadImg;a.uploadImg(n)}}}}}))},_tabHandle:function(){var e=this.editor,t=e.$textElem;t.on("keydown",(function(t){if(9===t.keyCode&&e.cmd.queryCommandSupported("insertHTML")){var n=e.selection.getSelectionContainerElem();if(n){var i=n.parent(),o=n.getNodeName(),a=i.getNodeName();"CODE"===o&&"PRE"===a?e.cmd.do("insertHTML"," "):e.cmd.do("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"),t.preventDefault()}}}))},_imgHandle:function(){var e=this.editor,t=e.$textElem;t.on("click","img",(function(t){var n=this,i=r(n);"1"!==i.attr("data-w-e")&&(e._selectedImg=i,e.selection.createRangeByElem(i),e.selection.restoreSelection())})),t.on("click keyup",(function(t){t.target.matches("img")||(e._selectedImg=null)}))},_dragHandle:function(){var e=this.editor,t=r(document);t.on("dragleave drop dragenter dragover",(function(e){e.preventDefault()}));var n=e.$textElem;n.on("drop",(function(t){t.preventDefault();var n=t.dataTransfer&&t.dataTransfer.files;if(n&&n.length){var i=e.uploadImg;i.uploadImg(n)}}))}},$.prototype={constructor:$,do:function(e,t){var n=this.editor;if(n._useStyleWithCSS||(document.execCommand("styleWithCSS",null,!0),n._useStyleWithCSS=!0),n.selection.getRange()){n.selection.restoreSelection();var i="_"+e;this[i]?this[i](t):this._execCommand(e,t),n.menus.changeActive(),n.selection.saveRange(),n.selection.restoreSelection(),n.change&&n.change()}},_insertHTML:function(e){var t=this.editor,n=t.selection.getRange();this.queryCommandSupported("insertHTML")?this._execCommand("insertHTML",e):n.insertNode?(n.deleteContents(),n.insertNode(r(e)[0])):n.pasteHTML&&n.pasteHTML(e)},_insertElem:function(e){var t=this.editor,n=t.selection.getRange();n.insertNode&&(n.deleteContents(),n.insertNode(e[0]))},_execCommand:function(e,t){document.execCommand(e,!1,t)},queryCommandValue:function(e){return document.queryCommandValue(e)},queryCommandState:function(e){return document.queryCommandState(e)},queryCommandSupported:function(e){return document.queryCommandSupported(e)}},V.prototype={constructor:V,getRange:function(){return this._currentRange},saveRange:function(e){if(e)this._currentRange=e;else{var t=window.getSelection();if(0!==t.rangeCount){var n=t.getRangeAt(0),i=this.getSelectionContainerElem(n);if(i&&"false"!==i.attr("contenteditable")&&!i.parentUntil("[contenteditable=false]")){var o=this.editor,a=o.$textElem;a.isContain(i)&&(this._currentRange=n)}}}},collapseRange:function(e){null==e&&(e=!1);var t=this._currentRange;t&&t.collapse(e)},getSelectionText:function(){var e=this._currentRange;return e?this._currentRange.toString():""},getSelectionContainerElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.commonAncestorContainer,r(1===t.nodeType?t:t.parentNode)},getSelectionStartElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.startContainer,r(1===t.nodeType?t:t.parentNode)},getSelectionEndElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.endContainer,r(1===t.nodeType?t:t.parentNode)},isSelectionEmpty:function(){var e=this._currentRange;return!(!e||!e.startContainer||e.startContainer!==e.endContainer||e.startOffset!==e.endOffset)},restoreSelection:function(){var e=window.getSelection();e.removeAllRanges(),e.addRange(this._currentRange)},createEmptyRange:function(){var e=this.editor,t=this.getRange(),n=void 0;if(t&&this.isSelectionEmpty())try{c.isWebkit()?(e.cmd.do("insertHTML","&#8203;"),t.setEnd(t.endContainer,t.endOffset+1),this.saveRange(t)):(n=r("<strong>&#8203;</strong>"),e.cmd.do("insertElem",n),this.createRangeByElem(n,!0))}catch(i){}},createRangeByElem:function(e,t,n){if(e.length){var i=e[0],o=document.createRange();n?o.selectNodeContents(i):o.selectNode(i),"boolean"===typeof t&&o.collapse(t),this.saveRange(o)}}},K.prototype={constructor:K,show:function(e){var t=this;if(!this._isShow){this._isShow=!0;var n=this.$bar;if(this._isRender)this._isRender=!0;else{var i=this.$textContainer;i.append(n)}Date.now()-this._time>100&&e<=1&&(n.css("width",100*e+"%"),this._time=Date.now());var o=this._timeoutId;o&&clearTimeout(o),o=setTimeout((function(){t._hide()}),500)}},_hide:function(){var e=this.$bar;e.remove(),this._time=0,this._isShow=!1,this._isRender=!1}};var q="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function X(e){this.editor=e}X.prototype={constructor:X,_alert:function(e,t){var n=this.editor,i=n.config.debug,o=n.config.customAlert;if(i)throw new Error("wangEditor: "+(t||e));o&&"function"===typeof o?o(e):alert(e)},insertLinkImg:function(e){var t=this;if(e){var n=this.editor,i=n.config,o=i.linkImgCheck,a=void 0;if(o&&"function"===typeof o&&(a=o(e),"string"===typeof a))alert(a);else{n.cmd.do("insertHTML",'<img src="'+e+'" style="max-width:100%;"/>');var r=document.createElement("img");r.onload=function(){var t=i.linkImgCallback;t&&"function"===typeof t&&t(e),r=null},r.onerror=function(){r=null,t._alert("插入图片错误",'wangEditor: 插入图片出错,图片链接是 "'+e+'",下载该链接失败')},r.onabort=function(){r=null},r.src=e}}},uploadImg:function(e){var t=this;if(e&&e.length){var n=this.editor,i=n.config,o=i.uploadImgServer,a=i.uploadImgShowBase64,r=i.uploadImgMaxSize,s=r/1024/1024,c=i.uploadImgMaxLength||1e4,d=i.uploadFileName||"",u=i.uploadImgParams||{},h=i.uploadImgParamsWithUrl,p=i.uploadImgHeaders||{},f=i.uploadImgHooks||{},m=i.uploadImgTimeout||3e3,g=i.withCredentials;null==g&&(g=!1);var v=i.customUploadImg;if(v||o||a){var w=[],E=[];if(l(e,(function(e){var t=e.name,n=e.size;t&&n&&(!1!==/\.(jpg|jpeg|png|bmp|gif|webp)$/i.test(t)?r<n?E.push("【"+t+"】大于 "+s+"M"):w.push(e):E.push("【"+t+"】不是图片"))})),E.length)this._alert("图片验证未通过: \n"+E.join("\n"));else if(w.length>c)this._alert("一次最多上传"+c+"张图片");else if(v&&"function"===typeof v)v(w,this.insertLinkImg.bind(this));else{var b=new FormData;if(l(w,(function(e){var t=d||e.name;b.append(t,e)})),o&&"string"===typeof o){var y=o.split("#");o=y[0];var C=y[1]||"";A(u,(function(e,t){h&&(o.indexOf("?")>0?o+="&":o+="?",o=o+e+"="+t),b.append(e,t)})),C&&(o+="#"+C);var B=new XMLHttpRequest;if(B.open("POST",o),B.timeout=m,B.ontimeout=function(){f.timeout&&"function"===typeof f.timeout&&f.timeout(B,n),t._alert("上传图片超时")},B.upload&&(B.upload.onprogress=function(e){var t=void 0,i=new K(n);e.lengthComputable&&(t=e.loaded/e.total,i.show(t))}),B.onreadystatechange=function(){var e=void 0;if(4===B.readyState){if(B.status<200||B.status>=300)return f.error&&"function"===typeof f.error&&f.error(B,n),void t._alert("上传图片发生错误","上传图片发生错误,服务器返回状态是 "+B.status);if(e=B.responseText,"object"!==("undefined"===typeof e?"undefined":q(e)))try{e=JSON.parse(e)}catch(o){return f.fail&&"function"===typeof f.fail&&f.fail(B,n,e),void t._alert("上传图片失败","上传图片返回结果错误,返回结果是: "+e)}if(f.customInsert||"0"==e.errno){if(f.customInsert&&"function"===typeof f.customInsert)f.customInsert(t.insertLinkImg.bind(t),e,n);else{var i=e.data||[];i.forEach((function(e){t.insertLinkImg(e)}))}f.success&&"function"===typeof f.success&&f.success(B,n,e)}else f.fail&&"function"===typeof f.fail&&f.fail(B,n,e),t._alert("上传图片失败","上传图片返回结果错误,返回结果 errno="+e.errno)}},f.before&&"function"===typeof f.before){var x=f.before(B,n,w);if(x&&"object"===("undefined"===typeof x?"undefined":q(x))&&x.prevent)return void this._alert(x.msg)}return A(p,(function(e,t){B.setRequestHeader(e,t)})),B.withCredentials=g,void B.send(b)}a&&l(e,(function(e){var n=t,i=new FileReader;i.readAsDataURL(e),i.onload=function(){n.insertLinkImg(this.result)}}))}}}}};var W=1;function Z(e,t){if(null==e)throw new Error("错误:初始化编辑器时候未传入任何参数,请查阅文档");this.id="wangEditor-"+W++,this.toolbarSelector=e,this.textSelector=t,this.customConfig={}}Z.prototype={constructor:Z,_initConfig:function(){var e={};this.config=Object.assign(e,s,this.customConfig);var t=this.config.lang||{},n=[];A(t,(function(e,t){n.push({reg:new RegExp(e,"img"),val:t})})),this.config.langArgs=n},_initDom:function(){var e=this,t=this.toolbarSelector,n=r(t),i=this.textSelector,o=this.config,a=o.zIndex,s=void 0,c=void 0,A=void 0,l=void 0;null==i?(s=r("<div></div>"),c=r("<div></div>"),l=n.children(),n.append(s).append(c),s.css("background-color","#f1f1f1").css("border","1px solid #ccc"),c.css("border","1px solid #ccc").css("border-top","none").css("height","300px")):(s=n,c=r(i),l=c.children()),A=r("<div></div>"),A.attr("contenteditable","true").css("width","100%").css("height","100%"),l&&l.length?A.append(l):A.append(r("<p><br></p>")),c.append(A),s.addClass("w-e-toolbar"),c.addClass("w-e-text-container"),c.css("z-index",a),A.addClass("w-e-text");var u=d("toolbar-elem");s.attr("id",u);var h=d("text-elem");A.attr("id",h),this.$toolbarElem=s,this.$textContainerElem=c,this.$textElem=A,this.toolbarElemId=u,this.textElemId=h;var p=!0;c.on("compositionstart",(function(){p=!1})),c.on("compositionend",(function(){p=!0})),c.on("click keyup",(function(){p&&e.change&&e.change()})),s.on("click",(function(){this.change&&this.change()})),(o.onfocus||o.onblur)&&(this.isFocus=!1,r(document).on("click",(function(t){var n=A.isContain(r(t.target)),i=s.isContain(r(t.target)),o=s[0]==t.target;if(n)e.isFocus||e.onfocus&&e.onfocus(),e.isFocus=!0;else{if(i&&!o)return;e.isFocus&&e.onblur&&e.onblur(),e.isFocus=!1}})))},_initCommand:function(){this.cmd=new $(this)},_initSelectionAPI:function(){this.selection=new V(this)},_initUploadImg:function(){this.uploadImg=new X(this)},_initMenus:function(){this.menus=new P(this),this.menus.init()},_initText:function(){this.txt=new O(this),this.txt.init()},initSelection:function(e){var t=this.$textElem,n=t.children();if(!n.length)return t.append(r("<p><br></p>")),void this.initSelection();var i=n.last();if(e){var o=i.html().toLowerCase(),a=i.getNodeName();if("<br>"!==o&&"<br/>"!==o||"P"!==a)return t.append(r("<p><br></p>")),void this.initSelection()}this.selection.createRangeByElem(i,!1,!0),this.selection.restoreSelection()},_bindEvent:function(){var e=0,t=this.txt.html(),n=this.config,i=n.onchangeTimeout;i=parseInt(i,10),(!i||i<=0)&&(i=200);var o=n.onchange;o&&"function"===typeof o&&(this.change=function(){var n=this.txt.html();n.length===t.length&&n===t||(e&&clearTimeout(e),e=setTimeout((function(){o(n),t=n}),i))});var a=n.onblur;a&&"function"===typeof a&&(this.onblur=function(){var e=this.txt.html();a(e)});var r=n.onfocus;r&&"function"===typeof r&&(this.onfocus=function(){r()})},create:function(){this._initConfig(),this._initDom(),this._initCommand(),this._initSelectionAPI(),this._initText(),this._initMenus(),this._initUploadImg(),this.initSelection(!0),this._bindEvent()},_offAllEvent:function(){r.offAll()}};try{document}catch(ie){throw new Error("请在浏览器环境下运行")}e();var ee='.w-e-toolbar,.w-e-text-container,.w-e-menu-panel { padding: 0; margin: 0; box-sizing: border-box;}.w-e-toolbar *,.w-e-text-container *,.w-e-menu-panel * { padding: 0; margin: 0; box-sizing: border-box;}.w-e-clear-fix:after { content: ""; display: table; clear: both;}.w-e-toolbar .w-e-droplist { position: absolute; left: 0; top: 0; background-color: #fff; border: 1px solid #f1f1f1; border-right-color: #ccc; border-bottom-color: #ccc;}.w-e-toolbar .w-e-droplist .w-e-dp-title { text-align: center; color: #999; line-height: 2; border-bottom: 1px solid #f1f1f1; font-size: 13px;}.w-e-toolbar .w-e-droplist ul.w-e-list { list-style: none; line-height: 1;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { color: #333; padding: 5px 0;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { background-color: #f1f1f1;}.w-e-toolbar .w-e-droplist ul.w-e-block { list-style: none; text-align: left; padding: 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { display: inline-block; *display: inline; *zoom: 1; padding: 3px 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { background-color: #f1f1f1;}@font-face { font-family: \'w-e-icon\'; src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABhQAAsAAAAAGAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPBGNtYXAAAAFoAAABBAAAAQQrSf4BZ2FzcAAAAmwAAAAIAAAACAAAABBnbHlmAAACdAAAEvAAABLwfpUWUWhlYWQAABVkAAAANgAAADYQp00kaGhlYQAAFZwAAAAkAAAAJAfEA+FobXR4AAAVwAAAAIQAAACEeAcD7GxvY2EAABZEAAAARAAAAERBSEX+bWF4cAAAFogAAAAgAAAAIAAsALZuYW1lAAAWqAAAAYYAAAGGmUoJ+3Bvc3QAABgwAAAAIAAAACAAAwAAAAMD3gGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8fwDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAOgAAAA2ACAABAAWAAEAIOkG6Q3pEulH6Wbpd+m56bvpxunL6d/qDepc6l/qZepo6nHqefAN8BTxIPHc8fz//f//AAAAAAAg6QbpDekS6UfpZel36bnpu+nG6cvp3+oN6lzqX+pi6mjqcep38A3wFPEg8dzx/P/9//8AAf/jFv4W+Bb0FsAWoxaTFlIWURZHFkMWMBYDFbUVsxWxFa8VpxWiEA8QCQ7+DkMOJAADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACAAD/wAQAA8AABAATAAABNwEnAQMuAScTNwEjAQMlATUBBwGAgAHAQP5Anxc7MmOAAYDA/oDAAoABgP6ATgFAQAHAQP5A/p0yOxcBEU4BgP6A/YDAAYDA/oCAAAQAAAAABAADgAAQACEALQA0AAABOAExETgBMSE4ATEROAExITUhIgYVERQWMyEyNjURNCYjBxQGIyImNTQ2MzIWEyE1EwEzNwPA/IADgPyAGiYmGgOAGiYmGoA4KCg4OCgoOED9AOABAEDgA0D9AAMAQCYa/QAaJiYaAwAaJuAoODgoKDg4/biAAYD+wMAAAAIAAABABAADQAA4ADwAAAEmJy4BJyYjIgcOAQcGBwYHDgEHBhUUFx4BFxYXFhceARcWMzI3PgE3Njc2Nz4BNzY1NCcuAScmJwERDQED1TY4OXY8PT8/PTx2OTg2CwcICwMDAwMLCAcLNjg5djw9Pz89PHY5ODYLBwgLAwMDAwsIBwv9qwFA/sADIAgGBggCAgICCAYGCCkqKlktLi8vLi1ZKiopCAYGCAICAgIIBgYIKSoqWS0uLy8uLVkqKin94AGAwMAAAAAAAgDA/8ADQAPAABsAJwAAASIHDgEHBhUUFx4BFxYxMDc+ATc2NTQnLgEnJgMiJjU0NjMyFhUUBgIAQjs6VxkZMjJ4MjIyMngyMhkZVzo7QlBwcFBQcHADwBkZVzo7Qnh9fcxBQUFBzH19eEI7OlcZGf4AcFBQcHBQUHAAAAEAAAAABAADgAArAAABIgcOAQcGBycRISc+ATMyFx4BFxYVFAcOAQcGBxc2Nz4BNzY1NCcuAScmIwIANTIyXCkpI5YBgJA1i1BQRUZpHh4JCSIYGB5VKCAgLQwMKCiLXl1qA4AKCycbHCOW/oCQNDweHmlGRVArKClJICEaYCMrK2I2NjlqXV6LKCgAAQAAAAAEAAOAACoAABMUFx4BFxYXNyYnLgEnJjU0Nz4BNzYzMhYXByERByYnLgEnJiMiBw4BBwYADAwtICAoVR4YGCIJCR4eaUZFUFCLNZABgJYjKSlcMjI1al1eiygoAYA5NjZiKysjYBohIEkpKCtQRUZpHh48NJABgJYjHBsnCwooKIteXQAAAAACAAAAQAQBAwAAJgBNAAATMhceARcWFRQHDgEHBiMiJy4BJyY1JzQ3PgE3NjMVIgYHDgEHPgEhMhceARcWFRQHDgEHBiMiJy4BJyY1JzQ3PgE3NjMVIgYHDgEHPgHhLikpPRESEhE9KSkuLikpPRESASMjelJRXUB1LQkQBwgSAkkuKSk9ERISET0pKS4uKSk9ERIBIyN6UlFdQHUtCRAHCBICABIRPSkpLi4pKT0REhIRPSkpLiBdUVJ6IyOAMC4IEwoCARIRPSkpLi4pKT0REhIRPSkpLiBdUVJ6IyOAMC4IEwoCAQAABgBA/8AEAAPAAAMABwALABEAHQApAAAlIRUhESEVIREhFSEnESM1IzUTFTMVIzU3NSM1MxUVESM1MzUjNTM1IzUBgAKA/YACgP2AAoD9gMBAQECAwICAwMCAgICAgIACAIACAIDA/wDAQP3yMkCSPDJAku7+wEBAQEBAAAYAAP/ABAADwAADAAcACwAXACMALwAAASEVIREhFSERIRUhATQ2MzIWFRQGIyImETQ2MzIWFRQGIyImETQ2MzIWFRQGIyImAYACgP2AAoD9gAKA/YD+gEs1NUtLNTVLSzU1S0s1NUtLNTVLSzU1SwOAgP8AgP8AgANANUtLNTVLS/61NUtLNTVLS/61NUtLNTVLSwADAAAAAAQAA6AAAwANABQAADchFSElFSE1EyEVITUhJQkBIxEjEQAEAPwABAD8AIABAAEAAQD9YAEgASDggEBAwEBAAQCAgMABIP7g/wABAAAAAAACAB7/zAPiA7QAMwBkAAABIiYnJicmNDc2PwE+ATMyFhcWFxYUBwYPAQYiJyY0PwE2NCcuASMiBg8BBhQXFhQHDgEjAyImJyYnJjQ3Nj8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFxYUBwYPAQ4BIwG4ChMIIxISEhIjwCNZMTFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PCBMKuDFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PDysQIxISEhIjwCNZMQFECAckLS1eLS0kwCIlJSIkLS1eLS0kVxAQDysPWCl0KRQVFRTAKXQpDysQBwj+iCUiJC0tXi0tJFcQEA8rD1gpdCkUFRUUwCl0KQ8rEA8PJC0tXi0tJMAiJQAAAAAFAAD/wAQAA8AAGwA3AFMAXwBrAAAFMjc+ATc2NTQnLgEnJiMiBw4BBwYVFBceARcWEzIXHgEXFhUUBw4BBwYjIicuAScmNTQ3PgE3NhMyNz4BNzY3BgcOAQcGIyInLgEnJicWFx4BFxYnNDYzMhYVFAYjIiYlNDYzMhYVFAYjIiYCAGpdXosoKCgoi15dampdXosoKCgoi15dalZMTHEgISEgcUxMVlZMTHEgISEgcUxMVisrKlEmJiMFHBtWODc/Pzc4VhscBSMmJlEqK9UlGxslJRsbJQGAJRsbJSUbGyVAKCiLXl1qal1eiygoKCiLXl1qal1eiygoA6AhIHFMTFZWTExxICEhIHFMTFZWTExxICH+CQYGFRAQFEM6OlYYGRkYVjo6QxQQEBUGBvcoODgoKDg4KCg4OCgoODgAAAMAAP/ABAADwAAbADcAQwAAASIHDgEHBhUUFx4BFxYzMjc+ATc2NTQnLgEnJgMiJy4BJyY1NDc+ATc2MzIXHgEXFhUUBw4BBwYTBycHFwcXNxc3JzcCAGpdXosoKCgoi15dampdXosoKCgoi15dalZMTHEgISEgcUxMVlZMTHEgISEgcUxMSqCgYKCgYKCgYKCgA8AoKIteXWpqXV6LKCgoKIteXWpqXV6LKCj8YCEgcUxMVlZMTHEgISEgcUxMVlZMTHEgIQKgoKBgoKBgoKBgoKAAAQBl/8ADmwPAACkAAAEiJiMiBw4BBwYVFBYzLgE1NDY3MAcGAgcGBxUhEzM3IzceATMyNjcOAQMgRGhGcVNUbRobSUgGDWVKEBBLPDxZAT1sxizXNC1VJi5QGB09A7AQHh1hPj9BTTsLJjeZbwN9fv7Fj5AjGQIAgPYJDzdrCQcAAAAAAgAAAAAEAAOAAAkAFwAAJTMHJzMRIzcXIyURJyMRMxUhNTMRIwcRA4CAoKCAgKCggP8AQMCA/oCAwEDAwMACAMDAwP8AgP1AQEACwIABAAADAMAAAANAA4AAFgAfACgAAAE+ATU0Jy4BJyYjIREhMjc+ATc2NTQmATMyFhUUBisBEyMRMzIWFRQGAsQcIBQURi4vNf7AAYA1Ly5GFBRE/oRlKjw8KWafn58sPj4B2yJULzUvLkYUFPyAFBRGLi81RnQBRks1NUv+gAEASzU1SwAAAAACAMAAAANAA4AAHwAjAAABMxEUBw4BBwYjIicuAScmNREzERQWFx4BMzI2Nz4BNQEhFSECwIAZGVc6O0JCOzpXGRmAGxgcSSgoSRwYG/4AAoD9gAOA/mA8NDVOFhcXFk41NDwBoP5gHjgXGBsbGBc4Hv6ggAAAAAABAIAAAAOAA4AACwAAARUjATMVITUzASM1A4CA/sCA/kCAAUCAA4BA/QBAQAMAQAABAAAAAAQAA4AAPQAAARUjHgEVFAYHDgEjIiYnLgE1MxQWMzI2NTQmIyE1IS4BJy4BNTQ2Nz4BMzIWFx4BFSM0JiMiBhUUFjMyFhcEAOsVFjUwLHE+PnEsMDWAck5OcnJO/gABLAIEATA1NTAscT4+cSwwNYByTk5yck47bisBwEAdQSI1YiQhJCQhJGI1NExMNDRMQAEDASRiNTViJCEkJCEkYjU0TEw0NEwhHwAAAAcAAP/ABAADwAADAAcACwAPABMAGwAjAAATMxUjNzMVIyUzFSM3MxUjJTMVIwMTIRMzEyETAQMhAyMDIQMAgIDAwMABAICAwMDAAQCAgBAQ/QAQIBACgBD9QBADABAgEP2AEAHAQEBAQEBAQEBAAkD+QAHA/oABgPwAAYD+gAFA/sAAAAoAAAAABAADgAADAAcACwAPABMAFwAbAB8AIwAnAAATESERATUhFR0BITUBFSE1IxUhNREhFSElIRUhETUhFQEhFSEhNSEVAAQA/YABAP8AAQD/AED/AAEA/wACgAEA/wABAPyAAQD/AAKAAQADgPyAA4D9wMDAQMDAAgDAwMDA/wDAwMABAMDA/sDAwMAAAAUAAAAABAADgAADAAcACwAPABMAABMhFSEVIRUhESEVIREhFSERIRUhAAQA/AACgP2AAoD9gAQA/AAEAPwAA4CAQID/AIABQID/AIAAAAAABQAAAAAEAAOAAAMABwALAA8AEwAAEyEVIRchFSERIRUhAyEVIREhFSEABAD8AMACgP2AAoD9gMAEAPwABAD8AAOAgECA/wCAAUCA/wCAAAAFAAAAAAQAA4AAAwAHAAsADwATAAATIRUhBSEVIREhFSEBIRUhESEVIQAEAPwAAYACgP2AAoD9gP6ABAD8AAQA/AADgIBAgP8AgAFAgP8AgAAAAAABAD8APwLmAuYALAAAJRQPAQYjIi8BBwYjIi8BJjU0PwEnJjU0PwE2MzIfATc2MzIfARYVFA8BFxYVAuYQThAXFxCoqBAXFhBOEBCoqBAQThAWFxCoqBAXFxBOEBCoqBDDFhBOEBCoqBAQThAWFxCoqBAXFxBOEBCoqBAQThAXFxCoqBAXAAAABgAAAAADJQNuABQAKAA8AE0AVQCCAAABERQHBisBIicmNRE0NzY7ATIXFhUzERQHBisBIicmNRE0NzY7ATIXFhcRFAcGKwEiJyY1ETQ3NjsBMhcWExEhERQXFhcWMyEyNzY3NjUBIScmJyMGBwUVFAcGKwERFAcGIyEiJyY1ESMiJyY9ATQ3NjsBNzY3NjsBMhcWHwEzMhcWFQElBgUIJAgFBgYFCCQIBQaSBQUIJQgFBQUFCCUIBQWSBQUIJQgFBQUFCCUIBQVJ/gAEBAUEAgHbAgQEBAT+gAEAGwQGtQYEAfcGBQg3Ghsm/iUmGxs3CAUFBQUIsSgIFxYXtxcWFgkosAgFBgIS/rcIBQUFBQgBSQgFBgYFCP63CAUFBQUIAUkIBQYGBQj+twgFBQUFCAFJCAUGBgX+WwId/eMNCwoFBQUFCgsNAmZDBQICBVUkCAYF/eMwIiMhIi8CIAUGCCQIBQVgFQ8PDw8VYAUFCAACAAcASQO3Aq8AGgAuAAAJAQYjIi8BJjU0PwEnJjU0PwE2MzIXARYVFAcBFRQHBiMhIicmPQE0NzYzITIXFgFO/vYGBwgFHQYG4eEGBh0FCAcGAQoGBgJpBQUI/dsIBQUFBQgCJQgFBQGF/vYGBhwGCAcG4OEGBwcGHQUF/vUFCAcG/vslCAUFBQUIJQgFBQUFAAAAAQAjAAAD3QNuALMAACUiJyYjIgcGIyInJjU0NzY3Njc2NzY9ATQnJiMhIgcGHQEUFxYXFjMWFxYVFAcGIyInJiMiBwYjIicmNTQ3Njc2NzY3Nj0BETQ1NDU0JzQnJicmJyYnJicmIyInJjU0NzYzMhcWMzI3NjMyFxYVFAcGIwYHBgcGHQEUFxYzITI3Nj0BNCcmJyYnJjU0NzYzMhcWMzI3NjMyFxYVFAcGByIHBgcGFREUFxYXFhcyFxYVFAcGIwPBGTMyGhkyMxkNCAcJCg0MERAKEgEHFf5+FgcBFQkSEw4ODAsHBw4bNTUaGDExGA0HBwkJCwwQDwkSAQIBAgMEBAUIEhENDQoLBwcOGjU1GhgwMRgOBwcJCgwNEBAIFAEHDwGQDgcBFAoXFw8OBwcOGTMyGRkxMRkOBwcKCg0NEBEIFBQJEREODQoLBwcOAAICAgIMCw8RCQkBAQMDBQxE4AwFAwMFDNRRDQYBAgEICBIPDA0CAgICDAwOEQgJAQIDAwUNRSEB0AINDQgIDg4KCgsLBwcDBgEBCAgSDwwNAgICAg0MDxEICAECAQYMULYMBwEBBwy2UAwGAQEGBxYPDA0CAgICDQwPEQgIAQECBg1P/eZEDAYCAgEJCBEPDA0AAAIAAP+3A/8DtwATADkAAAEyFxYVFAcCBwYjIicmNTQ3ATYzARYXFh8BFgcGIyInJicmJyY1FhcWFxYXFjMyNzY3Njc2NzY3NjcDmygeHhq+TDdFSDQ0NQFtISn9+BcmJy8BAkxMe0c2NiEhEBEEExQQEBIRCRcIDxITFRUdHR4eKQO3GxooJDP+mUY0NTRJSTABSx/9sSsfHw0oek1MGhsuLzo6RAMPDgsLCgoWJRsaEREKCwQEAgABAAAAAAAA9evv618PPPUACwQAAAAAANbEBFgAAAAA1sQEWAAA/7cEAQPAAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAD//wQBAAEAAAAAAAAAAAAAAAAAAAAhBAAAAAAAAAAAAAAAAgAAAAQAAAAEAAAABAAAAAQAAMAEAAAABAAAAAQAAAAEAABABAAAAAQAAAAEAAAeBAAAAAQAAAAEAABlBAAAAAQAAMAEAADABAAAgAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAMlAD8DJQAAA74ABwQAACMD/wAAAAAAAAAKABQAHgBMAJQA+AE2AXwBwgI2AnQCvgLoA34EHgSIBMoE8gU0BXAFiAXgBiIGagaSBroG5AcoB+AIKgkcCXgAAQAAACEAtAAKAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format(\'truetype\'); font-weight: normal; font-style: normal;}[class^="w-e-icon-"],[class*=" w-e-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: \'w-e-icon\' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.w-e-icon-close:before { content: "\\f00d";}.w-e-icon-upload2:before { content: "\\e9c6";}.w-e-icon-trash-o:before { content: "\\f014";}.w-e-icon-header:before { content: "\\f1dc";}.w-e-icon-pencil2:before { content: "\\e906";}.w-e-icon-paint-brush:before { content: "\\f1fc";}.w-e-icon-image:before { content: "\\e90d";}.w-e-icon-play:before { content: "\\e912";}.w-e-icon-location:before { content: "\\e947";}.w-e-icon-undo:before { content: "\\e965";}.w-e-icon-redo:before { content: "\\e966";}.w-e-icon-quotes-left:before { content: "\\e977";}.w-e-icon-list-numbered:before { content: "\\e9b9";}.w-e-icon-list2:before { content: "\\e9bb";}.w-e-icon-link:before { content: "\\e9cb";}.w-e-icon-happy:before { content: "\\e9df";}.w-e-icon-bold:before { content: "\\ea62";}.w-e-icon-underline:before { content: "\\ea63";}.w-e-icon-italic:before { content: "\\ea64";}.w-e-icon-strikethrough:before { content: "\\ea65";}.w-e-icon-table2:before { content: "\\ea71";}.w-e-icon-paragraph-left:before { content: "\\ea77";}.w-e-icon-paragraph-center:before { content: "\\ea78";}.w-e-icon-paragraph-right:before { content: "\\ea79";}.w-e-icon-terminal:before { content: "\\f120";}.w-e-icon-page-break:before { content: "\\ea68";}.w-e-icon-cancel-circle:before { content: "\\ea0d";}.w-e-icon-font:before { content: "\\ea5c";}.w-e-icon-text-heigh:before { content: "\\ea5f";}.w-e-toolbar { display: -webkit-box; display: -ms-flexbox; display: flex; padding: 0 5px; /* flex-wrap: wrap; */ /* 单个菜单 */}.w-e-toolbar .w-e-menu { position: relative; text-align: center; padding: 5px 10px; cursor: pointer;}.w-e-toolbar .w-e-menu i { color: #999;}.w-e-toolbar .w-e-menu:hover i { color: #333;}.w-e-toolbar .w-e-active i { color: #1e88e5;}.w-e-toolbar .w-e-active:hover i { color: #1e88e5;}.w-e-text-container .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; /* 为 emotion panel 定制的样式 */ /* 上传图片的 panel 定制样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover { color: #333;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: -webkit-box; display: -ms-flexbox; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px; /* 输入框的样式 */ /* 按钮的样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both;}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block; *display: inline; *zoom: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container { text-align: center;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn { display: inline-block; *display: inline; *zoom: 1; color: #999; cursor: pointer; font-size: 60px; line-height: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover { color: #333;}.w-e-text-container { position: relative;}.w-e-text-container .w-e-progress { position: absolute; background-color: #1e88e5; bottom: 0; left: 0; height: 1px;}.w-e-text { padding: 0 10px; overflow-y: scroll;}.w-e-text p,.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text table,.w-e-text pre { margin: 10px 0; line-height: 1.5;}.w-e-text ul,.w-e-text ol { margin: 10px 0 10px 20px;}.w-e-text blockquote { display: block; border-left: 8px solid #d0e5f2; padding: 5px 10px; margin: 10px 0; line-height: 1.4; font-size: 100%; background-color: #f1f1f1;}.w-e-text code { display: inline-block; *display: inline; *zoom: 1; background-color: #f1f1f1; border-radius: 3px; padding: 3px 5px; margin: 0 3px;}.w-e-text pre code { display: block;}.w-e-text table { border-top: 1px solid #ccc; border-left: 1px solid #ccc;}.w-e-text table td,.w-e-text table th { border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px;}.w-e-text table th { border-bottom: 2px solid #ccc; text-align: center;}.w-e-text:focus { outline: none;}.w-e-text img { cursor: pointer;}.w-e-text img:hover { box-shadow: 0 0 5px #333;}',te=document.createElement("style");te.type="text/css",te.innerHTML=ee,document.getElementsByTagName("HEAD").item(0).appendChild(te);var ne=window.wangEditor||Z;return ne}))},ac69:function(e,t,n){"use strict";var i=n("2e25"),o=n.n(i);o.a},c6fe:function(e,t,n){"use strict";var i=n("11cc"),o=n.n(i);o.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22347577"],{"03c1":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[a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,tblheight:n-120,metaName:"pricecatinfo_info",modelName:"pricecat",packageName:"product",isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec}})]}}])})},o=[],r=a("7e1e"),i=a("06d3"),s=a("923a"),c=a("391e"),u=a("a59a"),l={name:"productcat_page",data:function(){return{currentRow:null,tags:""}},components:{BizTable:i["a"],PageSpace:c["a"]},methods:{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){var t=this;if("makestragetys"==e){var a=this.$refs.bt.currentSels;0==a.length?this.$Modal.warning({title:"提示",content:"请选择要参与生成定价策略的定价类型."}):Object(r["n"])("/web/product/pricecatCtl/buildPriceStrategy",{pricetypes:a}).then((function(e){var a=e.data;0==a.status?t.$Message.success("定价策略生成成功."):t.$Message.error("定价策略生成失败.")}))}},formatCol:function(e,t,a){if(console.log(t,".........................."),"options"==t){this.currentRow=e,this.tags=e["options"];var n='<Tags :currow=\'currentRow\' v-model="tags" :ishideadd="true" @change="ch"></Tags>',o=Object.assign({},this.$data),r=u["default"].extend({components:{Tags:s["a"]},template:"<div>".concat(n,"</div>"),data:function(){return o},methods:{testok:function(){console.log("test.....................................")},ch:function(e,t){console.log(e,t)}}}),i=(new r).$mount().$el;return i}return e[t]}}},f=l,d=a("9ca4"),h=Object(d["a"])(f,n,o,!1,null,null,null);t["default"]=h.exports},"391e":function(e,t,a){"use strict";var n=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)},o=[],r=a("9ee1"),i=r["a"],s=a("9ca4"),c=Object(s["a"])(i,n,o,!1,null,null,null);t["a"]=c.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"),n=a.get()[0],o=window.innerHeight-n.offsetTop-t.advalue;t.frameHeight=o,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24a41303"],{"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=[],i=n("9ee1"),o=i["a"],s=n("9ca4"),c=Object(s["a"])(o,a,r,!1,null,null,null);t["a"]=c.exports},6491:function(e,t,n){"use strict";var a=n("e46b"),r=n("eafa"),i=n("7c0a"),o="startsWith",s=""[o];a(a.P+a.F*n("bc96")(o),"String",{startsWith:function(e){var t=i(this,e,o),n=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),a=String(e);return s?s.call(t,a,n):t.slice(n,n+a.length)===a}})},7104: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:"app_info",modelName:"app",packageName:"common",tblheight:a-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})},r=[],i=(n("6491"),n("6d57"),n("9a33"),n("06d3")),o=n("391e"),s=n("60b7"),c={name:"appinfo_page",data:function(){return{}},components:{PageSpace:o["a"],BizTable: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){var n=this;"func"==e&&this.$router.push({name:"functree_info",query:{appkey:t.appkey}}),"frontroute"==e&&Object(s["b"])(t.appkey).then((function(e){var t=e.data;0==t.status?(n.$Message.success("当前操作已完成"),n.$refs.bt.fetchData()):n.$Message.error(t.msg)}))},validmethod:function(e,t,n){if("functionJSON"==e.field)try{var a=JSON.parse(t);console.log(a)}catch(o){return n(new Error(o))}if("hosts"==e.field){var r=t.split(",");0==r.length&&n(new Error("多个域名需要以逗号分隔"))}if("paths"==e.field){var i=t.split(",");0==i.length?n(new Error("多个路径需要以逗号分隔")):i.forEach((function(e){if(!e.startsWith("/"))return n(new Error("路径必须以/开始"))}))}return"backport"==e.field&&isNaN(t)?n(new Error("请输入数字")):n()},formatCol:function(e,t,n){return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},u=c,f=n("9ca4"),l=Object(f["a"])(u,a,r,!1,null,null,null);t["default"]=l.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-25d9ab36"],{"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"),r=i["a"],u=n("9ca4"),c=Object(u["a"])(r,a,o,!1,null,null,null);t["a"]=c.exports},"6cb8":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:"company",metaName:"company_info",packageName:"common",isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec}})]}}])})],1)},o=[],i=n("06d3"),r=n("391e"),u={name:"userinfo_page",data:function(){return{isshowref:!1,companyid:-1}},components:{BizTable:i["a"],PageSpace:r["a"]},mounted:function(){},methods:{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){},onnew:function(){},onedit:function(){},formatCol:function(e,t,n){return e[t]}}},c=u,s=n("9ca4"),f=Object(s["a"])(c,a,o,!1,null,null,null);t["default"]=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
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-291faf05"],{"391e":function(e,t,n){"use strict";var o=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=[],i=n("9ee1"),a=i["a"],s=n("9ca4"),u=Object(s["a"])(a,o,r,!1,null,null,null);t["a"]=u.exports},8571:function(e,t,n){!function(t,o){e.exports=o(n("a59a"),n("f348"))}(0,(function(e,t){return r={},n.m=o=[function(e,t,n){"use strict";function o(e,t,n,o,r,i,a,s){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=u):r&&(u=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(e,t){return u.call(t),c(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:l}}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.r(t);var o=n(2),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a(n(27));var o=a(n(21)),r=a(n(38)),i=n(39);function a(e){return e&&e.__esModule?e:{default:e}}t.default={name:"JsonViewer",components:{JsonBox:o.default},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:"jv-light"}},provide:function(){return{expandDepth:this.expandDepth}},data:function(){return{copied:!1,expandableCode:!1,expandCode:this.expanded}},watch:{value:function(){this.onResized()}},computed:{jvClass:function(){return"jv-container "+this.theme+(this.boxed?" boxed":"")},copyText:function(){var e=this.copyable,t=e.copyText;return{copyText:t||"copy",copiedText:e.copiedText||"copied!",timeout:e.timeout||2e3}}},mounted:function(){var e=this;this.debounceResized=(0,i.debounce)(this.debResized.bind(this),200),this.boxed&&this.$refs.jsonBox&&(this.onResized(),this.$refs.jsonBox.$el.addEventListener("resized",this.onResized,!0)),this.copyable&&new r.default(this.$refs.clip,{text:function(){return JSON.stringify(e.value,null,2)}}).on("success",(function(t){e.onCopied(t)}))},methods:{onResized:function(){this.debounceResized()},debResized:function(){var e=this;this.$nextTick((function(){e.$refs.jsonBox&&(250<=e.$refs.jsonBox.$el.clientHeight?e.expandableCode=!0:e.expandableCode=!1)}))},onCopied:function(e){var t=this;this.copied||(this.copied=!0,setTimeout((function(){t.copied=!1}),this.copyText.timeout),this.$emit("copied",e))},toggleExpandCode:function(){this.expandCode=!this.expandCode}}}},function(e,t,n){"use strict";n.r(t);var o=n(4),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=d(n(28)),i=d(n(29)),a=d(n(30)),s=d(n(31)),u=d(n(32)),l=d(n(33)),c=d(n(34));function d(e){return e&&e.__esModule?e:{default:e}}t.default={name:"JsonBox",inject:["expandDepth"],props:{value:{type:[Object,Array,String,Number,Boolean,Function],default:null},keyName:{type:String,default:""},sort:Boolean,depth:{type:Number,default:0}},data:function(){return{expand:!0}},mounted:function(){this.expand=!(this.depth>=this.expandDepth)},methods:{toggle:function(){this.expand=!this.expand;try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=this,n=[],d=void 0;null===this.value||void 0===this.value?d=i.default:Array.isArray(this.value)?d=l.default:"object"===o(this.value)?d=u.default:"number"==typeof this.value?d=a.default:"string"==typeof this.value?d=r.default:"boolean"==typeof this.value?d=s.default:"function"==typeof this.value&&(d=c.default);var f=this.keyName&&this.value&&(Array.isArray(this.value)||"object"===o(this.value));return f&&n.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),this.keyName&&n.push(e("span",{class:{"jv-key":!0},domProps:{innerText:this.keyName+":"}})),n.push(e(d,{class:{"jv-push":!0},props:{jsonValue:this.value,keyName:this.keyName,sort:this.sort,depth:this.depth,expand:this.expand},on:{"update:expand":function(e){t.expand=e}}})),e("div",{class:{"jv-node":!0,toggle:f}},n)}}},function(e,t,n){"use strict";n.r(t);var o=n(6),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=/^\w+:\/\//;t.default={name:"JsonString",functional:!0,props:{jsonValue:{type:String,required:!0}},render:function(e,t){var n=t.props.jsonValue,i=void 0;return i=r.test(n)?{innerHTML:'"'+(n='<a href="'+n+'" target="_blank" style="color: #0366d6;">'+n+"</a>").toString()+'"'}:{innerText:'"'+n.toString()+'"'},e("span",{class:{"jv-item":!0,"jv-string":!0},domProps:o({},i)})}}},function(e,t,n){"use strict";n.r(t);var o=n(8),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonUndefined",functional:!0,props:{jsonValue:{type:Object,default:null}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-undefined":!0},domProps:{innerText:null===t.props.jsonValue?"null":"undefined"}})}}},function(e,t,n){"use strict";n.r(t);var o=n(10),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonNumber",functional:!0,props:{jsonValue:{type:Number,required:!0}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-number":!0},domProps:{innerText:t.props.jsonValue.toString()}})}}},function(e,t,n){"use strict";n.r(t);var o=n(12),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonBoolean",functional:!0,props:{jsonValue:Boolean},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-boolean":!0},domProps:{innerText:t.props.jsonValue.toString()}})}}},function(e,t,n){"use strict";n.r(t);var o=n(14),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(21),i=(o=r)&&o.__esModule?o:{default:o};t.default={name:"JsonObject",data:function(){return{value:{}}},props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,sort:Boolean},computed:{ordered:function(){var e=this;if(!this.sort)return this.value;var t={};return Object.keys(this.value).sort().forEach((function(n){t[n]=e.value[n]})),t}},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e){var t=this;setTimeout((function(){t.value=e}),0)},toggle:function(){this.$emit("update:expand",!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=[];if(this.keyName||t.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),t.push(e("span",{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:"{"}})),this.expand)for(var n in this.ordered)if(this.ordered.hasOwnProperty(n)){var o=this.ordered[n];t.push(e(i.default,{key:n,style:{display:this.expand?void 0:"none"},props:{sort:this.sort,keyName:n,depth:this.depth+1,value:o}}))}return!this.expand&&Object.keys(this.value).length&&t.push(e("span",{style:{display:this.expand?"none":void 0},class:{"jv-ellipsis":!0},on:{click:this.toggle},attrs:{title:"click to reveal object content (keys: "+Object.keys(this.ordered).join(", ")+")"},domProps:{innerText:"..."}})),t.push(e("span",{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:"}"}})),e("span",t)}}},function(e,t,n){"use strict";n.r(t);var o=n(16),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(21),i=(o=r)&&o.__esModule?o:{default:o};t.default={name:"JsonArray",data:function(){return{value:[]}},props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e,t){var n=this,o=1<arguments.length&&void 0!==t?t:0;0===o&&(this.value=[]),setTimeout((function(){e.length>o&&(n.value.push(e[o]),n.setValue(e,o+1))}),0)},toggle:function(){this.$emit("update:expand",!this.expand);try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=this,n=[];return this.keyName||n.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),n.push(e("span",{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:"["}})),this.expand&&this.value.forEach((function(o,r){n.push(e(i.default,{key:r,style:{display:t.expand?void 0:"none"},props:{sort:t.sort,depth:t.depth+1,value:o}}))})),!this.expand&&this.value.length&&n.push(e("span",{style:{display:void 0},class:{"jv-ellipsis":!0},on:{click:this.toggle},attrs:{title:"click to reveal "+this.value.length+" hidden items"},domProps:{innerText:"..."}})),n.push(e("span",{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:"]"}})),e("span",n)}}},function(e,t,n){"use strict";n.r(t);var o=n(18),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonFunction",functional:!0,props:{jsonValue:{type:Function,required:!0}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-function":!0},attrs:{title:t.props.jsonValue.toString()},domProps:{innerHTML:"&lt;function&gt;"}})}}},function(e,t,n){var o=n(36);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0};n(24)(o,r),o.locals&&(e.exports=o.locals)},function(e,t,n){var o=n(41);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0};n(24)(o,r),o.locals&&(e.exports=o.locals)},function(e,t,n){"use strict";n.r(t);var o=n(3);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n(35);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/json-box.vue",t.default=a.exports},function(e,t,n){"use strict";function o(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.jvClass},[e.copyable?n("div",{staticClass:"jv-tooltip"},[n("span",{ref:"clip",staticClass:"jv-button",class:{copied:e.copied}},[e._t("copy",[e._v("\n "+e._s(e.copied?e.copyText.copiedText:e.copyText.copyText)+"\n ")],{copied:e.copied})],2)]):e._e(),e._v(" "),n("div",{staticClass:"jv-code",class:{open:e.expandCode,boxed:e.boxed}},[n("json-box",{ref:"jsonBox",attrs:{value:e.value,sort:e.sort}})],1),e._v(" "),e.expandableCode&&e.boxed?n("div",{staticClass:"jv-more",on:{click:e.toggleExpandCode}},[n("span",{staticClass:"jv-toggle",class:{open:!!e.expandCode}})]):e._e()])}var r=[];o._withStripped=!0,n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}))},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=function(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}(o),i=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot).concat(e," */")}));return[n].concat(i).concat([r]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(o[i]=!0)}for(var a=0;a<e.length;a++){var s=e[a];null!=s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="(".concat(s[2],") and (").concat(n,")")),t.push(s))}},t}},function(e,t,n){var o,r,i,a={},s=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),u=(i={},function(e){if(void 0===i[e]){var t=function(e){return document.querySelector(e)}.call(this,e);if(t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}i[e]=t}return i[e]}),l=null,c=0,d=[],f=n(37);function p(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=a[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(g(o.parts[i],t))}else{var s=[];for(i=0;i<o.parts.length;i++)s.push(g(o.parts[i],t));a[o.id]={id:o.id,refs:1,parts:s}}}}function v(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],a=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};o[a]?o[a].parts.push(s):n.push(o[a]={id:a,parts:[s]})}return n}function h(e,t){var n=u(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=d[d.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=u(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,r)}}function b(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);0<=t&&d.splice(t,1)}function j(e){var t=document.createElement("style");return e.attrs.type="text/css",m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function g(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l=l||j(t),o=_.bind(null,n,a,!1),r=_.bind(null,n,a,!0)}else r=e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=f(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),function(){b(n),n.href&&URL.revokeObjectURL(n.href)}):(n=j(t),o=function(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),function(){b(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=v(e,t);return p(n,t),function(e){for(var o=[],r=0;r<n.length;r++){var i=n[r];(s=a[i.id]).refs--,o.push(s)}for(e&&p(v(e,t),t),r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete a[s.id]}}}};var y,x=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=x(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(26),i=(o=r)&&o.__esModule?o:{default:o};t.default=Object.assign(i.default,{install:function(e){e.component("JsonViewer",i.default)}})},function(e,t,n){"use strict";n.r(t);var o=n(22),r=n(1);for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n(40);var a=n(0),s=Object(a.a)(r.default,o.a,o.b,!1,null,null,null);s.options.__file="lib/json-viewer.vue",t.default=s.exports},function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t);var o=n(5);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-string.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(7);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-undefined.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(9);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-number.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(11);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-boolean.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(13);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-object.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(15);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-array.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(17);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-function.vue",t.default=a.exports},function(e,t,n){"use strict";var o=n(19);n.n(o).a},function(e,t,n){(e.exports=n(23)(!1)).push([e.i,".jv-node{position:relative}.jv-node:after{content:','}.jv-node:last-of-type:after{content:''}.jv-node.toggle{margin-left:13px !important}.jv-node .jv-node{margin-left:25px}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t){var n=Date.now(),o=void 0;return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];Date.now()-n<t&&o&&clearTimeout(o),o=setTimeout((function(){e.apply(void 0,i)}),t),n=Date.now()}}},function(e,t,n){"use strict";var o=n(20);n.n(o).a},function(e,t,n){t=e.exports=n(23)(!1);var o=n(42)(n(43));t.push([e.i,".jv-container{box-sizing:border-box;position:relative}.jv-container.boxed{border:1px solid #eee;border-radius:6px}.jv-container.boxed:hover{box-shadow:0 2px 7px rgba(0,0,0,0.15);border-color:transparent;position:relative}.jv-container.jv-light{background:#fff;white-space:nowrap;color:#525252;font-size:14px;font-family:Consolas, Menlo, Courier, monospace}.jv-container.jv-light .jv-ellipsis{color:#999;background-color:#eee;display:inline-block;line-height:0.9;font-size:0.9em;padding:0px 4px 2px 4px;margin:0 4px;border-radius:3px;vertical-align:2px;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none}.jv-container.jv-light .jv-button{color:#49b3ff}.jv-container.jv-light .jv-key{color:#111111;margin-right:4px}.jv-container.jv-light .jv-item.jv-array{color:#111111}.jv-container.jv-light .jv-item.jv-boolean{color:#fc1e70}.jv-container.jv-light .jv-item.jv-function{color:#067bca}.jv-container.jv-light .jv-item.jv-number{color:#fc1e70}.jv-container.jv-light .jv-item.jv-object{color:#111111}.jv-container.jv-light .jv-item.jv-undefined{color:#e08331}.jv-container.jv-light .jv-item.jv-string{color:#42b983;word-break:break-word;white-space:normal}.jv-container.jv-light .jv-code .jv-toggle:before{padding:0px 2px;border-radius:2px}.jv-container.jv-light .jv-code .jv-toggle:hover:before{background:#eee}.jv-container .jv-code{overflow:hidden;padding:20px}.jv-container .jv-code.boxed{max-height:300px}.jv-container .jv-code.open{max-height:initial !important;overflow:visible;overflow-x:auto;padding-bottom:45px}.jv-container .jv-toggle{background-image:url("+o+');background-repeat:no-repeat;background-size:contain;background-position:center center;cursor:pointer;width:10px;height:10px;margin-right:2px;display:inline-block;-webkit-transition:-webkit-transform 0.1s;transition:-webkit-transform 0.1s;transition:transform 0.1s;transition:transform 0.1s, -webkit-transform 0.1s}.jv-container .jv-toggle.open{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more{position:absolute;z-index:1;bottom:0;left:0;right:0;height:40px;width:100%;text-align:center;cursor:pointer}.jv-container .jv-more .jv-toggle{position:relative;top:40%;z-index:2;color:#888;-webkit-transition:all 0.1s;transition:all 0.1s;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more .jv-toggle.open{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.jv-container .jv-more:after{content:"";width:100%;height:100%;position:absolute;bottom:0;left:0;z-index:1;background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);-webkit-transition:all 0.1s;transition:all 0.1s}.jv-container .jv-more:hover .jv-toggle{top:50%;color:#111}.jv-container .jv-more:hover:after{background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%)}.jv-container .jv-button{position:relative;cursor:pointer;display:inline-block;padding:5px;z-index:5}.jv-container .jv-button.copied{opacity:0.4;cursor:default}.jv-container .jv-tooltip{position:absolute;right:15px;top:10px}.jv-container .j-icon{font-size:12px}\n',""])},function(e,t,n){"use strict";e.exports=function(e,t){return"string"!=typeof(e=e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)||t?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB3aWR0aD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIAo8cG9seWdvbiBwb2ludHM9IjAsMCA4LDggMCwxNiIKc3R5bGU9ImZpbGw6IzY2NjtzdHJva2U6cHVycGxlO3N0cm9rZS13aWR0aDowIiAvPgo8L3N2Zz4="}],n.c=r,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=25);function n(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var o,r}))},"8b6c":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("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"pushfail_info",modelName:"push",packageName:"common",tblheight:o-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),n("Drawer",{attrs:{title:"数据详情",closable:!1,width:"600"},model:{value:e.info_model,callback:function(t){e.info_model=t},expression:"info_model"}},[n("json-viewer",{attrs:{value:e.jsonData,copyable:"","expand-depth":3}})],1)]}}])})},r=[],i=n("06d3"),a=n("391e"),s=(n("60b7"),n("8571")),u=n.n(s),l=n("7e1e"),c={name:"failinfo_page",data:function(){return{info_model:!1,jsonData:{}}},components:{PageSpace:a["a"],BizTable:i["a"],JsonViewer:u.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){var n=this;"info"==e?(this.info_model=!0,this.jsonData=t):"repush"==e&&Object(l["n"])("/web/common/pushCtl/repush",{id:t.id}).then((function(e){var t=e.data;1==t.status?n.$Message.success("推送成功."):n.$Message.error("推送失败.")}))},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]}}},d=c,f=n("9ca4"),p=Object(f["a"])(d,o,r,!1,null,null,null);t["default"]=p.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"),o=n.get()[0],r=window.innerHeight-o.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-2aeda6fa"],{"0995":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[a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,tblheight:n-120,metaName:"pricestrategyt_info",modelName:"pricestrategy",packageName:"product",isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd}})]}}])})},o=[],i=(a("7e1e"),a("06d3")),r=a("923a"),u=a("391e"),s=a("a59a"),c={name:"productcat_page",data:function(){return{currentRow:null,tags:""}},components:{BizTable:i["a"],PageSpace:u["a"]},methods:{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)},formatCol:function(e,t,a){if(console.log(t,".........................."),"optionunion"==t){this.currentRow=e,this.tags=e["optionunion"];var n='<Tags :currow=\'currentRow\' v-model="tags" :ishideadd="true" @change="ch"></Tags>',o=Object.assign({},this.$data),i=s["default"].extend({components:{Tags:r["a"]},template:"<div>".concat(n,"</div>"),data:function(){return o},methods:{testok:function(){console.log("test.....................................")},ch:function(e,t){console.log(e,t)}}}),u=(new i).$mount().$el;return u}return e[t]}}},l=c,f=a("9ca4"),d=Object(f["a"])(l,n,o,!1,null,null,null);t["default"]=d.exports},"391e":function(e,t,a){"use strict";var n=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)},o=[],i=a("9ee1"),r=i["a"],u=a("9ca4"),s=Object(u["a"])(r,n,o,!1,null,null,null);t["a"]=s.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"),n=a.get()[0],o=window.innerHeight-n.offsetTop-t.advalue;t.frameHeight=o,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b3066fa","chunk-2d0d61ef"],{"70cc":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"user_info",packageName:"auth",tblheight:e.tblheight,isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec,oninitbtn:e.oninitbtn}})],1)},n=[],a=(r("cc57"),r("163d"),r("06d3")),s=r("7e1e"),i={name:"userinfo_page",data:function(){return{}},components:{BizTable:a["a"]},props:{tblheight:Number,beforesave:{type:Function,default:function(){return function(e,t,r){return r(t)}}},beforedit:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}},beforeadd:{type:Function,default:function(){return function(e,t){return t({value:!0,message:null})}}}},methods:{onexec:function(e,t){var r=this;"enablebtn"==e&&Object(s["n"])("/web/auth/userCtl/allowOrNotToOne",{curid:t.id,isEnabled:t.isEnabled}).then((function(e){var t=e.data;0==t.status?(r.$refs.bt.fetchData(),r.$Message.success("当前操作已经成功完成.")):r.$Message.error("当前操作未完成.")}))},oninitbtn:function(e,t){"enablebtn"==e.key&&(t.isEnabled?e.title="停用":e.title="启用")},searchWhere:function(e){this.$refs.bt.initWhereData=e,this.$refs.bt.fetchData()},setHeight:function(e){this.$refs.bt.setHeight(e)},onnew:function(){this.$refs.bt.setFormCtlVisable("userName",!0)},onedit:function(){this.$refs.bt.setFormCtlVisable("userName",!1)},formatCol:function(e,t,r){if("isEnabled"==t)return e["isEnabled"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("isAllocated"==t)return e["isAllocated"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("roleName"==t){var o=e.Roles.map((function(e){return e.name})).join(",");return e.roles=e.Roles.map((function(e){return e.id})),"<span>".concat(o,"</span>")}return"isAdmin"==t||"isSuper"==t?"<span>".concat(e[t]?"是":"否","</span>"):"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},l=i,c=r("9ca4"),f=Object(c["a"])(l,o,n,!1,null,null,null);t["default"]=f.exports},d610:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[r("SplitPanel",[r("OrgEditor",{ref:"orgtree",attrs:{slot:"left",initData:e.initData,metainfo:e.metainfo},on:{controlctl:e.controlctl,drawaction:e.drawaction,modisave:e.orgsave,deletenode:e.orgsave,onselnode:e.onselnode},slot:"left"}),r("UserInfo",{ref:"userinfo",attrs:{slot:"right",tblheight:o-60,beforesave:e.beforesave,beforedit:e.beforedit,beforeadd:e.beforeadd},slot:"right"})],1)]}}])})},n=[],a=r("efa5"),s=a["a"],i=r("9ca4"),l=Object(i["a"])(s,o,n,!1,null,null,null);t["default"]=l.exports},efa5:function(e,t,r){"use strict";(function(e){r("9a33"),r("60b7");var o=r("391e"),n=r("7e1e"),a=r("302e"),s=r("832e"),i=r("70cc");r("f121");t["a"]={name:"treeinfo_page",props:{},components:{OrgEditor:a["a"],SplitPanel:s["a"],UserInfo:i["default"],PageSpace:o["a"]},data:function(){return{metainfo:{name:"节点编辑",main:[{title:"授权信息",key:"baseinfo",cols:2,ctls:[{type:"switch",label:"是否岗位",prop:"isPosition",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:""},{type:"switch",label:"是否负责人",prop:"isMain",opentext:"是",closetext:"否",trurcolor:"",falsecolor:"",placeHolder:"",style:"",isHide:!0},{type:"dreftag",label:"监控",prop:"orgtag",refModel:"common.company",isMulti:!0,labelField:"orgpath",valueField:"orgpath",refMethod:"getWatchOrgNodes",placeHolder:"请选择监控节点",style:"",canclose:!0,rules:[]},{type:"model-select",refModel:"auth.role",isMulti:!0,label:"角色",prop:"roles",labelField:"name",valueField:"id",style:{"margin-left":"10px",width:"165px"},isHide:!0}]}],lists:null}}},mounted:function(){},methods:{onselnode:function(e,t,r){this.$refs.userinfo.searchWhere({opath:r.code})},orgsave:function(e,t,r){var o=this;Object(n["n"])("/web/common/companyCtl/setOrgs",{orgJson:e,curdata:t,olddata:r}).then((function(e){var r=e.data;if(console.log("ddddddddddddddddd",r),0==r.status){var n=r.data.orgJson;console.log("save org...............................",n),o.$refs.orgtree.treedata=n,o.$refs.orgtree.refreshTree(),o.$Message.success("当前操作成功完成"),o.$refs.userinfo.searchWhere({opath:t.code})}}))},beforeadd:function(e,t){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition?t({value:!0,message:null}):t({value:!1,message:"请选择岗位节点"})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,r){return this.$refs.orgtree.currentData&&this.$refs.orgtree.currentData.isPosition&&(t.opath=this.$refs.orgtree.currentData.orgpath+"/"+t.userName,t.ptags=this.$refs.orgtree.currentData.orgtag,t.roles=this.$refs.orgtree.currentData.roles?this.$refs.orgtree.currentData.roles:[]),console.log("before.save",e,t),r(t)},setHeight:function(){var t=e("#orgdiv"),r=t.get()[0],o=window.innerHeight-r.offsetTop;t.css("height",o+"px"),this.$refs.userinfo.setHeight(o-120)},drawaction:function(e,t){t.formModel.isPosition?(t.setCtlVisable("isMain",!0),t.setCtlVisable("orgtag",!0),t.setCtlVisable("roles",!0)):(t.setCtlVisable("isMain",!1),t.setCtlVisable("orgtag",!1),t.setCtlVisable("roles",!1))},controlctl:function(e,t,r){if("isMain"==t){var o=this.$refs.orgtree.currentNode,n=this.$refs.orgtree.findParentByNode(o),a=r.formModel;if(a.orgtag&&a.orgtag.indexOf(n.code)<0){var s=a.orgtag.split(",").push(n.code).join(",");a.orgtag=s}else a.orgtag=n.code}"isPosition"==t&&(e?(r.setCtlVisable("isMain",!0),r.setCtlVisable("orgtag",!0),r.setCtlVisable("roles",!0)):(r.setCtlVisable("isMain",!1),r.setCtlVisable("orgtag",!1),r.setCtlVisable("roles",!1)))},initData:function(e){Object(n["h"])().then((function(t){var r=t.data;if(0!=r.status)throw new Error("获取组织数据出错");var o=r.data.orgJson;e(o)}))}}}}).call(this,r("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c359864"],{"0eb4":function(t,e,n){},4740:function(t,e,n){t.exports=n.p+"img/error-500.a371eabc.svg"},"88b2":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("error-content",{attrs:{code:"500",desc:"Oh~~鬼知道服务器经历了什么~",src:t.src}})},c=[],o=n("4740"),s=n.n(o),a=n("9454"),i={name:"error_500",components:{errorContent:a["a"]},data:function(){return{src:s.a}}},u=i,l=n("9ca4"),d=Object(l["a"])(u,r,c,!1,null,null,null);e["default"]=d.exports},9454:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"error-page"},[n("div",{staticClass:"content-con"},[n("img",{attrs:{src:t.src,alt:t.code}}),n("div",{staticClass:"text-con"},[n("h4",[t._v(t._s(t.code))]),n("h5",[t._v(t._s(t.desc))])]),n("back-btn-group",{staticClass:"back-btn-group"})],1)])},c=[],o=(n("0eb4"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backHome}},[t._v("返回首页")]),n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backPrev}},[t._v("返回上一页("+t._s(t.second)+"s)")])],1)}),s=[],a=(n("f548"),{name:"backBtnGroup",data:function(){return{second:5,timer:null}},methods:{backHome:function(){this.$router.replace({name:this.$config.homeName})},backPrev:function(){this.$router.go(-1)}},mounted:function(){var t=this;this.timer=setInterval((function(){0===t.second?t.backPrev():t.second--}),1e3)},beforeDestroy:function(){clearInterval(this.timer)}}),i=a,u=n("9ca4"),l=Object(u["a"])(i,o,s,!1,null,null,null),d=l.exports,p={name:"error_content",components:{backBtnGroup:d},props:{code:String,desc:String,src:String}},b=p,f=Object(u["a"])(b,r,c,!1,null,null,null);e["a"]=f.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d61ef"],{"70cc":function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"user_info",packageName:"auth",tblheight:e.tblheight,isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onnew:e.onnew,onedit:e.onedit,onexec:e.onexec,oninitbtn:e.oninitbtn}})],1)},o=[],r=(t("cc57"),t("163d"),t("06d3")),s=t("7e1e"),i={name:"userinfo_page",data:function(){return{}},components:{BizTable:r["a"]},props:{tblheight:Number,beforesave:{type:Function,default:function(){return function(e,n,t){return t(n)}}},beforedit:{type:Function,default:function(){return function(e,n){return n({value:!0,message:null})}}},beforeadd:{type:Function,default:function(){return function(e,n){return n({value:!0,message:null})}}}},methods:{onexec:function(e,n){var t=this;"enablebtn"==e&&Object(s["n"])("/web/auth/userCtl/allowOrNotToOne",{curid:n.id,isEnabled:n.isEnabled}).then((function(e){var n=e.data;0==n.status?(t.$refs.bt.fetchData(),t.$Message.success("当前操作已经成功完成.")):t.$Message.error("当前操作未完成.")}))},oninitbtn:function(e,n){"enablebtn"==e.key&&(n.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,n,t){if("isEnabled"==n)return e["isEnabled"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("isAllocated"==n)return e["isAllocated"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>';if("roleName"==n){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>")}return"isAdmin"==n||"isSuper"==n?"<span>".concat(e[n]?"是":"否","</span>"):"created_at"==n?"<span>".concat(new Date(e[n]).toLocaleString(),"</span>"):e[n]}}},u=i,c=t("9ca4"),l=Object(c["a"])(u,a,o,!1,null,null,null);n["default"]=l.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e68e0"],{"98f1":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("div",[a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"pathmap_info",modelName:"pathtomethod",packageName:"common",isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd}})],1)},o=[],r=a("06d3"),u={name:"routeinfo_page",data:function(){return{}},components:{BizTable:r["a"]},methods:{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)},formatCol:function(e,t,a){return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},f=u,l=a("9ca4"),c=Object(l["a"])(f,n,o,!1,null,null,null);t["default"]=c.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0efc5d"],{"9a10":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("div",[a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"route_info",packageName:"common",isMulti:"",savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd}})],1)},o=[],r=a("06d3"),u={name:"routeinfo_page",data:function(){return{}},components:{BizTable:r["a"]},methods:{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)},formatCol:function(e,t,a){return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},f=u,c=a("9ca4"),i=Object(c["a"])(f,n,o,!1,null,null,null);t["default"]=i.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d20828f"],{a439:function(n,t,e){"use strict";e.r(t);var a=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",[n._v("\n autologin\n")])},o=[],u=e("7e1e"),c={name:"autologin_page",data:function(){return{}},mounted:function(){Object(u["b"])().then((function(n){var t=n.data;if(0==t.status){var e=t.data.openurl;location.href=e}else alert(t.msg)}))},methods:{}},l=c,r=e("9ca4"),i=Object(r["a"])(l,a,o,!1,null,null,null);t["default"]=i.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3385141a"],{"0eb4":function(t,e,n){},"35f5":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("error-content",{attrs:{code:"404",desc:"Oh~~您的页面好像飞走了~",src:t.src}})},c=[],o=n("c436"),s=n.n(o),a=n("9454"),i={name:"error_404",components:{errorContent:a["a"]},data:function(){return{src:s.a}}},u=i,l=n("9ca4"),d=Object(l["a"])(u,r,c,!1,null,null,null);e["default"]=d.exports},9454:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"error-page"},[n("div",{staticClass:"content-con"},[n("img",{attrs:{src:t.src,alt:t.code}}),n("div",{staticClass:"text-con"},[n("h4",[t._v(t._s(t.code))]),n("h5",[t._v(t._s(t.desc))])]),n("back-btn-group",{staticClass:"back-btn-group"})],1)])},c=[],o=(n("0eb4"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backHome}},[t._v("返回首页")]),n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backPrev}},[t._v("返回上一页("+t._s(t.second)+"s)")])],1)}),s=[],a=(n("f548"),{name:"backBtnGroup",data:function(){return{second:5,timer:null}},methods:{backHome:function(){this.$router.replace({name:this.$config.homeName})},backPrev:function(){this.$router.go(-1)}},mounted:function(){var t=this;this.timer=setInterval((function(){0===t.second?t.backPrev():t.second--}),1e3)},beforeDestroy:function(){clearInterval(this.timer)}}),i=a,u=n("9ca4"),l=Object(u["a"])(i,o,s,!1,null,null,null),d=l.exports,f={name:"error_content",components:{backBtnGroup:d},props:{code:String,desc:String,src:String}},p=f,m=Object(u["a"])(p,r,c,!1,null,null,null);e["a"]=m.exports},c436:function(t,e,n){t.exports=n.p+"img/error-404.94756dcf.svg"}}]);
\ 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-3a0bcea0"],{"391e":function(e,t,n){"use strict";var o=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=[],i=n("9ee1"),a=i["a"],s=n("9ca4"),u=Object(s["a"])(a,o,r,!1,null,null,null);t["a"]=u.exports},"7c39":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("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"log_info",modelName:"log",packageName:"log",tblheight:o-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),n("Drawer",{attrs:{title:"数据详情",closable:!1,width:"600"},model:{value:e.info_model,callback:function(t){e.info_model=t},expression:"info_model"}},[n("json-viewer",{attrs:{value:e.jsonData,copyable:"","expand-depth":3}})],1),n("Modal",{attrs:{title:"清理日志",width:"700"},on:{"on-ok":e.cleanLog},model:{value:e.showCleanModel,callback:function(t){e.showCleanModel=t},expression:"showCleanModel"}},[n("RadioGroup",{attrs:{vertical:""},model:{value:e.cleanTime,callback:function(t){e.cleanTime=t},expression:"cleanTime"}},[n("Radio",{attrs:{label:"清理半年前",size:"large"}}),n("Radio",{attrs:{label:"清理一年前",size:"large"}})],1)],1)]}}])})},r=[],i=n("06d3"),a=n("391e"),s=(n("60b7"),n("8571")),u=n.n(s),l={name:"appinfo_page",data:function(){return{info_model:!1,jsonData:{},showCleanModel:!1,cleanTime:""}},components:{PageSpace:a["a"],BizTable:i["a"],JsonViewer:u.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){"info"==e&&(this.info_model=!0,this.jsonData=t.info),"clean"===e&&(this.showCleanModel=!0)},validmethod:function(e,t,n){return n()},formatCol:function(e,t,n){return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):"status"==t?"SUCCESS"===e[t]?'<span style="color:green">'.concat(e[t],"</span>"):'<span style="color:RED">'.concat(e[t],"</span>"):e[t]},cleanLog:function(){this.cleanTime?(alert("待开发"),console.log(this.cleanTime)):this.$Message.error("请选择清除时间")}}},c=l,d=n("9ca4"),f=Object(d["a"])(c,o,r,!1,null,null,null);t["default"]=f.exports},8571:function(e,t,n){!function(t,o){e.exports=o(n("a59a"),n("f348"))}(0,(function(e,t){return r={},n.m=o=[function(e,t,n){"use strict";function o(e,t,n,o,r,i,a,s){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=u):r&&(u=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(e,t){return u.call(t),c(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:l}}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.r(t);var o=n(2),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a(n(27));var o=a(n(21)),r=a(n(38)),i=n(39);function a(e){return e&&e.__esModule?e:{default:e}}t.default={name:"JsonViewer",components:{JsonBox:o.default},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:"jv-light"}},provide:function(){return{expandDepth:this.expandDepth}},data:function(){return{copied:!1,expandableCode:!1,expandCode:this.expanded}},watch:{value:function(){this.onResized()}},computed:{jvClass:function(){return"jv-container "+this.theme+(this.boxed?" boxed":"")},copyText:function(){var e=this.copyable,t=e.copyText;return{copyText:t||"copy",copiedText:e.copiedText||"copied!",timeout:e.timeout||2e3}}},mounted:function(){var e=this;this.debounceResized=(0,i.debounce)(this.debResized.bind(this),200),this.boxed&&this.$refs.jsonBox&&(this.onResized(),this.$refs.jsonBox.$el.addEventListener("resized",this.onResized,!0)),this.copyable&&new r.default(this.$refs.clip,{text:function(){return JSON.stringify(e.value,null,2)}}).on("success",(function(t){e.onCopied(t)}))},methods:{onResized:function(){this.debounceResized()},debResized:function(){var e=this;this.$nextTick((function(){e.$refs.jsonBox&&(250<=e.$refs.jsonBox.$el.clientHeight?e.expandableCode=!0:e.expandableCode=!1)}))},onCopied:function(e){var t=this;this.copied||(this.copied=!0,setTimeout((function(){t.copied=!1}),this.copyText.timeout),this.$emit("copied",e))},toggleExpandCode:function(){this.expandCode=!this.expandCode}}}},function(e,t,n){"use strict";n.r(t);var o=n(4),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=d(n(28)),i=d(n(29)),a=d(n(30)),s=d(n(31)),u=d(n(32)),l=d(n(33)),c=d(n(34));function d(e){return e&&e.__esModule?e:{default:e}}t.default={name:"JsonBox",inject:["expandDepth"],props:{value:{type:[Object,Array,String,Number,Boolean,Function],default:null},keyName:{type:String,default:""},sort:Boolean,depth:{type:Number,default:0}},data:function(){return{expand:!0}},mounted:function(){this.expand=!(this.depth>=this.expandDepth)},methods:{toggle:function(){this.expand=!this.expand;try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=this,n=[],d=void 0;null===this.value||void 0===this.value?d=i.default:Array.isArray(this.value)?d=l.default:"object"===o(this.value)?d=u.default:"number"==typeof this.value?d=a.default:"string"==typeof this.value?d=r.default:"boolean"==typeof this.value?d=s.default:"function"==typeof this.value&&(d=c.default);var f=this.keyName&&this.value&&(Array.isArray(this.value)||"object"===o(this.value));return f&&n.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),this.keyName&&n.push(e("span",{class:{"jv-key":!0},domProps:{innerText:this.keyName+":"}})),n.push(e(d,{class:{"jv-push":!0},props:{jsonValue:this.value,keyName:this.keyName,sort:this.sort,depth:this.depth,expand:this.expand},on:{"update:expand":function(e){t.expand=e}}})),e("div",{class:{"jv-node":!0,toggle:f}},n)}}},function(e,t,n){"use strict";n.r(t);var o=n(6),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=/^\w+:\/\//;t.default={name:"JsonString",functional:!0,props:{jsonValue:{type:String,required:!0}},render:function(e,t){var n=t.props.jsonValue,i=void 0;return i=r.test(n)?{innerHTML:'"'+(n='<a href="'+n+'" target="_blank" style="color: #0366d6;">'+n+"</a>").toString()+'"'}:{innerText:'"'+n.toString()+'"'},e("span",{class:{"jv-item":!0,"jv-string":!0},domProps:o({},i)})}}},function(e,t,n){"use strict";n.r(t);var o=n(8),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonUndefined",functional:!0,props:{jsonValue:{type:Object,default:null}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-undefined":!0},domProps:{innerText:null===t.props.jsonValue?"null":"undefined"}})}}},function(e,t,n){"use strict";n.r(t);var o=n(10),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonNumber",functional:!0,props:{jsonValue:{type:Number,required:!0}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-number":!0},domProps:{innerText:t.props.jsonValue.toString()}})}}},function(e,t,n){"use strict";n.r(t);var o=n(12),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonBoolean",functional:!0,props:{jsonValue:Boolean},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-boolean":!0},domProps:{innerText:t.props.jsonValue.toString()}})}}},function(e,t,n){"use strict";n.r(t);var o=n(14),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(21),i=(o=r)&&o.__esModule?o:{default:o};t.default={name:"JsonObject",data:function(){return{value:{}}},props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,sort:Boolean},computed:{ordered:function(){var e=this;if(!this.sort)return this.value;var t={};return Object.keys(this.value).sort().forEach((function(n){t[n]=e.value[n]})),t}},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e){var t=this;setTimeout((function(){t.value=e}),0)},toggle:function(){this.$emit("update:expand",!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=[];if(this.keyName||t.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),t.push(e("span",{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:"{"}})),this.expand)for(var n in this.ordered)if(this.ordered.hasOwnProperty(n)){var o=this.ordered[n];t.push(e(i.default,{key:n,style:{display:this.expand?void 0:"none"},props:{sort:this.sort,keyName:n,depth:this.depth+1,value:o}}))}return!this.expand&&Object.keys(this.value).length&&t.push(e("span",{style:{display:this.expand?"none":void 0},class:{"jv-ellipsis":!0},on:{click:this.toggle},attrs:{title:"click to reveal object content (keys: "+Object.keys(this.ordered).join(", ")+")"},domProps:{innerText:"..."}})),t.push(e("span",{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:"}"}})),e("span",t)}}},function(e,t,n){"use strict";n.r(t);var o=n(16),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(21),i=(o=r)&&o.__esModule?o:{default:o};t.default={name:"JsonArray",data:function(){return{value:[]}},props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e,t){var n=this,o=1<arguments.length&&void 0!==t?t:0;0===o&&(this.value=[]),setTimeout((function(){e.length>o&&(n.value.push(e[o]),n.setValue(e,o+1))}),0)},toggle:function(){this.$emit("update:expand",!this.expand);try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=this,n=[];return this.keyName||n.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),n.push(e("span",{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:"["}})),this.expand&&this.value.forEach((function(o,r){n.push(e(i.default,{key:r,style:{display:t.expand?void 0:"none"},props:{sort:t.sort,depth:t.depth+1,value:o}}))})),!this.expand&&this.value.length&&n.push(e("span",{style:{display:void 0},class:{"jv-ellipsis":!0},on:{click:this.toggle},attrs:{title:"click to reveal "+this.value.length+" hidden items"},domProps:{innerText:"..."}})),n.push(e("span",{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:"]"}})),e("span",n)}}},function(e,t,n){"use strict";n.r(t);var o=n(18),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonFunction",functional:!0,props:{jsonValue:{type:Function,required:!0}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-function":!0},attrs:{title:t.props.jsonValue.toString()},domProps:{innerHTML:"&lt;function&gt;"}})}}},function(e,t,n){var o=n(36);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0};n(24)(o,r),o.locals&&(e.exports=o.locals)},function(e,t,n){var o=n(41);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0};n(24)(o,r),o.locals&&(e.exports=o.locals)},function(e,t,n){"use strict";n.r(t);var o=n(3);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n(35);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/json-box.vue",t.default=a.exports},function(e,t,n){"use strict";function o(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.jvClass},[e.copyable?n("div",{staticClass:"jv-tooltip"},[n("span",{ref:"clip",staticClass:"jv-button",class:{copied:e.copied}},[e._t("copy",[e._v("\n "+e._s(e.copied?e.copyText.copiedText:e.copyText.copyText)+"\n ")],{copied:e.copied})],2)]):e._e(),e._v(" "),n("div",{staticClass:"jv-code",class:{open:e.expandCode,boxed:e.boxed}},[n("json-box",{ref:"jsonBox",attrs:{value:e.value,sort:e.sort}})],1),e._v(" "),e.expandableCode&&e.boxed?n("div",{staticClass:"jv-more",on:{click:e.toggleExpandCode}},[n("span",{staticClass:"jv-toggle",class:{open:!!e.expandCode}})]):e._e()])}var r=[];o._withStripped=!0,n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}))},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=function(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}(o),i=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot).concat(e," */")}));return[n].concat(i).concat([r]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(o[i]=!0)}for(var a=0;a<e.length;a++){var s=e[a];null!=s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="(".concat(s[2],") and (").concat(n,")")),t.push(s))}},t}},function(e,t,n){var o,r,i,a={},s=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),u=(i={},function(e){if(void 0===i[e]){var t=function(e){return document.querySelector(e)}.call(this,e);if(t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}i[e]=t}return i[e]}),l=null,c=0,d=[],f=n(37);function p(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=a[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(g(o.parts[i],t))}else{var s=[];for(i=0;i<o.parts.length;i++)s.push(g(o.parts[i],t));a[o.id]={id:o.id,refs:1,parts:s}}}}function v(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],a=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};o[a]?o[a].parts.push(s):n.push(o[a]={id:a,parts:[s]})}return n}function h(e,t){var n=u(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=d[d.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=u(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,r)}}function b(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);0<=t&&d.splice(t,1)}function m(e){var t=document.createElement("style");return e.attrs.type="text/css",j(t,e.attrs),h(e,t),t}function j(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function g(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l=l||m(t),o=_.bind(null,n,a,!1),r=_.bind(null,n,a,!0)}else r=e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",j(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=f(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),function(){b(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),o=function(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),function(){b(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=v(e,t);return p(n,t),function(e){for(var o=[],r=0;r<n.length;r++){var i=n[r];(s=a[i.id]).refs--,o.push(s)}for(e&&p(v(e,t),t),r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete a[s.id]}}}};var y,x=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=x(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(26),i=(o=r)&&o.__esModule?o:{default:o};t.default=Object.assign(i.default,{install:function(e){e.component("JsonViewer",i.default)}})},function(e,t,n){"use strict";n.r(t);var o=n(22),r=n(1);for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n(40);var a=n(0),s=Object(a.a)(r.default,o.a,o.b,!1,null,null,null);s.options.__file="lib/json-viewer.vue",t.default=s.exports},function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t);var o=n(5);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-string.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(7);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-undefined.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(9);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-number.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(11);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-boolean.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(13);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-object.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(15);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-array.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(17);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-function.vue",t.default=a.exports},function(e,t,n){"use strict";var o=n(19);n.n(o).a},function(e,t,n){(e.exports=n(23)(!1)).push([e.i,".jv-node{position:relative}.jv-node:after{content:','}.jv-node:last-of-type:after{content:''}.jv-node.toggle{margin-left:13px !important}.jv-node .jv-node{margin-left:25px}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t){var n=Date.now(),o=void 0;return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];Date.now()-n<t&&o&&clearTimeout(o),o=setTimeout((function(){e.apply(void 0,i)}),t),n=Date.now()}}},function(e,t,n){"use strict";var o=n(20);n.n(o).a},function(e,t,n){t=e.exports=n(23)(!1);var o=n(42)(n(43));t.push([e.i,".jv-container{box-sizing:border-box;position:relative}.jv-container.boxed{border:1px solid #eee;border-radius:6px}.jv-container.boxed:hover{box-shadow:0 2px 7px rgba(0,0,0,0.15);border-color:transparent;position:relative}.jv-container.jv-light{background:#fff;white-space:nowrap;color:#525252;font-size:14px;font-family:Consolas, Menlo, Courier, monospace}.jv-container.jv-light .jv-ellipsis{color:#999;background-color:#eee;display:inline-block;line-height:0.9;font-size:0.9em;padding:0px 4px 2px 4px;margin:0 4px;border-radius:3px;vertical-align:2px;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none}.jv-container.jv-light .jv-button{color:#49b3ff}.jv-container.jv-light .jv-key{color:#111111;margin-right:4px}.jv-container.jv-light .jv-item.jv-array{color:#111111}.jv-container.jv-light .jv-item.jv-boolean{color:#fc1e70}.jv-container.jv-light .jv-item.jv-function{color:#067bca}.jv-container.jv-light .jv-item.jv-number{color:#fc1e70}.jv-container.jv-light .jv-item.jv-object{color:#111111}.jv-container.jv-light .jv-item.jv-undefined{color:#e08331}.jv-container.jv-light .jv-item.jv-string{color:#42b983;word-break:break-word;white-space:normal}.jv-container.jv-light .jv-code .jv-toggle:before{padding:0px 2px;border-radius:2px}.jv-container.jv-light .jv-code .jv-toggle:hover:before{background:#eee}.jv-container .jv-code{overflow:hidden;padding:20px}.jv-container .jv-code.boxed{max-height:300px}.jv-container .jv-code.open{max-height:initial !important;overflow:visible;overflow-x:auto;padding-bottom:45px}.jv-container .jv-toggle{background-image:url("+o+');background-repeat:no-repeat;background-size:contain;background-position:center center;cursor:pointer;width:10px;height:10px;margin-right:2px;display:inline-block;-webkit-transition:-webkit-transform 0.1s;transition:-webkit-transform 0.1s;transition:transform 0.1s;transition:transform 0.1s, -webkit-transform 0.1s}.jv-container .jv-toggle.open{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more{position:absolute;z-index:1;bottom:0;left:0;right:0;height:40px;width:100%;text-align:center;cursor:pointer}.jv-container .jv-more .jv-toggle{position:relative;top:40%;z-index:2;color:#888;-webkit-transition:all 0.1s;transition:all 0.1s;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more .jv-toggle.open{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.jv-container .jv-more:after{content:"";width:100%;height:100%;position:absolute;bottom:0;left:0;z-index:1;background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);-webkit-transition:all 0.1s;transition:all 0.1s}.jv-container .jv-more:hover .jv-toggle{top:50%;color:#111}.jv-container .jv-more:hover:after{background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%)}.jv-container .jv-button{position:relative;cursor:pointer;display:inline-block;padding:5px;z-index:5}.jv-container .jv-button.copied{opacity:0.4;cursor:default}.jv-container .jv-tooltip{position:absolute;right:15px;top:10px}.jv-container .j-icon{font-size:12px}\n',""])},function(e,t,n){"use strict";e.exports=function(e,t){return"string"!=typeof(e=e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)||t?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB3aWR0aD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIAo8cG9seWdvbiBwb2ludHM9IjAsMCA4LDggMCwxNiIKc3R5bGU9ImZpbGw6IzY2NjtzdHJva2U6cHVycGxlO3N0cm9rZS13aWR0aDowIiAvPgo8L3N2Zz4="}],n.c=r,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=25);function n(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var o,r}))},"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"),o=n.get()[0],r=window.innerHeight-o.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-477a8e91"],{"1b06":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var i=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{showTotal:"",formatCol:e.formatCol,modelName:"settlebill",metaName:"settlebill_info",packageName:"bizchance",baseUrl:e.baseUrl,tblheight:i-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd,sumfields:e.smf,colVisable:e.colVisable},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})},s=[],n=a("06d3"),r=a("391e"),o=(a("db7f"),a("f121")),l=a("7e1e"),b=o["a"].deliverUrl.pro,u={name:"alldeliver_page",data:function(){return{baseUrl:b,smf:[{field:"settle_amount",label:"结算合计(元)"}]}},components:{PageSpace:r["a"],BizTable:n["a"]},methods:{colVisable:function(e){return"facilitator_name"!=e.key||1==this.$store.state.user.userobj.company.id},oninitbtn:function(e,t){"audit"==e.key&&(1==t.auditedStatus?e.ishide=!0:e.ishide=!1),"pay"==e.key&&(t.isPayedStatus?e.ishide=!0:t.auditedStatus?e.ishide=!1:e.ishide=!0),"delete"==e.key&&(t.isPayedStatus?e.ishide=!0:e.ishide=!1)},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){var a=this;if("audit"==e&&this.$refs.bt.doexec("edit",t),"disagree"==e){var i=t.memo?t.memo.trim():"";if(""==i)return void this.$Modal.error({title:"提示",content:"请添加结算建议."});Object(l["n"])("/web/bizchance/settlebillCtl/advice",{advice:{settleId:t.id,memo:i}},b).then((function(e){var t=e.data;0==t.status?(a.$refs.bt.showedform=!1,a.$Message.success("当前操作成功完成."),a.$refs.bt.fetchData()):a.$Message.error("当前操作未完成,请联系管理员或稍后重试.")}))}"agree"==e&&Object(l["n"])("/web/bizchance/settlebillCtl/auditPass",{pass:{settleId:t.id}},b).then((function(e){var t=e.data;0==t.status?(a.$refs.bt.showedform=!1,a.$Message.success("当前操作成功完成."),a.$refs.bt.fetchData()):a.$Message.error("当前操作未完成,请联系管理员或稍后重试.")})),"pay"==e&&Object(l["n"])("/web/bizchance/settlebillCtl/pay",{pay:{settleId:t.id}},b).then((function(e){var t=e.data;0==t.status?(a.$refs.bt.showedform=!1,a.$Message.success("当前操作成功完成."),a.$refs.bt.fetchData()):a.$Message.error("当前操作未完成,请联系管理员或稍后重试.")}))},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){var i=e[t];if("auditedStatus"===t){var s=e[t]?"已审核":"待审核";return s}if("isPayedStatus"==t){var n=e[t]?"已付款":"未付款";return n}if("created_at"==t){console.log(i,"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");var r=new Date(i).toLocaleString();return r}}}},d=u,c=a("9ca4"),f=Object(c["a"])(d,i,s,!1,null,null,null);t["default"]=f.exports},"391e":function(e,t,a){"use strict";var i=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=[],n=a("9ee1"),r=n["a"],o=a("9ca4"),l=Object(o["a"])(r,i,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"),i=a.get()[0],s=window.innerHeight-i.offsetTop-t.advalue;t.frameHeight=s,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("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.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b58f216"],{3048: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,tblheight:a-120,metaName:"attachment_info",packageName:"common",isMulti:"",savebefore:e.savebefore,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec}})]}}])})},i=[],o=n("06d3"),r=n("391e"),u={name:"attachment_page",data:function(){return{}},components:{BizTable:o["a"],PageSpace:r["a"]},methods:{savebefore:function(e,t,n){return n(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){},formatCol:function(e,t,n){return e[t]}}},c=u,f=n("9ca4"),s=Object(f["a"])(c,a,i,!1,null,null,null);t["default"]=s.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)},i=[],o=n("9ee1"),r=o["a"],u=n("9ca4"),c=Object(u["a"])(r,a,i,!1,null,null,null);t["a"]=c.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],i=window.innerHeight-a.offsetTop-t.advalue;t.frameHeight=i,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4fbb2454"],{"391e":function(e,t,n){"use strict";var o=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=[],i=n("9ee1"),a=i["a"],s=n("9ca4"),u=Object(s["a"])(a,o,r,!1,null,null,null);t["a"]=u.exports},8571:function(e,t,n){!function(t,o){e.exports=o(n("a59a"),n("f348"))}(0,(function(e,t){return r={},n.m=o=[function(e,t,n){"use strict";function o(e,t,n,o,r,i,a,s){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=u):r&&(u=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(e,t){return u.call(t),c(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:l}}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.r(t);var o=n(2),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a(n(27));var o=a(n(21)),r=a(n(38)),i=n(39);function a(e){return e&&e.__esModule?e:{default:e}}t.default={name:"JsonViewer",components:{JsonBox:o.default},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:"jv-light"}},provide:function(){return{expandDepth:this.expandDepth}},data:function(){return{copied:!1,expandableCode:!1,expandCode:this.expanded}},watch:{value:function(){this.onResized()}},computed:{jvClass:function(){return"jv-container "+this.theme+(this.boxed?" boxed":"")},copyText:function(){var e=this.copyable,t=e.copyText;return{copyText:t||"copy",copiedText:e.copiedText||"copied!",timeout:e.timeout||2e3}}},mounted:function(){var e=this;this.debounceResized=(0,i.debounce)(this.debResized.bind(this),200),this.boxed&&this.$refs.jsonBox&&(this.onResized(),this.$refs.jsonBox.$el.addEventListener("resized",this.onResized,!0)),this.copyable&&new r.default(this.$refs.clip,{text:function(){return JSON.stringify(e.value,null,2)}}).on("success",(function(t){e.onCopied(t)}))},methods:{onResized:function(){this.debounceResized()},debResized:function(){var e=this;this.$nextTick((function(){e.$refs.jsonBox&&(250<=e.$refs.jsonBox.$el.clientHeight?e.expandableCode=!0:e.expandableCode=!1)}))},onCopied:function(e){var t=this;this.copied||(this.copied=!0,setTimeout((function(){t.copied=!1}),this.copyText.timeout),this.$emit("copied",e))},toggleExpandCode:function(){this.expandCode=!this.expandCode}}}},function(e,t,n){"use strict";n.r(t);var o=n(4),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=d(n(28)),i=d(n(29)),a=d(n(30)),s=d(n(31)),u=d(n(32)),l=d(n(33)),c=d(n(34));function d(e){return e&&e.__esModule?e:{default:e}}t.default={name:"JsonBox",inject:["expandDepth"],props:{value:{type:[Object,Array,String,Number,Boolean,Function],default:null},keyName:{type:String,default:""},sort:Boolean,depth:{type:Number,default:0}},data:function(){return{expand:!0}},mounted:function(){this.expand=!(this.depth>=this.expandDepth)},methods:{toggle:function(){this.expand=!this.expand;try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=this,n=[],d=void 0;null===this.value||void 0===this.value?d=i.default:Array.isArray(this.value)?d=l.default:"object"===o(this.value)?d=u.default:"number"==typeof this.value?d=a.default:"string"==typeof this.value?d=r.default:"boolean"==typeof this.value?d=s.default:"function"==typeof this.value&&(d=c.default);var f=this.keyName&&this.value&&(Array.isArray(this.value)||"object"===o(this.value));return f&&n.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),this.keyName&&n.push(e("span",{class:{"jv-key":!0},domProps:{innerText:this.keyName+":"}})),n.push(e(d,{class:{"jv-push":!0},props:{jsonValue:this.value,keyName:this.keyName,sort:this.sort,depth:this.depth,expand:this.expand},on:{"update:expand":function(e){t.expand=e}}})),e("div",{class:{"jv-node":!0,toggle:f}},n)}}},function(e,t,n){"use strict";n.r(t);var o=n(6),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=/^\w+:\/\//;t.default={name:"JsonString",functional:!0,props:{jsonValue:{type:String,required:!0}},render:function(e,t){var n=t.props.jsonValue,i=void 0;return i=r.test(n)?{innerHTML:'"'+(n='<a href="'+n+'" target="_blank" style="color: #0366d6;">'+n+"</a>").toString()+'"'}:{innerText:'"'+n.toString()+'"'},e("span",{class:{"jv-item":!0,"jv-string":!0},domProps:o({},i)})}}},function(e,t,n){"use strict";n.r(t);var o=n(8),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonUndefined",functional:!0,props:{jsonValue:{type:Object,default:null}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-undefined":!0},domProps:{innerText:null===t.props.jsonValue?"null":"undefined"}})}}},function(e,t,n){"use strict";n.r(t);var o=n(10),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonNumber",functional:!0,props:{jsonValue:{type:Number,required:!0}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-number":!0},domProps:{innerText:t.props.jsonValue.toString()}})}}},function(e,t,n){"use strict";n.r(t);var o=n(12),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonBoolean",functional:!0,props:{jsonValue:Boolean},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-boolean":!0},domProps:{innerText:t.props.jsonValue.toString()}})}}},function(e,t,n){"use strict";n.r(t);var o=n(14),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(21),i=(o=r)&&o.__esModule?o:{default:o};t.default={name:"JsonObject",data:function(){return{value:{}}},props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,sort:Boolean},computed:{ordered:function(){var e=this;if(!this.sort)return this.value;var t={};return Object.keys(this.value).sort().forEach((function(n){t[n]=e.value[n]})),t}},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e){var t=this;setTimeout((function(){t.value=e}),0)},toggle:function(){this.$emit("update:expand",!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=[];if(this.keyName||t.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),t.push(e("span",{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:"{"}})),this.expand)for(var n in this.ordered)if(this.ordered.hasOwnProperty(n)){var o=this.ordered[n];t.push(e(i.default,{key:n,style:{display:this.expand?void 0:"none"},props:{sort:this.sort,keyName:n,depth:this.depth+1,value:o}}))}return!this.expand&&Object.keys(this.value).length&&t.push(e("span",{style:{display:this.expand?"none":void 0},class:{"jv-ellipsis":!0},on:{click:this.toggle},attrs:{title:"click to reveal object content (keys: "+Object.keys(this.ordered).join(", ")+")"},domProps:{innerText:"..."}})),t.push(e("span",{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:"}"}})),e("span",t)}}},function(e,t,n){"use strict";n.r(t);var o=n(16),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(21),i=(o=r)&&o.__esModule?o:{default:o};t.default={name:"JsonArray",data:function(){return{value:[]}},props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e,t){var n=this,o=1<arguments.length&&void 0!==t?t:0;0===o&&(this.value=[]),setTimeout((function(){e.length>o&&(n.value.push(e[o]),n.setValue(e,o+1))}),0)},toggle:function(){this.$emit("update:expand",!this.expand);try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=this,n=[];return this.keyName||n.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:this.toggle}})),n.push(e("span",{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:"["}})),this.expand&&this.value.forEach((function(o,r){n.push(e(i.default,{key:r,style:{display:t.expand?void 0:"none"},props:{sort:t.sort,depth:t.depth+1,value:o}}))})),!this.expand&&this.value.length&&n.push(e("span",{style:{display:void 0},class:{"jv-ellipsis":!0},on:{click:this.toggle},attrs:{title:"click to reveal "+this.value.length+" hidden items"},domProps:{innerText:"..."}})),n.push(e("span",{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:"]"}})),e("span",n)}}},function(e,t,n){"use strict";n.r(t);var o=n(18),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonFunction",functional:!0,props:{jsonValue:{type:Function,required:!0}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-function":!0},attrs:{title:t.props.jsonValue.toString()},domProps:{innerHTML:"&lt;function&gt;"}})}}},function(e,t,n){var o=n(36);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0};n(24)(o,r),o.locals&&(e.exports=o.locals)},function(e,t,n){var o=n(41);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0};n(24)(o,r),o.locals&&(e.exports=o.locals)},function(e,t,n){"use strict";n.r(t);var o=n(3);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n(35);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/json-box.vue",t.default=a.exports},function(e,t,n){"use strict";function o(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.jvClass},[e.copyable?n("div",{staticClass:"jv-tooltip"},[n("span",{ref:"clip",staticClass:"jv-button",class:{copied:e.copied}},[e._t("copy",[e._v("\n "+e._s(e.copied?e.copyText.copiedText:e.copyText.copyText)+"\n ")],{copied:e.copied})],2)]):e._e(),e._v(" "),n("div",{staticClass:"jv-code",class:{open:e.expandCode,boxed:e.boxed}},[n("json-box",{ref:"jsonBox",attrs:{value:e.value,sort:e.sort}})],1),e._v(" "),e.expandableCode&&e.boxed?n("div",{staticClass:"jv-more",on:{click:e.toggleExpandCode}},[n("span",{staticClass:"jv-toggle",class:{open:!!e.expandCode}})]):e._e()])}var r=[];o._withStripped=!0,n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}))},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=function(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}(o),i=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot).concat(e," */")}));return[n].concat(i).concat([r]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(o[i]=!0)}for(var a=0;a<e.length;a++){var s=e[a];null!=s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="(".concat(s[2],") and (").concat(n,")")),t.push(s))}},t}},function(e,t,n){var o,r,i,a={},s=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),u=(i={},function(e){if(void 0===i[e]){var t=function(e){return document.querySelector(e)}.call(this,e);if(t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}i[e]=t}return i[e]}),l=null,c=0,d=[],f=n(37);function p(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=a[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(g(o.parts[i],t))}else{var s=[];for(i=0;i<o.parts.length;i++)s.push(g(o.parts[i],t));a[o.id]={id:o.id,refs:1,parts:s}}}}function v(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],a=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};o[a]?o[a].parts.push(s):n.push(o[a]={id:a,parts:[s]})}return n}function h(e,t){var n=u(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=d[d.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=u(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,r)}}function b(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);0<=t&&d.splice(t,1)}function j(e){var t=document.createElement("style");return e.attrs.type="text/css",m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function g(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l=l||j(t),o=_.bind(null,n,a,!1),r=_.bind(null,n,a,!0)}else r=e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=f(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),function(){b(n),n.href&&URL.revokeObjectURL(n.href)}):(n=j(t),o=function(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),function(){b(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=v(e,t);return p(n,t),function(e){for(var o=[],r=0;r<n.length;r++){var i=n[r];(s=a[i.id]).refs--,o.push(s)}for(e&&p(v(e,t),t),r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete a[s.id]}}}};var y,x=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=x(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(26),i=(o=r)&&o.__esModule?o:{default:o};t.default=Object.assign(i.default,{install:function(e){e.component("JsonViewer",i.default)}})},function(e,t,n){"use strict";n.r(t);var o=n(22),r=n(1);for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n(40);var a=n(0),s=Object(a.a)(r.default,o.a,o.b,!1,null,null,null);s.options.__file="lib/json-viewer.vue",t.default=s.exports},function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t);var o=n(5);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-string.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(7);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-undefined.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(9);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-number.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(11);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-boolean.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(13);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-object.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(15);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-array.vue",t.default=a.exports},function(e,t,n){"use strict";n.r(t);var o=n(17);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);var i=n(0),a=Object(i.a)(o.default,void 0,void 0,!1,null,null,null);a.options.__file="lib/types/json-function.vue",t.default=a.exports},function(e,t,n){"use strict";var o=n(19);n.n(o).a},function(e,t,n){(e.exports=n(23)(!1)).push([e.i,".jv-node{position:relative}.jv-node:after{content:','}.jv-node:last-of-type:after{content:''}.jv-node.toggle{margin-left:13px !important}.jv-node .jv-node{margin-left:25px}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t){var n=Date.now(),o=void 0;return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];Date.now()-n<t&&o&&clearTimeout(o),o=setTimeout((function(){e.apply(void 0,i)}),t),n=Date.now()}}},function(e,t,n){"use strict";var o=n(20);n.n(o).a},function(e,t,n){t=e.exports=n(23)(!1);var o=n(42)(n(43));t.push([e.i,".jv-container{box-sizing:border-box;position:relative}.jv-container.boxed{border:1px solid #eee;border-radius:6px}.jv-container.boxed:hover{box-shadow:0 2px 7px rgba(0,0,0,0.15);border-color:transparent;position:relative}.jv-container.jv-light{background:#fff;white-space:nowrap;color:#525252;font-size:14px;font-family:Consolas, Menlo, Courier, monospace}.jv-container.jv-light .jv-ellipsis{color:#999;background-color:#eee;display:inline-block;line-height:0.9;font-size:0.9em;padding:0px 4px 2px 4px;margin:0 4px;border-radius:3px;vertical-align:2px;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none}.jv-container.jv-light .jv-button{color:#49b3ff}.jv-container.jv-light .jv-key{color:#111111;margin-right:4px}.jv-container.jv-light .jv-item.jv-array{color:#111111}.jv-container.jv-light .jv-item.jv-boolean{color:#fc1e70}.jv-container.jv-light .jv-item.jv-function{color:#067bca}.jv-container.jv-light .jv-item.jv-number{color:#fc1e70}.jv-container.jv-light .jv-item.jv-object{color:#111111}.jv-container.jv-light .jv-item.jv-undefined{color:#e08331}.jv-container.jv-light .jv-item.jv-string{color:#42b983;word-break:break-word;white-space:normal}.jv-container.jv-light .jv-code .jv-toggle:before{padding:0px 2px;border-radius:2px}.jv-container.jv-light .jv-code .jv-toggle:hover:before{background:#eee}.jv-container .jv-code{overflow:hidden;padding:20px}.jv-container .jv-code.boxed{max-height:300px}.jv-container .jv-code.open{max-height:initial !important;overflow:visible;overflow-x:auto;padding-bottom:45px}.jv-container .jv-toggle{background-image:url("+o+');background-repeat:no-repeat;background-size:contain;background-position:center center;cursor:pointer;width:10px;height:10px;margin-right:2px;display:inline-block;-webkit-transition:-webkit-transform 0.1s;transition:-webkit-transform 0.1s;transition:transform 0.1s;transition:transform 0.1s, -webkit-transform 0.1s}.jv-container .jv-toggle.open{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more{position:absolute;z-index:1;bottom:0;left:0;right:0;height:40px;width:100%;text-align:center;cursor:pointer}.jv-container .jv-more .jv-toggle{position:relative;top:40%;z-index:2;color:#888;-webkit-transition:all 0.1s;transition:all 0.1s;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more .jv-toggle.open{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.jv-container .jv-more:after{content:"";width:100%;height:100%;position:absolute;bottom:0;left:0;z-index:1;background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);-webkit-transition:all 0.1s;transition:all 0.1s}.jv-container .jv-more:hover .jv-toggle{top:50%;color:#111}.jv-container .jv-more:hover:after{background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%)}.jv-container .jv-button{position:relative;cursor:pointer;display:inline-block;padding:5px;z-index:5}.jv-container .jv-button.copied{opacity:0.4;cursor:default}.jv-container .jv-tooltip{position:absolute;right:15px;top:10px}.jv-container .j-icon{font-size:12px}\n',""])},function(e,t,n){"use strict";e.exports=function(e,t){return"string"!=typeof(e=e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)||t?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB3aWR0aD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIAo8cG9seWdvbiBwb2ludHM9IjAsMCA4LDggMCwxNiIKc3R5bGU9ImZpbGw6IzY2NjtzdHJva2U6cHVycGxlO3N0cm9rZS13aWR0aDowIiAvPgo8L3N2Zz4="}],n.c=r,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=25);function n(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var o,r}))},"8a63":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("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"pusherror_info",modelName:"push",packageName:"common",tblheight:o-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}}),n("Drawer",{attrs:{title:"数据详情",closable:!1,width:"600"},model:{value:e.info_model,callback:function(t){e.info_model=t},expression:"info_model"}},[n("json-viewer",{attrs:{value:e.jsonData,copyable:"","expand-depth":3}})],1)]}}])})},r=[],i=(n("7e1e"),n("06d3")),a=n("391e"),s=(n("60b7"),n("8571")),u=n.n(s),l={name:"failinfo_page",data:function(){return{info_model:!1,jsonData:{}}},components:{PageSpace:a["a"],BizTable:i["a"],JsonViewer:u.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){"info"==e&&(this.info_model=!0,this.jsonData=t)},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]}}},c=l,d=n("9ca4"),f=Object(d["a"])(c,o,r,!1,null,null,null);t["default"]=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"),o=n.get()[0],r=window.innerHeight-o.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-5ccefbbb"],{"1de5":function(t,e,a){},4635:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Card",[t.isOperator?t._e():a("div",{attrs:{slot:"title"},slot:"title"},[a("Select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择要授权的应用"},on:{"on-change":t.onchange},model:{value:t.selAppId,callback:function(e){t.selAppId=e},expression:"selAppId"}},t._l(t.myapps,(function(e){return a("Option",{key:e.title,attrs:{value:e.id}},[t._v(t._s(e.title))])})),1)],1),a("Tree",{staticClass:"ptree",attrs:{data:t.treedata,render:t.renderContent}})],1)],1)},n=[],o=a("aca2"),r=o["a"],i=(a("83d8"),a("9ca4")),c=Object(i["a"])(r,s,n,!1,null,null,null);e["default"]=c.exports},"83d8":function(t,e,a){"use strict";var s=a("1de5"),n=a.n(s);n.a},aca2:function(t,e,a){"use strict";(function(t){a("e697"),a("9a33"),a("6d57");var s=a("60b7"),n=a("e247");a("f121");e["a"]={name:"roleauth_page",data:function(){return{myapps:JSON.parse(localStorage.getItem("myapps")),selAppId:"",roleid:-1,rolecode:"",roleauths:null,treedata:[],buttonProps:{type:"default",size:"small"}}},components:{Checks:n["a"]},computed:{authdic:function(){var t={};return this.roleauths.forEach((function(e){t[e.bizcode]=e.authstrs.split(",")})),t},isOperator:function(){return 1==this.$store.state.user.userobj.company.id}},mounted:function(){this.roleid=this.$route.query.roleid,this.rolecode=this.$route.query.rolecode,this.isOperator&&this.initTree()},methods:{onchange:function(t){var e=this,a=this.myapps.filter((function(e){return e.id==t}));this.treedata=JSON.parse(a[0].functionJSON),Object(s["c"])([this.roleid]).then((function(t){var a=t.data;0==a.status?(e.roleauths=a.data,e.setAuthData(e.treedata)):console.log("fetch auths fails.....---------------------------------------------------------")}))},initTree:function(){var t=this;Object(s["d"])().then((function(e){var a=e.data;0==a.status&&(t.treedata=a.data.funcJson,Object(s["c"])([t.roleid]).then((function(e){var a=e.data;0==a.status?(t.roleauths=a.data,t.setAuthData(t.treedata)):console.log("fetch auths fails.....---------------------------------------------------------")})))}))},setAuthData:function(t){var e=this;t.forEach((function(t){t.children&&t.children.length>0?e.setAuthData(t.children):t.sels?t.sels=e.authdic[t.code]?e.authdic[t.code]:[]:t.sels=[]}))},makeauths:function(t,e){var a=this;console.log(t,"makeauths"),t.forEach((function(t){if(t.children&&t.children.length>0)a.makeauths(t.children,e);else if(t.sels){var s={role_id:a.roleid,rolecode:a.rolecode,bizcode:t.code,codepath:t.orgpath,authstrs:t.sels.join(",")};e.push(s)}}))},saveAuths:function(){var t=this,e=[];this.makeauths(this.treedata,e),Object(s["h"])(e).then((function(e){var a=e.data;0==a.status?(t.roleauths=a.data,t.$Message.success("当前操作成功完成")):t.$Message.success("当前操作未完成,请稍后重试或联系管理员")}))},refreshFunc:function(){},renderContent:function(e,a){var s=this,n=a.root,o=a.node,r=a.data,i=n.find((function(t){return t===o})).parent;return console.log(i),e("span",{style:{display:"inline-block",width:"100%",cursor:"pointer"},on:{click:function(e){t("span",".ptree").removeClass("spansel"),t(e.target).addClass("spansel")}}},[e("span",[e("Icon",{props:{type:r.auths?"ios-paper-outline":"ios-folder-outline"},style:{marginRight:"8px"}}),e("span",r.title)]),e("span",{style:{display:"inline-block",float:"right",marginRight:"100px"}},[r.auths&&r.auths.length>0?e("Checkbox",{on:{"on-change":function(t){t?(console.log(r.auths),r.sels=r.auths):r.sels=[]}},style:{display:"inline-block",float:"left",marginRight:"10px",marginTop:"3px"}},[e("span",["all"])]):"root"==r.code?e("span",[e("Button",{props:{type:"primary"},on:{click:function(){s.saveAuths()}}},["保存"]),e("Button",{props:{type:"text"},on:{click:function(){s.refreshFunc()}}},["刷新"])]):"",r.auths&&r.auths.length>0?e("CheckboxGroup",{props:{value:r.sels},on:{"on-change":function(t){r.sels=t}}},[r.auths.map((function(t){return e("Checkbox",{props:{label:t}},[e("span",[t])])}))]):""])])}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e7b929d"],{"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"],c=n("9ca4"),s=Object(c["a"])(i,a,r,!1,null,null,null);t["a"]=s.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"))},eb8f: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:"productprice_info",modelName:"productprice",packageName:"product",tblheight:a-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})},r=[],o=(n("163d"),n("06d3")),i=n("391e"),c=n("7e1e"),s=n("db7f"),u=n("923a"),l=n("a59a"),f={name:"appinfo_page",data:function(){return{productpricetmp:null,smf:[{field:"lowpriceref",label:"最低参考合计"}],currentRow:null,sptags:"",channeltags:""}},components:{PageSpace:i["a"],BizTable:o["a"]},methods:{oninitbtn:function(e,t){if(e&&"upline"==e.key){var n=t["isEnabled"]?"下架":"上架";e.title=n}},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t,n){return this.productpricetmp=e,t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t){var n=this;"upline"==e&&Object(c["n"])("/web/product/productpriceCtl/updownProduct",{curid:t.id}).then((function(e){var t=e.data;0==t.status?(n.$refs.bt.fetchData(),n.$Message.success("当前操作已经成功完成.")):n.$Message.error("当前操作未完成.")}))},validmethod:function(e,t,n,a){if(console.log(t,"mmmmmmmmmmmmmmmmmmmmm",a),"costamount"==e.field){var r=this.productpricetmp.lowpriceref,o=(t/r).toFixed(2);a.costratio=Number(o)}return n()},formatCol:function(e,t,n){if("isEnabled"==t){var a=e["isEnabled"]?"已上架":"待上架";return e["isEnabled"]?'<span style="color:green">'.concat(a,"</span>"):'<span style="color:orange">'.concat(a,"</span>")}if("lowpriceref"==t)return e["lowpriceref"]=Number(e["lowpriceref"]),"".concat(e["lowpriceref"]);if("hignpriceref"==t)return e["hignpriceref"]=Number(e["hignpriceref"]),"".concat(e["hignpriceref"]);if("deliverfile"==t){var r=e["deliverfile"];return"<img src='".concat(r,"' style='height:40px'>")}if("extrafile"==t){var o=e["extrafile"];return"<img src='".concat(o,"' style='height:40px'>")}if("costratio"==t){e["costratio"]=Number(e["costratio"]);var i="%"+100*e["costratio"];return"".concat(i)}if("costamount"==t){e["costamount"]=Number(e["costamount"]);var c=e["costamount"];return"".concat(c)}if("expensetype"==t){e["costamount"]=Number(e["costamount"]);var f=e["expensetype"],d=s["a"]["expense_type"][f];return"".concat(d)}if("sptags"==t){this.currentRow=e,this.sptags=e["sptags"];var m='<Tags :currow=\'currentRow\' v-model="sptags" :ishideadd="true" @change="ch"></Tags>',p=Object.assign({},this.$data),h=l["default"].extend({components:{Tags:u["a"]},template:"<div>".concat(m,"</div>"),data:function(){return p},methods:{testok:function(){console.log("test.....................................")},ch:function(e,t){console.log(e,t)}}}),g=(new h).$mount().$el;return g}if("channeltags"==t){this.currentRow=e,this.channeltags=e["channeltags"];var v='<Tags :currow=\'currentRow\' v-model="channeltags" :ishideadd="true" @change="ch"></Tags>',b=Object.assign({},this.$data),w=l["default"].extend({components:{Tags:u["a"]},template:"<div>".concat(v,"</div>"),data:function(){return b},methods:{testok:function(){console.log("test.....................................")},ch:function(e,t){console.log(e,t)}}}),x=(new w).$mount().$el;return x}}}},d=f,m=n("9ca4"),p=Object(m["a"])(d,a,r,!1,null,null,null);t["default"]=p.exports}}]);
\ 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["n"])("/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["g"])({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:{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
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8e32057a"],{"18d0":function(e,t,o){},"4b4f":function(e,t,o){"use strict";var r=o("18d0"),n=o.n(r);n.a},e49c:function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"login"},[o("div",{staticClass:"login-con"},[o("Card",{staticStyle:{"border-radius":"0px"},attrs:{icon:"log-in",bordered:!1}},[o("p",{attrs:{slot:"title"},on:{click:function(t){t.preventDefault(),e.ispasslogin=!0}},slot:"title"},[o("a",{attrs:{href:"#"}},[e._v("密码登录")])]),o("div",{staticClass:"form-con"},[e.ispasslogin?e._e():o("MobileForm",{on:{"on-success-valid":e.handleSubmit,onsendvcode:e.onsendvcode}}),e.ispasslogin?o("login-form",{on:{"on-success-valid":e.handleSubmit}}):e._e()],1)])],1)])},n=[],s=(o("5ab2"),o("6d57"),o("e10e"),o("13c1")),a=o("c24f"),i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("Form",{ref:"loginForm",attrs:{model:e.form,rules:e.rules},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSubmit(t)}}},[o("FormItem",{attrs:{prop:"userName"}},[o("Input",{attrs:{placeholder:"请输入用户名"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:16,type:"ios-person"}})],1)])],1),o("FormItem",{attrs:{prop:"password"}},[o("Input",{attrs:{type:"password",placeholder:"请输入密码"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:14,type:"md-lock"}})],1)])],1),o("FormItem",[o("Button",{attrs:{type:"primary",long:""},on:{click:e.handleSubmit}},[e._v("登录")])],1)],1)},l=[],c={name:"LoginForm",props:{userNameRules:{type:Array,default:function(){return[{required:!0,message:" ",trigger:"blur"}]}},passwordRules:{type:Array,default:function(){return[{required:!0,message:" ",trigger:"blur"}]}}},data:function(){return{form:{userName:"",password:""}}},computed:{rules:function(){return{userName:this.userNameRules,password:this.passwordRules}}},methods:{handleSubmit:function(){var e=this;this.$refs.loginForm.validate((function(t){t&&e.$emit("on-success-valid",{userName:e.form.userName.trim(),password:e.form.password})}))}}},u=c,d=o("9ca4"),m=Object(d["a"])(u,i,l,!1,null,null,null),p=m.exports,f=p,b=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("Form",{ref:"loginForm",attrs:{model:e.form,rules:e.rules},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSubmit(t)}}},[o("FormItem",{attrs:{prop:"mobile"}},[o("Input",{attrs:{placeholder:"请输入手机号"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:16,type:"ios-person"}})],1)])],1),o("FormItem",{attrs:{prop:"vcode"}},[o("Input",{attrs:{placeholder:"请输入收到的验证码"},model:{value:e.form.vcode,callback:function(t){e.$set(e.form,"vcode",t)},expression:"form.vcode"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:14,type:"md-lock"}})],1),o("span",{attrs:{slot:"append"},slot:"append"},[e.isshowtime?e._e():o("Button",{attrs:{type:"primary"},on:{click:e.sendVCode}},[e._v("发送验证码")]),e.isshowtime?o("span",[e._v(e._s(e.leftseconds)+"秒")]):e._e()],1)])],1),o("FormItem",[o("Button",{attrs:{type:"primary",long:""},on:{click:e.handleSubmit}},[e._v("登录")])],1)],1)},h=[],v={name:"PhoneForm",props:{mobileRules:{type:Array,default:function(){return[{required:!0,message:"电话号码不能为空",trigger:"blur"}]}},vcodeRules:{type:Array,default:function(){return[{required:!0,message:"验证码不能为空",trigger:"blur"}]}}},data:function(){return{form:{mobile:"",vcode:""},isshowtime:!1,leftseconds:60}},computed:{rules:function(){return{mobile:this.mobileRules,vcode:this.vcodeRules}}},methods:{sendVCode:function(){var e=this;if(""!=this.form.mobile.trim()){var t=60;this.isshowtime=!0;var o=setInterval((function(){e.leftseconds=t--,0==t&&(clearInterval(o),e.isshowtime=!1)}),1e3);this.$emit("onsendvcode",{mobile:this.form.mobile})}},handleSubmit:function(){var e=this;this.$refs.loginForm.validate((function(t){t&&e.$emit("on-success-valid",{mobile:e.form.mobile,vcode:e.form.vcode})}))}}},g=v,y=Object(d["a"])(g,b,h,!1,null,null,null),w=y.exports,O=w,k=o("9f3a");function _(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function j(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach((function(t){Object(s["a"])(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var F={data:function(){return{ispasslogin:!0}},components:{LoginForm:f,MobileForm:O},methods:j(j({},Object(k["b"])(["handleLogin","getUserInfo","handleLogOut"])),{},{onsendvcode:function(e){Object(a["q"])(e).then((function(e){e.data;console.log(e.data)}))},handleSubmit:function(e){var t=this;this.handleLogin(e).then((function(e){e.user&&e.user.channel&&e.user.channel.code?Object(a["l"])({fromAppKey:"b3b104eb-864d-42f0-b2d7-b5567bc8e91c"}).then((function(e){var o=e.data;0==o.status&&t.handleLogOut().then((function(){window.open("".concat(o.data.homePage,"?code=").concat(o.data.code),"_self")}))})):e.user&&e.user.defaultAppkey?Object(a["l"])({fromAppKey:e.user.defaultAppkey}).then((function(e){var o=e.data;0==o.status&&t.handleLogOut().then((function(){window.open("".concat(o.data.homePage,"?code=").concat(o.data.code),"_self")}))})):t.$router.push({name:t.$config.homeName})})).catch((function(e){t.$Notice.error({title:"系统通知",desc:"账号或密码有误!"})}))}})},I=F,$=(o("4b4f"),Object(d["a"])(I,r,n,!1,null,null,null));t["default"]=$.exports}}]);
\ 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["e"])({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["e"])({businessMode:this.businessMode,salesmanId:t[0].id,salesmanName:t[0].nickName,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["n"])("/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["j"])().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
(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["n"])("/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["i"])().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
This source diff could not be displayed because it is too large. You can view the blob instead.
var fs = require('fs');
// function to encode file data to base64 encoded string
function base64_encode(file) {
// read binary data
var bitmap = fs.readFileSync("./imgs/sp.png");
// convert binary data to base64 encoded string
var bf=Buffer.alloc(bitmap.length,bitmap);
return bf.toString('base64');
}
// function to create file from base64 encoded string
function base64_decode(base64str, file) {
// create buffer object from base64 encoded string, it is important to tell the constructor that the string is base64 encoded
var bitmap = new Buffer(base64str, 'base64');
// write buffer to file
fs.writeFileSync(file, bitmap);
console.log('******** File created from base64 encoded string ********');
}
function getDataUrl(filepath){
var str=base64_encode(filepath);
var mime="";
if(filepath.indexOf("png")>=0){
mime="image/png";
}
if(filepath.indexOf("jpg")>=0 || filepath.indexOf("jpeg")>=0){
mime="image/jpg";
}
if(filepath.indexOf("gif")>=0){
mime="image/gif";
}
var dataurl=`data:${mime};base64,`+str;
return dataurl;
}
var str=getDataUrl("./imgs/sp.png");
console.log(str);
\ No newline at end of file
data:function(){
return {
downloadTimes : 1, // 设置检查重试次数变量,
code : '', // 下载文件的code值
}
},
methods : {
// 创建下载文件方法
exportFile() {
var self = this;
var datas = self.querydata;
if(!datas || datas.length == 0) {
that.$message.warning(`无查询结果`);
return ;
}
/* [{},{},{}]转换成[[],[],[]] 格式 */
var rows = [];
for(var dd of datas) {
var arr = [];
for(var _idx in dd) {
arr.push(dd[_idx]);
}
rows.push(arr);
}
this.code = "";
/* 生成文件 */
self.$root.postReq("/web/filedownloadCtl/download",{rows : rows}).then(function(d){
if(d.status == 0) {
setTimeout((function(){
/* d.data 返回文件标识 */
self.code = d.data;
self.downloadFile();
}), 2000);
}
});
},
/* 循环检查code, 并下载文件 */
downloadFile() {
var self = this;
self.$root.postReq("/web/filedownloadCtl/findOne",{code : self.code}).then(function(d){
if(d.status == 0) {
if(d.data && d.data.filePath) {
downloadTimes = 1;
/* 文件生成成功 */
window.open(d.data.filePath, "_blank");
} else {
/* 递归2秒一次,超过5次,下载失败 */
if(downloadTimes > 5) {
downloadTimes = 1;
/* 下载超时 */
return;
}
downloadTimes = downloadTimes + 1;
setTimeout((function(){
self.downloadFile();
}), 2000);
}
}
});
},
}
/* Element Chalk Variables */
/* Transition
-------------------------- */
$--all-transition: all .3s cubic-bezier(.645,.045,.355,1) !default;
$--fade-transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
$--fade-linear-transition: opacity 200ms linear !default;
$--md-fade-transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
$--border-transition-base: border-color .2s cubic-bezier(.645,.045,.355,1) !default;
$--color-transition-base: color .2s cubic-bezier(.645,.045,.355,1) !default;
/* Colors
-------------------------- */
$--color-white: black !default;
$--color-black: #000 !default;
$--color-primary: #2c3e50 !default;
$--color-primary-light-1: mix($--color-white, $--color-primary, 10%) !default; /* 53a8ff */
$--color-primary-light-2: mix($--color-white, $--color-primary, 20%) !default; /* 66b1ff */
$--color-primary-light-3: mix($--color-white, $--color-primary, 30%) !default; /* 79bbff */
$--color-primary-light-4: mix($--color-white, $--color-primary, 40%) !default; /* 8cc5ff */
$--color-primary-light-5: mix($--color-white, $--color-primary, 50%) !default; /* a0cfff */
$--color-primary-light-6: mix($--color-white, $--color-primary, 60%) !default; /* b3d8ff */
$--color-primary-light-7: mix($--color-white, $--color-primary, 70%) !default; /* c6e2ff */
$--color-primary-light-8: mix($--color-white, $--color-primary, 80%) !default; /* d9ecff */
$--color-primary-light-9: mix($--color-white, $--color-primary, 90%) !default; /* ecf5ff */
$--color-success: #67c23a !default;
$--color-warning: #e6a23c !default;
$--color-danger: #f56c6c !default;
$--color-info: #909399 !default;
$--color-success-light: mix($--color-white, $--color-success, 80%) !default;
$--color-warning-light: mix($--color-white, $--color-warning, 80%) !default;
$--color-danger-light: mix($--color-white, $--color-danger, 80%) !default;
$--color-info-light: mix($--color-white, $--color-info, 80%) !default;
$--color-success-lighter: mix($--color-white, $--color-success, 90%) !default;
$--color-warning-lighter: mix($--color-white, $--color-warning, 90%) !default;
$--color-danger-lighter: mix($--color-white, $--color-danger, 90%) !default;
$--color-info-lighter: mix($--color-white, $--color-info, 90%) !default;
$--color-text-primary: #303133 !default;
$--color-text-regular: #606266 !default;
$--color-text-secondary: #909399 !default;
$--color-text-placeholder: #c0c4cc !default;
/* Link
-------------------------- */
$--link-color: $--color-primary-light-2 !default;
$--link-hover-color: $--color-primary !default;
/* Background
-------------------------- */
$--background-color-base: #f5f7fa !default;
/* Border
-------------------------- */
$--border-width-base: 1px !default;
$--border-style-base: solid !default;
$--border-color-base: #dcdfe6 !default;
$--border-color-light: #e4e7ed !default;
$--border-color-lighter: #ebeef5 !default;
$--border-color-extra-light: #f2f6fc !default;
$--border-color-hover: $--color-text-placeholder !default;
$--border-base: $--border-width-base $--border-style-base $--border-color-base !default;
$--border-radius-base: 4px !default;
$--border-radius-small: 2px !default;
$--border-radius-circle: 100% !default;
/* Box-shadow
-------------------------- */
$--box-shadow-base: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04) !default;
$--box-shadow-dark: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .12) !default;
$--box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !default;
/* Fill
-------------------------- */
$--fill-base: $--color-white !default;
/* Font
-------------------------- */
$--font-path: 'fonts' !default;
$--font-size-base: 14px !default;
$--font-size-small: 13px !default;
$--font-size-large: 18px !default;
$--font-color-disabled-base: #bbb !default;
$--font-weight-primary: 500 !default;
$--font-line-height-primary: 24px !default;
/* Size
-------------------------- */
$--size-base: 14px !default;
/* z-index
-------------------------- */
$--index-normal: 1 !default;
$--index-top: 1000 !default;
$--index-popper: 2000 !default;
/* Disable base
-------------------------- */
$--disabled-fill-base: $--background-color-base !default;
$--disabled-color-base: $--color-text-placeholder !default;
$--disabled-border-base: $--border-color-light !default;
/* Icon
-------------------------- */
$--icon-color: #666 !default;
$--icon-color-base: $--color-info !default;
/* Checkbox
-------------------------- */
$--checkbox-font-size: 14px !default;
$--checkbox-font-weight: $--font-weight-primary !default;
$--checkbox-color: $--color-text-regular !default;
$--checkbox-input-height: 14px !default;
$--checkbox-input-width: 14px !default;
$--checkbox-input-border-radius: $--border-radius-small !default;
$--checkbox-input-fill: $--color-white !default;
$--checkbox-input-border: $--border-base !default;
$--checkbox-input-border-color: $--border-color-base !default;
$--checkbox-icon-color: $--color-white !default;
$--checkbox-disabled-input-border-color: $--border-color-base !default;
$--checkbox-disabled-input-fill: #edf2fc !default;
$--checkbox-disabled-icon-color: $--color-text-placeholder !default;
$--checkbox-disabled-checked-input-fill: $--border-color-extra-light !default;
$--checkbox-disabled-checked-input-border-color: $--border-color-base !default;
$--checkbox-disabled-checked-icon-color: $--color-text-placeholder !default;
$--checkbox-checked-text-color: $--color-primary !default;
$--checkbox-checked-input-border-color: $--color-primary !default;
$--checkbox-checked-input-fill: $--color-primary !default;
$--checkbox-checked-icon-color: $--fill-base !default;
$--checkbox-input-border-color-hover: $--color-primary !default;
$--checkbox-bordered-height: 40px !default;
$--checkbox-bordered-padding: 9px 20px 9px 10px !default;
$--checkbox-bordered-medium-padding: 7px 20px 7px 10px !default;
$--checkbox-bordered-small-padding: 5px 15px 5px 10px !default;
$--checkbox-bordered-mini-padding: 3px 15px 3px 10px !default;
$--checkbox-bordered-medium-input-height: 14px !default;
$--checkbox-bordered-medium-input-width: 14px !default;
$--checkbox-bordered-medium-height: 36px !default;
$--checkbox-bordered-small-input-height: 12px !default;
$--checkbox-bordered-small-input-width: 12px !default;
$--checkbox-bordered-small-height: 32px !default;
$--checkbox-bordered-mini-input-height: 12px !default;
$--checkbox-bordered-mini-input-width: 12px !default;
$--checkbox-bordered-mini-height: 28px !default;
$--checkbox-button-font-size: $--font-size-base !default;
$--checkbox-button-checked-fill: $--color-primary !default;
$--checkbox-button-checked-color: $--color-white !default;
$--checkbox-button-checked-border-color: $--color-primary !default;
/* Radio
-------------------------- */
$--radio-font-size: 14px !default;
$--radio-font-weight: $--font-weight-primary !default;
$--radio-color: $--color-text-regular !default;
$--radio-input-height: 14px !default;
$--radio-input-width: 14px !default;
$--radio-input-border-radius: $--border-radius-circle !default;
$--radio-input-fill: $--color-white !default;
$--radio-input-border: $--border-base !default;
$--radio-input-border-color: $--border-color-base !default;
$--radio-icon-color: $--color-white !default;
$--radio-disabled-input-border-color: $--disabled-border-base !default;
$--radio-disabled-input-fill: $--disabled-fill-base !default;
$--radio-disabled-icon-color: $--disabled-fill-base !default;
$--radio-disabled-checked-input-border-color: $--disabled-border-base !default;
$--radio-disabled-checked-input-fill: $--disabled-fill-base !default;
$--radio-disabled-checked-icon-color: $--color-text-placeholder !default;
$--radio-checked-text-color: $--color-primary !default;
$--radio-checked-input-border-color: $--color-primary !default;
$--radio-checked-input-fill: $--color-white !default;
$--radio-checked-icon-color: $--color-primary !default;
$--radio-input-border-color-hover: $--color-primary !default;
$--radio-bordered-height: 40px !default;
$--radio-bordered-padding: 12px 20px 0 10px !default;
$--radio-bordered-medium-padding: 10px 20px 0 10px !default;
$--radio-bordered-small-padding: 8px 15px 0 10px !default;
$--radio-bordered-mini-padding: 6px 15px 0 10px !default;
$--radio-bordered-medium-input-height: 14px !default;
$--radio-bordered-medium-input-width: 14px !default;
$--radio-bordered-medium-height: 36px !default;
$--radio-bordered-small-input-height: 12px !default;
$--radio-bordered-small-input-width: 12px !default;
$--radio-bordered-small-height: 32px !default;
$--radio-bordered-mini-input-height: 12px !default;
$--radio-bordered-mini-input-width: 12px !default;
$--radio-bordered-mini-height: 28px !default;
$--radio-button-font-size: $--font-size-base !default;
$--radio-button-checked-fill: $--color-primary !default;
$--radio-button-checked-color: $--color-white !default;
$--radio-button-checked-border-color: $--color-primary !default;
$--radio-button-disabled-checked-fill: $--border-color-extra-light !default;
/* Select
-------------------------- */
$--select-border-color-hover: $--border-color-hover !default;
$--select-disabled-border: $--disabled-border-base !default;
$--select-font-size: $--font-size-base !default;
$--select-close-hover-color: $--color-text-secondary !default;
$--select-input-color: $--color-text-placeholder !default;
$--select-multiple-input-color: #666 !default;
$--select-input-focus-background: $--color-primary !default;
$--select-input-font-size: 14px !default;
$--select-option-color: $--color-text-regular !default;
$--select-option-disabled-color: $--color-text-placeholder !default;
$--select-option-disabled-background: $--color-white !default;
$--select-option-height: 34px !default;
$--select-option-hover-background: $--background-color-base !default;
$--select-option-selected: $--color-primary !default;
$--select-option-selected-hover: $--background-color-base !default;
$--select-group-color: $--color-info !default;
$--select-group-height: 30px !default;
$--select-group-font-size: 12px !default;
$--select-dropdown-background: $--color-white !default;
$--select-dropdown-shadow: $--box-shadow-light !default;
$--select-dropdown-empty-color: #999 !default;
$--select-dropdown-max-height: 274px !default;
$--select-dropdown-padding: 6px 0 !default;
$--select-dropdown-empty-padding: 10px 0 !default;
$--select-dropdown-border: solid 1px $--border-color-light !default;
/* Alert
-------------------------- */
$--alert-padding: 8px 16px !default;
$--alert-border-radius: $--border-radius-base !default;
$--alert-title-font-size: 13px !default;
$--alert-description-font-size: 12px !default;
$--alert-close-font-size: 12px !default;
$--alert-close-customed-font-size: 13px !default;
$--alert-success-color: $--color-success-lighter !default;
$--alert-info-color: $--color-info-lighter !default;
$--alert-warning-color: $--color-warning-lighter !default;
$--alert-danger-color: $--color-danger-lighter !default;
$--alert-icon-size: 16px !default;
$--alert-icon-large-size: 28px !default;
/* Message Box
-------------------------- */
$--msgbox-width: 420px !default;
$--msgbox-border-radius: 4px !default;
$--msgbox-font-size: $--font-size-large !default;
$--msgbox-content-font-size: $--font-size-base !default;
$--msgbox-content-color: $--color-text-regular !default;
$--msgbox-error-font-size: 12px !default;
$--msgbox-padding-primary: 15px !default;
$--msgbox-success-color: $--color-success !default;
$--msgbox-info-color: $--color-info !default;
$--msgbox-warning-color: $--color-warning !default;
$--msgbox-danger-color: $--color-danger !default;
/* Message
-------------------------- */
$--message-shadow: $--box-shadow-base !default;
$--message-min-width: 380px !default;
$--message-background-color: #edf2fc !default;
$--message-padding: 15px 15px 15px 20px !default;
$--message-content-color: $--color-text-regular !default;
$--message-close-color: $--color-text-placeholder !default;
$--message-close-size: 16px !default;
$--message-close-hover-color: $--color-text-secondary !default;
$--message-success-color: $--color-success !default;
$--message-info-color: $--color-info !default;
$--message-warning-color: $--color-warning !default;
$--message-danger-color: $--color-danger !default;
/* Notification
-------------------------- */
$--notification-width: 330px !default;
$--notification-padding: 14px 26px 14px 13px !default;
$--notification-radius: 8px !default;
$--notification-shadow: $--box-shadow-light !default;
$--notification-border-color: $--border-color-lighter !default;
$--notification-icon-size: 24px !default;
$--notification-close-font-size: $--message-close-size !default;
$--notification-group-margin: 13px !default;
$--notification-font-size: $--font-size-base !default;
$--notification-color: $--color-text-regular !default;
$--notification-title-font-size: 16px !default;
$--notification-title-color: $--color-text-primary !default;
$--notification-close-color: $--color-text-secondary !default;
$--notification-close-hover-color: $--color-text-regular !default;
$--notification-success-color: $--color-success !default;
$--notification-info-color: $--color-info !default;
$--notification-warning-color: $--color-warning !default;
$--notification-danger-color: $--color-danger !default;
/* Input
-------------------------- */
$--input-font-size: $--font-size-base !default;
$--input-color: $--color-text-regular !default;
$--input-width: 140px !default;
$--input-height: 40px !default;
$--input-border: $--border-base !default;
$--input-border-color: $--border-color-base !default;
$--input-border-radius: $--border-radius-base !default;
$--input-border-color-hover: $--border-color-hover !default;
$--input-fill: $--color-white !default;
$--input-fill-disabled: $--disabled-fill-base !default;
$--input-color-disabled: $--font-color-disabled-base !default;
$--input-icon-color: $--color-text-placeholder !default;
$--input-placeholder-color: $--color-text-placeholder !default;
$--input-max-width: 314px !default;
$--input-hover-border: $--border-color-hover !default;
$--input-clear-hover-color: $--color-text-secondary !default;
$--input-focus-border: $--color-primary !default;
$--input-focus-fill: $--color-white !default;
$--input-disabled-fill: $--disabled-fill-base !default;
$--input-disabled-border: $--disabled-border-base !default;
$--input-disabled-color: $--disabled-color-base !default;
$--input-disabled-placeholder-color: $--color-text-placeholder !default;
$--input-medium-font-size: 14px !default;
$--input-medium-height: 36px !default;
$--input-small-font-size: 13px !default;
$--input-small-height: 32px !default;
$--input-mini-font-size: 12px !default;
$--input-mini-height: 28px !default;
/* Cascader
-------------------------- */
$--cascader-menu-fill: $--fill-base !default;
$--cascader-menu-font-size: $--font-size-base !default;
$--cascader-menu-radius: $--border-radius-base !default;
$--cascader-menu-border: $--border-base !default;
$--cascader-menu-border-color: $--border-color-base !default;
$--cascader-menu-border-width: $--border-width-base !default;
$--cascader-menu-color: $--color-text-regular !default;
$--cascader-menu-option-color-active: $--color-text-secondary !default;
$--cascader-menu-option-fill-active: rgba($--color-text-secondary, 0.12) !default;
$--cascader-menu-option-color-hover: $--color-text-regular !default;
$--cascader-menu-option-fill-hover: rgba($--color-text-primary, 0.06) !default;
$--cascader-menu-option-color-disabled: #999 !default;
$--cascader-menu-option-fill-disabled: rgba($--color-black, 0.06) !default;
$--cascader-menu-option-empty-color: #666 !default;
$--cascader-menu-group-color: #999 !default;
$--cascader-menu-shadow: 0 1px 2px rgba($--color-black, 0.14), 0 0 3px rgba($--color-black, 0.14) !default;
$--cascader-menu-option-pinyin-color: #999 !default;
$--cascader-menu-submenu-shadow: 1px 1px 2px rgba($--color-black, 0.14), 1px 0 2px rgba($--color-black, 0.14) !default;
/* Group
-------------------------- */
$--group-option-flex: 0 0 (1/5) * 100% !default;
$--group-option-offset-bottom: 12px !default;
$--group-option-fill-hover: rgba($--color-black, 0.06) !default;
$--group-title-color: $--color-black !default;
$--group-title-font-size: $--font-size-base !default;
$--group-title-width: 66px !default;
/* Tab
-------------------------- */
$--tab-font-size: $--font-size-base !default;
$--tab-border-line: 1px solid #e4e4e4 !default;
$--tab-header-color-active: $--color-text-secondary !default;
$--tab-header-color-hover: $--color-text-regular !default;
$--tab-header-color: $--color-text-regular !default;
$--tab-header-fill-active: rgba($--color-black, 0.06) !default;
$--tab-header-fill-hover: rgba($--color-black, 0.06) !default;
$--tab-vertical-header-width: 90px !default;
$--tab-vertical-header-count-color: $--color-white !default;
$--tab-vertical-header-count-fill: $--color-text-secondary !default;
/* Button
-------------------------- */
$--button-font-size: 14px !default;
$--button-font-weight: $--font-weight-primary !default;
$--button-border-radius: $--border-radius-base !default;
$--button-padding-vertical: 12px !default;
$--button-padding-horizontal: 20px !default;
$--button-medium-font-size: 14px !default;
$--button-medium-border-radius: $--border-radius-base !default;
$--button-medium-padding-vertical: 10px !default;
$--button-medium-padding-horizontal: 20px !default;
$--button-small-font-size: 12px !default;
$--button-small-border-radius: #{$--border-radius-base - 1} !default;
$--button-small-padding-vertical: 9px !default;
$--button-small-padding-horizontal: 15px !default;
$--button-mini-font-size: 12px !default;
$--button-mini-border-radius: #{$--border-radius-base - 1} !default;
$--button-mini-padding-vertical: 7px !default;
$--button-mini-padding-horizontal: 15px !default;
$--button-default-color: $--color-text-regular !default;
$--button-default-fill: $--color-white !default;
$--button-default-border: $--border-color-base !default;
$--button-disabled-color: $--color-text-placeholder !default;
$--button-disabled-fill: $--color-white !default;
$--button-disabled-border: $--border-color-lighter !default;
$--button-primary-border: $--color-primary !default;
$--button-primary-color: $--color-white !default;
$--button-primary-fill: $--color-primary !default;
$--button-success-border: $--color-success !default;
$--button-success-color: $--color-white !default;
$--button-success-fill: $--color-success !default;
$--button-warning-border: $--color-warning !default;
$--button-warning-color: $--color-white !default;
$--button-warning-fill: $--color-warning !default;
$--button-danger-border: $--color-danger !default;
$--button-danger-color: $--color-white !default;
$--button-danger-fill: $--color-danger !default;
$--button-info-border: $--color-info !default;
$--button-info-color: $--color-white !default;
$--button-info-fill: $--color-info !default;
$--button-hover-tint-percent: 20% !default;
$--button-active-shade-percent: 10% !default;
/* cascader
-------------------------- */
$--cascader-height: 200px !default;
/* Switch
-------------------------- */
$--switch-on-color: $--color-primary !default;
$--switch-off-color: $--border-color-base !default;
$--switch-disabled-color: $--border-color-lighter !default;
$--switch-disabled-text-color: $--color-text-placeholder !default;
$--switch-font-size: $--font-size-base !default;
$--switch-core-border-radius: 10px !default;
$--switch-width: 40px !default;
$--switch-height: 20px !default;
$--switch-button-size: 16px !default;
/* Dialog
-------------------------- */
$--dialog-background-color: $--color-primary-light-4 !default;
$--dialog-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !default;
$--dialog-close-hover-color: $--color-primary !default;
$--dialog-title-font-size: $--font-size-large !default;
$--dialog-font-size: 14px !default;
$--dialog-line-height: $--font-line-height-primary !default;
$--dialog-padding-primary: 20px !default;
/* Table
-------------------------- */
$--table-border-color: $--border-color-lighter !default;
$--table-border: 1px solid $--table-border-color !default;
$--table-text-color: $--color-text-regular !default;
$--table-header-color: $--color-text-secondary !default;
$--table-row-hover-background: $--background-color-base !default;
$--table-current-row-background: $--color-primary-light-9 !default;
$--table-header-background: $--color-white !default;
$--table-footer-background: $--color-text-placeholder !default;
$--table-fixed-box-shadow: 0 0 10px rgba(0, 0, 0, .12) !default;
/* Pagination
-------------------------- */
$--pagination-font-size: 13px !default;
$--pagination-fill: $--color-white !default;
$--pagination-color: $--color-text-primary !default;
$--pagination-border-radius: 3px !default;
$--pagination-button-color: $--color-text-primary !default;
$--pagination-button-width: 35.5px !default;
$--pagination-button-height: 28px !default;
$--pagination-button-disabled-color: $--color-text-placeholder !default;
$--pagination-button-disabled-fill: $--color-white !default;
$--pagination-hover-fill: $--color-primary !default;
$--pagination-hover-color: $--color-white !default;
/* Popover
-------------------------- */
$--popover-fill: $--color-white !default;
$--popover-font-size: $--font-size-base !default;
$--popover-border-color: $--border-color-lighter !default;
$--popover-arrow-size: 6px !default;
$--popover-padding: 12px !default;
$--popover-padding-large: 18px 20px !default;
$--popover-title-font-size: 16px !default;
$--popover-title-color: $--color-text-primary !default;
/* Tooltip
-------------------------- */
$--tooltip-fill: $--color-text-primary !default;
$--tooltip-color: $--color-white !default;
$--tooltip-font-size: 12px !default;
$--tooltip-border-color: $--color-text-primary !default;
$--tooltip-arrow-size: 6px !default;
$--tooltip-padding: 10px !default;
/* Tag
-------------------------- */
$--tag-padding: 0 10px !default;
$--tag-fill: rgba($--color-primary, 0.10) !default;
$--tag-color: $--color-primary !default;
$--tag-border: rgba($--color-primary, 0.20) !default;
$--tag-font-size: 12px !default;
$--tag-border-radius: 4px !default;
$--tag-info-fill: rgba($--color-info, 0.10) !default;
$--tag-info-border: rgba($--color-info, 0.20) !default;
$--tag-info-color: $--color-info !default;
$--tag-primary-fill: rgba($--color-primary, 0.10) !default;
$--tag-primary-border: rgba($--color-primary, 0.20) !default;
$--tag-primary-color: $--color-primary !default;
$--tag-success-fill: rgba($--color-success, 0.10) !default;
$--tag-success-border: rgba($--color-success, 0.20) !default;
$--tag-success-color: $--color-success !default;
$--tag-warning-fill: rgba($--color-warning, 0.10) !default;
$--tag-warning-border: rgba($--color-warning, 0.20) !default;
$--tag-warning-color: $--color-warning !default;
$--tag-danger-fill: rgba($--color-danger, 0.10) !default;
$--tag-danger-border: rgba($--color-danger, 0.20) !default;
$--tag-danger-color: $--color-danger !default;
/* Tree
-------------------------- */
$--tree-node-hover-color: $--background-color-base !default;
$--tree-text-color: $--color-text-regular !default;
$--tree-expand-icon-color: $--color-text-placeholder !default;
/* Dropdown
-------------------------- */
$--dropdown-menu-box-shadow: $--box-shadow-light !default;
$--dropdown-menuItem-hover-fill: $--color-primary-light-9 !default;
$--dropdown-menuItem-hover-color: $--link-color !default;
/* Badge
-------------------------- */
$--badge-fill: $--color-danger !default;
$--badge-radius: 10px !default;
$--badge-font-size: 12px !default;
$--badge-padding: 6px !default;
$--badge-size: 18px !default;
/* Card
--------------------------*/
$--card-border-color: $--border-color-lighter !default;
$--card-border-radius: 4px !default;
$--card-padding: 20px !default;
/* Slider
--------------------------*/
$--slider-main-background-color: $--color-primary !default;
$--slider-runway-background-color: $--border-color-light !default;
$--slider-button-hover-color: mix($--color-primary, black, 97%) !default;
$--slider-stop-background-color: $--color-white !default;
$--slider-disable-color: $--color-text-placeholder !default;
$--slider-margin: 16px 0 !default;
$--slider-border-radius: 3px !default;
$--slider-height: 6px !default;
$--slider-button-size: 16px !default;
$--slider-button-wrapper-size: 36px !default;
$--slider-button-wrapper-offset: -15px !default;
/* Steps
--------------------------*/
$--steps-border-color: $--disabled-border-base !default;
$--steps-border-radius: 4px !default;
$--steps-padding: 20px !default;
/* Menu
--------------------------*/
$--menu-item-color: $--color-text-primary !default;
$--menu-item-fill: $--color-white !default;
$--menu-item-hover-fill: $--color-primary-light-9 !default;
/* Rate
--------------------------*/
$--rate-height: 20px !default;
$--rate-font-size: $--font-size-base !default;
$--rate-icon-size: 18px !default;
$--rate-icon-margin: 6px !default;
$--rate-icon-color: $--color-text-placeholder !default;
/* DatePicker
--------------------------*/
$--datepicker-color: $--color-text-regular !default;
$--datepicker-off-color: $--color-text-placeholder !default;
$--datepicker-header-color: $--color-text-regular !default;
$--datepicker-icon-color: $--color-text-primary !default;
$--datepicker-border-color: $--disabled-border-base !default;
$--datepicker-inner-border-color: #e4e4e4 !default;
$--datepicker-inrange-color: $--border-color-extra-light !default;
$--datepicker-inrange-hover-color: $--border-color-extra-light !default;
$--datepicker-active-color: $--color-primary !default;
$--datepicker-text-hover-color: $--color-primary !default;
$--datepicker-cell-hover-color: #fff !default;
/* Loading
--------------------------*/
$--loading-spinner-size: 42px !default;
$--loading-fullscreen-spinner-size: 50px !default;
/* Scrollbar
--------------------------*/
$--scrollbar-background-color: rgba($--color-text-secondary, .3) !default;
$--scrollbar-hover-background-color: rgba($--color-text-secondary, .5) !default;
/* Carousel
--------------------------*/
$--carousel-arrow-font-size: 12px !default;
$--carousel-arrow-size: 36px !default;
$--carousel-arrow-background: rgba(31, 45, 61, 0.11) !default;
$--carousel-arrow-hover-background: rgba(31, 45, 61, 0.23) !default;
$--carousel-indicator-width: 30px !default;
$--carousel-indicator-height: 2px !default;
$--carousel-indicator-padding-horizontal: 4px !default;
$--carousel-indicator-padding-vertical: 12px !default;
$--carousel-indicator-out-color: $--border-color-hover !default;
/* Collapse
--------------------------*/
$--collapse-border-color: $--border-color-lighter !default;
$--collapse-header-height: 48px !default;
$--collapse-header-padding: 20px !default;
$--collapse-header-fill: $--color-white !default;
$--collapse-header-color: $--color-text-primary !default;
$--collapse-header-size: 13px !default;
$--collapse-content-fill: $--color-white !default;
$--collapse-content-size: 13px !default;
$--collapse-content-color: $--color-text-primary !default;
/* Transfer
--------------------------*/
$--transfer-border-color: $--border-color-lighter !default;
$--transfer-border-radius: $--border-radius-base !default;
$--transfer-panel-width: 200px !default;
$--transfer-panel-header-height: 40px !default;
$--transfer-panel-header-background: $--background-color-base !default;
$--transfer-panel-footer-height: 40px !default;
$--transfer-panel-body-height: 246px !default;
$--transfer-item-height: 30px !default;
$--transfer-item-hover-background: $--color-text-secondary !default;
$--transfer-filter-height: 32px !default;
/* Header
--------------------------*/
$--header-padding: 0 20px !default;
/* Footer
--------------------------*/
$--footer-padding: 0 20px !default;
/* Main
--------------------------*/
$--main-padding: 20px !default;
/* Break-point
--------------------------*/
$--sm: 768px !default;
$--md: 992px !default;
$--lg: 1200px !default;
$--xl: 1920px !default;
$--breakpoints: (
'xs' : (max-width: $--sm),
'sm' : (min-width: $--sm),
'md' : (min-width: $--md),
'lg' : (min-width: $--lg),
'xl' : (min-width: $--xl)
);
$--breakpoints-spec: (
'xs-only' : (max-width: $--sm - 1),
'sm-and-up' : (min-width: $--sm),
'sm-only': "(min-width: #{$--sm}) and (max-width: #{$--md} - 1)",
'sm-and-down': (max-width: $--md - 1),
'md-and-up' : (min-width: $--md),
'md-only': "(min-width: #{$--md}) and (max-width: #{$--lg } - 1)",
'md-and-down': (max-width: $--lg - 1),
'lg-and-up' : (min-width: $--lg),
'lg-only': "(min-width: #{$--lg}) and (max-width: #{$--xl } - 1)",
'lg-and-down': (max-width: $--xl - 1),
'xl-only' : (min-width: $--xl),
);
var gulp = require('gulp');
var fs = require("fs");
var tap = require('gulp-tap');
var minimist = require('minimist');
var merge = require('merge-stream');
var rename = require('gulp-rename');
var del = require("del");
var concat = require('gulp-concat');
var gulpif=require("gulp-if");
var knownOptions = {
string: 'name',
string: 'bizfile',
default: { name: process.env.NODE_ENV || 'Test' }
};
var options = minimist(process.argv.slice(2), knownOptions);
var name = options.name;
var bizfile = options.bizfile;
const BUILD_PATH = "./extra/build";
const DEST_PATH = "./extra/dest";
const CTL_PATH = "./app/base/controller/impl";
const SERVICE_PATH = "./app/base/service/impl";
const DAO_PATH = "./app/base/db/impl";
const PAGE_PATH = "./app/front/vues/pages";
const VUECOM_PATH = "./app/front/vues";
const CSS_PATH = "./app/front/entry/public/css";
const IMG_PATH = "./extra/imgs";
const DEST_IMGPATH="./app/front/entry/public/imgs";
const METABIZ_PATH = "./app/base/db/metadata/bizs/wx76a324c5d201d1a4";
gulp.task('makefile', function (done) {
// 将你的默认的任务代码放在这
del("./extra/dest/*");
var tmpName = name.toLowerCase();
var fstream = gulp.src("./extra/build/*.js")
.pipe(tap(function (file) {
var sfile = file.contents.toString('utf-8');
var rpstr = sfile.replace(/\$\{Name\}/g, name);
file.contents = new Buffer(rpstr, "utf-8");
})).pipe(
rename(function (path) {
path.basename = path.basename.replace("templ", tmpName);
})
).pipe(gulp.dest("./extra/dest"));
return fstream;
// var pageStream=gulp.src("./extra/build/page/**/*").pipe(
// gulp.dest("./extra/dest")
// );
// return merge(fstream, pageStream);
});
gulp.task('page', function (cbk) {
var tmpName = name.toLowerCase();
return gulp.src("./extra/build/page/templPage/*.*")
.pipe(
rename(function (path) {
path.basename = path.basename.replace("templ", tmpName);
})
).pipe(tap(function (file) {
var sfile = file.contents.toString();
var rpstr = sfile.replace(/\$\{COMNAME\}/g, "gsb_" + tmpName);
file.contents = new Buffer(rpstr, "utf-8");
})).pipe(
gulp.dest("./extra/dest/" + tmpName + "/")
);
});
gulp.task("cpctl", function (cbk) {
var tmpName=name.toLowerCase();
return gulp.src("./extra/dest/" + tmpName + "Ctl.js").pipe(
rename(function (path) {
path.basename=path.basename.substring(0,1).toLowerCase() + path.basename.substring(1);
})
).pipe(gulp.dest(CTL_PATH));
});
gulp.task("cpsve", function (cbk) {
var tmpName=name.toLowerCase();
return gulp.src("./extra/dest/" + tmpName + "Sve.js").pipe(
rename(function (path) {
path.basename = path.basename.substring(0, 1).toLowerCase() + path.basename.substring(1);
})
).pipe(gulp.dest(SERVICE_PATH));
});
gulp.task("cpdao", function (cbk) {
var tmpName=name.toLowerCase();
return gulp.src("./extra/dest/" + tmpName + "Dao.js").pipe(
rename(function (path) {
path.basename = path.basename.substring(0, 1).toLowerCase() + path.basename.substring(1);
})
).pipe(gulp.dest(DAO_PATH));
});
gulp.task("cppage", function (cbk) {
var tmpName=name.toLowerCase();
return gulp.src("./extra/dest/" + tmpName + "/*.*").pipe(gulp.dest(PAGE_PATH + "/" + tmpName + "/"));
});
gulp.task("cpbizfile", function (cbk) {
return gulp.src("./extra/build/page/meta.js").pipe(
rename(function (path) {
if (bizfile) {
path.basename = bizfile;
} else {
path.basename = name;
}
})
).pipe(gulp.dest(METABIZ_PATH + "/"));
});
gulp.task("simple", ['page', 'cppage', 'cpbizfile'], function (done) {
done();
});
gulp.task('all', ['makefile', 'page', 'cpctl', 'cpsve', 'cpdao', 'cppage', 'cpbizfile'], function (done) {
done();
});
var minifycss = require('gulp-minify-css')
gulp.task("pagecss",function(cbk){
function defaultcondition(file){
if(file.path.indexOf("spring")>=0){
return false;
}else if(file.path.indexOf("summer")>=0){
return false;
}else if(file.path.indexOf("autumn")>=0){
return false;
}else if(file.path.indexOf("winter")>=0){
return false;
}else{
return true;
}
}
return gulp.src(VUECOM_PATH+"/**/*/*.css").pipe(
gulpif(defaultcondition,concat("pagecom.css"))
).pipe(minifycss()).pipe(gulp.dest(CSS_PATH+"/"));
});
gulp.task("springcss",function(cbk){
function springcondition(file){
if(file.path.indexOf("spring")>=0){
return true;
}
return false;
}
return gulp.src(VUECOM_PATH+"/**/*/*.css").pipe(
gulpif(springcondition,concat("spring.css"))
).pipe(minifycss()).pipe(gulp.dest(CSS_PATH+"/"));
});
gulp.task("summercss",function(cbk){
function summercondition(file){
if(file.path.indexOf("summer")>=0){
return true;
}
return false;
}
return gulp.src(VUECOM_PATH+"/**/*/*.css").pipe(
gulpif(summercondition,concat("summer.css"))
).pipe(minifycss()).pipe(gulp.dest(CSS_PATH+"/"));
});
gulp.task("autumncss",function(cbk){
function autumncondition(file){
if(file.path.indexOf("autumn")>=0){
return true;
}
return false;
}
return gulp.src(VUECOM_PATH+"/**/*/*.css").pipe(
gulpif(autumncondition,concat("autumn.css"))
).pipe(minifycss()).pipe(gulp.dest(CSS_PATH+"/"));
});
gulp.task("wintercss",function(cbk){
function wintercondition(file){
if(file.path.indexOf("winter")>=0){
return true;
}
return false;
}
return gulp.src(VUECOM_PATH+"/**/*/*.css").pipe(
gulpif(wintercondition,concat("winter.css"))
).pipe(minifycss()).pipe(gulp.dest(CSS_PATH+"/"));
});
gulp.task("1",function(cbk){
function mobilecondition(file){
if(file.path.indexOf("mobile")>=0){
return true;
}
return false;
}
return gulp.src(VUECOM_PATH+"/**/*/*.css").pipe(
gulpif(mobilecondition,concat("mobile.css"))
).pipe(minifycss()).pipe(gulp.dest(CSS_PATH+"/"));
});
gulp.task('allcss', ['pagecss', 'springcss', 'summercss', 'autumncss', 'wintercss'], function (done) {
done();
});
gulp.task('watch', function () {
gulp.watch(VUECOM_PATH+"/**/*/*.css",gulp.series(['allcss']));
});
gulp.task("basehandle",function(cbk){
return gulp.src(VUECOM_PATH+"/base/**/*.vue").
pipe(tap(function (file) {
file.contents=new Buffer(require(file.path).replace(/\n/g,""), "utf-8");
})).pipe(gulp.dest(VUECOM_PATH+"/allie/base/"));
});
var gulp = require('gulp'),
imagemin = require('gulp-imagemin');
pngquant = require('imagemin-pngquant'),
gulp.task('testimg', function () {
del("./extra/testimgs/*");
return gulp.src(IMG_PATH+'/**/*.{png,jpg,gif,ico}')
.pipe(imagemin({
optimizationLevel: 1, //类型:Number 默认:3 取值范围:0-7(优化等级)
progressive: true, //类型:Boolean 默认:false 无损压缩jpg图片
interlaced: true, //类型:Boolean 默认:false 隔行扫描gif进行渲染
multipass: true,//类型:Boolean 默认:false 多次优化svg直到完全优化
use:[pngquant({
quality: [0.3]
})]
}))
//.pipe(gulp.dest(DEST_IMGPATH));
.pipe(gulp.dest("./extra/testimgs/"));
});
\ No newline at end of file
var http = require('http');
var express = require('express');
var app = express();
var setttings=require("./app/config/settings");
var environment = require('./app/config/environment');
// var SocketServer=require("./app/config/socket.server");
//const cluster = require('cluster');
//const numCPUs = require('os').cpus().length;
// all environments
environment(app);//初始化环境
// 错误处理中间件应当在路由加载之后才能加载
// if (cluster.isMaster) {
// console.log(`Master ${process.pid} is running`);
//
// // Fork workers.
// for (let i = 0; i < numCPUs; i++) {
// cluster.fork();
// }
// cluster.on('exit', (worker, code, signal) => {
// console.log(`worker ${worker.process.pid} died`);
// });
// }else{
// var server = http.createServer(app);
// var socketServer = new SocketServer(server);
// server.listen(setttings.port, function(){
// console.log('Express server listening on port ' + app.get('port'));
// });
// }
var server = http.createServer(app);
//var socketServer = new SocketServer(server);
server.listen(setttings.port, function(){
console.log('Express server listening on port ' + app.get('port'));
});
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "center-manage",
"version": "1.0.0",
"description": "h5framework",
"main": "main.js",
"scripts": {
"dev": "nodemon main.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "jy",
"license": "ISC",
"dependencies": {
"@alicloud/pop-core": "^1.7.7",
"MD5": "^1.3.0",
"after": "^0.8.2",
"ali-oss": "^4.12.2",
"babel-polyfill": "^6.26.0",
"base64id": "^1.0.0",
"bluebird": "^3.5.1",
"body-parser": "^1.18.2",
"co": "^4.6.0",
"connect-history-api-fallback": "^1.6.0",
"connect-redis": "^3.3.3",
"continuation-local-storage": "^3.2.1",
"cookie-parser": "^1.4.3",
"crypto": "^1.0.1",
"crypto-js": "^3.3.0",
"easyimage": "^3.1.0",
"ejs": "^2.5.8",
"engine.io-parser": "^2.1.2",
"errorhandler": "^1.5.0",
"exceljs": "^1.6.3",
"exif-js": "^2.3.0",
"express": "^4.16.2",
"express-session": "^1.15.6",
"glob": "^7.1.6",
"gm": "^1.23.1",
"jsonwebtoken": "^8.5.1",
"log4js": "^2.10.0",
"method-override": "^2.3.10",
"moment": "^2.26.0",
"morgan": "^1.9.0",
"multer": "^1.3.0",
"mysql2": "^1.5.3",
"node-cron": "^2.0.1",
"node-uuid": "^1.4.8",
"pdfcrowd": "^4.2.0",
"pem-jwk": "^2.0.0",
"pinyin": "^2.8.3",
"qr-image": "^3.2.0",
"request": "^2.88.2",
"sequelize": "^4.37.8",
"sequelize-cli": "^4.1.1",
"serve-favicon": "^2.4.5",
"sha1": "^1.1.1",
"sha256": "^0.2.0",
"socket.io": "^2.1.1",
"uuid": "^3.2.1",
"xml2js": "^0.4.19"
},
"devDependencies": {
"del": "^5.1.0",
"gulp-concat": "^2.6.1",
"gulp-if": "^3.0.0",
"gulp-imagemin": "^6.2.0",
"gulp-minify-css": "^1.2.4",
"gulp-tap": "^2.0.0",
"imagemin-pngquant": "^8.0.0",
"merge-stream": "^2.0.0"
}
}
******渠道过滤*******查询****从中台获取 todo ----------------------
产品类型 + 地区------产品
产品定价表
产品A + 小规模集团 =200 按次
产品A + 小规模集团 =1000 按时间 1-3工作日
产品A + 小规模集团 =500 按时间 3-5工作日
产品A + 小规模股份 =300
{}
1.渠道管理
-建立渠道( 简码 名称 域名 )
--同时给中台服务建立一个新的路由
--建立路径与方法名的映射表,从属于渠道
--在中台建立新的 拦截器,读取渠道缓存,判断req.host,如果在渠道域名范围内,就
调用统一的渠道流入处理接口,解析出chanel-code,根据req.path,解析出方法名,method,调用生成者服务接口
添加数据{
channelcode:T,
method:'createChance',
bodydata:'xxx'
}
-建立消费者微服务
2.产品中心
3、交付商管理
---技能标签
---地区区域-----------组件----路径
4、日志服务调用
5、K8s环境搭建
--提供k8集群/镜像服务--git push tag--自动打包
--我们提供yaml上线文件/Dockerfile
仓库
web-deliver-center 交付中心前端
web-deliver-bussiness 工商交付前端
api-deliver-bussiness 工商交付后台
web-deliver-vat 增值电信前端
api-deliver-vat 增值电信后台
task-deliver 日常任务
仓库到YAML映射
后台(前端代码直接内置到后台服务的public目录下)
api-deliver-center 交付中心后台 -> paas-deployment.yaml
api-deliver-bussiness 工商交付后台 ->ic-deployment.yaml
api-deliver-vat 增值电信后台 -> icp-deployment.yaml
task-deliver 日常任务 ->1.icp_filebuild_cronjobs.yaml
task-deliver 日常任务 ->2.ic_filebuild_cronjobs.yaml
1.中台镜像center-manage
路由域名:delivery.brg.tencentyun.com
后台服务:paas-service
2.工商交付镜像 ic-deliver
路由域名:ic.brg.tencentyun.com
后台服务:icdeliver-service
3.ICP交付镜像 icp-deliver
路由域名:http://icp.brg.tencentyun.com/
后台服务:icpdeliver-service
4.任务镜像 center-taskexecutor
\ No newline at end of file
var settings = {
redis: {
host: "192.168.4.119",
port: 6379,
password: "Gongsibao2018",
db: 9,
},
database: {
dbname: "gsb_marketplat",
user: "write",
password: "write",
config: {
host: '43.247.184.35',
port: 8899,
dialect: 'mysql',
operatorsAliases: false,
pool: {
max: 5,
min: 0,
acquire: 90000000,
idle: 1000000
},
debug: false,
dialectOptions: {
requestTimeout: 999999,
// instanceName:'DEV'
} //设置MSSQL超时时间
}
},
kongurl: 'http://192.168.4.119:8001/',
};
module.exports = settings;
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