刘翔宇-旅管家 3 years ago
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>

@ -1,3 +1,4 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
@ -133,5 +134,5 @@
}
}
}
}
</script>

@ -1,51 +1,46 @@
<template>
<div>
<div class="statistics">
</div>
<el-row :gutter="20">
<el-col :span="12">
<Map :chartData="chartData" />
</el-col>
<el-col :span="12">
<div class="grid-content bg-purple"></div>
<DoughnutChart :chart-data="homeData.rate_list"></DoughnutChart>
</el-col>
</el-row>
<div class="chart">
</div>
<el-row>
<el-col :span="24">
<AreaChat :chart-data="homeData.year_list"></AreaChat>
</el-col>
</el-row>
</div>
</template>
<script>
import echarts from "echarts"
import PanelGroup from './components/PanelGroup'
import Map from './components/Map'
import DoughnutChart from "./components/DoughnutChart.vue";
import AreaChat from "./components/AreaChat.vue";
import {
getChartsHome
} from "../../api/dashboard.js"
} from "@/api/dashboard.js"
import {
index as indexprogress
} from "../../api/unifiedRecruitment/progress"
} from "@/api/unifiedRecruitment/progress"
export default {
components: {
PanelGroup,
Map
DoughnutChart,
Map,
AreaChat
},
data() {
return {
col: '',
line: '',
business_data: [],
collect_data: [],
list: {},
customerArr: [],
orderArr: [],
homeData:{
rate_list:[],
year_list:[]
},
chartData: {},
colorArr: {
"1": "#8297a3",
@ -61,6 +56,10 @@
methods: {
async loadData() {
this.loadPress()
this.loadHomeData()
},
loadHomeData(){
getChartsHome().then(res => this.homeData = res)
},
loadPress() {
indexprogress({
@ -72,7 +71,7 @@
arr.push({
name: mod.province.name,
itemStyle: {
areaColor: this.colorArr[mod.status_id],
areaColor: this.colorArr[mod.status_id],
status:mod.status_id
}
})
@ -203,4 +202,4 @@
}
</style>
</style>

@ -1,4 +1,5 @@
<script>
import { index as filedIndex} from "@/api/unifiedRecruitment/templateFiled"
import { show as templateShow } from "@/api/unifiedRecruitment/template";
import { show, save } from "@/api/unifiedRecruitment/recruit";
@ -6,7 +7,7 @@ export default {
render(h) {
return (
<Modal
title={this.type === "add" ? "新增统招生" : "编辑统招生"}
title={this.type === "add" ? "新增信息" : "编辑信息"}
width="54"
value={this.isShow}
on={{
@ -85,7 +86,7 @@ export default {
v-model={this.originalForm.province_id}
placeholder="请选择省份"
>
{this.province_ids.map((item) => {
{this.provincesFormat.map((item) => {
return (
<el-option
value={item.id}
@ -248,14 +249,17 @@ export default {
},
methods: {
async getTemplate() {
const res = await templateShow(
const res = await filedIndex(
{
year: this.originalForm.year,
template_item_id: this.originalForm.template_item_id,
template_id:this.originalForm.template_id,
page:1,
page_size:999
},
true
);
if (res?.fileds) {
res?.fileds.forEach((item) => {
if (res?.data) {
res?.data.forEach((item) => {
Object.defineProperty(this.form, item.en, {
value: "",
writable: true,
@ -277,10 +281,16 @@ export default {
});
}
this.formInfo = res?.fileds ?? [];
this.formInfo = res?.data ?? [];
this.$forceUpdate();
},
},
computed:{
provincesFormat(){
return this.$route.meta.params.type == 2 ? this.province_ids.filter(item => item.name == '江苏') : this.province_ids
}
},
watch: {
async isShow(newVal) {
if (newVal) {

@ -42,7 +42,7 @@
:transfer="true"
confirm
title="确认要删除吗"
@on-ok="destroy">
@on-ok="destroy"
<Button type="error" ghost>删除</Button>
</Poptip>
</template>

@ -21,11 +21,17 @@
</el-select>
</div>
<div class="select__item">
<div class="select__item" v-if="$route.meta.params.type == 1">
<span></span>
<span>更新统招进度为录取结束</span>
<el-checkbox v-model="select.isEnd" :true-label="1" :false-label="0"></el-checkbox>
</div>
<div class="select__item">
<span></span>
<span>更新邮寄信息</span>
<el-checkbox v-model="select.isEnd" :true-label="1" :false-label="0"></el-checkbox>
</div>
</div>
<div class="upload">
@ -66,6 +72,7 @@ import {
} from '@/utils/auth'
import {show as templateShow} from "@/api/unifiedRecruitment/template";
import { imports } from '@/api/unifiedRecruitment/recruit'
import {index as filedIndex} from "@/api/unifiedRecruitment/templateFiled";
export default {
props: {
isShow: {
@ -130,23 +137,21 @@ export default {
},
async getTemplate() {
const res = await templateShow(
{
year: this.select.year,
type: this.$route.meta.params?.type,
},
true
);
this.select.template_id = res.id;
this.newTable =
res?.fileds?.map((item) => {
const res = await filedIndex({
template_item_id:this.select.template_item_id,
template_id:this.select.template_id,
page:1,
page_size:999
});
let temp =
res?.data?.map((item) => {
return {
prop: item.en,
label: item.name,
width: 140,
};
}) ?? [];
this.table = [...this.originalTable, ...this.newTable];
this.table = [...this.originalTable, ...temp];
},
submit(){

@ -24,6 +24,7 @@
></el-date-picker>
<el-select
ref="templateSelect"
v-model="select.template_item_id"
size="small"
placeholder="模板类型"
@ -57,8 +58,8 @@
<Button
type="primary"
@click="
($refs['addRecruit'].form.template_id = select.template_id),
($refs['addRecruit'].form.template_item_id =
($refs['addRecruit'].originalForm.template_id = select.template_id),
($refs['addRecruit'].originalForm.template_item_id =
select.template_item_id),
($refs['addRecruit'].type = 'add'),
(isShowAdd = true)
@ -90,11 +91,12 @@
<Button
type="primary"
@click="
isShowTip = true,
($refs['importRecruitInfo'].select.template_item_id = select.template_item_id),
($refs['importRecruitInfo'].select.year = select.year),
(isShowImportRecruitInfo = true)
"
>导入录取信息</Button
>导入信息</Button
>
</template>
</header-content>
@ -134,6 +136,17 @@
:is-show.sync="isShowImportRecruitInfo"
@refresh="getList"
></importRecruitInfo>
<el-dialog
title="提示"
:visible.sync="isShowTip"
width="30%"
center>
<span>当前选择导入的模板为{{ getTemplateItemName() }}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="isShowTip = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -141,6 +154,7 @@
import { index, destroy, exports } from "@/api/unifiedRecruitment/recruit";
import { authMixin } from "@/mixin/authMixin";
import { index as provinceIndex } from "@/api/manage/province";
import { index as filedIndex } from "@/api/unifiedRecruitment/templateFiled"
import {
show as templateShow,
index as templateIndex,
@ -161,6 +175,8 @@ export default {
},
data() {
return {
isShowTip:false,
tipTemplate:"",
isShowImportRecruitInfo: false,
isShowAdd: false,
provinces: [],
@ -219,6 +235,9 @@ export default {
index,
destroy,
getTemplateItemName(){
return this.$refs['templateSelect']?.selected?.label
},
async getTemplateItemDetail() {
if (!this.select.template_item_id) {
this.$message({
@ -227,20 +246,14 @@ export default {
});
return;
}
// const res = await templateItemShow({
// id: this.select.template_item_id,
// });
const res = await templateShow(
{
year: this.select.year,
type: this.$route.meta.params?.type,
},
false
);
this.select.template_id = res.id;
const res = await filedIndex({
template_item_id:this.select.template_item_id,
template_id:this.select.template_id,
page:1,
page_size:999
});
let temp =
res?.fileds?.map((item) => {
res?.data?.map((item) => {
return {
prop: item.en,
label: item.name,
@ -248,6 +261,24 @@ export default {
};
}) ?? [];
this.table = [...this.originalTable, ...temp];
// const res = await templateShow(
// {
// year: this.select.year,
// type: this.$route.meta.params?.type,
// },
// false
// );
// this.select.template_id = res.id;
// let temp =
// res?.fileds?.map((item) => {
// return {
// prop: item.en,
// label: item.name,
// width: 140,
// };
// }) ?? [];
// this.table = [...this.originalTable, ...temp];
},
async getList() {
this.$refs["xyTable"].loading = true;
@ -308,7 +339,7 @@ export default {
async search() {
//await this.getTemplate();
//await this.getTemplateItemDetail();
await this.getTemplateItemDetail();
await this.getList();
},
@ -330,7 +361,7 @@ export default {
await this.getTemplateItemDetail();
await this.getProvinces();
await this.getList();
},
}
};
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,103 +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": "#142293"
}
//状态的值的枚举
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: true,
label: {
normal: {
show: true //省份名称
},
emphasis: {
show: false
}
},
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--]

@ -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…
Cancel
Save