Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96174dc3da | ||
|
|
2ef904f6ac | ||
|
|
750abe86e3 | ||
|
|
cd5b0f6765 | ||
|
|
f2d6171e61 | ||
|
|
d46137b83c | ||
|
|
49f6875a55 | ||
|
|
a8d089fd97 | ||
|
|
71b5311ef0 | ||
|
|
3bbe65d89f | ||
|
|
de54c98aa5 |
22560
.gitignore
vendored
22560
.gitignore
vendored
File diff suppressed because it is too large
Load Diff
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"git.ignoreLimitWarning": true
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
<template>
|
||||
<view class="protocol-container">
|
||||
<scroll-view scroll-y class="scroll-content">
|
||||
<view class="protocol-content">
|
||||
<text class="title">用户服务协议</text>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">一、服务条款的接受</text>
|
||||
<text class="section-text">欢迎使用智聪健康管理平台。请您仔细阅读本协议,使用本服务即表示您同意遵守本协议的所有条款。</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">二、服务说明</text>
|
||||
<text class="section-text">本平台为用户提供以下服务:</text>
|
||||
<text class="section-text">1. 健康数据记录与管理</text>
|
||||
<text class="section-text">2. 健康数据统计与分析</text>
|
||||
<text class="section-text">3. 健康档案管理</text>
|
||||
<text class="section-text">4. 其他健康管理相关功能</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">三、用户账号</text>
|
||||
<text class="section-text">1. 您需要注册账号才能使用本服务</text>
|
||||
<text class="section-text">2. 您应妥善保管账号信息,不得转让或借用他人</text>
|
||||
<text class="section-text">3. 您对账号下的所有行为承担责任</text>
|
||||
<text class="section-text">4. 如发现账号被盗用,请立即通知我们</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">四、用户行为规范</text>
|
||||
<text class="section-text">使用本服务时,您不得:</text>
|
||||
<text class="section-text">1. 发布违法违规信息</text>
|
||||
<text class="section-text">2. 侵犯他人合法权益</text>
|
||||
<text class="section-text">3. 干扰或破坏服务正常运行</text>
|
||||
<text class="section-text">4. 使用任何自动化程序访问服务</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">五、知识产权</text>
|
||||
<text class="section-text">1. 本平台的所有内容受知识产权法保护</text>
|
||||
<text class="section-text">2. 未经授权,不得复制、修改或传播平台内容</text>
|
||||
<text class="section-text">3. 您上传的内容,授权我们在服务范围内使用</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">六、免责声明</text>
|
||||
<text class="section-text">1. 本平台提供的健康数据仅供参考,不构成医疗建议</text>
|
||||
<text class="section-text">2. 我们不对因使用本服务造成的任何损失承担责任</text>
|
||||
<text class="section-text">3. 服务可能因维护、升级等原因中断</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">七、协议修改</text>
|
||||
<text class="section-text">我们有权随时修改本协议,修改后的协议将在平台公布。继续使用服务即视为接受修改后的协议。</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">八、联系我们</text>
|
||||
<text class="section-text">如对本协议有任何疑问,请通过以下方式联系我们:</text>
|
||||
<text class="section-text">邮箱: qdintc@126.com</text>
|
||||
</view>
|
||||
|
||||
<view class="update-time">
|
||||
<text>最后更新时间: 2025年1月</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
onLoad(() => {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '用户服务协议'
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.protocol-container {
|
||||
height: 100vh;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.scroll-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.protocol-content {
|
||||
padding: 40rpx 32rpx;
|
||||
background: #ffffff;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: block;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.section-title {
|
||||
display: block;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.section-text {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
color: #606266;
|
||||
line-height: 1.8;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.update-time {
|
||||
text-align: center;
|
||||
padding: 40rpx 0 20rpx;
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,125 +0,0 @@
|
||||
<template>
|
||||
<view class="protocol-container">
|
||||
<scroll-view scroll-y class="scroll-content">
|
||||
<view class="protocol-content">
|
||||
<text class="title">隐私协议</text>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">一、信息收集</text>
|
||||
<text class="section-text">我们会收集您在使用服务时主动提供的信息,包括但不限于:</text>
|
||||
<text class="section-text">1. 注册信息:账号、密码等</text>
|
||||
<text class="section-text">2. 健康信息:体温、体重、身高等健康数据</text>
|
||||
<text class="section-text">3. 设备信息:设备型号、操作系统版本等</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">二、信息使用</text>
|
||||
<text class="section-text">我们收集的信息将用于:</text>
|
||||
<text class="section-text">1. 为您提供健康管理服务</text>
|
||||
<text class="section-text">2. 改进和优化我们的服务</text>
|
||||
<text class="section-text">3. 保障系统安全和稳定运行</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">三、信息保护</text>
|
||||
<text class="section-text">我们采用业界标准的安全措施保护您的个人信息,包括:</text>
|
||||
<text class="section-text">1. 数据加密传输和存储</text>
|
||||
<text class="section-text">2. 严格的访问权限控制</text>
|
||||
<text class="section-text">3. 定期的安全审计</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">四、信息共享</text>
|
||||
<text class="section-text">除以下情况外,我们不会向第三方共享您的个人信息:</text>
|
||||
<text class="section-text">1. 事先获得您的明确同意</text>
|
||||
<text class="section-text">2. 法律法规要求</text>
|
||||
<text class="section-text">3. 与授权合作伙伴共享(需脱敏处理)</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">五、您的权利</text>
|
||||
<text class="section-text">您有权:</text>
|
||||
<text class="section-text">1. 访问、更正或删除您的个人信息</text>
|
||||
<text class="section-text">2. 撤回授权同意</text>
|
||||
<text class="section-text">3. 注销账户</text>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<text class="section-title">六、联系我们</text>
|
||||
<text class="section-text">如对本隐私协议有任何疑问,请通过以下方式联系我们:</text>
|
||||
<text class="section-text">邮箱: qdintc@126.com</text>
|
||||
</view>
|
||||
|
||||
<view class="update-time">
|
||||
<text>最后更新时间: 2025年1月</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
onLoad(() => {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '隐私协议'
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.protocol-container {
|
||||
height: 100vh;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.scroll-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.protocol-content {
|
||||
padding: 40rpx 32rpx;
|
||||
background: #ffffff;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: block;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.section-title {
|
||||
display: block;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.section-text {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
color: #606266;
|
||||
line-height: 1.8;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.update-time {
|
||||
text-align: center;
|
||||
padding: 40rpx 0 20rpx;
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -12,7 +12,7 @@
|
||||
@click="navigateTo(item.path)"
|
||||
class="grid-item">
|
||||
<view class="item-icon" :style="{ background: item.color }">
|
||||
<u-icon :name="item.icon" size="22" color="#ffffff"></u-icon>
|
||||
<uni-icons :type="item.icon" size="22" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="item-text">{{ item.text }}</text>
|
||||
</view>
|
||||
@@ -25,15 +25,15 @@
|
||||
import { ref } from "vue";
|
||||
|
||||
const systemGridList = ref([
|
||||
{ path: '/pages_mine/pages/system/user/list', text: '用户管理', icon: 'account', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)' },
|
||||
{ path: '/pages_mine/pages/system/role/list', text: '角色管理', icon: 'level', color: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)' },
|
||||
{ path: '/pages_mine/pages/system/user/list', text: '用户管理', icon: 'person', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)' },
|
||||
{ path: '/pages_mine/pages/system/role/list', text: '角色管理', icon: 'staff', color: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)' },
|
||||
{ path: '/pages_mine/pages/system/menu/list', text: '菜单管理', icon: 'list', color: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)' },
|
||||
{ path: '/pages_mine/pages/system/dept/list', text: '部门管理', icon: 'home', color: 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)' },
|
||||
{ path: '/pages_mine/pages/system/post/list', text: '岗位管理', icon: 'order', color: 'linear-gradient(135deg, #fd79a8 0%, #e84393 100%)' },
|
||||
{ path: '/pages_mine/pages/system/dict/list', text: '字典管理', icon: 'file-text', color: 'linear-gradient(135deg, #f6d365 0%, #fda085 100%)' },
|
||||
{ path: '/pages_mine/pages/system/config/list', text: '参数配置', icon: 'setting', color: 'linear-gradient(135deg, #5f72bd 0%, #9b23ea 100%)' },
|
||||
{ path: '/pages_mine/pages/system/notice/list', text: '通知公告', icon: 'bell', color: 'linear-gradient(135deg, #0be881 0%, #0fbcf9 100%)' },
|
||||
{ path: '/pages_mine/pages/system/operlog/list', text: '操作日志', icon: 'edit-pen', color: 'linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%)' },
|
||||
{ path: '/pages_mine/pages/system/dept/list', text: '部门管理', icon: 'chat', color: 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)' },
|
||||
{ path: '/pages_mine/pages/system/post/list', text: '岗位管理', icon: 'contact', color: 'linear-gradient(135deg, #fd79a8 0%, #e84393 100%)' },
|
||||
{ path: '/pages_mine/pages/system/dict/list', text: '字典管理', icon: 'bars', color: 'linear-gradient(135deg, #f6d365 0%, #fda085 100%)' },
|
||||
{ path: '/pages_mine/pages/system/config/list', text: '参数配置', icon: 'gear', color: 'linear-gradient(135deg, #5f72bd 0%, #9b23ea 100%)' },
|
||||
{ path: '/pages_mine/pages/system/notice/list', text: '通知公告', icon: 'notification', color: 'linear-gradient(135deg, #0be881 0%, #0fbcf9 100%)' },
|
||||
{ path: '/pages_mine/pages/system/operlog/list', text: '操作日志', icon: 'compose', color: 'linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%)' },
|
||||
{ path: '/pages_mine/pages/system/logininfor/list', text: '登录日志', icon: 'eye', color: 'linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%)' }
|
||||
])
|
||||
|
||||
@@ -55,7 +55,7 @@ function navigateTo(path) {
|
||||
/* #endif */
|
||||
|
||||
.content {
|
||||
padding: 120rpx 0 12rpx 0;
|
||||
padding: 12rpx 0;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
|
||||
@@ -1,68 +1,57 @@
|
||||
<template>
|
||||
<view class="login-container">
|
||||
<!-- Logo和标题区域 -->
|
||||
<view class="header-section">
|
||||
<view class="logo-box">
|
||||
<image class="logo" :src="globalConfig.appInfo.logo" mode="aspectFit"></image>
|
||||
<view class="normal-login-container">
|
||||
<view class="background-decoration"></view>
|
||||
|
||||
<view class="logo-content">
|
||||
<view class="logo-wrapper">
|
||||
<image class="logo-image" :src="globalConfig.appInfo.logo" mode="aspectFit"></image>
|
||||
</view>
|
||||
<text class="app-title">智聪科技</text>
|
||||
<text class="app-subtitle">专业的全栈开发平台</text>
|
||||
<text class="title">智聪科技</text>
|
||||
<text class="subtitle">专业的全栈开发平台</text>
|
||||
</view>
|
||||
|
||||
<!-- 登录表单卡片 -->
|
||||
<view class="form-card">
|
||||
<!-- 账号输入 -->
|
||||
<view class="input-item">
|
||||
<uni-icons type="person" size="20" color="#999"></uni-icons>
|
||||
<input
|
||||
v-model="loginForm.username"
|
||||
class="input-field"
|
||||
type="text"
|
||||
placeholder="请输入账号"
|
||||
placeholder-class="placeholder"
|
||||
maxlength="30"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 密码输入 -->
|
||||
<view class="input-item">
|
||||
<uni-icons type="locked" size="20" color="#999"></uni-icons>
|
||||
<input
|
||||
v-model="loginForm.password"
|
||||
type="text"
|
||||
password
|
||||
class="input-field"
|
||||
placeholder="请输入密码"
|
||||
placeholder-class="placeholder"
|
||||
maxlength="20"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 用户协议 -->
|
||||
<view class="agreement-box">
|
||||
<view class="agreement-row" @click="agreeChange">
|
||||
<view :class="['checkbox-small', agree ? 'checked' : '']">
|
||||
<uni-icons v-if="agree" type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
|
||||
<view class="login-form-content">
|
||||
<view class="form-card">
|
||||
<view class="input-item">
|
||||
<view class="input-icon">
|
||||
<uni-icons type="person" size="20" color="#667eea"></uni-icons>
|
||||
</view>
|
||||
<text class="agreement-text">已阅读并同意</text>
|
||||
<text class="link-text" @click.stop="handleUserAgrement">《用户协议》</text>
|
||||
<text class="agreement-text">和</text>
|
||||
<text class="link-text" @click.stop="handlePrivacy">《隐私协议》</text>
|
||||
<input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" />
|
||||
</view>
|
||||
|
||||
<view class="input-item">
|
||||
<view class="input-icon">
|
||||
<uni-icons type="locked" size="20" color="#667eea"></uni-icons>
|
||||
</view>
|
||||
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
|
||||
</view>
|
||||
|
||||
<view class="remember-section">
|
||||
<up-checkbox
|
||||
:customStyle="{marginBottom: '8px'}"
|
||||
label="记住密码"
|
||||
name="agree"
|
||||
usedAlone
|
||||
@change="rememberMeChange()"
|
||||
v-model:checked="rememberMe"
|
||||
>
|
||||
</up-checkbox>
|
||||
</view>
|
||||
|
||||
<view class="action-btn">
|
||||
<button @click="handleLogin" class="login-btn">
|
||||
<text class="btn-text">登录</text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 登录按钮 -->
|
||||
<button @click="handleLogin" class="login-btn">登录</button>
|
||||
|
||||
<!-- 立即注册按钮 -->
|
||||
<view class="register-btn" @click="handleRegister">
|
||||
<text>立即注册</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<view class="copyright">
|
||||
<text>Copyright © 2026 qdintc All Rights Reserved.</text>
|
||||
|
||||
<view class="footer-links">
|
||||
<text @click="handleRegister" class="link-item">立即注册</text>
|
||||
<text class="separator">·</text>
|
||||
<text @click="handleWebsite" class="link-item">官方网站</text>
|
||||
<text class="separator">·</text>
|
||||
<text @click="handleUserAgrement" class="link-item">服务协议</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -82,13 +71,14 @@ const codeUrl = ref("");
|
||||
const captchaEnabled = ref(true); // 是否开启验证码
|
||||
const useWxLogin = ref(false); // 是否使用微信登录
|
||||
const globalConfig = ref(config);
|
||||
const agree = ref(false); // 同意协议
|
||||
const rememberMe = ref(false);
|
||||
const loginForm = ref({
|
||||
tenantId: "000000",
|
||||
username: "admin",
|
||||
password: "LLqRDf6zkmsPVB40",
|
||||
username: "",
|
||||
password: "",
|
||||
code: "",
|
||||
uuid: ''
|
||||
uuid: '',
|
||||
rememberMe: false
|
||||
});
|
||||
|
||||
if (useWxLogin.value) {
|
||||
@@ -104,6 +94,17 @@ if (useWxLogin.value) {
|
||||
}
|
||||
// 页面加载时检查是否记住了密码
|
||||
onMounted(() => {
|
||||
const tenantId = localStorage.getItem('tenantId');
|
||||
const username = localStorage.getItem('username');
|
||||
const password = localStorage.getItem('password');
|
||||
if (tenantId) {
|
||||
loginForm.value.tenantId = tenantId;
|
||||
}
|
||||
if (username && password) {
|
||||
loginForm.value.username = username;
|
||||
loginForm.value.password = decrypt(password);
|
||||
rememberMe.value = true;
|
||||
}
|
||||
});
|
||||
|
||||
// 获取图形验证码
|
||||
@@ -127,8 +128,6 @@ async function handleLogin() {
|
||||
modal.msgError("请输入您的账号")
|
||||
} else if (loginForm.value.password === "") {
|
||||
modal.msgError("请输入您的密码")
|
||||
} else if (!agree.value) {
|
||||
modal.msgError("请先阅读并同意用户协议和隐私协议")
|
||||
} else {
|
||||
modal.loading("登录中,请等待...")
|
||||
pwdLogin()
|
||||
@@ -152,26 +151,34 @@ async function pwdLogin() {
|
||||
})
|
||||
};
|
||||
function loginSuccess(result) {
|
||||
// 设置用户信息
|
||||
userStore.getInfo().then(res => {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/homepage/index'
|
||||
// 保存记住密码信息
|
||||
if (rememberMe.value) {
|
||||
localStorage.setItem('tenantId', loginForm.value.tenantId);
|
||||
localStorage.setItem('username', loginForm.value.username);
|
||||
localStorage.setItem('password', encrypt(loginForm.value.password));
|
||||
} else {
|
||||
rememberMe.value=false
|
||||
localStorage.removeItem('tenantId');
|
||||
localStorage.removeItem('username');
|
||||
localStorage.removeItem('password');
|
||||
}
|
||||
|
||||
// 等待一下确保token保存成功
|
||||
setTimeout(() => {
|
||||
// 设置用户信息
|
||||
userStore.getInfo().then(res => {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/homepage/index'
|
||||
});
|
||||
}).catch(err => {
|
||||
modal.msgError('获取用户信息失败,请重新登录');
|
||||
});
|
||||
}).catch(err => {
|
||||
modal.msgError('获取用户信息失败,请重新登录');
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function agreeChange(){
|
||||
agree.value = !agree.value;
|
||||
}
|
||||
function rememberMeChange(){
|
||||
rememberMe.value = !rememberMe.value;
|
||||
|
||||
// 隐私协议
|
||||
function handlePrivacy() {
|
||||
let site = globalConfig.value.appInfo.agreements[0]
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/webview/index?title=${site.title}&url=${site.url}`
|
||||
});
|
||||
}
|
||||
// 官方网址
|
||||
function handleWebsite() {
|
||||
@@ -192,184 +199,175 @@ getCode();
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 48rpx;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.header-section {
|
||||
padding-top: 120rpx;
|
||||
.normal-login-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 80rpx;
|
||||
position: relative;
|
||||
|
||||
.logo-box {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 32rpx;
|
||||
box-shadow: 0 16rpx 48rpx rgba(0, 0, 0, 0.2);
|
||||
.background-decoration {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.logo-content {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding-top: 120rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
.logo {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
.logo-wrapper {
|
||||
display: inline-block;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.logo-image {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 28rpx;
|
||||
box-shadow: 0 16rpx 48rpx rgba(0, 0, 0, 0.2);
|
||||
background: #ffffff;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
display: block;
|
||||
font-size: 48rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.app-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #ffffff;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.app-subtitle {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.form-card {
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 24rpx;
|
||||
padding: 48rpx 40rpx 40rpx;
|
||||
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.input-item {
|
||||
height: 88rpx;
|
||||
background: #f7f8fa;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:focus-within {
|
||||
background-color: #eff1f5;
|
||||
}
|
||||
|
||||
.input-field {
|
||||
.login-form-content {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
}
|
||||
|
||||
.agreement-box {
|
||||
margin-bottom: 32rpx;
|
||||
margin-top: 24rpx;
|
||||
padding: 0 4rpx;
|
||||
|
||||
.agreement-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
line-height: 1.6;
|
||||
margin-top: 80rpx;
|
||||
padding: 0 48rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
.checkbox-small {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
border: 2rpx solid #dcdfe6;
|
||||
border-radius: 50%;
|
||||
.form-card {
|
||||
background: #ffffff;
|
||||
border-radius: 32rpx;
|
||||
padding: 48rpx 40rpx;
|
||||
box-shadow: 0 16rpx 48rpx rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.input-item {
|
||||
margin-bottom: 32rpx;
|
||||
background-color: #f5f7fa;
|
||||
height: 96rpx;
|
||||
border-radius: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 10rpx;
|
||||
flex-shrink: 0;
|
||||
padding: 0 32rpx;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&.checked {
|
||||
background: #667eea;
|
||||
border-color: #667eea;
|
||||
&:focus-within {
|
||||
background-color: #eff1f5;
|
||||
box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
margin-right: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #303133;
|
||||
|
||||
&::placeholder {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.agreement-text {
|
||||
font-size: 24rpx;
|
||||
color: #606266;
|
||||
line-height: 1.6;
|
||||
.remember-section {
|
||||
margin-bottom: 40rpx;
|
||||
padding-left: 8rpx;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
margin-top: 48rpx;
|
||||
|
||||
.login-btn {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-radius: 48rpx;
|
||||
border: none;
|
||||
box-shadow: 0 12rpx 32rpx rgba(102, 126, 234, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.3);
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
text-align: center;
|
||||
padding: 60rpx 0 80rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16rpx;
|
||||
|
||||
.link-item {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 26rpx;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.link-text {
|
||||
font-size: 24rpx;
|
||||
color: #667eea;
|
||||
text-decoration: none;
|
||||
line-height: 1.6;
|
||||
.separator {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-radius: 44rpx;
|
||||
border: none;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
&:active {
|
||||
opacity: 0.9;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
}
|
||||
|
||||
.register-btn {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
background: transparent;
|
||||
border: 2rpx solid #667eea;
|
||||
border-radius: 44rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
text {
|
||||
font-size: 32rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
background: rgba(102, 126, 234, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
.copyright {
|
||||
text-align: center;
|
||||
padding: 40rpx 0 60rpx;
|
||||
|
||||
text {
|
||||
font-size: 22rpx;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -230,7 +230,7 @@ page {
|
||||
background-color: #f5f7fa;
|
||||
|
||||
.header-section {
|
||||
padding: 160rpx 32rpx 80rpx;
|
||||
padding: 40rpx 32rpx 80rpx;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</view>
|
||||
|
||||
<view class="footer-section">
|
||||
<text class="copyright-text">Copyright © 2026 qdintc All Rights Reserved.</text>
|
||||
<text class="copyright-text">Copyright © 2026 All Rights Reserved.</text>
|
||||
</view>
|
||||
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
@@ -133,14 +133,16 @@ uni.navigateTo({ url: `/pages/login` })
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.register-container {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<image class="logo-image" src="/static/logo.png" mode="aspectFit"></image>
|
||||
<view class="logo-shine"></view>
|
||||
</view>
|
||||
<text class="app-name">智聪科技</text>
|
||||
<text class="app-slogan">专业的全栈开发平台</text>
|
||||
<text class="app-name">智聪网络科技</text>
|
||||
<text class="app-slogan">专业的健康管理工具</text>
|
||||
</view>
|
||||
|
||||
<view class="info-card">
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title }}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="参数名称" prop="configName" required>
|
||||
<u--input v-model="form.configName" placeholder="请输入参数名称"
|
||||
@@ -20,17 +26,15 @@
|
||||
inputAlign="left" :customStyle="getInputStyle('configValue')"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="系统内置" prop="typeName" @click="showTypePicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u-form-item label="系统内置" prop="typeName" @click="showTypePicker = true" class="with-arrow">
|
||||
<u--input v-model="typeName" disabled disabledColor="#ffffff" placeholder="请选择系统内置"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;height:160rpx"></u--textarea>
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" autoHeight inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
@@ -74,10 +78,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
height: '68rpx'
|
||||
}
|
||||
|
||||
// 输入框错误样式
|
||||
@@ -86,10 +87,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
height: '68rpx'
|
||||
}
|
||||
|
||||
// 根据字段名获取输入框样式
|
||||
@@ -227,19 +225,17 @@ function submit() {
|
||||
}
|
||||
}
|
||||
|
||||
.input-with-arrow {
|
||||
.select-input-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.arrow-icon {
|
||||
.select-arrow {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
right: 24rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 20rpx;
|
||||
font-size: 28rpx;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -258,29 +254,4 @@ function submit() {
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 强制统一所有输入框宽度 */
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 确保输入框内的文字垂直居中 */
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="参数详情"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">参数信息</view>
|
||||
<view class="section-content">
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.configName" border="false" placeholder="请输入参数名称" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
@@ -256,22 +255,24 @@ page {
|
||||
padding: 20rpx 24rpx;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
gap: 16rpx;
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.add-btn {
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 66rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
@@ -293,6 +294,34 @@ page {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
margin-left: 10rpx;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(102, 126, 234, 0.12);
|
||||
}
|
||||
|
||||
text {
|
||||
color: #667eea;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
position: absolute;
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title }}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="上级部门" prop="parentName" @click="showDeptPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u-form-item label="上级部门" prop="parentName" @click="showDeptPicker = true" class="with-arrow">
|
||||
|
||||
<u--input v-model="parentName" disabled disabledColor="#ffffff" placeholder="请选择上级部门"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
|
||||
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="部门名称" prop="deptName" required>
|
||||
@@ -37,12 +43,11 @@
|
||||
inputAlign="left" :customStyle="getInputStyle('email')"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true" class="with-arrow">
|
||||
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
@@ -93,10 +98,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
height: '68rpx'
|
||||
}
|
||||
|
||||
// 输入框错误样式
|
||||
@@ -105,10 +107,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
height: '68rpx'
|
||||
}
|
||||
|
||||
// 根据字段名获取输入框样式
|
||||
@@ -321,19 +320,17 @@ function submit() {
|
||||
}
|
||||
}
|
||||
|
||||
.input-with-arrow {
|
||||
.select-input-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.arrow-icon {
|
||||
.select-arrow {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
right: 24rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 20rpx;
|
||||
font-size: 28rpx;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -352,29 +349,4 @@ function submit() {
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 强制统一所有输入框宽度 */
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 确保输入框内的文字垂直居中 */
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="部门详情"
|
||||
>
|
||||
</u-navbar>
|
||||
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.deptName" border="false" placeholder="请输入部门名称" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title }}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="160rpx"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="字典名称" prop="dictName" required>
|
||||
<u--input v-model="form.dictName" placeholder="请输入字典名称"
|
||||
@@ -14,10 +20,9 @@
|
||||
<u--input v-model="form.dictType" placeholder="请输入字典类型"
|
||||
inputAlign="left" :customStyle="getInputStyle('dictType')"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;height:160rpx"></u--textarea>
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" autoHeight inputAlign="right" count
|
||||
maxlength="500" class="form-textarea" height="160" style="border: 2rpx solid #dcdfe6 !important;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
@@ -25,7 +30,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -54,8 +58,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -66,8 +69,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -103,28 +105,20 @@ function getDetail(id) {
|
||||
// 提交
|
||||
function submit() {
|
||||
errorFields.value = [] // 清空错误字段
|
||||
console.log('submit 被调用')
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
console.log('验证通过', form.dictId)
|
||||
if (form.dictId) {
|
||||
updateType(form).then(() => {
|
||||
console.log('修改成功,将跳转')
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
console.log('complete 被调用,执行跳转')
|
||||
uni.navigateTo({ url: `/pages_mine/pages/system/dict/list` })
|
||||
}
|
||||
})
|
||||
proxy.$modal.msgSuccess('修改成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: `/pages_mine/pages/system/dict/list` })
|
||||
}, 1500)
|
||||
})
|
||||
} else {
|
||||
addType(form).then(() => {
|
||||
console.log('新增成功,将跳转')
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
console.log('complete 被调用,执行跳转')
|
||||
uni.navigateTo({ url: `/pages_mine/pages/system/dict/list` })
|
||||
}
|
||||
})
|
||||
proxy.$modal.msgSuccess('新增成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: `/pages_mine/pages/system/dict/list` })
|
||||
}, 1500)
|
||||
})
|
||||
}
|
||||
}).catch((errors) => {
|
||||
@@ -173,25 +167,18 @@ function submit() {
|
||||
.form-view {
|
||||
padding: 24rpx;
|
||||
|
||||
.remark-count {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #909399;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.form-btn {
|
||||
padding-top: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select-input-wrapper {
|
||||
position: relative;
|
||||
|
||||
.select-arrow {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 28rpx;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -208,27 +195,4 @@ function submit() {
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="字典详情"
|
||||
>
|
||||
</u-navbar>
|
||||
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.dictName" border="false" placeholder="请输入字典名称" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title }}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="160rpx"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="字典类型">
|
||||
<u--input v-model="form.dictType" disabled disabledColor="#ffffff" placeholder="字典类型"
|
||||
@@ -25,17 +31,13 @@
|
||||
inputAlign="left" :customStyle="getInputStyle('dictSort')"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="回显样式" prop="listClassName" @click="showListClassPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u-form-item label="回显样式" prop="listClassName" @click="showListClassPicker = true" class="with-arrow">
|
||||
<u--input v-model="listClassName" disabled disabledColor="#ffffff" placeholder="请选择回显样式"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;height:160rpx"></u--textarea>
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" autoHeight inputAlign="right" count
|
||||
maxlength="500" class="form-textarea" height="160" style="border: 2rpx solid #dcdfe6 !important;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
@@ -87,10 +89,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
height: '68rpx'
|
||||
}
|
||||
|
||||
// 输入框错误样式
|
||||
@@ -99,10 +98,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
height: '68rpx'
|
||||
}
|
||||
|
||||
// 根据字段名获取输入框样式
|
||||
@@ -239,19 +235,17 @@ function submit() {
|
||||
}
|
||||
}
|
||||
|
||||
.input-with-arrow {
|
||||
.select-input-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.arrow-icon {
|
||||
.select-arrow {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
right: 24rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 20rpx;
|
||||
font-size: 28rpx;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -270,27 +264,4 @@ function submit() {
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="数据详情"
|
||||
>
|
||||
</u-navbar>
|
||||
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
</view>
|
||||
<view class="search-row">
|
||||
<u--input v-model="queryParams.dictLabel" border="false" placeholder="请输入字典标签" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
@@ -282,7 +281,6 @@ page {
|
||||
padding: 20rpx 24rpx;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
gap: 16rpx;
|
||||
|
||||
.dict-name-row {
|
||||
@@ -318,18 +316,23 @@ page {
|
||||
}
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.add-btn {
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 66rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
@@ -351,6 +354,34 @@ page {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
margin-left: 10rpx;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(102, 126, 234, 0.12);
|
||||
}
|
||||
|
||||
text {
|
||||
color: #667eea;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
position: absolute;
|
||||
|
||||
@@ -43,7 +43,7 @@ function navigateTo(path) {
|
||||
uni.navigateTo({
|
||||
url: path
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -57,7 +57,7 @@ function navigateTo(path) {
|
||||
/* #endif */
|
||||
|
||||
.content {
|
||||
padding: 120rpx 0 12rpx 0;
|
||||
padding: 12rpx 0;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.userName" border="false" placeholder="请输入用户名称" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
@@ -505,7 +504,7 @@ page {
|
||||
padding: 24rpx;
|
||||
background: #fafbfc;
|
||||
border: 2rpx solid #f0f2f5;
|
||||
margin: 15rpx 16rpx 15rpx;
|
||||
margin: 15rpx 16rpx 2rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title }}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
|
||||
<u-form-item label="上级菜单" prop="parentName" @click="showParentPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="parentName" disabled disabledColor="#ffffff" placeholder="请选择上级菜单"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="上级菜单" prop="parentName" @click="showParentPicker = true" class="with-arrow">
|
||||
<u--input v-model="parentName" disabled disabledColor="#ffffff" placeholder="请选择上级菜单"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="菜单类型" prop="menuTypeName" @click="showMenuTypePicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="menuTypeName" disabled disabledColor="#ffffff" placeholder="请选择菜单类型"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="菜单类型" prop="menuTypeName" @click="showMenuTypePicker = true" class="with-arrow">
|
||||
<u--input v-model="menuTypeName" disabled disabledColor="#ffffff" placeholder="请选择菜单类型"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="菜单名称" prop="menuName" required>
|
||||
@@ -46,36 +46,24 @@
|
||||
inputAlign="left" :customStyle="getInputStyle('perms')"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="是否外链" v-if="form.menuType !== 'F'" @click="showFramePicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="frameName" disabled disabledColor="#ffffff" placeholder="请选择"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="是否外链" v-if="form.menuType !== 'F'" @click="showFramePicker = true" class="with-arrow">
|
||||
<u--input v-model="frameName" disabled disabledColor="#ffffff" placeholder="请选择"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="是否缓存" v-if="form.menuType === 'C'" @click="showCachePicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="cacheName" disabled disabledColor="#ffffff" placeholder="请选择"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="是否缓存" v-if="form.menuType === 'C'" @click="showCachePicker = true" class="with-arrow">
|
||||
<u--input v-model="cacheName" disabled disabledColor="#ffffff" placeholder="请选择"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="显示状态" v-if="form.menuType !== 'F'" @click="showVisiblePicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="visibleName" disabled disabledColor="#ffffff" placeholder="请选择"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="显示状态" v-if="form.menuType !== 'F'" @click="showVisiblePicker = true" class="with-arrow">
|
||||
<u--input v-model="visibleName" disabled disabledColor="#ffffff" placeholder="请选择"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="菜单状态" prop="statusName" @click="showStatusPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="菜单状态" prop="statusName" @click="showStatusPicker = true" class="with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
</u--form>
|
||||
@@ -175,8 +163,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -187,8 +174,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -434,36 +420,6 @@ function submit() {
|
||||
.form-btn {
|
||||
padding-top: 16rpx;
|
||||
}
|
||||
|
||||
.input-with-arrow {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.arrow-icon {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 20rpx;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select-input-wrapper {
|
||||
position: relative;
|
||||
|
||||
.select-arrow {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 28rpx;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -482,27 +438,4 @@ function submit() {
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.menuName" border="false" placeholder="请输入菜单名称" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
|
||||
@@ -1,87 +1,77 @@
|
||||
<template>
|
||||
<view class="container" style="padding-bottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">公告信息</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }">
|
||||
<u--form labelPosition="left" :model="form" ref="uForm" labelWidth="160rpx"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="公告标题" prop="noticeTitle" required>
|
||||
<u--input v-model="form.noticeTitle" placeholder="请输入公告标题"
|
||||
<u--input v-model="form.noticeTitle" placeholder="请输入公告标题"
|
||||
inputAlign="left" :customStyle="getInputStyle('noticeTitle')"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="公告类型" prop="noticeTypeName" required @click="showNoticeTypePicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="noticeTypeName" disabled disabledColor="#ffffff" placeholder="请选择公告类型"
|
||||
inputAlign="left" :customStyle="getInputStyle('noticeType')"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
|
||||
<u-form-item label="公告类型" prop="noticeType" required @click="showNoticeTypePicker = true" class="with-arrow">
|
||||
<u--input v-model="noticeTypeName" disabled disabledColor="#ffffff" placeholder="请选择公告类型"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="状态" prop="status" @click="showStatusPicker = true" class="with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="内容" prop="noticeContent" labelPosition="top">
|
||||
<view class="editor-container">
|
||||
<view class="editor-toolbar">
|
||||
<view class="toolbar-item" @click="format('bold')">
|
||||
<text class="iconfont">B</text>
|
||||
</view>
|
||||
<view class="toolbar-item" @click="format('italic')">
|
||||
<text class="iconfont italic">I</text>
|
||||
</view>
|
||||
<view class="toolbar-item" @click="format('underline')">
|
||||
<text class="iconfont underline">U</text>
|
||||
</view>
|
||||
<view class="toolbar-divider"></view>
|
||||
<view class="toolbar-item" @click="insertImage">
|
||||
<uni-icons type="image" size="16" color="#333333"></uni-icons>
|
||||
</view>
|
||||
<view class="toolbar-divider"></view>
|
||||
<view class="toolbar-item" @click="undo">
|
||||
<text class="iconfont">↶</text>
|
||||
</view>
|
||||
<view class="toolbar-item" @click="redo">
|
||||
<text class="iconfont">↷</text>
|
||||
</view>
|
||||
</view>
|
||||
<editor
|
||||
id="editor"
|
||||
class="editor-content"
|
||||
:placeholder="'请输入公告内容'"
|
||||
@ready="onEditorReady"
|
||||
@input="onEditorInput"
|
||||
@focus="editorFocus"
|
||||
@blur="editorBlur"
|
||||
:show-img-size="true"
|
||||
:show-img-toolbar="true"
|
||||
:show-img-resize="true"
|
||||
></editor>
|
||||
<view class="editor-counter">
|
||||
<text>{{ contentLength }}/20000</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
|
||||
<!-- 富文本编辑器独立布局 -->
|
||||
<view class="editor-field">
|
||||
<view class="editor-label">
|
||||
<text class="required-star">*</text>
|
||||
<text>内容</text>
|
||||
</view>
|
||||
<view class="editor-container">
|
||||
<view class="editor-toolbar">
|
||||
<view class="toolbar-item" @click="format('bold')">
|
||||
<text class="iconfont">B</text>
|
||||
</view>
|
||||
<view class="toolbar-item" @click="format('italic')">
|
||||
<text class="iconfont italic">I</text>
|
||||
</view>
|
||||
<view class="toolbar-item" @click="format('underline')">
|
||||
<text class="iconfont underline">U</text>
|
||||
</view>
|
||||
<view class="toolbar-divider"></view>
|
||||
<view class="toolbar-item" @click="insertImage">
|
||||
<uni-icons type="image" size="16" color="#333333"></uni-icons>
|
||||
</view>
|
||||
<view class="toolbar-divider"></view>
|
||||
<view class="toolbar-item" @click="undo">
|
||||
<text class="iconfont">↶</text>
|
||||
</view>
|
||||
<view class="toolbar-item" @click="redo">
|
||||
<text class="iconfont">↷</text>
|
||||
</view>
|
||||
</view>
|
||||
<editor
|
||||
id="editor"
|
||||
class="editor-content"
|
||||
:placeholder="'请输入公告内容'"
|
||||
@ready="onEditorReady"
|
||||
@input="onEditorInput"
|
||||
@focus="editorFocus"
|
||||
@blur="editorBlur"
|
||||
:show-img-size="true"
|
||||
:show-img-toolbar="true"
|
||||
:show-img-resize="true"
|
||||
></editor>
|
||||
<view class="editor-counter">
|
||||
<text>{{ contentLength }}/20000</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u--form labelPosition="left" :model="form" ref="uFormHidden" style="display: none;">
|
||||
<u-form-item label="" prop="noticeContent"></u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
<u-button type="primary" text="保存" @click="submitForm"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
|
||||
<!-- 公告类型选择器 -->
|
||||
<u-picker itemHeight="88" :show="showNoticeTypePicker" :columns="noticeTypeColumns" keyName="dictLabel"
|
||||
@@ -94,7 +84,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, getCurrentInstance } from 'vue'
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue'
|
||||
import { getNotice, addNotice, updateNotice } from '@/api/system/notice'
|
||||
import { getDicts } from "@/api/system/dict/data"
|
||||
import { onLoad, onReady } from "@dcloudio/uni-app"
|
||||
@@ -104,16 +94,14 @@ const title = ref('新增公告')
|
||||
const noticeId = ref(undefined)
|
||||
const noticeTypeList = ref([])
|
||||
const statusList = ref([])
|
||||
const editorCtx = ref(null)
|
||||
const contentLength = ref(0)
|
||||
const noticeTypeColumns = ref([])
|
||||
const statusColumns = ref([])
|
||||
const showNoticeTypePicker = ref(false)
|
||||
const showStatusPicker = ref(false)
|
||||
const noticeTypeName = ref('')
|
||||
const statusName = ref('')
|
||||
|
||||
// picker 列数据
|
||||
const noticeTypeColumns = ref([])
|
||||
const statusColumns = ref([])
|
||||
const editorCtx = ref(null)
|
||||
const contentLength = ref(0)
|
||||
|
||||
const form = reactive({
|
||||
noticeId: undefined,
|
||||
@@ -132,8 +120,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -144,8 +131,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -155,30 +141,23 @@ const getInputStyle = (field) => {
|
||||
return errorFields.value.includes(field) ? inputErrorStyle : inputBaseStyle
|
||||
}
|
||||
|
||||
const rules = {
|
||||
noticeTitle: [
|
||||
{ required: true, message: '公告标题不能为空', trigger: ['blur', 'change'] }
|
||||
],
|
||||
noticeType: [
|
||||
{ required: true, message: '公告类型不能为空', trigger: ['blur', 'change'] }
|
||||
],
|
||||
noticeContent: [
|
||||
{ required: true, message: '公告内容不能为空', trigger: ['blur', 'change'] }
|
||||
]
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
if (options.id) {
|
||||
noticeId.value = options.id
|
||||
title.value = '修改公告'
|
||||
getNotice(noticeId.value).then(response => {
|
||||
Object.assign(form, response.data)
|
||||
// 更新显示名称
|
||||
updateNoticeTypeName()
|
||||
updateStatusName()
|
||||
// 如果编辑器已经初始化,设置内容
|
||||
if (editorCtx.value && form.noticeContent) {
|
||||
editorCtx.value.setContents({
|
||||
html: form.noticeContent
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取公告详情失败:', error)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -186,23 +165,28 @@ onLoad((options) => {
|
||||
getDicts('sys_notice_type').then(res => {
|
||||
noticeTypeList.value = res.data
|
||||
noticeTypeColumns.value = [res.data]
|
||||
updateNoticeTypeName()
|
||||
// 如果是新增模式,设置默认值
|
||||
if (!noticeId.value && res.data.length > 0) {
|
||||
form.noticeType = res.data[0].dictValue
|
||||
noticeTypeName.value = res.data[0].dictLabel
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取公告类型字典失败:', error)
|
||||
})
|
||||
|
||||
getDicts('sys_notice_status').then(res => {
|
||||
statusList.value = res.data
|
||||
statusColumns.value = [res.data]
|
||||
// 更新状态显示
|
||||
updateStatusName()
|
||||
}).catch(error => {
|
||||
console.error('获取公告状态字典失败:', error)
|
||||
})
|
||||
})
|
||||
|
||||
onReady(() => {
|
||||
// 页面准备完成后的一些初始化操作
|
||||
})
|
||||
|
||||
// 更新公告类型显示名称
|
||||
function updateNoticeTypeName() {
|
||||
if (form.noticeType && noticeTypeList.value.length > 0) {
|
||||
if (noticeTypeList.value.length > 0) {
|
||||
const item = noticeTypeList.value.find(v => v.dictValue === form.noticeType)
|
||||
noticeTypeName.value = item ? item.dictLabel : ''
|
||||
}
|
||||
@@ -210,7 +194,7 @@ function updateNoticeTypeName() {
|
||||
|
||||
// 更新状态显示名称
|
||||
function updateStatusName() {
|
||||
if (form.status && statusList.value.length > 0) {
|
||||
if (statusList.value.length > 0) {
|
||||
const item = statusList.value.find(v => v.dictValue === form.status)
|
||||
statusName.value = item ? item.dictLabel : ''
|
||||
}
|
||||
@@ -230,6 +214,10 @@ function handleStatusConfirm(e) {
|
||||
showStatusPicker.value = false
|
||||
}
|
||||
|
||||
onReady(() => {
|
||||
// 页面准备完成后的一些初始化操作
|
||||
})
|
||||
|
||||
// 编辑器初始化完成
|
||||
function onEditorReady() {
|
||||
uni.createSelectorQuery().select('#editor').context((res) => {
|
||||
@@ -333,7 +321,8 @@ function insertImage() {
|
||||
icon: 'success'
|
||||
})
|
||||
},
|
||||
fail: () => {
|
||||
fail: (err) => {
|
||||
console.error('插入图片失败', err)
|
||||
uni.showToast({
|
||||
title: '插入失败',
|
||||
icon: 'none'
|
||||
@@ -348,32 +337,35 @@ function insertImage() {
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('解析上传结果失败', e)
|
||||
uni.showToast({
|
||||
title: '上传失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
fail: (err) => {
|
||||
uni.hideLoading()
|
||||
console.error('上传失败', err)
|
||||
uni.showToast({
|
||||
title: '上传失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('选择图片失败', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
async function submitForm() {
|
||||
errorFields.value = [] // 清空错误字段
|
||||
|
||||
try {
|
||||
// 提交前确保获取最新的编辑器内容
|
||||
if (editorCtx.value) {
|
||||
await new Promise((resolve, reject) => {
|
||||
const content = await new Promise((resolve, reject) => {
|
||||
editorCtx.value.getContents({
|
||||
success: (res) => {
|
||||
form.noticeContent = res.html
|
||||
@@ -382,24 +374,36 @@ async function submitForm() {
|
||||
fail: reject
|
||||
})
|
||||
})
|
||||
|
||||
// 确保内容已更新到表单
|
||||
await nextTick()
|
||||
}
|
||||
|
||||
// 使用 UView 表单验证
|
||||
const { proxy } = getCurrentInstance()
|
||||
await proxy.$refs['uForm'].validate()
|
||||
|
||||
// 验证通过,提交数据
|
||||
doSubmit()
|
||||
} catch (errors) {
|
||||
// 记录验证失败的字段
|
||||
if (errors && Array.isArray(errors)) {
|
||||
errorFields.value = errors.map(err => err.field || err.prop)
|
||||
}
|
||||
modal.msgError('请填写完整信息')
|
||||
} catch (error) {
|
||||
modal.msgError('获取内容失败,请重试')
|
||||
}
|
||||
}
|
||||
|
||||
function doSubmit() {
|
||||
errorFields.value = [] // 清空错误字段
|
||||
|
||||
if (!form.noticeTitle) {
|
||||
errorFields.value.push('noticeTitle')
|
||||
modal.msgError('请输入公告标题')
|
||||
return
|
||||
}
|
||||
if (!form.noticeType) {
|
||||
errorFields.value.push('noticeType')
|
||||
modal.msgError('请选择公告类型')
|
||||
return
|
||||
}
|
||||
if (!form.noticeContent || form.noticeContent.trim() === '') {
|
||||
errorFields.value.push('noticeContent')
|
||||
modal.msgError('请输入公告内容')
|
||||
return
|
||||
}
|
||||
|
||||
const submitForm = { ...form }
|
||||
|
||||
if (noticeId.value) {
|
||||
@@ -463,65 +467,6 @@ function doSubmit() {
|
||||
.form-btn {
|
||||
padding-top: 16rpx;
|
||||
}
|
||||
|
||||
// 带箭头的输入框容器
|
||||
.input-with-arrow {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.arrow-icon {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 20rpx;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
/* 确保表单项正常布局 */
|
||||
.u-form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&[labelPosition="top"] {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* 富文本编辑器独立字段 */
|
||||
.editor-field {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.editor-label {
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.required-star {
|
||||
color: #f56c6c;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select-input-wrapper {
|
||||
position: relative;
|
||||
|
||||
.select-arrow {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 28rpx;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -628,27 +573,4 @@ function doSubmit() {
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="公告详情"
|
||||
>
|
||||
</u-navbar>
|
||||
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.noticeTitle" border="false" placeholder="请输入公告标题" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
@@ -279,22 +278,24 @@ page {
|
||||
padding: 20rpx 24rpx;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
gap: 16rpx;
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.add-btn {
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 66rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
@@ -316,6 +317,34 @@ page {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
margin-left: 10rpx;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(102, 126, 234, 0.12);
|
||||
}
|
||||
|
||||
text {
|
||||
color: #667eea;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
position: absolute;
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.title" border="false" placeholder="请输入系统模块" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
@@ -572,7 +571,7 @@ page {
|
||||
padding: 24rpx;
|
||||
background: #fafbfc;
|
||||
border: 2rpx solid #f0f2f5;
|
||||
margin: 15rpx 16rpx 15rpx;
|
||||
margin: 15rpx 16rpx 2rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title }}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="岗位名称" prop="postName" required>
|
||||
<u--input v-model="form.postName" placeholder="请输入岗位名称" maxlength="30"
|
||||
@@ -19,17 +25,14 @@
|
||||
<u-number-box v-model="form.postSort" :min="0" :max="999" inputAlign="right"></u-number-box>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true" class="with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;height:160rpx"></u--textarea>
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" autoHeight inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
@@ -37,7 +40,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-picker itemHeight="88" :show="showStatusPicker" :columns="statusList" keyName="dictLabel" @cancel="showStatusPicker = false"
|
||||
@confirm="handleStatusConfirm"></u-picker>
|
||||
</view>
|
||||
@@ -73,8 +75,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -85,8 +86,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -147,22 +147,19 @@ function handleStatusConfirm(e) {
|
||||
function submit() {
|
||||
errorFields.value = [] // 清空错误字段
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
console.log('提交的表单数据:', form)
|
||||
if (form.postId) {
|
||||
updatePost(form).then(() => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages_mine/pages/system/post/list` })
|
||||
}
|
||||
})
|
||||
proxy.$modal.msgSuccess('修改成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: `/pages_mine/pages/system/post/list` })
|
||||
}, 1500)
|
||||
})
|
||||
} else {
|
||||
addPost(form).then(() => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages_mine/pages/system/post/list` })
|
||||
}
|
||||
})
|
||||
proxy.$modal.msgSuccess('新增成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: `/pages_mine/pages/system/post/list` })
|
||||
}, 1500)
|
||||
})
|
||||
}
|
||||
}).catch((errors) => {
|
||||
@@ -212,22 +209,6 @@ function submit() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-with-arrow {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.arrow-icon {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 20rpx;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -244,29 +225,4 @@ function submit() {
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 强制统一所有输入框宽度 */
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 确保输入框内的文字垂直居中 */
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="岗位详情"
|
||||
>
|
||||
</u-navbar>
|
||||
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.postName" border="false" placeholder="请输入岗位名称" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
@@ -256,22 +255,24 @@ page {
|
||||
padding: 20rpx 24rpx;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
gap: 16rpx;
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.add-btn {
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 66rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
@@ -293,6 +294,34 @@ page {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
margin-left: 10rpx;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(102, 126, 234, 0.12);
|
||||
}
|
||||
|
||||
text {
|
||||
color: #667eea;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title }}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
|
||||
<u-form-item label="角色名称" prop="roleName" required>
|
||||
@@ -20,25 +26,19 @@
|
||||
<u-number-box v-model="form.roleSort" :min="0" :max="999" inputAlign="right"></u-number-box>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true" class="with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;height:160rpx"></u--textarea>
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" autoHeight inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;"></u--textarea>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="菜单权限" @click="openMenuPicker">
|
||||
<view class="input-with-arrow">
|
||||
<u--input :value="menuPermissionText" disabled disabledColor="#ffffff" placeholder="请选择菜单权限"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="菜单权限" @click="openMenuPicker" class="with-arrow">
|
||||
<u--input :value="menuPermissionText" disabled disabledColor="#ffffff" placeholder="请选择菜单权限"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<!-- 已选菜单标签展示 -->
|
||||
@@ -158,8 +158,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -170,8 +169,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -536,22 +534,6 @@ function submit() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-with-arrow {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.arrow-icon {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 20rpx;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -568,29 +550,4 @@ function submit() {
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 强制统一所有输入框宽度 */
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 确保输入框内的文字垂直居中 */
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.roleName" border="false" placeholder="请输入角色名称" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
@@ -253,22 +252,24 @@ page {
|
||||
padding: 20rpx 24rpx;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
gap: 16rpx;
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.add-btn {
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 66rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
@@ -290,6 +291,34 @@ page {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
margin-left: 10rpx;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(102, 126, 234, 0.12);
|
||||
}
|
||||
|
||||
text {
|
||||
color: #667eea;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
position: absolute;
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
:title="title"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title }}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="140rpx"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="160rpx"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="用户昵称" prop="nickName" required>
|
||||
<u--input v-model="form.nickName" placeholder="请输入用户昵称" maxlength="30"
|
||||
inputAlign="left" :customStyle="getInputStyle('nickName')"></u--input>
|
||||
@@ -30,28 +36,19 @@
|
||||
inputAlign="left" :customStyle="getInputStyle('email')"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="用户性别" prop="sexName" @click="showSexPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="sexName" disabled disabledColor="#ffffff" placeholder="请选择性别"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="用户性别" prop="sexName" @click="showSexPicker = true" class="with-arrow">
|
||||
<u--input v-model="sexName" disabled disabledColor="#ffffff" placeholder="请选择性别"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="归属部门" prop="deptName" @click="showDeptPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="deptName" disabled disabledColor="#ffffff" placeholder="请选择归属部门"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="归属部门" prop="deptName" @click="showDeptPicker = true" class="with-arrow">
|
||||
<u--input v-model="deptName" disabled disabledColor="#ffffff" placeholder="请选择归属部门"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="岗位" prop="postNames" @click="openPostPicker">
|
||||
<view class="input-with-arrow">
|
||||
<u--input :value="postNamesText" disabled disabledColor="#ffffff" placeholder="请选择岗位"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="岗位" prop="postNames" @click="openPostPicker" class="with-arrow">
|
||||
<u--input :value="postNamesText" disabled disabledColor="#ffffff" placeholder="请选择岗位"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<!-- 已选岗位标签展示 -->
|
||||
@@ -64,12 +61,9 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-form-item label="角色" prop="roleNames" @click="openRolePicker">
|
||||
<view class="input-with-arrow">
|
||||
<u--input :value="roleNamesText" disabled disabledColor="#ffffff" placeholder="请选择角色"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="角色" prop="roleNames" @click="openRolePicker" class="with-arrow">
|
||||
<u--input :value="roleNamesText" disabled disabledColor="#ffffff" placeholder="请选择角色"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<!-- 已选角色标签展示 -->
|
||||
@@ -82,16 +76,14 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true">
|
||||
<view class="input-with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
<text class="arrow-icon">▼</text>
|
||||
</view>
|
||||
<u-form-item label="状态" prop="statusName" @click="showStatusPicker = true" class="with-arrow">
|
||||
<u--input v-model="statusName" disabled disabledColor="#ffffff" placeholder="请选择状态"
|
||||
inputAlign="left" :customStyle="inputBaseStyle"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;height:160rpx"></u--textarea>
|
||||
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请输入备注" autoHeight inputAlign="right" count
|
||||
maxlength="500" style="border: 2rpx solid #dcdfe6 !important;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
@@ -117,7 +109,7 @@
|
||||
<u-checkbox-group v-model="tempPostIds">
|
||||
<view v-for="item in postList[0]" :key="item.postId" class="checkbox-item">
|
||||
<u-checkbox :name="item.postId" :label="item.postName" shape="square"
|
||||
activeColor="#667eea" labelSize="30rpx" iconSize="36rpx"></u-checkbox>
|
||||
activeColor="#667eea" labelSize="28rpx"></u-checkbox>
|
||||
</view>
|
||||
</u-checkbox-group>
|
||||
</scroll-view>
|
||||
@@ -139,7 +131,7 @@
|
||||
<u-checkbox-group v-model="tempRoleIds">
|
||||
<view v-for="item in roleList[0]" :key="item.roleId" class="checkbox-item">
|
||||
<u-checkbox :name="item.roleId" :label="item.roleName" shape="square"
|
||||
activeColor="#667eea" labelSize="30rpx" iconSize="36rpx"></u-checkbox>
|
||||
activeColor="#667eea" labelSize="28rpx"></u-checkbox>
|
||||
</view>
|
||||
</u-checkbox-group>
|
||||
</scroll-view>
|
||||
@@ -213,8 +205,7 @@ const inputBaseStyle = {
|
||||
border: '2rpx solid #dcdfe6',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -225,8 +216,7 @@ const inputErrorStyle = {
|
||||
border: '2rpx solid #f56c6c',
|
||||
borderRadius: '8rpx',
|
||||
padding: '0 24rpx',
|
||||
height: '60rpx',
|
||||
lineHeight: '60rpx',
|
||||
height: '68rpx',
|
||||
width: '100%',
|
||||
boxSizing: 'border-box'
|
||||
}
|
||||
@@ -459,7 +449,6 @@ function confirmRoleSelect() {
|
||||
// 提交
|
||||
function submit() {
|
||||
errorFields.value = [] // 清空错误字段
|
||||
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.userId) {
|
||||
updateUser(form).then(() => {
|
||||
@@ -522,18 +511,6 @@ function submit() {
|
||||
.form-view {
|
||||
padding: 24rpx;
|
||||
|
||||
.remark-textarea {
|
||||
width: 100%;
|
||||
min-height: 160rpx;
|
||||
background: #ffffff;
|
||||
border: 2rpx solid #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.remark-count {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
@@ -545,23 +522,6 @@ function submit() {
|
||||
padding-top: 16rpx;
|
||||
}
|
||||
|
||||
// 带箭头的输入框容器
|
||||
.input-with-arrow {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.arrow-icon {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #c0c4cc;
|
||||
font-size: 20rpx;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.selected-tags {
|
||||
margin-top: 16rpx;
|
||||
padding: 20rpx;
|
||||
@@ -720,56 +680,4 @@ function submit() {
|
||||
letter-spacing: 2rpx !important;
|
||||
}
|
||||
|
||||
// 备注框样式
|
||||
.remark-textarea {
|
||||
width: 100% !important;
|
||||
min-height: 160rpx !important;
|
||||
background: #ffffff !important;
|
||||
border: 2rpx solid #dcdfe6 !important;
|
||||
border-radius: 8rpx !important;
|
||||
padding: 20rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
font-size: 28rpx !important;
|
||||
line-height: 1.5 !important;
|
||||
}
|
||||
|
||||
/* 强制让错误状态的输入框边框变红 */
|
||||
.u-form-item--error .u--input,
|
||||
.u-form-item--error .u-input,
|
||||
.u-form-item--error .u-input__content,
|
||||
.u-form-item--error .u-input__content__field-wrapper {
|
||||
border: 2rpx solid #f56c6c !important;
|
||||
background: #fef0f0 !important;
|
||||
}
|
||||
|
||||
.u-form-item--error .u--textarea,
|
||||
.u-form-item--error .u-textarea {
|
||||
border: 2rpx solid #f56c6c !important;
|
||||
background: #fef0f0 !important;
|
||||
}
|
||||
|
||||
/* 统一输入框高度和行高 */
|
||||
.u--input,
|
||||
.u-input__content__field-wrapper {
|
||||
height: 60rpx !important;
|
||||
line-height: 60rpx !important;
|
||||
min-height: 60rpx !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 强制统一所有输入框宽度 */
|
||||
.u-form-item__body {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.u-form-item__body .u--input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* 确保输入框内的文字垂直居中 */
|
||||
.u-input__content__field-wrapper__field {
|
||||
line-height: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="用户详情"
|
||||
>
|
||||
</u-navbar>
|
||||
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.userName" border="false" placeholder="请输入用户名称" class="search-input"
|
||||
customStyle="background: #f7f8fa; border: 2rpx solid #e4e7ed; border-radius: 24rpx; height: 66rpx; padding: 0 24rpx;"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #667eea">
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||
@@ -269,22 +268,24 @@ function dictStr(value, list) {
|
||||
padding: 20rpx 24rpx;
|
||||
background-color: #ffffff;
|
||||
position: relative;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
gap: 16rpx;
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-btn,
|
||||
.add-btn {
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 66rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
@@ -306,6 +307,34 @@ function dictStr(value, list) {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
margin-left: 10rpx;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(102, 126, 234, 0.12);
|
||||
}
|
||||
|
||||
text {
|
||||
color: #667eea;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
.form-view {
|
||||
// 表单项间距
|
||||
:deep(.u-form-item) {
|
||||
margin-bottom: -10rpx;
|
||||
margin-bottom: -20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -205,24 +205,13 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
// disabled 输入框允许点击穿透
|
||||
.u--input {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
.u-input {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
.u-input__content {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
.u-input__content__field-wrapper {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
.u-input__content__field-wrapper__field {
|
||||
// disabled 输入框允许点击穿透(包括所有子元素)
|
||||
.u--input,
|
||||
.u--input *,
|
||||
.u-input,
|
||||
.u-input *,
|
||||
.u-input__content,
|
||||
.u-input__content * {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
import { createPinia } from "pinia"
|
||||
import { createPersistedState } from 'pinia-plugin-persistedstate'
|
||||
|
||||
import piniaPluginPersist from 'pinia-plugin-persist' //++++
|
||||
const store = createPinia()
|
||||
store.use(
|
||||
createPersistedState({
|
||||
storage: {
|
||||
getItem(key) {
|
||||
return uni.getStorageSync(key)
|
||||
},
|
||||
setItem(key, value) {
|
||||
uni.setStorageSync(key, value)
|
||||
},
|
||||
},
|
||||
})
|
||||
)
|
||||
store.use(piniaPluginPersist) //++++
|
||||
export default store
|
||||
@@ -110,7 +110,9 @@ const useUserStore = defineStore("user", {
|
||||
});
|
||||
},
|
||||
},
|
||||
persist: true,
|
||||
persist: {
|
||||
enabled: true, // 开启数据缓存 +++++++
|
||||
}
|
||||
});
|
||||
|
||||
export default useUserStore;
|
||||
|
||||
Reference in New Issue
Block a user