修改logo
This commit is contained in:
parent
b213464345
commit
2533649eda
@ -44,7 +44,7 @@
|
|||||||
<div class="col-auto"> <a href="#" class="btn btn-info" id="acc_searchBtn">搜尋</a> </div>
|
<div class="col-auto"> <a href="#" class="btn btn-info" id="acc_searchBtn">搜尋</a> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="frame-wrap">
|
<div class="frame-wrap">
|
||||||
<div class="mb-3">
|
<div class="mb-3" hidden>
|
||||||
<a href="#" class="btn btn-success" data-toggle="modal"
|
<a href="#" class="btn btn-success" data-toggle="modal"
|
||||||
data-target="#accManModal">+ 新增</a>
|
data-target="#accManModal">+ 新增</a>
|
||||||
</div>
|
</div>
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label" for="inpAcc">帳號</label>
|
<label class="form-label" for="inpAcc">帳號</label>
|
||||||
<input type="text" id="inpAcc" name="inpAcc" class="form-control">
|
<input type="text" id="inpAcc" name="inpAcc" class="form-control" disabled>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -253,15 +253,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var rolAuthTable = null;
|
var rolAuthTable = null;
|
||||||
$(function () {
|
$(function () {
|
||||||
asyncUser();
|
asyncUser(initCallBack);
|
||||||
clearPagSes();
|
|
||||||
getRoleSel();
|
|
||||||
loadAccManTable();
|
|
||||||
loadRolManTable();
|
|
||||||
loadAuthPageTable();
|
|
||||||
loadRolAuthTable();
|
|
||||||
setAuthPage();
|
|
||||||
events();
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function loadAccManTable() {
|
function loadAccManTable() {
|
||||||
@ -346,7 +338,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let sendData = {};
|
let sendData = {};
|
||||||
sendData.Layer = 0;
|
sendData.Layer = 1;
|
||||||
if (pageAct.rolName != null)
|
if (pageAct.rolName != null)
|
||||||
sendData.Full_name = pageAct.rolName;
|
sendData.Full_name = pageAct.rolName;
|
||||||
|
|
||||||
@ -546,6 +538,7 @@
|
|||||||
let url = baseApiUrl + "/User/RoleManagerList";
|
let url = baseApiUrl + "/User/RoleManagerList";
|
||||||
let sendData = {
|
let sendData = {
|
||||||
post: 1,
|
post: 1,
|
||||||
|
Layer: 1
|
||||||
};
|
};
|
||||||
objSendData.Data = sendData;
|
objSendData.Data = sendData;
|
||||||
ytAjax = new YourTeam.Ajax(url, objSendData, function (res) {
|
ytAjax = new YourTeam.Ajax(url, objSendData, function (res) {
|
||||||
@ -906,7 +899,18 @@
|
|||||||
ytAjax = new YourTeam.Ajax(url, objSendData, success, null, "POST").send();
|
ytAjax = new YourTeam.Ajax(url, objSendData, success, null, "POST").send();
|
||||||
}
|
}
|
||||||
|
|
||||||
function asyncUser() {
|
function initCallBack() {
|
||||||
|
clearPagSes();
|
||||||
|
getRoleSel();
|
||||||
|
loadAccManTable();
|
||||||
|
loadRolManTable();
|
||||||
|
loadAuthPageTable();
|
||||||
|
loadRolAuthTable();
|
||||||
|
setAuthPage();
|
||||||
|
events();
|
||||||
|
}
|
||||||
|
|
||||||
|
function asyncUser() {
|
||||||
getUserByBaja(syncUsrCallBack)
|
getUserByBaja(syncUsrCallBack)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -914,7 +918,9 @@
|
|||||||
let url = baseApiUrl + "/User/SyncUser";
|
let url = baseApiUrl + "/User/SyncUser";
|
||||||
var data = JSON.parse(rel);
|
var data = JSON.parse(rel);
|
||||||
objSendData.Data = data.data;
|
objSendData.Data = data.data;
|
||||||
console.log(objSendData);
|
|
||||||
ytAjax = new YourTeam.Ajax(url, objSendData, null, null, "POST").send();
|
ytAjax = new YourTeam.Ajax(url, objSendData, function () {
|
||||||
}
|
initCallBack();
|
||||||
|
}, null, "POST").send();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
@ -2782,14 +2782,10 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getLogo() {
|
function getLogo() {
|
||||||
$.ajax({
|
url = baseApiUrl + '/api/GetLogo',
|
||||||
method: "post",
|
ytAjax = new YourTeam.Ajax(url, null, function (res) {
|
||||||
url: 'api/GetLogo',
|
$('[name=webLogo]').attr('src', 'img/' + res.data);
|
||||||
async: false,
|
}, null, "POST").send();
|
||||||
success: function (rel) {
|
|
||||||
$('[name=webLogo]').attr('src', 'img/' + rel);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@
|
|||||||
function getLogo() {
|
function getLogo() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "post",
|
method: "post",
|
||||||
url: 'api/GetLogo',
|
url: baseApiUrl + '/api/GetLogo',
|
||||||
async: false,
|
async: false,
|
||||||
success: function (rel) {
|
success: function (rel) {
|
||||||
$('[name=webLogo]').attr('src', 'img/' + rel);
|
$('[name=webLogo]').attr('src', 'img/' + rel);
|
||||||
|
@ -10,6 +10,7 @@ using NPOI.SS.UserModel;
|
|||||||
using NPOI.XSSF.UserModel;
|
using NPOI.XSSF.UserModel;
|
||||||
using Repository.BackendRepository.Interface;
|
using Repository.BackendRepository.Interface;
|
||||||
using Repository.FrontendRepository.Interface;
|
using Repository.FrontendRepository.Interface;
|
||||||
|
using Serilog.Core;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IdentityModel.Tokens.Jwt;
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
@ -136,5 +137,28 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
|
|
||||||
return Ok(apiResult);
|
return Ok(apiResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Route("api/GetLogo")]
|
||||||
|
public async Task<ApiResult<string>> GetLogo()
|
||||||
|
{
|
||||||
|
ApiResult<string> apiResult = new ApiResult<string>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var sqlString = $@"select system_value from variable where system_type = 'logo'";
|
||||||
|
var data = await backendRepository.GetOneAsync<string>(sqlString);
|
||||||
|
apiResult.Code = "0000";
|
||||||
|
apiResult.Data = data;
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
apiResult.Code = "9999";
|
||||||
|
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
||||||
|
logger.LogError("【Login/Index】" + exception.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return apiResult;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,28 +155,5 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
|
|
||||||
return apiResult;
|
return apiResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
[Route("api/GetLogo")]
|
|
||||||
public async Task<ApiResult<string>> GetLogo()
|
|
||||||
{
|
|
||||||
ApiResult<string> apiResult = new ApiResult<string>();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var sqlString = $@"select system_type from variable where system_type = 'logo'";
|
|
||||||
var data = await backendRepository.GetOneAsync<string>(sqlString);
|
|
||||||
apiResult.Code = "0000";
|
|
||||||
apiResult.Data = data;
|
|
||||||
}
|
|
||||||
catch (Exception exception)
|
|
||||||
{
|
|
||||||
apiResult.Code = "9999";
|
|
||||||
apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
|
|
||||||
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
return apiResult;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Transactions;
|
using System.Transactions;
|
||||||
using Repository.Models;
|
using Repository.Models;
|
||||||
|
using System.Data.SqlTypes;
|
||||||
|
|
||||||
namespace Repository.BackendRepository.Implement
|
namespace Repository.BackendRepository.Implement
|
||||||
{
|
{
|
||||||
@ -262,11 +263,18 @@ namespace Repository.BackendRepository.Implement
|
|||||||
|
|
||||||
foreach (var data in result2)
|
foreach (var data in result2)
|
||||||
{
|
{
|
||||||
sb2.Append($@"INSERT device_kind (device_kind_guid, device_building_tag, device_system_tag, device_name_tag,
|
var sqlString = new StringBuilder();
|
||||||
device_normal_flashing, device_close_flashing, device_error_flashing, device_error_independent,
|
sqlString.Append("select * from device_kind where device_building_tag = '" + data.device_building_tag + "' and device_system_tag = '" + data.device_system_tag + "' and device_name_tag = '" + data.device_name_tag + "'");
|
||||||
created_by, created_at)
|
var dk = (await conn.QueryAsync<device_kind>(sqlString.ToString())).ToList<device_kind>();
|
||||||
VALUES (uuid(), '" + data.device_building_tag + "', '" + data.device_system_tag + "', '" + data.device_name_tag +
|
|
||||||
"', 0, 0, 1, 0, 'B43E3CA7-96DD-4FC7-B6E6-974ACC3B0878', now());");
|
if (dk.Count == 0)
|
||||||
|
{
|
||||||
|
sb2.Append($@"INSERT device_kind (device_kind_guid, device_building_tag, device_system_tag, device_name_tag,
|
||||||
|
device_normal_flashing, device_close_flashing, device_error_flashing, device_error_independent,
|
||||||
|
created_by, created_at)
|
||||||
|
VALUES (uuid(), '" + data.device_building_tag + "', '" + data.device_system_tag + "', '" + data.device_name_tag +
|
||||||
|
"', 0, 0, 1, 0, 'B43E3CA7-96DD-4FC7-B6E6-974ACC3B0878', now());");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sb.Length > 0)
|
if (sb.Length > 0)
|
||||||
|
@ -102,4 +102,9 @@ namespace Repository.Models
|
|||||||
public string device_system_tag { get; set; }
|
public string device_system_tag { get; set; }
|
||||||
public string device_name_tag { get; set; }
|
public string device_name_tag { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class device_kind
|
||||||
|
{
|
||||||
|
public string device_kind_guid { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user