This commit is contained in:
2023-12-04 14:24:20 +08:00
parent 8391e901dc
commit e17fb43669
3 changed files with 27 additions and 18 deletions

View File

@@ -1,6 +1,5 @@
<template>
<div class="main-container">
{{ aa }}
<div class="right_side">
<div class="content_wrap">
<div class="title_wrap">
@@ -20,8 +19,8 @@
<!-- <td>
<div class="radio__input icon_radio_checked"><i class="icon_radio"></i></div>
</td> -->
<td @click="toCheck(e)">{{ e.name }}</td>
<td @click="toCheck(e)">{{ e.remark }}</td>
<td @click="toCheck(e)">{{ $i18n.locale === 'en-us' ? e.en_name : e.zh_name }}</td>
<td @click="toCheck(e)">{{ $i18n.locale === 'en-us' ? e.en_remark : e.zh_remark }}</td>
<td @click="toCheck(e)">{{ e.createTime }}</td>
<td width="330px">
<div class="row">
@@ -199,8 +198,8 @@ export default {
break
case '2':
this.pkObj = e
this.rolename = e.name
this.remark = e.remark
this.rolename = this.$i18n.locale === 'en-us' ? e.en_name : e.zh_name
this.remark = this.$i18n.locale === 'en-us' ? e.en_remark : e.zh_remark
if (this.rolename === '') {
this.unclick = true
} else {

View File

@@ -17,11 +17,11 @@
<th>{{ $t('common.operate') }}</th>
</tr>
<tr v-for="(e, i) in datalist" :key="i">
<td>{{ e.id }}</td>
<td>{{ i + 1 }}</td>
<td>{{ e.code }}</td>
<td>{{ e.name }}</td>
<td>{{ e.value }}</td>
<td>{{ e.remark }}</td>
<td>{{ $i18n.locale === 'en-us' ? e.en_name : e.zh_name }}</td>
<td>{{ $i18n.locale === 'en-us' ? e.en_value : e.zh_value }}</td>
<td>{{ $i18n.locale === 'en-us' ? e.en_remark : e.zh_remark }}</td>
<td>
<div class="row">
<button class="button button--primary grid_button" @click="showDialog('2', e)">{{ $t('button.modify') }}</button>
@@ -185,9 +185,9 @@ export default {
break
case '2':
this.code = e.code
this.name = e.name
this.value = e.value
this.remark = e.remark
this.name = this.$i18n.locale === 'en-us' ? e.en_name : e.zh_name
this.value = this.$i18n.locale === 'en-us' ? e.en_value : e.zh_value
this.remark = this.$i18n.locale === 'en-us' ? e.en_remark : e.zh_remark
if (!this.code || !this.name || !this.value) {
this.unclick = true
} else {

View File

@@ -18,9 +18,9 @@
<th width="430px">{{ $t('common.operate')}}</th>
</tr>
<tr v-for="(e, i) in datalist" :key="i">
<td>{{ e.userId }}</td>
<td>{{ i + 1 }}</td>
<td>{{ e.username }}</td>
<td>{{ e.personName }}</td>
<td>{{ $i18n.locale === 'en-us' ? e.en_person_name : e.zh_person_name }}</td>
<td>{{ e.phone }}</td>
<td>{{ $i18n.locale === 'en-us' ? e.en_gender : e.zh_gender }}</td>
<td>{{ e.createTime }}</td>
@@ -111,7 +111,7 @@
<el-option
v-for="item in options"
:key="item.roleId"
:label="item.name"
:label="$i18n.locale === 'en-us' ? item.en_name : item.zh_name"
:value="item.roleId">
</el-option>
</el-select>
@@ -146,7 +146,6 @@ export default {
username: '',
phone: '',
name: '',
sexArr: [{label: '男', value: '男'}, {label: '女', value: '女'}],
sex: '',
password: '',
options: [],
@@ -163,6 +162,17 @@ export default {
}
}
},
computed: {
sexArr () {
let res = []
if (this.$i18n.locale === 'en-us') {
res = [{label: 'Male', value: 'Male'}, {label: 'Female', value: 'Female'}]
} else {
res = [{label: '男', value: '男'}, {zh_label: '女', value: '女'}]
}
return res
}
},
watch: {
type (val) {
switch (val) {
@@ -229,8 +239,8 @@ export default {
this.pkObj = e
this.username = e.username
this.phone = e.phone
this.name = e.personName
this.sex = e.gender
this.name = this.$i18n.locale === 'en-us' ? e.en_person_name : e.zh_person_name
this.sex = this.$i18n.locale === 'en-us' ? e.en_gender : e.zh_gender
this.options.map(el => {
if (el.roleId === e.roles[0].roleId) {
this.value = el.roleId