From 22ce3a4c8453b54c2bfe6d582b734195f899f195 Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期二, 10 十二月 2024 14:59:50 +0800 Subject: [PATCH] 1. 新增socket生命周期管理、心跳机制、重连机制 2. 新增socket消息校验、解析、生成 3. 新增socket消息类型枚举类src\enum\socketMessage 3. 新增消息管理类src\socket\MessageManager 4. 新增观察者模式消息的发布订阅机制src\socket\eventBus 5. 修改后台任务页面注册后台任务状态消息并修改状态的逻辑 --- src/api/fysp/evaluateApi.js | 75 ++++++++++++++++++++++++++++++++++++- 1 files changed, 72 insertions(+), 3 deletions(-) diff --git a/src/api/fysp/evaluateApi.js b/src/api/fysp/evaluateApi.js index aef8028..3e804e5 100644 --- a/src/api/fysp/evaluateApi.js +++ b/src/api/fysp/evaluateApi.js @@ -10,6 +10,22 @@ }, /** + * 鏍规嵁宸℃煡浠诲姟鑾峰彇璇勫垎缁嗗垯 + */ + fetchItemEvaluation(subTaskId) { + const params = `?subTaskId=${subTaskId}`; + return $fysp.get(`evaluationsubrule/score${params}`).then((res) => res.data); + }, + + + /** + * 鎵归噺鏇存柊璇勫垎缁嗗垯寰楀垎 + */ + updateItemEvaluation(param) { + return $fysp.post(`itemevaluation/uplist`, param).then((res) => res.data); + }, + + /** * 鏌ヨ璇勪及鎬昏鍒� * @param {Object} param * @returns @@ -22,9 +38,12 @@ return $fysp.post(`evaluation/auto`, param).then((res) => res.data); }, - downloadAutoEvaluation(param) { + /** + * 涓嬭浇瑙勮寖鎬ц瘎浼颁笌鍒嗘瀽鎶ュ憡 + */ + downloadAutoEvaluation(param, forceUpdate) { return $fysp - .post(`evaluation/auto/record/download`, param, { responseType: 'blob' }) + .post(`evaluation/auto/record/download?forceUpdate=${forceUpdate}`, param, { responseType: 'blob' }) .then((res) => { // 鏂囨。鏈敓鎴愶紝宸插惎鍔ㄦ枃妗g敓鎴愬悗鍙颁换鍔� if (res.data.type == 'application/json') { @@ -43,5 +62,55 @@ window.URL.revokeObjectURL(url); } }); - } + }, + + /** + * 鎵归噺淇敼鏈�灏忛」寰楀垎 + */ + updateMultipleScore(evaVo) { + return $fysp.post(`itemevaluation/update/multiple`, evaVo).then((res) => res.data); + }, + /** + * 淇敼鏈�灏忛」寰楀垎 + */ + updateScore({itemList, subTaskId}) { + const param = `?subTaskId=${subTaskId}` + return $fysp.post(`itemevaluation/update${param}`, itemList).then((res) => res.data); + }, + /** + * 鑾峰緱鎵�鏈夎鍒欑埗鑺傜偣 + */ + getAllParentRules() { + return $fysp.get("evaluationrule").then((res) => res.data); + }, + /** 鏍规嵁鐖惰妭鐐筰d鑾峰彇瀛愯鍒� */ + getSubRules(id) { + const param = `?id=${id}` + return $fysp.get(`evaluationsubrule/byRule${param}`).then((res) => res.data); + }, + /** + * 鏇存柊鐖惰妭鐐硅鍒� + */ + updateParentRule(data) { + return $fysp.post("evaluationrule", data).then((res) => res.data); + }, + /** + * 鍒犻櫎鐖惰妭鐐硅鍒� + */ + deleteParentRuleById(id) { + return $fysp.delete(`evaluationrule/${id}`).then((res) => res.data); + }, + + /** + * 鏇存柊瀛愯妭鐐硅鍒� + */ + updateSubRule(data) { + return $fysp.post("evaluationsubrule", data).then((res) => res.data); + }, + /** + * 鍒犻櫎瀛愯妭鐐硅鍒� + */ + deleteSubRuleById(id) { + return $fysp.delete(`evaluationsubrule/${id}`).then((res) => res.data); + }, }; -- Gitblit v1.9.3