Explorar o código

列数据返回为为空时显示全部+按钮显示

yuhan hai 1 ano
pai
achega
ebc02bdf4c
Modificáronse 1 ficheiros con 13 adicións e 7 borrados
  1. 13 7
      src/views/module_kzks/projectCostList/ProjectCostList.vue

+ 13 - 7
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -216,7 +216,14 @@
 
         <span slot="action" slot-scope="text, record">
           <!-- <a @click="handleEdit(record)">编辑</a> -->
-          <a @click="handleXushi(record)">预算执行</a>
+          <a-tooltip v-if="record.id !== 'amount' && record.ji === 1">
+            <template slot="title">
+              汇集层无预算执行
+            </template>
+            <span style="color: rgba(0,0,0,.25);">预算执行</span>
+          </a-tooltip>
+          <a @click="handleXushi(record)" v-if="record.ji === 2">预算执行</a>
+          <!-- <a @click="handleXushi(record)" v-if="record.id !== 'amount'" :disabled="record.ji === 1">预算执行</a> -->
 
           <!-- <a-divider type="vertical" />
           <a-dropdown>
@@ -587,8 +594,8 @@
             fixed:"right",
             width:147,
             scopedSlots: {
-              filterDropdown: 'filterDropdown',
-              filterIcon: 'filterIcon',
+              // filterDropdown: 'filterDropdown',
+              // filterIcon: 'filterIcon',
               customRender: 'action',
             }
           }
@@ -703,11 +710,10 @@
       },
       initColumns(){
         //权限过滤(列权限控制时打开,修改第二个参数为授权码前缀)
-        //this.defColumns = colAuthFilter(this.defColumns,'testdemo:');
+        // this.defColumns = colAuthFilter(this.defColumns,'testdemo:');
         columnsSelect().then(res => {
           let colSettings = res
-          console.log(colSettings)
-          if(colSettings==null||colSettings==undefined){
+          if(colSettings==null||colSettings==undefined || colSettings.length === 0){
             let allSettingColumns = [];
             this.defColumns.forEach(function (item,i,array ) {
               allSettingColumns.push(item.dataIndex);
@@ -801,7 +807,7 @@
             console.log(res)
             this.duibiList = res
             this.duibiclList = []
-          })
+})
           var selectTasknos = this.selectionRows.map( res => {
             return res.taskno
           })