From 0487f168855129aaf8083b08e62ee6b8f8637c84 Mon Sep 17 00:00:00 2001 From: loveflow <5269966+loveflow@user.noreply.gitee.com> Date: Wed, 3 Apr 2024 22:40:46 +0800 Subject: [PATCH] update --- .../enterpriseTopic/dangerTransport/index.js | 6 ++-- src/loveflow/components/echart/bar/four.vue | 6 ++-- src/loveflow/mixins/tableListMixins.js | 5 ++-- .../enterpriseTopic/components/tableWrap.vue | 10 +++++++ .../dangerTransport/carDetail.vue | 30 +++++++++++++++++-- .../enterpriseTopic/dangerTransport/index.vue | 22 +++++++------- .../enterpriseTopic/inSecurity/ycTable.vue | 11 ++++--- src/views/enterpriseTopic/listGoods/index.vue | 30 +++++++++++++++---- .../personSafety/flowPerson.vue | 3 ++ .../enterpriseTopic/personSafety/screen.vue | 4 +-- .../personSafety/workPerson.vue | 3 ++ src/views/enterpriseTopic/roadSafety/dpie.vue | 16 ++++++---- .../enterpriseTopic/roadSafety/index.vue | 29 ++++++++++-------- .../enterpriseTopic/roadSafety/qyzgTable.vue | 25 +++++++++------- .../enterpriseTopic/roadSafety/ytTable.vue | 17 ++++++----- 15 files changed, 150 insertions(+), 67 deletions(-) diff --git a/src/api/enterpriseTopic/dangerTransport/index.js b/src/api/enterpriseTopic/dangerTransport/index.js index 867262b..b65974d 100644 --- a/src/api/enterpriseTopic/dangerTransport/index.js +++ b/src/api/enterpriseTopic/dangerTransport/index.js @@ -1,9 +1,10 @@ import request from "@/utils/request"; //车辆详情 -export function vehicledetail() { +export function vehicledetail(params) { return request({ url: "/special/vehicle/vehicledetail", method: "post", + params, }); } //车辆的违规信息统计 @@ -21,9 +22,10 @@ export function violations() { }); } //获取统计数 -export function nums() { +export function nums(params) { return request({ url: "/special/vehicle/nums", method: "get", + params, }); } diff --git a/src/loveflow/components/echart/bar/four.vue b/src/loveflow/components/echart/bar/four.vue index 1b381d3..e3786f4 100644 --- a/src/loveflow/components/echart/bar/four.vue +++ b/src/loveflow/components/echart/bar/four.vue @@ -65,7 +65,7 @@ export default { }, }, yAxis: { - name:"单位:吨", + name: "单位:吨", type: "value", splitLine: { show: true, @@ -86,7 +86,7 @@ export default { type: "bar", barWidth: 20, color: this.chartObj.color[0][0], - data: this.chartObj.yData1, + data: this.chartObj.yData[0], label: { show: false, position: "top", @@ -131,7 +131,7 @@ export default { type: "bar", barWidth: 20, color: this.chartObj.color[1][0], - data: this.chartObj.yData2, + data: this.chartObj.yData[1], label: { show: false, position: "top", diff --git a/src/loveflow/mixins/tableListMixins.js b/src/loveflow/mixins/tableListMixins.js index 2de7cde..1340838 100644 --- a/src/loveflow/mixins/tableListMixins.js +++ b/src/loveflow/mixins/tableListMixins.js @@ -53,8 +53,9 @@ export const tableListMixins = { this.dataSource = []; return; } - this.dataSource = res.data || []; - if (res.total) { + this.dataSource = (res && res.data) || []; + + if (res && res.total) { this.ipagination.total = res.total; } else { this.ipagination.total = 0; diff --git a/src/views/enterpriseTopic/components/tableWrap.vue b/src/views/enterpriseTopic/components/tableWrap.vue index 0b7985f..b1f8d98 100644 --- a/src/views/enterpriseTopic/components/tableWrap.vue +++ b/src/views/enterpriseTopic/components/tableWrap.vue @@ -39,6 +39,12 @@ export default { return ""; }, }, + param: { + type: Object, + default: () => { + return {}; + }, + }, }, data() { return { @@ -50,6 +56,10 @@ export default { }, created() { this.url.list = this.dataUrl; + if (!this.url.list) { + return; + } + this.queryParam = { ...this.param }; this.ipagination.pageSize = 10000; this.ipagination.pageSizes = []; this.ipagination.layout = "total, prev, pager, next"; diff --git a/src/views/enterpriseTopic/dangerTransport/carDetail.vue b/src/views/enterpriseTopic/dangerTransport/carDetail.vue index 8f85146..5b73793 100644 --- a/src/views/enterpriseTopic/dangerTransport/carDetail.vue +++ b/src/views/enterpriseTopic/dangerTransport/carDetail.vue @@ -4,7 +4,14 @@
- +
@@ -96,12 +103,16 @@ import tableWrap from "../components/tableWrap.vue"; import colWrap from "../components/colWrap.vue"; import carNum from "../components/carNum.vue"; +import { + vehicledetail, + nums, +} from "@/api/enterpriseTopic/dangerTransport/index.js"; export default { components: { tableWrap, colWrap, carNum }, data() { return { - total: 34567, + dataUrl: "/special/vehicle/violationdetail", title: { one: "车辆超载 (1)", two: "超速 (2)", @@ -317,6 +328,21 @@ export default { mounted() { this.car = this.$route.query.car; console.log(this.car); + this.getData(); + }, + methods: { + getData() { + vehicledetail({ plateNo: this.car }).then((res) => { + if (res.code == 200) { + let data = res.data || {}; + } + }); + nums({ plateNo: this.car }).then((res) => { + if (res.code == 200) { + let data = res.data || {}; + } + }); + }, }, }; diff --git a/src/views/enterpriseTopic/dangerTransport/index.vue b/src/views/enterpriseTopic/dangerTransport/index.vue index 1605328..adca1c3 100644 --- a/src/views/enterpriseTopic/dangerTransport/index.vue +++ b/src/views/enterpriseTopic/dangerTransport/index.vue @@ -37,10 +37,10 @@
- +
@@ -62,7 +62,7 @@
@@ -75,7 +75,7 @@
@@ -88,7 +88,7 @@
@@ -101,7 +101,7 @@
@@ -114,7 +114,7 @@
@@ -127,7 +127,7 @@
@@ -140,7 +140,7 @@
@@ -153,7 +153,7 @@
@@ -233,7 +233,7 @@ export default { this.$router.push({ path: "/topic/dangerTransport/carDetail", query: { - car: item.car, + car: item.licensePlate, }, }); }, diff --git a/src/views/enterpriseTopic/inSecurity/ycTable.vue b/src/views/enterpriseTopic/inSecurity/ycTable.vue index da51b19..784563e 100644 --- a/src/views/enterpriseTopic/inSecurity/ycTable.vue +++ b/src/views/enterpriseTopic/inSecurity/ycTable.vue @@ -6,19 +6,19 @@
异常类型:
-
{{ item.carAlarm }}
+
{{ item.abnormalType }}
时间:
-
{{ item.time }}
+
{{ item.warningTime }}
-
企业类型:
+
异常原因:
- + {{ item.abnormalRemarks }}
@@ -55,6 +55,9 @@ export default { }, ], disableMixinCreated: true, + url: { + list: "/special/peace/exceptioninfo", + }, }; }, created() { diff --git a/src/views/enterpriseTopic/listGoods/index.vue b/src/views/enterpriseTopic/listGoods/index.vue index 16b7b29..fd15bae 100644 --- a/src/views/enterpriseTopic/listGoods/index.vue +++ b/src/views/enterpriseTopic/listGoods/index.vue @@ -178,10 +178,9 @@ export default { ], }, tmObj: { - xData: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月"], - yData1: [23, 24, 13, 21, 33, 14, 32, 12], - yData2: [13, 34, 23, 11, 23, 24, 12, 32], - legend: ["易制爆物品", "剧毒物品"], + xData: [], + yData: [], + legend: [], name: "物品使用情况", color: [ ["#09C8F5", "rgba(9,200,245,0.9)", "rgba(9,200,245,0)"], @@ -300,7 +299,7 @@ export default { if (index == 0) { this.tlObj.xData.push(list[i]["monthnum"] + "月"); } - arr.push(list[i]["sum"] || 0); + arr.push(list[i]["subcategoryQuantity"] || 0); } this.tlObj.yData[index] = arr; }); @@ -311,7 +310,26 @@ export default { this.errorAlarm = res.data || []; } }); - goodsend().then((res) => {}); + goodsend().then((res) => { + if (res.code == 200) { + let data = res.data || {}; + this.tmObj.xData = []; + this.tmObj.yData = []; + this.tmObj.legend = []; + Object.keys(data).forEach((key, index) => { + this.tmObj.legend.push(key); + let list = data[key]; + let arr = []; + for (let i = 0; i < list.length; i++) { + if (index == 0) { + this.tmObj.xData.push(list[i]["monthnum"] + "月"); + } + arr.push(list[i]["subcategoryQuantity"] || 0); + } + this.tmObj.yData[index] = arr; + }); + } + }); nums().then((res) => { if (res.code == 200) { let data = res.data || {}; diff --git a/src/views/enterpriseTopic/personSafety/flowPerson.vue b/src/views/enterpriseTopic/personSafety/flowPerson.vue index 2a1937f..8a8238a 100644 --- a/src/views/enterpriseTopic/personSafety/flowPerson.vue +++ b/src/views/enterpriseTopic/personSafety/flowPerson.vue @@ -190,6 +190,9 @@ export default { }, }, ], + url: { + list: "/special/personnel/population", + }, }; }, methods: { diff --git a/src/views/enterpriseTopic/personSafety/screen.vue b/src/views/enterpriseTopic/personSafety/screen.vue index 9dab410..876be2f 100644 --- a/src/views/enterpriseTopic/personSafety/screen.vue +++ b/src/views/enterpriseTopic/personSafety/screen.vue @@ -261,14 +261,14 @@ export default { hdryList: [ { name: "已被核查人数", - value: 34567, + value: 0, itemStyle: { color: "#378DFF", }, }, { name: "未被核查人数", - value: 21456, + value: 0, itemStyle: { color: "#E15A4E", }, diff --git a/src/views/enterpriseTopic/personSafety/workPerson.vue b/src/views/enterpriseTopic/personSafety/workPerson.vue index 02d38ef..d3e2411 100644 --- a/src/views/enterpriseTopic/personSafety/workPerson.vue +++ b/src/views/enterpriseTopic/personSafety/workPerson.vue @@ -159,6 +159,9 @@ export default { }, }, ], + url: { + list: "/special/personnel/emphasis", + }, }; }, methods: { diff --git a/src/views/enterpriseTopic/roadSafety/dpie.vue b/src/views/enterpriseTopic/roadSafety/dpie.vue index e6896d2..d6d594f 100644 --- a/src/views/enterpriseTopic/roadSafety/dpie.vue +++ b/src/views/enterpriseTopic/roadSafety/dpie.vue @@ -38,13 +38,19 @@ export default { }; }, mounted() { + //console.log(this.chartObj); this.data = JSON.parse(JSON.stringify(this.chartObj)); - this.total = 1; + this.total = 0; for (let i = 0; i < this.data.length; i++) { this.total += this.data[i].value; } - - this.setOption(); + if (this.total) { + this.total = 1; + } + console.log("dddd:", this.data); + setTimeout(() => { + this.setOption(); + }, 1); }, methods: { setOption() { @@ -263,13 +269,13 @@ export default { }, }, watch: { - chartObj: { + /* chartObj: { handler(newval) { this.setOption(); }, deep: true, // immediate: true, - }, + }, */ }, }; diff --git a/src/views/enterpriseTopic/roadSafety/index.vue b/src/views/enterpriseTopic/roadSafety/index.vue index a6a59c7..f8da912 100644 --- a/src/views/enterpriseTopic/roadSafety/index.vue +++ b/src/views/enterpriseTopic/roadSafety/index.vue @@ -6,7 +6,7 @@
- +
@@ -18,7 +18,7 @@
- +
@@ -70,7 +70,7 @@
- +
@@ -80,7 +80,7 @@
- +
@@ -149,7 +149,7 @@ export default { }, ytObj: { name: "源头检查总数", - value: 11876, + value: 0, }, ytmObj: { name: "设施完善率", @@ -158,14 +158,14 @@ export default { ytPie: [ { name: "区内检查数据", - value: 128, + value: 0, itemStyle: { color: "#2B82F3", }, }, { - name: "资质异常企业数", - value: 86, + name: "区外检查数据", + value: 0, itemStyle: { color: "#49ECC9", }, @@ -278,11 +278,17 @@ export default { }, methods: { getData() { - enterprisereclist().then((res) => {}); enterpriserectification().then((res) => {}); piechart().then((res) => {}); - source().then((res) => {}); - sourcelist().then((res) => {}); + source().then((res) => { + if (res.code == 200) { + let data = res.data || {}; + this.ytPie[0]["value"] = data["区内检查数据"]; + this.ytPie[1]["value"] = data["区外检查数据"]; + + this.ytObj.value = data["区内检查数据"] + data["区外检查数据"]; + } + }); transporlist().then((res) => {}); trafficaccidents().then((res) => { if (res.code == 200) { @@ -471,7 +477,6 @@ export default { margin-bottom: 14px; } .right { - padding: 14px; flex: 1; display: flex; flex-direction: column; diff --git a/src/views/enterpriseTopic/roadSafety/qyzgTable.vue b/src/views/enterpriseTopic/roadSafety/qyzgTable.vue index 14646bd..3409e52 100644 --- a/src/views/enterpriseTopic/roadSafety/qyzgTable.vue +++ b/src/views/enterpriseTopic/roadSafety/qyzgTable.vue @@ -5,45 +5,45 @@
企业名称:
-
{{ item.cmy }}
+
{{ item.companyName }}
问题提出单位:
- + {{ item.problemRaisedBy }}
提出时间:
-
{{ item.time }}
+
{{ item.raisedTime }}
整改内容:
-
{{ item.qyT }}
+
{{ item.rectificationContent }}
整改截止时间:
-
{{ item.time }}
+
{{ item.rectificationDeadline }}
录入人员:
-
{{ item.name }}
+
{{ item.entryPersonnel }}
录入时间:
-
{{ item.time }}
+
{{ item.entryTime }}
整改结果:
-
{{ item.sc }}
+
{{ item.rectificationResult }}
目前状态:
-
{{ item.sc }}
+
{{ item.currentStatus }}
@@ -78,10 +78,13 @@ export default { }, ], disableMixinCreated: true, + url: { + list: "/special/road/enterprisereclist", + }, }; }, created() { - this.ipagination.pageSize = 6; + this.ipagination.pageSize = 10; this.ipagination.pageSizes = []; this.ipagination.layout = "total, prev, pager, next"; this.loadData(); @@ -94,7 +97,7 @@ export default { height: 100%; overflow: hidden; .roadSafetyQyzgTableWrap { - height: calc(100% - 12px); + height: calc(100% - 30px); overflow: scroll; &::-webkit-scrollbar { display: none; diff --git a/src/views/enterpriseTopic/roadSafety/ytTable.vue b/src/views/enterpriseTopic/roadSafety/ytTable.vue index 7b73596..a8e779c 100644 --- a/src/views/enterpriseTopic/roadSafety/ytTable.vue +++ b/src/views/enterpriseTopic/roadSafety/ytTable.vue @@ -5,31 +5,31 @@
企业名称:
-
{{ item.cmy }}
+
{{ item.companyName }}
企业类型:
- + {{ item.companyType }}
检查人:
-
{{ item.name }}
+
{{ item.inspector }}
检查时间:
-
{{ item.time }}
+
{{ item.inspectionTime }}
危化品类型:
-
{{ item.whp }}
+
{{ item.chemicalType }}
检查结果:
-
{{ item.sc }}
+
{{ item.inspectionResult }}
@@ -64,10 +64,13 @@ export default { }, ], disableMixinCreated: true, + url: { + list: "/special/road/sourcelist", + }, }; }, created() { - this.ipagination.pageSize = 6; + this.ipagination.pageSize = 10; this.ipagination.pageSizes = []; this.ipagination.layout = "total, prev, pager, next"; this.loadData();