Commit 01f636ec by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !48
2 parents 4c09229b 55b01201
...@@ -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.6", "glsx-components": "^1.4.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"vue": "^2.6.10", "vue": "^2.6.10",
...@@ -43,4 +43,4 @@ ...@@ -43,4 +43,4 @@
"> 1%", "> 1%",
"last 2 versions" "last 2 versions"
] ]
}
\ No newline at end of file \ No newline at end of file
}
@import './demo.scss';
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -134,11 +136,12 @@ img { ...@@ -134,11 +136,12 @@ img {
height: 4px; height: 4px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, .3); background-color: rgba(144, 147, 153, .3);
} }
.el-message--info { .el-message--info {
height: 40px; height: 40px;
background: #e6e9ff; background: #e6e9ff;
...@@ -147,14 +150,16 @@ img { ...@@ -147,14 +150,16 @@ img {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.el-message .el-icon-info { .el-message .el-icon-info {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
} }
.el-cascader-menu { .el-cascader-menu {
max-height:500px; max-height: 500px;
} }
.footer-panel { .footer-panel {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -166,4 +171,45 @@ img { ...@@ -166,4 +171,45 @@ img {
background: #ffffff; background: #ffffff;
z-index: 999; z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
\ No newline at end of file \ No newline at end of file
}
.dot {
display: inline-flex;
align-items: center;
span {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.normal {
background-color: #2CCA74;
}
.draft {
background-color: #FDB757;
}
.dot1 {
background-color: #FDB757;
}
.dot2 {
background-color: #2CCA74;
}
.dot3 {
background-color: #999999;
}
.dot4 {
background-color: #EB4E4E;
}
.dot5 {
background-color: #FDB757;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -9,3 +9,29 @@ ...@@ -9,3 +9,29 @@
.align-right { .align-right {
text-align: right; text-align: right;
} }
.table-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.header-text {
font-size: 16px;
color: #333333;
font-weight: 500;
}
.el-button--primary.is-plain {
color: #5850FF;
border-color: #5850FF;
}
.emptyBg {
width: 100%;
img {
width: 64px;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -25,7 +25,8 @@ export default { ...@@ -25,7 +25,8 @@ export default {
return { return {
input: '', input: '',
address: '', address: '',
lnglat: [] lnglat: [],
geocoderAddress: {}
} }
}, },
...@@ -35,7 +36,7 @@ export default { ...@@ -35,7 +36,7 @@ export default {
resizeEnable: true, resizeEnable: true,
zoom: 20 zoom: 20
}) })
AMap.plugin(['AMap.PlaceSearch'], function () { AMap.plugin(['AMap.PlaceSearch'], function() {
//构造地点查询类 //构造地点查询类
placeSearch = new AMap.PlaceSearch({ placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数 pageSize: 8, // 单页显示结果条数
...@@ -51,12 +52,11 @@ export default { ...@@ -51,12 +52,11 @@ export default {
}, },
searchAddress() { searchAddress() {
let _this = this let _this = this
placeSearch.search(this.input, function (status, result) { placeSearch.search(this.input, function(status, result) {
console.log(result)
if (status === 'complete' && result.poiList.pois.length) { if (status === 'complete' && result.poiList.pois.length) {
let lnglat = result.poiList.pois[0].location let lnglat = result.poiList.pois[0].location
_this.getAddress(lnglat) _this.getAddress(lnglat)
} }
}) })
}, },
addMarker(lnglat) { addMarker(lnglat) {
...@@ -66,7 +66,6 @@ export default { ...@@ -66,7 +66,6 @@ export default {
} else { } else {
position = lnglat position = lnglat
} }
console.log(position)
marker = new AMap.Marker({ marker = new AMap.Marker({
icon: new AMap.Icon({ icon: new AMap.Icon({
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png', image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
...@@ -76,11 +75,10 @@ export default { ...@@ -76,11 +75,10 @@ export default {
position: position, position: position,
offset: new AMap.Pixel(-10, -10) offset: new AMap.Pixel(-10, -10)
}) })
map.add(marker); map.add(marker)
map.setFitView(); map.setFitView()
}, },
getAddress(e) { getAddress(e) {
console.log(e)
let self = this let self = this
let lnglat let lnglat
if (e.type == 'click') { if (e.type == 'click') {
...@@ -99,6 +97,11 @@ export default { ...@@ -99,6 +97,11 @@ export default {
geocoder.getAddress(lnglat, (status, result) => { geocoder.getAddress(lnglat, (status, result) => {
self.lnglat = lnglat self.lnglat = lnglat
self.address = result.regeocode.formattedAddress self.address = result.regeocode.formattedAddress
geocoder.getLocation(self.address, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
this.geocoderAddress = result.geocodes[0]
}
})
}) })
}) })
}, },
...@@ -112,7 +115,7 @@ export default { ...@@ -112,7 +115,7 @@ export default {
this.mapInit() this.mapInit()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.map-box { .map-box {
...@@ -136,4 +139,4 @@ export default { ...@@ -136,4 +139,4 @@ export default {
line-height: 20px; line-height: 20px;
bottom: -30px; bottom: -30px;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<template>
<div>
<el-form ref="provinceForm" :model="provinceForm" inline="true" class="province">
<el-select :size="size" v-model="provinceForm.provinceName" clearable placeholder="选择省份" :style="{ width: defaultWidth }" @change="selectProvince" class="select-padding">
<el-option v-for="item in AllData" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectProvince(item)"></el-option>
</el-select>
<el-select :size="size" v-model="provinceForm.cityName" clearable placeholder="选择市" :style="{ width: defaultWidth }" @change="selectCity" class="select-padding">
<el-option v-for="item in cityList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectCity(item)"></el-option>
</el-select>
<el-select v-if="subdistrict == 3" :size="size" v-model="provinceForm.townName" clearable placeholder="选择区" :style="{ width: defaultWidth }" @change="selectTown" class="select-padding">
<el-option v-for="item in townList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectTown(item)"></el-option>
</el-select>
</el-form>
</div>
</template>
<script>
let map
export default {
name: 'Province',
props: {
subdistrict: {
type: Number,
default: 2
},
defaultWidth: {
type: String,
default: '150px'
}
},
data() {
return {
AllData: [],
cityList: [{ adcode: '', name: '全部' }],
townList: [{ adcode: '', name: '全部' }],
provinceForm: {
provinceName: '', // 省值
cityName: '', // 市值
townName: '',
provinceCode: '',
cityCode: '',
townCode: ''
}
}
},
mounted() {
this.mapInit()
},
methods: {
// 省市回显
init(province, city) {
this.provinceForm = {
provinceName: province,
cityName: city
}
// this.mapInit(province, city)
if (province) {
this.AllData.map(item => {
if (item.name.indexOf(province) != -1) {
this.provinceForm.provinceName = item.name
this.cityList = item.districtList
this.provinceForm.provinceCode = item.adcode
this.cityList.map(itm => {
if (itm.name.indexOf(city) != -1) {
this.provinceForm.cityCode = itm.adcode
this.provinceForm.cityName = itm.name
}
})
}
})
}
},
// 选择省
selectProvince(val) {
this.provinceForm.cityName = ''
this.cityList = val.districtList
this.$emit('selectProvince', val.name, val.adcode)
},
// 选择市
selectCity(val) {
this.provinceForm.townName = ''
this.townList = val.districtList
this.$emit('selectCity', val.name, val.adcode)
},
// 选择区
selectTown(val) {
this.$emit('selectTown', val.name, val.adcode)
},
mapInit() {
map = new AMap.Map('district', {
resizeEnable: true
})
AMap.plugin(['AMap.DistrictSearch'], () => {
var opts = {
subdistrict: this.subdistrict, //返回下一级行政区
level: 'city', //查询的范围
showbiz: true //查询行政级别为 市
}
var districtSearch = new AMap.DistrictSearch(opts)
districtSearch.search('中国', (status, result) => {
this.AllData = result.districtList[0].districtList
// if (provinceName) {
// this.AllData.map(item => {
// if (item.name.indexOf(provinceName) != -1) {
// this.provinceForm.provinceName = item.name
// this.cityList = item.districtList
// this.provinceForm.provinceCode = item.adcode
// this.cityList.map(itm => {
// if (itm.name.indexOf(cityName) != -1) {
// this.provinceForm.cityCode = itm.adcode
// this.provinceForm.cityName = itm.name
// }
// })
// }
// })
// }
})
})
}
}
}
</script>
<style scoped lang="scss">
.province {
display: inline-flex;
}
.select-padding {
margin-right: 10px;
}
</style>
...@@ -3,25 +3,25 @@ ...@@ -3,25 +3,25 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: Please set LastEditors * @LastEditors: huyue
* @LastEditTime: 2022-03-15 10:07:01 * @LastEditTime: 2022-04-12 11:11:32
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function(isEnv = false) {
// if (isEnv) { if (isEnv) {
// let { request } = cfg let { request } = cfg
// Object.assign(request, { timeout }) Object.assign(request, { timeout })
// return Promise.resolve(cfg) return Promise.resolve(cfg)
// } }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
// return new Http().get('http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config') // return new Http().get('http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
} }
export const config = { export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
\ No newline at end of file \ No newline at end of file
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
/*
* @Author: your name
* @Date: 2022-03-02 15:56:07
* @LastEditTime: 2022-04-12 16:36:12
* @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\setup\qiankun.js
*/
import Vue from 'vue' import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton, GLTable,GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable, GLFooter, GLCombiForm, GLTableButton } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
Vue.use(GLCombiForm)
Vue.use(GLTableButton)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // Vue.component('GLTable', GLTable)
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
...@@ -16,7 +26,7 @@ let routes = [] ...@@ -16,7 +26,7 @@ let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, request_config,request_car, sign_common } = await fetchConfig() const { response, request, sign, secret, request_common, request_config, request_car, sign_common } = await fetchConfig()
console.log(request) console.log(request)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
......
...@@ -64,19 +64,13 @@ ...@@ -64,19 +64,13 @@
</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>
<div <GLFooter style="z-index: 2">
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<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>
<el-button type="primary" @click="handleSave(2)" v-show="step == 2">确定</el-button> <el-button type="primary" @click="handleSave(2)" v-show="step == 2">确定</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </GLFooter>
<el-dialog :visible.sync="dialogMapVisible" width="60%"> <el-dialog :visible.sync="dialogMapVisible" width="60%">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view> <map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -282,14 +276,25 @@ export default { ...@@ -282,14 +276,25 @@ export default {
}, 100) }, 100)
return return
} }
if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) { // if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) {
this.$message.error('请输入正确的驻店电话') // this.$message.error('请输入正确的驻店电话')
document.querySelector('#app').scrollTop = 0 // document.querySelector('#app').scrollTop = 0
setTimeout(() => { // setTimeout(() => {
var isError = document.getElementsByClassName('phone-input') // var isError = document.getElementsByClassName('phone-input')
isError[0].querySelector('input').focus() // isError[0].querySelector('input').focus()
}, 100) // }, 100)
return // return
// }
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/
if (this.accountAddForm.residentPhone) {
const result = reg.test(this.accountAddForm.residentPhone)
if (!result) {
this.$message({
message: '请输入正确的驻店信息',
type: 'warning'
})
return false
}
} }
let params = Object.assign({}, this.accountAddForm, this.accountInfoForm) let params = Object.assign({}, this.accountAddForm, this.accountInfoForm)
if (params.bussinessTime) { if (params.bussinessTime) {
...@@ -402,17 +407,15 @@ export default { ...@@ -402,17 +407,15 @@ export default {
}, },
mounted() { mounted() {
document.querySelector('#app').scrollTop = 0 document.querySelector('#app').scrollTop = this.accountAddForm.parentId = this.$route.params.id
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.accountAddForm.parentId = this.$route.params.id
this.$refs.baseInfoForm.checkBusinessType() this.$refs.baseInfoForm.checkBusinessType()
this.findMerchantDetail() this.findMerchantDetail()
this.getCarbrandTree() this.getCarbrandTree()
this.findAllDictData('business_type') this.findAllDictData('business_type')
// this.$refs.baseInfoForm.brandList()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.account-header { .account-header {
......
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item size="small" label="商户地址" class="form-row"> <el-form-item size="small" label="商户地址" class="form-row">
<el-input readonly v-model="accountAddForm.merchantAddress"></el-input> <!-- 省市 -->
<ProvinceCity ref="provinceForm" @selectProvince="selectProvince" @selectCity="selectCity"></ProvinceCity>
<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>
...@@ -72,19 +74,24 @@ ...@@ -72,19 +74,24 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驻店电话"> <el-form-item label="驻店电话" prop="residentPhone">
<el-input maxlength="11" size="small" class="phone-input" v-model="accountAddForm.residentPhone" placeholder="请输入驻店电话"></el-input> <el-input maxlength="13" size="small" class="phone-input" v-model="accountAddForm.residentPhone" placeholder="请输入驻店电话"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<!-- <el-col :span="24"> <el-col :span="24">
<el-form-item label="经营业务类型"> <el-form-item label="经营业务类型">
<el-checkbox-group v-model="accountAddForm.businessType"> <el-checkbox-group v-model="accountAddForm.businessType">
<el-checkbox v-for="item in businessType" :label="item.dictValue" :disabled="item.dictValue <= 6" :key="item">{{ item.dictLabel }}</el-checkbox> <el-checkbox v-for="item in businessType" :label="item.dictValue" :disabled="item.dictValue <= 6" :key="item">{{ item.dictLabel }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<!-- <div class="scrm-flex-center" v-for="(item, index) in businessScopeCustomize" :key="index">
<el-input size="small" v-model="businessScopeCustomize[index].name" placeholder="请自定义营业范围,建议不超过10个"></el-input>
<i class="el-icon-circle-plus el-icon-btn" @click="addBusinessScope" v-if="index == businessScopeCustomize.length - 1"></i>
<i class="el-icon-remove el-icon-btn" @click="removeBusinessScope" v-else></i>
</div> -->
</el-form-item> </el-form-item>
</el-col> --> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
...@@ -94,11 +101,15 @@ ...@@ -94,11 +101,15 @@
</el-col> </el-col>
</el-row> </el-row>
<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>
<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>
</div> -->
</el-form-item> </el-form-item>
</el-col> --> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="门店照片"> <el-form-item label="门店照片">
<div class="store-upload-list"> <div class="store-upload-list">
...@@ -133,12 +144,14 @@ ...@@ -133,12 +144,14 @@
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
import mapView from '@/components/mapView/index' import mapView from '@/components/mapView/index'
// import SelectBrand from '../../baseInfo/selectBrand.vue' import SelectBrand from '../../baseInfo/selectBrand.vue'
import ProvinceCity from '@/components/province-city/index.vue'
export default { export default {
name: 'base', name: 'base',
components: { components: {
mapView ProvinceCity,
// SelectBrand mapView,
SelectBrand
}, },
props: { props: {
accountAddForm: { accountAddForm: {
...@@ -166,6 +179,18 @@ export default { ...@@ -166,6 +179,18 @@ export default {
callback() callback()
} }
} }
const validatePhoneTwo = (rule, value, callback) => {
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/
if (value == '' || value == undefined || value == null) {
callback()
} else {
if (!reg.test(value) && value != '') {
callback(new Error('请输入正确的电话号码或者固话号码'))
} else {
callback()
}
}
}
return { return {
imgIndex: '', imgIndex: '',
filterText: '', filterText: '',
...@@ -180,9 +205,15 @@ export default { ...@@ -180,9 +205,15 @@ export default {
merchantLegalPersonPhone: [ merchantLegalPersonPhone: [
{ required: true, message: '请输入联系电话', trigger: 'blur' }, { required: true, message: '请输入联系电话', trigger: 'blur' },
{ validator: validatePhone, trigger: 'blur' } { validator: validatePhone, trigger: 'blur' }
] ],
residentPhone: [{ validator: validatePhoneTwo, trigger: 'blur' }]
}, },
brandListTree: [] brandListTree: [],
provinceCode: '',
provinceName: '',
cityCode: '',
cityName: '',
isFirstBrand: false
} }
}, },
watch: { watch: {
...@@ -191,15 +222,16 @@ export default { ...@@ -191,15 +222,16 @@ export default {
} }
}, },
methods: { methods: {
checkBrandList(chant) { checkBrandList() {
let merchantBrandMain = chant.filter(item => item) // let merchantBrandMain = chant.filter(item => item)
this.$set(this.accountAddForm, 'merchantBrandMain', merchantBrandMain) // this.$set(this.accountAddForm, 'merchantBrandMain', merchantBrandMain)
console.log(this.accountAddForm.merchantBrandMain) console.log(this.accountAddForm.merchantBrandMain)
console.log(222222222)
if (!this.accountAddForm.merchantBrandMain) { if (!this.accountAddForm.merchantBrandMain) {
this.accountAddForm.merchantBrandMain = [] this.accountAddForm.merchantBrandMain = []
} }
console.log(this.accountAddForm.merchantBrandMain) this.brandList()
this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain) // this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
}, },
checkBusinessType(type) { checkBusinessType(type) {
if (!type) { if (!type) {
...@@ -215,7 +247,6 @@ export default { ...@@ -215,7 +247,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
...@@ -225,10 +256,21 @@ export default { ...@@ -225,10 +256,21 @@ export default {
}) })
}) })
this.brandListTree = brandListTree this.brandListTree = brandListTree
this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
this.$nextTick(() => { this.$nextTick(() => {
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(() => {
...@@ -250,11 +292,58 @@ export default { ...@@ -250,11 +292,58 @@ export default {
this.$message.error('请选择地址') this.$message.error('请选择地址')
return return
} }
this.dialogMapVisible = false
this.accountAddForm.merchantAddress = this.$refs.mapForm.address this.accountAddForm.merchantAddress = this.$refs.mapForm.address
let lnglat = this.$refs.mapForm.lnglat let lnglat = this.$refs.mapForm.lnglat
this.accountAddForm.lat = lnglat.lat this.accountAddForm.lat = lnglat.lat
this.accountAddForm.lng = lnglat.lng this.accountAddForm.lng = lnglat.lng
var fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
// 获取省市
var provincecode = this.$refs.mapForm.geocoderAddress.adcode
var province = fullAddress.province
var city = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == province)
if (municipality) {
city = city.slice(0, 2) + '城区'
if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县')
}
}
// 判断省市是否匹配
if (this.accountAddForm.provinceName) {
if (this.accountAddForm.provinceName !== province || this.accountAddForm.cityName !== city) {
this.$message.error('您选择的地址错误,请重新选择')
this.accountAddForm.merchantAddress = ''
return
}
}
this.dialogMapVisible = false
this.accountAddForm.provinceName = province
this.accountAddForm.cityName = city
this.$refs.provinceForm.init(province, city)
const { provinceCode, cityCode } = this.$refs.provinceForm.provinceForm
this.accountAddForm.provinceCode = provinceCode
this.accountAddForm.cityCode = cityCode
},
// 当直接点击选择地址时,获取省市ID
init(province, city) {
this.$refs.provinceForm.init(province, city)
},
// 获取省
selectProvince(provinceName, provinceCode) {
this.$set(this.accountAddForm, 'merchantAddress', '')
// 强制更新 merchantAddress
this.$forceUpdate()
this.accountAddForm.provinceName = provinceName
this.accountAddForm.provinceCode = provinceCode
},
// 获取市
selectCity(cityName, cityCode) {
this.accountAddForm.cityName = cityName
this.accountAddForm.cityCode = cityCode
this.$set(this.accountAddForm, 'merchantAddress', '')
this.$forceUpdate()
}, },
delImg(index) { delImg(index) {
this.accountAddForm.merchantFiles.splice(index, 1) this.accountAddForm.merchantFiles.splice(index, 1)
...@@ -309,10 +398,10 @@ export default { ...@@ -309,10 +398,10 @@ export default {
}, },
mounted() { mounted() {
// this.brandList() this.getUserInfo()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.base-info { .base-info {
...@@ -450,4 +539,4 @@ export default { ...@@ -450,4 +539,4 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -72,7 +72,6 @@ export default { ...@@ -72,7 +72,6 @@ export default {
}, },
methods: { methods: {
handleClik(tab, event) { handleClik(tab, event) {
console.log(tab, event)
const tabId = tab.name const tabId = tab.name
const productTab = this.tabMenu.find(i => i.accounttypeId == tabId) const productTab = this.tabMenu.find(i => i.accounttypeId == tabId)
this.productTab = productTab.productsArr[0] ? productTab.productsArr[0].productId : '' this.productTab = productTab.productsArr[0] ? productTab.productsArr[0].productId : ''
...@@ -81,7 +80,6 @@ export default { ...@@ -81,7 +80,6 @@ export default {
this.$parent.editStatus = true this.$parent.editStatus = true
this.productTab = data.length != 0 ? data[data.length - 1].productId : '' this.productTab = data.length != 0 ? data[data.length - 1].productId : ''
const { tabName, tabMenu, productTab } = this const { tabName, tabMenu, productTab } = this
console.log(tabName, data)
// 设置全选 // 设置全选
var arr = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab).merchantProTreeResponses var arr = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab).merchantProTreeResponses
this.$refs[`tree_${tabName}_${productTab}`][0].setCheckedKeys(this.getAllId(arr)) this.$refs[`tree_${tabName}_${productTab}`][0].setCheckedKeys(this.getAllId(arr))
...@@ -108,7 +106,6 @@ export default { ...@@ -108,7 +106,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.addStyle() this.addStyle()
}) })
console.log(this.tabMenu)
this.accountTypes = tabMenu.map(item => { this.accountTypes = tabMenu.map(item => {
return { return {
products: null, products: null,
...@@ -128,7 +125,6 @@ export default { ...@@ -128,7 +125,6 @@ export default {
account = 'accountTypeSearchRequest' account = 'accountTypeSearchRequest'
} }
this.$apis.store[account](params).then(res => { this.$apis.store[account](params).then(res => {
console.log(res)
let tabMenu = res let tabMenu = res
this.accountList = tabMenu.map(item => { this.accountList = tabMenu.map(item => {
return { return {
...@@ -140,8 +136,6 @@ export default { ...@@ -140,8 +136,6 @@ export default {
// productId: '' // productId: ''
} }
}) })
console.log(this.accountList)
this.accountTypes = tabMenu.map(item => { this.accountTypes = tabMenu.map(item => {
return { return {
products: null, products: null,
...@@ -160,9 +154,7 @@ export default { ...@@ -160,9 +154,7 @@ export default {
this.$apis.store.findPermissionsByMerId(params).then(res => { this.$apis.store.findPermissionsByMerId(params).then(res => {
this.tabMenu_x = util.deepClone(res) this.tabMenu_x = util.deepClone(res)
res.forEach(item => { res.forEach(item => {
console.log(item)
this.accountList.forEach(itm => { this.accountList.forEach(itm => {
console.log(itm)
if (item.accounttypeId == itm.accounttypeId) { if (item.accounttypeId == itm.accounttypeId) {
this.tabMenu.push(itm) this.tabMenu.push(itm)
item.products.forEach(i => { item.products.forEach(i => {
...@@ -192,7 +184,6 @@ export default { ...@@ -192,7 +184,6 @@ export default {
this.accountList = util.deepClone(this.tabMenu_s) this.accountList = util.deepClone(this.tabMenu_s)
this.tabMenu_x.forEach(item => { this.tabMenu_x.forEach(item => {
this.accountList.forEach(itm => { this.accountList.forEach(itm => {
console.log(itm)
if (item.accounttypeId == itm.accounttypeId) { if (item.accounttypeId == itm.accounttypeId) {
this.tabMenu.push(itm) this.tabMenu.push(itm)
item.products.forEach(i => { item.products.forEach(i => {
...@@ -244,7 +235,6 @@ export default { ...@@ -244,7 +235,6 @@ export default {
this.uniteChildSame(currentObj, true) this.uniteChildSame(currentObj, true)
} else { } else {
// 未选中 处理子节点全部未选中 // 未选中 处理子节点全部未选中
console.log(currentObj)
if (currentObj.children !== null) { if (currentObj.children !== null) {
if (currentObj.children.length !== 0) { if (currentObj.children.length !== 0) {
this.uniteChildSame(currentObj, false) this.uniteChildSame(currentObj, false)
...@@ -290,7 +280,6 @@ export default { ...@@ -290,7 +280,6 @@ export default {
uniteChildSame(treeList, isSelected) { uniteChildSame(treeList, isSelected) {
const tree_ref = `tree_${this.tabName}_${this.productTab}` const tree_ref = `tree_${this.tabName}_${this.productTab}`
this.$refs[tree_ref][0].setChecked(treeList.id, isSelected) this.$refs[tree_ref][0].setChecked(treeList.id, isSelected)
console.log(treeList)
if (treeList.children !== null) { if (treeList.children !== null) {
for (let i = 0; i < treeList.children.length; i++) { for (let i = 0; i < treeList.children.length; i++) {
this.uniteChildSame(treeList.children[i], isSelected) this.uniteChildSame(treeList.children[i], isSelected)
...@@ -327,7 +316,6 @@ export default { ...@@ -327,7 +316,6 @@ export default {
let productList = [] let productList = []
item.productsArr.forEach(itm => { item.productsArr.forEach(itm => {
const checkedNodes = this.$refs[`tree_${item.accounttypeId}_${itm.productId}`] ? this.$refs[`tree_${item.accounttypeId}_${itm.productId}`][0].getCheckedNodes() : [] const checkedNodes = this.$refs[`tree_${item.accounttypeId}_${itm.productId}`] ? this.$refs[`tree_${item.accounttypeId}_${itm.productId}`][0].getCheckedNodes() : []
console.log(checkedNodes)
const menuIdList = checkedNodes const menuIdList = checkedNodes
// .filter((item) => item.logo === "menu") // .filter((item) => item.logo === "menu")
.filter(item => item.logo !== 'function' && item.logo !== 'functionValue' && item.logo !== 'neglect') .filter(item => item.logo !== 'function' && item.logo !== 'functionValue' && item.logo !== 'neglect')
...@@ -359,7 +347,6 @@ export default { ...@@ -359,7 +347,6 @@ export default {
}) })
}) })
} }
console.log(menuIdList, functionIdList, functionValueIdLists, list)
if (this.roleType) { if (this.roleType) {
productList.push({ productList.push({
productId: itm.productId, productId: itm.productId,
...@@ -388,7 +375,6 @@ export default { ...@@ -388,7 +375,6 @@ export default {
} }
} }
}) })
console.log(this.accountTypes)
return this.accountTypes return this.accountTypes
} }
}, },
...@@ -496,4 +482,4 @@ export default { ...@@ -496,4 +482,4 @@ export default {
margin-bottom: 12px; margin-bottom: 12px;
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -125,17 +125,28 @@ ...@@ -125,17 +125,28 @@
{{ firstPageObj.merchantAddress || '-' }} {{ firstPageObj.merchantAddress || '-' }}
</span> </span>
</el-col> </el-col>
<!-- <el-col :span="10" class="flexCol"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">经营业务类型:</span> <span class="itemName itemNameCol2">经营业务类型:</span>
<!-- <span class="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span> -->
<span class="itemValue">{{ firstPageObj.businessTypeName ? firstPageObj.businessTypeName : '-' }}</span> <span class="itemValue">{{ firstPageObj.businessTypeName ? firstPageObj.businessTypeName : '-' }}</span>
</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="itemValue">{{ firstPageObj.bussinessBegintime ? firstPageObj.bussinessBegintime + '-' + firstPageObj.bussinessEndtime : '-' }}</span>
</el-col>
<el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">驻店电话:</span>
<span class="itemValue">{{ firstPageObj.residentPhone || '-' }}</span>
</el-col>
</el-row>
<el-row>
<el-col class="flexCol">
<span class="itemName">主营品牌:</span> <span class="itemName">主营品牌:</span>
<span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span> <span class="itemValue itemPadding">{{ firstPageObj.merchantBrandName || '-' }}</span>
</el-col> </el-col>
</el-row> --> </el-row>
</div> </div>
</div> </div>
</div> </div>
...@@ -201,15 +212,9 @@ ...@@ -201,15 +212,9 @@
<GLTable ref="updateRecord" :tableTotal="tableTotal" :tableData="updateRecordList" :hasNum="true" :pageConf="pageConf" :tableParams="thirdtableParams" @refreshTable="getThirdTable"></GLTable> <GLTable ref="updateRecord" :tableTotal="tableTotal" :tableData="updateRecordList" :hasNum="true" :pageConf="pageConf" :tableParams="thirdtableParams" @refreshTable="getThirdTable"></GLTable>
</div> </div>
</div> </div>
<div <GLFooter>
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleCancel">关闭</el-button> <el-button type="primary" @click="handleCancel">关闭</el-button>
</div> </GLFooter>
</div> </div>
</template> </template>
<script> <script>
...@@ -291,13 +296,11 @@ export default { ...@@ -291,13 +296,11 @@ export default {
}, },
{ {
label: '操作人', label: '操作人',
prop: 'userName', prop: 'userName'
width: 180
}, },
{ {
label: '操作时间', label: '操作时间',
prop: 'createdTime', prop: 'createdTime'
width: 180
} }
] ]
}, },
...@@ -403,7 +406,6 @@ export default { ...@@ -403,7 +406,6 @@ export default {
findMenuFunTreeByMerId() { findMenuFunTreeByMerId() {
this.$apis.merchant.findMenuFunTreeByMerId({ id: this.merchantId }).then(res => { this.$apis.merchant.findMenuFunTreeByMerId({ id: this.merchantId }).then(res => {
if (res) { if (res) {
console.log(res, '功能树的信息')
this.powerDataArray = res this.powerDataArray = res
this.handlerTreeDom() this.handlerTreeDom()
} }
...@@ -450,7 +452,6 @@ export default { ...@@ -450,7 +452,6 @@ export default {
}) })
) )
this.merchantProTreeResponsesArray = this.toContiuneTree(this.merchantProTreeResponsesArray, 0, maxval) this.merchantProTreeResponsesArray = this.toContiuneTree(this.merchantProTreeResponsesArray, 0, maxval)
console.log(this.merchantProTreeResponsesArray)
this.maxval = maxval - 1 this.maxval = maxval - 1
this.$nextTick(() => { this.$nextTick(() => {
this.changeTreeClass(maxval) this.changeTreeClass(maxval)
...@@ -498,11 +499,8 @@ export default { ...@@ -498,11 +499,8 @@ export default {
// param.pageNum=this.$refs.subMerchantTable.page.pageNum // param.pageNum=this.$refs.subMerchantTable.page.pageNum
this.$apis.merchant.getSecondTable(param).then(res => { this.$apis.merchant.getSecondTable(param).then(res => {
if (res) { if (res) {
console.log('2', res)
let data = this.formateNullFieldData(res) let data = this.formateNullFieldData(res)
this.subMerchantTableList = data this.subMerchantTableList = data
this.subMerchantTableTotal = res.length this.subMerchantTableTotal = res.length
} }
// total > 50?calc(100vh - '199px'): calc(100vh - '152px') // total > 50?calc(100vh - '199px'): calc(100vh - '152px')
...@@ -548,13 +546,10 @@ export default { ...@@ -548,13 +546,10 @@ export default {
this.getFirstInfo() this.getFirstInfo()
this.findMenuFunTreeByMerId() this.findMenuFunTreeByMerId()
this.getSecondInfo() this.getSecondInfo()
this.getSecondTree() this.getSecondTree()
}, },
mounted() { mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.getThirdTable() this.getThirdTable()
this.getSecondTable() this.getSecondTable()
} }
...@@ -878,4 +873,15 @@ export default { ...@@ -878,4 +873,15 @@ export default {
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
} }
.merchant-brand {
margin-right: 10px;
width: 200px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
.itemPadding {
padding-right: 20px;
}
</style> </style>
...@@ -62,17 +62,11 @@ ...@@ -62,17 +62,11 @@
<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>
<div <GLFooter style="z-index: 2">
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<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>
</div> </GLFooter>
<el-dialog :visible.sync="dialogMapVisible" width="60%"> <el-dialog :visible.sync="dialogMapVisible" width="60%">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view> <map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -130,6 +124,10 @@ export default { ...@@ -130,6 +124,10 @@ export default {
lat: null, lat: null,
lng: null, lng: null,
merchantAddress: null, merchantAddress: null,
provinceName: null,
provinceCode: null,
cityName: null,
cityCode: null,
merchantName: null, merchantName: null,
merchantAbbreviation: null, merchantAbbreviation: null,
merchantType: null, merchantType: null,
...@@ -169,6 +167,11 @@ export default { ...@@ -169,6 +167,11 @@ export default {
} }
} }
}, },
// provide() {
// return {
// provinceEditAccount: this.accountAddForm
// }
// },
watch: { watch: {
filterText(val) { filterText(val) {
this.$refs.brandTree.filter(val) this.$refs.brandTree.filter(val)
...@@ -267,9 +270,7 @@ export default { ...@@ -267,9 +270,7 @@ export default {
if (valid) resolve() if (valid) resolve()
setTimeout(() => { setTimeout(() => {
var isError = document.getElementsByClassName('is-error') var isError = document.getElementsByClassName('is-error')
if (isError[0]) { isError[0].querySelector('input').focus()
isError[0].querySelector('input').focus()
}
}, 100) }, 100)
}) })
}) })
...@@ -278,9 +279,7 @@ export default { ...@@ -278,9 +279,7 @@ export default {
if (valid) resolve() if (valid) resolve()
setTimeout(() => { setTimeout(() => {
var isError = document.getElementsByClassName('is-error') var isError = document.getElementsByClassName('is-error')
if (isError[0]) { isError[0].querySelector('input').focus()
isError[0].querySelector('input').focus()
}
}, 100) }, 100)
}) })
}) })
...@@ -293,14 +292,25 @@ export default { ...@@ -293,14 +292,25 @@ export default {
}, 100) }, 100)
return return
} }
if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) { // if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) {
this.$message.error('请输入正确的驻店电话') // this.$message.error('请输入正确的驻店电话')
document.querySelector('#app').scrollTop = 0 // document.querySelector('#app').scrollTop = 0
setTimeout(() => { // setTimeout(() => {
var isError = document.getElementsByClassName('phone-input') // var isError = document.getElementsByClassName('phone-input')
isError[0].querySelector('input').focus() // isError[0].querySelector('input').focus()
}, 100) // }, 100)
return // return
// }
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/
if (this.accountAddForm.residentPhone) {
const result = reg.test(this.accountAddForm.residentPhone)
if (!result) {
this.$message({
message: '请输入正确的驻店信息',
type: 'warning'
})
return false
}
} }
let params = Object.assign({}, this.accountAddForm, this.accountInfoForm) let params = Object.assign({}, this.accountAddForm, this.accountInfoForm)
if (params.bussinessTime) { if (params.bussinessTime) {
...@@ -313,13 +323,14 @@ export default { ...@@ -313,13 +323,14 @@ export default {
if (params.businessType) { if (params.businessType) {
params.businessType = params.businessType.join(',') params.businessType = params.businessType.join(',')
} }
params.merchantBrandMain = ''
// params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',') // params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',')
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0) params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0)
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name) let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
params.businessScopeCustomize = businessScopeCustomize.join(',') params.businessScopeCustomize = businessScopeCustomize.join(',')
params.merchantFiles = JSON.stringify(params.merchantFiles) params.merchantFiles = JSON.stringify(params.merchantFiles)
// const merchantBrandList = this.$refs.baseInfoForm.$refs.brandListTree.getMerchantBrandList() const merchantBrandList = this.$refs.baseInfoForm.$refs.brandListTree.getMerchantBrandList()
// params.merchantBrandListJson = JSON.stringify(merchantBrandList) params.merchantBrandListJson = JSON.stringify(merchantBrandList)
Promise.all([pm1, pm2]).then(() => { Promise.all([pm1, pm2]).then(() => {
this.$apis.store.updateMerchant(params).then(res => { this.$apis.store.updateMerchant(params).then(res => {
if (res) { if (res) {
...@@ -365,7 +376,7 @@ export default { ...@@ -365,7 +376,7 @@ export default {
}) })
}, },
renderView(res) { renderView(res) {
let { isloginName, bussinessBegintime, bussinessEndtime, lat, merchantBrandMain, businessType, lng, merchantAddress, merchantName, merchantAbbreviation, merchantType, merchantOrgcode, merchantLegalPerson, merchantLegalPersonPhone, residentContact, residentPhone, merchantLoginAccount, merchantLoginPassword, merchantAccountLevel, businessScope, businessScopeCustomize, merchantBrand, merchantFileResponses, merchantModel, accountTypes, accountType, accounttypeId, channelId, status, parentId } = res let { isloginName, bussinessBegintime, bussinessEndtime, lat, merchantBrandMain, businessType, lng, merchantAddress, provinceName, cityName, provinceCode, cityCode, merchantName, merchantAbbreviation, merchantType, merchantOrgcode, merchantLegalPerson, merchantLegalPersonPhone, residentContact, residentPhone, merchantLoginAccount, merchantLoginPassword, merchantAccountLevel, businessScope, businessScopeCustomize, merchantBrand, merchantFileResponses, merchantModel, accountTypes, accountType, accounttypeId, channelId, status, parentId, merchantBrandName } = res
this.accountInfoForm.merchantLoginAccount = merchantLoginAccount this.accountInfoForm.merchantLoginAccount = merchantLoginAccount
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword this.accountInfoForm.merchantLoginPassword = merchantLoginPassword
this.accountTypes = accountTypes this.accountTypes = accountTypes
...@@ -411,6 +422,10 @@ export default { ...@@ -411,6 +422,10 @@ export default {
lat, lat,
lng, lng,
merchantAddress, merchantAddress,
provinceName,
cityName,
provinceCode,
cityCode,
merchantName, merchantName,
merchantAbbreviation, merchantAbbreviation,
merchantType, merchantType,
...@@ -427,9 +442,16 @@ export default { ...@@ -427,9 +442,16 @@ export default {
accounttypeId: accountType, accounttypeId: accountType,
merchantBrandMain merchantBrandMain
}) })
merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',') // 省市回显
// this.$refs.baseInfoForm.checkBrandList(merchantBrandMain) this.$refs.baseInfoForm.init(this.accountAddForm.provinceName, this.accountAddForm.cityName)
// this.$refs.baseInfoForm.checkBusinessType(businessType) if (!this.accountAddForm.merchantBrandMain) {
this.accountAddForm.merchantBrandMain = []
} else {
this.accountAddForm.merchantBrandMain = this.accountAddForm.merchantBrandMain.replaceAll(';', ',').split(',')
}
// merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',')
this.$refs.baseInfoForm.brandList()
this.$refs.baseInfoForm.checkBusinessType(businessType)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.baseInfoForm.$refs.baseForm.validate() this.$refs.baseInfoForm.$refs.baseForm.validate()
this.editStatus = false this.editStatus = false
...@@ -443,14 +465,12 @@ export default { ...@@ -443,14 +465,12 @@ export default {
}, },
mounted() { mounted() {
document.querySelector('#app').scrollTop = 0 document.querySelector('#app').scrollTop = 0
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.accountAddForm.id = this.$route.params.id this.accountAddForm.id = this.$route.params.id
this.getCarbrandTree() this.getCarbrandTree()
this.findAllDictData() this.findAllDictData()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tab-edit-status { .tab-edit-status {
...@@ -615,4 +635,4 @@ export default { ...@@ -615,4 +635,4 @@ export default {
z-index: 999; z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-03 17:45:22 * @Date: 2022-03-03 17:45:22
* @LastEditTime: 2022-03-04 16:53:04 * @LastEditTime: 2022-04-15 17:54:32
* @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\approvalConfig\createGuide.vue * @FilePath: \scrm-micro-settings\src\views\approvalConfig\createGuide.vue
--> -->
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="step-content"> <div class="step-content">
打开企微后台登录地址: 打开企微后台登录地址:
<el-link type="primary" target="_blank" :underline="false" href="https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome">https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome</el-link> <el-link type="primary" target="_blank" :underline="false" href="https://work.weixin.qq.com/login">https://work.weixin.qq.com/login</el-link>
企微管理员用企微或者微信扫码进行登录 企微管理员用企微或者微信扫码进行登录
</div> </div>
</div> </div>
...@@ -91,7 +91,9 @@ ...@@ -91,7 +91,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="footer-panel" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"><el-button type="primary" @click="handleCancel">返回</el-button></div> <GLFooter style="z-index: 2">
<el-button type="primary" @click="handleCancel">返回</el-button>
</GLFooter>
</div> </div>
</template> </template>
...@@ -101,17 +103,12 @@ export default { ...@@ -101,17 +103,12 @@ export default {
data() { data() {
return { return {
lineHeight: 2200, lineHeight: 2200,
footerLeft: 0,
// footerWidth: 800, // footerWidth: 800,
// 当屏幕太小导致换行,出现对不齐问题 // 当屏幕太小导致换行,出现对不齐问题
fiveHeight: 40, fiveHeight: 40,
thirdHeight: 40 thirdHeight: 40
} }
}, },
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
},
methods: { methods: {
handleCancel() { handleCancel() {
this.$router.push({ path: '/approvalConfig/index' }) this.$router.push({ path: '/approvalConfig/index' })
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{{ blocInfo.merchantName }} {{ blocInfo.merchantName }}
<span class="min_text">(商户号:{{ blocInfo.merchantNo }})</span> <span class="min_text">(商户号:{{ blocInfo.merchantNo }})</span>
</div> </div>
<!-- <GLButton type="primary" :size="size" @click="editInfo" fn="修改企业信息">修改企业信息</GLButton> --> <GLButton type="primary" :size="size" @click="editInfo" fn="修改企业信息">修改企业信息</GLButton>
<!-- <el-button type="primary" :size="size" @click="editInfo">修改企业信息</el-button> --> <!-- <el-button type="primary" :size="size" @click="editInfo">修改企业信息</el-button> -->
</div> </div>
......
...@@ -90,18 +90,22 @@ ...@@ -90,18 +90,22 @@
</div> </div>
</div> </div>
<div style="height: 64px"></div> <div style="height: 64px"></div>
<div <GLFooter class="fixed-footer">
<div :style="{ width: customWidth + 'px' }" ref="btnWidth" class="btn-custom pruple" @click="handleMutiGL">确定关联({{ dataList.length }})</div>
<div style="width: 20px"></div>
<el-button :style="{ width: customWidth + 'px' }" @click="closeCurRouter">取消</el-button>
</GLFooter>
<!-- <div
class="fixed-footer" class="fixed-footer"
:style="{ :style="{
left: footerLeft + 'px', left: footerLeft + 'px',
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<!-- <div :style="{ width: customWidth + 'px' }" class="btn-custom" @click="closeCurRouter">取消</div> -->
<div :style="{ width: customWidth + 'px' }" ref="btnWidth" class="btn-custom pruple" @click="handleMutiGL">确定关联({{ dataList.length }})</div> <div :style="{ width: customWidth + 'px' }" ref="btnWidth" class="btn-custom pruple" @click="handleMutiGL">确定关联({{ dataList.length }})</div>
<div style="width: 20px"></div> <div style="width: 20px"></div>
<el-button :style="{ width: customWidth + 'px' }" @click="closeCurRouter">取消</el-button> <el-button :style="{ width: customWidth + 'px' }" @click="closeCurRouter">取消</el-button>
</div> </div> -->
</div> </div>
</template> </template>
...@@ -335,11 +339,6 @@ export default { ...@@ -335,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>
...@@ -481,9 +480,9 @@ export default { ...@@ -481,9 +480,9 @@ export default {
text-align: center; text-align: center;
padding: 12px 0; padding: 12px 0;
} }
.pruple { }
background: #5850ff; .pruple {
} background: #5850ff;
} }
.wrap-title { .wrap-title {
font-size: 16px; font-size: 16px;
......
<!-- <!--
* @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-21 18:43:21
* @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,9 +23,9 @@ ...@@ -23,9 +23,9 @@
<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" show-checkbox :filter-node-method="filterNode" ref="tree"></el-tree>
<div class="tree-footer"> <div class="tree-footer">
<div class="tree-footer-checkbox"> <div class="tree-footer-checkbox">
<el-checkbox v-model="checkedAll" @change="selectAll">全部</el-checkbox> <el-checkbox v-model="checkedAll" @change="selectAll">全部</el-checkbox>
...@@ -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: {
...@@ -65,7 +66,7 @@ export default { ...@@ -65,7 +66,7 @@ export default {
handler() { handler() {
const getCheckedNodes = this.$refs.tree.getCheckedNodes() const getCheckedNodes = this.$refs.tree.getCheckedNodes()
this.getCheckedArr = getCheckedNodes.reduce((prev, cur) => { this.getCheckedArr = getCheckedNodes.reduce((prev, cur) => {
if (Object.keys(cur).includes('children') && cur.children.length > 0) { if (Object.keys(cur).includes('children') && cur.children && cur.children.length > 0) {
return prev return prev
} }
return prev.concat(cur) return prev.concat(cur)
...@@ -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,8 +92,15 @@ export default { ...@@ -91,8 +92,15 @@ export default {
merchantBrandId merchantBrandId
} }
}) })
getCheckedNodes = getCheckedNodes.filter(item=>item.children) let checkNodes = getCheckedNodes.filter(item => item.children)
let merchantBrandList2 = getCheckedNodes.map(car => { let noCheckNodes = getCheckedNodes
.filter(item => item.children === null)
.map(i => {
return {
cars: i.id
}
})
let merchantBrandList2 = checkNodes.map(car => {
let merchantBrandId = [] let merchantBrandId = []
car.children.forEach(item => { car.children.forEach(item => {
if (getCheckedKeys.includes(item.id)) { if (getCheckedKeys.includes(item.id)) {
...@@ -104,7 +112,7 @@ export default { ...@@ -104,7 +112,7 @@ export default {
merchantBrandId merchantBrandId
} }
}) })
return merchantBrandList.concat(merchantBrandList2) return merchantBrandList.concat(merchantBrandList2).concat(noCheckNodes)
}, },
//勾选 //勾选
handleCheck() { handleCheck() {
...@@ -117,8 +125,7 @@ export default { ...@@ -117,8 +125,7 @@ export default {
} }
}, },
getCheckList(checkArr = []) { getCheckList(checkArr = []) {
checkArr.forEach(item=>item = parseInt(item)); checkArr.forEach(item => (item = parseInt(item)))
console.log(checkArr)
this.$refs.tree.setCheckedKeys(checkArr) this.$refs.tree.setCheckedKeys(checkArr)
this.$nextTick(() => { this.$nextTick(() => {
this.handleCheck() this.handleCheck()
...@@ -185,7 +192,12 @@ export default { ...@@ -185,7 +192,12 @@ export default {
//过滤 //过滤
filterNode(value, data) { filterNode(value, data) {
if (!value) return true if (!value) return true
return data.name.indexOf(value) !== -1 return data.label.indexOf(value) !== -1
},
// 显示隐藏
switchBrand() {
this.brandTree = !this.brandTree
this.$emit('clickBrand', this.brandTree)
} }
} }
} }
...@@ -246,4 +258,7 @@ export default { ...@@ -246,4 +258,7 @@ export default {
align-items: center; align-items: center;
} }
} }
.tree-footer-reset {
cursor: pointer;
}
</style> </style>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="title_text">产品信息</div> <div class="title_text">产品信息</div>
<div class="desc_text"> <div class="desc_text">
<span>有效期:</span> <span>有效期:</span>
<span class="spc_text">{{bloc.effectiveTimeName || '--'}}</span> <span class="spc_text">{{ bloc.effectiveTimeName || '--' }}</span>
</div> </div>
</div> </div>
<div class="item_info"> <div class="item_info">
...@@ -102,10 +102,10 @@ ...@@ -102,10 +102,10 @@
<script> <script>
export default { export default {
name: '', name: '',
props: { props: {
bloc: Object, bloc: Object,
default:{ default: {
effectiveTimeName:'' effectiveTimeName: ''
} }
}, },
data() { data() {
...@@ -131,7 +131,8 @@ export default { ...@@ -131,7 +131,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.shop-info-module { .shop-info-module {
box-sizing: border-box; box-sizing: border-box;
padding: 60px 0 0 40px; // padding: 60px 0 0 40px;
padding: 60px 0px 30px 40px;
} }
.wrapper { .wrapper {
display: flex; display: flex;
...@@ -317,4 +318,4 @@ export default { ...@@ -317,4 +318,4 @@ export default {
.shop-info-module /deep/ .el-dialog__body { .shop-info-module /deep/ .el-dialog__body {
padding: 0; padding: 0;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<template>
<div>
<el-dialog :visible.sync="dialogTelVisible" width="30%" top="30px">
<div class="dialog-show">
<img src="@/assets/tel-show.png" alt="" />
<div class="tel-plus">联系电话:{{ residentPhone }}</div>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'telPositon',
data() {
return {
dialogTelVisible: false,
residentPhone: ''
}
},
methods: {
init(residentPhone) {
this.dialogTelVisible = true
residentPhone ? (this.residentPhone = residentPhone) : (this.residentPhone = '400-0000-400')
}
}
}
</script>
<style lang="scss" scoped>
.dialog-show {
position: relative;
width: 534px;
height: 650px;
.tel-plus {
position: absolute;
top: 395px;
left: 276px;
height: 25px;
font-size: 16px;
color: #656566;
font-family: PingFangSC-Regular, PingFang SC;
line-height: 25px;
}
}
/deep/ .el-dialog {
background-color: transparent;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0);
}
/deep/ .el-dialog__header {
border-bottom: transparent;
}
/deep/ .el-dialog__headerbtn .el-dialog__close {
color: #191717;
}
/deep/ .el-dialog__headerbtn {
font-size: 23px;
}
</style>
...@@ -12,9 +12,10 @@ ...@@ -12,9 +12,10 @@
<record :id="id"></record> <record :id="id"></record>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<GLFooter>
<el-button type="primary" @click="handleClose">关闭</el-button> <el-button type="primary" @click="handleClose">关闭</el-button>
</div> </GLFooter>
</div> </div>
</template> </template>
...@@ -27,9 +28,7 @@ export default { ...@@ -27,9 +28,7 @@ export default {
data() { data() {
return { return {
id: '', id: '',
activeName: 'info', activeName: 'info'
footerLeft: '0',
footerWidth: '0'
} }
}, },
...@@ -42,8 +41,6 @@ export default { ...@@ -42,8 +41,6 @@ export default {
computed: {}, computed: {},
created() { created() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.id = this.$route.params.id this.id = this.$route.params.id
}, },
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <GLFooter>
<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>
</div> </GLFooter>
</div> </div>
</template> </template>
...@@ -53,8 +53,6 @@ export default { ...@@ -53,8 +53,6 @@ export default {
1: '新增员工', 1: '新增员工',
2: '修改员工' 2: '修改员工'
}, },
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
routeInfo: { routeInfo: {
// 1-新增;2-编辑 // 1-新增;2-编辑
...@@ -251,7 +249,7 @@ export default { ...@@ -251,7 +249,7 @@ export default {
fileName: res.merchantFileResponse ? res.merchantFileResponse.fileName : '' fileName: res.merchantFileResponse ? res.merchantFileResponse.fileName : ''
} }
this.handleChangeMerchant(this.editForm.merchantId, true) this.handleChangeMerchant(this.editForm.merchantId, true)
this.$nextTick(()=>{ this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
}) })
...@@ -414,8 +412,6 @@ export default { ...@@ -414,8 +412,6 @@ export default {
}, },
mounted() { mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params this.routeInfo = this.$route.params
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
this.getAllMerchantList() this.getAllMerchantList()
......
...@@ -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()
}, },
......
...@@ -347,7 +347,7 @@ export default { ...@@ -347,7 +347,7 @@ export default {
}, },
//获取二维码 //获取二维码
getQrcode() { getQrcode() {
this.$apis.ww.getQrcode({ }).then(res => { this.$apis.ww.getQrcode({}).then(res => {
let qrcode = new QRCode('qrcode', { let qrcode = new QRCode('qrcode', {
text: res.qrcodeUrl, // 需要转换为二维码的内容 text: res.qrcodeUrl, // 需要转换为二维码的内容
width: 120, width: 120,
...@@ -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()
}, },
...@@ -584,7 +582,7 @@ export default { ...@@ -584,7 +582,7 @@ export default {
vertical-align: middle; vertical-align: middle;
color: #333333; color: #333333;
border-width: 1px; border-width: 1px;
height: 36px; // height: 36px;
border-style: solid; border-style: solid;
border-color: #e8e8ea; border-color: #e8e8ea;
background: #f4f6fc; background: #f4f6fc;
......
...@@ -96,8 +96,10 @@ export default { ...@@ -96,8 +96,10 @@ export default {
}, },
// 获取业务类型 // 获取业务类型
getBusinessType() { getBusinessType() {
this.$apis.emp.getListEntBusinessType().then(res => { var params = {}
console.log(res, '111') // flag 0-跟进专员调用 1-素材调用
params.flag = 0
this.$apis.emp.getListEntBusinessType(params).then(res => {
this.businessType = res this.businessType = res
this.selectBusiness = [1] this.selectBusiness = [1]
}) })
......
...@@ -10,27 +10,18 @@ ...@@ -10,27 +10,18 @@
</p> </p>
</div> </div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }"> <div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item"> <GLCombiForm ref="showSearch" :formObj="searchForm" :rowNumber="1" :searchSelectObj="searchSelectObj" :formData="searchFormData" :inline="true" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-form-item label="跟进专员类型"> <div class="table-header">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择"> <div class="header-text">跟进专员列表</div>
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option> <div class="table-btn">
</el-select> <GLButton fn="新增" size="small" type="primary" plain @click="openDrawer">跟进专员</GLButton>
</el-form-item> <!-- <el-button size="small" type="primary" plain @click="openDrawer">跟进专员</el-button> -->
<el-form-item label="员工搜索"> </div>
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input> </div>
</el-form-item>
<el-form-item>
<el-button @click="handleReset" size="small">重置</el-button>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<!-- <GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton> -->
<el-button size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</el-button>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"> <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope.scope"></GLTableButton>
<!-- <el-button fn="删除" type="text" @click="handleDele(scope.scope)">删除</el-button> -->
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -44,11 +35,9 @@ ...@@ -44,11 +35,9 @@
import addSale from './components/addSale' import addSale from './components/addSale'
export default { export default {
name: 'index', name: 'index',
components: { components: {
addSale addSale
}, },
data() { data() {
return { return {
alertStatus: true, alertStatus: true,
...@@ -59,18 +48,23 @@ export default { ...@@ -59,18 +48,23 @@ export default {
followerTypeId: '', followerTypeId: '',
staffName: '' staffName: ''
}, },
optionsType: [ searchFormData: [
{ {
value: '', label: '跟进专员类型',
label: '全部' name: 'followerTypeId',
type: 'select',
placeholder: '全部',
optionsType: [],
optionList: [],
optionId: 'id',
optionLabel: 'followName',
optionsName: 'followName'
}, },
{ {
value: '1', label: '员工搜索',
label: '新车跟进专员' name: 'staffName',
}, type: 'input',
{ placeholder: '请输入员工姓名'
value: '2',
label: '售后跟进专员'
} }
], ],
scope: { scope: {
...@@ -79,7 +73,9 @@ export default { ...@@ -79,7 +73,9 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
tableParams: { tableParams: {
tableOption: true, tableOption: {
width: 80
},
mutiSelectName: 'user', mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [ tableColumns: [
...@@ -89,23 +85,29 @@ export default { ...@@ -89,23 +85,29 @@ export default {
}, },
{ {
label: '部门', label: '部门',
prop: 'departmentName' prop: 'departmentName',
width: 120,
line: 1
}, },
{ {
label: '跟进专员类型', label: '跟进专员类型',
prop: 'followerTypeName' prop: 'followerTypeName',
minWidth: 150
}, },
{ {
label: '手机号', label: '手机号',
prop: 'staffPhone' prop: 'staffPhone',
minWidth: 150
}, },
{ {
label: '首次开通时间', label: '首次开通时间',
prop: 'followerCreatedTime' prop: 'followerCreatedTime',
minWidth: 150
}, },
{ {
label: '是否有外部联系人权限', label: '是否有外部联系人权限',
prop: 'isAddOutsider', prop: 'isAddOutsider',
width: '200',
formatter: cellValue => { formatter: cellValue => {
return { return {
0: '是', 0: '是',
...@@ -115,6 +117,24 @@ export default { ...@@ -115,6 +117,24 @@ export default {
} }
] ]
}, },
buttonList: [
{
type: 'GLButton',
name: row => {
return '删除'
},
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return true
},
listeners: {
click: this.handleDele
}
}
],
layout: 'sizes, prev, pager, next, jumper, ->, total', layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [], tableData: [],
tableTotal: 0 tableTotal: 0
...@@ -158,7 +178,7 @@ export default { ...@@ -158,7 +178,7 @@ export default {
userIds, userIds,
businessTypeId businessTypeId
} }
console.log(params, '1253715427'); console.log(params, '1253715427')
this.$apis.emp.saveFollowerStaff(params).then(res => { this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) { if (res) {
this.handleClose() this.handleClose()
...@@ -190,6 +210,8 @@ export default { ...@@ -190,6 +210,8 @@ export default {
listEntFollowerType() { listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => { this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res) this.optionsType = [{ followName: '全部', id: '' }].concat(res)
let idx = this.searchFormData.findIndex(item => item.name == 'followerTypeId')
this.searchFormData[idx].optionList = this.optionsType
}) })
}, },
handleDele(scope) { handleDele(scope) {
...@@ -247,7 +269,7 @@ export default { ...@@ -247,7 +269,7 @@ export default {
this.formHeight = document.documentElement.clientHeight - 230 this.formHeight = document.documentElement.clientHeight - 230
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.slide-fade-enter-active { .slide-fade-enter-active {
...@@ -299,14 +321,6 @@ export default { ...@@ -299,14 +321,6 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px; padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item { &-item {
position: relative; position: relative;
.follow-form-jump { .follow-form-jump {
...@@ -321,4 +335,9 @@ export default { ...@@ -321,4 +335,9 @@ export default {
overflow-y: auto; overflow-y: auto;
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
.follow-btn {
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="main_widget"> <div class="main_widget">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item v-if="pageType == 'create' && accountLevel != 4" label="所属商户" prop="merchantId"> <el-form-item v-if="pageType == 'create' && accountLevel != 4" label="所属商户" prop="merchantId">
<el-select size="small" style="width: 40%" v-model="ruleForm.merchantId" clearable filterable placeholder="请选择" @change="selectMerchant"> <el-select size="small" style="width: 40%" v-model="ruleForm.merchantId" clearable filterable placeholder="请选择" @change="merchantChange">
<el-option v-for="item in merchantList" :key="item.id" :label="item.merchantName" :value="item.id"></el-option> <el-option v-for="item in merchantList" :key="item.id" :label="item.merchantName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -58,19 +58,12 @@ ...@@ -58,19 +58,12 @@
<div class="scrm-box-f" style="margin-top: 10px"> <div class="scrm-box-f" style="margin-top: 10px">
<SelectProduct ref="productFrom" :roleType="true" title="角色权限"></SelectProduct> <SelectProduct ref="productFrom" :roleType="true" title="角色权限"></SelectProduct>
<!-- <div style="height: 84px"></div> --> <!-- <div style="height: 84px"></div> -->
<div
class="fixed_bottom" <GLFooter style="z-index: 1">
:style="{ <el-button v-if="pageType == 'create'" type="primary" plain @click="toCreateRole(1)">草稿</el-button>
left: footerLeft + 'px', <el-button type="primary" @click="toCreateRole(0)">确定</el-button>
width: footerWidth + 'px'
}"
>
<el-button class="custtom" v-if="pageType == 'create'" type="primary" @click="toCreateRole(1)">草稿</el-button>
<div class="wrap_driver">
<el-button type="primary" @click="toCreateRole(0)">确定</el-button>
</div>
<el-button @click="toBack">取消</el-button> <el-button @click="toBack">取消</el-button>
</div> </GLFooter>
</div> </div>
</div> </div>
</template> </template>
...@@ -323,6 +316,11 @@ export default { ...@@ -323,6 +316,11 @@ export default {
return return
} }
this.$router.push('/role/index') this.$router.push('/role/index')
},
// 修改商户
merchantChange(val) {
this.selectMerchant(val)
this.$refs.productFrom.tabMenu = []
} }
}, },
async created() { async created() {
...@@ -346,8 +344,6 @@ export default { ...@@ -346,8 +344,6 @@ export default {
} }
}, },
mounted() { mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// if(this.accountLevel==4){ // if(this.accountLevel==4){
// this.selectMerchant(this.ruleForm.merchantId) // this.selectMerchant(this.ruleForm.merchantId)
// } // }
......
...@@ -5,37 +5,19 @@ ...@@ -5,37 +5,19 @@
<!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> --> <!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> -->
</div> </div>
<div class="table_widget"> <div class="table_widget">
<div class="search_widget"> <div>
<div class="left_wrap"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" :inline="true" @handleOk="toFindData" @handleRest="reSetFindData"></GLCombiForm>
<div v-if="accountLevel != 4" class="top_select">
<span class="select_label">商户名称</span>
<el-select size="small" clearable filterable v-model="searchForm.merchantId" placeholder="请选择">
<el-option v-for="item in merchantList" :key="item.id" :label="item.merchantName" :value="item.id"></el-option>
</el-select>
</div>
<div class="top_select">
<span class="select_label">状态</span>
<el-select size="small" v-model="searchForm.delFlag" placeholder="请选择">
<el-option v-for="item in optionData" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="top_select">
<span class="select_label">角色名称</span>
<el-input style="width: 76%" size="small" v-model="searchForm.roleName" clearable placeholder="请输入"></el-input>
</div>
</div>
<div class="btn_wrapper">
<el-button size="small" @click="reSetFindData">重置</el-button>
<el-button type="primary" size="small" @click="toFindData">查询</el-button>
</div>
</div> </div>
<GLTable v-if="distoryTable" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData"> <GLTable v-if="distoryTable" ref="table" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData">
<div slot="statusName" class="dot" slot-scope="scope">
<span :class="roleStatus[scope.scope.statusName]"></span>
{{ scope.scope.statusName }}
</div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton type="text" @click="toLookPage(scope.scope)" fn="查看">查看</GLButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope.scope"></GLTableButton>
<GLButton v-if="!scope.scope.defalutRole" fn="修改" type="text" @click="toEditPage(scope.scope)">修改</GLButton>
<!-- <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button> <!-- <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button>
<el-button v-if="scope.scope.roleName!='超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button> --> <el-button v-if="scope.scope.roleName != '超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button>
<el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button> <el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button> -->
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -43,59 +25,95 @@ ...@@ -43,59 +25,95 @@
</template> </template>
<script> <script>
const roleStatus = {
正常: 'normal',
草稿: 'draft'
}
export default { export default {
name: '', name: '',
data() { data() {
return { return {
roleStatus: roleStatus,
searchForm: { searchForm: {
delFlag: 2, delFlag: '',
roleName: '', roleName: '',
merchantId: '' merchantId: ''
}, },
optionData: [ searchFormData: [
{ {
value: 2, label: '商户名称',
label: '全部' name: 'merchantId',
type: 'select',
placeholder: '全部',
optionList: [],
optionId: 'id',
optionLabel: 'merchantName',
optionsName: 'merchantName',
isHide: true
}, },
{ {
value: 1, label: '状态',
label: '草稿' name: 'delFlag',
type: 'select',
placeholder: '全部',
optionList: [
{
optionId: '',
optionLabel: '全部'
},
{
optionId: 0,
optionLabel: '启用'
},
{
optionId: 1,
optionLabel: '草稿'
}
],
optionId: 'optionId',
optionLabel: 'optionLabel',
optionsName: 'optionLabel'
}, },
{ {
value: 0, label: '角色名称',
label: '启用' name: 'roleName',
type: 'input'
} }
], ],
//表格配置 //表格配置
layout: 'sizes, prev, pager, next, jumper, ->, total', layout: 'sizes, prev, pager, next, jumper, ->, total',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: { tableParams: {
tableOption: true, tableOption: {
width: '150'
},
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [ tableColumns: [
{ {
label: '角色名称', label: '角色名称',
prop: 'roleName' prop: 'roleName',
minWidth: '200'
}, },
{ {
label: '角色号', label: '角色号',
prop: 'roleCode' prop: 'roleCode',
minWidth: '200'
}, },
{ {
label: '状态', label: '状态',
prop: 'statusName', prop: 'statusName',
width: '100px' addHtml: 'statusName'
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdTime', prop: 'createdTime',
width: '160px' width: '180'
}, },
{ {
label: '更新时间', label: '更新时间',
prop: 'updatedTime', prop: 'updatedTime',
width: '160px', width: '180',
formatter: val => { formatter: val => {
if (!val.updatedTime) { if (!val.updatedTime) {
return '--' return '--'
...@@ -106,6 +124,55 @@ export default { ...@@ -106,6 +124,55 @@ export default {
} }
] ]
}, },
buttonList: [
{
type: 'GLButton',
name: row => {
return '查看'
},
attrs: {
type: 'text',
fn: '查看'
},
condition: row => {
return true
},
listeners: {
click: this.toLookPage
}
},
{
type: 'GLButton',
name: row => {
return '修改'
},
condition: row => {
return !row.defalutRole
},
attrs: {
type: 'text',
fn: '修改'
},
listeners: {
click: this.toEditPage
}
},
{
type: 'el-button',
name: row => {
return '删除'
},
condition: row => {
return row.delFlag
},
attrs: {
type: 'text'
},
listeners: {
click: this.todelete
}
}
],
tableData: [], tableData: [],
merchantList: [], merchantList: [],
tableTotal: 0, tableTotal: 0,
...@@ -120,7 +187,6 @@ export default { ...@@ -120,7 +187,6 @@ export default {
getTableData() { getTableData() {
let { delFlag, roleName, merchantId } = this.searchForm let { delFlag, roleName, merchantId } = this.searchForm
let para = {} let para = {}
console.log(merchantId)
if (!this.distoryTable) { if (!this.distoryTable) {
//代表重置 //代表重置
para = { para = {
...@@ -159,8 +225,10 @@ export default { ...@@ -159,8 +225,10 @@ export default {
this.merchantList = res || [] this.merchantList = res || []
this.merchantList.unshift({ this.merchantList.unshift({
merchantName: '全部', merchantName: '全部',
id: 0 id: ''
}) })
let idx = this.searchFormData.findIndex(item => item.name == 'merchantId')
this.searchFormData[idx].optionList = this.merchantList
// this.filterList() // this.filterList()
}) })
}, },
...@@ -179,7 +247,7 @@ export default { ...@@ -179,7 +247,7 @@ export default {
reSetFindData() { reSetFindData() {
this.distoryTable = false this.distoryTable = false
this.searchForm = { this.searchForm = {
delFlag: 2, delFlag: '',
roleName: '', roleName: '',
merchantId: '' merchantId: ''
} }
...@@ -227,9 +295,12 @@ export default { ...@@ -227,9 +295,12 @@ export default {
created() { created() {
const { session } = this.$globalState const { session } = this.$globalState
let accountLevel = session.accountLevel let accountLevel = session.accountLevel
console.log(accountLevel)
if (accountLevel != 4) { if (accountLevel != 4) {
this.tableParams.tableColumns.splice(2, 0, { label: '所属商户名', prop: 'merchantName' }) this.tableParams.tableColumns.splice(2, 0, { label: '所属商户名', prop: 'merchantName', width: '300', line: 1 })
this.getMerchantName() this.getMerchantName()
let idx = this.searchFormData.findIndex(item => item.name == 'merchantId')
this.searchFormData[idx].isHide = false
} }
this.accountLevel = accountLevel this.accountLevel = accountLevel
}, },
...@@ -252,7 +323,7 @@ export default { ...@@ -252,7 +323,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
padding: 0 20px 20px 0; padding: 0 20px 10px 0;
} }
.table_widget { .table_widget {
width: 100%; width: 100%;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="main_widget"> <div class="main_widget">
<div class="main_title">角色权限</div> <div class="main_title">角色权限</div>
<div class="wrapper"> <div class="wrapper">
<div class="menu_line_one" :style="rootList.length?'':'padding:0'"> <div class="menu_line_one" :style="rootList.length ? '' : 'padding:0'">
<div v-for="(item, index) in rootList" :key="index" class="line_element" :class="curRootIndex == index ? 'line_element_active' : ''" @click="selectRootItem(index)">{{ item.accounttypeName }}</div> <div v-for="(item, index) in rootList" :key="index" class="line_element" :class="curRootIndex == index ? 'line_element_active' : ''" @click="selectRootItem(index)">{{ item.accounttypeName }}</div>
</div> </div>
</div> </div>
...@@ -46,15 +46,10 @@ ...@@ -46,15 +46,10 @@
<!-- <div class="fixed_bottom"> <!-- <div class="fixed_bottom">
<el-button type="primary" @click="toBack">关闭</el-button> <el-button type="primary" @click="toBack">关闭</el-button>
</div> --> </div> -->
<div
class="footer-panel" <GLFooter>
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="toBack">关闭</el-button> <el-button type="primary" @click="toBack">关闭</el-button>
</div> </GLFooter>
</div> </div>
</template> </template>
...@@ -82,10 +77,6 @@ export default { ...@@ -82,10 +77,6 @@ export default {
this.getRoleData(id) this.getRoleData(id)
this.getMerchantTree(id) this.getMerchantTree(id)
}, },
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
},
methods: { methods: {
// 获取角色信息 // 获取角色信息
getRoleData(id) { getRoleData(id) {
...@@ -163,8 +154,8 @@ export default { ...@@ -163,8 +154,8 @@ export default {
}) })
) )
this.newTreeList = this.toContiuneTree(this.newTreeList, 0, maxval) this.newTreeList = this.toContiuneTree(this.newTreeList, 0, maxval)
console.log(this.newTreeList); console.log(this.newTreeList)
this.maxval = maxval-1 this.maxval = maxval - 1
this.$nextTick(() => { this.$nextTick(() => {
this.changeTreeClass(maxval) this.changeTreeClass(maxval)
}) })
...@@ -172,14 +163,14 @@ export default { ...@@ -172,14 +163,14 @@ export default {
// 处理树横向 // 处理树横向
renderContent(h, { node, data }) { renderContent(h, { node, data }) {
let className = '' let className = ''
if (data.perms&&data.count>this.maxval) { if (data.perms && data.count > this.maxval) {
className = 'especially' className = 'especially'
} }
return <div class={className}>{data.label}</div> return <div class={className}>{data.label}</div>
}, },
// 改变tree节点样式 // 改变tree节点样式
changeTreeClass(maxval) { changeTreeClass(maxval) {
let piefix = (maxval-1)*20 let piefix = (maxval - 1) * 20
var classDomList = document.getElementsByClassName('especially') var classDomList = document.getElementsByClassName('especially')
for (var i = 0; i < classDomList.length; i++) { for (var i = 0; i < classDomList.length; i++) {
classDomList[i].parentNode.style.cssText = 'float:left' classDomList[i].parentNode.style.cssText = 'float:left'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!