|
@@ -0,0 +1,119 @@
|
|
|
+<template>
|
|
|
+ <div id="adviserList">
|
|
|
+ <duijiestatus-detail
|
|
|
+ :info="info"
|
|
|
+ :options="options"
|
|
|
+ :form="form"
|
|
|
+ @onSubmit="onSubmit"
|
|
|
+ :liebiaoList="liebiaoList"
|
|
|
+ @onsave="onsaveClick"
|
|
|
+ ></duijiestatus-detail>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import duijiestatusDetail from '@/components/enterprise/duijiestatus.vue';
|
|
|
+import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
|
+const { mapActions: login } = createNamespacedHelpers('login');
|
|
|
+const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
+const { mapActions: place } = createNamespacedHelpers('place');
|
|
|
+export default {
|
|
|
+ name: 'adviserList',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ duijiestatusDetail,
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ form: {},
|
|
|
+ info: {},
|
|
|
+ options: [],
|
|
|
+ liebiaoList: [
|
|
|
+ { name: '基本信息' },
|
|
|
+ { name: '消息管理' },
|
|
|
+ { name: '我的发布' },
|
|
|
+ { name: '事项管理' },
|
|
|
+ { name: '展会预约' },
|
|
|
+ { name: '返回首页' },
|
|
|
+ { name: '修改密码' },
|
|
|
+ { name: '注销账号' },
|
|
|
+ ],
|
|
|
+ }),
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ id() {
|
|
|
+ return this.$route.query.id;
|
|
|
+ },
|
|
|
+ keyWord() {
|
|
|
+ let meta = this.$route.meta;
|
|
|
+ let main = meta.title || '';
|
|
|
+ return main;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...dock(['query', 'delete', 'update', 'create', 'fetch', 'shenhe']),
|
|
|
+ ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
|
|
|
+
|
|
|
+ ...login({ logout: 'logout', transactiondtetle: 'delete' }),
|
|
|
+ // 查询基本信息
|
|
|
+ async searchInfo() {
|
|
|
+ if (this.id) {
|
|
|
+ let res = await this.fetch(this.id);
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async search() {
|
|
|
+ let parent = 220000;
|
|
|
+ let level = 2;
|
|
|
+ let res = await this.palcequery({ parent, level });
|
|
|
+
|
|
|
+ this.$set(this, `options`, res.data);
|
|
|
+ },
|
|
|
+
|
|
|
+ async onSubmit() {
|
|
|
+ if (this.id) {
|
|
|
+ this.form.user_id = this.user.uid;
|
|
|
+ let res = await this.shenhe(this.form);
|
|
|
+ this.$checkRes(res, '审核成功', '审核失败');
|
|
|
+ }
|
|
|
+ this.$router.push({ path: '/enterprise/appointment' });
|
|
|
+ },
|
|
|
+
|
|
|
+ async onsaveClick({ id }) {
|
|
|
+ console.log(id);
|
|
|
+ if (id === '基本信息') {
|
|
|
+ this.$router.push({ path: '/enterprise/enterprisejb' });
|
|
|
+ } else if (id === '消息管理') {
|
|
|
+ this.$router.push({ path: '/enterprise/enterprisexx' });
|
|
|
+ } else if (id === '我的发布') {
|
|
|
+ this.$router.push({ path: '/enterprise/enterprisefabu' });
|
|
|
+ } else if (id === '事项管理') {
|
|
|
+ this.$router.push({ path: '/enterprise/enterprisedg' });
|
|
|
+ } else if (id === '展会预约') {
|
|
|
+ this.$router.push({ path: '/enterprise/appointment' });
|
|
|
+ } else if (id === '修改密码') {
|
|
|
+ this.$router.push({ path: '/enterprise/xiugai' });
|
|
|
+ } else if (id === '返回首页') {
|
|
|
+ this.$router.push({ path: '/' });
|
|
|
+ } else if (id === '注销账号') {
|
|
|
+ this.logout();
|
|
|
+ this.$message({
|
|
|
+ message: '注销成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.toLogin();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async toLogin() {
|
|
|
+ this.$router.push({ path: '/' });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped></style>
|