|
@@ -73,7 +73,7 @@ const addOrEdit = async (row?: any) => {
|
|
|
|
|
|
const setStatus = async (row: any, status: number) => {
|
|
|
if (model === 'sagoo-rule') {
|
|
|
- axios.get(`${import.meta.env.VITE_RULE_SERVER_URL}/api/v1/rule/${row.flowId}/${status ? 'enable' : 'stop'}`, { headers })
|
|
|
+ axios.get(`${import.meta.env.VITE_RULE_SERVER_URL}${row.flowId}/${status ? 'enable' : 'stop'}`, { headers })
|
|
|
.then(() => {
|
|
|
api
|
|
|
.setStatus(row.id, status)
|
|
@@ -119,7 +119,7 @@ const setStatus = async (row: any, status: number) => {
|
|
|
const edit = async (row: any) => {
|
|
|
if (model == 'sagoo-rule') {
|
|
|
localStorage.setItem('auth-tokens', `{"access_token":"${getToken()}"}`);
|
|
|
- const url = '/plugin/rule/index.html?id=' + row.flowId;
|
|
|
+ const url = '/plugin/rule/index.html#' + row.flowId;
|
|
|
window.open(url);
|
|
|
|
|
|
} else if (model == 'node-red') {
|
|
@@ -137,7 +137,7 @@ const onDel = (row: any) => {
|
|
|
}).then(async () => {
|
|
|
|
|
|
if (model == 'sagoo-rule') {
|
|
|
- await axios.delete(import.meta.env.VITE_RULE_SERVER_URL + '/api/v1/rule/' + row.flowId, { headers }).catch(() => {
|
|
|
+ await axios.delete(import.meta.env.VITE_RULE_SERVER_URL + row.flowId, { headers }).catch(() => {
|
|
|
ElMessage.error('规则不存在')
|
|
|
})
|
|
|
} else if (model == 'node-red') {
|