Compare commits

12 Commits
prod ... master

Author SHA1 Message Date
da06ac8899 1
Some checks are pending
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Waiting to run
2025-08-29 13:48:23 +08:00
5b7912c5d0 1
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Has been cancelled
2025-08-29 10:31:33 +08:00
8d77e8a255 1
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Has been cancelled
2025-08-29 10:02:57 +08:00
d7bd2ee667 更新 .gitea/workflows/master.yml
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Has been cancelled
2025-08-28 16:06:46 +08:00
7a83b22f96 更新 .gitea/workflows/master.yml
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Failing after 5s
2025-08-28 16:03:08 +08:00
f1628f4246 更新 .gitea/workflows/master.yml
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Failing after 1s
2025-08-28 16:02:00 +08:00
7178aac70e 更新 .gitea/workflows/master.yml
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Failing after 6s
2025-08-28 15:58:58 +08:00
6a46a58e93 更新 .gitea/workflows/master.yml
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Failing after 4s
2025-08-28 15:42:31 +08:00
8e43a97dc6 更新 .gitea/workflows/master.yml
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Has been cancelled
2025-08-28 15:41:23 +08:00
41ae961cb8 更新 .gitea/workflows/master.yml
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Failing after 2s
2025-08-28 15:29:37 +08:00
5bf5a549bf 预警信息新增图片功能
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Failing after 1m0s
2025-08-28 11:12:25 +08:00
85a1ce799a 工单
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Failing after 56s
2025-08-26 17:31:30 +08:00
8 changed files with 328 additions and 354 deletions

View File

