Commit 4a50e38a by liuyong

修改bug

1 parent 9223b210
...@@ -210,10 +210,11 @@ const leftCustomGraph = function(that) {//左侧自定义图形 ...@@ -210,10 +210,11 @@ const leftCustomGraph = function(that) {//左侧自定义图形
w: 71 w: 71
}) })
}) })
var xml = that.createLibraryDataFromImages(images); console.log(images)
// var xml = that.createLibraryDataFromImages(images);
var file = new LocalLibrary(that, xml, libraryName); // var file = new LocalLibrary(that, xml, libraryName);
that.libraryLoaded(file, images, null, false); // that.libraryLoaded(file, images, null, false);
}else { }else {
} }
......
...@@ -328,6 +328,10 @@ export function getTypicalExampleExcel(params) { ...@@ -328,6 +328,10 @@ export function getTypicalExampleExcel(params) {
export function getDocPoolList(params) { export function getDocPoolList(params) {
return post(EADC_KNOWLEDGE_POOL + '/kl-doc-pool/', 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) { export function getDocPoolAdd(params) {
return post(EADC_KNOWLEDGE_POOL + '/kl-doc-pool/cDocPool', params) return post(EADC_KNOWLEDGE_POOL + '/kl-doc-pool/cDocPool', params)
......
...@@ -585,29 +585,27 @@ export default { ...@@ -585,29 +585,27 @@ export default {
if(row.filesValue) { if(row.filesValue) {
let filesValue = JSON.parse(row.filesValue); let filesValue = JSON.parse(row.filesValue);
if(filesValue.length > 0) { this.tableData4.forEach((item, index) => {
this.tableData4.forEach((item, index) => { item.fileList = Object.keys(filesValue[index]).length > 0 ? [
item.fileList = filesValue[index] ? [ {
{ name: filesValue[index].fileName,
name: filesValue[index].fileName, url: filesValue[index].fileUrl,
url: filesValue[index].fileUrl, fileId: filesValue[index].fileId,
fileId: filesValue[index].fileId, fileName: filesValue[index].fileName,
fileName: filesValue[index].fileName, fileUrl: filesValue[index].fileUrl,
fileUrl: filesValue[index].fileUrl, }
} ] : [];
] : []; item.fileArray = Object.keys(filesValue[index]).length > 0 ? [
item.fileArray = filesValue[index] ? [ {
{ name: filesValue[index].fileName,
name: filesValue[index].fileName, url: filesValue[index].fileUrl,
url: filesValue[index].fileUrl, fileId: filesValue[index].fileId,
fileId: filesValue[index].fileId, fileName: filesValue[index].fileName,
fileName: filesValue[index].fileName, fileUrl: filesValue[index].fileUrl,
fileUrl: filesValue[index].fileUrl, }
} ] : [];
] : []; });
}); // console.log(this.tableData4)
}
console.log(this.tableData4)
} }
this.prjId = row.prjId; this.prjId = row.prjId;
}, },
...@@ -691,15 +689,16 @@ export default { ...@@ -691,15 +689,16 @@ export default {
manageOrgId = this.selectRow[0].manageOrgId; manageOrgId = this.selectRow[0].manageOrgId;
let filesValue = []; let filesValue = [];
this.tableData4.forEach(item => { this.tableData4.forEach(item => {
if(item.fileArray.length > 0) { filesValue.push(
filesValue.push({ item.fileArray.length > 0 ? {
busiFileName: item.tableLet1, busiFileName: item.tableLet1,
fileId: item.fileArray[0].fileId, fileId: item.fileArray[0].fileId,
fileName: item.fileArray[0].fileName, fileName: item.fileArray[0].fileName,
fileUrl: item.fileArray[0].fileUrl, fileUrl: item.fileArray[0].fileUrl,
}) } : {}
} );
}) });
console.log(filesValue)
const params = { const params = {
agoPrjCode, agoPrjId, agoPrjName, appCode, appId, appName, buildOrg, buildType, manageDeptId, manageOrgId, agoPrjCode, agoPrjId, agoPrjName, appCode, appId, appName, buildOrg, buildType, manageDeptId, manageOrgId,
prjName: this.ruleForm.let2, prjName: this.ruleForm.let2,
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="fileName" label="附件" align="center"> <el-table-column prop="fileName" label="附件" align="center">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -128,6 +128,7 @@ import { ...@@ -128,6 +128,7 @@ import {
getDocPoolAdd, getDocPoolAdd,
getDianXingAnLiSelectData, getDianXingAnLiSelectData,
getDocPoolExcel, getDocPoolExcel,
downTotalArchiPropertyDocFile
} from '@/api/index.js'; } from '@/api/index.js';
import { MessageBox, Message } from 'element-ui'; import { MessageBox, Message } from 'element-ui';
import $ from 'jquery'; import $ from 'jquery';
...@@ -185,6 +186,27 @@ export default { ...@@ -185,6 +186,27 @@ export default {
}); });
}, },
methods: { 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() {//搜索 search_table() {//搜索
this.pager.current = 1; this.pager.current = 1;
this.getList(); this.getList();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!