Browse Source

展厅bug,藏品编辑必须查看作品bug

licailing 4 years ago
parent
commit
527893db02

+ 1 - 0
src/main/java/com/izouma/nineth/service/ShowroomService.java

@@ -177,6 +177,7 @@ public class ShowroomService {
         Set<Long> removeRecord = new HashSet<>(showCollectionMap.keySet());
 
         if (CollUtil.isNotEmpty(showCollections)) {
+             showCollections = showCollections.stream().distinct().collect(Collectors.toList());
 
             if (recordRoom.getMaxCollection() < showCollections.size()) {
                 throw new BusinessException("选择的藏品数量大于最多可放置数量");

+ 1 - 1
src/main/vue/src/views/BlindBoxEdit.vue

@@ -601,7 +601,7 @@ export default {
                 items: [
                     {
                         validator: (rule, value, callback) => {
-                            if (this.blindBoxItems.length === 0) {
+                            if (this.canEdit && this.blindBoxItems.length === 0) {
                                 callback(new Error('请添加盲盒内容'));
                                 return;
                             }

+ 11 - 5
src/main/vue/src/views/company/CompanyRoomEdit.vue

@@ -16,7 +16,7 @@
                     size="small"
                     style="max-width: 750px"
                 >
-                    <el-form-item prop="reason" label="拒绝理由" v-if="formData.reason && formData.status!='SUCCESS'">
+                    <el-form-item prop="reason" label="拒绝理由" v-if="formData.reason && formData.status != 'SUCCESS'">
                         <el-input
                             type="textarea"
                             v-model="formData.reason"
@@ -103,13 +103,19 @@
                 <div style="margin-bottom: 10px">如果找到没有藏品,请先查看藏品是否审核通过</div>
                 <el-form :model="{ collectionId }" ref="collectionForm" inline>
                     <el-form-item prop="collectionId" :rules="{ required: true, message: '请选择藏品' }">
-                        <el-select v-model="collectionId" style="width: 350px">
+                        <!-- <el-select v-model="collectionId" style="width: 350px">
                             <el-option
                                 v-for="item in collections"
                                 :key="item.id"
                                 :label="item.name"
                                 :value="item.id"
                             ></el-option>
+                        </el-select> -->
+                        <el-select v-model="collectionId" filterable>
+                            <el-option v-for="item in collections" :label="item.name" :value="item.id" :key="item.id">
+                                <span style="float: left">{{ item.name }}</span>
+                                <span style="float: right; color: #8492a6; font-size: 13px">#{{ item.id }}</span>
+                            </el-option>
                         </el-select>
                     </el-form-item>
                 </el-form>
@@ -176,7 +182,7 @@ export default {
             settings: [],
             collections: [],
             showCollectionDialog: false,
-            collectionId: []
+            collectionId: ''
         };
     },
     computed: {
@@ -252,11 +258,11 @@ export default {
         delCollection(index) {
             this.formData.collections.splice(index, 1);
         },
-        saveCollection() {
+        saveCollection(res) {
             this.$refs.collectionForm
                 .validate()
                 .then(() => {
-                    if (!this.formData.collections.find(i => i.id === this.collectionId)) {
+                    if (!this.formData.collections.find(i => i.collectionId === this.collectionId)) {
                         let data = this.collections.find(i => i.id === this.collectionId);
                         if (data.pic[0].type == 'video/mp4') {
                             this.formData.collections.push({