diff --git a/src/api/photo.js b/src/api/photo.js index 49218186..d6f95f15 100644 --- a/src/api/photo.js +++ b/src/api/photo.js @@ -35,4 +35,11 @@ photoApi.delete = photoId => { }) } +photoApi.listTeams = () => { + return service({ + url: `${baseUrl}/teams`, + method: 'get' + }) +} + export default photoApi diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index bfe89f04..a914b964 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -252,6 +252,7 @@ export default { this.queryParam.mediaType = null this.queryParam.attachmentType = null this.loadAttachments() + this.loadMediaTypes() }, handleQuery() { this.queryParam.page = 0 diff --git a/src/views/sheet/internal/PhotoList.vue b/src/views/sheet/internal/PhotoList.vue index de455e3a..2cfeed23 100644 --- a/src/views/sheet/internal/PhotoList.vue +++ b/src/views/sheet/internal/PhotoList.vue @@ -9,7 +9,10 @@ :span="24" class="search-box" > - +
@@ -26,9 +29,15 @@ :sm="24" > - - 11 - 22 + + {{ item }} @@ -80,7 +89,7 @@
{{ item.name }} @@ -289,6 +298,7 @@ export default { thumDrawerVisible: false, photo: {}, photos: [], + teams: [], editable: false, pagination: { page: 1, @@ -299,12 +309,14 @@ export default { page: 0, size: 18, sort: null, - keyword: null + keyword: null, + team: null } } }, created() { this.loadPhotos() + this.loadTeams() }, methods: { loadPhotos(isSearch) { @@ -321,6 +333,11 @@ export default { this.listLoading = false }) }, + loadTeams() { + photoApi.listTeams().then(response => { + this.teams = response.data.data + }) + }, handleCreateOrUpdate() { if (this.photo.id) { photoApi.update(this.photo.id, this.photo).then(response => { @@ -365,11 +382,14 @@ export default { }, selectPhotoThumb(data) { this.photo.url = encodeURI(data.path) + this.photo.thumbnail = encodeURI(data.thumbPath) this.thumDrawerVisible = false }, resetParam() { this.queryParam.keyword = null + this.queryParam.team = null this.loadPhotos() + this.loadTeams() }, onDrawerClose() { this.drawerVisible = false