Commit e019a0be by 匡雅琴

Merge branch 'kuangyq_v2.9.0' into 'v2.9.0'

Kuangyq v2.9.0

See merge request !79
2 parents dfe4ca04 991e1adb
<template> <template>
<div v-if="provinceView"> <div v-if="provinceView">
<el-form ref="provinceForm" :model="provinceForm" inline="true" class="province"> <el-form ref="provinceForm" :model="provinceForm" :inline="inline" class="province" label-width="154px">
<el-select size="small" v-model="provinceForm.provinceName" clearable placeholder="选择省份" :style="{ width: defaultWidth }" @change="selectProvince" class="select-padding"> <el-form-item :label="provinceLabel">
<el-option v-for="item in AllData" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectProvince(item)"></el-option> <el-select size="small" v-model="provinceForm.provinceName" clearable placeholder="选择省份" @clear="selectProvince" class="select-padding" :style="{ width: subdistrict == 2 ? '52%' : '33.33%' }">
<el-option v-for="(item, index) in AllData" :key="'province' + index" :label="item.name" :value="item.name" @click.native="selectProvince(item)"></el-option>
</el-select> </el-select>
<el-select size="small" v-model="provinceForm.cityName" clearable placeholder="选择市" :style="{ width: defaultWidth }" @change="selectCity" class="select-padding"> <el-select size="small" v-model="provinceForm.cityName" clearable placeholder="选择市" @clear="selectCity" class="select-padding" :style="{ width: subdistrict == 2 ? '52%' : '33.33%' }">
<el-option v-for="item in cityList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectCity(item)"></el-option> <el-option v-for="(item, index) in cityList" :key="'city' + index" :label="item.name" :value="item.name" @click.native="selectCity(item)"></el-option>
</el-select> </el-select>
<el-select v-if="subdistrict == 3" size="small" v-model="provinceForm.townName" clearable placeholder="选择区" :style="{ width: defaultWidth }" @change="selectTown" class="select-padding"> <el-select v-if="subdistrict == 3" size="small" v-model="provinceForm.townName" clearable placeholder="选择区" @clear="selectTown" class="select-padding" :style="{ width: subdistrict == 2 ? '52%' : '33.33%' }">
<el-option v-for="item in townList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectTown(item)"></el-option> <el-option v-for="(item, index) in townList" :key="'town' + index" :label="item.name" :value="item.name" @click.native="selectTown(item)"></el-option>
</el-select> </el-select>
</el-form-item>
<el-form-item :label="detailAddressLabel">
<el-input size="small" v-if="mapView" readonly placeholder="请选择详细地址" v-model="provinceForm.fullAddress">
<el-button size="small" slot="append" @click="hanleSelectMap">
<img src="@/assets/map.png" alt="" class="map-icon" />
</el-button>
</el-input>
</el-form-item>
</el-form> </el-form>
<GLDialog :visible.sync="dialogMapVisible" :mode="'big'" bigTitle="选择地址">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogMapVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="getAddress">确 定</el-button>
</span>
</GLDialog>
</div> </div>
</template> </template>
<script> <script>
import mapView from './mapView.vue'
// import GLDialog from '@/packages/GLDialog/src/GLDialog'
export default { export default {
name: 'GLProvince', name: 'GLProvince',
components: {
mapView
// GLDialog
},
props: { props: {
// 省市级别,2--只显示省市,3--显示省市区,默认只显示省市 // 是否一行展示
inline: {
type: Boolean,
default: false
},
// 省市级别,2--只显示省市,3--显示省市区
subdistrict: { subdistrict: {
type: Number, type: Number,
// `2-只显示省市`
default: 2 default: 2
}, },
// 省市下拉组件宽度
defaultWidth: {
type: String,
default: '150px'
},
// 组件是否展示,默认展示 // 组件是否展示,默认展示
provinceView: { provinceView: {
type: Boolean, type: Boolean,
default: true default: true
},
// 地图组件是否展示,默认展示
// 如果需要展示地图组件,需要下载vue-amap包,并且在main.js中引入
// import VueAMap from "vue-amap"
// Vue.use(VueAMap)
// 初始化vue-amap
// VueAMap.initAMapApiLoader({
// key: "bd290dc27d0945959280753215ddda71", // 这里写你申请的高德地图的key
// plugin: ["AMap.PlaceSearch", "AMap.Geocoder", "AMap.Geolocation"],
// v: "1.4.15"
// });
mapView: {
type: Boolean,
default: true
},
// 省份标签值
provinceLabel: {
type: String,
default: '省市地址:'
},
// 详细地址标签值
detailAddressLabel: {
type: String,
default: '详细地址:'
} }
}, },
data() { data() {
...@@ -54,11 +101,23 @@ export default { ...@@ -54,11 +101,23 @@ export default {
// 城市代码 // 城市代码
cityCode: '', cityCode: '',
// 地区代码 // 地区代码
townCode: '' townCode: '',
lat: '',
lng: '',
// 全部地址
fullAddress: ''
},
mapHeight: 380,
dialogMapVisible: false,
// 暂存地址表单
addressData: {}
} }
},
mounted() {
if (this.provinceView) {
this.provinceList()
} }
}, },
mounted() {},
methods: { methods: {
/* /*
* @params:传入的为一个key-value的对象 * @params:传入的为一个key-value的对象
...@@ -85,8 +144,9 @@ export default { ...@@ -85,8 +144,9 @@ export default {
}) })
**/ **/
// 获取省市信息 // 获取省市信息
provinceList(params = {}) { provinceList() {
params ? (params.subdistrict ? '' : (params.subdistrict = this.subdistrict)) : (params.subdistrict = this.subdistrict) var params = {}
params.subdistrict = this.subdistrict
let data = '' let data = ''
for (let key in params) { for (let key in params) {
data += '&' + key + '=' + params[key] data += '&' + key + '=' + params[key]
...@@ -104,12 +164,14 @@ export default { ...@@ -104,12 +164,14 @@ export default {
return pro return pro
}, },
// 省市回显 // 省市回显
init(province, city, town) { init(provinceData) {
this.provinceForm = { const { province, city, townName, fullAddress, lng, lat } = provinceData
provinceName: province, this.provinceForm.provinceName = province
cityName: city, this.provinceForm.cityName = city
townName: town this.provinceForm.townName = townName
} this.provinceForm.fullAddress = fullAddress
this.provinceForm.lng = lng
this.provinceForm.lat = lat
if (province) { if (province) {
this.AllData.map(item => { this.AllData.map(item => {
if (item.name.indexOf(province) != -1) { if (item.name.indexOf(province) != -1) {
...@@ -122,9 +184,9 @@ export default { ...@@ -122,9 +184,9 @@ export default {
this.provinceForm.cityCode = itm.adcode this.provinceForm.cityCode = itm.adcode
this.provinceForm.cityName = itm.name this.provinceForm.cityName = itm.name
this.townList = itm.districts this.townList = itm.districts
if (town) { if (townName) {
this.townList.map(itmx => { this.townList.map(itmx => {
if (itmx.name.indexOf(town) != -1) { if (itmx.name.indexOf(townName) != -1) {
this.provinceForm.townCode = itmx.adcode this.provinceForm.townCode = itmx.adcode
this.provinceForm.townName = itmx.name this.provinceForm.townName = itmx.name
} }
...@@ -137,32 +199,161 @@ export default { ...@@ -137,32 +199,161 @@ export default {
}) })
} }
}, },
// 选择省
selectProvince(val) { selectProvince(val) {
console.log(val)
this.provinceForm.provinceName = val ? val.name : ''
this.provinceForm.fullAddress = ''
this.provinceForm.cityName = '' this.provinceForm.cityName = ''
this.provinceForm.townName = '' this.provinceForm.townName = ''
if (val) {
this.cityList = val.districts this.cityList = val.districts
this.$emit('selectProvince', val.name, val.adcode) } else {
val = ''
}
// 选择省
this.$emit('selectProvince', val)
}, },
// 选择市
selectCity(val) { selectCity(val) {
this.provinceForm.cityName = val ? val.name : ''
this.provinceForm.fullAddress = ''
this.provinceForm.townName = '' this.provinceForm.townName = ''
if (val) {
this.townList = val.districts this.townList = val.districts
this.$emit('selectCity', val.name, val.adcode) } else {
val = ''
}
// 选择市
this.$emit('selectCity', val)
}, },
// 选择区
selectTown(val) { selectTown(val) {
this.$emit('selectTown', val.name, val.adcode) this.provinceForm.townName = val ? val.name : ''
this.provinceForm.fullAddress = ''
// 选择区
this.$emit('selectTown', val)
},
// 打开地图弹框
hanleSelectMap() {
console.log(this.provinceForm)
this.dialogMapVisible = true
this.$nextTick(() => {
if (this.provinceForm.fullAddress && !this.$refs.mapForm.address) {
this.$refs.mapForm.address = this.provinceForm.fullAddress
this.$refs.mapForm.addMarker([this.provinceForm.lng, this.provinceForm.lat])
}
})
},
// 选择地图地址
getAddress() {
if (!this.$refs.mapForm.address) {
this.$message.success('请选择地址')
return
}
this.provinceForm.fullAddress = this.$refs.mapForm.address
// 获取选择经纬度
let lnglat = this.$refs.mapForm.lnglat
this.provinceForm.lat = lnglat.lat
this.provinceForm.lng = lnglat.lng
var mapData = this.$refs.mapForm.geocoderAddress
// 赋值省市区名称和code
console.log(this.$refs.mapForm, '\\\\\\')
const { city, citycode, province, district, towncode } = mapData.addressComponent
if (!this.provinceForm.provinceName) {
this.provinceForm.provinceName = province
this.provinceForm.cityName = city
this.provinceForm.townName = district
this.provinceForm.provinceCode = mapData.adcode
this.provinceForm.cityCode = citycode
this.provinceForm.townCode = towncode
}
var fullAddress = ''
var provincecode = ''
// 为防止打开地图弹框不选择地址点确定按钮无法正确判断地址选择是否正确产生的报错,设置this.addressData.fullAddress来保存上次选择的地址
if (mapData.addressComponent) {
fullAddress = mapData.addressComponent
provincecode = mapData.adcode
this.addressData.fullAddress = fullAddress
this.addressData.provincecode = provincecode
} else {
fullAddress = this.addressData.fullAddress
provincecode = this.addressData.provincecode
}
// 获取省市
var provincename = ''
var cityname = ''
var town = ''
provincename = fullAddress.province
cityname = fullAddress.city ? fullAddress.city : fullAddress.district
town = fullAddress.district
// 直辖市需额外判断
const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == provincename)
if (municipality) {
cityname = cityname.slice(0, 2) + '城区'
if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (cityname = cityname.slice(0, 2) + '城区') : (cityname = cityname.slice(0, 2) + '郊县')
// 重新赋值城市名
this.provinceForm.cityName = cityname
}
}
// 判断省市是否匹配
// 如果只展示省市
console.log(this.provinceForm.provinceName, provincename, '12121212')
if (this.provinceForm.provinceName && !this.provinceForm.townName) {
if (this.provinceForm.provinceName !== provincename || this.provinceForm.cityName !== cityname) {
this.$message.error('您选择的地址错误,请重新选择')
return
}
}
// 如果展示省市区
if (this.provinceForm.provinceName && this.provinceForm.townName) {
if (this.provinceForm.provinceName !== provincename || this.provinceForm.cityName !== cityname || this.provinceForm.townName !== town) {
this.$message.error('您选择的地址错误,请重新选择')
return
}
}
this.dialogMapVisible = false
// this.subdistrict == 2 ? this.init(province, city) : this.init(province, city, town)
// console.log(this.provinceForm.lat, 'provinceForm')
// 通过地图选择省市区
this.$emit('selectAddressByMap', this.provinceForm)
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.province { // .province {
display: inline-flex; // display: inline-flex;
} // }
.select-padding { .select-padding {
margin-right: 10px; &:nth-child(1) {
margin-left: 0;
}
margin-left: 10px;
}
.map-icon {
vertical-align: middle;
}
/deep/ {
.el-input-group__append {
background-color: #fff;
padding: 0 11px;
}
.el-form-item__content {
width: 474px;
display: flex;
margin-left: 0 !important;
}
.el-form-item {
display: flex;
}
.el-dialog__body {
padding: 20px 10px 30px !important;
}
} }
</style> </style>
<template>
<div class="map-box" :style="{ height: mapHeight + 'px' }">
<div id="container" style="width: 100%; height: 100%"></div>
<div class="map-address">{{ address }}</div>
<div id="myPageTop" style="position: absolute; top: 10px; width: 50%; left: 25%">
<el-input placeholder="请输入关键字" v-model="input" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="searchAddress"></el-button>
</el-input>
</div>
</div>
</template>
<script>
let map, marker, placeSearch
export default {
name: 'map',
props: {
mapHeight: {
type: Number,
default: 300
}
},
data() {
return {
input: '',
address: '',
lnglat: [],
geocoderAddress: {}
}
},
methods: {
mapInit() {
map = new AMap.Map('container', {
resizeEnable: true,
zoom: 20
})
AMap.plugin(['AMap.PlaceSearch'], function() {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
pageIndex: 1, // 页码
citylimit: false, //是否强制限制在设置的城市内搜索
// panel: "panel", // 结果列表将在此容器中进行展示。
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
renderStyle: 'default'
})
})
// 添加列表点选监听事件
map.on('click', this.getAddress)
},
searchAddress() {
let _this = this
placeSearch.search(this.input, function(status, result) {
if (status === 'complete' && result.poiList.pois.length) {
let lnglat = result.poiList.pois[0].location
_this.getAddress(lnglat)
}
})
},
addMarker(lnglat) {
let position
if (lnglat.lng) {
position = [lnglat.lng, lnglat.lat]
} else {
position = lnglat
}
marker = new AMap.Marker({
icon: new AMap.Icon({
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
size: new AMap.Size(27, 34), //图标大小
imageSize: new AMap.Size(27, 34)
}),
position: position,
offset: new AMap.Pixel(-10, -10)
})
map.add(marker)
map.setFitView()
},
getAddress(e) {
let self = this
let lnglat
if (e.type == 'click') {
lnglat = e.lnglat
} else {
let { lng, lat } = e
lnglat = [lng, lat]
}
if (marker) {
marker.setMap(null)
marker = null
}
self.addMarker(lnglat)
AMap.plugin('AMap.Geocoder', () => {
const geocoder = new AMap.Geocoder()
geocoder.getAddress(lnglat, (status, result) => {
self.lnglat = lnglat
self.address = result.regeocode.formattedAddress
geocoder.getLocation(self.address, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
this.geocoderAddress = result.geocodes[0]
}
})
})
})
},
selectAddress(e) {
//这里获得点选地点的经纬度
this.getAddress()
}
},
mounted() {
this.mapInit()
}
}
</script>
<style scoped lang="scss">
.map-box {
position: relative;
width: 100%;
}
#container {
position: absolute;
height: 100%;
}
#panel {
position: absolute;
max-height: 90%;
overflow-y: auto;
top: 80px;
right: 10px;
width: 280px;
}
.map-address {
position: absolute;
line-height: 20px;
bottom: -30px;
}
</style>
...@@ -10,15 +10,15 @@ ...@@ -10,15 +10,15 @@
</div> </div>
<div class="account-body scrm-box-f"> <div class="account-body scrm-box-f">
<div class="form-title">账户信息</div> <div class="form-title">账户信息</div>
<el-form ref="accountInfoForm" :model="accountInfoForm" class="account-body-form" label-width="120px" :rules="accountInfoRules"> <el-form ref="accountInfoForm" :model="accountInfoForm" class="account-body-form" :rules="accountInfoRules">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上级商户"> <el-form-item label="上级商户:">
{{ accountDetail.merchantName }} {{ accountDetail.merchantName }}
</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="上级商户模式:">
{{ accountDetail.merchantModelName }} {{ accountDetail.merchantModelName }}
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<div class="el-form-item level-row is-required"> <div class="el-form-item level-row is-required">
<label class="el-form-item__label" style="width: 120px">账户等级</label> <label class="el-form-item__label">账户等级:</label>
<div class="el-form-item__content" style="margin-left: 120px"> <div class="el-form-item__content">
<el-select size="small" :disabled="nextStatus" v-model="accountDetail.merchantAccountLevel" placeholder="请选择"> <el-select size="small" :disabled="nextStatus" v-model="accountDetail.merchantAccountLevel" placeholder="请选择">
<el-option v-for="item in accountLevel" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in accountLevel" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select> </el-select>
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="登录账户名" prop="merchantLoginAccount"> <el-form-item label="登录账户名:" prop="merchantLoginAccount">
<el-input :disabled="nextStatus" size="small" maxlength="15" v-model="accountInfoForm.merchantLoginAccount" placeholder="请输入登录账户名"></el-input> <el-input :disabled="nextStatus" size="small" maxlength="15" v-model="accountInfoForm.merchantLoginAccount" placeholder="请输入登录账户名"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="登录密码" prop="merchantLoginPassword"> <el-form-item label="登录密码:" prop="merchantLoginPassword">
<el-input maxlength="20" :disabled="nextStatus" size="small" type="password" v-model="accountInfoForm.merchantLoginPassword" placeholder="请输入登录密码(必须包含6-20个字母+数字)" show-password></el-input> <el-input maxlength="20" :disabled="nextStatus" size="small" type="password" v-model="accountInfoForm.merchantLoginPassword" placeholder="请输入登录密码(必须包含6-20个字母+数字)" show-password></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<div data-v-995a4ff0="" class="el-form-item is-required"> <div data-v-995a4ff0="" class="el-form-item is-required">
<label for="merchantLoginAccount" class="el-form-item__label" style="width: 120px">账户类型</label> <label for="merchantLoginAccount" class="el-form-item__label">账户类型:</label>
<div class="el-form-item__content" style="margin-left: 120px"> <div class="el-form-item__content account-type">
<div data-v-995a4ff0="" class="el-input el-input--small"> <div data-v-995a4ff0="" class="el-input el-input--small">
<auto-button v-for="(item, index) in accountDetail.accountTypes" :key="index" :btnLabel="item.accounttypeName" :btnValue="item.accounttypeId" :stopClick="nextStatus" @getBtnStatus="getBtnStatus"></auto-button> <auto-button v-for="(item, index) in accountDetail.accountTypes" :key="index" :btnLabel="item.accounttypeName" :btnValue="item.accounttypeId" :stopClick="nextStatus" @getBtnStatus="getBtnStatus"></auto-button>
</div> </div>
...@@ -101,6 +101,12 @@ export default { ...@@ -101,6 +101,12 @@ export default {
callback() callback()
} }
} }
const validateAccountInfo = (rule, value, callback) => {
console.log(value)
if (value.length == 11 && !isNaN(value)) {
callback(new Error('登录账户名不可为 11 位纯数字'))
}
}
return { return {
editStatus: false, editStatus: false,
nextStatus: false, nextStatus: false,
...@@ -140,7 +146,8 @@ export default { ...@@ -140,7 +146,8 @@ export default {
accountInfoRules: { accountInfoRules: {
merchantLoginAccount: [ merchantLoginAccount: [
{ required: true, message: '请输入登录账户名', trigger: 'blur' }, { required: true, message: '请输入登录账户名', trigger: 'blur' },
{ min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur' } { min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur' },
{ validator: validateAccountInfo, trigger: 'blur' }
], ],
merchantLoginPassword: [ merchantLoginPassword: [
{ required: true, message: '请输入登录密码', trigger: 'blur' }, { required: true, message: '请输入登录密码', trigger: 'blur' },
...@@ -441,7 +448,6 @@ export default { ...@@ -441,7 +448,6 @@ export default {
padding-left: 20px; padding-left: 20px;
} }
&-form { &-form {
width: 80%;
margin: 20px auto; margin: 20px auto;
.form-row { .form-row {
/deep/ .el-form-item__content { /deep/ .el-form-item__content {
...@@ -574,4 +580,23 @@ export default { ...@@ -574,4 +580,23 @@ 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);
} }
/deep/ {
.el-form-item__content {
display: flex;
}
.el-form-item__label {
width: 154px !important;
}
.el-form-item__content {
width: 404px;
margin-left: 0 !important;
}
}
.account-type {
/deep/ {
.el-input {
min-width: 1000px !important;
}
}
}
</style> </style>
...@@ -3,115 +3,67 @@ ...@@ -3,115 +3,67 @@
<el-form ref="baseForm" :model="accountAddForm" class="account-body-form" label-width="120px" :rules="baseRules"> <el-form ref="baseForm" :model="accountAddForm" class="account-body-form" label-width="120px" :rules="baseRules">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="商户名称" prop="merchantName"> <el-form-item label="商户名称:" prop="merchantName">
<el-input size="small" v-model="accountAddForm.merchantName" :disabled="isEdit" placeholder="请输入商户名称"></el-input> <el-input size="small" v-model="accountAddForm.merchantName" :disabled="isEdit" placeholder="请输入商户名称"></el-input>
</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="商户简称:">
<el-input size="small" v-model="accountAddForm.merchantAbbreviation" placeholder="请输入商户简称"></el-input> <el-input size="small" v-model="accountAddForm.merchantAbbreviation" placeholder="请输入商户简称"></el-input>
</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">
<el-form-item label="联系电话" prop="merchantLegalPersonPhone"> <el-form-item label="联系电话:" prop="merchantLegalPersonPhone" style="margin-bottom:5px">
<el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input> <el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input>
<el-checkbox v-model="accountAddForm.isloginName">联系电话同时作为登录账户名</el-checkbox> <!-- <el-checkbox v-model="accountAddForm.isloginName">联系电话同时作为登录账户名</el-checkbox> -->
</el-form-item> </el-form-item>
<el-checkbox v-model="accountAddForm.isloginName" style="margin-left:154px;margin-bottom:20px">联系电话同时作为登录账户名</el-checkbox>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人"> <el-form-item label="联系人:">
<el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input> <el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>
<el-col :span="12">
<el-form-item size="small" label="商户类型" class="merchant-row">
<el-input v-model="accountAddForm.merchantOrgcode" placeholder="请输入组织机构号码" v-if="accountAddForm.merchantType == 2" maxlength="50">
<el-select v-model="accountAddForm.merchantType" slot="prepend" placeholder="请选择">
<el-option label="个人" :value="1"></el-option>
<el-option label="企业" :value="2"></el-option>
</el-select>
</el-input>
<el-input size="small" maxlength="18" class="card-input" v-model="accountAddForm.merchantOrgcode" placeholder="请输入正确的身份证号" v-if="accountAddForm.merchantType == 1">
<el-select v-model="accountAddForm.merchantType" slot="prepend" placeholder="请选择">
<el-option label="个人" :value="1"></el-option>
<el-option label="企业" :value="2"></el-option>
</el-select>
</el-input>
</el-form-item>
</el-col>
</el-row> -->
<el-row> <el-row>
<el-col :span="24">
<el-form-item size="small" label="商户地址" class="form-row">
<!-- 省市 -->
<ProvinceCity ref="provinceForm" @selectProvince="selectProvince" @selectCity="selectCity"></ProvinceCity>
<el-input readonly style="flex:1" v-model="accountAddForm.merchantAddress" placeholder="请选择商户地址"></el-input>
<el-button type="primary" class="form-btn" @click="hanleSelectMap">选择地址</el-button>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="merchantLegalPersonPhone"> <ProvinceCity ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel" @selectAddressByMap="selectAddressByMap"></ProvinceCity>
<el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input>
<el-checkbox v-model="accountAddForm.isloginName">联系电话同时作为登录账户名</el-checkbox>
</el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人"> <el-form-item label="驻店联系方式:">
<el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input> <el-input maxlength="11" size="small" v-model="accountAddForm.residentContact" placeholder="请输入驻店联系人"></el-input>
</el-form-item>
<el-form-item label=" " prop="residentPhone">
<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="12"> <el-col :span="12">
<el-form-item label="驻店联系人"> <el-form-item label="营业时间:" class="open-time">
<el-input maxlength="11" size="small" v-model="accountAddForm.residentContact" placeholder="请输入驻店联系人"></el-input> <el-time-picker size="small" value-format="HH:mm:ss" is-range v-model="accountAddForm.bussinessTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驻店电话" prop="residentPhone"> <el-form-item label="主营品牌:">
<el-input maxlength="13" size="small" class="phone-input" v-model="accountAddForm.residentPhone" placeholder="请输入驻店电话"></el-input> <select-brand :brandListTree="brandListTree" @clickBrand="clickBrand" ref="brandListTree"></select-brand>
</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="经营业务类型:" class="bussiness-type">
<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-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="营业时间" class="open-time">
<el-time-picker size="small" value-format="HH:mm:ss" is-range v-model="accountAddForm.bussinessTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</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">
<el-form-item label="主营品牌"> <el-form-item label="门店照片:" style="margin-bottom:5px">
<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-col>
<el-col :span="12">
<el-form-item label="门店照片">
<div class="store-upload-list"> <div class="store-upload-list">
<template v-if="accountAddForm.merchantFiles.length && accountAddForm.merchantFiles.length > 0"> <template v-if="accountAddForm.merchantFiles.length && accountAddForm.merchantFiles.length > 0">
<div :key="index" v-for="(item, index) in accountAddForm.merchantFiles" class="store-border" @mouseenter="imgIndex = index" @mouseleave="imgIndex = ''"> <div :key="index" v-for="(item, index) in accountAddForm.merchantFiles" class="store-border" @mouseenter="imgIndex = index" @mouseleave="imgIndex = ''">
...@@ -125,32 +77,22 @@ ...@@ -125,32 +77,22 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
</div> </div>
<div class="tips">图片格式仅支持JPG,PNG格式,大小1M</div>
</el-form-item> </el-form-item>
<div class="tips">图片格式仅支持JPG,PNG格式,大小1M</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<GLDialog :visible.sync="dialogMapVisible" title="选择地图">
<map-view ref="mapForm" :mapHeight="450"></map-view>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogMapVisible = false">取 消</el-button>
<el-button type="primary" @click="getAddress">确 定</el-button>
</span>
</GLDialog>
</div> </div>
</template> </template>
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
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' import ProvinceCity from '@/components/province-city/index.vue'
export default { export default {
name: 'base', name: 'base',
components: { components: {
ProvinceCity, ProvinceCity,
mapView,
SelectBrand SelectBrand
}, },
props: { props: {
...@@ -192,6 +134,8 @@ export default { ...@@ -192,6 +134,8 @@ export default {
} }
} }
return { return {
subdistrict: 2,
detailAddressLabel: ' ',
imgIndex: '', imgIndex: '',
filterText: '', filterText: '',
defaultProps: { defaultProps: {
...@@ -287,80 +231,26 @@ export default { ...@@ -287,80 +231,26 @@ export default {
if (!value) return true if (!value) return true
return data.label.indexOf(value) !== -1 return data.label.indexOf(value) !== -1
}, },
getAddress() {
if (!this.$refs.mapForm.address) {
this.$message.error('请选择地址')
return
}
this.accountAddForm.merchantAddress = this.$refs.mapForm.address
let lnglat = this.$refs.mapForm.lnglat
this.accountAddForm.lat = lnglat.lat
this.accountAddForm.lng = lnglat.lng
var fullAddress = ''
var provincecode = ''
if (this.$refs.mapForm.geocoderAddress.addressComponent) {
fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
provincecode = this.$refs.mapForm.geocoderAddress.adcode
this.addressData.fullAddress = fullAddress
this.addressData.provincecode = provincecode
} else {
fullAddress = this.addressData.fullAddress
provincecode = this.addressData.provincecode
}
// 获取省市
var province = ''
var city = ''
if (fullAddress) {
province = fullAddress.province
city = fullAddress.city ? fullAddress.city : fullAddress.district
} else {
province = this.accountAddForm.provinceName
city = this.accountAddForm.cityName
provincecode = this.accountAddForm.cityCode
}
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 // 当直接点击选择地址时,获取省市ID
init(province, city) { init(province, city) {
this.$refs.provinceForm.init(province, city) this.$refs.provinceForm.init(province, city)
}, },
// 获取省 // 获取省
selectProvince(provinceName, provinceCode) { selectProvince(val) {
console.log(val)
this.$set(this.accountAddForm, 'merchantAddress', '') this.$set(this.accountAddForm, 'merchantAddress', '')
// 强制更新 merchantAddress // 强制更新 merchantAddress
this.$forceUpdate() this.$forceUpdate()
this.accountAddForm.cityName = '' this.accountAddForm.cityName = ''
this.accountAddForm.provinceName = provinceName this.accountAddForm.provinceName = val.name
this.accountAddForm.provinceCode = provinceCode this.accountAddForm.provinceCode = val.adcode
}, },
// 获取市 // 获取市
selectCity(cityName, cityCode) { selectCity(val) {
if (cityName) { console.log(val)
this.accountAddForm.cityName = cityName if (val.name) {
this.accountAddForm.cityCode = cityCode this.accountAddForm.cityName = val.name
this.accountAddForm.cityCode = val.adcode
} else { } else {
this.accountAddForm.cityName = '' this.accountAddForm.cityName = ''
this.accountAddForm.cityCode = '' this.accountAddForm.cityCode = ''
...@@ -368,6 +258,16 @@ export default { ...@@ -368,6 +258,16 @@ export default {
this.$set(this.accountAddForm, 'merchantAddress', '') this.$set(this.accountAddForm, 'merchantAddress', '')
this.$forceUpdate() this.$forceUpdate()
}, },
// 通过地图选择省市和详细地址
selectAddressByMap(val) {
console.log(val)
const { provinceName, cityName, fullAddress, lat, lng } = val
this.accountAddForm.merchantAddress = fullAddress
this.accountAddForm.provinceName = provinceName
this.accountAddForm.cityName = cityName
this.accountAddForm.lat = lat
this.accountAddForm.lng = lng
},
delImg(index) { delImg(index) {
this.accountAddForm.merchantFiles.splice(index, 1) this.accountAddForm.merchantFiles.splice(index, 1)
}, },
...@@ -435,7 +335,7 @@ export default { ...@@ -435,7 +335,7 @@ export default {
} }
} }
.account-body-form { .account-body-form {
width: 80%; // width: 80%;
margin: 20px auto; margin: 20px auto;
.form-row { .form-row {
/deep/ .el-form-item__content { /deep/ .el-form-item__content {
...@@ -487,9 +387,9 @@ export default { ...@@ -487,9 +387,9 @@ export default {
} }
.image-uploader { .image-uploader {
/deep/ .el-upload { /deep/ .el-upload {
width: 120px; width: 104px;
height: 80px; height: 104px;
line-height: 80px; line-height: 104px;
} }
} }
.brand-tree { .brand-tree {
...@@ -514,6 +414,8 @@ export default { ...@@ -514,6 +414,8 @@ export default {
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 30px; line-height: 30px;
margin-left: 154px;
margin-bottom: 20px;
} }
.btn-unselect { .btn-unselect {
display: inline-block; display: inline-block;
...@@ -563,4 +465,35 @@ export default { ...@@ -563,4 +465,35 @@ export default {
} }
} }
} }
/deep/ {
.tree-box {
border: 1px solid #e5e5e5;
}
.el-checkbox:last-of-type {
margin-right: 7px;
}
}
.account-body-form {
/deep/ {
.el-form-item {
margin-bottom: 20px;
display: flex;
}
.el-form-item__label {
width: 154px !important;
}
.el-form-item__content {
width: 404px;
margin-left: 0 !important;
}
.select-input-box {
width: 404px;
}
}
}
.bussiness-type {
/deep/ .el-form-item__content {
min-width: 1000px;
}
}
</style> </style>
...@@ -566,11 +566,10 @@ export default { ...@@ -566,11 +566,10 @@ export default {
transform: translate(-50%, 0); transform: translate(-50%, 0);
} }
.merchantDetail { .merchantDetail {
padding-bottom: 60px;
.titles { .titles {
display: flex; display: flex;
margin-bottom: 20px; margin-bottom: 20px;
cursor: pointer;
.itemTitle { .itemTitle {
margin-right: 20px; margin-right: 20px;
list-style-type: none; list-style-type: none;
......
...@@ -90,6 +90,12 @@ export default { ...@@ -90,6 +90,12 @@ export default {
callback() callback()
} }
} }
const validateAccountInfo = (rule, value, callback) => {
console.log(value)
if (value.length == 11 && !isNaN(value)) {
callback(new Error('登录账户名不可为 11 位纯数字'))
}
}
return { return {
editStatus: false, editStatus: false,
detailFirst: {}, detailFirst: {},
...@@ -143,7 +149,11 @@ export default { ...@@ -143,7 +149,11 @@ export default {
businessOption: [], businessOption: [],
accountValidityPeriod: [], accountValidityPeriod: [],
baseRules: { baseRules: {
merchantName: [{ required: true, message: '请输入商户名称', trigger: 'blur' }], merchantName: [
{ required: true, message: '请输入商户名称', trigger: 'blur' },
{ min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur' },
{ validator: validateAccountInfo, trigger: 'blur' }
],
merchantLegalPersonPhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }] merchantLegalPersonPhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }]
}, },
accountInfoRules: { accountInfoRules: {
...@@ -434,7 +444,14 @@ export default { ...@@ -434,7 +444,14 @@ export default {
merchantBrandMain merchantBrandMain
}) })
// 省市回显 // 省市回显
this.$refs.baseInfoForm.init(this.accountAddForm.provinceName, this.accountAddForm.cityName) var provinceData = {
province: this.accountAddForm.provinceName,
city: this.accountAddForm.cityName,
fullAddress: this.accountAddForm.merchantAddress,
lng: this.accountAddForm.lng,
lat: this.accountAddForm.lat
}
this.$refs.baseInfoForm.init(provinceData)
if (!this.accountAddForm.merchantBrandMain) { if (!this.accountAddForm.merchantBrandMain) {
this.accountAddForm.merchantBrandMain = [] this.accountAddForm.merchantBrandMain = []
} else { } else {
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</div> </div>
</div> </div>
</div> </div>
<GLFooter style="z-index: 2"> <GLFooter>
<el-button type="primary" @click="handleCancel">返回</el-button> <el-button type="primary" @click="handleCancel">返回</el-button>
</GLFooter> </GLFooter>
</div> </div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-04-28 10:15:34 * @Date: 2022-04-28 10:15:34
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-07-19 17:54:00 * @LastEditTime: 2022-08-23 15:47:23
--> -->
<template> <template>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<el-radio-group v-model="checkObj.first" @change="selectChange"> <el-radio-group v-model="checkObj.first" @change="selectChange">
<div class="tree-item" v-for="item in departmentList" :key="item.departmentId" @click.self="toNext(item, $event)"> <div class="tree-item" v-for="item in departmentList" :key="item.departmentId" @click.self="toNext(item, $event)">
<el-radio :label="item" :disabled="item.relevanceMerchant">{{ item.departmentName }}</el-radio> <el-radio :label="item" :disabled="item.relevanceMerchant">{{ item.departmentName }}</el-radio>
<i v-show="item.childrenNum" class="el-icon-arrow-right"></i> <i v-show="item.childrenNum" class="el-icon-arrow-right" @click="toNext(item, $event)"></i>
</div> </div>
</el-radio-group> </el-radio-group>
</div> </div>
...@@ -152,10 +152,22 @@ export default { ...@@ -152,10 +152,22 @@ export default {
overflow: auto; overflow: auto;
.el-radio-group { .el-radio-group {
width: 100%; width: 100%;
.el-radio {
margin-right: 0;
// width: 100%;
padding: 15px 0 11px;
}
.el-icon-arrow-right {
position: absolute;
top: 56%;
right: 0;
transform: translateY(-50%);
}
} }
} }
&-item { &-item {
padding: 15px 0 11px; position: relative;
// padding: 15px 0 11px;
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
width: 100%; width: 100%;
display: flex; display: flex;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-04-28 10:15:34 * @Date: 2022-04-28 10:15:34
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-07-19 17:54:58 * @LastEditTime: 2022-08-23 15:48:39
--> -->
<template> <template>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<el-radio-group v-model="checkObj.first" @change="selectChange"> <el-radio-group v-model="checkObj.first" @change="selectChange">
<div class="tree-item" v-for="item in merchantList" :key="item.merchantId" @click.self="toNext(item, $event)"> <div class="tree-item" v-for="item in merchantList" :key="item.merchantId" @click.self="toNext(item, $event)">
<el-radio :label="item" :disabled="item.childrenNms || item.entmicroName">{{ item.merchantName }}</el-radio> <el-radio :label="item" :disabled="item.childrenNms || item.entmicroName">{{ item.merchantName }}</el-radio>
<i v-show="item.childrenNms" class="el-icon-arrow-right"></i> <i v-show="item.childrenNms" class="el-icon-arrow-right" @click="toNext(item, $event)"></i>
</div> </div>
</el-radio-group> </el-radio-group>
</div> </div>
...@@ -150,10 +150,22 @@ export default { ...@@ -150,10 +150,22 @@ export default {
overflow: auto; overflow: auto;
.el-radio-group { .el-radio-group {
width: 100%; width: 100%;
.el-radio {
margin-right: 0;
// width: 100%;
padding: 15px 0 11px;
}
.el-icon-arrow-right {
position: absolute;
top: 56%;
right: 0;
transform: translateY(-50%);
}
} }
} }
&-item { &-item {
padding: 15px 0 11px; position: relative;
// padding: 15px 0 11px;
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
width: 100%; width: 100%;
display: flex; display: flex;
......
...@@ -11,43 +11,44 @@ ...@@ -11,43 +11,44 @@
<div class="main-information"> <div class="main-information">
<div class="information-title">修改企业信息</div> <div class="information-title">修改企业信息</div>
<div class="information-form-box"> <div class="information-form-box">
<el-form ref="baseForm" :model="infoForm" class="account-body-form" label-width="120px" :rules="baseFormRules"> <el-form ref="baseForm" :model="infoForm" class="account-body-form" label-width="154px" :rules="baseFormRules">
<el-form-item size="small" label="商户地址" class="map-row"> <Province ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" @selectAddressByMap="selectAddressByMap" :detailAddressLabel="detailAddressLabel"></Province>
<!-- <el-form-item size="small" label="商户地址:" class="map-row">
<Province ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity"></Province> <Province ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity"></Province>
<el-input class="input-width" 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="经营业务类型:">
<el-checkbox-group v-model="infoForm.businessType"> <el-checkbox-group v-model="infoForm.businessType">
<el-checkbox :label="item.dictValue" v-for="item in businessType" :key="item.dictValue" :disabled="item.dictValue <= 6">{{ item.dictLabel }}</el-checkbox> <el-checkbox :label="item.dictValue" v-for="item in businessType" :key="item.dictValue" :disabled="item.dictValue <= 6">{{ item.dictLabel }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<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" prop="residentPhone"> <el-form-item size="small" label="驻店电话:" style="position: relative" prop="residentPhone">
<el-input v-model="infoForm.residentPhone" class="phone-input" maxlength="13" placeholder="此电话会在小程序上显示,请填写真实有效的电话或手机号"></el-input> <el-input v-model="infoForm.residentPhone" class="phone-input" maxlength="13" 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" @clickBrand="clickBrand" 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>
<GLDialog :visible.sync="dialogMapVisible" :mode="'big'" bigTitle="选择地址"> <!-- <GLDialog :visible.sync="dialogMapVisible" :mode="'big'" bigTitle="选择地址">
<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">
<el-button @click="dialogMapVisible = false">取 消</el-button> <el-button @click="dialogMapVisible = false">取 消</el-button>
<el-button type="primary" @click="getAddress">确 定</el-button> <el-button type="primary" @click="getAddress">确 定</el-button>
</span> </span>
</GLDialog> </GLDialog> -->
<!-- <GLFooter style="z-index: 2"> <!-- <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> -->
<TelPosition ref="telDialog" :visible.sync="dialogTelVisible"></TelPosition> <TelPosition ref="telDialog" :visible.sync="dialogTelVisible"></TelPosition>
</div> </div>
<GLFooter style="z-index: 2"> <GLFooter>
<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>
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
<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 './selectBrand.vue' import SelectBrand from './selectBrand.vue'
import TelPosition from './telPosition.vue' import TelPosition from './telPosition.vue'
import Province from '@/components/province-city/index.vue' import Province from '@/components/province-city/index.vue'
...@@ -64,7 +65,7 @@ export default { ...@@ -64,7 +65,7 @@ export default {
name: 'EditInfo', name: 'EditInfo',
components: { components: {
Province, Province,
mapView, // mapView,
SelectBrand, SelectBrand,
TelPosition TelPosition
}, },
...@@ -83,6 +84,7 @@ export default { ...@@ -83,6 +84,7 @@ export default {
} }
return { return {
subdistrict: 2, subdistrict: 2,
detailAddressLabel: ' ',
checkedAll: false, checkedAll: false,
filterText: '', filterText: '',
dialogMapVisible: false, dialogMapVisible: false,
...@@ -107,7 +109,7 @@ export default { ...@@ -107,7 +109,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.$refs.provinceForm.provinceList() // this.$refs.provinceForm.provinceList()
this.getUserInfo() this.getUserInfo()
}, },
methods: { methods: {
...@@ -155,7 +157,14 @@ export default { ...@@ -155,7 +157,14 @@ export default {
this.infoForm.businessType = businessType.map(item => (item = parseInt(item))) this.infoForm.businessType = businessType.map(item => (item = parseInt(item)))
} }
// 省市回显 // 省市回显
this.$refs.provinceForm.init(this.infoForm.provinceName, this.infoForm.cityName) var provinceData = {
province: this.infoForm.provinceName,
city: this.infoForm.cityName,
fullAddress: this.infoForm.merchantAddress,
lng: this.infoForm.lng,
lat: this.infoForm.lat
}
this.$refs.provinceForm.init(provinceData)
if (!this.infoForm.merchantBrandMain) { if (!this.infoForm.merchantBrandMain) {
this.infoForm.merchantBrandMain = [] this.infoForm.merchantBrandMain = []
} else { } else {
...@@ -179,80 +188,90 @@ export default { ...@@ -179,80 +188,90 @@ export default {
} }
}) })
}, },
getAddress() { // getAddress() {
if (!this.$refs.mapForm.address) { // if (!this.$refs.mapForm.address) {
this.$message.error('请选择地址') // this.$message.error('请选择地址')
return // return
} // }
this.infoForm.merchantAddress = this.$refs.mapForm.address // this.infoForm.merchantAddress = this.$refs.mapForm.address
let lnglat = this.$refs.mapForm.lnglat // let lnglat = this.$refs.mapForm.lnglat
this.infoForm.lat = lnglat.lat // this.infoForm.lat = lnglat.lat
this.infoForm.lng = lnglat.lng // this.infoForm.lng = lnglat.lng
var fullAddress = '' // var fullAddress = ''
var provincecode = '' // var provincecode = ''
if (this.$refs.mapForm.geocoderAddress.addressComponent) { // if (this.$refs.mapForm.geocoderAddress.addressComponent) {
fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent // fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
provincecode = this.$refs.mapForm.geocoderAddress.adcode // provincecode = this.$refs.mapForm.geocoderAddress.adcode
this.addressData.fullAddress = fullAddress // this.addressData.fullAddress = fullAddress
this.addressData.provincecode = provincecode // this.addressData.provincecode = provincecode
// this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent // // this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
// this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode // // this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode
} else { // } else {
fullAddress = this.addressData.fullAddress // fullAddress = this.addressData.fullAddress
provincecode = this.addressData.provincecode // provincecode = this.addressData.provincecode
} // }
// 获取省市 // // 获取省市
var province = '' // var province = ''
var city = '' // var city = ''
if (fullAddress) { // if (fullAddress) {
province = fullAddress.province // province = fullAddress.province
city = fullAddress.city ? fullAddress.city : fullAddress.district // city = fullAddress.city ? fullAddress.city : fullAddress.district
} else { // } else {
province = this.infoForm.provinceName // province = this.infoForm.provinceName
city = this.infoForm.cityName // city = this.infoForm.cityName
provincecode = this.infoForm.cityCode // provincecode = this.infoForm.cityCode
} // }
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] // const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == province) // var municipality = municipalities.find(item => item == province)
if (municipality) { // if (municipality) {
city = city.slice(0, 2) + '城区' // city = city.slice(0, 2) + '城区'
if (municipality === '重庆市') { // if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4) // provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县') // provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县')
} // }
} // }
// 判断省市是否匹配 // // 判断省市是否匹配
if (this.infoForm.provinceName) { // if (this.infoForm.provinceName) {
if (this.infoForm.provinceName !== province && this.infoForm.cityName !== city) { // if (this.infoForm.provinceName !== province && this.infoForm.cityName !== city) {
this.$message.error('您选择的地址错误,请重新选择') // this.$message.error('您选择的地址错误,请重新选择')
this.infoForm.merchantAddress = '' // this.infoForm.merchantAddress = ''
return // return
} // }
} // }
this.dialogMapVisible = false // this.dialogMapVisible = false
this.infoForm.provinceName = province // this.infoForm.provinceName = province
this.infoForm.cityName = city // this.infoForm.cityName = city
// 当直接点击选择地址时,获取省市ID // // 当直接点击选择地址时,获取省市ID
this.$refs.provinceForm.init(province, city) // this.$refs.provinceForm.init(province, city)
}, // },
// 获取省 // 获取省
selectProvince(provinceName, provinceCode) { selectProvince(val) {
this.infoForm.merchantAddress = '' this.infoForm.merchantAddress = ''
this.infoForm.cityName = '' this.infoForm.cityName = ''
this.infoForm.provinceName = provinceName this.infoForm.provinceName = val.name
this.infoForm.provinceCode = provinceCode this.infoForm.provinceCode = val.adcode
}, },
// 获取市 // 获取市
selectCity(cityName, cityCode) { selectCity(val) {
if (cityName) { if (val.name) {
this.infoForm.cityName = cityName this.infoForm.cityName = val.name
this.infoForm.cityCode = cityCode this.infoForm.cityCode = val.adcode
} else { } else {
this.infoForm.cityName = '' this.infoForm.cityName = ''
this.infoForm.cityCode = '' this.infoForm.cityCode = ''
} }
this.infoForm.merchantAddress = '' this.infoForm.merchantAddress = ''
}, },
// 通过地图选择省市和详细地址
selectAddressByMap(val) {
console.log(val)
const { provinceName, cityName, fullAddress, lat, lng } = val
this.infoForm.merchantAddress = fullAddress
this.infoForm.provinceName = provinceName
this.infoForm.cityName = cityName
this.infoForm.lat = lat
this.infoForm.lng = lng
},
// 展示驻点电话弹框 // 展示驻点电话弹框
showTelDia() { showTelDia() {
this.$refs.telDialog.init(this.infoForm.residentPhone) this.$refs.telDialog.init(this.infoForm.residentPhone)
...@@ -309,6 +328,7 @@ export default { ...@@ -309,6 +328,7 @@ export default {
background: #ffffff; background: #ffffff;
border-radius: 2px; border-radius: 2px;
min-height: calc(100% - 80px); min-height: calc(100% - 80px);
margin-bottom: 20px;
.information-title { .information-title {
height: 58px; height: 58px;
line-height: 58px; line-height: 58px;
...@@ -349,4 +369,15 @@ export default { ...@@ -349,4 +369,15 @@ export default {
// min-width: 200px; // min-width: 200px;
flex: 1; flex: 1;
} }
/deep/ {
.el-form-item__content {
width: 432px;
}
.tree-box {
border: 1px solid #e5e5e5;
}
.el-checkbox:last-of-type {
margin-right: 7px;
}
}
</style> </style>
...@@ -5,23 +5,23 @@ ...@@ -5,23 +5,23 @@
</div> --> </div> -->
<div class="container edit-box"> <div class="container edit-box">
<p class="edit-title">员工基本信息</p> <p class="edit-title">员工基本信息</p>
<glsx-combi-form style="margin: 20px 20px 0 0" ref="editFormRef" defaultWidth="320px" @handleImgDelete="handleImgDelete" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :label-width="'154px'" :formData="editFormData" :formRules="editRule" isEdit="true"> <glsx-combi-form style="margin: 20px 20px 0 0" ref="editFormRef" @handleImgDelete="handleImgDelete" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule" isEdit="true" class="gl-form-page">
<template slot="merchantId" slot-scope="item"> <template slot="merchantId" slot-scope="item">
<span class="txt-ellipsis" v-if="routeInfo.addOrEdit == 2 || (routeInfo.addOrEdit == 1 && userInfo.accountLevel == 4)" :title="editForm.merchantName">{{ editForm.merchantName }}</span> <span class="txt-ellipsis" v-if="routeInfo.addOrEdit == 2 || (routeInfo.addOrEdit == 1 && userInfo.accountLevel == 4)" :title="editForm.merchantName">{{ editForm.merchantName }}</span>
<el-select v-else :style="{ width: item.scope.width }" v-model="editForm[item.scope.name]" :clearable="item.scope.isClear || false" :placeholder="'请选择' + item.scope.label" :filterable="!item.scope.noFilter" @change="handleChangeMerchant($event)"> <el-select v-else v-model="editForm[item.scope.name]" :clearable="item.scope.isClear || false" :placeholder="'请选择' + item.scope.label" :filterable="!item.scope.noFilter" @change="handleChangeMerchant($event)">
<el-option v-for="subItem in baseData.allMerchantList" :key="subItem[item.scope.optionId]" :label="subItem[item.scope.optionLabel]" :value="subItem[item.scope.optionId]"></el-option> <el-option v-for="subItem in baseData.allMerchantList" :key="subItem[item.scope.optionId]" :label="subItem[item.scope.optionLabel]" :value="subItem[item.scope.optionId]"></el-option>
</el-select> </el-select>
<!-- <select-page v-else :form="editForm" width="320" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page> --> <!-- <select-page v-else :form="editForm" width="320" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page> -->
</template> </template>
<template v-if="routeInfo.addOrEdit == 2" slot="passwordSlot"> <template v-if="routeInfo.addOrEdit == 2" slot="passwordSlot">
<el-button class="m-l-10" type="primary" @click="handleResetPass">重置密码</el-button> <el-button class="m-l-10" type="text" @click="handleResetPass">重置密码</el-button>
</template> </template>
<template v-if="userInfo.accountLevel == 4 && routeInfo.addOrEdit == 1" slot="roleIdsSlot"> <template v-if="userInfo.accountLevel == 4 && routeInfo.addOrEdit == 1" slot="roleIdsSlot">
<el-button type="text" @click="handleJumpRole">添加角色</el-button> <el-button type="text" @click="handleJumpRole">添加角色</el-button>
<!-- <el-button class="m-l-10 el-icon-refresh" type="primary" @click="handleRefresh">刷新</el-button> --> <!-- <el-button class="m-l-10 el-icon-refresh" type="primary" @click="handleRefresh">刷新</el-button> -->
</template> </template>
<template slot="visibleInferiorMer" slot-scope="item"> <template slot="visibleInferiorMer">
<el-input :style="{ width: item.width || '320px' }" placeholder="可见商户" v-model="filterText"></el-input> <el-input placeholder="可见商户" v-model="filterText"></el-input>
<el-button class="m-l-10" type="primary" @click="checkAll">{{ isCheckAll ? '全不选' : '全选' }}</el-button> <el-button class="m-l-10" type="primary" @click="checkAll">{{ isCheckAll ? '全不选' : '全选' }}</el-button>
<el-tree v-show="baseData.merchantTree.length != 0" show-checkbox check-on-click-node check-strictly class="filter-tree" node-key="id" :data="baseData.merchantTree" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @check="handleClickNode"></el-tree> <el-tree v-show="baseData.merchantTree.length != 0" show-checkbox check-on-click-node check-strictly class="filter-tree" node-key="id" :data="baseData.merchantTree" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @check="handleClickNode"></el-tree>
</template> </template>
...@@ -130,11 +130,10 @@ export default { ...@@ -130,11 +130,10 @@ export default {
isBlock: true, isBlock: true,
editFormData: [ editFormData: [
{ {
label: '所属商户:', label: '所属商户:',
name: 'merchantId', name: 'merchantId',
type: 'selectInput', type: 'selectInput',
noClearable: true, noClearable: true,
width: '320px',
optionList: [], optionList: [],
optionId: 'id', optionId: 'id',
optionLabel: 'merchantName', optionLabel: 'merchantName',
...@@ -143,36 +142,40 @@ export default { ...@@ -143,36 +142,40 @@ export default {
placeholder: '请选择所属商户' placeholder: '请选择所属商户'
}, },
{ {
label: '员工姓名:', label: '员工姓名:',
name: 'staffName', name: 'staffName',
type: 'input', type: 'input',
maxlength: 15, maxlength: 15,
placeholder: '请输入员工姓名' placeholder: '请输入员工姓名',
width: 432
}, },
{ {
label: '登录手机号:', label: '登录手机号:',
name: 'staffPhone', name: 'staffPhone',
type: 'input', type: 'input',
placeholder: '请输入您有效的手机号作为登录账户', placeholder: '请输入您有效的手机号作为登录账户',
maxlength: 11, maxlength: 11,
isDisabled: false isDisabled: false,
width: 432
}, },
{ {
label: '登录密码:', label: '登录密码:',
name: 'password', name: 'password',
showPass: true, showPass: true,
type: 'input', type: 'input',
maxlength: 20, maxlength: 20,
suffixSlot: 'passwordSlot', suffixSlot: 'passwordSlot',
placeholder: '请输入登录密码' placeholder: '请输入登录密码',
width: 432
}, },
{ {
label: '可见商户:', label: '可见商户:',
name: 'visibleInferiorMer', name: 'visibleInferiorMer',
addHtml: 'visibleInferiorMer' addHtml: 'visibleInferiorMer',
width: 432
}, },
{ {
label: '角色权限:', label: '角色权限:',
name: 'roleIds', name: 'roleIds',
type: 'select', type: 'select',
optionList: [], optionList: [],
...@@ -182,7 +185,7 @@ export default { ...@@ -182,7 +185,7 @@ export default {
suffixSlot: 'roleIdsSlot' suffixSlot: 'roleIdsSlot'
}, },
{ {
label: '头像:', label: '头像:',
name: 'merchantImg', name: 'merchantImg',
type: 'upload', type: 'upload',
maxPhotoNum: 1, maxPhotoNum: 1,
...@@ -202,18 +205,20 @@ export default { ...@@ -202,18 +205,20 @@ export default {
} }
}, },
{ {
label: '邮箱:', label: '邮箱:',
name: 'staffEmail', name: 'staffEmail',
type: 'input', type: 'input',
maxlength: 30, maxlength: 30,
placeholder: '请输入邮箱' placeholder: '请输入邮箱',
width: 432
}, },
{ {
label: '主要职务:', label: '主要职务:',
name: 'staffJob', name: 'staffJob',
type: 'input', type: 'input',
maxlength: 10, maxlength: 10,
placeholder: '请输入主要职务' placeholder: '请输入主要职务',
width: 432
} }
], ],
baseData: { baseData: {
......
...@@ -445,7 +445,7 @@ export default { ...@@ -445,7 +445,7 @@ export default {
// this.$refs.employeeRef.setTableHeightFun() // this.$refs.employeeRef.setTableHeightFun()
// } // }
this.$refs.employeeRef.data.length ? (this.$refs.employeeRef.tableHeightValues = '') : this.$refs.employeeRef.setTableHeightFun() this.$refs.employeeRef.data.length ? (this.$refs.employeeRef.tableHeightValues = '') : this.$refs.employeeRef.setTableHeightFun()
this.$refs.employeeRef.$refs.employeeListMutiTable.clearSelection() // this.$refs.employeeRef.$refs.employeeListMutiTable.clearSelection()
}, },
handleDetail(row) { handleDetail(row) {
this.$router.push('/employee/detailEmployee/' + row.id) this.$router.push('/employee/detailEmployee/' + row.id)
......
...@@ -193,7 +193,6 @@ export default { ...@@ -193,7 +193,6 @@ export default {
arr.forEach(item => { arr.forEach(item => {
accounttypeId.push(item.accounttypeId) accounttypeId.push(item.accounttypeId)
this.accountList.forEach((itm, index) => { this.accountList.forEach((itm, index) => {
console.log(accounttypeId)
if (accounttypeId.includes(itm.accounttypeId)) { if (accounttypeId.includes(itm.accounttypeId)) {
this.tabMenu[index] = itm this.tabMenu[index] = itm
if (!item.productList) { if (!item.productList) {
...@@ -283,7 +282,6 @@ export default { ...@@ -283,7 +282,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)
...@@ -397,7 +395,6 @@ export default { ...@@ -397,7 +395,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,
...@@ -429,10 +426,7 @@ export default { ...@@ -429,10 +426,7 @@ export default {
return this.accountTypes return this.accountTypes
} }
}, },
mounted() { mounted() {}
// this.accountTypeSearchRequest();
// this.findPermissionsByMerId()
}
} }
</script> </script>
......
...@@ -4,24 +4,24 @@ ...@@ -4,24 +4,24 @@
<div class="top_title_widget"> <div class="top_title_widget">
<span class="title">{{ pageName }}</span> <span class="title">{{ pageName }}</span>
</div> </div>
<div class="main_widget"> <div class="main_widget gl-form-page">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="154px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="154px" 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="merchantChange"> <el-select size="small" 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>
<el-form-item label="所属商户:" prop="merchantName" v-if="pageType == 'create' && accountLevel == 4"> <el-form-item label="所属商户:" prop="merchantName" v-if="pageType == 'create' && accountLevel == 4">
<el-input size="small" disabled style="width: 40%" v-model="ruleForm.merchantName"></el-input> <el-input size="small" disabled v-model="ruleForm.merchantName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属商户:" prop="merchantName" v-if="pageType == 'edit'"> <el-form-item label="所属商户:" prop="merchantName" v-if="pageType == 'edit'">
<el-input size="small" disabled style="width: 40%" v-model="ruleForm.merchantName"></el-input> <el-input size="small" disabled v-model="ruleForm.merchantName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="角色名称:" prop="roleName"> <el-form-item label="角色名称:" prop="roleName">
<el-input size="small" maxlength="20" style="width: 40%; padding-right: 50px" @input="changeInput" v-model="ruleForm.roleName" placeholder="请输入角色名称"></el-input> <el-input size="small" maxlength="20" @input="changeInput" v-model="ruleForm.roleName" placeholder="请输入角色名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="角色说明:" prop="roleDesc"> <el-form-item label="角色说明:" prop="roleDesc">
<el-input type="textarea" :rows="2" size="small" maxlength="50" style="width: 40%; padding-right: 50px" @input="changeInput" v-model="ruleForm.roleDesc" placeholder="请输入角色说明"></el-input> <el-input type="textarea" :rows="2" size="small" maxlength="50" @input="changeInput" v-model="ruleForm.roleDesc" placeholder="请输入角色说明"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="角色权限" prop="roleRoot"> <!-- <el-form-item label="角色权限" prop="roleRoot">
<div class="custom_element"> <div class="custom_element">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!