diff --git a/src/api/account/center.ts b/src/api/account/center.ts index 46e410e6..5fa615d8 100644 --- a/src/api/account/center.ts +++ b/src/api/account/center.ts @@ -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 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 类型 diff --git a/src/components/FRuleEditor/index.vue b/src/components/FRuleEditor/index.vue index 9415e7fb..c45a2204 100644 --- a/src/components/FRuleEditor/index.vue +++ b/src/components/FRuleEditor/index.vue @@ -5,6 +5,7 @@ visible width="70vw" title="编辑规则" + :getContainer="(node) => fullRef || node" @cancel="handleCancel" :destroyOnClose="true" > @@ -57,6 +58,7 @@ import Editor from './Editor/index.vue'; import Debug from './Debug/index.vue'; import Operator from './Operator/index.vue'; +import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable' interface Emits { (e: 'save', data: string | undefined): void; @@ -73,6 +75,7 @@ const props = defineProps({ const _value = ref(props.value); const _disabled = ref(true); +const fullRef = inject(FULL_CODE); const handleCancel = () => { emit('close'); diff --git a/src/components/Layout/BasicLayoutPage.vue b/src/components/Layout/BasicLayoutPage.vue index 92ab5f9d..d029fac1 100644 --- a/src/components/Layout/BasicLayoutPage.vue +++ b/src/components/Layout/BasicLayoutPage.vue @@ -61,7 +61,7 @@ const layoutConf = reactive({ siderWidth: layout.value.siderWidth, logo: DefaultSetting.layout.logo, title: DefaultSetting.layout.title, - menuData: [...menu.siderMenus, AccountMenu], + menuData: menu.siderMenus, // menuData: menu.siderMenus, splitMenus: true, }); diff --git a/src/components/ValueItem/index.vue b/src/components/ValueItem/index.vue index 0b5c4b1d..da46528a 100644 --- a/src/components/ValueItem/index.vue +++ b/src/components/ValueItem/index.vue @@ -8,6 +8,7 @@ :options="options" allowClear style="width: 100%" + :getPopupContainer="getPopupContainer" @change='selectChange' /> '', + }, + getPopupContainer: { + type: Function, + default: undefined } }); // type Props = { diff --git a/src/store/menu.ts b/src/store/menu.ts index ed6839cb..ab33fa91 100644 --- a/src/store/menu.ts +++ b/src/store/menu.ts @@ -123,7 +123,7 @@ export const useMenuStore = defineStore({ }) // console.log(menusData) // menusData.push(AccountMenu) - this.siderMenus = silderMenus.filter((item: { name: string }) => ![USER_CENTER_MENU_CODE, NotificationRecordCode, NotificationSubscriptionCode].includes(item.name)) + this.siderMenus = silderMenus res(menusData) } }) diff --git a/src/utils/menu.ts b/src/utils/menu.ts index c973554d..6dfde7a4 100644 --- a/src/utils/menu.ts +++ b/src/utils/menu.ts @@ -487,7 +487,7 @@ export const handleMenusMap = (menuData: any[], cb: (data: any) => void) => { } 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[]) => { diff --git a/src/views/DataCollect/Dashboard/components/Card.vue b/src/views/DataCollect/Dashboard/components/Card.vue index 8980e0b2..542c13b4 100644 --- a/src/views/DataCollect/Dashboard/components/Card.vue +++ b/src/views/DataCollect/Dashboard/components/Card.vue @@ -83,6 +83,9 @@ const handleOptions = (x = [], y = []) => { const chart: any = chartRef.value; if (chart) { const myChart = echarts.init(chart); + const maxY: number = y.sort((a,b)=>{ + return b-a + })?.[0] const options = { xAxis: { type: 'category', @@ -93,8 +96,8 @@ const handleOptions = (x = [], y = []) => { type: 'value', }, grid: { - left: '80px', - right: '50px', + left: maxY < 1000 ? 60 : maxY.toString().length * 10, + right: '60px', }, tooltip: { trigger: 'axis', diff --git a/src/views/DataCollect/Dashboard/index.vue b/src/views/DataCollect/Dashboard/index.vue index 1b07cfe3..006f4cf3 100644 --- a/src/views/DataCollect/Dashboard/index.vue +++ b/src/views/DataCollect/Dashboard/index.vue @@ -12,7 +12,7 @@ /> - + @@ -26,14 +26,19 @@ import Card from './components/Card.vue'; import { getImage } from '@/utils/comm'; import { queryCount } from '@/api/data-collect/dashboard'; import { defaultParams, statusData } from './tool'; +import { useMenuStore } from '@/store/menu'; + +const menuPermission = useMenuStore().hasMenu; const StatusData = ref(statusData); const getNumberData = () => { StatusData.value.forEach(async (item: any) => { - const res = await queryCount(item[0].type, {}); - const resp = await queryCount(item[0].type, defaultParams); - item[0].total = res?.result; - item[0].value = resp?.result; + if(menuPermission(item[0]?.permission)) { + const res = await queryCount(item[0].type, {}); + const resp = await queryCount(item[0].type, defaultParams); + item[0].total = res?.result; + item[0].value = resp?.result; + } }); }; onMounted(() => { diff --git a/src/views/DataCollect/Dashboard/tool.ts b/src/views/DataCollect/Dashboard/tool.ts index 4fd5a133..a6c2cf5a 100644 --- a/src/views/DataCollect/Dashboard/tool.ts +++ b/src/views/DataCollect/Dashboard/tool.ts @@ -39,13 +39,13 @@ const getParams = (dt: any) => { }; } else if (time > days && time <= days * 7) { return { - limit: Math.abs(Math.ceil(time / days / 7)) + 1, + limit: Math.abs(Math.ceil(time / days)) + 1, interval: '1d', format: 'YYYY-MM-dd HH:mm', }; - } else if (time >= year) { + } else if (time > days*90) { return { - limit: Math.abs(Math.ceil(time / days / 31)) + 1, + limit: Math.abs(Math.ceil(time / days / 30)) + 1, interval: '1M', format: 'YYYY-MM-dd HH:mm', }; @@ -137,6 +137,7 @@ export const statusData = [ label: '通道数量', value: 0, total: 0, + permission: 'DataCollect/Channel' }, ], [ @@ -147,6 +148,7 @@ export const statusData = [ label: '采集器数量', value: 0, total: 0, + permission: 'DataCollect/Collector' }, ], [ @@ -157,6 +159,7 @@ export const statusData = [ label: '采集点位', value: 0, total: 0, + permission: 'DataCollect/Collector' }, ], ]; diff --git a/src/views/account/Center/components/EditInfo/index.vue b/src/views/account/Center/components/EditInfo/index.vue index f2e52dff..edec55fd 100644 --- a/src/views/account/Center/components/EditInfo/index.vue +++ b/src/views/account/Center/components/EditInfo/index.vue @@ -6,6 +6,8 @@ width="770px" @cancel="emits('close')" :confirmLoading="loading" + :zIndex="1100" + :maskClosable='false' > @@ -66,7 +68,7 @@ :rules="[ { pattern: /^1[3456789]\d{9}$/, - message: '请输入正确手机号', + message: '请输入正确的手机号', }, ]" > diff --git a/src/views/account/Center/components/Subscribe/components/Bind.vue b/src/views/account/Center/components/Subscribe/components/Bind.vue index 299b09b0..cfffeabf 100644 --- a/src/views/account/Center/components/Subscribe/components/Bind.vue +++ b/src/views/account/Center/components/Subscribe/components/Bind.vue @@ -1,5 +1,5 @@ @@ -346,49 +348,53 @@ const onSwitchChange = (e: boolean) => { if (_checked) { onAction(e); } else { - Modal.confirm({ - title: e - ? '开启后默认平台所有用户都能接收到该通知' - : '关闭后平台所有用户都不能接收到该通知', - cancelText: '取消', - okText: e ? '确认开启' : '确认关闭', - content: h( - 'div', - { - 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, - }, - ); - }, + if (e) { + onAction(e); + } else { + Modal.confirm({ + title: e + ? '开启后默认平台所有用户都能接收到该通知' + : '关闭后平台所有用户都不能接收到该通知', + cancelText: '取消', + okText: e ? '确认开启' : '确认关闭', + content: h( + 'div', + { + style: { + display: 'flex', + justifyContent: 'flex-end', + marginTop: '20px', }, - '不再提示', - ), - ], - ), - onOk() { - onAction(e); - }, - onCancel() {}, - }); + }, + [ + h( + Checkbox, + { + onChange: (_e: any) => { + LocalStore.set( + 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 { cursor: pointer; - background-color: #F7F8FA; + background-color: #f7f8fa; width: 54px; height: 54px; display: flex; diff --git a/src/views/system/NoticeRule/components/Role/index.vue b/src/views/system/NoticeRule/components/Role/index.vue index 4b1010af..7188b5ed 100644 --- a/src/views/system/NoticeRule/components/Role/index.vue +++ b/src/views/system/NoticeRule/components/Role/index.vue @@ -70,7 +70,7 @@ - + 钉钉群机器人类型的配置在当前页面将被过滤 -
+
已规定固定收信人的模板在当前页面将被过滤
-
+
{ 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; }); - notifyType.value = props.value; }); diff --git a/src/views/system/NoticeRule/components/Save/index.vue b/src/views/system/NoticeRule/components/Save/index.vue index a4c3d280..fca7e00c 100644 --- a/src/views/system/NoticeRule/components/Save/index.vue +++ b/src/views/system/NoticeRule/components/Save/index.vue @@ -11,11 +11,12 @@