parent
88181ec81e
commit
e66348d48b
@ -1,491 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>长春市教育基础库运行监测</title>
|
|
||||||
<script type="text/javascript" src="../../lib/jquery-3.6.0.min.js"></script>
|
|
||||||
<script src="../../lib/echarts.min.js"></script>
|
|
||||||
<script src="../../lib/shine.js"></script>
|
|
||||||
<script src="../../lib/pinyin.js"></script>
|
|
||||||
<script src="../district/map/city/china-main-city-map.js"></script>
|
|
||||||
<style>
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 0px;
|
|
||||||
}
|
|
||||||
scrollbar {
|
|
||||||
-moz-appearance: none !important;
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div id="main" style="position: absolute;top:0;left:0;width:98%;"></div>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
var result=getGlobalByCodes("install_area");
|
|
||||||
function getGlobalByCodes(keys){
|
|
||||||
var jsonStr;
|
|
||||||
$.ajax({
|
|
||||||
type: "GET",
|
|
||||||
url: "/dsBase/global/getGlobalByCodes?global_codes="+keys,
|
|
||||||
dataType: 'json',
|
|
||||||
async : false,
|
|
||||||
success: function (data) {
|
|
||||||
if(data.code==0){
|
|
||||||
jsonStr=data.data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return jsonStr;
|
|
||||||
}
|
|
||||||
var areaId=result[0].global_value;
|
|
||||||
function getSoorData(min) {
|
|
||||||
var data_new=[];
|
|
||||||
$.ajax({
|
|
||||||
type:'GET',
|
|
||||||
dataType:'json',
|
|
||||||
async:false,
|
|
||||||
url:'/dsBase/bigData/getPeriodAreaLoginInfoByCityId?city_id='+areaId+'&min='+min,
|
|
||||||
success:function(data){
|
|
||||||
if(data.success){
|
|
||||||
var lis=[];
|
|
||||||
var liss=[];
|
|
||||||
var sum=[];
|
|
||||||
var total=0;
|
|
||||||
for (var i=0;i<data.list.length;i++) {
|
|
||||||
// if(data.list[i]['login_count']=='0'){
|
|
||||||
// data.list[i]['login_count']=i*100;
|
|
||||||
// }
|
|
||||||
if(data.list[i]['area_name']=='经开区'||data.list[i]['area_name']=='莲花山'|| data.list[i]['area_name']=='高新区'||data.list[i]['area_name']=='净月开发区'|| data.list[i]['area_name']=='一汽区'){
|
|
||||||
data.list.splice(i,1);
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
if(data.list[i]['area_name']=='市直属'){
|
|
||||||
data.list[i]['area_name']='长春市';
|
|
||||||
}
|
|
||||||
total +=Number(data.list[i]['login_count']);
|
|
||||||
lis=data.list;
|
|
||||||
}
|
|
||||||
for (var i=0;i<lis.length;i++) {
|
|
||||||
if(data.list[i]['area_name']=='长春市'){
|
|
||||||
data.list[i]['login_count']=total;
|
|
||||||
}
|
|
||||||
liss.push({
|
|
||||||
"fromName": lis[i]['area_name'],
|
|
||||||
"accessCount":lis[i]['login_count'],
|
|
||||||
"toName": geoMapName,
|
|
||||||
"school_count":lis[i]['school_count'],
|
|
||||||
"org_count":lis[i]['org_count'],
|
|
||||||
"teacher_count":lis[i]['teacher_count'],
|
|
||||||
"student_count":lis[i]['student_count']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var jsont={
|
|
||||||
"list": liss,
|
|
||||||
"success": true
|
|
||||||
};
|
|
||||||
$.each(jsont.list,function(k,m){
|
|
||||||
data_new.push([{name:m.fromName,value:m.accessCount,school_count:m.school_count,org_count:m.org_count,teacher_count:m.teacher_count,student_count:m.student_count}, {name:m.toName}]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return data_new;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var geoMapName="";
|
|
||||||
var area_cp="";//使用地区的坐标
|
|
||||||
// 获取全局变量 使用地区
|
|
||||||
$(function () {
|
|
||||||
var h=$(window.parent.document).find("#mapDiv").height();
|
|
||||||
$("#main").height(h);
|
|
||||||
$.ajax({
|
|
||||||
type : "GET",
|
|
||||||
async : false,
|
|
||||||
url : '/dsBase/global/getGlobalByCodes?global_codes=install_area',
|
|
||||||
dataType : "json",
|
|
||||||
success: function (data) {
|
|
||||||
if(data.code==0){
|
|
||||||
$.ajax({
|
|
||||||
type : "GET",
|
|
||||||
async : false,
|
|
||||||
url : '/dsBase/organization/getAreaInfoById?id='+data.data[0].global_value,
|
|
||||||
dataType : "json",
|
|
||||||
success: function (data) {
|
|
||||||
// 使用地区名称
|
|
||||||
geoMapName=data.area_name;
|
|
||||||
// 隶属的省份名称
|
|
||||||
// var province_name=data.province_name;
|
|
||||||
// if(province_name.indexOf("省")!== -1){
|
|
||||||
// province_name=province_name.replace("省","") ;
|
|
||||||
// }else if(province_name.indexOf("市")!== -1){
|
|
||||||
// province_name=province_name.replace("市","") ;
|
|
||||||
// }else if(province_name.indexOf("自治区")!== -1){
|
|
||||||
// province_name=province_name.replace("自治区","") ;
|
|
||||||
// }
|
|
||||||
// province_name=CC2PY(province_name).toLowerCase();
|
|
||||||
// $.ajax({
|
|
||||||
// type:'GET',
|
|
||||||
// dataType:'json',
|
|
||||||
// async:false,
|
|
||||||
// url:'../district/map/province/'+province_name+'.json',
|
|
||||||
// success:function (data) {
|
|
||||||
// for( var i=0;i<data.features.length;i++ ){
|
|
||||||
// if(data.features[i].properties.name==geoMapName){
|
|
||||||
// area_cp=data.features[i].properties.cp;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// getData();
|
|
||||||
// geoCoordMap= getData();
|
|
||||||
$.ajax({
|
|
||||||
type:'GET',
|
|
||||||
dataType:'json',
|
|
||||||
async:false,
|
|
||||||
url:'/dsBase/dm/getCityCoordinate?city_id='+data.city_id,
|
|
||||||
async:false,
|
|
||||||
success:function (data) {
|
|
||||||
geoCoordMap= eval("("+data.json+")");
|
|
||||||
$.ajax({
|
|
||||||
type:'GET',
|
|
||||||
async:false,
|
|
||||||
dataType:'json',
|
|
||||||
url:'../district/map/city/'+ cityMap[geoMapName] +'.json',
|
|
||||||
success:function (data) {
|
|
||||||
echarts.registerMap('city', data);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
initMap(min);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
var myHosName = '';
|
|
||||||
var myChart;
|
|
||||||
var SEDATA=[];
|
|
||||||
//地图
|
|
||||||
var geoCoordMap={};
|
|
||||||
|
|
||||||
function getCoorData(){
|
|
||||||
var data_new=[];
|
|
||||||
var jsont={
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"fromName": "长春市",
|
|
||||||
"accessCount": 312951,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "榆树市",
|
|
||||||
"accessCount": 884,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "德惠市",
|
|
||||||
"accessCount": 730,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "农安县",
|
|
||||||
"accessCount":640,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "九台市",
|
|
||||||
"accessCount": 80,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "宽城区",
|
|
||||||
"accessCount": 430,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "二道区",
|
|
||||||
"accessCount": 310,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "朝阳区",
|
|
||||||
"accessCount": 40,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "绿园区",
|
|
||||||
"accessCount": 580,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "南关区",
|
|
||||||
"accessCount": 120,
|
|
||||||
"toName": "长春市"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fromName": "双阳区",
|
|
||||||
"accessCount": 90,
|
|
||||||
"toName": "长春市"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"success": true
|
|
||||||
};
|
|
||||||
$.each(jsont.list,function(k,m){
|
|
||||||
data_new.push([{name:m.fromName,value:m.accessCount}, {name:m.toName}]);
|
|
||||||
});
|
|
||||||
return data_new;
|
|
||||||
}
|
|
||||||
// 获取长春市下区地图
|
|
||||||
function getData1(){
|
|
||||||
var list ={};
|
|
||||||
$.ajax({
|
|
||||||
type:'GET',
|
|
||||||
async:false,
|
|
||||||
dataType:'json',
|
|
||||||
url:'../district/map/city/'+ cityMap[geoMapName] +'.json',
|
|
||||||
success:function (data) {
|
|
||||||
echarts.registerMap('city', data);
|
|
||||||
for( var i=0;i<data.features.length;i++ ){
|
|
||||||
list[data.features[i].properties.name]= data.features[i].geometry.coordinates[0][0][0];
|
|
||||||
}
|
|
||||||
// list['长春市']=[125.347644,43.879875];
|
|
||||||
list[geoMapName]=area_cp;
|
|
||||||
// list['白城市']=[122.841114,45.619026];
|
|
||||||
geoCoordMap=list;
|
|
||||||
// console.log(geoCoordMap);
|
|
||||||
initMap();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function getData(){
|
|
||||||
$.ajax({
|
|
||||||
type:'GET',
|
|
||||||
async:false,
|
|
||||||
dataType:'json',
|
|
||||||
url:'../district/map/city/'+ cityMap[geoMapName] +'.json',
|
|
||||||
success:function (data) {
|
|
||||||
echarts.registerMap('city', data);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
var data_new={};
|
|
||||||
data_new={
|
|
||||||
"德惠市": [125.70514,44.545406],
|
|
||||||
"农安县": [125.181659,44.438724],
|
|
||||||
"九台市": [125.826151,44.152305],
|
|
||||||
"宽城区": [125.347576,44.092181], //125.333329,43.94918
|
|
||||||
// "宽城区": [125.333329,43.94918], //
|
|
||||||
"二道区": [125.703266,43.887419],//125.378112,43.878125
|
|
||||||
// "二道区": [125.378112,43.878125],//
|
|
||||||
"朝阳区": [125.260863,43.662466],//125.294733,43.839716
|
|
||||||
// "朝阳区": [125.294733,43.839716],//
|
|
||||||
"绿园区": [125.118676,43.876976],//125.262779,43.886998
|
|
||||||
// "绿园区": [125.262779,43.886998],//
|
|
||||||
"南关区": [125.297226,43.928239],//125.338919,43.89144
|
|
||||||
// "南关区": [125.338919,43.89144],//
|
|
||||||
"双阳区": [125.66678,43.527766],
|
|
||||||
"长春市": [125.323816,43.774638],
|
|
||||||
"榆树市": [126.551432,44.843088],
|
|
||||||
}
|
|
||||||
data={
|
|
||||||
"镇赉县": [123.205618,45.848797],
|
|
||||||
"洮北区": [122.852396,45.631993],
|
|
||||||
"洮南市": [122.782741,45.342534],
|
|
||||||
"通榆县": [123.100987,44.81677],
|
|
||||||
"大安市": [124.289634,45.521303]
|
|
||||||
}
|
|
||||||
return data_new;
|
|
||||||
|
|
||||||
}
|
|
||||||
var min=10;
|
|
||||||
setInterval(function () {
|
|
||||||
min +=10;
|
|
||||||
initMap(min);
|
|
||||||
},600000);
|
|
||||||
|
|
||||||
function initMap(min){
|
|
||||||
//获取from--to数据
|
|
||||||
var DATAF=getSoorData(min);
|
|
||||||
if(myChart){//释放浏览器内存
|
|
||||||
myChart.dispose();
|
|
||||||
}
|
|
||||||
myChart = echarts.init(document.getElementById('main'), 'shine');
|
|
||||||
|
|
||||||
var color = ['#a6c84c', '#ffa022', '#46bee9'];
|
|
||||||
var series = [];
|
|
||||||
[[[myHosName],DATAF]].forEach(function (item, i) {
|
|
||||||
series.push(
|
|
||||||
{
|
|
||||||
type: 'lines',
|
|
||||||
zlevel: 1,
|
|
||||||
symbol: ['none', 'arrow'],
|
|
||||||
symbolSize:5,
|
|
||||||
effect: {
|
|
||||||
show: true,
|
|
||||||
period: 6,
|
|
||||||
trailLength: 0,
|
|
||||||
symbol: 'arrow',//circle'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
|
|
||||||
color: '#A6C84C',
|
|
||||||
symbolSize:9,
|
|
||||||
shadowBlur: 1
|
|
||||||
|
|
||||||
},
|
|
||||||
lineStyle: {
|
|
||||||
normal: {
|
|
||||||
width: '2',
|
|
||||||
color: '#a6c84c',
|
|
||||||
curveness: 0.2,
|
|
||||||
color: color[i],
|
|
||||||
opacity: 0.4,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: convertData(item[1])
|
|
||||||
},
|
|
||||||
|
|
||||||
{ //区原点
|
|
||||||
type: 'effectScatter',
|
|
||||||
coordinateSystem: 'geo',
|
|
||||||
zlevel: 2,
|
|
||||||
rippleEffect: {
|
|
||||||
brushType: 'stroke'
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
normal: {
|
|
||||||
show: true,
|
|
||||||
position: 'right',
|
|
||||||
formatter: '{b}'
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
symbolSize: function (val) {
|
|
||||||
var val_return =3 + val[2] / 10;
|
|
||||||
if(val_return>18){
|
|
||||||
val_return=18;
|
|
||||||
}
|
|
||||||
|
|
||||||
return val_return;
|
|
||||||
},
|
|
||||||
data: item[1].map(function (dataItem) {
|
|
||||||
return {
|
|
||||||
name: dataItem[0].name,
|
|
||||||
school_count:dataItem[0]['school_count'],
|
|
||||||
org_count:dataItem[0]['org_count'],
|
|
||||||
teacher_count:dataItem[0]['teacher_count'],
|
|
||||||
student_count:dataItem[0]['student_count'],
|
|
||||||
value: geoCoordMap[dataItem[0].name].concat([dataItem[0].value])
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
color: function(params) {
|
|
||||||
var tmp = params.data.value[2]
|
|
||||||
if (tmp < 100) {
|
|
||||||
return 'lime';
|
|
||||||
}else if (tmp>100 && tmp<900) {
|
|
||||||
return 'aqua'
|
|
||||||
}else{
|
|
||||||
return 'red';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
option = {
|
|
||||||
tooltip : {//提示框组件
|
|
||||||
trigger: 'item',//触发类型
|
|
||||||
formatter:
|
|
||||||
function(params) {
|
|
||||||
if(params.seriesIndex==1){
|
|
||||||
return params.name + '<br>访问量:' + params.data.value[2]
|
|
||||||
+ '<br>学校总数:' + params.data.school_count
|
|
||||||
+ '<br>单位总数:' + params.data.org_count
|
|
||||||
+ '<br>教师总数:' + params.data.teacher_count
|
|
||||||
+ '<br>学生总数:' + params.data.student_count
|
|
||||||
}else{
|
|
||||||
return params.data.fromName + '→' + params.data.toName;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
geo: {//地理坐标系
|
|
||||||
map: 'city',
|
|
||||||
label: {//图形上的文本标签
|
|
||||||
normal: {
|
|
||||||
show: false//true 显示地图上的数据
|
|
||||||
},
|
|
||||||
|
|
||||||
emphasis: {
|
|
||||||
show:false//若为true,鼠标移动上去显示当前区域名称
|
|
||||||
}
|
|
||||||
},
|
|
||||||
roam: false,//设置为开启缩放和平移
|
|
||||||
itemStyle: {
|
|
||||||
normal: {//正常展示
|
|
||||||
areaColor: 'rgb(17, 38, 99,0.6)',
|
|
||||||
borderColor:'#4C6DA8',//'#4C6DA8'
|
|
||||||
borderWidth:'2',
|
|
||||||
shadowColor: 'rgba(63, 218, 255, 0.5)',
|
|
||||||
shadowBlur: 30
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
areaColor: '#2a333d'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
zoom:1//缩放比例。正常为1:1
|
|
||||||
},
|
|
||||||
series : series,
|
|
||||||
};
|
|
||||||
if (option && typeof option === "object") {
|
|
||||||
myChart.setOption(option, true);
|
|
||||||
// setTimeout(function () {
|
|
||||||
// myChart.dispatchAction({
|
|
||||||
// type: 'showTip',
|
|
||||||
// seriesIndex:1 ,//第几条series
|
|
||||||
// dataIndex:0,//第几个tooltip
|
|
||||||
// position: ['43%', '71%'],
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// },10);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onresize = function() {
|
|
||||||
myChart.resize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var convertData = function(data) {
|
|
||||||
var res = [];
|
|
||||||
for (var i = 0; i < data.length; i++) {
|
|
||||||
var dataItem = data[i];
|
|
||||||
var fromCoord = geoCoordMap[dataItem[0].name];
|
|
||||||
var toCoord = geoCoordMap[dataItem[1].name];
|
|
||||||
if (fromCoord && toCoord) {
|
|
||||||
res.push({
|
|
||||||
fromName : dataItem[0].name,
|
|
||||||
value : dataItem[0].value,
|
|
||||||
toName : dataItem[1].name,
|
|
||||||
coords : [ fromCoord, toCoord ],
|
|
||||||
// school_count:dataItem[0]['school_count'],
|
|
||||||
// org_count:dataItem[0]['org_count'],
|
|
||||||
// teacher_count:dataItem[0]['org_count'],
|
|
||||||
// student_count:dataItem[0]['org_count']
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Before Width: | Height: | Size: 611 KiB |
@ -1,90 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
||||||
<title>Login Page</title>
|
|
||||||
<!-- 样 式 文 件 -->
|
|
||||||
<link rel="stylesheet" href="component/pear/css/pear.css" />
|
|
||||||
<link rel="stylesheet" href="admin/css/other/login.css" />
|
|
||||||
</head>
|
|
||||||
<!-- 代 码 结 构 -->
|
|
||||||
|
|
||||||
<body background="admin/images/background.svg" style="background-size: cover;">
|
|
||||||
<form class="layui-form" action="javascript:void(0);">
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<img class="logo" src="admin/images/logo.png" />
|
|
||||||
<div class="title">选排课工具</div>
|
|
||||||
<div class="desc">
|
|
||||||
免责声明:不保证数据的完整性、准确性,请使用者自行校验。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<input id="user" placeholder="用户名" lay-verify="required" hover class="layui-input" />
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<input id="pwd" placeholder="密码" lay-verify="required" hover class="layui-input" />
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<input type="checkbox" name="" title="记住密码" lay-skin="primary" checked>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<button type="button" class="pear-btn pear-btn-success login" lay-submit lay-filter="login">
|
|
||||||
登 录
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<!-- 资 源 引 入 -->
|
|
||||||
<script src="component/layui/layui.js"></script>
|
|
||||||
<script src="component/pear/pear.js"></script>
|
|
||||||
<script>
|
|
||||||
layui.use(['form', 'button', 'popup'], function () {
|
|
||||||
var form = layui.form;
|
|
||||||
var button = layui.button;
|
|
||||||
var popup = layui.popup;
|
|
||||||
let $ = layui.jquery;
|
|
||||||
|
|
||||||
|
|
||||||
let storageUser = window.sessionStorage.getItem('user');
|
|
||||||
let storagePwd = window.sessionStorage.getItem('pwd');
|
|
||||||
$("#user").val(storageUser);
|
|
||||||
$("#pwd").val(storagePwd);
|
|
||||||
|
|
||||||
// 登 录 提 交
|
|
||||||
form.on('submit(login)', function (data) {
|
|
||||||
|
|
||||||
let user = $("#user").val();
|
|
||||||
let pwd = $("#pwd").val();
|
|
||||||
|
|
||||||
console.log(user);
|
|
||||||
|
|
||||||
button.load({
|
|
||||||
elem: '.login',
|
|
||||||
time: 500,
|
|
||||||
done: function () {
|
|
||||||
$.ajax({
|
|
||||||
url: "/dsBase/xgk/doLogin",
|
|
||||||
type: "post",
|
|
||||||
dataType: "json",
|
|
||||||
data: { "user": user, "pwd": pwd },
|
|
||||||
success: function (res) {
|
|
||||||
console.log(res);
|
|
||||||
if (res.success) {
|
|
||||||
window.location.href = 'xgk_main.html';
|
|
||||||
window.sessionStorage.setItem('user', user)
|
|
||||||
window.sessionStorage.setItem('pwd', pwd)
|
|
||||||
} else {
|
|
||||||
popup.failure("用户名或密码不正确!")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -1,138 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport"
|
|
||||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
||||||
<title>模板生成工具</title>
|
|
||||||
<link href="component/pear/css/pear.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="admin/css/other/console2.css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="pear-container">
|
|
||||||
<div class="layui-row layui-col-space10">
|
|
||||||
|
|
||||||
<div class="layui-card">
|
|
||||||
<div class="layui-card-header">上传学校提供的数据文件</div>
|
|
||||||
<div class="layui-card-body layui-row layui-col-space10">
|
|
||||||
<div class="layui-col-md12">
|
|
||||||
<button type="button" class="pear-btn pear-btn-success" id="test3"><i class="layui-icon"></i>上传文件
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-card" id="cz" style="display: none;">
|
|
||||||
<div class="layui-card-header">操作</div>
|
|
||||||
<div class="layui-card-body layui-row layui-col-space10">
|
|
||||||
<div class="layui-col-md12">
|
|
||||||
<div class="pear-btn-group">
|
|
||||||
<button id="scjssj" class="pear-btn pear-btn-success" round>生成教师数据</button>
|
|
||||||
<button id="scxssj" class="pear-btn pear-btn-success" round>生成学生数据</button>
|
|
||||||
<button id="scxszysj" class="pear-btn pear-btn-success" round>生成学生志愿数据</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-card">
|
|
||||||
<div class="layui-card-header">日志</div>
|
|
||||||
<div class="layui-card-body">
|
|
||||||
<ul class="pear-card-status"
|
|
||||||
style="height:500px;overflow-y:auto;border: 1px solid #eee;border-radius:4px;padding-left: 20px;">
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="component/layui/layui.js"></script>
|
|
||||||
<script src="component/pear/pear.js"></script>
|
|
||||||
<script>
|
|
||||||
layui.use(['form', 'element', 'upload', 'loading'], function () {
|
|
||||||
var form = layui.form
|
|
||||||
, element = layui.element
|
|
||||||
, upload = layui.upload
|
|
||||||
, loading = layui.loading
|
|
||||||
, $ = layui.jquery;
|
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "/dsBase/xgk/getButtonShow",
|
|
||||||
type: "get",
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
if (res.success) {
|
|
||||||
if (res.show) {
|
|
||||||
$("#cz").attr("style", "display: block;");
|
|
||||||
} else {
|
|
||||||
$("#cz").attr("style", "display: none;");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
layer.msg("网络错误!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
upload.render({
|
|
||||||
elem: '#test3'
|
|
||||||
, url: '/dsBase/xgk/uploadFile'
|
|
||||||
, accept: 'file'
|
|
||||||
, before: function (obj) {
|
|
||||||
loading.Load(3, "");
|
|
||||||
}
|
|
||||||
, done: function (res) {
|
|
||||||
loading.loadRemove();
|
|
||||||
layer.msg(res.message);
|
|
||||||
let _index = 1;
|
|
||||||
let _html = ""
|
|
||||||
$.each(res, function (index, value) {
|
|
||||||
let n = value.indexOf(String(_index));
|
|
||||||
if (index === 0) {
|
|
||||||
_html = _html + "<li>";
|
|
||||||
_html = _html + "<p><b>" + value + "</b></p>";
|
|
||||||
_index++;
|
|
||||||
} else if (n != -1) {
|
|
||||||
_html = _html + "</li>";
|
|
||||||
_html = _html + "<li>";
|
|
||||||
_html = _html + "<p><b>" + value + "</b></p>";
|
|
||||||
_index++;
|
|
||||||
} else {
|
|
||||||
if (value === '通过') {
|
|
||||||
_html = _html + "<span style='color: #36B368;'>" + value + "</span><br>";
|
|
||||||
} else {
|
|
||||||
console.log(value.indexOf("创建系统中不存在的课程"));
|
|
||||||
if (value.indexOf("创建系统中不存在的课程") != -1) {
|
|
||||||
_html = _html + "<span style='color: #2D8CF0;'>" + value + "</span><br>";
|
|
||||||
} else {
|
|
||||||
_html = _html + "<span style='color: red;'>" + value + "</span><br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
_html = _html + "</li>";
|
|
||||||
|
|
||||||
$("ul").html(_html);
|
|
||||||
|
|
||||||
$("#cz").attr("style", "display: block;");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#scjssj").click(function () {
|
|
||||||
window.location = '/dsBase/xgk/getTeacherXls'
|
|
||||||
});
|
|
||||||
$("#scxssj").click(function () {
|
|
||||||
window.location = '/dsBase/xgk/getStudentXls'
|
|
||||||
});
|
|
||||||
$("#sckcjhsj").click(function () {
|
|
||||||
window.location = '/dsBase/xgk/getKcjhXls'
|
|
||||||
});
|
|
||||||
$("#scxszysj").click(function () {
|
|
||||||
window.location = '/dsBase/xgk/getXk'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -0,0 +1,43 @@
|
|||||||
|
package com.dsideal.base.Tools;
|
||||||
|
|
||||||
|
import com.jfinal.kit.PathKit;
|
||||||
|
import com.jfinal.kit.PropKit;
|
||||||
|
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
||||||
|
import com.jfinal.plugin.activerecord.Db;
|
||||||
|
import com.jfinal.plugin.druid.DruidPlugin;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
public class ClearDataBase {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
//1、配置数据库
|
||||||
|
PropKit.use("application_dev.properties");
|
||||||
|
DruidPlugin druid = new DruidPlugin(PropKit.get("jdbcUrl"), PropKit.get("user"),
|
||||||
|
PropKit.get("password").trim(), PropKit.get("driverClassName"));
|
||||||
|
druid.start();
|
||||||
|
// 配置ActiveRecord插件
|
||||||
|
ActiveRecordPlugin arp = new ActiveRecordPlugin(druid);
|
||||||
|
arp.start();
|
||||||
|
|
||||||
|
//2、清空班级表
|
||||||
|
String sql = "truncate table t_base_class";
|
||||||
|
Db.update(sql);
|
||||||
|
|
||||||
|
sql = "truncate table t_base_organization";
|
||||||
|
Db.update(sql);
|
||||||
|
|
||||||
|
sql = "truncate table t_import_student_by_excel";
|
||||||
|
Db.update(sql);
|
||||||
|
|
||||||
|
sql = "truncate table t_import_teacher_by_excel";
|
||||||
|
Db.update(sql);
|
||||||
|
|
||||||
|
sql = "truncate table t_person_duty_charge";
|
||||||
|
Db.update(sql);
|
||||||
|
|
||||||
|
//3、人员表
|
||||||
|
sql = "delete from t_sys_loginperson where login_name<>'sys1'";
|
||||||
|
Db.update(sql);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue