Commit d4f0ed06 by biao
parents 4e7774e7 56fb6f87
......@@ -96,5 +96,17 @@ class AccountRole
return null;
}
/**
*
* @return AccountRole
*/
public static function getByTitle($title) {
$list = AccountRole::getList();
foreach ($list as $tmp) {
if ($tmp->title == $title) {
return $tmp;
}
}
return null;
}
}
\ No newline at end of file
......@@ -138,7 +138,7 @@ class CompassHandler{
* 获取去重后的解梦关键词列表
*/
public static function getUniqueDreamListByCategoryId($categoty_id, $offset, $limit) {
$db = &DivinationsDBManager::getInstance();
$db = &CompassDBManager::getInstance();
$sql = "select distinct category_id, dream_id, title from dream_dat where delete_flg=false";
if(isset($categoty_id)) {
$sql .= " and category_id=".$categoty_id;
......@@ -161,7 +161,7 @@ class CompassHandler{
* 获取单个广告合计后的去重点击数
*/
public static function getSumUniqueAdClickCount($adid, $object_date) {
$db = &DivinationsDBManager::getInstance();
$db = &CompassDBManager::getInstance();
$sql = "select sum(unique_click_count) as count from miniplay_ad_click_dat where delete_flg=false and channel_id<>'0' and adid='" . $adid . "' and object_date='" . $object_date . "'";
$result = $db->executeQuery($sql);
......@@ -176,7 +176,7 @@ class CompassHandler{
*/
public static function insertPointLog($openid, $action_type, $point, $status) {
if(empty($openid) || $openid=="undefined") return;
$db = &DivinationsDBManager::getInstance();
$db = &CompassDBManager::getInstance();
$insert_sql = "insert into miniplay_user_point_log (openid, action_type, point, status) VALUES ('{$openid}', '{$action_type}','{$point}','{$status}')";
$db->executeQuery($insert_sql);
......@@ -199,7 +199,7 @@ class CompassHandler{
*/
public static function insertPointLogByUID($uid, $action_type, $point, $status) {
if(empty($uid) || $uid=="undefined") return;
$db = &DivinationsDBManager::getInstance();
$db = &CompassDBManager::getInstance();
$insert_sql = "insert into miniplay_user_point_log (openid, action_type, point, status) VALUES ('{$uid}', '{$action_type}','{$point}','{$status}')";
$db->executeQuery($insert_sql);
......@@ -236,7 +236,7 @@ class CompassHandler{
*/
public static function insertOctopusPointLog($openid, $action_type, $group_id, $point) {
if(empty($openid) || $openid=="undefined") return;
$db = &DivinationsDBManager::getInstance();
$db = &CompassDBManager::getInstance();
$insert_sql = "insert into octopus_user_point_log (openid, action_type, group_id, point) VALUES ('{$openid}', '{$action_type}','{$group_id}','{$point}')";
$db->executeQuery($insert_sql);
......@@ -258,7 +258,7 @@ class CompassHandler{
*/
public static function insertTrafficLog($channel_id, $openid, $adid) {
if(empty($openid) || $openid=="undefined") return;
$db = &DivinationsDBManager::getInstance();
$db = &CompassDBManager::getInstance();
$insert_sql = "insert into miniplay_traffic_click_log (channel_id, openid, adid) VALUES ('{$channel_id}', '{$openid}','{$adid}')";
$db->executeQuery($insert_sql);
return;
......@@ -379,6 +379,25 @@ class CompassHandler{
public static function callbackCmpPriority($a, $b) {
return $a["idx"] < $b["idx"] ? true : false;
}
/**
* 新增account时使用的学校list
*/
public static function getSchoolListForAccount() {
$sql = "select id,title from school_mst where delete_flg = false order by id asc";
$db = &CompassDBManager::getInstance();
$result = $db->executeQuery($sql);
return $result;
}
/**
* 新增account时使用的领过机构list
*/
public static function getGovernmentlListForAccount() {
$sql = "select id,title from government_mst where delete_flg = false order by id asc";
$db = &CompassDBManager::getInstance();
$result = $db->executeQuery($sql);
return $result;
}
}
?>
\ No newline at end of file
......@@ -16,11 +16,10 @@ require_once("check_login.inc");
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
......@@ -30,10 +29,9 @@ $account_mst = AccountMst::getById($id);
if ($account_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$id = $account_mst->id;
......@@ -41,18 +39,29 @@ $login = $account_mst->login;
$password = $account_mst->password;
$name = $account_mst->name;
$contact = $account_mst->contact;
$authority_level_array = explode(",", AuthorityLevel::getById($account_mst->authority_level));
$comment = $account_mst->comment;
$government_id = $account_mst->government_id;
$school_id = $account_mst->school_id;
$role_id = $account_mst->role;
$modules = $account_mst->modules;
if(!empty($modules)){
$modules = implode(",", explode("|", $modules));
}
// 权限一览取得
$authority_level_list = AuthorityLevel::getList();
$modules_list = AcountModule::getList();
$account_role_list = AccountRole::getList();
$school_list = CompassHandler::getSchoolListForAccount();
$government_list = CompassHandler::getGovernmentlListForAccount();
print_r($authority_level_list);
// 页面表示
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/account_edit_input.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_system";
$layout_pages["middle"] = "account_edit_input.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
$layout_pages["left"] = "menu.inc";
$layout_pages["menu_clicked"] = "4-1";
$layout_pages["right"] = "account_edit_input.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
/*
* 管理员管理
* $Id: account_new_input.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author wanggb
......@@ -16,25 +16,25 @@ require_once("check_login.inc");
if (!checkAuthority("ADMIN")) {
// エラー表示
$layout_pages = array();
$layout_pages["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
// 初始值
$authority_level_array = array();
// 权限一览取得
$authority_level_list = AuthorityLevel::getList();
$modules_list = AcountModule::getList();
$account_role_list = AccountRole::getList();
$school_list = CompassHandler::getSchoolListForAccount();
$government_list = CompassHandler::getGovernmentlListForAccount();
// 页面表示
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/account_new_input.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_system";
$layout_pages["middle"] = "account_new_input.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "account_new_input.inc";
$layout_pages["menu_clicked"] = "4-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
/*
* 管理员管理
* $Id: account_new_result.php,v 1.1 2015/10/08 11:18:46 wanggb Exp $
* @author wanggb
......@@ -28,27 +28,43 @@ if (!checkAuthority("ADMIN")) {
$name = ParamUtil::getRequestString("name");
$login = ParamUtil::getRequestString("login");
$password = ParamUtil::getRequestString("password");
$phone = ParamUtil::getRequestString("phone");
$authority_type_array = ParamUtil::getRequestArray("authority_type", array());
$contact = ParamUtil::getRequestString("contact");
$comment = ParamUtil::getRequestString("comment");
$account_role = ParamUtil::getRequestString("account_role");
$modules_array = ParamUtil::getRequestArray("modules", array());
$organization = ParamUtil::getRequestString("organization");
ErrorLogger::doOutput("name " . $name);
ErrorLogger::doOutput("login " . $login);
ErrorLogger::doOutput("password " . $password);
ErrorLogger::doOutput("account_rol " . $account_role);
ErrorLogger::doOutput("contact " . $contact);
ErrorLogger::doOutput("comment " . $comment);
ErrorLogger::doOutput(print_r($modules_array,1));
ErrorLogger::doOutput("organization " . $organization);
exit;
// 登陆帐号唯一性判断
$param = array();
$param["delete_flg"] = false;
$param["login"] = $login;
$account_list = AccountMst::getList($param);
if (count($account_list) > 0) {
$error_message_login = "登陆帐号已经被使用,请换一个。";
$error_message = "登陆帐号已经被使用,请换一个。";
// 权限一览取得
$authority_type_list = AuthorityType::getList();
$modules_list = AcountModule::getList();
$account_role_list = AccountRole::getList();
$school_list = CompassHandler::getSchoolListForAccount();
$government_list = CompassHandler::getGovernmentlListForAccount();
// 页面表示
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/account_new_input.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_system";
$layout_pages["middle"] = "account_new_input.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "account_new_input.inc";
$layout_pages["menu_clicked"] = "4-1";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
......@@ -57,8 +73,19 @@ $account_mst = new AccountMst();
$account_mst->login = $login;
$account_mst->password = $password;
$account_mst->name = $name;
$account_mst->phone = $phone;
$account_mst->authority = implode(",", $authority_type_array);
$account_mst->contact = $contact;
$account_mst->comment = $comment;
if(count($modules_array) == 0){
$modules_array = [1,2,3,4,5,6,7,8,9,10,11,12,13];
}
$account_mst->modules = implode("|", $modules_array);
$account_mst->role = $account_role;
if($role_id <=6){
$account_mst->government_id = $organization;
}else if($role_id >= 8 && $role_id <= 9){
$account_mst->school_id = $organization;
}
$account_mst->save();
// 跳到一览页
......
......@@ -37,18 +37,20 @@ function checkAuthority($allow_types = null) {
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
}
ErrorLogger::doOutput($allow_types . $_account->modules,0);
// 超级管理员 或 无限制的场合,返回true
if (empty($allow_types)) {
return false;
}
return true;
// // 超级管理员 或 无限制的场合,返回true
// if (empty($allow_types)) {
// return false;
// }
$account_authority_type_list = explode("|", $_account->modules);
foreach ($account_authority_type_list as $account_authority_type) {
if ($allow_types == $account_authority_type) {
return true;
}
}
return false;
// $account_authority_type_list = explode("|", $_account->modules);
// foreach ($account_authority_type_list as $account_authority_type) {
// if ($allow_types == $account_authority_type) {
// return true;
// }
// }
// return false;
}
?>
\ No newline at end of file
......@@ -26,6 +26,16 @@ if (!checkAuthority("2")) {
$id = ParamUtil::getRequestString("id");
$title = ParamUtil::getRequestString("title");
$government_mst = GovernmentMst::getById($id);
if ($government_mst == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$layout_pages["menu_clicked"] = "4-2";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
$government_mst->title = $title;
$government_mst->save();
......
/* axios v0.19.0 | (c) 2019 by Matt Zabriskie */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new i(e),n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n(3),i=n(5),a=n(22),u=n(11),c=r(u);c.Axios=i,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(10),c.all=function(e){return Promise.all(e)},c.spread=n(25),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===j.call(e)}function o(e){return"[object ArrayBuffer]"===j.call(e)}function s(e){return"undefined"!=typeof FormData&&e instanceof FormData}function i(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function a(e){return"string"==typeof e}function u(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===j.call(e)}function d(e){return"[object File]"===j.call(e)}function l(e){return"[object Blob]"===j.call(e)}function h(e){return"[object Function]"===j.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function g(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function x(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}function w(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=w(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)v(arguments[n],e);return t}function b(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=b(t[n],e):"object"==typeof e?t[n]=b({},e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)v(arguments[n],e);return t}function E(e,t,n){return v(t,function(t,r){n&&"function"==typeof t?e[r]=S(t,n):e[r]=t}),e}var S=n(3),R=n(4),j=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:o,isBuffer:R,isFormData:s,isArrayBufferView:i,isString:a,isNumber:u,isObject:f,isUndefined:c,isDate:p,isFile:d,isBlob:l,isFunction:h,isStream:m,isURLSearchParams:y,isStandardBrowserEnv:x,forEach:v,merge:w,deepMerge:b,extend:E,trim:g}},function(e,t){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new i,response:new i}}var o=n(2),s=n(6),i=n(7),a=n(8),u=n(22);r.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=u(this.defaults,e),e.method=e.method?e.method.toLowerCase():"get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},r.prototype.getUri=function(e){return e=u(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(o.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(o.isURLSearchParams(t))s=t.toString();else{var i=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),i.push(r(t)+"="+r(e))}))}),s=i.join("&")}if(s){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),s=n(9),i=n(10),a=n(11),u=n(20),c=n(21);e.exports=function(e){r(e),e.baseURL&&!u(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=s(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||a.adapter;return t(e).then(function(t){return r(e),t.data=s(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(r(e),t&&t.response&&(t.response.data=s(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?e=n(13):"undefined"!=typeof XMLHttpRequest&&(e=n(13)),e}var s=n(2),i=n(12),a={"Content-Type":"application/x-www-form-urlencoded"},u={adapter:o(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},s.forEach(["delete","get","head"],function(e){u.headers[e]={}}),s.forEach(["post","put","patch"],function(e){u.headers[e]=s.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(14),s=n(6),i=n(17),a=n(18),u=n(15);e.exports=function(e){return new Promise(function(t,c){var f=e.data,p=e.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",h=e.auth.password||"";p.Authorization="Basic "+btoa(l+":"+h)}if(d.open(e.method.toUpperCase(),s(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?i(d.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?d.response:d.responseText,s={data:r,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};o(t,c,s),d=null}},d.onabort=function(){d&&(c(u("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){c(u("Network Error",e,null,d)),d=null},d.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var m=n(19),y=(e.withCredentials||a(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&r.forEach(p,function(e,t){"undefined"==typeof f&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),c(e),d=null)}),void 0===f&&(f=null),d.send(f)})}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var r=n(16);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){t=t||{};var n={};return r.forEach(["url","method","params","data"],function(e){"undefined"!=typeof t[e]&&(n[e]=t[e])}),r.forEach(["headers","auth","proxy"],function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!=typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!=typeof e[o]&&(n[o]=e[o])}),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])}),n}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])});
//# sourceMappingURL=axios.min.map
\ No newline at end of file
<?php
/**
* 系统常量定义编辑
* $Id: system_const_edit_input.php,v 1.1 2020/01/012 11:18:46 lixq 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["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
}
// 参数取得
$id = ParamUtil::getRequestString("id");
$action_type = ParamUtil::getRequestString("action_type");
$system_const_dat = new SystemConstDat();
if($action_type =="edit"){
$system_const_dat = SystemConstDat::getById($id);
}
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "system_const_edit_input.inc";
$layout_pages["menu_clicked"] = "4-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 系统常量定义编辑完成
* $Id: system_const_edit_result.php,2020/01/12 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["footer"] = "footer.inc";
$layout_pages["top"] = "menu.inc";
$layout_pages["middle"] = "error.inc";
$message = "权限不足,请联系系统管理员。";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
}
// 参数取得
$action_type = ParamUtil::getRequestString("action_type");//new edit
$id = ParamUtil::getRequestString("id");
$title = ParamUtil::getRequestString("title");
$name = ParamUtil::getRequestString("name");
$constant_value = ParamUtil::getRequestString("constant_value");
//创建的时候
if($action_type=="new") {
$system_const_dat = new SystemConstDat();
}
//编辑
if($action_type=="edit") {
$system_const_dat = SystemConstDat::getById($id);
if ($system_const_dat == null) {
// エラー表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "error.inc";
$layout_pages["menu_clicked"] = "4-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
}
//name唯一check
$param = array();
$param["delete_flg"] = false;
$param["name"] = $name;
$account_list = AccountMst::getList($param);
if (count($account_list) > 1) {
$error_message = "常量定义名已经被存在,请换一个。";
if($action_type =="edit"){
$system_const_dat = SystemConstDat::getById($id);
}
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "system_const_edit_input.inc";
$layout_pages["menu_clicked"] = "4-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
}
}
// 数据库更新
$system_const_dat->name = $name;
$system_const_dat->title = $title;
$system_const_dat->constant_value = $constant_value;
$system_const_dat->save();
// 页面表示
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "system_const_edit_result.inc";
$layout_pages["menu_clicked"] = "4-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
<?php
/**
* 系统常量定义
* $Id: system_const_list.php,v 1.1 2020/01/12 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;
$system_const_list = SystemConstDat::getList($param,"id","asc");
// ページ
$layout_pages = array();
$layout_pages["left"] = "menu.inc";
$layout_pages["right"] = "system_const_list.inc";
$layout_pages["menu_clicked"] = "4-3";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/leftmenu_layout.inc");
exit;
\ No newline at end of file
......@@ -11,66 +11,167 @@ global $login;
global $password;
global $name;
global $contact;
global $authority_level_array;
global $authority_level_list;
global $comment;
global $government_id;
global $school_id;
global $role_id;
global $error_message;
global $role;
global $modules;
?>
<b>管理员编辑</b><br />
<br />
<form name="account_edit_input" action="account_edit_result.php" method="post">
<input type="hidden" name="id" value="<?=$id ?>" />
<table>
<tr>
<td>登陆帐号</td>
</tr>
<tr>
<td class="begin_blank"><?=htmlspecialchars($login) ?></td>
</tr>
<tr>
<td>登陆密码</td>
</tr>
<tr>
<td class="begin_blank"><input type="text" name="password" value="<?=htmlspecialchars($password) ?>" /></td>
</tr>
<tr>
<td>账户名称</td>
</tr>
<tr>
<td class="begin_blank"><input type="text" name="name" value="<?=htmlspecialchars($name) ?>" /></td>
</tr>
<tr>
<td>联系电话</td>
</tr>
<tr>
<td class="begin_blank"><input type="text" name="contact" value="<?=htmlspecialchars($contact) ?>" /></td>
</tr>
<tr>
<td>备注</td>
</tr>
<tr>
<td class="begin_blank"><input type="text" name="comment" value="<?=htmlspecialchars($comment) ?>" /></td>
</tr>
<tr>
<td>权限 <span style="color:#FF0000">※全不选即为超级管理员</span></td>
</tr>
<tr>
<td class="begin_blank">
<?
foreach ($authority_level_list as $authority_level) {
?>
<label><input type="checkbox" name="authority_level[]" value="<?=$authority_level->name ?>"/><?=$authority_level->model ?></label>
<?
}
?>
</td>
</tr>
<tr>
</table>
<br />
<input type="button" value="编辑" class="button_width_normal" onClick="doCheck();" />
</form>
<div id="change">
<p class="edit_title">编辑账号</p>
<div class="edit_content">
<form id="form" method="post" action="account_edit_result.php" enctype="multipart/form-data">
<input type="hidden" name="account_role"/>
<input type="hidden" name="organization"/>
<p>登陆帐号</p>
<el-input v-model="login" name="login" class="input_200"></el-input><br />
<p>登陆密码</p>
<el-input v-model="password" name="password" class="input_200"></el-input><br />
<p>账户名称</p>
<el-input v-model="name" name="name" class="input_200"></el-input><br />
<p>联系方式</p>
<el-input v-model="contact" name="contact" class="input_200"></el-input><br />
<p>用户角色 </p>
<el-select v-model="selected" size='medium' >
<el-option
v-for="item in account_role"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
<div v-if="isShow">
<p>机构选择 </p>
<el-select v-model="organization" size='medium' >
<div class="el-select-dropdown__item"><input v-model="searchVal" style="border-radius: 4px;background: url(images/search_icon.png) no-repeat 150px;"type="text" autocomplete="off"></div>
<el-option
v-for="item in new_org_list"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
</div>
<p>权限 <span style="color:#FF0000">※全不选即为超级管理员</span></p>
<template v-for="(modules, index) in modules_list">
<input type="checkbox" name="modules[]" :value="modules.id" v-model='checked' :id="modules.id" />
<label :for="modules.id">{{ modules.module }}</label>
<br>
</template>
<p>备注</p>
<el-input v-model="comment" name="comment" class="input_300"></el-input><br />
<br/><br/>
<el-button type="danger" class="edit_btn" @click="submitForm()">编辑</el-button>
<el-button type="danger" class="edit_btn" @Click="window.location='./account_list.php'" />返回</el-button>
<br/><br/>
</form>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
var vm = new Vue({
el: '#form',
data: {
login: '<?=htmlspecialchars($login) ?>',
password:'<?=htmlspecialchars($password) ?>',
contact:'<?=htmlspecialchars($contact) ?>',
name:'<?=htmlspecialchars($name) ?>',
comment:'<?=htmlspecialchars($comment) ?>',
modules_list:<?=json_encode($modules_list)?>,
account_role:<?=json_encode($account_role_list)?>,
school_list:[{id:'1',title:"aa"},{id:'2',title:"bb"}],
government_list:<?=json_encode($government_list)?>,
selected:<?=$role_id?>,
checked:[<?=$modules?>],
isShow:true,
organization:'<?=$government_id?>',
org_list:<?=json_encode($government_list)?>,
searchVal:''
},
watch:{
selected(val,oldval){
if(val > 8){
this.isShow = false;
}else{
this.isShow = true;
if(val >= 7){
this.org_list = this.school_list;
this.organization = '2';
}else{
this.org_list = this.government_list;
this.organization = '<?=$government_list[0]["id"]?>';
}
}
}
},
methods: {
submitForm() {
if(!this.login){
this.$message({
type: 'error',
message: '请输入登陆帐号。'
});
return;
}
if (!isAlpaNum(this.login)) {
this.$message({
type: 'error',
message: '登陆帐号只能使用半角英文或数字。'
});
return;
}
if (!this.password) {
this.$message({
type: 'error',
message: '请输入登陆密码。'
});
return;
}
if (!isAlpaNum(this.password)) {
this.$message({
type: 'error',
message: '登陆密码只能使用半角英文或数字。'
});
return;
}
if (!this.name) {
this.$message({
type: 'error',
message: '请输入账户名称。'
});
return;
}
$("input[name='account_role']").val(this.selected);
$("input[name='organization']").val(this.organization);
$('#form').submit();
}
},
computed: {
new_org_list() {
var _this = this;
var new_org_list = [];
_this.org_list.map(function(item) {
if (item.title.search(_this.searchVal) != -1) {
new_org_list.push(item);
}
});
if(new_org_list.length == 0){
new_org_list = _this.org_list;
}
return new_org_list;
}
}
})
if(<?=$error_message?1:0 ?>){
vm.$message({
type: 'error',
message: '<?=$error_message?>'
});
}
})
</script>
<?php
/**
/*
* 管理员管理
* $Id: account_new_input.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author wanggb
* @access public
* @package manager.templates
**/
*/
global $login;
global $password;
global $name;
global $contact;
global $authority_level_array;
global $authority_level_list;
global $error_message_login;
global $comment;
global $account_role_list;
global $modules_list;
global $error_message;
global $account_role;
?>
<b>新增账号</b><br />
<br />
<form name="account_new_input" action="account_new_result.php" method="post">
<table>
<tr>
<td>登陆帐号</td>
</tr>
<tr>
<td class="begin_blank">
<input type="text" name="login" value="<?=htmlspecialchars($login) ?>" />
<span style="color:#FF0000"><?=$error_message_login ?></span>
</td>
</tr>
<tr>
<td>登陆密码</td>
</tr>
<tr>
<td class="begin_blank"><input type="text" name="password" value="<?=htmlspecialchars($password) ?>" /></td>
</tr>
<tr>
<td>账户名称</td>
</tr>
<tr>
<td class="begin_blank"><input type="text" name="name" value="<?=htmlspecialchars($name) ?>" /></td>
</tr>
<tr>
<td>联系电话</td>
</tr>
<tr>
<td class="begin_blank"><input type="text" name="contact" value="<?=htmlspecialchars($contact) ?>" /></td>
</tr>
<tr>
<td>备注</td>
</tr>
<tr>
<td class="begin_blank"><input type="text" name="comment" value="<?=htmlspecialchars($comment) ?>" /></td>
</tr>
<tr>
<td>权限 <span style="color:#FF0000">※全不选即为超级管理员</span></td>
</tr>
<tr>
<td class="begin_blank">
<?
foreach ($authority_level_list as $authority_level) {
?>
<label><input type="checkbox" name="authority_level[]" value="<?=$authority_level->name ?>"/><?=$authority_level->model ?></label>
<?
}
?>
</td>
</tr>
<tr>
</table>
<br />
<input type="button" value="新增" class="button_width_normal" onClick="doCheck();" />
</form>
<div id="change">
<p class="edit_title">新增账号</p>
<div class="edit_content">
<form id="form" method="post" action="account_new_result.php" enctype="multipart/form-data">
<input type="hidden" name="account_role"/>
<input type="hidden" name="organization"/>
<p>登陆帐号</p>
<el-input v-model="login" name="login" class="input_200"></el-input><br />
<p>登陆密码</p>
<el-input v-model="password" name="password" class="input_200"></el-input><br />
<p>账户名称</p>
<el-input v-model="name" name="name" class="input_200"></el-input><br />
<p>联系方式</p>
<el-input v-model="contact" name="contact" class="input_200"></el-input><br />
<p>用户角色 </p>
<el-select v-model="selected" size='medium' >
<el-option
v-for="item in account_role"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
<div v-if="isShow">
<p>机构选择 </p>
<el-select v-model="organization" size='medium' >
<div class="el-select-dropdown__item"><input v-model="searchVal" style="border-radius: 4px;background: url(images/search_icon.png) no-repeat 150px;"type="text" autocomplete="off"></div>
<el-option
v-for="item in new_org_list"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
</div>
<p>权限 <span style="color:#FF0000">※全不选即为超级管理员</span></p>
<template v-for="(modules, index) in modules_list">
<input type="checkbox" name="modules[]" :value="modules.id" v-model='checked' :id="modules.id" />
<label :for="modules.id">{{ modules.module }}</label>
<br>
</template>
<p>备注</p>
<el-input v-model="comment" name="comment" class="input_300"></el-input><br />
<br/><br/>
<el-button type="danger" class="edit_btn" @click="submitForm()">新增</el-button>
<el-button type="danger" class="edit_btn" @Click="window.location='./account_list.php'" />返回</el-button>
<br/><br/>
</form>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
var vm = new Vue({
el: '#form',
data: {
login: '<?=htmlspecialchars($login) ?>',
password:'<?=htmlspecialchars($password) ?>',
contact:'<?=htmlspecialchars($contact) ?>',
name:'<?=htmlspecialchars($name) ?>',
comment:'<?=htmlspecialchars($comment) ?>',
modules_list:<?=json_encode($modules_list)?>,
account_role:<?=json_encode($account_role_list)?>,
school_list:[{id:'1',title:"aa"},{id:'2',title:"bb"}],
government_list:<?=json_encode($government_list)?>,
selected:1,
checked:[],
isShow:true,
organization:'<?=$government_list[0]["id"]?>',
org_list:<?=json_encode($government_list)?>,
searchVal:''
},
watch:{
selected(val,oldval){
if(val > 8){
this.isShow = false;
}else{
this.isShow = true;
if(val >= 7){
this.org_list = this.school_list;
this.organization = '2';
}else{
this.org_list = this.government_list;
this.organization = '<?=$government_list[0]["id"]?>';
}
}
}
},
methods: {
submitForm() {
if(!this.login){
this.$message({
type: 'error',
message: '请输入登陆帐号。'
});
return;
}
if (!isAlpaNum(this.login)) {
this.$message({
type: 'error',
message: '登陆帐号只能使用半角英文或数字。'
});
return;
}
if (!this.password) {
this.$message({
type: 'error',
message: '请输入登陆密码。'
});
return;
}
if (!isAlpaNum(this.password)) {
this.$message({
type: 'error',
message: '登陆密码只能使用半角英文或数字。'
});
return;
}
if (!this.name) {
this.$message({
type: 'error',
message: '请输入账户名称。'
});
return;
}
$("input[name='account_role']").val(this.selected);
$("input[name='organization']").val(this.organization);
$('#form').submit();
}
},
computed: {
new_org_list() {
var _this = this;
var new_org_list = [];
_this.org_list.map(function(item) {
if (item.title.search(_this.searchVal) != -1) {
new_org_list.push(item);
}
});
if(new_org_list.length == 0){
new_org_list = _this.org_list;
}
return new_org_list;
}
}
})
if(<?=$error_message?1:0 ?>){
vm.$message({
type: 'error',
message: '<?=$error_message?>'
});
}
})
</script>
......@@ -34,7 +34,7 @@ require(MANAGER_TEMPLATE_DIR_PATH. "/" . $layout_pages["header"]);
<? require(MANAGER_TEMPLATE_DIR_PATH . "/" . $layout_pages["left"]); ?>
</div>
</td>
<td class="rightWidth" style="position: relative;">
<td class="rightWidth" style="position: relative;overflow-y: auto;overflow-x: hidden;">
<div class="right_content" style="position: absolute;top: 0;left: 0;">
<? require(MANAGER_TEMPLATE_DIR_PATH . "/" . $layout_pages["right"]); ?>
</div>
......@@ -43,9 +43,9 @@ require(MANAGER_TEMPLATE_DIR_PATH. "/" . $layout_pages["header"]);
</table>
<script>
$(function(){
var clientHeight = document.body.clientHeight;
var clientHeight = document.body.clientHeight - 80;
$('.table').css('height',clientHeight)
var width = document.body.clientWidth-200;
var width = document.body.clientWidth-220;
$('.rightWidth').css('width',width)
})
</script>
......
<?php
/**
* 系统常量定义编辑
* $Id: system_const_edit_input.inc,v 1.1 2020/01/12 11:18:53 lixq Exp $
* @author lixq
* @access public
* @package manager.templates
**/
global $id;
global $action_type;
global $system_const_dat;
global $error_message;
?>
<div id="change">
<p class="edit_title">系统常量定义添加</p>
<form id="form" method="post" action="system_const_edit_result.php" enctype="multipart/form-data">
<input type="hidden" name="action_type" value="<?=$action_type ?>"/>
<input type="hidden" name="id" value="<?=$id ?>"/>
<div class="edit_content">
<p>常量定义名</p>
<el-input v-model="name" name="name" class="input_200"></el-input> <span style="color:#FF0000">(大写英文字母、下划线)</span><br />
<p>文字描述</p>
<el-input v-model="title" name="title" class="input_200"></el-input><br />
<p></p>
<el-input v-model="constant_value" name="constant_value" class="input_200"></el-input><br />
<el-button type="danger" @click="edit()" class="edit_btn">编辑</el-button>
<el-button type="danger" class="edit_btn" @Click="window.location='./system_const_list.php'" />返回</el-button>
</div>
</form>
</div>
<script type="text/javascript">
new Vue({
el:'#change',
data:{
name:'<?=htmlspecialchars($system_const_dat->name) ?>',
title:'<?=htmlspecialchars($system_const_dat->title) ?>',
constant_value:'<?=htmlspecialchars($system_const_dat->constant_value) ?>'
},
methods:{
edit:function(){
if(!this.name){
this.$message({
type: 'error',
message: '请输入常量定义名!'
});
return;
}
if(!this.name.match(/^[A-Z_]{1,}$/)){
this.$message({
type: 'error',
message: '常量定义名格式不正确!'
});
return;
}
if(!this.title){
this.$message({
type: 'error',
message: '请输入文字描述!'
});
return;
}
if(!this.name){
this.$message({
type: 'error',
message: '请输入值!'
});
return;
}
$('#form').submit();
}
}
})
$(document).ready(function () {
if(<?=$error_message?1:0 ?>){
vm.$message({
type: 'error',
message: '<?=$error_message?>'
});
}
})
</script>
<?php
/**
* 系统常量定义编辑完成
* $Id: system_const_edit_result.inc,v 1.12020/01/12 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='./system_const_list.php';
}
}
})
</script>
<?php
/**
* 系统常量定义
* $Id: system_const_list.inc,v 1.1 2020/01/12 11:18:46 Exp $
* @author lixq
* @access public
* @package manager.templates
*/
global $system_const_list;
?>
<div id="classSetting">
<div class="list_title">
系统常量定义
<div style="float: right;">
<el-button type="primary" style="margin-right: 10px;" @click="addSysConst()">添加</el-button>
</div>
</div>
<br />
<div class="result_list">
<el-table :data="tableData" border>
<el-table-column prop="id" label="编号" width="50px"></el-table-column>
<el-table-column prop="name" label="常量定义名" width=""></el-table-column>
<el-table-column prop="title" label="文字描述" width=""></el-table-column>
<el-table-column prop="constant_value" 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 ($system_const_list as $system_const_mst) {
?>
var data={
id:<?=$system_const_mst->id ?>,
name:'<?=$system_const_mst->name?>',
title:'<?=$system_const_mst->title?>',
constant_value:'<?=$system_const_mst->constant_value?>'
};
list.push(data);
<?
}
?>
new Vue({
el:'#classSetting',
data:{
tableData: list
},
methods:{
handleChange(row) {
console.log(row);
window.location.href='system_const_edit_input.php?action_type=edit&id='+row.id;
},
deleteRow(rows) {
this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
// rows.splice(index, 1);
window.location.href='system_const_delete_result.php?id='+rows.id;
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
addSysConst(){
window.open('system_const_edit_input.php?action_type=new','_self')
}
}
})
</script>
\ No newline at end of file
......@@ -32,6 +32,7 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/definition/AccountRole.inc")
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/definition/AuthorityLevel.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/definition/SystemFunction.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/definition/OrganizationStatus.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/definition/AcountModule.inc");
// Action
require_once(COMPASS_LIB_ROOT . "/cn/compass/action/TemplateAction.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