111 lines
2.8 KiB
Vue
111 lines
2.8 KiB
Vue
<template>
|
|
<el-container>
|
|
<el-main class="nopadding">
|
|
<scTable
|
|
ref="table"
|
|
:apiObj="apiObj"
|
|
row-key="id"
|
|
hideDo
|
|
stripe
|
|
|
|
>
|
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
|
<el-table-column label="单位" prop="rparty" >
|
|
<template #default="scope">
|
|
{{scope.row.rparty_.name}}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="文件分类" prop="file_cate" >
|
|
<template #default="scope">
|
|
{{scope.row.file_cate_.name}}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="文件" prop="files" >
|
|
<template #default="scope">
|
|
<div v-for="item in scope.row.files_" :key="item.id">
|
|
<el-link style="font-size:12px" type="primary" :href="item.path" target="_blank">{{item.name}}</el-link>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column label="操作" fixed="right" align="left" width="170">
|
|
<template #default="scope">
|
|
<el-button
|
|
link
|
|
type="primary"
|
|
size="small"
|
|
@click="table_show(scope.row, scope.$index)"
|
|
>查看</el-button
|
|
>
|
|
<el-button
|
|
link
|
|
type="warning"
|
|
size="small"
|
|
@click="table_edit(scope.row, scope.$index)"
|
|
>编辑</el-button
|
|
>
|
|
<el-popconfirm
|
|
title="确定删除吗?"
|
|
@confirm="table_del(scope.row, scope.$index)"
|
|
>
|
|
<template #reference>
|
|
<el-button link type="danger" size="small">删除</el-button>
|
|
</template>
|
|
</el-popconfirm>
|
|
</template>
|
|
</el-table-column> -->
|
|
</scTable>
|
|
</el-main>
|
|
</el-container>
|
|
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: "remployee",
|
|
components: {
|
|
},
|
|
data() {
|
|
return {
|
|
apiObj: this.$API.rpm.rfile.list,
|
|
query: {},
|
|
selection: [],
|
|
|
|
|
|
};
|
|
},
|
|
methods: {
|
|
|
|
//查看
|
|
table_show(row) {
|
|
this.dialog.save = true;
|
|
this.$nextTick(() => {
|
|
this.$refs.saveDialog.open("show").setData(row);
|
|
});
|
|
},
|
|
|
|
//权限设置
|
|
permission() {
|
|
this.dialog.permission = true;
|
|
this.$nextTick(() => {
|
|
this.$refs.permissionDialog.open();
|
|
});
|
|
},
|
|
//删除
|
|
async table_del(row) {
|
|
|
|
this.$API.rpm.remployee.delete
|
|
.req(row.id)
|
|
.then((res) => {
|
|
this.$message.success("删除成功");
|
|
|
|
return res;
|
|
})
|
|
.catch((err) => {
|
|
return err;
|
|
});
|
|
},
|
|
resetQuery() {
|
|
this.query = {};
|
|
},
|
|
},
|
|
};
|
|
</script> |