This commit is contained in:
Vinjor 2024-10-22 15:06:49 +08:00
parent c4a0c71e4c
commit 810148c891
14 changed files with 509 additions and 616 deletions

View File

@ -22,8 +22,29 @@
<image :src="item.icon" class="icon" mode="aspectFit"></image>
</view>
</view>
<!-- 维修工角色-->
<view class="body-card" v-if="userInfo.roleCodes.includes('repair_staff')">
<view class="title">审批单处理<text class="formValue">全部</text><u-icon color="#999" name="arrow-right" size="12"></u-icon></view>
<view class="title-box">
<view class="title-box-item">
<view class="titleDesc">已提交</view>
<view class="titleNumber">4</view>
<image class="titleImg" src="@/pages-home/static/up.png" ></image>
</view>
<view class="title-box-item">
<view class="titleDesc">未通过</view>
<view class="titleNumber">1</view>
<image class="titleImg" src="@/pages-home/static/no.png" ></image>
</view>
<view class="title-box-item">
<view class="titleDesc">已通过</view>
<view class="titleNumber">6</view>
<image class="titleImg" src="@/pages-home/static/alow.png" ></image>
</view>
</view>
</view>
<!-- TODO 总检角色 -->
<view class="orderCount">
<view class="orderCount" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
<view class="orderCountItem">
<text class="label">维修中</text>
<text class="value">4</text>
@ -43,7 +64,7 @@
</text>
</view>
<view class="todoList">
<scroll-view scroll-y="true" class="itemContent" bindscrolltolower="onReachBottom"
<scroll-view scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @startWork="startWork"></order-card>
<view style="text-align: center" v-if="orderList.length==0">
@ -106,7 +127,7 @@ export default {
pageSize: 10,
total: 0,
//
isTriggered:false,
isTriggered:true,
orderList: [
],
defaultAvatar: require('@/static/icons/avatar.png')
@ -138,7 +159,7 @@ export default {
/**
* 上滑加载数据
*/
onReachBottom() {
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')
@ -382,6 +403,55 @@ export default {
}
}
.body-card {
border-radius: 6px 6px 6px 6px;
margin: 18px;
padding: 15px;
background: #FFFFFF;
.title {
margin-bottom: 30rpx;
font-weight: bold;
font-size: 32rpx;
color: #113A68;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
column-gap: 20rpx;
}
.formValue {
flex: 1;
width: 0;
text-align: right;
font-weight: 500;
font-size: 13px;
color: #858BA0;
}
.title-box{
display: flex;
justify-content: space-around;
.title-box-item{
width: 33%;
text-align: center;
.titleDesc {
font-weight: 500;
font-size: 24rpx;
color: #858BA0;
}
.titleNumber{
font-weight: 500;
font-size: 40rpx;
color: #333333;
margin: 4px;
}
.titleImg{
width: 48rpx;
height: 48rpx;
}
}
}
}
.orderCount {
margin: 40rpx 32rpx;
background: #FFFFFF;
@ -437,6 +507,7 @@ export default {
display: flex;
flex-direction: column;
row-gap: 20rpx;
height: calc(100vh - 500rpx);
}
}

BIN
pages-home/static/alow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

BIN
pages-home/static/no.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

BIN
pages-home/static/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

View File

@ -257,8 +257,8 @@ import VNavigationBar from '@/components/VNavigationBar.vue'
import {bus} from "@/utils/eventBus";
import request from '@/utils/request';
import upload from '@/utils/upload'
import {getOrderStatusText,formatDate,formatTimestamp,getDictTextByCodeAndValue,saveTicketsRecords,setStorageWithExpiry,getStorageWithExpiry} from "@/utils/utils";
import {getUserInfo,setJSONData} from '@/utils/auth'
import {getOrderStatusText,formatDate,formatTimestamp,getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils";
import {getUserInfo,setJSONData,setStorageWithExpiry,getStorageWithExpiry} from '@/utils/auth'
import config from '@/config'
export default {
components: {
@ -497,6 +497,11 @@ export default {
}else if("start" == e.item.code){
//
this.startWork(this.ticketInfo.id)
}else if("apply" == e.item.code){
//
uni.navigateTo({
url: '/pages-repair/apply/applyForm?ticketId='+this.ticketId
})
}
// uni.showModal({
// title: '',
@ -693,37 +698,7 @@ export default {
},
//
getItemUnit(unitCode){
if(unitCode){
let dictArray = getStorageWithExpiry("repair_unit");
if(null==dictArray || undefined==dictArray){
request({
url: '/admin-api/system/dict-data/type',
method: 'get',
tenantIdFlag:false,
params:{type:"repair_unit"}
}).then((res) => {
console.log(res)
if (res.code == 200) {
setStorageWithExpiry("repair_unit",res.data,3600)
let dictObj = dictArray.find(dict => dict.value == unitCode)
console.log(dictObj, "dictObj")
if (dictObj) {
return dictObj.label
} else {
return "未知数据"
}
}
})
}else{
let dictObj = dictArray.find(dict => dict.value == unitCode)
console.log(dictObj, "dictObj")
if (dictObj) {
return dictObj.label
} else {
return "未知数据"
}
}
}
return getDictTextByCodeAndValue("repair_unit",unitCode);
},
/**
* 点击配件申请单提醒查看相关配件

View File

@ -16,7 +16,7 @@
</view>
</view>
<view class="orderList">
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" bindscrolltolower="onReachBottom"
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @startWork="startWork"></order-card>
<view style="text-align: center" v-if="orderList.length==0">
@ -88,7 +88,7 @@ export default {
/**
* 上滑加载数据
*/
onReachBottom() {
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')

View File

@ -0,0 +1,382 @@
<template>
<view class="container">
<VNavigationBar background-color="#fff" title="配件申请" title-color="#333"></VNavigationBar>
<view class="search">
<view class="searchBox">
<input class="searchInput" v-model="searchName" placeholder="查询配件名称" placeholder-style="font-size: 28rpx" type="text">
<text @click="onRefresherrefresh">搜索</text>
</view>
</view>
<view class="tabs">
<view v-for="(item, index) in tabs" @click="chooseTab(item.value)" :key="index" :class="{'active': item.value === activeId}" class="tab-item">
{{ item.name }}
</view>
</view>
<view class="listBox">
<view class="list">
<scroll-view style="height: 100%" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view v-for="(item, index) in repairList" :key="index" class="listItem">
<view class="repairName">{{ item.name }}</view>
<view class="repairBottom">
<text class="repairDesc">单位
<text class="repairUnit">{{ getItemUnit(item.unit) }}</text>
</text>
<view class="repairBtns">
<u-icon name="minus-circle-fill" size="24" @click="delNum(item)"></u-icon>
<text class="repairNum">{{ item.num }}</text>
<u-icon color="#0174F6" name="plus-circle-fill" size="24" @click="addNum(item)"></u-icon>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="footer">
<text class="label">共选择</text>
<text class="repairNum">{{ repairCount }}个配件</text>
<view class="submit" @click="submit">确认申请</view>
</view>
</view>
</template>
<script>
import VNavigationBar from "@/components/VNavigationBar.vue";
import request from '@/utils/request';
import {getDictTextByCodeAndValue,createUniqueCodeByHead} from "@/utils/utils";
import {getUserInfo} from "@/utils/auth";
export default {
components: {VNavigationBar},
data() {
return {
tabs: [
{name: '全部', value: ''}
],
//
repairList: [],
//
selectedRepairList: [
],
//
searchName: '',
//ID
activeId: '',
//ID
ticketId:null,
pageNo: 1,
pageSize: 10,
total: 0,
//
isTriggered:false,
userInfo:null,
};
},
computed: {
repairCount() {
return this.selectedRepairList.reduce((val, item) => {
return item.num + val
}, 0)
}
},
onLoad(data) {
this.userInfo = getUserInfo()
this.ticketId = data.ticketId
this.init()
},
methods: {
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')
return
}
//+1,
this.pageNo++
//
this.pageList()
},
/**
* 下拉刷新数据
*/
onRefresherrefresh(){
this.isTriggered = true
this.pageNo = 1
this.total = 0
this.repairList = []
this.pageList()
},
init() {
//tab
request({
url: '/admin-api/repair/wares/getAllTypeList',
method: 'get'
}).then((res) => {
console.log(res)
if (res.code == 200 && res.data.length>0) {
res.data.map((item)=>{
this.tabs.push({
name:item.name,
value:item.id
})
})
}
})
//
this.pageList()
// //
// const result = [{name: 'S7 4L/ALL', num: 0, unit: '', id: 1},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 2},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 3},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 4},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 5}]
// //
// this.repairList = result.map(m => {
// if (this.selectedRepairList && this.selectedRepairList.length > 0) {
// const find = this.selectedRepairList.find(f => f.id === m.id)
// if (find) {
// m.num = find.num
// }
// }
// return m
// })
},
/**
* 分页加载所有配件
*/
pageList(){
let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize}
if(""!=this.activeId){
paramsObj.type = this.activeId
}
if(""!=this.searchName){
paramsObj.name = this.searchName
}
request({
url: '/admin-api/repair/wares/page',
method: 'get',
params:paramsObj
}).then((res) => {
console.log(res)
if (res.code == 200 && res.data.records.length>0) {
let thisDataList = res.data.records
//
thisDataList = thisDataList.map(m => {
if (this.selectedRepairList && this.selectedRepairList.length > 0) {
const find = this.selectedRepairList.find(f => f.id === m.id)
if (find) {
m.num = find.num
}else{
m.num = 0
}
}else{
m.num = 0
}
return m
})
// concat n
if (this.pageNo != 1) {
this.repairList = this.repairList.concat(thisDataList)
} else {
this.repairList = thisDataList
}
//
this.total = res.data.total
this.isTriggered = false
}
})
},
addNum(repair) {
this.$set(repair, 'num', repair.num + 1)
const find = this.selectedRepairList.find(f => f.id === repair.id)
if (find) {
find.num = repair.num
} else {
this.selectedRepairList.push(JSON.parse(JSON.stringify(repair)))
}
console.log('repair', repair)
},
delNum(repair) {
if (repair.num <= 0) {
return
}
this.$set(repair, 'num', repair.num - 1)
const findIndex = this.selectedRepairList.findIndex(f => f.id === repair.id)
if (findIndex > -1 && repair.num <= 0) {
this.selectedRepairList.splice(findIndex, 1)
} else if (repair.num > 0) {
this.$set(this.selectedRepairList[findIndex], 'num', repair.num)
}
},
submit() {
let orderNo = createUniqueCodeByHead("LLSQ")
let dataObj = {
no:orderNo,
ticketId:this.ticketId,
type:"01",
repairId:this.userInfo.nickname,
repairName:this.userInfo.id,
}
request({
url: '/admin-api/repair/tw/getAllTypeList',
method: 'get'
}).then((res) => {
console.log(res)
if (res.code == 200 && res.data.length>0) {
res.data.map((item)=>{
this.tabs.push({
name:item.name,
value:item.id
})
})
}
})
console.log('this.selectedRepairList', this.selectedRepairList)
},
/**
* 切换tab选中
* @param value
*/
chooseTab(value){
this.activeId = value
this.onRefresherrefresh()
},
//
getItemUnit(unitCode){
return getDictTextByCodeAndValue("repair_unit",unitCode);
},
}
}
</script>
<style lang="scss">
.container {
height: 100%;
background-color: #F3F5F7;
display: flex;
flex-direction: column;
}
.search {
padding: 0 40rpx;
background-color: #fff;
& > .searchBox {
height: 84rpx;
background: #F3F5F7;
border-radius: 12rpx 12rpx 12rpx 12rpx;
margin: 0 auto;
padding: 0 30rpx;
font-size: 28rpx;
color: #0174F6;
display: flex;
align-items: center;
}
.searchInput {
flex: 1;
width: 0;
color: #333;
}
}
.tabs {
background-color: #fff;
padding: 30rpx 40rpx;
margin: 0 auto;
display: flex;
align-items: center;
column-gap: 30rpx;
overflow: auto;
width: 100%;
.tab-item {
flex-shrink: 0;
padding: 16rpx 30rpx;
font-size: 28rpx;
color: #113A68;
background: #F2F2F7;
border-radius: 30rpx 30rpx 30rpx 30rpx;
&.active {
background: #0174F6;
color: #fff;
}
}
}
.listBox {
padding: 30rpx 32rpx;
flex: 1;
height: 0;
.list {
background-color: #fff;
padding: 0 30rpx;
height: 99%;
}
.listItem {
padding: 30rpx 0;
border-bottom: 2rpx solid #DDDDDD;
&:last-child {
border-bottom: none;
}
.repairName {
font-size: 32rpx;
color: #333333;
margin-bottom: 20rpx;
}
.repairBottom {
display: flex;
align-items: center;
justify-content: space-between;
}
.repairDesc {
font-size: 28rpx;
color: #858BA0;
}
.repairUnit {
color: #333333;
}
.repairBtns {
display: flex;
align-items: center;
column-gap: 10rpx;
}
}
}
.footer {
padding: 14rpx 32rpx;
background-color: #fff;
display: flex;
align-items: center;
.repairNum {
flex: 1;
width: 0;
margin-right: 10rpx;
}
.submit {
width: 208rpx;
height: 72rpx;
background: #0174F6;
border-radius: 38rpx 38rpx 38rpx 38rpx;
text-align: center;
line-height: 72rpx;
font-size: 32rpx;
color: #FFFFFF;
}
}
</style>

View File

@ -10,7 +10,7 @@
</view>
</view>
<view class="orderList">
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" bindscrolltolower="onReachBottom"
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @startWork="startWork"></order-card>
<view style="text-align: center" v-if="orderList.length==0">
@ -93,7 +93,7 @@
this.getOrderList()
},
getOrderList(){
}
}
}
@ -106,21 +106,21 @@
display: flex;
flex-direction: column;
color: #333333;
.body {
flex: 1;
height: 0;
padding: 24rpx 32rpx;
overflow: auto;
}
.tabList {
background: #FFFFFF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
display: flex;
align-items: center;
padding: 0 40rpx;
.tabItem {
padding: 30rpx;
flex: 1;
@ -128,11 +128,11 @@
text-align: center;
position: relative;
font-size: 28rpx;
&.actived {
color: #0174F6;
}
.activeLine {
position: absolute;
bottom: 0;
@ -145,7 +145,7 @@
}
}
}
.orderList {
//padding: 30rpx 0;
padding-top: 10rpx;
@ -153,7 +153,7 @@
display: flex;
flex-direction: column;
row-gap: 20rpx;
.stateImg {
}
}

