(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2169cfdc"],{"5a87":function(t,e,a){"use strict";a("5cb2")},"5cb2":function(t,e,a){},e1e9:function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"app-form margin-top"},[a("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[a("div",{},[a("div",{},[a("div",{staticClass:"app-form-group margin-top"},[a("div",{staticClass:"app-form-ti"},[t._v("基础设置")]),a("el-form-item",{attrs:{label:"状态"}},[a("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[a("el-radio",{attrs:{label:1}},[t._v("开启")]),a("el-radio",{attrs:{label:0}},[t._v("关闭")])],1)],1),1==t.form.status?[a("el-form-item",{attrs:{label:"apikey"}},[a("el-input",{staticClass:"form-input",attrs:{placeholder:"请输入apikey"},model:{value:t.form.apikey,callback:function(e){t.$set(t.form,"apikey",e)},expression:"form.apikey"}}),a("el-alert",{staticClass:"margin-top-sm",staticStyle:{width:"300px"},attrs:{type:"warning","show-icon":""}},[a("div",{staticStyle:{width:"300px"},attrs:{slot:"title"},slot:"title"},[t._v(" 点击链接前往申请 "),a("a",{staticStyle:{"margin-left":"10px",color:"#409EFF"},attrs:{href:"https://bailian.console.aliyun.com/?spm=5176.29597918.J_bNSze_09Z5SDm7ZHdpz3Y.1.13c47b08aY332B&tab=model#/api-key",target:"_blank"}},[t._v("申请地址")])])])],1),a("el-form-item",{attrs:{label:"模型"}},[a("el-input",{staticClass:"form-input",attrs:{placeholder:"请输入模型"},model:{value:t.form.model,callback:function(e){t.$set(t.form,"model",e)},expression:"form.model"}})],1),a("el-form-item",{attrs:{label:"使用等级"}},[a("el-select",{staticStyle:{width:"500px"},attrs:{multiple:"",filterable:"",placeholder:"使用等级"},model:{value:t.form.levels,callback:function(e){t.$set(t.form,"levels",e)},expression:"form.levels"}},[a("el-option",{attrs:{label:"选择等级",value:""}}),t._l(t.levels,(function(t,e){return a("el-option",{key:e,attrs:{label:t.title,value:t.id}})}))],2)],1)]:t._e()],2),a("div",{staticClass:"app-form-group margin-top"},[a("div",{staticClass:"app-form-ti"},[t._v("样式设置")]),a("div",{staticClass:"padding-top-lg"},[a("el-form-item",{attrs:{label:"标题",prop:"dialogue_title"}},[a("el-input",{staticClass:"form-input",attrs:{placeholder:"请输入标题"},model:{value:t.form.dialogue_title,callback:function(e){t.$set(t.form,"dialogue_title",e)},expression:"form.dialogue_title"}})],1),a("el-form-item",{attrs:{label:"AI名称",prop:"ai_nickname"}},[a("el-input",{staticClass:"form-input",attrs:{placeholder:"请输入AI名称"},model:{value:t.form.ai_nickname,callback:function(e){t.$set(t.form,"ai_nickname",e)},expression:"form.ai_nickname"}})],1),a("el-form-item",{attrs:{label:"提示语",prop:"dialogue_tips"}},[a("el-input",{staticClass:"form-input",attrs:{placeholder:"请输入内容"},model:{value:t.form.dialogue_tips,callback:function(e){t.$set(t.form,"dialogue_tips",e)},expression:"form.dialogue_tips"}})],1),a("el-form-item",{attrs:{label:"提示图标",prop:"dialogue_icon"}},[a("uploadImage",{attrs:{modal:!1},model:{value:t.form.dialogue_icon,callback:function(e){t.$set(t.form,"dialogue_icon",e)},expression:"form.dialogue_icon"}})],1)],1)])])]),a("div",{staticClass:"padding-lg flex justify-center"},[a("el-button",{on:{click:t.onBack}},[t._v("返回")]),a("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("提交")])],1)])],1),a("copyright")],1)},i=[],o=a("7f70"),s=a("c7f0"),r=a("8327"),n={name:"Message",components:{uploadImage:s["a"]},data:function(){return{activeIndex:"1",rules:{},form:{},levels:[]}},computed:Object(o["a"])({},Object(r["b"])(["config"])),watch:{config:function(t){this.init()}},mounted:function(){this.init()},methods:{onBack:function(){this.$router.go(-1)},submit:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&t.api.post("qwen/config/set",t.form).then((function(e){1==e.code?(t.$util.success(e.message),t.$store.dispatch("settings/getSetting")):t.$util.error(e.message)}))}))},init:function(){var t=this,e=this.config;e.qwen&&(this.form=this.$util.restJson(e.qwen)),this.api.get("fenxiao/level/all").then((function(e){1==e.code&&(t.levels=e.data.list)}))}}},c=n,m=(a("5a87"),a("3d7a")),p=Object(m["a"])(c,l,i,!1,null,null,null);e["default"]=p.exports}}]);