Commit 26337c45 by 前端

Merge branch 'kuangyq_dev_2.1.0' into 'v2.1.0'

Kuangyq dev 2.1.0

See merge request !29
2 parents d42d931a 8beb07d5
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.9", "glsx-components": "^1.4.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"vue": "^2.6.10", "vue": "^2.6.10",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-select v-model="provinceForm.provinceName" placeholder="选择省份" @change="selectProvince" class="select-padding"> <el-select v-model="provinceForm.provinceName" placeholder="选择省份" @change="selectProvince" class="select-padding">
<el-option v-for="item in AllData" :key="item.provinceCode" :label="item.provinceName" :value="item.provinceName" @click.native="selectProvince(item)"></el-option> <el-option v-for="item in AllData" :key="item.provinceCode" :label="item.provinceName" :value="item.provinceName" @click.native="selectProvince(item)"></el-option>
</el-select> </el-select>
<el-select v-model="provinceForm.cityName" placeholder="选择您所在的市" style="width:250px" @change="selectCity" class="select-padding"> <el-select v-model="provinceForm.cityName" placeholder="选择您所在的市" style="width: 250px" @change="selectCity" class="select-padding">
<el-option v-for="item in cityList" :key="item.cityCode" :label="item.cityName" :value="item.cityName" @click.native="selectCity(item)"></el-option> <el-option v-for="item in cityList" :key="item.cityCode" :label="item.cityName" :value="item.cityName" @click.native="selectCity(item)"></el-option>
</el-select> </el-select>
</el-form> </el-form>
...@@ -29,46 +29,48 @@ export default { ...@@ -29,46 +29,48 @@ export default {
} }
} }
}, },
inject: ['provinceEditAccount'], // inject: ['provinceEditAccount'],
mounted() { mounted() {
// 初始化 // 初始化
this.getProvinceList() // this.getProvinceList()
console.log(this.provinceEditAccount, '====') // console.log(this.provinceEditAccount, '====')
// if (this.province.provinceName) { // console.log(JSON.stringify(this.provinceEditAccount.cityName))
// console.log('++++') // if (this.provinceEditAccount) {
// this.init(this.province.provinceName, this.province.cityName) // this.init(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
// console.log(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
// } // }
}, },
methods: { methods: {
init(provinceName, cityName) { init(province, city) {
console.log(provinceName, cityName)
this.provinceForm = { this.provinceForm = {
provinceName: provinceName, provinceName: province,
cityName: cityName cityName: city
} }
this.AllData.map(item => { this.getProvinceList(province, city)
if (item.provinceName.indexOf(provinceName) != -1) {
this.cityList = item.cityInfoList
this.provinceForm.provinceCode = item.provinceCode
this.cityList.map(itm => {
if (cityName == itm.cityName) {
this.provinceForm.cityCode = itm.cityCode
}
})
}
})
}, },
async getProvinceList() { async getProvinceList(provinceName, cityName) {
const { provinceInfoList: provinceList } = await this.provinceList const { provinceInfoList: provinceList } = await this.provinceList
this.AllData = provinceList this.AllData = provinceList
// this.$set(this, 'AllData', provinceList) // this.$set(this, 'AllData', provinceList)
if (this.provinceEditAccount) { // if (this.provinceEditAccount) {
this.init(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName) // this.init(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
// }
if (provinceName) {
this.AllData.map(item => {
if (item.provinceName.indexOf(provinceName) != -1) {
this.cityList = item.cityInfoList
this.provinceForm.provinceCode = item.provinceCode
this.cityList.map(itm => {
if (cityName == itm.cityName) {
this.provinceForm.cityCode = itm.cityCode
}
})
}
})
} }
}, },
// 选择省 // 选择省
selectProvince(val) { selectProvince(val) {
console.log(val)
this.provinceForm.cityName = '' this.provinceForm.cityName = ''
this.cityList = val.cityInfoList this.cityList = val.cityInfoList
this.$emit('getProvince', val.provinceName, val.provinceCode) this.$emit('getProvince', val.provinceName, val.provinceCode)
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</div> </div>
</div> </div>
<select-product v-show="step == 2" ref="productForm" title="功能权限"></select-product> <select-product v-show="step == 2" ref="productForm" title="功能权限"></select-product>
<GLFooter> <GLFooter style="z-index: 2">
<el-button type="primary" @click="handleNext" v-show="step == 1">下一步</el-button> <el-button type="primary" @click="handleNext" v-show="step == 1">下一步</el-button>
<el-button type="primary" @click="handleSave(1)" v-show="step == 2">存草稿</el-button> <el-button type="primary" @click="handleSave(1)" v-show="step == 2">存草稿</el-button>
<el-button type="primary" @click="handlePrev" v-show="step == 2">上一步</el-button> <el-button type="primary" @click="handlePrev" v-show="step == 2">上一步</el-button>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<el-form-item size="small" label="商户地址" class="form-row"> <el-form-item size="small" label="商户地址" class="form-row">
<!-- 省市 --> <!-- 省市 -->
<ProvinceCity ref="provinceForm" @getProvince="getProvince" @getCity="getCity"></ProvinceCity> <ProvinceCity ref="provinceForm" @getProvince="getProvince" @getCity="getCity"></ProvinceCity>
<el-input readonly v-model="accountAddForm.merchantAddress"></el-input> <el-input readonly v-model="accountAddForm.merchantAddress" placeholder="请选择商户地址"></el-input>
<el-button type="primary" class="form-btn" @click="hanleSelectMap">选择地址</el-button> <el-button type="primary" class="form-btn" @click="hanleSelectMap">选择地址</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="主营品牌"> <el-form-item label="主营品牌">
<select-brand :brandListTree="brandListTree" ref="brandListTree"></select-brand> <select-brand :brandListTree="brandListTree" @clickBrand="clickBrand" ref="brandListTree"></select-brand>
<!-- <el-input size="small" v-model="filterText"></el-input> <!-- <el-input size="small" v-model="filterText"></el-input>
<div class="brand-tree"> <div class="brand-tree">
<el-tree :data="brandData" show-checkbox default-expand-all node-key="id" ref="brandTree" highlight-current :props="defaultProps" :filter-node-method="filterNode" @check="clickDeal"></el-tree> <el-tree :data="brandData" show-checkbox default-expand-all node-key="id" ref="brandTree" highlight-current :props="defaultProps" :filter-node-method="filterNode" @check="clickDeal"></el-tree>
...@@ -199,7 +199,8 @@ export default { ...@@ -199,7 +199,8 @@ export default {
provinceCode: '', provinceCode: '',
provinceName: '', provinceName: '',
cityCode: '', cityCode: '',
cityName: '' cityName: '',
isFirstBrand: false
} }
}, },
watch: { watch: {
...@@ -230,7 +231,6 @@ export default { ...@@ -230,7 +231,6 @@ export default {
}, },
async brandList() { async brandList() {
this.$refs.brandListTree.loading = true this.$refs.brandListTree.loading = true
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
const brandListTree = await this.$apis.baseInfo.brandList({}) const brandListTree = await this.$apis.baseInfo.brandList({})
brandListTree.forEach(item => { brandListTree.forEach(item => {
let child = item.children let child = item.children
...@@ -244,6 +244,16 @@ export default { ...@@ -244,6 +244,16 @@ export default {
this.$refs.brandListTree.loading = false this.$refs.brandListTree.loading = false
}) })
}, },
async getUserInfo() {
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
},
// 点击主营品牌
clickBrand(val) {
if (!this.isFirstBrand) {
this.brandList()
this.isFirstBrand = true
}
},
hanleSelectMap() { hanleSelectMap() {
this.dialogMapVisible = true this.dialogMapVisible = true
this.$nextTick(() => { this.$nextTick(() => {
...@@ -366,7 +376,7 @@ export default { ...@@ -366,7 +376,7 @@ export default {
}, },
mounted() { mounted() {
this.brandList() this.getUserInfo()
} }
} }
</script> </script>
......
...@@ -132,12 +132,12 @@ ...@@ -132,12 +132,12 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12" class="flexCol"> <el-col :span="14" class="flexCol">
<span class="itemName">主营品牌:</span> <span class="itemName">主营品牌:</span>
<span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span>
</el-col> </el-col>
<el-col :span="12" class="flexCol"> <el-col :span="10" class="flexCol">
<span class="itemName">驻店电话:</span> <span class="itemName itemNameCol2">驻店电话:</span>
<span class="itemValue">{{ firstPageObj.residentPhone || '-' }}</span> <span class="itemValue">{{ firstPageObj.residentPhone || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
...@@ -350,7 +350,7 @@ export default { ...@@ -350,7 +350,7 @@ export default {
}, },
//将后台返回数据中数值为空的字段全部替换为“-” //将后台返回数据中数值为空的字段全部替换为“-”
formateNullFieldData(initialData) { formateNullFieldData(initialData) {
const isEmpty = function (val) { const isEmpty = function(val) {
if (!String(val) || String(val) === 'null') { if (!String(val) || String(val) === 'null') {
return '-' return '-'
} }
...@@ -358,7 +358,7 @@ export default { ...@@ -358,7 +358,7 @@ export default {
} }
var that = this var that = this
if (initialData instanceof Array) { if (initialData instanceof Array) {
initialData.forEach(function (val, key, array) { initialData.forEach(function(val, key, array) {
array[key] = that.formateNullFieldData(val) array[key] = that.formateNullFieldData(val)
}) })
} else if (initialData instanceof Object) { } else if (initialData instanceof Object) {
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div v-show="step == 'first'"> <div v-show="step == 'first'">
<select-product title="功能权限" ref="productForm"></select-product> <select-product title="功能权限" ref="productForm"></select-product>
</div> </div>
<GLFooter> <GLFooter style="z-index: 2">
<el-button type="primary" @click="handleSave()" v-show="step == 'first'">确定</el-button> <el-button type="primary" @click="handleSave()" v-show="step == 'first'">确定</el-button>
<el-button type="primary" @click="handleNext()" v-show="step == 'second'">确定</el-button> <el-button type="primary" @click="handleNext()" v-show="step == 'second'">确定</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
...@@ -167,11 +167,11 @@ export default { ...@@ -167,11 +167,11 @@ export default {
} }
} }
}, },
provide() { // provide() {
return { // return {
provinceEditAccount: this.accountAddForm // provinceEditAccount: this.accountAddForm
} // }
}, // },
watch: { watch: {
filterText(val) { filterText(val) {
this.$refs.brandTree.filter(val) this.$refs.brandTree.filter(val)
...@@ -431,6 +431,7 @@ export default { ...@@ -431,6 +431,7 @@ export default {
merchantBrandMain merchantBrandMain
}) })
// 省市回显 // 省市回显
this.$refs.baseInfoForm.init(this.accountAddForm.provinceName, this.accountAddForm.cityName)
merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',') merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',')
this.$refs.baseInfoForm.checkBrandList(merchantBrandMain) this.$refs.baseInfoForm.checkBrandList(merchantBrandMain)
this.$refs.baseInfoForm.checkBusinessType(businessType) this.$refs.baseInfoForm.checkBusinessType(businessType)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<span class="account-type" v-if="index < 3">{{ item }}</span> <span class="account-type" v-if="index < 3">{{ item }}</span>
<span class="account-type" v-if="scope.scope.accountTypeNames.split(',').length > 3 && index == 3"> <span class="account-type" v-if="scope.scope.accountTypeNames.split(',').length > 3 && index == 3">
<el-popover placement="top" width="300" trigger="hover"> <el-popover placement="top" width="300" trigger="hover">
<span slot="reference">...({{ scope.scope.accountTypeNames.split(',').length }})</span> <span slot="reference">...({{ scope.scope.accountTypeNames.split(',').length - 3 }})</span>
<span class="account-type m-b-8" v-for="(i, ids) in scope.scope.accountTypeNames.split(',')" :key="ids" :disable-transitions="false">{{ i }}</span> <span class="account-type m-b-8" v-for="(i, ids) in scope.scope.accountTypeNames.split(',')" :key="ids" :disable-transitions="false">{{ i }}</span>
</el-popover> </el-popover>
</span> </span>
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-03 17:45:22 * @Date: 2022-03-03 17:45:22
* @LastEditTime: 2022-04-14 15:05:05 * @LastEditTime: 2022-04-15 17:54:32
* @LastEditors: huyue * @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\createGuide.vue * @FilePath: \scrm-micro-settings\src\views\approvalConfig\createGuide.vue
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</div> </div>
</div> </div>
</div> </div>
<GLFooter> <GLFooter style="z-index: 2">
<el-button type="primary" @click="handleCancel">返回</el-button> <el-button type="primary" @click="handleCancel">返回</el-button>
</GLFooter> </GLFooter>
</div> </div>
...@@ -103,7 +103,6 @@ export default { ...@@ -103,7 +103,6 @@ export default {
data() { data() {
return { return {
lineHeight: 2200, lineHeight: 2200,
footerLeft: 0,
// footerWidth: 800, // footerWidth: 800,
// 当屏幕太小导致换行,出现对不齐问题 // 当屏幕太小导致换行,出现对不齐问题
fiveHeight: 40, fiveHeight: 40,
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-07 14:32:50 * @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-04-02 17:42:14 * @LastEditTime: 2022-04-14 17:50:13
* @LastEditors: Please set LastEditors * @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue * @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
--> -->
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-form ref="baseForm" :model="infoForm" class="account-body-form" label-width="120px"> <el-form ref="baseForm" :model="infoForm" class="account-body-form" label-width="120px">
<el-form-item size="small" label="商户地址" class="map-row"> <el-form-item size="small" label="商户地址" class="map-row">
<Province ref="provinceForm" @getProvince="getProvince" @getCity="getCity"></Province> <Province ref="provinceForm" @getProvince="getProvince" @getCity="getCity"></Province>
<el-input v-model="infoForm.merchantAddress" placeholder="请选择商户地址" readonly="readonly"></el-input> <el-input class="input-width" v-model="infoForm.merchantAddress" placeholder="请选择商户地址" readonly="readonly"></el-input>
<el-button @click="hanleSelectMap" type="primary">选择地址</el-button> <el-button @click="hanleSelectMap" type="primary">选择地址</el-button>
</el-form-item> </el-form-item>
<el-form-item size="small" label="经营业务类型"> <el-form-item size="small" label="经营业务类型">
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
<el-form-item size="small" label="营业时间" class="time-row"> <el-form-item size="small" label="营业时间" class="time-row">
<el-time-picker size="small" value-format="HH:mm:ss" is-range v-model="infoForm.bussinessTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker> <el-time-picker size="small" value-format="HH:mm:ss" is-range v-model="infoForm.bussinessTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" label="驻店电话" style="position: relative;"> <el-form-item size="small" label="驻店电话" style="position: relative">
<el-input v-model="infoForm.residentPhone" placeholder="此电话会在小程序上显示,请填写真实有效的电话或手机号"></el-input> <el-input v-model="infoForm.residentPhone" placeholder="此电话会在小程序上显示,请填写真实有效的电话或手机号"></el-input>
<div @click="showTelDia" class="show-address">显示位置</div> <div @click="showTelDia" class="show-address">显示位置</div>
</el-form-item> </el-form-item>
<el-form-item size="small" label="主营品牌" style="height: 500px"> <el-form-item size="small" label="主营品牌" style="height: 500px">
<select-brand :brandListTree="brandListTree" ref="brandListTree"></select-brand> <select-brand :brandListTree="brandListTree" @clickBrand="clickBrand" ref="brandListTree"></select-brand>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<el-button type="primary" @click="getAddress">确 定</el-button> <el-button type="primary" @click="getAddress">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<GLFooter style="z-index: 100"> <GLFooter style="z-index: 2">
<el-button type="primary" @click="handleSave">提交</el-button> <el-button type="primary" @click="handleSave">提交</el-button>
<el-button @click="goback">取消</el-button> <el-button @click="goback">取消</el-button>
</GLFooter> </GLFooter>
...@@ -77,15 +77,32 @@ export default { ...@@ -77,15 +77,32 @@ export default {
cityCode: '' cityCode: ''
}, },
businessType: [], businessType: [],
brandListTree: [] brandListTree: [],
isFirstBrand: false
} }
}, },
mounted() { mounted() {
this.brandList() // this.brandList()
this.getUserInfo()
}, },
methods: { methods: {
async brandList() { async brandList() {
this.$refs.brandListTree.loading = true this.$refs.brandListTree.loading = true
const brandListTree = await this.$apis.baseInfo.brandList({})
brandListTree.forEach(item => {
let child = item.children
if (!child) return
child.forEach(k => {
delete k.children
})
})
this.brandListTree = brandListTree
this.$refs.brandListTree.getCheckList(this.infoForm.merchantBrandMain)
this.$nextTick(() => {
this.$refs.brandListTree.loading = false
})
},
async getUserInfo() {
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' }) this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
const infoForm = await this.$apis.store.findMerchantBaseInfo({ merchantId: this.$globalState.session.merchantId }) const infoForm = await this.$apis.store.findMerchantBaseInfo({ merchantId: this.$globalState.session.merchantId })
const { merchantAddress, provinceName, cityName, provinceCode, cityCode, lng, lat, id, merchantName, businessType, bussinessTime, bussinessBegintime, bussinessEndtime, channelId, merchantNo, merchantBrandMain } = infoForm const { merchantAddress, provinceName, cityName, provinceCode, cityCode, lng, lat, id, merchantName, businessType, bussinessTime, bussinessBegintime, bussinessEndtime, channelId, merchantNo, merchantBrandMain } = infoForm
...@@ -105,32 +122,26 @@ export default { ...@@ -105,32 +122,26 @@ export default {
provinceCode, provinceCode,
cityCode cityCode
} }
// 省市回显
this.$refs.provinceForm.init(this.infoForm.provinceName, this.infoForm.cityName)
if (!businessType) { if (!businessType) {
this.infoForm.businessType = [1, 2, 3, 4, 5, 6] this.infoForm.businessType = [1, 2, 3, 4, 5, 6]
} else { } else {
const businessType = this.infoForm.businessType.split(',') const businessType = this.infoForm.businessType.split(',')
this.infoForm.businessType = businessType.map(item => (item = parseInt(item))) this.infoForm.businessType = businessType.map(item => (item = parseInt(item)))
} }
const brandListTree = await this.$apis.baseInfo.brandList({}) // 省市回显
brandListTree.forEach(item => { this.$refs.provinceForm.init(this.infoForm.provinceName, this.infoForm.cityName)
let child = item.children
if (!child) return
child.forEach(k => {
delete k.children
})
})
this.brandListTree = brandListTree
if (!this.infoForm.merchantBrandMain) { if (!this.infoForm.merchantBrandMain) {
this.infoForm.merchantBrandMain = [] this.infoForm.merchantBrandMain = []
} else { } else {
this.infoForm.merchantBrandMain = this.infoForm.merchantBrandMain.replaceAll(';', ',').split(',') this.infoForm.merchantBrandMain = this.infoForm.merchantBrandMain.replaceAll(';', ',').split(',')
} }
this.$refs.brandListTree.getCheckList(this.infoForm.merchantBrandMain) },
this.$nextTick(() => { // 点击主营品牌
this.$refs.brandListTree.loading = false clickBrand(val) {
}) if (!this.isFirstBrand) {
this.brandList()
this.isFirstBrand = true
}
}, },
hanleSelectMap() { hanleSelectMap() {
this.dialogMapVisible = true this.dialogMapVisible = true
...@@ -266,4 +277,7 @@ export default { ...@@ -266,4 +277,7 @@ export default {
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
} }
.input-width {
min-width: 200px;
}
</style> </style>
...@@ -339,11 +339,6 @@ export default { ...@@ -339,11 +339,6 @@ export default {
created() { created() {
this.getDepartmentList() this.getDepartmentList()
this.getMerchantList() this.getMerchantList()
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
} }
} }
</script> </script>
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-07 14:32:50 * @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-03-07 14:43:18 * @LastEditTime: 2022-04-14 17:41:10
* @LastEditors: Please set LastEditors * @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue * @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
--> -->
<template> <template>
<div v-loading="loading"> <div v-loading="loading">
<div class="select-input-box"> <div class="select-input-box" @click="switchBrand">
<template v-for="(item, idx) in getCheckedArr"> <template v-for="(item, idx) in getCheckedArr">
<el-tag effect="plain" type="info" :key="idx" closable :disable-transitions="false" @close="removeItem(item, idx)" v-if="idx < 3"> <el-tag effect="plain" type="info" :key="idx" closable :disable-transitions="false" @close="removeItem(item, idx)" v-if="idx < 3">
{{ item.label }} {{ item.label }}
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<el-tag effect="plain" slot="reference" type="info" v-show="getCheckedArr.length > 3">+ {{ getCheckedArr.length - 3 }}</el-tag> <el-tag effect="plain" slot="reference" type="info" v-show="getCheckedArr.length > 3">+ {{ getCheckedArr.length - 3 }}</el-tag>
</el-popover> </el-popover>
</div> </div>
<div class="tree-box"> <div class="tree-box" v-show="brandTree">
<el-input class="tree-input" prefix-icon="el-icon-search" placeholder="输入关键字进行过滤" v-model="filterText"></el-input> <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" default-expand-all show-checkbox :filter-node-method="filterNode" ref="tree"></el-tree>
<div class="tree-footer"> <div class="tree-footer">
...@@ -49,7 +49,8 @@ export default { ...@@ -49,7 +49,8 @@ export default {
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
} },
brandTree: false
} }
}, },
props: { props: {
...@@ -76,7 +77,7 @@ export default { ...@@ -76,7 +77,7 @@ export default {
}, },
methods: { methods: {
getMerchantBrandList() { getMerchantBrandList() {
let getCheckedNodes = this.$refs.tree.getCheckedNodes() let getCheckedNodes = this.$refs.tree.getCheckedNodes()
const getCheckedKeys = this.$refs.tree.getCheckedKeys() const getCheckedKeys = this.$refs.tree.getCheckedKeys()
const getHalfCheckedNodes = this.$refs.tree.getHalfCheckedNodes() const getHalfCheckedNodes = this.$refs.tree.getHalfCheckedNodes()
let merchantBrandList = getHalfCheckedNodes.map(car => { let merchantBrandList = getHalfCheckedNodes.map(car => {
...@@ -91,7 +92,7 @@ export default { ...@@ -91,7 +92,7 @@ export default {
merchantBrandId merchantBrandId
} }
}) })
getCheckedNodes = getCheckedNodes.filter(item=>item.children) getCheckedNodes = getCheckedNodes.filter(item => item.children)
let merchantBrandList2 = getCheckedNodes.map(car => { let merchantBrandList2 = getCheckedNodes.map(car => {
let merchantBrandId = [] let merchantBrandId = []
car.children.forEach(item => { car.children.forEach(item => {
...@@ -117,7 +118,7 @@ export default { ...@@ -117,7 +118,7 @@ export default {
} }
}, },
getCheckList(checkArr = []) { getCheckList(checkArr = []) {
checkArr.forEach(item=>item = parseInt(item)); checkArr.forEach(item => (item = parseInt(item)))
console.log(checkArr) console.log(checkArr)
this.$refs.tree.setCheckedKeys(checkArr) this.$refs.tree.setCheckedKeys(checkArr)
this.$nextTick(() => { this.$nextTick(() => {
...@@ -186,6 +187,11 @@ export default { ...@@ -186,6 +187,11 @@ export default {
filterNode(value, data) { filterNode(value, data) {
if (!value) return true if (!value) return true
return data.name.indexOf(value) !== -1 return data.name.indexOf(value) !== -1
},
// 显示隐藏
switchBrand() {
this.brandTree = !this.brandTree
this.$emit('clickBrand', this.brandTree)
} }
} }
} }
......
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
<el-button type="primary" @click="handleConfirm">确定</el-button> <el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
</GLFooter> </GLFooter>
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div> -->
</div> </div>
</template> </template>
......
...@@ -217,9 +217,7 @@ ...@@ -217,9 +217,7 @@
</div> </div>
</div> </div>
</div> </div>
<GLFooter <GLFooter class="footer-panel">
class="footer-panel"
>
<el-button type="primary" v-show="active == 2" @click="handlePrev">上一步</el-button> <el-button type="primary" v-show="active == 2" @click="handlePrev">上一步</el-button>
<el-button type="primary" v-show="active == 3" @click="handlePrev">返回上一步</el-button> <el-button type="primary" v-show="active == 3" @click="handlePrev">返回上一步</el-button>
<el-button type="primary" v-show="active == 1 && statusQrcode != 'SUCCESS' && statusQrcode != 'SERVER_CHECK'" @click="handleNext">确定</el-button> <el-button type="primary" v-show="active == 1 && statusQrcode != 'SUCCESS' && statusQrcode != 'SERVER_CHECK'" @click="handleNext">确定</el-button>
...@@ -485,8 +483,6 @@ export default { ...@@ -485,8 +483,6 @@ export default {
}, },
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200 this.boxHeight = clientHeight - 200
this.getStatus() this.getStatus()
}, },
......
...@@ -389,8 +389,6 @@ export default { ...@@ -389,8 +389,6 @@ export default {
}, },
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 185 this.boxHeight = clientHeight - 185
this.getStatus() this.getStatus()
}, },
......
...@@ -83,7 +83,8 @@ export default { ...@@ -83,7 +83,8 @@ export default {
{ {
label: '部门', label: '部门',
prop: 'departmentName', prop: 'departmentName',
minWidth: 100 width: 120,
line: 1
}, },
{ {
label: '跟进专员类型', label: '跟进专员类型',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!