Commit 9f49d5f2 by 前端

commit:车牌组件修改

1 parent 69256aaf
.sprite-icon { background-image: url(../images/sprite.png);background-size: 165px 150px;}
.icon-active { width: 20px; height: 20px; background-position: -106px -96px;}
.icon-append { width: 32px; height: 32px; background-position: 0px -54px;}
.icon-appoint { width: 32px; height: 32px; background-position: -42px -54px;}
.icon-arrow { width: 7px; height: 11px; background-position: -84px -54px;}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 186px 148px;}
.icon-active { width: 20px; height: 20px; background-position: -72px -96px;}
.icon-append { width: 32px; height: 32px; background-position: -54px 0px;}
.icon-appoint { width: 32px; height: 32px; background-position: 0px -54px;}
.icon-arrow { width: 7px; height: 11px; background-position: -168px -24px;}
.icon-avatar { width: 44px; height: 44px; background-position: 0px 0px;}
.icon-customer-active { width: 16px; height: 16px; background-position: -142px -130px;}
.icon-customer-add { width: 28px; height: 20px; background-position: -68px -96px;}
.icon-customer-copy { width: 18px; height: 20px; background-position: 0px -130px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -145px 0px;}
.icon-factory { width: 32px; height: 32px; background-position: -103px 0px;}
.icon-fail { width: 24px; height: 24px; background-position: 0px -96px;}
.icon-fllow { width: 18px; height: 18px; background-position: -58px -130px;}
.icon-follow { width: 32px; height: 32px; background-position: -103px -42px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -145px -30px;}
.icon-identifier { width: 20px; height: 20px; background-position: -145px -60px;}
.icon-maintant { width: 20px; height: 20px; background-position: -145px -90px;}
.icon-message { width: 18px; height: 18px; background-position: -86px -130px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -84px -75px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: -28px -130px;}
.icon-succeed { width: 24px; height: 24px; background-position: -34px -96px;}
.icon-tel { width: 18px; height: 18px; background-position: -114px -130px;}
.icon-delete { width: 39px; height: 30px; background-position: -54px 0px;}
\ No newline at end of file
.icon-customer-active { width: 16px; height: 16px; background-position: -114px -130px;}
.icon-customer-add { width: 28px; height: 20px; background-position: -34px -96px;}
.icon-customer-copy { width: 18px; height: 20px; background-position: -138px -90px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -102px -96px;}
.icon-factory { width: 32px; height: 32px; background-position: -42px -54px;}
.icon-fail { width: 24px; height: 24px; background-position: -96px -42px;}
.icon-fllow { width: 18px; height: 18px; background-position: -30px -130px;}
.icon-follow { width: 32px; height: 32px; background-position: -96px 0px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -138px 0px;}
.icon-identifier { width: 20px; height: 20px; background-position: -138px -30px;}
.icon-maintant { width: 20px; height: 20px; background-position: -138px -60px;}
.icon-message { width: 18px; height: 18px; background-position: -58px -130px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -168px -45px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: 0px -130px;}
.icon-succeed { width: 24px; height: 24px; background-position: 0px -96px;}
.icon-tel { width: 18px; height: 18px; background-position: -86px -130px;}
.icon-delete { width: 18px; height: 14px; background-position: -168px 0px;}
.icon-tip { width: 16px; height: 16px; background-position: -140px -130px;}
\ No newline at end of file

38.8 KB | W: | H:

39.5 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

2.11 KB | W: | H:

885 Bytes | W: | H:

