(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-8ce5eafa"],{3011:function(t,e,a){"use strict";a.d(e,"i",(function(){return o})),a.d(e,"h",(function(){return n})),a.d(e,"a",(function(){return l})),a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return s})),a.d(e,"f",(function(){return u})),a.d(e,"d",(function(){return p})),a.d(e,"e",(function(){return c})),a.d(e,"g",(function(){return d}));var r=a("6b2d");const o=t=>r.a.post("/form.template/update",t),n=t=>r.a.get("/form.template/list",{params:t}),l=t=>r.a.post("/form.template/create",t),i=t=>r.a.get("/form.template/detail",{params:t}),s=t=>r.a.get("/form.template/del",{params:t}),u=t=>r.a.get("/form.templateItem/list",{params:t}),p=t=>r.a.post("/form.templateItem/create",t),c=t=>r.a.get("/form.templateItem/detail",{params:t}),d=t=>r.a.post("/form.templateItem/update",t)},bf87:function(t,e,a){"use strict";a.r(e);var r=a("3011"),o={data:()=>({table:{currentPage:1,pageSizes:[10],total:0,data:null},form:{id:0}}),methods:{handleSizeChange(t){},handleCurrentChange(t){this.table.currentPage=t},del(t){this.$confirm("此操作将永久删除该表单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{apiFormTemplateItemDel({id:t}).then(t=>{1==t.code?(this.$message.success("删除成功!"),this.getData(10,this.table.currentPage)):this.$message.error(t.msg)})}).catch(()=>{})},getData(t,e){Object(r.f)({page:e,template_id:this.form.id}).then(t=>{this.table.currentPage=e,this.table.total=t.data.total,this.table.data=t.data.data})},addForm(){this.$router.push({path:"/application/form/items_create",query:{id:this.form.id}})},gotoEdit(t){this.$router.push({path:"/application/form/items_update",query:{id:t}})}},mounted(){this.getData(10,1)},created(){const t=this.$route.query;this.form.id=t.id}},n=a("2877"),l=Object(n.a)(o,(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:{type:"primary",size:"mini"},on:{click:t.addForm}},[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:"label",label:"姓名",width:"120"}}),a("el-table-column",{attrs:{prop:"placeholder",label:"提示"}}),a("el-table-column",{attrs:{label:"类型"},scopedSlots:t._u([{key:"default",fn:function(e){return["input"==e.row.type?a("span",[t._v("输入框")]):t._e(),"mult_input"==e.row.type?a("span",[t._v("多行输入框")]):t._e(),"num_input"==e.row.type?a("span",[t._v("数字输入框")]):t._e(),"pwd_input"==e.row.type?a("span",[t._v("密码输入框")]):t._e(),"img_upload"==e.row.type?a("span",[t._v("图片上传")]):t._e(),"video_upload"==e.row.type?a("span",[t._v("视频上传")]):t._e(),"one_choose"==e.row.type?a("span",[t._v("单选")]):t._e(),"mult_choose"==e.row.type?a("span",[t._v("多选")]):t._e(),"down_choose"==e.row.type?a("span",[t._v("下拉框")]):t._e()]}}])}),a("el-table-column",{attrs:{label:"是否必填"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.row.is_required,callback:function(a){t.$set(e.row,"is_required",a)},expression:"scope.row.is_required"}})]}}])}),a("el-table-column",{attrs:{prop:"sort",label:"排序"}}),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.gotoEdit(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)],1)}),[],!1,null,null,null);e.default=l.exports}}]);