diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index 1e1a0fc..f47f144 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -64,7 +64,7 @@ if (valid) { if (dialogStatus.value === '新建') { addRemind(data.value).then((res) => { - ElMessage.success('修改成功') + ElMessage.success('添加成功') dialogVisible.value = false emits('closeRefresh') }) diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index 1e1a0fc..f47f144 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -64,7 +64,7 @@ if (valid) { if (dialogStatus.value === '新建') { addRemind(data.value).then((res) => { - ElMessage.success('修改成功') + ElMessage.success('添加成功') dialogVisible.value = false emits('closeRefresh') }) diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index c4984bf..95d6051 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -149,24 +149,22 @@ } // 导出 const exportExcelBtn = () => { + if (!selectList.value.length) { + ElMessage.warning('请先选择需要导出的数据') + return + } const loading = ElLoading.service({ lock: true, text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - getNoticeeApi({ ...searchQuery, limit: 9999999, offset: 1 }).then((res) => { - if (res.code === 200) { - exportExcel({ - json: res.data.rows.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), - name: '通知公告', - titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], - sheetName: 'sheet1', - }) - } - loading.close() - }).catch((_) => { - loading.close() + exportExcel({ + json: selectList.value.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), + name: '通知公告', + titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], + sheetName: 'sheet1', }) + loading.close() } // 打印 function printList() { diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index 1e1a0fc..f47f144 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -64,7 +64,7 @@ if (valid) { if (dialogStatus.value === '新建') { addRemind(data.value).then((res) => { - ElMessage.success('修改成功') + ElMessage.success('添加成功') dialogVisible.value = false emits('closeRefresh') }) diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index c4984bf..95d6051 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -149,24 +149,22 @@ } // 导出 const exportExcelBtn = () => { + if (!selectList.value.length) { + ElMessage.warning('请先选择需要导出的数据') + return + } const loading = ElLoading.service({ lock: true, text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - getNoticeeApi({ ...searchQuery, limit: 9999999, offset: 1 }).then((res) => { - if (res.code === 200) { - exportExcel({ - json: res.data.rows.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), - name: '通知公告', - titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], - sheetName: 'sheet1', - }) - } - loading.close() - }).catch((_) => { - loading.close() + exportExcel({ + json: selectList.value.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), + name: '通知公告', + titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], + sheetName: 'sheet1', }) + loading.close() } // 打印 function printList() { diff --git a/src/views/tested/dashboard/components/BarChartVertical.vue b/src/views/tested/dashboard/components/BarChartVertical.vue index cb47761..9598215 100644 --- a/src/views/tested/dashboard/components/BarChartVertical.vue +++ b/src/views/tested/dashboard/components/BarChartVertical.vue @@ -316,7 +316,6 @@ // inside: true, // 刻度标签是否朝内,默认朝外 // margin: 6, // 刻度标签与轴线之间的距离 formatter: (value: string) => { - console.log(value, 'value') if (String(value).length > 6) { return `${String(value).substring(0, 5)}...` } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index 1e1a0fc..f47f144 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -64,7 +64,7 @@ if (valid) { if (dialogStatus.value === '新建') { addRemind(data.value).then((res) => { - ElMessage.success('修改成功') + ElMessage.success('添加成功') dialogVisible.value = false emits('closeRefresh') }) diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index c4984bf..95d6051 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -149,24 +149,22 @@ } // 导出 const exportExcelBtn = () => { + if (!selectList.value.length) { + ElMessage.warning('请先选择需要导出的数据') + return + } const loading = ElLoading.service({ lock: true, text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - getNoticeeApi({ ...searchQuery, limit: 9999999, offset: 1 }).then((res) => { - if (res.code === 200) { - exportExcel({ - json: res.data.rows.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), - name: '通知公告', - titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], - sheetName: 'sheet1', - }) - } - loading.close() - }).catch((_) => { - loading.close() + exportExcel({ + json: selectList.value.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), + name: '通知公告', + titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], + sheetName: 'sheet1', }) + loading.close() } // 打印 function printList() { diff --git a/src/views/tested/dashboard/components/BarChartVertical.vue b/src/views/tested/dashboard/components/BarChartVertical.vue index cb47761..9598215 100644 --- a/src/views/tested/dashboard/components/BarChartVertical.vue +++ b/src/views/tested/dashboard/components/BarChartVertical.vue @@ -316,7 +316,6 @@ // inside: true, // 刻度标签是否朝内,默认朝外 // margin: 6, // 刻度标签与轴线之间的距离 formatter: (value: string) => { - console.log(value, 'value') if (String(value).length > 6) { return `${String(value).substring(0, 5)}...` } diff --git a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue index 8713f07..e168b04 100644 --- a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue +++ b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue @@ -297,6 +297,11 @@ coordinateSystem: 'polar', label: { show: true, + textStyle: { + color: props.fontColor, + fontWeight: 'normal', + fontSize: 16, + }, position: 'middle', formatter: '{b}: {c}', }, @@ -394,7 +399,6 @@ function refreshChart() { if (chart) { const option = buildOption() - console.log(option, 'optionoption') chart.setOption(option as unknown as ECBasicOption, true) } } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index 1e1a0fc..f47f144 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -64,7 +64,7 @@ if (valid) { if (dialogStatus.value === '新建') { addRemind(data.value).then((res) => { - ElMessage.success('修改成功') + ElMessage.success('添加成功') dialogVisible.value = false emits('closeRefresh') }) diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index c4984bf..95d6051 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -149,24 +149,22 @@ } // 导出 const exportExcelBtn = () => { + if (!selectList.value.length) { + ElMessage.warning('请先选择需要导出的数据') + return + } const loading = ElLoading.service({ lock: true, text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - getNoticeeApi({ ...searchQuery, limit: 9999999, offset: 1 }).then((res) => { - if (res.code === 200) { - exportExcel({ - json: res.data.rows.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), - name: '通知公告', - titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], - sheetName: 'sheet1', - }) - } - loading.close() - }).catch((_) => { - loading.close() + exportExcel({ + json: selectList.value.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), + name: '通知公告', + titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], + sheetName: 'sheet1', }) + loading.close() } // 打印 function printList() { diff --git a/src/views/tested/dashboard/components/BarChartVertical.vue b/src/views/tested/dashboard/components/BarChartVertical.vue index cb47761..9598215 100644 --- a/src/views/tested/dashboard/components/BarChartVertical.vue +++ b/src/views/tested/dashboard/components/BarChartVertical.vue @@ -316,7 +316,6 @@ // inside: true, // 刻度标签是否朝内,默认朝外 // margin: 6, // 刻度标签与轴线之间的距离 formatter: (value: string) => { - console.log(value, 'value') if (String(value).length > 6) { return `${String(value).substring(0, 5)}...` } diff --git a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue index 8713f07..e168b04 100644 --- a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue +++ b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue @@ -297,6 +297,11 @@ coordinateSystem: 'polar', label: { show: true, + textStyle: { + color: props.fontColor, + fontWeight: 'normal', + fontSize: 16, + }, position: 'middle', formatter: '{b}: {c}', }, @@ -394,7 +399,6 @@ function refreshChart() { if (chart) { const option = buildOption() - console.log(option, 'optionoption') chart.setOption(option as unknown as ECBasicOption, true) } } diff --git a/src/views/tested/dashboard/components/editSchedule.vue b/src/views/tested/dashboard/components/editSchedule.vue index a237371..fb18edf 100644 --- a/src/views/tested/dashboard/components/editSchedule.vue +++ b/src/views/tested/dashboard/components/editSchedule.vue @@ -39,7 +39,6 @@ const clickConfirm = async (formEl: FormInstance | undefined) => { // 去掉空的日程 const resultArr = list.value.filter(item => item.scheduleMatters) - console.log(resultArr) if (!resultArr.length) { ElMessage.warning('要求至少有一个日程') return false diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index 1e1a0fc..f47f144 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -64,7 +64,7 @@ if (valid) { if (dialogStatus.value === '新建') { addRemind(data.value).then((res) => { - ElMessage.success('修改成功') + ElMessage.success('添加成功') dialogVisible.value = false emits('closeRefresh') }) diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index c4984bf..95d6051 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -149,24 +149,22 @@ } // 导出 const exportExcelBtn = () => { + if (!selectList.value.length) { + ElMessage.warning('请先选择需要导出的数据') + return + } const loading = ElLoading.service({ lock: true, text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - getNoticeeApi({ ...searchQuery, limit: 9999999, offset: 1 }).then((res) => { - if (res.code === 200) { - exportExcel({ - json: res.data.rows.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), - name: '通知公告', - titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], - sheetName: 'sheet1', - }) - } - loading.close() - }).catch((_) => { - loading.close() + exportExcel({ + json: selectList.value.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), + name: '通知公告', + titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], + sheetName: 'sheet1', }) + loading.close() } // 打印 function printList() { diff --git a/src/views/tested/dashboard/components/BarChartVertical.vue b/src/views/tested/dashboard/components/BarChartVertical.vue index cb47761..9598215 100644 --- a/src/views/tested/dashboard/components/BarChartVertical.vue +++ b/src/views/tested/dashboard/components/BarChartVertical.vue @@ -316,7 +316,6 @@ // inside: true, // 刻度标签是否朝内,默认朝外 // margin: 6, // 刻度标签与轴线之间的距离 formatter: (value: string) => { - console.log(value, 'value') if (String(value).length > 6) { return `${String(value).substring(0, 5)}...` } diff --git a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue index 8713f07..e168b04 100644 --- a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue +++ b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue @@ -297,6 +297,11 @@ coordinateSystem: 'polar', label: { show: true, + textStyle: { + color: props.fontColor, + fontWeight: 'normal', + fontSize: 16, + }, position: 'middle', formatter: '{b}: {c}', }, @@ -394,7 +399,6 @@ function refreshChart() { if (chart) { const option = buildOption() - console.log(option, 'optionoption') chart.setOption(option as unknown as ECBasicOption, true) } } diff --git a/src/views/tested/dashboard/components/editSchedule.vue b/src/views/tested/dashboard/components/editSchedule.vue index a237371..fb18edf 100644 --- a/src/views/tested/dashboard/components/editSchedule.vue +++ b/src/views/tested/dashboard/components/editSchedule.vue @@ -39,7 +39,6 @@ const clickConfirm = async (formEl: FormInstance | undefined) => { // 去掉空的日程 const resultArr = list.value.filter(item => item.scheduleMatters) - console.log(resultArr) if (!resultArr.length) { ElMessage.warning('要求至少有一个日程') return false diff --git a/src/views/tested/dashboard/components/tableList.vue b/src/views/tested/dashboard/components/tableList.vue index 27bf8d9..aa72de1 100644 --- a/src/views/tested/dashboard/components/tableList.vue +++ b/src/views/tested/dashboard/components/tableList.vue @@ -24,7 +24,6 @@ limit: 5, readStatus: '0', }).then((res) => { - console.log(res.data, '审批提醒') notice.value = res.data.rows }) } diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index 1e1a0fc..f47f144 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -64,7 +64,7 @@ if (valid) { if (dialogStatus.value === '新建') { addRemind(data.value).then((res) => { - ElMessage.success('修改成功') + ElMessage.success('添加成功') dialogVisible.value = false emits('closeRefresh') }) diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index c4984bf..95d6051 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -149,24 +149,22 @@ } // 导出 const exportExcelBtn = () => { + if (!selectList.value.length) { + ElMessage.warning('请先选择需要导出的数据') + return + } const loading = ElLoading.service({ lock: true, text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - getNoticeeApi({ ...searchQuery, limit: 9999999, offset: 1 }).then((res) => { - if (res.code === 200) { - exportExcel({ - json: res.data.rows.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), - name: '通知公告', - titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], - sheetName: 'sheet1', - }) - } - loading.close() - }).catch((_) => { - loading.close() + exportExcel({ + json: selectList.value.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), + name: '通知公告', + titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], + sheetName: 'sheet1', }) + loading.close() } // 打印 function printList() { diff --git a/src/views/tested/dashboard/components/BarChartVertical.vue b/src/views/tested/dashboard/components/BarChartVertical.vue index cb47761..9598215 100644 --- a/src/views/tested/dashboard/components/BarChartVertical.vue +++ b/src/views/tested/dashboard/components/BarChartVertical.vue @@ -316,7 +316,6 @@ // inside: true, // 刻度标签是否朝内,默认朝外 // margin: 6, // 刻度标签与轴线之间的距离 formatter: (value: string) => { - console.log(value, 'value') if (String(value).length > 6) { return `${String(value).substring(0, 5)}...` } diff --git a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue index 8713f07..e168b04 100644 --- a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue +++ b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue @@ -297,6 +297,11 @@ coordinateSystem: 'polar', label: { show: true, + textStyle: { + color: props.fontColor, + fontWeight: 'normal', + fontSize: 16, + }, position: 'middle', formatter: '{b}: {c}', }, @@ -394,7 +399,6 @@ function refreshChart() { if (chart) { const option = buildOption() - console.log(option, 'optionoption') chart.setOption(option as unknown as ECBasicOption, true) } } diff --git a/src/views/tested/dashboard/components/editSchedule.vue b/src/views/tested/dashboard/components/editSchedule.vue index a237371..fb18edf 100644 --- a/src/views/tested/dashboard/components/editSchedule.vue +++ b/src/views/tested/dashboard/components/editSchedule.vue @@ -39,7 +39,6 @@ const clickConfirm = async (formEl: FormInstance | undefined) => { // 去掉空的日程 const resultArr = list.value.filter(item => item.scheduleMatters) - console.log(resultArr) if (!resultArr.length) { ElMessage.warning('要求至少有一个日程') return false diff --git a/src/views/tested/dashboard/components/tableList.vue b/src/views/tested/dashboard/components/tableList.vue index 27bf8d9..aa72de1 100644 --- a/src/views/tested/dashboard/components/tableList.vue +++ b/src/views/tested/dashboard/components/tableList.vue @@ -24,7 +24,6 @@ limit: 5, readStatus: '0', }).then((res) => { - console.log(res.data, '审批提醒') notice.value = res.data.rows }) } diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index 9bfdfca..22e7f77 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -80,7 +80,6 @@ } // 点击日期 const clickDate = (day: string) => { - console.log(day, 'day') selectDateRecord.value = day selectedDate.value = day.slice(0, 7) fetchCalendarList() // 获取日历列表 @@ -153,7 +152,12 @@ } // -----------------------------------------设备详情------------------------------------- - +const resizePage = () => { + setTimeout(() => { + const resize = new Event('resize') + window.dispatchEvent(resize) + }, 500) +} const Devicedept = ref()// 所属部门 const Devicelegend = ref({ // 饼图legend show: true, @@ -180,6 +184,7 @@ getDeviceType({ deptIds: id }).then((res) => { TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) + resizePage() }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { @@ -189,6 +194,7 @@ value: item.count, } }) + resizePage() }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { @@ -198,6 +204,7 @@ value: item.count, } }) + resizePage() }) } fecthDeviceDetail(user.deptId) @@ -230,6 +237,7 @@ const showDevice = ref(0) const changeShow = (index: number) => { showDevice.value = index + resizePage() } const tableDept = ref() // 所属部门 const columns = ref([ @@ -372,6 +380,7 @@ else { inCheckTable.value = data.deptList } + resizePage() }) // 待检设备 toCheckInfo({ deptIds: id }).then((res) => { @@ -402,6 +411,7 @@ else { toCheckTable.value = data.deptList } + resizePage() }) // 再用设备 inUseInfo({ deptIds: id }).then((res) => { @@ -411,6 +421,7 @@ inUseYAxisData.value = data.nameAggrList.map((item: any) => item.name) inUseData.value = data.meterAggrList.map((item: any) => item.count) inUseXAxisData.value = data.meterAggrList.map((item: any) => item.name) + resizePage() }) } fecthDeviceStatus(user.deptId) @@ -422,6 +433,7 @@ else { fecthDeviceStatus(user.deptId) } + resizePage() } // ------------------------------------------------------------------------------------ onMounted(async () => { @@ -465,10 +477,7 @@ }) autoScroll(false, []) // ------------------------------------------------------------------------------ - setTimeout(() => { - const resize = new Event('resize') - window.dispatchEvent(resize) - }, 500) + resizePage() }) onBeforeUnmount(() => { autoScroll(true, []) @@ -624,7 +633,7 @@
在用设备类型
在用设备计量标识
-
+
diff --git a/src/views/system/expire/edit.vue b/src/views/system/expire/edit.vue index 1e1a0fc..f47f144 100644 --- a/src/views/system/expire/edit.vue +++ b/src/views/system/expire/edit.vue @@ -64,7 +64,7 @@ if (valid) { if (dialogStatus.value === '新建') { addRemind(data.value).then((res) => { - ElMessage.success('修改成功') + ElMessage.success('添加成功') dialogVisible.value = false emits('closeRefresh') }) diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index c4984bf..95d6051 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -149,24 +149,22 @@ } // 导出 const exportExcelBtn = () => { + if (!selectList.value.length) { + ElMessage.warning('请先选择需要导出的数据') + return + } const loading = ElLoading.service({ lock: true, text: 'Loading', background: 'rgba(255, 255, 255, 0.8)', }) - getNoticeeApi({ ...searchQuery, limit: 9999999, offset: 1 }).then((res) => { - if (res.code === 200) { - exportExcel({ - json: res.data.rows.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), - name: '通知公告', - titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], - sheetName: 'sheet1', - }) - } - loading.close() - }).catch((_) => { - loading.close() + exportExcel({ + json: selectList.value.map((item: noticeType, index: number) => ({ index: index + 1, noticeNo: item.noticeNo, noticeTitle: item.noticeTitle, noticePublisher: item.noticePublisher, noticeSketch: item.noticeSketch, noticeTime: item.noticeTime })), + name: '通知公告', + titleArr: ['序号', '编号', '标题', '发布人', '内容描述', '发布时间'], + sheetName: 'sheet1', }) + loading.close() } // 打印 function printList() { diff --git a/src/views/tested/dashboard/components/BarChartVertical.vue b/src/views/tested/dashboard/components/BarChartVertical.vue index cb47761..9598215 100644 --- a/src/views/tested/dashboard/components/BarChartVertical.vue +++ b/src/views/tested/dashboard/components/BarChartVertical.vue @@ -316,7 +316,6 @@ // inside: true, // 刻度标签是否朝内,默认朝外 // margin: 6, // 刻度标签与轴线之间的距离 formatter: (value: string) => { - console.log(value, 'value') if (String(value).length > 6) { return `${String(value).substring(0, 5)}...` } diff --git a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue index 8713f07..e168b04 100644 --- a/src/views/tested/dashboard/components/BarChartVerticalCircle.vue +++ b/src/views/tested/dashboard/components/BarChartVerticalCircle.vue @@ -297,6 +297,11 @@ coordinateSystem: 'polar', label: { show: true, + textStyle: { + color: props.fontColor, + fontWeight: 'normal', + fontSize: 16, + }, position: 'middle', formatter: '{b}: {c}', }, @@ -394,7 +399,6 @@ function refreshChart() { if (chart) { const option = buildOption() - console.log(option, 'optionoption') chart.setOption(option as unknown as ECBasicOption, true) } } diff --git a/src/views/tested/dashboard/components/editSchedule.vue b/src/views/tested/dashboard/components/editSchedule.vue index a237371..fb18edf 100644 --- a/src/views/tested/dashboard/components/editSchedule.vue +++ b/src/views/tested/dashboard/components/editSchedule.vue @@ -39,7 +39,6 @@ const clickConfirm = async (formEl: FormInstance | undefined) => { // 去掉空的日程 const resultArr = list.value.filter(item => item.scheduleMatters) - console.log(resultArr) if (!resultArr.length) { ElMessage.warning('要求至少有一个日程') return false diff --git a/src/views/tested/dashboard/components/tableList.vue b/src/views/tested/dashboard/components/tableList.vue index 27bf8d9..aa72de1 100644 --- a/src/views/tested/dashboard/components/tableList.vue +++ b/src/views/tested/dashboard/components/tableList.vue @@ -24,7 +24,6 @@ limit: 5, readStatus: '0', }).then((res) => { - console.log(res.data, '审批提醒') notice.value = res.data.rows }) } diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index 9bfdfca..22e7f77 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -80,7 +80,6 @@ } // 点击日期 const clickDate = (day: string) => { - console.log(day, 'day') selectDateRecord.value = day selectedDate.value = day.slice(0, 7) fetchCalendarList() // 获取日历列表 @@ -153,7 +152,12 @@ } // -----------------------------------------设备详情------------------------------------- - +const resizePage = () => { + setTimeout(() => { + const resize = new Event('resize') + window.dispatchEvent(resize) + }, 500) +} const Devicedept = ref()// 所属部门 const Devicelegend = ref({ // 饼图legend show: true, @@ -180,6 +184,7 @@ getDeviceType({ deptIds: id }).then((res) => { TypeData.value = res.data.map((item: any) => item.count) TypeXData.value = res.data.map((item: any) => item.name) + resizePage() }) // 设备状态 getDeviceStatus({ deptIds: id }).then((res) => { @@ -189,6 +194,7 @@ value: item.count, } }) + resizePage() }) // 设备分类 getDeviceClassify({ deptIds: id }).then((res) => { @@ -198,6 +204,7 @@ value: item.count, } }) + resizePage() }) } fecthDeviceDetail(user.deptId) @@ -230,6 +237,7 @@ const showDevice = ref(0) const changeShow = (index: number) => { showDevice.value = index + resizePage() } const tableDept = ref() // 所属部门 const columns = ref([ @@ -372,6 +380,7 @@ else { inCheckTable.value = data.deptList } + resizePage() }) // 待检设备 toCheckInfo({ deptIds: id }).then((res) => { @@ -402,6 +411,7 @@ else { toCheckTable.value = data.deptList } + resizePage() }) // 再用设备 inUseInfo({ deptIds: id }).then((res) => { @@ -411,6 +421,7 @@ inUseYAxisData.value = data.nameAggrList.map((item: any) => item.name) inUseData.value = data.meterAggrList.map((item: any) => item.count) inUseXAxisData.value = data.meterAggrList.map((item: any) => item.name) + resizePage() }) } fecthDeviceStatus(user.deptId) @@ -422,6 +433,7 @@ else { fecthDeviceStatus(user.deptId) } + resizePage() } // ------------------------------------------------------------------------------------ onMounted(async () => { @@ -465,10 +477,7 @@ }) autoScroll(false, []) // ------------------------------------------------------------------------------ - setTimeout(() => { - const resize = new Event('resize') - window.dispatchEvent(resize) - }, 500) + resizePage() }) onBeforeUnmount(() => { autoScroll(true, []) @@ -624,7 +633,7 @@
在用设备类型
在用设备计量标识
-
+
diff --git a/src/views/tested/device/info/components/detail.vue b/src/views/tested/device/info/components/detail.vue index de13b38..3756609 100644 --- a/src/views/tested/device/info/components/detail.vue +++ b/src/views/tested/device/info/components/detail.vue @@ -11,7 +11,7 @@ const $router = useRouter() const $route = useRoute() const statusName = $route.query.statusName as string - +const approvalId = ref('') // 获取审批记录 // const approvalList = ref() // const fetchData = (id: string) => { @@ -27,9 +27,9 @@ // 获取设备流转日志 const logRecord = ref() const fetchDevicelogs = () => { + if (!approvalId.value) { return } const data = JSON.parse($route.query.row as string) - console.log(data, 'data') - getTurnoverLogRecord(data.equipmentId).then((res) => { + getTurnoverLogRecord(approvalId.value).then((res) => { logRecord.value = res.data console.log(logRecord.value, '设备流转日志') }) @@ -37,15 +37,16 @@ // 获取设备状态变更日志 const statusList = ref() const fetchStatusList = () => { + if (!approvalId.value) { return } const data = JSON.parse($route.query.row as string) - getStatusLogRecord(data.equipmentId).then((res) => { + getStatusLogRecord(approvalId.value).then((res) => { statusList.value = res.data console.log(statusList.value, '状态变更记录') }) } // 获取证书报告列表 const baseRef = ref() -const approvalId = ref('') + const certificateList = ref() watch(() => baseRef?.value?.ruleForm, (newVal) => { if (newVal.certificateList.length) { @@ -58,12 +59,14 @@ if (newVal.equipmentId) { // fetchData(newVal.equipmentId) approvalId.value = newVal.equipmentId + fetchStatusList() + fetchDevicelogs() } }, { deep: true, }) -fetchStatusList() -fetchDevicelogs() +// fetchStatusList() +// fetchDevicelogs() // fetchData() const radioMenus = ref([ {