刘翔宇-旅管家 2 years ago
parent df5aafe988
commit 1840958156

@ -1,180 +0,0 @@
[!--temp.common_file--]
[!--temp.header--]
<!-- banner区域 -->
<div class="banner" style="background-image: url(<?=ReturnClassAddField(0,'banner')?>)"></div>
<!-- 二级导航 -->
<div class="menubox">
<div class="container clearfix">
<div class="menusub">
[showclasstemp]2,12,0,0[/showclasstemp]
</div>
<div class="newsnav">[!--newsnav--]</div>
</div>
</div>
<div class="mainWrapper">
<div class="container">
<div class="columnname">
<span><?=ReturnClassAddField(0,'enwords')?></span>
<h1>[!--class.name--]</h1>
</div>
<!--Step:2 为ECharts准备一个具备大小宽高的Dom-->
<div id="mainMap">
</div>
<span id="wrong-message" style="color:red;display:none;">当前选择:江苏 </span>
</div>
</div>
<script src="/skin/default/js/echarts.min.js" type="text/javascript"></script>
<script src="/skin/default/js/china.js" type="text/javascript"></script>
<script src="/skin/default/js/common.js" type="text/javascript"></script>
<script type="text/javascript">
//状态的颜色枚举
var colorArr = {
"1": "#bee8fd",
"2": "#67abfc",
"3": "#136acb",
"4": "#0641a2"
}
//状态的值的枚举
var statusArr = {
"1": "待投档",
"2": "录取中",
"3": "录取结束",
"4": "已邮寄通知书"
}
//地图的配置参数
var optionMap = {
backgroundColor: '#FFFFFF',
title: {},
tooltip: {
trigger: 'item',
formatter: function(val) {
console.log(val)
// return "省份:" + val.name + "<br>当前进度: " + statusArr[val.data.itemStyle.status]; //
},
},
//配置属性
series: [{
name: '中国',
type: 'map',
mapType: 'china',
roam false
zoom: 1.25,
label: {
normal: {
show: true, //省份名称
textStyle: {
fontSize: 15,
color: '#999'
}
},
emphasis: {
show: false
}
}, //左侧小导航图标
visualMap: {
min: 0,
max: 10000,
show: true,
x: 'left',
y: 'center',
pieces: [{
gt: 200,
label: "> 200 人",
color: "#f61b14"
}, {
gte: 100,
lte: 200,
label: "100 - 200 人",
color: "#ffa31b"
}, {
gte: 0,
lte: 100,
label: "1 - 100 人",
color: "#2fff1d"
}]
},
// 地图的样式
normal: {
borderColor: "#FFFFFF", // 省份边框颜色
areaColor: {
type: "linear",
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [{
offset: 0,
color: "rgb(93,170,242)", // 100% 处的颜色
},
{
offset: 1,
color: "rgb(2,128,241)", // 0% 处的颜色
},
],
global: false, // 缺省为 false
},
borderWidth: 1, // 省份边框宽度
shadowColor: "rgba(255,255,255,0.5)", // 省份边框阴影
shadowBlur: 5, // 省份边框聚焦
},
emphasis: {
// 鼠标hover显示
show: false,
//areaColor: "#0D30D4",
areaColor: {
type: "linear",
x: 1,
y: 0,
x2: 0,
y2: 0,
colorStops: [{
offset: 0,
color: "rgb(243,135,36)", // 0% 处的颜色
},
{
offset: 1,
color: "rgb(218,172,113)", // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
color: "#fff"
},
},
data: [] //数据
}]
};
//初始化echarts实例
var myChart = echarts.init(document.getElementById('mainMap'));
comm.get("/api/progress", function(res) {
let arr = [];
for (var mod of res) {
arr.push({
name: mod.province.name,
itemStyle: {
areaColor: colorArr[mod.status_id],
status: mod.status_id
}
})
}
optionMap.series[0].data = arr;
console.log(optionMap)
//使用制定的配置项和数据显示图表
myChart.setOption(optionMap);
})
</script>
[!--temp.footer--]

@ -84,15 +84,20 @@
添加观众
</view>
<view class="box-card-content">
<u-form-item label="参观人数" labelWidth="120" prop="total" ref="total">
<u-form-item label="参观人数" v-if="type=='user'" labelWidth="120" prop="total" ref="total">
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
bgColor="#FCF6E3" :min="minCount" :max="maxCount" class="plus">
</u-number-box>
</u-form-item>
<u-form-item v-else label="人数" labelWidth="120" prop="total" ref="total">
{{form.total}} 请添加参与名单
</u-form-item>
<view class="box-tips" v-if="type=='team'">
<text class="box-tips-txt" v-if="type=='user'">{{maxCount}}1</text>
<text class="box-tips-txt"
v-if="type=='team'">{{minCount}}人以上可团体预约一个团体最多{{maxCount}}</text>
v-if="type=='team'">{{minCount}}人以上可团体预约<!-- 一个团体最多{{maxCount}} --></text>
</view>
<view class="commonuser">
<view class="box-card-content">
@ -304,23 +309,23 @@
</view>
<view class="pinkBtn" @click="goHome"></view>
</view>
</u-popup>
<u-popup :show="showAuthorization" closeable mode="bottom" @close="closePhone" :round="10">
<view class="box">
<view class="box-title" style="text-align: center;padding: 20rpx 0;font-size: 32rpx;">
请授权您的手机号
</view>
<view class="box-content" style="padding: 20px;">
<u-button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
</u-button>
</view>
</view>
</u-popup>
</u-popup>
<u-popup :show="showAuthorization" closeable mode="bottom" @close="closePhone" :round="10">
<view class="box">
<view class="box-title" style="text-align: center;padding: 20rpx 0;font-size: 32rpx;">
请授权您的手机号
</view>
<view class="box-content" style="padding: 20px;">
<u-button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
</u-button>
</view>
</view>
</u-popup>
<u-calendar ref="calendar" :show-confirm="false" :show="showCalendar" :minDate="minDate" :maxDate="maxDate"
color="#EF9525" round="20" defaultDate="2022-02-15" @confirm="handleSelectDate" @close="closecalendar">
@ -481,23 +486,23 @@
//this.maxCount = (type == 'user' ? 5 : 50);
var that = this;
//
that.util.getOpenidInfo(function(res) {
//
that.util.getUserInfo(function(r) {
that.user = r;
//
if (that.util.isNull(r.mobile)) {
that.showAuthorization = true;
} else {
that.showAuthorization = false;
that.form.mobile = r.mobile;
}
}, true);
that.loadCommonUser()
//
that.util.getOpenidInfo(function(res) {
//
that.util.getUserInfo(function(r) {
that.user = r;
//
if (that.util.isNull(r.mobile)) {
that.showAuthorization = true;
} else {
that.showAuthorization = false;
that.form.mobile = r.mobile;
}
}, true);
that.loadCommonUser()
}, true);
that.maxheight = wx.getSystemInfoSync().windowHeight * 0.6 + "px"
@ -512,10 +517,12 @@
clearInterval(this.t)
clearTimeout(this.timer)
},
methods: {
methods: {
//
closePhone() {
this.showAuthorization = false
},
//
getPhoneNumber(e) {
var that = this;
this.util.request({
@ -524,7 +531,7 @@
code: e.detail.code
},
utilSuccess: function(res) {
that.form.mobile = res.mobile;
that.form.mobile = res.mobile;
that.showAuthorization = false
},
utilFail: function(res) {
@ -600,6 +607,7 @@
}
}
this.form.total = this.form.details_list.length;
},
@ -614,12 +622,13 @@
if (that.type == "user") {
that.maxCount = res.person_max_count;
that.minCount = 1;
that.form.total = that.minCount;
} else {
that.maxCount = res.team_max_count;
that.minCount = res.team_min_count;
that.form.total = 0;
}
that.form.total = that.minCount;
},
utilFail: function(res) {
@ -867,6 +876,7 @@
that.form.details_list.push(that.formUser);
// that.addUserAfter();
that.showAdd = false;
that.form.total = that.form.details_list.length;
}).catch(errors => {
uni.showToast({
icon: "none",
@ -1097,7 +1107,8 @@
let r = Object.assign(this.formUser, this.form.details_list[index]);
} else
this.editIndex = -1;
this.showAdd = true
this.formUser.card_type = 1;
this.showAdd = true;
},
delUser(index) {
for (var i = 0; i < this.common_user.length; i++) {
@ -1106,6 +1117,9 @@
}
}
this.form.details_list.splice(index, 1);
this.form.total = this.form.details_list.length;
}
}
}
@ -1285,4 +1299,4 @@
margin-bottom: 10rpx;
margin-right: 10rpx
}
</style>
</style>
Loading…
Cancel
Save