main
kgdxpr 1 year ago
parent 8c5bae9246
commit c02c086bf5

@ -340,8 +340,7 @@
async: false,
url: '/QingLong/base/getOrgTypePrincipalshipForTreeTable?bureau_id=' + bureauId,
success: function (res) {
modifyObject(res.data);
console.log(res.data);
modifyObject(res.data);
zwfgSelect.update({
data: [res.data]
});

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="../../component/pear/css/pear.css" />
<style>
.require-star {
position: absolute;
width: 3px;
height: 14px;
background-color: #ea4335;
top: 12px;
right: 8px;
border-radius: 1.5px;
}
.input-width {
max-width: 455px
}
.layui-form-select {
width: 455px;
}
</style>
</head>
<body>
<form class="layui-form" action="">
<div class="mainBox">
<div class="main-container">
<div class="layui-form-item">
<label class="layui-form-label" style="width: 100px !important;"><span
class="require-star"></span>名称</label>
<div class="layui-input-block">
<input type="text" name="ys_name" lay-verify="required" autocomplete="off" placeholder="请输入名称"
class="layui-input input-width">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" style="width: 100px !important;"></span><span
class="require-star"></span>日期</label>
<div class="layui-input-block">
<input type="text" id="ys_date" name="ys_date" lay-verify="required" autocomplete="off" placeholder="请输入日期"
class="layui-input input-width">
</div>
</div>
</div>
</div>
<div class="bottom">
<div class="button-container">
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save">
<i class="layui-icon layui-icon-ok"></i>
提交
</button>
<button type="reset" class="pear-btn pear-btn-sm">
<i class="layui-icon layui-icon-refresh"></i>
重置
</button>
</div>
</div>
</form>
<script src="../../component/layui/layui.js"></script>
<script src="../../component/pear/pear.js"></script>
<script src="../../component/pear/xm-select.js"></script>
<script>
layui.use(['form', 'jquery', 'laydate'], function () {
var form = layui.form;
var $ = layui.jquery;
var laydate = layui.laydate;
// 渲染日期
laydate.render({
elem: '#ys_date'
});
form.on('submit(save)', function (data) {
$.ajax({
url: '/QingLong/zjcq/createYs',
data: data.field,
type: 'post',
success: function (result) {
if (result.success) {
layer.msg("新增成功!", {
icon: 1,
time: 1300
}, function () {
parent.layer.close(parent.layer.getFrameIndex(window.name));
parent.layui.table.reload("data-table");
});
} else {
layer.msg(result.message, {
icon: 2,
time: 2000
});
}
}
});
return false;
});
function GetQueryString(name, istop) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
});
</script>
</body>
</html>

@ -0,0 +1,375 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>专家抽取</title>
<link rel="stylesheet" href="../../component/layui/css/layui.css" />
<script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
<script src="../../component/layui/layui.js"></script>
<script src="../../component/pear/xm-select.js"></script>
<style>
.wrapDiv {
width: 80%;
width: 1200px;
margin: 0 auto;
/* text-align: center; */
position: absolute;
top: 10px;
left: 0;
right: 0;
}
.leftBox {
float: left;
width: 750px;
height: 600px;
margin: 0 auto;
margin-top: 0px;
clear: both;
border: 1px solid #cccccc;
border-radius: 6px;
}
#span {
float: right;
top: 30px;
right: 185px;
}
.nameBox {
width: 100px;
height: 40px;
float: left;
border: 1px solid #cccccc;
margin-left: 20px;
margin-top: 20px;
text-align: center;
line-height: 40px;
border-radius: 6px;
}
.selectedName {
float: right;
width: 430px;
height: 600px;
border: 1px solid #cccccc;
border-radius: 6px;
overflow: hidden;
}
h1 {
text-align: center;
}
</style>
</head>
<body class="layui-form">
<div class="wrapDiv">
<div class="layui-row">
<div class="layui-col-md12">
<div>
<label class="layui-form-label"
style="width: auto;font-size: 14px;font-weight: bold;margin-bottom: 10px;">抽取设置</label>
</div>
<div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width: auto;">领域:</label>
<div class="layui-input-inline" id="lingyu" style="width: 1062px;"></div>
</div>
</div>
<div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width: auto;">分类:</label>
<div class="layui-input-inline" id="fenlei" style="width: 446px;"></div>
</div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width: auto;">抽取人数:</label>
<div class="layui-input-inline" style="width: 100px;">
<input type="number" id="personCount" value="3" placeholder="" autocomplete="off"
class="layui-input" min="1" max="20" step="1" lay-affix="number">
</div>
</div>
</div>
</div>
</div>
<div class="layui-row layui-col-space15">
<div class="layui-col-md8">
<label class="layui-form-label" style="width: auto;font-size: 14px;font-weight: bold;">候选专家</label>
<div id="leftBox" class="leftBox"></div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label"
style="width: auto;font-size: 14px;left: -46px;font-weight: bold;">专家抽取结果</label>
<div id="selectedName" class="selectedName">
<table class="layui-hide" id="tableData"></table>
</div>
</div>
</div>
<button type="button" class="layui-btn layui-bg-orange" id="btn" value="开始抽取">开始抽取</button>
<button type="button" class="layui-btn layui-bg-blue" id="save">保存结果</button>
</div>
<script>
layui.use('table', function () {
var table = layui.table;
var arr = [
{ "id": "1", "name": "吉帆", "tel": "13888888881", "org_name": "单位1" },
{ "id": "2", "name": "静慧", "tel": "13888888882", "org_name": "单位2" },
{ "id": "3", "name": "嘉歆", "tel": "13888888883", "org_name": "单位3" },
{ "id": "4", "name": "金枝", "tel": "13888888884", "org_name": "单位4" },
{ "id": "5", "name": "王大妈", "tel": "13888888885", "org_name": "单位5" },
{ "id": "6", "name": "老王", "tel": "13888888886", "org_name": "单位6" },
{ "id": "7", "name": "刘疙瘩", "tel": "13888888887", "org_name": "单位7" },
{ "id": "8", "name": "杨伟", "tel": "13888888888", "org_name": "单位8" },
{ "id": "9", "name": "韩晁", "tel": "13888888889", "org_name": "单位9" },
{ "id": "10", "name": "静涵", "tel": "13888888810", "org_name": "单位10" },
{ "id": "11", "name": "静曼", "tel": "13888888811", "org_name": "单位11" },
{ "id": "12", "name": "晶晶", "tel": "13888888812", "org_name": "单位12" },
{ "id": "13", "name": "靓影", "tel": "13888888813", "org_name": "单位13" },
{ "id": "14", "name": "嘉宝", "tel": "13888888814", "org_name": "单位14" },
{ "id": "15", "name": "李静", "tel": "13888888815", "org_name": "单位15" },
{ "id": "16", "name": "李志", "tel": "13888888816", "org_name": "单位16" },
{ "id": "17", "name": "李伟", "tel": "13888888817", "org_name": "单位17" },
{ "id": "18", "name": "家美", "tel": "13888888818", "org_name": "单位18" },
{ "id": "19", "name": "玉叶", "tel": "13888888819", "org_name": "单位19" },
{ "id": "20", "name": "静恬", "tel": "13888888820", "org_name": "单位20" },
{ "id": "21", "name": "王飞", "tel": "13888888821", "org_name": "单位21" }
];
var tableData = [];
var orgArrCount = arr.length;
var currentSelectNum = 0;
initForm();
var lingyuSelect = xmSelect.render({
el: '#lingyu',
name: 'lingyu',
autoRow: true,
direction: 'auto',
tree: {
show: true,
expandedKeys: [5],
},
toolbar: {
show: true,
showIcon: true,
},
theme: {
color: localStorage.getItem("theme-color-color"),
},
data: [
{ name: '教学与德育方面', id: 1 },
{ name: '智慧校园建设', id: 2 },
{ name: '常规技术设备', id: 3 },
{ name: '信息技术装备', id: 4 },
{ name: '创客指导与应用', id: 5 },
{ name: '创新实验室建设', id: 6 },
{ name: '网络技术与安全', id: 7 },
{ name: '资源建设与应用', id: 8 }
],
prop: {
value: "id"
}
});
var fenleiSelect = xmSelect.render({
el: '#fenlei',
name: 'fenlei',
autoRow: true,
direction: 'auto',
tree: {
show: true,
expandedKeys: [5],
},
toolbar: {
show: true,
showIcon: true,
},
theme: {
color: localStorage.getItem("theme-color-color"),
},
data: [
{ name: '高校', id: 1 },
{ name: '省直', id: 2 },
{ name: '县区', id: 3 },
{ name: '市直', id: 4 },
{ name: '公司', id: 5 },
{ name: '职业学校', id: 6 }
],
prop: {
value: "id"
}
});
// 初始化表单
function initForm() {
// 动态创建图层
dynamicCreateBox();
}
// 动态创建层
function dynamicCreateBox() {
for (var i = 0; i < arr.length; i++) {
var div = document.createElement("div");
div.innerText = arr[i].name;
div.className = "nameBox";
$("#leftBox").append(div);
};
}
// 清空小方格颜色
function clearBoxColor() {
$("#leftBox").children("div").each(function () {
$(this).css({
'background-color': '',
'color': '#000',
'border': '1px solid #cccccc'
});
});
}
// 设置选中小方格颜色
function setBoxColor() {
$("#leftBox").children("div").each(function () {
var thisText = ($(this).text());
var selectedName = arr[currentSelectNum].name;
if (thisText == selectedName) {
$(this).css({
'background-color': '#ffb800',
});
}
});
}
// 设置选中小方格颜色
function setFinalColor(_index) {
$("#leftBox").children("div").each(function () {
var thisText = ($(this).text());
var selectedName = arr[_index].name;
if (thisText == selectedName) {
// $(this).css("background-color", "#ffb800");
// $(this).css("color", "#fffff");
$(this).css({
'background-color': '#ffb800',
'color': '#fff',
'border': '1px solid #fff'
});
}
});
}
function appendSelectedName() {
clearBoxColor();
var arrTemp = [];
tableData = [];
for (var i = 0; i < $("#personCount").val(); i++) {
var num;
do {
num = getRandomInt(arr.length - 1);
} while (arrTemp.includes(num));
arrTemp.push(num);
// var div = document.createElement("div");
// div.innerText = arr[num].name;
// div.className = "nameBox";
// $("#selectedName").append(div);
tableData.push(arr[num]);
setFinalColor(num);
}
}
$("#save").click(function () {
console.log(lingyuSelect.getValue());
console.log(tableData);
});
$('#btn').click(function () {
var curentCount = arr.length;
if (curentCount < 1) {
alert("没有可选人了");
// 清空所有层的颜色
clearBoxColor();
return;
}
// 监视按钮的状态
if (this.value === "开始抽取" || this.value === "重新抽取") {
// 定时针
timeId = setInterval(function () {
// 清空所有层的颜色
clearBoxColor();
currentSelectNum = getRandomInt(arr.length - 1);
// 设置选中小方格颜色
setBoxColor();
}, 30);
this.value = "停止";
this.innerHTML = "停止";
} else {
// 清除计时器
clearInterval(timeId);
// 添加选中人
appendSelectedName();
tableRender();
// 移除
// arr.splice(currentSelectNum, 1);
this.value = "重新抽取";
this.innerHTML = "重新抽取";
}
});
function tableRender() {
table.render({
elem: '#tableData',
cols: [[ //标题栏
{ title: '序号', align: 'center', type: 'numbers', width: 50 },
{ field: 'name', align: 'center', title: '姓名', width: 75 },
{ field: 'tel', align: 'center', title: '电话', width: 125 },
{ field: 'org_name', title: '单位', width: 175 }
]],
height: '600',
data: tableData,
cellExpandedMode: "tips",
page: false, // 是否显示分页
limit: 50 // 每页默认显示的数量
});
}
function getRandomInt(max) {
min = 0; // 确保min是整数
max = Math.floor(max); // 确保max是整数
return Math.floor(Math.random() * (max - min + 1)) + min; // 返回介于min和max之间的整数
}
});
</script>
</body>
</html>

