|
@@ -3,13 +3,18 @@
|
|
|
<el-form :inline="true" class="query-form m-b-10" v-if="searchVisible" ref="searchForm" :model="searchForm"
|
|
|
@keyup.enter="refreshList()" @submit.prevent>
|
|
|
<!-- 搜索框-->
|
|
|
- <el-form-item prop="fileName" label="附件名称">
|
|
|
+ <el-form-item prop="fileName" label="附件名称:">
|
|
|
<el-input style="width: 200px;" v-model="searchForm.fileName" placeholder="请输入附件名称"
|
|
|
clearable></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="userName" label="上传人">
|
|
|
+ <el-form-item prop="userName" label="上传人:">
|
|
|
<el-input style="width: 200px;" v-model="searchForm.userName" placeholder="请输入上传人" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item prop="userName" label="收藏分类:">
|
|
|
+ <el-select v-model="searchForm.classification" clearable placeholder="请选择收藏分类">
|
|
|
+ <el-option v-for="(item, index) in dictList" :key="index" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="refreshList()" icon="search">查询</el-button>
|
|
|
<el-button type="default" @click="resetSearch()" icon="refresh-right">重置</el-button>
|
|
@@ -19,7 +24,7 @@
|
|
|
<div class="jp-table">
|
|
|
<vxe-toolbar ref="dataSetToolbar" :refresh="{ query: refreshList }" export print custom>
|
|
|
<template #buttons>
|
|
|
- <el-button v-if="hasPermission('database:datamodel:dataSet:add')" type="primary" icon="plus"
|
|
|
+ <el-button v-if="hasPermission('attachment:add')" type="primary" icon="plus"
|
|
|
@click="add()">上传附件</el-button>
|
|
|
</template>
|
|
|
<template #tools>
|
|
@@ -43,7 +48,7 @@
|
|
|
<div>
|
|
|
<el-link type="primary" :underline="false" @click="showFile(scope.row)">{{
|
|
|
scope.row.fileName
|
|
|
- }}</el-link>
|
|
|
+ }}</el-link>
|
|
|
</div>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
@@ -60,7 +65,7 @@
|
|
|
<vxe-column fixed="right" align="center" width="320" title="操作">
|
|
|
<template #default="scope">
|
|
|
<el-button v-if="
|
|
|
- activeName == '0' && scope.row.createById == userInfo.id
|
|
|
+ activeName == '0'
|
|
|
" type="success" text @click="edit(scope.row.id)">编辑</el-button>
|
|
|
<el-button v-if="activeName == '0' && !scope.row.officeId && scope.row.collectType != 1"
|
|
|
type="primary" text @click="share(scope.row.id, '1')">部门共享</el-button>
|
|
@@ -111,7 +116,8 @@
|
|
|
|
|
|
</v-dialog>
|
|
|
<el-image-viewer hide-on-click-modal v-if="showViewer" @close="closeViewer" :url-list="[url]" zIndex="9999" />
|
|
|
- <workCollectAccessoryForm @refreshList="refreshList" ref="workCollectAccessoryRef"></workCollectAccessoryForm>
|
|
|
+ <workCollectAccessoryForm @refreshList="refreshList" @onFreshDict="handleGetDict" ref="workCollectAccessoryRef">
|
|
|
+ </workCollectAccessoryForm>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -150,7 +156,8 @@ export default {
|
|
|
interfaceTable: [],
|
|
|
loading: false,
|
|
|
userInfo: {},
|
|
|
- ossService: null
|
|
|
+ ossService: null,
|
|
|
+ dictList: []
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
|
@@ -164,6 +171,7 @@ export default {
|
|
|
$table.connect($toolbar);
|
|
|
});
|
|
|
this.refreshList();
|
|
|
+ this.handleGetDict()
|
|
|
},
|
|
|
methods: {
|
|
|
ifName(row) {
|
|
@@ -191,7 +199,6 @@ export default {
|
|
|
showFile(row) {
|
|
|
if (this.ifName(row)) {
|
|
|
this.ossService.getTemporaryUrl(row.url).then((data) => {
|
|
|
- console.log(data);
|
|
|
this.onPreview(data)
|
|
|
})
|
|
|
} else {
|
|
@@ -206,8 +213,9 @@ export default {
|
|
|
},
|
|
|
//获取字典值
|
|
|
handleGetDict() {
|
|
|
- dictService.getDictListMapByDict("classification").then((data) => {
|
|
|
+ workCollectAccessoryService.queryDictListByName("classification").then((data) => {
|
|
|
this.$refs.workCollectAccessoryRef.dictList = data
|
|
|
+ this.dictList = data
|
|
|
});
|
|
|
},
|
|
|
// 判断用户是否已经收藏此文件
|