日志记录功能
This commit is contained in:
@@ -10,6 +10,12 @@ api.queryAIUrl = (idCard,name) => request.globalRequest(`/Home/QueryAIUrl?userId
|
|||||||
// 获取个人档案
|
// 获取个人档案
|
||||||
api.queryStudentProfile = () => request.globalRequest(`/StudentResource/QueryStudentProfile`,'GET', {})
|
api.queryStudentProfile = () => request.globalRequest(`/StudentResource/QueryStudentProfile`,'GET', {})
|
||||||
|
|
||||||
|
// 保存操作日志
|
||||||
|
api.saveUserOperationLog = (data) => request.globalRequest(`/UserOperationLog/SaveUserOperationLog`,'POST', data)
|
||||||
|
|
||||||
|
// 获取操作日志
|
||||||
|
api.getUserOperationLogList = (data) => request.globalRequest(`/UserOperationLog/GetUserOperationLogList`,'POST', data)
|
||||||
|
|
||||||
|
|
||||||
export default api
|
export default api
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/testManage.js"
|
import api from "@/packageCa/apiCa/testManage.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -178,6 +179,27 @@
|
|||||||
}
|
}
|
||||||
}, 300)
|
}, 300)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 提交题目
|
// 提交题目
|
||||||
submitTitle() {
|
submitTitle() {
|
||||||
@@ -250,6 +272,10 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.postLog(201,`【新增】保存${this.testTitle}`,"",JSON.stringify({
|
||||||
|
TestType: this.testType,
|
||||||
|
TestStr: testStr
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/testManage.js"
|
import api from "@/packageCa/apiCa/testManage.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -249,6 +250,27 @@
|
|||||||
},400)
|
},400)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 提交题目
|
// 提交题目
|
||||||
submitTitle() {
|
submitTitle() {
|
||||||
let testStr = "";
|
let testStr = "";
|
||||||
@@ -282,6 +304,10 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.postLog(201,`【新增】保存职业兴趣测评`,"",JSON.stringify({
|
||||||
|
TestType: 11,
|
||||||
|
TestStr: testStr
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/testManage.js"
|
import api from "@/packageCa/apiCa/testManage.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -142,6 +143,27 @@
|
|||||||
},400)
|
},400)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 提交题目
|
// 提交题目
|
||||||
submitTitle() {
|
submitTitle() {
|
||||||
let testStr = "";
|
let testStr = "";
|
||||||
@@ -195,6 +217,10 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.postLog(201,`【新增】保存人格测评`,"",JSON.stringify({
|
||||||
|
TestType: 15,
|
||||||
|
TestStr: testStr
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/testManage.js"
|
import api from "@/packageCa/apiCa/testManage.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -145,6 +146,27 @@
|
|||||||
},300)
|
},300)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 提交题目
|
// 提交题目
|
||||||
submitTitle() {
|
submitTitle() {
|
||||||
let testStr = "";
|
let testStr = "";
|
||||||
@@ -197,6 +219,10 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.postLog(201,`【新增】保存工作测评`,"",JSON.stringify({
|
||||||
|
TestType: 17,
|
||||||
|
TestStr: testStr
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/user.js"
|
import api from "@/packageCa/apiCa/user.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -116,10 +117,32 @@
|
|||||||
user: res.Data.userInfo
|
user: res.Data.userInfo
|
||||||
};
|
};
|
||||||
uni.setStorageSync('CAuserInfo',params);
|
uni.setStorageSync('CAuserInfo',params);
|
||||||
|
this.postLog(101,`【用户登入】【小程序】${res.Data.userInfo}登录成功`,"",JSON.stringify(params))
|
||||||
}else {
|
}else {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -482,6 +505,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 55rpx;
|
margin-right: 55rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
&:nth-child(4){
|
&:nth-child(4){
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/studentProfile.js"
|
import api from "@/packageCa/apiCa/studentProfile.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -127,6 +128,27 @@
|
|||||||
url: `/packageCa/pagesTest/testList`
|
url: `/packageCa/pagesTest/testList`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
|
},
|
||||||
//选中职业添加
|
//选中职业添加
|
||||||
async checkedJob(ITEM){
|
async checkedJob(ITEM){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@@ -141,6 +163,7 @@
|
|||||||
icon: "none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
this.getGXCareerPlanList();
|
this.getGXCareerPlanList();
|
||||||
|
this.postLog(304,`【新增】新增了${ITEM.Name}意向职业`,"",JSON.stringify(ITEM))
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.Message,
|
title: res.Message,
|
||||||
|
|||||||
@@ -121,6 +121,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/studentProfile.js"
|
import api from "@/packageCa/apiCa/studentProfile.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -145,6 +146,27 @@
|
|||||||
this.queryPlanList();
|
this.queryPlanList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 切换目标标签
|
// 切换目标标签
|
||||||
changeTarget(ITEM){
|
changeTarget(ITEM){
|
||||||
if(ITEM.EncodeId == this.checkedTargetCode){
|
if(ITEM.EncodeId == this.checkedTargetCode){
|
||||||
@@ -221,6 +243,7 @@
|
|||||||
})
|
})
|
||||||
this.queryPlanList();
|
this.queryPlanList();
|
||||||
this.delIds=[];
|
this.delIds=[];
|
||||||
|
this.postLog(302,`【新增】新增了学习计划`,"",JSON.stringify(data))
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.Message,
|
title: res.Message,
|
||||||
|
|||||||
@@ -127,6 +127,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/studentProfile.js"
|
import api from "@/packageCa/apiCa/studentProfile.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -192,6 +193,7 @@
|
|||||||
this.jobSkill = JSON.parse(data.JobSkill).slice(0,5);
|
this.jobSkill = JSON.parse(data.JobSkill).slice(0,5);
|
||||||
this.professionalRequire = JSON.parse(data.ProfessionalRequire).slice(0,5);
|
this.professionalRequire = JSON.parse(data.ProfessionalRequire).slice(0,5);
|
||||||
this.isLoadingEnd = true;
|
this.isLoadingEnd = true;
|
||||||
|
this.postLog(303,`【新增】查看了${data.Name}的职业发展路径`,"",JSON.stringify(res.Data))
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.Message,
|
title: res.Message,
|
||||||
@@ -199,6 +201,27 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 去测评
|
// 去测评
|
||||||
navTest(){
|
navTest(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
@@ -175,6 +175,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import api from "@/packageCa/apiCa/studentProfile.js"
|
import api from "@/packageCa/apiCa/studentProfile.js"
|
||||||
|
import apiuser from "@/packageCa/apiCa/user.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -199,6 +200,27 @@
|
|||||||
this.querySmartTargets();
|
this.querySmartTargets();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 添加日志
|
||||||
|
postLog(operationType, remarks, beforeData = "", afterData = ""){
|
||||||
|
try {
|
||||||
|
const data = {
|
||||||
|
OperationType: operationType,
|
||||||
|
Remarks: remarks,
|
||||||
|
BeforeOperationJson: beforeData,
|
||||||
|
AfterOperationJson: afterData
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
// return;
|
||||||
|
// 异步记录日志,不阻塞主流程
|
||||||
|
apiuser.saveUserOperationLog(data).then((res) => {
|
||||||
|
console.log('[Operation Log] 记录成功', res);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('[Operation Log] 记录失败', err);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error('[Operation Log] 记录异常', e);
|
||||||
|
}
|
||||||
|
},
|
||||||
goPlan(){
|
goPlan(){
|
||||||
if(this.targetList.length==0){
|
if(this.targetList.length==0){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -248,6 +270,7 @@
|
|||||||
icon: "success"
|
icon: "success"
|
||||||
})
|
})
|
||||||
this.querySmartTargets();
|
this.querySmartTargets();
|
||||||
|
this.postLog(301,`【新增】保存SMART目标`,"",JSON.stringify(this.targetForm))
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.Message,
|
title: res.Message,
|
||||||
@@ -300,6 +323,7 @@
|
|||||||
Timeliness: "",
|
Timeliness: "",
|
||||||
};
|
};
|
||||||
this.querySmartTargets();
|
this.querySmartTargets();
|
||||||
|
this.postLog(301,`【删除】删除SMART目标`,"",JSON.stringify(this.targetForm))
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.Message,
|
title: res.Message,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// const baseUrl = "https://localhost:7026/career";
|
// const baseUrl = "https://ksrs.51xuanxiao.com/career";
|
||||||
const baseUrl = "https://www.xjksly.cn/career";
|
const baseUrl = "https://www.xjksly.cn/career";
|
||||||
const request = {}
|
const request = {}
|
||||||
const headers = {}
|
const headers = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user