|
@@ -49,7 +49,7 @@ import { getToken } from "/@/utils/auth";
|
|
|
|
|
|
const editFormRef = ref();
|
|
|
|
|
|
-// 规则引擎模式 node-red rulego
|
|
|
+// 规则引擎模式 node-red、 sagoo-rule
|
|
|
const model = import.meta.env.VITE_RULE_MODEL
|
|
|
|
|
|
const { params, tableData, getList, loading } = useSearch<any[]>(api.getList, 'Data', { types: 0 });
|
|
@@ -101,9 +101,9 @@ const setStatus = async (row: any, status: number) => {
|
|
|
};
|
|
|
|
|
|
const edit = async (row: any) => {
|
|
|
- if (model == 'rulego') {
|
|
|
+ if (model == 'sagoo-rule') {
|
|
|
localStorage.setItem('auth-tokens', `{"access_token":"${getToken()}"}`);
|
|
|
- const url = 'http://localhost:3000/plugin/rule/?id=' + row.flowId;
|
|
|
+ const url = '/plugin/rule/index.html?id=' + row.flowId;
|
|
|
window.open(url);
|
|
|
|
|
|
} else if (model == 'node-red') {
|
|
@@ -120,8 +120,8 @@ const onDel = (row: any) => {
|
|
|
type: 'warning',
|
|
|
}).then(async () => {
|
|
|
|
|
|
- if (model == 'rulego') {
|
|
|
- await axios.delete(import.meta.env.VITE_RULEGO_SERVER_URL + '/rule/' + row.flowId, { headers }).catch(() => {
|
|
|
+ if (model == 'sagoo-rule') {
|
|
|
+ await axios.delete(import.meta.env.VITE_RULE_SERVER_URL + '/rule/' + row.flowId, { headers }).catch(() => {
|
|
|
ElMessage.error('规则不存在')
|
|
|
})
|
|
|
} else if (model == 'node-red') {
|