@ -0,0 +1,140 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../../component/pear/css/pear.css" />
<style>
.woo-tool-text-delimiter {
width: 1px;
height: 12px;
background: #EEEEEE;
display: inline-block;
margin: 0 6px 0 4px;
}
.woo-theme-color {
color: #2d8cf0 !important;
}
.woo-tool-span {
margin: 0 3px;
position: relative;
top: -1px;
cursor: pointer;
}
</style>
</head>
<body class="pear-container layui-form">
<div class="layui-card">
<div class="layui-card-body">
<table id="data-table"></table>
</div>
</div>
<script type="text/html" id="table-toolbar">
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
<i class="layui-icon layui-icon-add-1"></i>
新增
</button>
</script>
<script type="text/html" id="table-bar">
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="chouqu"><a
class="woo-theme-color">抽取</a></span>
<i class="woo-tool-text-delimiter"></i>
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="remove"><a
class="woo-theme-color">删除</a></span>
</script>
<script src="../../component/layui/layui.js"></script>
<script src="../../component/pear/pear.js"></script>
<script>
layui.use(['table', 'form', 'jquery', 'common', 'dtree', 'laytpl', 'tab'], function () {
var table = layui.table;
var form = layui.form;
var $ = layui.jquery;
var common = layui.common;
var dtree = layui.dtree;
var laytpl = layui.laytpl
var tab = layui.tab;
tableRender();
function tableRender() {
table.render({
elem: '#data-table',
url: '/QingLong/organization/getSchoolList',
where: {
school_type_id: -1,
parent_org_id: "064BB3C9-E8DB-45ED-B0C1-6ABC5EA3B667"
},
height: 'full-150',
page: {
limit: 15
, layout: ['count', 'prev', 'page', 'next', 'skip']
, prev: "上一页"
, next: "下一页"
},
cols: [[
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
{ title: '学校名称', field: 'org_name', align: 'center' },
{ title: '学校编码', field: 'org_code', align: 'center', width: "15%" },
{ title: '学校类型', field: 'school_type_name', align: 'center', width: "15%" },
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "35%" }
]],
skin: 'line',
toolbar: '#table-toolbar',
defaultToolbar: [{
title: '刷新',
layEvent: 'refresh',
icon: 'layui-icon-refresh',
}, 'filter', 'print', 'exports']
});
}
table.on('tool(data-table)', function (obj) {
if (obj.event === 'chouqu') {
layer.open({
type: 2,
title: '专家抽取',
shade: 0.1,
area: ['100%', '100%'],
content: './chouqu.html'
});
} else if (obj.event === 'edit') {
window.edit(obj);
}
});
table.on('toolbar(data-table)', function (obj) {
if (obj.event === 'add') {
layer.open({
type: 2,
title: '新增',
shade: 0.1,
area: ['650px', '385px'],
content: './add.html'
});
}
});
window.refresh = function (param) {
table.reload('data-table');
}
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -0,0 +1,68 @@
@charset "utf-8";
/*
*Last modified: 2022-06-25 18:38:36
*Url: https://www.axui.cn
*/
html,
body {
height: 100%;
width: 100%;
}
body {
background-image: url(../img/bg_tk.jpg);
background-repeat: no-repeat;
background-size: cover;
}
.login {
width: 1000px;
background-color: #fff;
}
.login .cover {
background-image: url(../images/login-left.jpg);
background-repeat: no-repeat;
background-size: cover;
}
.login .core {
padding-left: 28px;
}
.footer {
color: rgba(255, 255, 255, 0.5);
width: 100%;
text-align: center;
padding: 1.4rem 0;
box-sizing: border-box;
position: absolute;
left: 0;
bottom: 0;
}
.footer a {
color: rgba(255, 255, 255, 0.5);
}
@media screen and (max-width: 900px) {
body.ax-align-origin {
background-image: none;
display: block;
}
.login {
width: 100%;
box-shadow: none;
border-radius: 0;
}
.login .cover {
height: 20rem;
border-radius: 0;
}
.login .core {
padding-left: 0;
}
.login form {
margin: 0;
}
.footer {
position: inherit;
color: #666666;
}
.footer a {
color: #666666;
}
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,239 @@
<!--
Last modified: 2022-06-25 18:40:11
Url: https://www.axui.cn
-->
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="email=no" />
<meta name="wap-font-scale" content="no" />
<meta name="viewport" content="user-scalable=no, width=device-width" />
<meta content="telephone=no" name="format-detection" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登录</title>
<link href="zj_css/ax.css" rel="stylesheet" type="text/css">
<link href="zj_css/ax-response.css" rel="stylesheet" type="text/css">
<link href="zj_css/main.css" rel="stylesheet" type="text/css">
</head>
<body class="ax-align-origin">
<div class="login ax-shadow-cloud ax-radius-md">
<div class="ax-row ax-radius-md ax-split">
<div class="ax-col ax-col-14 ax-radius-left ax-radius-md cover"></div>
<div class="ax-col ax-col-10">
<div class="core">
<div class="ax-break"></div>
<div class="ax-tab" axTab>
<ul class="ax-row ax-tab-nav ax-menu-tab">
<a href="###" class="ax-item">登录账号</a>
</ul>
<ul class="ax-tab-content">
<li>
<form>
<div class="ax-break"></div>
<div class="ax-break ax-hide-tel"></div>
<div class="ax-form-group">
<div class="ax-flex-row">
<div class="ax-form-con">
<div class="ax-form-input"><span class="ax-pos-left"
style="width: 2.4rem;"><i
class="ax-iconfont ax-icon-me-f"></i></span><input
name="username" id="usernameTxt" placeholder="输入用户名"
type="text" autocomplete="off"><span class="ax-pos-right"><a
href="###"
class="ax-iconfont ax-icon-close ax-val-none"></a></span>
</div>
</div>
</div>
</div>
<div class="ax-break-md"></div>
<div class="ax-form-group">
<div class="ax-flex-row">
<div class="ax-form-con">
<div class="ax-form-input"><span class="ax-pos-left"
style="width:2.4rem;"><i
class="ax-iconfont ax-icon-lock-f"></i></span>
<input name="password" id="passwordTxt" placeholder="输入密码"
type="password"><span class="ax-pos-right" autocomplete="off"><a
href="###"
class="ax-iconfont ax-icon-close ax-val-none"></a></span>
</div>
</div>
</div>
</div>
<div class="ax-break-md"></div>
<div class="ax-form-group">
<div class="ax-flex-row">
<div class="ax-form-con">
<div class="ax-form-input">
<div class="ax-row">
<div class="ax-flex-block">
<span class="ax-pos-left" style="width:2.4rem;"><i
class="ax-iconfont ax-icon-shield-f"></i></span>
<input style="width: 265px !important;" name="username"
id="captchaTxt" placeholder="输入验证码..." value=""
type="text" autocomplete="off"><span
class="ax-pos-right" style="padding-right: 23px"><a
href="###"
class="ax-iconfont ax-icon-close ax-val-none"></a></span>
</div>
<img class="vcode-img" id="userCaptchaImage"
src="/QingLong/loginPerson/getCaptcha" alt="点击图片刷新校验码"
style="cursor:pointer"
onclick="javascript:refreshCaptcha()" />
</div>
</div>
</div>
</div>
</div>
<div class="ax-break-md"></div>
<div class="ax-break-md"></div>
<div class="ax-form-group">
<div class="ax-flex-row">
<div class="ax-flex-block">
<div class="ax-form-input"><button type="button" id="loginBtn"
class="ax-btn ax-primary ax-full">登录</button></div>
</div>
</div>
</div>
<div class="ax-break"></div>
<div class="ax-break ax-hide-tel"></div>
<div class="ax-break ax-hide-tel"></div>
</form>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!--正文结束-->
<div class="footer">
&#xa9; 版权所有&nbsp;&nbsp;长春市教育局装备信息与技术中心<span class="padding-5">&nbsp;&nbsp;|&nbsp;&nbsp;</span><a
href="https://beian.miit.gov.cn/" target="_blank">吉ICP备20000186号-1</a>
</div>
<script src="zj_js/ax.min.js" type="text/javascript"></script>
<script src="./component/pear/jsencrypt.min.js"></script>
<script src="./admin/js/jquery-3.6.0.min.js"></script>
<script>
$(function () {
$("#loginBtn").click(function () {
doLogin();
});
});
//刷新验证码
function refreshCaptcha() {
$("#userCaptchaImage").attr("src", "/QingLong/loginPerson/getCaptcha?rnd=" + Math.random().toString().slice(-6));
}
$(document).keydown(function (event) {
if (event.keyCode === 13) {//回车键对应code值为13
doLogin();
}
});
function doLogin() {
var username = $("#usernameTxt").val();
var password = $("#passwordTxt").val();
var captcha = $("#captchaTxt").val();
if (username.length === 0 || password.length === 0) {
alert("用户名或密码不允许为空!")
return;
}
userLogin(username, password, captcha);
}
//用户名登录
function userLogin(username, password, captcha) {
var publicKey = "-----BEGIN PUBLIC KEY-----\MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCcd+0zTY9Gn94iqkQJTlxYnEnCeFsLkk0a7hoAvi2B74VzDVV3xH0ZO9RkXvo1SgCB+uzbEWdrgQkzTqyjfTtgOguu3OnkVxIMJF34ibchTY0LWHGxq1m2gLGuVVqrlu1LtdV0X7xo/5zc8Mr+46veWb86kSpqe6rOAm69WWo5GwIDAQAB\-----END PUBLIC KEY-----";
var encrypt = new JSEncrypt();
encrypt.setPublicKey(publicKey);
if (userLoginCheck(username, password, captcha)) {
$.ajax({
type: "POST",
dataType: "json",
url: "/QingLong/loginPerson/doLogin",
data: {
"username": username,
"password": encrypt.encrypt(password),
"captcha": captcha,
"roles": 277
},
async: false,
success: function (result) {
if (result.success) {
window.location.href = '/QingLong/index.html';
} else {
alert(result.msg);
if (result.redirect) {
window.location.href = '/QingLong/zj_login.html';
}
refreshCaptcha();
}
}
});
}
}
//用户登录检查
function userLoginCheck(username, password, captcha) {
if (username == null || username == "") {
alert("用户名不允许为空!");
return false;
}
if (password == null || password == "") {
alert("密码不允许为空!");
return false;
}
if (captcha == null || captcha == "") {
alert("验证码不允许为空!");
return false;
}
return true;
}
</script>
</body>
</html>
Loading…
Cancel
Save