Commit a3c5c477 by 庄冰

statisticui

parent e86bce46
const APIBase = require("../../api.base");
const system = require("../../../system");
const settings = require("../../../../config/settings");
/**
* 用户端调用订单相关接口
*/
class Zhugeio extends APIBase {
constructor() {
super();
this.datastatisticSve = system.getObject("service.aggregation.datastatisticSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = await this.opActionProcess(pobj, pobj.actionType, req);
return result;
}
async opActionProcess(pobj, action_type, req) {
var opResult = null;
var self = this;
pobj.xctx = req.xctx;
switch (action_type) {
case "test"://测试
opResult = system.getResultSuccess("测试接口");
break;
case "synchronizeStatisticDataByZhugeIO"://同步页面访问统计数据
opResult = await this.datastatisticSve.synchronizeStatisticDataByZhugeIO();
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = Zhugeio;
var system = require("../../../system")
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;
class DatastatisticCtl extends CtlBase {
constructor() {
super("aggregation", CtlBase.getServiceName(DatastatisticCtl));
}
}
module.exports = DatastatisticCtl;
......@@ -222,6 +222,22 @@ class Dao {
async customExecAddOrPutSql(sql, paras = null) {
return this.db.query(sql, paras);
}
async customInsert(sql, paras, t) {
var tmpParas = null;
if (t && t != 'undefined') {
if (paras == null || paras == 'undefined') {
tmpParas = { type: this.db.QueryTypes.INSERT };
tmpParas.transaction = t;
} else {
tmpParas = { replacements: paras, type: this.db.QueryTypes.INSERT };
tmpParas.transaction = t;
}
} else {
tmpParas = paras == null || paras == 'undefined' || paras.keys == 0 ? { type: this.db.QueryTypes.INSERT } : { replacements: paras, type: this.db.QueryTypes.INSERT };
}
var result = this.db.query(sql, tmpParas);
return result;
}
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') {
......
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 表单信息表
*/
module.exports = (db, DataTypes) => {
return db.define("datastatistic", {
statistic_date: {
type: DataTypes.STRING
},
channel_code: {
type: DataTypes.STRING
},
channel_name: {
type: DataTypes.STRING
},
pv: {
type: DataTypes.STRING
},
uv: {
type: DataTypes.STRING
},
sub_count: {
type: DataTypes.STRING
},
push_count: {
type: DataTypes.STRING
},
customer_count: {
type: DataTypes.STRING
}
},
{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'mc_data_statistic',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const zhugeBaseUrl = "https://api.zhugeio.com/v2/stat/96223";
class DatastatisticService extends ServiceBase {
constructor() {
super("aggregation", ServiceBase.getDaoName(DatastatisticService));
this.zhugeClient = system.getObject("util.zhugeClient");
this.logClient = system.getObject("util.logClient");
}
/**
* 通过诸葛io同步统计数据
*/
async synchronizeStatisticDataByZhugeIO(){
var occurrencesList = await this.getOccurrences();
console.log(occurrencesList,"occurrencesList++++++++++++");
for(var i=0;i<occurrencesList.length;i++){
var event = occurrencesList[i];
if(event.day && event.utm_source){
event.occurrences2= event.occurrences;
var sql = "INSERT INTO `mc_data_statistic` ( statistic_date, channel_code, pv ) VALUES (:day,:utm_source,:occurrences) ON DUPLICATE KEY UPDATE pv = :occurrences2";
var res = await this.dao.customInsert(sql,event);
console.log(res,"11111111:"+event.day+","+event.utm_source+","+event.occurrences);
}
}
var userList = await this.getUsers();
console.log(userList);
for(var a=0;a<userList.length;a++){
var event = userList[a];
if(event.day && event.utm_source){
event.users2= event.users;
var sql = "INSERT INTO `mc_data_statistic` ( statistic_date, channel_code, uv ) VALUES (:day,:utm_source,:users) ON DUPLICATE KEY UPDATE uv = :users2";
var res = await this.dao.customInsert(sql,event);
console.log(res,"2222222:"+event.day+","+event.utm_source+","+event.users);
}
}
return res;
}
/**
* 通过解析Excel文件同步统计数据
*/
async synchronizeStatisticDataByExcel(){
// 1、日期判断,判断文件中的日期不能超过当前日期(且不包含当前日期)
// 2、判断渠道信息,获取全部渠道信息,只保存有效数据
// 3、判断统计数据类型 PV UV
}
//获取事件触发次数
async getOccurrences(){
try {
var url = zhugeBaseUrl+"?metrics=occurrences&dimensions=$day,$utm_source";
var rtn = await this.zhugeClient.execGet(null,url);
console.log(rtn,"rtn+++++++++++++++++++++++++++++++++++++")
this.logClient.pushlog("获取诸葛IO事件触发次数返回结果-getOccurrences",null, rtn, null);
if(rtn && rtn.stdout){
var res = JSON.parse(rtn.stdout);
if(res && res.code==10001 && res.data){
var dataList = res.data.results;
return dataList;
}
}
return null;
} catch (e) {
// this.logClient.pushlog("获取诸葛IO事件触发次数返回异常-getOccurrences",null, e, null);
console.log(e);
return null;
}
}
//获取活跃用户数量
async getUsers(){
try {
var url = zhugeBaseUrl+"?metrics=users&dimensions=$day,$utm_source";
var rtn = await this.zhugeClient.execGet(null,url);
console.log(rtn,"rtn+++++++++++++++++++++++++++++++++++++")
// this.logClient.pushlog("获取诸葛IO活跃用户数量返回结果-getUsers",null, rtn, null);
if(rtn && rtn.stdout){
var res = JSON.parse(rtn.stdout);
if(res && res.code==10001 && res.data){
var dataList = res.data.results;
return dataList;
}
}
return null;
} catch (e) {
// this.logClient.pushlog("获取诸葛IO活跃用户数量返回异常-getUsers",null, e, null);
console.log(e);
return null;
}
}
}
module.exports = DatastatisticService;
// var task = new DatastatisticService();
// task.synchronizeStatisticDataByZhugeIO().then(d=>{
// console.log("-----end--------------------");
// })
\ No newline at end of file
var childproc = require('child_process');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
class ZhugeClient {
constructor() {
this.cmdGetPattern = "curl -G -X GET -H 'Authorization:Basic MTUwMTEyNTUyNDU6OTczY2RkMDc0MzgzNDhhZDkxNTM0ZjU3OTYzMmNjNmI=' '{url}'";
}
FetchGetCmd(subData, url) {
var cmd = this.cmdGetPattern.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 exec(cmd);
return result;
}
}
module.exports = ZhugeClient;
// var x=new RestClient();
// x.execGet("","http://www.163.com").then(function(r){
// console.log(r.stdout);
// console.log(r.stderr);
// });
.ivu-modal-wrap{z-index:9999!important}
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><meta content=yes name=apple-mobile-web-app-capable><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=/ccc.png><link rel=stylesheet href=//at.alicdn.com/t/font_1996389_21r6b2e5cqci.css><title></title><link href=/css/chunk-04497344.c9ab9860.css rel=prefetch><link href=/css/chunk-07f86704.9c2d3004.css rel=prefetch><link href=/css/chunk-0c20b306.305956e2.css rel=prefetch><link href=/css/chunk-0c2187ca.de0e14cf.css rel=prefetch><link href=/css/chunk-0fb760a4.5c30cb40.css rel=prefetch><link href=/css/chunk-1021e4ee.17ba2048.css rel=prefetch><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-29ebb6f1.d1f69246.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3008061c.6014cc43.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-35ecf338.10e74e31.css rel=prefetch><link href=/css/chunk-3cca9940.6014cc43.css rel=prefetch><link href=/css/chunk-42f44164.bd629bc4.css rel=prefetch><link href=/css/chunk-44b82a04.6014cc43.css rel=prefetch><link href=/css/chunk-450f24ef.90e6aed8.css rel=prefetch><link href=/css/chunk-48aa254a.d360cbd2.css rel=prefetch><link href=/css/chunk-5a40d679.305956e2.css rel=prefetch><link href=/css/chunk-6cc861f3.6014cc43.css rel=prefetch><link href=/css/chunk-9c997554.8e4ddbca.css rel=prefetch><link href=/css/chunk-9dc7e768.305956e2.css rel=prefetch><link href=/css/chunk-a142fab8.6014cc43.css rel=prefetch><link href=/css/chunk-a1670dde.70decc8e.css rel=prefetch><link href=/css/chunk-ca97e120.6014cc43.css rel=prefetch><link href=/css/chunk-cc77621c.8797b2b5.css rel=prefetch><link href=/js/chunk-04497344.0c8a3138.js rel=prefetch><link href=/js/chunk-07f86704.30a25bc6.js rel=prefetch><link href=/js/chunk-0c20b306.728fdf52.js rel=prefetch><link href=/js/chunk-0c2187ca.f9f84370.js rel=prefetch><link href=/js/chunk-0fb760a4.def58650.js rel=prefetch><link href=/js/chunk-1021e4ee.d40517f9.js rel=prefetch><link href=/js/chunk-14b9857b.ae43b7c1.js rel=prefetch><link href=/js/chunk-1f11ec07.b7a911e5.js rel=prefetch><link href=/js/chunk-29ebb6f1.3760df0c.js rel=prefetch><link href=/js/chunk-2c359864.f1f45686.js rel=prefetch><link href=/js/chunk-2d210f61.6e56960a.js rel=prefetch><link href=/js/chunk-3008061c.05756635.js rel=prefetch><link href=/js/chunk-3385141a.16d7705b.js rel=prefetch><link href=/js/chunk-35ecf338.331d513e.js rel=prefetch><link href=/js/chunk-3cca9940.912f824d.js rel=prefetch><link href=/js/chunk-42f44164.c4f61527.js rel=prefetch><link href=/js/chunk-44b82a04.fa770833.js rel=prefetch><link href=/js/chunk-450f24ef.82af74b1.js rel=prefetch><link href=/js/chunk-48aa254a.64498aea.js rel=prefetch><link href=/js/chunk-5a40d679.97098616.js rel=prefetch><link href=/js/chunk-6cc861f3.38766ea9.js rel=prefetch><link href=/js/chunk-780401d4.2594e2ad.js rel=prefetch><link href=/js/chunk-9c997554.98400590.js rel=prefetch><link href=/js/chunk-9dc7e768.5dc43ead.js rel=prefetch><link href=/js/chunk-a142fab8.4d6dfdce.js rel=prefetch><link href=/js/chunk-a1670dde.7fb32135.js rel=prefetch><link href=/js/chunk-ca97e120.8fc3e405.js rel=prefetch><link href=/js/chunk-cc77621c.209c3f4a.js rel=prefetch><link href=/js/chunk-d710b6d2.9eff4b27.js rel=prefetch><link href=/css/app.e3db6847.css rel=preload as=style><link href=/css/chunk-vendors.a0428467.css rel=preload as=style><link href=/js/app.d0dff99a.js rel=preload as=script><link href=/js/chunk-vendors.d7daa525.js rel=preload as=script><link href=/css/chunk-vendors.a0428467.css rel=stylesheet><link href=/css/app.e3db6847.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.d7daa525.js></script><script src=/js/app.d0dff99a.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><meta content=yes name=apple-mobile-web-app-capable><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=/ccc.png><link rel=stylesheet href=//at.alicdn.com/t/font_1996389_21r6b2e5cqci.css><title></title><link href=/css/chunk-04497344.c9ab9860.css rel=prefetch><link href=/css/chunk-07f86704.9c2d3004.css rel=prefetch><link href=/css/chunk-0c20b306.305956e2.css rel=prefetch><link href=/css/chunk-0c2187ca.de0e14cf.css rel=prefetch><link href=/css/chunk-0fb760a4.5c30cb40.css rel=prefetch><link href=/css/chunk-1021e4ee.17ba2048.css rel=prefetch><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-29ebb6f1.d1f69246.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3008061c.6014cc43.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-35ecf338.10e74e31.css rel=prefetch><link href=/css/chunk-3cca9940.6014cc43.css rel=prefetch><link href=/css/chunk-42f44164.bd629bc4.css rel=prefetch><link href=/css/chunk-44b82a04.6014cc43.css rel=prefetch><link href=/css/chunk-450f24ef.90e6aed8.css rel=prefetch><link href=/css/chunk-48aa254a.d360cbd2.css rel=prefetch><link href=/css/chunk-492de752.6014cc43.css rel=prefetch><link href=/css/chunk-5a40d679.305956e2.css rel=prefetch><link href=/css/chunk-6cc861f3.6014cc43.css rel=prefetch><link href=/css/chunk-9c997554.8e4ddbca.css rel=prefetch><link href=/css/chunk-9dc7e768.305956e2.css rel=prefetch><link href=/css/chunk-a142fab8.6014cc43.css rel=prefetch><link href=/css/chunk-a1670dde.70decc8e.css rel=prefetch><link href=/css/chunk-ca97e120.6014cc43.css rel=prefetch><link href=/css/chunk-cc77621c.8797b2b5.css rel=prefetch><link href=/js/chunk-04497344.0c8a3138.js rel=prefetch><link href=/js/chunk-07f86704.30a25bc6.js rel=prefetch><link href=/js/chunk-0c20b306.728fdf52.js rel=prefetch><link href=/js/chunk-0c2187ca.f9f84370.js rel=prefetch><link href=/js/chunk-0fb760a4.def58650.js rel=prefetch><link href=/js/chunk-1021e4ee.d40517f9.js rel=prefetch><link href=/js/chunk-14b9857b.ae43b7c1.js rel=prefetch><link href=/js/chunk-1f11ec07.b7a911e5.js rel=prefetch><link href=/js/chunk-29ebb6f1.3760df0c.js rel=prefetch><link href=/js/chunk-2c359864.f1f45686.js rel=prefetch><link href=/js/chunk-2d210f61.6e56960a.js rel=prefetch><link href=/js/chunk-3008061c.05756635.js rel=prefetch><link href=/js/chunk-3385141a.16d7705b.js rel=prefetch><link href=/js/chunk-35ecf338.331d513e.js rel=prefetch><link href=/js/chunk-3cca9940.912f824d.js rel=prefetch><link href=/js/chunk-42f44164.c4f61527.js rel=prefetch><link href=/js/chunk-44b82a04.fa770833.js rel=prefetch><link href=/js/chunk-450f24ef.c773d675.js rel=prefetch><link href=/js/chunk-48aa254a.64498aea.js rel=prefetch><link href=/js/chunk-492de752.b9b5a543.js rel=prefetch><link href=/js/chunk-5a40d679.97098616.js rel=prefetch><link href=/js/chunk-6cc861f3.38766ea9.js rel=prefetch><link href=/js/chunk-780401d4.2594e2ad.js rel=prefetch><link href=/js/chunk-9c997554.98400590.js rel=prefetch><link href=/js/chunk-9dc7e768.5dc43ead.js rel=prefetch><link href=/js/chunk-a142fab8.4d6dfdce.js rel=prefetch><link href=/js/chunk-a1670dde.7fb32135.js rel=prefetch><link href=/js/chunk-ca97e120.8fc3e405.js rel=prefetch><link href=/js/chunk-cc77621c.209c3f4a.js rel=prefetch><link href=/js/chunk-d710b6d2.9eff4b27.js rel=prefetch><link href=/css/app.e3db6847.css rel=preload as=style><link href=/css/chunk-vendors.a0428467.css rel=preload as=style><link href=/js/app.1c371a69.js rel=preload as=script><link href=/js/chunk-vendors.d7daa525.js rel=preload as=script><link href=/css/chunk-vendors.a0428467.css rel=stylesheet><link href=/css/app.e3db6847.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.d7daa525.js></script><script src=/js/app.1c371a69.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-450f24ef"],{"391e":function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},i=[],r=n("9ee1"),a=r["a"],c=n("9ca4"),u=Object(c["a"])(a,o,i,!1,null,null,null);t["a"]=u.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]||0,i=window.innerHeight-o.offsetTop-t.advalue;t.frameHeight=i,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))},c1f4:function(e,t,n){"use strict";var o=n("f5f8"),i=n.n(o);i.a},deb4: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("Modal",{attrs:{title:"链接"},model:{value:e.showLinkModel,callback:function(t){e.showLinkModel=t},expression:"showLinkModel"}},[n("i-form",{attrs:{model:e.urlLink,"label-width":100}},[n("Form-item",{attrs:{label:"渠道名称"}},[e._v("\n "+e._s(e.currentRow.name)+"\n ")]),n("Form-item",{attrs:{label:"常规版链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.cgb+"?code="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.cgb+"?code="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.cgb+"?code="+e.currentRow.code)}}},[e._v("复制")])],1),n("Form-item",{attrs:{label:"列表版链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.lbb+"?code="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.lbb+"?code="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.lbb+"?code="+e.currentRow.code)}}},[e._v("复制")])],1),n("Form-item",{attrs:{label:"工商注册链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.gszc+"&homelinkcode="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.gszc+"&homelinkcode="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.gszc+"&homelinkcode="+e.currentRow.code)}}},[e._v("复制")])],1),n("Form-item",{attrs:{label:"商标注册链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.sbzc+"&homelinkcode="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.sbzc+"&homelinkcode="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.sbzc+"&homelinkcode="+e.currentRow.code)}}},[e._v("复制")])],1),n("Form-item",{attrs:{label:"代理记账链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.dljz+"&homelinkcode="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.dljz+"&homelinkcode="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.dljz+"&homelinkcode="+e.currentRow.code)}}},[e._v("复制")])],1),n("Form-item",{attrs:{label:"税收筹划链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.ssch+"&homelinkcode="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.ssch+"&homelinkcode="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.ssch+"&homelinkcode="+e.currentRow.code)}}},[e._v("复制")])],1),n("Form-item",{attrs:{label:"资质服务链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.zzfw+"&homelinkcode="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.zzfw+"&homelinkcode="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.zzfw+"&homelinkcode="+e.currentRow.code)}}},[e._v("复制")])],1),n("Form-item",{attrs:{label:"专利申请链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.zlsq+"&homelinkcode="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.zlsq+"&homelinkcode="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.zlsq+"&homelinkcode="+e.currentRow.code)}}},[e._v("复制")])],1),n("Form-item",{attrs:{label:"著作权链接"}},[n("i-input",{attrs:{disabled:"",value:e.urlLink.zzq+"&homelinkcode="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.zzq+"&homelinkcode="+e.currentRow,"code",t)}}}),n("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.zzq+"&homelinkcode="+e.currentRow.code)}}},[e._v("复制")])],1)],1)],1),n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var o=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,tblheight:o-120,metaName:"launch_channel",packageName:"configmag",modelName:"launchchannel",isMulti:"",savebefore:e.savebefore,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})],1)},i=[],r=n("06d3"),a=n("391e"),c=n("f348"),u=n.n(c),l={name:"launchchannel_page",data:function(){return{currentRow:{},showLinkModel:!1,code:"",urlLink:{cgb:"https://mmap.gongsibao.com/#/aggregation/home",lbb:"https://mmap.gongsibao.com/#/aggregation/homelists",gszc:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E5%B7%A5%E5%95%86%E6%9C%8D%E5%8A%A1",sbzc:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E5%95%86%E6%A0%87%E6%B3%A8%E5%86%8C",dljz:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E4%BB%A3%E8%B4%A6%E6%9C%8D%E5%8A%A1",ssch:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E7%A8%8E%E6%94%B6%E7%AD%B9%E5%88%92",zzfw:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E8%B5%84%E8%B4%A8%E8%AE%A4%E8%AF%81",zlsq:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E4%B8%93%E5%88%A9%E6%9C%8D%E5%8A%A1",zzq:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E8%91%97%E4%BD%9C%E6%9D%83"}}},components:{BizTable:r["a"],PageSpace:a["a"]},methods:{copyLink:function(e){var t=this,n=new u.a(".tag",{text:function(){return e}});n.on("success",(function(e){t.$Message.success("复制成功!"),n.destroy()})),n.on("error",(function(e){t.$Message.error("复制失败!"),n.destroy()}))},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){"auth"==e&&this.$router.push({name:"role_auth",query:{roleid:t.id,rolecode:t.code}}),"urllink"==e&&(this.showLinkModel=!0,this.code=t.code,this.currentRow=t)},formatCol:function(e,t,n){return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]},oninitbtn:function(e,t){"urllink"===e.key&&"2"!=t.channel_type?e.ishide=!0:e.ishide=!1}}},s=l,d=(n("c1f4"),n("9ca4")),m=Object(d["a"])(s,o,i,!1,null,null,null);t["default"]=m.exports},f5f8:function(e,t,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-450f24ef"],{"391e":function(e,t,o){"use strict";var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},r=[],c=o("9ee1"),u=c["a"],i=o("9ca4"),a=Object(i["a"])(u,n,r,!1,null,null,null);t["a"]=a.exports},"9ee1":function(e,t,o){"use strict";(function(e){o("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 o=e("#framediv"),n=o.get()[0]||0,r=window.innerHeight-n.offsetTop-t.advalue;t.frameHeight=r,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,o("a336"))},c1f4:function(e,t,o){"use strict";var n=o("f5f8"),r=o.n(n);r.a},deb4: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("Modal",{attrs:{title:"链接"},model:{value:e.showLinkModel,callback:function(t){e.showLinkModel=t},expression:"showLinkModel"}},[o("i-form",{attrs:{model:e.urlLink,"label-width":100}},[o("Form-item",{attrs:{label:"渠道名称"}},[e._v("\n "+e._s(e.currentRow.name)+"\n ")]),o("Form-item",{attrs:{label:"常规版链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.cgb+"?code="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.cgb+"?code="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.cgb+"?code="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1),o("Form-item",{attrs:{label:"列表版链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.lbb+"?code="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.lbb+"?code="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.lbb+"?code="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1),o("Form-item",{attrs:{label:"工商注册链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.gszc+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.gszc+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.gszc+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1),o("Form-item",{attrs:{label:"商标注册链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.sbzc+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.sbzc+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.sbzc+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1),o("Form-item",{attrs:{label:"代理记账链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.dljz+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.dljz+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.dljz+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1),o("Form-item",{attrs:{label:"税收筹划链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.ssch+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.ssch+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.ssch+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1),o("Form-item",{attrs:{label:"资质服务链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.zzfw+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.zzfw+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.zzfw+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1),o("Form-item",{attrs:{label:"专利申请链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.zlsq+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.zlsq+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.zlsq+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1),o("Form-item",{attrs:{label:"著作权链接"}},[o("i-input",{attrs:{disabled:"",value:e.urlLink.zzq+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code},on:{"update:value":function(t){return e.$set(e.urlLink.zzq+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow,"code",t)}}}),o("i-button",{staticClass:"tag",on:{click:function(t){return e.copyLink(e.urlLink.zzq+"&homelinkcode="+e.currentRow.code+"&utm_source="+e.currentRow.code)}}},[e._v("复制")])],1)],1)],1),o("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var n=t.adjustHeight;return[o("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,tblheight:n-120,metaName:"launch_channel",packageName:"configmag",modelName:"launchchannel",isMulti:"",savebefore:e.savebefore,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})],1)},r=[],c=o("06d3"),u=o("391e"),i=o("f348"),a=o.n(i),s={name:"launchchannel_page",data:function(){return{currentRow:{},showLinkModel:!1,code:"",urlLink:{cgb:"https://mmap.gongsibao.com/#/aggregation/home",lbb:"https://mmap.gongsibao.com/#/aggregation/homelists",gszc:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E5%B7%A5%E5%95%86%E6%9C%8D%E5%8A%A1",sbzc:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E5%95%86%E6%A0%87%E6%B3%A8%E5%86%8C",dljz:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E4%BB%A3%E8%B4%A6%E6%9C%8D%E5%8A%A1",ssch:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E7%A8%8E%E6%94%B6%E7%AD%B9%E5%88%92",zzfw:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E8%B5%84%E8%B4%A8%E8%AE%A4%E8%AF%81",zlsq:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E4%B8%93%E5%88%A9%E6%9C%8D%E5%8A%A1",zzq:"https://mmap.gongsibao.com/#/aggregation/information?firstTypeName=%E8%91%97%E4%BD%9C%E6%9D%83"}}},components:{BizTable:c["a"],PageSpace:u["a"]},methods:{copyLink:function(e){var t=this,o=new a.a(".tag",{text:function(){return e}});o.on("success",(function(e){t.$Message.success("复制成功!"),o.destroy()})),o.on("error",(function(e){t.$Message.error("复制失败!"),o.destroy()}))},savebefore:function(e,t,o){return o(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,o){return o(t)},onexec:function(e,t){"auth"==e&&this.$router.push({name:"role_auth",query:{roleid:t.id,rolecode:t.code}}),"urllink"==e&&(this.showLinkModel=!0,this.code=t.code,this.currentRow=t)},formatCol:function(e,t,o){return"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]},oninitbtn:function(e,t){"urllink"===e.key&&"2"!=t.channel_type?e.ishide=!0:e.ishide=!1}}},l=s,d=(o("c1f4"),o("9ca4")),m=Object(d["a"])(l,n,r,!1,null,null,null);t["default"]=m.exports},f5f8:function(e,t,o){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-492de752"],{"391e":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},r=[],n=a("9ee1"),o=n["a"],c=a("9ca4"),i=Object(c["a"])(o,s,r,!1,null,null,null);t["a"]=i.exports},"894e":function(e,t,a){},"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]||0,r=window.innerHeight-s.offsetTop-t.advalue;t.frameHeight=r,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))},c397: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:{formatCol:e.formatCol,tblheight:s-120,metaName:"channel_data_statistic",packageName:"aggregation",modelName:"datastatistic",isMulti:"",savebefore:e.savebefore,editbefore:e.beforedit,addbefore:e.beforeadd},on:{formevent:e.onformevent,onexec:e.onexec}}),a("Drawer",{ref:"advsearchform",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"50"},model:{value:e.showsearchform,callback:function(t){e.showsearchform=t},expression:"showsearchform"}},[a("Card",{ref:"formcard",staticStyle:{"border-radius":"0px","padding-bottom":"60px",border:"none"},attrs:{"dis-hover":"",bordered:!1}},[a("p",{attrs:{slot:"title"},slot:"title"},[a("Icon",{attrs:{type:"ios-paper-outline"}}),e._v("高级查询 ")],1),a("Form",{ref:"advSearchForm",attrs:{model:e.searchModel,"label-position":"right"}},[a("FormItem",{attrs:{label:"渠道名称"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.searchModel["channel_name"],expression:"searchModel['channel_name']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入渠道名称"},domProps:{value:e.searchModel["channel_name"]},on:{input:function(t){t.target.composing||e.$set(e.searchModel,"channel_name",t.target.value)}}})]),a("FormItem",{attrs:{label:"日期"}},[a("DatePicker",{staticStyle:{width:"200px"},attrs:{type:"daterange",placeholder:"请选择提交日期"},model:{value:e.searchModel.statistic_date,callback:function(t){e.$set(e.searchModel,"statistic_date",t)},expression:"searchModel.statistic_date"}})],1)],1),a("div",{staticClass:"form-footer",staticStyle:{width:"30%"}},[a("Button",{attrs:{type:"text"},on:{click:e.advsearch}},[e._v("搜索")]),a("Button",{attrs:{type:"text"},on:{click:e.advchildcancle}},[e._v("取消")])],1)],1)],1)]}}])})},r=[],n=a("06d3"),o=a("391e"),c={name:"channeldatastatistic_page",data:function(){return{showsearchform:!1,searchModel:{created_at:[]}}},components:{BizTable:n["a"],PageSpace:o["a"]},methods:{onformevent:function(e,t){},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}}),"advsearch"==e&&(this.showsearchform=!0)},formatCol:function(e,t,a){return"created_at"==t||"updated_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):"pic_url"==t?'<img src="'.concat(e[t],'" style="width:50px;height:50px"></img>'):"pic_size"==t?"<span>".concat((e[t]/1024).toFixed(1)," KB</span>"):"sub_status"==t?1==e[t]?"<span>成功</span>":2==e[t]?"<span>失败</span>":"<span></span>":"push_status"==t?0==e[t]?"<span>未推送</span>":1==e[t]?"<span>成功</span>":2==e[t]?"<span>失败</span>":"<span></span>":"notes"==t?2==e["push_status"]?e[t]:"<span>-</span>":"sub_notes"==t?2==e["sub_status"]?e[t]:"<span>-</span>":e[t]},advsearch:function(){this.$refs.bt.$refs.searchform.formModel.channel_name=this.searchModel.channel_name,this.$refs.bt.$refs.searchform.formModel.created_at=this.searchModel.created_at,this.$refs.bt.$refs.searchform.formModel.contact_mobile=this.searchModel.contact_mobile,this.$refs.bt.$refs.searchform.formModel.push_status=this.searchModel.push_status,this.$refs.bt.$refs.searchform.formModel.sub_status=this.searchModel.sub_status,this.showsearchform=!1,this.$refs.bt.fetchData()},advchildcancle:function(){this.showsearchform=!1,this.searchModel={created_at:[]},this.$refs.bt.fetchData()}}},i=c,l=(a("e706"),a("9ca4")),h=Object(l["a"])(i,s,r,!1,null,null,null);t["default"]=h.exports},e706:function(e,t,a){"use strict";var s=a("894e"),r=a.n(s);r.a}}]);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment