update: 运维管理、数据采集 更换message组件
This commit is contained in:
parent
e74f8fa7aa
commit
fb51bda318
|
@ -125,7 +125,7 @@
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { query, remove, update } from '@/api/data-collect/channel';
|
import { query, remove, update } from '@/api/data-collect/channel';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import {
|
import {
|
||||||
TiTlePermissionButtonStyle,
|
TiTlePermissionButtonStyle,
|
||||||
StatusColorEnum,
|
StatusColorEnum,
|
||||||
|
@ -240,7 +240,7 @@ const getActions = (
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await update(data.id, updateStatus[state]);
|
const res = await update(data.id, updateStatus[state]);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -259,7 +259,7 @@ const getActions = (
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -286,7 +286,7 @@ const saveChange = (value: object) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -251,7 +251,7 @@ import {
|
||||||
removePoint,
|
removePoint,
|
||||||
readPoint,
|
readPoint,
|
||||||
} from '@/api/data-collect/collector';
|
} from '@/api/data-collect/collector';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import PointCardBox from './components/PointCardBox/index.vue';
|
import PointCardBox from './components/PointCardBox/index.vue';
|
||||||
import WritePoint from './components/WritePoint/index.vue';
|
import WritePoint from './components/WritePoint/index.vue';
|
||||||
import BatchUpdate from './components/BatchUpdate/index.vue';
|
import BatchUpdate from './components/BatchUpdate/index.vue';
|
||||||
|
@ -412,13 +412,13 @@ const handlDelete = async (id: string | undefined = undefined) => {
|
||||||
if (res?.status === 200) {
|
if (res?.status === 200) {
|
||||||
cancelSelect();
|
cancelSelect();
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
};
|
};
|
||||||
const handlBatchUpdate = () => {
|
const handlBatchUpdate = () => {
|
||||||
if (_selectedRowKeys.value.length === 0) {
|
if (_selectedRowKeys.value.length === 0) {
|
||||||
message.warn('请先选择');
|
onlyMessage('请先选择', 'warning');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const dataSet = new Set(_selectedRowKeys.value);
|
const dataSet = new Set(_selectedRowKeys.value);
|
||||||
|
@ -442,7 +442,7 @@ const clickRedo = async (data: any) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
cancelSelect();
|
cancelSelect();
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ const saveChange = (value: object) => {
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ import {
|
||||||
remove,
|
remove,
|
||||||
} from '@/api/data-collect/collector';
|
} from '@/api/data-collect/collector';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { Store } from 'jetlinks-store';
|
import { Store } from 'jetlinks-store';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { colorMap, getState } from '../data.ts';
|
import { colorMap, getState } from '../data.ts';
|
||||||
|
@ -173,14 +173,14 @@ const handlUpdate = async (data: any) => {
|
||||||
});
|
});
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
handleSearch(params.value);
|
handleSearch(params.value);
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handlDelete = async (id: string) => {
|
const handlDelete = async (id: string) => {
|
||||||
const resp = await remove(id);
|
const resp = await remove(id);
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
handleSearch(params.value);
|
handleSearch(params.value);
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -189,11 +189,11 @@ const saveChange = (value: object) => {
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
handleSearch(params.value);
|
handleSearch(params.value);
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSearch = async (value: string) => {
|
const handleSearch = async (value: any) => {
|
||||||
if (!searchValue.value && !value) {
|
if (!searchValue.value && !value) {
|
||||||
params.value = _.cloneDeep(defualtParams);
|
params.value = _.cloneDeep(defualtParams);
|
||||||
} else if (!!searchValue.value) {
|
} else if (!!searchValue.value) {
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
import { FIRMWARE_UPLOAD, querySystemApi } from '@/api/device/firmware';
|
import { FIRMWARE_UPLOAD, querySystemApi } from '@/api/device/firmware';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { notification as Notification } from 'ant-design-vue';
|
import { notification as Notification } from 'ant-design-vue';
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'update:extraValue', 'change']);
|
const emit = defineEmits(['update:modelValue', 'update:extraValue', 'change']);
|
||||||
|
@ -58,7 +58,7 @@ const handleChange = async (info: UploadChangeParam) => {
|
||||||
? api.result[0]?.properties['base-path']
|
? api.result[0]?.properties['base-path']
|
||||||
: '';
|
: '';
|
||||||
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
fileValue.value = f;
|
fileValue.value = f;
|
||||||
emit('update:modelValue', f);
|
emit('update:modelValue', f);
|
||||||
emit('update:extraValue', result);
|
emit('update:extraValue', result);
|
||||||
|
|
|
@ -328,7 +328,6 @@ const handleOk = async () => {
|
||||||
? await save(params).catch(() => {})
|
? await save(params).catch(() => {})
|
||||||
: await update({ ...props.data, ...params }).catch(() => {});
|
: await update({ ...props.data, ...params }).catch(() => {});
|
||||||
if (response?.status === 200) {
|
if (response?.status === 200) {
|
||||||
// message.success('操作成功');
|
|
||||||
onlyMessage('操作成功', 'success');
|
onlyMessage('操作成功', 'success');
|
||||||
|
|
||||||
emit('change', true);
|
emit('change', true);
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<script lang="ts" setup name="TaskPage">
|
<script lang="ts" setup name="TaskPage">
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { task, startTask, stopTask } from '@/api/device/firmware';
|
import { task, startTask, stopTask } from '@/api/device/firmware';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
const res = await stopTask(data.id);
|
const res = await stopTask(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -195,7 +195,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
const res = await startTask(data.id, ['canceled']);
|
const res = await startTask(data.id, ['canceled']);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -223,7 +223,7 @@ const saveChange = (value: boolean) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessChannel">
|
<script lang="ts" setup name="AccessChannel">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { update, save } from '@/api/link/accessConfig';
|
import { update, save } from '@/api/link/accessConfig';
|
||||||
import { ProtocolMapping } from '../../data';
|
import { ProtocolMapping } from '../../data';
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ const onFinish = async (values: any) => {
|
||||||
const resp =
|
const resp =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -310,7 +310,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessCloudCtwing">
|
<script lang="ts" setup name="AccessCloudCtwing">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
||||||
import { ProtocolMapping } from '../../data';
|
import { ProtocolMapping } from '../../data';
|
||||||
|
@ -409,7 +409,7 @@ const saveData = async () => {
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -446,7 +446,7 @@ const next = async () => {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
} else if (current.value === 1) {
|
} else if (current.value === 1) {
|
||||||
if (!procotolCurrent.value) {
|
if (!procotolCurrent.value) {
|
||||||
message.error('请选择消息协议!');
|
onlyMessage('请选择消息协议!', 'error');
|
||||||
} else {
|
} else {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -394,7 +394,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessCloudOneNet">
|
<script lang="ts" setup name="AccessCloudOneNet">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
||||||
import AccessCard from '../AccessCard/index.vue';
|
import AccessCard from '../AccessCard/index.vue';
|
||||||
|
@ -496,7 +496,7 @@ const saveData = async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -533,7 +533,7 @@ const next = async () => {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
} else if (current.value === 1) {
|
} else if (current.value === 1) {
|
||||||
if (!procotolCurrent.value) {
|
if (!procotolCurrent.value) {
|
||||||
message.error('请选择消息协议!');
|
onlyMessage('请选择消息协议!', 'error');
|
||||||
} else {
|
} else {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessEdge">
|
<script lang="ts" setup name="AccessEdge">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { update, save, getNetworkList } from '@/api/link/accessConfig';
|
import { update, save, getNetworkList } from '@/api/link/accessConfig';
|
||||||
import {
|
import {
|
||||||
|
@ -270,7 +270,7 @@ const onFinish = async (values: any) => {
|
||||||
const resp =
|
const resp =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -325,7 +325,7 @@ const addNetwork = () => {
|
||||||
|
|
||||||
const next = async () => {
|
const next = async () => {
|
||||||
if (!networkCurrent.value) {
|
if (!networkCurrent.value) {
|
||||||
message.error('请选择网络组件!');
|
onlyMessage('请选择网络组件!', 'error');
|
||||||
} else {
|
} else {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -520,10 +520,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessNetwork">
|
<script lang="ts" setup name="AccessNetwork">
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { getResourcesCurrent, getClusters } from '@/api/link/accessConfig';
|
import { getResourcesCurrent, getClusters } from '@/api/link/accessConfig';
|
||||||
import { update, save } from '@/api/link/accessConfig';
|
import { update, save } from '@/api/link/accessConfig';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
interface Form2 {
|
interface Form2 {
|
||||||
clusterNodeId: string | undefined;
|
clusterNodeId: string | undefined;
|
||||||
|
@ -663,7 +664,7 @@ const saveData = () => {
|
||||||
const resp =
|
const resp =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -85,8 +85,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessMedia">
|
<script lang="ts" setup name="AccessMedia">
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
|
||||||
import GB28181 from './GB28181.vue';
|
import GB28181 from './GB28181.vue';
|
||||||
import { update, save } from '@/api/link/accessConfig';
|
import { update, save } from '@/api/link/accessConfig';
|
||||||
|
|
||||||
|
@ -125,7 +124,7 @@ const onFinish = async (values: any) => {
|
||||||
const resp =
|
const resp =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -334,10 +334,10 @@ import {
|
||||||
ColumnsHTTP,
|
ColumnsHTTP,
|
||||||
} from '../../data';
|
} from '../../data';
|
||||||
import AccessCard from '../AccessCard/index.vue';
|
import AccessCard from '../AccessCard/index.vue';
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import type { FormInstance, TableColumnType } from 'ant-design-vue';
|
import type { FormInstance, TableColumnType } from 'ant-design-vue';
|
||||||
import Markdown from 'vue3-markdown-it';
|
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
function generateUUID() {
|
function generateUUID() {
|
||||||
|
@ -528,7 +528,7 @@ const saveData = () => {
|
||||||
? await save(params)
|
? await save(params)
|
||||||
: await update({ ...params, id });
|
: await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -538,14 +538,14 @@ const saveData = () => {
|
||||||
const next = async () => {
|
const next = async () => {
|
||||||
if (current.value === 0) {
|
if (current.value === 0) {
|
||||||
if (!networkCurrent.value) {
|
if (!networkCurrent.value) {
|
||||||
message.error('请选择网络组件!');
|
onlyMessage('请选择网络组件!', 'error');
|
||||||
} else {
|
} else {
|
||||||
queryProcotolList(props.provider.id);
|
queryProcotolList(props.provider.id);
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
}
|
}
|
||||||
} else if (current.value === 1) {
|
} else if (current.value === 1) {
|
||||||
if (!procotolCurrent.value) {
|
if (!procotolCurrent.value) {
|
||||||
message.error('请选择消息协议!');
|
onlyMessage('请选择消息协议!', 'error');
|
||||||
} else {
|
} else {
|
||||||
const resp =
|
const resp =
|
||||||
type !== 'child-device'
|
type !== 'child-device'
|
||||||
|
|
|
@ -174,7 +174,7 @@ import {
|
||||||
undeploy,
|
undeploy,
|
||||||
deploy,
|
deploy,
|
||||||
} from '@/api/link/accessConfig';
|
} from '@/api/link/accessConfig';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
import { TiTlePermissionButtonStyle } from './data';
|
import { TiTlePermissionButtonStyle } from './data';
|
||||||
|
|
||||||
|
@ -281,10 +281,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
: await deploy(data.id);
|
: await deploy(data.id);
|
||||||
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
} else {
|
|
||||||
message.error('操作失败!');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -301,10 +299,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
} else {
|
|
||||||
message.error('操作失败!');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -314,7 +310,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getProvidersList = async () => {
|
const getProvidersList = async () => {
|
||||||
const res = await getProviders();
|
const res: any = await getProviders();
|
||||||
providersList.value = res.result;
|
providersList.value = res.result;
|
||||||
};
|
};
|
||||||
getProvidersList();
|
getProvidersList();
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="CertificateFile">
|
<script setup lang="ts" name="CertificateFile">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { UploadChangeParam } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
|
@ -54,7 +54,7 @@ const loading = ref(false);
|
||||||
const handleChange = (info: UploadChangeParam) => {
|
const handleChange = (info: UploadChangeParam) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
const result = info.file.response?.result;
|
const result = info.file.response?.result;
|
||||||
keystoreBase64.value = result;
|
keystoreBase64.value = result;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
|
@ -101,12 +101,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="CertificateDetail">
|
<script lang="ts" setup name="CertificateDetail">
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import CertificateFile from './CertificateFile.vue';
|
import CertificateFile from './CertificateFile.vue';
|
||||||
import type { UploadChangeParam } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { save, update, queryDetail } from '@/api/link/certificate';
|
import { save, update, queryDetail } from '@/api/link/certificate';
|
||||||
import { FormDataType, TypeObjType } from '../type';
|
import { FormDataType, TypeObjType } from '../type';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -156,7 +157,7 @@ const onSubmit = () => {
|
||||||
? await save(params).catch(() => {})
|
? await save(params).catch(() => {})
|
||||||
: await update({ ...params, id }).catch(() => {});
|
: await update({ ...params, id }).catch(() => {});
|
||||||
if (response?.status === 200) {
|
if (response?.status === 200) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
router.push('/iot/link/certificate');
|
router.push('/iot/link/certificate');
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
@ -169,7 +170,7 @@ const onSubmit = () => {
|
||||||
const handleChange = (info: UploadChangeParam) => {
|
const handleChange = (info: UploadChangeParam) => {
|
||||||
fileLoading.value = true;
|
fileLoading.value = true;
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
const result = info.file.response?.result;
|
const result = info.file.response?.result;
|
||||||
formData.value.configs.cert = result;
|
formData.value.configs.cert = result;
|
||||||
fileLoading.value = false;
|
fileLoading.value = false;
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<script lang="ts" setup name="CertificatePage">
|
<script lang="ts" setup name="CertificatePage">
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { query, remove } from '@/api/link/certificate';
|
import { query, remove } from '@/api/link/certificate';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
|
@ -175,7 +175,7 @@ const handlEdit = (id: string) => {
|
||||||
const handlDelete = async (id: string) => {
|
const handlDelete = async (id: string) => {
|
||||||
const res = await remove(id);
|
const res = await remove(id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
import { PROTOCOL_UPLOAD, querySystemApi } from '@/api/link/protocol';
|
import { PROTOCOL_UPLOAD, querySystemApi } from '@/api/link/protocol';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
||||||
import { notification as Notification } from 'ant-design-vue';
|
import { notification as Notification } from 'ant-design-vue';
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
|
||||||
const arr = file.name.split('.');
|
const arr = file.name.split('.');
|
||||||
const isFile = ['jar', 'zip'].includes(arr[arr.length - 1]); // file.type === 'application/zip' || file.type === 'application/javj-archive'
|
const isFile = ['jar', 'zip'].includes(arr[arr.length - 1]); // file.type === 'application/zip' || file.type === 'application/javj-archive'
|
||||||
if (!isFile) {
|
if (!isFile) {
|
||||||
message.error('请上传.zip.jar格式的文件');
|
onlyMessage('请上传.zip.jar格式的文件', 'error');
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
return isFile;
|
return isFile;
|
||||||
|
@ -63,7 +63,7 @@ const handleChange = async (info: UploadChangeParam) => {
|
||||||
? api.result[0]?.properties['base-path']
|
? api.result[0]?.properties['base-path']
|
||||||
: '';
|
: '';
|
||||||
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
value.value = f;
|
value.value = f;
|
||||||
emit('update:modelValue', f);
|
emit('update:modelValue', f);
|
||||||
emit('change', f);
|
emit('change', f);
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import type { UploadChangeParam, FormInstance } from 'ant-design-vue';
|
import type { UploadChangeParam, FormInstance } from 'ant-design-vue';
|
||||||
import FileUpload from './FileUpload.vue';
|
import FileUpload from './FileUpload.vue';
|
||||||
|
@ -153,7 +153,7 @@ const onSubmit = async () => {
|
||||||
const handleChange = (info: UploadChangeParam) => {
|
const handleChange = (info: UploadChangeParam) => {
|
||||||
fileLoading.value = true;
|
fileLoading.value = true;
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
const result = info.file.response?.result;
|
const result = info.file.response?.result;
|
||||||
formData.value.configuration.location = result;
|
formData.value.configuration.location = result;
|
||||||
fileLoading.value = false;
|
fileLoading.value = false;
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { list, remove } from '@/api/link/protocol';
|
import { list, remove } from '@/api/link/protocol';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
|
@ -230,10 +230,8 @@ const getActions = (
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
} else {
|
|
||||||
message.error('操作失败!');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -256,7 +254,7 @@ const saveChange = (value: object) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -974,7 +974,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessNetwork">
|
<script lang="ts" setup name="AccessNetwork">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import {
|
import {
|
||||||
update,
|
update,
|
||||||
|
@ -1153,7 +1153,7 @@ const saveData = async () => {
|
||||||
? await save(params).catch(() => {})
|
? await save(params).catch(() => {})
|
||||||
: await update({ ...params, id }).catch(() => {});
|
: await update({ ...params, id }).catch(() => {});
|
||||||
if (resp?.status === 200) {
|
if (resp?.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
if ((window as any).onTabSaveSuccess) {
|
if ((window as any).onTabSaveSuccess) {
|
||||||
if (resp.result?.id) {
|
if (resp.result?.id) {
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { supports, query, remove, start, shutdown } from '@/api/link/type';
|
import { supports, query, remove, start, shutdown } from '@/api/link/type';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { TiTlePermissionButtonStyle } from './data';
|
import { TiTlePermissionButtonStyle } from './data';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ const getActions = (
|
||||||
? await shutdown(data.id)
|
? await shutdown(data.id)
|
||||||
: await start(data.id);
|
: await start(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -318,7 +318,7 @@ const getActions = (
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -263,7 +263,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="StreamDetail">
|
<script lang="ts" setup name="StreamDetail">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { queryProviders, queryDetail, save, update } from '@/api/media/stream';
|
import { queryProviders, queryDetail, save, update } from '@/api/media/stream';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ const onSubmit = async () => {
|
||||||
const response =
|
const response =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
router.push('/iot/link/Stream');
|
router.push('/iot/link/Stream');
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { query, remove, disable, enalbe } from '@/api/media/stream';
|
import { query, remove, disable, enalbe } from '@/api/media/stream';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
|
@ -213,7 +213,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
? await disable(data.id)
|
? await disable(data.id)
|
||||||
: await enalbe(data.id);
|
: await enalbe(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -231,7 +231,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue