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