master
commit
93015fe238
@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="className" :style="{ height: height, width: width }" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import echarts from "echarts";
|
||||||
|
import geoJson from "@/assets/china.json";
|
||||||
|
require("echarts/theme/macarons"); // echarts theme
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
className: {
|
||||||
|
type: String,
|
||||||
|
default: "chart",
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: "100%",
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String,
|
||||||
|
default: "500px",
|
||||||
|
},
|
||||||
|
chartData: {
|
||||||
|
type: [Object,Array],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart() {
|
||||||
|
this.chart = echarts.init(this.$el, "macarons");
|
||||||
|
this.setOptions(this.chartData);
|
||||||
|
},
|
||||||
|
setOptions() {
|
||||||
|
let arr = []
|
||||||
|
for(let key in this.chartData){
|
||||||
|
arr.push(this.chartData[key])
|
||||||
|
}
|
||||||
|
// 绘制图表
|
||||||
|
this.chart.setOption({
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'cross',
|
||||||
|
label: {
|
||||||
|
backgroundColor: '#6a7985'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: arr.map(item => item.year)
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name:"历年统招人数环比",
|
||||||
|
data: arr.map(item => item.total),
|
||||||
|
type: 'line',
|
||||||
|
areaStyle: {
|
||||||
|
color:"#8b9bd3"
|
||||||
|
},
|
||||||
|
lineStyle:{
|
||||||
|
color:"#8b9bd3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
chartData: {
|
||||||
|
deep: true,
|
||||||
|
handler(val) {
|
||||||
|
this.setOptions(val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (!this.chart) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.chart.dispose();
|
||||||
|
this.chart = null;
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.initChart();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="className" :style="{ height: height, width: width }" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import echarts from "echarts";
|
||||||
|
import geoJson from "@/assets/china.json";
|
||||||
|
require("echarts/theme/macarons"); // echarts theme
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
className: {
|
||||||
|
type: String,
|
||||||
|
default: "chart",
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: "100%",
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String,
|
||||||
|
default: "500px",
|
||||||
|
},
|
||||||
|
chartData: {
|
||||||
|
type: [Object,Array],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart() {
|
||||||
|
this.chart = echarts.init(this.$el, "macarons");
|
||||||
|
this.setOptions(this.chartData);
|
||||||
|
},
|
||||||
|
setOptions(chartdata) {
|
||||||
|
// 绘制图表
|
||||||
|
this.chart.setOption({
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
top: '3%',
|
||||||
|
left: 'center'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '统招生源占比',
|
||||||
|
type: 'pie',
|
||||||
|
radius: ['40%', '70%'],
|
||||||
|
avoidLabelOverlap: false,
|
||||||
|
itemStyle: {
|
||||||
|
borderRadius: 10,
|
||||||
|
borderColor: '#fff',
|
||||||
|
borderWidth: 2
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: false,
|
||||||
|
position: 'center'
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
fontSize: 40,
|
||||||
|
fontWeight: 'bold'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labelLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
data: this.chartData.map(item => {
|
||||||
|
return {
|
||||||
|
value:item.rate,
|
||||||
|
name:item.province_name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
chartData: {
|
||||||
|
deep: true,
|
||||||
|
handler(val) {
|
||||||
|
this.setOptions(val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (!this.chart) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.chart.dispose();
|
||||||
|
this.chart = null;
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.initChart();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,144 +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]20,12,0,0[/showclasstemp] -->
|
|
||||||
</div>
|
|
||||||
<div class="newsnav">[!--newsnav--]</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mainWrapper">
|
|
||||||
<div class="container">
|
|
||||||
<div class="querybox">
|
|
||||||
<h2>[!--class.name--]</h2>
|
|
||||||
<form method="post" name="form1" id="queryform1">
|
|
||||||
<input type="hidden" name="tempid" value="2" id="tempid">
|
|
||||||
<div class="querylist">
|
|
||||||
<ul class="querytable">
|
|
||||||
<li style="background-image: url(/skin/default/images/icon-cx1.png);"><input name="idcard" type="text"
|
|
||||||
id="idcard" placeholder="身份证号" /><span class="label-f"></span></li>
|
|
||||||
<li style="background-image: url(/skin/default/images/icon-cx2.png);"><input name="name" type="text"
|
|
||||||
id="name" placeholder="姓名" /><span class="label-f"></span></li>
|
|
||||||
</ul>
|
|
||||||
<div class="clearfix codey">
|
|
||||||
<label class="lblVerification" for="yzm">验证码</label>
|
|
||||||
<input type="text" id="captcha_code" name="captcha_code" class="txtVerification" />
|
|
||||||
<span id="idcode"></span>
|
|
||||||
<span class="label-f"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="button" name="Submit3" id="btns_none" value="查询" onclick="startSearch()" />
|
|
||||||
</form>
|
|
||||||
<p>目前是拟录取查询,最终录取名单要以考试院下发的名册为准</p>
|
|
||||||
</div>
|
|
||||||
<!-- 查询结果 -->
|
|
||||||
<div class="queryResult" style="display: none;">
|
|
||||||
<div class="queryModel">
|
|
||||||
<div class="closebt" onclick="$('.queryResult').hide();"></div>
|
|
||||||
<div class="Modelbox">
|
|
||||||
<dl> </dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="/skin/default/js/common.js" type="text/javascript"></script>
|
|
||||||
<script language="javascript">
|
|
||||||
var reValue = RQ('value');
|
|
||||||
var h2title;
|
|
||||||
$('#idcode').html('');
|
|
||||||
var template_item_id, captcha_key, captcha_code;
|
|
||||||
comm.get('/api/item?type=2', function(result) {
|
|
||||||
var ahtml = "";
|
|
||||||
for (var i = 0; i < result.length; i++) {
|
|
||||||
ahtml += "<a onclick='tabActive(this)' aclassid=" + result[i].id + ">" + result[i].name + "</a>"
|
|
||||||
}
|
|
||||||
$(".menusub").html(ahtml);
|
|
||||||
$(".menusub a").each(function() {
|
|
||||||
if ($(this).attr('aclassid') == reValue) {
|
|
||||||
$(this).addClass("current").siblings().removeClass("current");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
h2title = $(".menusub .current").text();
|
|
||||||
$(".querybox h2").html(h2title);
|
|
||||||
template_item_id = $(".menusub .current").attr("aclassid");
|
|
||||||
$("#tempid").val(template_item_id);
|
|
||||||
})
|
|
||||||
|
|
||||||
function tabActive(obj) {
|
|
||||||
$(obj).addClass("current").siblings().removeClass("current");
|
|
||||||
h2title = $(obj).text();
|
|
||||||
$(".querybox h2").html(h2title);
|
|
||||||
template_item_id = $(obj).attr("aclassid");
|
|
||||||
$("#tempid").val(template_item_id);
|
|
||||||
}
|
|
||||||
codeShow();
|
|
||||||
|
|
||||||
function codeShow() {
|
|
||||||
$("#idcode").empty(" ");
|
|
||||||
comm.get('/api/captcha', function(result) {
|
|
||||||
var html = "<img src='" + result.img + "' onclick='codeShow()'>";
|
|
||||||
captcha_key = result.key
|
|
||||||
$("#idcode").html(html);
|
|
||||||
$("#idcode").attr("key", captcha_key)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function startSearch() {
|
|
||||||
var url = "/api/admit?type=2";
|
|
||||||
var idcard = $("#idcard").val();
|
|
||||||
var name = $("#name").val();
|
|
||||||
captcha_code = $("#captcha_code").val();
|
|
||||||
// if (idcard == "" || name=="" || captcha_code=="") {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
$.get(comm.host + url, {
|
|
||||||
template_item_id: template_item_id,
|
|
||||||
idcard: idcard,
|
|
||||||
name: name,
|
|
||||||
captcha_key: captcha_key,
|
|
||||||
captcha_code: captcha_code,
|
|
||||||
}, function(result) {
|
|
||||||
typeof(result) == "string" ? result = eval("(" + result + ")"): "";
|
|
||||||
console.log(result);
|
|
||||||
showResult(result);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function showResult(data) {
|
|
||||||
var html = "";
|
|
||||||
$(".queryResult dl").empty(" ");
|
|
||||||
if (data.errcode) {
|
|
||||||
html += "<div class='erroeinfo'>" + data.errmsg +
|
|
||||||
"</div><div class='reloadQery'><a href='/zstype/tqzs/publicize/?value=" + template_item_id + "'>查询</a></div>"
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
html += "<dd><span>姓名</span><p>" + data.name + "</p></dd>";
|
|
||||||
html += "<dd><span>身份证号</span><p>" + data.idcard + "</p></dd>";
|
|
||||||
html += "<dd><span>EMS快递单号</span><p>" + data.ems + "</p></dd>";
|
|
||||||
for (var j = 0; j < data.fileds_all.length; j++) {
|
|
||||||
html += "<dd><span>" + data.fileds_all[j].name + "</span><p>" + data.fileds_all[j].value + "</p></dd>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$('.queryResult').show();
|
|
||||||
$(".queryResult dl").append(html);
|
|
||||||
}
|
|
||||||
|
|
||||||
function showTips(str) {
|
|
||||||
var div = '<div class="showTips"></div>';
|
|
||||||
$('body').append(div)
|
|
||||||
$('.showTips').html(str);
|
|
||||||
$('.showTips').show();
|
|
||||||
setTimeout(function() {
|
|
||||||
$('.showTips').hide();
|
|
||||||
$('.showTips').remove();
|
|
||||||
}, 2000)
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
[!--temp.footer--]
|
|
||||||
Loading…
Reference in new issue