Compare commits
8 Commits
ee9021b6af
...
master
Author | SHA1 | Date | |
---|---|---|---|
85a1ce799a | |||
264053bd7e | |||
9f37ef8252 | |||
ca2cbf6467 | |||
6a22bd4cca | |||
f4456dc86d | |||
09eb3e089b | |||
a02da12c32 |
133
.gitea/workflows/master.yml
Normal file
@@ -0,0 +1,133 @@
|
||||
name: Uniapp 自动化打包 CI/CD
|
||||
|
||||
# 触发条件:可根据需求调整(如 push 到 main 分支、打 tag 时触发)
|
||||
on:
|
||||
push:
|
||||
branches: [ master ] # 分支触发
|
||||
# tag:
|
||||
# - 'v*' # 版本 tag 触发(可选)
|
||||
|
||||
# 运行环境
|
||||
jobs:
|
||||
build:
|
||||
name: 打包 Uniapp 项目
|
||||
runs-on: ubuntu # 云 Runner 环境(自建 Runner 可替换为自定义名称)
|
||||
steps:
|
||||
########################################################################
|
||||
# 步骤 1:检出 Gitea 代码
|
||||
########################################################################
|
||||
- name: 1. 检出项目代码
|
||||
uses: http://git.missmoc.top/mocheng/checkout@v4 # Gitea 兼容的代码检出插件
|
||||
with:
|
||||
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 项目依赖
|
||||
########################################################################
|
||||
# - name: 3. 安装项目依赖
|
||||
# run: |
|
||||
# echo "开始安装项目依赖..."
|
||||
# npm install --registry=https://registry.npmmirror.com # 国内源加速(可选)
|
||||
# echo "项目依赖安装完成"
|
||||
|
||||
########################################################################
|
||||
# 步骤 4:下载并部署 HBuilderX CLI(若 Runner 未预装)
|
||||
########################################################################
|
||||
- name: 4. 部署 HBuilderX CLI 到 /hbuilderxcli/HBuilderX
|
||||
run: |
|
||||
# 创建 CLI 目标目录
|
||||
# sudo mkdir -p /hbuilderxcli/HBuilderX
|
||||
# 下载 HBuilderX Linux 完整版(版本 ≥3.1.5,可替换为最新版)
|
||||
# wget -O hbuilderx.zip https://download1.dcloud.net.cn/download/HBuilderX.4.0.14.20240528.full.zip
|
||||
# 解压到目标目录
|
||||
# unzip -q hbuilderx.zip -d /hbuilderxcli/HBuilderX
|
||||
# 赋予 CLI 执行权限
|
||||
sudo chmod +x /hbuilderxcli/HBuilderX/cli
|
||||
# 验证 CLI 版本(确保部署成功)
|
||||
/hbuilderxcli/HBuilderX/cli -v
|
||||
echo "HBuilderX CLI 部署完成,路径:/hbuilderxcli/HBuilderX/cli"
|
||||
|
||||
########################################################################
|
||||
# 步骤 5:HBuilderX 密钥登录(安全读取账户信息)
|
||||
########################################################################
|
||||
- name: 5. HBuilderX 账户登录
|
||||
id: hbx_login
|
||||
run: |
|
||||
echo "开始登录 HBuilderX 账户..."
|
||||
# 执行登录命令(读取 Gitea Secrets 中的账户密码)
|
||||
LOGIN_OUTPUT=$(/hbuilderxcli/HBuilderX/cli user login --username ${{ secrets.HBUILDERX_USERNAME }} --password ${{ secrets.HBUILDERX_PASSWORD }})
|
||||
# 打印登录输出(便于调试,无敏感信息)
|
||||
echo "登录结果:$LOGIN_OUTPUT"
|
||||
# 验证登录是否成功(根据文档,成功返回 "0:user login:OK")
|
||||
if [[ $? -ne 0 || $(echo "$LOGIN_OUTPUT" | grep -c "0:user login:OK") -eq 0 ]]; then
|
||||
echo "HBuilderX 登录失败!"
|
||||
exit 1 # 登录失败则终止 CI/CD 流程
|
||||
fi
|
||||
echo "HBuilderX 登录成功!"
|
||||
|
||||
########################################################################
|
||||
# 步骤 6:实时显示打包进度 + 执行 Uniapp 打包
|
||||
########################################################################
|
||||
- name: 6. 打包 Uniapp(实时显示排队/进度)
|
||||
id: uniapp_build
|
||||
run: |
|
||||
echo "开始打包 Uniapp 项目,当前时间:$(date +%Y-%m-%d_%H:%M:%S)"
|
||||
echo "========================================"
|
||||
echo "正在查询打包队列状态..."
|
||||
# (可选)提前查询队列(部分场景下 HBuilderX 会返回排队信息)
|
||||
/hbuilderxcli/HBuilderX/cli publish --platform android --query-queue
|
||||
echo "========================================"
|
||||
echo "开始执行打包(实时输出进度)..."
|
||||
# 执行打包命令(根据目标平台调整 --platform 参数,支持 android/ios/h5 等)
|
||||
# --project:指定项目根目录(当前检出目录)
|
||||
# --output:指定产物输出目录(便于后续归档)
|
||||
BUILD_OUTPUT=$(/hbuilderxcli/HBuilderX/cli publish \
|
||||
--platform android \
|
||||
--project ./ \
|
||||
--output ./unpackage/dist/build/android \
|
||||
--progress # 强制输出打包进度(部分版本需显式指定)
|
||||
)
|
||||
# 实时打印打包日志(包含排队进度、编译进度等信息)
|
||||
echo "$BUILD_OUTPUT"
|
||||
# 验证打包是否成功(根据实际输出调整判断条件,示例:找 "打包成功" 关键字)
|
||||
if [[ $? -ne 0 || $(echo "$BUILD_OUTPUT" | grep -c "打包成功") -eq 0 ]]; then
|
||||
echo "Uniapp 打包失败!"
|
||||
exit 1
|
||||
fi
|
||||
echo "========================================"
|
||||
echo "Uniapp 打包完成!产物路径:./unpackage/dist/build/android"
|
||||
|
||||
########################################################################
|
||||
# 步骤 7:归档打包产物(便于下载和后续部署)
|
||||
########################################################################
|
||||
- name: 7. 归档打包产物
|
||||
uses: https://gitea.com/actions/upload-artifact@v1 # Gitea 产物归档插件
|
||||
with:
|
||||
name: uniapp-android-build # 产物压缩包名称
|
||||
path: ./unpackage/dist/build/android # 产物目录(与步骤 6 的 --output 对应)
|
||||
retention-days: 7 # 产物保留时间(7 天,可调整)
|
||||
|
||||
########################################################################
|
||||
# 后置步骤:无论打包成功/失败,均执行 HBuilderX 登出(安全规范)
|
||||
########################################################################
|
||||
post:
|
||||
- name: 8. HBuilderX 账户登出
|
||||
run: |
|
||||
echo "开始登出 HBuilderX 账户..."
|
||||
LOGOUT_OUTPUT=$(/hbuilderxcli/HBuilderX/cli user logout)
|
||||
echo "登出结果:$LOGOUT_OUTPUT"
|
||||
# 验证登出是否成功(根据文档,成功返回 "0:user logout:OK")
|
||||
if [[ $(echo "$LOGOUT_OUTPUT" | grep -c "0:user logout:OK") -eq 0 ]]; then
|
||||
echo "HBuilderX 登出异常(非致命错误,不终止流程)"
|
||||
else
|
||||
echo "HBuilderX 登出成功!"
|
||||
fi
|
@@ -30,5 +30,5 @@ const config = {
|
||||
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;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name" : "数字南川",
|
||||
"appid" : "__UNI__3570A56",
|
||||
"description" : "aidex敏捷开发平台",
|
||||
"appid" : "__UNI__7AF1078",
|
||||
"description" : "",
|
||||
"versionName" : "1.8.4",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
@@ -26,7 +26,9 @@
|
||||
"nvueCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"modules" : {
|
||||
"Payment" : {}
|
||||
"Payment" : {},
|
||||
"Camera" : {},
|
||||
"Barcode" : {}
|
||||
},
|
||||
"distribute" : {
|
||||
"android" : {
|
||||
@@ -55,7 +57,9 @@
|
||||
],
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
|
||||
},
|
||||
"ios" : {},
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"ad" : {},
|
||||
"payment" : {
|
||||
@@ -103,7 +107,7 @@
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"androidStyle" : "default",
|
||||
"androidStyle" : "common",
|
||||
"android" : {
|
||||
"hdpi" : "E:/vueworkspace/aidex-m2m/src/assets/logo.png",
|
||||
"xhdpi" : "E:/vueworkspace/aidex-m2m/src/assets/logo.png",
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<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>
|
||||
<view class="add-repair-label">备注 <text class="add-repair-optional">(非必填)</text></view>
|
||||
<textarea v-model="repairInfo.remark" class="add-repair-detail-textarea"
|
||||
placeholder="如果以上报事不能解决您的问题,可以在这里填写说明" />
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
<!-- 有数据时 -->
|
||||
<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-no">工单号:{{ item.orderNo }}</view>
|
||||
<view class="repair-status" :class="getStatusColor(item.status)">
|
||||
@@ -172,6 +172,12 @@
|
||||
};
|
||||
return statusMap[status] || '';
|
||||
},
|
||||
goDetail(item) {
|
||||
const itemStr = encodeURIComponent(JSON.stringify(item));
|
||||
uni.navigateTo({
|
||||
url: "/pages/sys/workbench/order/orderDetail?item=" + itemStr,
|
||||
});
|
||||
},
|
||||
showDetail(item) {
|
||||
this.detailItem = item;
|
||||
if (item.status == 0) {
|
||||
|
@@ -40,7 +40,7 @@
|
||||
<view class="warn-info">预警位置:{{ item.deviceGroupName }}</view>
|
||||
<view class="warn-info">预警时间:{{ item.reportTime }}</view>
|
||||
<view class="warn-info">预警设备:{{ item.deviceName }}</view>
|
||||
<view v-if="[20, 30, 31, 32].includes(item.state)" class="warn-eval-wrap" @click.stop="goDetail(item)">
|
||||
<view v-if="[20, 30, 31, 32].includes(item.state)" class="warn-eval-wrap">
|
||||
<view class="warn-eval-btn">去处理</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -141,17 +141,17 @@
|
||||
this.tabLoaded[idx] = true;
|
||||
this.loading = false;
|
||||
},
|
||||
goDetail(item) {
|
||||
goDetail2(item) {
|
||||
const itemStr = encodeURIComponent(JSON.stringify(item));
|
||||
if([20, 30, 31, 32].includes(item.state)){
|
||||
uni.navigateTo({
|
||||
url: "/pages/sys/workbench/earlyWarning/warnDetail?item=" + itemStr,
|
||||
});
|
||||
},
|
||||
goDetail2(item) {
|
||||
const itemStr = encodeURIComponent(JSON.stringify(item));
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: "/pages/sys/workbench/earlyWarning/warnDetail?item=" + itemStr + "&pageType=detail",
|
||||
});
|
||||
}
|
||||
},
|
||||
goStatistics() {
|
||||
uni.navigateTo({
|
||||
|
@@ -1,84 +1,100 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<view class="top-line" />
|
||||
<!-- 工单状态进度 -->
|
||||
<view class="repair-detail-progress-box">
|
||||
<view class="repair-detail-progress">
|
||||
<view v-for="(step, idx) in progressSteps" :key="idx" class="repair-detail-step">
|
||||
<view
|
||||
:class="['repair-detail-dot', detailStep >= idx ? 'active' : '', (detailStep === idx && detailStatus !== '已结束') ? 'current' : '']">
|
||||
</view>
|
||||
<view v-if="idx < progressSteps.length - 1"
|
||||
:class="['repair-detail-line', detailStep > idx ? 'active' : '']"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="repair-detail-progress-labels">
|
||||
<view v-for="(step, idx) in progressSteps" :key="idx" class="repair-detail-label">{{ step }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 工单详情 -->
|
||||
<view class="detail-list">
|
||||
<view class="detail-value"><text class="detail-key">工单编号:</text>{{ detail.orderNo }}</view>
|
||||
<view class="detail-value"><text class="detail-key">工单名称:</text>{{ detail.orderName }}</view>
|
||||
<view class="detail-value"><text class="detail-key">工单类型:</text>{{ detail.typeName }}</view>
|
||||
<view class="detail-value"><text class="detail-key">处理地点:</text>{{ detail.location }}</view>
|
||||
<view class="detail-value"><text class="detail-key">创建时间:</text>{{ detail.createTime }}</view>
|
||||
<view class="detail-value"><text class="detail-key">发起单位/人:</text>{{ detail.initiatorPeople }}</view>
|
||||
<view class="detail-value remark"><text>备注:</text>{{ detail.remark }}</view>
|
||||
<view class="item-bg"><text class="detail-key">工单编号:</text>{{ detail.orderNo }}</view>
|
||||
<view class="item-bg">
|
||||
<view class="item-title">上报人信息</view>
|
||||
<view class="detail-key">发起人:{{ detail.initiatorPeople }}</view>
|
||||
<view class="detail-key">联系电话:{{ detail.initiatorPhone }}</view>
|
||||
</view>
|
||||
<view class="item-bg">
|
||||
<view class="item-title">保修信息</view>
|
||||
<view class="detail-key">工单名称:{{ detail.orderName }}</view>
|
||||
<view class="detail-key">工单类型:{{ detail.typeName }}</view>
|
||||
<view class="detail-key">处理地点:{{ detail.location }}</view>
|
||||
<view class="detail-key">备注:{{ detail.remark }}</view>
|
||||
<view class="detail-value"><text class="detail-key">工单图片:</text></view>
|
||||
<view class="image-list" v-if="orderImgUrls.length > 0">
|
||||
<u-image v-for="(imgUrl, index) in orderImgUrls" :key="index" :src="imgUrl"
|
||||
width="200rpx" height="200rpx" border-radius="10rpx"
|
||||
<u-image
|
||||
v-for="(imgUrl, index) in orderImgUrls"
|
||||
:key="index"
|
||||
:src="imgUrl"
|
||||
width="200rpx"
|
||||
height="200rpx"
|
||||
border-radius="10rpx"
|
||||
@click="previewImage(orderImgUrls, index)"
|
||||
style="margin-right: 20rpx; margin-bottom: 20rpx;"></u-image>
|
||||
style="margin-right: 20rpx; margin-bottom: 20rpx;"
|
||||
mode="aspectFill"
|
||||
></u-image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="detail.status>1" class="item-bg">
|
||||
<view class="item-title">负责人信息</view>
|
||||
<view class="detail-key">负责人:{{ detail.handlerText }}</view>
|
||||
<view class="detail-key">联系电话:{{ detail.handlerPhone }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 纵向进度条 -->
|
||||
<view class="item-bg">
|
||||
<view class="item-title">进度跟踪</view>
|
||||
<view v-for="(status, index) in detail.recordVoList" :key="index" class="repair-detail-step">
|
||||
<view class="step-left">
|
||||
<text class="step-date">{{ status.createTime.substring(0,11)}}</text>
|
||||
<text class="step-time">{{ status.createTime.substring(11,16) }}</text>
|
||||
</view>
|
||||
<view class="step-dot-container">
|
||||
<view class="repair-detail-dot" ></view>
|
||||
<!-- 固定高度连线 -->
|
||||
<view
|
||||
v-if="index < detail.recordVoList.length - 1" class="repair-detail-line"
|
||||
></view>
|
||||
</view>
|
||||
<view class="step-right">
|
||||
<text class="step-name">{{ getStatusLabel(status.status) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<view
|
||||
v-if="((!this.isManager&&this.detailStep != 0) || (this.isManager&&this.detailStep == 0))&&this.detailStep!=3"
|
||||
v-if="((!isManager && detailStep != 0) || (isManager && detailStep == 0)) && detailStep != 3&&!isNaomalUser"
|
||||
class="btn-group">
|
||||
<button class="btn ghost"
|
||||
@click="transfer(1)">{{this.isManager ? '指派':this.detailStep == 2 ? '完成':'开始'}}</button>
|
||||
<button v-if="this.detailStep == 1" class="btn primary" @click="transfer(2)">转派</button>
|
||||
@click="transfer(1)">{{ isManager ? '指派' : (detailStep == 2 ? '完成' : '开始') }}</button>
|
||||
<button v-if="detailStep == 1" class="btn primary" @click="transfer(2)">转派</button>
|
||||
</view>
|
||||
<view class="kg">
|
||||
</view>
|
||||
|
||||
<SelectUser :visible.sync="showSelect" :list="users" :multiple="false" @confirm="onConfirm" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SelectUser from '@/components/SelectUser.vue'
|
||||
export default {
|
||||
components: {
|
||||
SelectUser
|
||||
},
|
||||
import SelectUser from '@/components/SelectUser.vue'
|
||||
export default {
|
||||
components: { SelectUser },
|
||||
data() {
|
||||
return {
|
||||
detailStep: 0,
|
||||
detailStatus: '',
|
||||
progressSteps: ['创建工单', '已接单', '处理中', '已结束'],
|
||||
currentStatus: 2, // 0: 待分配,1: 已接单,2: 处理中,3: 已完成
|
||||
currentStatus: 2,
|
||||
detail: {},
|
||||
isManager: false,
|
||||
isNaomalUser:true,
|
||||
showSelect: false,
|
||||
users: [],
|
||||
orderImgUrls: [] // 添加用于存储处理后的图片URL数组
|
||||
orderImgUrls: []
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.isManager = this.vuex_user.roles[0].roleId == 1
|
||||
this.isManager = this.vuex_user?.roles?.[0]?.roleId < 3
|
||||
this.isNaomalUser = this.vuex_user?.roles?.[0]?.roleId >10
|
||||
if (options.item) {
|
||||
const item = JSON.parse(decodeURIComponent(options.item));
|
||||
this.detail = item;
|
||||
// 现在可以使用item对象了
|
||||
// 进度映射
|
||||
this.getStepInfo()
|
||||
// 处理图片URL
|
||||
|
||||
this.getImageUrl()
|
||||
}
|
||||
if ((this.isManager && this.detailStep == 0) || (!this.isManager && this.detailStep == 1)) {
|
||||
@@ -86,47 +102,45 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
goBack() { uni.navigateBack(); },
|
||||
async getImageUrl() {
|
||||
if (!this.detail.orderImgUrl) return;
|
||||
|
||||
const imgIds = this.detail.orderImgUrl.split(',');
|
||||
const res = await this.$u.api.getImageUrl({}, imgIds);
|
||||
if (res.code == 200 && res.data) {
|
||||
// 提取res.data数组中每个对象的url字段
|
||||
this.orderImgUrls = res.data.map(item => item.url);
|
||||
}
|
||||
const res = await this.$u.api.getImageUrl({}, imgIds.join(','));
|
||||
if (res.code == 200 && res.data) this.orderImgUrls = res.data.map(item => item.url);
|
||||
},
|
||||
|
||||
async getHandler() {
|
||||
let handlers = await this.$u.api.getHandler3({}, this.detail.type);
|
||||
if (handlers.code === 200) {
|
||||
this.users = [...this.users, ...handlers.data];
|
||||
}
|
||||
if (handlers.code === 200) this.users = [...this.users, ...handlers.data];
|
||||
},
|
||||
getStepInfo(){
|
||||
if (this.detail.status == 0) {
|
||||
this.detailStep = 0;
|
||||
this.detailStatus = '创建工单';
|
||||
} else if (this.detail.status == 4) {
|
||||
this.detailStep = 3;
|
||||
this.detailStatus = '已结束';
|
||||
} else if (this.detail.status == 3) {
|
||||
this.detailStep = 2;
|
||||
this.detailStatus = '处理中';
|
||||
} else {
|
||||
this.detailStep = 1;
|
||||
this.detailStatus = '已接单';
|
||||
}
|
||||
getStepInfo() {
|
||||
let currentIndex = 0;
|
||||
if (this.detail.status == 0) currentIndex = 0;
|
||||
else if (this.detail.status == 1) currentIndex = 1;
|
||||
else if (this.detail.status == 3) currentIndex = 2;
|
||||
else if (this.detail.status == 4) currentIndex = 3;
|
||||
this.detailStep = currentIndex;
|
||||
|
||||
},
|
||||
getStatusLabel(status) {
|
||||
const statusMap = {
|
||||
0: "创建工单",
|
||||
1: "已接单",
|
||||
2: "已接单",
|
||||
3: "处理中",
|
||||
4: "已完成",
|
||||
};
|
||||
return statusMap[status] || "";
|
||||
},
|
||||
previewImage(urls, index) {
|
||||
// 使用uView的图片预览组件
|
||||
this.$u.previewImage({
|
||||
urls: urls.filter(url => url.trim() !== ''),
|
||||
current: index
|
||||
});
|
||||
const validUrls = urls.filter(url => url && url.trim() !== '');
|
||||
const currentIndex = validUrls.indexOf(urls[index]);
|
||||
uni.previewImage({
|
||||
urls: validUrls,
|
||||
current: currentIndex >= 0 ? currentIndex : 0,
|
||||
indicator: 'number',
|
||||
backgroundColor: '#000'
|
||||
})
|
||||
},
|
||||
async onConfirm(selected) {
|
||||
let params = this.detail
|
||||
@@ -134,186 +148,115 @@
|
||||
params.status = 1
|
||||
let res = await this.$u.api.updateOrder2(params);
|
||||
if (res.code == '200') {
|
||||
// 关闭页面前发送事件通知前页面刷新
|
||||
uni.$emit('refreshData', '');
|
||||
if(!this.isManager){
|
||||
uni.navigateBack();
|
||||
return
|
||||
}
|
||||
this.detail.handler = selected.value
|
||||
this.detail.status = 1
|
||||
const d = new Date();
|
||||
const z = n => n.toString().padStart(2, '0');
|
||||
let time = `${d.getFullYear()}-${z(d.getMonth()+1)}-${z(d.getDate())} ${z(d.getHours())}:${z(d.getMinutes())}:${z(d.getSeconds())}`;
|
||||
let step = {}
|
||||
step.id= this.detail.recordVoList[0].id,
|
||||
step.orderId= this.detail.recordVoList[0].orderId,
|
||||
step.status= '1',
|
||||
step.handler='',
|
||||
step.handlerName='',
|
||||
step.createTime= time
|
||||
this.detail.recordVoList.push(step)
|
||||
this.getStepInfo()
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
let params = this.detail
|
||||
if(this.detail.status == 1||this.detail.status == 2){
|
||||
params.status = 3
|
||||
}else {
|
||||
params.status = 4
|
||||
}
|
||||
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') {
|
||||
// 关闭页面前发送事件通知前页面刷新
|
||||
if (res.code == 200) {
|
||||
uni.$emit('refreshData', '');
|
||||
this.detail.status = params.status
|
||||
if(params.status ==3){
|
||||
this.detail.handlerText = this.vuex_user.nickName
|
||||
this.detail.handlerPhone = this.vuex_user.phonenumber
|
||||
}
|
||||
const d = new Date();
|
||||
const z = n => n.toString().padStart(2, '0');
|
||||
let time = `${d.getFullYear()}-${z(d.getMonth()+1)}-${z(d.getDate())} ${z(d.getHours())}:${z(d.getMinutes())}:${z(d.getSeconds())}`;
|
||||
let step = {}
|
||||
step.id= this.detail.recordVoList[0].id,
|
||||
step.orderId= this.detail.recordVoList[0].orderId,
|
||||
step.status= params.status,
|
||||
step.handler='',
|
||||
step.handlerName='',
|
||||
step.createTime= time
|
||||
this.detail.recordVoList.push(step)
|
||||
this.getStepInfo()
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
transfer(type) {
|
||||
if (this.isManager || type == 2) {
|
||||
this.showSelect = true
|
||||
} else {
|
||||
this.submit()
|
||||
if (this.isManager || type == 2) this.showSelect = true
|
||||
else this.submit()
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
background: #fff;
|
||||
}
|
||||
.page-container { background: #f7f7f7; height: 100vh; }
|
||||
.top-line { width: 100vw; height: 3rpx; background: #ECECEC; }
|
||||
.item-bg{ background: #fff; border-radius: 20rpx; margin-top: 10px; margin-left: 25rpx; margin-right: 25rpx; padding: 25rpx; }
|
||||
.item-title{ color: #000; font-size: 28rpx; font-weight: 600; margin-bottom: 20rpx; }
|
||||
|
||||
.top-line {
|
||||
width: 100vw;
|
||||
height: 3rpx;
|
||||
background: #ECECEC;
|
||||
}
|
||||
|
||||
.repair-detail-progress-box {
|
||||
height: 107rpx;
|
||||
margin-bottom: 41rpx;
|
||||
.repair-detail-step-container { display: flex; flex-direction: column; }
|
||||
.repair-detail-step {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.step-left { flex: 1; display: flex; flex-direction: column; align-items: flex-end; padding-right: 20rpx; }
|
||||
.step-date { font-size: 24rpx; color: #333; }
|
||||
.step-time { font-size: 24rpx; color: #666; margin-top: 10rpx; }
|
||||
.step-dot-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.repair-detail-progress {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 5rpx;
|
||||
margin-left: 85rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.repair-detail-step {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.repair-detail-dot {
|
||||
width: 40rpx;
|
||||
}
|
||||
.repair-detail-dot {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
border-radius: 50%;
|
||||
background: #BDBDBD;
|
||||
border: 2rpx solid #BDBDBD;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.repair-detail-dot.active {
|
||||
background: #2186FF;
|
||||
border-color: #2186FF;
|
||||
}
|
||||
}
|
||||
|
||||
.repair-detail-dot.current {
|
||||
background: #EF8D00;
|
||||
border-color: #EF8D00;
|
||||
}
|
||||
|
||||
.repair-detail-line {
|
||||
flex: 1;
|
||||
height: 4rpx;
|
||||
/* 固定高度连线 */
|
||||
.repair-detail-line {
|
||||
width: 4rpx;
|
||||
height: 80rpx; /* 每条线的高度 */
|
||||
background: #BDBDBD;
|
||||
margin: 0 2rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.repair-detail-line.active {
|
||||
margin-top: 2rpx;
|
||||
background: #2186FF;
|
||||
}
|
||||
}
|
||||
|
||||
.repair-detail-progress-labels {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.repair-detail-label {
|
||||
font-size: 22rpx;
|
||||
color: #888;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
top: 8rpx;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.step-right { flex: 1; display: flex; flex-direction: column; padding-left: 20rpx; }
|
||||
.step-name { font-size: 28rpx; color: #333; font-weight: bold; margin-bottom: 6rpx; }
|
||||
.step-desc { font-size: 24rpx; color: #666; }
|
||||
.detail-key { color: #222; font-size: 28rpx; margin-bottom: 20rpx; }
|
||||
.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; }
|
||||
.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; }
|
||||
.kg{
|
||||
height: 60rpx;
|
||||
}
|
||||
</style>
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.3 KiB |