This commit is contained in:
Vinjor 2024-11-11 15:55:54 +08:00
parent dfb9f4b04f
commit bd5be7e4e9
8 changed files with 466 additions and 31 deletions

View File

@ -70,7 +70,7 @@
<!-- 在什么都不能操作的情况下可以查看详情-->
作废
</view>
<view v-if="userInfo.roleCodes.includes('weixiu') || userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('general_inspection')" @click="addProj(order)" class="btn pg">
<view v-if="(order.ticketsStatus == '04' || order.ticketsStatus == '05')&& (userInfo.roleCodes.includes('weixiu') || userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('general_inspection'))" @click="addProj(order)" class="btn pg">
添加项目
</view>
<view @click="gotoDetail" class="btn pg">

View File

@ -105,7 +105,7 @@
</view>
</view>
<project-picker ref="proj" @confirm="projConfirm"></project-picker>
<tabBarVue msg="1" @socketSuccess="socketSuccess"></tabBarVue>
<tabBarVue msg="1" ref="tarBar" @socketSuccess="socketSuccess"></tabBarVue>
<!-- 提示窗示例 -->
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog type="success" cancelText="线下告知" confirmText="去签字" title="系统提示" content="客户是否在场进行签字确认?" @confirm="dialogConfirm"
@ -224,6 +224,8 @@ export default {
selectedProj: [],
//
tellCusText:"",
//
ifFirstLogin:true,
}
},
onLoad(){
@ -652,6 +654,12 @@ export default {
if(res.code==200){
this.noReadNum = res.data>99?99:res.data
}
console.log("开始播放")
if(this.ifFirstLogin && this.noReadNum>0){
console.log("播放")
this.$refs.tarBar.dianyidain()
this.ifFirstLogin=false
}
})
},
/**

View File

@ -206,27 +206,28 @@
<view v-if="isDetail == '1'" class="card cardInfo projCard">
<view class="projTitle">维修进度记录表</view>
<view class="projList">
<view class="tushi-box">
<view class="tushi-item">- 待维修 </view>
<view class="tushi-item" style="color: #E8A321"> 维修中 </view>
<view class="tushi-item" style="color: #17DBB1;"> 已完成</view>
</view>
<uni-table ref="table" :loading="false" border stripe emptyText="暂无数据">
<uni-tr>
<uni-th width="50" align="center">序号</uni-th>
<uni-th align="center">维修项目</uni-th>
<uni-th width="30" align="center" >-</uni-th>
<uni-th width="30" align="center" ></uni-th>
<uni-th width="30" align="center" ></uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td align="center">{{ index+1 }}</uni-td>
<uni-td>{{ item.itemName }}</uni-td>
<uni-td align="center"><text v-if="item.itemStatus=='01'">-</text></uni-td>
<uni-td align="center"><text v-if="item.itemStatus=='02'" style="color: #E8A321"></text></uni-td>
<uni-td align="center"><text v-if="item.itemStatus=='03'" style="color: #17DBB1;"></text></uni-td>
</uni-tr>
</uni-table>
<!-- <view class="tushi-box">-->
<!-- <view class="tushi-item">- 待维修 </view>-->
<!-- <view class="tushi-item" style="color: #E8A321"> 维修中 </view>-->
<!-- <view class="tushi-item" style="color: #17DBB1;"> 已完成</view>-->
<!-- </view>-->
<uni-steps :options="list2" active-color="#007AFF" :active="active" direction="column" />
<!-- <uni-table ref="table" :loading="false" border stripe emptyText="暂无数据">-->
<!-- <uni-tr>-->
<!-- <uni-th width="50" align="center">序号</uni-th>-->
<!-- <uni-th align="center">维修项目</uni-th>-->
<!-- <uni-th width="30" align="center" >-</uni-th>-->
<!-- <uni-th width="30" align="center" ></uni-th>-->
<!-- <uni-th width="30" align="center" ></uni-th>-->
<!-- </uni-tr>-->
<!-- <uni-tr v-for="(item, index) in tableData" :key="index">-->
<!-- <uni-td align="center">{{ index+1 }}</uni-td>-->
<!-- <uni-td>{{ item.itemName }}</uni-td>-->
<!-- <uni-td align="center"><text v-if="item.itemStatus=='01'">-</text></uni-td>-->
<!-- <uni-td align="center"><text v-if="item.itemStatus=='02'" style="color: #E8A321"></text></uni-td>-->
<!-- <uni-td align="center"><text v-if="item.itemStatus=='03'" style="color: #17DBB1;"></text></uni-td>-->
<!-- </uni-tr>-->
<!-- </uni-table>-->
</view>
</view>
<view v-if="isDetail == '1'" class="card cardInfo projCard">
@ -375,6 +376,8 @@ export default {
ifCallCus:false,
//
tableData:[],
active: 1,
list2: [],
//
callServiceInfo:{
name:"",
@ -822,7 +825,21 @@ export default {
params:{ticketId:this.ticketId}
}).then((res)=>{
if(res.code==200){
this.tableData = res.data
this.list2 = []
//
let endIndex = -1
for (let i = 0; i < res.data.length; i++) {
let thisObj = res.data[i]
thisObj.title = thisObj.itemName
if(thisObj.itemStatus=='03'){
//,
endIndex = i
thisObj.desc = formatTimestamp(thisObj.updateTime)
}
this.list2.push(thisObj)
}
this.active = endIndex
console.log(this.list2,"thisObj.itemStatus=='02'")
}
})
},
@ -990,7 +1007,7 @@ export default {
.desc {
font-weight: 500;
font-size: 24rpx;
font-size: 28rpx;
color: rgba(255, 255, 255, 0.7);
}
}
@ -1109,7 +1126,7 @@ export default {
.flagDesc {
font-weight: 500;
font-size: 24rpx;
font-size: 28rpx;
color: #999999;
}
}
@ -1212,7 +1229,7 @@ export default {
.projDate {
font-weight: 500;
font-size: 24rpx;
font-size: 28rpx;
color: #858BA0;
display: flex;
@ -1224,7 +1241,7 @@ export default {
.projDesc {
font-weight: 500;
font-size: 24rpx;
font-size: 28rpx;
color: #858BA0;
}
@ -1278,7 +1295,7 @@ export default {
.projBaseInfo {
display: grid;
grid-template-columns: 1fr 1fr;
font-size: 24rpx;
font-size: 28rpx;
color: #999999;
gap: 20rpx;
margin-bottom: 20rpx;
@ -1321,7 +1338,7 @@ export default {
color: #333333;
.label {
font-size: 24rpx;
font-size: 28rpx;
color: #999999;
}
}

View File

@ -88,7 +88,7 @@
</scroll-view>
</view>
</view>
<tabBarVue msg="1" title="采购单"></tabBarVue>
<tabBarVue msg="1" ref="tarBar" title="采购单" @socketSuccess="socketSuccess"></tabBarVue>
</view>
</template>
@ -158,6 +158,8 @@ export default {
noReadNum: 0,
//
noticeNum: 0,
//
ifFirstLogin:true,
}
},
onLoad() {
@ -191,6 +193,11 @@ export default {
url: '/pages-home/msg/message'
})
},
socketSuccess(){
this.getNoReadNum()
this.onRefresherrefresh()
console.log('通知并刷新成功')
},
/**
* 领配件退配件Tab页
*/
@ -314,6 +321,11 @@ export default {
if (res.code == 200) {
this.noReadNum = res.data > 99 ? 99 : res.data
}
if(this.ifFirstLogin && this.noReadNum>0){
console.log("播放")
this.$refs.tarBar.dianyidain()
this.ifFirstLogin=false
}
})
},
/**

View File

@ -0,0 +1,18 @@
## 1.1.22024-03-28
- 修复 uni-steps为竖排列时文本长度过长引起点错乱的bug
## 1.1.12021-11-22
- 修复 vue3中某些scss变量无法找到的问题
## 1.1.02021-11-19
- 优化 组件UI并提供设计资源详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-steps](https://uniapp.dcloud.io/component/uniui/uni-steps)
## 1.0.82021-05-12
- 新增 项目示例地址
## 1.0.72021-05-06
- 修复 uni-steps 横向布局时,多行文字高度不合理的 bug
## 1.0.62021-04-21
- 优化 添加依赖 uni-icons, 导入后自动下载依赖
## 1.0.52021-02-05
- 优化 组件引用关系通过uni_modules引用组件
## 1.0.42021-02-05
- 调整为uni_modules目录规范

View File

@ -0,0 +1,280 @@
<template>
<view class="uni-steps">
<view :class="[direction==='column'?'uni-steps__column':'uni-steps__row']">
<view :class="[direction==='column'?'uni-steps__column-text-container':'uni-steps__row-text-container']">
<view v-for="(item,index) in options" :key="index"
:class="[direction==='column'?'uni-steps__column-text':'uni-steps__row-text']">
<text :style="{color:index === active?activeColor:deactiveColor}"
:class="[direction==='column'?'uni-steps__column-title':'uni-steps__row-title']">{{item.title}}</text>
<text v-if="item.desc" :style="{color: deactiveColor}"
:class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.desc}}</text>
</view>
</view>
<view :class="[direction==='column'?'uni-steps__column-container':'uni-steps__row-container']">
<view :class="[direction==='column'?'uni-steps__column-line-item':'uni-steps__row-line-item']"
v-for="(item,index) in options" :key="index" :style="{height: direction === 'column'?heightArr[index]+'px':'14px'}">
<view
:class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--before':'uni-steps__row-line--before']"
:style="{backgroundColor:index<=active&&index!==0?activeColor:index===0?'transparent':deactiveColor}">
</view>
<view :class="[direction==='column'?'uni-steps__column-check':'uni-steps__row-check']"
v-if="index === active">
<uni-icons :color="activeColor" :type="activeIcon" size="20" />
</view>
<view v-else :class="[direction==='column'?'uni-steps__column-circle':'uni-steps__row-circle']"
:style="{backgroundColor:index<active?activeColor:deactiveColor}" />
<view
:class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--after':'uni-steps__row-line--after']"
:style="{backgroundColor:index<active&&index!==options.length-1?activeColor:index===options.length-1?'transparent':deactiveColor}" />
</view>
</view>
</view>
</view>
</template>
<script>
/**
* Steps 步骤条
* @description 评分组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=34
* @property {Number} active 当前步骤
* @property {String} direction = [row|column] 当前步骤
* @value row 横向
* @value column 纵向
* @property {String} activeColor 选中状态的颜色
* @property {Array} options 数据源格式为[{title:'xxx',desc:'xxx'},{title:'xxx',desc:'xxx'}]
*/
export default {
name: 'UniSteps',
props: {
direction: {
// row column
type: String,
default: 'row'
},
activeColor: {
//
type: String,
default: '#2979FF'
},
deactiveColor: {
//
type: String,
default: '#B7BDC6'
},
active: {
//
type: Number,
default: 0
},
activeIcon: {
//
type: String,
default: 'checkbox-filled'
},
options: {
type: Array,
default () {
return []
}
} //
},
data() {
return {
heightArr: [],
}
},
mounted() {
//
if (this.direction === 'column') {
let that = this;
//id
uni.createSelectorQuery().in(this).selectAll('.uni-steps__column-text').boundingClientRect(data => {
that.heightArr = data.map(item => item.height + 1);
}).exec()
}
},
}
</script>
<style lang="scss">
$uni-primary: #2979ff !default;
$uni-border-color: #EDEDED;
.uni-steps {
/* #ifndef APP-NVUE */
display: flex;
width: 100%;
/* #endif */
/* #ifdef APP-NVUE */
flex: 1;
/* #endif */
flex-direction: column;
}
.uni-steps__row {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
}
.uni-steps__column {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row-reverse;
}
.uni-steps__row-text-container {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: flex-end;
margin-bottom: 8px;
}
.uni-steps__column-text-container {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
flex: 1;
}
.uni-steps__row-text {
/* #ifndef APP-NVUE */
display: inline-flex;
/* #endif */
flex: 1;
flex-direction: column;
}
.uni-steps__column-text {
padding: 6px 0px;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: $uni-border-color;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
}
.uni-steps__row-title {
font-size: 14px;
line-height: 16px;
text-align: center;
}
.uni-steps__column-title {
font-size: 18px;
text-align: left;
line-height: 24px;
}
.uni-steps__row-desc {
font-size: 12px;
line-height: 14px;
text-align: center;
}
.uni-steps__column-desc {
font-size: 16px;
text-align: left;
line-height: 20px;
}
.uni-steps__row-container {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
}
.uni-steps__column-container {
/* #ifndef APP-NVUE */
display: inline-flex;
/* #endif */
width: 30px;
flex-direction: column;
}
.uni-steps__row-line-item {
/* #ifndef APP-NVUE */
display: inline-flex;
/* #endif */
flex-direction: row;
flex: 1;
height: 14px;
line-height: 14px;
align-items: center;
justify-content: center;
}
.uni-steps__column-line-item {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
align-items: center;
justify-content: center;
}
.uni-steps__row-line {
flex: 1;
height: 1px;
background-color: #B7BDC6;
}
.uni-steps__column-line {
width: 1px;
background-color: #B7BDC6;
}
.uni-steps__row-line--after {
transform: translateX(1px);
}
.uni-steps__column-line--after {
flex: 1;
transform: translate(0px, 1px);
}
.uni-steps__row-line--before {
transform: translateX(-1px);
}
.uni-steps__column-line--before {
height: 6px;
transform: translate(0px, -13px);
}
.uni-steps__row-circle {
width: 15px;
height: 15px;
border-radius: 50%;
background-color: #B7BDC6;
margin: 0px 3px;
}
.uni-steps__column-circle {
width: 15px;
height: 15px;
border-radius: 50%;
background-color: #B7BDC6;
margin: 4px 0px 5px 0px;
}
.uni-steps__row-check {
margin: 0px 6px;
}
.uni-steps__column-check {
height: 14px;
line-height: 14px;
margin: 2px 0px;
}
</style>

View File

@ -0,0 +1,87 @@
{
"id": "uni-steps",
"displayName": "uni-steps 步骤条",
"version": "1.1.2",
"description": "步骤条组件,提供横向和纵向两种布局格式。",
"keywords": [
"uni-ui",
"uniui",
"步骤条",
"时间轴"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [
"uni-scss",
"uni-icons"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

View File

@ -0,0 +1,13 @@
## Steps 步骤条
> **组件名uni-steps**
> 代码块: `uSteps`
步骤条,常用于显示进度
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-steps)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839