From 2630f037f5f9b9ae23df8ae60900b6b361e3528e Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 14 七月 2023 15:58:04 +0800 Subject: [PATCH] 新增线索接口 --- src/api/clue/clueQuestionApi.js | 19 +++++++++ src/api/clue/index.js | 3 + src/stores/grid.js | 2 src/api/clue/clueConclusionApi.js | 18 +++++++++ src/api/clue/clueApi.js | 11 +++++ src/views/overlay-clue/ClueLayout.vue | 11 +++-- 6 files changed, 57 insertions(+), 7 deletions(-) diff --git a/src/api/clue/clueApi.js b/src/api/clue/clueApi.js index eb9cbd6..2afc729 100644 --- a/src/api/clue/clueApi.js +++ b/src/api/clue/clueApi.js @@ -4,8 +4,17 @@ /** * 鏌ヨ宸蹭笅鍙戠殑绾跨储娓呭崟 */ - getClues(time) { return $clue.get(`feedback/queryYxfList?updateTime=${time}`); + }, + + getClue({ sTime, eTime, pageNum = 1, pageSize = 30 }) { + return $clue.get( + `clue/fetch?sTime=${sTime}&eTime=${eTime}&pageNum=${pageNum}&pageSize=${pageSize}` + ); + }, + + fetchRemoteClue(updateTime) { + return $clue.get(`clue/fetch/remote?updateTime=${updateTime}`); } }; diff --git a/src/api/clue/clueConclusionApi.js b/src/api/clue/clueConclusionApi.js new file mode 100644 index 0000000..eef1344 --- /dev/null +++ b/src/api/clue/clueConclusionApi.js @@ -0,0 +1,18 @@ +import { $clue } from './index'; + +export default { + /** + * + */ + getConclusion(clueId) { + return $clue.get(`clue/conclusion/fetch?clueId=${clueId}`); + }, + + uploadConclusion(conclusion) { + return $clue.post(`clue/conclusion/upload`, conclusion); + }, + + pushConclusion(conclusionIdList) { + return $clue.post(`clue/conclusion/push`, conclusionIdList); + } +}; diff --git a/src/api/clue/clueQuestionApi.js b/src/api/clue/clueQuestionApi.js new file mode 100644 index 0000000..8b2ba10 --- /dev/null +++ b/src/api/clue/clueQuestionApi.js @@ -0,0 +1,19 @@ +import { $clue } from './index'; + +export default { + /** + * + */ + getQuestion(clueId) { + return $clue.get(`clue/question/fetch?clueId=${clueId}`); + }, + + uploadQuestion(question, files) { + const formData = {}; + return $clue.post(`clue/question/upload`, formData); + }, + + pushQuestion(questionIdList) { + return $clue.post(`clue/question/push`, questionIdList); + } +}; diff --git a/src/api/clue/index.js b/src/api/clue/index.js index bbfceb4..496fc47 100644 --- a/src/api/clue/index.js +++ b/src/api/clue/index.js @@ -2,7 +2,8 @@ import md5 from 'md5'; import { ElMessage } from 'element-plus'; -const ip = 'http://101.230.224.80:8082/'; +// const ip = 'http://101.230.224.80:8082/'; +const ip = 'http://192.168.0.138:8080/'; //椋炵窘鐩戠 const $clue = axios.create({ diff --git a/src/stores/grid.js b/src/stores/grid.js index c31dc65..56ea718 100644 --- a/src/stores/grid.js +++ b/src/stores/grid.js @@ -16,7 +16,7 @@ * @returns {Boolean} */ function _checkGridExist() { - return selectedGrid.value != undefined; + return selectedGrid.value.gId != undefined; } /**鏁版嵁澧炲垹**************************************************************/ diff --git a/src/views/overlay-clue/ClueLayout.vue b/src/views/overlay-clue/ClueLayout.vue index f2b8d46..d7e8821 100644 --- a/src/views/overlay-clue/ClueLayout.vue +++ b/src/views/overlay-clue/ClueLayout.vue @@ -40,9 +40,11 @@ * 鏌ヨ宸蹭笅鍙戠殑绾跨储娓呭崟 */ const getClues = function () { - const time = moment(updateTime.value).format('YYYY-MM-DD HH:mm:ss'); + const now = moment(updateTime.value); + const sTime = now.format('YYYY-MM-DD HH:mm:ss'); + const eTime = now.add(1, 'month'); onMapMounted(() => { - clueApi.getClues(time).then((res) => { + clueApi.getClue({ sTime, eTime }).then((res) => { clueList.value = res; }); }); @@ -51,7 +53,9 @@ /** * 閫夋嫨绾跨储浜嬩欢 */ -const selectClue = function (clue) {}; +const selectClue = function (clue) { + +}; </script> <style scoped> @@ -80,7 +84,6 @@ } .bg-content-1 { - } .search-wrap { -- Gitblit v1.9.3