|
@@ -78,7 +78,7 @@
|
|
<el-table-column label="操作" width="200px">
|
|
<el-table-column label="操作" width="200px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
<div>
|
|
- <!-- <el-button type="primary" size="small">查看</el-button> -->
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="check(scope.row)" :disabled="scope.row.ingestionStatus == 'failed'">查看</el-button>
|
|
<el-button type="danger" size="small" v-if="scope.row.userid == userid" @click="deleteFile(scope.row.id, scope.row.documentid)">删除</el-button>
|
|
<el-button type="danger" size="small" v-if="scope.row.userid == userid" @click="deleteFile(scope.row.id, scope.row.documentid)">删除</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -108,6 +108,7 @@
|
|
:dialogVisibleOffice.sync="dialogVisibleOffice"
|
|
:dialogVisibleOffice.sync="dialogVisibleOffice"
|
|
:url="wurl"
|
|
:url="wurl"
|
|
></wOffice>
|
|
></wOffice>
|
|
|
|
+ <checkDialog ref="checkDialog"></checkDialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -124,53 +125,14 @@ import wpdf from "../test/file/wPdf2.vue";
|
|
import wOffice from "../test/file/wOffice.vue";
|
|
import wOffice from "../test/file/wOffice.vue";
|
|
|
|
|
|
import { v4 as uuidv4 } from "uuid";
|
|
import { v4 as uuidv4 } from "uuid";
|
|
|
|
+import checkDialog from './components/checkDialog'
|
|
|
|
|
|
-const getFile = (url) => {
|
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
|
- var credentials = {
|
|
|
|
- accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
|
- secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR",
|
|
|
|
- }; //秘钥形式的登录上传
|
|
|
|
- window.AWS.config.update(credentials);
|
|
|
|
- window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
|
- let url2 = url;
|
|
|
|
- let _url2 = "";
|
|
|
|
- if (
|
|
|
|
- url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
|
|
|
|
- ) {
|
|
|
|
- _url2 = url2.split(
|
|
|
|
- "https://view.officeapps.live.com/op/view.aspx?src="
|
|
|
|
- )[1];
|
|
|
|
- } else {
|
|
|
|
- _url2 = url2;
|
|
|
|
- }
|
|
|
|
- var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
|
- let name = decodeURIComponent(
|
|
|
|
- _url2
|
|
|
|
- .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
|
|
|
|
- .replace(/\+/g, " ")
|
|
|
|
- );
|
|
|
|
- var params = {
|
|
|
|
- Bucket: "ccrb",
|
|
|
|
- Key: name,
|
|
|
|
- };
|
|
|
|
- s3.getObject(params, function (err, data) {
|
|
|
|
- if (err) {
|
|
|
|
- console.log(err, err.stack);
|
|
|
|
- resolve({ data: 1 });
|
|
|
|
- } else {
|
|
|
|
- resolve({ data: data.Body });
|
|
|
|
- console.log(data);
|
|
|
|
- } // sxuccessful response
|
|
|
|
- });
|
|
|
|
- // axios({
|
|
|
|
- });
|
|
|
|
-};
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
wVideo,
|
|
wVideo,
|
|
wpdf,
|
|
wpdf,
|
|
wOffice,
|
|
wOffice,
|
|
|
|
+ checkDialog
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
userid: {
|
|
userid: {
|
|
@@ -283,7 +245,7 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
uid: this.userid,
|
|
uid: this.userid,
|
|
folderid: this.checkFolderid,
|
|
folderid: this.checkFolderid,
|
|
- n: this.fileName,
|
|
|
|
|
|
+ n: this.fileName.trim(),
|
|
page: this.page,
|
|
page: this.page,
|
|
num: this.limit,
|
|
num: this.limit,
|
|
};
|
|
};
|
|
@@ -444,6 +406,9 @@ export default {
|
|
let array2 = this.checkArray2.map(item => item.documentid);
|
|
let array2 = this.checkArray2.map(item => item.documentid);
|
|
this.deleteFile(array.join(","), array2.join(","))
|
|
this.deleteFile(array.join(","), array2.join(","))
|
|
},
|
|
},
|
|
|
|
+ check(row){
|
|
|
|
+ this.$refs.checkDialog.openG(row.documentid);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.getData();
|
|
this.getData();
|