页面逻辑调整

test
zhangdi 1 year ago
parent 834ad6715b
commit e0ea2095b2
  1. 3
      App.vue
  2. 14
      api/api.js
  3. 64
      common/betone_components/betone-list.vue
  4. 2
      common/betone_components/betone-new-header.vue
  5. 5
      common/betone_components/betone-tabbar.vue
  6. 4
      common/betone_components/betone-upload.vue
  7. 12
      manifest.json
  8. 40
      pages.json
  9. 56
      pages/home/components/alarm.vue
  10. 74
      pages/home/components/eacharts.vue
  11. 3
      pages/home/components/swiper.vue
  12. 111
      pages/home/index.vue
  13. 2
      pages/my/feedback.vue
  14. 2
      pages/my/my.vue
  15. 1
      pages/my/records.vue
  16. 1
      pages/register/index.vue
  17. 2
      pages/submission/components/subForm.vue
  18. 22
      utils/tabbar.js

@ -1,5 +1,8 @@
<script> <script>
export default { export default {
onLaunch: function (options) {
uni.hideTabBar()
},
onReady() { onReady() {
}, },

@ -109,13 +109,25 @@ const install = (Vue, vm) => {
authorization: false, authorization: false,
isparams: true isparams: true
}) })
// 工作台 workBenches/overview
let overview = (params) => http.get('/workBenches/overview', { ...params }, {
authorization: false,
isparams: true
})
// 获取用户信息 / // 获取用户信息 /
let getUserInfo = (params) => http.get('/blade-system/user/info', { ...params }, { let getUserInfo = (params) => http.get('/blade-system/user/info', { ...params }, {
authorization: false, authorization: false,
isparams: true isparams: true
}) })
// 派单 /lab/workOrder/update
let sendOrders = (params) => http.get('/workOrder/update', { ...params }, {
authorization: false,
isparams: true
})
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = { getTenantInfo, login, logout, register, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList,upkeepStat,pieStat,getUserInfo }; vm.$u.api = { getTenantInfo, login, logout, register, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList,upkeepStat,pieStat,getUserInfo,overview };
} }
export default { export default {

@ -37,18 +37,18 @@
<u-button size="mini" plain style="margin-right: 32rpx" <u-button size="mini" plain style="margin-right: 32rpx"
@click.stop="goPage(item, 'breakdownView')">查看</u-button> @click.stop="goPage(item, 'breakdownView')">查看</u-button>
<!-- --> <!-- 状态0 客服才能进行派 -->
<block v-if="item.status == 0&&dataTypes==1"> <block v-if="item.status == 0 && dataTypes == 2">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" <u-button size="mini" :plain="true" style="margin-right: 32rpx"
@click.stop="sendOrders()" type="primary">派单</u-button> @click.stop="sendOrders()" type="primary">派单</u-button>
</block> </block>
<block v-if="item.status == 0 && dataTypes == 4"> <block v-if="item.status == 0 && dataTypes == 4">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" <u-button size="mini" :plain="true" style="margin-right: 32rpx" type="primary"
type="primary" @click="orderConfirm(item)">接单确认</u-button> @click="orderConfirm(item)">接单确认</u-button>
</block> </block>
<block v-if="item.status == 2&&dataTypes==4"> <block v-if="item.status == 2 && dataTypes == 4">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" <u-button size="mini" :plain="true" style="margin-right: 32rpx" type="primary"
type="primary" @click="goPage(item, 'details')">维修</u-button> @click="goPage(item, 'details')">维修</u-button>
</block> </block>
<!-- 待提报 --提报 修改--> <!-- 待提报 --提报 修改-->
<block v-if="item.status == -1"> <block v-if="item.status == -1">
@ -58,17 +58,23 @@
type="primary" @click="goPage(item, 'breakdownUpdate')">修改</u-button> type="primary" @click="goPage(item, 'breakdownUpdate')">修改</u-button>
</block> </block>
<!-- 待维修 -- 查看位置--> <!-- 待维修 -- 查看位置-->
<block v-if="(dataTypes==1)&&(item.status == 1 || item.status == 2 || item.status == 3)"> <block v-if="(dataTypes == 1) && (item.status == 1 || item.status == 2 || item.status == 3)">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true" <u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true"
type="primary" @click="goPage(item,'location')">查看位置</u-button> type="primary" @click="goPage(item, 'location')">查看位置</u-button>
</block> </block>
<block v-if="item.status == 5 && dataTypes == 1">
<block v-if="item.status == 5&& dataTypes == 1">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true" <u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true"
type="primary" @click="goPage(item, 'evaluate')">评价</u-button> type="primary" @click="goPage(item, 'evaluate')">评价</u-button>
</block> </block>
<!-- 关闭 -->
<!-- <block>
<u-button size="mini" plain style="margin-right: 32rpx">关闭</u-button>
</block> -->
<!-- 驳回 -->
<!-- <block v-if="dataTypes == 1">
<u-button size="mini" plain style="margin-right: 32rpx">驳回</u-button>
</block> -->
</view> </view>
</view> </view>
</view> </view>
@ -80,10 +86,10 @@
<!-- 派单弹框 选择维修人员 --> <!-- 派单弹框 选择维修人员 -->
<u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" <u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" :isShowsearch="true"
:isShowsearch="true" value-name="id" title="选择维修人员"></u-select> value-name="id" title="选择维修人员"></u-select>
</view> </view>
</template> </template>
@ -110,7 +116,7 @@ export default {
已完成: "#CECECE", 已完成: "#CECECE",
待维修: '#E99D42' 待维修: '#E99D42'
}, },
current: 0, current: 0,
loadingState: "loadmore", loadingState: "loadmore",
isNomore: false, isNomore: false,
@ -250,26 +256,32 @@ export default {
}, },
// //
sendOrdersConfirm(e) { sendOrdersConfirm(e) {
console.log(44444,e);
// //
// {"id":"1857232935845892097","reportUnit":"","maintenanceTeam":"1847218701580435458","dispatchTime":"2024-11-15 00:00:00","planCompleteTime":"","repairPerson":null,"status":1,"remark":""} // {"id":"1857232935845892097","reportUnit":"","maintenanceTeam":"1847218701580435458","dispatchTime":"2024-11-15 00:00:00","planCompleteTime":"","repairPerson":null,"status":1,"remark":""}
let query_ = {
id:e.id,
reportUnit:e.reportUnit,
status:1,//
}
}, },
// //
orderConfirm(row){ orderConfirm(row) {
}, },
// //
getRepairPersons(){ getRepairPersons() {
this.$u.api.getRepairPersons().then(res=>{ this.$u.api.getRepairPersons().then(res => {
if(res.code == 200){ if (res.code == 200) {
let data_ = res.data let data_ = res.data
data_.forEach(i=>{ data_.forEach(i => {
this.sendOrdersList.push({...i,label:i.name}) this.sendOrdersList.push({ ...i, label: i.name })
}) })
} }
}) })
}, },
// //
@ -306,7 +318,7 @@ export default {
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`, url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
}); });
} }
if(type == 'location'){// if (type == 'location') {//
uni.navigateTo({ uni.navigateTo({
url: `/pages/order/location`, url: `/pages/order/location`,
}) })

@ -100,11 +100,9 @@ export default {
}, },
findUnreadNoticeIdCallBack(res) { findUnreadNoticeIdCallBack(res) {
var that = this; var that = this;
// console.log("TTTT:::::");
that.unreadNoticeIds = res.data; that.unreadNoticeIds = res.data;
}, },
getMemberSecurityInfo(res) { getMemberSecurityInfo(res) {
// console.log("res::::::KKK", res);
if (res) { if (res) {
this.rs(res); this.rs(res);
} else { } else {

@ -9,6 +9,7 @@
:mid-button-size="170" :mid-button-size="170"
:icon-size="60" :icon-size="60"
@change="tabbatChange" @change="tabbatChange"
v-model="current"
></u-tabbar> ></u-tabbar>
</view> </view>
</template> </template>
@ -39,12 +40,12 @@ export default {
// //
getPermission() { getPermission() {
const tabBarList = uni.getStorageSync("tabBarList"); const tabBarList = uni.getStorageSync("tabBarList");
this.current=0 this.current=global.tabBarCurrent
this.list = tabBarList; this.list = tabBarList;
}, },
tabbatChange(index) { tabbatChange(index) {
global.tabBarCurrent = index global.tabBarCurrent = index
uni.switchTab({ uni.navigateTo({
url: this.list[index].pagePath, url: this.list[index].pagePath,
}) })
} }

@ -102,7 +102,7 @@ export default {
formData: {}, formData: {},
success: (res) => { success: (res) => {
let info = JSON.parse(res.data); let info = JSON.parse(res.data);
console.log("上传成功", info); // // console.log("", info); //
this.fileList.push({ this.fileList.push({
'link': info.data.link, 'link': info.data.link,
@ -112,7 +112,7 @@ export default {
this.$refs.BetLoading.hide() this.$refs.BetLoading.hide()
}, },
error: (uploadFileRes) => { error: (uploadFileRes) => {
console.log("上传失败", uploadFileRes.data); // // console.log("", uploadFileRes.data); //
this.$refs.BetLoading.hide() this.$refs.BetLoading.hide()
}, },
}); });

@ -113,6 +113,18 @@
"appid" : "", "appid" : "",
"setting" : { "setting" : {
"urlCheck" : true "urlCheck" : true
},
"permission" : {}
},
"h5" : {
"sdkConfigs" : {
"maps" : {
"amap" : {
"key" : "a9632baa2c4ae13a34c1fb265dda41f5",
"securityJsCode" : "",
"serviceHost" : ""
}
}
} }
} }
} }

@ -23,7 +23,7 @@
"navigationBarTitleText": "记录", "navigationBarTitleText": "记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)" "navigationBarBackgroundColor": "#F8F8F8"
} }
}, },
{ {
@ -32,7 +32,7 @@
"navigationBarTitleText": "意见反馈", "navigationBarTitleText": "意见反馈",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)" "navigationBarBackgroundColor": "#F8F8F8"
} }
}, },
{ {
@ -41,7 +41,7 @@
"navigationBarTitleText": "维修报送", "navigationBarTitleText": "维修报送",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)" "navigationBarBackgroundColor": "#F8F8F8"
} }
}, },
{ {
@ -50,7 +50,7 @@
"navigationBarTitleText": "维修报送", "navigationBarTitleText": "维修报送",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)" "navigationBarBackgroundColor": "#F8F8F8"
} }
}, },
{ {
@ -68,7 +68,7 @@
"navigationBarTitleText": "维修详情", "navigationBarTitleText": "维修详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)", "navigationBarBackgroundColor": "#F8F8F8",
"app-plus": { "app-plus": {
"titleNView": {} "titleNView": {}
} }
@ -80,7 +80,7 @@
"navigationBarTitleText": "评价", "navigationBarTitleText": "评价",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)", "navigationBarBackgroundColor": "#F8F8F8",
"app-plus": { "app-plus": {
"titleNView": {} "titleNView": {}
} }
@ -99,7 +99,7 @@
"navigationBarTitleText": "查看位置", "navigationBarTitleText": "查看位置",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)", "navigationBarBackgroundColor": "#F8F8F8",
"app-plus": { "app-plus": {
"titleNView": {} "titleNView": {}
} }
@ -140,7 +140,7 @@
"navigationBarTitleText": "巡检任务单", "navigationBarTitleText": "巡检任务单",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)", "navigationBarBackgroundColor": "#F8F8F8",
"app-plus": { "app-plus": {
"titleNView": {} "titleNView": {}
} }
@ -159,7 +159,7 @@
"navigationBarTitleText": "巡检计划", "navigationBarTitleText": "巡检计划",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)", "navigationBarBackgroundColor": "#F8F8F8",
"app-plus": { "app-plus": {
"titleNView": {} "titleNView": {}
} }
@ -172,27 +172,5 @@
"navigationBarTitleText": "科研医疗建筑运维平台", "navigationBarTitleText": "科研医疗建筑运维平台",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#fff" "backgroundColor": "#fff"
},
"tabBar": {
"list": [
{
"pagePath": "pages/home/index"
},
{
"pagePath": "pages/submission/index"
},
{
"pagePath": "pages/order/tasking"
},
{
"pagePath": "pages/my/my"
},
{
"pagePath": "pages/inspection/quest"
},
{
"pagePath": "pages/inspection/plan"
}
]
} }
} }

@ -1,10 +1,7 @@
<template> <template>
<view> <view>
<view v-for="(item, index) in list" :key="index" class="alarm-box"> <view v-for="(item, index) in list" :key="index" class="alarm-box">
<view <view class="alarm-left" :style="{ borderColor: item.color }">
class="alarm-left"
:style="`borderColor: ${colorList[item.alarmName]} `"
>
<i>{{ item.alarmName }}</i> <i>{{ item.alarmName }}</i>
<i>{{ item.levelNanme }}</i> <i>{{ item.levelNanme }}</i>
</view> </view>
@ -27,43 +24,28 @@ export default {
特别严重: "rgba(189,49,36,1)", 特别严重: "rgba(189,49,36,1)",
严重: "rgba(233,157,66,1)", 严重: "rgba(233,157,66,1)",
}, },
list: [ list: [],
// {
// title1: "",
// title2: "西",
// title3: "FSAJ",
// title4: "2024-08-09",
// title5: "",
// title6: "",
// },
// {
// title1: "",
// title2: "西",
// title3: "FSAJ",
// title4: "2024-08-09",
// title5: "",
// title6: "",
// },
],
}; };
}, },
mounted(){ mounted() {
this.deviceList() this.deviceList()
}, },
methods:{ methods: {
deviceList(){ deviceList() {
this.$u.api.deviceList().then(res=>{ this.$u.api.deviceList().then(res => {
if(res.code ==200){ if (res.code == 200) {
let data_ =res.data let data_ = res.data
data_.forEach(v => { data_.forEach(v => {
if(v.alarmLevel==1){ if (v.alarmLevel == 1) {
v.alarmName = '一级' v.alarmName = '一级'
v.levelNanme = '超级严重' v.levelNanme = '超级严重'
} }
if(v.alarmLevel==2){ if (v.alarmLevel == 2) {
v.alarmName = '二级' v.alarmName = '二级'
v.levelNanme = '严重' v.levelNanme = '严重'
} }
v.color = this.colorList[v.levelNanme]
}); });
this.list = res.data this.list = res.data
} }
@ -79,6 +61,7 @@ export default {
border-radius: 20rpx; border-radius: 20rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
.alarm-left { .alarm-left {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
@ -86,37 +69,44 @@ export default {
border: 16rpx solid rgba(189, 49, 36, 1); border: 16rpx solid rgba(189, 49, 36, 1);
border-radius: 50%; border-radius: 50%;
margin: 36rpx 36rpx 36rpx 48rpx; margin: 36rpx 36rpx 36rpx 48rpx;
i { i {
display: block; display: block;
text-align: center; text-align: center;
&:nth-child(1) { &:nth-child(1) {
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 28rpx; font-size: 28rpx;
padding-top: 30rpx; padding-top: 30rpx;
} }
&:nth-child(2) { &:nth-child(2) {
color: rgba(190, 190, 190, 1); color: rgba(190, 190, 190, 1);
font-size: 26rpx; font-size: 26rpx;
} }
} }
} }
.alarm-center { .alarm-center {
flex: 1; flex: 1;
color: rgba(154, 154, 154, 1); color: rgba(154, 154, 154, 1);
font-size: 24rpx; font-size: 24rpx;
position: relative; position: relative;
text { text {
display: block; display: block;
line-height: 40rpx; line-height: 40rpx;
font-size: 24rpx; font-size: 24rpx;
&:nth-child(1) { &:nth-child(1) {
color: rgba(0, 0, 0, 1); color: rgba(0, 0, 0, 1);
font-size: 28rpx; font-size: 28rpx;
padding: 28rpx 0 8rpx 0; padding: 28rpx 0 8rpx 0;
} }
&:nth-child(2) {
} &:nth-child(2) {}
} }
.alarm-center-btn { .alarm-center-btn {
width: 160rpx; width: 160rpx;
height: 60rpx; height: 60rpx;
@ -128,7 +118,7 @@ export default {
line-height: 60rpx; line-height: 60rpx;
text-align: center; text-align: center;
position: absolute; position: absolute;
top: 80rpx; top: 28rpx;
right: 40rpx; right: 40rpx;
cursor: pointer; cursor: pointer;
} }

@ -2,20 +2,12 @@
<view class="eacharts-box"> <view class="eacharts-box">
<view class="eacharts-time"> <view class="eacharts-time">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<u-form-item label="选择时间:" label-width="140" :border-bottom="false" <u-form-item label="选择时间:" label-width="140" :border-bottom="false">
><u-input <u-input v-model="form.searchTime" type="select" @click="calendarShow = true" :border="true"
v-model="form.searchTime" placeholder="请选择时间" />
type="select" </u-form-item>
@click="calendarShow = true"
:border="true"
placeholder="请选择时间"
/></u-form-item>
</u-form> </u-form>
<u-calendar <u-calendar v-model="calendarShow" :mode="mode" @change="change"></u-calendar>
v-model="calendarShow"
:mode="mode"
@change="change"
></u-calendar>
</view> </view>
<!-- eacharts 图表 --> <!-- eacharts 图表 -->
<view class="echarts" v-if="type == 'maintenanceStatistics'"> <view class="echarts" v-if="type == 'maintenanceStatistics'">
@ -33,7 +25,7 @@
<text class="pie-title">设备分类</text> <text class="pie-title">设备分类</text>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
@ -56,37 +48,45 @@ export default {
}, },
calendarShow: false, calendarShow: false,
mode: "range", mode: "range",
upkeepStatInfo:{}, upkeepStatInfo: {},
pieInfo:{},// pieInfo: {},//
}; };
}, },
mounted() { mounted() {
// //
if (this.type == "maintenanceStatistics") { if (this.type == "maintenanceStatistics") {
this.upkeepStat() this.upkeepStat()
} }
if (this.type == "maintenanceStatisticsPie") { if (this.type == "maintenanceStatisticsPie") {
this.pieStat() this.pieStat()
} }
}, },
methods: { methods: {
// //
upkeepStat(){ upkeepStat() {
this.$u.api.upkeepStat().then(res=>{ let query_ = {
if(res.code== 200){ startTime: this.form.startTime,
endTime: this.form.endTime,
}
this.$u.api.upkeepStat(query_).then(res => {
if (res.code == 200) {
this.upkeepStatInfo = JSON.parse(JSON.stringify(res.data)) this.upkeepStatInfo = JSON.parse(JSON.stringify(res.data))
this.maintenanceInit(); this.maintenanceInit();
} }
}) })
}, },
// //
pieStat(){ pieStat() {
this.$u.api.pieStat().then(res=>{ let query_ = {
if(res.code == 200){ startTime: this.form.startTime,
endTime: this.form.endTime,
}
this.$u.api.pieStat(query_).then(res => {
if (res.code == 200) {
this.pieInfo = res.data this.pieInfo = res.data
this.maintenancePieLeftInit(); this.maintenancePieLeftInit();
this.maintenancePieRightInit(); this.maintenancePieRightInit();
@ -97,10 +97,16 @@ export default {
this.calendarShow = true; this.calendarShow = true;
}, },
change(e) { change(e) {
console.log(e);
this.form.startTime = e.startDate; this.form.startTime = e.startDate;
this.form.endTime = e.endDate; this.form.endTime = e.endDate;
this.form.searchTime = e.startDate + "-" + e.endDate; this.form.searchTime = e.startDate + "-" + e.endDate;
if (this.type == "maintenanceStatistics") {
this.upkeepStat()
}
if (this.type == "maintenanceStatisticsPie") {
this.pieStat()
}
// //
}, },
// //
@ -177,11 +183,11 @@ export default {
fontSize: 8, // [ default: false ] fontSize: 8, // [ default: false ]
position: "outside", // 'outside'线'inside','inner' 'inside','center' position: "outside", // 'outside'线'inside','inner' 'inside','center'
formatter: "{b}\n {c}", // formatter: "{b}\n {c}", //
color:'#000' color: '#000'
}, },
}, },
data: this.pieInfo.fault, data: this.pieInfo.fault,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
@ -227,10 +233,10 @@ export default {
fontSize: 8, // [ default: false ] fontSize: 8, // [ default: false ]
position: "outside", // 'outside'线'inside','inner' 'inside','center' position: "outside", // 'outside'线'inside','inner' 'inside','center'
formatter: "{b}\n {c}", // formatter: "{b}\n {c}", //
color:'#000' color: '#000'
}, },
}, },
data: this.pieInfo.device, data: this.pieInfo.device,
labelLine: { labelLine: {
// 线, label 'outside'线 // 线, label 'outside'线
normal: { normal: {
@ -264,10 +270,12 @@ export default {
margin: 0 40rpx 32rpx; margin: 0 40rpx 32rpx;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
.eacharts-time { .eacharts-time {
margin: 0 136rpx 0 24rpx; margin: 0 136rpx 0 24rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
text { text {
line-height: 60rpx; line-height: 60rpx;
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
@ -276,21 +284,25 @@ export default {
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
.echarts { .echarts {
width: calc(100% - 64rpx); width: calc(100% - 64rpx);
height: 308rpx; height: 308rpx;
margin: 0 auto 20rpx; margin: 0 auto 20rpx;
} }
.echartsPie { .echartsPie {
width: calc(100% - 64rpx); width: calc(100% - 64rpx);
min-height: 308rpx; min-height: 308rpx;
margin: 0 auto 0; margin: 0 auto 0;
.pie-item { .pie-item {
width: 100%; width: 100%;
height: 368rpx; height: 368rpx;
// float: left; // float: left;
} }
} }
.pie-title { .pie-title {
height: 30rpx; height: 30rpx;
text-align: center; text-align: center;

@ -40,11 +40,10 @@ export default {
methods: { methods: {
// //
click(id) { click(id) {
console.log(id, "======>id"); // console.log(id, "======>id");
}, },
workList(){ workList(){
this.$u.api.workList().then(res=>{ this.$u.api.workList().then(res=>{
console.log(1111111111111,res)
if(res.code == 200){ if(res.code == 200){
this.list = res.data this.list = res.data
} }

@ -3,6 +3,7 @@
<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> <view class="logo-txt">科研医疗建筑运维平台</view>
<u-icon class="logo-scan" style="padding-right:12rpx" @click="scanCode" size="45" name="scan"></u-icon>
<u-swiper height="444" :list="swiperList" mode="none"></u-swiper> <u-swiper height="444" :list="swiperList" mode="none"></u-swiper>
</view> </view>
<view class="work-title">工作台</view> <view class="work-title">工作台</view>
@ -48,32 +49,7 @@ export default {
data() { data() {
return { return {
swiperList: [], swiperList: [],
workList: [ workList: [],
{
name: "实验室巡检",
img: require("@/static/images/home/lab_xj.png"),
num: 10,
pagePath: '/pages/inspection/records'
},
{
name: "报送记录",
img: require("@/static/images/home/bs_jl.png"),
num: 0,
pagePath: '/pages/submission/records'
},
{
name: "设备报警",
img: require("@/static/images/home/alarm.png"),
num: 2,
pagePath: ''
},
{
name: "其他",
img: require("@/static/images/home/full.png"),
num: 0,
pagePath: ''
},
],
}; };
}, },
onShow() { onShow() {
@ -86,34 +62,70 @@ export default {
}); });
// //
this.getUserInfo() this.getUserInfo()
this.getoverview()
}, },
methods: { methods: {
getUserInfo(){ // overview
this.$u.api.getUserInfo().then(res=>{ getoverview() {
if(res.code == 200){ this.$u.api.overview().then(res => {
console.log(1111111,res.data) if (res.code == 200) {
if(res.data.backGroundPic!=''){ let data_ = res.data
data_.forEach(item => {
if (item.name.indexOf('巡检') > 0) {
item.pagePath = '/pages/inspection/records'
item.img = require("@/static/images/home/lab_xj.png")
}
if (item.name.indexOf('记录') > 0) {
item.pagePath = '/pages/submission/records'
item.img = require("@/static/images/home/bs_jl.png")
}
if (item.name.indexOf('报警') > 0) {
item.pagePath = ''
item.img = require("@/static/images/home/alarm.png")
}
});
data_.push({
name: "其他",
img: require("@/static/images/home/full.png"),
num: 0,
pagePath: ''
})
this.workList = data_
}
})
},
getUserInfo() {
this.$u.api.getUserInfo().then(res => {
if (res.code == 200) {
if (res.data.backGroundPic != '') {
this.swiperList.push(res.data.backGroundPic) this.swiperList.push(res.data.backGroundPic)
}else{ } else {
this.swiperList.push(require("@/static/images/home/lab.png")) this.swiperList.push(require("@/static/images/home/lab.png"))
} }
}else{
this.swiperList.push(require("@/static/images/home/lab.png"))
} }
}).catch(err => {
this.swiperList.push(require("@/static/images/home/lab.png"))
}) })
}, },
getworkbench() { goPage(item) {
console.log(55);
// this.$u.api.getworkbench().then(res=>{
// }).catch(err=>{
// })
},
goPage(item){
uni.navigateTo({ uni.navigateTo({
url: item.pagePath, url: item.pagePath,
}); });
},
scanCode() {
uni.scanCode({
success: (res) => {
console.log('扫码结果:' + res.result);
//
// this.handleScanResult(res.result);
},
fail: (err) => {
console.error('扫码失败:' + err);
}
});
} }
}, },
}; };
@ -125,6 +137,7 @@ export default {
padding: 0; padding: 0;
background: rgba(239, 239, 239, 1); background: rgba(239, 239, 239, 1);
padding-top: var(--status-bar-height); padding-top: var(--status-bar-height);
.banner-swiper { .banner-swiper {
margin-bottom: 64rpx; margin-bottom: 64rpx;
position: relative; position: relative;
@ -137,6 +150,14 @@ export default {
left: 20rpx; left: 20rpx;
z-index: 10; z-index: 10;
} }
.logo-scan {
position: absolute;
right: 20rpx;
top: 40rpx;
z-index: 10;
color: rgba(255, 255, 255, 1);
}
} }
.work-title { .work-title {
@ -153,8 +174,8 @@ export default {
margin: 0 40rpx 32rpx; margin: 0 40rpx 32rpx;
.workbench-item { .workbench-item {
width: 160rpx; width: 150rpx;
height: 148rpx; height: 150rpx;
background-color: rgba(58, 98, 215, 0.57); background-color: rgba(58, 98, 215, 0.57);
border-radius: 8rpx; border-radius: 8rpx;
position: relative; position: relative;

@ -109,7 +109,6 @@ export default {
}, },
// //
submitFeedback() { submitFeedback() {
console.log(this.form);
if (this.from.type == "") { if (this.from.type == "") {
uni.showToast({ title: "请选择反馈类型", icon: "none" }); uni.showToast({ title: "请选择反馈类型", icon: "none" });
return false; return false;
@ -124,7 +123,6 @@ export default {
} }
this.$u.api.subEditRecords(this.from).then((res) => { this.$u.api.subEditRecords(this.from).then((res) => {
console.log("提交成功", res);
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: "提交成功", icon: "none" }); uni.showToast({ title: "提交成功", icon: "none" });
setTimeout(() => { setTimeout(() => {

@ -30,6 +30,7 @@
</view> </view>
</template> </template>
<script> <script>
import global from "@/utils/global.js";
export default { export default {
computed: { computed: {
@ -98,6 +99,7 @@ export default {
uni.removeStorageSync("token"); uni.removeStorageSync("token");
uni.removeStorageSync("userinfo"); uni.removeStorageSync("userinfo");
uni.removeStorageSync("tabBarList"); uni.removeStorageSync("tabBarList");
global.tabBarCurrent = 0
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/login", url: "/pages/login/login",
}); });

@ -83,7 +83,6 @@ export default {
}, },
// //
changeSelect(e) { changeSelect(e) {
console.log(11111, e)
this.searchInfo.name = this.getUserData[e].name this.searchInfo.name = this.getUserData[e].name
this.searchInfo.id = this.getUserData[e].id this.searchInfo.id = this.getUserData[e].id
if (this.type == "login") { if (this.type == "login") {

@ -208,7 +208,6 @@ export default {
this.mapInfo.showMapSelect = true this.mapInfo.showMapSelect = true
}, },
commitCheck(e) { commitCheck(e) {
console.log(e, 565);
if (e) { if (e) {
uni.$emit('commitCheck', e); uni.$emit('commitCheck', e);
this.registerInfo.area = e.name this.registerInfo.area = e.name

@ -178,7 +178,7 @@ export default {
this.$u.api.workOrderSave(this.breakdownInfo).then(res => { this.$u.api.workOrderSave(this.breakdownInfo).then(res => {
this.$refs.BetLoading.hide(); this.$refs.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.redirectTo({ uni.navigateTo({
url: "/pages/submission/records", url: "/pages/submission/records",
}); });
} }

@ -3,30 +3,30 @@ const ordinary = [{
iconPath: "photo", iconPath: "photo",
selectedIconPath: "photo-fill", selectedIconPath: "photo-fill",
text: "接单记录", text: "接单记录",
pagePath: "pages/order/tasking", pagePath: "/pages/order/tasking",
}, { }, {
iconPath: "account", iconPath: "account",
selectedIconPath: "account-fill", selectedIconPath: "account-fill",
text: "我的", text: "我的",
pagePath: "pages/my/my", pagePath: "/pages/my/my",
}] }]
// 客户看到的页面 // 客户看到的页面
const member = [{ const member = [{
iconPath: "photo", iconPath: "photo",
selectedIconPath: "photo-fill", selectedIconPath: "photo-fill",
text: "工作台", text: "工作台",
pagePath: "pages/home/index", pagePath: "/pages/home/index",
}, },
{ {
iconPath: "plus-circle", iconPath: "plus-circle",
selectedIconPath: "plus-circle-fill", selectedIconPath: "plus-circle-fill",
text: "一键报送", text: "一键报送",
pagePath: "pages/submission/index", pagePath: "/pages/submission/index",
}, { }, {
iconPath: "account", iconPath: "account",
selectedIconPath: "account-fill", selectedIconPath: "account-fill",
text: "我的", text: "我的",
pagePath: "pages/my/my", pagePath: "/pages/my/my",
}, },
] ]
// 维修负责人看到的页面 // 维修负责人看到的页面
@ -34,34 +34,34 @@ const manage = [{
iconPath: "photo", iconPath: "photo",
selectedIconPath: "photo-fill", selectedIconPath: "photo-fill",
text: "接单记录", text: "接单记录",
pagePath: "pages/order/tasking", pagePath: "/pages/order/tasking",
}, { }, {
iconPath: "setting", iconPath: "setting",
selectedIconPath: "setting-fill", selectedIconPath: "setting-fill",
text: "巡检计划", text: "巡检计划",
pagePath: "pages/inspection/plan", pagePath: "/pages/inspection/plan",
}, { }, {
iconPath: "account", iconPath: "account",
selectedIconPath: "account-fill", selectedIconPath: "account-fill",
text: "我的", text: "我的",
pagePath: "pages/my/my", pagePath: "/pages/my/my",
}] }]
// 维修人员 看到的菜单 // 维修人员 看到的菜单
const repair = [{ const repair = [{
iconPath: "photo", iconPath: "photo",
selectedIconPath: "photo-fill", selectedIconPath: "photo-fill",
text: "接单记录", text: "接单记录",
pagePath: "pages/order/tasking", pagePath: "/pages/order/tasking",
}, { }, {
iconPath: "setting", iconPath: "setting",
selectedIconPath: "setting-fill", selectedIconPath: "setting-fill",
text: "维修任务", text: "维修任务",
pagePath: "pages/inspection/quest", pagePath: "/pages/inspection/quest",
}, { }, {
iconPath: "account", iconPath: "account",
selectedIconPath: "account-fill", selectedIconPath: "account-fill",
text: "我的", text: "我的",
pagePath: "pages/my/my", pagePath: "/pages/my/my",
}] }]
export default { export default {
ordinary, ordinary,

Loading…
Cancel
Save