|
@@ -10,7 +10,7 @@
|
|
|
<detailTop @goBack="goBack"></detailTop>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="info">
|
|
|
- <otheruserForm :ruleForm="ruleForm" @submitForm="submitForm" @resetForm="resetForm"></otheruserForm>
|
|
|
+ <otheruserForm :ruleForm="ruleForm" :charList="charList" @submitForm="submitForm" @resetForm="resetForm"></otheruserForm>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -24,6 +24,7 @@ import detailTop from '@/layout/common/detailTop.vue';
|
|
|
import otheruserForm from '@/layout/otheruser/otheruserForm.vue';
|
|
|
import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
const { mapActions: otheruser } = createNamespacedHelpers('otheruser');
|
|
|
+const { mapActions: character } = createNamespacedHelpers('character');
|
|
|
export default {
|
|
|
name: 'detail',
|
|
|
props: {},
|
|
@@ -37,10 +38,15 @@ export default {
|
|
|
topTitle: '用户信息管理',
|
|
|
ruleForm: {
|
|
|
passwd: '123456',
|
|
|
+ characterid: '',
|
|
|
+ },
|
|
|
+ charList: {
|
|
|
+ name: '10',
|
|
|
},
|
|
|
}),
|
|
|
created() {
|
|
|
this.searchInfo();
|
|
|
+ this.searchChar();
|
|
|
},
|
|
|
computed: {
|
|
|
id() {
|
|
@@ -49,12 +55,22 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...otheruser(['query', 'fetch', 'update', 'create']),
|
|
|
+ ...character({ charquery: 'query', charFetch: 'fetch' }),
|
|
|
async searchInfo() {
|
|
|
if (this.id) {
|
|
|
const res = await this.fetch(this.id);
|
|
|
this.$set(this, `ruleForm`, res.data);
|
|
|
}
|
|
|
},
|
|
|
+ async searchChar() {
|
|
|
+ const res = await this.charquery();
|
|
|
+ if (`${res.errcode}` === '0') {
|
|
|
+ console.log(res.data);
|
|
|
+ this.$set(this, `charList`, res.data);
|
|
|
+ } else {
|
|
|
+ this.$message.error(result.errmsg ? result.errmsg : 'error');
|
|
|
+ }
|
|
|
+ },
|
|
|
// 提交
|
|
|
async submitForm({ data }) {
|
|
|
let res;
|