fix: BUG修改
This commit is contained in:
parent
3044cd8cde
commit
d325708279
@ -128,7 +128,6 @@ import { getRelevanceList } from "@/api/modules/common";
|
|||||||
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
||||||
import allEngineering from "@/components/allEngineering/index.vue";
|
import allEngineering from "@/components/allEngineering/index.vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
const currentMonthDay = ref(0); // 当前月份天数
|
|
||||||
const engList = ref([]);
|
const engList = ref([]);
|
||||||
const engVisable = ref(false);
|
const engVisable = ref(false);
|
||||||
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
||||||
@ -326,6 +325,7 @@ const getTableList = (params: any) => {
|
|||||||
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
|
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
|
||||||
newParams.month = currentData.value.year + "-" + month;
|
newParams.month = currentData.value.year + "-" + month;
|
||||||
}
|
}
|
||||||
|
changeThead(newParams.month.substring(5));
|
||||||
if (initParam.engineeringSn) {
|
if (initParam.engineeringSn) {
|
||||||
newParams.engineeringSn = initParam.engineeringSn;
|
newParams.engineeringSn = initParam.engineeringSn;
|
||||||
} else {
|
} else {
|
||||||
@ -333,7 +333,16 @@ const getTableList = (params: any) => {
|
|||||||
}
|
}
|
||||||
return statisticsList(newParams);
|
return statisticsList(newParams);
|
||||||
};
|
};
|
||||||
|
const changeThead = (month: any) => {
|
||||||
|
console.log(month, "--------123456");
|
||||||
|
let dayNumber = dayjs(month).daysInMonth();
|
||||||
|
for (let i = 0; i < columns.length; i++) {
|
||||||
|
columns[i].isShow = true;
|
||||||
|
}
|
||||||
|
for (let i = dayNumber + 7; i < columns.length; i++) {
|
||||||
|
columns[i].isShow = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
const handleAddItem = (index: number, row: any) => {
|
const handleAddItem = (index: number, row: any) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
title.value = "新增角色";
|
title.value = "新增角色";
|
||||||
@ -386,10 +395,6 @@ const deleteAccount = async (params: jxj_User.ResUserList) => {
|
|||||||
proTable.value.getTableList();
|
proTable.value.getTableList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeTreeFilter = () => {
|
|
||||||
console.log(11);
|
|
||||||
};
|
|
||||||
|
|
||||||
const getengineering = async () => {
|
const getengineering = async () => {
|
||||||
// let newParams = JSON.parse(JSON.stringify(params));
|
// let newParams = JSON.parse(JSON.stringify(params));
|
||||||
const res = await getRelevanceList();
|
const res = await getRelevanceList();
|
||||||
@ -410,7 +415,6 @@ onMounted(() => {
|
|||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
currentData.value = useTime();
|
currentData.value = useTime();
|
||||||
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
|
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
|
||||||
currentMonthDay.value = dayjs(month).daysInMonth();
|
|
||||||
for (let i = 0; i < 31; i++) {
|
for (let i = 0; i < 31; i++) {
|
||||||
monthColumns.push({
|
monthColumns.push({
|
||||||
prop: "day" + (i + 1),
|
prop: "day" + (i + 1),
|
||||||
|
|||||||
@ -228,10 +228,6 @@
|
|||||||
<span class="errorCircle" v-else></span>
|
<span class="errorCircle" v-else></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <template v-for="(item, index) in monthColumns" #[item.prop]="{ row }">
|
|
||||||
<span class="successCircle" v-if="row[item.prop]"></span>
|
|
||||||
<span class="errorCircle" v-else></span>
|
|
||||||
</template> -->
|
|
||||||
<!-- 表格无数据情况 -->
|
<!-- 表格无数据情况 -->
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="table-empty">
|
<div class="table-empty">
|
||||||
@ -265,6 +261,7 @@ import { onMounted, ref, watch, reactive, onBeforeMount } from "vue";
|
|||||||
import Pagination from "@/components/ProTable/components/Pagination.vue";
|
import Pagination from "@/components/ProTable/components/Pagination.vue";
|
||||||
import type { FormInstance } from "element-plus";
|
import type { FormInstance } from "element-plus";
|
||||||
import { unitPageList, classGroupList, memberCountData, memberPageList, attendancePageList } from "@/api/modules/goverment";
|
import { unitPageList, classGroupList, memberCountData, memberPageList, attendancePageList } from "@/api/modules/goverment";
|
||||||
|
import dayjs from "dayjs";
|
||||||
const typeOptions = ref([
|
const typeOptions = ref([
|
||||||
{ label: "管理", value: 1 },
|
{ label: "管理", value: 1 },
|
||||||
{ label: "工人", value: 2 }
|
{ label: "工人", value: 2 }
|
||||||
@ -298,7 +295,7 @@ const classGroupData = ref([]);
|
|||||||
const memberCountInfo = ref({});
|
const memberCountInfo = ref({});
|
||||||
const memberListData = ref([]);
|
const memberListData = ref([]);
|
||||||
const attendanceListData = ref([]);
|
const attendanceListData = ref([]);
|
||||||
const monthColumns: any = [];
|
const monthColumns = ref<any>([]);
|
||||||
const visible1 = ref(false);
|
const visible1 = ref(false);
|
||||||
const emits = defineEmits(["update:detailsDialog", "confirm"]);
|
const emits = defineEmits(["update:detailsDialog", "confirm"]);
|
||||||
const ruleFormRef = ref<FormInstance>();
|
const ruleFormRef = ref<FormInstance>();
|
||||||
@ -306,13 +303,20 @@ const form = ref({});
|
|||||||
// 获取人员出勤列表数据
|
// 获取人员出勤列表数据
|
||||||
const getAttendanceCountList = async () => {
|
const getAttendanceCountList = async () => {
|
||||||
console.log(form.value);
|
console.log(form.value);
|
||||||
|
monthColumns.value = [];
|
||||||
let requestData = {
|
let requestData = {
|
||||||
current: pageable.value.pageNo,
|
current: pageable.value.pageNo,
|
||||||
size: pageable.value.pageSize,
|
size: pageable.value.pageSize,
|
||||||
engineeringSn: form.value.engineeringSn,
|
engineeringSn: form.value.engineeringSn,
|
||||||
...attendaceSearch.value
|
...attendaceSearch.value
|
||||||
};
|
};
|
||||||
console.log(666);
|
let month = requestData.month.substring(5);
|
||||||
|
for (let i = 0; i < dayjs(month).daysInMonth(); i++) {
|
||||||
|
monthColumns.value.push({
|
||||||
|
prop: "day" + (i + 1),
|
||||||
|
label: "" + (i + 1)
|
||||||
|
});
|
||||||
|
}
|
||||||
const { result } = await attendancePageList(requestData);
|
const { result } = await attendancePageList(requestData);
|
||||||
if (result && result.records) {
|
if (result && result.records) {
|
||||||
attendanceListData.value = result.records;
|
attendanceListData.value = result.records;
|
||||||
@ -409,7 +413,7 @@ const handleClick = (tab: any, event: any) => {
|
|||||||
} else if (val == "fourth") {
|
} else if (val == "fourth") {
|
||||||
attendaceSearch.value = {
|
attendaceSearch.value = {
|
||||||
personType: null,
|
personType: null,
|
||||||
month: ""
|
month: dayjs(new Date()).format("YYYY-MM")
|
||||||
};
|
};
|
||||||
attendanceListData.value = [];
|
attendanceListData.value = [];
|
||||||
getAttendanceCountList();
|
getAttendanceCountList();
|
||||||
@ -459,7 +463,7 @@ watch(
|
|||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
for (let i = 0; i < 31; i++) {
|
for (let i = 0; i < 31; i++) {
|
||||||
monthColumns.push({
|
monthColumns.value.push({
|
||||||
prop: "day" + (i + 1),
|
prop: "day" + (i + 1),
|
||||||
label: "" + (i + 1)
|
label: "" + (i + 1)
|
||||||
});
|
});
|
||||||
|
|||||||
@ -33,7 +33,7 @@ const projectNumber = async () => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.ordersizeCenter {
|
.ordersizeCenter {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 15%;
|
top: 10%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
|||||||
@ -72,8 +72,9 @@ const goBack = () => {
|
|||||||
font-family: SourceHanSansCNR;
|
font-family: SourceHanSansCNR;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
background-image: -webkit-linear-gradient(bottom, #4b5e84, #ffffff);
|
background-image: -webkit-linear-gradient(bottom, #4b5e84, #ffffff);
|
||||||
background-clip: text;
|
color: #d5d8df;
|
||||||
-webkit-text-fill-color: transparent;
|
// background-clip: text;
|
||||||
|
// -webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
.img {
|
.img {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
|||||||
@ -187,7 +187,7 @@ const conmpanyList = async () => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.leftBorder {
|
.leftBorder {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 15%;
|
top: 10%;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@ -659,7 +659,7 @@ const pieOption = (val: ResponseSame<ScreenResponse.FugitiveDustAllResponse> | u
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.leftBorder {
|
.leftBorder {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 15%;
|
top: 10%;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 27%;
|
width: 27%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@ -1,6 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <ScaleBox :width="width" :height="height" bgc="transparent" :delay="100" style="top: 0; left: 0"> -->
|
<ScaleBox :width="width" :height="height" bgc="transparent" :delay="50" v-if="!isFull">
|
||||||
<div class="orderBgc">
|
<div class="orderBgc">
|
||||||
|
<!-- <Map3D class="mapStyle"></Map3D> -->
|
||||||
|
<Map2D class="mapStyle"></Map2D>
|
||||||
|
<headerScreen class="topHeader"></headerScreen>
|
||||||
|
<div class="bottomContent">
|
||||||
|
<leftScreen class="leftScreen"></leftScreen>
|
||||||
|
<centerScreen class="centerScreen"></centerScreen>
|
||||||
|
<rightScreen class="rightScreen"></rightScreen>
|
||||||
|
</div>
|
||||||
|
<div class="borderBottom"></div>
|
||||||
|
</div>
|
||||||
|
</ScaleBox>
|
||||||
|
<div class="orderBgc" v-else>
|
||||||
<!-- <Map3D class="mapStyle"></Map3D> -->
|
<!-- <Map3D class="mapStyle"></Map3D> -->
|
||||||
<Map2D class="mapStyle"></Map2D>
|
<Map2D class="mapStyle"></Map2D>
|
||||||
<headerScreen class="topHeader"></headerScreen>
|
<headerScreen class="topHeader"></headerScreen>
|
||||||
@ -11,7 +23,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="borderBottom"></div>
|
<div class="borderBottom"></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </ScaleBox> -->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -23,12 +34,28 @@ import rightScreen from "./components/right.vue";
|
|||||||
import Map3D from "./components/map3D.vue";
|
import Map3D from "./components/map3D.vue";
|
||||||
import Map2D from "./components/map2D.vue";
|
import Map2D from "./components/map2D.vue";
|
||||||
import ScaleBox from "vue3-scale-box";
|
import ScaleBox from "vue3-scale-box";
|
||||||
// const width = ref(0);
|
const width = ref(0);
|
||||||
// const height = ref(0);
|
const height = ref(0);
|
||||||
// onMounted(() => {
|
const isFull = ref(true);
|
||||||
// width.value = window.screen.width * window.devicePixelRatio;
|
onMounted(() => {
|
||||||
// height.value = window.screen.height * window.devicePixelRatio;
|
width.value = window.screen.width;
|
||||||
// });
|
height.value = window.screen.height;
|
||||||
|
// console.log(window.screen.width);
|
||||||
|
// console.log(window.screen.height);
|
||||||
|
// console.log(document.documentElement.clientWidth);
|
||||||
|
// console.log(document.documentElement.clientHeight);
|
||||||
|
// console.log(document.documentElement.offsetHeight);
|
||||||
|
window.onresize = () => {
|
||||||
|
return (() => {
|
||||||
|
if (document.documentElement.clientWidth == window.screen.width) {
|
||||||
|
isFull.value = true;
|
||||||
|
} else {
|
||||||
|
isFull.value = false;
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
};
|
||||||
|
// height.value = window.screen.height * window.devicePixelRatio;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -40,7 +67,7 @@ import ScaleBox from "vue3-scale-box";
|
|||||||
}
|
}
|
||||||
.topHeader {
|
.topHeader {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 15%;
|
height: 10%;
|
||||||
|
|
||||||
// background: linear-gradient(to right, rgb(17 20 25 / 60%), rgb(17 20 25 / 20%), rgb(17 20 25 / 60%));
|
// background: linear-gradient(to right, rgb(17 20 25 / 60%), rgb(17 20 25 / 20%), rgb(17 20 25 / 60%));
|
||||||
}
|
}
|
||||||
@ -49,16 +76,13 @@ import ScaleBox from "vue3-scale-box";
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 79%;
|
height: 79%;
|
||||||
.leftScreen {
|
.leftScreen {
|
||||||
flex: 2.5;
|
height: 90%;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
.centerScreen {
|
.centerScreen {
|
||||||
flex: 5;
|
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
.rightScreen {
|
.rightScreen {
|
||||||
flex: 2.5;
|
height: 90%;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.borderBottom {
|
.borderBottom {
|
||||||
|
|||||||
@ -326,6 +326,7 @@ const getTableList = (params: any) => {
|
|||||||
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
|
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
|
||||||
newParams.month = currentData.value.year + "-" + month;
|
newParams.month = currentData.value.year + "-" + month;
|
||||||
}
|
}
|
||||||
|
changeThead(newParams.month.substring(5));
|
||||||
if (searchSn.value) {
|
if (searchSn.value) {
|
||||||
if (activeValue.value == "eng") {
|
if (activeValue.value == "eng") {
|
||||||
newParams.engineeringSn = searchSn.value;
|
newParams.engineeringSn = searchSn.value;
|
||||||
@ -337,7 +338,16 @@ const getTableList = (params: any) => {
|
|||||||
}
|
}
|
||||||
return statisticsList(newParams);
|
return statisticsList(newParams);
|
||||||
};
|
};
|
||||||
|
const changeThead = (month: any) => {
|
||||||
|
console.log(month, "--------123456");
|
||||||
|
let dayNumber = dayjs(month).daysInMonth();
|
||||||
|
for (let i = 0; i < columns.length; i++) {
|
||||||
|
columns[i].isShow = true;
|
||||||
|
}
|
||||||
|
for (let i = dayNumber + 7; i < columns.length; i++) {
|
||||||
|
columns[i].isShow = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
const handleAddItem = (index: number, row: any) => {
|
const handleAddItem = (index: number, row: any) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
title.value = "新增角色";
|
title.value = "新增角色";
|
||||||
@ -390,10 +400,6 @@ const deleteAccount = async (params: jxj_User.ResUserList) => {
|
|||||||
proTable.value.getTableList();
|
proTable.value.getTableList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeTreeFilter = () => {
|
|
||||||
console.log(11);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 抽屉tab选择时
|
// 抽屉tab选择时
|
||||||
const tabsSelect = val => {
|
const tabsSelect = val => {
|
||||||
activeValue.value = val;
|
activeValue.value = val;
|
||||||
@ -439,7 +445,7 @@ onMounted(() => {
|
|||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
currentData.value = useTime();
|
currentData.value = useTime();
|
||||||
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
|
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
|
||||||
for (let i = 0; i < dayjs(month).daysInMonth(); i++) {
|
for (let i = 0; i < 31; i++) {
|
||||||
monthColumns.push({
|
monthColumns.push({
|
||||||
prop: "day" + (i + 1),
|
prop: "day" + (i + 1),
|
||||||
label: "" + (i + 1)
|
label: "" + (i + 1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user