Commit 50a109b9 by 胡悦 Committed by chenwq

修复bug

1 parent 1f5d9c55
...@@ -45,14 +45,14 @@ ...@@ -45,14 +45,14 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<!-- <a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a> --> <el-button size="small" @click="handleClose">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> 取 消
</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import util from '@/utils/util' import util from '@/utils/util'
...@@ -110,7 +110,6 @@ export default { ...@@ -110,7 +110,6 @@ export default {
}) })
.then(res => { .then(res => {
if (selectItem && selectItem.length > 0) { if (selectItem && selectItem.length > 0) {
console.log(res.labelTreeRets)
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
labelType: item.labelType == '企业标签' ? (this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签') : item.labelType, labelType: item.labelType == '企业标签' ? (this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签') : item.labelType,
...@@ -138,10 +137,12 @@ export default { ...@@ -138,10 +137,12 @@ export default {
}) })
this.labelTreeRets.forEach((item, index) => { this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => { this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index) this.handleCheckedChange(item.tagChecked, index, 1)
}) })
}) })
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets) this.$nextTick(() => {
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
})
} else { } else {
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
...@@ -179,6 +180,10 @@ export default { ...@@ -179,6 +180,10 @@ export default {
}) })
}) })
}, },
handleClose() {
this.labelTreeRetSelect = []
this.dialogVisible = false
},
remove(items, idx) { remove(items, idx) {
items.tagChecked.splice(idx, 1) items.tagChecked.splice(idx, 1)
this.labelTreeRets.forEach(item => { this.labelTreeRets.forEach(item => {
...@@ -201,7 +206,7 @@ export default { ...@@ -201,7 +206,7 @@ export default {
}) })
this.labelTreeRets.forEach((item, index) => { this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => { this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index) this.handleCheckedChange(item.tagChecked, index, 1)
}) })
}) })
}, },
...@@ -223,8 +228,6 @@ export default { ...@@ -223,8 +228,6 @@ export default {
}, },
//全选 //全选
handleCheckAllChange(val, index) { handleCheckAllChange(val, index) {
console.log(val, index)
console.log(this.labelTreeRetSelect, '==12')
if (val) { if (val) {
this.labelTreeRets[index].tagChecked = [] this.labelTreeRets[index].tagChecked = []
this.labelTreeRets[index].labelList.forEach(item => { this.labelTreeRets[index].labelList.forEach(item => {
...@@ -241,11 +244,9 @@ export default { ...@@ -241,11 +244,9 @@ export default {
} }
}) })
}) })
console.log(this.labelTreeRets, '==1532')
}, },
//选中 //选中
handleCheckedChange(value, index, status) { handleCheckedChange(value, index, status) {
console.log(value, index, status)
let checkedCount = value.length let checkedCount = value.length
this.labelTreeRets[index].checkAll = checkedCount === this.labelTreeRets[index].labelList.length this.labelTreeRets[index].checkAll = checkedCount === this.labelTreeRets[index].labelList.length
this.labelTreeRets[index].isIndeterminate = checkedCount > 0 && checkedCount < this.labelTreeRets[index].labelList.length this.labelTreeRets[index].isIndeterminate = checkedCount > 0 && checkedCount < this.labelTreeRets[index].labelList.length
...@@ -271,7 +272,6 @@ export default { ...@@ -271,7 +272,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-jump { .dialog-jump {
color: #5850ff; color: #5850ff;
...@@ -339,7 +339,6 @@ export default { ...@@ -339,7 +339,6 @@ export default {
line-height: 24px; line-height: 24px;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
max-width: 200px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
...@@ -352,15 +351,11 @@ export default { ...@@ -352,15 +351,11 @@ export default {
margin-left: 40px; margin-left: 40px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.radio-tag { .el-checkbox {
display: inline-block; width: 40%;
width: 50%; margin-bottom: 6px;
.el-checkbox { display: flex;
width: 40%; align-items: center;
margin-bottom: 6px;
display: flex;
align-items: center;
}
} }
} }
} }
...@@ -374,7 +369,7 @@ export default { ...@@ -374,7 +369,7 @@ export default {
.checkbox-group-box { .checkbox-group-box {
overflow: auto; overflow: auto;
} }
.tag-selected-box { // .tag-selected-box {
min-height: 200px; // min-height: 200px;
} // }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!