|
@@ -11,7 +11,7 @@
|
|
<Ruleform @getPageData="getPageData" :formData="pageData[2]" />
|
|
<Ruleform @getPageData="getPageData" :formData="pageData[2]" />
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane :label="$t('customRoom')" name="customRoom">
|
|
<el-tab-pane :label="$t('customRoom')" name="customRoom">
|
|
- <el-form :model="formData">
|
|
|
|
|
|
+ <el-form :model="formData" ref="formRef" label-suffix=":">
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<span style="width: 360px;">{{$t('customizeRoom')}}:</span>
|
|
<span style="width: 360px;">{{$t('customizeRoom')}}:</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -53,6 +53,7 @@ import request from '@/utils/request';
|
|
import { ElMessage } from 'element-plus';
|
|
import { ElMessage } from 'element-plus';
|
|
import i18n from '@/utils/i18n'
|
|
import i18n from '@/utils/i18n'
|
|
const pageData = ref([{}, {}, {}]);
|
|
const pageData = ref([{}, {}, {}]);
|
|
|
|
+const formRef = ref(null)
|
|
const activeName = ref('primaryField')
|
|
const activeName = ref('primaryField')
|
|
const formData = reactive({
|
|
const formData = reactive({
|
|
roomNumber: ''
|
|
roomNumber: ''
|
|
@@ -69,11 +70,15 @@ const getPageData = async () => {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const handleSubmit = async() => {
|
|
const handleSubmit = async() => {
|
|
- const res = await request('post', 'admin/updateSystemConfigure', {...formData,roomNumber:'customRoom'})
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- ElMessage.success(i18n.global.t('successfulOperation'))
|
|
|
|
- getPageData()
|
|
|
|
- }
|
|
|
|
|
|
+ formRef.value.validate(async (valid)=>{
|
|
|
|
+ if(valid){
|
|
|
|
+ const res = await request('post', 'admin/updateSystemConfigure', {...formData,roomNumber:'customRoom'})
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ ElMessage.success(i18n.global.t('successfulOperation'))
|
|
|
|
+ getPageData()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
const handleClick = async(tab) => {
|
|
const handleClick = async(tab) => {
|
|
if (tab.paneName === 'customRoom') {
|
|
if (tab.paneName === 'customRoom') {
|