|
@@ -27,10 +27,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <el-select v-else v-model="item.uploadId" clearable filterable :disabled="form.status == 2 || item.type == 2">
|
|
|
- <el-option v-for="inputFile in inputFileList" :key="inputFile.id" :label="inputFile.name"
|
|
|
- :value="inputFile.id" />
|
|
|
- </el-select>
|
|
|
+ <template v-if="form.status == 2 && item.path.split('.').pop() == 'csv'">
|
|
|
+ <div>
|
|
|
+ <el-link type="primary" style="fontSize:1.3em;marginRight:20px">{{ item.path.split('/').pop() }}</el-link>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="download(item.path)"
|
|
|
+ >{{ "下载文件" }}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -79,6 +87,7 @@ export default {
|
|
|
this.resultData = response.data
|
|
|
this.algoTypeList = this.typeMap.get(this.resultData.type)
|
|
|
this.fetchFileContent(this.resultData.ioSubList)
|
|
|
+ // 判断是不是csv文件,是的话可以显示在线下载
|
|
|
this.getInputFileList()
|
|
|
this.loading = false
|
|
|
})
|
|
@@ -113,6 +122,9 @@ export default {
|
|
|
this.inputFileList = []
|
|
|
}
|
|
|
},
|
|
|
+ download(path) {
|
|
|
+ this.$download.resource(path);
|
|
|
+ },
|
|
|
// 拿到文本文件里的内容
|
|
|
async fetchFileContent(ioSubList) {
|
|
|
try {
|