Commit 8f882f63af63e90de3c6eea0626d9a074b32d10c

Authored by 阿宝
1 parent 61e05c2e

软件下载调整

E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null deleted
1 -Exception during registration:  
2 -System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。  
3 - 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)  
4 - 在 System.Diagnostics.Process.Start()  
5 - 在 System.CommandLine.Invocation.Process.StartProcess(String command, String args, String workingDir, Action`1 stdOut, Action`1 stdErr, ValueTuple`2[] environmentVariables)  
6 - 在 System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_1>d.MoveNext()  
7 \ No newline at end of file 0 \ No newline at end of file
src/views/down/client.vue
@@ -10,7 +10,9 @@ @@ -10,7 +10,9 @@
10 <div class="cont-info"> 10 <div class="cont-info">
11 <img v-if="info.appImage" class="logo" :src="info.appImage" alt="" /> 11 <img v-if="info.appImage" class="logo" :src="info.appImage" alt="" />
12 <div> 12 <div>
13 - <p class="name">{{ `${info.appName||""} ${info.versionName||""}` }}</p> 13 + <p class="name">
  14 + {{ `${info.appName || ""} ${info.versionName || ""}` }}
  15 + </p>
14 <p class="txt">文件大小:{{ `${info.fileSize}` }}M</p> 16 <p class="txt">文件大小:{{ `${info.fileSize}` }}M</p>
15 <p class="txt">最近更新:{{ info.modifiedTime }}</p> 17 <p class="txt">最近更新:{{ info.modifiedTime }}</p>
16 </div> 18 </div>
@@ -27,7 +29,9 @@ @@ -27,7 +29,9 @@
27 </div> 29 </div>
28 <ul class="down-ul"> 30 <ul class="down-ul">
29 <li class="down-li" v-for="item in tableData" :key="item.id"> 31 <li class="down-li" v-for="item in tableData" :key="item.id">
30 - <span @click="setConfigForm(item)">{{ item.configName }}</span> 32 + <span class="p1 ellipsis" @click="setConfigForm(item)">{{
  33 + item.configName
  34 + }}</span>
31 <el-button plan round @click="getAppDownloadUrl(item.id)" 35 <el-button plan round @click="getAppDownloadUrl(item.id)"
32 >下载</el-button 36 >下载</el-button
33 > 37 >
@@ -53,7 +57,7 @@ @@ -53,7 +57,7 @@
53 </div> 57 </div>
54 <div class="form-box"> 58 <div class="form-box">
55 <el-form :model="formData" :rules="ruleForm" label-width="180px"> 59 <el-form :model="formData" :rules="ruleForm" label-width="180px">
56 - <el-form-item label="主菜单设置:" prop="configName" v-if="type==1"> 60 + <el-form-item label="主菜单设置:" prop="configName" v-if="type == 1">
57 <el-col :span="12"> 61 <el-col :span="12">
58 <el-input 62 <el-input
59 v-model.trim="formData.configName" 63 v-model.trim="formData.configName"
@@ -307,7 +311,7 @@ export default { @@ -307,7 +311,7 @@ export default {
307 dialogVis: false, 311 dialogVis: false,
308 askCount: true, 312 askCount: true,
309 examsDuration: true, 313 examsDuration: true,
310 - configId:'', 314 + configId: "",
311 formData: { 315 formData: {
312 configName: "", 316 configName: "",
313 mainMenu: ["问"], 317 mainMenu: ["问"],
@@ -392,14 +396,13 @@ export default { @@ -392,14 +396,13 @@ export default {
392 }, 396 },
393 methods: { 397 methods: {
394 setConfigForm(obj) { 398 setConfigForm(obj) {
395 - let content = JSON.parse(obj.content)  
396 - console.log(content) 399 + let content = JSON.parse(obj.content);
  400 + console.log(content);
397 for (let key in this.formData) { 401 for (let key in this.formData) {
398 content[key] ? (this.formData[key] = content[key]) : ""; 402 content[key] ? (this.formData[key] = content[key]) : "";
399 } 403 }
400 this.type = 2; 404 this.type = 2;
401 - this.configId = obj.id,  
402 - this.dialogVis=true 405 + (this.configId = obj.id), (this.dialogVis = true);
403 }, 406 },
404 setDefaultForm() { 407 setDefaultForm() {
405 for (let key in this.formData) { 408 for (let key in this.formData) {
@@ -471,7 +474,8 @@ export default { @@ -471,7 +474,8 @@ export default {
471 if (status == 0) { 474 if (status == 0) {
472 this.info = { ...data }; 475 this.info = { ...data };
473 this.info.fileSize = 476 this.info.fileSize =
474 - (this.info.fileSize && (this.info.fileSize / 1024).toFixed(0)) || 477 + (this.info.fileSize &&
  478 + (this.info.fileSize / 1024 / 1024).toFixed(2)) ||
475 "--"; 479 "--";
476 } else { 480 } else {
477 this.$message.error(info); 481 this.$message.error(info);
@@ -494,6 +498,11 @@ export default { @@ -494,6 +498,11 @@ export default {
494 }); 498 });
495 if (status == 0) { 499 if (status == 0) {
496 // this.tableData = [...data.list] || []; 500 // this.tableData = [...data.list] || [];
  501 + const a = document.createElement("a");
  502 + a.href = data.downloadUrl;
  503 + document.body.appendChild(a);
  504 + a.click();
  505 + a.remove();
497 } else { 506 } else {
498 this.$message.error(info); 507 this.$message.error(info);
499 } 508 }
@@ -566,6 +575,9 @@ export default { @@ -566,6 +575,9 @@ export default {
566 } 575 }
567 font-size: 16px; 576 font-size: 16px;
568 color: #667ffd; 577 color: #667ffd;
  578 + .p1 {
  579 + cursor: pointer;
  580 + }
569 } 581 }
570 } 582 }
571 } 583 }