1. 創建公司,加入創建公司資料庫
2. 修改圖片cache
This commit is contained in:
parent
cf765a6699
commit
272b31a537
@ -114,11 +114,20 @@ namespace SolarPower.Controllers
|
|||||||
|
|
||||||
if (myUser.IsGod == 1 || IsPlatformLayer(myUser.Role.Layer))
|
if (myUser.IsGod == 1 || IsPlatformLayer(myUser.Role.Layer))
|
||||||
{ //只有超級使用者 及 平台 可以使用
|
{ //只有超級使用者 及 平台 可以使用
|
||||||
|
if(company.Id == 1)
|
||||||
|
{ //平台公司不能被刪
|
||||||
|
company.Function = @"
|
||||||
|
<button type='button' class='btn btn-success btn-pills waves-effect waves-themed company-auth-btn'>權限池</button>
|
||||||
|
<button type='button' class='btn btn-primary btn-pills waves-effect waves-themed edit-btn'>修改</button>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
company.Function = @"
|
company.Function = @"
|
||||||
<button type='button' class='btn btn-success btn-pills waves-effect waves-themed company-auth-btn'>權限池</button>
|
<button type='button' class='btn btn-success btn-pills waves-effect waves-themed company-auth-btn'>權限池</button>
|
||||||
<button type='button' class='btn btn-primary btn-pills waves-effect waves-themed edit-btn'>修改</button>
|
<button type='button' class='btn btn-primary btn-pills waves-effect waves-themed edit-btn'>修改</button>
|
||||||
<button type='button' class='btn btn-danger btn-pills waves-effect waves-themed del-btn'>刪除</button>";
|
<button type='button' class='btn btn-danger btn-pills waves-effect waves-themed del-btn'>刪除</button>";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
company.Function = @"
|
company.Function = @"
|
||||||
@ -271,6 +280,8 @@ namespace SolarPower.Controllers
|
|||||||
|
|
||||||
var id = await companyRepository.AddOneAsync(company, properties);
|
var id = await companyRepository.AddOneAsync(company, properties);
|
||||||
|
|
||||||
|
|
||||||
|
UpdateCompany updateCompany;
|
||||||
//處裡公司Logo圖片
|
//處裡公司Logo圖片
|
||||||
if (post.LogoFile != null)
|
if (post.LogoFile != null)
|
||||||
{
|
{
|
||||||
@ -284,7 +295,7 @@ namespace SolarPower.Controllers
|
|||||||
post.LogoFile.CopyTo(stream);
|
post.LogoFile.CopyTo(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateCompany updateCompany = new UpdateCompany()
|
updateCompany = new UpdateCompany()
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
Logo = fileName
|
Logo = fileName
|
||||||
@ -319,7 +330,26 @@ namespace SolarPower.Controllers
|
|||||||
await roleRepository.AddAsync(role, roleProperties);
|
await roleRepository.AddAsync(role, roleProperties);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//TODO 自動新增公司DB及Table,公司DB編號規則 solar_com_(公司編號共四碼),ex:solar_com_0001。
|
#region 新增公司DB及Table,公司DB編號規則 solar_com_(公司編號共四碼),ex:solar_com_0001
|
||||||
|
|
||||||
|
var relationalDB = "solar_com_" + id.ToString().Trim().PadLeft(4, '0');
|
||||||
|
//修改
|
||||||
|
updateCompany = new UpdateCompany()
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
RelationalDB = relationalDB
|
||||||
|
};
|
||||||
|
|
||||||
|
properties = new List<string>()
|
||||||
|
{
|
||||||
|
"Id",
|
||||||
|
"RelationalDB"
|
||||||
|
};
|
||||||
|
|
||||||
|
await companyRepository.UpdateCompany(updateCompany, properties);
|
||||||
|
|
||||||
|
await companyRepository.CreatCompanyDB(relationalDB);
|
||||||
|
#endregion
|
||||||
|
|
||||||
apiResult.Code = "0000";
|
apiResult.Code = "0000";
|
||||||
apiResult.Msg = "儲存成功";
|
apiResult.Msg = "儲存成功";
|
||||||
|
|||||||
@ -51,6 +51,7 @@ namespace SolarPower.Models.Company
|
|||||||
public string TaxIDNumber { get; set; } //統一編號
|
public string TaxIDNumber { get; set; } //統一編號
|
||||||
public string Phone { get; set; } //電話
|
public string Phone { get; set; } //電話
|
||||||
public string Address { get; set; }
|
public string Address { get; set; }
|
||||||
|
public string RelationalDB { get; set; } //關聯的公司自己資料庫
|
||||||
public int RegisterUpperLimit { get; set; } //註冊上限
|
public int RegisterUpperLimit { get; set; } //註冊上限
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -409,5 +409,181 @@ namespace SolarPower.Repository.Implement
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 創建公司自己的DB
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dbName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task CreatCompanyDB(string dbName)
|
||||||
|
{
|
||||||
|
using (IDbConnection conn = this._databaseHelper.GetConnection())
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (var trans = conn.BeginTransaction())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var sql = @$"
|
||||||
|
-- 傾印 資料庫結構
|
||||||
|
CREATE DATABASE IF NOT EXISTS `{dbName}`;
|
||||||
|
USE `{dbName}`;
|
||||||
|
|
||||||
|
-- 傾印 資料表 device 結構
|
||||||
|
CREATE TABLE IF NOT EXISTS `device` (
|
||||||
|
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否刪除, 0:否 1:是',
|
||||||
|
`UID` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '設備編號,縣市 +區域+電廠流水號(0001~9999)+設備類別(字母:3碼) + SN(設備流水號;3碼)',
|
||||||
|
`PowerStationId` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所屬電站編號',
|
||||||
|
`Name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名稱',
|
||||||
|
`Type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '類型',
|
||||||
|
`Brand` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '廠牌',
|
||||||
|
`ProductModel` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '型號',
|
||||||
|
`DBName` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`TableName` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`ColName` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`Remark` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
||||||
|
`CreatedAt` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '建立時間',
|
||||||
|
`UpdatedBy` int(10) unsigned DEFAULT NULL COMMENT '修改者',
|
||||||
|
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT '修改時間',
|
||||||
|
PRIMARY KEY (`Id`) USING BTREE,
|
||||||
|
KEY `IDX_01` (`Deleted`) USING BTREE,
|
||||||
|
KEY `IDX_02` (`UID`,`PowerStationId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='裝置列表';
|
||||||
|
|
||||||
|
-- 傾印 資料表 land_building 結構
|
||||||
|
CREATE TABLE IF NOT EXISTS `land_building` (
|
||||||
|
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否刪除, 0:否 1:是',
|
||||||
|
`PowerStationId` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所屬電站編號',
|
||||||
|
`Address` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '地址',
|
||||||
|
`LeaseNotarizationAt` timestamp NULL DEFAULT NULL COMMENT '租約公證日期',
|
||||||
|
`Landowner` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '地主姓名',
|
||||||
|
`Purpose` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '房屋用途',
|
||||||
|
`LeaseRate` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '租金比例(%)',
|
||||||
|
`Coordinate` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '座標',
|
||||||
|
`phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電話',
|
||||||
|
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
||||||
|
`CreatedAt` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '建立時間',
|
||||||
|
`UpdatedBy` int(10) unsigned DEFAULT NULL COMMENT '修改者',
|
||||||
|
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT '修改時間',
|
||||||
|
PRIMARY KEY (`Id`),
|
||||||
|
KEY `IDX_01` (`Deleted`,`PowerStationId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='土地與房屋';
|
||||||
|
|
||||||
|
-- 傾印 資料表 operation_firm 結構
|
||||||
|
CREATE TABLE IF NOT EXISTS `operation_firm` (
|
||||||
|
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否刪除, 0:否 1:是',
|
||||||
|
`PowerStationId` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '所屬電站編號',
|
||||||
|
`Name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名稱',
|
||||||
|
`Type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '廠商類別,0:施工 1:清洗 2:運維',
|
||||||
|
`ContactPerson` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '聯絡人',
|
||||||
|
`Phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電話',
|
||||||
|
`Email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Email',
|
||||||
|
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
||||||
|
`CreatedAt` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '建立時間',
|
||||||
|
`UpdatedBy` int(10) unsigned DEFAULT NULL COMMENT '修改者',
|
||||||
|
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT '修改時間',
|
||||||
|
PRIMARY KEY (`Id`),
|
||||||
|
KEY `IDX_01` (`Deleted`,`PowerStationId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='運維廠商';
|
||||||
|
|
||||||
|
-- 傾印 資料表 power_station 結構
|
||||||
|
CREATE TABLE IF NOT EXISTS `power_station` (
|
||||||
|
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否刪除, 0:否 1:是',
|
||||||
|
`CompanyId` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '公司編號',
|
||||||
|
`Name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名稱',
|
||||||
|
`Code` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電站代碼,縣市+區域+流水號 ',
|
||||||
|
`IsEscrow` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否為代管,0:否 1:是',
|
||||||
|
`EscrowName` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '代管名稱',
|
||||||
|
`ElectricityMeterAt` timestamp NULL DEFAULT NULL COMMENT '台電掛錶日',
|
||||||
|
`EstimatedRecoveryTime` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '預估回收時間',
|
||||||
|
`GeneratingCapacity` decimal(10,1) NOT NULL DEFAULT 0.0 COMMENT '電廠發電容量,單位(千瓦)',
|
||||||
|
`PowerRate` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '受電費率',
|
||||||
|
`Coordinate` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '座標',
|
||||||
|
`InverterBrand` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '逆變器廠牌',
|
||||||
|
`InverterProductModel` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '逆變器型號',
|
||||||
|
`InverterAmount` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '逆變器數量',
|
||||||
|
`PhotovoltaicPanelBrand` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '光電板廠牌',
|
||||||
|
`PhotovoltaicPanelProductModel` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '光電板型號',
|
||||||
|
`PhotovoltaicPanelSpecification` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '光電板規格',
|
||||||
|
`PhotovoltaicPanelAmount` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '光電板數量',
|
||||||
|
`BoEFile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '能源局檔案',
|
||||||
|
`BoEDiscountRate` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '能源局折扣率',
|
||||||
|
`BoEDeviceRegisterNumber` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '能源局設備登記編號',
|
||||||
|
`BoERentRatio` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '能源局租金比率,單位(%)',
|
||||||
|
`TPCContractNumber` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '台電契約編號',
|
||||||
|
`TPCContractAt` timestamp NULL DEFAULT NULL COMMENT '台電簽約日期',
|
||||||
|
`TPCSellDeadline` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '台電售電期限,單位(年)',
|
||||||
|
`TPCMeterReading` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '台電每期抄錶日',
|
||||||
|
`TPCPurchaseElectricityAt` timestamp NULL DEFAULT NULL COMMENT '台電正式購電日',
|
||||||
|
`TPCSellElectricityAt` timestamp NULL DEFAULT NULL COMMENT '台電正式售電日',
|
||||||
|
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
||||||
|
`CreatedAt` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '建立時間',
|
||||||
|
`UpdatedBy` int(10) unsigned DEFAULT NULL COMMENT '修改者',
|
||||||
|
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT '修改時間',
|
||||||
|
PRIMARY KEY (`Id`),
|
||||||
|
KEY `IDX_01` (`Deleted`),
|
||||||
|
KEY `IDX_02` (`CompanyId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='電站資料';
|
||||||
|
|
||||||
|
-- 傾印 資料表 power_station_image 結構
|
||||||
|
CREATE TABLE IF NOT EXISTS `power_station_image` (
|
||||||
|
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否刪除, 0:否 1:是',
|
||||||
|
`PowerStationId` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '電站編號',
|
||||||
|
`IsMainDisplay` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否主要顯示圖片, 0:否 1:是',
|
||||||
|
` image` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '圖片檔名',
|
||||||
|
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
||||||
|
`CreatedAt` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '建立時間',
|
||||||
|
PRIMARY KEY (`Id`),
|
||||||
|
KEY `IDX_01` (`Deleted`,`IsMainDisplay`,`PowerStationId`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='電站資料';
|
||||||
|
|
||||||
|
-- 傾印 資料表 power_station_operation_personnel 結構
|
||||||
|
CREATE TABLE IF NOT EXISTS `power_station_operation_personnel` (
|
||||||
|
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Deleted` tinyint(4) NOT NULL DEFAULT 0,
|
||||||
|
`PowerStationId` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '電站編號',
|
||||||
|
`UserId` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '人員標號',
|
||||||
|
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
||||||
|
`CreatedAt` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '建立時間',
|
||||||
|
PRIMARY KEY (`Id`),
|
||||||
|
KEY `IDX_01` (`Deleted`),
|
||||||
|
KEY `IDX_02` (`PowerStationId`,`UserId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='電站運維人員';
|
||||||
|
|
||||||
|
-- 傾印 資料表 power_station_single_line_diagram 結構
|
||||||
|
CREATE TABLE IF NOT EXISTS `power_station_single_line_diagram` (
|
||||||
|
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否刪除, 0:否 1:是',
|
||||||
|
`PowerStationId` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '電站編號',
|
||||||
|
` image` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '圖片檔名',
|
||||||
|
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
||||||
|
`CreatedAt` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '建立時間',
|
||||||
|
PRIMARY KEY (`Id`),
|
||||||
|
KEY `IDX_01` (`Deleted`,`PowerStationId`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='電站單線圖';
|
||||||
|
";
|
||||||
|
|
||||||
|
await conn.ExecuteAsync(sql, trans);
|
||||||
|
|
||||||
|
trans.Commit();
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
trans.Rollback();
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
conn.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -94,5 +94,12 @@ namespace SolarPower.Repository.Interface
|
|||||||
/// <param name="post"></param>
|
/// <param name="post"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<int> AddCompanyAuthAsync(List<CompanyAuth> entity, List<string> properties);
|
Task<int> AddCompanyAuthAsync(List<CompanyAuth> entity, List<string> properties);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 創建公司自己的DB
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dbName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task CreatCompanyDB(string dbName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,7 +101,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form class="company-form" id="company-form">
|
<form class="company-form" id="company-form" enctype="multipart/form-data">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-6">
|
<div class="form-group col-lg-6">
|
||||||
<label class="form-label" for="company_name_modal"><span class="text-danger">*</span>名稱</label>
|
<label class="form-label" for="company_name_modal"><span class="text-danger">*</span>名稱</label>
|
||||||
@ -247,7 +247,7 @@
|
|||||||
'orderable': false,
|
'orderable': false,
|
||||||
'className': 'dt-body-center',
|
'className': 'dt-body-center',
|
||||||
'render': function (data, type, full, meta) {
|
'render': function (data, type, full, meta) {
|
||||||
return '<img src="' + data + '" class="img-fluid">';
|
return '<img src="' + data + '?v=' + Date.now() + '" class="img-fluid">';
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
"language": {
|
"language": {
|
||||||
@ -486,7 +486,6 @@
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: url,
|
url: url,
|
||||||
data: formData,
|
data: formData,
|
||||||
async: false,
|
|
||||||
cache: false,
|
cache: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
processData: false,
|
processData: false,
|
||||||
|
|||||||
@ -762,7 +762,7 @@
|
|||||||
<div class="page-content-overlay" data-action="toggle" data-class="mobile-nav-on"></div> <!-- END Page Content -->
|
<div class="page-content-overlay" data-action="toggle" data-class="mobile-nav-on"></div> <!-- END Page Content -->
|
||||||
<!-- BEGIN Page Footer -->
|
<!-- BEGIN Page Footer -->
|
||||||
<footer class="page-footer" role="contentinfo">
|
<footer class="page-footer" role="contentinfo">
|
||||||
<div class="d-flex align-items-center flex-1 text-muted">
|
@*<div class="d-flex align-items-center flex-1 text-muted">
|
||||||
<span class="hidden-md-down fw-700">2020 © Rage by <a href='https://www.rage.com.tw' class='text-primary fw-500' title='rage.com.tw' target='_blank'>rage.com.tw</a></span>
|
<span class="hidden-md-down fw-700">2020 © Rage by <a href='https://www.rage.com.tw' class='text-primary fw-500' title='rage.com.tw' target='_blank'>rage.com.tw</a></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -772,7 +772,7 @@
|
|||||||
<li class="pl-3"><a href="info_app_docs.html" class="text-secondary fw-700">Documentation</a></li>
|
<li class="pl-3"><a href="info_app_docs.html" class="text-secondary fw-700">Documentation</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>*@
|
||||||
</footer>
|
</footer>
|
||||||
<!-- END Page Footer -->
|
<!-- END Page Footer -->
|
||||||
<!-- BEGIN Shortcuts -->
|
<!-- BEGIN Shortcuts -->
|
||||||
|
|||||||
@ -113,7 +113,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#company-logo").attr("src", rel.data.logo);
|
$("#company-logo").attr("src", rel.data.logo + "?v=" + Date.now());
|
||||||
$("#company-name").html(rel.data.name);
|
$("#company-name").html(rel.data.name);
|
||||||
|
|
||||||
$("#company-modal").modal();
|
$("#company-modal").modal();
|
||||||
@ -399,7 +399,6 @@
|
|||||||
"order": [[5, "desc"]],
|
"order": [[5, "desc"]],
|
||||||
"columns": [{
|
"columns": [{
|
||||||
"data": null,
|
"data": null,
|
||||||
"target": 0
|
|
||||||
}, {
|
}, {
|
||||||
"data": "companyName"
|
"data": "companyName"
|
||||||
}, {
|
}, {
|
||||||
@ -413,8 +412,16 @@
|
|||||||
}, {
|
}, {
|
||||||
"data": null,
|
"data": null,
|
||||||
"defaultContent": '<button class="btn btn-danger del-btn">刪除</button>'
|
"defaultContent": '<button class="btn btn-danger del-btn">刪除</button>'
|
||||||
|
}],
|
||||||
|
"columnDefs": [{
|
||||||
|
'targets': 0,
|
||||||
|
'searchable': false,
|
||||||
|
'orderable': false,
|
||||||
|
'className': 'dt-body-center',
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
$(td).html(row + 1)
|
||||||
}
|
}
|
||||||
],
|
}],
|
||||||
"language": {
|
"language": {
|
||||||
"emptyTable": "無資料...",
|
"emptyTable": "無資料...",
|
||||||
"processing": "處理中...",
|
"processing": "處理中...",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user