From 2e062b9a6c69068108575c2787a723e44679c749 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=A5=E5=A6=8D?= <3096114695@qq.com>
Date: Wed, 12 Jul 2023 16:46:53 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E5=8F=B3=E4=B8=8A?=
=?UTF-8?q?=E6=8C=89=E5=B7=A5=E7=A7=8D=E5=88=86=E6=9E=90=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/modules/labor.ts | 10 +
.../laborManagement/rightTop.vue | 196 +++++++++---------
2 files changed, 108 insertions(+), 98 deletions(-)
diff --git a/src/api/modules/labor.ts b/src/api/modules/labor.ts
index 5430235..e4cfa8e 100644
--- a/src/api/modules/labor.ts
+++ b/src/api/modules/labor.ts
@@ -29,3 +29,13 @@ export const getEnterpriseInfoApi = (params: {}) => {
export const getWorkerInfoApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/workerInfo/selectAllProjectTeamList`, params);
};
+
+// 右中 获取部门管理人员出勤分析
+export const getworkerAttendanceTrendApi = (params: {}) => {
+ return http.get(BASEURL + `/xmgl/workerAttendance/queryAttendanceOfEachCompany`, params);
+};
+
+// 查询右下 获取按分包单位分析
+export const getComapnyWorkTotalListApi = (params: {}) => {
+ return http.get(BASEURL + `/xmgl/workerInfo/selectProjectComapnyWorkTotalList`, params);
+};
diff --git a/src/views/sevenLargeScreen/laborManagement/rightTop.vue b/src/views/sevenLargeScreen/laborManagement/rightTop.vue
index 6d95c9c..12bf3e5 100644
--- a/src/views/sevenLargeScreen/laborManagement/rightTop.vue
+++ b/src/views/sevenLargeScreen/laborManagement/rightTop.vue
@@ -1,10 +1,10 @@
- 168
+ {{max}}
@@ -20,12 +20,12 @@ const store = GlobalStore();
let data = reactive(
[
{
- value: 300,
- name: "名字"
+ value: 400,
+ name: "名字1"
},
{
- value: 500,
- name: "名字"
+ value: 1500,
+ name: "名字2"
}
].sort(function (a, b) {
return b.value - a.value;
@@ -57,15 +57,14 @@ let data = reactive(
// return b.value - a.value;
// })
// );
-let max = reactive(Math.max(...data.map(item => item.value)) + 1000);
-function array2obj(array, key) {
- let resObj = {};
- for (let i = 0; i < array.length; i++) {
- resObj[array[i][key]] = array[i];
- }
- return resObj;
-}
+// function array2obj(array, key) {
+// let resObj = {};
+// for (let i = 0; i < array.length; i++) {
+// resObj[array[i][key]] = array[i];
+// }
+// return resObj;
+// }
function getData(data) {
let res = {
@@ -81,14 +80,14 @@ function getData(data) {
radius: [87 - i * 10 + "%", 82 - i * 10 + "%"],
center: ["25%", "50%"],
label: {
- show: false
+ show: true
},
itemStyle: {
label: {
- show: false
+ show: true
},
labelLine: {
- show: false
+ show: true
},
borderWidth: 10
},
@@ -98,7 +97,7 @@ function getData(data) {
name: data[i].name
},
{
- value: max - data[i].value,
+ value: max.value,
name: "",
itemStyle: {
color: "rgba(9, 26, 61)",
@@ -114,101 +113,102 @@ function getData(data) {
}
return res;
}
-let objData = reactive(array2obj(data, "name"));
-let optionData = reactive(getData(data));
-const option = reactive({
- legend: {
- show: true,
- itemGap: 15,
- itemWidth: 15,
- itemHeight: 15,
- icon: "rect",
- orient: "horizontal",
- // x: "right",
- right: 300,
- left: 260,
- bottom: 10,
- align: "left",
- formatter: function (name) {
- return "{title|" + name + "}{value|" + objData[name].value + "}";
- },
- textStyle: {
- rich: {
- title: {
- width: 40,
- color: "#fff",
- padding: [0, 0, 0, 10]
- },
- value: {
- color: "#fff",
- padding: [0, 40]
- }
- }
- }
- },
- color: ["#eea959", "#4cc4f8", "#6375c7", "#81f9e8", " #ec6266"],
- // grid: {
- // top: "0",
- // left: "40%",
- // right: "20%",
- // containLabel: false
- // },
- yAxis: [
- {
- type: "category",
- inverse: true,
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- interval: 0,
- inside: true,
- textStyle: {
- color: "#fff",
- fontSize: 16
- },
- show: true
- },
- data: optionData.yAxis
- }
- ],
- xAxis: [
- {
- show: false
- }
- ],
- series: optionData.series
-});
+// let objData = array2obj(data, "name");
+let option = ref({} as any)
+let optionData = ref(null as any);
+// 初始化option 绘制图表
+function initOption() {
+ option.value = {
+ legend: {
+ show: true,
+ itemGap: 20,
+ itemWidth: 40,
+ itemHeight: 10,
+ icon: "rect",
+ orient: "horizontal",
+ // x: "right",
+ right: 300,
+ left: 260,
+ bottom: 10,
+ align: "left",
+ textStyle: {
+ color: "#EEEEEE"
+ }
+ },
+ color: ["#eea959", "#4cc4f8", "#6375c7", "#81f9e8", "#ec6266"],
+ yAxis: [
+ {
+ type: "category",
+ inverse: true,
+ axisLine: {
+ show: false
+ },
+ axisTick: {
+ show: false
+ },
+ axisLabel: {
+ interval: 0,
+ inside: true,
+ textStyle: {
+ color: "#EEEEEE",
+ fontSize: 16
+ },
+ show: true
+ },
+ data: optionData.value.yAxis
+ }
+ ],
+ xAxis: [
+ {
+ show: false
+ }
+ ],
+ series: optionData.value.series
+ };
+}
+// 图表绘制
function draw() {
let echartsTest = echarts.init(document.getElementById("echartTop"));
- echartsTest.setOption(option);
+ echartsTest.setOption(option.value);
+ // console.log('绘图数据',option.value);
}
+// 存储最大值
+let max = ref(0 as any)
+
//获取工种分析数据
+// let timer = null
const getProjectWorkerList = async () => {
- const res = await selectProjectWorkerTypeTotalListApi({
+ const res: any = await selectProjectWorkerTypeTotalListApi({
projectSn: store.sn
});
console.log("获取工种分析数据", res);
-
+ let projectWorkerTypeOption: any = [];
if (res.result) {
res.result.forEach(item => {
- data.push({
- value: item.typeName,
- name: item.totalPersonNum
- });
+ // 只取有数据的工种
+ if (item.workerNum > 0) {
+ // 计算工人总和
+ max.value = max.value + item.workerNum;
+ projectWorkerTypeOption.push({
+ value: item.workerNum,
+ name: item.typeName
+ });
+ }
});
+ data = projectWorkerTypeOption;
+ optionData.value = getData(data);
+ // 初始化option
+ initOption();
+ // console.log(option.value,'调用接口后绘图')
}
- setTimeout(() => {
- draw();
- }, 500);
+
};
onMounted(async () => {
- getProjectWorkerList();
+ // console.log('挂载时',optionData)
+ await getProjectWorkerList();
+ draw();
});
From 31df8dcfd2b73fbd4d5cdd872e7f4d5ccf264ad3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=A5=E5=A6=8D?= <3096114695@qq.com>
Date: Thu, 13 Jul 2023 16:51:58 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E5=8A=B3=E5=8A=A1?=
=?UTF-8?q?=E7=8F=AD=E7=BB=84=E5=87=BA=E5=8B=A4=E5=88=86=E6=9E=90=EF=BC=8C?=
=?UTF-8?q?=E5=8F=B3=E4=BE=A7=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../laborManagement/horizontaL.vue | 275 +++++++++---------
1 file changed, 144 insertions(+), 131 deletions(-)
diff --git a/src/views/sevenLargeScreen/laborManagement/horizontaL.vue b/src/views/sevenLargeScreen/laborManagement/horizontaL.vue
index 619c88c..89f9a66 100644
--- a/src/views/sevenLargeScreen/laborManagement/horizontaL.vue
+++ b/src/views/sevenLargeScreen/laborManagement/horizontaL.vue
@@ -32,43 +32,22 @@ const form = ref({
});
let xData = ref([] as any);
let yData = ref([] as any);
-const option = reactive({
- grid: {
- left: "5%",
- right: "5%",
- bottom: "3%",
- top: "18%",
- containLabel: true
- },
- // backgroundColor: "#101129",
- xAxis: {
- show: true,
- type: "value",
- max: 100,
- axisLabel: {
- show: true,
- textStyle: {
- fontSize: "12",
- color: "#fff"
- }
+let option = ref(null as any);
+
+function initOption() {
+ option.value = {
+ grid: {
+ left: "5%",
+ right: "5%",
+ bottom: "3%",
+ top: "18%",
+ containLabel: true
},
- axisLine: {
+ // backgroundColor: "#101129",
+ xAxis: {
show: true,
- lineStyle: {
- color: "#14336b"
- }
- },
- splitLine: {
- show: false,
- lineStyle: {
- color: "#14336b"
- }
- }
- },
- yAxis: [
- {
- type: "category",
- inverse: true,
+ type: "value",
+ max: 100,
axisLabel: {
show: true,
textStyle: {
@@ -76,113 +55,141 @@ const option = reactive({
color: "#fff"
}
},
-
- axisTick: {
- show: false
- },
axisLine: {
+ show: true,
lineStyle: {
color: "#14336b"
}
},
- data: yData.value
- },
- {
- axisTick: "none",
- axisLine: "none",
- axisLabel: {
- textStyle: {
- color: "#fff",
- fontSize: "12"
- }
- },
- data: []
- },
- {
- type: "category",
- inverse: true,
- axisTick: "none",
- axisLine: "none",
- show: true
- // data: [],
- }
- ],
- series: [
- {
- type: "bar",
- showBackground: true,
- backgroundStyle: {
- color: "#14346c",
- borderRadius: 30
- },
- label: {
+ splitLine: {
show: false,
- // position:'right',
- // formatter:'{@score}%',
- textStyle: {
- color: "#03fcfe",
- fontSize: "12"
+ lineStyle: {
+ color: "#14336b"
}
- },
- itemStyle: {
- normal: {
- barBorderRadius: 10,
- color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
- {
- offset: 0,
- color: "#1d465c"
- },
- {
- offset: 1,
- color: "#82FBEA"
- }
- ])
- }
- },
- barWidth: 3,
- data: xData.value
+ }
},
- {
- name: "内圆",
- type: "scatter",
- stack: "圆",
- yAxisIndex: 0,
- data: xData.value, //小白点,数据静态
- label: false,
- symbolSize: 2,
- itemStyle: {
- normal: {
- borderColor: "#fff",
- borderWidth: 4,
- color: "#fff",
- opacity: 1
- }
+ yAxis: [
+ {
+ type: "category",
+ inverse: true,
+ axisLabel: {
+ show: true,
+ textStyle: {
+ fontSize: "12",
+ color: "#fff"
+ }
+ },
+
+ axisTick: {
+ show: false
+ },
+ axisLine: {
+ lineStyle: {
+ color: "#14336b"
+ }
+ },
+ data: yData.value
},
- z: 3
- },
- {
- name: "内圆框",
- type: "scatter",
- stack: "圆",
- yAxisIndex: 0,
- data: [0, 0, 0, 0, 0, 0], //小白点外圈,数据静态
- label: false,
- symbolSize: 15,
- itemStyle: {
- normal: {
- borderColor: "#82FBEA",
- borderWidth: 2,
+ {
+ axisTick: "none",
+ axisLine: "none",
+ axisLabel: {
+ textStyle: {
+ color: "#fff",
+ fontSize: "12"
+ }
+ },
+ data: []
+ },
+ {
+ type: "category",
+ inverse: true,
+ axisTick: "none",
+ axisLine: "none",
+ show: true
+ // data: [],
+ }
+ ],
+ series: [
+ {
+ type: "bar",
+ showBackground: true,
+ backgroundStyle: {
color: "#14346c",
- opacity: 1
- }
+ borderRadius: 30
+ },
+ label: {
+ show: false,
+ // position:'right',
+ // formatter:'{@score}%',
+ textStyle: {
+ color: "#03fcfe",
+ fontSize: "12"
+ }
+ },
+ itemStyle: {
+ normal: {
+ barBorderRadius: 10,
+ color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
+ {
+ offset: 0,
+ color: "#1d465c"
+ },
+ {
+ offset: 1,
+ color: "#82FBEA"
+ }
+ ])
+ }
+ },
+ barWidth: 3,
+ data: xData.value
},
- z: 2
- }
- ]
-});
+ {
+ name: "内圆",
+ type: "scatter",
+ stack: "圆",
+ yAxisIndex: 0,
+ data: xData.value, //小白点,数据静态
+ label: false,
+ symbolSize: 2,
+ itemStyle: {
+ normal: {
+ borderColor: "#fff",
+ borderWidth: 4,
+ color: "#fff",
+ opacity: 1
+ }
+ },
+ z: 3
+ },
+ {
+ name: "内圆框",
+ type: "scatter",
+ stack: "圆",
+ yAxisIndex: 0,
+ data: [0, 0, 0, 0, 0, 0], //小白点外圈,数据静态
+ label: false,
+ symbolSize: 15,
+ itemStyle: {
+ normal: {
+ borderColor: "#82FBEA",
+ borderWidth: 2,
+ color: "#14346c",
+ opacity: 1
+ }
+ },
+ z: 2
+ }
+ ]
+ };
+}
+// let horizontalEcharts: any = null;
function horizontalChart() {
+ initOption();
let horizontalEcharts = echarts.init(document.getElementById("horizontalEcharts"));
- horizontalEcharts.setOption(option);
+ console.log(option.value, "绘图数据");
+ horizontalEcharts.setOption(option.value);
}
// //选择日期
// const onDatePicker = () => {
@@ -192,27 +199,33 @@ function horizontalChart() {
// };
//获取劳务班组人员数据
const getList = async val => {
+ // 清数据
const res: any = await getWorkerInfoApi({
projectSn: store.sn,
enterpriseId: val
// queryStartTime: form.queryStartTime.value,
// queryEndTime: form.queryEndTime.value
});
- if (res.result[0]) {
+ // console.log(res.result.length,'长度')
+ if (res.result.length != 0) {
for (let index = 0; index < res.result.length; index++) {
xData.value[index] = res.result[index].totalPersonNum;
yData.value[index] = res.result[index].teamName;
}
} else {
+ console.log("没有数据");
xData.value = [];
yData.value = [];
}
- console.log("获取劳务班组人员数据2", res);
+ // console.log("获取劳务班组人员数据2", res);
horizontalChart();
};
onMounted(async () => {
mitts.on("enterpriseId", e => {
+ // horizontalEcharts = echarts.init(document.getElementById('chart-view'))
// 清数据
+ xData.value = [];
+ yData.value = [];
getList(e);
});
});
From 4ac3dd47beb94c4d29300ec149734d4bf2afa8cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=A5=E5=A6=8D?= <3096114695@qq.com>
Date: Thu, 13 Jul 2023 18:03:45 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=20=E4=B8=83=E5=8F=82?=
=?UTF-8?q?=E6=95=B0=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/modules/video.ts | 11 ++
.../videoManagement/videoList.vue | 115 +++++++-----------
2 files changed, 54 insertions(+), 72 deletions(-)
create mode 100644 src/api/modules/video.ts
diff --git a/src/api/modules/video.ts b/src/api/modules/video.ts
new file mode 100644
index 0000000..4db9374
--- /dev/null
+++ b/src/api/modules/video.ts
@@ -0,0 +1,11 @@
+import http from "@/api";
+const BASEURL = import.meta.env.VITE_API_URL;
+
+// 根据分组查询视频列表
+export const selectProjectVideoListApi = (params: {}) => {
+ return http.post(BASEURL + `/xmgl/videoItem/selectProjectVideoList`, params);
+};
+// 查询子账号视频列表
+export const selectUserVideoListApi = (params: {}) => {
+ return http.post(BASEURL + `/xmgl/videoItem/selectUserVideoList`, params);
+};
diff --git a/src/views/sevenLargeScreen/videoManagement/videoList.vue b/src/views/sevenLargeScreen/videoManagement/videoList.vue
index b108d31..ed5edd6 100644
--- a/src/views/sevenLargeScreen/videoManagement/videoList.vue
+++ b/src/views/sevenLargeScreen/videoManagement/videoList.vue
@@ -1,89 +1,60 @@