This commit is contained in:
路 范
2022-03-14 04:55:23 +08:00
parent 0c32bf8273
commit f2257d72b7
34 changed files with 298 additions and 266 deletions

View File

@@ -1,4 +1,4 @@
#pragma checksum "D:\temp_task\20220313\code\TempTask.WebEntry\Views\Home\Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "12b5a2a81ad18994daf766364de0c2c704c2abf8"
#pragma checksum "D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\Views\Home\Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "34f2fbcac363ec62d82659f31dd55160e6c7faed"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Home_Index), @"mvc.1.0.view", @"/Views/Home/Index.cshtml")]
@@ -12,7 +12,7 @@ namespace AspNetCore
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"12b5a2a81ad18994daf766364de0c2c704c2abf8", @"/Views/Home/Index.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"34f2fbcac363ec62d82659f31dd55160e6c7faed", @"/Views/Home/Index.cshtml")]
public class Views_Home_Index : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#line hidden
@@ -41,7 +41,7 @@ namespace AspNetCore
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
WriteLiteral("<!DOCTYPE html>\r\n<html>\r\n\r\n");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("head", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "12b5a2a81ad18994daf766364de0c2c704c2abf82700", async() => {
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("head", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "34f2fbcac363ec62d82659f31dd55160e6c7faed2728", async() => {
WriteLiteral(@"
<meta charset=""UTF-8"">
<link rel=""stylesheet"" href=""https://unpkg.com/element-ui/lib/theme-chalk/index.css"">
@@ -62,19 +62,31 @@ namespace AspNetCore
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n\r\n");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("body", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "12b5a2a81ad18994daf766364de0c2c704c2abf84090", async() => {
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("body", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "34f2fbcac363ec62d82659f31dd55160e6c7faed4118", async() => {
WriteLiteral(@"
<div id=""app"">
<div>
<el-input-number v-model=""year"" :min=""1970"" :max=""2100"" label=""选择年""></el-input-number>
<el-input-number v-model=""month"" :min=""1"" :max=""12"" label=""选择月""></el-input-number>月 第
<el-input-number v-model=""week"" :min=""1"" :max=""5"" label=""选择周""></el-input-number>周
<div>年:<el-input-number v-model=""year"" :min=""1970"" :max=""2030"" label=""选择年"" size=""small"" controls-position=""right"" style=""margin-left:5px;""></el-input-number></div>
<div>月:<el-input-number v-model=""month"" :min=""1"" :max=""12"" label=""选择月"" size=""small"" controls-position=""right"" style=""margin-left:5px;""></el-input-number></div>
<div>
周:<el-input-number v-model=""week"" :min=""1"" :max=""5"" label=""选择周"" size=""small"" controls-position=""right"" style=""margin-left:5px;""></el-input-number>
</div>
</div>
<div style=""margin-top:15px;"">
<el-button ");
WriteLiteral("@click=\"downloadfile_zongbiao\" :loading=\"loading_zongbiao\">下载文件-总表</el-button>\r\n <el-button ");
WriteLiteral("@click=\"downloadfile_chengshigengxin\" :loading=\"loading_chengshigengxin\">下载文件-城市更新</el-button>\r\n <el-button ");
WriteLiteral("@click=\"downloadfile_fangdichan\" :loading=\"loading_fangdichan\">下载文件-房地产业</el-button>\r\n </div>\r\n </div>\r\n");
<el-dropdown ");
WriteLiteral(@"@command=""downloadfile"">
<el-button type=""primary"" icon=""el-icon-download"" size=""small"" :loading=""loading"">
下载文件<i class=""el-icon-arrow-down el-icon--right""></i>
</el-button>
<el-dropdown-menu slot=""dropdown"">
<el-dropdown-item command=""1"">总表</el-dropdown-item>
<el-dropdown-item command=""2"">城市更新</el-dropdown-item>
<el-dropdown-item command=""3"">房地产业</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
");
}
);
__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper>();
@@ -92,9 +104,7 @@ namespace AspNetCore
el: '#app',
data: function () {
return {
loading_zongbiao: false,
loading_chengshigengxin: false,
loading_fangdichan: false,
loading: false,
year: '',
month: '',
week: ''
@@ -107,28 +117,23 @@ namespace AspNetCore
this.week = this.getMonthWeek(now);
},
methods: {
//总表
loading_zongbiao_false() { this.loading_zongbiao = false },
downloadfile_zongbiao() {
this.loading_zongbiao = true;
let url = '/api/num-zj/download';
this.download(url, 1, ""总表.xlsx"", this.loading_zongbiao_false);
},
//城市更新
loading_chengshigengxin_false() { this.loading_chengshigengxin = false },
");
WriteLiteral(@" downloadfile_chengshigengxin() {
this.loading_chengshigengxin = true;
let url = '/api/num-zj/download';
this.download(url, 2, ""住建系统抓投资情况通报(城市更新).xlsx"", this.loading_chengshigengxin_false);
},
//房地产业
loading_fangdichan_false() { this.loading_fangdichan = false },
downloadfile_fangdichan() {
this.loading_fangdichan = true;
let url = '/api/num-zj/download';
this.download(url, 3, ""住建系统抓投资情况通报(房地产业+GDP支撑性指标.xlsx"", this.loading_fangdichan_false);
loading_false() { this.loading = false },
downloadfile(a) {
let excel_name;
switch (a) {
case ""1"":
excel_name = ""总表.xlsx"";
break;
case ""2"":
excel_name = ""住建系统抓投资情况通报(城市更新).xlsx"";
break;
case ""3"":
excel_name = ""住建系统抓投资情况通报(房地产业+GDP支撑性指标.xlsx"";
break;
}
");
WriteLiteral(@" this.loading = true;
this.download('/api/num-zj/download', a, excel_name, this.loading_false);
},
download(url, type, filename, callback) {
let _this = this;
@@ -137,8 +142,7 @@ namespace AspNetCore
method: 'post',
url: url,
data: { type: type, year: _this.year, month: _this.month, week: _this.week },
responseType: ""blob""");
WriteLiteral(@",
responseType: ""blob"",
}).then(function (response) {
console.log(response);
//解析文件充blod中解析
@@ -148,7 +152,8 @@ namespace AspNetCore
const link = document.createElement(""a"");
link.style.display = ""none"";
link.href = url;
link.setAttribute(""download"", filename);
l");
WriteLiteral(@"ink.setAttribute(""download"", filename);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
@@ -162,8 +167,7 @@ namespace AspNetCore
})
})
},
getMonthWeek(no");
WriteLiteral(@"w) {
getMonthWeek(now) {
var a = now.getYear();
var b = now.getMonth() + 1;
var c = now.getDate();
@@ -175,13 +179,8 @@ namespace AspNetCore
var date = new Date(a, parseInt(b) - 1, c), w = date.getDay(), d = date.getDate();
return Math.ceil(
(d + 6 - w) / 7
);
}
}
})
</script>
</html>");
");
WriteLiteral(" );\r\n }\r\n }\r\n })\r\n</script>\r\n\r\n</html>");
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]

View File

@@ -7,4 +7,4 @@ build_property.PublishSingleFile =
build_property.IncludeAllContentForSelfExtract =
build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows
build_property.RootNamespace = TempTask.WebEntry
build_property.ProjectDir = F:\wuhao\code\number_zj\20220313_Excel\TempTask.WebEntry\
build_property.ProjectDir = D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\

View File

@@ -198,3 +198,7 @@ D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\obj\Deb
D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\obj\Debug\net5.0\ref\TempTask.WebEntry.dll
D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\obj\Debug\net5.0\TempTask.WebEntry.pdb
D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\obj\Debug\net5.0\TempTask.WebEntry.genruntimeconfig.cache
D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\bin\Debug\net5.0\column_name_match_1_1.json
D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\bin\Debug\net5.0\column_name_match_2_2.json
D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\bin\Debug\net5.0\column_name_match_3_3.json
D:\temp_task\20220313\gitcode\number_zj\20220313_Excel\TempTask.WebEntry\bin\Debug\net5.0\column_name_match_3_4.json