Bladeren bron

merge fix

scorpio 2 jaren geleden
bovenliggende
commit
8c4193b799
1 gewijzigde bestanden met toevoegingen van 11 en 2 verwijderingen
  1. 11 2
      src/views/home/component/form_dialog.vue

+ 11 - 2
src/views/home/component/form_dialog.vue

@@ -91,13 +91,14 @@
         </div>
       </div>
       <el-divider/>
-      <div v-loading='loading' class="hide-scrollbar full-width" style="height: 20vh;overflow-x: scroll">
+      <div v-loading='loading' class="hide-scrollbar full-width" style="height: 25vh;overflow-x: scroll">
         <!--        <div v-if='attaches.length === 0' class='full-width flex flex-center '>-->
         <!--          <el-empty image-size='100'/>-->
         <!--        </div>-->
         <div class="flex flex-justify-between flex-center">
           <span class="bold font-15 grey ml-5 ">字段选择</span>
         </div>
+
         <div class="flex flex-wrap" v-if='selectIndex !== -1'>
           <div v-for="(item,index) in fieldType[selectIndex].params" :key='item.id'
                class="flex flex-center padding pointer">
@@ -106,9 +107,10 @@
             </el-checkbox>
           </div>
         </div>
+        <el-empty v-else description='点击上方按钮,选择字段'/>
       </div>
       <div class="flex flex-center mt-20 mb-5">
-        <base-button title="重置" type="0" icon="Refresh"/>
+        <base-button title="重置" @click='resetParams' type="0" icon="Refresh"/>
         <base-button class="ml-15" title="导出表格" icon="el-icon-download" @click='exportExcel'/>
       </div>
     </el-dialog>
@@ -244,6 +246,13 @@ export default {
         this.resultParams.push(tmp[i])
       }
     },
+    resetParams () {
+      this.fieldType[this.selectIndex].params = this.fieldType[this.selectIndex].params.map(sub => {
+        sub.checked = false
+        return sub
+      })
+      this.fieldType[this.selectIndex].count = 0
+    },
     exportExcel () {
       const params = this.fieldType.filter(sub => sub.params).map(sub => sub.params)
       const tmps = [].concat.apply([], params)