From e45691ea2d4f7b85beb9dd116670920e50e7a89e Mon Sep 17 00:00:00 2001
From: zhangdi <15053473693@163.com>
Date: Mon, 9 Dec 2024 14:56:09 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/status.js | 12 ++-
pages/inspection/quest.vue | 32 ++++--
pages/inspection/questDetails.vue | 17 +++-
pages/inspection/questOrder.vue | 151 +++++++++++++++++++---------
pages/submission/records.vue | 16 ++-
pages/submission/recordsdetails.vue | 8 +-
pages/submission/sendOrders.vue | 24 +++--
utils/website.js | 4 +-
8 files changed, 187 insertions(+), 77 deletions(-)
diff --git a/config/status.js b/config/status.js
index e945e18..53f5044 100644
--- a/config/status.js
+++ b/config/status.js
@@ -15,11 +15,11 @@ export const tabList = {
},
{
name: "待维修",
- key: "1,2,3",
+ key: "1,2,3,100",
},
{
name: "已驳回",
- key: "100,101,102",
+ key: "102",
},
{
@@ -28,7 +28,7 @@ export const tabList = {
},
{
name: "维修中",
- key: "5",
+ key: "5,101",
},
{
name: "待评价",
@@ -152,6 +152,9 @@ export const tabListColor = {
"待评价": "#67c23a",
"待付款": "#67c23a",
"已驳回": "#f56c6c",
+ "主管驳回": "#f56c6c",
+ "客户驳回": "#f56c6c",
+ "维修驳回": "#f56c6c",
"待审批": "#409eff",
"已通过": "#409eff",
"待确认": "#67c23a",
@@ -400,5 +403,8 @@ export const tabTaskListColor={
"维修完成": "#67c23a",
"待付款": "#67c23a",
"已驳回": "#f56c6c",
+ "主管驳回": "#f56c6c",
+ "客户驳回": "#f56c6c",
+ "维修驳回": "#f56c6c",
}
diff --git a/pages/inspection/quest.vue b/pages/inspection/quest.vue
index 1e4a35a..4e5e207 100644
--- a/pages/inspection/quest.vue
+++ b/pages/inspection/quest.vue
@@ -74,12 +74,12 @@
- 审批
- 提交
维修完成
@@ -113,7 +113,8 @@
-
+
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,7 +141,7 @@ export default {
},
userInfo: {},//用户信息
rowInfo: {},//选中行数据
-
+
tabList: [],
tasktabList: [],
current: 0,
@@ -183,7 +184,7 @@ export default {
//
return this.$store.state.dataType
},
- tagColor(){
+ tagColor() {
return tabTaskListColor
},
},
@@ -392,7 +393,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 +417,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 +426,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 +465,7 @@ export default {
.page-css {
padding: 0;
padding-top: var(--status-bar-height);
+
.page-search-top {
height: 220rpx;
background-color: #fff;
diff --git a/pages/inspection/questDetails.vue b/pages/inspection/questDetails.vue
index 1b3d39b..5a40287 100644
--- a/pages/inspection/questDetails.vue
+++ b/pages/inspection/questDetails.vue
@@ -26,7 +26,18 @@
{{ detailForm.reservationTime }}
-
+
+
+ 维修人员驳回
+ 主管驳回
+ 客户驳回
+
+ 驳回原因:
+ {{ detailForm.approveRemark }}
+
+
+
巡检任务
@@ -142,6 +153,7 @@ export default {
padding: 0;
padding-top: 26rpx;
height: 100vh;
+
.info {
margin: 0 24rpx 20rpx;
border-radius: 20rpx;
@@ -182,7 +194,8 @@ export default {
// text-align: left;
text-align: justify;
font-family: SourceHanSansSC-regular;
- image{
+
+ image {
width: 100rpx;
height: 100rpx;
}
diff --git a/pages/inspection/questOrder.vue b/pages/inspection/questOrder.vue
index a986853..224e067 100644
--- a/pages/inspection/questOrder.vue
+++ b/pages/inspection/questOrder.vue
@@ -15,12 +15,14 @@
巡检配置
-
-
+
+
-
-
+
+
+
+ 维修人员驳回
+ 主管驳回
+ 客户驳回
+
+ 驳回原因:
+ {{ detailForm.approveRemark }}
+
+
巡检任务
-
+
实验室楼层:{{ item.floorName }}
@@ -94,7 +106,7 @@
状态:
-
+
正常
异常
@@ -105,18 +117,20 @@
现场照片:
- 上传照片
+ 上传照片
+ 无
-
+
+
使用人签字:
-
-
+
+
@@ -125,22 +139,23 @@
备注:
-
-
+
+
-
+
价格:
-
+
是否维修:
- 是
- 否
+ 是
+ 否
@@ -161,12 +176,13 @@
-
+
-
+
维修方案审批
@@ -178,7 +194,8 @@
-
+
@@ -196,45 +213,46 @@
-
+
+ v-if="dataTypes == 4 && detailForm.taskStatus == 1 && detailsType == 'task'">
取消
接单
+ v-if="dataTypes == 4 && detailForm.taskStatus == 2 && detailsType == 'task'">
取消
提交
+ v-if="dataTypes == 1 && detailForm.taskStatus == 3 && detailsType == 'task'">
取消
提交
+ v-if="dataTypes == 4 && (detailForm.repairStatus == 1 || detailForm.repairStatus == 101) && detailsType == 'repair'">
取消
提交方案
+ v-if="dataTypes == 3 && (detailForm.repairStatus == 2 || detailForm.repairStatus == 102) && detailsType == 'repair'">
取消
提交
+ v-if="dataTypes == 1 && detailForm.repairStatus == 3 && detailsType == 'repair'">
取消
提交
@@ -257,6 +275,12 @@ export default {
reservationDisabled() {
return (this.dataTypes == 4 && this.detailForm.taskStatus == 1) || (this.type == 'view') ? true : false
},
+ taskDisabled() {
+ return (this.dataTypes == 4 && (this.detailForm.taskStatus == 2)) ? false : true
+ },
+ priceDisabled(){
+ return this.dataTypes == 4 && (this.detailForm.repairStatus == 1 || this.detailForm.repairStatus == 101)?false:true
+ }
},
data() {
@@ -331,19 +355,33 @@ export default {
this.$u.api.getTaskDetail(query).then(res => {
if (res.code == 200) {
this.detailForm = res.data
+ this.updateData(res.data.details)
this.collapseData = JSON.parse(JSON.stringify(res.data.details))
+
}
})
} else {
this.$u.api.getRepairDetail(query).then(res => {
if (res.code == 200) {
this.detailForm = res.data
+ this.updateData(res.data.details)
this.collapseData = JSON.parse(JSON.stringify(res.data.details))
}
})
}
},
+ // 处理数据 更改数据价格为-1的数据
+ updateData(data) {
+ if (data.length > 0) {
+ for (let i = 0; i < data.length; i++) {
+ data[i].price = data[i].price < 0 ? null : data[i].price
+ if (data[i].details.length > 0) {
+ this.updateData(data[i].details)
+ }
+ }
+ }
+ },
endOrderCancel() {
uni.navigateBack({
delta: 1 // 默认值是1,表示回退一个页面
@@ -383,7 +421,7 @@ export default {
sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
success: (res) => {
- // this.BetLoading.show()
+ this.$refs.BetLoading.show()
// 成功选择图片后的回调
const tempFilePaths = res.tempFilePaths;
this.uploadFile(tempFilePaths[0], index, vindex, sindex);
@@ -406,10 +444,11 @@ export default {
let info = JSON.parse(res.data);
console.log("上传成功", info); // 上传成功后的操作
this.detailForm.details[index].details[vindex].details[sindex].picUrl = info.data.link
- // this.BetLoading.hide()
+ this.itemCollapseChange()
+ this.$refs.BetLoading.hide()
},
error: (uploadFileRes) => {
- // this.BetLoading.hide()
+ this.$refs.BetLoading.hide()
},
});
},
@@ -432,13 +471,16 @@ export default {
return false
}
let queryData = []
+ console.log(111111111, newArr)
newArr.forEach(item => {
// item.id=this.detailForm.id
queryData.push({
- id: this.detailForm.id,
+ id: item.id,
status: item.status,
signUrl: item.signUrl,
- remark: item.remark
+ remark: item.remark,
+ picUrl: item.picUrl,
+ taskId: this.detailForm.id
})
})
this.$u.api.updateDetaile(queryData).then(res => {
@@ -590,19 +632,21 @@ export default {
let isRepair = newArr.every((item) => {
return item.isRepair == -1
})
- if (isRepair) {
- uni.showToast({ title: "请选择异常设备是否维修", icon: "none" });
- return false
- }
if (this.customerApproveInfo.approveResult == null) {
uni.showToast({ title: "请选择审核结果", icon: "none" });
return false
}
- if (this.customerApproveInfo.approveResult == 0 && this.customerApproveInfo.approveRemark == '') {
- uni.showToast({ title: "请填写驳回原因", icon: "none" });
- return false
- }
+ if (this.customerApproveInfo.approveResult == 1) {
+ if (isRepair) {
+ uni.showToast({ title: "请选择异常设备是否维修", icon: "none" });
+ return false
+ }
+ if (this.customerApproveInfo.approveResult == 0 && this.customerApproveInfo.approveRemark == '') {
+ uni.showToast({ title: "请填写驳回原因", icon: "none" });
+ return false
+ }
+ }
if (this.customerApproveInfo.approveResult == 1) {//通过
let query = {
task: {
@@ -627,14 +671,14 @@ export default {
approveTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//当前时间
approveRemark: this.customerApproveInfo.approveRemark,//审批备注
}
- // this.$u.api.repairCustomerRefuse(query_).then(res => {
- // if (res.code == 200) {
- // uni.showToast({ title: "审核成功", icon: "none" });
- // setTimeout(() => {
- // this.endOrderCancel()
- // }, 500)
- // }
- // })
+ this.$u.api.repairCustomerRefuse(query_).then(res => {
+ if (res.code == 200) {
+ uni.showToast({ title: "驳回成功", icon: "none" });
+ setTimeout(() => {
+ this.endOrderCancel()
+ }, 500)
+ }
+ })
}
},
@@ -691,6 +735,12 @@ export default {
},
calendarChange(e) {
this.reservationTime = e.result
+ },
+ // 更改 手风琴的高度
+ itemCollapseChange() {
+ this.$nextTick(() => {
+ this.$refs.collapseTask.init()
+ })
}
}
}
@@ -744,8 +794,9 @@ export default {
}
.item_right_img {
- width: 100%;
- height: 200rpx;
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 8rpx;
}
}
}
diff --git a/pages/submission/records.vue b/pages/submission/records.vue
index 58355c8..6733daf 100644
--- a/pages/submission/records.vue
+++ b/pages/submission/records.vue
@@ -294,8 +294,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
+
+
}
},
diff --git a/pages/submission/recordsdetails.vue b/pages/submission/recordsdetails.vue
index 832a889..0696f18 100644
--- a/pages/submission/recordsdetails.vue
+++ b/pages/submission/recordsdetails.vue
@@ -110,11 +110,13 @@
-
- 驳回详情
+
+ 维修人员驳回
+ 主管驳回
+ 客户驳回
驳回原因:
- {{ detailForm.repaiRejectReason }}
+ {{ detailForm.approveRemark }}
diff --git a/pages/submission/sendOrders.vue b/pages/submission/sendOrders.vue
index 7f4a7b4..8e10890 100644
--- a/pages/submission/sendOrders.vue
+++ b/pages/submission/sendOrders.vue
@@ -81,9 +81,19 @@
+
+ 维修人员驳回
+ 主管驳回
+ 客户驳回
+
+
+ {{ detailForm.approveRemark }}
+
+
+
+ v-if="(dataTypes == 4 && (detailForm.status == 2 || detailForm.status == 101)) || (dataTypes == 3 && (detailForm.status == 3 || detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 4)">
维修详情
@@ -133,7 +143,7 @@
+ v-if="(dataTypes == 3 && (detailForm.status == 3 || detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 4) && repairInfo.isMaterial == 1">
{{ approveInfo.totalPrice }}
@@ -151,7 +161,7 @@
-
+
主管审批
@@ -198,12 +208,14 @@
确定派单
-
+
取消
提交
-
+
取消
提交
@@ -283,7 +295,7 @@ export default {
return this.$store.state.dataType == 2 ? false : true
},
optionDisabled() {
- return (this.$store.state.dataType == 3 && (this.detailForm.status == 3||this.detailForm.status == 102)) || (this.$store.state.dataType == 1 && this.detailForm.status == 4) ? true : false
+ return (this.$store.state.dataType == 3 && (this.detailForm.status == 3 || this.detailForm.status == 102)) || (this.$store.state.dataType == 1 && this.detailForm.status == 4) ? true : false
},
},
diff --git a/utils/website.js b/utils/website.js
index e6af07d..ae744e5 100644
--- a/utils/website.js
+++ b/utils/website.js
@@ -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", // 客户端密钥
From f1e9b656aa6a45c2d5884429af5af13bfddec481 Mon Sep 17 00:00:00 2001
From: zhangdi <15053473693@163.com>
Date: Mon, 9 Dec 2024 17:47:04 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E6=96=B0=E5=8A=A0=E6=B6=88=E6=81=AF?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 7 +
pages/home/components/swiper.vue | 3 +-
pages/home/index.vue | 149 +++++++++++++++++----
pages/login/authInfo.vue | 1 -
pages/my/feedback.vue | 1 -
pages/my/my.vue | 1 -
pages/my/records.vue | 1 -
pages/notice/index.vue | 187 +++++++++++++++++++++++++++
pages/submission/index.vue | 1 -
static/images/home/left.svg | 20 +++
static/images/home/notice.svg | 22 ++++
static/images/home/right.svg | 16 +++
static/scss/sp-components/index.scss | 2 +-
13 files changed, 377 insertions(+), 34 deletions(-)
create mode 100644 pages/notice/index.vue
create mode 100644 static/images/home/left.svg
create mode 100644 static/images/home/notice.svg
create mode 100644 static/images/home/right.svg
diff --git a/pages.json b/pages.json
index a3460d1..590b334 100644
--- a/pages.json
+++ b/pages.json
@@ -9,6 +9,13 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
+ },
+ {
+ "path": "pages/notice/index",
+ "style": {
+ "navigationBarTitleText": "消息中心",
+ "enablePullDownRefresh": false
+ }
}
],
"subPackages": [
diff --git a/pages/home/components/swiper.vue b/pages/home/components/swiper.vue
index 8d6a15f..48a3768 100644
--- a/pages/home/components/swiper.vue
+++ b/pages/home/components/swiper.vue
@@ -1,8 +1,7 @@
- 实验室巡检
+
-
+
+
+
+
+
+
+
- 科研医疗建筑运维平台
-
-
- 工作台
-
-
-
-
-
+
+ 通知公告
+ 实验室巡检
+
+ 设备统计
+
+ 检修单状态
-
-
-
-
-
-
-
+
维修统计
@@ -111,13 +120,13 @@ export default {
})
},
goPage(item) {
- if (item.pagePath == '') {
- uni.showToast({ title: "功能正在完善中,敬请期待!", icon: "none" });
- } else {
- uni.navigateTo({
- url: item.pagePath,
- });
- }
+ // if (item.pagePath == '') {
+ // uni.showToast({ title: "功能正在完善中,敬请期待!", icon: "none" });
+ // } else {
+ uni.navigateTo({
+ url: item,
+ });
+ // }
},
scanCode() {
@@ -140,7 +149,6 @@ export default {
width: 100%;
// min-height: 100%;
padding: 0;
- background: rgba(239, 239, 239, 1);
padding-top: var(--status-bar-height);
.banner-swiper {
@@ -169,6 +177,7 @@ export default {
color: rgba(16, 16, 16, 1);
font-size: 32rpx;
padding: 0 0 32rpx 36rpx;
+ margin-top: 32rpx;
}
.workbench {
@@ -219,5 +228,93 @@ export default {
.statistics_pie {
width: 100%;
}
+
+ .menu_box {
+ width: 100%;
+ background: #fff;
+ position: relative;
+
+ &::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;
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/pages/login/authInfo.vue b/pages/login/authInfo.vue
index 85a5b51..15ed0af 100644
--- a/pages/login/authInfo.vue
+++ b/pages/login/authInfo.vue
@@ -110,7 +110,6 @@
width: 100%;
// min-height: 100%;
padding: 0;
- background: rgba(239, 239, 239, 1);
padding-top: var(--status-bar-height);
.banner-swiper {
margin-bottom: 64rpx;
diff --git a/pages/my/feedback.vue b/pages/my/feedback.vue
index 21c31ca..edcb355 100644
--- a/pages/my/feedback.vue
+++ b/pages/my/feedback.vue
@@ -135,7 +135,6 @@ export default {
\ No newline at end of file
diff --git a/pages/submission/index.vue b/pages/submission/index.vue
index a731c87..97626a3 100644
--- a/pages/submission/index.vue
+++ b/pages/submission/index.vue
@@ -35,7 +35,6 @@ export default {
\ No newline at end of file
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 6a325e7..60504b4 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -7,6 +7,11 @@
+
+
+
+
@@ -28,14 +33,17 @@
- 通知公告
+
实验室巡检
设备统计
-
+
+
检修单状态
-
+
维修统计
@@ -50,21 +58,31 @@
import swiperSlider from "./components/swiper.vue";
import alarm from "./components/alarm.vue";
import eacharts from "./components/eacharts.vue";
+import eacharts_pie from "./components/eacharts_pie.vue";
export default {
components: {
swiperSlider,
alarm,
eacharts,
+ eacharts_pie
},
data() {
return {
swiperList: [],
workList: [],
+ pieInfo: [],//饼图数据
+ noticeList: [
+ '寒雨连江夜入吴',
+ '平明送客楚山孤',
+ '洛阳亲友如相问',
+ '一片冰心在玉壶'
+ ],//通知列表
};
},
onShow() {
this.$nextTick(() => {
this.$refs.tabbarRef.getPermission();
+
// this.BetLoading.show();
// setTimeout(() => {
// this.BetLoading.hide();
@@ -120,14 +138,9 @@ export default {
})
},
goPage(item) {
- // if (item.pagePath == '') {
- // uni.showToast({ title: "功能正在完善中,敬请期待!", icon: "none" });
- // } else {
uni.navigateTo({
url: item,
});
- // }
-
},
scanCode() {
uni.scanCode({
@@ -140,6 +153,20 @@ export default {
console.error('扫码失败:' + err);
}
});
+ },
+ // 饼图数据
+ pieStat() {
+ this.$u.api.pieStat().then(res => {
+ if (res.code == 200) {
+ this.pieInfo = res.data.fault
+ }
+ })
+ },
+ // 通知公告
+ getNotice() {
+ uni.navigateTo({
+ url: '/pages/notice/announcement',
+ });
}
},
};
@@ -152,7 +179,7 @@ export default {
padding-top: var(--status-bar-height);
.banner-swiper {
- margin-bottom: 64rpx;
+ margin-bottom: 32rpx;
position: relative;
.logo-txt {
@@ -316,5 +343,10 @@ export default {
}
}
}
+
+ .notice_box {
+ width: 100%;
+ background: #fff;
+ }
}
\ No newline at end of file
diff --git a/pages/notice/announcement.vue b/pages/notice/announcement.vue
new file mode 100644
index 0000000..8075a77
--- /dev/null
+++ b/pages/notice/announcement.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+ -
+
+
+ {{ item.title }}
+
+
+ {{ item.createdAt }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From aa170572c8f1f34f747cf1156a554f5556723dc7 Mon Sep 17 00:00:00 2001
From: zhangdi <15053473693@163.com>
Date: Tue, 10 Dec 2024 15:36:20 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/api.js | 7 +-
manifest.json | 5 +-
pages/home/components/eacharts.vue | 207 +---------------
pages/home/components/eacharts_pie.vue | 218 ++---------------
pages/home/index.vue | 56 +++--
pages/notice/announcement.vue | 312 ++++++++++++-------------
6 files changed, 223 insertions(+), 582 deletions(-)
diff --git a/api/api.js b/api/api.js
index c6dd51f..4933319 100644
--- a/api/api.js
+++ b/api/api.js
@@ -353,8 +353,13 @@ const install = (Vue, vm) => {
authorizations: true,
isparams: false
})
+ // 通知公告/
+ let getNoticeList = (params) => http.get('/blade-desk/notice/list', params, {
+ authorizations: true,
+ isparams: false
+ })
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
- vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave, sendVerify, serviceman, servicemanReceive, servicemanSubmit, supervisorReject, supervisorconfirm, customerConfirm, customerReject, servicemanRepairSubmit, evaluateRepairReject, getDeviceDetail, getTaskPage, getTaskDetail, taskSupervisorconfirm, taskServicemanreceive, updateCoordinate, taskServicemanUpdateTime, getPlanDetail, getRepairPage, updateDetaile, taskServicemanSubmit, taskCustomerConfirm, taskCustomerRefuse, taskSolutionSave, taskSolutionSubmit, repairSolutionSupervisor, repairSolutionRefuse, repairSolutionCustomer, repairCustomerRefuse, repairServicemanSubmit,repairConfirmFinish,repairRefuseFinish ,confirmPayment,getPosition,getRepairDetail,updatePosition,resetPwd};
+ vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave, sendVerify, serviceman, servicemanReceive, servicemanSubmit, supervisorReject, supervisorconfirm, customerConfirm, customerReject, servicemanRepairSubmit, evaluateRepairReject, getDeviceDetail, getTaskPage, getTaskDetail, taskSupervisorconfirm, taskServicemanreceive, updateCoordinate, taskServicemanUpdateTime, getPlanDetail, getRepairPage, updateDetaile, taskServicemanSubmit, taskCustomerConfirm, taskCustomerRefuse, taskSolutionSave, taskSolutionSubmit, repairSolutionSupervisor, repairSolutionRefuse, repairSolutionCustomer, repairCustomerRefuse, repairServicemanSubmit,repairConfirmFinish,repairRefuseFinish ,confirmPayment,getPosition,getRepairDetail,updatePosition,resetPwd,getNoticeList};
}
export default {
diff --git a/manifest.json b/manifest.json
index 2633e0f..ab2ab68 100644
--- a/manifest.json
+++ b/manifest.json
@@ -53,7 +53,10 @@
"sdkConfigs" : {
"ad" : {},
"push" : {
- "unipush" : {}
+ "unipush" : {
+ "version" : "2",
+ "offline" : false
+ }
},
"maps" : {
"amap" : {
diff --git a/pages/home/components/eacharts.vue b/pages/home/components/eacharts.vue
index b6c30f1..2da3d0f 100644
--- a/pages/home/components/eacharts.vue
+++ b/pages/home/components/eacharts.vue
@@ -1,31 +1,9 @@
-
-
-
-
-
+
-
-
-
-
-
- 故障现象分类
-
-
-
- 设备分类
-
-
-
\ No newline at end of file
diff --git a/pages/home/components/eacharts_pie.vue b/pages/home/components/eacharts_pie.vue
index 861c999..090d8d8 100644
--- a/pages/home/components/eacharts_pie.vue
+++ b/pages/home/components/eacharts_pie.vue
@@ -4,7 +4,7 @@
-
+
@@ -20,9 +20,15 @@ export default {
type: String,
default: "",
},
- data:{
- type:Array,
- default:[]
+ echartData: {
+ type: Array,
+ default: []
+ }
+ },
+ watch: {
+ echartData(val) {
+ this.pieInfo = val
+ this.maintenancePieInit()
}
},
data() {
@@ -32,137 +38,14 @@ export default {
startTime: "",
endTime: "",
},
- calendarShow: false,
- mode: "range",
- upkeepStatInfo: {},
- pieInfo: {},//饼图数据
- };
- },
- mounted() {
- this.maintenancePieLeftInit()
- // // 维修统计
- // if (this.type == "maintenanceStatistics") {
- // this.upkeepStat()
-
-
- // }
- // if (this.type == "maintenanceStatisticsPie") {
- // this.pieStat()
-
- // }
+ pieInfo: [],//饼图数据
+ };
},
+ mounted() { },
methods: {
- // 维修统计
- upkeepStat() {
- let query_ = {
- startTime: this.form.startTime,
- endTime: this.form.endTime,
- }
- // if(this.form.startTime!=''){
- // query_.startTime=this.form.startTime
- // }
- // if(this.form.endTime!=''){
- // query_.endTime=this.form.endTime
- // }
- this.$u.api.upkeepStat(query_).then(res => {
- if (res.code == 200) {
- this.upkeepStatInfo = JSON.parse(JSON.stringify(res.data))
- this.maintenanceInit();
- }
- })
- },
- // 饼图数据
- pieStat() {
- let query_ = {
- startTime: this.form.startTime,
- endTime: this.form.endTime,
- }
- this.$u.api.pieStat(query_).then(res => {
- if (res.code == 200) {
- this.pieInfo = res.data
- this.maintenancePieLeftInit();
- this.maintenancePieRightInit();
- }
- })
- },
- selectFun() {
- this.calendarShow = true;
- },
- change(e) {
- this.form.startTime = e.startDate;
- this.form.endTime = e.endDate;
- this.form.searchTime = e.startDate + "-" + e.endDate;
- if (this.type == "maintenanceStatistics") {
- this.upkeepStat()
- }
- if (this.type == "maintenanceStatisticsPie") {
- this.pieStat()
- }
-
- // 查询数据
- },
- // 维修统计柱状图
- maintenanceInit() {
- let opts = {
- tooltip: {},
- legend: {
- //图例组件
- data: ["总计", "已完成", "未完成"],
- },
- xAxis: {
- data: this.upkeepStatInfo.xData,
- },
- grid: {
- top: "15%",
- left: "10%",
- right: "5%",
- bottom: "15%",
- },
- yAxis: {},
- series: [
- {
- name: "总计",
- type: "bar",
- data: this.upkeepStatInfo.total,
- barWidth: 30, // 设置柱子宽度
- barGap: "0", // 设置不同系列之间的间隔为0
- itemStyle: {
- color: "#2478f2",
- },
- },
- {
- name: "已完成",
- type: "bar",
- data: this.upkeepStatInfo.completed,
- barWidth: 30, // 设置柱子宽度
- barGap: "0", // 设置不同系列之间的间隔为0
- itemStyle: {
- color: "#84b7f9",
- },
- },
- {
- name: "未完成",
- type: "bar",
- data: this.upkeepStatInfo.unCompleted,
- barWidth: 30, // 设置柱子宽度
- barGap: "0", // 设置不同系列之间的间隔为0
- itemStyle: {
- color: "#5f9cf8",
- },
- },
- ],
- };
- this.$refs.chartRef.init((config) => {
- const { canvas } = config;
- const chart = echarts.init(canvas, null, config);
- chart.setOption(opts);
- // 需要把 chart 返回
- return chart;
- });
- },
// 故障现象分类
- maintenancePieLeftInit() {
+ maintenancePieInit() {
let opts = {
series: [
{
@@ -180,7 +63,7 @@ export default {
},
},
- data: this.data,
+ data: this.pieInfo,
emphasis: {
itemStyle: {
shadowBlur: 10,
@@ -213,74 +96,20 @@ export default {
return chart;
});
},
- maintenancePieRightInit() {
- let opts = {
- series: [
- {
- type: "pie",
- radius: ['40%', '70%'],
- label: {
- // 饼图图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等.
- normal: {
- show: true,
- fontSize: 8, // 是否显示标签[ default: false ]
- position: "outside", // 标签的位置。'outside'饼图扇区外侧,通过视觉引导线连到相应的扇区。'inside','inner' 同 'inside',饼图扇区内部。'center'在饼图中心位置。
- formatter: "{b}\n {c}", // 标签内容
- color: '#000'
- },
- },
- data: this.pieInfo.device,
- labelLine: {
- // 标签的视觉引导线样式,在 label 位置 设置为'outside'的时候会显示视觉引导线。
- normal: {
- show: true, // 是否显示视觉引导线。
- length: 5, // 在 label 位置 设置为'outside'的时候会显示视觉引导线。
- length2: 5,
- // 视觉引导项第二段的长度。
- lineStyle: {
- // 视觉引导线的样式
- type: "solid",
- },
- },
- },
- },
- ],
- };
- this.$refs.chartRefPieRight.init((config) => {
- const { canvas } = config;
- const chart = echarts.init(canvas, null, config);
- chart.setOption(opts);
- // 需要把 chart 返回
- return chart;
- });
- },
+
},
};
\ No newline at end of file
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 60504b4..b547982 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -8,9 +8,9 @@
-
-
+
+
@@ -34,20 +34,17 @@
- 实验室巡检
-
+
设备统计
-
+
检修单状态
-
-
+
+
维修统计
-
-
+
+
@@ -58,13 +55,13 @@
import swiperSlider from "./components/swiper.vue";
import alarm from "./components/alarm.vue";
import eacharts from "./components/eacharts.vue";
-import eacharts_pie from "./components/eacharts_pie.vue";
+import eachartsPie from "./components/eacharts_pie.vue";
export default {
components: {
swiperSlider,
alarm,
eacharts,
- eacharts_pie
+ eachartsPie
},
data() {
return {
@@ -72,23 +69,21 @@ export default {
workList: [],
pieInfo: [],//饼图数据
noticeList: [
- '寒雨连江夜入吴',
- '平明送客楚山孤',
- '洛阳亲友如相问',
- '一片冰心在玉壶'
+
],//通知列表
};
},
+ onLoad() {
+ this.pieStat()
+ },
onShow() {
this.$nextTick(() => {
this.$refs.tabbarRef.getPermission();
+ this.getNoticeList()
- // this.BetLoading.show();
- // setTimeout(() => {
- // this.BetLoading.hide();
- // }, 1000);
});
//工作台
+
this.getUserInfo()
this.getoverview()
},
@@ -167,7 +162,18 @@ export default {
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)
+ })
+ }
+ })
+ },
},
};
@@ -257,10 +263,10 @@ export default {
}
.menu_box {
- width: 100%;
background: #fff;
position: relative;
-
+ margin: 0 32rpx;
+ border-radius: 20rpx;
&::after {
content: '';
position: absolute;
diff --git a/pages/notice/announcement.vue b/pages/notice/announcement.vue
index 8075a77..179e102 100644
--- a/pages/notice/announcement.vue
+++ b/pages/notice/announcement.vue
@@ -1,180 +1,178 @@
-
-
-
- -
-
-
- {{ item.title }}
-
-
- {{ item.createdAt }}
+
+
+
+ -
+
+
+ {{ item.title }}
+
+
+ {{ item.categoryName }}
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
\ No newline at end of file
+}
+
\ No newline at end of file
From 076457fd7a7cbd39fc281592a2b8b18c9f504dd7 Mon Sep 17 00:00:00 2001
From: zhangdi <15053473693@163.com>
Date: Tue, 10 Dec 2024 16:28:04 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E9=A5=BC=E5=9B=BE=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/home/components/eacharts.vue | 10 +-
pages/home/components/eacharts_nightpie.vue | 131 ++++++++++++++++++++
pages/home/index.vue | 6 +-
3 files changed, 141 insertions(+), 6 deletions(-)
create mode 100644 pages/home/components/eacharts_nightpie.vue
diff --git a/pages/home/components/eacharts.vue b/pages/home/components/eacharts.vue
index 2da3d0f..37d131a 100644
--- a/pages/home/components/eacharts.vue
+++ b/pages/home/components/eacharts.vue
@@ -54,12 +54,14 @@ export default {
legend: {
//图例组件
data: ["总计", "已完成", "未完成"],
+ itemWidth: 15,
+ itemHeight: 10,
},
xAxis: {
data: this.upkeepStatInfo.xData,
},
grid: {
- top: "15%",
+ top: "25%",
left: "10%",
right: "5%",
bottom: "15%",
@@ -70,7 +72,7 @@ export default {
name: "总计",
type: "bar",
data: this.upkeepStatInfo.total,
- barWidth: 30, // 设置柱子宽度
+ barWidth: 25, // 设置柱子宽度
barGap: "0", // 设置不同系列之间的间隔为0
itemStyle: {
color: "#2478f2",
@@ -80,7 +82,7 @@ export default {
name: "已完成",
type: "bar",
data: this.upkeepStatInfo.completed,
- barWidth: 30, // 设置柱子宽度
+ barWidth: 25, // 设置柱子宽度
barGap: "0", // 设置不同系列之间的间隔为0
itemStyle: {
color: "#84b7f9",
@@ -90,7 +92,7 @@ export default {
name: "未完成",
type: "bar",
data: this.upkeepStatInfo.unCompleted,
- barWidth: 30, // 设置柱子宽度
+ barWidth: 25, // 设置柱子宽度
barGap: "0", // 设置不同系列之间的间隔为0
itemStyle: {
color: "#5f9cf8",
diff --git a/pages/home/components/eacharts_nightpie.vue b/pages/home/components/eacharts_nightpie.vue
new file mode 100644
index 0000000..efc5076
--- /dev/null
+++ b/pages/home/components/eacharts_nightpie.vue
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/home/index.vue b/pages/home/index.vue
index b547982..0fde21e 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -39,7 +39,7 @@
检修单状态
-
+
维修统计
@@ -56,12 +56,14 @@ import swiperSlider from "./components/swiper.vue";
import alarm from "./components/alarm.vue";
import eacharts from "./components/eacharts.vue";
import eachartsPie from "./components/eacharts_pie.vue";
+import eachartsNightpie from "./components/eacharts_nightpie.vue";
export default {
components: {
swiperSlider,
alarm,
eacharts,
- eachartsPie
+ eachartsPie,
+ eachartsNightpie
},
data() {
return {
From e3a42990d708ff8497172b81ab5279f67ed5a723 Mon Sep 17 00:00:00 2001
From: zhangdi <15053473693@163.com>
Date: Tue, 10 Dec 2024 17:17:25 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/home/components/eacharts_nightpie.vue | 1 -
pages/home/index.vue | 47 ++++++++++++++++++---
pages/inspection/quest.vue | 6 +--
pages/submission/records.vue | 14 +++---
store/index.js | 8 ++--
utils/tabbar.js | 29 +++----------
6 files changed, 61 insertions(+), 44 deletions(-)
diff --git a/pages/home/components/eacharts_nightpie.vue b/pages/home/components/eacharts_nightpie.vue
index efc5076..8cb7f6e 100644
--- a/pages/home/components/eacharts_nightpie.vue
+++ b/pages/home/components/eacharts_nightpie.vue
@@ -51,7 +51,6 @@ export default {
{
name: "",
type: "pie",
- radius: [20, 50],
center: ['50%', '50%'],
roseType: 'area',
label: {
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 0fde21e..8198c1a 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -18,33 +18,61 @@