|
|
@@ -4,11 +4,11 @@ import { isEuropean, getDateFormat } from '@/utils/tools'
|
|
|
import ChangePasswordDialog from '@/views/Layout/src/components/Header/components/ChangePasswordDialog.vue'
|
|
|
|
|
|
const form = reactive({
|
|
|
- firstName: '',
|
|
|
- lastName: '',
|
|
|
- username: '',
|
|
|
- email: 'Chud',
|
|
|
- phone: ''
|
|
|
+ firstName: 'z',
|
|
|
+ lastName: 'index',
|
|
|
+ username: 'Chud',
|
|
|
+ email: 'caroline.hu@kerrylogistics.com',
|
|
|
+ password: '**************'
|
|
|
})
|
|
|
|
|
|
const segmented = ref('dateTime')
|
|
|
@@ -72,6 +72,28 @@ isSpecifyNumbersFormat()
|
|
|
|
|
|
// 获取用户地区日期格式
|
|
|
dateFormat.value = getDateFormat()
|
|
|
+
|
|
|
+const saveConfig = (model: string) => {
|
|
|
+ let params = {}
|
|
|
+ if (model === 'profile') {
|
|
|
+ params = {
|
|
|
+ save_model: 'profile',
|
|
|
+ user_name: form.username,
|
|
|
+ email: form.email
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ params = {
|
|
|
+ save_model: 'no_profile',
|
|
|
+ date_fromat: selectVModel.value,
|
|
|
+ number_format: numbersFormat.value
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $api.saveUserInfo(params).then((res: any) => {
|
|
|
+ if (res.cdoe === 200) {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -108,7 +130,13 @@ dateFormat.value = getDateFormat()
|
|
|
<span style="margin-left: 4px; color: var(--color-theme)">4 day(s)</span>
|
|
|
</p>
|
|
|
<div class="password-change">
|
|
|
- <el-input size="large" style="width: 330px" :disabled="true" v-model="form.phone" />
|
|
|
+ <el-input
|
|
|
+ size="large"
|
|
|
+ type="password"
|
|
|
+ style="width: 330px"
|
|
|
+ :disabled="true"
|
|
|
+ v-model="form.password"
|
|
|
+ />
|
|
|
<el-button @click="handleChangePassword" class="el-button--main" plain size="large"
|
|
|
>Change Password</el-button
|
|
|
>
|
|
|
@@ -116,7 +144,9 @@ dateFormat.value = getDateFormat()
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
- <el-button class="el-button--dark save-icon" size="large">Save</el-button>
|
|
|
+ <el-button @click="saveConfig('profile')" class="el-button--dark save-icon" size="large"
|
|
|
+ >Save</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -167,7 +197,11 @@ dateFormat.value = getDateFormat()
|
|
|
</el-col>
|
|
|
|
|
|
<el-col>
|
|
|
- <el-button style="padding: 0 40px" class="el-button--dark save-icon" size="large"
|
|
|
+ <el-button
|
|
|
+ @click="saveConfig('no_profile')"
|
|
|
+ style="padding: 0 40px"
|
|
|
+ class="el-button--dark save-icon"
|
|
|
+ size="large"
|
|
|
>Save</el-button
|
|
|
>
|
|
|
</el-col>
|