Pārlūkot izejas kodu

修改添加品牌高亮显示,修改被覆盖样式

shaun-sheep 4 gadi atpakaļ
vecāks
revīzija
122c62586f

+ 10 - 1
src/components/brand/sagaBrand.vue

@@ -106,7 +106,7 @@
     ChangeKeyWord(keyWord) { //品牌检索
       this.getBrandData()
     },
-    getBrandData() { //获取品牌接口
+    getBrandData(EntityList) { //获取品牌接口
       let params = {
         Type: this.sort
       }
@@ -115,6 +115,15 @@
       }
       brandQuery(params, res => {
         this.brandList = res.Content[0]
+        let id = ''
+        id = EntityList && EntityList.map(i => i.BrandID).join('')
+        for (let key in this.brandList) {
+          this.brandList[key].forEach(i => {
+            if (i.BrandID == id) {
+              this.$set(i, 'new', true)
+            }
+          })
+        }
       })
     },
     handleClickBrand(brand) { //点击品牌

+ 2 - 2
src/components/business/addBrand.vue

@@ -134,7 +134,7 @@ export default {
             brandCreate(params, res => {
               this.outerVisible = false
               this.ruleForm = { BrandCname: '', BrandName: '', BrandLogo: '' }
-              this.$emit("refresh")
+              this.$emit("refresh",res.EntityList)
               this.$message.success('添加成功!')
             })
           }
@@ -239,7 +239,7 @@ export default {
   color: #8c939d;
   width: 112px;
   height: 112px;
-  line-height: 112px;
+  line-height: 112px !important;
   text-align: center;
 }
 

+ 2 - 2
src/views/brand/index.vue

@@ -41,11 +41,11 @@ export default {
       }
       this.$refs.addBrand.outerVisible = true
     },
-    brandListRefresh() { //刷新品牌列表
+    brandListRefresh(EntityList) { //刷新品牌列表
       //清空搜索关键字
       this.$refs.sagaBrand.keyWord = ""
       this.$refs.toolBar.getBrandCount()
-      this.$refs.sagaBrand.getBrandData()
+      this.$refs.sagaBrand.getBrandData(EntityList)
     },
   }
 }