Merge branch 'dev' into dev-edge
# Conflicts: # yarn.lock
This commit is contained in:
commit
7ba89d6b69
|
@ -10,7 +10,7 @@ export const updateMeInfo_api = (data:object) => server.put(`/user/detail`,data)
|
||||||
// 修改登录用户密码
|
// 修改登录用户密码
|
||||||
export const updateMepsd_api = (data:object) => server.put(`/user/passwd`,data);
|
export const updateMepsd_api = (data:object) => server.put(`/user/passwd`,data);
|
||||||
// 第三方账号解绑
|
// 第三方账号解绑
|
||||||
export const unBind_api = (appId: string) => server.request.post(`/application/sso/${appId}/unbind/me`);
|
export const unBind_api = (appId: string) => server.post(`/application/sso/${appId}/unbind/me`);
|
||||||
/**
|
/**
|
||||||
* 校验字段合法性
|
* 校验字段合法性
|
||||||
* @param type 类型
|
* @param type 类型
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
visible
|
visible
|
||||||
width="70vw"
|
width="70vw"
|
||||||
title="编辑规则"
|
title="编辑规则"
|
||||||
|
:getContainer="(node) => fullRef || node"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
>
|
>
|
||||||
|
@ -57,6 +58,7 @@
|
||||||
import Editor from './Editor/index.vue';
|
import Editor from './Editor/index.vue';
|
||||||
import Debug from './Debug/index.vue';
|
import Debug from './Debug/index.vue';
|
||||||
import Operator from './Operator/index.vue';
|
import Operator from './Operator/index.vue';
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
(e: 'save', data: string | undefined): void;
|
(e: 'save', data: string | undefined): void;
|
||||||
|
@ -73,6 +75,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const _value = ref<string | undefined>(props.value);
|
const _value = ref<string | undefined>(props.value);
|
||||||
const _disabled = ref<boolean>(true);
|
const _disabled = ref<boolean>(true);
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
emit('close');
|
emit('close');
|
||||||
|
|
|
@ -61,7 +61,7 @@ const layoutConf = reactive({
|
||||||
siderWidth: layout.value.siderWidth,
|
siderWidth: layout.value.siderWidth,
|
||||||
logo: DefaultSetting.layout.logo,
|
logo: DefaultSetting.layout.logo,
|
||||||
title: DefaultSetting.layout.title,
|
title: DefaultSetting.layout.title,
|
||||||
menuData: [...menu.siderMenus, AccountMenu],
|
menuData: menu.siderMenus,
|
||||||
// menuData: menu.siderMenus,
|
// menuData: menu.siderMenus,
|
||||||
splitMenus: true,
|
splitMenus: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
:options="options"
|
:options="options"
|
||||||
allowClear
|
allowClear
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
:getPopupContainer="getPopupContainer"
|
||||||
@change='selectChange'
|
@change='selectChange'
|
||||||
/>
|
/>
|
||||||
<j-time-picker
|
<j-time-picker
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
allowClear
|
allowClear
|
||||||
valueFormat="HH:mm:ss"
|
valueFormat="HH:mm:ss"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
:getPopupContainer="getPopupContainer"
|
||||||
@change='timeChange'
|
@change='timeChange'
|
||||||
/>
|
/>
|
||||||
<j-date-picker
|
<j-date-picker
|
||||||
|
@ -25,6 +27,7 @@
|
||||||
showTime
|
showTime
|
||||||
valueFormat="YYYY-MM-DD HH:mm:ss"
|
valueFormat="YYYY-MM-DD HH:mm:ss"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
:getPopupContainer="getPopupContainer"
|
||||||
@change='dateChange'
|
@change='dateChange'
|
||||||
/>
|
/>
|
||||||
<j-input-number
|
<j-input-number
|
||||||
|
@ -93,6 +96,7 @@
|
||||||
cancel-text="取消"
|
cancel-text="取消"
|
||||||
v-model:visible="modalVis"
|
v-model:visible="modalVis"
|
||||||
width="700px"
|
width="700px"
|
||||||
|
:getPopupContainer="getPopupContainer"
|
||||||
@cancel="modalVis = false"
|
@cancel="modalVis = false"
|
||||||
@ok="handleItemModalSubmit"
|
@ok="handleItemModalSubmit"
|
||||||
:zIndex='1100'
|
:zIndex='1100'
|
||||||
|
@ -149,6 +153,10 @@ const props = defineProps({
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => '',
|
default: () => '',
|
||||||
|
},
|
||||||
|
getPopupContainer: {
|
||||||
|
type: Function,
|
||||||
|
default: undefined
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// type Props = {
|
// type Props = {
|
||||||
|
|
|
@ -123,7 +123,7 @@ export const useMenuStore = defineStore({
|
||||||
})
|
})
|
||||||
// console.log(menusData)
|
// console.log(menusData)
|
||||||
// menusData.push(AccountMenu)
|
// menusData.push(AccountMenu)
|
||||||
this.siderMenus = silderMenus.filter((item: { name: string }) => ![USER_CENTER_MENU_CODE, NotificationRecordCode, NotificationSubscriptionCode].includes(item.name))
|
this.siderMenus = silderMenus
|
||||||
res(menusData)
|
res(menusData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -487,7 +487,7 @@ export const handleMenusMap = (menuData: any[], cb: (data: any) => void) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const hideInMenu = (code: string) => {
|
const hideInMenu = (code: string) => {
|
||||||
return ['account-center', 'message-subscribe'].includes(code)
|
return ['account-center', 'account-center', 'message-subscribe'].includes(code)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const handleSiderMenu = (menuData: any[]) => {
|
export const handleSiderMenu = (menuData: any[]) => {
|
||||||
|
|
|
@ -83,6 +83,9 @@ const handleOptions = (x = [], y = []) => {
|
||||||
const chart: any = chartRef.value;
|
const chart: any = chartRef.value;
|
||||||
if (chart) {
|
if (chart) {
|
||||||
const myChart = echarts.init(chart);
|
const myChart = echarts.init(chart);
|
||||||
|
const maxY: number = y.sort((a,b)=>{
|
||||||
|
return b-a
|
||||||
|
})?.[0]
|
||||||
const options = {
|
const options = {
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
@ -93,8 +96,8 @@ const handleOptions = (x = [], y = []) => {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: '80px',
|
left: maxY < 1000 ? 60 : maxY.toString().length * 10,
|
||||||
right: '50px',
|
right: '60px',
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
/>
|
/>
|
||||||
</j-col>
|
</j-col>
|
||||||
</j-row>
|
</j-row>
|
||||||
<j-row :gutter="24">
|
<j-row :gutter="24" style="margin-top: 24px;">
|
||||||
<j-col :span="24">
|
<j-col :span="24">
|
||||||
<Card />
|
<Card />
|
||||||
</j-col>
|
</j-col>
|
||||||
|
@ -26,14 +26,19 @@ import Card from './components/Card.vue';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { queryCount } from '@/api/data-collect/dashboard';
|
import { queryCount } from '@/api/data-collect/dashboard';
|
||||||
import { defaultParams, statusData } from './tool';
|
import { defaultParams, statusData } from './tool';
|
||||||
|
import { useMenuStore } from '@/store/menu';
|
||||||
|
|
||||||
|
const menuPermission = useMenuStore().hasMenu;
|
||||||
|
|
||||||
const StatusData = ref(statusData);
|
const StatusData = ref(statusData);
|
||||||
const getNumberData = () => {
|
const getNumberData = () => {
|
||||||
StatusData.value.forEach(async (item: any) => {
|
StatusData.value.forEach(async (item: any) => {
|
||||||
const res = await queryCount(item[0].type, {});
|
if(menuPermission(item[0]?.permission)) {
|
||||||
const resp = await queryCount(item[0].type, defaultParams);
|
const res = await queryCount(item[0].type, {});
|
||||||
item[0].total = res?.result;
|
const resp = await queryCount(item[0].type, defaultParams);
|
||||||
item[0].value = resp?.result;
|
item[0].total = res?.result;
|
||||||
|
item[0].value = resp?.result;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
@ -39,13 +39,13 @@ const getParams = (dt: any) => {
|
||||||
};
|
};
|
||||||
} else if (time > days && time <= days * 7) {
|
} else if (time > days && time <= days * 7) {
|
||||||
return {
|
return {
|
||||||
limit: Math.abs(Math.ceil(time / days / 7)) + 1,
|
limit: Math.abs(Math.ceil(time / days)) + 1,
|
||||||
interval: '1d',
|
interval: '1d',
|
||||||
format: 'YYYY-MM-dd HH:mm',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
} else if (time >= year) {
|
} else if (time > days*90) {
|
||||||
return {
|
return {
|
||||||
limit: Math.abs(Math.ceil(time / days / 31)) + 1,
|
limit: Math.abs(Math.ceil(time / days / 30)) + 1,
|
||||||
interval: '1M',
|
interval: '1M',
|
||||||
format: 'YYYY-MM-dd HH:mm',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
|
@ -137,6 +137,7 @@ export const statusData = [
|
||||||
label: '通道数量',
|
label: '通道数量',
|
||||||
value: 0,
|
value: 0,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
permission: 'DataCollect/Channel'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -147,6 +148,7 @@ export const statusData = [
|
||||||
label: '采集器数量',
|
label: '采集器数量',
|
||||||
value: 0,
|
value: 0,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
permission: 'DataCollect/Collector'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -157,6 +159,7 @@ export const statusData = [
|
||||||
label: '采集点位',
|
label: '采集点位',
|
||||||
value: 0,
|
value: 0,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
permission: 'DataCollect/Collector'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
width="770px"
|
width="770px"
|
||||||
@cancel="emits('close')"
|
@cancel="emits('close')"
|
||||||
:confirmLoading="loading"
|
:confirmLoading="loading"
|
||||||
|
:zIndex="1100"
|
||||||
|
:maskClosable='false'
|
||||||
>
|
>
|
||||||
<j-form :model="form" layout="vertical" ref="formRef">
|
<j-form :model="form" layout="vertical" ref="formRef">
|
||||||
<j-row :gutter="24">
|
<j-row :gutter="24">
|
||||||
|
@ -66,7 +68,7 @@
|
||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
pattern: /^1[3456789]\d{9}$/,
|
pattern: /^1[3456789]\d{9}$/,
|
||||||
message: '请输入正确手机号',
|
message: '请输入正确的手机号',
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<j-modal :width="'900px'" visible @cancel="emit('close')" :zIndex="1100">
|
<j-modal :maskClosable='false' :width="'900px'" visible @cancel="emit('close')" :zIndex="1100">
|
||||||
<template v-if="getType === 'notifier-weixin'">
|
<template v-if="getType === 'notifier-weixin'">
|
||||||
<j-spin :spinning="loading">
|
<j-spin :spinning="loading">
|
||||||
<div class="code" style="height: 450px">
|
<div class="code" style="height: 450px">
|
||||||
|
|
|
@ -28,11 +28,14 @@
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<Detail
|
<Detail
|
||||||
@unsubscribe="onUnSubscribe"
|
@unsubscribe="onUnSubscribe"
|
||||||
@save="onSave"
|
v-if="
|
||||||
v-if="current?.channelProvider !== 'inside-mail' && popoverVisible"
|
current?.channelProvider !== 'inside-mail' &&
|
||||||
|
popoverVisible
|
||||||
|
"
|
||||||
:current="current"
|
:current="current"
|
||||||
:data="props.data"
|
:data="data"
|
||||||
@close="popoverVisible = false"
|
@bindChange="onChange('bind')"
|
||||||
|
@infoChange="onChange('info')"
|
||||||
/>
|
/>
|
||||||
<PermissionButton
|
<PermissionButton
|
||||||
v-else
|
v-else
|
||||||
|
@ -51,12 +54,28 @@
|
||||||
{{ current?.name }}
|
{{ current?.name }}
|
||||||
</j-ellipsis>
|
</j-ellipsis>
|
||||||
</div>
|
</div>
|
||||||
|
<EditInfo
|
||||||
|
v-if="editInfoVisible"
|
||||||
|
:data="user.userInfos"
|
||||||
|
@close="editInfoVisible = false"
|
||||||
|
@save="onSave"
|
||||||
|
/>
|
||||||
|
<Bind
|
||||||
|
@close="visible = false"
|
||||||
|
v-if="visible"
|
||||||
|
:data="data"
|
||||||
|
:current="current"
|
||||||
|
@save="onBindSave"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import Detail from './Detail.vue';
|
import Detail from './Detail.vue';
|
||||||
|
import { useUserInfo } from '@/store/userInfo';
|
||||||
|
import EditInfo from '../../EditInfo/index.vue';
|
||||||
|
import Bind from './Bind.vue';
|
||||||
|
|
||||||
const iconMap = new Map();
|
const iconMap = new Map();
|
||||||
iconMap.set('notifier-dingTalk', getImage('/notice-rule/dingtalk.png'));
|
iconMap.set('notifier-dingTalk', getImage('/notice-rule/dingtalk.png'));
|
||||||
|
@ -81,19 +100,44 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
notifyChannels: {
|
notifyChannels: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
const user = useUserInfo();
|
||||||
const popoverVisible = ref<boolean>(false);
|
const popoverVisible = ref<boolean>(false);
|
||||||
|
|
||||||
|
const editInfoVisible = ref<boolean>(false);
|
||||||
|
const visible = ref<boolean>(false);
|
||||||
|
|
||||||
|
const onChange = (type: 'bind' | 'info') => {
|
||||||
|
if(type === 'bind'){
|
||||||
|
editInfoVisible.value = true
|
||||||
|
} else {
|
||||||
|
visible.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const onSave = () => {
|
||||||
|
editInfoVisible.value = false;
|
||||||
|
user.getUserInfo();
|
||||||
|
emit('save', props.current);
|
||||||
|
popoverVisible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onBindSave = () => {
|
||||||
|
visible.value = false
|
||||||
|
emit('save', props.current);
|
||||||
|
popoverVisible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
const onUnSubscribe = (dt: any) => {
|
const onUnSubscribe = (dt: any) => {
|
||||||
emit('unsubscribe', dt);
|
emit('unsubscribe', dt);
|
||||||
popoverVisible.value = false
|
popoverVisible.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCheckChange = (dt: any) => {
|
const onCheckChange = (dt: any) => {
|
||||||
emit('save', dt)
|
emit('save', dt);
|
||||||
popoverVisible.value = false
|
popoverVisible.value = false;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -21,29 +21,14 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<EditInfo
|
|
||||||
v-if="editInfoVisible"
|
|
||||||
:data="user.userInfos"
|
|
||||||
@close="editInfoVisible = false"
|
|
||||||
@save="onSave"
|
|
||||||
/>
|
|
||||||
<Bind
|
|
||||||
@close="visible = false"
|
|
||||||
v-if="visible"
|
|
||||||
:data="props.data"
|
|
||||||
:current="current"
|
|
||||||
@save="onBindSave"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getIsBindThird } from '@/api/account/notificationSubscription';
|
import { getIsBindThird } from '@/api/account/notificationSubscription';
|
||||||
import { useUserInfo } from '@/store/userInfo';
|
import { useUserInfo } from '@/store/userInfo';
|
||||||
import EditInfo from '../../EditInfo/index.vue';
|
|
||||||
import Bind from './Bind.vue';
|
|
||||||
|
|
||||||
const user = useUserInfo();
|
const user = useUserInfo();
|
||||||
const emit = defineEmits(['save', 'unsubscribe', 'close']);
|
const emit = defineEmits(['infoChange', 'unsubscribe', 'bindChange']);
|
||||||
const info = ref<any>(null);
|
const info = ref<any>(null);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
|
@ -58,39 +43,23 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const editInfoVisible = ref<boolean>(false);
|
|
||||||
const visible = ref<boolean>(false);
|
|
||||||
|
|
||||||
const getType = computed(() => {
|
const getType = computed(() => {
|
||||||
return props.current?.channelProvider;
|
return props.current?.channelProvider;
|
||||||
});
|
});
|
||||||
|
|
||||||
const onBind = () => {
|
const onBind = () => {
|
||||||
if (
|
if (
|
||||||
['notifier-voice', 'notifier-sms', 'notifier-email'].includes(
|
!['notifier-voice', 'notifier-sms', 'notifier-email'].includes(
|
||||||
props.current?.channelProvider,
|
props.current?.channelProvider,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
editInfoVisible.value = true;
|
emit('infoChange')
|
||||||
} else {
|
} else {
|
||||||
visible.value = true
|
emit('bindChange')
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSave = () => {
|
|
||||||
editInfoVisible.value = false;
|
|
||||||
user.getUserInfo();
|
|
||||||
emit('save', props.current);
|
|
||||||
emit('close')
|
|
||||||
};
|
|
||||||
|
|
||||||
const onBindSave = () => {
|
|
||||||
visible.value = false
|
|
||||||
emit('save', props.current);
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSearch = async () => {
|
const handleSearch = async () => {
|
||||||
if (
|
if (
|
||||||
!['notifier-voice', 'notifier-sms', 'notifier-email'].includes(
|
!['notifier-voice', 'notifier-sms', 'notifier-email'].includes(
|
||||||
|
@ -114,16 +83,6 @@ onMounted(() => {
|
||||||
handleSearch()
|
handleSearch()
|
||||||
})
|
})
|
||||||
|
|
||||||
// watch(
|
|
||||||
// () => props.current,
|
|
||||||
// () => {
|
|
||||||
// handleSearch();
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// immediate: true,
|
|
||||||
// deep: true,
|
|
||||||
// },
|
|
||||||
// );
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<j-modal :width="'384px'" visible @cancel="emit('close')" :footer="null">
|
<j-modal :maskClosable='false' :width="'384px'" visible @cancel="emit('close')" :footer="null">
|
||||||
<template v-if="getType === 'notifier-dingTalk'">
|
<template v-if="getType === 'notifier-dingTalk'">
|
||||||
<div class="tip">请先绑定钉钉账号</div>
|
<div class="tip">请先绑定钉钉账号</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -164,7 +164,16 @@ import { isBoolean } from 'lodash';
|
||||||
import { onlyMessage } from '@/utils/comm';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const defaultValue =
|
const defaultValue =
|
||||||
'//解码函数\r\nfunction decode(context) {\r\n //原始报文\r\n var buffer = context.payload();\r\n // 转为json\r\n // var json = context.json();\r\n //mqtt 时通过此方法获取topic\r\n // var topic = context.topic();\r\n\r\n // 提取变量\r\n // var topicVars = context.pathVars("/{deviceId}/**",topic)\r\n //温度属性\r\n var temperature = buffer.getShort(3) * 10;\r\n //湿度属性\r\n var humidity = buffer.getShort(6) * 10;\r\n return {\r\n "temperature": temperature,\r\n "humidity": humidity\r\n };\r\n}\r\n';
|
`//注册设备下行数据监听器,当平台下发指令给设备时,回调将被调用,用于构造下发给设备的报文
|
||||||
|
codec.onDownstream(function(ctx){
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//注册设备上行数据监听器,当设备上行数据时,回调将被调用,用于解析设备上报的数据.
|
||||||
|
codec.onUpstream(function(ctx){
|
||||||
|
|
||||||
|
});
|
||||||
|
`;
|
||||||
|
|
||||||
const el = ref<HTMLElement | null>(null);
|
const el = ref<HTMLElement | null>(null);
|
||||||
const { toggle } = useFullscreen(el);
|
const { toggle } = useFullscreen(el);
|
||||||
|
|
|
@ -123,7 +123,16 @@ import { isBoolean } from 'lodash';
|
||||||
import { onlyMessage } from '@/utils/comm';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const defaultValue =
|
const defaultValue =
|
||||||
'//解码函数\r\nfunction decode(context) {\r\n //原始报文\r\n var buffer = context.payload();\r\n // 转为json\r\n // var json = context.json();\r\n //mqtt 时通过此方法获取topic\r\n // var topic = context.topic();\r\n\r\n // 提取变量\r\n // var topicVars = context.pathVars("/{deviceId}/**",topic)\r\n //温度属性\r\n var temperature = buffer.getShort(3) * 10;\r\n //湿度属性\r\n var humidity = buffer.getShort(6) * 10;\r\n return {\r\n "temperature": temperature,\r\n "humidity": humidity\r\n };\r\n}\r\n';
|
`//注册设备下行数据监听器,当平台下发指令给设备时,回调将被调用,用于构造下发给设备的报文
|
||||||
|
codec.onDownstream(function(ctx){
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//注册设备上行数据监听器,当设备上行数据时,回调将被调用,用于解析设备上报的数据.
|
||||||
|
codec.onUpstream(function(ctx){
|
||||||
|
|
||||||
|
});
|
||||||
|
`;
|
||||||
|
|
||||||
const el = ref<HTMLElement | null>(null);
|
const el = ref<HTMLElement | null>(null);
|
||||||
const { toggle } = useFullscreen(el);
|
const { toggle } = useFullscreen(el);
|
||||||
|
|
|
@ -164,7 +164,7 @@ const deviceList = ref([
|
||||||
label: '网关子设备',
|
label: '网关子设备',
|
||||||
value: 'childrenDevice',
|
value: 'childrenDevice',
|
||||||
iconUrl: getImage('/device-type-2.png'),
|
iconUrl: getImage('/device-type-2.png'),
|
||||||
tooltip: '作为网关的子设备,有网关代理连接到物联网平台',
|
tooltip: '作为网关的子设备,由网关代理连接到物联网平台',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '网关设备',
|
label: '网关设备',
|
||||||
|
|
|
@ -341,7 +341,6 @@ export const useColumns = (type?: MetadataType, target?: 'device' | 'product', n
|
||||||
const fieldIndex = Number(field[1])
|
const fieldIndex = Number(field[1])
|
||||||
|
|
||||||
const values = dataSource.find((item, index) => index === fieldIndex)
|
const values = dataSource.find((item, index) => index === fieldIndex)
|
||||||
|
|
||||||
return validatorConfig(values.output)
|
return validatorConfig(values.output)
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
<script setup name="ConstraintSelect">
|
<script setup name="ConstraintSelect">
|
||||||
import { set, get } from 'lodash-es'
|
import { set, get } from 'lodash-es'
|
||||||
|
import {FULL_CODE} from "jetlinks-ui-components/es/DataTable";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
|
@ -25,6 +26,7 @@ const props = defineProps({
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:value'])
|
const emit = defineEmits(['update:value'])
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
|
|
||||||
const myValue = ref()
|
const myValue = ref()
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
v-model:value="value"
|
v-model:value="value"
|
||||||
:options="options"
|
:options="options"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
|
:getPopupContainer="(node) => fullRef || node"
|
||||||
@change="change"
|
@change="change"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
<script setup lang="ts" name="SelectColumnn">
|
<script setup lang="ts" name="SelectColumnn">
|
||||||
import type { PropType } from 'vue';
|
import type { PropType } from 'vue';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
type Emits = {
|
type Emits = {
|
||||||
(e: 'update:value', data: Record<string, any>): void;
|
(e: 'update:value', data: Record<string, any>): void;
|
||||||
|
@ -18,6 +19,8 @@ type Emits = {
|
||||||
};
|
};
|
||||||
|
|
||||||
type SizeType = 'small' | 'middle' | 'large' | undefined;
|
type SizeType = 'small' | 'middle' | 'large' | undefined;
|
||||||
|
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
v-model:value="value"
|
v-model:value="value"
|
||||||
:options="options"
|
:options="options"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
@change="change"
|
@change="change"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -10,8 +11,8 @@
|
||||||
<script setup lang="ts" name="SelectColumnn">
|
<script setup lang="ts" name="SelectColumnn">
|
||||||
import type { PropType } from 'vue';
|
import type { PropType } from 'vue';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
type Emits = {
|
type Emits = {
|
||||||
(e: 'update:value', data: Record<string, any>): void;
|
(e: 'update:value', data: Record<string, any>): void;
|
||||||
(e: 'change', data: string): void;
|
(e: 'change', data: string): void;
|
||||||
|
@ -36,7 +37,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
const value = ref(props.value.async);
|
const value = ref(props.value.async);
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
const change = (v: string) => {
|
const change = (v: string) => {
|
||||||
emit('update:value', {...props.value, async: value.value});
|
emit('update:value', {...props.value, async: value.value});
|
||||||
emit('change', v);
|
emit('change', v);
|
||||||
|
|
|
@ -5,11 +5,13 @@
|
||||||
{ label: '固定值', value: 'false' },
|
{ label: '固定值', value: 'false' },
|
||||||
{ label: '范围值', value: 'true' },
|
{ label: '范围值', value: 'true' },
|
||||||
]"
|
]"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
@select="select"
|
@select="select"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script name="BooleanSelect" setup>
|
<script name="BooleanSelect" setup>
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
|
@ -17,8 +19,10 @@ const props = defineProps({
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:value'])
|
const emit = defineEmits(['update:value'])
|
||||||
|
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
const myValue = ref()
|
const myValue = ref()
|
||||||
const select = (e) => {
|
const select = (e) => {
|
||||||
emit('update:value', {
|
emit('update:value', {
|
||||||
|
|
|
@ -90,6 +90,14 @@ const columns: any = [
|
||||||
form: {
|
form: {
|
||||||
required: true,
|
required: true,
|
||||||
rules: [
|
rules: [
|
||||||
|
{
|
||||||
|
callback(rule:any,value: any) {
|
||||||
|
if (!value) {
|
||||||
|
return Promise.reject('请输入指标名称')
|
||||||
|
}
|
||||||
|
return Promise.resolve()
|
||||||
|
}
|
||||||
|
},
|
||||||
{ max: 64, message: '最多可输入64个字符' },
|
{ max: 64, message: '最多可输入64个字符' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -107,11 +115,11 @@ const columns: any = [
|
||||||
required: true,
|
required: true,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
validator(_: any, value: any) {
|
callback(rule:any,value: any) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return Promise.reject('请配置指标')
|
return Promise.reject('请配置指标')
|
||||||
}
|
}
|
||||||
return validatorConfig(value, true)
|
return Promise.resolve()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -148,7 +156,7 @@ const addItem = () => {
|
||||||
const data = {
|
const data = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
range: 'false',
|
range: false,
|
||||||
value: undefined,
|
value: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<j-popconfirm-modal
|
<j-popconfirm-modal
|
||||||
:show-cancel="false"
|
:show-cancel="false"
|
||||||
body-style="width: 300px"
|
body-style="width: 300px"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
@confirm="confirm"
|
@confirm="confirm"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
|
@ -39,6 +40,7 @@ import type { PropType } from 'vue';
|
||||||
import Item from './item.vue'
|
import Item from './item.vue'
|
||||||
import {Form} from "jetlinks-ui-components";
|
import {Form} from "jetlinks-ui-components";
|
||||||
import {cloneDeep} from "lodash";
|
import {cloneDeep} from "lodash";
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
type ValueType = number | Array<number | undefined> | undefined;
|
type ValueType = number | Array<number | undefined> | undefined;
|
||||||
|
|
||||||
|
@ -55,7 +57,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const emit = defineEmits<Emit>();
|
const emit = defineEmits<Emit>();
|
||||||
const formItemContext = Form.useInjectFormItemContext();
|
const formItemContext = Form.useInjectFormItemContext();
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
|
|
||||||
|
|
||||||
const formData = reactive<{
|
const formData = reactive<{
|
||||||
|
@ -89,6 +91,7 @@ const confirm = () => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
formRef.value.validate().then(() => {
|
formRef.value.validate().then(() => {
|
||||||
const value = props.value.range === true ? formData.rangeValue : formData.value
|
const value = props.value.range === true ? formData.rangeValue : formData.value
|
||||||
|
console.log('confirm',value, props.value)
|
||||||
emit('update:value', {
|
emit('update:value', {
|
||||||
...props.value,
|
...props.value,
|
||||||
value: value
|
value: value
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
@change="change"
|
@change="change"
|
||||||
/>
|
/>
|
||||||
<j-input-number
|
<j-input-number
|
||||||
v-else-if="['int', 'long', 'float', 'double'].includes(type)"
|
v-else-if="type === 'int'"
|
||||||
v-model:value="myValue"
|
v-model:value="myValue"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
:max="2147483647"
|
:max="2147483647"
|
||||||
|
@ -16,6 +16,25 @@
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
@change="change"
|
@change="change"
|
||||||
/>
|
/>
|
||||||
|
<j-input-number
|
||||||
|
v-else-if="type === 'long'"
|
||||||
|
v-model:value="myValue"
|
||||||
|
:max="9223372036854775807"
|
||||||
|
:min="-9223372036854775808"
|
||||||
|
:precision="0"
|
||||||
|
placeholder="请输入"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="change"
|
||||||
|
/>
|
||||||
|
<j-input-number
|
||||||
|
v-else-if="['float', 'double'].includes(type)"
|
||||||
|
v-model:value="myValue"
|
||||||
|
:max="9999999999999999"
|
||||||
|
:min="-9999999999999999"
|
||||||
|
placeholder="请输入"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="change"
|
||||||
|
/>
|
||||||
<j-select
|
<j-select
|
||||||
v-else-if="type === 'boolean'"
|
v-else-if="type === 'boolean'"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
@ -23,17 +42,20 @@
|
||||||
{ label: '否', value: 'false'},
|
{ label: '否', value: 'false'},
|
||||||
{ label: '是', value: 'true'},
|
{ label: '是', value: 'true'},
|
||||||
]"
|
]"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
/>
|
/>
|
||||||
<j-date-picker
|
<j-date-picker
|
||||||
v-else-if="type === 'date' "
|
v-else-if="type === 'date' "
|
||||||
v-model:value="myValue"
|
v-model:value="myValue"
|
||||||
show-time
|
show-time
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
@change="change"
|
@change="change"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup name="MetricValueItem">
|
<script setup name="MetricValueItem">
|
||||||
import { Form } from 'jetlinks-ui-components'
|
import { Form } from 'jetlinks-ui-components'
|
||||||
|
import {FULL_CODE} from "jetlinks-ui-components/es/DataTable";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
|
@ -47,6 +69,7 @@ const formItemContext = Form.useInjectFormItemContext();
|
||||||
|
|
||||||
const type = inject('metricsType')
|
const type = inject('metricsType')
|
||||||
const myValue = ref(props.value)
|
const myValue = ref(props.value)
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
|
|
||||||
const change = () => {
|
const change = () => {
|
||||||
// formItemContext.onFieldChange()
|
// formItemContext.onFieldChange()
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
body-style="padding-top:4px;width:600px;"
|
body-style="padding-top:4px;width:600px;"
|
||||||
placement="topRight"
|
placement="topRight"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
@confirm="confirm"
|
@confirm="confirm"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@visibleChange="visibleChange"
|
@visibleChange="visibleChange"
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
label: a.text,
|
label: a.text,
|
||||||
value: a.value,
|
value: a.value,
|
||||||
}))"
|
}))"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</j-table>
|
</j-table>
|
||||||
|
@ -63,6 +65,7 @@ import {useInstanceStore} from "store/instance";
|
||||||
import {getMetadataConfig, getMetadataDeviceConfig} from "@/api/device/product";
|
import {getMetadataConfig, getMetadataDeviceConfig} from "@/api/device/product";
|
||||||
import ModelButton from '@/views/device/components/Metadata/Base/components/ModelButton.vue'
|
import ModelButton from '@/views/device/components/Metadata/Base/components/ModelButton.vue'
|
||||||
import {omit} from "lodash-es";
|
import {omit} from "lodash-es";
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
|
@ -83,6 +86,8 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
|
|
||||||
const type = inject('_metadataType')
|
const type = inject('_metadataType')
|
||||||
|
|
||||||
const productStore = useProductStore()
|
const productStore = useProductStore()
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
label: a.text,
|
label: a.text,
|
||||||
value: a.value,
|
value: a.value,
|
||||||
}))"
|
}))"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</j-table>
|
</j-table>
|
||||||
|
@ -29,6 +30,7 @@ import type { PropType } from "vue";
|
||||||
import { defineExpose } from 'vue'
|
import { defineExpose } from 'vue'
|
||||||
import {getMetadataConfig, getMetadataDeviceConfig} from "@/api/device/product";
|
import {getMetadataConfig, getMetadataDeviceConfig} from "@/api/device/product";
|
||||||
import { omit } from 'lodash-es'
|
import { omit } from 'lodash-es'
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: {
|
type: {
|
||||||
|
@ -47,7 +49,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const productStore = useProductStore()
|
const productStore = useProductStore()
|
||||||
const deviceStore = useInstanceStore()
|
const deviceStore = useInstanceStore()
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
const config = ref<any>([])
|
const config = ref<any>([])
|
||||||
const configValue = ref(props.record?.expands)
|
const configValue = ref(props.record?.expands)
|
||||||
|
|
||||||
|
|
|
@ -4,17 +4,20 @@
|
||||||
v-model:value="myValue"
|
v-model:value="myValue"
|
||||||
:options="PropertySource"
|
:options="PropertySource"
|
||||||
placeholder="请选择来源"
|
placeholder="请选择来源"
|
||||||
@change="onChange"
|
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
|
@change="onChange"
|
||||||
>
|
>
|
||||||
</j-select>
|
</j-select>
|
||||||
<j-popconfirm-modal
|
<j-popconfirm-modal
|
||||||
v-if="myValue != 'manual'"
|
v-if="myValue != 'manual'"
|
||||||
@confirm="confirm"
|
|
||||||
:bodyStyle="{
|
:bodyStyle="{
|
||||||
width: '450px',
|
width: '450px',
|
||||||
height: myValue === 'rule' ? '300px' : '80px',
|
height: myValue === 'rule' ? '300px' : '80px',
|
||||||
}"
|
}"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
|
placement="topLeft"
|
||||||
|
@confirm="confirm"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<j-scrollbar v-if="myValue">
|
<j-scrollbar v-if="myValue">
|
||||||
|
@ -39,6 +42,7 @@
|
||||||
import { isNoCommunity } from '@/utils/utils';
|
import { isNoCommunity } from '@/utils/utils';
|
||||||
import VirtualRule from './VirtualRule/index.vue';
|
import VirtualRule from './VirtualRule/index.vue';
|
||||||
import { Form } from 'jetlinks-ui-components';
|
import { Form } from 'jetlinks-ui-components';
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
const PropertySource: { label: string; value: string }[] = isNoCommunity
|
const PropertySource: { label: string; value: string }[] = isNoCommunity
|
||||||
? [
|
? [
|
||||||
|
@ -72,6 +76,8 @@ type Emit = {
|
||||||
(e: 'update:value', data: Record<string, any>): void;
|
(e: 'update:value', data: Record<string, any>): void;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
{ label: '写', value: 'write'},
|
{ label: '写', value: 'write'},
|
||||||
{ label: '上报', value: 'report'},
|
{ label: '上报', value: 'report'},
|
||||||
]"
|
]"
|
||||||
|
:get-popup-container="(node) => fullRef || node"
|
||||||
placeholder="请选择读写类型"
|
placeholder="请选择读写类型"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
/>
|
/>
|
||||||
|
@ -15,6 +16,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
import type {PropType} from "vue";
|
import type {PropType} from "vue";
|
||||||
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
|
||||||
type Emit = {
|
type Emit = {
|
||||||
(e: 'update:value', data: any): void
|
(e: 'update:value', data: any): void
|
||||||
|
@ -28,7 +30,7 @@ const props = defineProps({
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits<Emit>()
|
const emit = defineEmits<Emit>()
|
||||||
|
const fullRef = inject(FULL_CODE);
|
||||||
const myValue = ref<Array<string>>([])
|
const myValue = ref<Array<string>>([])
|
||||||
|
|
||||||
const onChange = () =>{
|
const onChange = () =>{
|
||||||
|
|
|
@ -26,7 +26,7 @@ const { jumpPage } = useMenuStore();
|
||||||
const projectNum = ref(0);
|
const projectNum = ref(0);
|
||||||
const deviceNum = ref(0);
|
const deviceNum = ref(0);
|
||||||
|
|
||||||
const menuPermission = useMenuStore().hasPermission;
|
const menuPermission = useMenuStore().hasMenu;
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
// 有产品菜单权限则获取数据
|
// 有产品菜单权限则获取数据
|
||||||
menuPermission('device/Product') &&
|
menuPermission('device/Product') &&
|
||||||
|
|
|
@ -193,11 +193,11 @@
|
||||||
<div class="progress-text">
|
<div class="progress-text">
|
||||||
<div>
|
<div>
|
||||||
{{
|
{{
|
||||||
(
|
slotProps.totalFlow ? (
|
||||||
(slotProps.usedFlow /
|
(slotProps.usedFlow /
|
||||||
slotProps.totalFlow) *
|
slotProps.totalFlow) *
|
||||||
100
|
100
|
||||||
).toFixed(2)
|
).toFixed(2) : '0.00'
|
||||||
}}
|
}}
|
||||||
%
|
%
|
||||||
</div>
|
</div>
|
||||||
|
@ -209,9 +209,9 @@
|
||||||
:strokeColor="'#ADC6FF'"
|
:strokeColor="'#ADC6FF'"
|
||||||
:showInfo="false"
|
:showInfo="false"
|
||||||
:percent="
|
:percent="
|
||||||
(slotProps.usedFlow /
|
slotProps.totalFlow ? (slotProps.usedFlow /
|
||||||
slotProps.totalFlow) *
|
slotProps.totalFlow) *
|
||||||
100
|
100 : 0
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
v-if="serverOptions.length > 1"
|
v-if="serverOptions.length > 1"
|
||||||
v-model:value="serverActive"
|
v-model:value="serverActive"
|
||||||
:options="serverOptions"
|
:options="serverOptions"
|
||||||
color="#2CB6E0"
|
:color="colorCpu"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -59,9 +59,10 @@ import dayjs from 'dayjs';
|
||||||
import {
|
import {
|
||||||
getTimeByType,
|
getTimeByType,
|
||||||
arrayReverse,
|
arrayReverse,
|
||||||
defulteParamsData,
|
defaultParamsData,
|
||||||
areaStyleCpu,
|
areaStyleCpu,
|
||||||
typeDataLine,
|
typeDataLine,
|
||||||
|
colorCpu
|
||||||
} from './tool.ts';
|
} from './tool.ts';
|
||||||
import { DataType } from '../typings';
|
import { DataType } from '../typings';
|
||||||
import ServerList from './ServerList.vue'
|
import ServerList from './ServerList.vue'
|
||||||
|
@ -97,6 +98,7 @@ const pickerTimeChange = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const echartsOptions = computed(() => {
|
const echartsOptions = computed(() => {
|
||||||
|
console.log(serverActive.value)
|
||||||
const series = serverActive.value.length
|
const series = serverActive.value.length
|
||||||
? serverActive.value.map((key) => setOptions(serverData.data, key))
|
? serverActive.value.map((key) => setOptions(serverData.data, key))
|
||||||
: typeDataLine
|
: typeDataLine
|
||||||
|
@ -128,17 +130,18 @@ const echartsOptions = computed(() => {
|
||||||
end: data.value.type !== 'hour' ? 5 : 100,
|
end: data.value.type !== 'hour' ? 5 : 100,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
color: ['#2CB6E0'],
|
color: colorCpu,
|
||||||
series: series
|
series: series
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
const getCPUEcharts = async (val: any) => {
|
const getCPUEcharts = async (val: any) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res: any = await dashboard(defulteParamsData('cpu', val));
|
const res: any = await dashboard(defaultParamsData('cpu', val));
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const _cpuOptions = {};
|
const _cpuOptions = {};
|
||||||
const _cpuXAxis = new Set();
|
const _cpuXAxis = new Set();
|
||||||
if (res.result?.length) {
|
if (res.result?.length) {
|
||||||
|
isEmpty.value = false;
|
||||||
// 根据服务节点来筛选数据
|
// 根据服务节点来筛选数据
|
||||||
// const filterArray = props.isNoCommunity ? res.result.filter((item : any) => item.data?.clusterNodeId === props.serviceId) : res.result
|
// const filterArray = props.isNoCommunity ? res.result.filter((item : any) => item.data?.clusterNodeId === props.serviceId) : res.result
|
||||||
const filterArray = res.result
|
const filterArray = res.result
|
||||||
|
@ -173,7 +176,7 @@ const setOptions = (optionsData: any, key: string) => ({
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
areaStyle: areaStyleCpu,
|
// areaStyle: areaStyleCpu(index),
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleCpuOptions = (optionsData: any, xAxis: any) => {
|
const handleCpuOptions = (optionsData: any, xAxis: any) => {
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
v-if="serverOptions.length > 1"
|
v-if="serverOptions.length > 1"
|
||||||
v-model:value="serverActive"
|
v-model:value="serverActive"
|
||||||
:options="serverOptions"
|
:options="serverOptions"
|
||||||
color="#60DFC7"
|
:color="colorJvm"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,7 +61,8 @@ import {
|
||||||
arrayReverse,
|
arrayReverse,
|
||||||
typeDataLine,
|
typeDataLine,
|
||||||
areaStyleJvm,
|
areaStyleJvm,
|
||||||
defulteParamsData,
|
colorJvm,
|
||||||
|
defaultParamsData
|
||||||
} from './tool.ts';
|
} from './tool.ts';
|
||||||
import { DataType } from '../typings';
|
import { DataType } from '../typings';
|
||||||
import ServerList from './ServerList.vue'
|
import ServerList from './ServerList.vue'
|
||||||
|
@ -98,11 +99,12 @@ const pickerTimeChange = () => {
|
||||||
|
|
||||||
const getJVMEcharts = async (val: any) => {
|
const getJVMEcharts = async (val: any) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res: any = await dashboard(defulteParamsData('jvm', val));
|
const res: any = await dashboard(defaultParamsData('jvm', val));
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const _jvmOptions = {};
|
const _jvmOptions = {};
|
||||||
const _jvmXAxis = new Set();
|
const _jvmXAxis = new Set();
|
||||||
if (res.result?.length) {
|
if (res.result?.length) {
|
||||||
|
isEmpty.value = false;
|
||||||
// const filterArray = props.isNoCommunity ? res.result.filter((item : any) => item.data?.clusterNodeId === props.serviceId) : res.result
|
// const filterArray = props.isNoCommunity ? res.result.filter((item : any) => item.data?.clusterNodeId === props.serviceId) : res.result
|
||||||
const filterArray = res.result
|
const filterArray = res.result
|
||||||
filterArray.forEach((item: any) => {
|
filterArray.forEach((item: any) => {
|
||||||
|
@ -141,7 +143,7 @@ const setOptions = (optionsData: any, key: string) => ({
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
areaStyle: areaStyleJvm,
|
// areaStyle: areaStyleJvm(_index),
|
||||||
});
|
});
|
||||||
const handleJVMOptions = (optionsData: any, xAxis: any) => {
|
const handleJVMOptions = (optionsData: any, xAxis: any) => {
|
||||||
const dataKeys = Object.keys(optionsData);
|
const dataKeys = Object.keys(optionsData);
|
||||||
|
@ -183,7 +185,7 @@ const echartsOptions = computed(() => {
|
||||||
end: data.value.type !== 'hour' ? 10 : 100,
|
end: data.value.type !== 'hour' ? 10 : 100,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
color: ['#60DFC7'],
|
color: colorJvm,
|
||||||
series: series
|
series: series
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<j-radio-group
|
<j-radio-group
|
||||||
button-style="solid"
|
button-style="solid"
|
||||||
v-model:value="data.type"
|
v-model:value="data.type"
|
||||||
|
@change="() => { getNetworkEcharts(data) }"
|
||||||
>
|
>
|
||||||
<j-radio-button value="bytesRead">
|
<j-radio-button value="bytesRead">
|
||||||
上行
|
上行
|
||||||
|
@ -72,6 +73,7 @@ import {
|
||||||
getTimeByType,
|
getTimeByType,
|
||||||
typeDataLine,
|
typeDataLine,
|
||||||
areaStyle,
|
areaStyle,
|
||||||
|
colorNetwork,
|
||||||
networkParams, arrayReverse,
|
networkParams, arrayReverse,
|
||||||
} from './tool.ts';
|
} from './tool.ts';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
@ -105,6 +107,7 @@ const serverData = reactive({
|
||||||
|
|
||||||
const pickerTimeChange = (value: any) => {
|
const pickerTimeChange = (value: any) => {
|
||||||
data.value.time.type = undefined;
|
data.value.time.type = undefined;
|
||||||
|
getNetworkEcharts(data.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getNetworkEcharts = async (val: any) => {
|
const getNetworkEcharts = async (val: any) => {
|
||||||
|
@ -114,6 +117,7 @@ const getNetworkEcharts = async (val: any) => {
|
||||||
const _networkOptions = {};
|
const _networkOptions = {};
|
||||||
const _networkXAxis = new Set();
|
const _networkXAxis = new Set();
|
||||||
if (resp.result.length) {
|
if (resp.result.length) {
|
||||||
|
isEmpty.value = false;
|
||||||
const filterArray = resp.result
|
const filterArray = resp.result
|
||||||
// const filterArray = resp.result.filter((item : any) => item.data?.clusterNodeId === props.serviceId)
|
// const filterArray = resp.result.filter((item : any) => item.data?.clusterNodeId === props.serviceId)
|
||||||
filterArray.forEach((item: any) => {
|
filterArray.forEach((item: any) => {
|
||||||
|
@ -165,7 +169,7 @@ const setOptions = (data: any, key: string) => ({
|
||||||
name: key,
|
name: key,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
areaStyle,
|
// areaStyle,
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleNetworkOptions = (optionsData: any, xAxis: any) => {
|
const handleNetworkOptions = (optionsData: any, xAxis: any) => {
|
||||||
|
@ -202,7 +206,7 @@ const echartsOptions = computed(() => {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
formatter: (_value: any) => networkValueRender(_value[0]),
|
formatter: (_value: any) => networkValueRender(_value[0]),
|
||||||
},
|
},
|
||||||
color: ['#979AFF'],
|
color: colorNetwork,
|
||||||
series: series
|
series: series
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -219,13 +223,6 @@ watch(
|
||||||
{ immediate: true, deep: true },
|
{ immediate: true, deep: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
// watchEffect(() => {
|
|
||||||
// const time = data.value.time.time
|
|
||||||
// if (time && Array.isArray(time) && time.length === 2 && time[0] && props.serviceId) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
<j-scrollbar>
|
<j-scrollbar>
|
||||||
<div class="server-list-items">
|
<div class="server-list-items">
|
||||||
<div
|
<div
|
||||||
v-for="item in options" :class="['server-item', myValue.includes(item) ? 'active' : '']"
|
v-for="(item, index) in options" :key="item" :class="['server-item', myValue.includes(item) ? 'active' : '']"
|
||||||
@click="() => change(item)"
|
@click="() => change(item)"
|
||||||
>
|
>
|
||||||
<j-badge :color=" myValue.includes(item) ? color : '#a3a3a3'" :text="item" />
|
<j-badge :color="myValue.includes(item) ? (Array.isArray(color) ? color[index % 5] : color) : '#a3a3a3'" :text="item" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</j-scrollbar>
|
</j-scrollbar>
|
||||||
|
@ -26,7 +26,7 @@ const props = defineProps({
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
color: {
|
color: {
|
||||||
type: String,
|
type: [String, Array],
|
||||||
default: '#979AFF'
|
default: '#979AFF'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -44,7 +44,7 @@ watch(() => props.options, () => {
|
||||||
echartsRender()
|
echartsRender()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, { deep: true })
|
}, { immediate: true, deep: true })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ export const networkParams = (val: any) => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
export const defulteParamsData = (group: any, val: any) => [
|
export const defaultParamsData = (group: any, val: any) => [
|
||||||
{
|
{
|
||||||
dashboard: 'systemMonitor',
|
dashboard: 'systemMonitor',
|
||||||
object: 'stats',
|
object: 'stats',
|
||||||
|
@ -119,6 +119,10 @@ export const defulteParamsData = (group: any, val: any) => [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const colorNetwork = ['#FF7D00', '#FFC300', '#37E2E2', '#165DFF', '#722ED1']
|
||||||
|
export const colorCpu = ['#313CA9', '#21CCFF', '#249EFF', '#86DF6C', '#979AFF']
|
||||||
|
export const colorJvm = ['#246EFF', '#00B2FF', '#81E2FF', '#2CAB40', '#8D4EDA']
|
||||||
|
|
||||||
export const areaStyle = {
|
export const areaStyle = {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
@cancel="emit('close')"
|
@cancel="emit('close')"
|
||||||
@ok="onSave"
|
@ok="onSave"
|
||||||
>
|
>
|
||||||
|
<div class="alert">
|
||||||
|
<AIcon type="InfoCircleOutlined" />
|
||||||
|
通过角色控制【{{ name }}】的所有的通知方式可被哪些用户订阅。
|
||||||
|
</div>
|
||||||
<Role v-model="_selectedRowKeys" :gridColumn="2" />
|
<Role v-model="_selectedRowKeys" :gridColumn="2" />
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
|
@ -20,6 +24,10 @@ const props = defineProps({
|
||||||
type: Array as PropType<string[]>,
|
type: Array as PropType<string[]>,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const _selectedRowKeys = ref<string[]>([]);
|
const _selectedRowKeys = ref<string[]>([]);
|
||||||
|
@ -31,4 +39,15 @@ watchEffect(() => {
|
||||||
const onSave = () => {
|
const onSave = () => {
|
||||||
emit('save', _selectedRowKeys.value);
|
emit('save', _selectedRowKeys.value);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.alert {
|
||||||
|
height: 40px;
|
||||||
|
padding: 0 20px 0 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: rgba(0, 0, 0, 0.55);
|
||||||
|
line-height: 40px;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -22,7 +22,7 @@
|
||||||
<template #title>
|
<template #title>
|
||||||
<span v-if="!update">暂无权限,请联系管理员</span>
|
<span v-if="!update">暂无权限,请联系管理员</span>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
用于配制外层权限<br />未配置外层权限将执行通知方式中配置的权限<br />配置外层权限后将覆盖所有通知方式中配置的权限
|
通过角色控制【{{ data.name }}】的所有的通知方式可被哪些用户订阅。
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<j-button
|
<j-button
|
||||||
|
@ -129,6 +129,7 @@
|
||||||
@save="onSave"
|
@save="onSave"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:provider="provider"
|
:provider="provider"
|
||||||
|
:name="data.name"
|
||||||
/>
|
/>
|
||||||
<Detail
|
<Detail
|
||||||
:data="current"
|
:data="current"
|
||||||
|
@ -140,6 +141,7 @@
|
||||||
:data="data?.grant?.role?.idList"
|
:data="data?.grant?.role?.idList"
|
||||||
@close="authVisible = false"
|
@close="authVisible = false"
|
||||||
@save="onAuthSave"
|
@save="onAuthSave"
|
||||||
|
:name="data.name"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -346,49 +348,53 @@ const onSwitchChange = (e: boolean) => {
|
||||||
if (_checked) {
|
if (_checked) {
|
||||||
onAction(e);
|
onAction(e);
|
||||||
} else {
|
} else {
|
||||||
Modal.confirm({
|
if (e) {
|
||||||
title: e
|
onAction(e);
|
||||||
? '开启后默认平台所有用户都能接收到该通知'
|
} else {
|
||||||
: '关闭后平台所有用户都不能接收到该通知',
|
Modal.confirm({
|
||||||
cancelText: '取消',
|
title: e
|
||||||
okText: e ? '确认开启' : '确认关闭',
|
? '开启后默认平台所有用户都能接收到该通知'
|
||||||
content: h(
|
: '关闭后平台所有用户都不能接收到该通知',
|
||||||
'div',
|
cancelText: '取消',
|
||||||
{
|
okText: e ? '确认开启' : '确认关闭',
|
||||||
style: {
|
content: h(
|
||||||
display: 'flex',
|
'div',
|
||||||
justifyContent: 'flex-end',
|
{
|
||||||
marginTop: '20px',
|
style: {
|
||||||
},
|
display: 'flex',
|
||||||
},
|
justifyContent: 'flex-end',
|
||||||
[
|
marginTop: '20px',
|
||||||
h(
|
|
||||||
Checkbox,
|
|
||||||
{
|
|
||||||
onChange: (_e: any) => {
|
|
||||||
LocalStore.set(
|
|
||||||
user.userInfos?.username,
|
|
||||||
e
|
|
||||||
? {
|
|
||||||
..._value,
|
|
||||||
open: _e.target?.checked,
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
..._value,
|
|
||||||
close: _e.target?.checked,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
'不再提示',
|
},
|
||||||
),
|
[
|
||||||
],
|
h(
|
||||||
),
|
Checkbox,
|
||||||
onOk() {
|
{
|
||||||
onAction(e);
|
onChange: (_e: any) => {
|
||||||
},
|
LocalStore.set(
|
||||||
onCancel() {},
|
user.userInfos?.username,
|
||||||
});
|
e
|
||||||
|
? {
|
||||||
|
..._value,
|
||||||
|
open: _e.target?.checked,
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
..._value,
|
||||||
|
close: _e.target?.checked,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'不再提示',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onOk() {
|
||||||
|
onAction(e);
|
||||||
|
},
|
||||||
|
onCancel() {},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -489,7 +495,7 @@ const onSave = (_data: any) => {
|
||||||
|
|
||||||
.box-item-add {
|
.box-item-add {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #F7F8FA;
|
background-color: #f7f8fa;
|
||||||
width: 54px;
|
width: 54px;
|
||||||
height: 54px;
|
height: 54px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
</j-alert>
|
</j-alert>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<j-scrollbar height="400px">
|
<j-scrollbar :height="gridColumn <= 2 ? '320px' : '250px'">
|
||||||
<j-pro-table
|
<j-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<AIcon type="InfoCircleOutlined" />
|
<AIcon type="InfoCircleOutlined" />
|
||||||
钉钉群机器人类型的配置在当前页面将被过滤
|
钉钉群机器人类型的配置在当前页面将被过滤
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 400px; overflow-y: auto">
|
<div style="max-height: 400px; overflow-y: auto">
|
||||||
<JProTable
|
<JProTable
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:request="query"
|
:request="query"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<AIcon type="InfoCircleOutlined" />
|
<AIcon type="InfoCircleOutlined" />
|
||||||
已规定固定收信人的模板在当前页面将被过滤
|
已规定固定收信人的模板在当前页面将被过滤
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 400px; overflow-y: auto">
|
<div style="max-height: 400px; overflow-y: auto">
|
||||||
<JProTable
|
<JProTable
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:request="(e) => handleData(e)"
|
:request="(e) => handleData(e)"
|
||||||
|
|
|
@ -69,10 +69,12 @@ onMounted(() => {
|
||||||
iconUrl: iconMap.get(item.id),
|
iconUrl: iconMap.get(item.id),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
emit('update:value', options.value?.[0]?.value);
|
||||||
|
emit('update:name', options.value?.[0]?.label);
|
||||||
|
emit('change', {label: options.value?.[0]?.label, value: options.value?.[0]?.value});
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
notifyType.value = props.value;
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
<j-step v-for="(item, index) in stepList" :key="item">
|
<j-step v-for="(item, index) in stepList" :key="item">
|
||||||
<template #title>
|
<template #title>
|
||||||
{{ item
|
{{ item
|
||||||
}}<j-tooltip
|
}}<j-tooltip v-if="index === 4">
|
||||||
v-if="index === 4"
|
|
||||||
>
|
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>内层权限配置<br />外层权限已配置的情况下,将取外层权限与当前页面分配权限的交集,向对应角色发送通知。<br />外层权限未配置的情况下,将按此处配置的权限发送通知。</span>
|
<span>
|
||||||
|
通过角色控制【{{ name }}】下的【{{ showName }}通知】可被哪些用户订阅。<br />
|
||||||
|
注意:当前配置会被外层【{{ name }}】中的权限控制覆盖。
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<AIcon type="QuestionCircleOutlined"
|
<AIcon type="QuestionCircleOutlined"
|
||||||
/></j-tooltip>
|
/></j-tooltip>
|
||||||
|
@ -32,6 +33,7 @@
|
||||||
<template v-if="current === 0">
|
<template v-if="current === 0">
|
||||||
<NotifyWay
|
<NotifyWay
|
||||||
:value="formModel.channelProvider"
|
:value="formModel.channelProvider"
|
||||||
|
v-model:name="showName"
|
||||||
@change="onWayChange"
|
@change="onWayChange"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -161,6 +163,10 @@ const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const stepList = [
|
const stepList = [
|
||||||
|
@ -190,14 +196,15 @@ const formModel = reactive<{
|
||||||
});
|
});
|
||||||
const variableRef = ref();
|
const variableRef = ref();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
const showName = ref<string>('钉钉')
|
||||||
|
|
||||||
const _getType = computed(() => {
|
const _getType = computed(() => {
|
||||||
if(['notifier-dingTalk'].includes(props.data?.channelProvider)) {
|
if (['notifier-dingTalk'].includes(props.data?.channelProvider)) {
|
||||||
return ['user', 'tag']
|
return ['user', 'tag'];
|
||||||
} else {
|
} else {
|
||||||
return ['user', 'org', 'tag']
|
return ['user', 'org', 'tag'];
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
const _variableDefinitions = computed(() => {
|
const _variableDefinitions = computed(() => {
|
||||||
return variable.value.filter((item: any) => {
|
return variable.value.filter((item: any) => {
|
||||||
|
|
|
@ -3755,8 +3755,8 @@ jetlinks-ui-components@^1.0.23:
|
||||||
|
|
||||||
jetlinks-ui-components@^1.0.27:
|
jetlinks-ui-components@^1.0.27:
|
||||||
version "1.0.27"
|
version "1.0.27"
|
||||||
resolved "http://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.27.tgz#97f04cb18906ad603de2bcbc62fa4b6673a7a3d0"
|
resolved "http://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.27.tgz#03a2a9ba49d669c6d63e6c5d5b144f31a27253df"
|
||||||
integrity sha512-R9dPrRMwV5imqV0JTkHeTMT8LeCnv7+Vb1IqKNIqc9I7joFZ9hLtEAE0EXO5GxTthPUiMZlQ+BDsd9ehCArO3Q==
|
integrity sha512-I9A05UXUtjRsSWU/jgRDfDNeCv2ZV21/PV4FEV3UG5bQOYa1/CvL7Lr7F7iB1m4Hjn9mnXTqAQ2pU11b6T2U8Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@vueuse/core" "^9.12.0"
|
"@vueuse/core" "^9.12.0"
|
||||||
"@vueuse/router" "^9.13.0"
|
"@vueuse/router" "^9.13.0"
|
||||||
|
|
Loading…
Reference in New Issue