Commit a7225472 authored by youjie's avatar youjie

no message

parent f4e43008
......@@ -236,6 +236,25 @@ Vue.prototype.UploadLocalSystem = function (params, fileObj, successCall) {
});
}
// 导入引流汇总
Vue.prototype.UploadFlowStat = function (params, fileObj, successCall) {
let that = this;
let url = that.domainManager().PostUrl + "/api/Upload/UploadFlowStat";
let formData = new FormData()
if (params) {
formData.append("params", JSON.stringify(params));
}
formData.append('myfile', fileObj);
co(function* () {
that.$http.post(url, formData, {})
.then(res => {
successCall(res);
})
}).catch(function (err) {
console.log("上传文件出错" + err);
});
}
//新页面打开页面
Vue.prototype.OpenNewUrl = function (path, queryObj) {
var newUrl = this.$router.resolve({
......
......@@ -10,7 +10,8 @@
<i class="iconfont icongengduo"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1"><i class="iconfont icondaochu"></i> 导出</el-dropdown-item>
<el-dropdown-item command="1"><i class="iconfont icondaoru"></i> 导入</el-dropdown-item>
<el-dropdown-item command="2"><i class="iconfont icondaochu"></i> 导出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
......@@ -25,17 +26,6 @@
:value="item.Id"></el-option>
</el-select>
</el-col>
<el-col :xs="7" :sm="6" :md="5" :lg="4" :xl="3">
<span class="font-size-12" style="padding-right: 10px">平台</span>
<el-select v-model="msg.PlatformType" size="small" placeholder="请选择平台" @change="init">
<el-option
v-for="item in PlatformTypeList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-col>
<el-col :xs="7" :sm="6" :md="5" :lg="4" :xl="3">
<span class="font-size-12" style="padding-right: 10px">板块</span>
<el-select v-model="msg.ModuleTypeIds" size="small" placeholder="请选择板块" @change="init"
......@@ -58,45 +48,97 @@
</div>
<div style="padding: 0 0;background: #ffffff;">
<el-table
v-if="msg.PlatformType==1"
:data="dataList"
style="width: 100%"
height="500"
:border="true"
:fit="true"
v-loading="loading"
:cell-style="columenStyle"
:header-cell-style="getRowClass"
>
<el-table-column width="100" fixed prop="Name" label="账号名称"></el-table-column>
<el-table-column prop="" label="粉丝数"><template slot-scope="scope"></template></el-table-column>
<el-table-column width="100" prop="" label="粉丝成长率"></el-table-column>
<el-table-column width="200">
<el-table-column width="100" fixed prop="AccountName" label="账号名称"></el-table-column>
<el-table-column prop="FansNum" label="粉丝数"><template slot-scope="scope"></template></el-table-column>
<el-table-column width="100" prop="FansRate" label="粉丝成长率"></el-table-column>
<el-table-column width="120">
<template slot="header" slot-scope="scope">
<el-tooltip class="item" effect="dark" content="近七天新增粉絲率(8月24~31日)" placement="top-start">
<p>近七天新增粉絲率(8月24~31日)</p>
<el-tooltip class="item" effect="dark" content="近七天新增粉丝量" placement="top-start">
<p>近七天新增粉丝量</p>
</el-tooltip>
</template>
<template slot-scope="scope">
{{scope.row.AddFansNum}}
</template>
</el-table-column>
<el-table-column width="120" prop="" label="近7天粉絲增长率"></el-table-column>
<el-table-column width="100" prop="" label="获赞与收藏"></el-table-column>
<el-table-column width="130" prop="" label="获赞与收藏增长率"></el-table-column>
<el-table-column width="120" prop="" label="近七天主页访客"></el-table-column>
<el-table-column width="200" prop="" label="近七天主页访客增长率"></el-table-column>
<el-table-column width="120" prop="" label="近七天观看数"></el-table-column>
<el-table-column width="200" prop="" label="近七天观看数增长率"></el-table-column>
<el-table-column width="120" prop="" label="近七天互动数"></el-table-column>
<el-table-column width="150" prop="" label="近七天互动数增长率"></el-table-column>
<el-table-column width="120" prop="" label="近七天评论"></el-table-column>
<el-table-column width="150" prop="" label="近七天评论增长率"></el-table-column>
<el-table-column width="150" prop="" label="近七天观看总时长(秒)"></el-table-column>
<el-table-column width="170" prop="" label="近七天观看总时长增长率"></el-table-column>
<el-table-column width="80" prop="" label="笔记数"></el-table-column>
<el-table-column width="120" prop="" label="笔记数增长率"></el-table-column>
<el-table-column prop="" label="运营人"></el-table-column>
<el-table-column width="120" prop="AddFansRate" label="近7天粉丝增长率"></el-table-column>
<el-table-column width="100" prop="CollectNum" label="获赞与收藏"></el-table-column>
<el-table-column width="130" prop="CollectRate" label="获赞与收藏增长率"></el-table-column>
<el-table-column width="120" prop="VisitorNum" label="近七天主页访客"></el-table-column>
<el-table-column width="170" prop="VisitorRate" label="近七天主页访客增长率"></el-table-column>
<el-table-column width="120" prop="LookNum" label="近七天观看数"></el-table-column>
<el-table-column width="140" prop="LookRate" label="近七天观看数增长率"></el-table-column>
<el-table-column width="100" prop="InteractionNum" label="近七天互动数"></el-table-column>
<el-table-column width="150" prop="InteractionRate" label="近七天互动数增长率"></el-table-column>
<el-table-column width="90" prop="DiscussNum" label="近七天评论"></el-table-column>
<el-table-column width="150" prop="DiscussRate" label="近七天评论增长率"></el-table-column>
<el-table-column width="150" prop="SecondsNum" label="近七天观看总时长(秒)"></el-table-column>
<el-table-column width="170" prop="SecondsRate" label="近七天观看总时长增长率"></el-table-column>
<el-table-column width="80" prop="NoteNum" label="笔记数"></el-table-column>
<el-table-column width="120" prop="NoteRate" label="笔记数增长率"></el-table-column>
<el-table-column fixed="right" prop="EmpName" label="运营人"></el-table-column>
</el-table>
<el-table
v-if="msg.PlatformType==2"
:data="dataList"
style="width: 100%"
height="500"
:border="true"
:fit="true"
v-loading="loading"
>
<el-table-column width="100" fixed prop="AccountName" label="账号名称"></el-table-column>
<el-table-column prop="FansNum" label="粉丝数"><template slot-scope="scope"></template></el-table-column>
<el-table-column width="130" prop="FansRate" label="近七天粉丝成长率"></el-table-column>
<el-table-column width="100" prop="AddFansNum" label="近七天关注"></el-table-column>
<el-table-column width="120" prop="AddFansRate" label="近7天关注增长率"></el-table-column>
<el-table-column width="100" prop="CollectNum" label="昨日阅读量"></el-table-column>
<el-table-column width="150" prop="CollectRate" label="近七天阅读(播放)量"></el-table-column>
<el-table-column width="180" prop="VisitorNum" label="近七天阅读(播放)量增长率"></el-table-column>
<el-table-column width="170" prop="VisitorRate" label="近一个月阅读(播放)量"></el-table-column>
<el-table-column width="200" prop="LookNum" label="近一个月阅读(播放)量增长率"></el-table-column>
<el-table-column width="100" prop="LookRate" label="总微博数"></el-table-column>
<el-table-column width="120" prop="InteractionNum" label="总微博数增长率"></el-table-column>
<el-table-column fixed="right" prop="EmpName" label="运营人"></el-table-column>
</el-table>
<el-table
v-if="msg.PlatformType==3"
:data="dataList"
height="500"
:border="true"
:fit="true"
v-loading="loading"
>
<el-table-column width="100" fixed prop="AccountName" label="账号名称"></el-table-column>
<el-table-column prop="FansNum" label="粉丝数"><template slot-scope="scope"></template></el-table-column>
<el-table-column width="100" prop="FansRate" label="粉丝成长率"></el-table-column>
<el-table-column width="80" prop="AddFansNum" label="关注"></el-table-column>
<el-table-column width="100" prop="AddFansRate" label="关注成长率"></el-table-column>
<el-table-column width="80" prop="CollectNum" label="获赞"></el-table-column>
<el-table-column width="100" prop="CollectRate" label="获赞增长率"></el-table-column>
<el-table-column width="120" prop="VisitorNum" label="七天内播放总量"></el-table-column>
<el-table-column width="120" prop="VisitorRate" label="播放总量成长率"></el-table-column>
<el-table-column width="120" prop="LookNum" label="播放总量成长率"></el-table-column>
<el-table-column width="90" prop="LookRate" label="主页访问"></el-table-column>
<el-table-column width="120" prop="InteractionNum" label="主页访问成长率"></el-table-column>
<el-table-column width="100" prop="InteractionRate" label="作品点赞数"></el-table-column>
<el-table-column width="90" prop="DiscussNum" label="新增粉丝数"></el-table-column>
<el-table-column width="130" prop="DiscussRate" label="新增粉丝数成长率 "></el-table-column>
<el-table-column width="100" prop="SecondsNum" label="作品评论数"></el-table-column>
<el-table-column width="150" prop="SecondsRate" label="作品评论数成长率"></el-table-column>
<el-table-column width="80" prop="NoteNum" label="作品数"></el-table-column>
<el-table-column width="90" prop="NoteRate" label="作品增长率"></el-table-column>
<el-table-column fixed="right" prop="EmpName" label="运营人"></el-table-column>
</el-table>
<!-- <el-table
:data="dataList"
style="width: 100%"
:border="true"
......@@ -106,9 +148,67 @@
:header-cell-style="getRowClass"
>
<el-table-column fixed prop="Name" label="账号名称"></el-table-column>
</el-table>
</el-table> -->
</div>
<el-dialog :visible.sync="dialogTableVisible" @closed="closedDialog" :close-on-click-modal="false"
class="add-box add-box1 importDialogBox" width="450px" v-loading="loading"
:element-loading-text="loadingText">
<div class="add-tit" slot="title">
<p><span></span>导入引流</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box">
<p class="form-box-tit"><span class="radius"></span> 上传文件</p>
<el-form :model="form" ref="form" :rules="rules" class="MyEditForm">
<el-row :gutter="30">
<el-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="平台" prop="PlatformType">
<el-select v-model="form.PlatformType" placeholder="请选择平台">
<el-option v-for="item in PlatformTypeList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="期数" prop="PeriodsId" :rules="[{ required: form.PeriodsName==''?true:false, message: '请选择期数' }]">
<el-select v-model="form.PeriodsId" placeholder="选择期数" clearable @change="form.PeriodsId?form.PeriodsName='':''">
<el-option v-for="item in PeroidsList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="期数名称" prop="PeriodsName" :rules="[{ required: form.PeriodsId==''?true:false, message: '输入期数名称新建期数' }]">
<el-input placeholder="输入期数名称新建期数" v-model="form.PeriodsName" clearable @change="form.PeriodsName?form.PeriodsId='':''"></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
<div class="up-img-box">
<div class="uib-item" style="margin:0 auto;margin-bottom:20px;">
<div class="up-ctrl">
<el-upload :limit="1" :http-request="UploadClue" :multiple="false" accept="*.xls,*.xlsx"
:show-file-list="false" action="">
<img src="../../assets/img/cust/upimg.png" alt="">
</el-upload>
</div>
<p>
<a :href="downloadUrl" style="cursor:pointer;color:blue;text-decoration:underline;">模板下载</a>
</p>
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false">关 闭
</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -123,25 +223,11 @@
],
ModuleTypeList:[],
PlatformTypeList:[],
tableListTwo:[
'名称','粉丝数','近7天粉絲增长率','近七天关注','近七天关注增长率',
'昨日阅读量','近七天阅读(播放)量','近七天阅读(播放)量增长率',
'近一个月阅读(播放)量','近一个月阅读(播放)量增长率','总微博数',
'总微博数增长率','运营人'
],
tableListOne:[
'名称','粉丝数','粉丝成长率','近七天新增粉絲率(8月24~31日)',
'近7天粉絲增长率','获赞与收藏','获赞与收藏增长率','近七天主页访客',
'近七天主页访客增长率','近七天观看数','近七天观看数增长率',
'近七天互动数','近七天互动数增长率','近七天评论','近七天评论增长率',
'近七天观看总时长(秒)','近七天观看总时长增长率','笔记数','笔记数增长率',
'运营人'
],
title:'小红书',
total: 0,
dataList: [],
loading: false,
rateLoading: false,
loadingB: false,
activeName: "1",
rateData: [],
msg: {
......@@ -149,14 +235,92 @@
PlatformType: 1,
ModuleTypeIds:[]
},
PeroidsList:[]
form:{
PlatformType: '',
PeriodsId: '',
PeriodsName: '',
},
rules: {
PeriodsName: [{
required: true,
message: "请输入期数名称",
trigger: "blur"
}, ],
PlatformType: [{
required: true,
message: "请选择平台",
trigger: "blur"
}, ],
PeriodsId: [{
required: true,
message: "请选择期数",
trigger: "change"
}, ],
},
PeroidsList:[],
dialogTableVisible: false,
loadingText:'',
downloadUrl: "",
};
},
mounted() {
// var fileUrl = "https://imgfile.oytour.com"
// if (this.importType == 1) {
// this.downloadUrl = fileUrl + "/static/引流模板.xlsx";
// } else {
// this.downloadUrl = fileUrl + "/static/引流模板.xlsx";
// }
this.getEnumerate()
},
methods: {
closedDialog() {
this.dialogTableVisible = false
this.resetForm('form')
},
//上传引流汇总
UploadClue(file) {
if(this.form.PlatformType==''){
return this.$message.error('请选择平台')
}
if(this.form.PeriodsName==''&&this.form.PeriodsId==''){
return this.$message.error('请选择期数或者输入期数名称新建期数')
}
if(this.form.PeriodsId){
this.form.PeriodsName = ''
}
if(this.form.PeriodsName){
this.form.PeriodsId = ''
}
var userInfo = this.getLocalStorage();
var params = {
EmployeeId: userInfo.EmployeeId,
PlatformType: this.form.PlatformType,
PeriodsId: this.form.PeriodsId?this.form.PeriodsId:0,
PeriodsName: this.form.PeriodsName,
};
this.loadingB=true;
this.loadingText="正在上传文件,请稍后...";
this.UploadFlowStat(params, file.file, (res) => {
this.loadingB=false;
this.loadingText="";
if (res.data.resultCode == 1) {
this.dialogTableVisible = false;
this.Success("导入引流成功!");
this.init()
} else {
this.Error("导入引流失败!");
}
});
},
resetForm(formName) { // 重置表单
this.form = {
PlatformType:'',
PeriodsId:'',
PeriodsName:'',
}
this.$refs[formName].resetFields();
},
getEnumerate(){
// 期数下拉
this.apipost(
......@@ -216,57 +380,18 @@
}
);
},
tableCellClassName({ row, column }) {
try {
if (
row[column.property].toString().indexOf("-") != -1 &&
column.property != "DateStr"
) {
return "warning-col";
}
} catch (error) {}
},
changeMonthHandler(val) {
this.msg.YearStr = val.getFullYear();
this.init();
this.initRate();
},
formatter(row, column) {
return row[column.property] + "%";
},
handleCommand(command) {
if (command == "1") {
this.downloadHandler();
}
},
downloadHandler() {
this.GetLocalFile(
"/api/ClueStatic/DownLoadClueDay",
this.msg,
"数据统计.xls",
(res) => {
this.$message({
message: "导出成功",
type: "success",
});
this.dialogTableVisible = true
}
);
},
handleCommand(command) {
if (command == "1") {
if (this.activeName == "monthdata") {
if (command == "2") {
this.downloadHandler(
"/api/ClueStatic/DownLoadClueYear",
"年度引流数据"
"/api/IntroduceFlowStat/DownLoadFlowStat",
"引流汇总"
);
} else {
this.downloadHandler(
"/api/ClueStatic/DownLoadClueYearRate",
"年度引流成长率"
);
}
}
},
// 导出
downloadHandler(url, name) {
this.GetLocalFile(url, this.msg, `${name}.xls`, (res) => {
this.$message({
......
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