| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6124"],{"42to":function(e,t,r){"use strict";r.r(t);var a=r("14Xm"),s=r.n(a),n=r("QbLZ"),i=r.n(n),o=r("D3Ub"),u=r.n(o),l={components:{group_chat_side:r("NUmi").a},data:function(){return{search:{tag_name:"",group_id:""},group_arr:[],rules:{tag_name:[{required:!0,message:"请输入标签名",trigger:"blur"}],group_id:[{required:!0,message:"请选择标签组",trigger:"blur"}]}}},mounted:function(){this.getLabelList(),this.$route.query.tag_id&&this.getTagDetail()},methods:{goBack:function(){this.$router.push(this.fun.getUrl("groupLabel",{},{}))},submitForm:function(){var e=this;return u()(s.a.mark(function t(){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e.$refs["tag-list"].validate(function(){var t=u()(s.a.mark(function t(r){var a;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=7;break}return t.next=3,$http.pc_post("plugin/GroupDevelopUser/saveTag",{tag_id:e.$route.query.tag_id?e.$route.query.tag_id:"",form:i()({},e.search)},"loading");case 3:(a=t.sent).result?(e.$message.success(a.msg),e.$router.push(e.fun.getUrl("groupLabel",{},{}))):e.$message.error(a.msg),t.next=8;break;case 7:console.log("请输入标签名或选择标签组");case 8:case"end":return t.stop()}},t,e)}));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}},t,e)}))()},getTagDetail:function(){var e=this;return u()(s.a.mark(function t(){var r;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$http.pc_post("plugin/GroupDevelopUser/getTagDetail",{tag_id:e.$route.query.tag_id},"loading");case 2:(r=t.sent).result?(console.log(r,"resdd"),e.search.tag_name=r.data.tag_name,e.search.group_id=r.data.group_id):e.$message.error(r.msg);case 4:case"end":return t.stop()}},t,e)}))()},getLabelList:function(){var e=this;$http.pc_post("plugin/GroupDevelopUser/getGroupList",{},"loading").then(function(t){1===t.result?e.group_arr=t.data.data:t.msg&&e.$message.error(t.msg)}).catch(function(e){console.error(e)})}}},c=(r("B6VB"),r("KHd+")),g=Object(c.a)(l,function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"all"},[r("group_chat_side",{attrs:{defaultActive:"groupLabel"}}),e._v(" "),r("div",{attrs:{id:"app"}},[r("div",{staticClass:"list_container"},[r("div",{staticClass:"vue-main-title"},[r("div",{staticClass:"vue-main-title-left"}),e._v(" "),r("div",{staticClass:"vue-main-title-content customers_name title"},[e._v("\n 标签"+e._s(e.$route.query.tag_id?"编辑":"添加")+"\n ")])]),e._v(" "),r("div",{staticClass:"form"},[r("el-form",{ref:"tag-list",attrs:{"label-width":"100px",model:e.search,rules:e.rules}},[r("el-form-item",{attrs:{label:"标签名称",prop:"tag_name"}},[r("el-input",{staticStyle:{width:"70%"},model:{value:e.search.tag_name,callback:function(t){e.$set(e.search,"tag_name",t)},expression:"search.tag_name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"选择标签组",prop:"group_id"}},[r("el-select",{staticStyle:{width:"70%","margin-right":"50px"},attrs:{placeholder:"标签分类",clearable:""},model:{value:e.search.group_id,callback:function(t){e.$set(e.search,"group_id",t)},expression:"search.group_id"}},e._l(e.group_arr,function(e,t){return r("el-option",{key:t,attrs:{label:e.group_name,value:e.id}})}))],1)],1)],1)])]),e._v(" "),r("div",{staticClass:"vue-page"},[r("el-row",[r("el-col",{attrs:{align:"center"}},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确定")]),e._v(" "),r("el-button",{on:{click:e.goBack}},[e._v("返回")])],1)],1)],1)],1)},[],!1,null,"517f3d54",null);g.options.__file="group_label_edit.vue";t.default=g.exports},B6VB:function(e,t,r){"use strict";var a=r("GFJD");r.n(a).a},GFJD:function(e,t,r){}}]);
|