diff --git a/src/views/safetyenvironmental/archive/components/info.vue b/src/views/safetyenvironmental/archive/components/info.vue
index cdc7b26..4ed4426 100644
--- a/src/views/safetyenvironmental/archive/components/info.vue
+++ b/src/views/safetyenvironmental/archive/components/info.vue
@@ -182,6 +182,7 @@
@@ -351,6 +352,25 @@ export default {
goBack() {
this.$parent.INSPECTION_ID = ''
this.$parent.activeName = 'List'
+ },
+ formatDate(dateStr) {
+ // 将字符串转换为 Date 对象
+ const date = new Date(dateStr)
+ // 获取年、月、日、时、分、秒
+ const year = date.getFullYear()
+ const month = String(date.getMonth() + 1).padStart(2, '0') // 月份从0开始,需要加1
+ const day = String(date.getDate()).padStart(2, '0')
+ const hours = String(date.getHours()).padStart(2, '0')
+ const minutes = String(date.getMinutes()).padStart(2, '0')
+ // const seconds = String(date.getSeconds()).padStart(2, '0')
+ // 拼接成目标格式
+ // return `${year}年${month}月${day}日${hours}时${minutes}分${seconds}秒`
+ return `${year}年${month}月${day}日${hours}时${minutes}分`
+ },
+ // 导出表格的数据
+ goExport() {
+ var dataStr = '?INSPECTION_ID=' + encodeURIComponent(this.$parent.INSPECTION_ID)
+ window.location.href = config.httpurl + 'safetyenvironmental/exportInfo' + dataStr
}
}
}
diff --git a/src/views/safetyenvironmental/inspection/components/list.vue b/src/views/safetyenvironmental/inspection/components/list.vue
index 507fb54..5690f00 100644
--- a/src/views/safetyenvironmental/inspection/components/list.vue
+++ b/src/views/safetyenvironmental/inspection/components/list.vue
@@ -98,6 +98,9 @@
重置
+
+ 导出
+
@@ -371,6 +374,22 @@ export default {
this.$refs.deptTree_Select1.clearHandle()
this.$refs.deptTree_Select2.clearHandle()
},
+ // 将列表导出为本地的Excel表格
+ goExportExcel() {
+ var dataStr = '?HIDDENDESCR=' + encodeURIComponent(this.search.HIDDENDESCR)
+ dataStr += '&INSPECTED_DEPARTMENT_ID=' + encodeURIComponent(this.search.INSPECTED_DEPARTMENT_ID) // 被检查单位
+ dataStr += '&INSPECTION_DEPARTMENT_ID=' + encodeURIComponent(this.search.INSPECTION_DEPARTMENT_ID) // 检查部门
+ dataStr += '&INSPECTION_ORIGINATOR_NAME=' + encodeURIComponent(this.search.INSPECTION_ORIGINATOR_NAME) // 检查发起人
+ dataStr += '&INSPECTION_TYPE=' + encodeURIComponent(this.search.INSPECTION_TYPE) // 检查类型
+ dataStr += '&INSPECTION_USER_NAME=' + encodeURIComponent(this.search.INSPECTION_USER_NAME) // 检查人员
+ dataStr += '&INSPECTION_USER_PHONE=' + encodeURIComponent(this.search.INSPECTION_USER_PHONE) // 检查人员手机
+ dataStr += '&INSPECTION_CASE=' + encodeURIComponent(this.search.INSPECTION_CASE) // 检查情况
+ dataStr += '&INSPECTION_STATUS=' + encodeURIComponent(this.search.INSPECTION_STATUS) // 检查状态
+ dataStr += '&INSPECTION_SUBJECT=' + encodeURIComponent(this.search.INSPECTION_SUBJECT) // 检查题目
+ dataStr += '&INSPECTION_TIME_START=' + encodeURIComponent(this.search.INSPECTION_TIME[0]) // 开始检查时间
+ dataStr += '&INSPECTION_TIME_END=' + encodeURIComponent(this.search.INSPECTION_TIME[1]) // 结束检查时间
+ window.location.href = config.httpurl + 'safetyenvironmental/exportexcel' + dataStr
+ },
// 获取列表
getList() {
this.listLoading = true