提交 f29efbcf authored 作者: caijian's avatar caijian

三个编辑和保存接口更新

上级 4d76d831
...@@ -150,7 +150,7 @@ export const getEvents = async () => { ...@@ -150,7 +150,7 @@ export const getEvents = async () => {
//获取折线统计的编辑数据 //获取折线统计的编辑数据
export const getChartEditTable = async (params) => { export const getChartEditTable = async (params) => {
let data = request.get('/api/analysis/get_chart_edit_table?hypergraph_id=' + params.id) let data = request.get('/api/analysis/get_chart_edit_table?hyper_id=' + params.id)
return data return data
} }
...@@ -169,7 +169,7 @@ export const saveChartTable = async (params) => { ...@@ -169,7 +169,7 @@ export const saveChartTable = async (params) => {
//获取矩阵编辑数据 //获取矩阵编辑数据
export const getMatrixEditTable = async (params) => { export const getMatrixEditTable = async (params) => {
let data = await request.get('/api/analysis/get_matrix_edit_table') let data = await request.get('/api/analysis/get_matrix_edit_table?hyper_id='+params.id)
return data return data
} }
...@@ -188,7 +188,7 @@ export const saveMatrixTable = async (params) => { ...@@ -188,7 +188,7 @@ export const saveMatrixTable = async (params) => {
//获取事件编辑数据 //获取事件编辑数据
export const getEventsEditTable = async (params) => { export const getEventsEditTable = async (params) => {
let data = await request.get('/api/analysis/get_events_edit_table') let data = await request.get('/api/analysis/get_events_edit_table?hyper_id='+params.id)
return data return data
} }
...@@ -255,7 +255,7 @@ export const getEventNewsList = async (params) => { ...@@ -255,7 +255,7 @@ export const getEventNewsList = async (params) => {
// http://8.140.26.4:10006/tech_hyper/api/analysis/analysis_event_relations_in_rag?hyper_id=1 // http://8.140.26.4:10006/tech_hyper/api/analysis/analysis_event_relations_in_rag?hyper_id=1
export const getEventData = async (params) => { export const getEventData = async (params) => {
let data = await request.get('/api/analysis/analysis_event_relations_in_rag?hyper_id=' + params.hyper_id) let data = await request.get('/api/analysis/analysis_event_relation_in_rag?hyper_id=' + params.hyper_id)
return data return data
} }
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
} }
onMounted(() => { onMounted(() => {
getGraphList(); // getGraphList();
}) })
</script> </script>
......
...@@ -1035,13 +1035,15 @@ function handleClick(item) { ...@@ -1035,13 +1035,15 @@ function handleClick(item) {
function editDataFun() { function editDataFun() {
if (focusBotton.value === "0") { if (focusBotton.value === "0") {
getChartEditTable({ getChartEditTable({
id: 1 id: hyperId.value
}).then((res) => { }).then((res) => {
chartData.value = res.data; chartData.value = res.data;
editDialog.value.visible = true; editDialog.value.visible = true;
}) })
} else if (focusBotton.value === "1") { } else if (focusBotton.value === "1") {
getMatrixEditTable().then((res) => { getMatrixEditTable({
id: hyperId.value
}).then((res) => {
chartData.value = res.data; chartData.value = res.data;
editDialog.value.visible = true; editDialog.value.visible = true;
}) })
...@@ -1049,7 +1051,9 @@ function editDataFun() { ...@@ -1049,7 +1051,9 @@ function editDataFun() {
} }
function editDataFun2(params) { function editDataFun2(params) {
getEventsEditTable().then((res) => { getEventsEditTable({
id: hyperId.value
}).then((res) => {
g6Data.value = res.data; g6Data.value = res.data;
nextTick(() => { nextTick(() => {
editDialogEvents.value.visible = true; editDialogEvents.value.visible = true;
...@@ -1210,7 +1214,10 @@ function initMatrix() { ...@@ -1210,7 +1214,10 @@ function initMatrix() {
function saveEditTableData(params) { function saveEditTableData(params) {
if (focusBotton.value === "0") { if (focusBotton.value === "0") {
saveChartTable(params).then((res) => { saveChartTable({
...params,
hyper_id: hyperId.value
}).then((res) => {
if (res.code === 1) { if (res.code === 1) {
globalProxy.$message({ globalProxy.$message({
type: "success", type: "success",
...@@ -1222,7 +1229,10 @@ function saveEditTableData(params) { ...@@ -1222,7 +1229,10 @@ function saveEditTableData(params) {
} }
}) })
} else if (focusBotton.value === "1") { } else if (focusBotton.value === "1") {
saveMatrixTable(params).then((res) => { saveMatrixTable({
...params,
hyper_id: hyperId.value
}).then((res) => {
if (res.code === 1) { if (res.code === 1) {
globalProxy.$message({ globalProxy.$message({
type: "success", type: "success",
...@@ -1237,7 +1247,10 @@ function saveEditTableData(params) { ...@@ -1237,7 +1247,10 @@ function saveEditTableData(params) {
} }
function saveEditTableDataEvents(params) { function saveEditTableDataEvents(params) {
saveEventsTable(params).then((res) => { saveEventsTable({
...params,
hyper_id: hyperId.value
}).then((res) => {
if (res.code === 1) { if (res.code === 1) {
globalProxy.$message({ globalProxy.$message({
type: "success", type: "success",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论