diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index a7a0ccf..fab17c3 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -95,11 +95,13 @@ data.value.createUserId = userStore.id data.value.createUserName = userStore.name // 获取当前用户所在单位 - getUserDept().then((res) => { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index a7a0ccf..fab17c3 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -95,11 +95,13 @@ data.value.createUserId = userStore.id data.value.createUserName = userStore.name // 获取当前用户所在单位 - getUserDept().then((res) => { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/MeasurementBusiness/review/components/edit.vue b/src/views/tested/MeasurementBusiness/review/components/edit.vue index 2c2f7cf..61b02df 100644 --- a/src/views/tested/MeasurementBusiness/review/components/edit.vue +++ b/src/views/tested/MeasurementBusiness/review/components/edit.vue @@ -1,6 +1,6 @@ diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index a7a0ccf..fab17c3 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -95,11 +95,13 @@ data.value.createUserId = userStore.id data.value.createUserName = userStore.name // 获取当前用户所在单位 - getUserDept().then((res) => { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/MeasurementBusiness/review/components/edit.vue b/src/views/tested/MeasurementBusiness/review/components/edit.vue index 2c2f7cf..61b02df 100644 --- a/src/views/tested/MeasurementBusiness/review/components/edit.vue +++ b/src/views/tested/MeasurementBusiness/review/components/edit.vue @@ -1,6 +1,6 @@ diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index b2db5c9..bd278e2 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -33,7 +33,6 @@ blockHeight.value = bodyHeight > 610 ? (bodyHeight) / 3 : 300 smallBlockHeight.value = bodyHeight > 610 ? (bodyHeight) / 4 : 215 blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 - console.log(blockHeight.value, blockWidth.value - 20) benchDivHeight.value = blockHeight.value - 60 } // -----------------------------------日历-------------------------------------------- @@ -69,8 +68,6 @@ timeObj[item] = [] }) getCalendarList(paramas).then((res) => { - console.log(res.data, '日历') - console.log(timeObj, 'timeObj') redCircleData.value = res.data.forEach((item: any) => { for (const i in timeObj) { if (i === item.markDate) { @@ -103,7 +100,6 @@ }, ) .then(() => { - console.log(selectDateRecord.value) for (const i in redCircleData.value) { if (selectDateRecord.value === i && redCircleData.value[i].length) { delSchedule({ id: redCircleData.value[i][0].id }).then((res) => { @@ -134,7 +130,6 @@ const fetchMeasureDetail = () => { measureDetailLoading.value = true getMeasureDetail().then((res) => { - console.log(res.data, 'aaa') measureDetailMonthCount.value = res.data.yearToCheck measureDetailYearCount.value = res.data.yearChecked }) @@ -182,13 +177,11 @@ const fecthDeviceDetail = (id: string) => { // 获取设备类型 getDeviceType({ deptIds: id }).then((res) => { - console.log(res.data, '设备类型') TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { - console.log(res.data, '设备状态') StatusData.value = res.data.map((item: any) => { return { name: item.name, @@ -198,7 +191,6 @@ }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { - console.log(res.data, '设备分类') ClassifyData.value = res.data.map((item: any) => { return { name: item.name, @@ -286,9 +278,8 @@ const scrollTable = ref() const scrolltimer = ref() // 设置自动滚动 -const autoScroll = (stop: boolean) => { +const autoScroll = (stop: boolean, list: any[]) => { const table = scrollTable.value - console.log(table, 'tabletabletable') // 拿到表格中承载数据的div元素 const divData = table?.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0] @@ -299,18 +290,23 @@ scrolltimer.value = null } else { - scrolltimer.value = window.setInterval(() => { + if (list.length < 5 && stop) { + return + } + if (divData) { + scrolltimer.value = window.setInterval(() => { // divData.style.transition = 'all 1s' // 元素自增距离顶部1像素 - divData.scrollTop += 1 - // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) - if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { + divData.scrollTop += 1 + // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) + if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { // 重置table距离顶部距离 - divData.scrollTop = 0 + divData.scrollTop = 0 // 重置table距离顶部距离。值=(滚动到底部时,距离顶部的大小) - 整个高度/2 // divData.scrollTop = divData.scrollTop - divData.scrollHeight / 2 - } - }, 100) // 滚动速度 + } + }, 100) // 滚动速度 + } } } // 设备态势分析-在检 @@ -348,7 +344,6 @@ const fecthDeviceStatus = (id: string) => { // 在检设备 inCheckInfo({ deptIds: id }).then((res) => { - console.log(res.data, '在检设备') const data = res.data // 设备态势分析 inCheckStatisticData.value = data.statistic.map((item: any) => ({ name: item.name, value: item.count })) @@ -467,15 +462,15 @@ const day = dayjs(calendarValue.value).format('YYYY-MM') clickDate(day) }) - autoScroll(false) + autoScroll(false, []) // ------------------------------------------------------------------------------ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }) + }, 500) }) onBeforeUnmount(() => { - autoScroll(true) + autoScroll(true, []) }) @@ -655,8 +650,8 @@ header-row-class-name="bench-table-header" row-class-name="bench-table-row" class="bench-table" - @mouseenter="autoScroll(true)" - @mouseleave="autoScroll(false)" + @mouseenter="autoScroll(true, [])" + @mouseleave="autoScroll(false, inCheckTable)" > { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/MeasurementBusiness/review/components/edit.vue b/src/views/tested/MeasurementBusiness/review/components/edit.vue index 2c2f7cf..61b02df 100644 --- a/src/views/tested/MeasurementBusiness/review/components/edit.vue +++ b/src/views/tested/MeasurementBusiness/review/components/edit.vue @@ -1,6 +1,6 @@ diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index b2db5c9..bd278e2 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -33,7 +33,6 @@ blockHeight.value = bodyHeight > 610 ? (bodyHeight) / 3 : 300 smallBlockHeight.value = bodyHeight > 610 ? (bodyHeight) / 4 : 215 blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 - console.log(blockHeight.value, blockWidth.value - 20) benchDivHeight.value = blockHeight.value - 60 } // -----------------------------------日历-------------------------------------------- @@ -69,8 +68,6 @@ timeObj[item] = [] }) getCalendarList(paramas).then((res) => { - console.log(res.data, '日历') - console.log(timeObj, 'timeObj') redCircleData.value = res.data.forEach((item: any) => { for (const i in timeObj) { if (i === item.markDate) { @@ -103,7 +100,6 @@ }, ) .then(() => { - console.log(selectDateRecord.value) for (const i in redCircleData.value) { if (selectDateRecord.value === i && redCircleData.value[i].length) { delSchedule({ id: redCircleData.value[i][0].id }).then((res) => { @@ -134,7 +130,6 @@ const fetchMeasureDetail = () => { measureDetailLoading.value = true getMeasureDetail().then((res) => { - console.log(res.data, 'aaa') measureDetailMonthCount.value = res.data.yearToCheck measureDetailYearCount.value = res.data.yearChecked }) @@ -182,13 +177,11 @@ const fecthDeviceDetail = (id: string) => { // 获取设备类型 getDeviceType({ deptIds: id }).then((res) => { - console.log(res.data, '设备类型') TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { - console.log(res.data, '设备状态') StatusData.value = res.data.map((item: any) => { return { name: item.name, @@ -198,7 +191,6 @@ }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { - console.log(res.data, '设备分类') ClassifyData.value = res.data.map((item: any) => { return { name: item.name, @@ -286,9 +278,8 @@ const scrollTable = ref() const scrolltimer = ref() // 设置自动滚动 -const autoScroll = (stop: boolean) => { +const autoScroll = (stop: boolean, list: any[]) => { const table = scrollTable.value - console.log(table, 'tabletabletable') // 拿到表格中承载数据的div元素 const divData = table?.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0] @@ -299,18 +290,23 @@ scrolltimer.value = null } else { - scrolltimer.value = window.setInterval(() => { + if (list.length < 5 && stop) { + return + } + if (divData) { + scrolltimer.value = window.setInterval(() => { // divData.style.transition = 'all 1s' // 元素自增距离顶部1像素 - divData.scrollTop += 1 - // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) - if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { + divData.scrollTop += 1 + // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) + if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { // 重置table距离顶部距离 - divData.scrollTop = 0 + divData.scrollTop = 0 // 重置table距离顶部距离。值=(滚动到底部时,距离顶部的大小) - 整个高度/2 // divData.scrollTop = divData.scrollTop - divData.scrollHeight / 2 - } - }, 100) // 滚动速度 + } + }, 100) // 滚动速度 + } } } // 设备态势分析-在检 @@ -348,7 +344,6 @@ const fecthDeviceStatus = (id: string) => { // 在检设备 inCheckInfo({ deptIds: id }).then((res) => { - console.log(res.data, '在检设备') const data = res.data // 设备态势分析 inCheckStatisticData.value = data.statistic.map((item: any) => ({ name: item.name, value: item.count })) @@ -467,15 +462,15 @@ const day = dayjs(calendarValue.value).format('YYYY-MM') clickDate(day) }) - autoScroll(false) + autoScroll(false, []) // ------------------------------------------------------------------------------ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }) + }, 500) }) onBeforeUnmount(() => { - autoScroll(true) + autoScroll(true, []) }) @@ -655,8 +650,8 @@ header-row-class-name="bench-table-header" row-class-name="bench-table-row" class="bench-table" - @mouseenter="autoScroll(true)" - @mouseleave="autoScroll(false)" + @mouseenter="autoScroll(true, [])" + @mouseleave="autoScroll(false, inCheckTable)" > { - ruleForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // }) } else { console.log($route.query.row, 'data') diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index a7a0ccf..fab17c3 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -95,11 +95,13 @@ data.value.createUserId = userStore.id data.value.createUserName = userStore.name // 获取当前用户所在单位 - getUserDept().then((res) => { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/MeasurementBusiness/review/components/edit.vue b/src/views/tested/MeasurementBusiness/review/components/edit.vue index 2c2f7cf..61b02df 100644 --- a/src/views/tested/MeasurementBusiness/review/components/edit.vue +++ b/src/views/tested/MeasurementBusiness/review/components/edit.vue @@ -1,6 +1,6 @@ diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index b2db5c9..bd278e2 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -33,7 +33,6 @@ blockHeight.value = bodyHeight > 610 ? (bodyHeight) / 3 : 300 smallBlockHeight.value = bodyHeight > 610 ? (bodyHeight) / 4 : 215 blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 - console.log(blockHeight.value, blockWidth.value - 20) benchDivHeight.value = blockHeight.value - 60 } // -----------------------------------日历-------------------------------------------- @@ -69,8 +68,6 @@ timeObj[item] = [] }) getCalendarList(paramas).then((res) => { - console.log(res.data, '日历') - console.log(timeObj, 'timeObj') redCircleData.value = res.data.forEach((item: any) => { for (const i in timeObj) { if (i === item.markDate) { @@ -103,7 +100,6 @@ }, ) .then(() => { - console.log(selectDateRecord.value) for (const i in redCircleData.value) { if (selectDateRecord.value === i && redCircleData.value[i].length) { delSchedule({ id: redCircleData.value[i][0].id }).then((res) => { @@ -134,7 +130,6 @@ const fetchMeasureDetail = () => { measureDetailLoading.value = true getMeasureDetail().then((res) => { - console.log(res.data, 'aaa') measureDetailMonthCount.value = res.data.yearToCheck measureDetailYearCount.value = res.data.yearChecked }) @@ -182,13 +177,11 @@ const fecthDeviceDetail = (id: string) => { // 获取设备类型 getDeviceType({ deptIds: id }).then((res) => { - console.log(res.data, '设备类型') TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { - console.log(res.data, '设备状态') StatusData.value = res.data.map((item: any) => { return { name: item.name, @@ -198,7 +191,6 @@ }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { - console.log(res.data, '设备分类') ClassifyData.value = res.data.map((item: any) => { return { name: item.name, @@ -286,9 +278,8 @@ const scrollTable = ref() const scrolltimer = ref() // 设置自动滚动 -const autoScroll = (stop: boolean) => { +const autoScroll = (stop: boolean, list: any[]) => { const table = scrollTable.value - console.log(table, 'tabletabletable') // 拿到表格中承载数据的div元素 const divData = table?.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0] @@ -299,18 +290,23 @@ scrolltimer.value = null } else { - scrolltimer.value = window.setInterval(() => { + if (list.length < 5 && stop) { + return + } + if (divData) { + scrolltimer.value = window.setInterval(() => { // divData.style.transition = 'all 1s' // 元素自增距离顶部1像素 - divData.scrollTop += 1 - // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) - if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { + divData.scrollTop += 1 + // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) + if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { // 重置table距离顶部距离 - divData.scrollTop = 0 + divData.scrollTop = 0 // 重置table距离顶部距离。值=(滚动到底部时,距离顶部的大小) - 整个高度/2 // divData.scrollTop = divData.scrollTop - divData.scrollHeight / 2 - } - }, 100) // 滚动速度 + } + }, 100) // 滚动速度 + } } } // 设备态势分析-在检 @@ -348,7 +344,6 @@ const fecthDeviceStatus = (id: string) => { // 在检设备 inCheckInfo({ deptIds: id }).then((res) => { - console.log(res.data, '在检设备') const data = res.data // 设备态势分析 inCheckStatisticData.value = data.statistic.map((item: any) => ({ name: item.name, value: item.count })) @@ -467,15 +462,15 @@ const day = dayjs(calendarValue.value).format('YYYY-MM') clickDate(day) }) - autoScroll(false) + autoScroll(false, []) // ------------------------------------------------------------------------------ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }) + }, 500) }) onBeforeUnmount(() => { - autoScroll(true) + autoScroll(true, []) }) @@ -655,8 +650,8 @@ header-row-class-name="bench-table-header" row-class-name="bench-table-row" class="bench-table" - @mouseenter="autoScroll(true)" - @mouseleave="autoScroll(false)" + @mouseenter="autoScroll(true, [])" + @mouseleave="autoScroll(false, inCheckTable)" > { - ruleForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // }) } else { console.log($route.query.row, 'data') diff --git a/src/views/tested/device/task/addDialog.vue b/src/views/tested/device/task/addDialog.vue index e853254..5c146b4 100644 --- a/src/views/tested/device/task/addDialog.vue +++ b/src/views/tested/device/task/addDialog.vue @@ -97,10 +97,11 @@ ruleFormRef.value?.clearValidate() }) userForm.value.createUserId = userStore.id + userForm.value.createDeptId = userStore.deptId userForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 - getUserDept().then((res) => { - userForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // userForm.value.createDeptId = res.data.id + // }) } else if (dialogStatus.value === 'update') { // 如果是修改,将row中数据填写到输入框中 userForm.value = JSON.parse(JSON.stringify(row)) diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index a7a0ccf..fab17c3 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -95,11 +95,13 @@ data.value.createUserId = userStore.id data.value.createUserName = userStore.name // 获取当前用户所在单位 - getUserDept().then((res) => { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/MeasurementBusiness/review/components/edit.vue b/src/views/tested/MeasurementBusiness/review/components/edit.vue index 2c2f7cf..61b02df 100644 --- a/src/views/tested/MeasurementBusiness/review/components/edit.vue +++ b/src/views/tested/MeasurementBusiness/review/components/edit.vue @@ -1,6 +1,6 @@ diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index b2db5c9..bd278e2 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -33,7 +33,6 @@ blockHeight.value = bodyHeight > 610 ? (bodyHeight) / 3 : 300 smallBlockHeight.value = bodyHeight > 610 ? (bodyHeight) / 4 : 215 blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 - console.log(blockHeight.value, blockWidth.value - 20) benchDivHeight.value = blockHeight.value - 60 } // -----------------------------------日历-------------------------------------------- @@ -69,8 +68,6 @@ timeObj[item] = [] }) getCalendarList(paramas).then((res) => { - console.log(res.data, '日历') - console.log(timeObj, 'timeObj') redCircleData.value = res.data.forEach((item: any) => { for (const i in timeObj) { if (i === item.markDate) { @@ -103,7 +100,6 @@ }, ) .then(() => { - console.log(selectDateRecord.value) for (const i in redCircleData.value) { if (selectDateRecord.value === i && redCircleData.value[i].length) { delSchedule({ id: redCircleData.value[i][0].id }).then((res) => { @@ -134,7 +130,6 @@ const fetchMeasureDetail = () => { measureDetailLoading.value = true getMeasureDetail().then((res) => { - console.log(res.data, 'aaa') measureDetailMonthCount.value = res.data.yearToCheck measureDetailYearCount.value = res.data.yearChecked }) @@ -182,13 +177,11 @@ const fecthDeviceDetail = (id: string) => { // 获取设备类型 getDeviceType({ deptIds: id }).then((res) => { - console.log(res.data, '设备类型') TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { - console.log(res.data, '设备状态') StatusData.value = res.data.map((item: any) => { return { name: item.name, @@ -198,7 +191,6 @@ }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { - console.log(res.data, '设备分类') ClassifyData.value = res.data.map((item: any) => { return { name: item.name, @@ -286,9 +278,8 @@ const scrollTable = ref() const scrolltimer = ref() // 设置自动滚动 -const autoScroll = (stop: boolean) => { +const autoScroll = (stop: boolean, list: any[]) => { const table = scrollTable.value - console.log(table, 'tabletabletable') // 拿到表格中承载数据的div元素 const divData = table?.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0] @@ -299,18 +290,23 @@ scrolltimer.value = null } else { - scrolltimer.value = window.setInterval(() => { + if (list.length < 5 && stop) { + return + } + if (divData) { + scrolltimer.value = window.setInterval(() => { // divData.style.transition = 'all 1s' // 元素自增距离顶部1像素 - divData.scrollTop += 1 - // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) - if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { + divData.scrollTop += 1 + // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) + if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { // 重置table距离顶部距离 - divData.scrollTop = 0 + divData.scrollTop = 0 // 重置table距离顶部距离。值=(滚动到底部时,距离顶部的大小) - 整个高度/2 // divData.scrollTop = divData.scrollTop - divData.scrollHeight / 2 - } - }, 100) // 滚动速度 + } + }, 100) // 滚动速度 + } } } // 设备态势分析-在检 @@ -348,7 +344,6 @@ const fecthDeviceStatus = (id: string) => { // 在检设备 inCheckInfo({ deptIds: id }).then((res) => { - console.log(res.data, '在检设备') const data = res.data // 设备态势分析 inCheckStatisticData.value = data.statistic.map((item: any) => ({ name: item.name, value: item.count })) @@ -467,15 +462,15 @@ const day = dayjs(calendarValue.value).format('YYYY-MM') clickDate(day) }) - autoScroll(false) + autoScroll(false, []) // ------------------------------------------------------------------------------ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }) + }, 500) }) onBeforeUnmount(() => { - autoScroll(true) + autoScroll(true, []) }) @@ -655,8 +650,8 @@ header-row-class-name="bench-table-header" row-class-name="bench-table-row" class="bench-table" - @mouseenter="autoScroll(true)" - @mouseleave="autoScroll(false)" + @mouseenter="autoScroll(true, [])" + @mouseleave="autoScroll(false, inCheckTable)" > { - ruleForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // }) } else { console.log($route.query.row, 'data') diff --git a/src/views/tested/device/task/addDialog.vue b/src/views/tested/device/task/addDialog.vue index e853254..5c146b4 100644 --- a/src/views/tested/device/task/addDialog.vue +++ b/src/views/tested/device/task/addDialog.vue @@ -97,10 +97,11 @@ ruleFormRef.value?.clearValidate() }) userForm.value.createUserId = userStore.id + userForm.value.createDeptId = userStore.deptId userForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 - getUserDept().then((res) => { - userForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // userForm.value.createDeptId = res.data.id + // }) } else if (dialogStatus.value === 'update') { // 如果是修改,将row中数据填写到输入框中 userForm.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/subpackage/certificate/components/edit.vue b/src/views/tested/subpackage/certificate/components/edit.vue index 560be02..add6cf0 100644 --- a/src/views/tested/subpackage/certificate/components/edit.vue +++ b/src/views/tested/subpackage/certificate/components/edit.vue @@ -70,11 +70,13 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName // 获取当前用户所在单位 - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index a7a0ccf..fab17c3 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -95,11 +95,13 @@ data.value.createUserId = userStore.id data.value.createUserName = userStore.name // 获取当前用户所在单位 - getUserDept().then((res) => { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/MeasurementBusiness/review/components/edit.vue b/src/views/tested/MeasurementBusiness/review/components/edit.vue index 2c2f7cf..61b02df 100644 --- a/src/views/tested/MeasurementBusiness/review/components/edit.vue +++ b/src/views/tested/MeasurementBusiness/review/components/edit.vue @@ -1,6 +1,6 @@ diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index b2db5c9..bd278e2 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -33,7 +33,6 @@ blockHeight.value = bodyHeight > 610 ? (bodyHeight) / 3 : 300 smallBlockHeight.value = bodyHeight > 610 ? (bodyHeight) / 4 : 215 blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 - console.log(blockHeight.value, blockWidth.value - 20) benchDivHeight.value = blockHeight.value - 60 } // -----------------------------------日历-------------------------------------------- @@ -69,8 +68,6 @@ timeObj[item] = [] }) getCalendarList(paramas).then((res) => { - console.log(res.data, '日历') - console.log(timeObj, 'timeObj') redCircleData.value = res.data.forEach((item: any) => { for (const i in timeObj) { if (i === item.markDate) { @@ -103,7 +100,6 @@ }, ) .then(() => { - console.log(selectDateRecord.value) for (const i in redCircleData.value) { if (selectDateRecord.value === i && redCircleData.value[i].length) { delSchedule({ id: redCircleData.value[i][0].id }).then((res) => { @@ -134,7 +130,6 @@ const fetchMeasureDetail = () => { measureDetailLoading.value = true getMeasureDetail().then((res) => { - console.log(res.data, 'aaa') measureDetailMonthCount.value = res.data.yearToCheck measureDetailYearCount.value = res.data.yearChecked }) @@ -182,13 +177,11 @@ const fecthDeviceDetail = (id: string) => { // 获取设备类型 getDeviceType({ deptIds: id }).then((res) => { - console.log(res.data, '设备类型') TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { - console.log(res.data, '设备状态') StatusData.value = res.data.map((item: any) => { return { name: item.name, @@ -198,7 +191,6 @@ }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { - console.log(res.data, '设备分类') ClassifyData.value = res.data.map((item: any) => { return { name: item.name, @@ -286,9 +278,8 @@ const scrollTable = ref() const scrolltimer = ref() // 设置自动滚动 -const autoScroll = (stop: boolean) => { +const autoScroll = (stop: boolean, list: any[]) => { const table = scrollTable.value - console.log(table, 'tabletabletable') // 拿到表格中承载数据的div元素 const divData = table?.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0] @@ -299,18 +290,23 @@ scrolltimer.value = null } else { - scrolltimer.value = window.setInterval(() => { + if (list.length < 5 && stop) { + return + } + if (divData) { + scrolltimer.value = window.setInterval(() => { // divData.style.transition = 'all 1s' // 元素自增距离顶部1像素 - divData.scrollTop += 1 - // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) - if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { + divData.scrollTop += 1 + // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) + if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { // 重置table距离顶部距离 - divData.scrollTop = 0 + divData.scrollTop = 0 // 重置table距离顶部距离。值=(滚动到底部时,距离顶部的大小) - 整个高度/2 // divData.scrollTop = divData.scrollTop - divData.scrollHeight / 2 - } - }, 100) // 滚动速度 + } + }, 100) // 滚动速度 + } } } // 设备态势分析-在检 @@ -348,7 +344,6 @@ const fecthDeviceStatus = (id: string) => { // 在检设备 inCheckInfo({ deptIds: id }).then((res) => { - console.log(res.data, '在检设备') const data = res.data // 设备态势分析 inCheckStatisticData.value = data.statistic.map((item: any) => ({ name: item.name, value: item.count })) @@ -467,15 +462,15 @@ const day = dayjs(calendarValue.value).format('YYYY-MM') clickDate(day) }) - autoScroll(false) + autoScroll(false, []) // ------------------------------------------------------------------------------ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }) + }, 500) }) onBeforeUnmount(() => { - autoScroll(true) + autoScroll(true, []) }) @@ -655,8 +650,8 @@ header-row-class-name="bench-table-header" row-class-name="bench-table-row" class="bench-table" - @mouseenter="autoScroll(true)" - @mouseleave="autoScroll(false)" + @mouseenter="autoScroll(true, [])" + @mouseleave="autoScroll(false, inCheckTable)" > { - ruleForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // }) } else { console.log($route.query.row, 'data') diff --git a/src/views/tested/device/task/addDialog.vue b/src/views/tested/device/task/addDialog.vue index e853254..5c146b4 100644 --- a/src/views/tested/device/task/addDialog.vue +++ b/src/views/tested/device/task/addDialog.vue @@ -97,10 +97,11 @@ ruleFormRef.value?.clearValidate() }) userForm.value.createUserId = userStore.id + userForm.value.createDeptId = userStore.deptId userForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 - getUserDept().then((res) => { - userForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // userForm.value.createDeptId = res.data.id + // }) } else if (dialogStatus.value === 'update') { // 如果是修改,将row中数据填写到输入框中 userForm.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/subpackage/certificate/components/edit.vue b/src/views/tested/subpackage/certificate/components/edit.vue index 560be02..add6cf0 100644 --- a/src/views/tested/subpackage/certificate/components/edit.vue +++ b/src/views/tested/subpackage/certificate/components/edit.vue @@ -70,11 +70,13 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName // 获取当前用户所在单位 - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/src/views/tested/subpackage/directory/components/edit.vue b/src/views/tested/subpackage/directory/components/edit.vue index 3f29c46..af0fc44 100644 --- a/src/views/tested/subpackage/directory/components/edit.vue +++ b/src/views/tested/subpackage/directory/components/edit.vue @@ -200,10 +200,12 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index a7a0ccf..fab17c3 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -95,11 +95,13 @@ data.value.createUserId = userStore.id data.value.createUserName = userStore.name // 获取当前用户所在单位 - getUserDept().then((res) => { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/MeasurementBusiness/review/components/edit.vue b/src/views/tested/MeasurementBusiness/review/components/edit.vue index 2c2f7cf..61b02df 100644 --- a/src/views/tested/MeasurementBusiness/review/components/edit.vue +++ b/src/views/tested/MeasurementBusiness/review/components/edit.vue @@ -1,6 +1,6 @@ diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index b2db5c9..bd278e2 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -33,7 +33,6 @@ blockHeight.value = bodyHeight > 610 ? (bodyHeight) / 3 : 300 smallBlockHeight.value = bodyHeight > 610 ? (bodyHeight) / 4 : 215 blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 - console.log(blockHeight.value, blockWidth.value - 20) benchDivHeight.value = blockHeight.value - 60 } // -----------------------------------日历-------------------------------------------- @@ -69,8 +68,6 @@ timeObj[item] = [] }) getCalendarList(paramas).then((res) => { - console.log(res.data, '日历') - console.log(timeObj, 'timeObj') redCircleData.value = res.data.forEach((item: any) => { for (const i in timeObj) { if (i === item.markDate) { @@ -103,7 +100,6 @@ }, ) .then(() => { - console.log(selectDateRecord.value) for (const i in redCircleData.value) { if (selectDateRecord.value === i && redCircleData.value[i].length) { delSchedule({ id: redCircleData.value[i][0].id }).then((res) => { @@ -134,7 +130,6 @@ const fetchMeasureDetail = () => { measureDetailLoading.value = true getMeasureDetail().then((res) => { - console.log(res.data, 'aaa') measureDetailMonthCount.value = res.data.yearToCheck measureDetailYearCount.value = res.data.yearChecked }) @@ -182,13 +177,11 @@ const fecthDeviceDetail = (id: string) => { // 获取设备类型 getDeviceType({ deptIds: id }).then((res) => { - console.log(res.data, '设备类型') TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { - console.log(res.data, '设备状态') StatusData.value = res.data.map((item: any) => { return { name: item.name, @@ -198,7 +191,6 @@ }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { - console.log(res.data, '设备分类') ClassifyData.value = res.data.map((item: any) => { return { name: item.name, @@ -286,9 +278,8 @@ const scrollTable = ref() const scrolltimer = ref() // 设置自动滚动 -const autoScroll = (stop: boolean) => { +const autoScroll = (stop: boolean, list: any[]) => { const table = scrollTable.value - console.log(table, 'tabletabletable') // 拿到表格中承载数据的div元素 const divData = table?.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0] @@ -299,18 +290,23 @@ scrolltimer.value = null } else { - scrolltimer.value = window.setInterval(() => { + if (list.length < 5 && stop) { + return + } + if (divData) { + scrolltimer.value = window.setInterval(() => { // divData.style.transition = 'all 1s' // 元素自增距离顶部1像素 - divData.scrollTop += 1 - // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) - if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { + divData.scrollTop += 1 + // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) + if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { // 重置table距离顶部距离 - divData.scrollTop = 0 + divData.scrollTop = 0 // 重置table距离顶部距离。值=(滚动到底部时,距离顶部的大小) - 整个高度/2 // divData.scrollTop = divData.scrollTop - divData.scrollHeight / 2 - } - }, 100) // 滚动速度 + } + }, 100) // 滚动速度 + } } } // 设备态势分析-在检 @@ -348,7 +344,6 @@ const fecthDeviceStatus = (id: string) => { // 在检设备 inCheckInfo({ deptIds: id }).then((res) => { - console.log(res.data, '在检设备') const data = res.data // 设备态势分析 inCheckStatisticData.value = data.statistic.map((item: any) => ({ name: item.name, value: item.count })) @@ -467,15 +462,15 @@ const day = dayjs(calendarValue.value).format('YYYY-MM') clickDate(day) }) - autoScroll(false) + autoScroll(false, []) // ------------------------------------------------------------------------------ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }) + }, 500) }) onBeforeUnmount(() => { - autoScroll(true) + autoScroll(true, []) }) @@ -655,8 +650,8 @@ header-row-class-name="bench-table-header" row-class-name="bench-table-row" class="bench-table" - @mouseenter="autoScroll(true)" - @mouseleave="autoScroll(false)" + @mouseenter="autoScroll(true, [])" + @mouseleave="autoScroll(false, inCheckTable)" > { - ruleForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // }) } else { console.log($route.query.row, 'data') diff --git a/src/views/tested/device/task/addDialog.vue b/src/views/tested/device/task/addDialog.vue index e853254..5c146b4 100644 --- a/src/views/tested/device/task/addDialog.vue +++ b/src/views/tested/device/task/addDialog.vue @@ -97,10 +97,11 @@ ruleFormRef.value?.clearValidate() }) userForm.value.createUserId = userStore.id + userForm.value.createDeptId = userStore.deptId userForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 - getUserDept().then((res) => { - userForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // userForm.value.createDeptId = res.data.id + // }) } else if (dialogStatus.value === 'update') { // 如果是修改,将row中数据填写到输入框中 userForm.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/subpackage/certificate/components/edit.vue b/src/views/tested/subpackage/certificate/components/edit.vue index 560be02..add6cf0 100644 --- a/src/views/tested/subpackage/certificate/components/edit.vue +++ b/src/views/tested/subpackage/certificate/components/edit.vue @@ -70,11 +70,13 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName // 获取当前用户所在单位 - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/src/views/tested/subpackage/directory/components/edit.vue b/src/views/tested/subpackage/directory/components/edit.vue index 3f29c46..af0fc44 100644 --- a/src/views/tested/subpackage/directory/components/edit.vue +++ b/src/views/tested/subpackage/directory/components/edit.vue @@ -200,10 +200,12 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/src/views/tested/subpackage/review/components/edit.vue b/src/views/tested/subpackage/review/components/edit.vue index 9294588..494a317 100644 --- a/src/views/tested/subpackage/review/components/edit.vue +++ b/src/views/tested/subpackage/review/components/edit.vue @@ -104,10 +104,12 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/.env.production b/.env.production index b413207..42e6649 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,8 @@ VITE_APP_TITLE = 计量信息系统 VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 +# VITE_APP_API_BASEURL = http://192.168.1.200:5909 +# VITE_METER_API_BASEURL = http://192.168.1.200:5910 VITE_APP_API_BASEURL = http://111.198.10.15:21611 VITE_METER_API_BASEURL = http://111.198.10.15:21606 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 diff --git a/public/config/config.json b/public/config/config.json index bed5355..4e81ae5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -20,5 +20,6 @@ "设备到期":"/info/detail", "计量计划":"/plan/detail", "合同通知":"/breviewpage/detail" + } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index a7a0ccf..fab17c3 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -95,11 +95,13 @@ data.value.createUserId = userStore.id data.value.createUserName = userStore.name // 获取当前用户所在单位 - getUserDept().then((res) => { - // fullName - data.value.createDeptId = res.data.id - data.value.createDeptName = res.data.fullName - }) + data.value.createDeptId = userStore.deptId + data.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // // fullName + // data.value.createDeptId = res.data.id + // data.value.createDeptName = res.data.fullName + // }) } else { data.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/MeasurementBusiness/review/components/edit.vue b/src/views/tested/MeasurementBusiness/review/components/edit.vue index 2c2f7cf..61b02df 100644 --- a/src/views/tested/MeasurementBusiness/review/components/edit.vue +++ b/src/views/tested/MeasurementBusiness/review/components/edit.vue @@ -1,6 +1,6 @@ diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index b2db5c9..bd278e2 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -33,7 +33,6 @@ blockHeight.value = bodyHeight > 610 ? (bodyHeight) / 3 : 300 smallBlockHeight.value = bodyHeight > 610 ? (bodyHeight) / 4 : 215 blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 - console.log(blockHeight.value, blockWidth.value - 20) benchDivHeight.value = blockHeight.value - 60 } // -----------------------------------日历-------------------------------------------- @@ -69,8 +68,6 @@ timeObj[item] = [] }) getCalendarList(paramas).then((res) => { - console.log(res.data, '日历') - console.log(timeObj, 'timeObj') redCircleData.value = res.data.forEach((item: any) => { for (const i in timeObj) { if (i === item.markDate) { @@ -103,7 +100,6 @@ }, ) .then(() => { - console.log(selectDateRecord.value) for (const i in redCircleData.value) { if (selectDateRecord.value === i && redCircleData.value[i].length) { delSchedule({ id: redCircleData.value[i][0].id }).then((res) => { @@ -134,7 +130,6 @@ const fetchMeasureDetail = () => { measureDetailLoading.value = true getMeasureDetail().then((res) => { - console.log(res.data, 'aaa') measureDetailMonthCount.value = res.data.yearToCheck measureDetailYearCount.value = res.data.yearChecked }) @@ -182,13 +177,11 @@ const fecthDeviceDetail = (id: string) => { // 获取设备类型 getDeviceType({ deptIds: id }).then((res) => { - console.log(res.data, '设备类型') TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { - console.log(res.data, '设备状态') StatusData.value = res.data.map((item: any) => { return { name: item.name, @@ -198,7 +191,6 @@ }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { - console.log(res.data, '设备分类') ClassifyData.value = res.data.map((item: any) => { return { name: item.name, @@ -286,9 +278,8 @@ const scrollTable = ref() const scrolltimer = ref() // 设置自动滚动 -const autoScroll = (stop: boolean) => { +const autoScroll = (stop: boolean, list: any[]) => { const table = scrollTable.value - console.log(table, 'tabletabletable') // 拿到表格中承载数据的div元素 const divData = table?.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0] @@ -299,18 +290,23 @@ scrolltimer.value = null } else { - scrolltimer.value = window.setInterval(() => { + if (list.length < 5 && stop) { + return + } + if (divData) { + scrolltimer.value = window.setInterval(() => { // divData.style.transition = 'all 1s' // 元素自增距离顶部1像素 - divData.scrollTop += 1 - // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) - if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { + divData.scrollTop += 1 + // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度) + if (divData.clientHeight + divData.scrollTop == divData.scrollHeight) { // 重置table距离顶部距离 - divData.scrollTop = 0 + divData.scrollTop = 0 // 重置table距离顶部距离。值=(滚动到底部时,距离顶部的大小) - 整个高度/2 // divData.scrollTop = divData.scrollTop - divData.scrollHeight / 2 - } - }, 100) // 滚动速度 + } + }, 100) // 滚动速度 + } } } // 设备态势分析-在检 @@ -348,7 +344,6 @@ const fecthDeviceStatus = (id: string) => { // 在检设备 inCheckInfo({ deptIds: id }).then((res) => { - console.log(res.data, '在检设备') const data = res.data // 设备态势分析 inCheckStatisticData.value = data.statistic.map((item: any) => ({ name: item.name, value: item.count })) @@ -467,15 +462,15 @@ const day = dayjs(calendarValue.value).format('YYYY-MM') clickDate(day) }) - autoScroll(false) + autoScroll(false, []) // ------------------------------------------------------------------------------ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }) + }, 500) }) onBeforeUnmount(() => { - autoScroll(true) + autoScroll(true, []) }) @@ -655,8 +650,8 @@ header-row-class-name="bench-table-header" row-class-name="bench-table-row" class="bench-table" - @mouseenter="autoScroll(true)" - @mouseleave="autoScroll(false)" + @mouseenter="autoScroll(true, [])" + @mouseleave="autoScroll(false, inCheckTable)" > { - ruleForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // }) } else { console.log($route.query.row, 'data') diff --git a/src/views/tested/device/task/addDialog.vue b/src/views/tested/device/task/addDialog.vue index e853254..5c146b4 100644 --- a/src/views/tested/device/task/addDialog.vue +++ b/src/views/tested/device/task/addDialog.vue @@ -97,10 +97,11 @@ ruleFormRef.value?.clearValidate() }) userForm.value.createUserId = userStore.id + userForm.value.createDeptId = userStore.deptId userForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 - getUserDept().then((res) => { - userForm.value.createDeptId = res.data.id - }) + // getUserDept().then((res) => { + // userForm.value.createDeptId = res.data.id + // }) } else if (dialogStatus.value === 'update') { // 如果是修改,将row中数据填写到输入框中 userForm.value = JSON.parse(JSON.stringify(row)) diff --git a/src/views/tested/subpackage/certificate/components/edit.vue b/src/views/tested/subpackage/certificate/components/edit.vue index 560be02..add6cf0 100644 --- a/src/views/tested/subpackage/certificate/components/edit.vue +++ b/src/views/tested/subpackage/certificate/components/edit.vue @@ -70,11 +70,13 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName // 获取当前用户所在单位 - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/src/views/tested/subpackage/directory/components/edit.vue b/src/views/tested/subpackage/directory/components/edit.vue index 3f29c46..af0fc44 100644 --- a/src/views/tested/subpackage/directory/components/edit.vue +++ b/src/views/tested/subpackage/directory/components/edit.vue @@ -200,10 +200,12 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/src/views/tested/subpackage/review/components/edit.vue b/src/views/tested/subpackage/review/components/edit.vue index 9294588..494a317 100644 --- a/src/views/tested/subpackage/review/components/edit.vue +++ b/src/views/tested/subpackage/review/components/edit.vue @@ -104,10 +104,12 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 ruleForm.value.createUserId = userStore.id ruleForm.value.createUserName = userStore.name - getUserDept().then((res) => { - ruleForm.value.createDeptId = res.data.id - ruleForm.value.createDeptName = res.data.fullName - }) + ruleForm.value.createDeptId = userStore.deptId + ruleForm.value.createDeptName = userStore.deptName + // getUserDept().then((res) => { + // ruleForm.value.createDeptId = res.data.id + // ruleForm.value.createDeptName = res.data.fullName + // }) } } onMounted(() => { diff --git a/vite.config.ts b/vite.config.ts index 17339bd..19c4b81 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -41,7 +41,7 @@ sourcemap: env.VITE_BUILD_SOURCEMAP === 'true', rollupOptions: { external: [ - 'pdfjs-dist', + // 'pdfjs-dist', ], }, },