Commit 18e6cb3c by 胡悦

修改基础信心主营品牌回显

1 parent 493a80d0
<!--
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-04-14 17:50:13
* @LastEditTime: 2022-04-19 18:08:55
* @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
......@@ -107,7 +107,7 @@ export default {
async getUserInfo() {
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
const infoForm = await this.$apis.store.findMerchantBaseInfo({ merchantId: this.$globalState.session.merchantId })
const { merchantAddress, provinceName, residentPhone, cityName, provinceCode, cityCode, lng, lat, id, merchantName, businessType, bussinessTime, bussinessBegintime, bussinessEndtime, channelId, merchantNo, merchantBrandMain } = infoForm
const { merchantAddress, provinceName, residentPhone, cityName, provinceCode, cityCode, lng, lat, id, merchantName, businessType, bussinessTime, bussinessBegintime, bussinessEndtime, channelId, merchantNo, merchantBrandMain, merchantBrandName } = infoForm
this.infoForm = {
merchantAddress,
lng,
......@@ -131,6 +131,12 @@ export default {
const businessType = this.infoForm.businessType.split(',')
this.infoForm.businessType = businessType.map(item => (item = parseInt(item)))
}
if (merchantBrandName.length) {
const brandName = merchantBrandName.split(',').map((item, index) => {
return { label: item, id: index }
})
this.$refs.brandListTree.getCheckedArr = brandName
}
// 省市回显
this.$refs.provinceForm.mapInit(this.infoForm.provinceName, this.infoForm.cityName)
if (!this.infoForm.merchantBrandMain) {
......
<!--
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-04-14 17:41:10
* @LastEditTime: 2022-04-19 18:03:04
* @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
......@@ -25,7 +25,7 @@
</div>
<div class="tree-box" v-show="brandTree">
<el-input class="tree-input" prefix-icon="el-icon-search" placeholder="输入关键字进行过滤" v-model="filterText"></el-input>
<el-tree class="filter-tree" @check="handleCheck" :data="brandListTree" :props="defaultProps" node-key="id" default-expand-all show-checkbox :filter-node-method="filterNode" ref="tree"></el-tree>
<el-tree class="filter-tree" @check="handleCheck" :data="brandListTree" :props="defaultProps" node-key="id" show-checkbox :filter-node-method="filterNode" ref="tree"></el-tree>
<div class="tree-footer">
<div class="tree-footer-checkbox">
<el-checkbox v-model="checkedAll" @change="selectAll">全部</el-checkbox>
......@@ -119,7 +119,6 @@ export default {
},
getCheckList(checkArr = []) {
checkArr.forEach(item => (item = parseInt(item)))
console.log(checkArr)
this.$refs.tree.setCheckedKeys(checkArr)
this.$nextTick(() => {
this.handleCheck()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!