展示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": "巡检计划", "navigationBarTitleText": "巡检计划",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#fff",
"app-plus": { "app-plus": {
"titleNView": {} "titleNView": {}
} }

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

@ -7,72 +7,42 @@
</u-icon> </u-icon>
</view> </view>
</u-navbar> </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="">
<view class="banner-swiper" v-if="swiperList.length > 0"> <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> <image :src="swiperList[0]" style="padding-right:12rpx;height:444rpx;width:100%"></image>
</view> </view>
<view class="menu_box"> <view class="work-title">工作台</view>
<view class="menu_title">工作台</view> <view class="workbench">
<view class="menu_list clearfix" v-if="dataTypes==1"> <view v-for="(item, index) in workList" :key="index" class="workbench-slider">
<view class="item_box" @click="goPage('/pages/inspection/plan')"> <view class="workbench-item" @click="goPage(item.pagePath)">
<view class="item_img"> <view class="workbench-item-icon">
<image src="@/static/images/home/left.svg" mode="aspectFit" /> <image :src="item.img" 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> </view>
<view class="item_txt">巡检任务</view> <u-badge class="badge" type="error" :count="item.num" :offset="[0, 0]"></u-badge>
</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>
</view> </view>
<view class="workbench-name">{{ item.name }}</view>
</view> </view>
</view> </view>
<view>
<view class="work-title">设备统计</view> <swiperSlider></swiperSlider>
<eachartsPie :echartData="pieInfo"></eachartsPie> </view>
<!-- <view class="work-title">设备报警</view> -->
<view class="work-title">检修单状态</view> <view>
<eachartsNightpie :echartData="pieInfo"></eachartsNightpie> <alarm></alarm>
</view>
<view class="work-title">维修统计</view> <view class="work-title">维修统计</view>
<view class="statistics"> <view class="statistics">
<eacharts :type="'maintenanceStatistics'"></eacharts> <eacharts></eacharts>
<!-- <eacharts :type="'maintenanceStatisticsPie'"></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>
</view> </view>
<betone-tabbar ref="tabbarRef" /> <betone-tabbar ref="tabbarRef" />
@ -93,35 +63,27 @@ export default {
eachartsPie, eachartsPie,
eachartsNightpie eachartsNightpie
}, },
computed: {
dataTypes() {
return this.$store.state.dataType
},
},
data() { data() {
return { return {
swiperList: [], swiperList: [],
workList: [], workList: [],
pieInfo: [],// pieInfo: {},//
noticeList: [
],//
}; };
}, },
onLoad() {
this.pieStat()
},
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
// this.pieStat()
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
this.getNoticeList() // this.BetLoading.show();
// setTimeout(() => {
// this.BetLoading.hide();
// }, 1000);
}); });
// //
this.pieStat()
this.getUserInfo() this.getUserInfo()
this.getoverview() this.getoverview()
}, },
methods: { methods: {
// overview // overview
@ -169,9 +131,14 @@ export default {
}) })
}, },
goPage(item) { goPage(item) {
uni.navigateTo({ if (item == '') {
url: item, uni.showToast({ title: "功能正在完善中,敬请期待!", icon: "none" });
}); } else {
uni.navigateTo({
url: item,
});
}
}, },
scanCode() { scanCode() {
uni.scanCode({ uni.scanCode({
@ -185,28 +152,11 @@ export default {
} }
}); });
}, },
// //
pieStat() { pieStat() {
this.$u.api.pieStat().then(res => { this.$u.api.pieStat().then(res => {
if (res.code == 200) { if (res.code == 200) {
this.pieInfo = res.data.fault this.pieInfo = res.data
}
})
},
//
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)
})
} }
}) })
}, },
@ -218,10 +168,11 @@ export default {
width: 100%; width: 100%;
// min-height: 100%; // min-height: 100%;
padding: 0; padding: 0;
background: rgba(239, 239, 239, 1);
padding-top: var(--status-bar-height); padding-top: var(--status-bar-height);
.banner-swiper { .banner-swiper {
margin-bottom: 32rpx; margin-bottom: 64rpx;
position: relative; position: relative;
.logo-txt { .logo-txt {
@ -246,7 +197,6 @@ export default {
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 32rpx; font-size: 32rpx;
padding: 0 0 32rpx 36rpx; padding: 0 0 32rpx 36rpx;
margin-top: 32rpx;
} }
.workbench { .workbench {
@ -297,99 +247,5 @@ export default {
.statistics_pie { .statistics_pie {
width: 100%; 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> </style>

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

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

@ -1,8 +1,9 @@
<template> <template>
<view class="page-css"> <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> :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-box">
<view class="page-search-top"> <view class="page-search-top">
<betone-new-input v-model="searchInfo.requirementCode" :placeholder="dataTypes == 1 ? '搜索单号' : '搜索单号或单位名称'" <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文件" <sp-html2pdf-render domId="capture" ref="renderRef" @renderOver="renderOver" pdfFileName="这是一个pdf文件"
@beforeSavePDF="beforeSavePDF" @successSavePDF="successSavePDF"></sp-html2pdf-render> @beforeSavePDF="beforeSavePDF" @successSavePDF="successSavePDF"></sp-html2pdf-render>
</view> </view>
<!-- <betone-tabbar ref="tabbarRef" v-if="type == ''" /> --> <betone-tabbar ref="tabbarRef" v-if="type == ''" />
</view> </view>
</template> </template>
@ -160,7 +161,7 @@ export default {
reportUnit: '',// reportUnit: '',//
}, },
current: 0, current: 1,
loadingState: "loadmore", loadingState: "loadmore",
isNomore: false, isNomore: false,
noDataFlag: false, noDataFlag: false,
@ -218,14 +219,15 @@ export default {
this.getRecordsList(); this.getRecordsList();
}, },
onLoad(options) { onLoad(options) {
this.type = options.name?options.name:'' this.type = options.type?options.type:''
}, },
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
if(this.type==''){ if(this.type==''){
// this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
} }
this.changeTab(1)
this.getRecordsList() this.getRecordsList()
}); });
}, },
@ -293,8 +295,20 @@ export default {
return sta.includes(item + '') return sta.includes(item + '')
}) })
if(this.dataTypes==2||this.dataTypes==3||this.dataTypes==4){
return newArr.length<=0?'':newArr[0].name 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) commit('updateTabbar', tabBar.ordinary)
uni.reLaunch({ uni.reLaunch({
url: "/pages/home/index", url: "/pages/submission/records",
}); });
@ -51,7 +51,7 @@ const store = new Vuex.Store({
commit('updateTabbar', tabBar.manage) commit('updateTabbar', tabBar.manage)
uni.reLaunch({ uni.reLaunch({
url: "/pages/home/index", url: "/pages/submission/records",
}); });
// this.$u.api.updateCoordinate().then(res=>{ // this.$u.api.updateCoordinate().then(res=>{
@ -63,9 +63,11 @@ const store = new Vuex.Store({
commit('updateTabbar', tabBar.repair) commit('updateTabbar', tabBar.repair)
uni.reLaunch({ uni.reLaunch({
url: "/pages/home/index", url: "/pages/submission/records",
}); });
// 如果是维修人员登录 则实时更新当前维修人员的位置 // 如果是维修人员登录 则实时更新当前维修人员的位置
} }

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

@ -3,9 +3,9 @@
*/ */
export default { export default {
// baseUrl: 'http://124.221.142.15:8088/lab', // 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.0.109:80', //李涛
// baseUrl:'http://192.168.1.12:80', //李涛 baseUrl:'http://192.168.1.12:80', //李涛
indexTitle: "科研医疗建筑运维平台", indexTitle: "科研医疗建筑运维平台",
clientId: "saber", // 客户端id clientId: "saber", // 客户端id
clientSecret: "saber_secret", // 客户端密钥 clientSecret: "saber_secret", // 客户端密钥

Loading…
Cancel
Save