Commit 5dac0bef authored by xj's avatar xj

完成服务类数据分析接口对接

parent 3b8839d6
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"version": "0.1.0", "version": "0.1.0",
"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",
...@@ -1711,7 +1712,6 @@ ...@@ -1711,7 +1712,6 @@
"version": "7.20.7", "version": "7.20.7",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.7.tgz", "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.7.tgz",
"integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==",
"dev": true,
"dependencies": { "dependencies": {
"regenerator-runtime": "^0.13.11" "regenerator-runtime": "^0.13.11"
}, },
...@@ -1783,6 +1783,56 @@ ...@@ -1783,6 +1783,56 @@
"@hapi/hoek": "^9.0.0" "@hapi/hoek": "^9.0.0"
} }
}, },
"node_modules/@jiaminghi/bezier-curve": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz",
"integrity": "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw==",
"dependencies": {
"@babel/runtime": "^7.5.5"
}
},
"node_modules/@jiaminghi/c-render": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@jiaminghi/c-render/-/c-render-0.4.3.tgz",
"integrity": "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q==",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/bezier-curve": "*",
"@jiaminghi/color": "*",
"@jiaminghi/transition": "*"
}
},
"node_modules/@jiaminghi/charts": {
"version": "0.2.18",
"resolved": "https://registry.npmjs.org/@jiaminghi/charts/-/charts-0.2.18.tgz",
"integrity": "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA==",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/c-render": "^0.4.3"
}
},
"node_modules/@jiaminghi/color": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@jiaminghi/color/-/color-1.1.3.tgz",
"integrity": "sha512-ZY3hdorgODk4OSTbxyXBPxAxHPIVf9rPlKJyK1C1db46a50J0reFKpAvfZG8zMG3lvM60IR7Qawgcu4ZDO3+Hg=="
},
"node_modules/@jiaminghi/data-view": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/@jiaminghi/data-view/-/data-view-2.10.0.tgz",
"integrity": "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA==",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/charts": "*"
}
},
"node_modules/@jiaminghi/transition": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/@jiaminghi/transition/-/transition-1.1.11.tgz",
"integrity": "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg==",
"dependencies": {
"@babel/runtime": "^7.5.5"
}
},
"node_modules/@jridgewell/gen-mapping": { "node_modules/@jridgewell/gen-mapping": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz",
...@@ -12614,7 +12664,6 @@ ...@@ -12614,7 +12664,6 @@
"version": "7.20.7", "version": "7.20.7",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.7.tgz", "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.7.tgz",
"integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==",
"dev": true,
"requires": { "requires": {
"regenerator-runtime": "^0.13.11" "regenerator-runtime": "^0.13.11"
} }
...@@ -12674,6 +12723,56 @@ ...@@ -12674,6 +12723,56 @@
"@hapi/hoek": "^9.0.0" "@hapi/hoek": "^9.0.0"
} }
}, },
"@jiaminghi/bezier-curve": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz",
"integrity": "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw==",
"requires": {
"@babel/runtime": "^7.5.5"
}
},
"@jiaminghi/c-render": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@jiaminghi/c-render/-/c-render-0.4.3.tgz",
"integrity": "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q==",
"requires": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/bezier-curve": "*",
"@jiaminghi/color": "*",
"@jiaminghi/transition": "*"
}
},
"@jiaminghi/charts": {
"version": "0.2.18",
"resolved": "https://registry.npmjs.org/@jiaminghi/charts/-/charts-0.2.18.tgz",
"integrity": "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA==",
"requires": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/c-render": "^0.4.3"
}
},
"@jiaminghi/color": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@jiaminghi/color/-/color-1.1.3.tgz",
"integrity": "sha512-ZY3hdorgODk4OSTbxyXBPxAxHPIVf9rPlKJyK1C1db46a50J0reFKpAvfZG8zMG3lvM60IR7Qawgcu4ZDO3+Hg=="
},
"@jiaminghi/data-view": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/@jiaminghi/data-view/-/data-view-2.10.0.tgz",
"integrity": "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA==",
"requires": {
"@babel/runtime": "^7.5.5",
"@jiaminghi/charts": "*"
}
},
"@jiaminghi/transition": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/@jiaminghi/transition/-/transition-1.1.11.tgz",
"integrity": "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg==",
"requires": {
"@babel/runtime": "^7.5.5"
}
},
"@jridgewell/gen-mapping": { "@jridgewell/gen-mapping": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz",
......
...@@ -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",
......
...@@ -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;
......
...@@ -91,10 +91,10 @@ ...@@ -91,10 +91,10 @@
this.dataPoint.push({ this.dataPoint.push({
x: e.layerX, x: e.layerX,
y: e.layerY, y: e.layerY,
value: 20 value: 1
}) })
let data = { let data = {
max: 100, max: 10,
min: 0, min: 0,
data: this.dataPoint data: this.dataPoint
}; };
......
...@@ -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,18 +86,12 @@ export default { ...@@ -84,18 +86,12 @@ 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,
...@@ -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:{
mounted() { day(val){
for (let key = 0; key < 2; key++) { if (val != 5) this.BegindAndEndTime = []
this.tableSourceData.push({
id: `00${key + 1}`,
研究对象: `预约次数${key + 1}`,
预约总量: `56 ${key + 1}`,
开放预约天数: `1 ${key + 1}`,
预约日均值: `56 ${key + 1}`,
整体同比: `23% ${key + 1}`,
整体环比: `18% ${key + 1}`,
});
} }
}, },
mounted() {
this.date = moment().format('yyyy-MM-DD hh:mm:ss')
this.getData()
},
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>
......
...@@ -937,7 +937,7 @@ ...@@ -937,7 +937,7 @@
"@babel/types" "^7.4.4" "@babel/types" "^7.4.4"
"esutils" "^2.0.2" "esutils" "^2.0.2"
"@babel/runtime@^7.12.13", "@babel/runtime@^7.8.4": "@babel/runtime@^7.12.13", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4":
"integrity" "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==" "integrity" "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ=="
"resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.7.tgz" "resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.7.tgz"
"version" "7.20.7" "version" "7.20.7"
...@@ -990,6 +990,51 @@ ...@@ -990,6 +990,51 @@
dependencies: dependencies:
"@hapi/hoek" "^9.0.0" "@hapi/hoek" "^9.0.0"
"@jiaminghi/bezier-curve@*":
"integrity" "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw=="
"resolved" "https://registry.npmjs.org/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz"
"version" "0.0.9"
dependencies:
"@babel/runtime" "^7.5.5"
"@jiaminghi/c-render@^0.4.3":
"integrity" "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q=="
"resolved" "https://registry.npmjs.org/@jiaminghi/c-render/-/c-render-0.4.3.tgz"
"version" "0.4.3"
dependencies:
"@babel/runtime" "^7.5.5"
"@jiaminghi/bezier-curve" "*"
"@jiaminghi/color" "*"
"@jiaminghi/transition" "*"
"@jiaminghi/charts@*":
"integrity" "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA=="
"resolved" "https://registry.npmjs.org/@jiaminghi/charts/-/charts-0.2.18.tgz"
"version" "0.2.18"
dependencies:
"@babel/runtime" "^7.5.5"
"@jiaminghi/c-render" "^0.4.3"
"@jiaminghi/color@*":
"integrity" "sha512-ZY3hdorgODk4OSTbxyXBPxAxHPIVf9rPlKJyK1C1db46a50J0reFKpAvfZG8zMG3lvM60IR7Qawgcu4ZDO3+Hg=="
"resolved" "https://registry.npmjs.org/@jiaminghi/color/-/color-1.1.3.tgz"
"version" "1.1.3"
"@jiaminghi/data-view@^2.10.0":
"integrity" "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA=="
"resolved" "https://registry.npmjs.org/@jiaminghi/data-view/-/data-view-2.10.0.tgz"
"version" "2.10.0"
dependencies:
"@babel/runtime" "^7.5.5"
"@jiaminghi/charts" "*"
"@jiaminghi/transition@*":
"integrity" "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg=="
"resolved" "https://registry.npmjs.org/@jiaminghi/transition/-/transition-1.1.11.tgz"
"version" "1.1.11"
dependencies:
"@babel/runtime" "^7.5.5"
"@jridgewell/gen-mapping@^0.1.0": "@jridgewell/gen-mapping@^0.1.0":
"integrity" "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==" "integrity" "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w=="
"resolved" "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" "resolved" "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz"
......
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