tangning 10 ماه پیش
والد
کامیت
c3e0b8dba9
5فایلهای تغییر یافته به همراه27 افزوده شده و 41 حذف شده
  1. 3 0
      src/App.vue
  2. 1 0
      src/components/Upload/src/FileList.vue
  3. 15 39
      src/views/lanUser/adddetailsModal.vue
  4. 0 1
      src/views/lanUser/list.vue
  5. 8 1
      src/views/lanUser/platformList.vue

+ 3 - 0
src/App.vue

@@ -73,4 +73,7 @@
   color: rgba(0, 0, 0, 0.85) !important;
 }
 
+.ant-modal div[aria-hidden="true"] {
+  display: none !important;
+}
 </style>

+ 1 - 0
src/components/Upload/src/FileList.vue

@@ -24,6 +24,7 @@
         console.log('createPreviewActionColumn',columnList,dataSource)
         return (
           <table class="file-table">
+            {{dataSource}}
             <colgroup>
               {columnList.map((item) => {
                 const { width = 0, dataIndex } = item;

+ 15 - 39
src/views/lanUser/adddetailsModal.vue

@@ -11,7 +11,7 @@
         v-model:value="modelRef"
         show-search
         placeholder="请输入姓名/手机号码/身份证号码搜索"
-        style="width: 350px"
+        style="width: 350px;     text-align: left;"
         :default-active-first-option="false"
         :show-arrow="false"
         :filter-option="false"
@@ -24,7 +24,7 @@
         <div class="form-item">
           <div>姓名</div>{{active.name}} </div>
         <div class="form-item">
-          <div>手机号码</div>{{active.phone || '暂无手机号'}} </div>
+          <div>手机号码</div>{{active.phone || '暂无手机号'}} </div>
         <div class="form-item">
           <div>身份证</div>{{active.idCard || '暂无身份证'}} </div>
         <div class="form-item">
@@ -70,28 +70,16 @@
         lastFetchId += 1;
         const fetchId = lastFetchId;
         options.value = [];
-        setFieldsValue({
-          id: null,
-        });
         queryByKey({ queryKey: value }).then((res) => {
           console.log('queryByKey', res);
           const data = res.map((user) => ({
             ...user,
-            label: `${user.name}/${user.phone || '暂无手机号码'}/${user.idCard || ''}/${
+            label: `${user.name}/${user.phone || '暂无手机号码'}/${user.idCard || '暂无身份证'}/${
               user.platformName || '未分配'
             }`,
             value: user.id,
           }));
           options.value = data;
-          updateSchema([
-            {
-              field: 'id',
-              ifShow: true,
-              componentProps: {
-                options: options.value,
-              },
-            },
-          ]);
         });
       }, 300);
       const schemas: FormSchema[] = [
@@ -133,14 +121,14 @@
       ];
       const title = ref('添加用户');
       const { createMessage, createConfirm } = useMessage();
-      const [registerForm, { setFieldsValue, validate, updateSchema, resetFields }] = useForm({
-        labelWidth: 120,
-        schemas,
-        showActionButtonGroup: false,
-        actionColOptions: {
-          span: 24,
-        },
-      });
+      // const [registerForm, { setFieldsValue, validate, updateSchema, resetFields }] = useForm({
+      //   labelWidth: 120,
+      //   schemas,
+      //   showActionButtonGroup: false,
+      //   actionColOptions: {
+      //     span: 24,
+      //   },
+      // });
 
       const [register, { closeModal }] = useModalInner((data) => {
         data && onDataReceive(data);
@@ -152,20 +140,6 @@
         // 方式1;
         setTimeout(() => {
           preventAutoFill.value = false;
-          updateSchema([
-            {
-              field: 'userName',
-              componentProps: {
-                readonly: false,
-              },
-            },
-            {
-              field: 'password',
-              componentProps: {
-                readonly: false,
-              },
-            },
-          ]);
           // updateSchema(schemas);
         }, 500);
       }
@@ -208,6 +182,7 @@
       }
       async function handleOk() {
             let res = await jyUserPlatformadd({
+              ...active,
               id: modelRef.value,
             });
             context && context.emit('ok', res);
@@ -223,10 +198,8 @@
         title,
         preventAutoFill,
         schemas,
-        registerForm,
         modelRef,
         handleOk,
-        resetFields,
         fetchUser,
         options,
         handleChange,
@@ -237,6 +210,9 @@
   });
 </script>
 <style lang="less" scoped>
+  .ant-select-selection-item{
+    text-align: left;
+  }
   .BasicForms {
     margin: 0 auto;
     text-align: center;

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

@@ -5,7 +5,6 @@
         <a-button
           type="primary"
           @click="handleCreate"
-         v-if="getCheckPerm('lanuser-add')"
           >添加用户</a-button
         ><a-button
           type="primary"

+ 8 - 1
src/views/lanUser/platformList.vue

@@ -122,6 +122,9 @@
           title: '平台名称',
           dataIndex: 'platformName',
           width: 150,
+          customRender: ({ record }) => {
+            return record.platformName || '-';
+          },
         },
         {
           title: '平台地址',
@@ -129,13 +132,17 @@
           width: 200,
           customRender: ({ record }) => {
             let url = window.location.origin + window.location.pathname + '?key=' + record.platformAddress;
-            return url;
+            return url || '-';
+
           },
         },
         {
           title: '平台管理员姓名',
           dataIndex: 'name',
           width: 100,
+          customRender: ({ record }) => {
+            return record.name || '-';
+          },
         },
         // {
         //   title: '平台管理员手机号码',