|
|
@@ -54,11 +54,13 @@
|
|
|
<div class="brand" v-if="commodity.brandNameEn || commodity.brandEn">
|
|
|
<a v-if="commodity.brandNameEn && commodity.branduuid" @click="goBrandDetail('/product/brand/' + commodity.branduuid, $event)" v-text="commodity.brandNameEn"></a>
|
|
|
<span v-if="commodity.brandNameEn && !commodity.branduuid" v-text="commodity.brandNameEn"></span>
|
|
|
- <span v-if="commodity.brandEn">{{commodity.brandEn}}</span>
|
|
|
+ <span v-if="commodity.brandEn && !commodity.branduuid">{{commodity.brandEn}}</span>
|
|
|
</div>
|
|
|
- <div class="brand" v-if="!commodity.brandNameEn && !commodity.brandEn">—</div>
|
|
|
- <a v-if="commodity.kindNameCn" @click="goBrandDetail('/product/kind/' + commodity.kindUuid, $event)" v-text="commodity.kindNameCn"></a>
|
|
|
- <div class="brand" v-if="!commodity.kindNameCn">—</div>
|
|
|
+ <div class="brand" v-if="!commodity.brandNameEn && !commodity.brandEn && commodity.kindNameCn">—</div>
|
|
|
+ <a v-if="commodity.kindNameCn && commodity.kindUuid" @click="goBrandDetail('/product/kind/' + commodity.kindUuid, $event)" v-text="commodity.kindNameCn"></a>
|
|
|
+ <span v-if="commodity.kindNameCn && !commodity.kindUuid" v-text="commodity.kindNameCn"></span>
|
|
|
+ <div class="brand" v-if="!commodity.kindNameCn && (commodity.brandNameEn || commodity.brandEn)">—</div>
|
|
|
+ <div class="brand" v-if="!commodity.brandNameEn && !commodity.brandEn && !commodity.kindNameCn">—</div>
|
|
|
</td>
|
|
|
<td class="brand-code">
|
|
|
<div class="code" v-if="commodity.code" v-text="commodity.code"></div>
|
|
|
@@ -266,26 +268,29 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-// watch: {
|
|
|
-// kinds: {
|
|
|
-// handler: function (val) {
|
|
|
-// this.kinds.forEach((item) => {
|
|
|
-// this.KindsNameChange(item)
|
|
|
-// })
|
|
|
-// },
|
|
|
-// immediate: false
|
|
|
-// }
|
|
|
-// },
|
|
|
+ watch: {
|
|
|
+ kinds: {
|
|
|
+ handler: function (val) {
|
|
|
+ val.forEach((item) => {
|
|
|
+ this.KindsNameChange(item)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
// mounted () {
|
|
|
// this.$nextTick(() => {
|
|
|
+// this.kinds.forEach((item) => {
|
|
|
+// this.KindsNameChange(item)
|
|
|
+// })
|
|
|
// })
|
|
|
// },
|
|
|
- mounted () {
|
|
|
- this.kinds.forEach((item) => {
|
|
|
- this.KindsNameChange(item)
|
|
|
- })
|
|
|
- // alert(JSON.stringify(this.kinds))
|
|
|
- },
|
|
|
+// mounted () {
|
|
|
+// this.kinds.forEach((item) => {
|
|
|
+// this.KindsNameChange(item)
|
|
|
+// })
|
|
|
+// // alert(JSON.stringify(this.kinds))
|
|
|
+// },
|
|
|
methods: {
|
|
|
sendprove: function () {
|
|
|
if (this.user.logged) {
|
|
|
@@ -302,13 +307,12 @@
|
|
|
this.baseUtils.goLinkUser(this, this.storeInfo.enUU)
|
|
|
},
|
|
|
KindsNameChange: function (obj) {
|
|
|
- obj.nameCn += ` (${obj.count})`
|
|
|
- document.getElementsByClassName('el-tree-node__label').innerHTML = "<span style='color:#666;'>11</span>"
|
|
|
- if (obj.children && obj.children.length) {
|
|
|
- obj.children.forEach((item) => {
|
|
|
- this.KindsNameChange(item)
|
|
|
- })
|
|
|
- }
|
|
|
+ obj.nameCn += ` (${obj.count})`
|
|
|
+ if (obj.children && obj.children.length) {
|
|
|
+ obj.children.forEach((item) => {
|
|
|
+ this.KindsNameChange(item)
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
goAttach: function (url, event) {
|
|
|
event.stopPropagation()
|