|
|
@@ -53,12 +53,23 @@
|
|
|
:selection.sync="selection"
|
|
|
highlight-current-row
|
|
|
>
|
|
|
+
|
|
|
+ <template v-slot:action="{ row, $index }">
|
|
|
+
|
|
|
+ <el-link type="primary" @click="fileDetails(row)"
|
|
|
+ >详情</el-link
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+
|
|
|
</ele-pro-table>
|
|
|
</template>
|
|
|
</ele-split-layout>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
+ <fileBrowse ref="browseRef"></fileBrowse>
|
|
|
+
|
|
|
<div slot="footer">
|
|
|
<el-button type="primary" @click="handleSave"> 选择 </el-button>
|
|
|
<el-button @click="handleClose"> 取消 </el-button>
|
|
|
@@ -70,8 +81,11 @@
|
|
|
import { getDocTreeListAPI, filePageAPI } from '@/api/material/file';
|
|
|
import { mapGetters } from 'vuex';
|
|
|
|
|
|
+
|
|
|
+ import fileBrowse from '../file/fileBrowse.vue'
|
|
|
+
|
|
|
export default {
|
|
|
- components: {},
|
|
|
+ components: { fileBrowse },
|
|
|
mixins: [],
|
|
|
|
|
|
data() {
|
|
|
@@ -185,6 +199,16 @@
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right'
|
|
|
+
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
@@ -255,43 +279,15 @@
|
|
|
this.$emit('close', JSON.parse(JSON.stringify(this.selection)));
|
|
|
},
|
|
|
|
|
|
- /* 表格操作按钮事件 */
|
|
|
- handleOperation(type, data) {
|
|
|
- switch (type) {
|
|
|
- case 'checkOut':
|
|
|
- this.checkOut(data);
|
|
|
- break;
|
|
|
- case 'checkIn':
|
|
|
- this.checkIn(data);
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
|
|
|
- // 检出文档
|
|
|
- checkOut(row) {
|
|
|
- let query = {
|
|
|
- id: row.id,
|
|
|
- userId: this.user.info.userId
|
|
|
- };
|
|
|
- checkOutAPI(query).then((res) => {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.msg,
|
|
|
- duration: 1000
|
|
|
- });
|
|
|
- this.reload();
|
|
|
- });
|
|
|
+ fileDetails(row) {
|
|
|
+ this.$refs.browseRef.setFileUrl(row)
|
|
|
},
|
|
|
|
|
|
- // 归还文档
|
|
|
- checkIn(row) {
|
|
|
- let query = {
|
|
|
- id: row.id,
|
|
|
- userId: this.user.info
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|