瀏覽代碼

导入列表按需求显示几个

yuhan 1 年之前
父節點
當前提交
e2217f7156

+ 2 - 2
src/views/module_kzks/costModelList/CostModelList.vue

@@ -28,9 +28,9 @@
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
       <!-- <a-button type="primary" icon="download" @click="handleExportXls('成本模型')">导出</a-button> -->
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+      <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
+      </a-upload> -->
       <!-- 高级查询区域 -->
       <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
       <a-dropdown v-if="selectedRowKeys.length > 0">

+ 1 - 1
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -311,7 +311,7 @@
     <contrast-modal ref="xushi"></contrast-modal>
 
     <!-- 导入弹框 -->
-    <project-import-list-modal ref="modalForm" @ok="modalFormOk"></project-import-list-modal>
+    <project-import-list-modal ref="modalForm" @ok="modalFormOk" :isAllShow="false"></project-import-list-modal>
   </a-card>
 </template>
 

+ 13 - 1
src/views/module_kzks/projectImportList/modules/ProjectImportListForm.vue

@@ -11,7 +11,7 @@
           </a-col>
           <a-col :span="24">
             <a-form-model-item label="导入类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fileType">
-              <j-dict-select-tag type="list" v-model="model.fileType" dictCode="import_type" placeholder="请选择导入类型" />
+              <j-dict-select-tag ref="importType" type="list" v-model="model.fileType" dictCode="import_type" placeholder="请选择导入类型" />
             </a-form-model-item>
           </a-col>
           <!-- <a-col :span="24">
@@ -46,6 +46,11 @@
         type: Boolean,
         default: false,
         required: false
+      },
+      isAllShow: {
+        type: Boolean,
+        default: true,
+        required: false
       }
     },
     data () {
@@ -81,6 +86,13 @@
     created () {
        //备份model原始值
       this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      this.$nextTick(res => {
+        if(!this.isAllShow){
+          this.$refs.importType.dictOptions = this.$refs.importType.dictOptions.filter(item => {
+            return item.value<3
+          })
+        }
+      })
     },
     methods: {
       add () {

+ 9 - 2
src/views/module_kzks/projectImportList/modules/ProjectImportListModal.vue

@@ -8,7 +8,7 @@
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     cancelText="关闭">
-    <project-import-list-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></project-import-list-form>
+    <project-import-list-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :isAllShow="isAllShow"></project-import-list-form>
   </j-modal>
 </template>
 
@@ -20,12 +20,19 @@
     components: {
       ProjectImportListForm
     },
+    props: {
+      isAllShow: {
+        type: Boolean,
+        default: true,
+        required: false
+      }
+    },
     data () {
       return {
         title:'',
         width:800,
         visible: false,
-        disableSubmit: false
+        disableSubmit: false,
       }
     },
     methods: {