Browse Source

对手机号跟证件号组件做长度限制 nav上方多余按钮隐藏

wyx
mk 3 months ago
parent
commit
3be820e03e
  1. 14
      src/layout/components/Navbar.vue
  2. 1
      src/views/records/checkin/index.vue
  3. 10
      src/views/residence/checkIn/index.vue

14
src/layout/components/Navbar.vue

@ -8,21 +8,7 @@
<div class="right-menu"> <div class="right-menu">
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip>
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template> </template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">

1
src/views/records/checkin/index.vue

@ -729,7 +729,6 @@ export default {
$route:{ $route:{
handler: function (newVal, oldVal) { handler: function (newVal, oldVal) {
console.log(newVal); console.log(newVal);
if (newVal.query) { if (newVal.query) {
this.queryParams.idCard = newVal.query.idCard; this.queryParams.idCard = newVal.query.idCard;
this.handleQuery() this.handleQuery()

10
src/views/residence/checkIn/index.vue

@ -33,11 +33,11 @@
</div> </div>
<el-row> <el-row>
<el-form-item label="身份证" label-width="80px" prop="idCard"> <el-form-item label="身份证" label-width="80px" prop="idCard">
<el-input v-model="checnInForm.idCard" placeholder="请输入用户名称" clearable style="width: 240px" /> <el-input v-model.trim="checnInForm.idCard" e placeholder="请输入用户名称" clearable style="width: 240px" maxlength="18"/>
</el-form-item> </el-form-item>
<el-form-item label="手机号" label-width="80px" prop="phone"> <el-form-item label="手机号" label-width="80px" prop="phone">
<el-input v-model="checnInForm.phone" placeholder="请输入手机号" clearable style="width: 240px" /> <el-input v-model.trim="checnInForm.phone" placeholder="请输入手机号" clearable style="width: 240px" maxlength="11"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
@ -276,6 +276,10 @@ export default {
}, },
async handleQuery(refresh) { async handleQuery(refresh) {
try { try {
if(!this.checnInForm.idCard && !this.checnInForm.phone){
this.$message.error('请输入身份证或手机号')
return;
}
const res = await getResidentInfo({ const res = await getResidentInfo({
idCard: this.checnInForm.idCard, // idCard: this.checnInForm.idCard, //
phone: this.checnInForm.phone, // phone: this.checnInForm.phone, //
@ -289,7 +293,7 @@ export default {
if(this.userInfo.checkInRecId){ if(this.userInfo.checkInRecId){
this.getCheckInRecInfo() this.getCheckInRecInfo()
} }
} else { } else if(!res.data){
this.$message.error("查询失败") this.$message.error("查询失败")
} }
} catch (error) { } catch (error) {

Loading…
Cancel
Save