|
@@ -69,6 +69,8 @@
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
const { mapActions: place } = createNamespacedHelpers('place');
|
|
const { mapActions: place } = createNamespacedHelpers('place');
|
|
|
|
+const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
|
+const { mapActions: authUser } = createNamespacedHelpers('authUser');
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
@@ -90,13 +92,36 @@ export default {
|
|
created() {
|
|
created() {
|
|
this.searcOption();
|
|
this.searcOption();
|
|
this.changeshenge();
|
|
this.changeshenge();
|
|
|
|
+ this.searchInfo();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...place({ palcequery: 'query', transactiondtetle: 'delete' }),
|
|
...place({ palcequery: 'query', transactiondtetle: 'delete' }),
|
|
|
|
+ ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
|
|
|
|
+ ...authUser({authUserUpdate: 'update',}),
|
|
|
|
+ async searchInfo() {
|
|
|
|
+ let res = await this.dockfetch('5f0c09a268972785441dfa1c');
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
submitForm(formName) {
|
|
submitForm(formName) {
|
|
- this.$refs[formName].validate(valid => {
|
|
|
|
|
|
+ this.$refs[formName].validate(async valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log('提交');
|
|
|
|
|
|
+ let data=this.form;
|
|
|
|
+ let res = await this.dockupdate(data);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ let authdata = {};
|
|
|
|
+ authdata.id = data.user_id;
|
|
|
|
+ authdata.name = data.adminuser;
|
|
|
|
+ let arr = await this.authUserUpdate(authdata);
|
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: '修改信息成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ });
|
|
|
|
+ this.searchInfo();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
console.log('error submit!!');
|
|
console.log('error submit!!');
|
|
return false;
|
|
return false;
|
|
@@ -104,9 +129,17 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
submitStatus(formName) {
|
|
submitStatus(formName) {
|
|
- this.$refs[formName].validate(valid => {
|
|
|
|
|
|
+ this.$refs[formName].validate(async valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log('提交');
|
|
|
|
|
|
+ let data=this.form;
|
|
|
|
+ let res = await this.dockupdate(data);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: '对接会审核成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ });
|
|
|
|
+ this.searchInfo();
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
console.log('error submit!!');
|
|
console.log('error submit!!');
|
|
return false;
|
|
return false;
|