修改报事报修
This commit is contained in:
@@ -256,6 +256,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "员工审核"
|
"navigationBarTitleText": "员工审核"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/sys/workbench/unitManagement/employeeAdd",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "员工注册"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
|
@@ -134,10 +134,9 @@
|
|||||||
async realSubmit() {
|
async realSubmit() {
|
||||||
let res = await this.$u.api.addOrder2(this.repairInfo);
|
let res = await this.$u.api.addOrder2(this.repairInfo);
|
||||||
if (res.code == '200') {
|
if (res.code == '200') {
|
||||||
// 关闭页面前发送事件通知前页面刷新
|
uni.navigateTo({
|
||||||
uni.$emit('refreshData', '');
|
url: '/pages/sys/user/myRepair/repaired'
|
||||||
// 返回上一页
|
});
|
||||||
uni.navigateBack();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -245,34 +245,27 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.repair-empty-img-box {
|
.repair-empty-img-box {
|
||||||
border: 2rpx dashed #BDBDBD;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
background: #fafbfc;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 220rpx;
|
height: 500rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
.repair-empty-img {
|
.repair-empty-img {
|
||||||
width: 90%;
|
width: 100%;
|
||||||
max-width: 400rpx;
|
height: 100%;
|
||||||
height: 180rpx;
|
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
margin: 24rpx auto;
|
margin: 24rpx auto;
|
||||||
}
|
}
|
||||||
.repair-add-btn-box {
|
.repair-add-btn-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 24rpx;
|
top: 500rpx;
|
||||||
|
right: -20rpx;
|
||||||
bottom: -40rpx;
|
bottom: -40rpx;
|
||||||
}
|
}
|
||||||
.repair-add-btn {
|
.repair-add-btn {
|
||||||
width: 80rpx;
|
width: 100rpx;
|
||||||
height: 80rpx;
|
height: 100rpx;
|
||||||
border: 2rpx dashed #BDBDBD;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
}
|
||||||
.repair-list-box {
|
.repair-list-box {
|
||||||
margin: 32rpx 0 0 0;
|
margin: 32rpx 0 0 0;
|
||||||
@@ -341,12 +334,13 @@
|
|||||||
}
|
}
|
||||||
.repair-add-btn-fixed {
|
.repair-add-btn-fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 40rpx;
|
right: 5rpx;
|
||||||
bottom: 80rpx;
|
bottom: 80rpx;
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
|
top: 50%;
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
.repair-add-btn-fixed.hide { transform: translateX(200%); }
|
.repair-add-btn-fixed.hide { transform: translateX(200%); }
|
||||||
|
@@ -44,16 +44,16 @@
|
|||||||
detailItem: null // 接收传递的详情项
|
detailItem: null // 接收传递的详情项
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
// onLoad(options) {
|
||||||
// 接收传递的detailItem参数
|
// // 接收传递的detailItem参数
|
||||||
if (options.detailItem) {
|
// if (options.detailItem) {
|
||||||
try {
|
// try {
|
||||||
this.detailItem = JSON.parse(decodeURIComponent(options.detailItem));
|
// this.detailItem = JSON.parse(decodeURIComponent(options.detailItem));
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
console.error('解析detailItem参数失败', e);
|
// console.error('解析detailItem参数失败', e);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
// 删除图片
|
// 删除图片
|
||||||
deletePic(event) {
|
deletePic(event) {
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
<!-- 顶部栏 -->
|
<!-- 顶部栏 -->
|
||||||
<view class="repaired-navbar">
|
<view class="repaired-navbar">
|
||||||
<image src="/static/ic_back.png" class="repaired-back" @click="goBack" />
|
<image src="/static/ic_back.png" class="repaired-back" @click="goBack" />
|
||||||
<text class="repaired-progress" @click="goProgress">查看进度</text>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 成功图标 -->
|
<!-- 成功图标 -->
|
||||||
<view class="repaired-icon-box">
|
<view class="repaired-icon-box">
|
||||||
@@ -13,7 +12,7 @@
|
|||||||
<view class="repaired-title">提交成功</view>
|
<view class="repaired-title">提交成功</view>
|
||||||
<view class="repaired-desc">提交成功后我们将及时为您服务</view>
|
<view class="repaired-desc">提交成功后我们将及时为您服务</view>
|
||||||
<!-- 返回首页按钮 -->
|
<!-- 返回首页按钮 -->
|
||||||
<button class="repaired-btn" @click="goHome">返回首页</button>
|
<button class="repaired-btn" @click="goMyREpair">返回报事报修管理</button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -23,12 +22,10 @@ export default {
|
|||||||
goBack() {
|
goBack() {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
},
|
},
|
||||||
goProgress() {
|
goMyREpair() {
|
||||||
// 跳转到进度页面
|
uni.navigateTo({
|
||||||
uni.showToast({ title: '查看进度', icon: 'none' });
|
url: '/pages/sys/user/myRepair/myRepair'
|
||||||
},
|
});
|
||||||
goHome() {
|
|
||||||
uni.switchTab({ url: '/pages/home/home' });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -57,14 +57,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 底部操作按钮 -->
|
|
||||||
<view
|
|
||||||
v-if="((!isManager && detailStep != 0) || (isManager && detailStep == 0)) && detailStep != 3&&!isNaomalUser"
|
|
||||||
class="btn-group">
|
|
||||||
<button class="btn ghost"
|
|
||||||
@click="transfer(1)">{{ isManager ? '指派' : (detailStep == 2 ? '完成' : '开始') }}</button>
|
|
||||||
<button v-if="detailStep == 1" class="btn primary" @click="transfer(2)">转派</button>
|
|
||||||
</view>
|
|
||||||
<view class="kg">
|
<view class="kg">
|
||||||
</view>
|
</view>
|
||||||
<SelectUser :visible.sync="showSelect" :list="users" :multiple="false" @confirm="onConfirm" />
|
<SelectUser :visible.sync="showSelect" :list="users" :multiple="false" @confirm="onConfirm" />
|
||||||
|
348
pages/sys/workbench/unitManagement/employeeAdd.vue
Normal file
348
pages/sys/workbench/unitManagement/employeeAdd.vue
Normal file
@@ -0,0 +1,348 @@
|
|||||||
|
<template>
|
||||||
|
<view class="register-container">
|
||||||
|
<!-- 表单内容 -->
|
||||||
|
<view class="form-content">
|
||||||
|
<!-- 所属单位 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label">所属单位</text>
|
||||||
|
<input class="item-input" type="text" placeholder="区农委办" disabled/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 用户姓名 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label required">用户姓名</text>
|
||||||
|
<input class="item-input" type="text" placeholder="请输入"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 性别 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label required">性别</text>
|
||||||
|
<picker class="item-input" @change="bindPickerChange" :value="index" :range="array">
|
||||||
|
<view class="picker-content">{{array[index]}}</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 证件号 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label required">证件号</text>
|
||||||
|
<input class="item-input" type="text" placeholder="请输入"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 联系电话 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label required">联系电话</text>
|
||||||
|
<input class="item-input" type="number" placeholder="请输入"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 验证码 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label required">验证码</text>
|
||||||
|
<view class="code-input-wrapper">
|
||||||
|
<input class="item-input code-input" type="number" placeholder="请输入"/>
|
||||||
|
<button class="get-code-btn">获取验证码</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 登录密码 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label required">登录密码</text>
|
||||||
|
<input class="item-input" type="password" placeholder="请输入"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 确认密码 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label required">确认密码</text>
|
||||||
|
<input class="item-input" type="password" placeholder="请输入"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 密码提示 -->
|
||||||
|
<view class="form-tip password-tip">
|
||||||
|
密码至少包含8~20位大写字母、小写字母、数字和特殊字符 (!@$%^&*$%&+&*=\[]?)其中的任意一种
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 人脸照片 - 独立表单项 -->
|
||||||
|
|
||||||
|
<view class="form-item face-upload-item">
|
||||||
|
<text class="item-label">人脸照片</text>
|
||||||
|
<view class="face-upload-container">
|
||||||
|
<view class="upload-wrapper">
|
||||||
|
<button class="upload-btn" @click="chooseImage">+</button>
|
||||||
|
<view class="image-preview" v-if="imageUrl">
|
||||||
|
<image :src="imageUrl" mode="aspectFill" class="preview-image"></image>
|
||||||
|
<view class="delete-btn" @click="deleteImage">×</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="form-tip upload-tip">
|
||||||
|
请上传正脸并不超过5MB的jpg,jpeg,png,gif,webp格式文件
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 邮箱和车牌号码 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label">邮箱</text>
|
||||||
|
<input class="item-input" type="text" placeholder="请输入"/>
|
||||||
|
</view>
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="item-label">车牌号码</text>
|
||||||
|
<input class="item-input" type="text" placeholder="请输入"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 提交按钮 -->
|
||||||
|
<button class="submit-btn">提交</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
imageUrl: '', // 存储上传的图片URL
|
||||||
|
array: ['男', '女'],
|
||||||
|
index: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
bindPickerChange: function(e) {
|
||||||
|
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||||
|
this.index = e.detail.value
|
||||||
|
},
|
||||||
|
// 选择图片
|
||||||
|
chooseImage() {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
sizeType: ['compressed'],
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
|
success: (res) => {
|
||||||
|
const tempFilePaths = res.tempFilePaths;
|
||||||
|
this.imageUrl = tempFilePaths[0];
|
||||||
|
// 这里可以添加图片上传到服务器的逻辑
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除图片
|
||||||
|
deleteImage() {
|
||||||
|
this.imageUrl = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.register-container {
|
||||||
|
padding: 20px 15px;
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表单内容 */
|
||||||
|
.form-content {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表单项 - 只有上下边框 */
|
||||||
|
.form-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-top: 1px solid #dcdfe6;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
padding: 10px 15px;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 提示信息样式 - 独占一行灰色背景 */
|
||||||
|
.form-tip {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #666;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-tip {
|
||||||
|
margin-top: -1px; /* 消除与上方边框的重叠 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表单项标签 */
|
||||||
|
.item-label {
|
||||||
|
width: 80px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 15px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
text-align: left; /* 确保标签左对齐 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 必填项标记 */
|
||||||
|
.item-label.required::before {
|
||||||
|
content: "*";
|
||||||
|
color: #f56c6c;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 输入框样式 */
|
||||||
|
.item-input {
|
||||||
|
flex: 1;
|
||||||
|
height: 40px;
|
||||||
|
border: none;
|
||||||
|
padding: 0 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: transparent;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 性别选择器 */
|
||||||
|
.picker-content {
|
||||||
|
text-align: right;
|
||||||
|
color: #333; /* 修改为与输入框一致的颜色 */
|
||||||
|
line-height: 40px; /* 与输入框高度匹配 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 验证码输入区域 */
|
||||||
|
.code-input-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-input {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.get-code-btn {
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #409eff;
|
||||||
|
background-color: #ecf5ff;
|
||||||
|
border: 1px solid #b3d8ff;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 上传区域 */
|
||||||
|
.upload-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-btn {
|
||||||
|
width: 80px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #409eff;
|
||||||
|
background-color: #ecf5ff;
|
||||||
|
border: 1px solid #b3d8ff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 提交按钮 */
|
||||||
|
.submit-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 44px;
|
||||||
|
line-height: 44px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #409eff;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start; /* 左对齐 */
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-btn {
|
||||||
|
width: 60px; /* 正方形 */
|
||||||
|
height: 60px; /* 正方形 */
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 40px; /* 加大+号 */
|
||||||
|
color: #409eff;
|
||||||
|
background-color: #ecf5ff;
|
||||||
|
border: 1px solid #b3d8ff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.face-upload-item {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.face-upload-container {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-btn {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
line-height: 60px;
|
||||||
|
font-size: 30px;
|
||||||
|
color: #409eff;
|
||||||
|
background-color: #ecf5ff;
|
||||||
|
border: 1px dashed #b3d8ff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片预览样式 */
|
||||||
|
.image-preview {
|
||||||
|
position: relative;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-btn {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
</style>
|
@@ -116,7 +116,7 @@ export default {
|
|||||||
// 获取uQRCode实例
|
// 获取uQRCode实例
|
||||||
var qr = new uQRCode();
|
var qr = new uQRCode();
|
||||||
// 设置二维码内容
|
// 设置二维码内容
|
||||||
qr.data = "https://uqrcode.cn/doc";
|
qr.data = "localhost:8081/#/pages/sys/workbench/unitManagement/employeeAdd";
|
||||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||||
qr.size = 200;
|
qr.size = 200;
|
||||||
// 调用制作二维码方法
|
// 调用制作二维码方法
|
||||||
|
Reference in New Issue
Block a user