wyh 4 місяців тому
батько
коміт
3fbedba7ef

+ 31 - 16
src/views/module_interLock/InterlockSummary/InterlockSummaryList.vue

@@ -131,6 +131,7 @@
   import InterlockSummaryModal from './modules/InterlockSummaryModal'
   import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
   import { httpAction, getAction } from '@/api/manage'
+  import { colAuthFilter } from "@/utils/authFilter"
 
   export default {
     name: 'InterlockSummaryList',
@@ -165,8 +166,13 @@
             title:'联锁名称',
             align:"center",
             dataIndex: 'interlockname',
-            customRender:function (t,r,index) {
-              return {children: t,attrs: {rowSpan:r.rowSpan}};
+            customRender:(t,record,index)=> {
+              console.log('t是什么',t)
+              const text = record.interlockname
+              var childrenMore = (
+                <a onClick={() => {this.handleDetail(record)}}>{{ text }}</a>
+              )
+              return {children: childrenMore,attrs: {rowSpan:record.rowSpan}};
             },
           },
           {
@@ -241,24 +247,30 @@
             align:"center",
             fixed:"right",
             width:147,
+            auth: 'testdemo:action',
             // scopedSlots: { customRender: 'action' },
             customRender: (text,record,index)=> {
               var childrenEdit = (<a onclick={() => { this.handleEdit(record) }}>编辑</a>)
               var childrenDivider = (<a-divider type="vertical"/>)
+              // var childrenMore = (
+              //   <a-dropdown>
+              //     <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+              //     <a-menu slot="overlay">
+              //       <a-menu-item>
+              //         <a onClick={() => {this.handleDetail(record)}}>详情</a>
+              //       </a-menu-item>
+              //       <a-menu-item>
+              //         <a-popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(record.summaryid)}>
+              //           <a>删除</a>
+              //         </a-popconfirm>
+              //       </a-menu-item>
+              //     </a-menu>
+              //   </a-dropdown>
+              // )
               var childrenMore = (
-                <a-dropdown>
-                  <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-                  <a-menu slot="overlay">
-                    <a-menu-item>
-                      <a onClick={() => {this.handleDetail(record)}}>详情</a>
-                    </a-menu-item>
-                    <a-menu-item>
-                      <a-popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(record.summaryid)}>
-                        <a>删除</a>
-                      </a-popconfirm>
-                    </a-menu-item>
-                  </a-menu>
-                </a-dropdown>
+                <a-popconfirm title="确定删除吗?" onConfirm={() => this.handleDelete(record.summaryid)}>
+                  <a>删除</a>
+                </a-popconfirm>
               )
               return {
                 children: [childrenEdit,childrenDivider,childrenMore],
@@ -292,7 +304,10 @@
       }
     },
     created() {
-    this.getSuperFieldList();
+      this.columns = colAuthFilter(this.columns,'testdemo:');
+      this.loadData();
+      this.initDictConfig();
+      this.getSuperFieldList();
     },
     computed: {
       importExcelUrl: function(){