|
@@ -410,7 +410,7 @@
|
|
@click="onSelectNetWork(item)"
|
|
@click="onSelectNetWork(item)"
|
|
>
|
|
>
|
|
<div style="font-size: 14px">{{ item.name }}</div>
|
|
<div style="font-size: 14px">{{ item.name }}</div>
|
|
- <div class="desc">{{ item.url }}</div>
|
|
|
|
|
|
+ <div class="desc">{{ item.url || item.data.url }}</div>
|
|
<span class="del" @click.stop="onDelNetWork(item, i)">
|
|
<span class="del" @click.stop="onDelNetWork(item, i)">
|
|
<delete-icon />
|
|
<delete-icon />
|
|
<!-- <t-icon name="delete" /> -->
|
|
<!-- <t-icon name="delete" /> -->
|
|
@@ -824,7 +824,7 @@ import {
|
|
autoSaveAS,
|
|
autoSaveAS,
|
|
} from '@/services/common';
|
|
} from '@/services/common';
|
|
import { useSelection } from '@/services/selections';
|
|
import { useSelection } from '@/services/selections';
|
|
-import { defaultFormat } from '@/services/defaults';
|
|
|
|
|
|
+import { defaultFormat, fromArrows, toArrows } from '@/services/defaults';
|
|
import { checkData, localStorageName, Meta2dBackData } from '@/services/utils';
|
|
import { checkData, localStorageName, Meta2dBackData } from '@/services/utils';
|
|
import { debounce } from '@/services/debouce';
|
|
import { debounce } from '@/services/debouce';
|
|
import { s8 } from '@/services/random';
|
|
import { s8 } from '@/services/random';
|
|
@@ -1073,31 +1073,31 @@ const changeLineType = (value: string) => {
|
|
};
|
|
};
|
|
|
|
|
|
const fromArrow = ref('');
|
|
const fromArrow = ref('');
|
|
-const fromArrows = [
|
|
|
|
- { icon: '#l-line', value: '' },
|
|
|
|
- { icon: '#l-from-triangle', value: 'triangle' },
|
|
|
|
- { icon: '#l-from-diamond', value: 'diamond' },
|
|
|
|
- { icon: '#l-from-circle', value: 'circle' },
|
|
|
|
- { icon: '#l-from-lineDown', value: 'lineDown' },
|
|
|
|
- { icon: '#l-from-lineUp', value: 'lineUp' },
|
|
|
|
- { icon: '#l-from-triangleSolid', value: 'triangleSolid' },
|
|
|
|
- { icon: '#l-from-diamondSolid', value: 'diamondSolid' },
|
|
|
|
- { icon: '#l-from-circleSolid', value: 'circleSolid' },
|
|
|
|
- { icon: '#l-from-line', value: 'line' },
|
|
|
|
-];
|
|
|
|
|
|
+// const fromArrows = [
|
|
|
|
+// { icon: '#l-line', value: '' },
|
|
|
|
+// { icon: '#l-from-triangle', value: 'triangle' },
|
|
|
|
+// { icon: '#l-from-diamond', value: 'diamond' },
|
|
|
|
+// { icon: '#l-from-circle', value: 'circle' },
|
|
|
|
+// { icon: '#l-from-lineDown', value: 'lineDown' },
|
|
|
|
+// { icon: '#l-from-lineUp', value: 'lineUp' },
|
|
|
|
+// { icon: '#l-from-triangleSolid', value: 'triangleSolid' },
|
|
|
|
+// { icon: '#l-from-diamondSolid', value: 'diamondSolid' },
|
|
|
|
+// { icon: '#l-from-circleSolid', value: 'circleSolid' },
|
|
|
|
+// { icon: '#l-from-line', value: 'line' },
|
|
|
|
+// ];
|
|
const toArrow = ref('');
|
|
const toArrow = ref('');
|
|
-const toArrows = [
|
|
|
|
- { icon: '#l-line', value: '' },
|
|
|
|
- { icon: '#l-to-triangle', value: 'triangle' },
|
|
|
|
- { icon: '#l-to-diamond', value: 'diamond' },
|
|
|
|
- { icon: '#l-to-circle', value: 'circle' },
|
|
|
|
- { icon: '#l-to-lineDown', value: 'lineDown' },
|
|
|
|
- { icon: '#l-to-lineUp', value: 'lineUp' },
|
|
|
|
- { icon: '#l-to-triangleSolid', value: 'triangleSolid' },
|
|
|
|
- { icon: '#l-to-diamondSolid', value: 'diamondSolid' },
|
|
|
|
- { icon: '#l-to-circleSolid', value: 'circleSolid' },
|
|
|
|
- { icon: '#l-to-line', value: 'line' },
|
|
|
|
-];
|
|
|
|
|
|
+// const toArrows = [
|
|
|
|
+// { icon: '#l-line', value: '' },
|
|
|
|
+// { icon: '#l-to-triangle', value: 'triangle' },
|
|
|
|
+// { icon: '#l-to-diamond', value: 'diamond' },
|
|
|
|
+// { icon: '#l-to-circle', value: 'circle' },
|
|
|
|
+// { icon: '#l-to-lineDown', value: 'lineDown' },
|
|
|
|
+// { icon: '#l-to-lineUp', value: 'lineUp' },
|
|
|
|
+// { icon: '#l-to-triangleSolid', value: 'triangleSolid' },
|
|
|
|
+// { icon: '#l-to-diamondSolid', value: 'diamondSolid' },
|
|
|
|
+// { icon: '#l-to-circleSolid', value: 'circleSolid' },
|
|
|
|
+// { icon: '#l-to-line', value: 'line' },
|
|
|
|
+// ];
|
|
|
|
|
|
const changeFromArrow = (value: string) => {
|
|
const changeFromArrow = (value: string) => {
|
|
fromArrow.value = value;
|
|
fromArrow.value = value;
|
|
@@ -1504,6 +1504,14 @@ const deleteNetwork = (index: number) => {
|
|
const onOkNetwork = async () => {
|
|
const onOkNetwork = async () => {
|
|
const data = transformData(dataDialog.network,'toNetwork');
|
|
const data = transformData(dataDialog.network,'toNetwork');
|
|
if (dataDialog.editNetwork === 1) {
|
|
if (dataDialog.editNetwork === 1) {
|
|
|
|
+ if(!dataDialog.network.data.url) {
|
|
|
|
+ MessagePlugin.error('URL地址不能为空!');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(!dataDialog.network.name) {
|
|
|
|
+ MessagePlugin.error('名称不能为空!');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (dataDialog.save) {
|
|
if (dataDialog.save) {
|
|
const ret: any = await axios.post(
|
|
const ret: any = await axios.post(
|
|
`/api/data/datasource/add`,
|
|
`/api/data/datasource/add`,
|