2021-12-26 23:48:14 +08:00

1 line
4.7 KiB
JavaScript
Vendored
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[366],{39366:(t,a,o)=>{o.r(a),o.d(a,{default:()=>s});const e={data:function(){return{loadIng:0,formDatum:{}}},mounted:function(){this.systemSetting()},methods:{submitForm:function(){var t=this;this.$refs.formDatum.validate((function(a){a&&t.systemSetting(!0)}))},resetForm:function(){this.formDatum=$A.cloneJSON(this.formDatum_bak)},systemSetting:function(t){var a=this;this.loadIng++,this.$store.dispatch("call",{url:"system/setting?type="+(t?"save":"all"),data:this.formDatum}).then((function(o){var e=o.data;t&&$A.messageSuccess("修改成功"),a.loadIng--,a.formDatum=e,a.formDatum_bak=$A.cloneJSON(a.formDatum)})).catch((function(o){var e=o.msg;t&&$A.modalError(e),a.loadIng--}))}}};const s=(0,o(51900).Z)(e,(function(){var t=this,a=t.$createElement,o=t._self._c||a;return o("div",{staticClass:"setting-item submit"},[o("Form",{ref:"formDatum",attrs:{model:t.formDatum,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[o("FormItem",{attrs:{label:t.$L("允许注册"),prop:"reg"}},[o("RadioGroup",{model:{value:t.formDatum.reg,callback:function(a){t.$set(t.formDatum,"reg",a)},expression:"formDatum.reg"}},[o("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("允许")))]),t._v(" "),o("Radio",{attrs:{label:"invite"}},[t._v(t._s(t.$L("邀请码")))]),t._v(" "),o("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("禁止")))])],1),t._v(" "),"open"==t.formDatum.reg?o("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("允许:开放注册功能。")))]):"invite"==t.formDatum.reg?[o("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("邀请码:注册时需填写下方邀请码。")))]),t._v(" "),o("Input",{staticStyle:{width:"200px","margin-top":"6px"},model:{value:t.formDatum.reg_invite,callback:function(a){t.$set(t.formDatum,"reg_invite",a)},expression:"formDatum.reg_invite"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[t._v(t._s(t.$L("邀请码")))])])]:t._e()],2),t._v(" "),o("FormItem",{attrs:{label:t.$L("登录验证码"),prop:"loginCode"}},[o("RadioGroup",{model:{value:t.formDatum.login_code,callback:function(a){t.$set(t.formDatum,"login_code",a)},expression:"formDatum.login_code"}},[o("Radio",{attrs:{label:"auto"}},[t._v(t._s(t.$L("自动")))]),t._v(" "),o("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),o("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"auto"==t.formDatum.login_code?o("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("自动:密码输入错误后必须添加验证码。")))]):t._e()],1),t._v(" "),o("FormItem",{attrs:{label:t.$L("密码策略"),prop:"passwordPolicy"}},[o("RadioGroup",{model:{value:t.formDatum.password_policy,callback:function(a){t.$set(t.formDatum,"password_policy",a)},expression:"formDatum.password_policy"}},[o("Radio",{attrs:{label:"simple"}},[t._v(t._s(t.$L("简单")))]),t._v(" "),o("Radio",{attrs:{label:"complex"}},[t._v(t._s(t.$L("复杂")))])],1),t._v(" "),"simple"==t.formDatum.password_policy?o("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("简单大于或等于6个字符。")))]):"complex"==t.formDatum.password_policy?o("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("复杂大于或等于6个字符包含数字、字母大小写或者特殊字符。")))]):t._e()],1),t._v(" "),o("FormItem",{attrs:{label:t.$L("邀请项目"),prop:"projectInvite"}},[o("RadioGroup",{model:{value:t.formDatum.project_invite,callback:function(a){t.$set(t.formDatum,"project_invite",a)},expression:"formDatum.project_invite"}},[o("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),o("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"open"==t.formDatum.project_invite?o("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("开启:项目管理员可生成链接邀请成员加入项目。")))]):t._e()],1),t._v(" "),o("FormItem",{attrs:{label:t.$L("聊天昵称"),prop:"chatNickname"}},[o("RadioGroup",{model:{value:t.formDatum.chat_nickname,callback:function(a){t.$set(t.formDatum,"chat_nickname",a)},expression:"formDatum.chat_nickname"}},[o("Radio",{attrs:{label:"optional"}},[t._v(t._s(t.$L("可选")))]),t._v(" "),o("Radio",{attrs:{label:"required"}},[t._v(t._s(t.$L("必填")))])],1),t._v(" "),"required"==t.formDatum.chat_nickname?o("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("必填:发送聊天内容前必须设置昵称。")))]):t._e()],1)],1),t._v(" "),o("div",{staticClass:"setting-footer"},[o("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("提交")))]),t._v(" "),o("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("重置")))])],1)],1)}),[],!1,null,null,null).exports}}]);