Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev
This commit is contained in:
commit
6a9e08e7a7
|
@ -1,14 +1,17 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { systemVersion } from '@/api/comm'
|
||||
import { useMenuStore } from './menu'
|
||||
import { getDetails_api } from '@/api/system/basis';
|
||||
|
||||
export const useSystem = defineStore('system', {
|
||||
state: () => ({
|
||||
isCommunity: false
|
||||
isCommunity: false,
|
||||
configInfo: [] as any[]
|
||||
}),
|
||||
actions: {
|
||||
getSystemVersion(): Promise<any[]> {
|
||||
return new Promise(async(res, rej) => {
|
||||
this.getSystemConfig();
|
||||
return new Promise(async (res, rej) => {
|
||||
const resp = await systemVersion()
|
||||
if (resp.success && resp.result) {
|
||||
const isCommunity = resp.result.edition === 'community'
|
||||
|
@ -19,6 +22,12 @@ export const useSystem = defineStore('system', {
|
|||
res(menuData)
|
||||
}
|
||||
})
|
||||
},
|
||||
getSystemConfig() {
|
||||
const params = ['front', 'amap', 'paths'];
|
||||
getDetails_api(params).then(({ status, result }: any) => {
|
||||
this.configInfo = status === 200 ? [...result] : [];
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
|
@ -37,19 +37,6 @@ export const updateStatus = {
|
|||
},
|
||||
};
|
||||
|
||||
export const TiTlePermissionButtonStyle = {
|
||||
padding: 0,
|
||||
'max-width': 'calc(100% - 90px)',
|
||||
color: ' #1890ff !important',
|
||||
'font-weight': 700,
|
||||
'font-size': '16px',
|
||||
overflow: 'hidden',
|
||||
'text-overflow': 'ellipsis',
|
||||
'white-space': 'nowrap',
|
||||
width: 'calc(100%-150px)',
|
||||
// width: '60%',
|
||||
};
|
||||
|
||||
export const regOnlyNumber = new RegExp(/^\d+$/);
|
||||
|
||||
export const regIP = new RegExp(
|
||||
|
|
|
@ -45,15 +45,16 @@
|
|||
</template>
|
||||
<template #content>
|
||||
<div class="card-item-content">
|
||||
<PermissionButton
|
||||
type="link"
|
||||
@click="handlEye(slotProps.id)"
|
||||
hasPermission="DataCollect/Collector:view"
|
||||
:style="TiTlePermissionButtonStyle"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</PermissionButton>
|
||||
|
||||
<Ellipsis style="width: calc(100% - 100px)">
|
||||
<span
|
||||
style="
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</span>
|
||||
</Ellipsis>
|
||||
<j-row class="card-item-content-box">
|
||||
<j-col :span="12">
|
||||
<div class="card-item-content-text">
|
||||
|
@ -125,12 +126,8 @@
|
|||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import { query, remove, update } from '@/api/data-collect/channel';
|
||||
import { message } from 'ant-design-vue';
|
||||
import {
|
||||
TiTlePermissionButtonStyle,
|
||||
StatusColorEnum,
|
||||
updateStatus,
|
||||
} from './data';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { StatusColorEnum, updateStatus } from './data';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
import Save from './Save/index.vue';
|
||||
import _ from 'lodash';
|
||||
|
@ -240,7 +237,7 @@ const getActions = (
|
|||
onConfirm: async () => {
|
||||
const res = await update(data.id, updateStatus[state]);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value?.reload();
|
||||
}
|
||||
},
|
||||
|
@ -259,7 +256,7 @@ const getActions = (
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
@ -279,14 +276,11 @@ const handlEdit = (data: object) => {
|
|||
current.value = _.cloneDeep(data);
|
||||
visible.value = true;
|
||||
};
|
||||
const handlEye = (id: string) => {
|
||||
menuStory.jumpPage(`DataCollect/Collector`, {}, { channelId: id });
|
||||
};
|
||||
const saveChange = (value: object) => {
|
||||
visible.value = false;
|
||||
current.value = {};
|
||||
if (value) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -193,13 +193,13 @@
|
|||
/>
|
||||
</j-form-item>
|
||||
|
||||
<a-form-item label="" :name="['features']">
|
||||
<a-checkbox-group v-model:value="formData.features">
|
||||
<a-checkbox value="changedOnly" name="type"
|
||||
>只推送变化的数据</a-checkbox
|
||||
<j-form-item label="" :name="['features']">
|
||||
<j-checkbox-group v-model:value="formData.features">
|
||||
<j-checkbox value="changedOnly" name="type"
|
||||
>只推送变化的数据</j-checkbox
|
||||
>
|
||||
</a-checkbox-group>
|
||||
</a-form-item>
|
||||
</j-checkbox-group>
|
||||
</j-form-item>
|
||||
|
||||
<j-form-item label="说明" :name="['description']">
|
||||
<j-textarea
|
||||
|
|
|
@ -63,13 +63,13 @@
|
|||
addon-after="ms"
|
||||
/>
|
||||
</j-form-item>
|
||||
<a-form-item label="" :name="['features']">
|
||||
<a-checkbox-group v-model:value="formData.features">
|
||||
<a-checkbox value="changedOnly" name="type"
|
||||
>只推送变化的数据</a-checkbox
|
||||
<j-form-item label="" :name="['features']">
|
||||
<j-checkbox-group v-model:value="formData.features">
|
||||
<j-checkbox value="changedOnly" name="type"
|
||||
>只推送变化的数据</j-checkbox
|
||||
>
|
||||
</a-checkbox-group>
|
||||
</a-form-item>
|
||||
</j-checkbox-group>
|
||||
</j-form-item>
|
||||
<j-form-item label="说明" :name="['description']">
|
||||
<j-textarea
|
||||
placeholder="请输入说明"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
>
|
||||
<template #bodyCell="{ column: { dataIndex }, record, index }">
|
||||
<template v-if="dataIndex === 'name'">
|
||||
<a-form-item
|
||||
<j-form-item
|
||||
:name="['dataSource', index, 'name']"
|
||||
:rules="[
|
||||
{
|
||||
|
@ -21,20 +21,20 @@
|
|||
placeholder="请输入"
|
||||
allowClear
|
||||
></j-input>
|
||||
</a-form-item>
|
||||
</j-form-item>
|
||||
</template>
|
||||
<template v-if="dataIndex === 'id'">
|
||||
<a-form-item :name="['dataSource', index, 'id']">
|
||||
<j-form-item :name="['dataSource', index, 'id']">
|
||||
<j-input
|
||||
v-model:value="record[dataIndex]"
|
||||
disabled
|
||||
:bordered="false"
|
||||
></j-input>
|
||||
</a-form-item>
|
||||
</j-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="dataIndex === 'accessModes'">
|
||||
<a-form-item
|
||||
<j-form-item
|
||||
class="form-item"
|
||||
:name="['dataSource', index, 'accessModes', 'value']"
|
||||
:rules="[
|
||||
|
@ -67,10 +67,10 @@
|
|||
@click="changeCheckbox(index, dataIndex)"
|
||||
>同上</j-checkbox
|
||||
>
|
||||
</a-form-item>
|
||||
</j-form-item>
|
||||
</template>
|
||||
<template v-if="dataIndex === 'interval'">
|
||||
<a-form-item
|
||||
<j-form-item
|
||||
class="form-item"
|
||||
:name="[
|
||||
'dataSource',
|
||||
|
@ -113,10 +113,10 @@
|
|||
@click="changeCheckbox(index, dataIndex)"
|
||||
>同上</j-checkbox
|
||||
>
|
||||
</a-form-item>
|
||||
</j-form-item>
|
||||
</template>
|
||||
<template v-if="dataIndex === 'features'">
|
||||
<a-form-item
|
||||
<j-form-item
|
||||
class="form-item"
|
||||
:name="['dataSource', index, 'features', 'value']"
|
||||
:rules="[
|
||||
|
@ -154,7 +154,7 @@
|
|||
@click="changeCheckbox(index, dataIndex)"
|
||||
>同上</j-checkbox
|
||||
>
|
||||
</a-form-item>
|
||||
</j-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="dataIndex === 'action'">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<j-checkbox v-model:checked="isSelected">隐藏已有节点</j-checkbox>
|
||||
</div>
|
||||
<j-spin :spinning="spinning">
|
||||
<a-tree
|
||||
<j-tree
|
||||
v-if="!!treeData"
|
||||
:load-data="onLoadData"
|
||||
:tree-data="treeData"
|
||||
|
@ -25,7 +25,7 @@
|
|||
{{ name }}
|
||||
</span>
|
||||
</template>
|
||||
</a-tree>
|
||||
</j-tree>
|
||||
<j-empty v-else />
|
||||
</j-spin>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<template lang="">
|
||||
<template>
|
||||
<j-modal
|
||||
title="批量编辑"
|
||||
:visible="true"
|
||||
|
@ -6,9 +6,8 @@
|
|||
@cancel="handleCancel"
|
||||
>
|
||||
<div class="sizeText">
|
||||
将批量修改{{
|
||||
data.length
|
||||
}}条数据的访问类型、采集频率、只推送变化的数据
|
||||
将批量修改
|
||||
{{ data.length }} 条数据的访问类型、采集频率、只推送变化的数据
|
||||
</div>
|
||||
<j-form
|
||||
class="form"
|
||||
|
@ -62,13 +61,13 @@
|
|||
/>
|
||||
</j-form-item>
|
||||
|
||||
<a-form-item label="" :name="['features']">
|
||||
<a-checkbox-group v-model:value="formData.features">
|
||||
<a-checkbox value="changedOnly" name="type"
|
||||
>只推送变化的数据</a-checkbox
|
||||
<j-form-item :name="['features']">
|
||||
<j-checkbox-group v-model:value="formData.features">
|
||||
<j-checkbox value="changedOnly" name="type"
|
||||
>只推送变化的数据</j-checkbox
|
||||
>
|
||||
</a-checkbox-group>
|
||||
</a-form-item>
|
||||
</j-checkbox-group>
|
||||
</j-form-item>
|
||||
</j-form>
|
||||
<template #footer>
|
||||
<j-button key="back" @click="handleCancel">取消</j-button>
|
||||
|
@ -119,7 +118,7 @@ const checkLength = (_rule: Rule, value: string): Promise<any> =>
|
|||
});
|
||||
|
||||
const handleOk = async () => {
|
||||
const data: any = await formRef.value?.validate();
|
||||
const data = cloneDeep(formData.value);
|
||||
const { accessModes, features, interval } = data;
|
||||
const ischange =
|
||||
accessModes.length !== 0 || features.length !== 0 || !!interval;
|
||||
|
|
|
@ -251,7 +251,7 @@ import {
|
|||
removePoint,
|
||||
readPoint,
|
||||
} from '@/api/data-collect/collector';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import PointCardBox from './components/PointCardBox/index.vue';
|
||||
import WritePoint from './components/WritePoint/index.vue';
|
||||
import BatchUpdate from './components/BatchUpdate/index.vue';
|
||||
|
@ -412,13 +412,13 @@ const handlDelete = async (id: string | undefined = undefined) => {
|
|||
if (res?.status === 200) {
|
||||
cancelSelect();
|
||||
tableRef.value?.reload();
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
spinning.value = false;
|
||||
};
|
||||
const handlBatchUpdate = () => {
|
||||
if (_selectedRowKeys.value.length === 0) {
|
||||
message.warn('请先选择');
|
||||
onlyMessage('请先选择', 'warning');
|
||||
return;
|
||||
}
|
||||
const dataSet = new Set(_selectedRowKeys.value);
|
||||
|
@ -442,7 +442,7 @@ const clickRedo = async (data: any) => {
|
|||
if (res.status === 200) {
|
||||
cancelSelect();
|
||||
tableRef.value?.reload();
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -479,7 +479,7 @@ const saveChange = (value: object) => {
|
|||
current.value = {};
|
||||
if (value) {
|
||||
tableRef.value?.reload();
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="tree-container">
|
||||
<a-input-search
|
||||
<j-input-search
|
||||
v-model:value="searchValue"
|
||||
style="margin-bottom: 8px"
|
||||
placeholder="请输入"
|
||||
|
@ -106,7 +106,7 @@ import {
|
|||
remove,
|
||||
} from '@/api/data-collect/collector';
|
||||
import Save from './Save/index.vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { Store } from 'jetlinks-store';
|
||||
import _ from 'lodash';
|
||||
import { colorMap, getState } from '../data.ts';
|
||||
|
@ -173,14 +173,14 @@ const handlUpdate = async (data: any) => {
|
|||
});
|
||||
if (resp.status === 200) {
|
||||
handleSearch(params.value);
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
const handlDelete = async (id: string) => {
|
||||
const resp = await remove(id);
|
||||
if (resp.status === 200) {
|
||||
handleSearch(params.value);
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -189,11 +189,11 @@ const saveChange = (value: object) => {
|
|||
current.value = {};
|
||||
if (value) {
|
||||
handleSearch(params.value);
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (value: string) => {
|
||||
const handleSearch = async (value: any) => {
|
||||
if (!searchValue.value && !value) {
|
||||
params.value = _.cloneDeep(defualtParams);
|
||||
} else if (!!searchValue.value) {
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
import { LocalStore } from '@/utils/comm';
|
||||
import { TOKEN_KEY } from '@/utils/variable';
|
||||
import { FIRMWARE_UPLOAD, querySystemApi } from '@/api/device/firmware';
|
||||
import { message } from 'ant-design-vue';
|
||||
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import type { UploadChangeParam } from 'ant-design-vue';
|
||||
import { notification as Notification } from 'ant-design-vue';
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'update:extraValue', 'change']);
|
||||
|
@ -53,12 +53,12 @@ const handleChange = async (info: UploadChangeParam) => {
|
|||
if (info.file.status === 'done') {
|
||||
loading.value = false;
|
||||
const result = info.file.response?.result;
|
||||
const api: any = await querySystemApi(['paths']);
|
||||
const api: any = await querySystemApi(['paths']); // todo base-path在pinia获取系统配置的
|
||||
const path = api.result[0]?.properties
|
||||
? api.result[0]?.properties['base-path']
|
||||
: '';
|
||||
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
fileValue.value = f;
|
||||
emit('update:modelValue', f);
|
||||
emit('update:extraValue', result);
|
||||
|
|
|
@ -201,6 +201,7 @@ import {
|
|||
} from '@/api/device/firmware';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import type { Properties } from '../type';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
const formRef = ref<FormInstance>();
|
||||
const dynamicValidateForm = reactive<{ properties: Properties[] }>({
|
||||
|
@ -327,7 +328,8 @@ const handleOk = async () => {
|
|||
? await save(params).catch(() => {})
|
||||
: await update({ ...props.data, ...params }).catch(() => {});
|
||||
if (response?.status === 200) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
|
||||
emit('change', true);
|
||||
}
|
||||
loading.value = false;
|
||||
|
|
|
@ -55,7 +55,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<Search :columns="columns" target="search" @search="handleSearch" />
|
||||
<pro-search
|
||||
:columns="columns"
|
||||
target="search"
|
||||
@search="handleSearch"
|
||||
/>
|
||||
<j-pro-table
|
||||
ref="tableRef"
|
||||
model="TABLE"
|
||||
|
@ -129,6 +133,7 @@ import { getImage } from '@/utils/comm';
|
|||
import moment from 'moment';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import Save from './Save.vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
const tableRef = ref<Record<string, any>>({});
|
||||
const route = useRoute();
|
||||
|
@ -313,7 +318,7 @@ const handlEye = (data: string) => {
|
|||
const handlTry = async (id: string) => {
|
||||
const res = await startOneTask([id]);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
@ -324,7 +329,7 @@ const saveChange = (value: boolean) => {
|
|||
const confirm = async (e: MouseEvent) => {
|
||||
const res = await startTask(taskId, ['failed']);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
handleRefresh('failed');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
|
|
|
@ -233,10 +233,15 @@ const handleOk = () => {
|
|||
visible.value = false;
|
||||
};
|
||||
|
||||
const updateSelect = (selectedRowKeys: T[]) =>
|
||||
selectedRowKeys
|
||||
const updateSelect = (selectedRowKeys: T[]) => {
|
||||
let selectedRowLabel: any = selectedRowKeys
|
||||
.map((item) => checkAllDataMap.has(item) && checkAllDataMap.get(item))
|
||||
.toString();
|
||||
if (selectedRowLabel === 'false') {
|
||||
selectedRowLabel = selectedRowKeys;
|
||||
}
|
||||
return selectedRowLabel;
|
||||
};
|
||||
|
||||
const onVisible = () => {
|
||||
!props.data.view && (visible.value = true);
|
||||
|
@ -258,6 +263,7 @@ onMounted(() => {
|
|||
if (props.data.id) {
|
||||
checkLable.value = updateSelect(props.data.deviceId);
|
||||
emit('update:modelValue', props.data.deviceId);
|
||||
console.log(111, checkLable.value, props.data.deviceId);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<script lang="ts" setup name="TaskPage">
|
||||
import type { ActionsType } from '@/components/Table/index';
|
||||
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 { useMenuStore } from 'store/menu';
|
||||
|
||||
|
@ -179,7 +179,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
onClick: async () => {
|
||||
const res = await stopTask(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
@ -195,7 +195,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
onClick: async () => {
|
||||
const res = await startTask(data.id, ['canceled']);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
@ -223,7 +223,7 @@ const saveChange = (value: boolean) => {
|
|||
visible.value = false;
|
||||
current.value = {};
|
||||
if (value) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -74,6 +74,7 @@ import _ from 'lodash';
|
|||
import Save from './Save/index.vue';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
import type { FormDataType } from './type';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
|
||||
|
@ -233,7 +234,7 @@ const saveChange = (value: FormDataType) => {
|
|||
visible.value = false;
|
||||
current.value = {};
|
||||
if (value) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
@ -241,7 +242,7 @@ const saveChange = (value: FormDataType) => {
|
|||
const handlDelete = async (id: string) => {
|
||||
const res = await remove(id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
</template>
|
||||
|
||||
<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 { ProtocolMapping } from '../../data';
|
||||
|
||||
|
@ -131,7 +131,7 @@ const onFinish = async (values: any) => {
|
|||
const resp =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -310,7 +310,7 @@
|
|||
</template>
|
||||
|
||||
<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 { update, save, getProtocolList } from '@/api/link/accessConfig';
|
||||
import { ProtocolMapping } from '../../data';
|
||||
|
@ -409,7 +409,7 @@ const saveData = async () => {
|
|||
id,
|
||||
});
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
@ -446,7 +446,7 @@ const next = async () => {
|
|||
current.value = current.value + 1;
|
||||
} else if (current.value === 1) {
|
||||
if (!procotolCurrent.value) {
|
||||
message.error('请选择消息协议!');
|
||||
onlyMessage('请选择消息协议!', 'error');
|
||||
} else {
|
||||
current.value = current.value + 1;
|
||||
}
|
||||
|
|
|
@ -394,7 +394,7 @@
|
|||
</template>
|
||||
|
||||
<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 { update, save, getProtocolList } from '@/api/link/accessConfig';
|
||||
import AccessCard from '../AccessCard/index.vue';
|
||||
|
@ -496,7 +496,7 @@ const saveData = async () => {
|
|||
});
|
||||
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
@ -533,7 +533,7 @@ const next = async () => {
|
|||
current.value = current.value + 1;
|
||||
} else if (current.value === 1) {
|
||||
if (!procotolCurrent.value) {
|
||||
message.error('请选择消息协议!');
|
||||
onlyMessage('请选择消息协议!', 'error');
|
||||
} else {
|
||||
current.value = current.value + 1;
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@
|
|||
</template>
|
||||
|
||||
<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 { update, save, getNetworkList } from '@/api/link/accessConfig';
|
||||
import {
|
||||
|
@ -270,7 +270,7 @@ const onFinish = async (values: any) => {
|
|||
const resp =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
@ -325,7 +325,7 @@ const addNetwork = () => {
|
|||
|
||||
const next = async () => {
|
||||
if (!networkCurrent.value) {
|
||||
message.error('请选择网络组件!');
|
||||
onlyMessage('请选择网络组件!', 'error');
|
||||
} else {
|
||||
current.value = current.value + 1;
|
||||
}
|
||||
|
|
|
@ -520,10 +520,11 @@
|
|||
</template>
|
||||
|
||||
<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 { getResourcesCurrent, getClusters } from '@/api/link/accessConfig';
|
||||
import { update, save } from '@/api/link/accessConfig';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
interface Form2 {
|
||||
clusterNodeId: string | undefined;
|
||||
|
@ -663,7 +664,7 @@ const saveData = () => {
|
|||
const resp =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -85,8 +85,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="AccessMedia">
|
||||
import { message, Form } from 'ant-design-vue';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import GB28181 from './GB28181.vue';
|
||||
import { update, save } from '@/api/link/accessConfig';
|
||||
|
||||
|
@ -125,7 +124,7 @@ const onFinish = async (values: any) => {
|
|||
const resp =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -334,10 +334,10 @@ import {
|
|||
ColumnsHTTP,
|
||||
} from '../../data';
|
||||
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 Markdown from 'vue3-markdown-it';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
function generateUUID() {
|
||||
|
@ -528,7 +528,7 @@ const saveData = () => {
|
|||
? await save(params)
|
||||
: await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
})
|
||||
|
@ -538,14 +538,14 @@ const saveData = () => {
|
|||
const next = async () => {
|
||||
if (current.value === 0) {
|
||||
if (!networkCurrent.value) {
|
||||
message.error('请选择网络组件!');
|
||||
onlyMessage('请选择网络组件!', 'error');
|
||||
} else {
|
||||
queryProcotolList(props.provider.id);
|
||||
current.value = current.value + 1;
|
||||
}
|
||||
} else if (current.value === 1) {
|
||||
if (!procotolCurrent.value) {
|
||||
message.error('请选择消息协议!');
|
||||
onlyMessage('请选择消息协议!', 'error');
|
||||
} else {
|
||||
const resp =
|
||||
type !== 'child-device'
|
||||
|
|
|
@ -115,17 +115,6 @@ const ColumnsHTTP = [
|
|||
},
|
||||
];
|
||||
|
||||
const TiTlePermissionButtonStyle = {
|
||||
padding: 0,
|
||||
'max-width': 'calc(100% - 90px)',
|
||||
color: ' #1890ff !important',
|
||||
'font-weight': 700,
|
||||
'font-size': '16px',
|
||||
overflow: 'hidden',
|
||||
'text-overflow': 'ellipsis',
|
||||
'white-space': 'nowrap',
|
||||
};
|
||||
|
||||
export {
|
||||
NetworkTypeMapping,
|
||||
ProtocolMapping,
|
||||
|
@ -133,5 +122,4 @@ export {
|
|||
descriptionList,
|
||||
ColumnsMQTT,
|
||||
ColumnsHTTP,
|
||||
TiTlePermissionButtonStyle,
|
||||
};
|
||||
|
|
|
@ -53,15 +53,23 @@
|
|||
</template>
|
||||
<template #content>
|
||||
<div class="card-item-content">
|
||||
<PermissionButton
|
||||
type="link"
|
||||
@click="handlEye(slotProps.id)"
|
||||
hasPermission="link/AccessConfig:view"
|
||||
:style="TiTlePermissionButtonStyle"
|
||||
<Ellipsis
|
||||
style="
|
||||
width: calc(100% - 100px);
|
||||
margin-bottom: 10px;
|
||||
color: #2f54eb;
|
||||
"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</PermissionButton>
|
||||
|
||||
<span
|
||||
style="
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
"
|
||||
@click.stop="handlEye(slotProps.id)"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</span>
|
||||
</Ellipsis>
|
||||
<j-row class="card-item-content-box">
|
||||
<j-col
|
||||
:span="12"
|
||||
|
@ -174,9 +182,8 @@ import {
|
|||
undeploy,
|
||||
deploy,
|
||||
} from '@/api/link/accessConfig';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
import { TiTlePermissionButtonStyle } from './data';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
const tableRef = ref<Record<string, any>>({});
|
||||
|
@ -281,10 +288,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
: await deploy(data.id);
|
||||
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value?.reload();
|
||||
} else {
|
||||
message.error('操作失败!');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -301,10 +306,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
} else {
|
||||
message.error('操作失败!');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -314,7 +317,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
};
|
||||
|
||||
const getProvidersList = async () => {
|
||||
const res = await getProviders();
|
||||
const res: any = await getProviders();
|
||||
providersList.value = res.result;
|
||||
};
|
||||
getProvidersList();
|
||||
|
@ -372,15 +375,6 @@ const handleSearch = (e: any) => {
|
|||
|
||||
.card-item-content {
|
||||
min-height: 100px;
|
||||
|
||||
.card-item-content-title-a {
|
||||
color: #1890ff !important;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
overflow: hidden; //超出的文本隐藏
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap; //溢出不换行
|
||||
}
|
||||
.card-item-content-box {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</template>
|
||||
|
||||
<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 { LocalStore } from '@/utils/comm';
|
||||
import { TOKEN_KEY } from '@/utils/variable';
|
||||
|
@ -54,7 +54,7 @@ const loading = ref(false);
|
|||
const handleChange = (info: UploadChangeParam) => {
|
||||
loading.value = true;
|
||||
if (info.file.status === 'done') {
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
const result = info.file.response?.result;
|
||||
keystoreBase64.value = result;
|
||||
loading.value = false;
|
||||
|
|
|
@ -101,12 +101,13 @@
|
|||
</template>
|
||||
|
||||
<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 CertificateFile from './CertificateFile.vue';
|
||||
import type { UploadChangeParam } from 'ant-design-vue';
|
||||
import { save, update, queryDetail } from '@/api/link/certificate';
|
||||
import { FormDataType, TypeObjType } from '../type';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
@ -156,7 +157,7 @@ const onSubmit = () => {
|
|||
? await save(params).catch(() => {})
|
||||
: await update({ ...params, id }).catch(() => {});
|
||||
if (response?.status === 200) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
router.push('/iot/link/certificate');
|
||||
}
|
||||
loading.value = false;
|
||||
|
@ -169,7 +170,7 @@ const onSubmit = () => {
|
|||
const handleChange = (info: UploadChangeParam) => {
|
||||
fileLoading.value = true;
|
||||
if (info.file.status === 'done') {
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
const result = info.file.response?.result;
|
||||
formData.value.configs.cert = result;
|
||||
fileLoading.value = false;
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<script lang="ts" setup name="CertificatePage">
|
||||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { query, remove } from '@/api/link/certificate';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
|
@ -175,7 +175,7 @@ const handlEdit = (id: string) => {
|
|||
const handlDelete = async (id: string) => {
|
||||
const res = await remove(id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
import { LocalStore } from '@/utils/comm';
|
||||
import { TOKEN_KEY } from '@/utils/variable';
|
||||
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 { notification as Notification } from 'ant-design-vue';
|
||||
|
||||
|
@ -48,7 +48,7 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
|
|||
const arr = file.name.split('.');
|
||||
const isFile = ['jar', 'zip'].includes(arr[arr.length - 1]); // file.type === 'application/zip' || file.type === 'application/javj-archive'
|
||||
if (!isFile) {
|
||||
message.error('请上传.zip.jar格式的文件');
|
||||
onlyMessage('请上传.zip.jar格式的文件', 'error');
|
||||
loading.value = false;
|
||||
}
|
||||
return isFile;
|
||||
|
@ -58,12 +58,12 @@ const handleChange = async (info: UploadChangeParam) => {
|
|||
if (info.file.status === 'done') {
|
||||
loading.value = false;
|
||||
const result = info.file.response?.result;
|
||||
const api: any = await querySystemApi(['paths']);
|
||||
const api: any = await querySystemApi(['paths']); // todo base-path在pinia获取系统配置的
|
||||
const path = api.result[0]?.properties
|
||||
? api.result[0]?.properties['base-path']
|
||||
: '';
|
||||
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
value.value = f;
|
||||
emit('update:modelValue', f);
|
||||
emit('change', f);
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
</j-modal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import type { UploadChangeParam, FormInstance } from 'ant-design-vue';
|
||||
import FileUpload from './FileUpload.vue';
|
||||
|
@ -153,7 +153,7 @@ const onSubmit = async () => {
|
|||
const handleChange = (info: UploadChangeParam) => {
|
||||
fileLoading.value = true;
|
||||
if (info.file.status === 'done') {
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
const result = info.file.response?.result;
|
||||
formData.value.configuration.location = result;
|
||||
fileLoading.value = false;
|
||||
|
|
|
@ -40,16 +40,21 @@
|
|||
</template>
|
||||
<template #content>
|
||||
<div class="card-item-content">
|
||||
<j-tooltip>
|
||||
<template #title>
|
||||
{{ slotProps.name }}
|
||||
</template>
|
||||
<h3
|
||||
class="card-item-content-title card-item-content-title-a"
|
||||
<Ellipsis
|
||||
style="
|
||||
width: calc(100% - 100px);
|
||||
margin-bottom: 10px;
|
||||
"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</h3>
|
||||
</j-tooltip>
|
||||
</span>
|
||||
</Ellipsis>
|
||||
<j-row class="card-item-content-box">
|
||||
<j-col
|
||||
:span="12"
|
||||
|
@ -138,7 +143,7 @@
|
|||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { getImage } from '@/utils/comm';
|
||||
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 _ from 'lodash';
|
||||
|
||||
|
@ -230,10 +235,8 @@ const getActions = (
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
} else {
|
||||
message.error('操作失败!');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -256,7 +259,7 @@ const saveChange = (value: object) => {
|
|||
visible.value = false;
|
||||
current.value = {};
|
||||
if (value) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
@ -293,14 +296,6 @@ const handleSearch = (e: any) => {
|
|||
.card-item-content {
|
||||
min-height: 100px;
|
||||
|
||||
.card-item-content-title-a {
|
||||
color: #000 !important;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
overflow: hidden; //超出的文本隐藏
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap; //溢出不换行
|
||||
}
|
||||
.card-item-content-box {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
|
|
@ -974,7 +974,7 @@
|
|||
</template>
|
||||
|
||||
<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 {
|
||||
update,
|
||||
|
@ -1153,7 +1153,7 @@ const saveData = async () => {
|
|||
? await save(params).catch(() => {})
|
||||
: await update({ ...params, id }).catch(() => {});
|
||||
if (resp?.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
if ((window as any).onTabSaveSuccess) {
|
||||
if (resp.result?.id) {
|
||||
|
|
|
@ -307,14 +307,3 @@ export const Rules = {
|
|||
},
|
||||
],
|
||||
};
|
||||
|
||||
export const TiTlePermissionButtonStyle = {
|
||||
padding: 0,
|
||||
'max-width': 'calc(100% - 90px)',
|
||||
color: ' #1890ff !important',
|
||||
'font-weight': 700,
|
||||
'font-size': '16px',
|
||||
overflow: 'hidden',
|
||||
'text-overflow': 'ellipsis',
|
||||
'white-space': 'nowrap',
|
||||
};
|
||||
|
|
|
@ -52,14 +52,23 @@
|
|||
</template>
|
||||
<template #content>
|
||||
<div class="card-item-content">
|
||||
<PermissionButton
|
||||
type="link"
|
||||
@click="handlEye(slotProps.id)"
|
||||
hasPermission="link/Type:view"
|
||||
:style="TiTlePermissionButtonStyle"
|
||||
<Ellipsis
|
||||
style="
|
||||
width: calc(100% - 100px);
|
||||
margin-bottom: 10px;
|
||||
color: #2f54eb;
|
||||
"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</PermissionButton>
|
||||
<span
|
||||
style="
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
"
|
||||
@click.stop="handlEye(slotProps.id)"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</span>
|
||||
</Ellipsis>
|
||||
<j-row class="card-item-content-box">
|
||||
<j-col :span="12">
|
||||
<div class="card-item-content-text">
|
||||
|
@ -165,8 +174,7 @@
|
|||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import { supports, query, remove, start, shutdown } from '@/api/link/type';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { TiTlePermissionButtonStyle } from './data';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
|
@ -299,7 +307,7 @@ const getActions = (
|
|||
? await shutdown(data.id)
|
||||
: await start(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value?.reload();
|
||||
}
|
||||
},
|
||||
|
@ -318,7 +326,7 @@ const getActions = (
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -263,7 +263,7 @@
|
|||
</template>
|
||||
|
||||
<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 type { FormInstance } from 'ant-design-vue';
|
||||
|
||||
|
@ -316,7 +316,7 @@ const onSubmit = async () => {
|
|||
const response =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (response.status === 200) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
router.push('/iot/link/Stream');
|
||||
}
|
||||
loading.value = false;
|
||||
|
|
|
@ -54,12 +54,23 @@
|
|||
</template>
|
||||
<template #content>
|
||||
<div class="card-item-content">
|
||||
<h3
|
||||
@click="handlEye(slotProps.id)"
|
||||
class="card-item-content-title card-item-content-title-a"
|
||||
<Ellipsis
|
||||
style="
|
||||
width: calc(100% - 100px);
|
||||
margin-bottom: 10px;
|
||||
color: #2f54eb;
|
||||
"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</h3>
|
||||
<span
|
||||
style="
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
"
|
||||
@click.stop="handlEye(slotProps.id)"
|
||||
>
|
||||
{{ slotProps.name }}
|
||||
</span>
|
||||
</Ellipsis>
|
||||
<j-row class="card-item-content-box">
|
||||
<j-col
|
||||
:span="8"
|
||||
|
@ -144,7 +155,7 @@
|
|||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { getImage } from '@/utils/comm';
|
||||
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';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
|
@ -213,7 +224,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
? await disable(data.id)
|
||||
: await enalbe(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value?.reload();
|
||||
}
|
||||
},
|
||||
|
@ -231,7 +242,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
@ -276,14 +287,6 @@ const handleSearch = (e: any) => {
|
|||
.card-item-content {
|
||||
min-height: 100px;
|
||||
|
||||
.card-item-content-title-a {
|
||||
// color: #000 !important;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
overflow: hidden; //超出的文本隐藏
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap; //溢出不换行
|
||||
}
|
||||
.card-item-content-box {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
|
|
@ -292,6 +292,7 @@ import { LocalStore } from '@/utils/comm';
|
|||
|
||||
import { save_api, getDetails_api } from '@/api/system/basis';
|
||||
import { usePermissionStore } from '@/store/permission';
|
||||
import { useSystem } from '@/store/system';
|
||||
|
||||
const action = `${BASE_API_PATH}/file/static`;
|
||||
const headers = { [TOKEN_KEY]: LocalStore.get(TOKEN_KEY) };
|
||||
|
@ -302,9 +303,9 @@ const form = reactive<formType>({
|
|||
headerTheme: 'light',
|
||||
apiKey: '',
|
||||
'base-path': `${window.location.origin}/api`,
|
||||
logo: '/public/logo.png',
|
||||
ico: '/public/favicon.ico',
|
||||
backgroud: '/public/images/login.png',
|
||||
logo: '',
|
||||
ico: '',
|
||||
backgroud: '',
|
||||
},
|
||||
rulesFrom: {
|
||||
title: [
|
||||
|
@ -337,31 +338,18 @@ const form = reactive<formType>({
|
|||
iconLoading: false, // 页签加载状态
|
||||
saveLoading: false,
|
||||
getDetails: () => {
|
||||
const params = ['front', 'amap', 'paths'];
|
||||
getDetails_api(params).then((resp: any) => {
|
||||
const basis = resp.result?.filter(
|
||||
(item: any) => item.scope === 'front',
|
||||
);
|
||||
const api = resp.result?.filter(
|
||||
(item: any) => item.scope === 'amap',
|
||||
);
|
||||
const basePath = resp.result?.filter(
|
||||
(item: any) => item.scope === 'paths',
|
||||
);
|
||||
form.formValue = {
|
||||
...basis[0].properties,
|
||||
apiKey: api[0].properties.apiKey,
|
||||
'base-path': basePath[0].properties['base-path'],
|
||||
logo: form.formValue.logo || '/public/logo.png',
|
||||
ico: form.formValue.ico || '/public/favicon.ico',
|
||||
backgroud:
|
||||
form.formValue.backgroud || '/public/images/login.png',
|
||||
};
|
||||
// localStorage.setItem(
|
||||
// SystemConst.AMAP_KEY,
|
||||
// api[0].properties.apiKey,
|
||||
// );
|
||||
});
|
||||
const configInfo = useSystem().$state.configInfo;
|
||||
const basis = configInfo.find((item: any) => item.scope === 'front');
|
||||
const api = configInfo.find((item: any) => item.scope === 'amap');
|
||||
const basePath = configInfo.find((item: any) => item.scope === 'paths');
|
||||
form.formValue = {
|
||||
...basis.properties,
|
||||
apiKey: api.properties.apiKey,
|
||||
'base-path': basePath.properties['base-path'],
|
||||
logo: basis.properties.logo || '/public/logo.png',
|
||||
ico: basis.properties.ico || '/public/favicon.ico',
|
||||
backgroud: basis.properties.backgroud || '/public/images/login.png',
|
||||
};
|
||||
},
|
||||
clickSave: () => {
|
||||
const hasPermission = usePermissionStore().hasPermission;
|
||||
|
|
Loading…
Reference in New Issue