1.报事报修接口联调

This commit is contained in:
2025-08-08 11:31:41 +08:00
parent c560b34bf1
commit f3b45139e4
15 changed files with 1232 additions and 766 deletions

View File

@@ -107,10 +107,9 @@
url: '/pages/sys/user/myVisitor/myVisitor'
});
} else if (idx === 4) {
// uni.navigateTo({
// url: '/pages/sys/user/myRecord/myRecord'
// });
uni.navigateTo({ url: '/pages/sys/workbench/oa/oa' });
uni.navigateTo({
url: '/pages/sys/user/myRecord/myRecord'
});
}
}
}

View File

@@ -4,54 +4,41 @@
<view class="add-repair-scroll-content">
<!-- 地址选择 -->
<view class="add-repair-section">
<view class="add-repair-address-btn" @click="goSelectLocation">
<view class="add-repair-address-text">请选择房屋所在地址</view>
<image class="add-repair-address-img" src="/static/ic_add_repair_01.png" />
</view>
<view class="add-repair-detail">
<view class="add-repair-detail1">详细地址 </view>
<view class="add-repair-detail2">例1栋2单元101室1</view>
<input type="text" v-model="repairInfo.location" placeholder="请输入地址" class="add-repair-detail2" />
</view>
</view>
<!-- 报事报修类型 -->
<view class="add-repair-section2">
<view class="add-repair-label">报事报修</view>
<view class="add-repair-type-list">
<view v-for="(item, idx) in repairTypes" :key="idx"
:class="['add-repair-type-btn', selectedType === item ? 'selected' : '']"
@click="selectType(item)">{{ item }}</view>
</view>
<view class="add-repair-label2">其他服务</view>
<view class="add-repair-type-list">
<view v-for="(item, idx) in otherTypes" :key="idx" class="add-repair-type-btn">{{ item }}</view>
</view>
</view>
<!-- 问题详情 -->
<view class="add-repair-section">
<view class="add-repair-label">报事报修</view>
<view class="repair-type" @click="chooseType">
<text class="text-type">{{ selectedType }}</text>
<image class="right-arrow" src="/static/ic_right_arrow_g.png" />
</view>
<view class="add-repair-label">问题详情 <text class="add-repair-optional">(非必填)</text></view>
<textarea class="add-repair-detail-textarea" placeholder="如果以上报事不能解决您的问题,可以在这里填写说明" />
<textarea v-model="repairInfo.remark" class="add-repair-detail-textarea" placeholder="如果以上报事不能解决您的问题,可以在这里填写说明" />
</view>
<!-- 上传照片 -->
<view class="add-repair-section">
<view class="add-repair-label">上传照片 <text class="add-repair-optional">(非必填最多三张)</text></view>
<view class="add-repair-upload-list">
<!-- 修改部分添加点击事件和图片预览 -->
<view
class="add-repair-upload-box"
@click="handleImageUpload"
>
<view class="add-repair-upload-plus">+</view>
<view class="add-repair-upload-text">上传图片</view>
</view>
<!-- 显示已选图片 -->
<view v-for="(image, index) in selectedImages" :key="index" class="add-repair-upload-box">
<image :src="image.path" class="add-repair-upload-image" @click.stop="previewImage(image.path)" />
</view>
</view>
<u-upload
:fileList="selectedImages"
@delete="deletePic"
name="upload"
multiple
maxCount="3"
width="180"
height="180"
:autoUpload="false"
></u-upload>
</view>
<!-- 提交按钮 -->
<button class="add-repair-submit-btn" @click="goRepaired">提交</button>
<button class="add-repair-submit-btn" @click="submit">提交</button>
</view>
</view>
</template>
@@ -59,47 +46,103 @@
<script>
// 导入MediaSelector和MediaType
import MediaSelector, { MediaType } from '@/utils/mediaSelector';
import {
uploadFiles
} from '@/common/upload.js';
import toast from '../../../../uview-ui/libs/function/toast';
export default {
data() {
return {
repairTypes: ['安装挂件', '维修下水', '维修水阀', '疏通管道', '维修线路', '更换灯泡', '维修门窗', '其他维修'],
otherTypes: ['园区安保', '通水通电', '维修线路'],
selectedType: '更换灯泡',
repairInfo:{
location:'',
type:'1942879389453230082',
orderImgUrl:'',
remark:''
},
repairTypes: [],
selectedType: '',
selectedImages: [] // 存储已选图片
}
},
onLoad() {
this.getOrderType()
},
methods: {
selectType(item) {
this.selectedType = item;
},
// 新增:处理图片上传
async handleImageUpload() {
try {
// 调用MediaSelector选择图片最多选择3张
const images = await MediaSelector.choose({
type: MediaType.IMAGE,
count: 3 - this.selectedImages.length // 根据剩余数量选择
});
// 将选择的图片添加到selectedImages数组
this.selectedImages = [...this.selectedImages, ...images];
} catch (error) {
async getOrderType() {
let params = {parentId:'1952989217332658178'}
let res = await this.$u.api.getRepairTypes(params);
if (res.code == '200') {
this.repairTypes = res.data
this.repairInfo.type = res.data[0].id;
this.selectType(res.data[0].orderTypeName)
}
},
// 预览图片
previewImage(path) {
MediaSelector.preview(path, MediaType.IMAGE);
// 删除图片
deletePic(event) {
this.selectedImages.splice(event.index, 1);
},
async submit() {
if(!this.repairInfo.location) {
toast('请先填写地址')
return
}
if(this.selectedImages.length<=0){
this.realSubmit()
return
}
// 遍历selectedImages数组并处理图片路径
const images = this.selectedImages.map(item => item.path.replace('file://', ''));
const result = await uploadFiles({
files: images,
url: this.vuex_config.baseUrl + '/resource/oss/upload',
name: 'file',
vm: this // 关键:用于注入 token 等
});
if (result.code == '200') {
// 遍历result获取data.url加上,分割
const urls = result.map(item => item.data?.url || '').filter(url => url !== '');
this.repairInfo.orderImgUrl = urls.join(',');
this.realSubmit()
}
},
async realSubmit(){
let res = await this.$u.api.addOrder2(this.repairInfo);
if (res.code == '200') {
// 关闭页面前发送事件通知前页面刷新
uni.$emit('refreshData', '');
// 返回上一页
uni.navigateBack();
}
},
// 添加chooseType方法实现
chooseType() {
uni.showActionSheet({
itemList: this.repairTypes.map(item => item.orderTypeName),
success: (res) => {
this.selectedType = this.repairTypes[res.tapIndex].orderTypeName;
this.repairInfo.type = this.repairTypes[res.tapIndex].id;
},
fail: (err) => {
console.log('用户取消选择或出错', err);
}
});
},
goRepaired(){
uni.navigateTo({ url: '/pages/sys/user/myRepair/repaired' });
},
goSelectLocation(){
uni.navigateTo({ url: '/pages/sys/user/myRepair/selectLocation' });
}
},
goSelectLocation(){
uni.navigateTo({ url: '/pages/sys/user/myRepair/selectLocation' });
}
}
}
}
</script>
<style scoped>
@@ -110,18 +153,6 @@ export default {
flex-direction: column;
}
.add-repair-back {
position: absolute;
left: 37rpx;
width: 15rpx;
height: 33rpx;
}
.add-repair-title {
font-size: 36rpx;
color: #000;
font-weight: 500;
}
.add-repair-scroll-content {
flex: 1;
@@ -136,11 +167,25 @@ export default {
padding: 24rpx 46rpx 24rpx 44rpx;
}
.add-repair-section2 {
background: #fff;
border-radius: 12rpx;
margin: 22rpx 30rpx 0 30rpx;
padding: 24rpx 26rpx 24rpx 26rpx;
.repair-type {
width: 363rpx;
height: 73rpx;
background: #F7F7F7;
border-radius: 10rpx;
padding:0rpx 28rpx 0rpx 35rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 40rpx;
}
.text-type{
font-size: 24rpx;
color:#808080;
}
.right-arrow{
width: 11rpx;
height: 21rpx;
}
.add-repair-address-btn {
@@ -180,9 +225,14 @@ export default {
}
.add-repair-detail2 {
width: 460rpx;
height: 98rpx;
background-color: #F7F8FA;
border-radius: 10rpx;
font-size: 24rpx;
color: #676767;
margin-left: 39rpx;
margin-left: 25rpx;
padding-left: 15rpx;
}
.add-repair-label {
font-size: 32rpx;
@@ -249,55 +299,18 @@ export default {
margin-top: 18rpx;
}
.add-repair-upload-list {
display: flex;
gap: 18rpx;
margin-top: 18rpx;
}
.add-repair-upload-box {
width: 140rpx;
height: 140rpx;
border: 2rpx dashed #BDBDBD;
border-radius: 8rpx;
background: #fafbfc;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.add-repair-upload-plus {
font-size: 60rpx;
color: #BDBDBD;
margin-bottom: 8rpx;
}
.add-repair-upload-text {
font-size: 24rpx;
color: #888;
}
.add-repair-submit-btn {
width: 90vw;
height: 80rpx;
background: linear-gradient(90deg, #2186FF 0%, #4FC3F7 100%);
width: 60vw;
height: 73rpx;
background: linear-gradient(90deg, #005DE9 0%, #4B9BFF 100%);
color: #fff;
font-size: 32rpx;
border: none;
border-radius: 40rpx;
margin: 48rpx auto 0 auto;
margin: 100rpx auto 0 auto;
display: block;
font-weight: bold;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.18);
}
/* 新增图片预览样式 */
.add-repair-upload-image {
width: 100%;
height: 100%;
border-radius: 8rpx;
object-fit: cover;
}
</style>

View File

@@ -17,13 +17,15 @@
<view class="repair-row">
<view class="repair-no">工单号{{ item.orderNo }}</view>
<view class="repair-status" :class="getStatusColor(item.status)">
{{ getStatusLabel(item.status) }}</view>
{{ getStatusLabel(item.status) }}
</view>
</view>
<image class="repair-line-image" src="/static/ic_my_repair_03.png" />
<view class="repair-info">建立时间{{ item.createTime }}</view>
<view class="repair-info">报事内容{{ item.typeName }}</view>
<view class="repair-info">报事位置{{ item.location }}</view>
<view v-if="item.statusText === '已结束'" class="repair-eval-btn eval-btn-right">服务评价</view>
<view v-if="getStatusLabel(item.status) === '已结束'" class="repair-eval-btn eval-btn-right">服务评价
</view>
</view>
<!-- 悬浮新增按钮 -->
<image src="/static/ic_my_repair_02.png" :class="['repair-add-btn-fixed', { 'hide': isAddBtnHidden }]"
@@ -54,7 +56,7 @@
<view class="repair-detail-info">建立时间{{ detailItem.createTime }}</view>
<view class="repair-detail-info">报事内容{{ detailItem.typeName }}</view>
<view class="repair-detail-info">报事位置{{ detailItem.location }}</view>
<button v-if="detailItem.statusText === '已结束'" class="repair-detail-btn"
<button v-if="getStatusLabel(detailItem.status) === '已结束'" class="repair-detail-btn"
@click="goTEvaluate">评价服务</button>
</view>
</view>
@@ -71,14 +73,20 @@
detailItem: {},
detailStep: 0,
detailStatus: '',
progressSteps: ['创建工单', '处理中', '已结束'],
progressSteps: ['创建工单', '已接单', '处理中', '已结束'],
lastScrollTop: 0,
isAddBtnHidden: false
}
},
onLoad() {
// uni.$on('refreshData', this.getOrders);
this.getOrders()
},
onShow() {
uni.$once('refreshData',s=> {
this.getOrders()
});
},
methods: {
goBack() {
uni.navigateBack();
@@ -89,7 +97,10 @@
});
},
async getOrders() {
let res = await this.$u.api.getOrderList();
let params = {
"type": "1952989217332658178"
}
let res = await this.$u.api.getOrderList(params);
if (res.code == '200') {
this.records = res.rows
}
@@ -107,16 +118,20 @@
showDetail(item) {
this.detailItem = item;
// 进度映射
if (item.status === 0) {
if (item.status == 0) {
this.detailStep = 0;
this.detailStatus = '创建';
} else if (item.status === 4) {
this.detailStatus = '创建工单';
} else if (item.status == 4) {
this.detailStep = 3;
this.detailStatus = '已结束';
} else {
} else if (item.status == 3) {
this.detailStep = 2;
this.detailStatus = '处理中';
} else {
this.detailStep = 1;
this.detailStatus = '已接单';
}
this.showDetailDialog = true;
},
closeDetail() {
@@ -125,16 +140,18 @@
getStatusLabel(status) {
const statusMap = {
0: '创建工单',
1: '处理中',
2: '处理中',
1: '已接单',
2: '已接单',
3: '处理中',
4: '已完成'
4: '已结束'
};
return statusMap[status] || '';
},
goTEvaluate() {
// 将detailItem转换为JSON字符串并进行编码以确保安全传输
const detailItemStr = encodeURIComponent(JSON.stringify(this.detailItem));
uni.navigateTo({
url: '/pages/sys/user/myRepair/repairEvaluate'
url: `/pages/sys/user/myRepair/repairEvaluate?detailItem=${detailItemStr}`
});
},
handleScroll(e) {
@@ -386,7 +403,7 @@
align-items: center;
justify-content: space-between;
margin-bottom: 5rpx;
margin-left: 100rpx;
margin-left: 75rpx;
width: 100%;
}

View File

@@ -1,172 +1,201 @@
<template>
<view class="evaluate-container">
<!-- 评分项 -->
<view class="evaluate-list">
<view class="evaluate-row">
<text class="evaluate-label">服务评价</text>
<view class="evaluate-stars">
<image v-for="i in 5" :key="i" :src="score >= i ? '/static/ic_evaluate_select.png' : '/static/ic_evaluate_disselect.png'" class="evaluate-star" @click="score = i" />
</view>
</view>
<view class="evaluate-desc">- 具体说说看 -</view>
<view class="evaluate-row">
<text class="evaluate-label">专业性</text>
<view class="evaluate-stars">
<image v-for="i in 5" :key="i" :src="proScore >= i ? '/static/ic_evaluate_select.png' : '/static/ic_evaluate_disselect.png'" class="evaluate-star" @click="proScore = i" />
</view>
</view>
<view class="evaluate-row">
<text class="evaluate-label">服务态度</text>
<view class="evaluate-stars">
<image v-for="i in 5" :key="i" :src="attitudeScore >= i ? '/static/ic_evaluate_select.png' : '/static/ic_evaluate_disselect.png'" class="evaluate-star" @click="attitudeScore = i" />
</view>
</view>
<view class="evaluate-row">
<text class="evaluate-label">时效性</text>
<view class="evaluate-stars">
<image v-for="i in 5" :key="i" :src="timelyScore >= i ? '/static/ic_evaluate_select.png' : '/static/ic_evaluate_disselect.png'" class="evaluate-star" @click="timelyScore = i" />
</view>
</view>
</view>
<!-- 标签选择 -->
<view class="evaluate-tag-title">- 选择或自定义任一标签 -</view>
<view class="evaluate-tags">
<view v-for="(tag, idx) in tags" :key="idx" :class="['evaluate-tag', selectedTags.includes(tag) ? 'selected' : '']" @click="toggleTag(tag)">{{ tag }}</view>
</view>
<!-- 输入框 -->
<textarea class="evaluate-textarea" placeholder="说点什么吧..." v-model="comment" />
<!-- 提交按钮 -->
<button class="evaluate-btn">提交</button>
</view>
</template>
<script>
export default {
data() {
return {
score: 4,
proScore: 5,
attitudeScore: 4,
timelyScore: 4,
tags: ['专业性强', '态度谦和', '声音甜美', '速度很快'],
selectedTags: ['专业性强', '态度谦和'],
comment: ''
}
},
methods: {
toggleTag(tag) {
if (this.selectedTags.includes(tag)) {
this.selectedTags = this.selectedTags.filter(t => t !== tag)
} else {
this.selectedTags.push(tag)
}
}
}
}
</script>
<style scoped>
.evaluate-container {
min-height: 100vh;
background: #fff;
padding-bottom: 40rpx;
/* 防止在iOS等设备上滑动到顶部或底部时出现回弹效果 */
overscroll-behavior-y: contain;
}
.evaluate-back {
position: absolute;
left: 37rpx;
width: 15rpx;
height: 33rpx;
}
.evaluate-title {
font-size: 30rpx;
color: #000;
}
.evaluate-list {
margin: 0 53rpx 0 40rpx;
}
.evaluate-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 38rpx;
}
.evaluate-label {
font-size: 30rpx;
color: #222;
width: 160rpx;
text-align: left;
}
.evaluate-stars {
display: flex;
align-items: center;
}
.evaluate-star {
width: 36rpx;
height: 34rpx;
margin-right: 36rpx;
}
.evaluate-desc {
color: #BDBDBD;
font-size: 24rpx;
text-align: center;
margin-top: 67rpx;
margin-bottom: 57rpx;
}
.evaluate-tag-title {
color: #BDBDBD;
font-size: 24rpx;
text-align: center;
margin: 60rpx 0 0 0;
}
.evaluate-tags {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
margin: 52rpx 25rpx 0 25rpx;
}
.evaluate-tag {
flex: 0 0 calc((100% - 60rpx) / 4);
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
height: 64rpx;
border-radius: 32rpx;
font-size: 28rpx;
color: #666666;
background: #F2F2F2;
}
.evaluate-tag.selected {
background: #0090FF;
color: #fff;
}
.evaluate-textarea {
width: 85vw;
min-height: 120rpx;
background: #F5F6F7;
border-radius: 10rpx;
font-size: 26rpx;
color: #B6C2CE;
padding: 23rpx 27rpx 23rpx 27rpx;
margin: 49rpx auto 0 auto;
display: block;
}
.evaluate-btn {
width: 80vw;
height: 88rpx;
background: #0090FF;
color: #fff;
font-size: 36rpx;
border: none;
border-radius: 44rpx;
margin: 137rpx auto 0 auto;
display: block;
font-weight: bold;
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.18);
}
<template>
<view class="evaluate-container">
<!-- 评分项 -->
<view class="evaluate-list">
<view class="evaluate-row">
<text class="evaluate-label">服务评价</text>
<view class="evaluate-stars">
<image v-for="i in 5" :key="i"
:src="detailItem.serviceEvalua >= i ? '/static/ic_evaluate_select.png' : '/static/ic_evaluate_disselect.png'"
class="evaluate-star" @click="detailItem.serviceEvalua = i" />
</view>
</view>
</view>
<!-- 输入框 -->
<textarea class="evaluate-textarea" placeholder="说点什么吧..." v-model="detailItem.serviceEvaluaText" />
<!-- 上传照片 -->
<!-- 上传照片 -->
<view class="repair-evaluate-section">
<view class="add-repair-label">上传照片 <text class="add-repair-optional">(非必填最多三张)</text></view>
<u-upload :fileList="selectedImages" @delete="deletePic" name="upload" multiple maxCount="3" width="180"
height="180" :autoUpload="false"></u-upload>
</view>
<!-- 提交按钮 -->
<button class="evaluate-btn" @click="submit">提交</button>
</view>
</template>
<script>
// 导入MediaSelector和MediaType
import MediaSelector, {
MediaType
} from '@/utils/mediaSelector';
import {
uploadFiles
} from '@/common/upload.js';
export default {
data() {
return {
comment: '',
selectedImages: [], // 存储已选图片
detailItem: null // 接收传递的详情项
}
},
onLoad(options) {
// 接收传递的detailItem参数
if (options.detailItem) {
try {
this.detailItem = JSON.parse(decodeURIComponent(options.detailItem));
} catch (e) {
console.error('解析detailItem参数失败', e);
}
}
},
methods: {
// 删除图片
deletePic(event) {
this.selectedImages.splice(event.index, 1);
},
async submit() {
if (this.selectedImages.length <= 0) {
this.realSubmit()
return
}
// 遍历selectedImages数组并处理图片路径
const images = this.selectedImages.map(item => item.path.replace('file://', ''));
const result = await uploadFiles({
files: images,
url: this.vuex_config.baseUrl + '/resource/oss/upload',
name: 'file',
vm: this // 关键:用于注入 token 等
});
if (result.code == '200') {
// 遍历result获取data.url加上,分割
const urls = result.map(item => item.data?.url || '').filter(url => url !== '');
this.detailItem.imgUrl = urls.join(',');
this.realSubmit()
}
},
async realSubmit() {
let res = await this.$u.api.updateOrder(this.detailItem);
if (res.code == '200') {
// 关闭页面前发送事件通知前页面刷新
uni.$emit('refreshData', '');
// 返回上一页
uni.navigateBack();
}
}
}
}
</script>
<style scoped>
.evaluate-container {
min-height: 100vh;
background: #fff;
padding-bottom: 40rpx;
/* 防止在iOS等设备上滑动到顶部或底部时出现回弹效果 */
overscroll-behavior-y: contain;
}
.evaluate-list {
margin: 0 53rpx 0 40rpx;
}
.evaluate-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 38rpx;
}
.evaluate-label {
font-size: 30rpx;
color: #222;
width: 160rpx;
text-align: left;
}
.evaluate-stars {
display: flex;
align-items: center;
}
.evaluate-star {
width: 36rpx;
height: 34rpx;
margin-right: 36rpx;
}
.evaluate-tag {
flex: 0 0 calc((100% - 60rpx) / 4);
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
height: 64rpx;
border-radius: 32rpx;
font-size: 28rpx;
color: #666666;
background: #F2F2F2;
}
.evaluate-tag.selected {
background: #0090FF;
color: #fff;
}
.evaluate-textarea {
width: 85vw;
min-height: 120rpx;
background: #F5F6F7;
border-radius: 10rpx;
font-size: 26rpx;
color: #222222;
padding: 23rpx 27rpx 23rpx 27rpx;
margin: 49rpx auto 0 auto;
display: block;
}
.evaluate-btn {
width: 80vw;
height: 88rpx;
background: #0090FF;
color: #fff;
font-size: 36rpx;
border: none;
border-radius: 44rpx;
margin: 137rpx auto 0 auto;
display: block;
font-weight: bold;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.18);
}
.repair-evaluate-section {
background: #fff;
border-radius: 12rpx;
margin: 22rpx 0rpx 0 0rpx;
padding: 24rpx 46rpx 24rpx 44rpx;
}
.add-repair-label {
font-size: 32rpx;
color: #000000;
font-weight: 500;
margin-bottom: 41rpx;
}
.add-repair-optional {
color: #888;
font-size: 24rpx;
font-weight: 400;
}
</style>

View File

@@ -25,7 +25,7 @@
</view>
<view class="cv-room-select" @click="chooseRoom">
<text>{{ form.room || '请选择访问楼栋及房间号' }}</text>
<text class="cv-arrow">&gt;</text>
<image class="cv-arrow" src="/static/ic_right_arrow_g.png" />
</view>
</view>
<!-- 来访时间 -->
@@ -55,7 +55,7 @@
</view>
<view class="cv-room-select" @click="chooseCarNumber">
<text>{{ form.licensePlate || '请选择车牌号' }}</text>
<text class="cv-arrow">&gt;</text>
<image class="cv-arrow" src="/static/ic_right_arrow_g.png" />
</view>
</view>
<!-- 提交按钮 -->
@@ -73,8 +73,8 @@
} from '@/common/upload.js';
export default {
data() {
return {
header:'',
return {
header: '',
form: {
visitorName: '',
visitorPhone: '',
@@ -89,11 +89,11 @@
purposes: ['商务合作', '园区参观', '面试签到', '装修放行', '家政服务', '送货上门'],
times: ['今天(2025-07-04)', '明天(2025-07-04)']
}
},
onShow() {
uni.$once('selectPlate', plate => {
this.form.licensePlate = plate;
});
},
onShow() {
uni.$once('selectPlate', plate => {
this.form.licensePlate = plate;
});
},
methods: {
// 新增:处理图片上传
@@ -105,41 +105,41 @@
count: 1 // 根据剩余数量选择
});
// 将选择的图片添加到selectedImages数组
this.header = images[0].path
this.header = images[0].path
} catch (error) {
}
},
async submit(){
let images = [''];
let filePath = this.header.replace('file://', '');
images[0] = filePath;
console.log("t1",images)
const result = await uploadFiles({
files: images,
url: this.vuex_config.baseUrl + '/resource/oss/upload',
name: 'file',
vm: this // 关键:用于注入 token 等
});
if (result.code == '200') {
data = result.data.url
console.log("t1",result.data.url)
}
this.form.facePictures = result.url
},
async submit() {
let images = [''];
let filePath = this.header.replace('file://', '');
images[0] = filePath;
console.log("t1", images)
const result = await uploadFiles({
files: images,
url: this.vuex_config.baseUrl + '/resource/oss/upload',
name: 'file',
vm: this // 关键:用于注入 token 等
});
if (result.code == '200') {
data = result.data.url
console.log("t1", result.data.url)
}
this.form.facePictures = result.url
},
chooseRoom() {
// 这里可弹出选择房间号
uni.navigateTo({
url: '/pages/sys/user/myVisitor/selectRoom'
// 这里可弹出选择房间号
uni.navigateTo({
url: '/pages/sys/user/myVisitor/selectRoom'
});
},
chooseCarNumber() {
// 这里可弹出选择车牌号
uni.navigateTo({
url: '/pages/sys/user/myPayment/myCarCode'
// 这里可弹出选择车牌号
uni.navigateTo({
url: '/pages/sys/user/myPayment/myCarCode'
});
}
}
@@ -305,8 +305,8 @@
}
.cv-arrow {
font-size: 32rpx;
color: #bbb;
width: 11rpx;
height: 21rpx;
}
.cv-time-list {

View File

@@ -0,0 +1,356 @@
<template>
<view class="cv-container">
<!-- 可滚动内容区 -->
<view class="cv-scroll-content">
<!-- 访客信息 -->
<view class="info">
<view class="cv-section-title">访客信息</view>
<input class="cv-input-name" placeholder="请输入姓名" v-model="form.visitorName" />
<input class="cv-input-phone" placeholder="请输入11位手机号码" v-model="form.visitorPhone" />
</view>
<!-- 邀约详情 -->
<view class="info">
<view class="cv-section-title">邀约详情</view>
<input class="cv-input-reason" placeholder="请输入来访事由6字以内" v-model="form.visitingReason" />
<input class="cv-input-unit" placeholder="请输入拜访单位" v-model="form.visitingUnit" />
<view class="cv-time-picker">
<picker mode="datetime" :value="form.startTime" @change="startTimeChange">
<view class="cv-input-time">{{ form.startTime || '请选择开始时间' }}</view>
</picker>
<text></text>
<picker mode="datetime" :value="form.endTime" @change="endTimeChange">
<view class="cv-input-time">{{ form.endTime || '请选择结束时间' }}</view>
</picker>
</view>
</view>
<!-- 提交按钮 -->
<button class="cv-submit-btn" @click="submit">提交</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form: {
visitorName: '',
visitorPhone: '',
visitingReason: '',
visitingUnit: '',
startTime: '',
endTime: ''
}
}
},
methods: {
startTimeChange(e) {
this.form.startTime = e.detail.value;
},
endTimeChange(e) {
this.form.endTime = e.detail.value;
},
submit() {
// 提交逻辑
}
}
}
</script>
<style scoped>
.cv-container {
background: #fff;
height: 100vh;
display: flex;
flex-direction: column;
}
.cv-back {
position: absolute;
left: 37rpx;
width: 15rpx;
height: 33rpx;
}
.cv-title {
font-size: 36rpx;
color: #000;
}
.cv-scroll-content {
flex: 1;
overflow-y: auto;
padding-bottom: 120rpx;
}
.cv-section {
margin: 36rpx 56rpx 0 56rpx;
}
.info {
margin: 36rpx 56rpx 0 56rpx;
}
.cv-section-title {
font-size: 32rpx;
color: #000;
font-weight: 600;
}
.cv-inputs {
flex: 1;
display: flex;
flex-direction: column;
gap: 18rpx;
}
.cv-input-name {
width: 233rpx;
height: 73rpx;
background: #F7F7F7;
border-radius: 10rpx;
font-size: 24rpx;
color: #222;
padding: 0 24rpx;
margin-bottom: 29rpx;
margin-top: 23rpx;
border: none;
outline: none;
}
.cv-input-phone {
width: 363rpx;
height: 73rpx;
background: #F7F7F7;
border-radius: 10rpx;
font-size: 24rpx;
color: #222;
padding: 0 24rpx;
margin-bottom: 29rpx;
border: none;
outline: none;
}
.cv-input {
width: 435rpx;
height: 73rpx;
background: #F7F7F7;
border-radius: 10rpx;
font-size: 24rpx;
color: #222;
padding: 0 24rpx;
margin-bottom: 29rpx;
border: none;
outline: none;
}
.cv-avatar-upload {
position: absolute;
width: 163rpx;
height: 183rpx;
top: 50rpx;
right: 0rpx;
background: #F7F8FA;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 24rpx;
}
.cv-avatar-placeholder {
color: #bbb;
font-size: 24rpx;
text-align: center;
}
.cv-avatar-img {
width: 163rpx;
height: 183rpx;
border-radius: 12rpx;
}
.cv-purpose-list {
display: flex;
flex-wrap: wrap;
margin-top: 36rpx;
/* 不设置gap的列间距水平方向用margin控制 */
}
.cv-purpose-btn {
width: calc((100% - 58rpx) / 3);
margin-right: 29rpx;
margin-bottom: 29rpx;
box-sizing: border-box;
padding: 18rpx 0;
text-align: center;
background: #EBF5FF;
border-radius: 10rpx;
font-size: 24rpx;
color: #0B0B0B;
}
.cv-purpose-btn:nth-child(3n) {
margin-right: 0;
}
.cv-purpose-btn.active {
background: #007CFF;
color: #fff;
}
.cv-room-select {
width: 435rpx;
height: 73rpx;
background: #F7F7F7;
border-radius: 10rpx;
font-size: 24rpx;
color: #808080;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24rpx;
margin-top: 12rpx;
}
.cv-arrow {
width: 11rpx;
height: 21rpx;
}
.cv-time-list {
display: flex;
flex-direction: column;
gap: 23rpx;
margin-top: 32rpx;
}
.cv-time-btn {
width: 302rpx;
height: 73rpx;
text-align: center;
background: #EBF5FF;
border-radius: 12rpx;
font-size: 24rpx;
color: #0B0B0B;
display: flex;
/* 新增 */
align-items: center;
/* 垂直居中 */
justify-content: center;
}
.cv-time-btn.active {
background: #007CFF;
color: #fff;
}
.cv-parking-row {
display: flex;
align-items: center;
gap: 24rpx;
margin-bottom: 18rpx;
}
.cv-radio-label {
font-size: 24rpx;
color: #0B0B0B;
display: flex;
align-items: center;
margin-left: 30rpx;
cursor: pointer;
}
.cv-radio-label2 {
font-size: 24rpx;
color: #0B0B0B;
display: flex;
align-items: center;
margin-left: 30rpx;
cursor: pointer;
}
.cv-radio-custom {
width: 22rpx;
height: 22rpx;
border-radius: 50%;
border: 1rpx solid #007CFF;
background: #fff;
margin-right: 12rpx;
box-sizing: border-box;
transition: background 0.2s, border 0.2s;
}
.cv-radio-custom.checked {
background: #007CFF;
border: 1rpx solid #007CFF;
}
.cv-parking-count {
margin-left: 24rpx;
font-size: 24rpx;
background: #EBF5FF;
border-radius: 8rpx;
padding: 0 18rpx;
height: 54rpx;
display: flex;
align-items: center;
}
.cv-parking-num {
color: #007CFF;
}
.cv-parking-total {
color: #0B0B0B;
}
.cv-input-reason, .cv-input-unit {
width: 435rpx;
height: 73rpx;
background: #F7F7F7;
border-radius: 10rpx;
font-size: 24rpx;
color: #222;
padding: 0 24rpx;
margin-bottom: 29rpx;
border: none;
outline: none;
}
.cv-time-picker {
display: flex;
align-items: center;
margin-bottom: 29rpx;
}
.cv-input-time {
width: 200rpx;
height: 73rpx;
background: #F7F7F7;
border-radius: 10rpx;
font-size: 24rpx;
color: #808080;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
}
.cv-submit-btn {
width: 90vw;
height: 90rpx;
background: #0090FF;
color: #fff;
font-size: 36rpx;
border: none;
border-radius: 45rpx;
margin: 80rpx auto 0 auto;
display: block;
font-weight: bold;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.18);
}
</style>

