(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3736e7e8"],{3011:function(t,e,a){"use strict";a.d(e,"i",(function(){return n})),a.d(e,"h",(function(){return l})),a.d(e,"a",(function(){return o})),a.d(e,"c",(function(){return u})),a.d(e,"b",(function(){return i})),a.d(e,"f",(function(){return s})),a.d(e,"d",(function(){return c})),a.d(e,"e",(function(){return p})),a.d(e,"g",(function(){return d}));var r=a("6b2d");const n=t=>r.a.post("/form.template/update",t),l=t=>r.a.get("/form.template/list",{params:t}),o=t=>r.a.post("/form.template/create",t),u=t=>r.a.get("/form.template/detail",{params:t}),i=t=>r.a.get("/form.template/del",{params:t}),s=t=>r.a.get("/form.templateItem/list",{params:t}),c=t=>r.a.post("/form.templateItem/create",t),p=t=>r.a.get("/form.templateItem/detail",{params:t}),d=t=>r.a.post("/form.templateItem/update",t)},e0b5:function(t,e,a){"use strict";a.r(e);var r=a("3011"),n={data:()=>({table:{currentPage:1,pageSizes:[10],total:0,data:null}}),methods:{handleSizeChange(t){},handleCurrentChange(t){this.table.currentPage=t},getData(t,e){Object(r.h)({page:e}).then(t=>{this.table.currentPage=e,this.table.total=t.data.total,this.table.data=t.data.data})},jumpAdd(){this.$router.push({path:"/application/form/create",query:{}})},jumpEdit(t){this.$router.push({path:"/application/form/update",query:{id:t}})},del(t){this.$confirm("此操作将永久删除该模板, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(r.b)({id:t}).then(t=>{1==t.code?(this.$message.success("删除成功!"),this.getData(10,this.table.currentPage)):this.$message.error(t.msg)})}).catch(()=>{})},jumpFormItem(t){this.$router.push({path:"/application/form/items",query:{id:t}})}},mounted(){this.getData(10,1)}},l=a("2877"),o=Object(l.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"ls-card m-b-12"},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.jumpAdd}},[t._v("创建表单模板")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:null==t.table.data?[]:t.table.data}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"80"}}),a("el-table-column",{attrs:{prop:"name",label:"模板名称",width:"200"}}),a("el-table-column",{attrs:{width:"80",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.jumpEdit(e.row.id)}}},[t._v("编辑")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.jumpFormItem(e.row.id)}}},[t._v("模板表单")]),a("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(a){return t.del(e.row.id)}}},[t._v("删除")])]}}])})],1),a("el-pagination",{attrs:{"current-page":t.table.currentPage,"page-sizes":t.table.pageSizes,"page-size":10,layout:"total, sizes, prev, pager, next, jumper",total:t.table.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)}),[],!1,null,null,null);e.default=o.exports}}]);