Commit 3056e9e2 by 罗承锋

单移产品、首页修改

parent 032fac16
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
SET HOST_NAME=172.18.101.172 SET HOST_NAME=172.18.101.172
:: 每次发版都需要改的版本号 :: 每次发版都需要改的版本号
SET APP_VERSION=0.0.3 SET APP_VERSION=0.0.5
SET APP_NAME=gdtelgztelschoolcenterui SET APP_NAME=gdtelgztelschoolcenterui
cd %APP_NAME% cd %APP_NAME%
......
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.
import {postAction} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取用户基本信息
let getInfo = () => postAction(prefix + "/analysis/getInfo");
// 获取业务数据
let getOrderStatistic = () => postAction(prefix + "/analysis/getOrderStatistic");
// 获取pv
let getPvStatistic = (params) => postAction(prefix + "/analysis/getPvStatistic" , params);
let getUvStatistic = (params) => postAction(prefix + "/analysis/getUvStatistic", params);
export {
getInfo, getOrderStatistic, getPvStatistic, getUvStatistic
}
<template>
<!--作为echarts表的盒子-->
<div class="echarts-box" ref="echarts"></div>
</template>
<script>
import * as echarts from 'echarts'
/**
* echarts的总封装,可用于所有基本图表
*/
export default {
name: "echartsContainer",
props:{
//echarts的配置
options:{
required:true,
type:Object
}
},
data(){
return {
echartsObj: null
}
},
watch:{
//监听配置对象每次变化,重置echarts
options:{
handler(){
this.createEcharts();
},
deep:true
}
},
methods:{
//创建echarts表
createEcharts(){
if(!this.echartsObj){
this.echartsObj = echarts.init(this.$refs.echarts);
}
this.echartsObj.setOption(this.options, true);
this.echartsObj.resize();
}
},
mounted(){
//初始化时,操作
this.createEcharts();
}
}
</script>
<style scoped>
.echarts-box{
width: 100%;
height: 100%;
}
</style>
<template>
<div class="echarts-box" ref="echartbox"></div>
</template>
<script>
export default {
name: "ws-pie",
props: {
pieData: {
type: Object,
required: true
},
titleText: String
},
data() {
return {}
},
methods: {
//加载饼图
initEcharts() {
let echarts = window.echarts.init(this.$refs.echartbox);
echarts.setOption(this.getOptions());
},
//获取配置
getOptions() {
let option = {
title: {
text: this.titleText,
left: "center",
top: 20,
textStyle: {
color: '#333'
}
},
backgroundColor: "transparent",
tooltip: {
trigger: "item",
formatter: "{b} : {c} ({d}%)"
},
color: ['#409EFF', '#67C23A', '#D92424', '#FF8000'],
series: [
{
type: "pie",
radius: "70%",
center: ["50%", "50%"],
data: this.pieData,
}
],
legend: {
center: "vertical"
}
};
return option;
}
},
watch: {
pieData() {
this.initEcharts();
}
},
mounted() {
this.initEcharts();
},
}
</script>
<style scoped>
.echarts-box {
width: 100%;
height: 100%;
}
</style>
<template> <template>
<div class="page-content"> <a-row :gutter="24">
</div> <a-col :span="24">
<a-card size="small" class="card-margin" title="个人信息">
<p class="person-info-p">姓名:{{info.name}}</p>
<p class="person-info-p">电话:{{info.phone}}</p>
<p class="person-info-p">角色:{{info.roleNames}}</p>
<p class="person-info-p">机构:{{info.deptName}}</p>
</a-card>
</a-col>
<a-col :span="24">
<a-card size="small" class="card-margin" title="业务概况">
<a-row :gutter="24">
<a-col :span="8">
<a-card size="small" class="blue">
<span class="order-title">已推广订单数</span>
<span class="order-content">当日订单数:{{allOrders.today}}</span>
<span class="order-content">本周订单数:{{allOrders.toweek}}</span>
<span class="order-content">本月订单数:{{allOrders.tomonth}}</span>
</a-card>
</a-col>
<a-col :span="8">
<a-card size="small" class="violet">
<span class="order-title">订单完成数</span>
<span class="order-content">当日订单数:{{completeOrders.today}}</span>
<span class="order-content">本周订单数:{{completeOrders.toweek}}</span>
<span class="order-content">本月订单数:{{completeOrders.tomonth}}</span>
</a-card>
</a-col>
<a-col :span="8">
<a-card size="small" class="green">
<span>订单数排名情况</span>
</a-card>
</a-col>
</a-row>
</a-card>
</a-col>
<a-col :span="24">
<a-card size="small" class="card-margin" title="访问统计量">
<div slot="extra">
<a-range-picker :defaultValue="defaultValue" @change="onChange" :disabled-date="disabledDate" format="YYYY-MM-DD"/>
<a-select v-model="type" class="type-style">
<a-select-option value="hour">小时</a-select-option>
<a-select-option value="day"></a-select-option>
<a-select-option value="month"></a-select-option>
</a-select>
</div>
<a-row :gutter="24">
<a-col :span="12" class="echarts-box">
<pv ref="pv"></pv>
</a-col>
<a-col :span="12" class="echarts-box">
<uv ref="uv"></uv>
</a-col>
</a-row>
</a-card>
</a-col>
</a-row>
</template> </template>
<script> <script>
import moment from 'moment';
import * as dayjs from "dayjs";
import STable from '@/components/table'; import STable from '@/components/table';
import treecheck from '@/components/sysmanage/treeCheck'; import treecheck from '@/components/sysmanage/treeCheck';
import {getMenus} from '@/api/system'; import {getMenus} from '@/api/system';
import {getInfo, getOrderStatistic } from "@/api/school-center/analysisAPI"
import pv from "./pv";
import uv from "./uv";
export default { export default {
name: 'Analysis', name: 'Analysis',
components: {treecheck, STable}, components: {treecheck, STable, pv, uv},
data() { data() {
return {} return {
type: 'hour',
dateString: [],
defaultValue: [],
info: {
deptName: '',
phone: '',
name: '',
roleNames: ''
},
allOrders: {
today: '',
toweek: '',
tomonth: ''
},
completeOrders: {
today: '',
toweek: '',
tomonth: ''
}
}
},
watch : {
type: function(value) {
this.$refs.pv.getEchartsData(this.dateString[0], this.dateString[1], value);
this.$refs.uv.getEchartsData(this.dateString[0], this.dateString[1], value);
},
},
mounted() {
getInfo().then(res => {
this.info = res.data;
})
getOrderStatistic().then(res => {
this.allOrders = res.data.allOrders;
this.completeOrders = res.data.completeOrders;
});
this.defaultValue[0] = moment();
this.defaultValue[1] = moment().subtract(7, 'days');
}, },
methods: { methods: {
// 转化率
getTransfer() {
},
disabledDate(current) {
return current && current > moment().endOf('day');
},
onChange(date, dateString) {
this.dateString[0] = dateString[0];
this.dateString[1] = dateString[1];
this.$refs.pv.getEchartsData(dateString[0], dateString[1], this.type);
this.$refs.uv.getEchartsData(dateString[0], dateString[1], this.type);
}
}, },
//初始化 //初始化
created() { created() {
...@@ -35,11 +144,48 @@ export default { ...@@ -35,11 +144,48 @@ export default {
overflow: auto; overflow: auto;
position: relative; position: relative;
} }
/deep/.ant-card-extra {
float: left !important;
margin-left: 0px !important;
}
/deep/.ant-card-small > .ant-card-head > .ant-card-head-wrapper > .ant-card-head-title{
width: 100px !important;
flex: 0.1;
}
.type-style{
margin-left:10px;
width:80px;
}
.page-left { .page-left {
flex: 1; flex: 1;
} }
.blue{
background-color: #6CBDF6;
}
.violet{
background-color: #D58DE4;
}
.violet p{
}
.green{
background-color: #55DA8D;
}
.person-info-p{
width: 45%;
display:inline-block;
margin: 5px 0px 2px 2%;
}
.card-margin{
margin-bottom: 10px;
}
.page-right { .page-right {
width: 35%; width: 35%;
margin-left: @mg; margin-left: @mg;
...@@ -207,4 +353,21 @@ export default { ...@@ -207,4 +353,21 @@ export default {
.ant-carousel >>> .slick-slide h3 { .ant-carousel >>> .slick-slide h3 {
color: #fff; color: #fff;
} }
.ant-card-small > .ant-card-body {
padding: 8px;
}
.order-title {
marign:0px;
display: block;
}
.order-content {
margin: 5px 0px 5px 0px;
display: block;
}
.echarts-box{
height: 210px;
}
</style> </style>
\ No newline at end of file
<template>
<echarts-container style="width:100%" :options="options"></echarts-container>
</template>
<script>
import EchartsContainer from "../../components/echarts/echartsContainer";
import {getPvStatistic } from "@/api/school-center/analysisAPI"
export default {
name: "pv",
components: {EchartsContainer, getPvStatistic},
data() {
return {
options: {
title: {
text: "页面访问量",
left: '40%',
},
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
data:['销量']
},
color: ["#1090FF"],
xAxis: {
type: 'category',
data: []
},
grid: {
left: "8%",
right: "6%",
top: "15%",
bottom: "10%"
},
yAxis: {
type: 'value'
},
series: [{
data: [],
type: 'line'
}]
}
}
},
methods: {
getEchartsData: function(startDate, endDate, type) {
let param = {
startDate: startDate,
endDate: endDate,
type: type
}
getPvStatistic(param).then(res => {
this.options.series[0].data = res.data.seriesData;
this.options.xAxis.data = res.data.xAxisData;
console.log(this.options);
});
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<echarts-container :options="options"></echarts-container>
</template>
<script>
import EchartsContainer from "../../components/echarts/echartsContainer";
import {getUvStatistic } from "@/api/school-center/analysisAPI"
export default {
name: "uv",
components: {EchartsContainer, getUvStatistic},
data() {
return {
options: {
title: {
text: "用户访问量",
left: '40%',
},
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
data:['销量']
},
color: ["#1090FF"],
xAxis: {
type: 'category',
data: []
},
grid: {
left: "6%",
right: "12%",
top: "15%",
bottom: "10%"
},
yAxis: {
type: 'value'
},
series: [{
data: [],
type: 'line'
}]
}
}
},
methods: {
getEchartsData: function(startDate, endDate, type) {
let param = {
startDate: startDate,
endDate: endDate,
type: type
}
getUvStatistic(param).then(res => {
this.options.series[0].data = res.data.seriesData;
this.options.xAxis.data = res.data.xAxisData;
console.log(this.options);
});
}
},
created() {
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
...@@ -5,25 +5,41 @@ ...@@ -5,25 +5,41 @@
<!-- 搜索区域 --> <!-- 搜索区域 -->
<a-form layout="inline"> <a-form layout="inline">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="4" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item label="套餐名称"> <a-form-item label="套餐名称">
<a-input placeholder="套餐名称" v-model="queryParam.name"></a-input> <a-input placeholder="套餐名称" v-model="queryParam.name"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="12">
<a-form-item label="标准月租">
<a-input placeholder="标准月租" v-model="queryParam.monthFee"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="流量">
<a-input placeholder="流量" v-model="queryParam.flow"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="语音">
<a-input placeholder="语音" v-model="queryParam.voice"></a-input>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;"> <span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button> <a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a-button @click="add()" type="primary">添加</a-button> <a-button @click="add()" type="primary">添加</a-button>
<a-divider type="vertical"/>
<a-button @click="batchDown()" type="primary">批量下架</a-button>
</a-col> </a-col>
</span> </span>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText"> <s-table :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text,record"> <template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">编辑</a> <a @click="modifyfunction(record)">编辑</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
...@@ -33,7 +49,6 @@ ...@@ -33,7 +49,6 @@
</template> </template>
</s-table> </s-table>
<!--编辑----弹框--> <!--编辑----弹框-->
<a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="840px"> <a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="840px">
<a-form :form="Formtable"> <a-form :form="Formtable">
...@@ -67,6 +82,7 @@ ...@@ -67,6 +82,7 @@
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="温馨提示"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="温馨提示">
<a-input placeholder="温馨提示" v-decorator="[ 'warmTip']"></a-input> <a-input placeholder="温馨提示" v-decorator="[ 'warmTip']"></a-input>
<img v-bind:src="imgUrl" width="50px" height="100px" @click="showDrawer"/>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="简介"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="简介">
<a-input placeholder="简介" v-decorator="[ 'explains', {rules: [{ required: true, message: '简介不能为空!' ,whitespace:true}]}]"></a-input> <a-input placeholder="简介" v-decorator="[ 'explains', {rules: [{ required: true, message: '简介不能为空!' ,whitespace:true}]}]"></a-input>
...@@ -81,8 +97,7 @@ ...@@ -81,8 +97,7 @@
@preview="handlePreview" @preview="handlePreview"
@change="handleChange" @change="handleChange"
:data="fileid" :data="fileid"
accept=".jpg" accept=".jpg">
>
<div> <div>
<a-icon type="plus" /> <a-icon type="plus" />
<div class="ant-upload-text"> <span v-if="fileList.length==0">上传背景图</span> <span v-if="fileList.length>0">更换背景图</span> </div> <div class="ant-upload-text"> <span v-if="fileList.length==0">上传背景图</span> <span v-if="fileList.length>0">更换背景图</span> </div>
...@@ -102,8 +117,7 @@ ...@@ -102,8 +117,7 @@
@preview="handlePreviewxiaotu" @preview="handlePreviewxiaotu"
@change="handleChangexiaotu" @change="handleChangexiaotu"
:data="fileid" :data="fileid"
accept=".png" accept=".png">
>
<div> <div>
<a-icon type="plus" /> <a-icon type="plus" />
<div class="ant-upload-text"> <span v-if="fileListxiaotu.length==0">上传小图</span> <span v-if="fileListxiaotu.length>0">更换小图</span> </div> <div class="ant-upload-text"> <span v-if="fileListxiaotu.length==0">上传小图</span> <span v-if="fileListxiaotu.length>0">更换小图</span> </div>
...@@ -115,6 +129,15 @@ ...@@ -115,6 +129,15 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-modal> </a-modal>
<a-drawer
title="温馨提示"
placement="right"
:closable="false"
:visible="wxtsVisible"
width="400px"
@close="onClose">
<img v-bind:src='imgUrl' width='300px' height='600px'/>
</a-drawer>
</div> </div>
</template> </template>
...@@ -122,7 +145,7 @@ ...@@ -122,7 +145,7 @@
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types" import { ACCESS_TOKEN } from "@/store/mutation-types"
import STable from '@/components/table'; import STable from '@/components/table';
import {findByList,modify,insert,packageAllList,delet} from "@/api/school-center/packageManagementAPI" import {findByList,modify,insert,packageAllList,delet, batchUpdate} from "@/api/school-center/packageManagementAPI"
import {cloneObject} from '@/utils/util'; import {cloneObject} from '@/utils/util';
export default { export default {
name: "package", name: "package",
...@@ -135,11 +158,13 @@ ...@@ -135,11 +158,13 @@
header:{ header:{
"Authorization":Vue.ls.get(ACCESS_TOKEN) "Authorization":Vue.ls.get(ACCESS_TOKEN)
}, },
wxtsVisible: false,
previewVisible: false, previewVisible: false,
previewImage: '', previewImage: '',
imgUrl: '/images/wxts.png',
fileList: [ fileList: [
], ],
selectedRowKeys: [],
previewVisiblexiaotu: false, previewVisiblexiaotu: false,
previewImagexiaotu: '', previewImagexiaotu: '',
fileListxiaotu:[], fileListxiaotu:[],
...@@ -164,6 +189,9 @@ ...@@ -164,6 +189,9 @@
}, },
queryParam: { queryParam: {
name: '', name: '',
monthFee: '',
flow: '',
voice:''
}, },
modifyvisible:false, modifyvisible:false,
titleName:"", titleName:"",
...@@ -213,6 +241,15 @@ ...@@ -213,6 +241,15 @@
} }
}, },
methods:{ methods:{
showDrawer() {
this.wxtsVisible = true;
},
onClose() {
this.wxtsVisible = false;
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
getuuid() { getuuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, var r = Math.random() * 16 | 0,
...@@ -400,6 +437,18 @@ ...@@ -400,6 +437,18 @@
warmTip:"", warmTip:"",
explains:"", explains:"",
}) })
},
batchDown() {
// 批量下架产品
const ids = this.selectedRowKeys;
batchUpdate({ids: ids}).then(res => {
console.log(res);
if (res.state=="success") {
this.$message.success(res.data ? res.data : '下架成功!', 5);
}else{
this.$message.error(res.data ? res.data : '下架失败!', 5);
}
})
} }
} }
......
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
:tree-data="treeData" :tree-data="treeData"
tree-checkable tree-checkable
:show-checked-strategy="SHOW_PARENT" :show-checked-strategy="SHOW_PARENT"
placeholder="Please select" placeholder="请选择管理院校"
/> />
</template> </template>
</a-form-item> </a-form-item>
......
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