View File

@@ -49,7 +49,7 @@ export default {
id: 1,
latitude: 29.534,
longitude: 106.565,
iconPath: '/static/ic_map.png', // 设置背景图
// iconPath: '/static/ic_map.png', // 设置背景图
width: 20,
height: 20
}

View File

@@ -50,8 +50,12 @@
<!-- 会议时间 -->
<text class="label">会议时间</text>
<input type="text" v-model="meetingTime" placeholder="请选择会议时间" class="meet-input" />
<text class="label">会议时间</text>
<view class="meet-select" @click="chooseCarNumber">
<text>{{ meetingTime || '请选择会议时间' }}</text>
<image class="meet-arrow" src="/static/ic_right_arrow_g.png" />
</view>
<!-- 是否需要签到 -->
@@ -67,8 +71,11 @@
</view>
</view>
<text class="label">增值服务</text>
<view class="meet-text">会议物品</view>
<text class="label">增值服务</text>
<view class="meet-select" @click="chooseCarNumber">
<text>会议物品</text>
<image class="meet-arrow" src="/static/ic_right_arrow_g.png" />
</view>
<view class="service-list">
<view v-for="(data,index) in itemList">
@@ -335,6 +342,24 @@
padding-left: 18rpx;
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.meet-select {
width: 86vw;
height: 73rpx;
background: #F7F7F7;
font-size: 24rpx;
color: #808080;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24rpx;
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.meet-arrow {
width: 11rpx;
height: 21rpx;
}
.meet-text {

View File

@@ -1,407 +1,419 @@
<template>
<view class=" ">
<!-- 顶部导航背景 -->
<view class="detail-navbar">
<image src="/static/ic_back_white.webp" class="detail-back" @click="goBack" />
<view class="detail-right">
<image src="/static/ic_share_w.png" class="detail-scan" />
</view>
</view>
<!-- 卡片内容盖住导航背景 -->
<view class="card-wrapper">
<!-- 请假信息卡片 -->
<view class="detail-card">
<view class="leave-header">
<view class="leave-type">请假</view>
<view class="leave-status">已通过</view>
</view>
<view class="applicant-info">
<view class="applicant-avatar" style="background-color: #4B7BF5;"></view>
<view class="applicant-detail">
<text class="applicant-name">余永乐</text>
<text class="applicant-dept">数据开发及研发部</text>
</view>
</view>
<view class="submit-time">提交时间7月16日 18:36:44</view>
</view>
<!-- 申批详情卡片 -->
<view class="detail-card">
<view class="detail-title">申批详情</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">假期类型</text>
<text class="detail-value-vertical">病假</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">开始时间</text>
<text class="detail-value-vertical">2025-07-15</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">结束时间</text>
<text class="detail-value-vertical">2025-07-17</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">时长</text>
<text class="detail-value-vertical">2</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">请假事由</text>
<text class="detail-value-vertical">由于腿儿过大需要到医院进行检查</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">附件</text>
<view class="attachment">
<view class="attachment-preview">
<image src="/static/ic_attachment_preview.png" class="attachment-img" />
</view>
<view class="attachment-info">
<text class="attachment-name">174568963.jpg</text>
<text class="attachment-size">289.14 KB</text>
</view>
</view>
</view>
</view>
<!-- 审批记录卡片 -->
<view class="detail-card">
<view class="detail-title">申批记录</view>
<view
class="approval-item"
v-for="(item, index) in detailData.approvalRecords"
:key="index"
>
<view class="approval-status">
<view :class="['status-dot', index < 3 ? 'selected' : '']"></view>
<view
v-if="index < detailData.approvalRecords.length - 1"
class="status-line"
></view>
</view>
<view class="approval-content">
<view class="approval-type">{{ item.type }}</view>
<view class="approver-info" v-if="item.approver">
<view
class="approver-avatar"
:style="{ backgroundColor: item.approver.avatarColor }"
>
{{ item.approver.avatarText }}
</view>
<text class="approver-name">{{ item.approver.name }}</text>
<text class="approval-result">{{ item.result }}</text>
</view>
<text class="approval-time">{{ item.time }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detailData: {
approvalRecords: [
{
type: "提交",
approver: {
name: "余永乐",
avatarText: "",
avatarColor: "#4B7BF5",
},
result: "已提交",
time: "07-12 18:28:22",
},
{
type: "审批",
approver: {
name: "张桂花",
avatarText: "张",
avatarColor: "#F3831F",
},
result: "已同意",
time: "07-12 18:28:22",
},
{
type: "审批",
approver: {
name: "张桂花",
avatarText: "张",
avatarColor: "#F3831F",
},
result: "已批准",
time: "07-12 18:28:22",
},
{
type: "结束",
time: "07-12 18:28:22",
},
],
},
};
},
methods: {
goBack() {
uni.navigateBack();
},
},
};
</script>
<style scoped>
.detail-container {
background-color: #f7f7f7;
min-height: 100vh;
position: relative;
}
/* 渐变背景导航栏 */
.detail-navbar {
width: 100%;
height: 372rpx;
padding-top: 115rpx;
display: flex;
justify-content: space-between;
background: linear-gradient(180deg, #0a60ed 0%, #ffffff 100%);
}
/* 卡片区域盖住导航背景 */
.card-wrapper {
position: relative;
z-index: 10;
margin-top: -200rpx; /* 向上覆盖导航背景 */
}
/* 通用卡片 */
.detail-card {
background-color: #fff;
margin: 20rpx 30rpx;
border-radius: 16rpx;
padding: 30rpx;
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.04);
}
.detail-back {
margin-left: 37rpx;
width: 15rpx;
height: 33rpx;
}
.detail-right {
margin-right: 37rpx;
}
.detail-scan {
width: 36rpx;
height: 35rpx;
}
.leave-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
}
.leave-type {
font-weight: 600;
font-size: 26rpx;
padding: 10rpx 20rpx;
border-radius: 8rpx;
color: #2186ff;
background: rgba(33, 134, 255, 0.1);
border: 1px solid #2186ff;
}
.leave-status {
font-size: 26rpx;
padding: 6rpx 20rpx;
border-radius: 8rpx;
color: #07c78e;
background-color: rgba(7, 199, 142, 0.1);
border: 1px solid #07c78e;
}
.applicant-info {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.applicant-avatar {
width: 60rpx;
height: 60rpx;
border-radius: 30rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
margin-right: 20rpx;
}
.applicant-detail {
display: flex;
flex-direction: column;
}
.applicant-name {
font-size: 28rpx;
color: #333;
font-weight: 500;
margin-bottom: 6rpx;
}
.applicant-dept {
font-size: 24rpx;
color: #666;
}
.submit-time {
font-size: 24rpx;
color: #999;
}
.detail-title {
font-size: 30rpx;
color: #333;
font-weight: bold;
margin-bottom: 30rpx;
}
.detail-item-vertical {
display: flex;
flex-direction: column;
margin-bottom: 20rpx;
}
.detail-label-vertical {
font-size: 26rpx;
color: #666;
margin-bottom: 10rpx;
}
.detail-value-vertical {
font-size: 26rpx;
color: #333;
margin-bottom: 10rpx;
}
.attachment {
display: flex;
align-items: center;
}
.attachment-preview {
width: 80rpx;
height: 80rpx;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
border-radius: 8rpx;
overflow: hidden;
}
.attachment-img {
width: 80rpx;
height: 80rpx;
}
.attachment-info {
display: flex;
flex-direction: column;
}
.attachment-name {
font-size: 26rpx;
color: #333;
margin-bottom: 6rpx;
}
.attachment-size {
font-size: 22rpx;
color: #999;
}
/* 审批记录 */
.approval-item {
display: flex;
margin-bottom: 30rpx;
}
.approval-status {
width: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
margin-right: 20rpx;
}
.status-dot {
width: 20rpx;
height: 20rpx;
border-radius: 10rpx;
border: 1px solid #ddd;
background-color: #fff;
margin-bottom: 10rpx;
}
.status-dot.selected {
background-color: #2186ff;
border-color: #2186ff;
}
.status-line {
width: 2rpx;
flex: 1;
background-color: #ddd;
}
.approval-content {
flex: 1;
}
.approval-type {
font-size: 26rpx;
color: #333;
margin-bottom: 10rpx;
}
.approver-info {
display: flex;
align-items: center;
margin-bottom: 10rpx;
}
.approver-avatar {
width: 40rpx;
height: 40rpx;
border-radius: 20rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
margin-right: 10rpx;
}
.approver-name {
font-size: 26rpx;
color: #333;
margin-right: 20rpx;
}
.approval-result {
font-size: 24rpx;
color: #07c78e;
}
.approval-time {
font-size: 24rpx;
color: #999;
}
</style>
<template>
<view class="detail-container">
<!-- 顶部导航背景 -->
<view class="detail-navbar">
<image src="/static/ic_back_white.webp" class="detail-back" @click="goBack" />
<view class="detail-right">
<image src="/static/ic_share_w.png" class="detail-scan" />
</view>
</view>
<!-- 卡片内容盖住导航背景 -->
<view class="card-wrapper">
<!-- 请假信息卡片 -->
<view class="detail-card">
<view class="leave-header">
<view class="leave-type">请假</view>
<view class="leave-status">已通过</view>
</view>
<view class="applicant-info">
<view class="applicant-avatar" style="background-color: #4B7BF5;"></view>
<view class="applicant-detail">
<text class="applicant-name">余永乐</text>
<text class="applicant-dept">数据开发及研发部</text>
</view>
</view>
<view class="submit-time">提交时间7月16日 18:36:44</view>
</view>
<!-- 申批详情卡片 -->
<view class="detail-card">
<view class="detail-title">申批详情</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">假期类型</text>
<text class="detail-value-vertical">病假</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">开始时间</text>
<text class="detail-value-vertical">2025-07-15</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">结束时间</text>
<text class="detail-value-vertical">2025-07-17</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">时长</text>
<text class="detail-value-vertical">2</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">请假事由</text>
<text class="detail-value-vertical">由于腿儿过大需要到医院进行检查</text>
</view>
<view class="detail-item-vertical">
<text class="detail-label-vertical">附件</text>
<view class="attachment">
<view class="attachment-preview">
<image src="/static/ic_attachment_preview.png" class="attachment-img" />
</view>
<view class="attachment-info">
<text class="attachment-name">174568963.jpg</text>
<text class="attachment-size">289.14 KB</text>
</view>
</view>
</view>
</view>
<!-- 审批记录卡片 -->
<view class="detail-card">
<view class="detail-title">申批记录</view>
<view class="approval-item" v-for="(item, index) in detailData.approvalRecords" :key="index">
<view class="approval-status">
<view :class="['status-dot', index < 3 ? 'selected' : '']"></view>
<view v-if="index < detailData.approvalRecords.length - 1" class="status-line"></view>
</view>
<view class="approval-content">
<view class="approval-type">{{ item.type }}</view>
<view class="approver-info" v-if="item.approver">
<view class="approver-avatar" :style="{ backgroundColor: item.approver.avatarColor }">
{{ item.approver.avatarText }}
</view>
<text class="approver-name">{{ item.approver.name }}</text>
<text class="approval-result">{{ item.result }}</text>
</view>
<text class="approval-time">{{ item.time }}</text>
</view>
</view>
</view>
<button class="oa-btn" @click="submit">去审核</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detailData: {
approvalRecords: [{
type: "提交",
approver: {
name: "余永乐",
avatarText: "余",
avatarColor: "#4B7BF5",
},
result: "已提交",
time: "07-12 18:28:22",
},
{
type: "审批",
approver: {
name: "张桂花",
avatarText: "",
avatarColor: "#F3831F",
},
result: "已同意",
time: "07-12 18:28:22",
},
{
type: "审批",
approver: {
name: "张桂花",
avatarText: "",
avatarColor: "#F3831F",
},
result: "已批准",
time: "07-12 18:28:22",
},
{
type: "结束",
time: "07-12 18:28:22",
},
],
},
};
},
methods: {
goBack() {
uni.navigateBack();
},
},
};
</script>
<style scoped>
.detail-container {
display: flex;
flex-direction: column;
height: 100vh;
background: #f7f7f7;
}
/* 渐变背景导航栏 */
.detail-navbar {
position: relative;
width: 100%;
height: 372rpx;
padding-top: 115rpx;
display: flex;
justify-content: space-between;
background: linear-gradient(180deg, #0a60ed 0%, #ffffff 100%);
}
/* 卡片区域盖住导航背景 */
.card-wrapper {
flex: 1;
overflow-y: auto;
position: relative;
z-index: 10;
margin-top: -200rpx;
/* 向上覆盖导航背景 */
}
/* 通用卡片 */
.detail-card {
background-color: #fff;
margin: 20rpx 30rpx;
border-radius: 16rpx;
padding: 30rpx;
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.04);
}
.detail-back {
margin-left: 37rpx;
width: 15rpx;
height: 33rpx;
}
.detail-right {
margin-right: 37rpx;
}
.detail-scan {
width: 36rpx;
height: 35rpx;
}
.leave-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
}
.leave-type {
font-weight: 600;
font-size: 26rpx;
padding: 10rpx 20rpx;
border-radius: 8rpx;
color: #2186ff;
background: rgba(33, 134, 255, 0.1);
border: 1px solid #2186ff;
}
.leave-status {
font-size: 26rpx;
padding: 6rpx 20rpx;
border-radius: 8rpx;
color: #07c78e;
background-color: rgba(7, 199, 142, 0.1);
border: 1px solid #07c78e;
}
.applicant-info {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.applicant-avatar {
width: 60rpx;
height: 60rpx;
border-radius: 30rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
margin-right: 20rpx;
}
.applicant-detail {
display: flex;
flex-direction: column;
}
.applicant-name {
font-size: 28rpx;
color: #333;
font-weight: 500;
margin-bottom: 6rpx;
}
.applicant-dept {
font-size: 24rpx;
color: #666;
}
.submit-time {
font-size: 24rpx;
color: #999;
}
.detail-title {
font-size: 30rpx;
color: #333;
font-weight: bold;
margin-bottom: 30rpx;
}
.detail-item-vertical {
display: flex;
flex-direction: column;
margin-bottom: 20rpx;
}
.detail-label-vertical {
font-size: 26rpx;
color: #666;
margin-bottom: 10rpx;
}
.detail-value-vertical {
font-size: 26rpx;
color: #333;
margin-bottom: 10rpx;
}
.attachment {
display: flex;
align-items: center;
}
.attachment-preview {
width: 80rpx;
height: 80rpx;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
border-radius: 8rpx;
overflow: hidden;
}
.attachment-img {
width: 80rpx;
height: 80rpx;
}
.attachment-info {
display: flex;
flex-direction: column;
}
.attachment-name {
font-size: 26rpx;
color: #333;
margin-bottom: 6rpx;
}
.attachment-size {
font-size: 22rpx;
color: #999;
}
/* 审批记录 */
.approval-item {
display: flex;
margin-bottom: 30rpx;
}
.approval-status {
width: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
margin-right: 20rpx;
}
.status-dot {
width: 20rpx;
height: 20rpx;
border-radius: 10rpx;
border: 1px solid #ddd;
background-color: #fff;
margin-bottom: 10rpx;
}
.status-dot.selected {
background-color: #2186ff;
border-color: #2186ff;
}
.status-line {
width: 2rpx;
flex: 1;
background-color: #ddd;
}
.approval-content {
flex: 1;
}
.approval-type {
font-size: 26rpx;
color: #333;
margin-bottom: 10rpx;
}
.approver-info {
display: flex;
align-items: center;
margin-bottom: 10rpx;
}
.approver-avatar {
width: 40rpx;
height: 40rpx;
border-radius: 20rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
margin-right: 10rpx;
}
.approver-name {
font-size: 26rpx;
color: #333;
margin-right: 20rpx;
}
.approval-result {
font-size: 24rpx;
color: #07c78e;
}
.approval-time {
font-size: 24rpx;
color: #999;
}
.oa-btn {
width: 80vw;
height: 88rpx;
background: #0090FF;
color: #fff;
font-size: 32rpx;
border: none;
border-radius: 44rpx;
display: block;
font-weight: bold;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.18);
margin-top: 60rpx;
margin-bottom: 50rpx;
}
</style>

