fix: BUG修改

This commit is contained in:
kun 2023-09-22 19:15:22 +08:00
parent 3044cd8cde
commit d325708279
8 changed files with 80 additions and 41 deletions

View File

@ -128,7 +128,6 @@ import { getRelevanceList } from "@/api/modules/common";
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
import allEngineering from "@/components/allEngineering/index.vue";
import dayjs from "dayjs";
const currentMonthDay = ref(0); //
const engList = ref([]);
const engVisable = ref(false);
// ProTable()
@ -326,6 +325,7 @@ const getTableList = (params: any) => {
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
newParams.month = currentData.value.year + "-" + month;
}
changeThead(newParams.month.substring(5));
if (initParam.engineeringSn) {
newParams.engineeringSn = initParam.engineeringSn;
} else {
@ -333,7 +333,16 @@ const getTableList = (params: any) => {
}
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) => {
if (index === 1) {
title.value = "新增角色";
@ -386,10 +395,6 @@ const deleteAccount = async (params: jxj_User.ResUserList) => {
proTable.value.getTableList();
};
const changeTreeFilter = () => {
console.log(11);
};
const getengineering = async () => {
// let newParams = JSON.parse(JSON.stringify(params));
const res = await getRelevanceList();
@ -410,7 +415,6 @@ onMounted(() => {
onBeforeMount(() => {
currentData.value = useTime();
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++) {
monthColumns.push({
prop: "day" + (i + 1),

View File

@ -228,10 +228,6 @@
<span class="errorCircle" v-else></span>
</template>
</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>
<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 type { FormInstance } from "element-plus";
import { unitPageList, classGroupList, memberCountData, memberPageList, attendancePageList } from "@/api/modules/goverment";
import dayjs from "dayjs";
const typeOptions = ref([
{ label: "管理", value: 1 },
{ label: "工人", value: 2 }
@ -298,7 +295,7 @@ const classGroupData = ref([]);
const memberCountInfo = ref({});
const memberListData = ref([]);
const attendanceListData = ref([]);
const monthColumns: any = [];
const monthColumns = ref<any>([]);
const visible1 = ref(false);
const emits = defineEmits(["update:detailsDialog", "confirm"]);
const ruleFormRef = ref<FormInstance>();
@ -306,13 +303,20 @@ const form = ref({});
//
const getAttendanceCountList = async () => {
console.log(form.value);
monthColumns.value = [];
let requestData = {
current: pageable.value.pageNo,
size: pageable.value.pageSize,
engineeringSn: form.value.engineeringSn,
...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);
if (result && result.records) {
attendanceListData.value = result.records;
@ -409,7 +413,7 @@ const handleClick = (tab: any, event: any) => {
} else if (val == "fourth") {
attendaceSearch.value = {
personType: null,
month: ""
month: dayjs(new Date()).format("YYYY-MM")
};
attendanceListData.value = [];
getAttendanceCountList();
@ -459,7 +463,7 @@ watch(
onBeforeMount(() => {
for (let i = 0; i < 31; i++) {
monthColumns.push({
monthColumns.value.push({
prop: "day" + (i + 1),
label: "" + (i + 1)
});

View File

@ -33,7 +33,7 @@ const projectNumber = async () => {
<style lang="scss" scoped>
.ordersizeCenter {
position: fixed;
top: 15%;
top: 10%;
left: 50%;
display: flex;
justify-content: space-evenly;

View File

@ -72,8 +72,9 @@ const goBack = () => {
font-family: SourceHanSansCNR;
font-size: 12px;
background-image: -webkit-linear-gradient(bottom, #4b5e84, #ffffff);
background-clip: text;
-webkit-text-fill-color: transparent;
color: #d5d8df;
// background-clip: text;
// -webkit-text-fill-color: transparent;
}
.img {
margin-left: 5px;

View File

@ -187,7 +187,7 @@ const conmpanyList = async () => {
<style lang="scss" scoped>
.leftBorder {
position: fixed;
top: 15%;
top: 10%;
left: 0;
width: 25%;
height: 100%;

View File

@ -659,7 +659,7 @@ const pieOption = (val: ResponseSame<ScreenResponse.FugitiveDustAllResponse> | u
<style lang="scss" scoped>
.leftBorder {
position: fixed;
top: 15%;
top: 10%;
right: 0;
width: 27%;
height: 100%;

View File

@ -1,6 +1,18 @@
<template>
<!-- <ScaleBox :width="width" :height="height" bgc="transparent" :delay="100" style="top: 0; left: 0"> -->
<div class="orderBgc">
<ScaleBox :width="width" :height="height" bgc="transparent" :delay="50" v-if="!isFull">
<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> -->
<Map2D class="mapStyle"></Map2D>
<headerScreen class="topHeader"></headerScreen>
@ -11,7 +23,6 @@
</div>
<div class="borderBottom"></div>
</div>
<!-- </ScaleBox> -->
</template>
<script lang="ts" setup>
@ -23,12 +34,28 @@ import rightScreen from "./components/right.vue";
import Map3D from "./components/map3D.vue";
import Map2D from "./components/map2D.vue";
import ScaleBox from "vue3-scale-box";
// const width = ref(0);
// const height = ref(0);
// onMounted(() => {
// width.value = window.screen.width * window.devicePixelRatio;
// height.value = window.screen.height * window.devicePixelRatio;
// });
const width = ref(0);
const height = ref(0);
const isFull = ref(true);
onMounted(() => {
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>
<style lang="scss" scoped>
@ -40,7 +67,7 @@ import ScaleBox from "vue3-scale-box";
}
.topHeader {
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%));
}
@ -49,16 +76,13 @@ import ScaleBox from "vue3-scale-box";
width: 100%;
height: 79%;
.leftScreen {
flex: 2.5;
height: 100%;
height: 90%;
}
.centerScreen {
flex: 5;
height: 100px;
}
.rightScreen {
flex: 2.5;
height: 100%;
height: 90%;
}
}
.borderBottom {

View File

@ -326,6 +326,7 @@ const getTableList = (params: any) => {
let month = currentData.value.month < 10 ? "0" + currentData.value.month : currentData.value.month;
newParams.month = currentData.value.year + "-" + month;
}
changeThead(newParams.month.substring(5));
if (searchSn.value) {
if (activeValue.value == "eng") {
newParams.engineeringSn = searchSn.value;
@ -337,7 +338,16 @@ const getTableList = (params: any) => {
}
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) => {
if (index === 1) {
title.value = "新增角色";
@ -390,10 +400,6 @@ const deleteAccount = async (params: jxj_User.ResUserList) => {
proTable.value.getTableList();
};
const changeTreeFilter = () => {
console.log(11);
};
// tab
const tabsSelect = val => {
activeValue.value = val;
@ -439,7 +445,7 @@ onMounted(() => {
onBeforeMount(() => {
currentData.value = useTime();
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({
prop: "day" + (i + 1),
label: "" + (i + 1)