Commit 4a50e38a by liuyong

修改bug

1 parent 9223b210
......@@ -210,10 +210,11 @@ const leftCustomGraph = function(that) {//左侧自定义图形
w: 71
})
})
var xml = that.createLibraryDataFromImages(images);
console.log(images)
// var xml = that.createLibraryDataFromImages(images);
var file = new LocalLibrary(that, xml, libraryName);
that.libraryLoaded(file, images, null, false);
// var file = new LocalLibrary(that, xml, libraryName);
// that.libraryLoaded(file, images, null, false);
}else {
}
......
......@@ -328,6 +328,10 @@ export function getTypicalExampleExcel(params) {
export function getDocPoolList(params) {
return post(EADC_KNOWLEDGE_POOL + '/kl-doc-pool/', params)
}
// 总体架构资产文档库,下载
export function downTotalArchiPropertyDocFile(params) {
return download(EADC_SHARED_ABILITY + '/oss/downloadObject', params)
}
// 新建总体架构资产文档
export function getDocPoolAdd(params) {
return post(EADC_KNOWLEDGE_POOL + '/kl-doc-pool/cDocPool', params)
......
......@@ -585,29 +585,27 @@ export default {
if(row.filesValue) {
let filesValue = JSON.parse(row.filesValue);
if(filesValue.length > 0) {
this.tableData4.forEach((item, index) => {
item.fileList = filesValue[index] ? [
{
name: filesValue[index].fileName,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
item.fileArray = filesValue[index] ? [
{
name: filesValue[index].fileName,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
});
}
console.log(this.tableData4)
this.tableData4.forEach((item, index) => {
item.fileList = Object.keys(filesValue[index]).length > 0 ? [
{
name: filesValue[index].fileName,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
item.fileArray = Object.keys(filesValue[index]).length > 0 ? [
{
name: filesValue[index].fileName,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
});
// console.log(this.tableData4)
}
this.prjId = row.prjId;
},
......@@ -691,15 +689,16 @@ export default {
manageOrgId = this.selectRow[0].manageOrgId;
let filesValue = [];
this.tableData4.forEach(item => {
if(item.fileArray.length > 0) {
filesValue.push({
filesValue.push(
item.fileArray.length > 0 ? {
busiFileName: item.tableLet1,
fileId: item.fileArray[0].fileId,
fileName: item.fileArray[0].fileName,
fileUrl: item.fileArray[0].fileUrl,
})
}
})
} : {}
);
});
console.log(filesValue)
const params = {
agoPrjCode, agoPrjId, agoPrjName, appCode, appId, appName, buildOrg, buildType, manageDeptId, manageOrgId,
prjName: this.ruleForm.let2,
......
......@@ -50,7 +50,7 @@
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="fileName" label="附件" align="center">
<template slot-scope="scope">
<a style="color: #0D867F;text-decoration: underline;" :href="scope.row.fileUrl" :download="scope.row.fileName">{{scope.row.fileName}}</a>
<el-button type="text" @click="downloadFile(scope.row)">{{ scope.row.fileName }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -128,6 +128,7 @@ import {
getDocPoolAdd,
getDianXingAnLiSelectData,
getDocPoolExcel,
downTotalArchiPropertyDocFile
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
......@@ -185,6 +186,27 @@ export default {
});
},
methods: {
downloadFile(row) {
const params = {
"fileId": row.fileId
};
downTotalArchiPropertyDocFile(params).then(res => {
if(res.code == 200) {
console.log(res)
// let blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
// let url = URL.createObjectURL(blob);
// let link = document.createElement('a');
// link.href = url;
// document.body.appendChild(link);
// link.click();
}else{
Message({
type: 'error',
message: res.msg
});
}
});
},
search_table() {//搜索
this.pager.current = 1;
this.getList();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!