View File

@@ -85,8 +85,8 @@
getStatusLabel(status) {
const statusMap = {
0: '创建工单',
1: '处理中',
2: '处理中',
1: '已接单',
2: '已接单',
3: '处理中',
4: '已完成'
};

View File

@@ -48,7 +48,7 @@
return {
detailStep: 0,
detailStatus: '',
progressSteps: ['创建工单', '处理中', '已结束'],
progressSteps: ['创建工单','已接单', '处理中', '已结束'],
currentStatus: 2, // 0: 待分配1: 已接单2: 处理中3: 已完成
detail: {
}
@@ -61,15 +61,18 @@
console.log("t1",this.detail)
// 现在可以使用item对象了
// 进度映射
if (item.status === 0) {
if (item.status == 0) {
this.detailStep = 0;
this.detailStatus = '创建';
} else if (item.status === 4) {
this.detailStatus = '创建工单';
} else if (item.status == 4) {
this.detailStep = 3;
this.detailStatus = '已结束';
} else {
} else if(item.status == 3){
this.detailStep = 2;
this.detailStatus = '处理中';
}else {
this.detailStep = 1;
this.detailStatus = '已接单';
}
}
},
@@ -129,7 +132,7 @@
align-items: center;
justify-content: space-between;
margin-bottom: 5rpx;
margin-left: 100rpx;
margin-left: 85rpx;
width: 100%;
}