|
@@ -41,24 +41,23 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!-- <el-table-column prop="createDate" label="创建日期" width="300"></el-table-column> -->
|
|
|
|
<el-table-column label="操作" width="200">
|
|
<el-table-column label="操作" width="200">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="hui-table-operation" @click.stop="()=>{}">
|
|
<div class="hui-table-operation" @click.stop="()=>{}">
|
|
<span class="table-operation" @click.stop="setPermission(scope.row)">
|
|
<span class="table-operation" @click.stop="setPermission(scope.row)">
|
|
- 设置
|
|
|
|
|
|
+ 权限
|
|
</span>
|
|
</span>
|
|
<span class="table-operation" v-if="!scope.row.directory" @click.stop="download(scope.row)">
|
|
<span class="table-operation" v-if="!scope.row.directory" @click.stop="download(scope.row)">
|
|
下载
|
|
下载
|
|
</span>
|
|
</span>
|
|
<span class="table-operation"
|
|
<span class="table-operation"
|
|
v-if="!scope.row.directory && isPreview(iconName(scope.row.name)).isPreview"
|
|
v-if="!scope.row.directory && isPreview(iconName(scope.row.name)).isPreview"
|
|
- @click.stop="previewFile(scope.row,isPreview(iconName(scope.row.name)).type)">
|
|
|
|
|
|
+ @click.stop="preview(scope.row,isPreview(iconName(scope.row.name)).type)">
|
|
预览
|
|
预览
|
|
</span>
|
|
</span>
|
|
<span class="table-operation" v-if="scope.row.directory"
|
|
<span class="table-operation" v-if="scope.row.directory"
|
|
@click.stop="updateFolder(scope.row)">
|
|
@click.stop="updateFolder(scope.row)">
|
|
- 编辑
|
|
|
|
|
|
+ 重命名
|
|
</span>
|
|
</span>
|
|
<span class="table-operation" @click.stop="deleteItem(scope.row)">
|
|
<span class="table-operation" @click.stop="deleteItem(scope.row)">
|
|
删除
|
|
删除
|
|
@@ -72,7 +71,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<el-dialog title="设置" :visible.sync="dialogVisible" :append-to-body="true">
|
|
<el-dialog title="设置" :visible.sync="dialogVisible" :append-to-body="true">
|
|
- <set-permission v-if="dialogVisible" @callback="callBack" :detailId="detailId"></set-permission>
|
|
|
|
|
|
+ <set-permission v-if="dialogVisible" @callback="callBack" :detail="detail"></set-permission>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<el-dialog :title="isUpdate?'编辑文件夹':'新建文件夹'" :visible.sync="formDialog" width="900px" :append-to-body="true">
|
|
<el-dialog :title="isUpdate?'编辑文件夹':'新建文件夹'" :visible.sync="formDialog" width="900px" :append-to-body="true">
|
|
<folder-form v-if="formDialog" @callback="callBack" :parentId="parentId" :detail="detail"
|
|
<folder-form v-if="formDialog" @callback="callBack" :parentId="parentId" :detail="detail"
|
|
@@ -83,7 +82,7 @@
|
|
<set-approve v-if="setDialog" @callback="callBack" :type="1" title="设置审核人"></set-approve>
|
|
<set-approve v-if="setDialog" @callback="callBack" :type="1" title="设置审核人"></set-approve>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<el-dialog title="审核列表" :visible.sync="messageVisible" width="80%" :append-to-body="true">
|
|
<el-dialog title="审核列表" :visible.sync="messageVisible" width="80%" :append-to-body="true">
|
|
- <message v-if="messageVisible" :option="{messageType:5,dataTypes:'1,2'}"></message>
|
|
|
|
|
|
+ <message v-if="messageVisible" :option="{messageType:5,dataTypes:'1,2,3'}"></message>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<el-dialog title="预览" :visible.sync="fileVisible" width="900px" :append-to-body="true">
|
|
<el-dialog title="预览" :visible.sync="fileVisible" width="900px" :append-to-body="true">
|
|
<video v-if="previewType === 'video' && iframeSrc && fileVisible" :src="iframeSrc" width="100%"
|
|
<video v-if="previewType === 'video' && iframeSrc && fileVisible" :src="iframeSrc" width="100%"
|
|
@@ -128,7 +127,6 @@
|
|
tableData: [],
|
|
tableData: [],
|
|
parentId: -1,
|
|
parentId: -1,
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
- detailId: '',
|
|
|
|
formDialog: false,
|
|
formDialog: false,
|
|
isUpdate: false,
|
|
isUpdate: false,
|
|
detail: {},
|
|
detail: {},
|
|
@@ -228,6 +226,17 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ preview(data, type) {
|
|
|
|
+ projectPermission({
|
|
|
|
+ id: data.id,
|
|
|
|
+ oldPermission: data.permissions || '1',
|
|
|
|
+ type: 'fileView',
|
|
|
|
+ name: data.name,
|
|
|
|
+ folderList: this.folderList
|
|
|
|
+ }, () => {
|
|
|
|
+ this.previewFile(data, type);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
isPreview(filename) {
|
|
isPreview(filename) {
|
|
let type = '',
|
|
let type = '',
|
|
isPreview = false,
|
|
isPreview = false,
|
|
@@ -263,7 +272,7 @@
|
|
if (type === 'init') this.init();
|
|
if (type === 'init') this.init();
|
|
},
|
|
},
|
|
setPermission(data) {
|
|
setPermission(data) {
|
|
- this.detailId = data.id;
|
|
|
|
|
|
+ this.detail = data;
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
},
|
|
},
|
|
updateFolder(data) {
|
|
updateFolder(data) {
|
|
@@ -272,9 +281,17 @@
|
|
this.formDialog = true;
|
|
this.formDialog = true;
|
|
},
|
|
},
|
|
deleteItem(data) {
|
|
deleteItem(data) {
|
|
- this.$confirm(`确定要删除该文件${data.directory?'夹':''}?`, () => {
|
|
|
|
- data.directory ? deleteProjectDir(data.id).then(this.successFunc) : deleteProjectFile(data.id)
|
|
|
|
- .then(this.successFunc);
|
|
|
|
|
|
+ projectPermission({
|
|
|
|
+ id: data.id,
|
|
|
|
+ oldPermission: data.permissions || '1',
|
|
|
|
+ type: data.directory ? 'delete' : 'fileDelete',
|
|
|
|
+ name: data.name,
|
|
|
|
+ folderList: this.folderList
|
|
|
|
+ }, () => {
|
|
|
|
+ this.$confirm(`确定要删除该文件${data.directory?'夹':''}?`, () => {
|
|
|
|
+ data.directory ? deleteProjectDir(data.id).then(this.successFunc) :
|
|
|
|
+ deleteProjectFile(data.id).then(this.successFunc);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
successFunc(res) {
|
|
successFunc(res) {
|
|
@@ -300,7 +317,7 @@
|
|
this.fileVisible = true;
|
|
this.fileVisible = true;
|
|
} else if (type === 'docx' || type === 'doc') {
|
|
} else if (type === 'docx' || type === 'doc') {
|
|
this.iframeSrc =
|
|
this.iframeSrc =
|
|
- `./pdf/web/viewer.html?file=https://www.workark.com/file/fileNodeProject/${data.id}/renderPdf`;
|
|
|
|
|
|
+ `./pdf/web/viewer.html?file=https://www.waywish.com/file/fileNodeProject/${data.id}/renderPdf`;
|
|
this.previewType = 'pdf';
|
|
this.previewType = 'pdf';
|
|
this.fileVisible = true;
|
|
this.fileVisible = true;
|
|
} else if (type === 'xlsx') {
|
|
} else if (type === 'xlsx') {
|