页面调整

This commit is contained in:
2025-08-26 16:07:25 +08:00
parent f259275adb
commit 0e673b853d
6 changed files with 1278 additions and 1241 deletions

View File

@@ -1,352 +1,369 @@
<template> <template>
<view class="login-container"> <view class="login-container">
<!-- 顶部渐变背景和标题 --> <!-- 顶部渐变背景和标题 -->
<view class="login-header"> <view class="login-header">
<image class="login-bg-img" src="/static/ic_login_topbg.png" mode="widthFix" /> <view class="login-title">登录注册</view>
<view class="login-title">登录注册</view> <view class="login-subtitle">欢迎使用数智南川</view>
<view class="login-subtitle">欢迎使用数智南川</view> </view>
<!-- 表单区域 -->
<view class="login-form">
<view class="input-row">
<image class="iconfont" src="/static/aidex/login/ic_login_user.png" />
<input class="login-input" type="text" placeholder="输入账号" v-model="username" />
</view>
<view class="input-row">
<image class="iconfont2" src="/static/aidex/login/ic_login_pwd.png" />
<input class="login-input" type="password" v-model="password" placeholder="请输入密码" />
</view>
<view class="protocol-row">
<label class="custom-checkbox-label">
<input type="checkbox" :checked="checked" @change="handleCheckboxChange"
class="custom-checkbox-input" />
<image :src="checked ? '/static/ic_login_agree.png' : '/static/ic_login_dis.png'"
class="custom-checkbox-img" @click="handleCheckboxChange({ target: { checked: !checked }})" />
</label>
<text>同意</text>
<text class="protocol-link">用户协议</text>
<text></text>
<text class="protocol-link">隐私政策</text>
</view>
<button class="login-btn" @click="submit">登录</button>
</view>
</view> </view>
<!-- 表单区域 --> </template>
<view class="login-form">
<view class="input-row">
<image class="iconfont" src="/static/ic_login_phone.png" />
<input class="login-input" type="text" placeholder="输入账号" v-model="username" />
</view>
<view class="input-row">
<image class="iconfont2" src="/static/ic_login_code.png" />
<input class="login-input" type="text" v-model="password" placeholder="请输入密码" />
</view>
<view class="protocol-row">
<label class="custom-checkbox-label">
<input type="checkbox" :checked="checked" @change="handleCheckboxChange"
class="custom-checkbox-input" />
<image :src="checked ? '/static/ic_login_agree.png' : '/static/ic_login_dis.png'"
class="custom-checkbox-img" @click="handleCheckboxChange({ target: { checked: !checked }})" />
</label>
<text>同意</text>
<text class="protocol-link">用户协议</text>
<text></text>
<text class="protocol-link">隐私政策</text>
</view>
<button class="login-btn" @click="submit">登录</button>
</view>
</view>
</template>
<script>
// import { globalWs } from '../../../utils/GlobalWebSocket';
// import socketManager from '@/utils/GlobalWebSocket.js'
import base64 from '@/common/base64.js';
export default {
data() {
return {
phoneNo: '',
username: 'admin',
password: 'admin123',
loginType: 'currentPhone',
showPassword: false,
remember: true,
isValidCodeLogin: false,
validCode: '',
imgValidCodeSrc: null,
list: [{
name: '用户名'
}, {
name: '手机号'
}],
current: 0,
activeColor: '#007aff',
checked: false
}
},
onLoad() {
// #ifdef APP-PLUS
plus.screen.lockOrientation('default');
// #endif
},
onReady() {
// #ifdef APP-PLUS
plus.screen.lockOrientation('landscape-primary');
// #endif
},
methods: {
// 登录后连接Socket
async submit() {
if (this.username.length == 0) {
this.$u.toast('请输入账号');
return;
}
if (this.password.length == 0) {
this.$u.toast('请输入密码');
return;
}
let res = await this.$u.api.login({
"tenantId": "000000", // 把单引号换成双引号
"username": this.username,
"password": this.password,
"grantType": "password",
// "uuid": "7cb3ea4fe2ae4f08bbd561c94ef0191b",
"clientId": "dab457a1ea14411787c240db05bb0832"
});
console.log(res)
if (res.code == "200") {
this.$u.toast("登录成功")
this.$store.commit('$uStore', {
name: 'vuex_token',
value: res.data.access_token
});
// 连接Socket
this.$webSocketInit();
//开启websocket
// 登录成功后连接WebSocket
// ws.connect('ws://192.168.71.139:8080/resource/websocket?clientid=e5cd7e4891bf95d1d19206ce24a7b32e&Authorization=Bearer ' +
// this.$store.state.vuex_token, {
// header: {
// 'Authorization': 'Bearer ' + this.$store.state.vuex_token
// },
// onOpen: () => {
// console.log('连接成功')
// },
// onMessage: (data) => {
// console.log('收到消息', data)
// // 处理消息
// },
// onError: (err) => {
// console.error('发生错误', err)
// }
// })
// ws.connect(
// 'ws://192.168.71.139:8080/resource/websocket?clientid=e5cd7e4891bf95d1d19206ce24a7b32e&Authorization=Bearer ' +
// this.$store.state.vuex_token, {
// // 连接成功回调
// onOpen: () => {
// uni.showToast({
// title: 'WebSocket连接成功',
// icon: 'none'
// })
// // 可以发送初始化消息
// ws.send({
// type: 'init',
// userId: res.data.data.userId
// })
// },
// // 收到消息回调
// onMessage: (data) => {
// console.log('收到消息:', data)
// // 根据消息类型处理
// // switch (data.type) {
// // case 'notice':
// // this.handleNotice(data)
// // break
// // case 'message':
// // this.handleNewMessage(data)
// // break
// // }
// },
// // 连接关闭回调
// onClose: () => {
// uni.showToast({
// title: '连接已关闭',
// icon: 'none'
// })
// },
// // 错误回调
// onError: (err) => {
// uni.showToast({
// title: '连接错误',
// icon: 'none'
// })
// console.error('WS错误:', err)
// }
// })
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/msg/index'
});
}, 500);
} else {
<script>
// import { globalWs } from '../../../utils/GlobalWebSocket';
// import socketManager from '@/utils/GlobalWebSocket.js'
import base64 from '@/common/base64.js';
export default {
data() {
return {
phoneNo: '',
username: 'admin',
password: 'admin123',
loginType: 'currentPhone',
showPassword: false,
remember: true,
isValidCodeLogin: false,
validCode: '',
imgValidCodeSrc: null,
list: [{
name: '用户名'
}, {
name: '手机号'
}],
current: 0,
activeColor: '#007aff',
checked: false
} }
}, },
onLoad() {
// #ifdef APP-PLUS
plus.screen.lockOrientation('default');
// #endif
},
onReady() {
// #ifdef APP-PLUS
plus.screen.lockOrientation('landscape-primary');
// #endif
},
handleCheckboxChange(e) { methods: {
this.checked = e.target.checked; // 登录后连接Socket
async submit() {
if (this.username.length == 0) {
this.$u.toast('请输入账号');
return;
}
if (this.password.length == 0) {
this.$u.toast('请输入密码');
return;
}
let res = await this.$u.api.login({
"tenantId": "000000", // 把单引号换成双引号
"username": this.username,
"password": this.password,
"grantType": "password",
// "uuid": "7cb3ea4fe2ae4f08bbd561c94ef0191b",
"clientId": "dab457a1ea14411787c240db05bb0832"
});
console.log(res)
if (res.code == "200") {
this.$u.toast("登录成功")
this.$store.commit('$uStore', {
name: 'vuex_token',
value: res.data.access_token
});
// 连接Socket
this.$webSocketInit();
//开启websocket
// 登录成功后连接WebSocket
// ws.connect('ws://192.168.71.139:8080/resource/websocket?clientid=e5cd7e4891bf95d1d19206ce24a7b32e&Authorization=Bearer ' +
// this.$store.state.vuex_token, {
// header: {
// 'Authorization': 'Bearer ' + this.$store.state.vuex_token
// },
// onOpen: () => {
// console.log('连接成功')
// },
// onMessage: (data) => {
// console.log('收到消息', data)
// // 处理消息
// },
// onError: (err) => {
// console.error('发生错误', err)
// }
// })
// ws.connect(
// 'ws://192.168.71.139:8080/resource/websocket?clientid=e5cd7e4891bf95d1d19206ce24a7b32e&Authorization=Bearer ' +
// this.$store.state.vuex_token, {
// // 连接成功回调
// onOpen: () => {
// uni.showToast({
// title: 'WebSocket连接成功',
// icon: 'none'
// })
// // 可以发送初始化消息
// ws.send({
// type: 'init',
// userId: res.data.data.userId
// })
// },
// // 收到消息回调
// onMessage: (data) => {
// console.log('收到消息:', data)
// // 根据消息类型处理
// // switch (data.type) {
// // case 'notice':
// // this.handleNotice(data)
// // break
// // case 'message':
// // this.handleNewMessage(data)
// // break
// // }
// },
// // 连接关闭回调
// onClose: () => {
// uni.showToast({
// title: '连接已关闭',
// icon: 'none'
// })
// },
// // 错误回调
// onError: (err) => {
// uni.showToast({
// title: '连接错误',
// icon: 'none'
// })
// console.error('WS错误:', err)
// }
// })
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/msg/index'
});
}, 500);
} else {
}
},
handleCheckboxChange(e) {
this.checked = e.target.checked;
}
} }
} }
} </script>
</script>
<style scoped> <style scoped>
.login-container { * {
min-height: 100vh; margin: 0;
background: #fafbfc; padding: 0;
display: flex; box-sizing: border-box;
flex-direction: column; font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
align-items: center; }
}
body {
.login-header { background: linear-gradient(135deg, #f0f5ff 0%, #e6f7ff 100%);
width: 100%; min-height: 100vh;
position: relative; width: 100%;
display: flex; display: flex;
flex-direction: column; justify-content: center;
align-items: center; align-items: center;
justify-content: center; padding: 16px;
margin-bottom: 40rpx; }
}
.login-container {
.login-bg-img { width: 100%;
position: absolute; position: relative;
top: 0; border-radius: 24px;
left: 0; overflow: hidden;
width: 100%; box-shadow: 0 20px 40px rgba(46, 108, 246, 0.15);
z-index: 0; transition: all 0.3s ease;
} }
.login-title, /* 响应式调整 */
.login-subtitle { @media (max-width: 600px) {
position: relative; .login-container {
top: 164rpx; border-radius: 16px;
z-index: 2; max-width: 90%;
} }
}
.login-title {
color: #fff; @media (max-width: 400px) {
font-size: 48rpx; .login-container {
font-weight: bold; max-width: 95%;
margin-top: 40rpx; }
} }
.login-subtitle { .login-header {
color: #fff; position: relative;
font-size: 24rpx; height: 35vh;
margin-top: 10rpx; min-height: 30vh;
} max-height: 35vh;
display: flex;
.login-form { flex-direction: column;
width: 80%; align-items: center;
margin-top: 400rpx; justify-content: center;
display: flex; color: white;
flex-direction: column; padding: 20px;
align-items: center; }
}
.login-header::before {
.input-row { content: '';
width: 100%; position: absolute;
display: flex; top: 0;
align-items: center; left: 0;
border-bottom: 1px solid #eee; width: 100%;
margin-bottom: 30rpx; height: 100%;
padding-bottom: 10rpx; background: linear-gradient(135deg, #2e6cf9 0%, #4fc3f7 100%);
} z-index: 1;
border-radius: 24px 24px 0 0;
.iconfont { }
font-size: 32rpx;
margin-right: 16rpx; .login-title, .login-subtitle {
width: 27rpx; position: relative;
height: 43rpx; z-index: 2;
} text-align: center;
}
.iconfont2 {
font-size: 32rpx; .login-title {
margin-right: 16rpx; font-size: clamp(28px, 5vw, 36px);
width: 31rpx; font-weight: 700;
height: 35rpx; margin-bottom: 8px;
} }
.login-input { .login-subtitle {
flex: 1; font-size: clamp(14px, 3vw, 18px);
border: none; font-weight: 400;
background: transparent; opacity: 0.9;
font-size: 28rpx; }
padding: 10rpx 0;
margin-right: 10rpx; .login-form {
} background: white;
padding: clamp(20px, 5vw, 30px);
.code-btn { border-radius: 0 0 24px 24px;
background: none; position: relative;
color: #2e6cf6; z-index: 10;
border: none; }
font-size: 26rpx;
padding: 0 10rpx; .input-row {
} display: flex;
align-items: center;
.protocol-row { border-bottom: 1px solid #eaeaea;
width: 100%; margin-bottom: clamp(15px, 4vw, 25px);
display: flex; padding-bottom: 10px;
align-items: center; }
margin: 20rpx 0 40rpx 0;
font-size: 24rpx; .input-row:focus-within {
} border-bottom-color: #2e6cf6;
}
.protocol-checkbox {
margin-right: 8rpx; .iconfont, .iconfont2 {
} width: clamp(20px, 4vw, 24px);
height: clamp(20px, 4vw, 24px);
.protocol-link { margin-right: 12px;
color: #2e6cf6; flex-shrink: 0;
margin: 0 4rpx; }
}
.login-input {
.login-btn { flex: 1;
width: 100%; border: none;
height: 80rpx; outline: none;
background: linear-gradient(90deg, #2e6cf6 0%, #4fc3f7 100%); font-size: clamp(14px, 4vw, 16px);
color: #fff; color: #333;
font-size: 32rpx; min-width: 0; /* 防止flex项目溢出 */
border: none; }
border-radius: 40rpx;
margin-top: 268rpx; .login-input::placeholder {
} color: #aaa;
}
.custom-checkbox-label {
display: flex; .protocol-row {
align-items: center; display: flex;
margin-right: 8rpx; align-items: center;
} margin: clamp(15px, 4vw, 20px) 0 clamp(20px, 5vw, 30px);
font-size: clamp(12px, 3vw, 14px);
.custom-checkbox-input { color: #666;
display: none; flex-wrap: wrap;
} }
.custom-checkbox-span { .custom-checkbox-label {
width: 28rpx; display: flex;
height: 28rpx; align-items: center;
border-radius: 50%; margin-right: 6px;
border: 2rpx solid #2e6cf6; cursor: pointer;
background: #fff; flex-shrink: 0;
display: inline-block; }
position: relative;
transition: border-color 0.2s; .custom-checkbox-input {
} display: none;
}
.custom-checkbox-span.checked {
background: #2e6cf6; .custom-checkbox-img {
border-color: #2e6cf6; width: clamp(18px, 4vw, 20px);
} height: clamp(18px, 4vw, 20px);
margin-right: 6px;
.custom-checkbox-span.checked::after { cursor: pointer;
content: ''; flex-shrink: 0;
position: absolute; }
left: 7rpx;
top: 7rpx; .protocol-link {
width: 12rpx; color: #2e6cf6;
height: 12rpx; margin: 0 2px;
background: #fff; cursor: pointer;
border-radius: 50%; white-space: nowrap;
} }
.custom-checkbox-img { .login-btn {
width: 28rpx; width: 100%;
height: 28rpx; height: clamp(45px, 10vw, 50px);
margin-right: 8rpx; background: linear-gradient(90deg, #2e6cf6 0%, #4fc3f7 100%);
} color: white;
</style> border: none;
border-radius: clamp(20px, 8vw, 25px);
font-size: clamp(14px, 4vw, 16px);
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
box-shadow: 0 4px 12px rgba(46, 108, 246, 0.3);
}
.login-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(46, 108, 246, 0.4);
}
.login-btn:active {
transform: translateY(0);
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -7,31 +7,31 @@
<u-avatar size="100" src="/static/aidex/images/user01.png"></u-avatar> <u-avatar size="100" src="/static/aidex/images/user01.png"></u-avatar>
</view> </view>
<view class="info" style="display: flex;justify-content: space-between;"> <view class="info" style="display: flex;justify-content: space-between;">
<view> <!-- <view>-->
<view class="username">管理员</view> <!-- <view class="username">管理员</view>-->
<view class="usercode">普通会员</view> <!-- <view class="usercode">普通会员</view>-->
</view> <!-- </view>-->
<view class="sign-in-images"><image src="/static/aidex/images/sign-in.png"></image></view> <view class="sign-in-images"><image src="/static/aidex/images/sign-in.png"></image></view>
</view> </view>
</view> </view>
<u-row class="userinfo-topbox" gutter="16" justify="center"> <!-- <u-row class="userinfo-topbox" gutter="16" justify="center">-->
<u-col span="4" text-align="center"> <!-- <u-col span="4" text-align="center">-->
<view class="number">9,999<em></em></view> <!-- <view class="number">9,999<em></em></view>-->
<view>余额</view> <!-- <view>余额</view>-->
</u-col> <!-- </u-col>-->
<u-col span="4" text-align="center" @click="navTo('/pages/sys/application/recharge')"> <!-- <u-col span="4" text-align="center" @click="navTo('/pages/sys/application/recharge')">-->
<view><u-icon size="28px" color="#ffffff" name="rmb-circle"></u-icon></view> <!-- <view><u-icon size="28px" color="#ffffff" name="rmb-circle"></u-icon></view>-->
<view>充值</view> <!-- <view>充值</view>-->
</u-col> <!-- </u-col>-->
<u-col span="4" text-align="center" @click="navTo('/pages/sys/application/balance-details')"> <!-- <u-col span="4" text-align="center" @click="navTo('/pages/sys/application/balance-details')">-->
<view> <!-- <view>-->
<view class="iconfont icon-faan" style="font-size: 24px;color:#ffffff;"></view> <!-- <view class="iconfont icon-faan" style="font-size: 24px;color:#ffffff;"></view>-->
</view> <!-- </view>-->
<view>余额明细</view> <!-- <view>余额明细</view>-->
</u-col> <!-- </u-col>-->
</u-row> <!-- </u-row>-->
</view> </view>
<view class="list"> <!-- <view class="list">
<view> <view>
<u-cell-group class="personal-list"> <u-cell-group class="personal-list">
<u-gap height="20" bg-color="#f5f5f5"></u-gap> <u-gap height="20" bg-color="#f5f5f5"></u-gap>
@@ -45,7 +45,7 @@
<u-cell-item icon="setting" :iconStyle="{ color: '#2767dc' }" title="系统设置" @click="navTo('setting')"></u-cell-item> <u-cell-item icon="setting" :iconStyle="{ color: '#2767dc' }" title="系统设置" @click="navTo('setting')"></u-cell-item>
</u-cell-group> </u-cell-group>
</view> </view>
</view> </view> -->
<view class="button-wrapper"> <view class="button-wrapper">
<button class="logout-btn" @click="logout">退出登录</button> <button class="logout-btn" @click="logout">退出登录</button>
</view> </view>

View File

@@ -2,15 +2,15 @@
<view class="container"> <view class="container">
<!-- 筛选及搜索区域 --> <!-- 筛选及搜索区域 -->
<view class="search-bar"> <view class="search-bar">
<input v-model="searchParams.visitorName" class="search-input" placeholder="访客姓名" /> <input v-model="searchParams.visitorName" class="search-input" placeholder="访客姓名"/>
<input v-model="searchParams.visitedPerson" class="search-input" placeholder="被访人" /> <input v-model="searchParams.visitedPerson" class="search-input" placeholder="被访人"/>
<input v-model="searchParams.visitedUnit" class="search-input" placeholder="被访单位" /> <input v-model="searchParams.visitedUnit" class="search-input" placeholder="被访单位"/>
<picker mode="selector" :range="statusOptions" @change="onStatusChange"> <!-- <picker mode="selector" :range="statusOptions" @change="onStatusChange">
<view class="picker-view"> <view class="picker-view">
{{ searchParams.bookStatus || '预约状态' }} {{ searchParams.bookStatus || '预约状态' }}
</view> </view>
</picker> </picker> -->
<input v-model="searchParams.phoneSuffix" class="search-input" placeholder="手机号后四位" /> <input v-model="searchParams.phoneSuffix" class="search-input" placeholder="手机号后四位"/>
<button class="search-btn" @click="handleSearch">搜索</button> <button class="search-btn" @click="handleSearch">搜索</button>
<button class="reset-btn" @click="handleReset">重置</button> <button class="reset-btn" @click="handleReset">重置</button>
</view> </view>
@@ -27,10 +27,10 @@
<view class="table-cell">被访单位</view> <view class="table-cell">被访单位</view>
<view class="table-cell">拜访事由</view> <view class="table-cell">拜访事由</view>
<view class="table-cell">拜访时间</view> <view class="table-cell">拜访时间</view>
<view class="table-cell">是否预约车位</view> <!-- <view class="table-cell">是否预约车位</view>
<view class="table-cell">预约状态</view> <view class="table-cell">预约状态</view> -->
<view class="table-cell">提交时间</view> <view class="table-cell">提交时间</view>
<view class="table-cell">操作</view> <!-- <view class="table-cell">操作</view> -->
</view> </view>
<view v-for="(item, index) in filteredList" :key="index" class="table-row"> <view v-for="(item, index) in filteredList" :key="index" class="table-row">
<view class="table-cell">{{ index + 1 }}</view> <view class="table-cell">{{ index + 1 }}</view>
@@ -42,29 +42,30 @@
<view class="table-cell">{{ item.interviewedUnit || '无' }}</view> <view class="table-cell">{{ item.interviewedUnit || '无' }}</view>
<view class="table-cell">{{ item.visitingReason }}</view> <view class="table-cell">{{ item.visitingReason }}</view>
<view class="table-cell">{{ item.visitingBeginTime }}</view> <view class="table-cell">{{ item.visitingBeginTime }}</view>
<view class="table-cell">{{ item.bookingParkingSpace === 1 ? '是' : '否' }}</view> <!-- <view class="table-cell">{{ item.bookingParkingSpace === 1 ? '是' : '否' }}</view>
<view class="table-cell" :class="{'status-confirm': item.serveStatus === 1, 'status-wait': item.serveStatus === 0}"> <view class="table-cell" :class="{'status-confirm': item.serveStatus === 1, 'status-wait': item.serveStatus === 0}">
{{ item.serveStatus === 1 ? '已确认' : '待确认' }} {{ item.serveStatus === 1 ? '已确认' : '待确认' }}
</view> </view> -->
<view class="table-cell">{{ item.createTime }}</view> <view class="table-cell">{{ item.createTime }}</view>
<view class="table-cell operation-cell"> <!-- <view class="table-cell operation-cell">
<button class="operation-btn" @click="handleDetail(item)">详情</button> <button class="operation-btn" @click="handleDetail(item)">详情</button>
<button class="operation-btn" @click="handleAudit(item)">确认</button> <button class="operation-btn" @click="handleAudit(item)">确认</button>
</view> </view> -->
</view> </view>
</view> </view>
<VisitorDetailModal <VisitorDetailModal
:visible="showDetailModal" :visible="showDetailModal"
:visitorInfo="currentVisitor" :visitorInfo="currentVisitor"
:showActionButtons="currentVisitor.serveStatus === 0" :showActionButtons="currentVisitor.serveStatus === 0"
@close="closeDetailModal" @close="closeDetailModal"
@audit="handleAudit" @audit="handleAudit"
/> />
</view> </view>
</template> </template>
<script> <script>
import VisitorDetailModal from '@/components/VisitorDetailModal.vue'; import VisitorDetailModal from '@/components/VisitorDetailModal.vue';
export default { export default {
components: { components: {
VisitorDetailModal VisitorDetailModal
@@ -82,7 +83,7 @@ export default {
bookStatus: '', bookStatus: '',
phoneSuffix: '' phoneSuffix: ''
}, },
statusOptions: ['已确认', '待确认'] statusOptions: ['已确认', '待确认']
} }
}, },
computed: { computed: {
@@ -92,7 +93,7 @@ export default {
if (this.searchParams.visitedPerson && !item.interviewedPerson.includes(this.searchParams.visitedPerson)) return false; if (this.searchParams.visitedPerson && !item.interviewedPerson.includes(this.searchParams.visitedPerson)) return false;
if (this.searchParams.visitedUnit && !item.interviewedUnit.includes(this.searchParams.visitedUnit)) return false; if (this.searchParams.visitedUnit && !item.interviewedUnit.includes(this.searchParams.visitedUnit)) return false;
if (this.searchParams.bookStatus) { if (this.searchParams.bookStatus) {
const statusMap = { '已确认': 1, '待确认': 0 }; const statusMap = {'已确认': 1, '待确认': 0};
return item.serveStatus === statusMap[this.searchParams.bookStatus]; return item.serveStatus === statusMap[this.searchParams.bookStatus];
} }
if (this.searchParams.phoneSuffix) { if (this.searchParams.phoneSuffix) {
@@ -104,9 +105,9 @@ export default {
} }
}, },
onLoad() { onLoad() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.screen.lockOrientation('default'); plus.screen.lockOrientation('default');
// #endif // #endif
this.onload(); this.onload();
}, },
methods: { methods: {
@@ -119,24 +120,24 @@ export default {
this.showDetailModal = false; this.showDetailModal = false;
}, },
handleAudit(item) { handleAudit(item) {
console.log("eee",item) console.log("eee", item)
this.loading = true; this.loading = true;
item.serveStatus=1 item.serveStatus = 1
this.$u.api.spfk(item).then(res=>{ this.$u.api.spfk(item).then(res => {
console.log(res) console.log(res)
}) })
},
onReady() {
// #ifdef APP-PLUS
plus.screen.lockOrientation('landscape-primary');
// #endif
}, },
onReady() {
// #ifdef APP-PLUS
plus.screen.lockOrientation('landscape-primary');
// #endif
},
onload() { onload() {
this.$u.api.fklist().then(res => { this.$u.api.fklist().then(res => {
this.tableData = res.rows; this.tableData = res.rows;
}).catch(err => { }).catch(err => {
console.error('获取数据失败:', err); console.error('获取数据失败:', err);
uni.showToast({ title: '获取数据失败', icon: 'none' }); uni.showToast({title: '获取数据失败', icon: 'none'});
}); });
}, },
onStatusChange(e) { onStatusChange(e) {
@@ -144,7 +145,7 @@ export default {
this.searchParams.bookStatus = this.statusOptions[index]; this.searchParams.bookStatus = this.statusOptions[index];
}, },
handleSearch() { handleSearch() {
this.onload(); this.onload();
console.log('当前筛选参数:', this.searchParams); console.log('当前筛选参数:', this.searchParams);
}, },
handleReset() { handleReset() {
@@ -155,12 +156,12 @@ export default {
bookStatus: '', bookStatus: '',
phoneSuffix: '' phoneSuffix: ''
}; };
this.onload(); this.onload();
}, },
// handleAudit(item) { // handleAudit(item) {
// console.log('审核操作,当前数据:', item); // console.log('审核操作,当前数据:', item);
// handleAudit(item) // handleAudit(item)
// } // }
} }
}; };
</script> </script>
@@ -169,12 +170,14 @@ export default {
.container { .container {
padding: 10px; padding: 10px;
} }
.search-bar { .search-bar {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 10px; gap: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.search-input { .search-input {
flex: 1; flex: 1;
min-width: 120px; min-width: 120px;
@@ -182,6 +185,7 @@ export default {
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 4px; border-radius: 4px;
} }
.picker-view { .picker-view {
padding: 8px; padding: 8px;
border: 1px solid #ddd; border: 1px solid #ddd;
@@ -189,34 +193,44 @@ export default {
min-width: 120px; min-width: 120px;
text-align: center; text-align: center;
} }
.search-btn, .search-btn,
.reset-btn { .reset-btn {
padding: 8px 15px; padding: 8px 15px;
border-radius: 4px; border-radius: 4px;
color: #fff; color: #fff;
height: 40px;
text-align: center;
line-height: 24px;
} }
.search-btn { .search-btn {
background-color: #007aff; background-color: #007aff;
border: none; border: none;
} }
.reset-btn { .reset-btn {
background-color: #f0f0f0; background-color: #f0f0f0;
color: #333; color: #333;
border: none; border: none;
} }
.table-wrap { .table-wrap {
overflow-x: auto; overflow-x: auto;
} }
.table-header, .table-header,
.table-row { .table-row {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
border: 1px solid #eee; border: 1px solid #eee;
} }
.table-header { .table-header {
background-color: #f8f8f8; background-color: #f8f8f8;
font-weight: bold; font-weight: bold;
} }
.table-cell { .table-cell {
flex: 1; flex: 1;
text-align: center; text-align: center;
@@ -226,22 +240,27 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.table-cell:last-child { .table-cell:last-child {
border-right: none; border-right: none;
} }
.operation-cell { .operation-cell {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
flex: 2; flex: 2;
} }
.operation-btn { .operation-btn {
margin: 0 5px; margin: 0 5px;
padding: 5px 10px; padding: 5px 10px;
font-size: 12px; font-size: 12px;
} }
.status-confirm { .status-confirm {
color: #52c41a; color: #52c41a;
} }
.status-wait { .status-wait {
color: #fa8c16; color: #fa8c16;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB