展示tab页调整

test
zhangdi 1 year ago
parent 53729c9f88
commit adb590dd0e
  1. 2
      pages.json
  2. 1
      pages/home/components/eacharts_pie.vue
  3. 236
      pages/home/index.vue
  4. 2
      pages/inspection/plan.vue
  5. 57
      pages/inspection/quest.vue
  6. 30
      pages/submission/records.vue
  7. 8
      store/index.js
  8. 29
      utils/tabbar.js
  9. 4
      utils/website.js

@ -71,7 +71,7 @@
"navigationBarTitleText": "巡检计划",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#F8F8F8",
"navigationBarBackgroundColor": "#fff",
"app-plus": {
"titleNView": {}
}

@ -106,7 +106,6 @@ export default {
margin: 0 32rpx 32rpx;
border-radius: 20rpx;
overflow: hidden;
.echarts {
width: calc(100% - 64rpx);
height: 368rpx;

@ -7,72 +7,42 @@
</u-icon>
</view>
</u-navbar>
<!-- 通知公告 -->
<view class="notice_box" v-if="noticeList.length > 0">
<u-notice-bar mode="horizontal" type="primary" :list="noticeList" :more-icon="true" @getMore="getNotice()"
:is-circular="false"></u-notice-bar>
</view>
<view class="">
<view class="banner-swiper" v-if="swiperList.length > 0">
<view class="logo-txt">科研医疗建筑运维平台</view>
<image :src="swiperList[0]" style="padding-right:12rpx;height:444rpx;width:100%"></image>
</view>
<view class="menu_box">
<view class="menu_title">工作台</view>
<view class="menu_list clearfix" v-if="dataTypes==1">
<view class="item_box" @click="goPage('/pages/inspection/plan')">
<view class="item_img">
<image src="@/static/images/home/left.svg" mode="aspectFit" />
</view>
<view class="item_txt">巡检计划</view>
</view>
<view class="item_box" @click="goPage('/pages/submission/records?name=报送记录')">
<view class="item_img">
<image src="@/static/images/home/left.svg" mode="aspectFit" />
</view>
<view class="item_txt">报送记录</view>
</view>
</view>
<view class="menu_list clearfix" v-else-if="dataTypes==4">
<view class="item_box" @click="goPage('/pages/submission/records?name=维修任务')">
<view class="item_img">
<image src="@/static/images/home/left.svg" mode="aspectFit" />
</view>
<view class="item_txt">维修任务</view>
</view>
<view class="item_box" @click="goPage('/pages/inspection/quest')">
<view class="item_img">
<image src="@/static/images/home/left.svg" mode="aspectFit" />
<view class="work-title">工作台</view>
<view class="workbench">
<view v-for="(item, index) in workList" :key="index" class="workbench-slider">
<view class="workbench-item" @click="goPage(item.pagePath)">
<view class="workbench-item-icon">
<image :src="item.img" mode="aspectFit" />
</view>
<view class="item_txt">巡检任务</view>
</view>
</view>
<view class="menu_list clearfix" v-else>
<view class="item_box" @click="goPage('/pages/submission/records?name=接单记录')">
<view class="item_img">
<image src="@/static/images/home/left.svg" mode="aspectFit" />
</view>
<view class="item_txt">接单记录</view>
</view>
<view class="item_box" @click="goPage('/pages/inspection/quest')">
<view class="item_img">
<image src="@/static/images/home/left.svg" mode="aspectFit" />
</view>
<view class="item_txt">巡检任务</view>
<u-badge class="badge" type="error" :count="item.num" :offset="[0, 0]"></u-badge>
</view>
<view class="workbench-name">{{ item.name }}</view>
</view>
</view>
<view class="work-title">设备统计</view>
<eachartsPie :echartData="pieInfo"></eachartsPie>
<view class="work-title">检修单状态</view>
<eachartsNightpie :echartData="pieInfo"></eachartsNightpie>
<view>
<swiperSlider></swiperSlider>
</view>
<!-- <view class="work-title">设备报警</view> -->
<view>
<alarm></alarm>
</view>
<view class="work-title">维修统计</view>
<view class="statistics">
<eacharts :type="'maintenanceStatistics'"></eacharts>
<!-- <eacharts :type="'maintenanceStatisticsPie'"></eacharts> -->
<eacharts></eacharts>
</view>
<view class="work-title">故障现象分类</view>
<view class="statistics">
<eachartsPie :echartData="pieInfo.fault"></eachartsPie>
</view>
<view class="work-title">设备分类</view>
<view class="statistics">
<eachartsNightpie :echartData="pieInfo.device"></eachartsNightpie>
</view>
</view>
<betone-tabbar ref="tabbarRef" />
@ -93,35 +63,27 @@ export default {
eachartsPie,
eachartsNightpie
},
computed: {
dataTypes() {
return this.$store.state.dataType
},
},
data() {
return {
swiperList: [],
workList: [],
pieInfo: [],//
noticeList: [
],//
pieInfo: {},//
};
},
onLoad() {
this.pieStat()
},
onShow() {
this.$nextTick(() => {
// this.pieStat()
this.$refs.tabbarRef.getPermission();
this.getNoticeList()
// this.BetLoading.show();
// setTimeout(() => {
// this.BetLoading.hide();
// }, 1000);
});
//
this.pieStat()
this.getUserInfo()
this.getoverview()
},
methods: {
// overview
@ -169,9 +131,14 @@ export default {
})
},
goPage(item) {
uni.navigateTo({
url: item,
});
if (item == '') {
uni.showToast({ title: "功能正在完善中,敬请期待!", icon: "none" });
} else {
uni.navigateTo({
url: item,
});
}
},
scanCode() {
uni.scanCode({
@ -185,28 +152,11 @@ export default {
}
});
},
//
pieStat() {
//
pieStat() {
this.$u.api.pieStat().then(res => {
if (res.code == 200) {
this.pieInfo = res.data.fault
}
})
},
//
getNotice() {
uni.navigateTo({
url: '/pages/notice/announcement',
});
},
getNoticeList() {
this.$u.api.getNoticeList().then(res => {
if (res.code == 200) {
let data = res.data.records
data.forEach(item => {
this.noticeList.push(item.title)
})
this.pieInfo = res.data
}
})
},
@ -218,10 +168,11 @@ export default {
width: 100%;
// min-height: 100%;
padding: 0;
background: rgba(239, 239, 239, 1);
padding-top: var(--status-bar-height);
.banner-swiper {
margin-bottom: 32rpx;
margin-bottom: 64rpx;
position: relative;
.logo-txt {
@ -246,7 +197,6 @@ export default {
color: rgba(16, 16, 16, 1);
font-size: 32rpx;
padding: 0 0 32rpx 36rpx;
margin-top: 32rpx;
}
.workbench {
@ -297,99 +247,5 @@ export default {
.statistics_pie {
width: 100%;
}
.menu_box {
background: #fff;
position: relative;
margin: 0 32rpx;
border-radius: 20rpx;
&::after {
content: '';
position: absolute;
height: 4rpx;
width: 100%;
background: #38D79F;
position: absolute;
top: 0;
left: 0;
}
.menu_title {
height: 100rpx;
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 100rpx;
text-align: left;
font-style: normal;
margin: 0 32rpx;
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
height: 2rpx;
background: #f5f5f5;
width: 100%;
}
}
.menu_list {
padding-bottom: 32rpx;
margin-left: 32rpx;
margin-right: 32rpx;
margin-top: 24rpx;
.item_box {
width: 50%;
float: left;
&:nth-child(1) {
position: relative;
&::after {
content: '';
position: absolute;
width: 4rpx;
height: 100%;
background: #f5f5f5;
right: 20rpx;
top: 0;
}
}
.item_img {
width: 64rpx;
height: 64rpx;
float: left;
image {
width: 100%;
height: 100%;
}
}
.item_txt {
font-weight: 400;
font-size: 32rpx;
color: #333333;
line-height: 64rpx;
text-align: left;
font-style: normal;
padding-left: 20rpx;
float: left;
}
}
}
}
.notice_box {
width: 100%;
background: #fff;
}
}
</style>

@ -202,7 +202,7 @@ export default {
.page-search-top {
max-height: 210rpx;
background-color: #F8F8F8;
background-color: #fff;
padding: 30rpx 40rpx 20rpx;
}

@ -1,6 +1,6 @@
<template>
<view class="page-css">
<u-navbar title="巡检任务" back-icon-color="rgb(0, 0, 0)" back-icon-size="54" :title-bold="true"
<u-navbar v-if="planOrderId" title="巡检任务" back-icon-color="rgb(0, 0, 0)" back-icon-size="54" :title-bold="true"
:title-size="38" title-color="rgb(0, 0, 0)"></u-navbar>
<view class="protocol-content">
<u-tabs-swiper ref="tabs" :list="subsectionList" :current="subsectionCurrent" :is-scroll="false"
@ -74,13 +74,13 @@
</block>
<!--巡检维修 维修主管 -->
<block v-if="subsectionCurrent == '1' && dataTypes == 3">
<u-button v-if="item.repairStatus == 2" size="mini" plain style="margin-right:16rpx"
@click="openWorkOrder(item, 'repair')">审批</u-button>
<u-button v-if="item.repairStatus == 2 || item.repairStatus == 102" size="mini" plain
style="margin-right:16rpx" @click="openWorkOrder(item, 'repair')">审批</u-button>
</block>
<!--巡检维修 维修人员 -->
<block v-if="subsectionCurrent == '1' && dataTypes == 4">
<u-button v-if="item.repairStatus == 1" size="mini" plain style="margin-right:16rpx"
@click="openWorkOrder(item, 'repair')">提交</u-button>
<u-button v-if="item.repairStatus == 1 || item.repairStatus == 101" size="mini" plain
style="margin-right:16rpx" @click="openWorkOrder(item, 'repair')">提交</u-button>
<u-button v-if="item.repairStatus == 4" size="mini" plain style="margin-right:16rpx"
@click="openModel(item, 'repairComplete')">维修完成</u-button>
</block>
@ -111,9 +111,10 @@
</betone-modal>
<betone-loading ref="BetLoading" />
<!-- <betone-tabbar ref="tabbarRef" v-if="!planOrderId" /> -->
<betone-tabbar ref="tabbarRef" v-if="!planOrderId" />
<betone-modal v-model="detailsShow" v-if="detailsShow" :title="'下载内容'" @confirm="detailsShowFn" @cancel="detailsShow = false">
<betone-modal v-model="detailsShow" v-if="detailsShow" :title="'下载内容'" @confirm="detailsShowFn"
@cancel="detailsShow = false">
<recordsdetails :data="rowInfo" :detailId="rowInfo.id" id="capture"></recordsdetails>
</betone-modal>
<sp-html2pdf-render domId="capture" ref="renderRef" @renderOver="renderOver" pdfFileName="这是一个pdf文件"
@ -124,7 +125,7 @@
<script>
import recordsdetails from './components/details.vue'
import { tabTaskList, tabTaskRepairList,tabTaskListColor } from '@/config/status.js'
import { tabTaskList, tabTaskRepairList, tabTaskListColor } from '@/config/status.js'
export default {
components: {
recordsdetails
@ -140,10 +141,10 @@ export default {
},
userInfo: {},//
rowInfo: {},//
tabList: [],
tasktabList: [],
current: 0,
current: 1,
loadingState: "loadmore",
isNomore: false,
noDataFlag: false,
@ -183,7 +184,7 @@ export default {
//
return this.$store.state.dataType
},
tagColor(){
tagColor() {
return tabTaskListColor
},
},
@ -206,12 +207,17 @@ export default {
this.getRepairPersons()
if (this.dataTypes == 2) {
this.subsectionCurrent = '1'
this.subsectionChangeTab('1')
} else {
this.changeTab('1')
}
this.getRecordsList()
//
if (!this.planOrderId) {
// this.$refs.tabbarRef.getPermission();
this.$refs.tabbarRef.getPermission();
}
});
@ -323,8 +329,12 @@ export default {
},
subsectionChange(e) {
this.subsectionCurrent = e;
this.searchInfo.statusSearch = ''
this.getRecordsList()
if (this.subsectionCurrent == '1') {
this.subsectionChangeTab(1)
} else {
this.changeTab('1')
}
// this.getRecordsList()
},
//
assign(item) {
@ -392,7 +402,7 @@ export default {
this.$u.api.confirmPayment(query).then(res => {
this.paymentShow = false
if (res.code == 200) {
uni.showToast({ title: "确认成功", icon: "none" });
this.getRecordsList()
@ -416,7 +426,8 @@ export default {
let sta = i.key.split(',')
return sta.includes(item + '')
})
return newArr.length<=0?'':newArr[0].name
return newArr.length <= 0 ? '' : newArr[0].name
},
//
taskStatusName(item) {
@ -424,7 +435,18 @@ export default {
let sta = i.key.split(',')
return sta.includes(item + '')
})
return newArr.length<=0?'':newArr[0].name
if (this.dataTypes != 1) {
if (item == 100) {
return '维修驳回'
}
if (item == 101) {
return '主管驳回'
}
if (item == 102) {
return '客户驳回'
}
}
return newArr.length <= 0 ? '' : newArr[0].name
},
detailsShowFn() {
// h2cRenderDom
@ -452,6 +474,7 @@ export default {
.page-css {
padding: 0;
padding-top: var(--status-bar-height);
.page-search-top {
height: 220rpx;
background-color: #fff;

@ -1,8 +1,9 @@
<template>
<view class="page-css">
<u-navbar :title="type" back-icon-color="rgb(0, 0, 0)" back-icon-size="54" :title-bold="true"
<!-- <betone-list type="submission" ref="tablist"></betone-list> -->
<u-navbar v-if="type != ''" title="报送记录" back-icon-color="rgb(0, 0, 0)" back-icon-size="54" :title-bold="true"
:title-size="38" title-color="rgb(0, 0, 0)"></u-navbar>
<!-- <view class="page-header-txt" v-if="type == ''">科研医疗建筑运维平台</view> -->
<view class="page-header-txt" v-if="type == ''">科研医疗建筑运维平台</view>
<view class="page-box">
<view class="page-search-top">
<betone-new-input v-model="searchInfo.requirementCode" :placeholder="dataTypes == 1 ? '搜索单号' : '搜索单号或单位名称'"
@ -140,7 +141,7 @@
<sp-html2pdf-render domId="capture" ref="renderRef" @renderOver="renderOver" pdfFileName="这是一个pdf文件"
@beforeSavePDF="beforeSavePDF" @successSavePDF="successSavePDF"></sp-html2pdf-render>
</view>
<!-- <betone-tabbar ref="tabbarRef" v-if="type == ''" /> -->
<betone-tabbar ref="tabbarRef" v-if="type == ''" />
</view>
</template>
@ -160,7 +161,7 @@ export default {
reportUnit: '',//
},
current: 0,
current: 1,
loadingState: "loadmore",
isNomore: false,
noDataFlag: false,
@ -218,14 +219,15 @@ export default {
this.getRecordsList();
},
onLoad(options) {
this.type = options.name?options.name:''
this.type = options.type?options.type:''
},
onShow() {
this.$nextTick(() => {
if(this.type==''){
// this.$refs.tabbarRef.getPermission();
this.$refs.tabbarRef.getPermission();
}
this.changeTab(1)
this.getRecordsList()
});
},
@ -293,8 +295,20 @@ export default {
return sta.includes(item + '')
})
return newArr.length<=0?'':newArr[0].name
if(this.dataTypes==2||this.dataTypes==3||this.dataTypes==4){
if(item==100){
return '维修驳回'
}
if(item==101){
return '主管驳回'
}
if(item==102){
return '客户驳回'
}
}
return newArr.length<=0?'':newArr[0].name
}
},

@ -41,7 +41,7 @@ const store = new Vuex.Store({
commit('updateTabbar', tabBar.ordinary)
uni.reLaunch({
url: "/pages/home/index",
url: "/pages/submission/records",
});
@ -51,7 +51,7 @@ const store = new Vuex.Store({
commit('updateTabbar', tabBar.manage)
uni.reLaunch({
url: "/pages/home/index",
url: "/pages/submission/records",
});
// this.$u.api.updateCoordinate().then(res=>{
@ -63,9 +63,11 @@ const store = new Vuex.Store({
commit('updateTabbar', tabBar.repair)
uni.reLaunch({
url: "/pages/home/index",
url: "/pages/submission/records",
});
// 如果是维修人员登录 则实时更新当前维修人员的位置
}

@ -2,8 +2,13 @@
const ordinary = [{
iconPath: "photo",
selectedIconPath: "photo-fill",
text: "工作台",
pagePath: "/pages/home/index",
text: "接单记录",
pagePath: "/pages/submission/records",
}, {
iconPath: "setting",
selectedIconPath: "setting-fill",
text: "巡检任务",
pagePath: "/pages/inspection/quest",
},{
iconPath: "account",
selectedIconPath: "account-fill",
@ -33,8 +38,13 @@ const member = [{
const manage = [{
iconPath: "photo",
selectedIconPath: "photo-fill",
text: "工作台",
pagePath: "/pages/home/index",
text: "接单记录",
pagePath: "/pages/submission/records",
}, {
iconPath: "setting",
selectedIconPath: "setting-fill",
text: "巡检任务",
pagePath: "/pages/inspection/quest",
}, {
iconPath: "account",
selectedIconPath: "account-fill",
@ -45,9 +55,14 @@ const manage = [{
const repair = [{
iconPath: "photo",
selectedIconPath: "photo-fill",
text: "工作台",
pagePath: "/pages/home/index",
},{
text: "维修任务",
pagePath: "/pages/submission/records",
}, {
iconPath: "setting",
selectedIconPath: "setting-fill",
text: "巡检任务",
pagePath: "/pages/inspection/quest",
}, {
iconPath: "account",
selectedIconPath: "account-fill",
text: "我的",

@ -3,9 +3,9 @@
*/
export default {
// baseUrl: 'http://124.221.142.15:8088/lab',
baseUrl:'http://192.168.0.118:80', //李庆坤
// baseUrl:'http://192.168.0.118:80', //李庆坤
// baseUrl:'http://192.168.0.109:80', //李涛
// baseUrl:'http://192.168.1.12:80', //李涛
baseUrl:'http://192.168.1.12:80', //李涛
indexTitle: "科研医疗建筑运维平台",
clientId: "saber", // 客户端id
clientSecret: "saber_secret", // 客户端密钥

Loading…
Cancel
Save