|
|
@@ -55,7 +55,7 @@
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
text
|
|
|
- @click="show = true"
|
|
|
+ @click="showDetail(row)"
|
|
|
>查 看
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -220,7 +220,11 @@ export default {
|
|
|
onLoad() {
|
|
|
const data = Object.assign(this.page, { id: this.pid })
|
|
|
this.$api.store.fileList(data).then(res => {
|
|
|
- if (res.code === 200 && res.data.files.length > 0) {
|
|
|
+ if (res.code === 200) {
|
|
|
+ if (res.data.files.length === 0) {
|
|
|
+ this.data.length = 0
|
|
|
+ return
|
|
|
+ }
|
|
|
this.data = res.data.files.map(ele => {
|
|
|
delete ele.fileId
|
|
|
const tmp = ele.fileFolder
|
|
|
@@ -331,6 +335,25 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 查看 文件要素
|
|
|
+ * @param row
|
|
|
+ */
|
|
|
+ showDetail(row) {
|
|
|
+ this.$api.store
|
|
|
+ .showDetail({ fileId: row.fileId, projectId: row.projectId })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ if (Object.keys(res.data).length === 0) {
|
|
|
+ this.$message.error('文件正在解析中或者文件解析失败,暂无数据')
|
|
|
+ } else {
|
|
|
+ this.show = true
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|