From 6aa37bb1c8caefdfdb70042cee04527aee253e59 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 19 十二月 2023 09:37:21 +0800 Subject: [PATCH] 删除CompBaseInfo文件多余代码 --- src/views/fytz/user/components/CompBaseInfo.vue | 27 +++------------------------ 1 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/views/fytz/user/components/CompBaseInfo.vue b/src/views/fytz/user/components/CompBaseInfo.vue index 50b1e6b..67154ff 100644 --- a/src/views/fytz/user/components/CompBaseInfo.vue +++ b/src/views/fytz/user/components/CompBaseInfo.vue @@ -3,6 +3,7 @@ :form-info="_formInfo" :rules="rules" :reset="active" + :useReset="true" v-model:is-edit="_edit" @submit="submit" @cancel="cancel" @@ -44,7 +45,6 @@ </template> <script> -import userApi from '@/api/fytz/userApi.js' export default { props: { //鍩烘湰淇℃伅 @@ -64,10 +64,6 @@ return { _formInfo: null, _edit: false, - locations: false, - locationsProps: { - checkStrictly: true - }, rules: { biNickName: [ { @@ -103,9 +99,7 @@ }, watch: { formInfo(nValue) { - console.log('value', nValue) this._formInfo = this.parseUserInfo(nValue) - console.log('鎵ц浜�') }, _edit(nValue) { this.$emit('update:isEdit', nValue) @@ -115,7 +109,6 @@ methods: { // 鐢ㄦ埛鍩烘湰淇℃伅鏍煎紡鍖� parseUserInfo(s) { - const r = {} s._locations = { pCode: s.biProvinceCode, pName: s.biProvinceName, @@ -130,25 +123,11 @@ }, // 鍒涘缓鏂板満鏅� createBaseInfo(formObj, func) { - return userApi - .createUser(formObj) - .then(() => { - this.$emit('onSubmit', formObj) - }) - .finally(() => { - func() - }) + }, // 鏇存柊鍦烘櫙 updateBaseInfo(formObj, func) { - return userApi - .updateUserInfo(formObj) - .then(() => { - this.$emit('onSubmit', formObj) - }) - .finally(() => { - func() - }) + }, submit(formObj, func) { // 琛屾斂鍖哄垝淇℃伅濉厖 -- Gitblit v1.9.3