@@ -9,10 +9,23 @@ on:
# 运行环境 # 运行环境
jobs: jobs:
build: build-and-deploy:
name: 打包 Uniapp 项目 name: 打包 Uniapp 项目
runs-on: ubuntu # 云 Runner 环境(自建 Runner 可替换为自定义名称) runs-on: windows
timeout-minutes: 30
# jobs:
# build:
# name: 打包 Uniapp 项目
# runs-on: windows # 云 Runner 环境(自建 Runner 可替换为自定义名称)
steps: steps:
########################################################################
# 步骤 2安装 Node.js 环境Uniapp 依赖 Node 处理项目依赖)
########################################################################
- name: 2. 安装 Node.js
uses: http://git.missmoc.top/mocheng/setup-node@v3
with:
node-version: '18.x' # 推荐 16.x+,适配 Uniapp 依赖
cache: 'npm' # 缓存 npm 依赖,加速后续构建
######################################################################## ########################################################################
# 步骤 1检出 Gitea 代码 # 步骤 1检出 Gitea 代码
######################################################################## ########################################################################
@@ -21,14 +34,7 @@ jobs:
with: with:
fetch-depth: 1 # 仅拉取最新代码,加速流程 fetch-depth: 1 # 仅拉取最新代码,加速流程
########################################################################
# 步骤 2安装 Node.js 环境Uniapp 依赖 Node 处理项目依赖)
########################################################################
# - name: 2. 安装 Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '18.x' # 推荐 16.x+,适配 Uniapp 依赖
# cache: 'npm' # 缓存 npm 依赖,加速后续构建
######################################################################## ########################################################################
# 步骤 3安装 Uniapp 项目依赖 # 步骤 3安装 Uniapp 项目依赖
@@ -51,10 +57,10 @@ jobs:
# 解压到目标目录 # 解压到目标目录
# unzip -q hbuilderx.zip -d /hbuilderxcli/HBuilderX # unzip -q hbuilderx.zip -d /hbuilderxcli/HBuilderX
# 赋予 CLI 执行权限 # 赋予 CLI 执行权限
sudo chmod +x /hbuilderxcli/HBuilderX/cli # sudo chmod +x /hbuilderxcli/HBuilderX/cli
# 验证 CLI 版本(确保部署成功) # 验证 CLI 版本(确保部署成功)
/hbuilderxcli/HBuilderX/cli -v C:\Users\Administrator\Desktop\runner\HBuilderX\cli -v
echo "HBuilderX CLI 部署完成,路径:/hbuilderxcli/HBuilderX/cli" echo "HBuilderX CLI 部署完成,路径:C:\Users\Administrator\Desktop\runner\HBuilderX\cli"
######################################################################## ########################################################################
# 步骤 5HBuilderX 密钥登录(安全读取账户信息) # 步骤 5HBuilderX 密钥登录(安全读取账户信息)
@@ -64,7 +70,7 @@ jobs:
run: | run: |
echo "开始登录 HBuilderX 账户..." echo "开始登录 HBuilderX 账户..."
# 执行登录命令(读取 Gitea Secrets 中的账户密码) # 执行登录命令(读取 Gitea Secrets 中的账户密码)
LOGIN_OUTPUT=$(/hbuilderxcli/HBuilderX/cli user login --username ${{ secrets.HBUILDERX_USERNAME }} --password ${{ secrets.HBUILDERX_PASSWORD }}) LOGIN_OUTPUT=$(C:\Users\Administrator\Desktop\runner\HBuilderX\cli user login --username ${{ secrets.HBUILDERX_USERNAME }} --password ${{ secrets.HBUILDERX_PASSWORD }})
# 打印登录输出(便于调试,无敏感信息) # 打印登录输出(便于调试,无敏感信息)
echo "登录结果:$LOGIN_OUTPUT" echo "登录结果:$LOGIN_OUTPUT"
# 验证登录是否成功(根据文档,成功返回 "0:user login:OK" # 验证登录是否成功(根据文档,成功返回 "0:user login:OK"
@@ -84,13 +90,13 @@ jobs:
echo "========================================" echo "========================================"
echo "正在查询打包队列状态..." echo "正在查询打包队列状态..."
# (可选)提前查询队列(部分场景下 HBuilderX 会返回排队信息) # (可选)提前查询队列(部分场景下 HBuilderX 会返回排队信息)
/hbuilderxcli/HBuilderX/cli publish --platform android --query-queue C:\Users\Administrator\Desktop\runner\HBuilderX\cli publish --platform android --query-queue
echo "========================================" echo "========================================"
echo "开始执行打包(实时输出进度)..." echo "开始执行打包(实时输出进度)..."
# 执行打包命令(根据目标平台调整 --platform 参数,支持 android/ios/h5 等) # 执行打包命令(根据目标平台调整 --platform 参数,支持 android/ios/h5 等)
# --project指定项目根目录当前检出目录 # --project指定项目根目录当前检出目录
# --output指定产物输出目录便于后续归档 # --output指定产物输出目录便于后续归档
BUILD_OUTPUT=$(/hbuilderxcli/HBuilderX/cli publish \ BUILD_OUTPUT=$(C:\Users\Administrator\Desktop\runner\HBuilderX\cli publish \
--platform android \ --platform android \
--project ./ \ --project ./ \
--output ./unpackage/dist/build/android \ --output ./unpackage/dist/build/android \
@@ -123,7 +129,7 @@ jobs:
- name: 8. HBuilderX 账户登出 - name: 8. HBuilderX 账户登出
run: | run: |
echo "开始登出 HBuilderX 账户..." echo "开始登出 HBuilderX 账户..."
LOGOUT_OUTPUT=$(/hbuilderxcli/HBuilderX/cli user logout) LOGOUT_OUTPUT=$(C:\Users\Administrator\Desktop\runner\HBuilderX\cli user logout)
echo "登出结果:$LOGOUT_OUTPUT" echo "登出结果:$LOGOUT_OUTPUT"
# 验证登出是否成功(根据文档,成功返回 "0:user logout:OK" # 验证登出是否成功(根据文档,成功返回 "0:user logout:OK"
if [[ $(echo "$LOGOUT_OUTPUT" | grep -c "0:user logout:OK") -eq 0 ]]; then if [[ $(echo "$LOGOUT_OUTPUT" | grep -c "0:user logout:OK") -eq 0 ]]; then

View File

@@ -30,5 +30,5 @@ const config = {
config.baseUrl = 'http://183.230.235.66:11010/api'; config.baseUrl = 'http://183.230.235.66:11010/api';
// config.baseUrl = 'http://9143b75.r28.cpolar.top'; // config.baseUrl = 'http://378a061a.r28.cpolar.top'
export default config; export default config;

View File

@@ -60,6 +60,7 @@ const install = (Vue, vm) => {
getWarnDetail:(params = {}, id) => vm.$u.get(config.adminPath+`/sis/alarmEvents/${id}`,params), getWarnDetail:(params = {}, id) => vm.$u.get(config.adminPath+`/sis/alarmEvents/${id}`,params),
getWarnEventInfo:(params = {}, alarmId) => vm.$u.get(config.adminPath+`/sis/alarmEventProcess/query/result/${alarmId}`,params), getWarnEventInfo:(params = {}, alarmId) => vm.$u.get(config.adminPath+`/sis/alarmEventProcess/query/result/${alarmId}`,params),
getWarnImages:(params = {}, alarmId) => vm.$u.get(config.adminPath+`/sis/alarmEventAttachments/query/${alarmId}`,params),
getImageUrl:(params = {}, ossIds) => vm.$u.get(config.adminPath+`/resource/oss/listByIds/${ossIds}`,params), getImageUrl:(params = {}, ossIds) => vm.$u.get(config.adminPath+`/resource/oss/listByIds/${ossIds}`,params),
//巡检任务列表 //巡检任务列表

View File

@@ -21,7 +21,7 @@
<text class="text-type">{{ selectedType }}</text> <text class="text-type">{{ selectedType }}</text>
<image class="right-arrow" src="/static/ic_right_arrow_g.png" /> <image class="right-arrow" src="/static/ic_right_arrow_g.png" />
</view> </view>
<view class="add-repair-label">问题详情 <text class="add-repair-optional">(非必填)</text></view> <view class="add-repair-label">备注 <text class="add-repair-optional">(非必填)</text></view>
<textarea v-model="repairInfo.remark" class="add-repair-detail-textarea" <textarea v-model="repairInfo.remark" class="add-repair-detail-textarea"
placeholder="如果以上报事不能解决您的问题,可以在这里填写说明" /> placeholder="如果以上报事不能解决您的问题,可以在这里填写说明" />

View File

@@ -23,7 +23,7 @@
<!-- 有数据时 --> <!-- 有数据时 -->
<view v-else class="repair-list-box"> <view v-else class="repair-list-box">
<view v-for="(item, idx) in records" :key="idx" class="repair-card" @click="showDetail(item)"> <view v-for="(item, idx) in records" :key="idx" class="repair-card" @click="goDetail(item)">
<view class="repair-row"> <view class="repair-row">
<view class="repair-no">工单号{{ item.orderNo }}</view> <view class="repair-no">工单号{{ item.orderNo }}</view>
<view class="repair-status" :class="getStatusColor(item.status)"> <view class="repair-status" :class="getStatusColor(item.status)">
@@ -172,6 +172,12 @@
}; };
return statusMap[status] || ''; return statusMap[status] || '';
}, },
goDetail(item) {
const itemStr = encodeURIComponent(JSON.stringify(item));
uni.navigateTo({
url: "/pages/sys/workbench/order/orderDetail?item=" + itemStr,
});
},
showDetail(item) { showDetail(item) {
this.detailItem = item; this.detailItem = item;
if (item.status == 0) { if (item.status == 0) {

View File

@@ -37,7 +37,7 @@
</view> </view>
<image class="warn-line-image" src="/static/ic_my_repair_03.png" /> <image class="warn-line-image" src="/static/ic_my_repair_03.png" />
<view class="warn-info">预警内容{{ item.description }}</view> <view class="warn-info">预警内容{{ item.description }}</view>
<view class="warn-info">预警位置{{ item.deviceGroupName }}</view> <view class="warn-info">预警位置{{ item.deviceName }}</view>
<view class="warn-info">预警时间{{ item.reportTime }}</view> <view class="warn-info">预警时间{{ item.reportTime }}</view>
<view class="warn-info">预警设备{{ item.deviceName }}</view> <view class="warn-info">预警设备{{ item.deviceName }}</view>
<view v-if="[20, 30, 31, 32].includes(item.state)" class="warn-eval-wrap"> <view v-if="[20, 30, 31, 32].includes(item.state)" class="warn-eval-wrap">

View File

@@ -10,6 +10,20 @@
<text class="value">{{ item.value || '-' }}</text> <text class="value">{{ item.value || '-' }}</text>
</view> </view>
</view> </view>
<!-- 显示上传的图片 -->
<view v-if="infoImages.length > 0">
<view class="add-warn-label">相关图片</view>
<view class="image-list">
<image
v-for="(img, idx) in infoImages"
:key="idx"
:src="img"
mode="aspectFill"
class="preview-image"
@click="previewImage2(idx)"
/>
</view>
</view>
</view> </view>
<!-- 处理情况卡片 详情情况卡片 --> <!-- 处理情况卡片 详情情况卡片 -->
@@ -108,6 +122,7 @@ export default {
statusList: ['未处理', '处理中', '已处理'], statusList: ['未处理', '处理中', '已处理'],
selectedImages: [], // 存储已选图片 selectedImages: [], // 存储已选图片
realImages: [], // 上传后的真实图片url realImages: [], // 上传后的真实图片url
infoImages:[],
loading: false loading: false
}; };
}, },
@@ -127,7 +142,7 @@ export default {
{ label: "预警编码", value: this.warnInfo.id }, { label: "预警编码", value: this.warnInfo.id },
{ label: "预警类型", value: this.warnInfo.smallTypeName }, { label: "预警类型", value: this.warnInfo.smallTypeName },
{ label: "设备名称", value: this.warnInfo.deviceName }, { label: "设备名称", value: this.warnInfo.deviceName },
{ label: "设备位置", value: this.warnInfo.deviceGroupName }, { label: "预警位置", value: this.warnInfo.deviceName },
{ label: "预警级别", value: this.warnInfo.levelName }, { label: "预警级别", value: this.warnInfo.levelName },
{ label: "预警时间", value: this.warnInfo.reportTime }, { label: "预警时间", value: this.warnInfo.reportTime },
{ label: "下发时间", value: this.warnInfo.servBeginTime }, { label: "下发时间", value: this.warnInfo.servBeginTime },
@@ -137,10 +152,16 @@ export default {
}, },
created() { created() {
this.loadEevetInfo(); this.loadEevetInfo();
this.getWarnImages()
}, },
methods: { methods: {
async getWarnImages(){
let res = await this.$u.api.getWarnImages({}, this.warnInfo.id);
if (res.code == 200 && res.data) {
// 提取res.data数组中每个对象的url字段
this.infoImages = res.data.map(item => item.imagePath);
}
},
async loadEevetInfo() { async loadEevetInfo() {
let res = await this.$u.api.getWarnEventInfo({}, this.warnInfo.id); let res = await this.$u.api.getWarnEventInfo({}, this.warnInfo.id);
if (res.code == "200") { if (res.code == "200") {
@@ -224,6 +245,13 @@ export default {
current: this.realImages[index], current: this.realImages[index],
urls: this.realImages urls: this.realImages
}) })
},
previewImage2(index) {
uni.previewImage({
current: this.infoImages[index],
urls: this.infoImages
})
} }
} }
}; };
@@ -252,6 +280,7 @@ export default {
.card-content { .card-content {
border-top: 1rpx solid #eee; border-top: 1rpx solid #eee;
padding-top: 20rpx; padding-top: 20rpx;
margin-bottom: 30rpx;
} }
.info-item { .info-item {
display: flex; display: flex;

View File

@@ -1,330 +1,262 @@
<template> <template>
<view class="page-container"> <view class="page-container">
<view class="top-line" /> <view class="top-line" />
<!-- 工单状态进度 -->
<view class="repair-detail-progress-box"> <view class="item-bg"><text class="detail-key">工单编号</text>{{ detail.orderNo }}</view>
<view class="repair-detail-progress"> <view class="item-bg">
<view v-for="(step, idx) in progressSteps" :key="idx" class="repair-detail-step"> <view class="item-title">上报人信息</view>
<view <view class="detail-key">发起人{{ detail.initiatorPeople }}</view>
:class="['repair-detail-dot', detailStep >= idx ? 'active' : '', (detailStep === idx && detailStatus !== '已结束') ? 'current' : '']"> <view class="detail-key">联系电话{{ detail.initiatorPhone }}</view>
</view> </view>
<view v-if="idx < progressSteps.length - 1" <view class="item-bg">
:class="['repair-detail-line', detailStep > idx ? 'active' : '']"></view> <view class="item-title">保修信息</view>
</view> <view class="detail-key">工单名称{{ detail.orderName }}</view>
</view> <view class="detail-key">工单类型{{ detail.typeName }}</view>
<view class="repair-detail-progress-labels"> <view class="detail-key">处理地点{{ detail.location }}</view>
<view v-for="(step, idx) in progressSteps" :key="idx" class="repair-detail-label">{{ step }} <view class="detail-key">备注{{ detail.remark }}</view>
</view> <view class="detail-value"><text class="detail-key">工单图片</text></view>
</view> <view class="image-list" v-if="orderImgUrls.length > 0">
</view> <u-image
v-for="(imgUrl, index) in orderImgUrls"
<!-- 工单详情 --> :key="index"
<view class="detail-list"> :src="imgUrl"
<view class="detail-value"><text class="detail-key">工单编号</text>{{ detail.orderNo }}</view> width="200rpx"
<view class="detail-value"><text class="detail-key">工单名称</text>{{ detail.orderName }}</view> height="200rpx"
<view class="detail-value"><text class="detail-key">工单类型</text>{{ detail.typeName }}</view> border-radius="10rpx"
<view class="detail-value"><text class="detail-key">处理地点</text>{{ detail.location }}</view> @click="previewImage(orderImgUrls, index)"
<view class="detail-value"><text class="detail-key">创建时间</text>{{ detail.createTime }}</view> style="margin-right: 20rpx; margin-bottom: 20rpx;"
<view class="detail-value"><text class="detail-key">发起单位/</text>{{ detail.initiatorPeople }}</view> mode="aspectFill"
<view class="detail-value remark"><text>备注</text>{{ detail.remark }}</view> ></u-image>
<view class="detail-value"><text class="detail-key">工单图片</text></view> </view>
<view class="image-list" v-if="orderImgUrls.length > 0"> </view>
<u-image
v-for="(imgUrl, index) in orderImgUrls" <view v-if="detail.status>1" class="item-bg">
:key="index" <view class="item-title">负责人信息</view>
:src="imgUrl" <view class="detail-key">负责人{{ detail.handlerText }}</view>
width="200rpx" <view class="detail-key">联系电话{{ detail.handlerPhone }}</view>
height="200rpx" </view>
border-radius="10rpx"
@click="previewImage(orderImgUrls, index)" <!-- 纵向进度条 -->
style="margin-right: 20rpx; margin-bottom: 20rpx;" <view class="item-bg">
mode="aspectFill" <view class="item-title">进度跟踪</view>
></u-image> <view v-for="(status, index) in detail.recordVoList" :key="index" class="repair-detail-step">
</view> <view class="step-left">
<text class="step-date">{{ status.createTime.substring(0,11)}}</text>
</view> <text class="step-time">{{ status.createTime.substring(11,16) }}</text>
</view>
<!-- 底部操作按钮 --> <view class="step-dot-container">
<view <view class="repair-detail-dot" ></view>
v-if="((!this.isManager&&this.detailStep != 0) || (this.isManager&&this.detailStep == 0))&&this.detailStep!=3" <!-- 固定高度连线 -->
class="btn-group"> <view
<button class="btn ghost" v-if="index < detail.recordVoList.length - 1" class="repair-detail-line"
@click="transfer(1)">{{this.isManager ? '指派':this.detailStep == 2 ? '完成':'开始'}}</button> ></view>
<button v-if="this.detailStep == 1" class="btn primary" @click="transfer(2)">转派</button> </view>
</view> <view class="step-right">
<text class="step-name">{{ getStatusLabel(status.status) }}</text>
<SelectUser :visible.sync="showSelect" :list="users" :multiple="false" @confirm="onConfirm" /> </view>
</view> </view>
</template> </view>
<script> <!-- 底部操作按钮 -->
import SelectUser from '@/components/SelectUser.vue' <view
export default { v-if="((!isManager && detailStep != 0) || (isManager && detailStep == 0)) && detailStep != 3&&!isNaomalUser"
components: { class="btn-group">
SelectUser <button class="btn ghost"
}, @click="transfer(1)">{{ isManager ? '指派' : (detailStep == 2 ? '完成' : '开始') }}</button>
data() { <button v-if="detailStep == 1" class="btn primary" @click="transfer(2)">转派</button>
return { </view>
detailStep: 0, <view class="kg">
detailStatus: '', </view>
progressSteps: ['创建工单', '已接单', '处理中', '已结束'], <SelectUser :visible.sync="showSelect" :list="users" :multiple="false" @confirm="onConfirm" />
currentStatus: 2, // 0: 待分配1: 已接单2: 处理中3: 已完成 </view>
detail: {}, </template>
isManager: false,
showSelect: false, <script>
users: [], import SelectUser from '@/components/SelectUser.vue'
orderImgUrls: [] // 添加用于存储处理后的图片URL数组 export default {
}; components: { SelectUser },
}, data() {
onLoad(options) { return {
this.isManager = this.vuex_user.roles[0].roleId == 1 detailStep: 0,
if (options.item) { detailStatus: '',
const item = JSON.parse(decodeURIComponent(options.item)); currentStatus: 2,
this.detail = item; detail: {},
// 现在可以使用item对象了 isManager: false,
// 进度映射 isNaomalUser:true,
this.getStepInfo() showSelect: false,
// 处理图片URL users: [],
orderImgUrls: []
this.getImageUrl() };
} },
if ((this.isManager && this.detailStep == 0) || (!this.isManager && this.detailStep == 1)) { onLoad(options) {
this.getHandler() this.isManager = this.vuex_user?.roles?.[0]?.roleId < 3
} this.isNaomalUser = this.vuex_user?.roles?.[0]?.roleId >10
}, if (options.item) {
methods: { const item = JSON.parse(decodeURIComponent(options.item));
goBack() { this.detail = item;
uni.navigateBack(); this.getStepInfo()
}, this.getImageUrl()
async getImageUrl() { }
if (!this.detail.orderImgUrl) return; if ((this.isManager && this.detailStep == 0) || (!this.isManager && this.detailStep == 1)) {
this.getHandler()
const imgIds = this.detail.orderImgUrl.split(','); }
const res = await this.$u.api.getImageUrl({}, imgIds); },
if (res.code == 200 && res.data) { methods: {
// 提取res.data数组中每个对象的url字段 goBack() { uni.navigateBack(); },
this.orderImgUrls = res.data.map(item => item.url); async getImageUrl() {
} if (!this.detail.orderImgUrl) return;
}, const imgIds = this.detail.orderImgUrl.split(',');
const res = await this.$u.api.getImageUrl({}, imgIds.join(','));
async getHandler() { if (res.code == 200 && res.data) this.orderImgUrls = res.data.map(item => item.url);
let handlers = await this.$u.api.getHandler3({}, this.detail.type); },
if (handlers.code === 200) { async getHandler() {
this.users = [...this.users, ...handlers.data]; let handlers = await this.$u.api.getHandler3({}, this.detail.type);
} if (handlers.code === 200) this.users = [...this.users, ...handlers.data];
}, },
getStepInfo(){ getStepInfo() {
if (this.detail.status == 0) { let currentIndex = 0;
this.detailStep = 0; if (this.detail.status == 0) currentIndex = 0;
this.detailStatus = '创建工单'; else if (this.detail.status == 1) currentIndex = 1;
} else if (this.detail.status == 4) { else if (this.detail.status == 3) currentIndex = 2;
this.detailStep = 3; else if (this.detail.status == 4) currentIndex = 3;
this.detailStatus = '已结束'; this.detailStep = currentIndex;
} else if (this.detail.status == 3) {
this.detailStep = 2; },
this.detailStatus = '处理中'; getStatusLabel(status) {
} else { const statusMap = {
this.detailStep = 1; 0: "创建工单",
this.detailStatus = '已接单'; 1: "已接单",
} 2: "已接单",
}, 3: "处理中",
previewImage(urls, index) { 4: "已完成",
// 使用uView的图片预览组件 };
// 过滤掉空值 return statusMap[status] || "";
const validUrls = urls.filter(url => url && url.trim() !== '') },
uni.previewImage({ previewImage(urls, index) {
urls: validUrls, const validUrls = urls.filter(url => url && url.trim() !== '');
current: validUrls[index], // current 必须是 url而不是索引 const currentIndex = validUrls.indexOf(urls[index]);
indicator: 'number', // 显示数字指示器 uni.previewImage({
backgroundColor: '#000' urls: validUrls,
}) current: currentIndex >= 0 ? currentIndex : 0,
}, indicator: 'number',
async onConfirm(selected) { backgroundColor: '#000'
let params = this.detail })
params.handler = selected[0].value },
params.status = 1 async onConfirm(selected) {
let res = await this.$u.api.updateOrder2(params); let params = this.detail
if (res.code == '200') { params.handler = selected[0].value
// 关闭页面前发送事件通知前页面刷新 params.status = 1
uni.$emit('refreshData', ''); let res = await this.$u.api.updateOrder2(params);
this.detail.handler = selected.value if (res.code == '200') {
this.detail.status = 1 uni.$emit('refreshData', '');
this.getStepInfo() if(!this.isManager){
} uni.navigateBack();
}, return
async submit() { }
let params = this.detail this.detail.handler = selected.value
if(this.detail.status == 1||this.detail.status == 2){ this.detail.status = 1
params.status = 3 const d = new Date();
}else { const z = n => n.toString().padStart(2, '0');
params.status = 4 let time = `${d.getFullYear()}-${z(d.getMonth()+1)}-${z(d.getDate())} ${z(d.getHours())}:${z(d.getMinutes())}:${z(d.getSeconds())}`;
} let step = {}
let res = await this.$u.api.updateOrder2(params); step.id= this.detail.recordVoList[0].id,
if (res.code == '200') { step.orderId= this.detail.recordVoList[0].orderId,
// 关闭页面前发送事件通知前页面刷新 step.status= '1',
uni.$emit('refreshData', ''); step.handler='',
this.detail.status = params.status step.handlerName='',
this.getStepInfo() step.createTime= time
} this.detail.recordVoList.push(step)
}, this.getStepInfo()
transfer(type) { }
if (this.isManager || type == 2) { },
this.showSelect = true async submit() {
} else { let params = this.detail
this.submit() if (this.detail.status == 1 || this.detail.status == 2) params.status = 3
} else params.status = 4
}, let res = await this.$u.api.updateOrder2(params);
} if (res.code == 200) {
}; uni.$emit('refreshData', '');
</script> this.detail.status = params.status
if(params.status ==3){
<style scoped> this.detail.handlerText = this.vuex_user.nickName
.page-container { this.detail.handlerPhone = this.vuex_user.phonenumber
background: #fff; }
} const d = new Date();
const z = n => n.toString().padStart(2, '0');
.top-line { let time = `${d.getFullYear()}-${z(d.getMonth()+1)}-${z(d.getDate())} ${z(d.getHours())}:${z(d.getMinutes())}:${z(d.getSeconds())}`;
width: 100vw; let step = {}
height: 3rpx; step.id= this.detail.recordVoList[0].id,
background: #ECECEC; step.orderId= this.detail.recordVoList[0].orderId,
} step.status= params.status,
step.handler='',
.repair-detail-progress-box { step.handlerName='',
height: 107rpx; step.createTime= time
margin-bottom: 41rpx; this.detail.recordVoList.push(step)
display: flex; this.getStepInfo()
flex-direction: column; }
justify-content: center; },
align-items: stretch;
}
transfer(type) {
.repair-detail-progress { if (this.isManager || type == 2) this.showSelect = true
display: flex; else this.submit()
align-items: center; }
justify-content: space-between; }
margin-bottom: 5rpx; }
margin-left: 85rpx; </script>
width: 100%;
} <style scoped>
.page-container { background: #f7f7f7; height: 100vh; }
.repair-detail-step { .top-line { width: 100vw; height: 3rpx; background: #ECECEC; }
display: flex; .item-bg{ background: #fff; border-radius: 20rpx; margin-top: 10px; margin-left: 25rpx; margin-right: 25rpx; padding: 25rpx; }
align-items: center; .item-title{ color: #000; font-size: 28rpx; font-weight: 600; margin-bottom: 20rpx; }
flex: 1;
position: relative; .repair-detail-step-container { display: flex; flex-direction: column; }
} .repair-detail-step {
display: flex;
.repair-detail-dot { flex-direction: row;
width: 22rpx; margin-bottom: 20rpx;
height: 22rpx; }
border-radius: 50%; .step-left { flex: 1; display: flex; flex-direction: column; align-items: flex-end; padding-right: 20rpx; }
background: #BDBDBD; .step-date { font-size: 24rpx; color: #333; }
border: 2rpx solid #BDBDBD; .step-time { font-size: 24rpx; color: #666; margin-top: 10rpx; }
position: relative; .step-dot-container {
z-index: 2; display: flex;
} flex-direction: column;
align-items: center;
.repair-detail-dot.active { width: 40rpx;
background: #2186FF; }
border-color: #2186FF; .repair-detail-dot {
} width: 22rpx;
height: 22rpx;
.repair-detail-dot.current { border-radius: 50%;
background: #EF8D00; background: #BDBDBD;
border-color: #EF8D00; border: 2rpx solid #BDBDBD;
} z-index: 2;
background: #2186FF;
.repair-detail-line { border-color: #2186FF;
flex: 1; }
height: 4rpx;
background: #BDBDBD; /* 固定高度连线 */
margin: 0 2rpx; .repair-detail-line {
z-index: 1; width: 4rpx;
} height: 80rpx; /* 每条线的高度 */
background: #BDBDBD;
.repair-detail-line.active { margin-top: 2rpx;
background: #2186FF; background: #2186FF;
} }
.repair-detail-progress-labels { .step-right { flex: 1; display: flex; flex-direction: column; padding-left: 20rpx; }
display: flex; .step-name { font-size: 28rpx; color: #333; font-weight: bold; margin-bottom: 6rpx; }
justify-content: space-between; .step-desc { font-size: 24rpx; color: #666; }
margin-left: 0; .detail-key { color: #222; font-size: 28rpx; margin-bottom: 20rpx; }
width: 100%; .detail-value { margin-bottom: 30rpx; color: #2F2F2F; }
} .image-list { display: flex; flex-wrap: wrap; margin-top: 20rpx; }
.btn-group { display: flex; justify-content: space-around; margin-top: 60rpx; }
.repair-detail-label { .btn { width: 276rpx; height: 88rpx; padding: 20rpx; font-size: 30rpx; border-radius: 50rpx; display: flex; align-items: center; justify-content: center; }
font-size: 22rpx; .primary { background-color: #1890ff; color: #fff; }
color: #888; .ghost { background-color: #fff; color: #1890ff; border: 2rpx solid #1890ff; }
text-align: center; .kg{
flex: 1; height: 60rpx;
position: relative; }
top: 8rpx; </style>
}
.detail-list {
font-size: 28rpx;
line-height: 2em;
margin-left: 40rpx;
}
.detail-key {
color: #595858;
}
.detail-value {
margin-bottom: 30rpx;
color: ##2F2F2F;
}
.remark {
white-space: pre-line;
}
.link {
color: #007CFF;
text-decoration: underline;
}
.image-list {
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
}
.image-item {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.btn-group {
display: flex;
justify-content: space-around;
margin-top: 60rpx;
}
.btn {
width: 276rpx;
height: 88rpx;
padding: 20rpx;
font-size: 30rpx;
border-radius: 50rpx;
display: flex;
align-items: center;
justify-content: center;
}
.primary {
background-color: #1890ff;
color: #fff;
}
.ghost {
background-color: #fff;
color: #1890ff;
border: 2rpx solid #1890ff;
}
</style>