panhui 5 ani în urmă
părinte
comite
c17661e3a4

+ 1 - 0
.gitignore

@@ -31,3 +31,4 @@ build/
 .vscode/
 
 .DS_Store
+*_2021*

+ 2 - 2
src/main/pc/src/components/Footer.vue

@@ -40,8 +40,8 @@
 
                 <div class="foot-item foot2">
                     <div class="link-list">
-                        <router-link>{{ $t('yong-hu-zhu-ce-xie-yi') }}</router-link>
-                        <router-link>{{ $t('yin-si-zheng-ce') }}</router-link>
+                        <router-link to="/rule?type=RULE_REGISTER">{{ $t('yong-hu-zhu-ce-xie-yi') }}</router-link>
+                        <router-link to="/rule?type=RULE_PRIVACY">{{ $t('yin-si-zheng-ce') }}</router-link>
                     </div>
                 </div>
                 <div class="phone">

+ 46 - 9
src/main/pc/src/components/activity/Submit.vue

@@ -1,10 +1,10 @@
 <template>
     <div class="Submit">
-        <el-dialog title="活动报名" center :visible.sync="show" width="600px" append-to-body>
+        <el-dialog :title="$t('huo-dong-bao-ming')" center :visible.sync="show" width="600px" append-to-body>
             <el-form
                 label-width="195px"
                 size="small"
-                style="max-width:600px"
+                style="max-width: 600px;"
                 :model="form"
                 ref="form"
                 :rules="rules"
@@ -69,9 +69,11 @@
                     type="warning"
                     @click="show = false"
                     v-loading="loading"
-                    style="min-width:200px"
+                    style="min-width: 200px;"
                     >返回</el-button
                 >
+
+                <el-button class="cancel" type="info" plain size="medium" @click="cancel">取消报名</el-button>
             </span>
         </el-dialog>
     </div>
@@ -109,13 +111,21 @@ export default {
         info() {
             if (this.info.id) {
                 this.$http
-                    .get('/eventRegistration/myEvent', {
-                        informationId: this.info.id
-                    })
+                    .post(
+                        '/eventRegistration/all',
+                        {
+                            query: {
+                                userId: this.$store.state.userInfo.id,
+                                informationId: this.activityId,
+                                del: false
+                            }
+                        },
+                        { body: 'json' }
+                    )
                     .then(res => {
-                        if (res) {
-                            this.$emit('update:activityId', res.id);
-                            this.registInfo = res;
+                        if (!res.empty) {
+                            this.$emit('update:activityId', res.content[0].id);
+                            this.registInfo = res.content[0];
                         } else {
                             this.$emit('update:activityId', 0);
                             this.registInfo = {};
@@ -175,6 +185,28 @@ export default {
                     console.log(e);
                     this.$message.warning(e.error);
                 });
+        },
+        cancel() {
+            this.$confirm('确定要取消报名吗?', '提示', {
+                confirmButtonText: '立即取消',
+                cancelButtonText: '再想想',
+                type: 'warning'
+            })
+                .then(() => {
+                    return this.$http.post('/eventRegistration/del/' + this.activityId, '', '', true);
+                })
+                .then(res => {
+                    this.$message.success('取消报名成功!');
+                    this.show = false;
+                    this.$emit('update:activityId', 0);
+                    this.$emit('cancelSucess');
+                })
+                .catch(e => {
+                    if (e.error) {
+                        console.log(e);
+                        this.$message.warning(e.error);
+                    }
+                });
         }
     }
 };
@@ -206,4 +238,9 @@ export default {
         color: #ffa526;
     }
 }
+
+.el-button.cancel {
+    background-color: transparent;
+    border-width: 0px;
+}
 </style>

+ 32 - 2
src/main/pc/src/components/manufacturers/Process.vue

@@ -11,12 +11,12 @@
         <div class="content">
             <div class="stepInfo" v-for="(item, index) in steps" :key="index">
                 {{ item.text }}
-                <el-popover v-if="item.tips" width="240" placement="bottom" trigger="hover">
+                <el-popover v-if="item.tips" width="323px" placement="bottom" trigger="hover">
                     <span class="iconfont" slot="reference">&#xe677;</span>
                     <div class="tips">
                         <div class="tip-info" v-for="(tips, tipsIndex) in item.tips" :key="tipsIndex">
                             <span>{{ tips.text1 }}</span>
-                            <span>{{ tips.text2 }}</span>
+                            <span v-html="getTips(tips.text2)"></span>
                         </div>
                     </div>
                 </el-popover>
@@ -60,6 +60,18 @@ export default {
         return {
             position: ['']
         };
+    },
+    methods: {
+        getTips(text) {
+            if (text instanceof Array) {
+                return (
+                    text.slice(0, text.length - 1) +
+                    `<a  href="/manufacturersEntering#question" >${text[text.length - 1]}</a>`
+                );
+            } else {
+                return text;
+            }
+        }
     }
 };
 </script>
@@ -190,3 +202,21 @@ $primarys: [#2a90a0, #3b5996, #ca923a, #c66152];
     }
 }
 </style>
