解决趋势chart滚动问题
This commit is contained in:
parent
01d4359ca7
commit
22debbb070
4
App.vue
4
App.vue
|
|
@ -36,7 +36,9 @@
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
console.log('App Show')
|
uni.switchTab({
|
||||||
|
url:"/pages/index/index"
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide')
|
console.log('App Hide')
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<view><text class="quan"></text>卡路里分析</view>
|
<view><text class="quan"></text>卡路里分析</view>
|
||||||
</view>
|
</view>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" :cHeight="320" :cWidth="320" />
|
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" :canvas2d="true" canvasId="everyDay01"/>
|
||||||
</div>
|
</div>
|
||||||
<view class="foodtools">
|
<view class="foodtools">
|
||||||
<view class="type" v-for="(item,index) in foodInfo.list">
|
<view class="type" v-for="(item,index) in foodInfo.list">
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
<view><text class="quan"></text>营养元素能量占比</view>
|
<view><text class="quan"></text>营养元素能量占比</view>
|
||||||
</view>
|
</view>
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<qiun-data-charts type="ring" :opts="opts2" :chartData="chartData2" :cHeight="320" :cWidth="320" />
|
<qiun-data-charts type="ring" :opts="opts2" :chartData="chartData2" :canvas2d="true" canvasId="everyDay02"/>
|
||||||
</div>
|
</div>
|
||||||
<view class="foodtools">
|
<view class="foodtools">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
|
|
@ -138,7 +138,7 @@
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -228,7 +228,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 320rpx;
|
width: 320rpx;
|
||||||
height: 320rpx;
|
height: 320rpx;
|
||||||
margin: -30rpx auto 0;
|
margin: 0rpx auto 0;
|
||||||
|
|
||||||
.uchart-val {
|
.uchart-val {
|
||||||
margin-top: 70rpx;
|
margin-top: 70rpx;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="progress">
|
<view class="progress">
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<qiun-data-charts type="ring" :opts="opts" canvasId="foodCharts" :chartData="chartData"
|
<qiun-data-charts type="ring" :opts="opts" canvasId="everyMeal01" :chartData="chartData"
|
||||||
:cHeight="280" :cWidth="280" :canvas2d="true" />
|
:cHeight="280" :cWidth="280" :canvas2d="true" />
|
||||||
</div>
|
</div>
|
||||||
<view class="info" v-if="info.nutrients_four">
|
<view class="info" v-if="info.nutrients_four">
|
||||||
|
|
@ -81,8 +81,8 @@
|
||||||
<view class="title">热量和营养</view>
|
<view class="title">热量和营养</view>
|
||||||
<view class="progress">
|
<view class="progress">
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap">
|
||||||
<qiun-data-charts v-if="chartVisible" type="ring" :opts="opts2"
|
<qiun-data-charts type="ring" :opts="opts2"
|
||||||
:chartData="chartData2" :cHeight="280" :cWidth="280" />
|
:chartData="chartData2" :cHeight="280" :cWidth="280" canvasId="everyMeal02" :canvas2d="true"/>
|
||||||
</div>
|
</div>
|
||||||
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
||||||
<view class="info-item"
|
<view class="info-item"
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
let next = 0
|
let next = 0
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -327,7 +327,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 280rpx;
|
width: 280rpx;
|
||||||
height: 280rpx;
|
height: 280rpx;
|
||||||
margin-top: -30rpx;
|
margin-top: 0rpx;
|
||||||
margin-left: -15px;
|
margin-left: -15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,10 @@
|
||||||
<uni-icons type="mic-filled" size="20" color="#fff"></uni-icons>
|
<uni-icons type="mic-filled" size="20" color="#fff"></uni-icons>
|
||||||
语音搜索
|
语音搜索
|
||||||
</view>
|
</view>
|
||||||
<view class="mic-icon mic-icon2" @click="scanCode">
|
<!-- <view class="mic-icon mic-icon2" @click="scanCode">
|
||||||
<uni-icons type="scan" size="20" color="#fff"></uni-icons>
|
<uni-icons type="scan" size="20" color="#fff"></uni-icons>
|
||||||
扫一扫
|
扫一扫
|
||||||
</view>
|
</view> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
<!-- 搜索列表 -->
|
<!-- 搜索列表 -->
|
||||||
|
|
@ -96,8 +96,10 @@
|
||||||
<view class="jishiqi">
|
<view class="jishiqi">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="chart-wrap">
|
<view class="chart-wrap">
|
||||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="280" :cWidth="280"
|
<view class="charts-box">
|
||||||
:canvas2d="true" canvasId="searchCharts" />
|
<qiun-data-charts type="arcbar" :chartData="chartData" :canvas2d="true"
|
||||||
|
canvasId="search02" />
|
||||||
|
</view>
|
||||||
<view class="center">
|
<view class="center">
|
||||||
摄入
|
摄入
|
||||||
<text>{{foodInfo[0].today_intake}}</text>
|
<text>{{foodInfo[0].today_intake}}</text>
|
||||||
|
|
@ -194,7 +196,7 @@
|
||||||
<!-- 蓝牙称重 -->
|
<!-- 蓝牙称重 -->
|
||||||
<view class="blue-tooth" v-if="isBle">
|
<view class="blue-tooth" v-if="isBle">
|
||||||
<blue-tooth @handleBle="handleBle" :weightKcal="weightKcal"
|
<blue-tooth @handleBle="handleBle" :weightKcal="weightKcal"
|
||||||
@realTimeWeight="realTimeWeight" :btnType="'2'"></blue-tooth>
|
@realTimeWeight="realTimeWeight" :btnType="btnType"></blue-tooth>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 营养分析 -->
|
<!-- 营养分析 -->
|
||||||
|
|
@ -254,10 +256,11 @@
|
||||||
const plugin = requirePlugin("WechatSI")
|
const plugin = requirePlugin("WechatSI")
|
||||||
// #endif
|
// #endif
|
||||||
import blueTooth from "@/components/foodIndex/bluetooth_food.vue"
|
import blueTooth from "@/components/foodIndex/bluetooth_food.vue"
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
btnType: 2,
|
||||||
chartData: {
|
chartData: {
|
||||||
series: [{
|
series: [{
|
||||||
data: 0,
|
data: 0,
|
||||||
|
|
@ -274,7 +277,7 @@
|
||||||
isShop: false,
|
isShop: false,
|
||||||
lastPage: "",
|
lastPage: "",
|
||||||
isBle: true,
|
isBle: true,
|
||||||
weightKcal: "",
|
weightKcal: 0,
|
||||||
search_value: '',
|
search_value: '',
|
||||||
ActiveList: [],
|
ActiveList: [],
|
||||||
activeType: {},
|
activeType: {},
|
||||||
|
|
@ -300,6 +303,7 @@
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let that = this
|
let that = this
|
||||||
that.handleList()
|
that.handleList()
|
||||||
|
that.showScanCodeDlg = false
|
||||||
that.time = that.countFoodInfo.date
|
that.time = that.countFoodInfo.date
|
||||||
that.foodName = options.name
|
that.foodName = options.name
|
||||||
},
|
},
|
||||||
|
|
@ -366,6 +370,7 @@
|
||||||
barcode: res.result,
|
barcode: res.result,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
console.log("1111111111111", res)
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
that.ScanCodeMsg = res.msg
|
that.ScanCodeMsg = res.msg
|
||||||
that.showScanCodeDlg = true
|
that.showScanCodeDlg = true
|
||||||
|
|
@ -1291,12 +1296,12 @@
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
|
|
||||||
.chart-wrap {
|
.chart-wrap {
|
||||||
margin-top: -15px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
height: 270rpx;
|
height: 270rpx;
|
||||||
top: 55rpx;
|
top: 15rpx;
|
||||||
border: none;
|
border: none;
|
||||||
width: 260rpx;
|
width: 260rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -1310,6 +1315,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
|
|
@ -1471,6 +1477,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.charts-box {
|
||||||
|
width: 250rpx;
|
||||||
|
height: 250rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.wrapperScan {
|
.wrapperScan {
|
||||||
.auto-search-dialog {
|
.auto-search-dialog {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<view class="text">
|
<view class="text">
|
||||||
营养占比
|
营养占比
|
||||||
</view>
|
</view>
|
||||||
<view class="slider">
|
<view class="slider" v-if="isShow">
|
||||||
<llt-slider-range :model-value="rangeValue" @change="handleChange" />
|
<llt-slider-range :model-value="rangeValue" @change="handleChange" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
|
|
@ -55,6 +55,7 @@
|
||||||
carbohydrate_v: 0,
|
carbohydrate_v: 0,
|
||||||
protein_v: 0,
|
protein_v: 0,
|
||||||
fat_v: 0,
|
fat_v: 0,
|
||||||
|
isShow: true,
|
||||||
carbohydrate_p: 0,
|
carbohydrate_p: 0,
|
||||||
protein_p: 0,
|
protein_p: 0,
|
||||||
fat_p: 0,
|
fat_p: 0,
|
||||||
|
|
@ -80,14 +81,16 @@
|
||||||
aud_id: that.user.aud_id
|
aud_id: that.user.aud_id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
that.isShow = false
|
||||||
that.kcal = res.data.kcal
|
that.kcal = res.data.kcal
|
||||||
that.nutrition = res.data.nutrition
|
that.nutrition = res.data.nutrition
|
||||||
that.weight = res.data.kcal.suggestion_kcal_val
|
that.weight = res.data.kcal.suggestion_kcal_val
|
||||||
that.rangeValue[0] = Number(that.nutrition.list[0].proportion)
|
that.$nextTick(() => {
|
||||||
that.rangeValue[1] = Number(that.nutrition.list[0].proportion) + Number(that.nutrition
|
that.isShow = true
|
||||||
.list[1].proportion)
|
that.rangeValue[0] = Number(that.nutrition.list[0].proportion)
|
||||||
console.log("that.rangeValue", that.rangeValue)
|
that.rangeValue[1] = Number(that.nutrition.list[0].proportion) + Number(that.nutrition.list[1].proportion)
|
||||||
that.handleProportion()
|
that.handleProportion()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -145,7 +148,7 @@
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
that.$tools.msg("设置成功")
|
that.$tools.msg("设置成功")
|
||||||
that.$store.dispatch('getUserInfo', {
|
that.$store.dispatch('getUserInfo', {
|
||||||
aud_id: that.user.aud_id
|
aud_id: that.user.aud_id
|
||||||
})
|
})
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
|
|
||||||
|
|
@ -22,17 +22,29 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 曲线图 -->
|
<!-- 曲线图 -->
|
||||||
<view class="box" v-if="weightList.length">
|
<view class="box" v-if="weightList.length">
|
||||||
<view class="listC">
|
<view class="line" v-for="(item,index) in weightList">
|
||||||
|
<view class="title">{{item.title}}</view>
|
||||||
|
<view class="Charts" v-if="item.line.categories.length">
|
||||||
|
<qiunDataCharts type="area" :chartData="item.line" :canvas2d="true"
|
||||||
|
:canvasId="'canvasId02'+index" :tooltipShow="false" :ontouch="true"
|
||||||
|
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" />
|
||||||
|
</view>
|
||||||
|
<view class="line" v-else>
|
||||||
|
<view class="nolist">
|
||||||
|
<image src="../../static/none.png"></image>
|
||||||
|
<text>暂无数据,请手动添加~</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="listC">
|
||||||
<view :class="{active2:index==active1}" class="name" v-for="(item,index) in weightList"
|
<view :class="{active2:index==active1}" class="name" v-for="(item,index) in weightList"
|
||||||
:key="index" @click="showbox(index)">
|
:key="index" @click="showbox(index)">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="blockC">
|
<view class="blockC">
|
||||||
<view v-if="handTrue&&lineData.categories&&lineData.categories.length">
|
<view v-if="handTrue&&lineData.categories.length">
|
||||||
<qiunDataCharts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09"
|
<qiun-data-charts type="area" :chartData="lineData" canvasId="canvasId02" :canvas2d="true" />
|
||||||
:animation="false" :Width="340" :Height="250"
|
|
||||||
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="box" v-else>
|
<view class="box" v-else>
|
||||||
<view class="nolist">
|
<view class="nolist">
|
||||||
|
|
@ -40,7 +52,7 @@
|
||||||
<text>暂无数据</text>
|
<text>暂无数据</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="box" v-else>
|
<view class="box" v-else>
|
||||||
<view class="nolist">
|
<view class="nolist">
|
||||||
|
|
@ -103,9 +115,15 @@
|
||||||
active1: 0,
|
active1: 0,
|
||||||
startTime: "",
|
startTime: "",
|
||||||
endTime: "",
|
endTime: "",
|
||||||
lineData: {},
|
lineData: {
|
||||||
|
categories: [],
|
||||||
|
series: [{
|
||||||
|
color: "#54d87c",
|
||||||
|
data: []
|
||||||
|
}]
|
||||||
|
},
|
||||||
weightList: [],
|
weightList: [],
|
||||||
handTrue: true,
|
handTrue: false,
|
||||||
target_weight: 0, //目标体重
|
target_weight: 0, //目标体重
|
||||||
initial_weight: 0, //初始体重
|
initial_weight: 0, //初始体重
|
||||||
calculate_val: 0, //累计减重
|
calculate_val: 0, //累计减重
|
||||||
|
|
@ -166,11 +184,17 @@
|
||||||
|
|
||||||
showbox(index) {
|
showbox(index) {
|
||||||
let that = this
|
let that = this
|
||||||
|
that.lineData = {}
|
||||||
that.handTrue = false
|
that.handTrue = false
|
||||||
that.$nextTick(function() {
|
that.$nextTick(function() {
|
||||||
that.handTrue = true
|
that.handTrue = true
|
||||||
that.lineData = that.weightList.length ? that.weightList[index].line : {},
|
that.lineData = that.weightList.length ? that.weightList[index].line : {
|
||||||
console.log("11111", that.lineData)
|
categories: [],
|
||||||
|
series: [{
|
||||||
|
color: "#54d87c",
|
||||||
|
data: []
|
||||||
|
}]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
that.active1 = index
|
that.active1 = index
|
||||||
},
|
},
|
||||||
|
|
@ -191,7 +215,6 @@
|
||||||
that.startTime = e.detail.value
|
that.startTime = e.detail.value
|
||||||
let endtime = that.endTime ? that.endTime : that.endDate
|
let endtime = that.endTime ? that.endTime : that.endDate
|
||||||
that.handleLabelList(endtime, that.startTime)
|
that.handleLabelList(endtime, that.startTime)
|
||||||
that.showbox(0)
|
|
||||||
},
|
},
|
||||||
// 结束
|
// 结束
|
||||||
handEndTimeH(e) {
|
handEndTimeH(e) {
|
||||||
|
|
@ -210,7 +233,6 @@
|
||||||
that.endTime = e.detail.value
|
that.endTime = e.detail.value
|
||||||
let startTime = that.startTime ? that.startTime : that.startDate
|
let startTime = that.startTime ? that.startTime : that.startDate
|
||||||
that.handleLabelList(that.endTime, startTime)
|
that.handleLabelList(that.endTime, startTime)
|
||||||
that.showbox(0)
|
|
||||||
},
|
},
|
||||||
handleClick(ind) {
|
handleClick(ind) {
|
||||||
if (ind == 1) {
|
if (ind == 1) {
|
||||||
|
|
@ -235,6 +257,38 @@
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.box {
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
background: inherit !important;
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 100%;
|
||||||
|
background: #fff;
|
||||||
|
margin-top: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
// width: 100%;
|
||||||
|
// height: 240px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
margin: 15px 0;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Charts {
|
||||||
|
width: 100%;
|
||||||
|
height: 240px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.listC {
|
.listC {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@
|
||||||
return {
|
return {
|
||||||
ranklist: [],
|
ranklist: [],
|
||||||
page: 1,
|
page: 1,
|
||||||
isDelete: false,
|
|
||||||
lastPage: '',
|
lastPage: '',
|
||||||
isActive: null,
|
isActive: null,
|
||||||
}
|
}
|
||||||
|
|
@ -83,19 +82,12 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
that.ranklist.splice(index, 1)
|
that.ranklist.splice(index, 1)
|
||||||
if (that.user.measure_model == "1") {
|
that.$store.dispatch("getUserInfo", {
|
||||||
that.$store.dispatch("getUserInfo", {
|
aud_id:that.user.aud_id
|
||||||
aud_id: uni.getStorageSync('userid')
|
})
|
||||||
})
|
that.$store.dispatch("getResult", {
|
||||||
}
|
aud_id: that.user.aud_id
|
||||||
if (that.acd_id == 2) {
|
})
|
||||||
that.$store.dispatch("getResult", {
|
|
||||||
aud_id: uni.getStorageSync('userid')
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
that.isDelete = true
|
|
||||||
}
|
|
||||||
|
|
||||||
that.$tools.msg("删除成功")
|
that.$tools.msg("删除成功")
|
||||||
})
|
})
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,9 @@
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
id: ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["familayList"])
|
...mapState(["familayList"])
|
||||||
|
|
@ -57,14 +59,14 @@
|
||||||
//删除
|
//删除
|
||||||
handleDeldet(e, ind) {
|
handleDeldet(e, ind) {
|
||||||
let that = this
|
let that = this
|
||||||
let id = that.familayList[ind].id
|
that.id = that.familayList[ind].id
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '友情提示',
|
title: '友情提示',
|
||||||
content: '确定删除该成员吗',
|
content: '确定删除该成员吗',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
that.$model.getDelUser({
|
that.$model.getDelUser({
|
||||||
aud_id: id,
|
aud_id: that.id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code != 0) return
|
if (res.code != 0) return
|
||||||
that.$tools.msg("删除成功!");
|
that.$tools.msg("删除成功!");
|
||||||
|
|
@ -87,27 +89,34 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
that.$store.commit('changeFamilay', res.data.user_list)
|
that.$store.commit('changeFamilay', res.data.user_list)
|
||||||
if (res.data.length) {
|
|
||||||
uni.setStorageSync('userid', res.data.user_list[0].id)
|
console.log("删除", that.id, uni.getStorageSync('userid'))
|
||||||
|
// 删除的是当前用户
|
||||||
|
if (that.id == uni.getStorageSync('userid')) {
|
||||||
|
let userid = res.data.user_list[0].id
|
||||||
|
uni.setStorageSync('userid', userid)
|
||||||
that.$store.dispatch('getUserInfo', {
|
that.$store.dispatch('getUserInfo', {
|
||||||
aud_id: res.data.user_list[0].id
|
aud_id: userid
|
||||||
|
})
|
||||||
|
// 厨房秤接口
|
||||||
|
that.$store.dispatch("getCountFoodInfo", {
|
||||||
|
aud_id: userid,
|
||||||
|
time: that.$tools.getDate("start")
|
||||||
|
})
|
||||||
|
// 全部卡片
|
||||||
|
that.$store.dispatch("getCardAllList", {
|
||||||
|
aud_id: userid
|
||||||
|
})
|
||||||
|
//
|
||||||
|
that.$store.dispatch("getResult", {
|
||||||
|
aud_id: userid
|
||||||
|
})
|
||||||
|
that.$store.dispatch("getPublicRecord", {
|
||||||
|
aud_id: userid
|
||||||
})
|
})
|
||||||
that.handlePublicRecord(res.data.user_list[0].id)
|
|
||||||
}
|
}
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
},
|
},
|
||||||
// 公共手动记录内容
|
|
||||||
handlePublicRecord(id) {
|
|
||||||
let that = this
|
|
||||||
that.$model.getPublicRecord({
|
|
||||||
aud_id: id
|
|
||||||
}).then(res => {
|
|
||||||
console.log("公共手动记录", res)
|
|
||||||
if (res.code == 0) {
|
|
||||||
that.$store.commit('changePublicRecord', res.data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//编辑
|
//编辑
|
||||||
editorInfo(item) {
|
editorInfo(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@
|
||||||
nickname: "",
|
nickname: "",
|
||||||
activity_level: "",
|
activity_level: "",
|
||||||
},
|
},
|
||||||
|
addID: "",
|
||||||
fields: "",
|
fields: "",
|
||||||
levelInd: 0,
|
levelInd: 0,
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
|
@ -110,7 +111,7 @@
|
||||||
that.memInfo = info
|
that.memInfo = info
|
||||||
that.isEdit = true
|
that.isEdit = true
|
||||||
console.log("that.memInfo ", that.memInfo)
|
console.log("that.memInfo ", that.memInfo)
|
||||||
}
|
}
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
that.fields = "time"
|
that.fields = "time"
|
||||||
// #endif
|
// #endif
|
||||||
|
|
@ -118,27 +119,6 @@
|
||||||
that.fields = "day"
|
that.fields = "day"
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
familayList() {
|
|
||||||
let that = this
|
|
||||||
let userid = ""
|
|
||||||
let found = that.familayList.find(e => e.id == that.userId);
|
|
||||||
userid = found !== undefined ? that.userId : that.familayList[0].id
|
|
||||||
uni.setStorageSync('userid', found !== undefined ? found.id : userid)
|
|
||||||
uni.setStorageSync('gender', found !== undefined ? found.gender : that.familayList[0].gender)
|
|
||||||
that.$store.commit('changeUser', found !== undefined ? found : that.familayList[0])
|
|
||||||
that.$store.dispatch("getResult", {
|
|
||||||
aud_id: userid
|
|
||||||
})
|
|
||||||
if (!that.isEdit && that.familayList.length == 1) {
|
|
||||||
uni.switchTab({
|
|
||||||
url: "/pages/home/home"
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 提交
|
// 提交
|
||||||
confirmInfo() {
|
confirmInfo() {
|
||||||
|
|
@ -165,29 +145,67 @@
|
||||||
}
|
}
|
||||||
let https = that.isEdit ? that.$model.getEditUser(that.memInfo) : that.$model.getAddUser(that.memInfo)
|
let https = that.isEdit ? that.$model.getEditUser(that.memInfo) : that.$model.getAddUser(that.memInfo)
|
||||||
return https.then(res => {
|
return https.then(res => {
|
||||||
console.log("成功", res)
|
console.log("成功", res, that.isEdit, uni.getStorageSync('userid'))
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
that.$tools.msg("提交成功");
|
that.$tools.msg("提交成功");
|
||||||
that.userId = res.data.aud_id
|
if (!that.isEdit) {
|
||||||
that.$store.dispatch('getFamilyList', {
|
that.addID = res.aud_id
|
||||||
type: 2
|
}
|
||||||
})
|
that.handleUserList()
|
||||||
} else {
|
} else {
|
||||||
that.$tools.msg(res.msg);
|
that.$tools.msg(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 公共手动记录内容
|
// 公共手动记录内容
|
||||||
handlePublicRecord(id) {
|
handleUserList() {
|
||||||
let that = this
|
let that = this
|
||||||
that.$model.getPublicRecord({
|
that.$model.getUserList({
|
||||||
aud_id: id
|
type: 2
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log("公共手动记录", res)
|
if (res.code != 0) {
|
||||||
if (res.code == 0) {
|
that.$tools.msg(res.msg)
|
||||||
that.$store.commit('changePublicRecord', res.data)
|
return
|
||||||
}
|
}
|
||||||
})
|
that.$store.commit('changeFamilay', res.data.user_list)
|
||||||
|
// 新增成员
|
||||||
|
if (!that.isEdit) {
|
||||||
|
let userid = that.addID
|
||||||
|
uni.setStorageSync('userid', that.addID)
|
||||||
|
that.$store.dispatch('getUserInfo', {
|
||||||
|
aud_id: userid
|
||||||
|
})
|
||||||
|
that.$store.dispatch("getCountFoodInfo", {
|
||||||
|
aud_id: userid,
|
||||||
|
time: that.$tools.getDate("start")
|
||||||
|
})
|
||||||
|
that.$store.dispatch("getCardAllList", {
|
||||||
|
aud_id: userid
|
||||||
|
})
|
||||||
|
//
|
||||||
|
that.$store.dispatch("getResult", {
|
||||||
|
aud_id: userid
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 编辑当前用户
|
||||||
|
if (that.isEdit && that.memInfo.id == uni.getStorageSync('userid')) {
|
||||||
|
that.$store.dispatch('getUserInfo', {
|
||||||
|
aud_id: that.memInfo.id
|
||||||
|
})
|
||||||
|
that.$store.dispatch("getCountFoodInfo", {
|
||||||
|
aud_id: that.memInfo.id,
|
||||||
|
time: that.$tools.getDate("start")
|
||||||
|
})
|
||||||
|
that.$store.dispatch("getResult", {
|
||||||
|
aud_id: that.memInfo.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.switchTab({
|
||||||
|
url: "/pages/index/index"
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//确定年龄
|
//确定年龄
|
||||||
maskClick(e) {
|
maskClick(e) {
|
||||||
|
|
|
||||||
|
|
@ -10,18 +10,6 @@
|
||||||
<text>性别:{{depthInfo.user_data.gender==2?'女':'男'}}</text>
|
<text>性别:{{depthInfo.user_data.gender==2?'女':'男'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
|
||||||
<view class="rightChart">
|
|
||||||
<view class="charts-box">
|
|
||||||
<qiun-data-charts type="arcbar" :opts="opts2" canvasId="foodCharts107"
|
|
||||||
:chartData="chartData2" :canvas2d="true" :cHeight="300" :cWidth="300" />
|
|
||||||
</view>
|
|
||||||
<view class="score">
|
|
||||||
<text>{{depthInfo.user_data.score}}</text>
|
|
||||||
健康评分
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="text_l">
|
<view class="text_l">
|
||||||
|
|
@ -37,6 +25,18 @@
|
||||||
<text class="size20 bold">{{depthInfo.user_data.weight}}</text>
|
<text class="size20 bold">{{depthInfo.user_data.weight}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<view class="rightChart">
|
||||||
|
<view class="charts-box" v-if="depthInfo.user_data.score">
|
||||||
|
<qiun-data-charts type="arcbar" :opts="opts2" canvasId="rightChart209" :chartData="chartData2"
|
||||||
|
:canvas2d="true" />
|
||||||
|
</view>
|
||||||
|
<view class="score">
|
||||||
|
<text>{{depthInfo.user_data.score}}</text>
|
||||||
|
健康评分
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 心脏健康 -->
|
<!-- 心脏健康 -->
|
||||||
<view v-if="depthInfo.heart_rate&&depthInfo.heart_rate.value">
|
<view v-if="depthInfo.heart_rate&&depthInfo.heart_rate.value">
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="huan">
|
<view class="huan">
|
||||||
<qiun-data-charts type="ring" :opts="opts" canvasId="foodCharts209" :chartData="chartData"
|
<qiun-data-charts type="ring" :opts="opts" canvasId="foodCharts209" :chartData="chartData"
|
||||||
:cHeight="320" :cWidth="320" :canvas2d="true" />
|
:canvas2d="true" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -285,7 +285,7 @@
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -427,6 +427,7 @@
|
||||||
.header {
|
.header {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
margin-top: 15PX;
|
||||||
width: calc(100% - 20px);
|
width: calc(100% - 20px);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -436,7 +437,7 @@
|
||||||
height: 55px;
|
height: 55px;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: calc(100% - 180px);
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
|
|
@ -456,46 +457,47 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
}
|
||||||
width: 160px;
|
|
||||||
|
.right {
|
||||||
|
width: 160px;
|
||||||
|
position: absolute;
|
||||||
|
right: 5px;
|
||||||
|
top: -30px;
|
||||||
|
height: 100px;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 999;
|
||||||
|
|
||||||
|
.rightChart {
|
||||||
|
width: 140px;
|
||||||
|
height: 140px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.charts-box {
|
||||||
|
width: 140px;
|
||||||
|
height: 140px;
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 5px;
|
width: 140px;
|
||||||
top: -35px;
|
|
||||||
height: 100px;
|
height: 100px;
|
||||||
overflow: hidden;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
.rightChart {
|
align-items: center;
|
||||||
width: 140px;
|
justify-content: flex-end;
|
||||||
height: 140px;
|
top: -5px;
|
||||||
background: #fff;
|
|
||||||
border-radius: 50%;
|
text {
|
||||||
padding: 10px;
|
color: $maincolor;
|
||||||
}
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
.charts-box {
|
|
||||||
width: 140px;
|
|
||||||
height: 140px;
|
|
||||||
margin-top: -15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.score {
|
|
||||||
position: absolute;
|
|
||||||
width: 140px;
|
|
||||||
height: 100px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-end;
|
|
||||||
top: 0;
|
|
||||||
|
|
||||||
text {
|
|
||||||
color: $maincolor;
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
|
|
@ -616,9 +618,10 @@
|
||||||
|
|
||||||
.huan {
|
.huan {
|
||||||
width: 160px;
|
width: 160px;
|
||||||
|
height: 160px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
margin-top: 35px;
|
margin-top: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,10 @@
|
||||||
<view class="number"><text class="size26 bold">{{ite.value}}</text>{{ite.unit}}</view>
|
<view class="number"><text class="size26 bold">{{ite.value}}</text>{{ite.unit}}</view>
|
||||||
<view class="standard bold size16" :style="{'color':ite.standard_color}">{{ite.standard}}</view>
|
<view class="standard bold size16" :style="{'color':ite.standard_color}">{{ite.standard}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="charts">
|
<view class="charts" v-if="handTrue&&ite.curve_list.line.categories.length">
|
||||||
<qiun-data-charts type="area" :chartData="ite.curve_list.line" :canvas2d="true" :opts="opts"
|
<qiun-data-charts type="area" :chartData="ite.curve_list.line" :Width="140" :Height="40"
|
||||||
:canvasId="ite.key_name+'charts09'" :Width="140" :Height="85" />
|
:canvas2d="true" :canvasId="ite.key_name+ind" :opts="opts" :tapLegend="false"
|
||||||
|
:tooltipShow="false" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Ideal c999" v-if="ite.ideal_weight">
|
<view class="Ideal c999" v-if="ite.ideal_weight">
|
||||||
|
|
@ -58,24 +59,28 @@
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import record from '@/components/bodyIndex/record.vue';
|
import record from '@/components/bodyIndex/record.vue';
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue'
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'
|
||||||
export default {
|
export default {
|
||||||
name: "body",
|
|
||||||
components: {
|
components: {
|
||||||
record,
|
record,
|
||||||
qiunDataCharts,
|
qiunDataCharts,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
handTrue: false,
|
||||||
|
Measure: {
|
||||||
|
card_list: [],
|
||||||
|
top_list: []
|
||||||
|
},
|
||||||
opts: {
|
opts: {
|
||||||
padding: [0, 0, 0, 0],
|
padding: [5, 0, 0, 0],
|
||||||
dataLabel: false,
|
dataLabel: false,
|
||||||
dataPointShape: false,
|
|
||||||
enableScroll: false,
|
enableScroll: false,
|
||||||
xAxis: {
|
xAxis: {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
axisLine: false,
|
axisLine: false,
|
||||||
disableGrid: true,
|
disableGrid: true,
|
||||||
|
itemCount: 5
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
gridType: "dash",
|
gridType: "dash",
|
||||||
|
|
@ -92,8 +97,24 @@
|
||||||
info() {
|
info() {
|
||||||
return this.user
|
return this.user
|
||||||
},
|
},
|
||||||
Measure() {
|
// Measure() {
|
||||||
return this.MeasureResult
|
// let that = this
|
||||||
|
// return this.MeasureResult
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
MeasureResult: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
let that = this
|
||||||
|
that.handTrue = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
that.handTrue = true
|
||||||
|
that.Measure = newVal
|
||||||
|
})
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -110,10 +131,13 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 趋势
|
// 趋势
|
||||||
handelCurveDetailed(){
|
handelCurveDetailed() {
|
||||||
uni.navigateTo({
|
let that = this
|
||||||
url: "/body/curve/curve"
|
setTimeout(function() {
|
||||||
})
|
uni.navigateTo({
|
||||||
|
url: "/body/curve/curve"
|
||||||
|
})
|
||||||
|
}, 200)
|
||||||
},
|
},
|
||||||
// 手动
|
// 手动
|
||||||
handlerRecord() {
|
handlerRecord() {
|
||||||
|
|
@ -145,8 +169,8 @@
|
||||||
|
|
||||||
.weight {
|
.weight {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 10px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
margin-top: 10px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
|
|
@ -168,7 +192,7 @@
|
||||||
|
|
||||||
.charts {
|
.charts {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 70px;
|
height: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.function {
|
.function {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<view class="overflow">
|
<view class="overflow">
|
||||||
{{item.nickname}}
|
{{item.nickname}}
|
||||||
</view>
|
</view>
|
||||||
<view class="dangqian" v-if="item.id == userinfo.id">当前</view>
|
<view class="dangqian" v-if="item.id == userinfo.aud_id">当前</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view>{{item.gender==1?'男':'女'}}</view>
|
<view>{{item.gender==1?'男':'女'}}</view>
|
||||||
|
|
@ -52,33 +52,30 @@
|
||||||
// 切换用户
|
// 切换用户
|
||||||
toggle(val) {
|
toggle(val) {
|
||||||
let that = this
|
let that = this
|
||||||
|
console.log("11111", val)
|
||||||
uni.setStorageSync('userid', val.id)
|
uni.setStorageSync('userid', val.id)
|
||||||
uni.setStorageSync('gender', val.gender)
|
uni.setStorageSync('gender', val.gender)
|
||||||
that.$store.commit('changeUser', val)
|
that.$store.dispatch('getUserInfo', {
|
||||||
that.$store.dispatch("getResult", {
|
|
||||||
aud_id: val.id
|
aud_id: val.id
|
||||||
})
|
})
|
||||||
|
that.$store.dispatch("getCountFoodInfo", {
|
||||||
|
aud_id: val.id,
|
||||||
|
time: that.$tools.getDate("start")
|
||||||
|
})
|
||||||
|
that.$store.dispatch("getResult", {
|
||||||
|
aud_id: val.id,
|
||||||
|
})
|
||||||
|
that.$store.dispatch("getPublicRecord", {
|
||||||
|
aud_id: val.id,
|
||||||
|
})
|
||||||
that.$store.commit("changehomeCard", 0);
|
that.$store.commit("changehomeCard", 0);
|
||||||
that.$store.commit("changeDrawe", false);
|
that.$store.commit("changeDrawe", false);
|
||||||
// that.handlePublicRecord(val.id)
|
|
||||||
},
|
|
||||||
// 公共手动记录内容
|
|
||||||
handlePublicRecord(id) {
|
|
||||||
let that = this
|
|
||||||
that.$model.getPublicRecord({
|
|
||||||
aud_id: id
|
|
||||||
}).then(res => {
|
|
||||||
console.log("公共手动记录", res)
|
|
||||||
if (res.code == 0) {
|
|
||||||
that.$store.commit('changePublicRecord', res.data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//添加
|
//添加
|
||||||
addInfo() {
|
addInfo() {
|
||||||
let that = this
|
let that = this
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pageTwo/my/userInfo"
|
url: "/body/my/userInfo"
|
||||||
})
|
})
|
||||||
that.$store.commit("changeDrawe", false);
|
that.$store.commit("changeDrawe", false);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<!-- 称重 -->
|
<!-- 称重 -->
|
||||||
<view class="blue-tooth" v-if="user.aud_id!=''">
|
<view class="blue-tooth" v-if="user.aud_id!=''">
|
||||||
<blue-tooth :btnType="'1'"></blue-tooth>
|
<blue-tooth :btnType="btnType"></blue-tooth>
|
||||||
</view>
|
</view>
|
||||||
<!-- 能量摄入 -->
|
<!-- 能量摄入 -->
|
||||||
<view class="everyDay">
|
<view class="everyDay">
|
||||||
|
|
@ -24,9 +24,11 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="jishiqi">
|
<view class="jishiqi">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="chart-wrap">
|
<view class="chart-wrap" v-if="handTrue">
|
||||||
<qiun-data-charts type="arcbar" :chartData="chartData" :cHeight="280" :cWidth="280"
|
<view class="charts-box">
|
||||||
:canvas2d="true" canvasId="countCharts" v-if="handTrue" />
|
<qiun-data-charts type="arcbar" :chartData="chartData" :canvas2d="true"
|
||||||
|
canvasId="foodCharts01" />
|
||||||
|
</view>
|
||||||
<view class="center">
|
<view class="center">
|
||||||
摄入
|
摄入
|
||||||
<text>{{foodInfo.nutrients_four[0].today_intake}}</text>
|
<text>{{foodInfo.nutrients_four[0].today_intake}}</text>
|
||||||
|
|
@ -125,9 +127,9 @@
|
||||||
<view class="foodContent">
|
<view class="foodContent">
|
||||||
<view class="title">热量和营养</view>
|
<view class="title">热量和营养</view>
|
||||||
<view class="progress">
|
<view class="progress">
|
||||||
<div class="chart-wrap">
|
<div class="chart-wrap" v-if="chartVisible">
|
||||||
<qiun-data-charts v-if="chartVisible" type="ring" :opts="opts"
|
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData2" :cHeight="280"
|
||||||
:chartData="chartData2" :cHeight="280" :cWidth="280" />
|
:cWidth="280" :canvas2d="true" canvasId="foodCharts02" />
|
||||||
</div>
|
</div>
|
||||||
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
<view class="info" v-if="activeFoodDetail.nutrients_four">
|
||||||
<view class="info-item"
|
<view class="info-item"
|
||||||
|
|
@ -163,11 +165,12 @@
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import blueTooth from "@/components/foodIndex/bluetooth_food.vue"
|
import blueTooth from "@/components/foodIndex/bluetooth_food.vue"
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
||||||
export default {
|
export default {
|
||||||
name: "food",
|
name: "food",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
btnType: 1,
|
||||||
token: "",
|
token: "",
|
||||||
index: 0,
|
index: 0,
|
||||||
opts: {
|
opts: {
|
||||||
|
|
@ -467,4 +470,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.charts-box {
|
||||||
|
width: 250rpx;
|
||||||
|
height: 250rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
<template>
|
|
||||||
<view v-if="isCity" class="visible">
|
|
||||||
<view class="bg" @click="clear"></view>
|
|
||||||
<view @click.stop class="item">
|
|
||||||
<view class="groupBtn">
|
|
||||||
<view @click="visible=false">取消</view>
|
|
||||||
<view @click="handlesure()" class="sure">确定</view>
|
|
||||||
</view>
|
|
||||||
<picker-view @change="bindChange" :value="value" class="picker-view" :indicator-style="indicatorStyle">
|
|
||||||
<picker-view-column>
|
|
||||||
<view class="item" v-for="(item,index) in province" :key="index">{{item.name}}</view>
|
|
||||||
</picker-view-column>
|
|
||||||
<picker-view-column>
|
|
||||||
<view class="item" v-for="(item,index) in city" :key="index">{{item}}</view>
|
|
||||||
</picker-view-column>
|
|
||||||
<!-- <picker-view-column>
|
|
||||||
<view class="item" v-for="(item,index) in area" :key="index">{{item?item:'请选择'}}</view>
|
|
||||||
</picker-view-column> -->
|
|
||||||
</picker-view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
mapState
|
|
||||||
} from "vuex";
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
value: [2, 0],
|
|
||||||
province: [], //省
|
|
||||||
city: [], //市
|
|
||||||
area: [], //区
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(["cityList", "user", "isCity"]),
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
let that = this
|
|
||||||
setTimeout(() => {
|
|
||||||
that.handleCityList()
|
|
||||||
console.log("1111", this.user.address, that.cityList, that.province)
|
|
||||||
}, 500);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 地区
|
|
||||||
handleCityList() {
|
|
||||||
let that = this
|
|
||||||
that.province = that.cityList
|
|
||||||
let str = that.user.address.split(',')[0]
|
|
||||||
let str2 = that.user.address.split(',')[1]
|
|
||||||
var Index0 = that.cityList.findIndex((profile) => profile.name === str);
|
|
||||||
var Index2 = that.cityList[Index0].list.findIndex((ite) => ite === str2);
|
|
||||||
that.value[0] = Index0
|
|
||||||
that.value[1] = Index2
|
|
||||||
that.city = that.cityList[Index0].list
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.bg {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
|
||||||
z-index: 99;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,133 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="wrapper" v-if="isDrawe">
|
|
||||||
<view class="bg" @click="clear"></view>
|
|
||||||
<view class="wrapper_box">
|
|
||||||
<view class="top">
|
|
||||||
<image class="headimage mt-10" v-if="userinfo.head_pic" :src="userinfo.head_pic"></image>
|
|
||||||
<view class="overflow">{{userinfo.nickname}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="drawerList">
|
|
||||||
<view class="drawerList_item" v-for="(item, index) in List" :key="index" @click="toggle(item)"
|
|
||||||
v-if="List.length">
|
|
||||||
<image v-if="item.head_pic" :src="item.head_pic" class="image1"></image>
|
|
||||||
<view class="right">
|
|
||||||
<view class="name">
|
|
||||||
<view class="overflow">
|
|
||||||
{{item.nickname}}
|
|
||||||
</view>
|
|
||||||
<view class="dangqian" v-if="item.id == userinfo.id">当前</view>
|
|
||||||
</view>
|
|
||||||
<view class="info">
|
|
||||||
<view>{{item.gender==1?'男':'女'}}</view>
|
|
||||||
<view>{{item.age}}岁</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="add" @click="addInfo()">
|
|
||||||
+
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
mapState
|
|
||||||
} from "vuex";
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(["user", "familayList", "isDrawe"]),
|
|
||||||
userinfo() {
|
|
||||||
return this.user
|
|
||||||
},
|
|
||||||
List() {
|
|
||||||
return this.familayList
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 切换用户
|
|
||||||
toggle(val) {
|
|
||||||
let that = this
|
|
||||||
uni.setStorageSync('userid', val.id)
|
|
||||||
uni.setStorageSync('gender', val.gender)
|
|
||||||
that.$store.commit('changeUser', val)
|
|
||||||
that.$store.dispatch("getResult", {
|
|
||||||
aud_id: val.id
|
|
||||||
})
|
|
||||||
that.$store.commit("changeDrawe", false);
|
|
||||||
that.handlePublicRecord(val.id)
|
|
||||||
},
|
|
||||||
// 公共手动记录内容
|
|
||||||
handlePublicRecord(id) {
|
|
||||||
let that = this
|
|
||||||
that.$model.getPublicRecord({
|
|
||||||
aud_id: id
|
|
||||||
}).then(res => {
|
|
||||||
console.log("公共手动记录", res)
|
|
||||||
if (res.code == 0) {
|
|
||||||
that.$store.commit('changePublicRecord', res.data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//添加
|
|
||||||
addInfo() {
|
|
||||||
let that = this
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pageTwo/my/userInfo"
|
|
||||||
})
|
|
||||||
that.$store.commit("changeDrawe", false);
|
|
||||||
},
|
|
||||||
clear() {
|
|
||||||
this.$store.commit("changeDrawe", false);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.wrapper {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 999;
|
|
||||||
|
|
||||||
.bg {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
|
||||||
z-index: 99;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.headimage {
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
margin: auto;
|
|
||||||
border-radius: 50%;
|
|
||||||
margin-bottom: 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dangqian {
|
|
||||||
font-size: 24upx !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes wrapper_box {
|
|
||||||
0% {
|
|
||||||
transform: translateX(-100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
transform: translateX(0%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,255 +0,0 @@
|
||||||
<template>
|
|
||||||
<view>
|
|
||||||
<view class="header">
|
|
||||||
<view class="top" v-if="userList.length">
|
|
||||||
<view class="headimg" @click="handleAddUser(1)">
|
|
||||||
<image :src="info.head_pic"></image>
|
|
||||||
</view>
|
|
||||||
<view class="info" @click="handleAddUser(1)">
|
|
||||||
<view class="size18 bold">{{info.nickname}}</view>
|
|
||||||
<view class="mt-5">
|
|
||||||
<text class="mr-10">性别:{{info.gender==1?'男':info.gender==2?'女':'未知'}}</text>
|
|
||||||
<text class="ml-10">年龄:{{info.age}}岁</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
|
|
||||||
</view>
|
|
||||||
<view class="top" v-else @click="handleAddUser(2)">
|
|
||||||
<view class="info">
|
|
||||||
暂无成员,请先添加~
|
|
||||||
</view>
|
|
||||||
<view class="add">
|
|
||||||
+
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 地区 -->
|
|
||||||
<view class="cityList">
|
|
||||||
<view class="area" v-if="isArea" @click="visible = true">
|
|
||||||
<view>中招地区标准:</view>
|
|
||||||
<view>{{region?region:info.address}}<uni-icons type="bottom"></uni-icons></view>
|
|
||||||
</view>
|
|
||||||
<!-- -->
|
|
||||||
<view v-if="visible" class="visible" @click="visible=false">
|
|
||||||
<view @click.stop class="item">
|
|
||||||
<view class="groupBtn">
|
|
||||||
<view @click="visible=false">取消</view>
|
|
||||||
<view @click="handlesure()" class="sure">确定</view>
|
|
||||||
</view>
|
|
||||||
<picker-view @change="bindChange" :value="value" class="picker-view"
|
|
||||||
:indicator-style="indicatorStyle">
|
|
||||||
<picker-view-column>
|
|
||||||
<view class="item" v-for="(item,index) in province" :key="index">{{item.name}}</view>
|
|
||||||
</picker-view-column>
|
|
||||||
<picker-view-column>
|
|
||||||
<view class="item" v-for="(item,index) in city" :key="index">{{item}}</view>
|
|
||||||
</picker-view-column>
|
|
||||||
<!-- <picker-view-column>
|
|
||||||
<view class="item" v-for="(item,index) in area" :key="index">{{item?item:'请选择'}}</view>
|
|
||||||
</picker-view-column> -->
|
|
||||||
</picker-view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 切换成员 -->
|
|
||||||
<drawer></drawer>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
mapState
|
|
||||||
} from "vuex";
|
|
||||||
import drawer from "@/element/drawer.vue"
|
|
||||||
export default {
|
|
||||||
name: "headerIndex",
|
|
||||||
components: {
|
|
||||||
drawer
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
value: [2, 0],
|
|
||||||
visible: false,
|
|
||||||
region: "",
|
|
||||||
province: [], //省
|
|
||||||
city: [], //市
|
|
||||||
area: [], //区
|
|
||||||
indicatorStyle: `height: 45px;`,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(["user", "familayList", "configInfo"]),
|
|
||||||
info() {
|
|
||||||
return this.user
|
|
||||||
},
|
|
||||||
userList() {
|
|
||||||
return this.familayList
|
|
||||||
},
|
|
||||||
userAddress() {
|
|
||||||
return this.user.address
|
|
||||||
},
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
isArea: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
isLeft: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
let that = this
|
|
||||||
setTimeout(() => {
|
|
||||||
if (that.isArea) {
|
|
||||||
that.handleCityList()
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
userAddress() {
|
|
||||||
let that = this
|
|
||||||
that.region = that.user.address
|
|
||||||
that.handleCityList()
|
|
||||||
that.$emit("getAciveCity", that.region)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
bindChange: function(e) {
|
|
||||||
let that = this
|
|
||||||
if (e.detail.value[0] != that.value[0]) {
|
|
||||||
e.detail.value[1] = 0
|
|
||||||
}
|
|
||||||
that.value = e.detail.value
|
|
||||||
that.city = that.province[that.value[0]].list
|
|
||||||
},
|
|
||||||
handlesure() {
|
|
||||||
let that = this
|
|
||||||
let defaultRegion = [that.province[that.value[0]].name, that.city[that.value[1]]]
|
|
||||||
that.region = defaultRegion.join(",");
|
|
||||||
that.visible = false
|
|
||||||
that.$emit("getAciveCity", that.region)
|
|
||||||
},
|
|
||||||
// 添加成员
|
|
||||||
handleAddUser(ind) {
|
|
||||||
let that = this
|
|
||||||
if (uni.getStorageSync('token')) {
|
|
||||||
let index = that.userList.findIndex((profile) => profile.id == that.info.id)
|
|
||||||
uni.navigateTo({
|
|
||||||
url: ind == 1 ? "/pageTwo/my/userInfo?info=" + JSON.stringify(that.userList[index]) :
|
|
||||||
"/pageTwo/my/userInfo"
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.log("headerIndex跳转登录页面")
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pageTwo/login/login'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 地区
|
|
||||||
handleCityList() {
|
|
||||||
let that = this
|
|
||||||
if ( that.configInfo.area_list.length) {
|
|
||||||
if (that.user.address != '') {
|
|
||||||
that.province = that.configInfo.area_list
|
|
||||||
let str = that.user.address.split(',')[0]
|
|
||||||
var Index0 = that.province.findIndex((profile) => profile.name == str);
|
|
||||||
that.value[0] = Index0
|
|
||||||
console.log("地区", str, Index0)
|
|
||||||
that.city = that.province[Index0].list
|
|
||||||
} else {
|
|
||||||
that.value = [2, 0]
|
|
||||||
that.city = that.configInfo.area_list[2].list
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.info {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-left: 15px;
|
|
||||||
width: calc(100% - 70px);
|
|
||||||
|
|
||||||
view {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
last-child {
|
|
||||||
margin-top: 2px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.area {
|
|
||||||
margin: 15px 10px 0;
|
|
||||||
padding: 15px 10px 10px;
|
|
||||||
background-color: #fff;
|
|
||||||
width: calc(100% - 40px);
|
|
||||||
display: flex;
|
|
||||||
border-radius: 10px;
|
|
||||||
justify-content: space-between;
|
|
||||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.item {
|
|
||||||
line-height: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.visible {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 9999;
|
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
|
||||||
|
|
||||||
.groupBtn {
|
|
||||||
height: 50px;
|
|
||||||
line-height: 50px;
|
|
||||||
background-color: #fff;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 0 15px;
|
|
||||||
border-bottom: 1px solid #dfdfdf;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 45%;
|
|
||||||
z-index: 999;
|
|
||||||
|
|
||||||
view {
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
padding: 0 10px;
|
|
||||||
background-color: #dfdfdf;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sure {
|
|
||||||
background-color: $textcolor;
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.picker-view {
|
|
||||||
width: 100%;
|
|
||||||
height: 45%;
|
|
||||||
bottom: 0;
|
|
||||||
position: absolute;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.t-icon-qiehuan1 {
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -26,12 +26,12 @@
|
||||||
<view class="boxLine">
|
<view class="boxLine">
|
||||||
<view class="line" v-for="(item,index) in weightList">
|
<view class="line" v-for="(item,index) in weightList">
|
||||||
<view v-if="item.line.categories.length">
|
<view v-if="item.line.categories.length">
|
||||||
<qiunDataCharts type="column" :chartData="item.line" :canvas2d="true" :canvasId="item.id"
|
<qiunDataCharts type="column" :chartData="item.line" :canvas2d="true" :canvasId="item.key"
|
||||||
:Width="340" :Height="250" :animation="false"
|
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:5}}" :ontouch="true"
|
||||||
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
:tooltipShow="false" />
|
||||||
</view>
|
</view>
|
||||||
<view class="line" v-else>
|
<view class="line" v-else>
|
||||||
<view class="nolist mb-15">
|
<view class="nolist">
|
||||||
<image src="../../static/none.png"></image>
|
<image src="../../static/none.png"></image>
|
||||||
<text>暂无数据,请手动添加~</text>
|
<text>暂无数据,请手动添加~</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -54,7 +54,6 @@
|
||||||
weightList: [],
|
weightList: [],
|
||||||
handTrue: true,
|
handTrue: true,
|
||||||
active: 1,
|
active: 1,
|
||||||
index: 0,
|
|
||||||
time: "",
|
time: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -74,7 +73,7 @@
|
||||||
return this.$tools.getDate("start")
|
return this.$tools.getDate("start")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
that.active = 1
|
that.active = 1
|
||||||
that.index = 0
|
that.index = 0
|
||||||
|
|
@ -87,10 +86,9 @@
|
||||||
that.index = ind
|
that.index = ind
|
||||||
that.active = 1
|
that.active = 1
|
||||||
that.time = that.startDate
|
that.time = that.startDate
|
||||||
that.getList()
|
that.handleActive(that.index)
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
let list = []
|
|
||||||
let that = this
|
let that = this
|
||||||
that.$model.getPublicTrendList({
|
that.$model.getPublicTrendList({
|
||||||
aud_id: that.user.aud_id,
|
aud_id: that.user.aud_id,
|
||||||
|
|
@ -156,8 +154,9 @@
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.TrendPage{
|
|
||||||
|
.TrendPage {
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
width: calc(1005 - 30px);
|
width: 100%
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -64,7 +64,11 @@
|
||||||
},
|
},
|
||||||
onUnload: function() {
|
onUnload: function() {
|
||||||
let that = this
|
let that = this
|
||||||
that.$ble.closeBluetoothAdapter()
|
that.$store.commit("changeBluetoothValue", {
|
||||||
|
isFood: false,
|
||||||
|
isConnectStatus: 1,
|
||||||
|
bleTipsText: "点击重新连接",
|
||||||
|
})
|
||||||
that.$store.commit("changehomeCard", 0);
|
that.$store.commit("changehomeCard", 0);
|
||||||
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,11 @@
|
||||||
},
|
},
|
||||||
onUnload: function() {
|
onUnload: function() {
|
||||||
let that = this
|
let that = this
|
||||||
that.$ble.closeBluetoothAdapter()
|
that.$store.commit("changeBluetoothValue", {
|
||||||
|
isFood: false,
|
||||||
|
isConnectStatus: 1,
|
||||||
|
bleTipsText: "点击重新连接",
|
||||||
|
})
|
||||||
that.$store.commit("changehomeCard", 0);
|
that.$store.commit("changehomeCard", 0);
|
||||||
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,11 @@
|
||||||
},
|
},
|
||||||
onUnload: function() {
|
onUnload: function() {
|
||||||
let that = this
|
let that = this
|
||||||
that.$ble.closeBLEConnection()
|
that.$store.commit("changeBluetoothValue", {
|
||||||
that.$ble.closeBluetoothAdapter()
|
isFood: false,
|
||||||
|
isConnectStatus: 1,
|
||||||
|
bleTipsText: "点击重新连接",
|
||||||
|
})
|
||||||
that.$store.commit("changehomeCard", 0);
|
that.$store.commit("changehomeCard", 0);
|
||||||
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
that.$ble.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@
|
||||||
}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/home/home"
|
url: "/pages/index/index"
|
||||||
})
|
})
|
||||||
}, 200)
|
}, 200)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,6 @@
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import headerIndex from "@/element/headerIndex.vue"
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -93,9 +92,6 @@
|
||||||
user: {}
|
user: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
headerIndex
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["accountNumber", "familayList", "CooperationUrl", ]),
|
...mapState(["accountNumber", "familayList", "CooperationUrl", ]),
|
||||||
nickname() {
|
nickname() {
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,32 @@
|
||||||
uni.navigateToMiniProgram({
|
uni.navigateToMiniProgram({
|
||||||
appId: "wxdd371c9267b7299b",
|
appId: "wxdd371c9267b7299b",
|
||||||
path: "/pages/index/index",
|
path: "/pages/index/index",
|
||||||
success() {
|
success(res) {
|
||||||
console.log('跳转成功');
|
console.log('跳转成功');
|
||||||
|
if (res.cancel) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "您已取消操作",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.switchTab({
|
||||||
|
url: "/pages/index/index"
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail() {
|
||||||
|
uni.showToast({
|
||||||
|
title: "您已取消操作",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.switchTab({
|
||||||
|
url: "/pages/index/index"
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1260,4 +1260,45 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.voice-wave {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wave-bar {
|
||||||
|
width: 6px;
|
||||||
|
background: #3498db;
|
||||||
|
border-radius: 3px;
|
||||||
|
animation: wave 1.2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wave-bar:nth-child(2) {
|
||||||
|
animation-delay: -1.1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wave-bar:nth-child(3) {
|
||||||
|
animation-delay: -1.0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wave-bar:nth-child(4) {
|
||||||
|
animation-delay: -0.9s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wave-bar:nth-child(5) {
|
||||||
|
animation-delay: -0.8s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes wave {
|
||||||
|
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -54,36 +54,42 @@
|
||||||
.left {
|
.left {
|
||||||
float: left;
|
float: left;
|
||||||
width: 270rpx;
|
width: 270rpx;
|
||||||
height: 320rpx;
|
height: 300rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.chart-wrap {
|
.chart-wrap {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 250rpx;
|
width: 260rpx;
|
||||||
height: 250rpx;
|
height: 260rpx;
|
||||||
margin-top: -30rpx;
|
// margin-top: -10rpx;
|
||||||
margin-left: 5px;
|
margin-left: 0px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
border: none;
|
border: none;
|
||||||
width: 280rpx;
|
width: 255rpx;
|
||||||
height: 210rpx;
|
height: 210rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 64rpx;
|
top: 25rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
text{
|
||||||
|
margin: 5px 0;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mubiao {
|
.mubiao {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 32rpx;
|
margin-top: 0rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
@ -366,7 +372,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 280rpx;
|
width: 280rpx;
|
||||||
height: 280rpx;
|
height: 280rpx;
|
||||||
margin-top: -30rpx;
|
margin-top: 0rpx;
|
||||||
margin-left: -20px;
|
margin-left: -20px;
|
||||||
|
|
||||||
// .uchart-kcal {
|
// .uchart-kcal {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export default {
|
||||||
tools.msg(res.msg)
|
tools.msg(res.msg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.setStorageSync('userid', res.data.id)
|
uni.setStorageSync('userid', res.data.aud_id)
|
||||||
uni.setStorageSync('gender', res.data.gender)
|
uni.setStorageSync('gender', res.data.gender)
|
||||||
commit('changeUser', res.data)
|
commit('changeUser', res.data)
|
||||||
});
|
});
|
||||||
|
|
@ -76,7 +76,15 @@ export default {
|
||||||
commit('changeCardList', res.data)
|
commit('changeCardList', res.data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//趋势
|
||||||
|
GetBodyTrendList({
|
||||||
|
commit
|
||||||
|
}, account) {
|
||||||
|
return model.getTrendList(account).then((res) => {
|
||||||
|
console.log("趋势", res)
|
||||||
|
commit('changeTrend', res.data)
|
||||||
|
})
|
||||||
|
},
|
||||||
getPublicRecord({
|
getPublicRecord({
|
||||||
commit
|
commit
|
||||||
}, account) {
|
}, account) {
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,13 @@ export default new Vuex.Store({
|
||||||
isRecord: false, //手动记录
|
isRecord: false, //手动记录
|
||||||
isPublicRecord: false, //公共手动记录弹框
|
isPublicRecord: false, //公共手动记录弹框
|
||||||
isBluetoothTyle: false,
|
isBluetoothTyle: false,
|
||||||
|
trendInfo:{
|
||||||
|
weightList:[],
|
||||||
|
target_weight:"",
|
||||||
|
calculate_val:"",
|
||||||
|
initial_weight:"",
|
||||||
|
calculate_time:"",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
// 版本信息
|
// 版本信息
|
||||||
|
|
@ -176,6 +183,10 @@ export default new Vuex.Store({
|
||||||
changeMeasureResult(state, newData) {
|
changeMeasureResult(state, newData) {
|
||||||
Object.assign(state.MeasureResult, newData)
|
Object.assign(state.MeasureResult, newData)
|
||||||
},
|
},
|
||||||
|
//趋势
|
||||||
|
changeTrend(state, newData) {
|
||||||
|
state.trendInfo = newData
|
||||||
|
},
|
||||||
// 菜谱
|
// 菜谱
|
||||||
changeMenuList(state, newData) {
|
changeMenuList(state, newData) {
|
||||||
state.menuList = newData
|
state.menuList = newData
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ function Bluetoothfilter(device) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 广播思迈德协议,假阻抗,体脂秤
|
// 广播思迈德协议,假阻抗,体脂秤
|
||||||
if (device.name.toLowerCase() == "da") {
|
if (device.name.toLowerCase().indexOf('da') != -1 ) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pageTwo/devices/PCL22S?deviceId=" + device.deviceId
|
url: "/pageTwo/devices/PCL22S?deviceId=" + device.deviceId
|
||||||
})
|
})
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,580 +0,0 @@
|
||||||
/*
|
|
||||||
* uCharts®
|
|
||||||
* 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
|
|
||||||
* Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
|
|
||||||
* Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
||||||
* 复制使用请保留本段注释,感谢支持开源!
|
|
||||||
*
|
|
||||||
* uCharts®官方网站
|
|
||||||
* https://www.uCharts.cn
|
|
||||||
*
|
|
||||||
* 开源地址:
|
|
||||||
* https://gitee.com/uCharts/uCharts
|
|
||||||
*
|
|
||||||
* uni-app插件市场地址:
|
|
||||||
* http://ext.dcloud.net.cn/plugin?id=271
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
|
||||||
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
|
||||||
|
|
||||||
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
|
|
||||||
const formatDateTime = (timeStamp, returnType) => {
|
|
||||||
var date = new Date();
|
|
||||||
date.setTime(timeStamp * 1000);
|
|
||||||
var y = date.getFullYear();
|
|
||||||
var m = date.getMonth() + 1;
|
|
||||||
m = m < 10 ? ('0' + m) : m;
|
|
||||||
var d = date.getDate();
|
|
||||||
d = d < 10 ? ('0' + d) : d;
|
|
||||||
var h = date.getHours();
|
|
||||||
h = h < 10 ? ('0' + h) : h;
|
|
||||||
var minute = date.getMinutes();
|
|
||||||
var second = date.getSeconds();
|
|
||||||
minute = minute < 10 ? ('0' + minute) : minute;
|
|
||||||
second = second < 10 ? ('0' + second) : second;
|
|
||||||
if (returnType == 'full') {
|
|
||||||
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
|
|
||||||
}
|
|
||||||
if (returnType == 'y-m-d') {
|
|
||||||
return y + '-' + m + '-' + d;
|
|
||||||
}
|
|
||||||
if (returnType == 'h:m') {
|
|
||||||
return h + ':' + minute;
|
|
||||||
}
|
|
||||||
if (returnType == 'h:m:s') {
|
|
||||||
return h + ':' + minute + ':' + second;
|
|
||||||
}
|
|
||||||
return [y, m, d, h, minute, second];
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
|
|
||||||
"type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "area", "radar", "gauge",
|
|
||||||
"candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"
|
|
||||||
],
|
|
||||||
"range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图",
|
|
||||||
"时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"
|
|
||||||
],
|
|
||||||
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
|
|
||||||
//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
|
|
||||||
"categories": ["line", "column", "area", "radar", "gauge", "candle", "mix", "demotype"],
|
|
||||||
//instance为实例变量承载属性,不要删除
|
|
||||||
"instance": {},
|
|
||||||
//option为opts及eopts承载属性,不要删除
|
|
||||||
"option": {},
|
|
||||||
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
|
||||||
"formatter": {
|
|
||||||
"yAxisDemo1": function(val) {
|
|
||||||
return val + '元'
|
|
||||||
},
|
|
||||||
"yAxisDemo2": function(val) {
|
|
||||||
return val.toFixed(2)
|
|
||||||
},
|
|
||||||
"xAxisDemo1": function(val) {
|
|
||||||
return val + '年'
|
|
||||||
},
|
|
||||||
"xAxisDemo2": function(val) {
|
|
||||||
return formatDateTime(val, 'h:m')
|
|
||||||
},
|
|
||||||
"seriesDemo1": function(val) {
|
|
||||||
return val + '元'
|
|
||||||
},
|
|
||||||
"tooltipDemo1": function(item, category, index, opts) {
|
|
||||||
if (index == 0) {
|
|
||||||
return '随便用' + item.data + '年'
|
|
||||||
} else {
|
|
||||||
return '其他我没改' + item.data + '天'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pieDemo": function(val, index, series) {
|
|
||||||
if (index !== undefined) {
|
|
||||||
return series[index].name + ':' + series[index].data + '元'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
|
|
||||||
"demotype": {
|
|
||||||
//我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
|
|
||||||
"type": "line",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 10, 0, 15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"line": {
|
|
||||||
"type": "curve",
|
|
||||||
"width": 2
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//下面是自定义配置,请添加项目所需的通用配置
|
|
||||||
"pie": {
|
|
||||||
"type": "pie",
|
|
||||||
"color": color,
|
|
||||||
"padding": [5, 5, 5, 5],
|
|
||||||
"extra": {
|
|
||||||
"pie": {
|
|
||||||
"activeOpacity": 0.5,
|
|
||||||
"activeRadius": 10,
|
|
||||||
"offsetAngle": 0,
|
|
||||||
"labelWidth": 15,
|
|
||||||
"border": true,
|
|
||||||
"borderWidth": 3,
|
|
||||||
"borderColor": "#FFFFFF"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ring": {
|
|
||||||
"type": "ring",
|
|
||||||
"color": color,
|
|
||||||
"animation": false,
|
|
||||||
"padding": [5, 5, 5, 5],
|
|
||||||
"rotate": false,
|
|
||||||
"dataLabel": false,
|
|
||||||
"legend": {
|
|
||||||
"show": false,
|
|
||||||
"position": "right",
|
|
||||||
"lineHeight": 25,
|
|
||||||
},
|
|
||||||
"title": {
|
|
||||||
"name": "",
|
|
||||||
"fontSize": 22,
|
|
||||||
"color": "#666666"
|
|
||||||
},
|
|
||||||
"subtitle": {
|
|
||||||
"name": "kcal",
|
|
||||||
"fontSize": 14,
|
|
||||||
"offsetY": 8,
|
|
||||||
"color": "#888888"
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"ring": {
|
|
||||||
"ringWidth": 10,
|
|
||||||
"activeOpacity": 0.5,
|
|
||||||
"activeRadius": 10,
|
|
||||||
"offsetAngle": 0,
|
|
||||||
"labelWidth": 0,
|
|
||||||
"border": false,
|
|
||||||
"borderWidth": 3,
|
|
||||||
"borderColor": "#FFFFFF"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"rose": {
|
|
||||||
"type": "rose",
|
|
||||||
"color": color,
|
|
||||||
"padding": [5, 5, 5, 5],
|
|
||||||
"legend": {
|
|
||||||
"show": true,
|
|
||||||
"position": "left",
|
|
||||||
"lineHeight": 25,
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"rose": {
|
|
||||||
"type": "area",
|
|
||||||
"minRadius": 50,
|
|
||||||
"activeOpacity": 0.5,
|
|
||||||
"activeRadius": 10,
|
|
||||||
"offsetAngle": 0,
|
|
||||||
"labelWidth": 15,
|
|
||||||
"border": false,
|
|
||||||
"borderWidth": 2,
|
|
||||||
"borderColor": "#FFFFFF"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"word": {
|
|
||||||
"type": "word",
|
|
||||||
"color": color,
|
|
||||||
"extra": {
|
|
||||||
"word": {
|
|
||||||
"type": "normal",
|
|
||||||
"autoColors": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"funnel": {
|
|
||||||
"type": "funnel",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 15, 0, 15],
|
|
||||||
"extra": {
|
|
||||||
"funnel": {
|
|
||||||
"activeOpacity": 0.3,
|
|
||||||
"activeWidth": 10,
|
|
||||||
"border": true,
|
|
||||||
"borderWidth": 2,
|
|
||||||
"borderColor": "#FFFFFF",
|
|
||||||
"fillOpacity": 1,
|
|
||||||
"labelAlign": "right"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"map": {
|
|
||||||
"type": "map",
|
|
||||||
"color": color,
|
|
||||||
"padding": [0, 0, 0, 0],
|
|
||||||
"dataLabel": true,
|
|
||||||
"extra": {
|
|
||||||
"map": {
|
|
||||||
"border": true,
|
|
||||||
"borderWidth": 1,
|
|
||||||
"borderColor": "#666666",
|
|
||||||
"fillOpacity": 0.6,
|
|
||||||
"activeBorderColor": "#F04864",
|
|
||||||
"activeFillColor": "#FACC14",
|
|
||||||
"activeFillOpacity": 1
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"arcbar": {
|
|
||||||
"type": "arcbar",
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"name": "",
|
|
||||||
"fontSize": 25,
|
|
||||||
"color": "#00FF00"
|
|
||||||
},
|
|
||||||
"subtitle": {
|
|
||||||
"name": "",
|
|
||||||
"fontSize": 15,
|
|
||||||
"color": "#666666"
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"arcbar": {
|
|
||||||
"type": "circle",
|
|
||||||
"width": 8,
|
|
||||||
"backgroundColor": "#E9E9E9",
|
|
||||||
"startAngle": 0.75,
|
|
||||||
"endAngle": 0.25,
|
|
||||||
"gap": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"line": {
|
|
||||||
"type": "line",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 10, 0, 15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"line": {
|
|
||||||
"type": "straight",
|
|
||||||
"width": 2
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tline": {
|
|
||||||
"type": "line",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 10, 0, 15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"boundaryGap": "justify",
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
"data": [{
|
|
||||||
"min": 0,
|
|
||||||
"max": 80
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"line": {
|
|
||||||
"type": "curve",
|
|
||||||
"width": 2
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tarea": {
|
|
||||||
"type": "area",
|
|
||||||
"color": color,
|
|
||||||
"padding": [0, 15, 15, 5],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
"boundaryGap": "justify",
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
"data": [{
|
|
||||||
"min": 0,
|
|
||||||
"max": 80
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"area": {
|
|
||||||
"type": "curve",
|
|
||||||
"opacity": 0.2,
|
|
||||||
"addLine": true,
|
|
||||||
"width": 2,
|
|
||||||
"gradient": true
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"column": {
|
|
||||||
"type": "column",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 15, 0, 5],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"disableGrid": true,
|
|
||||||
"gridColor": '#ffffff',
|
|
||||||
"data": [{
|
|
||||||
"tofix": 1,
|
|
||||||
"min": 0
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"column": {
|
|
||||||
"type": "group",
|
|
||||||
"width": 20,
|
|
||||||
"seriesGap": 5,
|
|
||||||
"meterFillColor": "#FFFFFF",
|
|
||||||
"activeBgColor": "#000000",
|
|
||||||
"activeBgOpacity": 0.5,
|
|
||||||
"barBorderCircle": true,
|
|
||||||
"linearType": "opacity",
|
|
||||||
// "customColor": "#ff9f40",
|
|
||||||
"linearOpacity": 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"area": {
|
|
||||||
"type": "area",
|
|
||||||
"color": color,
|
|
||||||
"padding": [20, 15, 5, 10],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"disableGrid": true,
|
|
||||||
"gridColor": '#ffffff',
|
|
||||||
"data": [{
|
|
||||||
"tofix": 1,
|
|
||||||
"min": 0
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
"legend": {
|
|
||||||
"show": false,
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"area": {
|
|
||||||
"type": "curve",
|
|
||||||
"opacity": 0.2,
|
|
||||||
"addLine": true,
|
|
||||||
"width": 1,
|
|
||||||
"gradient": true
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"radar": {
|
|
||||||
"type": "radar",
|
|
||||||
"color": color,
|
|
||||||
"padding": [5, 5, 5, 5],
|
|
||||||
"legend": {
|
|
||||||
"show": true,
|
|
||||||
"position": "right",
|
|
||||||
"lineHeight": 25,
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"radar": {
|
|
||||||
"gridType": "radar",
|
|
||||||
"gridColor": "#CCCCCC",
|
|
||||||
"gridCount": 3,
|
|
||||||
"opacity": 0.2,
|
|
||||||
"max": 200
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gauge": {
|
|
||||||
"type": "gauge",
|
|
||||||
"color": color,
|
|
||||||
"title": {
|
|
||||||
"name": "66Km/H",
|
|
||||||
"fontSize": 25,
|
|
||||||
"color": "#2fc25b",
|
|
||||||
"offsetY": 50
|
|
||||||
},
|
|
||||||
"subtitle": {
|
|
||||||
"name": "实时速度",
|
|
||||||
"fontSize": 15,
|
|
||||||
"color": "#1890ff",
|
|
||||||
"offsetY": -50
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"gauge": {
|
|
||||||
"type": "default",
|
|
||||||
"width": 30,
|
|
||||||
"labelColor": "#666666",
|
|
||||||
"startAngle": 0.75,
|
|
||||||
"endAngle": 0.25,
|
|
||||||
"startNumber": 0,
|
|
||||||
"endNumber": 100,
|
|
||||||
"labelFormat": "",
|
|
||||||
"splitLine": {
|
|
||||||
"fixRadius": 0,
|
|
||||||
"splitNumber": 10,
|
|
||||||
"width": 30,
|
|
||||||
"color": "#FFFFFF",
|
|
||||||
"childNumber": 5,
|
|
||||||
"childWidth": 12
|
|
||||||
},
|
|
||||||
"pointer": {
|
|
||||||
"width": 24,
|
|
||||||
"color": "auto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"candle": {
|
|
||||||
"type": "candle",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 15, 0, 15],
|
|
||||||
"enableScroll": true,
|
|
||||||
"enableMarkLine": true,
|
|
||||||
"dataLabel": false,
|
|
||||||
"xAxis": {
|
|
||||||
"labelCount": 4,
|
|
||||||
"itemCount": 40,
|
|
||||||
"disableGrid": true,
|
|
||||||
"gridColor": "#CCCCCC",
|
|
||||||
"gridType": "solid",
|
|
||||||
"dashLength": 4,
|
|
||||||
"scrollShow": true,
|
|
||||||
"scrollAlign": "left",
|
|
||||||
"scrollColor": "#A6A6A6",
|
|
||||||
"scrollBackgroundColor": "#EFEBEF"
|
|
||||||
},
|
|
||||||
"yAxis": {},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"candle": {
|
|
||||||
"color": {
|
|
||||||
"upLine": "#f04864",
|
|
||||||
"upFill": "#f04864",
|
|
||||||
"downLine": "#2fc25b",
|
|
||||||
"downFill": "#2fc25b"
|
|
||||||
},
|
|
||||||
"average": {
|
|
||||||
"show": true,
|
|
||||||
"name": ["MA5", "MA10", "MA30"],
|
|
||||||
"day": [5, 10, 20],
|
|
||||||
"color": ["#1890ff", "#2fc25b", "#facc14"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"markLine": {
|
|
||||||
"type": "dash",
|
|
||||||
"dashLength": 5,
|
|
||||||
"data": [{
|
|
||||||
"value": 2150,
|
|
||||||
"lineColor": "#f04864",
|
|
||||||
"showLabel": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": 2350,
|
|
||||||
"lineColor": "#f04864",
|
|
||||||
"showLabel": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mix": {
|
|
||||||
"type": "mix",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 15, 0, 15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"disabled": false,
|
|
||||||
"disableGrid": false,
|
|
||||||
"splitNumber": 5,
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 4,
|
|
||||||
"gridColor": "#CCCCCC",
|
|
||||||
"padding": 10,
|
|
||||||
"showTitle": true,
|
|
||||||
"data": []
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"mix": {
|
|
||||||
"column": {
|
|
||||||
"width": 20
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"scatter": {
|
|
||||||
"type": "scatter",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 15, 0, 15],
|
|
||||||
"dataLabel": false,
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"gridType": "dash",
|
|
||||||
"splitNumber": 5,
|
|
||||||
"boundaryGap": "justify",
|
|
||||||
"min": 0
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"gridType": "dash",
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"scatter": {},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bubble": {
|
|
||||||
"type": "bubble",
|
|
||||||
"color": color,
|
|
||||||
"padding": [15, 15, 0, 15],
|
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"gridType": "dash",
|
|
||||||
"splitNumber": 5,
|
|
||||||
"boundaryGap": "justify",
|
|
||||||
"min": 0,
|
|
||||||
"max": 250
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"disableGrid": false,
|
|
||||||
"gridType": "dash",
|
|
||||||
"data": [{
|
|
||||||
"min": 0,
|
|
||||||
"max": 150
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"bubble": {
|
|
||||||
"border": 2,
|
|
||||||
"opacity": 0.5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -137,30 +137,31 @@ const cfu = {
|
||||||
"color": color,
|
"color": color,
|
||||||
"padding": [5, 5, 5, 5],
|
"padding": [5, 5, 5, 5],
|
||||||
"rotate": false,
|
"rotate": false,
|
||||||
"dataLabel": true,
|
"dataLabel": false,
|
||||||
"legend": {
|
"legend": {
|
||||||
"show": true,
|
"show": false,
|
||||||
"position": "right",
|
"position": "right",
|
||||||
"lineHeight": 25,
|
"lineHeight": 25,
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"name": "收益率",
|
"name": "",
|
||||||
"fontSize": 15,
|
"fontSize": 20,
|
||||||
"color": "#666666"
|
"color": "#666666"
|
||||||
},
|
},
|
||||||
"subtitle": {
|
"subtitle": {
|
||||||
"name": "70%",
|
"name": "kcal",
|
||||||
"fontSize": 25,
|
"fontSize": 14,
|
||||||
"color": "#7cb5ec"
|
"offsetY": 8,
|
||||||
|
"color": "#888888"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"ring": {
|
"ring": {
|
||||||
"ringWidth": 30,
|
"ringWidth": 10,
|
||||||
"activeOpacity": 0.5,
|
"activeOpacity": 0.5,
|
||||||
"activeRadius": 10,
|
"activeRadius": 10,
|
||||||
"offsetAngle": 0,
|
"offsetAngle": 0,
|
||||||
"labelWidth": 15,
|
"labelWidth": 0,
|
||||||
"border": true,
|
"border": false,
|
||||||
"borderWidth": 3,
|
"borderWidth": 3,
|
||||||
"borderColor": "#FFFFFF"
|
"borderColor": "#FFFFFF"
|
||||||
},
|
},
|
||||||
|
|
@ -272,7 +273,6 @@ const cfu = {
|
||||||
"line": {
|
"line": {
|
||||||
"type": "straight",
|
"type": "straight",
|
||||||
"width": 2,
|
"width": 2,
|
||||||
"activeType": "hollow"
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -307,15 +307,16 @@ const cfu = {
|
||||||
"padding": [15, 10, 0, 15],
|
"padding": [15, 10, 0, 15],
|
||||||
"xAxis": {
|
"xAxis": {
|
||||||
"disableGrid": true,
|
"disableGrid": true,
|
||||||
"boundaryGap": "justify",
|
"axisLine": false,
|
||||||
},
|
},
|
||||||
"yAxis": {
|
"yAxis": {
|
||||||
"gridType": "dash",
|
"gridType": "dash",
|
||||||
"dashLength": 2,
|
"disableGrid": true,
|
||||||
|
"gridColor": '#ffffff',
|
||||||
"data": [{
|
"data": [{
|
||||||
"min": 0,
|
"tofix": 1,
|
||||||
"max": 80
|
"min": 0
|
||||||
}]
|
}],
|
||||||
},
|
},
|
||||||
"legend": {},
|
"legend": {},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|
@ -323,9 +324,8 @@ const cfu = {
|
||||||
"type": "curve",
|
"type": "curve",
|
||||||
"opacity": 0.2,
|
"opacity": 0.2,
|
||||||
"addLine": true,
|
"addLine": true,
|
||||||
"width": 2,
|
"width": 1,
|
||||||
"gradient": true,
|
"gradient": true
|
||||||
"activeType": "hollow"
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -344,9 +344,6 @@ const cfu = {
|
||||||
"tofix": 1,
|
"tofix": 1,
|
||||||
"min": 0
|
"min": 0
|
||||||
}],
|
}],
|
||||||
"data": [{
|
|
||||||
"min": 0
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
"legend": {},
|
"legend": {},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|
@ -359,7 +356,6 @@ const cfu = {
|
||||||
"activeBgOpacity": 0.5,
|
"activeBgOpacity": 0.5,
|
||||||
"barBorderCircle": true,
|
"barBorderCircle": true,
|
||||||
"linearType": "opacity",
|
"linearType": "opacity",
|
||||||
// "customColor": "#ff9f40",
|
|
||||||
"linearOpacity": 1,
|
"linearOpacity": 1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -410,9 +406,10 @@ const cfu = {
|
||||||
"area": {
|
"area": {
|
||||||
"type": "area",
|
"type": "area",
|
||||||
"color": color,
|
"color": color,
|
||||||
"padding": [20, 15, 5, 10],
|
"padding": [15, 15, 0, 15],
|
||||||
"xAxis": {
|
"xAxis": {
|
||||||
"disableGrid": true,
|
"disableGrid": true,
|
||||||
|
"axisLine": false,
|
||||||
},
|
},
|
||||||
"yAxis": {
|
"yAxis": {
|
||||||
"gridType": "dash",
|
"gridType": "dash",
|
||||||
|
|
@ -428,12 +425,12 @@ const cfu = {
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"area": {
|
"area": {
|
||||||
"type": "curve",
|
"type": "straight",
|
||||||
"opacity": 0.2,
|
"opacity": 0.2,
|
||||||
"addLine": true,
|
"addLine": true,
|
||||||
"width": 1,
|
"width": 2,
|
||||||
"gradient": true,
|
"gradient": true,
|
||||||
"activeType": "hollow"
|
// "activeType": "hollow"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"sources":[],"names":[],"mappings":"","file":"uni_modules/lime-echart/components/l-echart/l-echart.js","sourceRoot":""}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue