diff --git a/src/api/modules/api.js b/src/api/modules/api.js index a3d81af..1697533 100644 --- a/src/api/modules/api.js +++ b/src/api/modules/api.js @@ -1102,7 +1102,10 @@ export function addLoginCount(data) { return request({ url: 'admin/log/addLoginCount', method:'post', - data + data: { + ...data, + houseName: localStorage.getItem('topName') || '' + } }) } export function targetAnalysis(query) { diff --git a/src/api/modules/http.js b/src/api/modules/http.js index fbb1eb1..66dd595 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -1226,3 +1226,53 @@ export function addOperatingLog(params) { }) } + +// 获取员工使用统计 +export function employeeUsageStatistics(data) { + return request({ + url: 'autoSR/cusStageStatistics/employeeUsageStatistics', + method: 'post', + data + }) +} + + +// 操作类型 +export function findOperationType(params) { + return request({ + url: 'admin/log/findOperationType', + method: 'get', + params + }) +} + + +// 重启设备&下载录音文件&删除录音文件 +export function updateEquipmentStatus(data) { + return request({ + url: 'autoSR/zk/equipment/updateEquipmentStatus', + method: 'post', + data + }) +} + + + + +// 查看debug日志 +export function findFileByPage(params) { + return request({ + url: 'autoSR/zk/equipment/findFileByPage', + method: 'get', + params + }) +} + +// 查看debug日志 +export function deleteDebugRecord(params) { + return request({ + url: 'autoSR/zk/equipment/deleteDebugRecord', + method: 'get', + params + }) +} \ No newline at end of file diff --git a/src/const/crud/admin/log.js b/src/const/crud/admin/log.js index e9e4b2c..1542408 100644 --- a/src/const/crud/admin/log.js +++ b/src/const/crud/admin/log.js @@ -43,7 +43,9 @@ export const tableOption = { }, { label: "操作类型", - prop: "type", + prop: "operationType", + search: true, + type: 'select', dicData: [{ label: '新增管理', value: "0" diff --git a/src/views/Equipment/state.vue b/src/views/Equipment/state.vue index ba2c722..a1fdec2 100644 --- a/src/views/Equipment/state.vue +++ b/src/views/Equipment/state.vue @@ -346,6 +346,27 @@ 设备日志 + 重启设备 + + 修改下载状态 + + 删除录音文件 + + 查看debug日志 @@ -534,6 +555,112 @@ + + + + + + + + + +
+ 取 消 + 确 定 +
+
+ + + + + + + debug文件 + debug备份文件 + + + +
+ 取 消 + 确 定 +
+
+ + + + + + + + + + +
+ + +
+
@@ -553,7 +680,6 @@ export default { currentPage: 1, // 当前页数 pageSize: 30, // 每页显示多少条 }, - isOpen: false, options: [ { @@ -739,6 +865,43 @@ export default { }, ], houseTypes: "0,1", + + deleteRecordingShow: false, // 删除设备录音文件 + deleteHour: { + delTimeHorizonFile: "", // 删除时间段 + imei: "", // 需要删除的设备 + }, + deleteHourRule: { + delTimeHorizonFile: [ + { required: true, message: "请选择要删除的时间段", trigger: "blur" }, + ], + }, + + // 改变下载的 + downLoadDevice: { + imei: "", // 需要下载的设备 + uploadDebugFile: 1, // 1debug文件 2debug备份文件 + }, // + downLoadDeviceShow: false, // 下载提示框 + downLoadDeviceRules: { + uploadDebugFile: [ + { + required: true, + message: "请选择要下载的文件类型", + trigger: "blur", + }, + ], + }, + + // debug + debugLogShow: false, // + debugLogList: [], // debug日志列表 + debugParams: { + imei: "", // + size: 10, // + current: 1, // 分页 + total: 0, // 总条数 + }, // debug参数 }; }, computed: { @@ -754,18 +917,18 @@ export default { this.$db.upDate(params); }, selValue(val) { - console.log(val, 'selValue') + console.log(val, "selValue"); }, choicValue(val) { - console.log(val, 'choicValue') + console.log(val, "choicValue"); }, dataList(val) { - console.log(val, 'dataList') - } + console.log(val, "dataList"); + }, }, created() { // 添加日志 - this.addOperatingLog() + this.addOperatingLog(); // 获取缓存的页面数据 this.getFiltterOption(); // 获取显隐的列表 @@ -804,6 +967,101 @@ export default { this.setFiltterOption(); }, methods: { + deleteLogBug(data) { + console.log(data); + this.$confirm( + `确定要删除生成时间是${data.createDate}的记录吗?`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ).then(() => { + this.$api.http.deleteDebugRecord({ id: data.id }).then((res) => { + if (res.code == 10000) { + this.$message.success(res.message); + this.findFileByPage(); + } else { + this.$message.error(res.message); + } + }); + }); + }, + + handleSizeChangeLog(val) { + this.debugParams.current = val; + this.findFileByPage(); + }, + handleCurrentChangeLog(val) { + this.debugParams.size = val; + this.findFileByPage(); + }, + // 查看debug日志 + showDeBugLog(row) { + this.debugLogShow = true; + this.debugParams.imei = row.imei; + this.findFileByPage(); + }, + findFileByPage() { + this.$api.http.findFileByPage(this.debugParams).then((res) => { + console.log(res); + if (res.code == 10000) { + this.debugLogList = res.data.records; + this.debugParams.total = res.data.total; + } + }); + }, + secondDelete() { + if (!this.deleteHour.delTimeHorizonFile) { + this.$message.error("请选择删除时段"); + return; + } + let obj = { + delTimeHorizonFile: this.deleteHour.delTimeHorizonFile.join("-"), + imei: this.deleteHour.imei, + }; + this.updateEquipmentStatus(obj); + }, + // 重启设备&下载录音文件&删除录音文件 + updateEquipmentStatus(obj) { + this.$api.http.updateEquipmentStatus(obj).then((res) => { + if (res.code == 10000) { + this.$message.success(res.message); + this.zkhousePage(); + this.downLoadDeviceShow = false; + this.deleteRecordingShow = false; + } else { + this.$message.error(res.message); + } + }); + }, + + deleteRecordingFiles(row) { + this.deleteHour.imei = row.imei; + this.deleteRecordingShow = true; + }, + + changeDownLoad(row) { + this.downLoadDevice.imei = row.imei; + this.downLoadDeviceShow = true; + }, + + // 重启设备 + rebootDevice(row) { + let obj = { + imei: row.imei, + restartEquipment: 1, + }; + this.$confirm(`确定要重启${row.imei}设备吗?`, "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + this.updateEquipmentStatus(obj); + }); + }, + // 添加日志 addOperatingLog() { this.$api.http.addOperatingLog({ logType: 12 }); @@ -820,7 +1078,7 @@ export default { changeValue: this.changeValue, searchForm: this.searchForm, dataList: this.dataList, - isOpen: this.isOpen + isOpen: this.isOpen, }, }; console.log(this.dataList, this.selValue); @@ -830,21 +1088,24 @@ export default { }, // 获取当前页面筛选条件 getFiltterOption() { - this.$db.getDataByKey(this.filtterOptionName).then((res) => { - console.log(res.optionData.dataList); - this.searchForm = res.optionData.searchForm; - this.houseTypes = res.optionData.houseTypes; - this.selValue = res.optionData.selValue; - this.choicValue = res.optionData.choicValue; - this.time = res.optionData.time; - this.changeValue = res.optionData.changeValue; - this.dataList = res.optionData.dataList; - this.isOpen = res.optionData.isOpen; - this.getTableList(); - }).catch(e => { - // 获取不到本地存储的数据在调用获取详细列表 - this.getList(); - }); + this.$db + .getDataByKey(this.filtterOptionName) + .then((res) => { + console.log(res.optionData.dataList); + this.searchForm = res.optionData.searchForm; + this.houseTypes = res.optionData.houseTypes; + this.selValue = res.optionData.selValue; + this.choicValue = res.optionData.choicValue; + this.time = res.optionData.time; + this.changeValue = res.optionData.changeValue; + this.dataList = res.optionData.dataList; + this.isOpen = res.optionData.isOpen; + this.getTableList(); + }) + .catch((e) => { + // 获取不到本地存储的数据在调用获取详细列表 + this.getList(); + }); }, // 获取当前页面的显隐 setTableOption() { diff --git a/src/views/Statistics/employeeUsageStatistics.vue b/src/views/Statistics/employeeUsageStatistics.vue index e69de29..583af99 100644 --- a/src/views/Statistics/employeeUsageStatistics.vue +++ b/src/views/Statistics/employeeUsageStatistics.vue @@ -0,0 +1,452 @@ + + + + + \ No newline at end of file diff --git a/src/views/Statistics/intelligentReporting.vue b/src/views/Statistics/intelligentReporting.vue index ba72272..0377581 100644 --- a/src/views/Statistics/intelligentReporting.vue +++ b/src/views/Statistics/intelligentReporting.vue @@ -392,7 +392,8 @@ export default { this.$api.http.monthlyGetProjectList({ orgCode: row.orgCode, }).then((res) => { - this.projectList = res.data.data; + console.log(res) + this.projectList = res.data; }); }, @@ -602,7 +603,6 @@ export default { } else { this.$message.error(res.data.message); } - location.reload(); }) .catch((e) => { this.$message.error("操作失败"); diff --git a/src/views/Statistics/reportDetail.vue b/src/views/Statistics/reportDetail.vue index 7ff45e6..a2193fd 100644 --- a/src/views/Statistics/reportDetail.vue +++ b/src/views/Statistics/reportDetail.vue @@ -1377,6 +1377,7 @@