+
+<style lang="scss">
+.el-popover {
+    .tip-info {
+        span {
+            a {
+                color: #ffa526;
+                &:hover {
+                    text-decoration: underline;
+                }
+
+                font-size: 12px;
+                line-height: 17px;
+            }
+        }
+    }
+}
+</style>

+ 17 - 3
src/main/pc/src/components/product/ProductDetailInfo.vue

@@ -17,9 +17,9 @@
                 <div class="text1">{{ $t('chan-pin-lei-bie') }}</div>
                 <div class="text2">{{ productCategoryName }}</div>
             </div>
-            <div class="info" v-if="productInfo.origin">
+            <div class="info" v-if="origin">
                 <div class="text1">{{ $t('chan-di') }}</div>
-                <div class="text2">{{ productInfo.origin }}</div>
+                <div class="text2">{{ origin }}</div>
             </div>
             <div class="info" v-if="applicationFieldInfo">
                 <div class="text1">{{ $t('ying-yong-ling-yu') }}</div>
@@ -46,6 +46,17 @@ export default {
     name: 'information',
     props: ['productInfo', 'tags', 'applicationField', 'productCategory'],
     computed: {
+        origin() {
+            return (
+                [...this.productInfo.origin1]
+                    .map(item => {
+                        return this.getName(item);
+                    })
+                    .join('、') ||
+                this.productInfo.origin ||
+                ''
+            );
+        },
         productCategoryName() {
             if (this.productCategory) {
                 return this.getName(this.productCategory);
@@ -73,7 +84,10 @@ export default {
         detailImg() {
             var detail = this.productInfo.detailImg || '';
             detail = detail.replace(/<img/g, '<img  oncontextmenu="return false;" ');
-            detail = detail.replace(/<video/g, '<video oncontextmenu="return false;"  controlsList="nodownload noremote footbar" ');
+            detail = detail.replace(
+                /<video/g,
+                '<video oncontextmenu="return false;"  controlsList="nodownload noremote footbar" '
+            );
             return detail;
         },
         introduction() {

+ 4 - 0
src/main/pc/src/element-variables.scss

@@ -50,6 +50,10 @@ video {
         text-indent: 2em;
     }
 }
+
+.el-cascader__tags .el-tag.el-tag--info {
+    color: #292c33;
+}
 .scrollbar {
     &::-webkit-scrollbar {
         width: 10px;

+ 2 - 1
src/main/pc/src/locales/zh.json

@@ -215,5 +215,6 @@
   "ju-ti-xu-qiu": "具体需求",
   "qing-bu-chong-miao-shu-nin-de-xu-qiu-nei-rong-100-zi-yi-nei": "请补充描述您的需求内容,100字以内",
   "yong-hu-zhu-ce-xie-yi": "用户注册协议",
-  "yin-si-zheng-ce": "隐私政策"
+  "yin-si-zheng-ce": "隐私政策",
+  "huo-dong-bao-ming": "活动报名"
 }

+ 17 - 0
src/main/pc/src/router/index.js

@@ -79,6 +79,14 @@ const routes = [
             title: '搜索结果'
         }
     },
+    {
+        path: '/rule',
+        name: 'rule',
+        component: () => import('../views/Rule.vue'),
+        meta: {
+            title: '协议'
+        }
+    },
     {
         path: '/register',
         name: 'register',
@@ -137,6 +145,15 @@ const routes = [
                     title: '展商入驻',
                     HeaderType: 'system'
                 }
+            },
+            {
+                path: '/enterRule4',
+                name: 'enterRule4',
+                component: () => import('../views/system/RuleStep4.vue'),
+                meta: {
+                    title: '展商入驻',
+                    HeaderType: 'system'
+                }
             }
         ]
     },

+ 180 - 0
src/main/pc/src/views/Rule.vue

@@ -0,0 +1,180 @@
+<template>
+    <div class="rule">
+        <div class="rule-center">
+            <el-container class="ruleContainer">
+                <el-aside width="216px">
+                    <div class="aside-list">
+                        <div
+                            class="aside-item"
+                            :class="{ active: active === index }"
+                            v-for="(item, index) in rules"
+                            :key="index"
+                            @click="getRule(item.chName)"
+                        >
+                            {{ item.name }}
+                        </div>
+                    </div>
+                </el-aside>
+                <el-container direction="vertical">
+                    <el-main class="main scrollbar" v-loading="loading" ref="main">
+                        <el-breadcrumb separator="/">
+                            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+                            <el-breadcrumb-item>{{ ruleInfo ? ruleInfo.name : '' }}</el-breadcrumb-item>
+                        </el-breadcrumb>
+                        <div class="title">{{ mainInfo.desc }}</div>
+
+                        <div class="detail" v-html="mainInfo.value"></div>
+                    </el-main>
+                </el-container>
+            </el-container>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'Rule',
+    data() {
+        return {
+            rules: [
+                {
+                    name: '用户注册协议',
+                    chName: 'RULE_REGISTER',
+                    enName: 'RULE_REGISTER_EN'
+                },
+                {
+                    name: '隐私政策',
+                    chName: 'RULE_PRIVACY',
+                    enName: 'RULE_PRIVACY_EN'
+                },
+                {
+                    name: '入驻协议',
+                    chName: 'RULE_ENTER',
+                    enName: 'RULE_ENTER_EN'
+                }
+            ],
+            type: 'RULE_REGISTER',
+            mainInfo: {},
+            loading: false
+        };
+    },
+    computed: {
+        ruleInfo() {
+            return [...this.rules].find(item => {
+                return item.chName === this.type;
+            });
+        },
+        active() {
+            return [...this.rules].findIndex(item => {
+                return item.chName === this.type;
+            });
+        }
+    },
+    mounted() {
+        if (this.$route.query.type) {
+            this.type = this.$route.query.type;
+        }
+        this.getRule(this.type);
+    },
+    methods: {
+        getRule(type) {
+            this.type = type;
+            console.log(this.$refs.main.$el);
+            this.$refs.main.$el.scrollTo({
+                top: 0
+            });
+            this.$nextTick(() => {
+                if (this.ruleInfo) {
+                    this.loading = true;
+                    this.$http
+                        .get(`/sysConfig/get/${this.getName(this.ruleInfo)}`)
+                        .then(res => {
+                            this.mainInfo = res;
+                            this.loading = false;
+                        })
+                        .catch(e => {
+                            this.loading = false;
+                        });
+                }
+            });
+        }
+    }
+};
+</script>
+<style lang="scss" scoped>
+@import '../styles/variables';
+.rule-center {
+    @include center-content(360);
+
+    padding-top: 30px;
+    padding-bottom: 60px;
+    // box-sizing: border-box;
+}
+
+.ruleContainer {
+    // min-height: calc(100vh - 538px);
+    @include max-height(538px, $max: 1000px, $type: 'height');
+    .el-aside {
+        margin-right: 30px;
+
+        .aside-item {
+            width: 216px;
+            height: 80px;
+
+            font-size: 16px;
+            font-weight: bold;
+            color: #818999;
+            line-height: 80px;
+            text-align: center;
+            background: #fff;
+            cursor: pointer;
+
+            &.active {
+                font-size: 16px;
+                font-weight: bold;
+                color: #ffa526;
+                background: #292c33;
+            }
+        }
+    }
+
+    .main {
+        background-color: #fff;
+        padding: 0 50px 30px;
+        position: relative;
+
+        .el-breadcrumb {
+            background-color: #fff;
+            padding: 30px 0;
+            position: sticky;
+            top: -1px;
+            left: 0;
+            right: 0;
+        }
+
+        .title {
+            padding: 30px 0;
+            // border-bottom: 1px solid #f2f3f5;
+            font-size: 24px;
+            font-weight: bold;
+            color: #000000;
+            line-height: 33px;
+            text-align: center;
+        }
+
+        // .detail {
+        //     padding: 30px 0 0;
+        // }
+    }
+}
+</style>
+
+<style lang="scss">
+.rule {
+    .detail {
+        p {
+            text-indent: 2em;
+        }
+    }
+}
+</style>

+ 1 - 1
src/main/pc/src/views/mine/Activity.vue

@@ -42,7 +42,7 @@ export default {
         ...mapState(['userInfo']),
         listQuery() {
             return {
-                query: { userId: this.userInfo.id }
+                query: { userId: this.userInfo.id, del: false }
             };
         },
         showList() {

+ 22 - 35
src/main/pc/src/views/mine/ActivityDetail.vue

@@ -3,16 +3,10 @@
         <div class="userTitle">
             <span>活动详情</span>
             <el-breadcrumb separator="/">
-                <el-breadcrumb-item :to="{ path: '/' }"
-                    >首页</el-breadcrumb-item
-                >
-                <el-breadcrumb-item :to="{ path: '/accountInfo' }"
-                    >个人中心</el-breadcrumb-item
-                >
-
-                <el-breadcrumb-item :to="{ path: '/mineActivity' }"
-                    >我的活动</el-breadcrumb-item
-                >
+                <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+                <el-breadcrumb-item :to="{ path: '/accountInfo' }">个人中心</el-breadcrumb-item>
+
+                <el-breadcrumb-item :to="{ path: '/mineActivity' }">我的活动</el-breadcrumb-item>
                 <el-breadcrumb-item>修改密码</el-breadcrumb-item>
             </el-breadcrumb>
         </div>
@@ -26,15 +20,12 @@
                 <div class="info-main">
                     <div class="title">{{ information.title }}</div>
 
-                    <div
-                        class="sub"
-                        v-if="information.type !== 'INDUSTRY_ACTIVITIES'"
-                    >
+                    <div class="sub" v-if="information.type !== 'INDUSTRY_ACTIVITIES'">
                         {{ information.introduction }}
                     </div>
 
                     <template v-else>
-                        <div class="info-item" style="margin-top:24px">
+                        <div class="info-item" style="margin-top: 24px;">
                             <div class="text1">时间:</div>
                             <div class="text2">{{ information.date }}</div>
                         </div>
@@ -56,15 +47,9 @@
                             </div>
                         </div>
 
-                        <el-button
-                            :type="isEnd ? 'info' : 'warning'"
-                            :disabled="isEnd"
-                            class="btn"
-                            @click="takeForm"
-                            >{{
-                                isEnd ? '报名结束' : '查看报名信息'
-                            }}</el-button
-                        >
+                        <el-button :type="isEnd ? 'info' : 'warning'" :disabled="isEnd" class="btn" @click="takeForm">{{
+                            isEnd ? '报名结束' : '查看报名信息'
+                        }}</el-button>
                     </template>
                 </div>
             </div>
@@ -72,11 +57,7 @@
             <div class="detail" v-html="information.content"></div>
         </div>
 
-        <Submit
-            :info="information"
-            :activityId.sync="activityId"
-            ref="submit"
-        />
+        <Submit :info="information" :activityId.sync="activityId" ref="submit" />
     </div>
 </template>
 <script>
@@ -106,14 +87,20 @@ export default {
             return this.information.isEnd || false;
         }
     },
+    watch: {
+        activityId() {
+            if (!this.activityId) {
+                this.$router.go(-1);
+            }
+        }
+    },
     mounted() {
+        this.activityId = this.$route.query.informationId;
         this.loading = true;
-        this.$http
-            .get('/information/get/' + this.$route.query.informationId)
-            .then(res => {
-                this.loading = false;
-                this.information = res;
-            });
+        this.$http.get('/information/get/' + this.activityId).then(res => {
+            this.loading = false;
+            this.information = res;
+        });
     },
     methods: {
         takeForm() {

+ 1 - 1
src/main/pc/src/views/news/NewsMain.vue

@@ -13,7 +13,7 @@
                     <div
                         class="menu-item"
                         v-for="(item, index) in InformationTypes"
-                        :key="item.key"
+                        :key="index"
                         @click="chooseMenu(item.key)"
                         :class="{ active: active === item.key }"
                     >

+ 2 - 1
src/main/pc/src/views/system/EnterRule.vue

@@ -38,7 +38,8 @@ export default {
                 this.$router.replace('/enterRule3');
             } else if (this.vendorInfo && this.vendorInfo.status === 'PASS') {
                 this.$router.replace('/home');
-            }else if (this.vendorInfo && this.vendorInfo.status === 'DENY') {
+                this.$store.commit('updateShowSuccess', true);
+            } else if (this.vendorInfo && this.vendorInfo.status === 'DENY') {
                 this.$router.replace('/enterRule2');
             }
         });

+ 23 - 3
src/main/pc/src/views/system/ManufacturersEntering.vue

@@ -7,7 +7,7 @@
                 <div class="text2 fontYahei">
                     IMT携手优秀企业共同实现智能制造产业链信息集成与共享
                 </div>
-                <el-button type="warning" @click="$router.push('/enterRule1')">立即入驻</el-button>
+                <el-button type="warning" @click="goEnter">立即入驻</el-button>
             </div>
         </div>
 
@@ -24,6 +24,7 @@
                         :title="item.title"
                         :steps="item.steps"
                         :class="'process-' + (index + 1)"
+                        @goQuestion="goQuestion"
                     />
                 </el-col>
             </el-row>
@@ -43,7 +44,7 @@
         </div>
 
         <div class="question">
-            <div class="questionMain">
+            <div class="questionMain" id="question">
                 <title-driver>
                     <span slot="title">常见问题</span>
                     <span slot="sub">COMMON PROBLEM</span>
@@ -83,7 +84,7 @@ export default {
                                 },
                                 {
                                     text1: '查看类别:',
-                                    text2: '企业生产或经营的产品包含于IMT平台产品类别范围内,点击查看'
+                                    text2: ['企业生产或经营的产品包含于IMT平台产品类别范围内,点击查看', '招商总类别']
                                 }
                             ]
                         },
@@ -301,6 +302,25 @@ export default {
     components: {
         Process,
         FeeTable
+    },
+    methods: {
+        goEnter() {
+            this.checkLogin()
+                .then(() => {
+                    this.$router.push('/enterRule1');
+                })
+                .catch(e => {
+                    if (e === '未登录') {
+                        this.login();
+                    }
+                });
+        },
+        goQuestion() {
+            document.documentElement.scrollTo({
+                top: document.getElementById('question').offsetTop,
+                behavior: 'smooth'
+            });
+        }
     }
 };
 </script>

+ 8 - 5
src/main/pc/src/views/vendor/ProductEdit.vue

@@ -64,13 +64,13 @@
                 >
                 </el-cascader>
             </el-form-item>
-            <el-form-item prop="origin" :label="$t('chan-di')">
+            <el-form-item prop="origin1" :label="$t('chan-di')">
                 <!-- <el-input class="input3" v-model="form.origin"></el-input> -->
                 <el-cascader
                     :props="countryProps"
                     :options="countrys"
                     class="input2"
-                    v-model="origins"
+                    v-model="form.origin1"
                     :show-all-levels="false"
                 ></el-cascader>
             </el-form-item>
@@ -387,8 +387,9 @@ export default {
             this.$http
                 .get('product/get/' + this.$route.query.id)
                 .then(res => {
+                    res.origin1=res.origin1||[]
                     this.form = res;
-                    this.origins = res.origin1.split(',');
+                    // this.origins = res.origin1.split(',');
                     this.img = (res.img || '').split(',');
                     this.pdf = (res.pdf1 || '').split(',');
                     this.video = (res.video || '').split(',');
@@ -436,7 +437,9 @@ export default {
     data() {
         return {
             saving: false,
-            form: {},
+            form: {
+                origin1:[]
+            },
             rules: {},
             categories: [],
             all: [],
@@ -560,7 +563,7 @@ export default {
             }
             data.deviceStatus = 'PENDING_REVIEW';
 
-            data.origin1 = [...this.origins].join(',');
+            // data.origin1 = [...this.origins].join(',');
             this.$http
                 .post('/product/save', data, { body: 'json' })
                 .then(res => {