tangning 10 månader sedan
förälder
incheckning
d4aa75a419
2 ändrade filer med 16 tillägg och 22 borttagningar
  1. 14 21
      src/views/lanUser/adddetailsModal.vue
  2. 2 1
      src/views/lanUser/list.vue

+ 14 - 21
src/views/lanUser/adddetailsModal.vue

@@ -181,35 +181,27 @@
           permList: [],
         });
       }
-      handlestd(){
-        createConfirm({
-          title: '提示',
-          content: '该用户已属其他平台,确定为其更换平台?',
-          onOk: async () => {
-            handleOk()
-          },
-        });
+      function handlestd(){
+        if(active.value.platformId){
+          createConfirm({
+              title: '提示',
+              content: '该用户已属其他平台,确定为其更换平台?',
+              onOk: async () => {
+                handleOk()
+              },
+            });
+        }else{
+          handleOk()
+        }
       }
       async function handleOk() {
-        createConfirm({
-          title: '提示',
-          content: '该用户已属其他平台,确定为其更换平台?',
-          onOk: async () => {
             let res = await jyUserPlatformadd({
-              id: modelRef,
+              id: modelRef.value,
             });
             context && context.emit('ok', res);
             createMessage.success(t('common.optSuccess'));
             closeModal();
             resetFields();
-            sceneCopy({ num: record.num }).then((res) => {
-              message.success({
-                content: '复制成功',
-              });
-              reload();
-            });
-          },
-        });
       }
       function handleChange(value, b ) {
         active.value = b;
@@ -227,6 +219,7 @@
         options,
         handleChange,
         active,
+        handlestd,
       };
     },
   });

+ 2 - 1
src/views/lanUser/list.vue

@@ -5,7 +5,7 @@
         <a-button
           type="primary"
           @click="handleCreate"
-          v-if="getCheckPerm('lanuser-add')"
+         
           >添加用户</a-button
         ><a-button
           type="primary"
@@ -13,6 +13,7 @@
           @click="openModalPut(true, {})"
           >批量导入</a-button
         >
+        <!-- v-if="getCheckPerm('lanuser-add')" -->
       </template>
       <template #role="{ record }">
         {{ renderRoleType(record.role) }}