chunk-a5c96d9a.d27adabe0e4d37fb8b27.js 5.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a5c96d9a"],{2610:function(t,e,o){"use strict";var l=o("284a"),a=o.n(l);a.a},"284a":function(t,e,o){},"839d":function(t,e,o){"use strict";o.r(e);var l=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{staticClass:"header"},[t._m(0),o("div",[o("el-button",{attrs:{type:"primary"},on:{click:t.addclikc}},[t._v("添加")])],1)]),o("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList,border:"","cell-style":{textAlign:"center"},"header-cell-style":{textAlign:"center"},"min-height":"150"}},[t._v(" > "),o("el-table-column",{attrs:{prop:"id",label:"id",width:"60"}}),o("el-table-column",{attrs:{prop:"name",label:"分组名称"}}),o("el-table-column",{attrs:{prop:"count",label:"分组数量"}}),o("el-table-column",{attrs:{prop:"created_by",label:"创建人"}}),o("el-table-column",{attrs:{prop:"updated_by",label:"最后更新人"}}),o("el-table-column",{attrs:{prop:"created_at",label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("div",{staticClass:"handleIcon"},[t._v(" "+t._s(t.timestampToDatetime(e.row.created_at))+" ")])]}}])}),o("el-table-column",{attrs:{prop:"updated_at",label:"最后更新时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("div",{staticClass:"handleIcon"},[t._v(" "+t._s(t.timestampToDatetime(e.row.updated_at))+" ")])]}}])}),o("el-table-column",{attrs:{label:"操作",width:"240px"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("div",{staticClass:"handleIcon"},[o("el-button",{on:{click:function(o){return t.compileClick(e.row)}}},[t._v("编辑")]),o("el-button",{attrs:{type:"danger"},on:{click:function(o){return t.Delete(e.row)}}},[t._v("删除")])],1)]}}])})],1),o("el-dialog",{attrs:{title:"创建分组",visible:t.addPopup,width:"60%","before-close":t.handleClose},on:{"update:visible":function(e){t.addPopup=e}}},[o("div",{staticClass:"details"},[o("el-form",{ref:"addForm",attrs:{model:t.addForm,"label-width":"200px"}},[o("el-form-item",{attrs:{label:"分组名称"}},[o("el-input",{attrs:{placeholder:"请输入分组名称"},model:{value:t.addForm.name,callback:function(e){t.$set(t.addForm,"name",e)},expression:"addForm.name"}})],1)],1)],1),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:t.handleClose}},[t._v("取 消")]),o("el-button",{attrs:{type:"primary"},on:{click:t.addSubmit}},[t._v("确 定")])],1)]),o("el-dialog",{attrs:{title:"更新分组",visible:t.compilePopup,width:"40%","before-close":t.compileClose},on:{"update:visible":function(e){t.compilePopup=e}}},[o("div",{staticClass:"compiledetails"},[o("el-form",{ref:"compileForm",attrs:{model:t.compileForm,"label-width":"100px"}},[o("el-form-item",{attrs:{label:"分组id"}},[o("el-input",{attrs:{disabled:"",placeholder:"请输入分组id"},model:{value:t.compileForm.id,callback:function(e){t.$set(t.compileForm,"id",e)},expression:"compileForm.id"}})],1),o("el-form-item",{attrs:{label:"分组名称"}},[o("el-input",{attrs:{placeholder:"请输入分组名称"},model:{value:t.compileForm.name,callback:function(e){t.$set(t.compileForm,"name",e)},expression:"compileForm.name"}})],1)],1)],1),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:t.compileClose}},[t._v("取 消")]),o("el-button",{attrs:{type:"primary"},on:{click:t.compileSubmit}},[t._v("确 定")])],1)])],1)},a=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("h2",[t._v("分组设置")]),o("p",[t._v("挖掘高价值客户群体")])])}],i=(o("b0c0"),o("365c")),n=o("c466"),c={name:"subgroup",components:{},data:function(){return{dataList:[],addPopup:!1,compilePopup:!1,compileForm:{id:"",name:""},addForm:{name:""}}},computed:{},watch:{},mounted:function(){this.install()},methods:{install:function(){var t=this;Object(i["ic"])().then((function(e){t.dataList=e.data.list}))},addclikc:function(){this.addPopup=!0},handleClose:function(){this.addPopup=!1,this.addForm={name:""}},addSubmit:function(){var t=this,e={name:this.addForm.name};Object(i["hc"])(e).then((function(e){t.handleClose(),t.install()}))},Delete:function(t){var e=this,o={id:t.id};this.$confirm("确定删除该条数据?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(i["gc"])(o).then((function(t){e.$message({type:"success",message:"删除成功!"}),e.install()}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))},compileClick:function(t){this.compileForm=t,this.compilePopup=!0},compileClose:function(){this.compilePopup=!1,this.compileForm={id:"",name:""}},compileSubmit:function(){var t=this,e={name:this.compileForm.name},o={id:this.compileForm.id};Object(i["jc"])(o,e).then((function(e){console.log(e),t.compileClose(),t.install()}))},timestampToDatetime:function(t){return Object(n["a"])(t,!0)}},beforeCreate:function(){},created:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},s=c,r=(o("2610"),o("2877")),d=Object(r["a"])(s,l,a,!1,null,"483e5fe8",null);e["default"]=d.exports}}]);