Commit 5cdf4cb0 authored by “yiyousong”'s avatar “yiyousong”
parents efca2231 d8182ee8
...@@ -26,3 +26,10 @@ ALTER TABLE mortals_sys_app_info_field ADD COLUMN `defaultValue` varchar (255) ...@@ -26,3 +26,10 @@ ALTER TABLE mortals_sys_app_info_field ADD COLUMN `defaultValue` varchar (255)
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `fieldTypeValue` varchar (255) default "" COMMENT '字段类型值,当字段类型为多选,单选时候,预设复选值' AFTER fieldType; ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `fieldTypeValue` varchar (255) default "" COMMENT '字段类型值,当字段类型为多选,单选时候,预设复选值' AFTER fieldType;
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `defaultValue` varchar (255) default "" COMMENT '字段默认值' AFTER fieldValue; ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `defaultValue` varchar (255) default "" COMMENT '字段默认值' AFTER fieldValue;
-- ----------------------------
2023-4-12
-- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN `hot` tinyint(2) DEFAULT '0' COMMENT '热门(0.否,1.是)' AFTER eventTypeShow;
ALTER TABLE mortals_sys_site_matter ADD COLUMN `display` tinyint(2) DEFAULT '0' COMMENT '显示(0.否,1.是)' AFTER hot;
...@@ -1960,15 +1960,16 @@ msg|String|消息|- ...@@ -1960,15 +1960,16 @@ msg|String|消息|-
**请求参数:** **请求参数:**
参数名称|类型|备注|必填|其它 参数名称|类型| 备注 |必填|其它
---|---|---|---|--- ---|---|------|---|---
page|Integer|当前页|否|- page|Integer| 当前页 |否|-
size|Integer|每页条数|否|- size|Integer| 每页条数 |否|-
siteId|Long|站点ID|否|- siteId|Long| 站点ID |否|-
siteName|String|站点名称|否|- siteName|String| 站点名称 |否|-
matterId|Long|事项ID|否|- matterId|Long| 事项ID |否|-
matterName|String|事项名称|否|- matterName|String| 事项名称 |否|-
hot|Integer| 热门 |否|-
display|Integer| 显示 |否|-
**请求样例:** **请求样例:**
``` ```
...@@ -1978,6 +1979,8 @@ matterName|String|事项名称|否|- ...@@ -1978,6 +1979,8 @@ matterName|String|事项名称|否|-
"siteName":"o68yk6", "siteName":"o68yk6",
"matterId":2909, "matterId":2909,
"matterName":"oz1oig", "matterName":"oz1oig",
"hot":0,
"display":1,
"page":1, "page":1,
"size":10 "size":10
} }
......
package com.mortals.xhx.module.site.model; package com.mortals.xhx.module.site.model;
import com.mortals.xhx.common.code.SourceEnum; import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.site.model.vo.SiteMatterVo; import com.mortals.xhx.module.site.model.vo.SiteMatterVo;
/** /**
* 站点事项实体对象 * 站点事项实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-11-16 * @date 2023-04-12
*/ */
public class SiteMatterEntity extends SiteMatterVo { public class SiteMatterEntity extends SiteMatterVo {
...@@ -52,6 +56,14 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -52,6 +56,14 @@ public class SiteMatterEntity extends SiteMatterVo {
* 部门编号 * 部门编号
*/ */
private String deptCode; private String deptCode;
/**
* 热门(0.否,1.是)
*/
private Integer hot;
/**
* 显示(0.否,1.是)
*/
private Integer display;
...@@ -173,7 +185,6 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -173,7 +185,6 @@ public class SiteMatterEntity extends SiteMatterVo {
* @return Integer * @return Integer
*/ */
public Integer getSource(){ public Integer getSource(){
return source; return source;
} }
/** /**
...@@ -197,6 +208,34 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -197,6 +208,34 @@ public class SiteMatterEntity extends SiteMatterVo {
public void setDeptCode(String deptCode){ public void setDeptCode(String deptCode){
this.deptCode = deptCode; this.deptCode = deptCode;
} }
/**
* 获取 热门(0.否,1.是)
* @return Integer
*/
public Integer getHot(){
return hot;
}
/**
* 设置 热门(0.否,1.是)
* @param hot
*/
public void setHot(Integer hot){
this.hot = hot;
}
/**
* 获取 显示(0.否,1.是)
* @return Integer
*/
public Integer getDisplay(){
return display;
}
/**
* 设置 显示(0.否,1.是)
* @param display
*/
public void setDisplay(Integer display){
this.display = display;
}
...@@ -229,6 +268,8 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -229,6 +268,8 @@ public class SiteMatterEntity extends SiteMatterVo {
sb.append(",eventTypeShow:").append(getEventTypeShow()); sb.append(",eventTypeShow:").append(getEventTypeShow());
sb.append(",source:").append(getSource()); sb.append(",source:").append(getSource());
sb.append(",deptCode:").append(getDeptCode()); sb.append(",deptCode:").append(getDeptCode());
sb.append(",hot:").append(getHot());
sb.append(",display:").append(getDisplay());
return sb.toString(); return sb.toString();
} }
...@@ -236,22 +277,26 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -236,22 +277,26 @@ public class SiteMatterEntity extends SiteMatterVo {
this.siteId = null; this.siteId = null;
this.siteName = ""; this.siteName = null;
this.matterId = null; this.matterId = null;
this.matterName = ""; this.matterName = null;
this.matterCode = ""; this.matterCode = null;
this.deptId = null; this.deptId = null;
this.deptName = ""; this.deptName = null;
this.eventTypeShow = null;
this.source = null;
this.eventTypeShow = ""; this.deptCode = null;
this.source = 0; this.hot = 0;
this.deptCode = ""; this.display = 0;
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity;
* 站点事项查询对象 * 站点事项查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-02-21 * @date 2023-04-12
*/ */
public class SiteMatterQuery extends SiteMatterEntity { public class SiteMatterQuery extends SiteMatterEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -141,6 +141,36 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -141,6 +141,36 @@ public class SiteMatterQuery extends SiteMatterEntity {
/** 结束 修改时间 */ /** 结束 修改时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 开始 热门(0.否,1.是) */
private Integer hotStart;
/** 结束 热门(0.否,1.是) */
private Integer hotEnd;
/** 增加 热门(0.否,1.是) */
private Integer hotIncrement;
/** 热门(0.否,1.是)列表 */
private List <Integer> hotList;
/** 热门(0.否,1.是)排除列表 */
private List <Integer> hotNotList;
/** 开始 显示(0.否,1.是) */
private Integer displayStart;
/** 结束 显示(0.否,1.是) */
private Integer displayEnd;
/** 增加 显示(0.否,1.是) */
private Integer displayIncrement;
/** 显示(0.否,1.是)列表 */
private List <Integer> displayList;
/** 显示(0.否,1.是)排除列表 */
private List <Integer> displayNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<SiteMatterQuery> orConditionList; private List<SiteMatterQuery> orConditionList;
...@@ -891,6 +921,168 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -891,6 +921,168 @@ public class SiteMatterQuery extends SiteMatterEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 开始 热门(0.否,1.是)
* @return hotStart
*/
public Integer getHotStart(){
return this.hotStart;
}
/**
* 设置 开始 热门(0.否,1.是)
* @param hotStart
*/
public void setHotStart(Integer hotStart){
this.hotStart = hotStart;
}
/**
* 获取 结束 热门(0.否,1.是)
* @return $hotEnd
*/
public Integer getHotEnd(){
return this.hotEnd;
}
/**
* 设置 结束 热门(0.否,1.是)
* @param hotEnd
*/
public void setHotEnd(Integer hotEnd){
this.hotEnd = hotEnd;
}
/**
* 获取 增加 热门(0.否,1.是)
* @return hotIncrement
*/
public Integer getHotIncrement(){
return this.hotIncrement;
}
/**
* 设置 增加 热门(0.否,1.是)
* @param hotIncrement
*/
public void setHotIncrement(Integer hotIncrement){
this.hotIncrement = hotIncrement;
}
/**
* 获取 热门(0.否,1.是)
* @return hotList
*/
public List<Integer> getHotList(){
return this.hotList;
}
/**
* 设置 热门(0.否,1.是)
* @param hotList
*/
public void setHotList(List<Integer> hotList){
this.hotList = hotList;
}
/**
* 获取 热门(0.否,1.是)
* @return hotNotList
*/
public List<Integer> getHotNotList(){
return this.hotNotList;
}
/**
* 设置 热门(0.否,1.是)
* @param hotNotList
*/
public void setHotNotList(List<Integer> hotNotList){
this.hotNotList = hotNotList;
}
/**
* 获取 开始 显示(0.否,1.是)
* @return displayStart
*/
public Integer getDisplayStart(){
return this.displayStart;
}
/**
* 设置 开始 显示(0.否,1.是)
* @param displayStart
*/
public void setDisplayStart(Integer displayStart){
this.displayStart = displayStart;
}
/**
* 获取 结束 显示(0.否,1.是)
* @return $displayEnd
*/
public Integer getDisplayEnd(){
return this.displayEnd;
}
/**
* 设置 结束 显示(0.否,1.是)
* @param displayEnd
*/
public void setDisplayEnd(Integer displayEnd){
this.displayEnd = displayEnd;
}
/**
* 获取 增加 显示(0.否,1.是)
* @return displayIncrement
*/
public Integer getDisplayIncrement(){
return this.displayIncrement;
}
/**
* 设置 增加 显示(0.否,1.是)
* @param displayIncrement
*/
public void setDisplayIncrement(Integer displayIncrement){
this.displayIncrement = displayIncrement;
}
/**
* 获取 显示(0.否,1.是)
* @return displayList
*/
public List<Integer> getDisplayList(){
return this.displayList;
}
/**
* 设置 显示(0.否,1.是)
* @param displayList
*/
public void setDisplayList(List<Integer> displayList){
this.displayList = displayList;
}
/**
* 获取 显示(0.否,1.是)
* @return displayNotList
*/
public List<Integer> getDisplayNotList(){
return this.displayNotList;
}
/**
* 设置 显示(0.否,1.是)
* @param displayNotList
*/
public void setDisplayNotList(List<Integer> displayNotList){
this.displayNotList = displayNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -1331,6 +1523,114 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -1331,6 +1523,114 @@ public class SiteMatterQuery extends SiteMatterEntity {
} }
/**
* 设置 热门(0.否,1.是)
* @param hot
*/
public SiteMatterQuery hot(Integer hot){
setHot(hot);
return this;
}
/**
* 设置 开始 热门(0.否,1.是)
* @param hotStart
*/
public SiteMatterQuery hotStart(Integer hotStart){
this.hotStart = hotStart;
return this;
}
/**
* 设置 结束 热门(0.否,1.是)
* @param hotEnd
*/
public SiteMatterQuery hotEnd(Integer hotEnd){
this.hotEnd = hotEnd;
return this;
}
/**
* 设置 增加 热门(0.否,1.是)
* @param hotIncrement
*/
public SiteMatterQuery hotIncrement(Integer hotIncrement){
this.hotIncrement = hotIncrement;
return this;
}
/**
* 设置 热门(0.否,1.是)
* @param hotList
*/
public SiteMatterQuery hotList(List<Integer> hotList){
this.hotList = hotList;
return this;
}
/**
* 设置 热门(0.否,1.是)
* @param hotNotList
*/
public SiteMatterQuery hotNotList(List<Integer> hotNotList){
this.hotNotList = hotNotList;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param display
*/
public SiteMatterQuery display(Integer display){
setDisplay(display);
return this;
}
/**
* 设置 开始 显示(0.否,1.是)
* @param displayStart
*/
public SiteMatterQuery displayStart(Integer displayStart){
this.displayStart = displayStart;
return this;
}
/**
* 设置 结束 显示(0.否,1.是)
* @param displayEnd
*/
public SiteMatterQuery displayEnd(Integer displayEnd){
this.displayEnd = displayEnd;
return this;
}
/**
* 设置 增加 显示(0.否,1.是)
* @param displayIncrement
*/
public SiteMatterQuery displayIncrement(Integer displayIncrement){
this.displayIncrement = displayIncrement;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param displayList
*/
public SiteMatterQuery displayList(List<Integer> displayList){
this.displayList = displayList;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param displayNotList
*/
public SiteMatterQuery displayNotList(List<Integer> displayNotList){
this.displayNotList = displayNotList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
This diff is collapsed.
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
}, },
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.12.1", "@babel/polyfill": "^7.12.1",
"@jiaminghi/data-view": "^2.10.0",
"ant-design-vue": "^1.7.8", "ant-design-vue": "^1.7.8",
"axios": "^0.27.2", "axios": "^0.27.2",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
"echarts": "^5.3.3", "echarts": "^5.3.3",
"element-ui": "^2.15.8", "element-ui": "^2.15.8",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"heatmap.js": "^2.0.5",
"highlight.js": "^11.5.1", "highlight.js": "^11.5.1",
"js-export-excel": "^1.1.4", "js-export-excel": "^1.1.4",
"lodash": "^4.17.21", "lodash": "^4.17.21",
......
...@@ -137,3 +137,31 @@ export function getOtherList(params) { ...@@ -137,3 +137,31 @@ export function getOtherList(params) {
export function getRigusersList(params) { export function getRigusersList(params) {
return http.get(`${BASEURL}/admin/reportforms/rigusers`, params); return http.get(`${BASEURL}/admin/reportforms/rigusers`, params);
} }
/**
* 服务类型数据分析
*/
// 预约趋势
export function getTrend(params) {
return http.get(`${BASEURL}/admin/order/getTrend`, params);
}
// 预约热度排名
export function getOrderRanking(params) {
return http.get(`${BASEURL}/admin/order/getOrderRanking`, params);
}
// 预约人群画像-地域分布
export function getStatisticArea(params) {
return http.get(`${BASEURL}/admin/statistic/area`, params);
}
// 预约人群画像-年龄分布
export function getStatisticAges(params) {
return http.get(`${BASEURL}/admin/statistic/ages`, params);
}
// 预约人群画像-签到准确率
export function getStatisticSignin(params) {
return http.get(`${BASEURL}/admin/statistic/signin`, params);
}
// 预约人群画像-性别分布
export function getStatisticSexual(params) {
return http.get(`${BASEURL}/admin/statistic/sexual`, params);
}
\ No newline at end of file
This diff is collapsed.
...@@ -20,6 +20,9 @@ import * as directives from "@/directive"; ...@@ -20,6 +20,9 @@ import * as directives from "@/directive";
Object.keys(directives).forEach((name) => Object.keys(directives).forEach((name) =>
Vue.directive(name, directives[name]) Vue.directive(name, directives[name])
); );
// datav
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)
// 引入lodash // 引入lodash
import lodash from "lodash"; import lodash from "lodash";
Vue.prototype.$_ = lodash; Vue.prototype.$_ = lodash;
......
import Heatmap from 'heatmap.js';
// import 'heatmap.js/plugins/heatmap.canvas.js';
// import 'heatmap.js/plugins/heatmap-gradient.js';
// import 'heatmap.js/plugins/heatmap-data-urls.js';
// import 'heatmap.js/plugins/leaflet-heatmap/leaflet-heatmap.js';
// import 'leaflet-heatmap/dist/leaflet-heatmap.css';
export default {
install(Vue, options) {
const heatmapContainer = document.createElement('div');
heatmapContainer.id = 'heatmap-container';
heatmapContainer.style.display = 'none';
document.body.appendChild(heatmapContainer);
const heatmapConfig = {
radius: options.radius || 30,
maxOpacity: options.maxOpacity || 0.8,
minOpacity: options.minOpacity || 0.2,
blur: options.blur || 0.85,
gradient: options.gradient || {
0.45: 'rgb(0,0,255)',
0.55: 'rgb(0,255,255)',
0.65: 'rgb(0,255,0)',
0.95: 'yellow',
1.0: 'rgb(255,0,0)',
},
};
const heatmapInstance = Heatmap.create({
container: heatmapContainer,
radius: heatmapConfig.radius,
maxOpacity: heatmapConfig.maxOpacity,
minOpacity: heatmapConfig.minOpacity,
blur: heatmapConfig.blur,
gradient: heatmapConfig.gradient,
height:1080,
width:1920
});
Vue.prototype.$heatmap = function(data) {
heatmapInstance.setData(data);
heatmapContainer.style.display = 'block';
setTimeout(() => {
heatmapContainer.style.display = 'none';
}, options.duration || 3000);
};
},
};
\ No newline at end of file
<template> <template>
<!-- 事件分析 --> <!-- 事件分析 -->
<div>事件分析</div> <div class="page">
</template> <a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline">
<a-form-model-item>
<script> <a-select v-model="queryform.value" style="width: 200px" placeholder="选择产品">
export default {}; <a-select-option value="jack">
</script> Jack
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker valueFormat="yyyy-MM-DD" v-model="queryform.value" style="width: 300px" />
</a-form-model-item>
<a-form-model-item>
<a-button type="primary">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div class="main">
<a-table :columns="columns" :data-source="data" :scroll="{ y: 590 }">
</a-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
queryform: {
value: null
},
labelCol: {
span: 1
},
wrapperCol: {
span: 14
},
columns: [{
title: "序号",
width: "70px",
customRender: (text, record, index) => `${index+1}`,
align: "center",
},
{
title: "事件",
dataIndex: "title",
align: "center",
},
{
title: '事件ID',
dataIndex: 'address',
align: "center",
},
{
title: '事件数量(日均)',
dataIndex: 'address1',
align: "center",
},
{
title: '事件平均使用时长(单次)',
dataIndex: 'address2',
align: "center",
}
],
data: []
}
}
};
</script>
<style lang="less" scoped> <style lang="less" scoped>
.page{
padding: 15px;
}
</style> </style>
\ No newline at end of file
<template> <template>
<!-- 信息流分析 --> <!-- 信息流分析 -->
<div>信息流分析</div> <div class="page">
</template> <a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline">
<a-form-model-item>
<script> <a-select v-model="queryform.value" style="width: 200px" placeholder="选择产品">
export default {}; <a-select-option value="jack">
</script> Jack
</a-select-option>
<style lang="less" scoped> </a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker valueFormat="yyyy-MM-DD" v-model="queryform.value" style="width: 300px" />
</a-form-model-item>
<a-form-model-item>
<a-select v-model="queryform.value" style="width: 200px" placeholder="选择一级场景">
<a-select-option value="jack">
Jack
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-select v-model="queryform.value" style="width: 200px" placeholder="选择二级场景">
<a-select-option value="jack">
Jack
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-select v-model="queryform.value" style="width: 200px" placeholder="选择三级场景">
<a-select-option value="jack">
Jack
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div class="table-box">
<div class="mb">
<span style="margin-right: 30px;">指标筛选</span>
<a-checkbox-group v-model="queryform.value">
<a-checkbox value="1">访问人数</a-checkbox>
<a-checkbox value="2">打开次数</a-checkbox>
<a-checkbox value="3">访问页面数</a-checkbox>
</a-checkbox-group>
</div>
<div class="mb">
<span style="margin-right: 30px;">对比筛选</span>
<a-checkbox-group v-model="queryform.value">
<a-checkbox value="1">日对比</a-checkbox>
</a-checkbox-group>
</div>
<a-table :columns="columns" :data-source="data" :scroll="{ y: 590 }" :pagination="pagination">
</a-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
queryform: {
value: null
},
labelCol: {
span: 1
},
wrapperCol: {
span: 14
},
columns: [{
title: "序号",
width: "70px",
customRender: (text, record, index) => `${index+1}`,
align: "center",
},
{
title: "时间",
dataIndex: "title",
align: "center",
},
{
title: '产品名称',
dataIndex: 'address',
align: "center",
},
{
title: '一级场景',
dataIndex: 'address1',
align: "center",
},
{
title: '二级场景',
dataIndex: 'address2',
align: "center",
},
{
title: '三级场景',
dataIndex: 'address3',
align: "center",
},{
title: '访问人数',
dataIndex: 'address5',
align: "center",
},{
title: '打开次数',
dataIndex: 'address4',
align: "center",
},{
title: '访问页面数',
dataIndex: 'address8',
align: "center",
}
],
data: [],
pagination: {
total: 0,
pageSize: 10, //每页中显示10条数据
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"], //每页中显示的数据
showTotal: total => `共有 ${total} 条数据`, //分页中显示总的数据
},
}
}
};
</script>
<style lang="less" scoped>
.page {
height: calc(100% - 50px);
display: flex;
flex-direction: column;
/deep/.ant-form {
padding: 15px;
}
.table-box {
padding: 0 15px;
.mb{
margin-bottom: 20px;
}
}
}
</style> </style>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
> >
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<router-view style="padding: 0 1rem" /> <router-view />
</div> </div>
</div> </div>
</template> </template>
...@@ -103,6 +103,9 @@ export default { ...@@ -103,6 +103,9 @@ export default {
margin-left: 0.7rem !important; margin-left: 0.7rem !important;
} }
} }
/deep/.ant-tabs-bar{
margin: 0;
}
} }
</style> </style>
<template> <template>
<!-- 页面分析 --> <!-- 页面分析 -->
<div>页面分析</div> <div class="page">
</template> <a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline">
<a-form-model-item>
<script> <a-select v-model="queryform.value" style="width: 200px" placeholder="选择产品">
export default {}; <a-select-option value="jack">
</script> Jack
</a-select-option>
<style lang="less" scoped> </a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker valueFormat="yyyy-MM-DD" v-model="queryform.value" style="width: 300px" />
</a-form-model-item>
<a-form-model-item>
<a-button type="primary">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div class="box">
<div class="left-dv">
<div>页面访问指标趋势</div>
<div class="txt-dv">
<div>
<div class="num">4058</div>
<div>页面累计访问次数</div>
</div>
<div>
<div class="num">4058</div>
<div>日均访问次数</div>
</div>
</div>
<div id="number"></div>
</div>
<div class="right-dv">
<div class="page-box">
<div class="page-dv">
<div>人均访问深度</div>
<div class="page-num">4.00页</div>
</div>
<div class="page-dv">
<div>次均访问深度</div>
<div class="page-num">4.00页</div>
</div>
</div>
<div class="chatrs-dv">
<div>页面访问次数TOP10</div>
<div id="pages"></div>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
data() {
return {
queryform: {
value: null
},
labelCol: {
span: 1
},
wrapperCol: {
span: 14
},
}
},
mounted() {
this.initLine()
this.initBar()
},
methods: {
initBar() {
let chartDom = document.getElementById('pages')
let myChart = echarts.init(chartDom);
myChart.setOption({
legend: {
bottom: 0,
itemWidth:10,
itemHeight:10
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
color:['#29D090'],
grid: {
top:'3%',
left: '3%',
right: '3%',
bottom: '10%',
containLabel: true
},
xAxis: {
type: 'value',
boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: ['Brazil', 'Indonesia', 'USA', 'India', 'China', 'World'],
axisTick: {
show: false
}
},
series: [{
name: '访问次数',
type: 'bar',
data: [18203, 23489, 29034, 104970, 131744, 630230],
barWidth:10
}
]
})
},
initLine() {
let chartDom = document.getElementById('number')
let myChart = echarts.init(chartDom);
myChart.setOption({
legend: {
bottom: 0
},
grid: {
left: '10%',
rigth: 0,
top: '5%',
bottom: '15%'
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
show: false
}
},
yAxis: {
type: 'value'
},
series: [{
name: '页面访问次数',
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line',
markLine: {
data: [{
type: 'average',
name: '均值'
}],
label: {
position: 'insideStartTop',
formatter: '{b}:{c}'
}
}
}]
})
}
}
};
</script>
<style lang="less" scoped>
.page {
height: calc(100% - 50px);
/deep/.ant-form {
padding: 15px;
border-bottom: solid 1px #efefef;
}
.box {
height: calc(100% - 70px);
display: flex;
.left-dv {
width: 55%;
min-height: 100%;
border-right: solid 1px #efefef;
padding: 15px;
.txt-dv {
display: flex;
justify-content: space-around;
margin: 50px;
text-align: center;
.num {
font-size: 24px;
margin-bottom: 10px;
}
}
#number {
height: 350px;
}
}
.right-dv {
flex: 1;
padding: 15px;
.page-box {
display: flex;
justify-content: space-between;
margin: 20px 0;
.page-dv {
width: calc(50% - 15px);
height: 140px;
background-color: #F5FAFF;
padding: 30px;
box-sizing: border-box;
.page-num {
font-size: 24px;
margin-top: 20px;
}
}
}
.chatrs-dv {
padding: 20px;
background-color: #F6FBF7;
}
#pages {
height: 290px;
}
}
}
}
</style> </style>
\ No newline at end of file
<template> <template>
<!-- 路径分析 --> <!-- 路径分析 -->
<div>路劲分析</div> <div class="page">
</template> <a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline">
<a-form-model-item>
<script> <a-select v-model="queryform.value" style="width: 200px" placeholder="选择产品">
export default {}; <a-select-option value="jack">
</script> Jack
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker valueFormat="yyyy-MM-DD" v-model="queryform.value" style="width: 300px" />
</a-form-model-item>
<a-form-model-item>
<a-button type="primary">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div id="path"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
data() {
return {
queryform: {
value: null
},
labelCol: {
span: 1
},
wrapperCol: {
span: 14
},
}
},
mounted() {
this.init()
},
methods: {
init() {
let chartDom = document.getElementById('path')
let myChart = echarts.init(chartDom);
myChart.setOption({
series: {
type: 'sankey',
layout: 'none',
emphasis: {
focus: 'adjacency'
},
color:['#FFCAC4','#6D86DE','#409AFE','#4DB3EA','#07CF8C'],
nodeWidth:10,
data: [{
name: 'a'
},
{
name: 'b'
},
{
name: 'a1'
},
{
name: 'a2'
},
{
name: 'b1'
},
{
name: 'c'
}
],
links: [{
source: 'a',
target: 'a1',
value: 5,
lineStyle:{
color:'source'
}
},
{
source: 'a',
target: 'a2',
value: 3,
lineStyle:{
color:'source'
}
},
{
source: 'b',
target: 'b1',
value: 8,
lineStyle:{
color:'source'
}
},
{
source: 'a',
target: 'b1',
value: 3,
lineStyle:{
color:'source'
}
},
{
source: 'b1',
target: 'a1',
value: 1,
lineStyle:{
color:'source'
}
},
{
source: 'b1',
target: 'c',
value: 2,
lineStyle:{
color:'source'
}
}
]
}
})
}
}
};
</script>
<style lang="less" scoped> <style lang="less" scoped>
.page{
height: calc(100% - 50px);
display: flex;
flex-direction: column;
/deep/.ant-form {
padding: 15px;
}
#path{
flex: 1;
width: 70%;
margin: 0 auto;
}
}
</style> </style>
\ No newline at end of file
<template> <template>
<!-- 产品分析 --> <!-- 产品分析 -->
<div>产品热力图</div> <div class="page">
</template> <div class="img-dv">
<div id="queuing" @click="clickEvent"></div>
<script> </div>
export default {}; <div class="list-dv">
</script> <a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline">
<a-form-model-item>
<style lang="less" scoped> <a-select v-model="queryform.value" style="width: 180px" placeholder="选择产品">
<a-select-option value="jack">
Jack
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker valueFormat="yyyy-MM-DD" v-model="queryform.value" style="width: 300px" />
</a-form-model-item>
<a-form-model-item>
<a-select v-model="queryform.value" style="width: 390px" placeholder="选择产品">
<a-select-option value="jack">
Jack
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div class="main">
<div class="total-dv">
<div>总点击次数</div>
<div>312321</div>
</div>
<div style="margin-bottom: 20px;">事件排名Top10</div>
<a-table :columns="columns" :data-source="data" :scroll="{ y: 590 }">
</a-table>
</div>
</div>
</div>
</template>
<script>
import Heatmap from 'heatmap.js';
export default {
data() {
return {
queryform: {
value: null
},
labelCol: {
span: 1
},
wrapperCol: {
span: 14
},
columns: [{
title: "序号",
width: "70px",
customRender: (text, record, index) => `${index+1}`,
align: "center",
},
{
title: "事件",
dataIndex: "title",
align: "center",
},
{
title: '点击次数',
dataIndex: 'address',
align: "center",
},
{
title: '事件数量(日均)',
dataIndex: 'address1',
align: "center",
}
],
data: [],
heatmapInstance: null,
dataPoint: []
}
},
mounted() {
this.init('queuing')
},
methods: {
clickEvent(e) {
this.dataPoint.push({
x: e.layerX,
y: e.layerY,
value: 1
})
let data = {
max: 10,
min: 0,
data: this.dataPoint
};
this.heatmapInstance.setData(data);
},
init(el, dataPoint) {
let config = {
container: document.getElementById(el),
radius: 30,
maxOpacity: .8,
minOpacity: 0,
blur: .5
};
this.heatmapInstance = Heatmap.create(config);
}
}
};
</script>
<style lang="less" scoped>
.page {
width: 100%;
height: calc(100% - 50px);
display: flex;
.img-dv {
width: 60%;
min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
#queuing {
width: 740px;
height: 370px;
background-image: url('https://cdn.pixabay.com/photo/2023/03/22/20/16/muffin-7870491_640.jpg');
background-size: 100% 100%;
}
}
.list-dv {
width: 40%;
min-height: 100%;
border-left: solid 1px #efefef;
box-sizing: border-box;
/deep/.ant-form {
padding: 15px;
border-bottom: solid 1px #efefef;
}
.main {
padding: 15px;
}
.total-dv {
display: flex;
justify-content: space-between;
padding: 20px 0;
}
}
}
</style> </style>
\ No newline at end of file
<template> <template>
<!-- 使用习惯分析 --> <!-- 使用习惯分析 -->
<div>使用习惯</div> <div class="page">
</template> <a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline">
<a-form-model-item>
<script> <a-select v-model="queryform.value" style="width: 200px" placeholder="选择产品">
export default {}; <a-select-option value="jack">
</script> Jack
</a-select-option>
<style lang="less" scoped> </a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker valueFormat="yyyy-MM-DD" v-model="queryform.value" style="width: 300px" />
</a-form-model-item>
<a-form-model-item>
<a-button type="primary">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div class="charts-box">
<div id="canal"></div>
<div id="type"></div>
<div id="way"></div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
data() {
return {
queryform: {
value: null
},
labelCol: {
span: 1
},
wrapperCol: {
span: 14
},
}
},
mounted() {
this.initCanal()
this.initType()
this.initWay()
},
methods: {
initWay(){
let chartDom = document.getElementById('way')
let myChart = echarts.init(chartDom);
myChart.setOption({
title: {
text: '取号方式分析',
left: 'center'
},
tooltip: {
trigger: 'item',
},
legend: {
bottom: 0,
left: 'center',
itemWidth: 10,
itemHeight: 10
},
color: ['#6395F9', '#64DAAB', '#647798', '#F6C02D', '#7567FA', '#75CBED'],
series: [{
name: 'Access From',
type: 'pie',
radius: '65%',
label: {
normal: {
formatter: '{d}%' //自定义显示格式(b:name, c:value, d:百分比)
}
},
labelLine: {
normal: {
length: 1
}
},
data: [{
value: 1048,
name: 'Search Engine'
},
{
value: 735,
name: 'Direct'
},
{
value: 580,
name: 'Email'
},
{
value: 484,
name: 'Union Ads'
},
{
value: 300,
name: 'Video Ads'
}
],
}]
})
},
initType() {
let chartDom = document.getElementById('type')
let myChart = echarts.init(chartDom);
myChart.setOption({
title: {
text: '取号类型分析',
left: 'center'
},
tooltip: {
trigger: 'item',
},
legend: {
bottom: 0,
left: 'center',
itemWidth: 10,
itemHeight: 10
},
color: ['#6395F9', '#64DAAB', '#647798', '#F6C02D', '#7567FA', '#75CBED'],
series: [{
name: 'Access From',
type: 'pie',
radius: '65%',
label: {
normal: {
formatter: '{d}%' //自定义显示格式(b:name, c:value, d:百分比)
}
},
labelLine: {
normal: {
length: 1
}
},
data: [{
value: 1048,
name: 'Search Engine'
},
{
value: 735,
name: 'Direct'
},
{
value: 580,
name: 'Email'
},
{
value: 484,
name: 'Union Ads'
},
{
value: 300,
name: 'Video Ads'
}
],
}]
})
},
initCanal() {
let chartDom = document.getElementById('canal')
let myChart = echarts.init(chartDom);
myChart.setOption({
title: {
text: '取号渠道分析',
left: 'center'
},
tooltip: {
trigger: 'item',
},
legend: {
bottom: 0,
left: 'center',
itemWidth: 10,
itemHeight: 10
},
color: ['#6395F9', '#64DAAB', '#647798', '#F6C02D', '#7567FA', '#75CBED'],
series: [{
name: 'Access From',
type: 'pie',
radius: '65%',
label: {
normal: {
formatter: '{d}%' //自定义显示格式(b:name, c:value, d:百分比)
}
},
labelLine: {
normal: {
length: 1
}
},
data: [{
value: 1048,
name: '终端取号'
},
{
value: 735,
name: '在线取号'
}
]
}]
})
}
}
};
</script>
<style lang="less" scoped>
.page {
height: calc(100% - 50px);
display: flex;
flex-direction: column;
/deep/.ant-form {
padding: 15px;
}
.charts-box {
flex: 1;
display: flex;
justify-content: space-between;
padding: 50px 0;
#canal,#type,#way {
width: 30%;
height: 100%;
}
}
}
</style> </style>
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<script> <script>
import { deepClone } from "@/utils/js/common.js"; import { deepClone } from "@/utils/js/common.js";
import lodash from "lodash"; import lodash from "lodash";
import{getStatisticAges} from '@/api/dataAdmin.js'
export default { export default {
props: { props: {
info: { info: {
...@@ -40,19 +41,16 @@ export default { ...@@ -40,19 +41,16 @@ export default {
default: () => {}, default: () => {},
}, },
}, },
mounted() { async mounted() {
this._initEcharts(); let {data} = await getStatisticAges()
let label = data.map(item=> item.age_area)
let value = data.map(item=> item.nums)
this._initEcharts(label,value);
}, },
methods: { methods: {
_initEcharts() { _initEcharts(label,value) {
const NAME = [];
const VALUE = [];
const myChart = this.$echarts.init(this.$el); const myChart = this.$echarts.init(this.$el);
const echarts = this.$echarts; const echarts = this.$echarts;
this.info.forEach((item) => {
NAME.push(item.name);
VALUE.push(item.value);
});
let option = { let option = {
legend: { legend: {
data: ["预约次数"], data: ["预约次数"],
...@@ -72,7 +70,10 @@ export default { ...@@ -72,7 +70,10 @@ export default {
}, },
xAxis: { xAxis: {
type: "category", type: "category",
data: NAME, data: label,
axisTick:{
show:false
}
}, },
yAxis: { yAxis: {
type: "value", type: "value",
...@@ -85,7 +86,7 @@ export default { ...@@ -85,7 +86,7 @@ export default {
}, },
series: [ series: [
{ {
data: VALUE, data: value,
name: "预约次数", name: "预约次数",
barWidth: "50%", barWidth: "50%",
type: "bar", type: "bar",
......
...@@ -8,58 +8,18 @@ export default { ...@@ -8,58 +8,18 @@ export default {
props: { props: {
info: { info: {
type: Array, type: Array,
default: () => [ default: () => [],
{
value: 140,
name: "08:00~09:00",
},
{
value: 150,
name: "09:00~10:00",
},
{
value: 160,
name: "10:00~11:00",
},
{
value: 170,
name: "11:00~12:00",
},
{
value: 180,
name: "12:00~13:00",
},
{
value: 190,
name: "13:00~14:00",
},
{
value: 200,
name: "14:00~15:00",
},
{
value: 210,
name: "15:00~16:00",
},
{
value: 220,
name: "16:00~17:00",
},
{
value: 230,
name: "18:00~19:00",
},
{
value: 240,
name: "19:00~20:00",
},
],
}, },
option: { option: {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
}, },
watch:{
info(){
this._initEcharts();
}
},
mounted() { mounted() {
this._initEcharts(); this._initEcharts();
}, },
...@@ -70,8 +30,8 @@ export default { ...@@ -70,8 +30,8 @@ export default {
const myChart = this.$echarts.init(this.$el); const myChart = this.$echarts.init(this.$el);
const echarts = this.$echarts; const echarts = this.$echarts;
this.info.forEach((item) => { this.info.forEach((item) => {
NAME.push(item.name); NAME.push(item.datetime);
VALUE.push(item.value); VALUE.push(item.count);
}); });
let option = { let option = {
legend: { legend: {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<script> <script>
import { deepClone } from "@/utils/js/common.js"; import { deepClone } from "@/utils/js/common.js";
import lodash from "lodash"; import lodash from "lodash";
import{getStatisticSexual} from '@/api/dataAdmin.js'
export default { export default {
props: { props: {
info: { info: {
...@@ -24,11 +25,13 @@ export default { ...@@ -24,11 +25,13 @@ export default {
default: () => {}, default: () => {},
}, },
}, },
mounted() { async mounted() {
this._initEcharts(); let {data} = await getStatisticSexual()
let value = data.map(({idcard_Sex,nums})=>({name:idcard_Sex,value:nums}))
this._initEcharts(value);
}, },
methods: { methods: {
_initEcharts() { _initEcharts(value) {
const myChart = this.$echarts.init(this.$el); const myChart = this.$echarts.init(this.$el);
const echarts = this.$echarts; const echarts = this.$echarts;
...@@ -43,7 +46,6 @@ export default { ...@@ -43,7 +46,6 @@ export default {
}, },
legend: { legend: {
data: this.info.map((item) => item.name),
bottom: "5%", bottom: "5%",
right: "center", right: "center",
itemWidth: 13, itemWidth: 13,
...@@ -84,19 +86,13 @@ export default { ...@@ -84,19 +86,13 @@ export default {
rich_green: { rich_green: {
color: "#50CCCB", color: "#50CCCB",
}, },
}, }
formatter: function (params) {
if (params.name === "女士") {
return (
params.name + "\n\n" + `{rich_blue|${params.percent}%}`
);
} else if (params.name === "男士") {
return (
params.name + "\n\n" + `{rich_green|${params.percent}%}`
);
}
},
}, },
label: {
normal: {
formatter: '{d}%' //自定义显示格式(b:name, c:value, d:百分比)
}
},
labelLine: { labelLine: {
length: 10, length: 10,
length2: 60, length2: 60,
...@@ -110,7 +106,7 @@ export default { ...@@ -110,7 +106,7 @@ export default {
}, },
}, },
}, },
data: this.info, data: value,
}, },
], ],
}; };
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
const echarts = this.$echarts; const echarts = this.$echarts;
let option = { let option = {
title: { title: {
text: `{c|${this.info.name}} \n{a|` + this.info.value + "%" + "}", text: `{c|${this.info.starttime}~${this.info.endtime}} \n{a|` + this.info.success_rate * 100 + "%" + "}",
x: "center", x: "center",
y: "center", y: "center",
textStyle: { textStyle: {
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
}, },
data: [ data: [
{ {
value: this.info.value, value: this.info.success_rate * 100,
name: "", name: "",
itemStyle: { itemStyle: {
normal: { normal: {
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
}, },
}, },
{ {
value: 100 - this.info.value, value: 100 - (this.info.success_rate * 100),
name: "", name: "",
label: { label: {
normal: { normal: {
......
...@@ -4,54 +4,51 @@ ...@@ -4,54 +4,51 @@
<Head :title="'预约热度排名'"> <Head :title="'预约热度排名'">
<template slot="operation"> <template slot="operation">
<a-range-picker <a-range-picker
format="YYYY年MM月DD日" valueFormat="YYYY-MM-DD"
class="range_picker_style" class="range_picker_style"
@change="rangePickerChange" @change="rangePickerChange"
v-model="BegindAndEndTime" v-model="BegindAndEndTime"
v-if="day == 5"
> >
</a-range-picker> </a-range-picker>
<a-select default-value="001"> <a-select v-model="day">
<!-- <a-select-option <a-select-option value="0"> 今天 </a-select-option>
v-for="(item, index) of selectOptions" <a-select-option value="1"> 近7天 </a-select-option>
:key="index" <a-select-option value="2"> 近30天 </a-select-option>
:value="item.value" <a-select-option value="3"> 近90天 </a-select-option>
> <a-select-option value="4"> 近180天 </a-select-option>
{{ item.label }} <a-select-option value="5"> 自定义 </a-select-option>
</a-select-option> -->
<a-select-option value="001"> 近3天 </a-select-option>
<a-select-option value="002"> 近7天 </a-select-option>
</a-select> </a-select>
<a-button type="primary">搜索</a-button> <a-button type="primary" @click="getData">搜索</a-button>
</template> </template>
</Head> </Head>
<div class="heat_box"> <div class="heat_box" v-if="data">
<ul class="heat_left"> <ul class="heat_left">
<li class="list"> <li class="list">
<span>排名</span> <span>排名</span>
<i>部门名称</i> <i>部门名称</i>
<b>预约热度</b> <b>预约热度</b>
</li> </li>
<li class="list" v-for="item of 5"> <li class="list" v-for="item,index in data.section" :key="index">
<span>NO.{{ item }}</span> <span>NO.{{ index+1 }}</span>
<i>区发改局</i> <i>{{item.deptname}}</i>
<b> <b>
<a-progress :percent="90" :show-info="false" status="active" <a-progress :percent="item.count" :show-info="false" status="active"
/></b> /></b>
</li> </li>
</ul> </ul>
<ul class="heat_right"> <ul class="heat_right">
<li class="list"> <li class="list">
<span>排名</span> <span>排名</span>
<i>部门名称</i> <i>事项名称</i>
<b>预约热度</b> <b>预约热度</b>
</li> </li>
<li class="list" v-for="item of 5"> <li class="list" v-for="item,index in data.matter" :key="index">
<span>NO.{{ item }}</span> <span>NO.{{ index+1 }}</span>
<i>区发改局</i> <i>{{item.mattername}}</i>
<b> <b>
<a-progress :percent="90" :show-info="false" status="active" <a-progress :percent="item.count" :show-info="false" status="active"
/></b> /></b>
</li> </li>
</ul> </ul>
...@@ -62,20 +59,37 @@ ...@@ -62,20 +59,37 @@
<script> <script>
import Head from "./components/header.vue"; import Head from "./components/header.vue";
import {getOrderRanking} from '@/api/dataAdmin.js'
export default { export default {
name: "PortalAdminVueHeatRanking", name: "PortalAdminVueHeatRanking",
data() { data() {
return { return {
day:'0',
BegindAndEndTime: [], BegindAndEndTime: [],
data:null
}; };
}, },
components: { components: {
Head, Head,
}, },
mounted() {}, watch:{
day(val){
if (val != 5) this.BegindAndEndTime = []
}
},
mounted() {
this.getData()
},
methods: { methods: {
getData(){
getOrderRanking({
selected:this.day == 5 ? null : this.day,
time:this.BegindAndEndTime
}).then(res=>{
this.data = res.data
})
},
rangePickerChange(val) { rangePickerChange(val) {
console.log(val); console.log(val);
}, },
......
...@@ -4,30 +4,27 @@ ...@@ -4,30 +4,27 @@
<Head :title="'预约趋势研究'"> <Head :title="'预约趋势研究'">
<template slot="operation"> <template slot="operation">
<a-range-picker <a-range-picker
format="YYYY年MM月DD日" valueFormat="YYYY-MM-DD"
class="range_picker_style" class="range_picker_style"
@change="rangePickerChange" @change="rangePickerChange"
v-model="BegindAndEndTime" v-model="BegindAndEndTime"
v-if="day == 5"
> >
</a-range-picker> </a-range-picker>
<a-select default-value="001"> <a-select v-model="day">
<!-- <a-select-option <a-select-option value="0"> 今天 </a-select-option>
v-for="(item, index) of selectOptions" <a-select-option value="1"> 近7天 </a-select-option>
:key="index" <a-select-option value="2"> 近30天 </a-select-option>
:value="item.value" <a-select-option value="3"> 近90天 </a-select-option>
> <a-select-option value="4"> 近180天 </a-select-option>
{{ item.label }} <a-select-option value="5"> 自定义 </a-select-option>
</a-select-option> -->
<a-select-option value="001"> 近3天 </a-select-option>
<a-select-option value="002"> 近7天 </a-select-option>
</a-select> </a-select>
<a-button type="primary">搜索</a-button> <a-button type="primary" @click="getData">搜索</a-button>
</template> </template>
</Head> </Head>
<div class="echarts"> <div class="echarts">
<Brokenline /> <Brokenline :info="chartsData" v-if="chartsData"/>
</div> </div>
</div> </div>
<div class="fx"> <div class="fx">
...@@ -39,11 +36,11 @@ ...@@ -39,11 +36,11 @@
:pagination="false" :pagination="false"
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
:scroll="{ y: 590 }"
> >
</a-table> </a-table>
<p class="updateTime"> <p class="updateTime">
<i class="fa fa-info-circle"></i>数据更新时间:2021-07-12 <i class="fa fa-info-circle"></i>数据更新时间:{{date}},受数据波动影响,可能会有延迟。
18:00:00,受数据波动影响,可能会有延迟。
</p> </p>
</div> </div>
</div> </div>
...@@ -53,22 +50,18 @@ ...@@ -53,22 +50,18 @@
<script> <script>
import Head from "./components/header.vue"; import Head from "./components/header.vue";
import Brokenline from "./components/line.vue"; import Brokenline from "./components/line.vue";
import {getTrend} from '@/api/dataAdmin.js'
import moment from 'moment'
export default { export default {
name: "PortalAdminVueMakeDataAnalyse", name: "PortalAdminVueMakeDataAnalyse",
data() { data() {
return { return {
day:'0',
date:'',
BegindAndEndTime: [], BegindAndEndTime: [],
chartsData:null,
tableSourceData: [], tableSourceData: [],
tableHeaders: [ tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{ {
title: "研究对象", title: "研究对象",
align: "center", align: "center",
...@@ -106,22 +99,33 @@ export default { ...@@ -106,22 +99,33 @@ export default {
Head, Head,
Brokenline, Brokenline,
}, },
watch:{
day(val){
if (val != 5) this.BegindAndEndTime = []
}
},
mounted() { mounted() {
for (let key = 0; key < 2; key++) { this.date = moment().format('yyyy-MM-DD hh:mm:ss')
this.tableSourceData.push({ this.getData()
id: `00${key + 1}`,
研究对象: `预约次数${key + 1}`,
预约总量: `56 ${key + 1}`,
开放预约天数: `1 ${key + 1}`,
预约日均值: `56 ${key + 1}`,
整体同比: `23% ${key + 1}`,
整体环比: `18% ${key + 1}`,
});
}
}, },
methods: { methods: {
getData(){
getTrend({
selected:this.day == 5 ? null : this.day,
time:this.BegindAndEndTime
}).then(res=>{
this.chartsData = res.data.list
this.tableSourceData.push({
研究对象: `预约次数`,
预约总量: res.data.orderAll,
开放预约天数: res.data.openday,
预约日均值: res.data.prev_num,
整体同比: res.data.tbi,
整体环比: res.data.hbi,
});
})
},
rangePickerChange(val) { rangePickerChange(val) {
console.log(val); console.log(val);
}, },
...@@ -141,7 +145,7 @@ export default { ...@@ -141,7 +145,7 @@ export default {
.table_box { .table_box {
padding: 15px; padding: 15px;
.updateTime { .updateTime {
margin: 10px 0; margin: 15px 0;
i { i {
margin: 0 5px; margin: 0 5px;
-webkit-transform: rotate(180deg); -webkit-transform: rotate(180deg);
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</li> </li>
</template> </template>
</ul> </ul>
<p class="bottom">服务类数据分析<a-icon type="swap-right" /></p> <p class="bottom" @click="handleCkeck('/home/dataManagement/serviceDataAnalyse/makeTrendResearch')">服务类数据分析<a-icon type="swap-right" /></p>
</li> </li>
</ul> </ul>
......
This diff is collapsed.
...@@ -4610,6 +4610,171 @@ msg|String|消息|- ...@@ -4610,6 +4610,171 @@ msg|String|消息|-
``` ```
## 用户行为分析
### 客户端埋点
**请求URL:** page/bury/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存页面事件记录
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
productId|Long|否|产品id
productName|String|否|产品名称
pageCode|String|否|页面编码(页面路由)
pageName|String|否|页面名称
sceneDepth|Integer|否|场景维度
depthValue|Integer|否|本次访问深度
eventInfo|object|否|页面事件信息
&emsp;businessCode|String|否|业务场景编码
&emsp;businessName|String|否|业务场景名称
&emsp;eventCode|String|否|事件编码
&emsp;eventName|String|否|事件名称
&emsp;takeTime|Integer|否|事件耗时(单位毫秒)
&emsp;coordinate|String|否|事件坐标(x,y)
routeInfo|object|否|页面路由信息
&emsp;sourceCode|String|否|开始页面编码(路由)
&emsp;sourceName|String|否|开始页面名称
&emsp;targetCode|String|否|目标页面编码(路由)
&emsp;targetName|String|否|目标页面名称
**请求样例:**
```
{
"productId": 7146,
"productName": "5x2mfa",
"pageCode": "gy92kw",
"pageName": "yxjkem",
"sceneDepth": 1,
"depthValue": 1,
"eventInfo": {
"businessCode": "hq6abb",
"businessName": "8996vc",
"eventCode": "u9xo59",
"eventName": "ku7l71",
"takeTime": 12345,
"coordinate": "12,13"
},
"routeInfo": {
"sourceCode": "6mq7ry",
"sourceName": "fxb3mk",
"targetCode": "fzrr3u",
"targetName": "fzrr3u"
}
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;productId|Long|产品id
&emsp;productName|String|产品名称
&emsp;pageCode|String|页面编码(页面路由)
&emsp;pageName|String|页面名称
&emsp;sceneDepth|Integer|场景维度
&emsp;depthValue|Integer|本次访问深度
&emsp;eventInfo|object|页面事件信息
&emsp;&emsp;businessCode|String|业务场景编码
&emsp;&emsp;businessName|String|业务场景名称
&emsp;&emsp;eventCode|String|事件编码
&emsp;&emsp;eventName|String|事件名称
&emsp;&emsp;takeTime|Integer|事件耗时(单位毫秒)
&emsp;&emsp;coordinate|String|事件坐标(x,y)
&emsp;routeInfo|object|页面路由信息
&emsp;&emsp;sourceCode|String|开始页面编码(路由)
&emsp;&emsp;sourceName|String|开始页面名称
&emsp;&emsp;targetCode|String|目标页面编码(路由)
&emsp;&emsp;targetName|String|目标页面名称
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
### 保存页面截图
**请求URL:** page/bury/screen/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新产品页面配置:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
deviceNum|String|否|设备编码
productId|Long|否|产品id
productName|String|否|产品名称
pageCode|String|否|页面编码(页面路由)
pageName|String|否|页面名称
screenUrl|String|否|页面截图地址
**请求样例:**
```
{
"deviceNum":"fblh4k",
"productId":427,
"productName":"oo1k4e",
"pageCode":"5fzoqc",
"pageName":"r8smsl",
"screenUrl":"feq3hw",
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;deviceNum|String|设备编码
&emsp;&emsp;productId|Long|产品id
&emsp;&emsp;productName|String|产品名称
&emsp;&emsp;pageCode|String|页面编码(页面路由)
&emsp;&emsp;pageName|String|页面名称
&emsp;&emsp;screenUrl|String|页面截图地址
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
## 字典附录 ## 字典附录
### userType ### userType
字典参数key|字典参数值|其它 字典参数key|字典参数值|其它
......
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import java.util.List;
/**
* 产品页面配置Dao
* 产品页面配置 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageAccessDao extends ICRUDDao<PageAccessEntity,Long>{
}
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
import java.util.List;
/**
* 产品页面配置Dao
* 产品页面配置 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageAccessDepthDao extends ICRUDDao<PageAccessDepthEntity,Long>{
}
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageEventEntity;
import java.util.List;
/**
* 页面事件记录Dao
* 页面事件记录 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageEventDao extends ICRUDDao<PageEventEntity,Long>{
}
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageInfoEntity;
import java.util.List;
/**
* 产品页面配置Dao
* 产品页面配置 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageInfoDao extends ICRUDDao<PageInfoEntity,Long>{
}
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageRouteEntity;
import java.util.List;
/**
* 页面路径记录Dao
* 页面路径记录 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageRouteDao extends ICRUDDao<PageRouteEntity,Long>{
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageAccessDao;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 产品页面配置DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageAccessDao")
public class PageAccessDaoImpl extends BaseCRUDDaoMybatis<PageAccessEntity,Long> implements PageAccessDao {
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageAccessDepthDao;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 产品页面配置DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageAccessDepthDao")
public class PageAccessDepthDaoImpl extends BaseCRUDDaoMybatis<PageAccessDepthEntity,Long> implements PageAccessDepthDao {
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageEventDao;
import com.mortals.xhx.module.page.model.PageEventEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 页面事件记录DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageEventDao")
public class PageEventDaoImpl extends BaseCRUDDaoMybatis<PageEventEntity,Long> implements PageEventDao {
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageInfoDao;
import com.mortals.xhx.module.page.model.PageInfoEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 产品页面配置DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageInfoDao")
public class PageInfoDaoImpl extends BaseCRUDDaoMybatis<PageInfoEntity,Long> implements PageInfoDao {
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageRouteDao;
import com.mortals.xhx.module.page.model.PageRouteEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 页面路径记录DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageRouteDao")
public class PageRouteDaoImpl extends BaseCRUDDaoMybatis<PageRouteEntity,Long> implements PageRouteDao {
}
package com.mortals.xhx.module.page.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.vo.PageAccessDepthVo;
/**
* 产品页面配置实体对象
*
* @author zxfei
* @date 2023-04-12
*/
public class PageAccessDepthEntity extends PageAccessDepthVo {
private static final long serialVersionUID = 1L;
/**
* 设备编码
*/
private String deviceNum;
/**
* 产品id
*/
private Long productId;
/**
* 产品名称
*/
private String productName;
/**
* 页面编码(页面路由)
*/
private String pageCode;
/**
* 页面名称
*/
private String pageName;
/**
* 本次访问深度
*/
private Integer depthValue;
public PageAccessDepthEntity(){}
/**
* 获取 设备编码
* @return String
*/
public String getDeviceNum(){
return deviceNum;
}
/**
* 设置 设备编码
* @param deviceNum
*/
public void setDeviceNum(String deviceNum){
this.deviceNum = deviceNum;
}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 产品名称
* @return String
*/
public String getProductName(){
return productName;
}
/**
* 设置 产品名称
* @param productName
*/
public void setProductName(String productName){
this.productName = productName;
}
/**
* 获取 页面编码(页面路由)
* @return String
*/
public String getPageCode(){
return pageCode;
}
/**
* 设置 页面编码(页面路由)
* @param pageCode
*/
public void setPageCode(String pageCode){
this.pageCode = pageCode;
}
/**
* 获取 页面名称
* @return String
*/
public String getPageName(){
return pageName;
}
/**
* 设置 页面名称
* @param pageName
*/
public void setPageName(String pageName){
this.pageName = pageName;
}
/**
* 获取 本次访问深度
* @return Integer
*/
public Integer getDepthValue(){
return depthValue;
}
/**
* 设置 本次访问深度
* @param depthValue
*/
public void setDepthValue(Integer depthValue){
this.depthValue = depthValue;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PageAccessDepthEntity) {
PageAccessDepthEntity tmp = (PageAccessDepthEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",deviceNum:").append(getDeviceNum());
sb.append(",productId:").append(getProductId());
sb.append(",productName:").append(getProductName());
sb.append(",pageCode:").append(getPageCode());
sb.append(",pageName:").append(getPageName());
sb.append(",depthValue:").append(getDepthValue());
return sb.toString();
}
public void initAttrValue(){
this.deviceNum = "";
this.productId = null;
this.productName = "";
this.pageCode = "";
this.pageName = "";
this.depthValue = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.model.pdu;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import com.mortals.xhx.module.page.model.PageEventEntity;
import com.mortals.xhx.module.page.model.PageRouteEntity;
import lombok.Data;
/***
* 页面数据埋点信息
*/
@Data
public class BuryPointPdu {
/** 设备编号 */
private String deviceNum;
/*** 产品id */
private Long productId;
/*** 产品名称 */
private String productName;
/*** 页面编码(页面路由) */
private String pageCode;
/** 页面名称 */
private String pageName;
/*** 场景维度 */
private Integer sceneDepth;
/*** 本次访问深度 */
private Integer depthValue;
/** 产品页面访问深度 **/
private PageEventEntity eventInfo;
/** 产品页面访问深度 **/
private PageRouteEntity routeInfo;
}
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