|  |  | 
 |  |  |  | 
 |  |  | import gridBody from './extend/importDevicePro.vue' | 
 |  |  | import gridBody from "./extend/importDevicePro.vue"; | 
 |  |  | let extension = { | 
 |  |  |   components: { | 
 |  |  |     //查询界面扩展组件 | 
 |  |  |     gridHeader: '', | 
 |  |  |     gridHeader: "", | 
 |  |  |     gridBody: gridBody, | 
 |  |  |     gridFooter: '', | 
 |  |  |     gridFooter: "", | 
 |  |  |     //新建、编辑弹出框扩展组件 | 
 |  |  |     modelHeader: '', | 
 |  |  |     modelBody: '', | 
 |  |  |     modelFooter: '' | 
 |  |  |     modelHeader: "", | 
 |  |  |     modelBody: "", | 
 |  |  |     modelFooter: "", | 
 |  |  |   }, | 
 |  |  |   tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写) | 
 |  |  |   tableAction: "", //指定某张表的权限(这里填写表名,默认不用填写) | 
 |  |  |   buttons: { view: [], box: [], detail: [] }, //扩展的按钮 | 
 |  |  |   methods: { | 
 |  |  |     //下面这些方法可以保留也可以删除 | 
 |  |  |     onInit() { | 
 |  |  |       // console.log(this.detailOptions.buttons); | 
 |  |  |       // console.log(this.$refs.detail) | 
 |  |  |       var detailImport = this.detailOptions.buttons.find(item=>item.value == 'import'); | 
 |  |  |       if(detailImport){ | 
 |  |  |       var detailImport = this.detailOptions.buttons.find( | 
 |  |  |         (item) => item.value == "import" | 
 |  |  |       ); | 
 |  |  |       if (detailImport) { | 
 |  |  |         detailImport.onClick = function () { | 
 |  |  |           this.$refs.gridBody.open(); | 
 |  |  |         } | 
 |  |  |         }; | 
 |  |  |       } | 
 |  |  |       this.buttons.unshift({ | 
 |  |  |         //也可以用push或者splice方法来修改buttons数组 | 
 |  |  |         name: "开启服务", //按钮名称 | 
 |  |  |         icon: "el-icon-document", //按钮图标vue2版本见iview文档icon,vue3版本见element ui文档icon(注意不是element puls文档) | 
 |  |  |         type: "primary", //按钮样式vue2版本见iview文档button,vue3版本见element ui文档button | 
 |  |  |         onClick: function () { | 
 |  |  |           this.$Message.success("开启服务"); | 
 |  |  |         }, | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     onInited() { | 
 |  |  |       //框架初始化配置后 | 
 |  |  | 
 |  |  |       //console.log(this.$refs) | 
 |  |  |       this.$nextTick(() => { | 
 |  |  |         if (this.$refs.upload_excel) { | 
 |  |  |           alert('点击了上传按钮') | 
 |  |  |           alert("点击了上传按钮"); | 
 |  |  |           this.$refs.upload_excel.upload = function () { | 
 |  |  |             console.log('点击了上传按钮') | 
 |  |  |           } | 
 |  |  |             console.log("点击了上传按钮"); | 
 |  |  |           }; | 
 |  |  |         } | 
 |  |  |         // alert(1) | 
 |  |  |       }) | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |   }, | 
 |  |  | }; | 
 |  |  | export default extension; |