From 661c4f34c72c6fb8c87642635262c386071d9928 Mon Sep 17 00:00:00 2001 From: Luck-Xiaomi <1569717859@qq.com> Date: Wed, 14 Sep 2022 17:30:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E5=BB=BA=E5=9B=9B=E5=B1=80-=E6=8C=87?= =?UTF-8?q?=E6=8C=A5=E4=B8=AD=E5=BF=83=EF=BC=9A=E5=AE=8C=E6=88=90=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=BF=A1=E6=81=AF=E3=80=81=E5=AE=89=E5=85=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=80=81=E8=B4=A8=E9=87=8F=E7=AE=A1=E7=90=86=E3=80=81?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E7=9A=84?= =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/api/zhongjianFourth.js | 14 +++ .../zjsj/command/LeftThree/Process.vue | 30 +++-- .../zjsj/command/LeftThree/index.vue | 2 +- .../projectAdmin/zjsj/command/center.vue | 79 ++++++++++--- src/views/projectAdmin/zjsj/command/index.vue | 15 +-- .../projectAdmin/zjsj/command/leftOne.vue | 61 +++++++--- .../projectAdmin/zjsj/command/rightFour.vue | 4 +- .../projectAdmin/zjsj/command/rightOne.vue | 106 ++++++++++++++---- .../projectAdmin/zjsj/command/rightTwo.vue | 96 +++++++++++----- 9 files changed, 299 insertions(+), 108 deletions(-) create mode 100644 src/assets/js/api/zhongjianFourth.js diff --git a/src/assets/js/api/zhongjianFourth.js b/src/assets/js/api/zhongjianFourth.js new file mode 100644 index 00000000..f5304359 --- /dev/null +++ b/src/assets/js/api/zhongjianFourth.js @@ -0,0 +1,14 @@ +/* 中建四局 */ + import { post, get } from '../http' +/* --------------指挥中心------------ */ +// 项目信息 +export const listProjectInfo = data => post('xmgl/project/getProjectInfoBySn', data); +// 安全管理 +export const resourceManagement = params => get('xmgl/hiddenDangerInspectRecord/getPollingFinishDays', params); +// 质量管理-整改问题 +export const qualityManagement = params => get('xmgl/qualityInspectionRecord/getRectificationAndNoNum', params); +// 质量管理-质量问题库 +export const listQualityManagement = params => get('xmgl/dangerTypeRecord/getBigList', params); + + + diff --git a/src/views/projectAdmin/zjsj/command/LeftThree/Process.vue b/src/views/projectAdmin/zjsj/command/LeftThree/Process.vue index 5f648300..f3554fff 100644 --- a/src/views/projectAdmin/zjsj/command/LeftThree/Process.vue +++ b/src/views/projectAdmin/zjsj/command/LeftThree/Process.vue @@ -1,16 +1,14 @@ diff --git a/src/views/projectAdmin/zjsj/command/center.vue b/src/views/projectAdmin/zjsj/command/center.vue index 50ef48b8..210f9e21 100644 --- a/src/views/projectAdmin/zjsj/command/center.vue +++ b/src/views/projectAdmin/zjsj/command/center.vue @@ -1,7 +1,7 @@ diff --git a/src/views/projectAdmin/zjsj/command/leftOne.vue b/src/views/projectAdmin/zjsj/command/leftOne.vue index 3996bc84..c2096c62 100644 --- a/src/views/projectAdmin/zjsj/command/leftOne.vue +++ b/src/views/projectAdmin/zjsj/command/leftOne.vue @@ -3,9 +3,9 @@
-
- {{ item.name }} - {{ item.content }} +
+ {{ item.label }} + {{ item.value }}
@@ -15,18 +15,41 @@ @@ -34,6 +57,7 @@ export default { .container { box-sizing: border-box; padding: 16px; + padding-bottom: 0; width: 100%; height: 100%; @@ -43,17 +67,18 @@ export default { display: flex; flex-direction: column; color: #fff; - // overflow-y: scroll; + overflow-y: scroll; .list-item { + flex: 1; position: relative; display: flex; box-sizing: border-box; border-left: 4px solid #66d3d8; - margin-bottom: 5px; - padding: 10px 0; + margin-bottom: 3px; + padding: 9px 0; width: 100%; - background-image: linear-gradient(to right, #3b7589, #212c3e); + background-image: linear-gradient(to right, #3b7589, #182337); font-size: 12px; font-weight: 500; cursor: pointer; @@ -61,12 +86,14 @@ export default { white-space: nowrap; &:hover { + margin-top: 2px; + margin-bottom: 5px; padding: 20px 0; &::before { content: ''; position: absolute; top: 50%; - left: 8px; + left: 6px; display: inline-block; transform: translate(0, -50%); width: 8px; diff --git a/src/views/projectAdmin/zjsj/command/rightFour.vue b/src/views/projectAdmin/zjsj/command/rightFour.vue index 1fa3dfa6..785638d5 100644 --- a/src/views/projectAdmin/zjsj/command/rightFour.vue +++ b/src/views/projectAdmin/zjsj/command/rightFour.vue @@ -99,9 +99,9 @@ export default { box-sizing: border-box; border-left: 4px solid #66d3d8; margin-bottom: 5px; - padding: 10px 0; + padding: 8px 0; width: 100%; - background-image: linear-gradient(to right, #3b7589, #212c3e); + background-image: linear-gradient(to right, #3b7589, #182337); font-size: 12px; font-weight: 500; cursor: pointer; diff --git a/src/views/projectAdmin/zjsj/command/rightOne.vue b/src/views/projectAdmin/zjsj/command/rightOne.vue index 1070b0a6..4155ab1c 100644 --- a/src/views/projectAdmin/zjsj/command/rightOne.vue +++ b/src/views/projectAdmin/zjsj/command/rightOne.vue @@ -6,15 +6,15 @@
- 45 + {{ pollingData.closeRatio || 0 }} %
- 巡检总数/已完成整改 + 已完成整改/巡检总数
- 200/45 + {{ pollingData.rectificationNum }}/{{ pollingData.totalNum }}
@@ -23,19 +23,19 @@
安全生产天数
-
0
-
3
-
6
-
5
+
{{ days.kilobit }}
+
{{ days.hundreds }}
+
{{ days.decade }}
+
{{ days.units }}
起始日期:
- 2019年 - 03月 - 15日 + {{ startDate.year }} 年 + {{ startDate.month }} 月 + {{ startDate.day }}
@@ -46,11 +46,73 @@ @@ -78,7 +140,7 @@ export default { justify-content: center; width: 100%; - height: 140px; + height: 150px; .image { display: grid; @@ -87,7 +149,7 @@ export default { width: 100%; height: 100%; img { - height: 140px; + height: 150px; } .value { position: absolute; @@ -105,6 +167,14 @@ export default { flex-direction: column; justify-content: center; font-size: 13px; + + .number:nth-child(1) { + color: #af5320; + } + + .number:nth-child(2) { + color: #fff; + } } .label { @@ -116,14 +186,6 @@ export default { color: #fff; font-size: 20px; text-align: center; - .number:nth-child(1) { - color: #fff; - } - - .number:nth-child(2) { - color: #af5320; - } - } } diff --git a/src/views/projectAdmin/zjsj/command/rightTwo.vue b/src/views/projectAdmin/zjsj/command/rightTwo.vue index 69078e6d..05cfad9d 100644 --- a/src/views/projectAdmin/zjsj/command/rightTwo.vue +++ b/src/views/projectAdmin/zjsj/command/rightTwo.vue @@ -6,20 +6,24 @@
已整改质量问题 - (13) + ({{ qualityProblem.rectificationNum || 0 }})
未整改质量问题 - (14) + ({{ qualityProblem.noRectificationNum || 0 }})
- -
+ +
- {{ item.name }} - {{ item.content }} + {{ item.dangerName }} +
+
+ +
暂无数据
+
@@ -30,24 +34,60 @@ import Card from '../components/Card' import echarts from 'echarts4' +import { qualityManagement, listQualityManagement } from '@/assets/js/api/zhongjianFourth' + +import { mapState } from 'vuex' + export default { components: { Card }, data() { return { - list: [ - { name: '防水', content: '' }, - { name: '门窗', content: '' }, - { name: '钢结构工程', content: '' }, - { name: '建筑装饰工程', content: '' }, - { name: '主体结构', content: '' }, - { name: '建筑电气', content: '' } - ] + // 质量问题 + qualityProblem: { + rectificationNum: undefined, // 整改数量 + noRectificationNum: undefined, // 未整改数量 + totalNum: undefined, // 总数量 + }, + list: [] } }, + created() { + this.getQualityProblem() + + this.getList() + }, + computed: { + ...mapState(['projectSn']), + }, mounted() { this.initChart() }, methods: { + /** 查询列表 */ + getQualityProblem() { + qualityManagement({ projectSn: this.projectSn }).then(res => { + console.log('质量管理: ', res); + const qualityProblem = this.qualityProblem; + Object.keys(qualityProblem).forEach(key => { + qualityProblem[key] = toString(res.result[key]); + }) + + this.initChart() + + function toString(value) { + if (typeof value === 'string') return value + return value.toString() + } + }) + }, + /** */ + getList() { + listQualityManagement({ projectSn: this.projectSn }).then(res => { + console.log('质量问题库: ', res); + this.list = res.result; + }) + }, + /** 初始化chart */ initChart() { const myChart = echarts.init(this.$refs.chart) @@ -70,7 +110,7 @@ export default { series: [ { type: 'pie', - radius: ['76%', '88%'], + radius: ['60%', '53%'], center: ['50%', '50%'], hoverAnimation: false, label: { @@ -80,7 +120,7 @@ export default { }, data: [ { - value: '14', + value: this.qualityProblem.noRectificationNum || '0', name: '未整改质量问题', itemStyle: { normal: { @@ -94,7 +134,7 @@ export default { } }, { - value: '13', + value: this.qualityProblem.rectificationNum || '0', name: '已整改质量问题', tooltip: { show: true @@ -106,7 +146,7 @@ export default { }, label: { normal: { - formatter: '56', + formatter: this.qualityProblem.totalNum || '56', // 中间的数值 textStyle: { fontSize: 36, color: '#ffc30f', @@ -123,7 +163,7 @@ export default { type: 'pie', hoverAnimation: false, legendHoverLink: false, - radius: ['67%', '70%'], + radius: ['47%', '45%'], center: ['50%', '50%'], color: ['#182337', '#60d3d0'], label: { @@ -164,7 +204,7 @@ export default { .container { display: flex; box-sizing: border-box; - padding-bottom: 5px; + padding: 10px 0; width: 100%; height: 100%; @@ -184,7 +224,7 @@ export default { color: #fff; font-size: 12px; white-space: nowrap; - line-height: 34px; + line-height: 25px; .left { color: #af5320; transform: translateX(-10%); @@ -193,7 +233,7 @@ export default { .list { width: 100%; - flex: 1; + height: 100%; display: flex; flex-direction: column; color: #fff; @@ -204,10 +244,10 @@ export default { display: flex; box-sizing: border-box; border-left: 4px solid #66d3d8; - margin-bottom: 5px; - padding: 7px 0; + margin-bottom: 2px; + padding: 6px 0; width: 100%; - background-image: linear-gradient(to right, #3b7589, #212c3e); + background-image: linear-gradient(to right, #3b7589, #182337); font-size: 12px; font-weight: 500; cursor: pointer; @@ -216,11 +256,13 @@ export default { &:hover { padding: 15px 0; + margin-top: 2px; + margin-bottom: 4px; &::before { content: ''; position: absolute; top: 50%; - left: 8px; + left: 6px; display: inline-block; transform: translate(0, -50%); width: 6.6px; @@ -232,6 +274,7 @@ export default { .value { color: #c2805f; } + } &:last-child { @@ -243,6 +286,7 @@ export default { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + transform: translateX(-5%) scale(90%); } .label {