Commit c53024e1 authored by liwei's avatar liwei

新增了日志添加

parent 9f07cea9
import httpTwo from '../httpTwo' import httpTwo from '../httpTwo'
import http from '../http'
import axios from "axios"; import axios from "axios";
...@@ -21,3 +22,7 @@ export const updateVoiceCommandsLocation = (item) => { ...@@ -21,3 +22,7 @@ export const updateVoiceCommandsLocation = (item) => {
export const getVoiceCommandsLocationDetail = (id) => { export const getVoiceCommandsLocationDetail = (id) => {
return httpTwo.get(`/busVoiceCommandsLocation/detail/${id}`) return httpTwo.get(`/busVoiceCommandsLocation/detail/${id}`)
} }
export const insertVoiceCommandLocationRecord = (query) => {
return http.post('/api/record/insertVoiceCommandLocationRecord',query)
}
...@@ -6,11 +6,13 @@ import { ...@@ -6,11 +6,13 @@ import {
deleteVoiceCommandsLocation, deleteVoiceCommandsLocation,
addVoiceCommandsLocation, addVoiceCommandsLocation,
updateVoiceCommandsLocation, updateVoiceCommandsLocation,
getVoiceCommandsLocationDetail getVoiceCommandsLocationDetail,
insertVoiceCommandLocationRecord
} from "../../api/AIStation/VoiceCommandLocation"; } from "../../api/AIStation/VoiceCommandLocation";
import {ElMessage, ElMessageBox} from 'element-plus'; import {ElMessage, ElMessageBox} from 'element-plus';
import {handleGetAIToken} from "./AItoken"; import {handleGetAIToken} from "./AItoken";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import {formatTime} from '../../utils/utils'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import {ElForm, ElFormItem, ElInput} from 'element-plus'; import {ElForm, ElFormItem, ElInput} from 'element-plus';
...@@ -187,6 +189,16 @@ const handleFormData = async () => { ...@@ -187,6 +189,16 @@ const handleFormData = async () => {
type: 'success' type: 'success'
}); });
dialogFormVisible.value = false dialogFormVisible.value = false
const userInfo = store.getters.getUserInfo();
const params = {
title:'语音指令部署位置',
userId:userInfo.userId,
operateTime:formatTime(new Date()),
msg:'用户'+'【'+userInfo.realName+'】'+'在【语音指令部署位置页面】进行了【新增】操作,数据为【编号:'
+ item.code + ',换热站id:' + item.stationId + ',换热站名称:' + item.stationName + ',ip地址:'
+ item.ipAddress + ',mac地址:'+ item.macAddress + '】'
}
insertVoiceCommandLocationRecord(params).then( res => {})
} }
}).catch((err) => { }).catch((err) => {
console.log('err:', err) console.log('err:', err)
...@@ -279,6 +291,16 @@ const handleFormData = async () => { ...@@ -279,6 +291,16 @@ const handleFormData = async () => {
type: 'success' type: 'success'
}); });
dialogFormVisible.value = false dialogFormVisible.value = false
const userInfo = store.getters.getUserInfo();
const params = {
title:'语音指令部署位置',
userId:userInfo.userId,
operateTime:formatTime(new Date()),
msg:'用户'+'【'+userInfo.realName+'】'+'在【语音指令部署位置页面】进行了【修改】操作,修改后的数据为【' + 'id:' + item.businessId +
',编号:' + item.code + ',换热站id:' + item.stationId + ',换热站名称:' + item.stationName + ',ip地址:'
+ item.ipAddress + ',mac地址:'+ item.macAddress + '】'
}
insertVoiceCommandLocationRecord(params).then( res => {})
} }
}).catch((err) => { }).catch((err) => {
console.log('err:', err) console.log('err:', err)
...@@ -363,6 +385,14 @@ function deleteButton(row) { ...@@ -363,6 +385,14 @@ function deleteButton(row) {
ElMessage.success({ ElMessage.success({
message: '删除成功!' message: '删除成功!'
}); });
const userInfo = store.getters.getUserInfo();
const params = {
title:'语音指令部署位置',
userId:userInfo.userId,
operateTime:formatTime(new Date()),
msg:'用户'+'【'+userInfo.realName+'】'+'在【语音指令部署位置模块】进行了【删除】操作,删除的数据id【'+row.businessId + '】'
}
insertVoiceCommandLocationRecord(params).then( res => {})
loadData() loadData()
} else { } else {
ElMessage.error({ ElMessage.error({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment