|
@@ -0,0 +1,176 @@
|
|
|
+<template>
|
|
|
+ <el-dialog
|
|
|
+ title="查看"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="700px"
|
|
|
+ class="el-dialogClass"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <div class="container">
|
|
|
+ <div class="contentBox" v-loading="isLoading">
|
|
|
+ <div class="content rowCloumn">
|
|
|
+ <div class="title">文章摘要:</div>
|
|
|
+ <div class="text">{{ data.summary }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">文档名:</div>
|
|
|
+ <div class="text">{{ data.title }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">类型:</div>
|
|
|
+ <div class="text">{{ data.type }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">上传时间:</div>
|
|
|
+ <div class="text">{{ data.time }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">上传状态:</div>
|
|
|
+ <div class="text">{{ getState(data.ingestionStatus) }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">提取状态:</div>
|
|
|
+ <div class="text">{{ getState2(data.extractionStatus) }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">拥有者:</div>
|
|
|
+ <div class="text">{{ getState2(data.username) }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="nav">
|
|
|
+ <span>切片</span>
|
|
|
+ <span>实体</span>
|
|
|
+ <span>关系</span>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
+ <span slot="footer">
|
|
|
+ <el-button @click="dialogVisible = false">关 闭</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogVisible: false,
|
|
|
+ data: {},
|
|
|
+ did: "",
|
|
|
+ isLoading: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ getState() {
|
|
|
+ return function(item) {
|
|
|
+ if (item == "success") {
|
|
|
+ return "成功";
|
|
|
+ } else if (item == "failed") {
|
|
|
+ return "失败";
|
|
|
+ } else if (item == "augmenting") {
|
|
|
+ return "上传中";
|
|
|
+ } else if (item == "pending") {
|
|
|
+ return "待处理";
|
|
|
+ } else if (item == "enriched") {
|
|
|
+ return "enriched";
|
|
|
+ } else if (!item) {
|
|
|
+ return "上传中";
|
|
|
+ } else {
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ getState2() {
|
|
|
+ return function(item) {
|
|
|
+ if (item == "success") {
|
|
|
+ return "成功";
|
|
|
+ } else if (item == "failed") {
|
|
|
+ return "失败";
|
|
|
+ } else if (item == "pending") {
|
|
|
+ return "待处理";
|
|
|
+ } else if (item == "processing") {
|
|
|
+ return "处理中";
|
|
|
+ } else if (item == "enriched") {
|
|
|
+ return "enriched";
|
|
|
+ } else if (!item) {
|
|
|
+ return "上传中";
|
|
|
+ } else {
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleClose(done) {
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ openG(did) {
|
|
|
+ this.did = did;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.getFileDetail();
|
|
|
+ },
|
|
|
+ getFileDetail() {
|
|
|
+ this.isLoading = true;
|
|
|
+ let params = {
|
|
|
+ documentId: this.did
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.fileApi + "getFileDetail", [params])
|
|
|
+ .then(res => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.log(res.data);
|
|
|
+ this.data = res.data.result;
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.el-dialogClass >>> .el-dialog {
|
|
|
+ margin: 0 auto !important;
|
|
|
+ height: calc(100% - 200px);
|
|
|
+ transform: translateY(-50%);
|
|
|
+ top: 50%;
|
|
|
+}
|
|
|
+
|
|
|
+.el-dialogClass >>> .el-dialog__body {
|
|
|
+ height: calc(100% - 70px - 55px);
|
|
|
+ overflow-y: auto;
|
|
|
+ overflow-x: hidden;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 20px;
|
|
|
+}
|
|
|
+.container{
|
|
|
+ height: 100%;
|
|
|
+ overflow: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.contentBox {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.rowCloumn {
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+
|
|
|
+.rowCloumn .text {
|
|
|
+ margin-top: 8px;
|
|
|
+}
|
|
|
+.contentBox > .content {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #323232;
|
|
|
+ padding: 10px 0;
|
|
|
+ border-bottom: 1px solid #f3f3f3;
|
|
|
+}
|
|
|
+
|
|
|
+.contentBox > .content > .title {
|
|
|
+}
|
|
|
+
|
|
|
+.contentBox > .content > .text {
|
|
|
+}
|
|
|
+</style>
|