小程序兼容
This commit is contained in:
parent
a745ec7aea
commit
73cfd5140b
|
|
@ -2,7 +2,7 @@
|
||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
30
App.vue
30
App.vue
|
|
@ -9,6 +9,7 @@
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
let that = this
|
let that = this
|
||||||
// 返回的是apk包信息
|
// 返回的是apk包信息
|
||||||
|
// #ifdef APP-PLUS
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success(e) {
|
success(e) {
|
||||||
platform = e.platform
|
platform = e.platform
|
||||||
|
|
@ -23,16 +24,15 @@
|
||||||
uni.onNetworkStatusChange(function(res) {
|
uni.onNetworkStatusChange(function(res) {
|
||||||
if (res.isConnected == true) {
|
if (res.isConnected == true) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pageTwo/login/login'
|
||||||
})
|
})
|
||||||
console.log("有网络连接", res.isConnected)
|
console.log("有网络连接", res.isConnected)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
that.checkForUpdates()
|
that.checkForUpdates()
|
||||||
uni.switchTab({
|
// #endif
|
||||||
url: "/pages/home/home"
|
that.handleoginversion()
|
||||||
})
|
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
@ -40,9 +40,11 @@
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide')
|
console.log('App Hide')
|
||||||
|
// #ifdef APP-PLUS
|
||||||
uni.offNetworkStatusChange(function(res) {
|
uni.offNetworkStatusChange(function(res) {
|
||||||
console.log("取消网络监听")
|
console.log("取消网络监听")
|
||||||
})
|
})
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 版本信息监测
|
// 版本信息监测
|
||||||
|
|
@ -60,13 +62,15 @@
|
||||||
// 版本信息
|
// 版本信息
|
||||||
handleoginversion(info) {
|
handleoginversion(info) {
|
||||||
let that = this
|
let that = this
|
||||||
let currentVersion = info.version;
|
|
||||||
that.$model.getloginversion({}).then(res => {
|
that.$model.getloginversion({}).then(res => {
|
||||||
|
that.handleCancelUpdate(res.code)
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
let currentVersion = info.version;
|
||||||
let latestVersion = res.data.version
|
let latestVersion = res.data.version
|
||||||
that.$store.commit('changePhoneInfo', {
|
that.$store.commit('changePhoneInfo', {
|
||||||
versionUrl: res.data
|
versionUrl: res.data
|
||||||
})
|
})
|
||||||
that.handleCancelUpdate(res.code)
|
|
||||||
// 比对版本号
|
// 比对版本号
|
||||||
let version = that.$tools.compareVersions(currentVersion, latestVersion)
|
let version = that.$tools.compareVersions(currentVersion, latestVersion)
|
||||||
if (version == -1) { // 0版本号相通,1,:第一个版本号大于第二个版本号,-1:第一个版本号小于第二个版本号
|
if (version == -1) { // 0版本号相通,1,:第一个版本号大于第二个版本号,-1:第一个版本号小于第二个版本号
|
||||||
|
|
@ -122,17 +126,21 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 取消更新
|
// 取消更新
|
||||||
handleCancelUpdate(code) {
|
handleCancelUpdate(code) {
|
||||||
let that = this
|
let that = this
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
that.handleUserList()
|
// that.handleUserList()
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/pages/home/home?type=1"
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pageTwo/login/login'
|
||||||
})
|
})
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
@ -151,11 +159,13 @@
|
||||||
that.$store.commit('changeFamilay', res.data)
|
that.$store.commit('changeFamilay', res.data)
|
||||||
if (res.data.length) {
|
if (res.data.length) {
|
||||||
that.$store.dispatch('getUserInfo', {
|
that.$store.dispatch('getUserInfo', {
|
||||||
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
|
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync(
|
||||||
|
'userid') : res.data[
|
||||||
0].id
|
0].id
|
||||||
})
|
})
|
||||||
that.$store.dispatch("getCardList", {
|
that.$store.dispatch("getCardList", {
|
||||||
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
|
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync(
|
||||||
|
'userid') : res.data[
|
||||||
0].id
|
0].id
|
||||||
})
|
})
|
||||||
that.handleLabelList(res.data[0].id)
|
that.handleLabelList(res.data[0].id)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
<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>
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
addInfo() {
|
addInfo() {
|
||||||
let that = this
|
let that = this
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/my/userInfo"
|
url: "/pageTwo/my/userInfo"
|
||||||
})
|
})
|
||||||
that.$store.commit("changeDrawe", false);
|
that.$store.commit("changeDrawe", false);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,20 @@
|
||||||
<view>
|
<view>
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="top" v-if="userList.length">
|
<view class="top" v-if="userList.length">
|
||||||
<view class="headimg">
|
<view class="headimg" @click="handleAddUser(1)">
|
||||||
<image :src="info.head_pic"></image>
|
<image :src="info.head_pic"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info" @click="handleAddUser(1)">
|
||||||
<view class="size18 bold">{{info.nickname}}</view>
|
<view class="size18 bold">{{info.nickname}}</view>
|
||||||
<view class="mt-10">
|
<view class="mt-10">
|
||||||
<text class="mr-10">性别:{{info.gender==1?'男':info.gender==2?'女':'未知'}}</text>
|
<text class="mr-10">性别:{{info.gender==1?'男':info.gender==2?'女':'未知'}}</text>
|
||||||
<text class="ml-10">年龄:{{info.age}}岁</text>
|
<text class="ml-10">年龄:{{info.age}}岁</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="mt-10">{{$t("index.birthday")}}:{{user.birthday}}</view> -->
|
<view class="mt-10">地区:{{info.address}}</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
|
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="top" v-else @click="handleAddUser">
|
<view class="top" v-else @click="handleAddUser(2)">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
暂无成员,请先添加~
|
暂无成员,请先添加~
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user", "familayList"]),
|
...mapState(["user", "familayList", "cityList"]),
|
||||||
info() {
|
info() {
|
||||||
return this.user
|
return this.user
|
||||||
},
|
},
|
||||||
|
|
@ -88,7 +88,7 @@
|
||||||
},
|
},
|
||||||
userId() {
|
userId() {
|
||||||
return this.user.id
|
return this.user.id
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
isArea: {
|
isArea: {
|
||||||
|
|
@ -105,23 +105,14 @@
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (that.isArea) {
|
if (that.isArea) {
|
||||||
that.handleCityList()
|
that.handleCityList()
|
||||||
console.log("1111", this.user.address)
|
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 1000);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
userId() {
|
userId() {
|
||||||
let that = this
|
let that = this
|
||||||
that.region = that.user.address
|
that.region = that.user.address
|
||||||
if (that.province.length) {
|
that.handleCityList()
|
||||||
let str = that.user.address.split(',')[0]
|
|
||||||
let str2 = that.user.address.split(',')[1]
|
|
||||||
var Index0 = that.province.findIndex((profile) => profile.name === str);
|
|
||||||
var Index2 = that.province[Index0].list.findIndex((ite) => ite === str2);
|
|
||||||
that.value[0] = Index0
|
|
||||||
that.value[1] = Index2
|
|
||||||
that.city = that.province[Index0].list
|
|
||||||
}
|
|
||||||
that.$emit("getAciveCity", that.region)
|
that.$emit("getAciveCity", that.region)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -142,36 +133,32 @@
|
||||||
that.$emit("getAciveCity", that.region)
|
that.$emit("getAciveCity", that.region)
|
||||||
},
|
},
|
||||||
// 添加成员
|
// 添加成员
|
||||||
handleAddUser() {
|
handleAddUser(ind) {
|
||||||
|
let that = this
|
||||||
if (uni.getStorageSync('token')) {
|
if (uni.getStorageSync('token')) {
|
||||||
|
let index = that.userList.findIndex((profile) => profile.id == that.info.id)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/my/userInfo"
|
url: ind == 1 ? "/pageTwo/my/userInfo?info=" + JSON.stringify(that.userList[index]) :
|
||||||
|
"/pageTwo/my/userInfo"
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pageTwo/login/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 地区
|
// 地区
|
||||||
handleCityList() {
|
handleCityList() {
|
||||||
let that = this
|
let that = this
|
||||||
that.$model.getCityList({
|
if (that.cityList.length) {
|
||||||
type: 2
|
that.province = that.cityList
|
||||||
}).then((res) => {
|
|
||||||
console.log("|全部地区", res.data, that.user.address)
|
|
||||||
if (res.code != 0) return
|
|
||||||
that.province = res.data
|
|
||||||
let str = that.user.address.split(',')[0]
|
let str = that.user.address.split(',')[0]
|
||||||
let str2 = that.user.address.split(',')[1]
|
var Index0 = that.province.findIndex((profile) => profile.name == str);
|
||||||
var Index0 = res.data.findIndex((profile) => profile.name === str);
|
|
||||||
var Index2 = res.data[Index0].list.findIndex((ite) => ite === str2);
|
|
||||||
that.value[0] = Index0
|
that.value[0] = Index0
|
||||||
that.value[1] = Index2
|
console.log("地区", str, Index0)
|
||||||
that.city = res.data[Index0].list
|
that.city = that.province[Index0].list
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -200,6 +187,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -214,7 +202,7 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 99;
|
z-index: 9999;
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
background-color: rgba(0, 0, 0, 0.6);
|
||||||
|
|
||||||
.groupBtn {
|
.groupBtn {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<view class="editem" @click="hideKeyboard">
|
<view class="editem" @click="hideKeyboard">
|
||||||
<view class="left">日期</view>
|
<view class="left">日期</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<picker mode="date" :end="endDate" @change="changeLog" fields="time">
|
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
|
||||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
@ -50,7 +50,8 @@
|
||||||
regTime: "",
|
regTime: "",
|
||||||
number1: '',
|
number1: '',
|
||||||
number2: "",
|
number2: "",
|
||||||
number3: ""
|
number3: "",
|
||||||
|
fields: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<view class="editem" @click="hideKeyboard">
|
<view class="editem" @click="hideKeyboard">
|
||||||
<view class="left">日期</view>
|
<view class="left">日期</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<picker mode="date" :end="endDate" @change="changeLog" fields="time">
|
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
|
||||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
@ -53,6 +53,7 @@
|
||||||
timeList: [],
|
timeList: [],
|
||||||
time_m: "",
|
time_m: "",
|
||||||
time_s: "",
|
time_s: "",
|
||||||
|
fields: "",
|
||||||
timesTndex: [1, 0],
|
timesTndex: [1, 0],
|
||||||
lableTndex: 0,
|
lableTndex: 0,
|
||||||
}
|
}
|
||||||
|
|
@ -80,7 +81,14 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.timeList = this.$tools.gethms()
|
let that = this
|
||||||
|
that.timeList = this.$tools.gethms()
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
that.fields = "time"
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
that.fields = "day"
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
bindTimeChange(e) {
|
bindTimeChange(e) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<view class="editem">
|
<view class="editem">
|
||||||
<view class="left">日期</view>
|
<view class="left">日期</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<picker mode="date" :end="endDate" @change="changeLog" fields="time">
|
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
|
||||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
@ -118,7 +118,8 @@
|
||||||
timesTndex: [1, 0],
|
timesTndex: [1, 0],
|
||||||
listType: null,
|
listType: null,
|
||||||
describe: "",
|
describe: "",
|
||||||
unit: ""
|
unit: "",
|
||||||
|
fields: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -152,6 +153,12 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this
|
let that = this
|
||||||
that.timeList = that.$tools.gethms()
|
that.timeList = that.$tools.gethms()
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
that.fields = "time"
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
that.fields = "day"
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 手动记录
|
// 手动记录
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<view class="editem" @click="hideKeyboard">
|
<view class="editem" @click="hideKeyboard">
|
||||||
<view class="left">日期</view>
|
<view class="left">日期</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<picker mode="date" :end="endDate" @change="changeLog" fields="time">
|
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
|
||||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<view class="editem" @click="hideKeyboard">
|
<view class="editem" @click="hideKeyboard">
|
||||||
<view class="left">日期</view>
|
<view class="left">日期</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<picker mode="date" :end="endDate" @change="changeLog" fields="time">
|
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
|
||||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<view class="editem" @click="hideKeyboard" v-if="type!=1">
|
<view class="editem" @click="hideKeyboard" v-if="type!=1">
|
||||||
<view class="name">日期</view>
|
<view class="name">日期</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<picker mode="date" :start="startDate" :end="endDate" @change="changeLog" fields="time">
|
<picker mode="date" :start="startDate" :end="endDate" @change="changeLog" :fields="fields">
|
||||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
return {
|
return {
|
||||||
regTime: "",
|
regTime: "",
|
||||||
weight: "",
|
weight: "",
|
||||||
|
fields: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -48,6 +49,15 @@
|
||||||
return this.$tools.getDate('start');
|
return this.$tools.getDate('start');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
that.fields = "time"
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
that.fields = "day"
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始体重
|
// 初始体重
|
||||||
handleTarget() {
|
handleTarget() {
|
||||||
|
|
|
||||||
|
|
@ -125,9 +125,11 @@
|
||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "",
|
"appid" : "wx9c0b7a436ada6d1e",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false
|
"urlCheck" : false,
|
||||||
|
"postcss" : true,
|
||||||
|
"minified" : true
|
||||||
},
|
},
|
||||||
"usingComponents" : true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,18 @@
|
||||||
<!-- 时间选择 -->
|
<!-- 时间选择 -->
|
||||||
<view class="boxTime">
|
<view class="boxTime">
|
||||||
<view class="one">
|
<view class="one">
|
||||||
<picker mode="date" :end="endDate" @change="handStartTimeH" fields="time"
|
<picker mode="date" :end="endDate" @change="handStartTimeH" :fields="fields"
|
||||||
:value="startTime?startTime:startDate">
|
:value="startTime?startTime:startDate">
|
||||||
<view class="uni-input mr-10">{{startTime?startTime:startDate}}</view>
|
<view class="uni-input mr-10">{{startTime?startTime:startDate}}
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
<view class="center">~</view>
|
<view class="center">~</view>
|
||||||
<picker mode="date" :end="endDate" @change="handEndTimeH" fields="time"
|
<picker mode="date" :end="endDate" @change="handEndTimeH" :fields="fields"
|
||||||
:value="endTime?endTime:endDate">
|
:value="endTime?endTime:endDate">
|
||||||
<view class="uni-input mr-10">{{endTime?endTime:endDate}}</view>
|
<view class="uni-input mr-10">{{endTime?endTime:endDate}}
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -23,21 +25,22 @@
|
||||||
<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" class="mt-15 mb-15">
|
<view v-if="item.line.categories.length" class="mt-15 mb-15">
|
||||||
<qiunDataCharts type="area" :chartData="item.line" :canvas2d="true" :canvasId="'1025'+ index"
|
<qiunDataCharts type="column" :chartData="item.line" :canvas2d="true" :canvasId="item.id"
|
||||||
:cHeight="400" :cWidth="720" :animation="false"
|
:Width="340" :Height="250" :animation="false"
|
||||||
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
||||||
</view>
|
</view>
|
||||||
<view class="nolist" v-else>
|
<view v-else>
|
||||||
|
<view class="nolist">
|
||||||
<image src="../../static/none.png"></image>
|
<image src="../../static/none.png"></image>
|
||||||
<text>暂无数据,请手动添加~</text>
|
<text>暂无数据,请手动添加~</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text :style="{'backgroundColor':item.line.series[0].color}"></text>
|
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -45,7 +48,7 @@
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
qiunDataCharts,
|
qiunDataCharts,
|
||||||
|
|
@ -68,6 +71,7 @@
|
||||||
active: 0,
|
active: 0,
|
||||||
startTime: "",
|
startTime: "",
|
||||||
endTime: "",
|
endTime: "",
|
||||||
|
fields: "",
|
||||||
weightList: [],
|
weightList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -84,6 +88,12 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.handlePublicTrendList()
|
that.handlePublicTrendList()
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
that.fields = "time"
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
that.fields = "day"
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handStartTimeH(e) {
|
handStartTimeH(e) {
|
||||||
|
|
@ -175,7 +175,7 @@
|
||||||
info.after_id = that.isActive[1]
|
info.after_id = that.isActive[1]
|
||||||
console.log("1111", info, that.isActive)
|
console.log("1111", info, that.isActive)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/compk/pkdetail?info=" + JSON.stringify(info)
|
url: "/pageTwo/compk/pkdetail?info=" + JSON.stringify(info)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleActive(ite, ind) {
|
handleActive(ite, ind) {
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
handlebinging(item) {
|
handlebinging(item) {
|
||||||
console.log("item", item)
|
console.log("item", item)
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/business/search?id=" + item.id
|
url: "/pageTwo/business/search?id=" + item.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
||||||
.uni-icons {
|
.uni-icons,uni-icons {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -28px;
|
top: -28px;
|
||||||
|
|
@ -133,6 +133,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
@ -154,7 +154,7 @@
|
||||||
info.after_id = that.isActive[1]
|
info.after_id = that.isActive[1]
|
||||||
console.log("1111", info, that.isActive)
|
console.log("1111", info, that.isActive)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/compk/pkdetail?info=" + JSON.stringify(info)
|
url: "/pageTwo/compk/pkdetail?info=" + JSON.stringify(info)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content skipping">
|
<view class="content skipping">
|
||||||
<!--自由训练 -->
|
<!--自由训练 -->
|
||||||
<view class="title">{{info.active==1?'自由训练':info.active==2?'定时训练':'定数训练'}}</view>
|
<view class="title">{{info.active==1?'自由跳':info.active==2?'倒计时':'倒计数'}}</view>
|
||||||
<view class="skiptop">
|
<view class="skiptop">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="item-ite">{{info.active==1?'自由次数':info.active==2?"个数":'目标次数'}}<text>{{weight}}</text>
|
<view class="item-ite">{{info.active==1?'自由次数':info.active==2?"个数":'目标次数'}}<text>{{weight}}</text>
|
||||||
|
|
@ -108,12 +108,22 @@
|
||||||
that.$store.commit("changeBluetooth", res.available);
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// #ifdef APP-PLUS
|
||||||
onBackPress(options) {
|
onBackPress(options) {
|
||||||
let that = this
|
let that = this
|
||||||
that.handleEnd()
|
that.handleEnd()
|
||||||
innerAudioContext.stop();
|
innerAudioContext.stop();
|
||||||
console.log("页面返回onBackPress")
|
console.log("PCT01返回onBackPress")
|
||||||
},
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
onUnload: function() {
|
||||||
|
let that = this
|
||||||
|
that.handleEnd()
|
||||||
|
innerAudioContext.stop();
|
||||||
|
console.log("PCT01返回onUnload")
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
watch: {
|
watch: {
|
||||||
isConnected: function() {
|
isConnected: function() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -114,7 +114,7 @@
|
||||||
let that = this
|
let that = this
|
||||||
if (that.acd_id == "6") return
|
if (that.acd_id == "6") return
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/history/historyDetail?type=" + that.acd_id + '&id=' + item.id
|
url: "/pageTwo/history/historyDetail?type=" + that.acd_id + '&id=' + item.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList(page) {
|
getList(page) {
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text">手机号/邮箱</view>
|
<view class="text">手机号/邮箱</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input v-model="phone" placeholder="" />
|
<input v-model="phone" type="text"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item ">
|
<view class="item ">
|
||||||
|
|
@ -154,7 +154,7 @@
|
||||||
},
|
},
|
||||||
handlePassword(text) {
|
handlePassword(text) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/login/forgetPassword?type=" + text
|
url: "/pageTwo/login/forgetPassword?type=" + text
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlexieyi() {
|
handlexieyi() {
|
||||||
|
|
@ -119,13 +119,13 @@
|
||||||
editorInfo(item) {
|
editorInfo(item) {
|
||||||
console.log("familayList", this.familayList)
|
console.log("familayList", this.familayList)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/my/userInfo?info=" + JSON.stringify(item)
|
url: "/pageTwo/my/userInfo?info=" + JSON.stringify(item)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//添加
|
//添加
|
||||||
handleAddUser() {
|
handleAddUser() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/my/userInfo"
|
url: "/pageTwo/my/userInfo"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -44,25 +44,67 @@
|
||||||
<view class="left">出生日期</view>
|
<view class="left">出生日期</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<picker mode="date" :end="endDate" @change="maskClick"
|
<picker mode="date" :end="endDate" @change="maskClick"
|
||||||
:value="memInfo.birthday?memInfo.birthday:endDate" fields="time">
|
:value="memInfo.birthday?memInfo.birthday:endDate" :fields="fields">
|
||||||
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:'请选择'}}</view>
|
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:'请选择'}}</view>
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</picker>
|
</picker>
|
||||||
<!-- <uni-datetime-picker type="date" :end="startDate" :clear-icon="false" v-model="memInfo.birthday"
|
</view>
|
||||||
@change="maskClick" :border="false" /> -->
|
</view>
|
||||||
|
<view class="lan border-bottom">
|
||||||
|
<view class="left">身份信息</view>
|
||||||
|
<view class="right">
|
||||||
|
<picker mode="selector" :range="identityList" :value="identityIndex" range-key="name"
|
||||||
|
@change="changegIdentity">
|
||||||
|
<view class="uni-input">{{identityList[identityIndex]?identityList[identityIndex].name:"请选择"}}
|
||||||
|
</view>
|
||||||
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="lan border-bottom" v-if="memInfo.identity_id=='P0'">
|
||||||
|
<view class="left">自定义</view>
|
||||||
|
<view class="right">
|
||||||
|
<input name="name" type="text" v-model="identityName" placeholder="请输入身份" />
|
||||||
|
<uni-icons type="clear" color="#999" v-if="identityName" @click="identityName=''"
|
||||||
|
size="20"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="lan border-bottom" @click="handleCityList">
|
||||||
|
<view class="left">所属地区</view>
|
||||||
|
<view class="right">
|
||||||
|
<view class="mr-10">{{memInfo.address?memInfo.address:'请选择'}}</view>
|
||||||
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="lan border-bottom">
|
<view class="lan border-bottom">
|
||||||
<view class="left">所在年级</view>
|
<view class="left">所在年级</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<picker mode="selector" :range="gradeList" :value="index" range-key="name" @change="changegType">
|
<picker mode="selector" :range="gradeList" :value="gradeIndex" range-key="name"
|
||||||
<view class="uni-input">{{gradeList[index]?gradeList[index].name:"请选择"}}</view>
|
@change="changegType">
|
||||||
|
<view class="uni-input">{{gradeList[gradeIndex]?gradeList[gradeIndex].name:"请选择"}}</view>
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="confirmInfo">提交</view>
|
<view class="btn" @click="confirmInfo">提交</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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -73,26 +115,36 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
fields: "",
|
||||||
sexItem: [
|
sexItem: [
|
||||||
"男",
|
"男",
|
||||||
"女"
|
"女"
|
||||||
],
|
],
|
||||||
memInfo: {
|
memInfo: {
|
||||||
birthday: "",
|
birthday: "",
|
||||||
gender: 0,
|
gender: '',
|
||||||
nickname: "",
|
nickname: "",
|
||||||
grade: "",
|
grade: "",
|
||||||
height: "",
|
height: "",
|
||||||
weight: ""
|
weight: "",
|
||||||
|
address: '',
|
||||||
|
identity_name: "",
|
||||||
|
identity_id: "P0",
|
||||||
},
|
},
|
||||||
|
identityName: "",
|
||||||
|
visible: false,
|
||||||
|
province: [], //省
|
||||||
|
city: [], //市
|
||||||
|
area: [], //区
|
||||||
|
value: [2, 0],
|
||||||
headimg: "",
|
headimg: "",
|
||||||
index: 0,
|
identityIndex: 0,
|
||||||
gradeList: []
|
gradeIndex: 0,
|
||||||
|
indicatorStyle: `height: 45px;`,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user", "familayList"]),
|
...mapState(["user", "familayList", "cityList", "gradeList", "identityList"]),
|
||||||
|
|
||||||
endDate() {
|
endDate() {
|
||||||
return this.$tools.getDate("start")
|
return this.$tools.getDate("start")
|
||||||
},
|
},
|
||||||
|
|
@ -102,29 +154,23 @@
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let that = this
|
let that = this
|
||||||
this.handleGradeList()
|
that.handleGradeList()
|
||||||
|
that.handleIdentityList()
|
||||||
if (options.info) {
|
if (options.info) {
|
||||||
that.memInfo = JSON.parse(options.info)
|
that.memInfo = JSON.parse(options.info)
|
||||||
|
that.gradeIndex = that.gradeList.findIndex((profile) => profile.id === that.memInfo.grade);
|
||||||
|
that.identityIndex = that.identityList.findIndex((profile) => profile.id === that.memInfo.identity_id);
|
||||||
|
that.identityName = that.memInfo.identity_id == 'P0' ? that.memInfo.identity_name : ''
|
||||||
that.isEdit = true
|
that.isEdit = true
|
||||||
}
|
}
|
||||||
console.log("1111", this.memInfo)
|
// #ifdef APP-PLUS
|
||||||
|
that.fields = "time"
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
that.fields = "day"
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleGradeList() {
|
|
||||||
let that = this
|
|
||||||
that.$model.getGradeList({}).then(res => {
|
|
||||||
console.log("年级列表", res)
|
|
||||||
if (res.code != 0) {
|
|
||||||
that.$tools.msg(res.msg)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
that.gradeList = res.data
|
|
||||||
if (that.isEdit == true) {
|
|
||||||
that.index = res.data.findIndex(ite => ite.id == that.memInfo.grade)
|
|
||||||
}
|
|
||||||
that.memInfo.grade = res.data[that.index].id
|
|
||||||
}).catch(err => {})
|
|
||||||
},
|
|
||||||
// 提交
|
// 提交
|
||||||
confirmInfo() {
|
confirmInfo() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -148,10 +194,22 @@
|
||||||
that.$tools.msg("请选择出生日期")
|
that.$tools.msg("请选择出生日期")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!that.memInfo.identity_id) {
|
||||||
|
that.$tools.msg("请选择身份信息")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!that.memInfo.address) {
|
||||||
|
that.$tools.msg("请选择所属地区")
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!that.memInfo.grade) {
|
if (!that.memInfo.grade) {
|
||||||
that.$tools.msg("请选择所在年级")
|
that.$tools.msg("请选择所在年级")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (that.memInfo.identity_id == 'P0') {
|
||||||
|
that.memInfo.identity_name = that.identityName ? that.identityName : that.identityList[that
|
||||||
|
.identityIndex].name
|
||||||
|
}
|
||||||
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)
|
||||||
|
|
@ -189,7 +247,7 @@
|
||||||
aud_id: id
|
aud_id: id
|
||||||
})
|
})
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/cardList/card"
|
url: "/pageTwo/cardList/card"
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
|
|
@ -202,6 +260,7 @@
|
||||||
},
|
},
|
||||||
//确定年龄
|
//确定年龄
|
||||||
maskClick(e) {
|
maskClick(e) {
|
||||||
|
console.log("出生日期", e.detail.value)
|
||||||
this.memInfo.birthday = e.detail.value
|
this.memInfo.birthday = e.detail.value
|
||||||
},
|
},
|
||||||
//确定性别
|
//确定性别
|
||||||
|
|
@ -210,9 +269,61 @@
|
||||||
},
|
},
|
||||||
// 年级
|
// 年级
|
||||||
changegType(e) {
|
changegType(e) {
|
||||||
this.index = e.detail.value
|
this.gradeIndex = e.detail.value
|
||||||
this.memInfo.grade = this.gradeList[e.target.value].id
|
this.memInfo.grade = this.gradeList[e.target.value].id
|
||||||
},
|
},
|
||||||
|
// 身份
|
||||||
|
changegIdentity(e) {
|
||||||
|
let that = this
|
||||||
|
that.identityIndex = e.detail.value
|
||||||
|
that.memInfo.identity_id = that.identityList[e.detail.value].id
|
||||||
|
that.memInfo.identity_name = that.identityList[e.detail.value].name
|
||||||
|
},
|
||||||
|
// 地区
|
||||||
|
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.memInfo.address = defaultRegion.join(",");
|
||||||
|
that.visible = false
|
||||||
|
},
|
||||||
|
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
|
||||||
|
that.visible = true
|
||||||
|
},
|
||||||
|
// 获取年级
|
||||||
|
handleGradeList() {
|
||||||
|
let that = this
|
||||||
|
if (that.isEdit == true) {
|
||||||
|
that.gradeIndex = that.gradeList.findIndex(ite => ite.id == that.memInfo.grade)
|
||||||
|
that.memInfo.grade = that.gradeList[that.gradeIndex].id
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取身份
|
||||||
|
handleIdentityList() {
|
||||||
|
let that = this
|
||||||
|
if (that.isEdit == true) {
|
||||||
|
that.identityIndex = that.identityList.findIndex(ite => ite.id == that.memInfo.identity_id)
|
||||||
|
that.memInfo.identity_id = that.identityList[that.identityIndex].id
|
||||||
|
that.memInfo.identity_name = that.identityList[that.identityIndex].name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -303,4 +414,56 @@
|
||||||
margin: 40px 15px 0;
|
margin: 40px 15px 0;
|
||||||
background: $btncolor !important;
|
background: $btncolor !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
line-height: 45px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
clickItemMethod(id) {
|
clickItemMethod(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/score/report?id=" + id
|
url: "/pageTwo/score/report?id=" + id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList(page) {
|
getList(page) {
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="title bold">本次估分成绩为</view>
|
<view class="title bold">本次估分成绩为</view>
|
||||||
<view class="charts">
|
<view class="charts">
|
||||||
<qiun-data-charts type="arcbar" :chartData="chartData" />
|
<qiun-data-charts type="arcbar" :chartData="chartData" :Height="140" :Width="140"/>
|
||||||
<view class="name">{{score}}</view>
|
<view class="name">{{score}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="title bold" v-if="Max_score">该地区体育总成绩为:{{Max_score}}分</view>
|
<view class="title bold" v-if="Max_score">该地区体育总成绩为:{{Max_score}}分</view>
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text">邮箱</view>
|
<view class="text">邮箱</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input v-model="phone" placeholder="" />
|
<input v-model="phone" placeholder="请输入邮箱"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item ">
|
<view class="item ">
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
my_email: that.phone
|
my_email: that.phone
|
||||||
})
|
})
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/setting/setting"
|
url: "/pageTwo/setting/setting"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
|
|
@ -5,13 +5,13 @@
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text">密码</view>
|
<view class="text">密码</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input class="uni-input" v-model="password" />
|
<input class="uni-input" v-model="password" placeholder="请输入密码"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text">确认密码</view>
|
<view class="text">确认密码</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input class="uni-input" v-model="password2" />
|
<input class="uni-input" v-model="password2" placeholder="请输入确认密码"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text">手机号</view>
|
<view class="text">手机号</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input v-model="phone" placeholder="" />
|
<input v-model="phone" placeholder="请输入手机号" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item ">
|
<view class="item ">
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
my_tel: that.phone
|
my_tel: that.phone
|
||||||
})
|
})
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/setting/setting"
|
url: "/pageTwo/setting/setting"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
|
|
@ -12,21 +12,21 @@
|
||||||
<uni-icons type="compose" color="#FEC407" @click="isEdit=true" class="ml-10" size="22"></uni-icons>
|
<uni-icons type="compose" color="#FEC407" @click="isEdit=true" class="ml-10" size="22"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="caritem" @click="navTo('/pages/setting/phone')">
|
<view class="caritem" @click="navTo('/pageTwo/setting/phone')">
|
||||||
<view class="text">手机号</view>
|
<view class="text">手机号</view>
|
||||||
<view class="text_r">
|
<view class="text_r">
|
||||||
<text>{{user.my_tel}}</text>
|
<text>{{user.my_tel}}</text>
|
||||||
<uni-icons type="right"></uni-icons>
|
<uni-icons type="right"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="caritem" @click="navTo('/pages/setting/email')">
|
<view class="caritem" @click="navTo('/pageTwo/setting/email')">
|
||||||
<view class="text">邮箱</view>
|
<view class="text">邮箱</view>
|
||||||
<view class="text_r">
|
<view class="text_r">
|
||||||
<text>{{user.my_email}}</text>
|
<text>{{user.my_email}}</text>
|
||||||
<uni-icons type="right"></uni-icons>
|
<uni-icons type="right"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="caritem" @click="navTo('/pages/setting/password')">
|
<view class="caritem" @click="navTo('/pageTwo/setting/password')">
|
||||||
<view class="text">设置密码</view>
|
<view class="text">设置密码</view>
|
||||||
<uni-icons type="right"></uni-icons>
|
<uni-icons type="right"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pages/login/login"
|
url: "/pageTwo/login/login"
|
||||||
})
|
})
|
||||||
}, 3000);
|
}, 3000);
|
||||||
})
|
})
|
||||||
|
|
@ -120,7 +120,7 @@
|
||||||
width: 70%;
|
width: 70%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
width: calc(100% - 30px);
|
width: calc(100% - 30px);
|
||||||
356
pages.json
356
pages.json
|
|
@ -8,55 +8,6 @@
|
||||||
"onReachBottomDistance": 50
|
"onReachBottomDistance": 50
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/cardList/card",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "卡片设置",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/body/body",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "身体数据",
|
|
||||||
"enablePullDownRefresh": true,
|
|
||||||
"onReachBottomDistance": 50
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/history/history",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "历史记录",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/history/historyDetail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "记录详情",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/compk/contrast",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "数据对比",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/compk/pkdetail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "对比详情",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/skiping/skip",
|
"path": "pages/skiping/skip",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -98,21 +49,6 @@
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"onReachBottomDistance": 50
|
"onReachBottomDistance": 50
|
||||||
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/my/manage",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "成员管理",
|
|
||||||
"enablePullDownRefresh": true,
|
|
||||||
"onReachBottomDistance": 50
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/my/userInfo",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "资料"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -122,84 +58,6 @@
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"onReachBottomDistance": 50
|
"onReachBottomDistance": 50
|
||||||
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/score/history",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "估分历史",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/score/report",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "估分报告",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/login/forgetPassword",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "密码",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/login/login",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "登录",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/setting/setting",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "设置",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/setting/password",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "修改密码",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/setting/email",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "绑定邮箱",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/setting/phone",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "绑定手机号",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/devices/search",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "蓝牙搜索",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/devices/G02",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "测量",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -212,14 +70,64 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/devices/PCV02",
|
"path": "pages/PublicCards/PublicCards",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "对比详情"
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/business/addDevice",
|
"path": "pages/body/body",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "身体数据",
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"onReachBottomDistance": 50
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"subPackages": [{
|
||||||
|
"root": "pageTwo",
|
||||||
|
"pages": [{
|
||||||
|
"path": "history/history",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "历史记录",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "history/historyDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "记录详情",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "compk/contrast",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "数据对比",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "compk/pkdetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "对比详情",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "cardList/card",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "卡片设置",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "business/addDevice",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "设备列表",
|
"navigationBarTitleText": "设备列表",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
|
@ -227,7 +135,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/business/search",
|
"path": "business/search",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "搜索设备",
|
"navigationBarTitleText": "搜索设备",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
|
@ -235,7 +143,123 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/devices/PCT01",
|
"path": "score/history",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "估分历史",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "score/report",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "估分报告",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "my/manage",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "成员管理",
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"onReachBottomDistance": 50
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "message/list",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "my/userInfo",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "资料"
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "login/forgetPassword",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "密码",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "login/login",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "登录",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "my/about",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "关于我们",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "setting/setting",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "设置",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "setting/password",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "修改密码",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "setting/email",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "绑定邮箱",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "setting/phone",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "绑定手机号",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "devices/search",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "蓝牙搜索",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "devices/G02",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "测量",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "devices/PCV02",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "devices/PCT01",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
|
@ -243,64 +267,46 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/my/about",
|
"path": "notepad/notepad",
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "关于我们",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/message/list",
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/notepad/notepad",
|
"path": "notepad/addNotepad",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/notepad/addNotepad",
|
"path": "PublicCards/charts",
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/PublicCards/PublicCards",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/PublicCards/charts",
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "运动曲线"
|
"navigationBarTitleText": "运动曲线"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/PublicCards/history",
|
"path": "PublicCards/history",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "历史记录"
|
"navigationBarTitleText": "历史记录"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/PublicCards/contrast",
|
"path": "PublicCards/contrast",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "数据对比"
|
"navigationBarTitleText": "数据对比"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/PublicCards/pkdetail",
|
"path": "PublicCards/pkdetail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "对比详情"
|
"navigationBarTitleText": "对比详情"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
}],
|
||||||
|
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white",
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,10 @@
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<view v-for="(ite,ind) in label_data" v-if="active == ind">
|
<view v-for="(ite,ind) in label_data" v-if="active == ind">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="time">{{ite.record_time}}</view>
|
<view class="table">
|
||||||
|
<text class="time">{{ite.record_time}}</text>
|
||||||
|
<text class="name2">训练成绩为</text>
|
||||||
|
</view>
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="left_view">
|
<view class="left_view">
|
||||||
<view class="title">{{ite.this_time_title}}:</view>
|
<view class="title">{{ite.this_time_title}}:</view>
|
||||||
|
|
@ -64,9 +67,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="title bold">训练成绩为</view>
|
|
||||||
<view class="charts">
|
<view class="charts">
|
||||||
<qiun-data-charts type="arcbar" :chartData="chartData" />
|
<qiun-data-charts type="arcbar" :chartData="chartData" :Height="140" :Width="140" />
|
||||||
<view class="name">{{ite.score?ite.score:'-'}}</view>
|
<view class="name">{{ite.score?ite.score:'-'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="standard" v-if="ite.standard">
|
<view class="standard" v-if="ite.standard">
|
||||||
|
|
@ -83,19 +85,19 @@
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<view class="gridList">
|
<view class="gridList">
|
||||||
<view class="data">
|
<view class="data">
|
||||||
<view class="item" @click="navTo('/pages/PublicCards/charts?acd_id='+acd_id)">
|
<view class="item" @click="navTo('/pageTwo/PublicCards/charts?acd_id='+acd_id)">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image src="@/static/charts.png"></image>
|
<image src="@/static/charts.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name">运动曲线</view>
|
<view class="name">运动曲线</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="navTo('/pages/PublicCards/history?acd_id='+acd_id)">
|
<view class="item" @click="navTo('/pageTwo/PublicCards/history?acd_id='+acd_id)">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image src="@/static/add.png"></image>
|
<image src="@/static/add.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name">历史记录</view>
|
<view class="name">历史记录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="navTo('/pages/PublicCards/contrast?acd_id='+acd_id)">
|
<view class="item" @click="navTo('/pageTwo/PublicCards/contrast?acd_id='+acd_id)">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image src="@/static/pk.png"></image>
|
<image src="@/static/pk.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -150,6 +152,7 @@
|
||||||
that.labelName = that.PublicContent.label_list[0]
|
that.labelName = that.PublicContent.label_list[0]
|
||||||
that.lineList = that.PublicContent.line_list
|
that.lineList = that.PublicContent.line_list
|
||||||
that.label_data = that.PublicContent.label_data
|
that.label_data = that.PublicContent.label_data
|
||||||
|
that.chartData.series[0].data = Number(that.PublicContent.label_data[0].offset) / 100
|
||||||
that.offset = that.PublicContent.label_data[0].offset
|
that.offset = that.PublicContent.label_data[0].offset
|
||||||
}
|
}
|
||||||
return that.PublicContent ? that.PublicContent.label_list : []
|
return that.PublicContent ? that.PublicContent.label_list : []
|
||||||
|
|
@ -169,6 +172,7 @@
|
||||||
that.active = ind
|
that.active = ind
|
||||||
that.labelName = ite
|
that.labelName = ite
|
||||||
that.offset = that.label_data[ind].offset
|
that.offset = that.label_data[ind].offset
|
||||||
|
that.chartData.series[0].data = Number(that.label_data[ind].offset) / 100
|
||||||
},
|
},
|
||||||
// 历史数据删除时重新加载接口
|
// 历史数据删除时重新加载接口
|
||||||
reload() {
|
reload() {
|
||||||
|
|
@ -312,11 +316,25 @@
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.time {
|
.table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.name2 {
|
||||||
|
width: 260rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
width: calc(100% - 260rpx);
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
|
|
|
||||||
|
|
@ -160,16 +160,19 @@
|
||||||
<!-- 时间选择 -->
|
<!-- 时间选择 -->
|
||||||
<view class="boxTime">
|
<view class="boxTime">
|
||||||
<view class="one">
|
<view class="one">
|
||||||
<picker mode="date" :end="endDate" @change="handStartTimeH" fields="time"
|
<picker mode="date" :end="endDate" @change="handStartTimeH" :fields="fields"
|
||||||
:value="startTime?startTime:startDate">
|
:value="startTime?startTime:startDate">
|
||||||
<view class="uni-input mr-10">{{startTime?startTime:startDate}}</view>
|
<view class="uni-input mr-10">{{startTime?startTime:startDate}}
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
<view class="center">~</view>
|
<view class="center">~</view>
|
||||||
<picker mode="date" :end="endDate" @change="handEndTimeH" fields="time"
|
<picker mode="date" :end="endDate" @change="handEndTimeH" :fields="fields"
|
||||||
:value="endTime?endTime:endDate">
|
:value="endTime?endTime:endDate">
|
||||||
<view class="uni-input mr-10">{{endTime?endTime:endDate}}</view>
|
<view class="uni-input mr-10">{{endTime?endTime:endDate}}
|
||||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||||
|
</view>
|
||||||
|
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -184,7 +187,7 @@
|
||||||
<view class="blockC">
|
<view class="blockC">
|
||||||
<view v-if="handTrue">
|
<view v-if="handTrue">
|
||||||
<qiunDataCharts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09"
|
<qiunDataCharts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09"
|
||||||
:cHeight="480" :cWidth="680" :animation="false"
|
:animation="false" :Width="340" :Height="250"
|
||||||
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -199,11 +202,11 @@
|
||||||
<!-- 目标-->
|
<!-- 目标-->
|
||||||
<view class="gridList">
|
<view class="gridList">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="item" @click="navTo('/pages/history/history?acd_id='+ acd_id)">
|
<view class="item" @click="navTo('/pageTwo/history/history?acd_id='+ acd_id)">
|
||||||
<text class="t-icon-lishi t-icon"></text>
|
<text class="t-icon-lishi t-icon"></text>
|
||||||
<view>历史记录</view>
|
<view>历史记录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="navTo('/pages/compk/contrast?acd_id='+ acd_id)">
|
<view class="item" @click="navTo('/pageTwo/compk/contrast?acd_id='+ acd_id)">
|
||||||
<text class="t-icon-renshiduibifenxi t-icon"></text>
|
<text class="t-icon-renshiduibifenxi t-icon"></text>
|
||||||
<view>数据对比</view>
|
<view>数据对比</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -250,10 +253,11 @@
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import record from '@/element/manuallyAdd/record.vue';
|
import record from '@/element/manuallyAdd/record.vue';
|
||||||
import firstweight from '@/element/target/firstweight.vue';
|
import firstweight from '@/element/target/firstweight.vue';
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/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 {
|
||||||
|
fields: "",
|
||||||
active: 1,
|
active: 1,
|
||||||
acd_id: 2,
|
acd_id: 2,
|
||||||
isDevice: 0,
|
isDevice: 0,
|
||||||
|
|
@ -314,7 +318,12 @@
|
||||||
s_time: that.startDate,
|
s_time: that.startDate,
|
||||||
e_time: that.endDate
|
e_time: that.endDate
|
||||||
})
|
})
|
||||||
console.log("11111", options)
|
// #ifdef APP-PLUS
|
||||||
|
that.fields = "time"
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
that.fields = "day"
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
onBackPress(options) {
|
onBackPress(options) {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -350,7 +359,7 @@
|
||||||
success: e => {
|
success: e => {
|
||||||
that.$store.commit("changeBluetooth", true);
|
that.$store.commit("changeBluetooth", true);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/devices/search?id=" + that.acd_id
|
url: "/pageTwo/devices/search?id=" + that.acd_id
|
||||||
})
|
})
|
||||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||||
},
|
},
|
||||||
|
|
@ -468,4 +477,9 @@
|
||||||
background-color: #F5F6FA;
|
background-color: #F5F6FA;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.listC {
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="add" @click="handleAddDevice()">添加设备</view>
|
<view class="add" @click="handleAddDevice()">添加设备</view>
|
||||||
<view class="list" v-if="list.length">
|
<view class="list">
|
||||||
<view class="item" v-for="(item,index) in list" @click="handleunbind(item,index)">
|
<view class="item" v-for="(item,index) in list" @click="handleunbind(item,index)">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image :src="item.pic"></image>
|
<image :src="item.pic"></image>
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
},
|
},
|
||||||
handleAddDevice() {
|
handleAddDevice() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/business/addDevice"
|
url: "/pageTwo/business/addDevice"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,13 +123,16 @@
|
||||||
that.$store.commit('changeFamilay', res.data)
|
that.$store.commit('changeFamilay', res.data)
|
||||||
if (res.data.length) {
|
if (res.data.length) {
|
||||||
that.$store.dispatch('getUserInfo', {
|
that.$store.dispatch('getUserInfo', {
|
||||||
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[0].id
|
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
|
||||||
|
0].id
|
||||||
})
|
})
|
||||||
that.$store.dispatch("getCardList", {
|
that.$store.dispatch("getCardList", {
|
||||||
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[0].id
|
aud_id: uni.getStorageSync('userid') ? uni.getStorageSync('userid') : res.data[
|
||||||
|
0].id
|
||||||
})
|
})
|
||||||
that.handleLabelList(res.data[0].id)
|
that.handleLabelList(res.data[0].id)
|
||||||
that.handlePublicRecord(res.data[0].id)
|
that.handlePublicRecord(res.data[0].id)
|
||||||
|
that.handleCityList()
|
||||||
}
|
}
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
},
|
},
|
||||||
|
|
@ -145,6 +148,17 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 地区
|
||||||
|
handleCityList() {
|
||||||
|
let that = this
|
||||||
|
that.$model.getGradeList({}).then((res) => {
|
||||||
|
console.log("|全部地区", res.data)
|
||||||
|
if (res.code != 0) return
|
||||||
|
that.$store.commit('changeCityList', res.data.area_list)
|
||||||
|
that.$store.commit('changeGradeList', res.data.grade_list)
|
||||||
|
that.$store.commit('changeIdentityList', res.data.identity_list)
|
||||||
|
})
|
||||||
|
},
|
||||||
// 公共手动记录内容
|
// 公共手动记录内容
|
||||||
handlePublicRecord(id) {
|
handlePublicRecord(id) {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -160,7 +174,7 @@
|
||||||
// 设置数据页卡片
|
// 设置数据页卡片
|
||||||
handleCard() {
|
handleCard() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/cardList/card"
|
url: "/pageTwo/cardList/card"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 报告页
|
// 报告页
|
||||||
|
|
@ -179,7 +193,7 @@
|
||||||
// 添加成员
|
// 添加成员
|
||||||
handleAddUser() {
|
handleAddUser() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/my/userInfo"
|
url: "/pageTwo/my/userInfo"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
|
|
@ -195,26 +209,20 @@
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/.header {
|
/deep/.header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 380rpx;
|
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: $maincolor ;
|
background: $maincolor ;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.radius50 {
|
/deep/.cityList {
|
||||||
width: 100%;
|
margin-top: -36px;
|
||||||
height: 80px;
|
|
||||||
margin-top: -100rpx;
|
|
||||||
border-radius: 40px 40px 0 0;
|
|
||||||
background-color: #f7f7f7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
margin-top: -260rpx;
|
margin-top: 0rpx;
|
||||||
padding: 0 10px;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blueBtn {
|
.blueBtn {
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
<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="'lung'+index"
|
||||||
:cHeight="400" :cWidth="720" :animation="false"
|
:Width="340" :Height="250" :animation="false"
|
||||||
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
||||||
</view>
|
</view>
|
||||||
<view class="nolist" v-else>
|
<view class="nolist" v-else>
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
qiunDataCharts,
|
qiunDataCharts,
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,13 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="name">运动曲线</view>
|
<view class="name">运动曲线</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="navTo('/pages/history/history?acd_id='+acd_id)">
|
<view class="item" @click="navTo('/pageTwo/history/history?acd_id='+acd_id)">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image src="../../static/add.png"></image>
|
<image src="../../static/add.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name">历史记录</view>
|
<view class="name">历史记录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="navTo('/pages/compk/contrast?acd_id='+acd_id)">
|
<view class="item" @click="navTo('/pageTwo/compk/contrast?acd_id='+acd_id)">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image src="../../static/pk.png"></image>
|
<image src="../../static/pk.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<view class="top" @click="navTo('/pages/setting/setting')">
|
<view class="top" @click="navTo('/pageTwo/setting/setting')">
|
||||||
<view class="headimg">
|
<view class="headimg">
|
||||||
<image :src="user.head_pic" class="image"></image>
|
<image :src="user.head_pic" class="image"></image>
|
||||||
<view class="size20 bold">{{user.nickname}}</view>
|
<view class="size20 bold">{{user.nickname}}</view>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<view class="wxlist borderRadius">
|
<view class="wxlist borderRadius">
|
||||||
<view class="list" @click="navTo('/pages/my/manage')">
|
<view class="list" @click="navTo('/pageTwo/my/manage')">
|
||||||
<view class="item border-bottom">
|
<view class="item border-bottom">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="name">成员管理</view>
|
<view class="name">成员管理</view>
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="list" @click="navTo('/pages/score/history')">
|
<view class="list" @click="navTo('/pageTwo/score/history')">
|
||||||
<view class="item border-bottom">
|
<view class="item border-bottom">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="name">估分历史</view>
|
<view class="name">估分历史</view>
|
||||||
|
|
@ -50,7 +50,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="list" @click="navTo('/pages/my/about')">
|
<!-- #ifdef APP-PLUS -->
|
||||||
|
<view class="list" @click="navTo('/pageTwo/my/about')">
|
||||||
<view class="item border-bottom">
|
<view class="item border-bottom">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="name">关于我们</view>
|
<view class="name">关于我们</view>
|
||||||
|
|
@ -60,6 +61,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
<!-- <view class="list" @click="navTo('/pages/login/forgetPassword?type=forgetPassword')">
|
<!-- <view class="list" @click="navTo('/pages/login/forgetPassword?type=forgetPassword')">
|
||||||
<view class="item border-bottom">
|
<view class="item border-bottom">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
|
|
@ -145,7 +147,7 @@
|
||||||
uni.setStorageSync('aan_id', null)
|
uni.setStorageSync('aan_id', null)
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync()
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pages/login/login"
|
url: "/pageTwo/login/login"
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="title bold">本次估分成绩为</view>
|
<view class="title bold">本次估分成绩为</view>
|
||||||
<view class="charts mt-15">
|
<view class="charts mt-15">
|
||||||
<qiun-data-charts type="arcbar" :chartData="chartData" />
|
<qiun-data-charts type="arcbar" :chartData="chartData" :Height="140" :Width="140"/>
|
||||||
<view class="name">{{score?score:'--'}}</view>
|
<view class="name">{{score?score:'--'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn history" @click="navTo('/pages/score/history')">估分历史</view>
|
<view class="btn history" @click="navTo('/pageTwo/score/history')">估分历史</view>
|
||||||
<view class="title bold" v-if="Max_score">该地区体育总成绩为:{{Max_score}}分</view>
|
<view class="title bold" v-if="Max_score">该地区体育总成绩为:{{Max_score}}分</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view class="item3" v-for="(it,ik) in ite.list" :key="ik" v-if="!isresult">
|
<view class="item3" v-for="(it,ik) in ite.list" :key="ik" v-if="!isresult">
|
||||||
<view class="name">{{it.name}}<uni-icons type="info" color="#f0ad4e" size="20"
|
<view class="name overflow">{{it.name}}<uni-icons type="info" color="#f0ad4e" size="20"
|
||||||
@click="handleTips(it.describe)" v-if="it.describe"></uni-icons></view>
|
@click="handleTips(it.describe)" v-if="it.describe"></uni-icons></view>
|
||||||
<view class="weight">
|
<view class="weight">
|
||||||
<view class="input">
|
<view class="input">
|
||||||
|
|
@ -359,6 +359,7 @@
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import "@/scss/score.scss";
|
@import "@/scss/score.scss";
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
<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.id"
|
||||||
:cHeight="480" :cWidth="680" :animation="false"
|
:Width="340" :Height="250" :animation="false"
|
||||||
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
|
||||||
</view>
|
</view>
|
||||||
<view class="line" v-else>
|
<view class="line" v-else>
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
|
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
qiunDataCharts,
|
qiunDataCharts,
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<view class="tabbar">
|
<view class="tabbar">
|
||||||
<view @click="active=1" :class="[active==1?'active':'']">自由训练</view>
|
<view @click="active=1" :class="[active==1?'active':'']">自由跳</view>
|
||||||
<view @click="active=2" :class="[active==2?'active':'']">定时训练</view>
|
<view @click="active=3" :class="[active==3?'active':'']">倒计数</view>
|
||||||
<view @click="active=3" :class="[active==3?'active':'']">定数训练</view>
|
<view @click="active=2" :class="[active==2?'active':'']">倒计时</view>
|
||||||
</view>
|
</view>
|
||||||
<!--自由训练 -->
|
<!--自由训练 -->
|
||||||
<view class="box1 box" v-if="active==1">
|
<view class="box1 box" v-if="active==1">
|
||||||
|
|
@ -89,13 +89,13 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="name">运动曲线</view>
|
<view class="name">运动曲线</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="navTo('/pages/history/history?acd_id='+acd_id)">
|
<view class="item" @click="navTo('/pageTwo/history/history?acd_id='+acd_id)">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image src="@/static/add.png"></image>
|
<image src="@/static/add.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name">历史记录</view>
|
<view class="name">历史记录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="navTo('/pages/compk/contrast?acd_id='+acd_id)">
|
<view class="item" @click="navTo('/pageTwo/compk/contrast?acd_id='+acd_id)">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image src="@/static/pk.png"></image>
|
<image src="@/static/pk.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -126,6 +126,7 @@
|
||||||
active: 1,
|
active: 1,
|
||||||
acd_id: 6,
|
acd_id: 6,
|
||||||
weight: 50,
|
weight: 50,
|
||||||
|
Unload: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
isDevice: 0,
|
isDevice: 0,
|
||||||
isConnection: false,
|
isConnection: false,
|
||||||
|
|
@ -169,6 +170,7 @@
|
||||||
// 跳绳页返回
|
// 跳绳页返回
|
||||||
if (options && options.info) {
|
if (options && options.info) {
|
||||||
let data = JSON.parse(options.info)
|
let data = JSON.parse(options.info)
|
||||||
|
that.Unload = true
|
||||||
that.active = data.active
|
that.active = data.active
|
||||||
that.deviceId = data.deviceId
|
that.deviceId = data.deviceId
|
||||||
that.serviceId = data.serviceId
|
that.serviceId = data.serviceId
|
||||||
|
|
@ -201,11 +203,13 @@
|
||||||
console.log('监听到事件来自 updateData ,携带参数为:' + info);
|
console.log('监听到事件来自 updateData ,携带参数为:' + info);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onBackPress(options) {
|
// #ifdef APP-PLUS
|
||||||
|
onBackPress() {
|
||||||
let that = this
|
let that = this
|
||||||
that.islink = -1
|
that.islink = -1
|
||||||
clearTimeout(myTime);
|
clearTimeout(myTime);
|
||||||
that.isConnection = false
|
that.isConnection = false
|
||||||
|
console.log("返回首页onBackPress")
|
||||||
that.$Bluetooth.closeBluetoothAdapter()
|
that.$Bluetooth.closeBluetoothAdapter()
|
||||||
that.$Bluetooth.closeBLEConnection(that.deviceId)
|
that.$Bluetooth.closeBLEConnection(that.deviceId)
|
||||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||||
|
|
@ -216,9 +220,32 @@
|
||||||
url: '/pages/home/home'
|
url: '/pages/home/home'
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
console.log("返回首页")
|
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
onUnload: function() {
|
||||||
|
let that = this
|
||||||
|
// clearTimeout(myTime);
|
||||||
|
// that.islink = -1
|
||||||
|
// that.isConnection = false
|
||||||
|
// that.$Bluetooth.closeBluetoothAdapter()
|
||||||
|
// that.$Bluetooth.closeBLEConnection(that.deviceId)
|
||||||
|
// that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||||
|
// that.$store.commit("changeBluetooth", false);
|
||||||
|
// that.$store.commit("changeConnected", false);
|
||||||
|
// setTimeout(() => {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/home/home'
|
||||||
|
})
|
||||||
|
// }, 300)
|
||||||
|
let pages = getCurrentPages()
|
||||||
|
let prevPage = pages[pages.length - 2]
|
||||||
|
console.log("prevPage", prevPage)
|
||||||
|
uni.$off("updateData")
|
||||||
|
console.log("返回首页onUnload")
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
watch: {
|
watch: {
|
||||||
devicesList() {
|
devicesList() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -333,6 +360,9 @@
|
||||||
},
|
},
|
||||||
fail: res => {
|
fail: res => {
|
||||||
console.log('获取设备的UUID失败:', res)
|
console.log('获取设备的UUID失败:', res)
|
||||||
|
that.islink = -1
|
||||||
|
clearTimeout(myTime);
|
||||||
|
that.isConnection = false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -396,6 +426,7 @@
|
||||||
success(res) {
|
success(res) {
|
||||||
uni.onBLECharacteristicValueChange(function(res) {
|
uni.onBLECharacteristicValueChange(function(res) {
|
||||||
let value = that.$tools.ab2hex(res.value, "");
|
let value = that.$tools.ab2hex(res.value, "");
|
||||||
|
console.log("1111跳", value)
|
||||||
if (value == '5a05090169') { //模式设置成功
|
if (value == '5a05090169') { //模式设置成功
|
||||||
let info = {
|
let info = {
|
||||||
active: that.active,
|
active: that.active,
|
||||||
|
|
@ -408,7 +439,8 @@
|
||||||
}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/devices/PCT01?info=" + JSON.stringify(info)
|
url: "/pageTwo/devices/PCT01?info=" + JSON
|
||||||
|
.stringify(info)
|
||||||
})
|
})
|
||||||
}, 200)
|
}, 200)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -451,6 +451,53 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.visible {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 99;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 240rpx;
|
height: 240rpx;
|
||||||
|
|
@ -734,18 +781,16 @@
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name2 {
|
.name2 {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
padding: 15px 0;
|
padding: 7px 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
||||||
BIN
static/Fill0.png
BIN
static/Fill0.png
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
BIN
static/Fill1.png
BIN
static/Fill1.png
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
BIN
static/Fill2.png
BIN
static/Fill2.png
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
|
|
@ -135,7 +135,7 @@ export default {
|
||||||
}) {
|
}) {
|
||||||
return model.getUserDeviceList({}).then(res => {
|
return model.getUserDeviceList({}).then(res => {
|
||||||
console.log("用户设备", res)
|
console.log("用户设备", res)
|
||||||
if (res.data && res.data.list.length) {
|
if (res.data) {
|
||||||
commit('changeUserDeviceList', res.data.list)
|
commit('changeUserDeviceList', res.data.list)
|
||||||
} else {
|
} else {
|
||||||
commit('changeUserDeviceList', [])
|
commit('changeUserDeviceList', [])
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,9 @@ export default new Vuex.Store({
|
||||||
versionUrl: null,
|
versionUrl: null,
|
||||||
platform: ""
|
platform: ""
|
||||||
},
|
},
|
||||||
|
cityList: [],
|
||||||
|
gradeList: [],
|
||||||
|
identityList: []
|
||||||
},
|
},
|
||||||
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
|
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
|
||||||
mutations: {
|
mutations: {
|
||||||
|
|
@ -162,8 +164,17 @@ export default new Vuex.Store({
|
||||||
// 公共卡片
|
// 公共卡片
|
||||||
changeLabelList(state, newData) {
|
changeLabelList(state, newData) {
|
||||||
state.labelList = newData
|
state.labelList = newData
|
||||||
}
|
},
|
||||||
|
// 城市
|
||||||
|
changeCityList(state, newData) {
|
||||||
|
state.cityList = newData
|
||||||
|
},
|
||||||
|
changeGradeList(state, newData) {
|
||||||
|
state.gradeList = newData
|
||||||
|
},
|
||||||
|
changeIdentityList(state, newData) {
|
||||||
|
state.identityList = newData
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// 模块化vuex
|
// 模块化vuex
|
||||||
modules: {},
|
modules: {},
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ function handleDevicesMac(device, acd_id) {
|
||||||
success: e => {
|
success: e => {
|
||||||
$store.commit("changeBluetooth", true);
|
$store.commit("changeBluetooth", true);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/devices/search?id=" + acd_id + '&device=' + device
|
url: "/pageTwo/devices/search?id=" + acd_id + '&device=' + device
|
||||||
})
|
})
|
||||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import tools from '@/toolJs/tools.js'
|
import tools from '@/toolJs/tools.js'
|
||||||
import store from '../store'
|
import store from '../store'
|
||||||
// let baseUrl = "http://tc.pcxbc.com"
|
// let baseUrl = "http://tc.pcxbc.com"
|
||||||
let baseUrl = "http://tc.pcxbc.com/testedition"
|
let baseUrl = "https://tc.pcxbc.com/testedition"
|
||||||
const httpRequest = (url, method = "get", data) => {
|
const httpRequest = (url, method = "get", data) => {
|
||||||
data.token = uni.getStorageSync('token')
|
data.token = uni.getStorageSync('token')
|
||||||
data.aan_id = uni.getStorageSync('aan_id')
|
data.aan_id = uni.getStorageSync('aan_id')
|
||||||
|
|
@ -25,7 +25,7 @@ const httpRequest = (url, method = "get", data) => {
|
||||||
uni.setStorageSync('aan_id', null)
|
uni.setStorageSync('aan_id', null)
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pages/login/login"
|
url: "/pageTwo/login/login"
|
||||||
})
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ export default {
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getGradeList(param) { // 获取年级列表
|
getGradeList(param) { // 获取年级、身份、地区列表
|
||||||
return http.post("/get_grade_list", param).then(res => {
|
return http.post("/get_grade_list", param).then(res => {
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -28,127 +28,61 @@
|
||||||
<!-- APP和H5采用renderjs渲染图表 -->
|
<!-- APP和H5采用renderjs渲染图表 -->
|
||||||
<!-- #ifdef APP-VUE || H5 -->
|
<!-- #ifdef APP-VUE || H5 -->
|
||||||
<block v-if="echarts">
|
<block v-if="echarts">
|
||||||
<view
|
<view :style="{ background: background }" style="width: 100%;height: 100%;" :data-directory="directory"
|
||||||
:style="{ background: background }"
|
:id="'EC'+cid" :prop="echartsOpts" :change:prop="rdcharts.ecinit" :resize="echartsResize"
|
||||||
style="width: 100%;height: 100%;"
|
:change:resize="rdcharts.ecresize" v-show="showchart" />
|
||||||
:data-directory="directory"
|
|
||||||
:id="'EC'+cid"
|
|
||||||
:prop="echartsOpts"
|
|
||||||
:change:prop="rdcharts.ecinit"
|
|
||||||
:resize="echartsResize"
|
|
||||||
:change:resize="rdcharts.ecresize"
|
|
||||||
v-show="showchart"
|
|
||||||
/>
|
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view
|
<view v-on:tap="rdcharts.tap" v-on:mousemove="rdcharts.mouseMove" v-on:mousedown="rdcharts.mouseDown"
|
||||||
v-on:tap="rdcharts.tap"
|
v-on:mouseup="rdcharts.mouseUp" v-on:touchstart="rdcharts.touchStart"
|
||||||
v-on:mousemove="rdcharts.mouseMove"
|
v-on:touchmove="rdcharts.touchMove" v-on:touchend="rdcharts.touchEnd" :id="'UC'+cid" :prop="uchartsOpts"
|
||||||
v-on:mousedown="rdcharts.mouseDown"
|
:change:prop="rdcharts.ucinit">
|
||||||
v-on:mouseup="rdcharts.mouseUp"
|
<canvas :id="cid" :canvasId="cid"
|
||||||
v-on:touchstart="rdcharts.touchStart"
|
|
||||||
v-on:touchmove="rdcharts.touchMove"
|
|
||||||
v-on:touchend="rdcharts.touchEnd"
|
|
||||||
:id="'UC'+cid"
|
|
||||||
:prop="uchartsOpts"
|
|
||||||
:change:prop="rdcharts.ucinit"
|
|
||||||
>
|
|
||||||
<canvas
|
|
||||||
:id="cid"
|
|
||||||
:canvasId="cid"
|
|
||||||
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
||||||
:disable-scroll="disableScroll"
|
:disable-scroll="disableScroll" @error="_error" v-show="showchart" />
|
||||||
@error="_error"
|
|
||||||
v-show="showchart"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- 支付宝小程序 -->
|
<!-- 支付宝小程序 -->
|
||||||
<!-- #ifdef MP-ALIPAY -->
|
<!-- #ifdef MP-ALIPAY -->
|
||||||
<block v-if="ontouch">
|
<block v-if="ontouch">
|
||||||
<canvas
|
<canvas :id="cid" :canvasId="cid" :width="cWidth * pixel" :height="cHeight * pixel"
|
||||||
:id="cid"
|
|
||||||
:canvasId="cid"
|
|
||||||
:width="cWidth * pixel"
|
|
||||||
:height="cHeight * pixel"
|
|
||||||
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
||||||
:disable-scroll="disScroll"
|
:disable-scroll="disScroll" @tap="_tap" @touchstart="_touchStart" @touchmove="_touchMove"
|
||||||
@tap="_tap"
|
@touchend="_touchEnd" @error="_error" v-show="showchart" />
|
||||||
@touchstart="_touchStart"
|
|
||||||
@touchmove="_touchMove"
|
|
||||||
@touchend="_touchEnd"
|
|
||||||
@error="_error"
|
|
||||||
v-show="showchart"
|
|
||||||
/>
|
|
||||||
</block>
|
</block>
|
||||||
<block v-if="!ontouch">
|
<block v-if="!ontouch">
|
||||||
<canvas
|
<canvas :id="cid" :canvasId="cid" :width="cWidth * pixel" :height="cHeight * pixel"
|
||||||
:id="cid"
|
|
||||||
:canvasId="cid"
|
|
||||||
:width="cWidth * pixel"
|
|
||||||
:height="cHeight * pixel"
|
|
||||||
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
||||||
:disable-scroll="disScroll"
|
:disable-scroll="disScroll" @tap="_tap" @error="_error" v-show="showchart" />
|
||||||
@tap="_tap"
|
|
||||||
@error="_error"
|
|
||||||
v-show="showchart"
|
|
||||||
/>
|
|
||||||
</block>
|
</block>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- 其他小程序通过vue渲染图表 -->
|
<!-- 其他小程序通过vue渲染图表 -->
|
||||||
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-KUAISHOU || MP-LARK || MP-JD || MP-360 -->
|
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-KUAISHOU || MP-LARK || MP-JD || MP-360 -->
|
||||||
<block v-if="type2d">
|
<block v-if="type2d">
|
||||||
<view v-if="ontouch" @tap="_tap">
|
<view v-if="ontouch" @tap="_tap">
|
||||||
<canvas
|
<canvas :id="cid" :canvasId="cid"
|
||||||
:id="cid"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" type="2d"
|
||||||
:canvasId="cid"
|
:disable-scroll="disScroll" @touchstart="_touchStart" @touchmove="_touchMove" @touchend="_touchEnd"
|
||||||
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
@error="_error" v-show="showchart" />
|
||||||
type="2d"
|
|
||||||
:disable-scroll="disScroll"
|
|
||||||
@touchstart="_touchStart"
|
|
||||||
@touchmove="_touchMove"
|
|
||||||
@touchend="_touchEnd"
|
|
||||||
@error="_error"
|
|
||||||
v-show="showchart"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!ontouch" @tap="_tap">
|
<view v-if="!ontouch" @tap="_tap">
|
||||||
<canvas
|
<canvas :id="cid" :canvasId="cid"
|
||||||
:id="cid"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" type="2d"
|
||||||
:canvasId="cid"
|
:disable-scroll="disScroll" @error="_error" v-show="showchart" />
|
||||||
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
|
||||||
type="2d"
|
|
||||||
:disable-scroll="disScroll"
|
|
||||||
@error="_error"
|
|
||||||
v-show="showchart"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-if="!type2d">
|
<block v-if="!type2d">
|
||||||
<view v-if="ontouch" @tap="_tap">
|
<view v-if="ontouch" @tap="_tap">
|
||||||
<canvas
|
<canvas :id="cid" :canvasId="cid"
|
||||||
:id="cid"
|
|
||||||
:canvasId="cid"
|
|
||||||
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
||||||
@touchstart="_touchStart"
|
@touchstart="_touchStart" @touchmove="_touchMove" @touchend="_touchEnd" :disable-scroll="disScroll"
|
||||||
@touchmove="_touchMove"
|
@error="_error" v-if="showchart" />
|
||||||
@touchend="_touchEnd"
|
|
||||||
:disable-scroll="disScroll"
|
|
||||||
@error="_error"
|
|
||||||
v-if="showchart"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!ontouch">
|
<view v-if="!ontouch">
|
||||||
<canvas
|
<canvas :id="cid" :canvasId="cid"
|
||||||
:id="cid"
|
|
||||||
:canvasId="cid"
|
|
||||||
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
|
||||||
:disable-scroll="disScroll"
|
:disable-scroll="disScroll" @tap="_tap" @error="_error" v-if="showchart" />
|
||||||
@tap="_tap"
|
|
||||||
@error="_error"
|
|
||||||
v-if="showchart"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
@ -166,7 +100,9 @@ function deepCloneAssign(origin = {}, ...args) {
|
||||||
for (let i in args) {
|
for (let i in args) {
|
||||||
for (let key in args[i]) {
|
for (let key in args[i]) {
|
||||||
if (args[i].hasOwnProperty(key)) {
|
if (args[i].hasOwnProperty(key)) {
|
||||||
origin[key] = args[i][key] && typeof args[i][key] === 'object' ? deepCloneAssign(Array.isArray(args[i][key]) ? [] : {}, origin[key], args[i][key]) : args[i][key];
|
origin[key] = args[i][key] && typeof args[i][key] === 'object' ? deepCloneAssign(Array.isArray(args[i][
|
||||||
|
key
|
||||||
|
]) ? [] : {}, origin[key], args[i][key]) : args[i][key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -247,7 +183,7 @@ export default {
|
||||||
},
|
},
|
||||||
background: {
|
background: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'none'
|
default: 'rgba(0,0,0,0)'
|
||||||
},
|
},
|
||||||
animation: {
|
animation: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -387,6 +323,14 @@ export default {
|
||||||
default () {
|
default () {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
Height: {
|
||||||
|
type: Number,
|
||||||
|
default: 340
|
||||||
|
},
|
||||||
|
Width: {
|
||||||
|
type: Number,
|
||||||
|
default: 340
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -403,8 +347,8 @@ export default {
|
||||||
disScroll: false,
|
disScroll: false,
|
||||||
openmouse: false,
|
openmouse: false,
|
||||||
pixel: 1,
|
pixel: 1,
|
||||||
cWidth: 375,
|
cWidth: 340,
|
||||||
cHeight: 250,
|
cHeight: 240,
|
||||||
showchart: false,
|
showchart: false,
|
||||||
echarts: false,
|
echarts: false,
|
||||||
echartsResize: {
|
echartsResize: {
|
||||||
|
|
@ -460,6 +404,7 @@ export default {
|
||||||
this.disScroll = this.disableScroll;
|
this.disScroll = this.disableScroll;
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
let that = this
|
||||||
// #ifdef APP-VUE
|
// #ifdef APP-VUE
|
||||||
this.inApp = true;
|
this.inApp = true;
|
||||||
if (this.echartsApp === true) {
|
if (this.echartsApp === true) {
|
||||||
|
|
@ -481,6 +426,8 @@ export default {
|
||||||
this.echarts = true;
|
this.echarts = true;
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
this.cWidth = this.Width ? this.Width : this.cWidth;
|
||||||
|
this.cHeight = this.Height ? this.Height : this.cHeight;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.beforeInit();
|
this.beforeInit();
|
||||||
})
|
})
|
||||||
|
|
@ -560,7 +507,8 @@ export default {
|
||||||
optsProps: {
|
optsProps: {
|
||||||
handler(val, oldval) {
|
handler(val, oldval) {
|
||||||
if (typeof val === 'object') {
|
if (typeof val === 'object') {
|
||||||
if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === false && this.optsWatch == true) {
|
if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === false && this.optsWatch ==
|
||||||
|
true) {
|
||||||
this.checkData(this.drawData);
|
this.checkData(this.drawData);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -606,7 +554,15 @@ export default {
|
||||||
},
|
},
|
||||||
mixinDatacomErrorMessage(val, oldval) {
|
mixinDatacomErrorMessage(val, oldval) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.emitMsg({name: 'error', params: {type:"error", errorShow: this.errorShow, msg: val, id: this.cid}});
|
this.emitMsg({
|
||||||
|
name: 'error',
|
||||||
|
params: {
|
||||||
|
type: "error",
|
||||||
|
errorShow: this.errorShow,
|
||||||
|
msg: val,
|
||||||
|
id: this.cid
|
||||||
|
}
|
||||||
|
});
|
||||||
if (this.errorShow) {
|
if (this.errorShow) {
|
||||||
console.log('[秋云图表组件]' + val);
|
console.log('[秋云图表组件]' + val);
|
||||||
}
|
}
|
||||||
|
|
@ -638,7 +594,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
beforeInit() {
|
beforeInit() {
|
||||||
this.mixinDatacomErrorMessage = null;
|
this.mixinDatacomErrorMessage = null;
|
||||||
if (typeof this.chartData === 'object' && this.chartData != null && this.chartData.series !== undefined && this.chartData.series.length > 0) {
|
if (typeof this.chartData === 'object' && this.chartData != null && this.chartData.series !== undefined &&
|
||||||
|
this.chartData.series.length > 0) {
|
||||||
//拷贝一下chartData,为了opts变更后统一数据来源
|
//拷贝一下chartData,为了opts变更后统一数据来源
|
||||||
this.drawData = deepCloneAssign({}, this.chartData);
|
this.drawData = deepCloneAssign({}, this.chartData);
|
||||||
this.mixinDatacomLoading = false;
|
this.mixinDatacomLoading = false;
|
||||||
|
|
@ -676,7 +633,10 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let needCategories = false;
|
let needCategories = false;
|
||||||
let tmpData = {categories:[], series:[]}
|
let tmpData = {
|
||||||
|
categories: [],
|
||||||
|
series: []
|
||||||
|
}
|
||||||
let tmpcategories = []
|
let tmpcategories = []
|
||||||
let tmpseries = [];
|
let tmpseries = [];
|
||||||
//拼接categories
|
//拼接categories
|
||||||
|
|
@ -716,13 +676,19 @@ export default {
|
||||||
let tempskey = {};
|
let tempskey = {};
|
||||||
resdata.map(function(item, index) {
|
resdata.map(function(item, index) {
|
||||||
if (item.group != undefined && !tempskey[item.group]) {
|
if (item.group != undefined && !tempskey[item.group]) {
|
||||||
tmpseries.push({ name: item.group, data: [] });
|
tmpseries.push({
|
||||||
|
name: item.group,
|
||||||
|
data: []
|
||||||
|
});
|
||||||
tempskey[item.group] = true;
|
tempskey[item.group] = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//如果没有获取到分组名称(可能是带categories的数据,也可能是不带的饼图类)
|
//如果没有获取到分组名称(可能是带categories的数据,也可能是不带的饼图类)
|
||||||
if (tmpseries.length == 0) {
|
if (tmpseries.length == 0) {
|
||||||
tmpseries = [{ name: '默认分组', data: [] }];
|
tmpseries = [{
|
||||||
|
name: '默认分组',
|
||||||
|
data: []
|
||||||
|
}];
|
||||||
//如果是需要categories的图表类型
|
//如果是需要categories的图表类型
|
||||||
if (needCategories === true) {
|
if (needCategories === true) {
|
||||||
for (let j = 0; j < tmpcategories.length; j++) {
|
for (let j = 0; j < tmpcategories.length; j++) {
|
||||||
|
|
@ -737,7 +703,10 @@ export default {
|
||||||
//如果是饼图类的图表类型
|
//如果是饼图类的图表类型
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < resdata.length; i++) {
|
for (let i = 0; i < resdata.length; i++) {
|
||||||
tmpseries[0].data.push({"name": resdata[i].text,"value": resdata[i].value});
|
tmpseries[0].data.push({
|
||||||
|
"name": resdata[i].text,
|
||||||
|
"value": resdata[i].value
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//如果有分组名
|
//如果有分组名
|
||||||
|
|
@ -889,7 +858,8 @@ export default {
|
||||||
this.cWidth = data.width;
|
this.cWidth = data.width;
|
||||||
this.cHeight = data.height;
|
this.cHeight = data.height;
|
||||||
if (this.echarts !== true) {
|
if (this.echarts !== true) {
|
||||||
cfu.option[cid].background = this.background == 'rgba(0,0,0,0)' ? '#FFFFFF' : this.background;
|
cfu.option[cid].background = this.background == 'rgba(0,0,0,0)' ? '#FFFFFF' : this
|
||||||
|
.background;
|
||||||
cfu.option[cid].canvas2d = this.type2d;
|
cfu.option[cid].canvas2d = this.type2d;
|
||||||
cfu.option[cid].pixelRatio = this.pixel;
|
cfu.option[cid].pixelRatio = this.pixel;
|
||||||
cfu.option[cid].animation = this.animation;
|
cfu.option[cid].animation = this.animation;
|
||||||
|
|
@ -932,14 +902,18 @@ export default {
|
||||||
const query = uni.createSelectorQuery().in(this)
|
const query = uni.createSelectorQuery().in(this)
|
||||||
query
|
query
|
||||||
.select('#' + cid)
|
.select('#' + cid)
|
||||||
.fields({ node: true, size: true })
|
.fields({
|
||||||
|
node: true,
|
||||||
|
size: true
|
||||||
|
})
|
||||||
.exec(res => {
|
.exec(res => {
|
||||||
if (res[0]) {
|
if (res[0]) {
|
||||||
const canvas = res[0].node;
|
const canvas = res[0].node;
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
cfu.option[cid].context = ctx;
|
cfu.option[cid].context = ctx;
|
||||||
cfu.option[cid].rotateLock = cfu.option[cid].rotate;
|
cfu.option[cid].rotateLock = cfu.option[cid].rotate;
|
||||||
if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){
|
if (cfu.instance[cid] && cfu.option[cid] && cfu.option[
|
||||||
|
cid].update === true) {
|
||||||
this._updataUChart(cid)
|
this._updataUChart(cid)
|
||||||
} else {
|
} else {
|
||||||
canvas.width = data.width * this.pixel;
|
canvas.width = data.width * this.pixel;
|
||||||
|
|
@ -954,7 +928,8 @@ export default {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.showchart = false;
|
this.showchart = false;
|
||||||
this.mixinDatacomErrorMessage = '参数错误:开启2d模式后,未获取到dom节点,canvas-id:' + cid;
|
this.mixinDatacomErrorMessage =
|
||||||
|
'参数错误:开启2d模式后,未获取到dom节点,canvas-id:' + cid;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -962,7 +937,8 @@ export default {
|
||||||
cfu.option[cid].rotateLock = cfu.option[cid].rotate;
|
cfu.option[cid].rotateLock = cfu.option[cid].rotate;
|
||||||
}
|
}
|
||||||
cfu.option[cid].context = uni.createCanvasContext(cid, this);
|
cfu.option[cid].context = uni.createCanvasContext(cid, this);
|
||||||
if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){
|
if (cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update ===
|
||||||
|
true) {
|
||||||
this._updataUChart(cid)
|
this._updataUChart(cid)
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -1014,18 +990,33 @@ export default {
|
||||||
uni.canvasToTempFilePath({
|
uni.canvasToTempFilePath({
|
||||||
canvasId: this.cid,
|
canvasId: this.cid,
|
||||||
success: res => {
|
success: res => {
|
||||||
this.emitMsg({name: 'getImage', params: {type:"getImage", base64: res.tempFilePath}});
|
this.emitMsg({
|
||||||
|
name: 'getImage',
|
||||||
|
params: {
|
||||||
|
type: "getImage",
|
||||||
|
base64: res.tempFilePath
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
} else {
|
} else {
|
||||||
const query = uni.createSelectorQuery().in(this)
|
const query = uni.createSelectorQuery().in(this)
|
||||||
query
|
query
|
||||||
.select('#' + this.cid)
|
.select('#' + this.cid)
|
||||||
.fields({ node: true, size: true })
|
.fields({
|
||||||
|
node: true,
|
||||||
|
size: true
|
||||||
|
})
|
||||||
.exec(res => {
|
.exec(res => {
|
||||||
if (res[0]) {
|
if (res[0]) {
|
||||||
const canvas = res[0].node;
|
const canvas = res[0].node;
|
||||||
this.emitMsg({name: 'getImage', params: {type:"getImage", base64: canvas.toDataURL('image/png')}});
|
this.emitMsg({
|
||||||
|
name: 'getImage',
|
||||||
|
params: {
|
||||||
|
type: "getImage",
|
||||||
|
base64: canvas.toDataURL('image/png')
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1038,14 +1029,38 @@ export default {
|
||||||
this.showchart = true;
|
this.showchart = true;
|
||||||
cfu.instance[cid] = new uCharts(cfu.option[cid]);
|
cfu.instance[cid] = new uCharts(cfu.option[cid]);
|
||||||
cfu.instance[cid].addEventListener('renderComplete', () => {
|
cfu.instance[cid].addEventListener('renderComplete', () => {
|
||||||
this.emitMsg({name: 'complete', params: {type:"complete", complete: true, id: cid, opts: cfu.instance[cid].opts}});
|
this.emitMsg({
|
||||||
|
name: 'complete',
|
||||||
|
params: {
|
||||||
|
type: "complete",
|
||||||
|
complete: true,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
});
|
||||||
cfu.instance[cid].delEventListener('renderComplete')
|
cfu.instance[cid].delEventListener('renderComplete')
|
||||||
});
|
});
|
||||||
cfu.instance[cid].addEventListener('scrollLeft', () => {
|
cfu.instance[cid].addEventListener('scrollLeft', () => {
|
||||||
this.emitMsg({name: 'scrollLeft', params: {type:"scrollLeft", scrollLeft: true, id: cid, opts: cfu.instance[cid].opts}});
|
this.emitMsg({
|
||||||
|
name: 'scrollLeft',
|
||||||
|
params: {
|
||||||
|
type: "scrollLeft",
|
||||||
|
scrollLeft: true,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
cfu.instance[cid].addEventListener('scrollRight', () => {
|
cfu.instance[cid].addEventListener('scrollRight', () => {
|
||||||
this.emitMsg({name: 'scrollRight', params: {type:"scrollRight", scrollRight: true, id: cid, opts: cfu.instance[cid].opts}});
|
this.emitMsg({
|
||||||
|
name: 'scrollRight',
|
||||||
|
params: {
|
||||||
|
type: "scrollRight",
|
||||||
|
scrollRight: true,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
_updataUChart(cid) {
|
_updataUChart(cid) {
|
||||||
|
|
@ -1072,15 +1087,20 @@ export default {
|
||||||
if (tc && tc !== undefined && tc !== null) {
|
if (tc && tc !== undefined && tc !== null) {
|
||||||
let offset = undefined;
|
let offset = undefined;
|
||||||
if (tc.x >= 0 && tc.y >= 0) {
|
if (tc.x >= 0 && tc.y >= 0) {
|
||||||
offset = { x: tc.x, y: tc.y + 10 };
|
offset = {
|
||||||
|
x: tc.x,
|
||||||
|
y: tc.y + 10
|
||||||
|
};
|
||||||
}
|
}
|
||||||
cfu.instance[cid].showToolTip(e, {
|
cfu.instance[cid].showToolTip(e, {
|
||||||
index: tc.index,
|
index: tc.index,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
textList: tc.textList,
|
textList: tc.textList,
|
||||||
formatter: (item, category, index, opts) => {
|
formatter: (item, category, index, opts) => {
|
||||||
if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) {
|
if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[
|
||||||
return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts);
|
cid].tooltipFormat]) {
|
||||||
|
return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index,
|
||||||
|
opts);
|
||||||
} else {
|
} else {
|
||||||
return this._tooltipDefault(item, category, index, opts);
|
return this._tooltipDefault(item, category, index, opts);
|
||||||
}
|
}
|
||||||
|
|
@ -1089,8 +1109,10 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
cfu.instance[cid].showToolTip(e, {
|
cfu.instance[cid].showToolTip(e, {
|
||||||
formatter: (item, category, index, opts) => {
|
formatter: (item, category, index, opts) => {
|
||||||
if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) {
|
if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[
|
||||||
return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts);
|
cid].tooltipFormat]) {
|
||||||
|
return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index,
|
||||||
|
opts);
|
||||||
} else {
|
} else {
|
||||||
return this._tooltipDefault(item, category, index, opts);
|
return this._tooltipDefault(item, category, index, opts);
|
||||||
}
|
}
|
||||||
|
|
@ -1115,9 +1137,15 @@ export default {
|
||||||
.boundingClientRect(data => {
|
.boundingClientRect(data => {
|
||||||
e.changedTouches = [];
|
e.changedTouches = [];
|
||||||
if (this.inAli) {
|
if (this.inAli) {
|
||||||
e.changedTouches.unshift({ x: e.detail.clientX - data.left, y: e.detail.clientY - data.top});
|
e.changedTouches.unshift({
|
||||||
|
x: e.detail.clientX - data.left,
|
||||||
|
y: e.detail.clientY - data.top
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
e.changedTouches.unshift({ x: e.detail.x - data.left, y: e.detail.y - data.top - this.pageScrollTop});
|
e.changedTouches.unshift({
|
||||||
|
x: e.detail.x - data.left,
|
||||||
|
y: e.detail.y - data.top - this.pageScrollTop
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (move) {
|
if (move) {
|
||||||
if (this.tooltipShow === true) {
|
if (this.tooltipShow === true) {
|
||||||
|
|
@ -1132,7 +1160,20 @@ export default {
|
||||||
if (this.tooltipShow === true) {
|
if (this.tooltipShow === true) {
|
||||||
this._showTooltip(e);
|
this._showTooltip(e);
|
||||||
}
|
}
|
||||||
this.emitMsg({name: 'getIndex', params: { type:"getIndex", event:{ x: e.detail.x - data.left, y: e.detail.y - data.top }, currentIndex: currentIndex, legendIndex: legendIndex, id: cid, opts: cfu.instance[cid].opts}});
|
this.emitMsg({
|
||||||
|
name: 'getIndex',
|
||||||
|
params: {
|
||||||
|
type: "getIndex",
|
||||||
|
event: {
|
||||||
|
x: e.detail.x - data.left,
|
||||||
|
y: e.detail.y - data.top
|
||||||
|
},
|
||||||
|
currentIndex: currentIndex,
|
||||||
|
legendIndex: legendIndex,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.exec();
|
.exec();
|
||||||
|
|
@ -1143,7 +1184,10 @@ export default {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e.changedTouches = [];
|
e.changedTouches = [];
|
||||||
e.changedTouches.unshift({ x: e.detail.x - e.currentTarget.offsetLeft, y: e.detail.y - e.currentTarget.offsetTop });
|
e.changedTouches.unshift({
|
||||||
|
x: e.detail.x - e.currentTarget.offsetLeft,
|
||||||
|
y: e.detail.y - e.currentTarget.offsetTop
|
||||||
|
});
|
||||||
currentIndex = cfu.instance[cid].getCurrentDataIndex(e);
|
currentIndex = cfu.instance[cid].getCurrentDataIndex(e);
|
||||||
legendIndex = cfu.instance[cid].getLegendDataIndex(e);
|
legendIndex = cfu.instance[cid].getLegendDataIndex(e);
|
||||||
if (this.tapLegend === true) {
|
if (this.tapLegend === true) {
|
||||||
|
|
@ -1152,7 +1196,20 @@ export default {
|
||||||
if (this.tooltipShow === true) {
|
if (this.tooltipShow === true) {
|
||||||
this._showTooltip(e);
|
this._showTooltip(e);
|
||||||
}
|
}
|
||||||
this.emitMsg({name: 'getIndex', params: {type:"getIndex", event:{ x: e.detail.x, y: e.detail.y - e.currentTarget.offsetTop }, currentIndex: currentIndex, legendIndex: legendIndex, id: cid, opts: cfu.instance[cid].opts}});
|
this.emitMsg({
|
||||||
|
name: 'getIndex',
|
||||||
|
params: {
|
||||||
|
type: "getIndex",
|
||||||
|
event: {
|
||||||
|
x: e.detail.x,
|
||||||
|
y: e.detail.y - e.currentTarget.offsetTop
|
||||||
|
},
|
||||||
|
currentIndex: currentIndex,
|
||||||
|
legendIndex: legendIndex,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -1162,7 +1219,15 @@ export default {
|
||||||
if (cfu.option[cid].enableScroll === true && e.touches.length == 1) {
|
if (cfu.option[cid].enableScroll === true && e.touches.length == 1) {
|
||||||
cfu.instance[cid].scrollStart(e);
|
cfu.instance[cid].scrollStart(e);
|
||||||
}
|
}
|
||||||
this.emitMsg({name:'getTouchStart', params:{type:"touchStart", event:e.changedTouches[0], id:cid, opts: cfu.instance[cid].opts}});
|
this.emitMsg({
|
||||||
|
name: 'getTouchStart',
|
||||||
|
params: {
|
||||||
|
type: "touchStart",
|
||||||
|
event: e.changedTouches[0],
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
_touchMove(e) {
|
_touchMove(e) {
|
||||||
let cid = this.cid
|
let cid = this.cid
|
||||||
|
|
@ -1177,17 +1242,34 @@ export default {
|
||||||
if (this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true) {
|
if (this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true) {
|
||||||
this._tap(e, true)
|
this._tap(e, true)
|
||||||
}
|
}
|
||||||
if(this.ontouch === true && cfu.option[cid].enableScroll === true && this.onzoom === true && e.changedTouches.length == 2){
|
if (this.ontouch === true && cfu.option[cid].enableScroll === true && this.onzoom === true && e
|
||||||
|
.changedTouches.length == 2) {
|
||||||
cfu.instance[cid].dobuleZoom(e);
|
cfu.instance[cid].dobuleZoom(e);
|
||||||
}
|
}
|
||||||
this.emitMsg({name: 'getTouchMove', params: {type:"touchMove", event:e.changedTouches[0], id: cid, opts: cfu.instance[cid].opts}});
|
this.emitMsg({
|
||||||
|
name: 'getTouchMove',
|
||||||
|
params: {
|
||||||
|
type: "touchMove",
|
||||||
|
event: e.changedTouches[0],
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
_touchEnd(e) {
|
_touchEnd(e) {
|
||||||
let cid = this.cid
|
let cid = this.cid
|
||||||
if (cfu.option[cid].enableScroll === true && e.touches.length == 0) {
|
if (cfu.option[cid].enableScroll === true && e.touches.length == 0) {
|
||||||
cfu.instance[cid].scrollEnd(e);
|
cfu.instance[cid].scrollEnd(e);
|
||||||
}
|
}
|
||||||
this.emitMsg({name:'getTouchEnd', params:{type:"touchEnd", event:e.changedTouches[0], id:cid, opts: cfu.instance[cid].opts}});
|
this.emitMsg({
|
||||||
|
name: 'getTouchEnd',
|
||||||
|
params: {
|
||||||
|
type: "touchEnd",
|
||||||
|
event: e.changedTouches[0],
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
});
|
||||||
if (this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true) {
|
if (this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true) {
|
||||||
this._tap(e, true)
|
this._tap(e, true)
|
||||||
}
|
}
|
||||||
|
|
@ -1225,7 +1307,8 @@ function rddeepCloneAssign(origin = {}, ...args) {
|
||||||
for (let i in args) {
|
for (let i in args) {
|
||||||
for (let key in args[i]) {
|
for (let key in args[i]) {
|
||||||
if (args[i].hasOwnProperty(key)) {
|
if (args[i].hasOwnProperty(key)) {
|
||||||
origin[key] = args[i][key] && typeof args[i][key] === 'object' ? rddeepCloneAssign(Array.isArray(args[i][key]) ? [] : {}, origin[key], args[i][key]) : args[i][key];
|
origin[key] = args[i][key] && typeof args[i][key] === 'object' ? rddeepCloneAssign(Array.isArray(args[
|
||||||
|
i][key]) ? [] : {}, origin[key], args[i][key]) : args[i][key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1250,13 +1333,19 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
rootdom = {top:0,left:0}
|
rootdom = {
|
||||||
|
top: 0,
|
||||||
|
left: 0
|
||||||
|
}
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
let dm = document.querySelectorAll('uni-main')[0]
|
let dm = document.querySelectorAll('uni-main')[0]
|
||||||
if (dm === undefined) {
|
if (dm === undefined) {
|
||||||
dm = document.querySelectorAll('uni-page-wrapper')[0]
|
dm = document.querySelectorAll('uni-page-wrapper')[0]
|
||||||
}
|
}
|
||||||
rootdom = {top:dm.offsetTop,left:dm.offsetLeft}
|
rootdom = {
|
||||||
|
top: dm.offsetTop,
|
||||||
|
left: dm.offsetLeft
|
||||||
|
}
|
||||||
// #endif
|
// #endif
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.rid === null) {
|
if (this.rid === null) {
|
||||||
|
|
@ -1295,7 +1384,8 @@ export default {
|
||||||
}
|
}
|
||||||
cfe.option[cid].series = []
|
cfe.option[cid].series = []
|
||||||
for (var i = 0; i < newData.series.length; i++) {
|
for (var i = 0; i < newData.series.length; i++) {
|
||||||
cfe.option[cid].seriesTemplate = cfe.option[cid].seriesTemplate ? cfe.option[cid].seriesTemplate : {}
|
cfe.option[cid].seriesTemplate = cfe.option[cid].seriesTemplate ? cfe.option[cid].seriesTemplate :
|
||||||
|
{}
|
||||||
let Template = rddeepCloneAssign({}, cfe.option[cid].seriesTemplate, newData.series[i])
|
let Template = rddeepCloneAssign({}, cfe.option[cid].seriesTemplate, newData.series[i])
|
||||||
cfe.option[cid].series.push(Template)
|
cfe.option[cid].series.push(Template)
|
||||||
}
|
}
|
||||||
|
|
@ -1330,13 +1420,31 @@ export default {
|
||||||
if (cfe.option[cid].ontap === true) {
|
if (cfe.option[cid].ontap === true) {
|
||||||
cfe.instance[cid].on('click', resdata => {
|
cfe.instance[cid].on('click', resdata => {
|
||||||
let event = JSON.parse(JSON.stringify({
|
let event = JSON.parse(JSON.stringify({
|
||||||
x:resdata.event.offsetX,y:resdata.event.offsetY
|
x: resdata.event.offsetX,
|
||||||
|
y: resdata.event.offsetY
|
||||||
}))
|
}))
|
||||||
that[cid].callMethod('emitMsg',{name:"getIndex", params:{type:"getIndex", event:event, currentIndex:resdata.dataIndex, value:resdata.data, seriesName: resdata.seriesName,id:cid}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getIndex",
|
||||||
|
params: {
|
||||||
|
type: "getIndex",
|
||||||
|
event: event,
|
||||||
|
currentIndex: resdata.dataIndex,
|
||||||
|
value: resdata.data,
|
||||||
|
seriesName: resdata.seriesName,
|
||||||
|
id: cid
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
// 增加ECharts的highlight消息,实现按下移动返回索引功能。add by onefish 创建于 2021-12-11 09:50
|
// 增加ECharts的highlight消息,实现按下移动返回索引功能。add by onefish 创建于 2021-12-11 09:50
|
||||||
cfe.instance[cid].on('highlight', resdata => {
|
cfe.instance[cid].on('highlight', resdata => {
|
||||||
that[cid].callMethod('emitMsg',{name:"getHighlight", params:{type:"highlight", res:resdata, id:cid}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getHighlight",
|
||||||
|
params: {
|
||||||
|
type: "highlight",
|
||||||
|
res: resdata,
|
||||||
|
id: cid
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.updataEChart(cid, cfe.option[cid])
|
this.updataEChart(cid, cfe.option[cid])
|
||||||
|
|
@ -1352,7 +1460,8 @@ export default {
|
||||||
option.tooltip.position = this.tooltipPosition()
|
option.tooltip.position = this.tooltipPosition()
|
||||||
//tooltipFormat方法,替换组件的tooltipFormat为config-echarts.js内对应的方法
|
//tooltipFormat方法,替换组件的tooltipFormat为config-echarts.js内对应的方法
|
||||||
if (typeof option.tooltipFormat === 'string' && cfe.formatter[option.tooltipFormat]) {
|
if (typeof option.tooltipFormat === 'string' && cfe.formatter[option.tooltipFormat]) {
|
||||||
option.tooltip.formatter = option.tooltip.formatter ? option.tooltip.formatter : cfe.formatter[option.tooltipFormat]
|
option.tooltip.formatter = option.tooltip.formatter ? option.tooltip.formatter : cfe.formatter[
|
||||||
|
option.tooltipFormat]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 颜色渐变添加的方法
|
// 颜色渐变添加的方法
|
||||||
|
|
@ -1360,13 +1469,21 @@ export default {
|
||||||
for (let i in option.series) {
|
for (let i in option.series) {
|
||||||
let linearGradient = option.series[i].linearGradient
|
let linearGradient = option.series[i].linearGradient
|
||||||
if (linearGradient) {
|
if (linearGradient) {
|
||||||
option.series[i].color = new echarts.graphic.LinearGradient(linearGradient[0],linearGradient[1],linearGradient[2],linearGradient[3],linearGradient[4])
|
option.series[i].color = new echarts.graphic.LinearGradient(linearGradient[0], linearGradient[
|
||||||
|
1], linearGradient[2], linearGradient[3], linearGradient[4])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cfe.instance[cid].setOption(option, option.notMerge)
|
cfe.instance[cid].setOption(option, option.notMerge)
|
||||||
cfe.instance[cid].on('finished', function() {
|
cfe.instance[cid].on('finished', function() {
|
||||||
that[cid].callMethod('emitMsg',{name:"complete",params:{type:"complete",complete:true,id:cid}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "complete",
|
||||||
|
params: {
|
||||||
|
type: "complete",
|
||||||
|
complete: true,
|
||||||
|
id: cid
|
||||||
|
}
|
||||||
|
})
|
||||||
if (cfe.instance[cid]) {
|
if (cfe.instance[cid]) {
|
||||||
cfe.instance[cid].off('finished')
|
cfe.instance[cid].off('finished')
|
||||||
}
|
}
|
||||||
|
|
@ -1379,7 +1496,9 @@ export default {
|
||||||
Math.abs(that[cid].$el.children[0].clientWidth - cfe.instance[cid].getWidth()) > 3 ||
|
Math.abs(that[cid].$el.children[0].clientWidth - cfe.instance[cid].getWidth()) > 3 ||
|
||||||
Math.abs(that[cid].$el.children[0].clientHeight - cfe.instance[cid].getHeight()) > 3
|
Math.abs(that[cid].$el.children[0].clientHeight - cfe.instance[cid].getHeight()) > 3
|
||||||
)
|
)
|
||||||
){this.ecresize();}
|
) {
|
||||||
|
this.ecresize();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
tooltipPosition() {
|
tooltipPosition() {
|
||||||
return (point, params, dom, rect, size) => {
|
return (point, params, dom, rect, size) => {
|
||||||
|
|
@ -1431,14 +1550,38 @@ export default {
|
||||||
let cid = this.rid
|
let cid = this.rid
|
||||||
cfu.instance[cid] = new uChartsRD(cfu.option[cid])
|
cfu.instance[cid] = new uChartsRD(cfu.option[cid])
|
||||||
cfu.instance[cid].addEventListener('renderComplete', () => {
|
cfu.instance[cid].addEventListener('renderComplete', () => {
|
||||||
that[cid].callMethod('emitMsg',{name:"complete",params:{type:"complete",complete:true,id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "complete",
|
||||||
|
params: {
|
||||||
|
type: "complete",
|
||||||
|
complete: true,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
cfu.instance[cid].delEventListener('renderComplete')
|
cfu.instance[cid].delEventListener('renderComplete')
|
||||||
});
|
});
|
||||||
cfu.instance[cid].addEventListener('scrollLeft', () => {
|
cfu.instance[cid].addEventListener('scrollLeft', () => {
|
||||||
that[cid].callMethod('emitMsg',{name:"scrollLeft",params:{type:"scrollLeft",scrollLeft:true,id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "scrollLeft",
|
||||||
|
params: {
|
||||||
|
type: "scrollLeft",
|
||||||
|
scrollLeft: true,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
cfu.instance[cid].addEventListener('scrollRight', () => {
|
cfu.instance[cid].addEventListener('scrollRight', () => {
|
||||||
that[cid].callMethod('emitMsg',{name:"scrollRight",params:{type:"scrollRight",scrollRight:true,id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "scrollRight",
|
||||||
|
params: {
|
||||||
|
type: "scrollRight",
|
||||||
|
scrollRight: true,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updataUChart() {
|
updataUChart() {
|
||||||
|
|
@ -1465,15 +1608,20 @@ export default {
|
||||||
if (tc && tc !== undefined && tc !== null) {
|
if (tc && tc !== undefined && tc !== null) {
|
||||||
let offset = undefined;
|
let offset = undefined;
|
||||||
if (tc.x >= 0 && tc.y >= 0) {
|
if (tc.x >= 0 && tc.y >= 0) {
|
||||||
offset = { x: tc.x, y: tc.y + 10 };
|
offset = {
|
||||||
|
x: tc.x,
|
||||||
|
y: tc.y + 10
|
||||||
|
};
|
||||||
}
|
}
|
||||||
cfu.instance[cid].showToolTip(e, {
|
cfu.instance[cid].showToolTip(e, {
|
||||||
index: tc.index,
|
index: tc.index,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
textList: tc.textList,
|
textList: tc.textList,
|
||||||
formatter: (item, category, index, opts) => {
|
formatter: (item, category, index, opts) => {
|
||||||
if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) {
|
if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[
|
||||||
return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts);
|
cid].tooltipFormat]) {
|
||||||
|
return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index,
|
||||||
|
opts);
|
||||||
} else {
|
} else {
|
||||||
return this.tooltipDefault(item, category, index, opts);
|
return this.tooltipDefault(item, category, index, opts);
|
||||||
}
|
}
|
||||||
|
|
@ -1482,8 +1630,10 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
cfu.instance[cid].showToolTip(e, {
|
cfu.instance[cid].showToolTip(e, {
|
||||||
formatter: (item, category, index, opts) => {
|
formatter: (item, category, index, opts) => {
|
||||||
if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) {
|
if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[
|
||||||
return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts);
|
cid].tooltipFormat]) {
|
||||||
|
return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index,
|
||||||
|
opts);
|
||||||
} else {
|
} else {
|
||||||
return this.tooltipDefault(item, category, index, opts);
|
return this.tooltipDefault(item, category, index, opts);
|
||||||
}
|
}
|
||||||
|
|
@ -1502,9 +1652,15 @@ export default {
|
||||||
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
||||||
let tmpe = {}
|
let tmpe = {}
|
||||||
if (e.detail.x) { //tap或者click的事件
|
if (e.detail.x) { //tap或者click的事件
|
||||||
tmpe = { x: e.detail.x - rchartdom.left, y:e.detail.y - rchartdom.top + rootdom.top}
|
tmpe = {
|
||||||
|
x: e.detail.x - rchartdom.left,
|
||||||
|
y: e.detail.y - rchartdom.top + rootdom.top
|
||||||
|
}
|
||||||
} else { //mouse的事件
|
} else { //mouse的事件
|
||||||
tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top}
|
tmpe = {
|
||||||
|
x: e.clientX - rchartdom.left,
|
||||||
|
y: e.clientY - rchartdom.top + rootdom.top
|
||||||
|
}
|
||||||
}
|
}
|
||||||
e.changedTouches = [];
|
e.changedTouches = [];
|
||||||
e.changedTouches.unshift(tmpe)
|
e.changedTouches.unshift(tmpe)
|
||||||
|
|
@ -1516,7 +1672,17 @@ export default {
|
||||||
if (tooltipShow == true) {
|
if (tooltipShow == true) {
|
||||||
this.showTooltip(e, cid)
|
this.showTooltip(e, cid)
|
||||||
}
|
}
|
||||||
that[cid].callMethod('emitMsg',{name:"getIndex",params:{type:"getIndex",event:tmpe,currentIndex:currentIndex,legendIndex:legendIndex,id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getIndex",
|
||||||
|
params: {
|
||||||
|
type: "getIndex",
|
||||||
|
event: tmpe,
|
||||||
|
currentIndex: currentIndex,
|
||||||
|
legendIndex: legendIndex,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
touchStart(e) {
|
touchStart(e) {
|
||||||
let cid = this.rid
|
let cid = this.rid
|
||||||
|
|
@ -1525,7 +1691,15 @@ export default {
|
||||||
if (cfu.option[cid].enableScroll === true && e.touches.length == 1) {
|
if (cfu.option[cid].enableScroll === true && e.touches.length == 1) {
|
||||||
cfu.instance[cid].scrollStart(e);
|
cfu.instance[cid].scrollStart(e);
|
||||||
}
|
}
|
||||||
that[cid].callMethod('emitMsg',{name:"getTouchStart",params:{type:"touchStart",event:e.changedTouches[0],id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getTouchStart",
|
||||||
|
params: {
|
||||||
|
type: "touchStart",
|
||||||
|
event: e.changedTouches[0],
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
touchMove(e) {
|
touchMove(e) {
|
||||||
let cid = this.rid
|
let cid = this.rid
|
||||||
|
|
@ -1534,18 +1708,31 @@ export default {
|
||||||
if (cfu.option[cid].enableScroll === true && e.changedTouches.length == 1) {
|
if (cfu.option[cid].enableScroll === true && e.changedTouches.length == 1) {
|
||||||
cfu.instance[cid].scroll(e);
|
cfu.instance[cid].scroll(e);
|
||||||
}
|
}
|
||||||
if(cfu.option[cid].ontap === true && cfu.option[cid].enableScroll === false && cfu.option[cid].onmovetip === true){
|
if (cfu.option[cid].ontap === true && cfu.option[cid].enableScroll === false && cfu.option[cid]
|
||||||
|
.onmovetip === true) {
|
||||||
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
||||||
let tmpe = { x: e.changedTouches[0].clientX - rchartdom.left, y:e.changedTouches[0].clientY - rchartdom.top + rootdom.top}
|
let tmpe = {
|
||||||
|
x: e.changedTouches[0].clientX - rchartdom.left,
|
||||||
|
y: e.changedTouches[0].clientY - rchartdom.top + rootdom.top
|
||||||
|
}
|
||||||
e.changedTouches.unshift(tmpe)
|
e.changedTouches.unshift(tmpe)
|
||||||
if (cfu.option[cid].tooltipShow === true) {
|
if (cfu.option[cid].tooltipShow === true) {
|
||||||
this.showTooltip(e, cid)
|
this.showTooltip(e, cid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ontouch === true && cfu.option[cid].enableScroll === true && cfu.option[cid].onzoom === true && e.changedTouches.length == 2){
|
if (ontouch === true && cfu.option[cid].enableScroll === true && cfu.option[cid].onzoom === true && e
|
||||||
|
.changedTouches.length == 2) {
|
||||||
cfu.instance[cid].dobuleZoom(e);
|
cfu.instance[cid].dobuleZoom(e);
|
||||||
}
|
}
|
||||||
that[cid].callMethod('emitMsg',{name:"getTouchMove",params:{type:"touchMove",event:e.changedTouches[0],id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getTouchMove",
|
||||||
|
params: {
|
||||||
|
type: "touchMove",
|
||||||
|
event: e.changedTouches[0],
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
touchEnd(e) {
|
touchEnd(e) {
|
||||||
let cid = this.rid
|
let cid = this.rid
|
||||||
|
|
@ -1554,7 +1741,15 @@ export default {
|
||||||
if (cfu.option[cid].enableScroll === true && e.touches.length == 0) {
|
if (cfu.option[cid].enableScroll === true && e.touches.length == 0) {
|
||||||
cfu.instance[cid].scrollEnd(e);
|
cfu.instance[cid].scrollEnd(e);
|
||||||
}
|
}
|
||||||
that[cid].callMethod('emitMsg',{name:"getTouchEnd",params:{type:"touchEnd",event:e.changedTouches[0],id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getTouchEnd",
|
||||||
|
params: {
|
||||||
|
type: "touchEnd",
|
||||||
|
event: e.changedTouches[0],
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mouseDown(e) {
|
mouseDown(e) {
|
||||||
let cid = this.rid
|
let cid = this.rid
|
||||||
|
|
@ -1562,12 +1757,23 @@ export default {
|
||||||
if (onmouse == false) return;
|
if (onmouse == false) return;
|
||||||
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
||||||
let tmpe = {}
|
let tmpe = {}
|
||||||
tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top}
|
tmpe = {
|
||||||
|
x: e.clientX - rchartdom.left,
|
||||||
|
y: e.clientY - rchartdom.top + rootdom.top
|
||||||
|
}
|
||||||
e.changedTouches = [];
|
e.changedTouches = [];
|
||||||
e.changedTouches.unshift(tmpe)
|
e.changedTouches.unshift(tmpe)
|
||||||
cfu.instance[cid].scrollStart(e)
|
cfu.instance[cid].scrollStart(e)
|
||||||
cfu.option[cid].mousedown = true;
|
cfu.option[cid].mousedown = true;
|
||||||
that[cid].callMethod('emitMsg',{name:"getTouchStart",params:{type:"mouseDown",event:tmpe,id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getTouchStart",
|
||||||
|
params: {
|
||||||
|
type: "mouseDown",
|
||||||
|
event: tmpe,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mouseMove(e) {
|
mouseMove(e) {
|
||||||
let cid = this.rid
|
let cid = this.rid
|
||||||
|
|
@ -1576,12 +1782,23 @@ export default {
|
||||||
if (onmouse == false) return;
|
if (onmouse == false) return;
|
||||||
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
||||||
let tmpe = {}
|
let tmpe = {}
|
||||||
tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top}
|
tmpe = {
|
||||||
|
x: e.clientX - rchartdom.left,
|
||||||
|
y: e.clientY - rchartdom.top + rootdom.top
|
||||||
|
}
|
||||||
e.changedTouches = [];
|
e.changedTouches = [];
|
||||||
e.changedTouches.unshift(tmpe)
|
e.changedTouches.unshift(tmpe)
|
||||||
if (cfu.option[cid].mousedown) {
|
if (cfu.option[cid].mousedown) {
|
||||||
cfu.instance[cid].scroll(e)
|
cfu.instance[cid].scroll(e)
|
||||||
that[cid].callMethod('emitMsg',{name:"getTouchMove",params:{type:"mouseMove",event:tmpe,id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getTouchMove",
|
||||||
|
params: {
|
||||||
|
type: "mouseMove",
|
||||||
|
event: tmpe,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
} else if (cfu.instance[cid]) {
|
} else if (cfu.instance[cid]) {
|
||||||
if (tooltipShow == true) {
|
if (tooltipShow == true) {
|
||||||
this.showTooltip(e, cid)
|
this.showTooltip(e, cid)
|
||||||
|
|
@ -1594,12 +1811,23 @@ export default {
|
||||||
if (onmouse == false) return;
|
if (onmouse == false) return;
|
||||||
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
|
||||||
let tmpe = {}
|
let tmpe = {}
|
||||||
tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top}
|
tmpe = {
|
||||||
|
x: e.clientX - rchartdom.left,
|
||||||
|
y: e.clientY - rchartdom.top + rootdom.top
|
||||||
|
}
|
||||||
e.changedTouches = [];
|
e.changedTouches = [];
|
||||||
e.changedTouches.unshift(tmpe)
|
e.changedTouches.unshift(tmpe)
|
||||||
cfu.instance[cid].scrollEnd(e)
|
cfu.instance[cid].scrollEnd(e)
|
||||||
cfu.option[cid].mousedown = false;
|
cfu.option[cid].mousedown = false;
|
||||||
that[cid].callMethod('emitMsg',{name:"getTouchEnd",params:{type:"mouseUp",event:tmpe,id:cid, opts: cfu.instance[cid].opts}})
|
that[cid].callMethod('emitMsg', {
|
||||||
|
name: "getTouchEnd",
|
||||||
|
params: {
|
||||||
|
type: "mouseUp",
|
||||||
|
event: tmpe,
|
||||||
|
id: cid,
|
||||||
|
opts: cfu.instance[cid].opts
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,563 +16,407 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 通用配置项
|
||||||
|
|
||||||
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
||||||
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
||||||
|
|
||||||
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
|
const cfe = {
|
||||||
const formatDateTime = (timeStamp, returnType) => {
|
//demotype为自定义图表类型
|
||||||
var date = new Date();
|
"type": ["pie", "ring", "rose", "funnel", "line", "column", "area", "radar", "gauge","candle","demotype"],
|
||||||
date.setTime(timeStamp * 1000);
|
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型例如最后的"demotype"
|
||||||
var y = date.getFullYear();
|
"categories": ["line", "column", "area", "radar", "gauge", "candle","demotype"],
|
||||||
var m = date.getMonth() + 1;
|
//instance为实例变量承载属性,option为eopts承载属性,不要删除
|
||||||
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": {},
|
"instance": {},
|
||||||
//option为opts及eopts承载属性,不要删除
|
|
||||||
"option": {},
|
"option": {},
|
||||||
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
||||||
"formatter":{
|
"formatter":{
|
||||||
"yAxisDemo1": function(val) {
|
"tooltipDemo1":function(res){
|
||||||
return val + '元'
|
let result = ''
|
||||||
|
for (let i in res) {
|
||||||
|
if (i == 0) {
|
||||||
|
result += res[i].axisValueLabel + '年销售额'
|
||||||
|
}
|
||||||
|
let value = '--'
|
||||||
|
if (res[i].data !== null) {
|
||||||
|
value = res[i].data
|
||||||
|
}
|
||||||
|
// #ifdef H5
|
||||||
|
result += '\n' + res[i].seriesName + ':' + value + ' 万元'
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
result += '<br/>' + res[i].marker + res[i].seriesName + ':' + value + ' 万元'
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
return result;
|
||||||
},
|
},
|
||||||
"yAxisDemo2": function(val) {
|
legendFormat:function(name){
|
||||||
return val.toFixed(2)
|
return "自定义图例+"+name;
|
||||||
},
|
},
|
||||||
"xAxisDemo1": function(val) {
|
yAxisFormatDemo:function (value, index) {
|
||||||
return val + '年'
|
return value + '元';
|
||||||
},
|
},
|
||||||
"xAxisDemo2": function(val) {
|
seriesFormatDemo:function(res){
|
||||||
return formatDateTime(val, 'h:m')
|
return res.name + '年' + res.value + '元';
|
||||||
},
|
|
||||||
"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) {
|
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在eopts参数,会将demotype与eopts中option合并后渲染图表。
|
||||||
if (index !== undefined) {
|
|
||||||
return series[index].name + ':' + series[index].data + '元'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
|
|
||||||
"demotype":{
|
"demotype":{
|
||||||
//我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
|
|
||||||
"type": "line",
|
|
||||||
"color": color,
|
"color": color,
|
||||||
"padding": [15, 10, 0, 15],
|
//在这里填写echarts的option即可
|
||||||
"xAxis": {
|
|
||||||
"disableGrid": true,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"gridType": "dash",
|
|
||||||
"dashLength": 2,
|
|
||||||
},
|
|
||||||
"legend": {},
|
|
||||||
"extra": {
|
|
||||||
"line": {
|
|
||||||
"type": "curve",
|
|
||||||
"width": 2
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//下面是自定义配置,请添加项目所需的通用配置
|
//下面是自定义配置,请添加项目所需的通用配置
|
||||||
"pie": {
|
"column": {
|
||||||
"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,
|
|
||||||
"padding": [5, 5, 5, 5],
|
|
||||||
"rotate": false,
|
|
||||||
"dataLabel": true,
|
|
||||||
"legend": {
|
|
||||||
"show": true,
|
|
||||||
"position": "right",
|
|
||||||
"lineHeight": 25,
|
|
||||||
},
|
|
||||||
"title": {
|
|
||||||
"name": "收益率",
|
|
||||||
"fontSize": 15,
|
|
||||||
"color": "#666666"
|
|
||||||
},
|
|
||||||
"subtitle": {
|
|
||||||
"name": "70%",
|
|
||||||
"fontSize": 25,
|
|
||||||
"color": "#7cb5ec"
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"ring": {
|
|
||||||
"ringWidth": 30,
|
|
||||||
"activeOpacity": 0.5,
|
|
||||||
"activeRadius": 10,
|
|
||||||
"offsetAngle": 0,
|
|
||||||
"labelWidth": 15,
|
|
||||||
"border": true,
|
|
||||||
"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,
|
"color": color,
|
||||||
"title": {
|
"title": {
|
||||||
"name": "百分比",
|
"text": ''
|
||||||
"fontSize": 25,
|
|
||||||
"color": "#00FF00"
|
|
||||||
},
|
},
|
||||||
"subtitle": {
|
"tooltip": {
|
||||||
"name": "默认标题",
|
"trigger": 'axis'
|
||||||
"fontSize": 15,
|
|
||||||
"color": "#666666"
|
|
||||||
},
|
},
|
||||||
"extra": {
|
"grid": {
|
||||||
"arcbar": {
|
"top": 30,
|
||||||
"type": "default",
|
"bottom": 50,
|
||||||
"width": 12,
|
"right": 15,
|
||||||
"backgroundColor": "#E9E9E9",
|
"left": 40
|
||||||
"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": {
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"toolbox": {
|
||||||
"show": false,
|
"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": {
|
"xAxis": {
|
||||||
"labelCount": 4,
|
"type": 'category',
|
||||||
"itemCount": 40,
|
"axisLabel": {
|
||||||
"disableGrid": true,
|
"color": '#666666'
|
||||||
"gridColor": "#CCCCCC",
|
|
||||||
"gridType": "solid",
|
|
||||||
"dashLength": 4,
|
|
||||||
"scrollShow": true,
|
|
||||||
"scrollAlign": "left",
|
|
||||||
"scrollColor": "#A6A6A6",
|
|
||||||
"scrollBackgroundColor": "#EFEBEF"
|
|
||||||
},
|
},
|
||||||
"yAxis": {},
|
"axisLine": {
|
||||||
"legend": {},
|
"lineStyle": {
|
||||||
"extra": {
|
"color": '#CCCCCC'
|
||||||
"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": {
|
"boundaryGap": true,
|
||||||
"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": []
|
"data": []
|
||||||
},
|
},
|
||||||
"legend": {},
|
"yAxis": {
|
||||||
"extra": {
|
"type": 'value',
|
||||||
"mix": {
|
"axisTick": {
|
||||||
"column": {
|
"show": false,
|
||||||
"width": 20
|
},
|
||||||
|
"axisLabel": {
|
||||||
|
"color": '#666666'
|
||||||
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"scatter": {
|
"seriesTemplate": {
|
||||||
"type": "scatter",
|
"name": '',
|
||||||
|
"type": 'bar',
|
||||||
|
"data": [],
|
||||||
|
"barwidth": 20,
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"line": {
|
||||||
"color": color,
|
"color": color,
|
||||||
"padding": [15, 15, 0, 15],
|
"title": {
|
||||||
"dataLabel": false,
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'axis'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 30,
|
||||||
|
"bottom": 50,
|
||||||
|
"right": 15,
|
||||||
|
"left": 40
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"toolbox": {
|
||||||
|
"show": false,
|
||||||
|
},
|
||||||
"xAxis": {
|
"xAxis": {
|
||||||
"disableGrid": false,
|
"type": 'category',
|
||||||
"gridType": "dash",
|
"axisLabel": {
|
||||||
"splitNumber": 5,
|
"color": '#666666'
|
||||||
"boundaryGap": "justify",
|
},
|
||||||
"min": 0
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"boundaryGap": true,
|
||||||
|
"data": []
|
||||||
},
|
},
|
||||||
"yAxis": {
|
"yAxis": {
|
||||||
"disableGrid": false,
|
"type": 'value',
|
||||||
"gridType": "dash",
|
"axisTick": {
|
||||||
|
"show": false,
|
||||||
},
|
},
|
||||||
"legend": {},
|
"axisLabel": {
|
||||||
"extra": {
|
"color": '#666666'
|
||||||
"scatter": {},
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bubble": {
|
},
|
||||||
"type": "bubble",
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'line',
|
||||||
|
"data": [],
|
||||||
|
"barwidth": 20,
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"area": {
|
||||||
"color": color,
|
"color": color,
|
||||||
"padding": [15, 15, 0, 15],
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'axis'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 30,
|
||||||
|
"bottom": 50,
|
||||||
|
"right": 15,
|
||||||
|
"left": 40
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"toolbox": {
|
||||||
|
"show": false,
|
||||||
|
},
|
||||||
"xAxis": {
|
"xAxis": {
|
||||||
"disableGrid": false,
|
"type": 'category',
|
||||||
"gridType": "dash",
|
"axisLabel": {
|
||||||
"splitNumber": 5,
|
"color": '#666666'
|
||||||
"boundaryGap": "justify",
|
},
|
||||||
"min": 0,
|
"axisLine": {
|
||||||
"max": 250
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"boundaryGap": true,
|
||||||
|
"data": []
|
||||||
},
|
},
|
||||||
"yAxis": {
|
"yAxis": {
|
||||||
"disableGrid": false,
|
"type": 'value',
|
||||||
"gridType": "dash",
|
"axisTick": {
|
||||||
"data": [{
|
"show": false,
|
||||||
|
},
|
||||||
|
"axisLabel": {
|
||||||
|
"color": '#666666'
|
||||||
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'line',
|
||||||
|
"data": [],
|
||||||
|
"areaStyle": {},
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"pie": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'item'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 40,
|
||||||
|
"bottom": 30,
|
||||||
|
"right": 15,
|
||||||
|
"left": 15
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'pie',
|
||||||
|
"data": [],
|
||||||
|
"radius": '50%',
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"ring": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'item'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 40,
|
||||||
|
"bottom": 30,
|
||||||
|
"right": 15,
|
||||||
|
"left": 15
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'pie',
|
||||||
|
"data": [],
|
||||||
|
"radius": ['40%', '70%'],
|
||||||
|
"avoidLabelOverlap": false,
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
"labelLine": {
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"rose": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'item'
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"top": 'bottom'
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'pie',
|
||||||
|
"data": [],
|
||||||
|
"radius": "55%",
|
||||||
|
"center": ['50%', '50%'],
|
||||||
|
"roseType": 'area',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"funnel": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'item',
|
||||||
|
"formatter": "{b} : {c}%"
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"top": 'bottom'
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'funnel',
|
||||||
|
"left": '10%',
|
||||||
|
"top": 60,
|
||||||
|
"bottom": 60,
|
||||||
|
"width": '80%',
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 150
|
"max": 100,
|
||||||
}]
|
"minSize": '0%',
|
||||||
|
"maxSize": '100%',
|
||||||
|
"sort": 'descending',
|
||||||
|
"gap": 2,
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"position": 'inside'
|
||||||
},
|
},
|
||||||
"legend": {},
|
"labelLine": {
|
||||||
"extra": {
|
"length": 10,
|
||||||
"bubble": {
|
"lineStyle": {
|
||||||
"border": 2,
|
"width": 1,
|
||||||
"opacity": 0.5,
|
"type": 'solid'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"itemStyle": {
|
||||||
|
"bordercolor": '#fff',
|
||||||
|
"borderwidth": 1
|
||||||
|
},
|
||||||
|
"emphasis": {
|
||||||
|
"label": {
|
||||||
|
"fontSize": 20
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"data": [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"gauge": {
|
||||||
|
"color": color,
|
||||||
|
"tooltip": {
|
||||||
|
"formatter": '{a} <br/>{b} : {c}%'
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '业务指标',
|
||||||
|
"type": 'gauge',
|
||||||
|
"detail": {"formatter": '{value}%'},
|
||||||
|
"data": [{"value": 50, "name": '完成率'}]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"candle": {
|
||||||
|
"xAxis": {
|
||||||
|
"data": []
|
||||||
|
},
|
||||||
|
"yAxis": {},
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"dataZoom": [{
|
||||||
|
"type": 'inside',
|
||||||
|
"xAxisIndex": [0, 1],
|
||||||
|
"start": 10,
|
||||||
|
"end": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"show": true,
|
||||||
|
"xAxisIndex": [0, 1],
|
||||||
|
"type": 'slider',
|
||||||
|
"bottom": 10,
|
||||||
|
"start": 10,
|
||||||
|
"end": 100
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'k',
|
||||||
|
"data": [],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
export default cfe;
|
||||||
|
|
@ -237,13 +237,13 @@ const cfu = {
|
||||||
"color": color,
|
"color": color,
|
||||||
"title": {
|
"title": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"fontSize": 22,
|
"fontSize": 25,
|
||||||
"color": "#00FF00"
|
"color": ""
|
||||||
},
|
},
|
||||||
"subtitle": {
|
"subtitle": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"fontSize": 15,
|
"fontSize": 15,
|
||||||
"color": "#666666"
|
"color": ""
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"arcbar": {
|
"arcbar": {
|
||||||
|
|
@ -340,17 +340,27 @@ const cfu = {
|
||||||
"gridType": "dash",
|
"gridType": "dash",
|
||||||
"disableGrid": true,
|
"disableGrid": true,
|
||||||
"gridColor": '#ffffff',
|
"gridColor": '#ffffff',
|
||||||
|
"data": [{
|
||||||
|
"tofix": 1,
|
||||||
|
"min": 0
|
||||||
|
}],
|
||||||
"data": [{
|
"data": [{
|
||||||
"min": 0
|
"min": 0
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
"legend": {},
|
||||||
"extra": {
|
"extra": {
|
||||||
"column": {
|
"column": {
|
||||||
"type": "group",
|
"type": "group",
|
||||||
"width": 30,
|
"width": 20,
|
||||||
|
"seriesGap": 5,
|
||||||
|
"meterFillColor": "#FFFFFF",
|
||||||
"activeBgColor": "#000000",
|
"activeBgColor": "#000000",
|
||||||
"activeBgOpacity": 0.08
|
"activeBgOpacity": 0.5,
|
||||||
|
"barBorderCircle": true,
|
||||||
|
"linearType": "opacity",
|
||||||
|
// "customColor": "#ff9f40",
|
||||||
|
"linearOpacity": 1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -400,7 +410,7 @@ const cfu = {
|
||||||
"area": {
|
"area": {
|
||||||
"type": "area",
|
"type": "area",
|
||||||
"color": color,
|
"color": color,
|
||||||
"padding": [15, 15, 0, 15],
|
"padding": [20, 15, 5, 10],
|
||||||
"xAxis": {
|
"xAxis": {
|
||||||
"disableGrid": true,
|
"disableGrid": true,
|
||||||
},
|
},
|
||||||
|
|
@ -421,8 +431,8 @@ const cfu = {
|
||||||
"type": "curve",
|
"type": "curve",
|
||||||
"opacity": 0.2,
|
"opacity": 0.2,
|
||||||
"addLine": true,
|
"addLine": true,
|
||||||
"width": 2,
|
"width": 1,
|
||||||
"gradient": false,
|
"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
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,aAAI,CAAC,C","file":"body/body.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './body/body.vue'\ncreatePage(Page)"],"sourceRoot":""}
|
||||||
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
1
unpackage/dist/dev/.sourcemap/mp-weixin/pageTwo/PublicCards/PublicCards.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pageTwo/PublicCards/PublicCards.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,oBAAI,CAAC,C","file":"pageTwo/PublicCards/PublicCards.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pageTwo/PublicCards/PublicCards.vue'\ncreatePage(Page)"],"sourceRoot":""}
|
||||||
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
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue