Browse Source

feat(merge): merge sc

fix: 启用状态不可删除修改
Lind 4 years ago
parent
commit
84a69a3f02

+ 1 - 0
src/pages/link/AccessConfig/index.tsx

@@ -154,6 +154,7 @@ const AccessConfig = () => {
                       }}
                       popConfirm={{
                         title: '确认删除',
+                        disabled: item.state.value !== 'disabled',
                         onConfirm: () => {
                           service.remove(item.id).then((resp: any) => {
                             if (resp.status === 200) {

+ 2 - 0
src/pages/link/Protocol/index.tsx

@@ -136,6 +136,7 @@ const Protocol = () => {
           disabled={record.state === 1}
           popConfirm={{
             title: '确认删除',
+            disabled: record.state === 1,
             onConfirm: async () => {
               const resp: any = await service.remove(record.id);
               if (resp.status === 200) {
@@ -260,6 +261,7 @@ const Protocol = () => {
                 disabled={record.state === 1}
                 popConfirm={{
                   title: '确认删除',
+                  disabled: record.state === 1,
                   onConfirm: async () => {
                     const resp: any = await service.remove(record.id);
                     if (resp.status === 200) {

+ 2 - 0
src/pages/media/Cascade/index.tsx

@@ -109,6 +109,7 @@ const Cascade = () => {
       }}
       popConfirm={{
         title: '确认删除',
+        disabled: record.status.value !== 'disabled',
         onConfirm: async () => {
           const resp: any = await service.remove(record.id);
           if (resp.status === 200) {
@@ -285,6 +286,7 @@ const Cascade = () => {
           }}
           popConfirm={{
             title: '确认删除',
+            disabled: record.status.value !== 'disabled',
             onConfirm: async () => {
               const resp: any = await service.remove(record.id);
               if (resp.status === 200) {

+ 2 - 0
src/pages/rule-engine/Instance/index.tsx

@@ -78,6 +78,7 @@ const Instance = () => {
       }}
       popConfirm={{
         title: '确认删除',
+        disabled: record.state.value !== 'disable',
         onConfirm: async () => {
           if (record.state.value === 'disable') {
             await service.remove(record.id);
@@ -220,6 +221,7 @@ const Instance = () => {
           }}
           popConfirm={{
             title: '确认删除',
+            disabled: record.state.value !== 'disable',
             onConfirm: async () => {
               if (record.state.value === 'disable') {
                 await service.remove(record.id);

+ 1 - 0
src/pages/system/Permission/index.tsx

@@ -225,6 +225,7 @@ const Permission: React.FC = observer(() => {
           }}
           popConfirm={{
             title: '确认删除',
+            disabled: !!record.status,
             onConfirm: async () => {
               if (record.status) {
                 await service.remove(record.id);