src/assets/spritesmith/delete.png
src/assets/spritesmith/delete.png
src/assets/spritesmith/delete.png
src/assets/spritesmith/delete.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -31,7 +31,7 @@
<div class="bor">
<div class="btns">
<button type="primary" size="small" plain @click="hiddenKeybord">取消</button>
<button type="primary" size="small" plain @click="enterWord">确认</button>
<button type="primary" class="success" size="small" plain @click="enterWord">完成</button>
</div>
<ul class="keyboard province" id="province" v-if="plateInput.input.dialogVisible && plateInput.input.type === 'p1'">
<li v-for="i in Keyboard.province" @click.stop="clickKeyboard(i)" :key="i">{{ i }}</li>
......@@ -41,7 +41,19 @@
</li>
</ul>
<ul class="keyboard province" id="number" v-if="plateInput.input.dialogVisible && plateInput.input.type !== 'p1'">
<li :key="i" v-for="i in Keyboard.number" :class="{ num: plateInput.input.type === 'p2' && parseInt(i) >= 0 && parseInt(i) <= 9 }" @click.stop="clickKeyboard(i)">{{ i }}</li>
<li
:key="i"
v-for="i in Keyboard.number"
:class="{
num:
(plateInput.input.type === 'p2' && parseInt(i) >= 0 && parseInt(i) <= 9) ||
(['学', '港', '澳', '挂'].includes(i) && ['p1', 'p2', 'p3', 'p4', 'p5', 'p6'].includes(plateInput.input.type)),
lastBtn: lastBtn
}"
@click.stop="clickKeyboard(i)"
>
{{ i }}
</li>
<li class="delete deletes" @click.stop="clickDelete">
<div class="sprite-icon icon-delete"></div>
<!-- 删 -->
......@@ -53,7 +65,7 @@
</template>
<script>
export default {
name:'PlatNum',
name: 'PlatNum',
data() {
return {
currentPlate: undefined,
......@@ -63,7 +75,7 @@ export default {
p1: '',
p2: '',
p3: '',
p4:'',
p4: '',
p5: '',
p6: '',
p7: '',
......@@ -76,43 +88,36 @@ export default {
Keyboard: {
province: [
'京',
'粤',
'津',
'冀',
'晋',
'冀',
'蒙',
'辽',
'吉',
'黑',
'沪',
'渝',
'苏',
'浙',
'皖',
'闽',
'赣',
'鲁',
'豫',
'鄂',
'湘',
'粤',
'沪',
'宁',
'桂',
'琼',
'渝',
'川',
'贵',
'云',
'藏',
'陕',
'甘',
'青',
'宁',
'新',
'台',
'港',
'澳',
'使',
'领',
'警',
'学'
'豫',
'湘',
'青',
'甘'
],
number: [
'0',
......@@ -149,11 +154,13 @@ export default {
'X',
'Y',
'Z',
// '学',
// '港',
// '澳'
'学',
'港',
'澳',
'挂'
]
}
},
lastBtn: false
}
},
props: ['name', 'plateNumber', 'noRightPart'],
......@@ -163,7 +170,6 @@ export default {
return this.plateNumber || ''
},
set(val) {
console.log(val,'3333')
this.$emit('update:plateNumber', val)
}
}
......@@ -171,17 +177,33 @@ export default {
methods: {
clickInput(type) {
this.plateInput.input.type = type
let val = this.plateInput.input.value['p' + (Number(type.split('')[1]) - 1)]
if (['学', '港', '澳', '挂'].includes(val) && this.plateInput.input.type == 'p8') {
this.lastBtn = true
} else {
this.lastBtn = false
}
this.plateInput.input.dialogVisible = true
},
hiddenKeybord() {
this.plateInput.input.dialogVisible = false
},
enterWord() {
// this.plateInput.input.dialogVisible = false
// console.log()
this.$emit('updateChange',this.plateInput.input.value)
this.$emit('updateChange', this.plateInput.input.value)
},
clickKeyboard(val) {
if (this.plateInput.input.type === 'p2' && parseInt(val) >= 0 && parseInt(val) <= 9) {
return
}
if (['学', '港', '澳', '挂'].includes(val) && ['p1', 'p2', 'p3', 'p4', 'p5', 'p6'].includes(this.plateInput.input.type)) {
return
}
if (['学', '港', '澳', '挂'].includes(val) && this.plateInput.input.type == 'p7') {
this.lastBtn = true
}
if (this.lastBtn && this.plateInput.input.type == 'p8') {
return
}
this.plateInput.input.value[this.plateInput.input.type] = val
let type = this.plateInput.input.type.split('p')[1]
if (type !== '8') {
......@@ -220,31 +242,35 @@ export default {
<style scoped lang='scss'>
.enter-wrap {
.plateInput {
padding: 0 10px;
padding: 0 32px;
display: flex;
justify-content: space-around;
align-items: center;
.item {
width: 30px;
height: 37px;
border: 1px solid #3399ff;
border-radius: 10px;
height: 40px;
background: rgba(50, 127, 250, 0.1);
border: 0.5px solid rgba(50, 127, 250, 0.15);
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
&:last-child{
border: 1px solid #2beb12;
justify-content: center;
font-weight: 600;
font-size: 18px;
color: #282829;
&:last-child {
background: #f3ffe7;
border: 0.5px solid #e0f8c9;
}
}
.icon-black{
height:8px;
width:8px;
background: #000;
border-radius: 100%;
.icon-black {
height: 8px;
width: 8px;
background: #000;
border-radius: 100%;
}
.active {
border-color: #ff5100 !important; ;
border: 1.5px solid #327ffa !important;
}
}
.bords {
......@@ -255,21 +281,32 @@ export default {
.bor {
position: relative;
.btns {
width: 100%;
height: 35px;
background: #fff;
border-top: 1px solid rgba(0, 0, 0, 0.05);
width: 375px;
height: 38px;
background: #ffffff;
position: absolute;
display: flex;
justify-content: space-between;
align-items: center;
top: -35px;
left: 0;
padding:0 8px;
padding: 0 15px;
box-sizing: border-box;
button {
margin: 0;
padding:1px 2px;
background: #f2f2f2;
border-radius: 4px;
padding: 5px 12px;
box-sizing: border-box;
font-weight: 600;
font-size: 14px;
color: #3b3b3d;
text-align: center;
border: 0;
}
.success {
background: #07c160;
border-radius: 4px;
color: #ffffff;
}
}
}
......@@ -278,7 +315,7 @@ export default {
position: fixed;
bottom: 0;
left: 0;
background-color: #ced2d9;
background: #f7f7f7;
width: 100%;
height: 180px;
margin: 0;
......@@ -288,16 +325,28 @@ export default {
}
.keyboard li {
list-style: none;
border-radius: 5px;
border-radius: 4px;
}
.keyboard li {
float: left;
background-color: #fefefe;
margin-left: 8px;
background: #ffffff;
border-radius: 4px;
margin-left: 7px;
margin-top: 8px;
font-size: 16px;
color: #333333;
}
.num {
color: rgba(0, 0, 0, 0.15);
background: #ffffff;
border-radius: 4px;
font-size: 16px;
color: #cacacc !important;
}
.lastBtn {
background: #ffffff !important;
border-radius: 4px;
font-size: 16px;
color: #cacacc !important;
}
.province {
position: relative;
......@@ -316,16 +365,14 @@ export default {
-webkit-justify-content: center;
}
.province li.delete {
width: calc((100% - 8px * 11) / 10 * 2 + 8px);
width: calc((100% - 8px * 11) / 10 * 2);
}
.province li.deletes {
width: calc((100% - 8px * 11) / 10 * 2 + 45px);
width: calc((100% - 8px * 11) / 10 * 2 + 10px);
}
.disabled {
color: rgba(0, 0, 0, 0.15);
}
}
}
</style>
\ No newline at end of file
......@@ -11,7 +11,7 @@ module.exports = {
envVersion: 'develop',
title: '嘀加企微管家',
request: {
baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间
timeout: 180000,
// 携带凭证
......
......@@ -2,6 +2,10 @@
<div class="plat-wrapper">
<div class="title">输入车牌号码</div>
<plat-num ref="platNum" :plateNumber.sync="plateNumber" @updateChange="updateData"></plat-num>
<div class="tip flex">
<div class="sprite-icon icon-tip"></div>
请确认绑定车辆的信息,绑定后暂不支持变更
</div>
</div>
</template>
<script>
......@@ -15,10 +19,8 @@ export default {
methods: {
updateData(val) {
let plateNum = Object.values(val).join('')
// var regExp = /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$)/
// console.log(regExp.test(plateNum), plateNum)
if (plateNum.length < 7) {
var regExp = /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1,2}$)/
if (!regExp.test(plateNum)) {
this.showToast('请输入正确的车牌号')
return
}
......@@ -52,8 +54,18 @@ export default {
font-weight: 600;
color: #333;
text-align: center;
margin: 30px 0;
margin: 42px 0;
letter-spacing: 1px;
}
.tip {
font-weight: 400;
font-size: 12px;
color: #cacaca;
text-align: left;
padding:10px 32px 0 32px;
}
.icon-tip{
margin-right:4px;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!