View File

@ -1,545 +0,0 @@
<template>
<view class="container">
<!--<VNavigationBar style="position: relative;z-index: 99;" leftTitle="true" backgroundColor="rgba(0,0,0,0)" title-color="#fff" title=" "></VNavigationBar>-->
<view class="bodyTopBg"></view>
<view class="body">
<view class="userInfoBox" @click="showUserDetail">
<image style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-if="''==userInfo.avatar || null == userInfo.avatar" :src="defaultAvatar" mode="scaleToFill" @error="avatarErr"></image>
<image style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-else :src="imgUrlPrex+userInfo.avatar" mode="scaleToFill" @error="avatarErr"></image>
<view class="userInfo">
<text class="userName">{{ userInfo.nickname }}</text>
<text class="userType">{{ userInfo.roleNames }}</text>
</view>
<image style="width: 48rpx;height: 48rpx" src="/static/icons/more.png" mode="aspectFita"></image>
</view>
<view class="body-card">
<view class="title">审批单处理</view>
<view class="title-box">
<view class="title-box-item">
<view class="titleDesc">已提交</view>
<view class="titleNumber">4</view>
<image class="titleImg" src="@/static/images/nothing.png" ></image>
</view>
<view class="title-box-item">
<view class="titleDesc">未通过</view>
<view class="titleNumber">1</view>
<image class="titleImg" src="@/static/images/nothing.png" ></image>
</view>
<view class="title-box-item">
<view class="titleDesc">已通过</view>
<view class="titleNumber">6</view>
<image class="titleImg" src="@/static/images/nothing.png" ></image>
</view>
</view>
</view>
<view class="todoListBox">
<view class="title">
维修工单
<text class="titleDesc">当前共
<text class="titleCount"> {{total}} </text>
项工单需要处理
</text>
</view>
<view class="todoList">
<scroll-view scroll-y="true" class="itemContent" bindscrolltolower="onReachBottom"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @startWork="startWork"></order-card>
<view style="text-align: center" v-if="orderList.length==0">
<image class="" src="@/static/images/nothing.png" ></image>
</view>
</scroll-view>
</view>
</view>
</view>
<tabBarVue msg="1"></tabBarVue>
</view>
</template>
<script>
import tabBarVue from '@/components/tabBar/tabBar.vue'
import VNavigationBar from '@/components/VNavigationBar.vue'
import OrderCard from "@/components/repairCard.vue";
import config from '@/config'
import request from '@/utils/request';
import {formatTimestamp,getOrderStatusText,builderOrder,saveTicketsRecords} from "@/utils/utils";
import {
getToken,
getUserInfo,
getStrData,
getTenantId
} from '@/utils/auth'
export default {
components: {
OrderCard,
tabBarVue,
VNavigationBar
},
data() {
return {
imgUrlPrex:config.baseImageUrl,
userInfo: {
avatar: undefined,
nickname: ''
},
bannerIndex: 0,
shopList: [],
bannerList: [],
richTextHtml: null,
pageNo: 1,
pageSize: 10,
total: 0,
//
isTriggered:false,
orderList: [
],
defaultAvatar: require('@/static/icons/avatar.png')
}
},
onLoad(){
if(!getToken()){
uni.reLaunch({
url: '/pages/login/login'
})
}else{
if(!this.$msgSocket){
this.$startMsgSocket(getTenantId(),getStrData("userId"))
}
}
},
onShow() {
if(!getToken()){
uni.reLaunch({
url: '/pages/login/login'
})
}else{
//
this.userInfo = getUserInfo()
this.onRefresherrefresh()
}
},
methods: {
/**
* 上滑加载数据
*/
onReachBottom() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')
return
}
//+1,
this.pageNo++
//
this.getOrderList()
},
/**
* 下拉刷新数据
*/
onRefresherrefresh(){
this.isTriggered = true
this.pageNo = 1
this.total = 0
this.orderList = []
this.getOrderList()
},
/**
* 开始施工
*/
startWork(id){
let paramsObj = {ticketId:id}
//
request({
url: '/admin-api/repair/titem/listProject',
method: 'get',
params:paramsObj
}).then((res) => {
console.log(res)
if (res.code == 200 && res.data.length>0) {
if(res.data.length==1){
//1
this.startWorkRequest(id,"02",res.data[0].id,"02","kssg","开始施工")
}else{
uni.showActionSheet({
itemList: res.data.map(m => m.itemName),
success: ({
tapIndex
}) => {
this.startWorkRequest(id,"02",res.data[tapIndex].id,"02","kssg","开始施工")
}
})
}
}else{
uni.showToast({
title: '操作失败,请联系管理员',
icon: 'none'
})
}
})
},
/**
* 开始施工请求后台
*/
async startWorkRequest(id,ticketsWorkStatus,itemId,itemStatus,recordType,remark){
try {
const result = await saveTicketsRecords(id,ticketsWorkStatus,itemId,itemStatus,recordType,remark,null);
console.error("result",result);
this.onRefresherrefresh()
} catch (error) {
console.error(error);
}
},
/**
* 查本人待处理工单
*/
getOrderList(){
let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize, isFinish: "0"}
request({
url: '/admin-api/repair/tickets/pageType',
method: 'get',
params:paramsObj
}).then((res) => {
console.log(res)
if (res.code == 200) {
let thisPageRecords = []
if(res.data && res.data.hasOwnProperty("records")){
for (let i = 0; i < res.data.records.length; i++) {
let order = res.data.records[i]
let viewOrder = builderOrder(order)
if(order.booking){
viewOrder['appointDate'] = formatTimestamp(order.createTime)
}
let projectList = []
if(order.itemList){
for (let j = 0; j < order.itemList.length; j++) {
let itemObj = order.itemList[j]
if("01"==itemObj.itemType){
projectList.push({
id:itemObj.id,
name:itemObj.itemName
})
}
}
}
viewOrder['projectList'] = projectList
thisPageRecords.push(viewOrder)
}
}
// concat n
if (this.pageNo != 1) {
this.orderList = this.orderList.concat(thisPageRecords)
} else {
this.orderList = thisPageRecords
}
//
if(res.data){
this.total = res.data.total
}
this.isTriggered = false
}
})
},
gotoPage(menu) {
uni.navigateTo({
url: menu.path
})
},
avatarErr(err) {
console.log('err', err)
this.userInfo.avatar = this.defaultAvatar
},
showUserDetail() {
uni.navigateTo({
url: '/pages/my/myInfo'
})
}
}
}
</script>
<style lang="less" scoped>
* {
box-sizing: border-box;
}
.container {
height: 100%;
//background: linear-gradient(180deg, #0174F6 0%, rgba(1, 116, 246, 0) 100%);
display: flex;
flex-direction: column;
position: relative;
padding-top: 60rpx;
background-color: #F3F5F7;
.bodyTopBg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 500rpx;
background-image: url("@/static/bg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
}
.body {
position: relative;
z-index: 10;
flex: 1;
height: 0;
overflow: auto;
padding-bottom: 30rpx;
}
.userInfoBox {
margin: 0 32rpx 40rpx;
display: flex;
column-gap: 20rpx;
align-items: center;
.userInfo {
flex: 1;
width: 0;
.userName {
font-weight: bold;
font-size: 36rpx;
color: #333333;
display: block;
margin-bottom: 16rpx;
}
.userType {
font-size: 24rpx;
color: #0174F6;
display: inline-block;
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 1rpx solid #0174F6;
padding: 8rpx 16rpx;
}
}
}
.body-card {
border-radius: 6px 6px 6px 6px;
margin: 18px;
padding: 15px;
background: #FFFFFF;
.title {
margin-bottom: 30rpx;
font-weight: bold;
font-size: 32rpx;
color: #113A68;
}
.title-box{
display: flex;
justify-content: space-around;
.title-box-item{
width: 33%;
text-align: center;
.titleDesc {
font-weight: 500;
font-size: 24rpx;
color: #858BA0;
}
.titleNumber{
font-weight: 500;
font-size: 40rpx;
color: #333333;
margin: 4px;
}
.titleImg{
width: 48rpx;
height: 48rpx;
}
}
}
}
.todoListBox {
margin: 40rpx 32rpx;
.title {
margin-bottom: 30rpx;
font-weight: bold;
font-size: 32rpx;
color: #113A68;
.titleDesc {
margin-left: 20rpx;
font-weight: 500;
font-size: 24rpx;
color: #858BA0;
}
.titleCount {
color: #0174F6;
}
}
.todoList {
display: flex;
flex-direction: column;
row-gap: 20rpx;
}
}
.body-top-banner {
text-align: center;
}
.banner {
margin: 24rpx 0 0;
width: 686rpx;
height: 100%;
border-radius: 12rpx 12rpx 12rpx 12rpx;
background-color: #0174F6;
}
.menus {
margin: 30rpx auto 0;
box-sizing: border-box;
width: 686rpx;
padding: 40rpx 38rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(10, 54, 104, 0.1);
border-radius: 12rpx 12rpx 12rpx 12rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.menu-item {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
row-gap: 22rpx;
font-size: 24rpx;
.menu-icon {
width: 48rpx;
height: 48rpx;
}
}
.info {
width: 686rpx;
margin: 38rpx auto 0;
display: flex;
align-items: center;
column-gap: 20rpx;
.info-icon {
width: 80rpx;
height: 80rpx;
}
.infoList {
flex: 1;
width: 0;
.infoItem {
display: flex;
align-items: center;
justify-content: space-between;
column-gap: 10rpx;
}
.infoIndex {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background-color: #333;
}
.infoText {
flex: 1;
width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 24rpx;
}
}
.more-icon {
width: 24rpx;
height: 24rpx;
}
}
.repairShop {
width: 686rpx;
margin: 38rpx auto 0;
.title {
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.shopList {
.shopItem {
padding: 30rpx 0;
border-bottom: 1rpx solid #DDDDDD;
display: flex;
align-items: center;
column-gap: 20rpx;
}
.shopImg {
width: 160rpx;
height: 100rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
background-color: #999;
}
.shopInfo {
flex: 1;
width: 0;
}
.shopTitle {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-bottom: 20rpx;
}
.shopDetail {
display: flex;
align-items: center;
font-size: 24rpx;
color: #666666;
column-gap: 10rpx;
}
.shopAddress {
flex: 1;
width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.line {
width: 2rpx;
height: 24rpx;
background-color: #858BA0;
}
.shopDistance {
flex-shrink: 0;
}
}
}
}
</style>

View File

@ -16,7 +16,7 @@
</view>
</view>
<view class="orderList">
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" bindscrolltolower="onReachBottom"
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @startWork="startWork"></order-card>
<view style="text-align: center" v-if="orderList.length==0">
@ -88,7 +88,7 @@ export default {
/**
* 上滑加载数据
*/
onReachBottom() {
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')

View File

@ -31,7 +31,7 @@
</view>
<view class="todoListBox">
<scroll-view :refresher-triggered="isTriggered" bindscrolltolower="onReachBottom" class="itemContent"
<scroll-view :refresher-triggered="isTriggered" @scrolltolower="onReachBottomCus" class="itemContent"
refresher-enabled
scroll-y="true" style="height: 100%" @refresherrefresh="onRefresherrefresh">
<view v-for="(item, index) in orderList" :key="index" class="orderItem">
@ -184,7 +184,7 @@ export default {
/**
* 上滑加载数据
*/
onReachBottom() {
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')

View File

@ -129,7 +129,7 @@
"root": "pages-repair",
"pages": [
{
"path": "home/home",
"path": "apply/applyForm",
"style": {
"navigationBarTitleText": ""
}
@ -148,7 +148,7 @@
},
{
"path" : "applyList/applyList",
"style" :
"style" :
{
"navigationBarTitleText" : ""
}

View File

@ -33,7 +33,7 @@
<view class="t-zi" v-html="item.newsContent"></view>
</view>
</view>
<view class="c-b-bom">
<!-- <view class="b-left">{{item.createTime.substring(0,item.createTime.length - 3)}}</view> -->
<view class="b-right">
@ -60,7 +60,7 @@
<image src="http://www.nuoyunr.com/lananRsc/detection/fab.png" v-if="fab == false" @click="getfab()"></image>
<image src="http://www.nuoyunr.com/lananRsc/detection/xz.png" v-if="fab == true" @click="getfab()"></image>
</view>
<!-- 悬浮按钮 结束-->
<!-- <tabBar></tabBar> -->
</view>
@ -117,14 +117,14 @@
})
}
},
onReachBottom() {
onReachBottomCus() {
console.log(111)
if (this.pageNum >= this.totalPages) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.pageNum++
this.arrlist=[]
@ -137,7 +137,7 @@
url: '/admin-api/appInspection/news/listGfClass',
method: 'get'
})
this.typeList = typeRes.data
},
getfab() {
@ -152,7 +152,7 @@
getback(){
uni.navigateBack({
delta:1,
})
})
},
async getlistindex(){
//
@ -180,8 +180,8 @@
this.arrlist = res.rows
}
let total = res.total
this.totalPages = Math.ceil(total / this.pageSize);
this.totalPages = Math.ceil(total / this.pageSize);
},
getdetails(id){
uni.navigateTo({
@ -205,9 +205,9 @@
url:'/pages/detedetails/managelist?type=hygg'
})
}
}
}
</script>
@ -315,7 +315,7 @@
width: 100%;
height: 100%;
}
}
.t-right{
width: 60%;
@ -324,7 +324,7 @@
font-size: 20px;
font-weight: bold;
color: #333333;
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -335,10 +335,10 @@
font-size: 16px;
font-weight: bold;
color: #5e5e5e;
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.t-zi{
font-size: 14px;
@ -346,7 +346,7 @@
color: #666666;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
@ -419,6 +419,6 @@
border-style:solid;
border-width:2px;
font-size: 15px;
}
</style>
</style>

View File

@ -230,4 +230,14 @@ export function formatDate(timestamp) {
return `${year}-${month}-${day}`;
}
/**
* 生成一个16位的纯数字的唯一ID
* 生成策略 head + 当前时间戳 + 随机数
* @param head 前缀
*/
export function createUniqueCodeByHead(head = '') {
const min = 100; // 最小值
const max = 999; // 最大值
return head.toString() + Date.now().toString() + Math.floor(Math.random() * (max - min + 1)) + min;
}