Former-commit-id: e714590313589f5596531c37821f2513f5a926a8
Former-commit-id: 71a9b250a9c59ce0e3b3cd3374c408b571ed9225
1.0
wanggang 5 years ago
parent f50de32959
commit 8a2224d3eb

@ -8,6 +8,6 @@
} }
else else
{ {
<i class="icon ion-information" style="color:red;"></i> <i class="icon ion-android-alert" style="color:red;"></i>
} }
</span> </span>

@ -1,4 +1 @@
@{ @Html.TextBox(null, null, new { @class = "form-control edit-date" })
var value = Model == null ? null : ((DateTime)Model).ToString("yyyy-MM-dd");
}
@Html.TextBox("", value, new { @class = "form-control date edit-date" })

@ -222,6 +222,7 @@ namespace TeacherExt.Controllers
return this.NoContent(); return this.NoContent();
} }
} }
//model = entity.To<EditTeacherModel>();
this.EntityToModel(entity, model); this.EntityToModel(entity, model);
this.ToEditModel(entity, model); this.ToEditModel(entity, model);
model.LoginName = login.LoginName; model.LoginName = login.LoginName;
@ -559,7 +560,7 @@ namespace TeacherExt.Controllers
ViewData.SelectList(o => model.Nation, () => this.GetNation(model.Nation)); ViewData.SelectList(o => model.Nation, () => this.GetNation(model.Nation));
ViewData.SelectList(o => model.Politics, () => this.GetPolitics(model.Politics)); ViewData.SelectList(o => model.Politics, () => this.GetPolitics(model.Politics));
ViewData.SelectList(o => model.MaxTitle, () => this.GetTitle(model.MaxTitle)); ViewData.SelectList(o => model.MaxTitle, () => this.GetTitle(model.MaxTitle));
ViewData.SelectList(o => model.NotMaxTitle, () => this.GetTitle(model.MaxTitle)); ViewData.SelectList(o => model.NotMaxTitle, () => this.GetTitle(model.NotMaxTitle));
ViewData.SelectList(o => model.Nationality, () => this.GetNationality(model.Nationality)); ViewData.SelectList(o => model.Nationality, () => this.GetNationality(model.Nationality));
ViewData.SelectList(o => model.UserType, () => this.GetUserType(model.UserType)); ViewData.SelectList(o => model.UserType, () => this.GetUserType(model.UserType));
ViewData.SelectList(o => model.PostType, () => this.GetPostType(model.PostType)); ViewData.SelectList(o => model.PostType, () => this.GetPostType(model.PostType));
@ -664,7 +665,7 @@ namespace TeacherExt.Controllers
row.Export("AD", headers, () => teacher.FullTimeSchool)?.SetCell(++colIndex, style, teacher.FullTimeSchool); row.Export("AD", headers, () => teacher.FullTimeSchool)?.SetCell(++colIndex, style, teacher.FullTimeSchool);
row.Export("AE", headers, () => teacher.FullTimeSchoolType)?.SetCell(++colIndex, style, teacher.FullTimeSchoolType); row.Export("AE", headers, () => teacher.FullTimeSchoolType)?.SetCell(++colIndex, style, teacher.FullTimeSchoolType);
row.Export("AF", headers, () => teacher.FullTimeSchoolMajor)?.SetCell(++colIndex, style, teacher.FullTimeSchoolMajor); row.Export("AF", headers, () => teacher.FullTimeSchoolMajor)?.SetCell(++colIndex, style, teacher.FullTimeSchoolMajor);
row.Export("AG", headers, () => teacher.FullTimeSchoolEducation)?.SetCell(++colIndex, style, teacher.FullTimeSchoolEducation); row.Export("AG", headers, () => teacher.FullTimeSchoolEducation)?.SetCell(++colIndex, style, educations.GetText(teacher.FullTimeSchoolEducation));
row.Export("AH", headers, () => teacher.FullTimeSchoolEducationDate)?.SetCell(++colIndex, style, teacher.FullTimeSchoolEducationDate); row.Export("AH", headers, () => teacher.FullTimeSchoolEducationDate)?.SetCell(++colIndex, style, teacher.FullTimeSchoolEducationDate);
row.Export("AI", headers, () => teacher.JobTimeSchool)?.SetCell(++colIndex, style, teacher.JobTimeSchool); row.Export("AI", headers, () => teacher.JobTimeSchool)?.SetCell(++colIndex, style, teacher.JobTimeSchool);
row.Export("AJ", headers, () => teacher.JobTimeSchoolType)?.SetCell(++colIndex, style, teacher.JobTimeSchoolType); row.Export("AJ", headers, () => teacher.JobTimeSchoolType)?.SetCell(++colIndex, style, teacher.JobTimeSchoolType);

