Commit e77a5b6c by lixq Committed by lixq

1

Signed-off-by: lixq's avatarLixiaoqiang <276402404@qq.com>
parent 05c8023b
...@@ -38,9 +38,9 @@ CREATE TABLE IF NOT EXISTS class_mst( ...@@ -38,9 +38,9 @@ CREATE TABLE IF NOT EXISTS class_mst(
manager_id int8 NOT NULL, manager_id int8 NOT NULL,
delete_flg tinyint(1) NOT NULL DEFAULT '0' delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8; ) ENGINE = INNODB DEFAULT CHARSET=utf8;
Create INDEX grade_mst_school_id_idx ON class_mst(school_id); Create INDEX class_mst_school_id_idx ON class_mst(school_id);
Create INDEX grade_mst_grade_id_idx ON class_mst(grade_id); Create INDEX class_mst_grade_id_idx ON class_mst(grade_id);
Create INDEX grade_mst_class_no_idx ON class_mst(class_no); Create INDEX class_mst_class_no_idx ON class_mst(class_no);
----organization_mst ----organization_mst
...@@ -60,7 +60,21 @@ CREATE TABLE IF NOT EXISTS organization_mst( ...@@ -60,7 +60,21 @@ CREATE TABLE IF NOT EXISTS organization_mst(
status varchar(255) NOT NULL DEFAULT 'NEW', status varchar(255) NOT NULL DEFAULT 'NEW',
delete_flg tinyint(1) NOT NULL DEFAULT '0' delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8; ) ENGINE = INNODB DEFAULT CHARSET=utf8;
Create INDEX grade_mst_id_idx ON organization_mst(id); Create INDEX organization_mst_id_idx ON organization_mst(id);
Create INDEX grade_mst_submit_date_idx ON organization_mst(submit_date); Create INDEX organization_mst_submit_date_idx ON organization_mst(submit_date);
Create INDEX grade_mst_status_idx ON organization_mst(status); Create INDEX organization_mst_status_idx ON organization_mst(status);
----government_mst
DROP TABLE IF EXISTS government_mst;
CREATE TABLE IF NOT EXISTS government_mst(
id int8 unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
province varchar(64) NOT NULL,
city varchar(64),
district varchar(64),
title varchar(64) NOT NULL,
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8;
Create INDEX government_mst_province_idx ON government_mst(province);
Create INDEX government_mst_city_idx ON government_mst(city);
Create INDEX government_mst_district_idx ON government_mst(district);
\ No newline at end of file
<?php
/**
* GovernmentMst Entity
* $Id: GovernmentMst.inc,v 1.1 2020/1/03 12:59:25 AIMS Exp $
* @author lixq
* @package jp.fishow.entity
* @access public
*/
class GovernmentMst extends CompassDynamicData
{
var $province;
var $city;
var $district;
var $title;
var $delete_flg;
/**
*
*
* @access public
* @param mixed class_mst
*/
function constructor($record)
{
parent::constructor($record);
$this->province = $record["province"];
$this->city = $record["city"];
$this->district = $record["district"];
$this->title = $record["title"];
$this->delete_flg = $record["delete_flg"];
}
/**
*
* @access public
* @static
* @param array
* @return array Entity
*/
public static function getList($w_param = null, $orderkey = null, $direction = "ASC", $offset = null, $limit = null)
{
if ($w_param == null) {
$w_param = array();
$w_param["delete_flg"] = "false";
}
return CompassDBHandler::getList("GovernmentMst", "government_mst", $w_param, $orderkey, $direction, $offset, $limit);
}
/**
*
* @access public
* @static
* @param array
* @return array Entity
*/
public static function getListCount($w_param = null)
{
if ($w_param == null) {
$w_param = array();
$w_param["delete_flg"] = "false";
}
$db = CompassDBManager::getInstance();
$result = $db->doSelect("government_mst", $w_param, null, null, null, null, "count(*) as count");
return $result[0]["count"];
}
/**
*
*/
public static function getById($id)
{
// delete_flg
$param = array();
$param["delete_flg"] = false;
return CompassDBHandler::getById("GovernmentMst", "government_mst", $id, $param);
}
/**
*
* DynamicData
* @access public
* @return int
*/
public function save()
{
$v_param = array();
ParamUtil::copyObj2Array($v_param, $this, "province");
ParamUtil::copyObj2ArrayNullField($v_param, $this, "city");
ParamUtil::copyObj2ArrayNullField($v_param, $this, "district");
ParamUtil::copyObj2Array($v_param, $this, "title");
ParamUtil::copyObj2Array($v_param, $this, "delete_flg");
// 保存
parent::_save("government_mst", $v_param);
}
}
\ No newline at end of file
...@@ -5,16 +5,14 @@ ...@@ -5,16 +5,14 @@
* @author zongbiao * @author zongbiao
* @package jp.fishow.entity.definition * @package jp.fishow.entity.definition
*/ */
class AuthorityLevel class AcountModule
{ {
public $id; public $id;
public $level; public $module;
public $model;
function __construct($record) { function __construct($record) {
$this->id = $record["id"]; $this->id = $record["id"];
$this->level = $record["level"]; $this->module = $record["module"];
$this->model = $record["model"];
} }
/** /**
...@@ -27,33 +25,42 @@ class AuthorityLevel ...@@ -27,33 +25,42 @@ class AuthorityLevel
if ((!is_array($result)) || (count($result) < 1)) { if ((!is_array($result)) || (count($result) < 1)) {
$data = array(); $data = array();
//系统管理员 $tmp = array("id"=>1, "module"=>"账户管理");
$tmp = array("id"=>1, "level"=>"0", "model"=>"ACCOUNT|EVENT|CHECK");
array_push($data, $tmp); array_push($data, $tmp);
//省厅级权限 $tmp = array("id"=>2, "module"=>"领导机构管理");
$tmp = array("id"=>2, "level"=>"1", "model"=>"ACCOUNT|CHECK");
array_push($data, $tmp); array_push($data, $tmp);
//市级权限 $tmp = array("id"=>3, "module"=>"学校管理");
$tmp = array("id"=>3, "level"=>"2", "model"=>"ACCOUNT|CHECK");
array_push($data, $tmp); array_push($data, $tmp);
//区县管局权限 $tmp = array("id"=>4, "module"=>"班级管理");
$tmp = array("id"=>4, "level"=>"3", "model"=>"ACCOUNT|CHECK");
array_push($data, $tmp); array_push($data, $tmp);
//学校级别权限 $tmp = array("id"=>5, "module"=>"公益活动发布");
$tmp = array("id"=>5, "level"=>"4", "model"=>"ACCOUNT|CHECK");
array_push($data, $tmp); array_push($data, $tmp);
//班级级别权限 $tmp = array("id"=>6, "module"=>"公益活动审核");
$tmp = array("id"=>6, "level"=>"5", "model"=>"ACCOUNT|CHECK"); array_push($data, $tmp);
$tmp = array("id"=>7, "module"=>"社会实践发布");
array_push($data, $tmp);
$tmp = array("id"=>8, "module"=>"社会实践审核");
array_push($data, $tmp);
$tmp = array("id"=>9, "module"=>"亲子活动发布");
array_push($data, $tmp);
$tmp = array("id"=>10, "module"=>"亲子活动审核");
array_push($data, $tmp);
$tmp = array("id"=>11, "module"=>"公益课堂管理");
array_push($data, $tmp); array_push($data, $tmp);
$result = array(); $result = array();
foreach ($data as $row) { foreach ($data as $row) {
$tmp2 = new AuthorityLevel($row); $tmp2 = new AcountModule($row);
array_push($result, $tmp2); array_push($result, $tmp2);
} }
} }
...@@ -62,10 +69,10 @@ class AuthorityLevel ...@@ -62,10 +69,10 @@ class AuthorityLevel
/** /**
* IDから対応するインスタンスを返します。 * IDから対応するインスタンスを返します。
* @return AuthorityLevel 対応するインスタンス。ない場合null。 * @return AcountModule 対応するインスタンス。ない場合null。
*/ */
public static function getById($id) { public static function getById($id) {
$list = AuthorityLevel::getList(); $list = AcountModule::getList();
foreach ($list as $tmp) { foreach ($list as $tmp) {
if ($tmp->id == $id) { if ($tmp->id == $id) {
return $tmp; return $tmp;
...@@ -76,10 +83,10 @@ class AuthorityLevel ...@@ -76,10 +83,10 @@ class AuthorityLevel
/** /**
* 定義名から対応するインスタンスを返します。 * 定義名から対応するインスタンスを返します。
* @return AuthorityLevel 対応するインスタンス。ない場合null。 * @return AcountModule 対応するインスタンス。ない場合null。
*/ */
public static function getByName($name) { public static function getByName($name) {
$list = AuthorityLevel::getList(); $list = AcountModule::getList();
foreach ($list as $tmp) { foreach ($list as $tmp) {
if ($tmp->name == $name) { if ($tmp->name == $name) {
return $tmp; return $tmp;
...@@ -87,25 +94,4 @@ class AuthorityLevel ...@@ -87,25 +94,4 @@ class AuthorityLevel
} }
return null; return null;
} }
/**
* 通过定义名取得标题,用于显示
* @return
*/
public static function getTitlesByNames($names) {
if (empty($names)) {
return "拥有全部权限";
}
if (!is_array($names)) {
$names = explode(",", $names);
}
$list = AuthorityLevel::getList();
$result = array();
foreach ($list as $tmp) {
if (in_array($tmp->name, $names)) {
array_push($result, $tmp->title);
}
}
return implode(",", $result);
}
} }
\ No newline at end of file
...@@ -56,7 +56,7 @@ $arr = array(); ...@@ -56,7 +56,7 @@ $arr = array();
$arr["path"] = $path; $arr["path"] = $path;
$arr["width"] = 600; $arr["width"] = 600;
$arr["auto_color"] = true; $arr["auto_color"] = true;
$arr["line_color"] = "{'r':'0',"g":"0","b":"0"}"; $arr["line_color"] = "{'r':'0','g':'0','b':'0'}";
$data = json_encode($arr); $data = json_encode($arr);
$url = "https://api.weixin.qq.com/cgi-bin/wxaapp/getwxacode?access_token=" . $access_token; $url = "https://api.weixin.qq.com/cgi-bin/wxaapp/getwxacode?access_token=" . $access_token;
......
...@@ -447,3 +447,51 @@ th.contents_title { ...@@ -447,3 +447,51 @@ th.contents_title {
text-align:center; text-align:center;
} }
/*******2020/1/3添加新式样开始*******/
.result_list{
width: 99%;
overflow-x: hidden;
margin-top: 20px;
}
.result_list .cell{
text-align: center;
}
.list_title{
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 10px;
}
.edit_title{
font-weight: bold;
}
.edit_content{
width: 100%;
padding-left: 50px;
}
.el-input__inner{
height: 30px!important;
line-height: 30px;
text-align: center;
}
.input_100,.input_200,.input_300{
height: 30px;
margin-bottom:15px;
}
.input_100{
width: 100px !important;
}
.input_200{
width: 200px !important;
}
.input_300{
width: 300px !important;
}
.edit_btn{
padding: 5px 10px;
}
.begin_blank{
margin-left:10px;
font-size: 10pt;
}
/*******2020/1/3添加新式样结束*******/
<?php
/**
* 领导机构删除
* $Id: government_delete_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$government_mst = GovernmentMst::getById($id);
if ($government_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_list.inc";
$layout_pages["menu_clicked"] = "menu_grade";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 数据库更新
$government_mst->delete_flg = true;
$government_mst->save();
// 跳到一览页
header("Location:government_list.php");
exit;
<?php
/**
* 领导机构编辑
* $Id: government_edit.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$government_mst = GovernmentMst::getById($id);
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_edit_input.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 领导机构编辑完成
* $Id: government_edit_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$title = ParamUtil::getRequestString("title");
$government_mst = GovernmentMst::getById($id);
$government_mst->title = $title;
$government_mst->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_edit_result.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 领导机构
* $Id: government_list.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 一览取得
$param = array();
$param["delete_flg"] = false;
$government_list = GovernmentMst::getList($param,"id","asc");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_list.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 领导机构CSV下载
* $Id: government_list_csv_download.php
* @author lixq
* @access public
* @package manager.public_html
*/
header("Cache-Control:no-cache,must-revalidate,no-store");
header("Pragma:no-cache");
header("Expires:-1");
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$government_mst = GovernmentMst::getList();
ini_set("memory_limit", "1024M");
$data = array();
$header = array("区域(省级)","区域(市级)","区域(区县)","名称");
array_push($data, $header);
if (count($government_mst) > 0) {
foreach($government_mst as $tmp) {
array_push($data, array($tmp->province,$tmp->city,$tmp->district,$tmp->title));
}
}
// 出力
$output_file_name = "领导机构". date("YmdHis") . ".csv";
$csv = new CsvFormat($data);
$csv->setEncodingConvert(true,"UTF-8");
$csv->setFileName($output_file_name);
$csv->printOut();
exit;
?>
\ No newline at end of file
<?php
/**
* 领导机构新增
* $Id: government_new.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_new.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 领导机构新增完成
* $Id: government_new_result.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
*/
// 底层包含
require_once("manager_include.inc");
// 登录检查
require_once("check_login.inc");
// 权限检查
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$csv_file = FileUploadUtil::getScalarFile($_FILES["csv_file"]);
$file_type = strrchr($csv_file->name, ".");
$file_size = $csv_file->size;
$csv_error_msg = "";
if ($file_size < 1) {
// 检查文件大小
$csv_error_msg = "请选择CSV文件";
}else{
// ファイルを読みます
$reader = new CsvReader($csv_file->tmp_name, ",");
$reader->parse();
$csv_file_content = $reader->getResult();
// コラム数チェック
if (count($csv_file_content) < 1 || count($csv_file_content[0]) != 4) {
ErrorLogger::doOutput("count_file_rows:" . count($csv_file_content) . "count_file_field:" . count($csv_file_content[0]), "government_new_result.php");
$csv_error_msg = "文件出现错误,请检查";
}else{
foreach ($csv_file_content as $index=>$tmp) {
if($index == 0){
continue;
}
$province = trim($tmp[0]);
if(empty($province)){
continue;
}
$city = trim($tmp[1]);
$district = trim($tmp[2]);
$title = trim($tmp[3]);
// check
if (empty($title)) {
if(empty($city) && empty($district)){
$title = $province . "教育厅";
}else if(!empty($city) && empty($district)){
$title = $province . $city . "教育局";
}else if(!empty($city) && !empty($district)){
$title = $province . $city . $district . "教育局";
}
}
$params = [];
$params["delete_flg"] = false;
$params["province"] = $province;
$params["city"] = $city;
$params["district"] = $district;
$params["title"] = $title;
$government_count = GovernmentMst::getListCount($params);
if($government_count < 1){
// DBに保存
$government_mst = new GovernmentMst();
$government_mst->province = $province;
$government_mst->city = $city;
$government_mst->district = $district;
$government_mst->title= $title;
$government_mst->save();
}
}
}
}
if (!empty($csv_error_msg)) {
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_new.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "government_new_result.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
global $upload_thumbnail; global $upload_thumbnail;
global $thumbnail_error_msg; global $thumbnail_error_msg;
?> ?>
<b试卷添加/编集</b><br /> <b>试卷添加/编集</b><br />
<br /> <br />
<form name="examination_mst_edit" action="examination_mst_edit_result.php" method="post"> <form name="examination_mst_edit" action="examination_mst_edit_result.php" method="post">
<input type="hidden" name="id" value="<?=$id ?>" /> <input type="hidden" name="id" value="<?=$id ?>" />
......
<?php
/**
* 领导机构编辑
* $Id: government_edit.php,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @package manager.public_html
**/
?>
<div id="change">
<p class="edit_title">领导机构编辑</p>
<div class="edit_content">
<p>省级名称</p>
<p class="begin_blank"><?=htmlspecialchars($government_mst->province) ?></p>
<p>市级名称</p>
<p class="begin_blank"><?=htmlspecialchars($government_mst->city) ?>&nbsp;</p>
<p>区县名称</p>
<p class="begin_blank"><?=htmlspecialchars($government_mst->district) ?>&nbsp;</p>
<p>教育管局名称</p>
<el-input v-model="name" class="input_200"></el-input><br />
<el-button type="danger" @click="edit()" class="edit_btn">编辑</el-button>
<el-button type="danger" @click="back()" class="edit_btn">返回</el-button>
</div>
</div>
<script type="text/javascript">
new Vue({
el:'#change',
data:{
id:<?=$id?$id:0 ?>,
name:'<?=htmlspecialchars($government_mst->title) ?>'
},
mounted:function(){
var form = document.createElement("form");
document.getElementById('change').appendChild(form);
form.setAttribute('id','form');
form.setAttribute('method','post');
form.setAttribute('action','government_edit_result.php');
form.style.display='none';
var generateHideElement = function (type,name, value) {
var tempInput = document.createElement("input");
tempInput.id=name;
tempInput.type = type;
tempInput.name = name;
tempInput.value = value;
return tempInput;
}
var input1 = generateHideElement('hidden','id',this.id);
var input2 = generateHideElement('hidden','title',this.name);
form.appendChild(input1);
form.appendChild(input2);
},
methods:{
edit:function(){
if(!this.name){
this.$message({
type: 'error',
message: '请输入教育管局名称!'
});
return;
}
$('#title').val(this.name)
$('#form').submit();
},
back:function(){
window.history.go(-1);
}
}
})
</script>
<?php
/**
* 领导机构编辑完成
* $Id: government_edit_result.inc,v 1.12020/01/03 11:18:46 Exp $
* @author lixq
* @access public
* @package manager.templates
*/
?>
<br />
领导机构更新完成!
<br />
<br />
<div id="result">
<el-button type="danger" @click="back()" class="edit_btn">返回</el-button>
</div>
<script type="text/javascript">
new Vue({
el:'#result',
methods:{
back:function(){
window.location.href='./government_list.php';
}
}
})
</script>
\ No newline at end of file
<?php
/**
* 领导机构
* $Id: government_list.inc,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @access public
* @package manager.templates
*/
global $government_list;
?>
<div id="classSetting">
<div class="list_title">
领导机构
<div style="float: right;">
<el-button type="primary" style="margin-right: 10px;" @click="addGovernment()">领导机构添加</el-button>
<el-button type="primary" style="margin-right: 10px;" @click="csvDownload()">领导机构下载</el-button>
</div>
</div>
<br />
<div class="result_list">
<el-table :data="tableData" border>
<el-table-column prop="id" label="编号" ></el-table-column>
<el-table-column prop="province" label="省级名称" width=""></el-table-column>
<el-table-column prop="city" label="市级名称" width=""></el-table-column>
<el-table-column prop="district" label="区县名称" width=""></el-table-column>
<el-table-column prop="title" label="教育管局名称" width=""></el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button @click="handleChange(scope.row)" type="text" size="small">编辑</el-button>
<el-button type="text" size="small" @click.native.prevent="deleteRow(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<script type="text/javascript">
var list=[];
<?
foreach ($government_list as $government_mst) {
?>
var data={
id:<?=$government_mst->id ?>,
province:'<?=$government_mst->province?>',
city:'<?=$government_mst->city?>',
district:'<?=$government_mst->district?>',
title:'<?=$government_mst->title ?>'
};
list.push(data);
<?
}
?>
new Vue({
el:'#classSetting',
data:{
tableData: list
},
methods:{
handleChange(row) {
console.log(row);
window.location.href='government_edit_input.php?id='+row.id;
},
deleteRow(rows) {
this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
// rows.splice(index, 1);
window.location.href='government_delete_result.php?id='+rows.id;
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
addGovernment(){
window.open('government_new.php','_self')
},
csvDownload(){
window.location.href='government_list_csv_download.php';
}
}
})
</script>
\ No newline at end of file
<?php
/**
* 领导机构新增
* $Id: government_new.inc,v 1.12020/01/03 11:18:46 Exp $
* @author lixq
* @access public
* @package manager.templates
*/
global $csv_error_msg;
?>
<div id="change">
<p class="edit_title">领导机构新增</p>
<div class="edit_content">
<p>CSV文件</p>
</div>
</div>
<script type="text/javascript">
new Vue({
el:'#change',
mounted:function(){
var form = document.createElement("form");
document.getElementById('change').appendChild(form);
form.setAttribute('id','form');
form.setAttribute('method','post');
form.setAttribute('action','government_edit_result.php');
form.style.display='none';
var generateHideElement = function (type,name, value) {
var tempInput = document.createElement("input");
tempInput.id=name;
tempInput.type = type;
tempInput.name = name;
tempInput.value = value;
return tempInput;
}
},
methods:{
edit:function(){
if(!this.name){
this.$message({
type: 'error',
message: '请输入教育管局名称!'
});
return;
}
$('#title').val(this.name)
$('#form').submit();
},
back:function(){
window.history.go(-1);
}
}
})
</script>
<div class="page_title">领导机构新增</div>
<br />
<form action="government_new_result.php" method="post" name="government_new_input" enctype="multipart/form-data">
<table>
<tr>
<td>CSV文件
</td>
</tr>
<tr>
<td class="begin_blank">
<input type="file" name="csv_file" accept=".csv"/><br/>
<font color="#ff0000"><?=$csv_error_msg ?></font>
</td>
</tr>
</table><br />
<input type="submit" class="button_width_normal" onclick="doCheck()" value="新增" />
<input type="button" onClick="window.location='./government_list.php'" value="返回" class="button_width_normal" />
</form>
<?php
/**
* 领导机构新增完成
* $Id: government_new_result.inc,v 1.12020/01/03 11:18:46 Exp $
* @author lixq
* @access public
* @package manager.templates
*/
?>
<br />
领导机构新增完成
<br />
<br />
<input type="button" onClick="window.location='./government_list.php'" value="返回" class="button_width_normal" />
...@@ -36,11 +36,11 @@ global $school_id; ...@@ -36,11 +36,11 @@ global $school_id;
} }
</style> </style>
<div id="change"> <div id="change">
<p style="font-weight: bold;">年级添加</p> <p class="edit_title">年级添加</p>
<div style="width: 100%;padding-left: 50px;"> <div class="edit_content">
<p>年级名称</p> <p>年级名称</p>
<el-input v-model="name" style="width: 100px;height: 30px;margin: 15px 0;"></el-input><br /> <el-input v-model="name" class="input_100"></el-input><br />
<el-button type="danger" @click="edit()" style="padding: 5px 10px;">编辑</el-button> <el-button type="danger" @click="edit()" class="edit_btn">编辑</el-button>
</div> </div>
</div> </div>
......
...@@ -10,54 +10,18 @@ ...@@ -10,54 +10,18 @@
global $account_list; global $account_list;
?> ?>
<!--<div class="page_title">年级设定</div>
<div class="page_buttons">
<a class="flatbutton" href="grade_edit_input.php?action_type=new">年级添加</a>
</div>
<br />
<div id="result_list" style="width:50%;">
<table >
<tr>
<th class="contents_title" width="75%">年级名称</th>
<th class="contents_title" width="25%">操作</th>
<?
foreach ($grade_list as $grade_mst) {
?>
<tr>
<td align="center"><?=htmlspecialchars($grade_mst->title) ?></td>
<td align="center">
<a class="flatbutton" href="grade_edit_input.php?action_type=edit&id=<?=$grade_mst->id ?>">编辑</a>
<a class="flatbutton" href="javascript:void(0);if (confirm('确定要删除吗?')) location.href='grade_delete_result.php?id=<?=$grade_mst->id ?>';">删除</a>
</td>
</tr>
<?
}
?>
</table>
</div>-->
<style type="text/css"> <style type="text/css">
.conClasstable{ .result_list{
width: 701px; width: 701px;
overflow-x: hidden;
margin-top: 20px;
}
.conClasstable .cell{
text-align: center;
} }
</style> </style>
<div id="classSetting"> <div id="classSetting">
<div style="display: flex;justify-content: space-between;align-items: center;padding-left: 10px;"> <div class="list_title">
年级设定<el-button type="primary" style="margin-right: 10px;" @click="addClass()">年级添加</el-button> 年级设定<el-button type="primary" style="margin-right: 10px;" @click="addClass()">年级添加</el-button>
</div> </div>
<div class="conClasstable"> <div class="result_list">
<el-table <el-table :data="tableData" border style="width: 100%">
:data="tableData"
border
style="width: 100%">
<el-table-column <el-table-column
prop="name" prop="name"
label="年级名称" label="年级名称"
......
...@@ -51,7 +51,7 @@ $title = "管理员登陆"; ...@@ -51,7 +51,7 @@ $title = "管理员登陆";
<el-input type="password" v-model="ruleForm.password" autocomplete="off"></el-input> <el-input type="password" v-model="ruleForm.password" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')" style="margin-left: 87px;">登陆</el-button <el-button type="primary" @click="submitForm('ruleForm')" style="margin-left: 87px;">登陆</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
......
...@@ -17,7 +17,7 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/AccountMst.inc"); ...@@ -17,7 +17,7 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/AccountMst.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/GradeMst.inc"); require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/GradeMst.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/ClassMst.inc"); require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/ClassMst.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/OrganizationMst.inc"); require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/OrganizationMst.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/GovernmentMst.inc");
// definition // definition
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/definition/ImageType.inc"); require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/definition/ImageType.inc");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment