Commit 9f49d5f2 by 前端

commit:车牌组件修改

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