@ -8,12 +8,12 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Localization; using Microsoft.AspNetCore.Localization;
using Microsoft.Extensions.Localization; using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json; using Newtonsoft.Json;
@ -26,7 +26,6 @@ using System.Text.Encodings.Web;
using System.Text.Unicode; using System.Text.Unicode;
using System.Threading.Tasks; using System.Threading.Tasks;
using TeacherExt.Data; using TeacherExt.Data;
using Microsoft.AspNetCore.Mvc.DataAnnotations;
namespace TeacherExt namespace TeacherExt
{ {
@ -74,12 +73,10 @@ namespace TeacherExt
services.Configure<RequestLocalizationOptions>( services.Configure<RequestLocalizationOptions>(
options => options =>
{ {
var supportedCultures = new List<CultureInfo> var supportedCultures = new List<CultureInfo>{
{ //new CultureInfo("en-US"),
new CultureInfo("en-US"), new CultureInfo("zh-CN"),
new CultureInfo("zh-CN"), };
};
options.DefaultRequestCulture = new RequestCulture(culture: "zh-CN", uiCulture: "zh-CN"); options.DefaultRequestCulture = new RequestCulture(culture: "zh-CN", uiCulture: "zh-CN");
options.SupportedCultures = supportedCultures; options.SupportedCultures = supportedCultures;
options.SupportedUICultures = supportedCultures; options.SupportedUICultures = supportedCultures;
@ -99,7 +96,7 @@ namespace TeacherExt
// var localizer = factory.Create("Resources.Resource", Assembly.GetEntryAssembly().GetName().Name); // var localizer = factory.Create("Resources.Resource", Assembly.GetEntryAssembly().GetName().Name);
// return localizer; // return localizer;
// }; // };
//}); //});
services.AddControllers() services.AddControllers()
.ConfigureApiBehaviorOptions(options => .ConfigureApiBehaviorOptions(options =>
@ -188,6 +185,8 @@ namespace TeacherExt
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{ {
string basePath = this.Configuration.GetValue("BasePath", $"/{Assembly.GetEntryAssembly().GetName().Name}");
app.UsePathBase(basePath);
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(c => app.UseSwaggerUI(c =>
{ {

@ -5,7 +5,7 @@
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages> <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<GenerateAssemblyProductAttribute>true</GenerateAssemblyProductAttribute> <GenerateAssemblyProductAttribute>true</GenerateAssemblyProductAttribute>
<Version>1.0.0.0-beta.10</Version> <Version>1.0.0.0-rc.4</Version>
<UserSecretsId>13a75881-1072-47ca-88e9-4d78bd678d65</UserSecretsId> <UserSecretsId>13a75881-1072-47ca-88e9-4d78bd678d65</UserSecretsId>
</PropertyGroup> </PropertyGroup>

@ -108,6 +108,7 @@
<script src="~/lib/expressive.annotations.validate/expressive.annotations.validate.min.js"></script> <script src="~/lib/expressive.annotations.validate/expressive.annotations.validate.min.js"></script>
<script src="~/lib/fancybox/jquery.fancybox.min.js"></script> <script src="~/lib/fancybox/jquery.fancybox.min.js"></script>
<script src="~/lib/sweetalert2/dist/sweetalert2.all.min.js"></script> <script src="~/lib/sweetalert2/dist/sweetalert2.all.min.js"></script>
<script src="~/lib/moment.js/moment.min.js"></script>
<script src="~/lib/jquery-datetimepicker/jquery.datetimepicker.full.min.js"></script> <script src="~/lib/jquery-datetimepicker/jquery.datetimepicker.full.min.js"></script>
<script src="~/lib/select2/js/select2.full.min.js"></script> <script src="~/lib/select2/js/select2.full.min.js"></script>
<script src="~/lib/select2/js/i18n/zh-CN.js"></script> <script src="~/lib/select2/js/i18n/zh-CN.js"></script>

@ -7,6 +7,7 @@
} }
}, },
"server.urls": "http://*:8081", "server.urls": "http://*:8081",
"BasePath": "/profile_ext",
"AllowedHosts": "*", "AllowedHosts": "*",
"database": "sqlite", "database": "sqlite",
"jwt": { "jwt": {

@ -147,11 +147,16 @@ function InitControls() {
// //
if ($.datetimepicker) { if ($.datetimepicker) {
$.datetimepicker.setLocale('zh'); $.datetimepicker.setLocale('zh');
$('.edit-date').datetimepicker({ $('.edit-date').each(function () {
closeOnDateSelect:true, var picker = $(this).datetimepicker({
timepicker: false, format: 'Y-m-d', closeOnDateSelect: true,
onChangeDateTime: function (dp, $input) { timepicker: false, format: 'Y-m-d',
$($input).valid(); onChangeDateTime: function (dp, $input) {
$($input).valid();
}
});
if ($(this).val()) {
$(this).val(moment($(this).datetimepicker('getValue')).format("YYYY-MM-DD"));
} }
}); });
$('.edit-datetime').datetimepicker({ format: 'Y-m-d H:i' }); $('.edit-datetime').datetimepicker({ format: 'Y-m-d H:i' });

@ -24,7 +24,7 @@ vpn下载&服务器地址https://125.72.102.82:44331
Web10.10.15.12 root DsIdeal@123 Web10.10.15.12 root DsIdeal@123
/usr/local/openresty/nginx/sbin/nginx /usr/local/openresty/nginx/sbin/nginx
/usr/local/openresty/nginx/conf/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
数据库: 数据库:
10.10.15.13:22066 root DsideaL147258369 10.10.15.13:22066 root DsideaL147258369

Loading…
Cancel
Save