zcuishan преди 3 месеца
родител
ревизия
042cecf7b2

+ 2 - 0
src/components/Designer/src/types/index.ts

@@ -777,6 +777,8 @@ export const layoutComponents = [
       showComponentBorder: true,
       showFormBorder: true,
       showIndex: false,
+      labelField: 'label',
+      valueField: 'value',
       isShow: true,
       multipleHeads: [],
     },

+ 19 - 2
src/components/Import/src/ImportModal.vue

@@ -6,10 +6,11 @@
         name="file"
         :multiple="true"
         :action="action"
+        @change="handleChange"
         :beforeUpload="beforeUpload"
         :data="data"
         accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
-        :headers="{ Authorization: `Bearer ${getToken()}` }"
+        :headers="{ Authorization: `${getToken()}` }"
       >
         <img src="/src/assets/images/import.png" />
         <span class="upload-tip">只能上传Excel文件,且不能超过1G</span>
@@ -72,7 +73,23 @@
       return false;
     }
   };
-
+  const handleChange = (e) => {
+    const fileList = e.fileList[0];
+    if (fileList.status === 'done') {
+      if (fileList.response !== 0) {
+        notification.error({
+          message: 'Tip',
+          description: fileList.response.msg,
+        });
+      } else {
+        notification.success({
+          message: 'Tip',
+          description: '导入成功!',
+        });
+      }
+    }
+    console.log(e);
+  };
   const downLoadTemplate = async () => {
     const method = importType.value || 'GET';
     let res;

+ 5 - 1
src/components/MultiplePopup/src/components/MultipleSelect.vue

@@ -36,6 +36,7 @@
         <a-table
           :dataSource="state.dataSourceList"
           :columns="state.sourceColumns"
+          @change="handleChange"
           :row-selection="{
             selectedRowKeys: state.selectedRowKeys,
             onChange: onSelectChange,
@@ -153,7 +154,9 @@
   });
 
   const selectedList = ref(props.selectedDataSource);
-
+  const handleChange = ({ pageSize }) => {
+    paginationProps.pageSize = pageSize;
+  };
   const paginationProps = reactive({
     current: 1,
     total: 0,
@@ -406,6 +409,7 @@
     if (!api || !isFunction(api)) return;
     state.dataSourceList = [];
     try {
+      debugger;
       let dataParams = {};
       const pageParams = { order: 'desc', size: 10, limit, keyword: state.searchText };
       if (props.datasourceType === 'dic') {