Commit c7ae8c1b7c8a9f98ab79fdd0c878088d75a9ca08

Authored by xp.Huang
2 parents 98bb853b bf7731c4

Merge branch 'fix/problem/06-12' into 'main_dev'

perf: 优化场景联动,执行条件开启后不可删除

See merge request yunteng/thingskit-front!1376
... ... @@ -28,6 +28,7 @@ import { RouteRecordRaw } from 'vue-router';
28 28 import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic';
29 29 import { createLocalStorage } from '/@/utils/cache/index';
30 30 import { getEntitiesId } from '/@/api/dashboard/index';
  31 +import { useRole } from '/@/hooks/business/useRole';
31 32
32 33 interface PlatInfoType {
33 34 id: string;
... ... @@ -283,7 +284,10 @@ export const useUserStore = defineStore({
283 284 title: t('sys.app.logoutTip'),
284 285 content: t('sys.app.logoutMessage'),
285 286 onOk: async () => {
286   - await logoutApi(null, 'modal'); //新增退出登录接口
  287 + const { isPlatformAdmin } = useRole();
  288 + if (!isPlatformAdmin.value) {
  289 + await logoutApi(null, 'modal'); //新增退出登录接口
  290 + }
287 291 await this.logout(true);
288 292 },
289 293 });
... ...
... ... @@ -247,11 +247,11 @@ export const alarmSchemasForm: FormSchema[] = [
247 247 disabled: true,
248 248 },
249 249 },
250   - {
251   - field: 'details',
252   - label: '详情',
253   - component: 'InputTextArea',
254   - },
  250 + // {
  251 + // field: 'details',
  252 + // label: '详情',
  253 + // component: 'InputTextArea',
  254 + // },
255 255 ];
256 256
257 257 export function getAlarmStatus({
... ...
... ... @@ -143,7 +143,12 @@
143 143 </div>
144 144 <Tooltip title="删除">
145 145 <Icon
146   - v-if="!disabledDrawer && flipFlopListElRef.length > 1"
  146 + v-if="
  147 + !disabledDrawer &&
  148 + (type === FlipFlopComponentTypeEnum.FLIP_FLOP
  149 + ? flipFlopListElRef.length > 1
  150 + : true)
  151 + "
147 152 class="ml-2 cursor-pointer"
148 153 icon="fluent:delete-off-20-regular"
149 154 size="20"
... ...