guhongwei 4 years ago
parent
commit
f55089f1c3

+ 53 - 0
src/views/dynamic/downparts/jbyx.vue

@@ -0,0 +1,53 @@
+<template>
+  <div id="jbyx">
+    <el-row>
+      <el-col :span="24" class="jbyx">
+        <el-col :span="24" class="one">
+          <p>电子邮箱:</p>
+          <p></p>
+          <el-link href="https://mail.163.com" target="_blank" :underline="false">guhongwei0324@163.com</el-link>
+        </el-col>
+        <el-col :span="24" class="one">
+          <p>联系电话:</p>
+          <el-link href="" target="_blank" :underline="false">17319450324</el-link>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'jbyx',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.jbyx {
+  .one {
+    margin: 0 0 10px 0;
+    p:nth-child(1) {
+      font-size: 18px;
+      padding: 5px 0;
+    }
+    p:nth-child(2) {
+      font-size: 16px;
+    }
+  }
+}
+</style>

+ 63 - 10
src/views/dynamic/downparts/jyxc.vue

@@ -1,8 +1,23 @@
 <template>
-  <div id="jyxc">
+  <div id="wsdc">
     <el-row>
-      <el-col :span="24">
-        Jianyanxianc
+      <el-col :span="24" class="wsdc">
+        <el-form ref="form" :model="form">
+          <el-form-item>
+            <span slot="label">建言献策</span>
+            <el-input
+              type="textarea"
+              v-model="form.proposal"
+              :autosize="{ minRows: 4, maxRows: 6 }"
+              maxlength="300"
+              show-word-limit
+              placeholder="请输入您的对本平台的建言献策"
+            ></el-input>
+          </el-form-item>
+          <el-col :span="24" class="btn">
+            <el-button type="primary" @click="onSubmit">确认提交</el-button>
+          </el-col>
+        </el-form>
       </el-col>
     </el-row>
   </div>
@@ -10,18 +25,41 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: survey } = createNamespacedHelpers('survey');
 export default {
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  name: 'jyxc',
+  name: 'wsdc',
   props: {},
   components: {},
   data: function() {
-    return {};
+    return {
+      cha: require('@a/cha.png'),
+      form: {},
+    };
   },
   created() {},
-  methods: {},
+  methods: {
+    ...survey(['create']),
+    async onSubmit() {
+      let data = this.form;
+      data.uid = this.user.uid;
+      if (data.uid) {
+        let res = await this.create(data);
+        if (res.errcode === 0) {
+          this.$message({
+            message: '提交成功',
+            type: 'success',
+          });
+          this.form = {};
+          this.$emit('handleClose');
+        }
+      } else {
+        this.$message({
+          message: '游客不可参与网上调查!',
+          type: 'warning',
+        });
+      }
+    },
+  },
   computed: {
     ...mapState(['user']),
   },
@@ -29,4 +67,19 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.wsdc {
+  .el-image {
+    padding: 0px 40%;
+  }
+  .btn {
+    text-align: center;
+  }
+}
+/deep/.el-form-item__label {
+  width: 100%;
+  text-align: center;
+  font-size: 22px;
+  margin: 15px 0;
+}
+</style>

+ 1 - 0
src/views/dynamic/downparts/wsdc.vue

@@ -46,6 +46,7 @@ export default {
             message: '提交成功',
             type: 'success',
           });
+          this.form = {};
           this.$emit('handleClose');
         }
       } else {

+ 20 - 9
src/views/dynamic/index.vue

@@ -23,12 +23,15 @@
     <el-dialog title="展会服务" :visible.sync="zhfwdialog" width="50%" :before-close="handleClose">
       <zhfw></zhfw>
     </el-dialog>
-    <el-dialog title="建言献策" :visible.sync="jyxcdialog" width="60%" :before-close="handleClose">
-      <jyxc></jyxc>
+    <el-dialog title="建言献策" :visible.sync="jyxcdialog" width="30%" :before-close="handleClose">
+      <jyxc @handleClose="handleClose"></jyxc>
     </el-dialog>
-    <el-dialog title="网上调查" :visible.sync="wsdcialog" width="30%" :before-close="handleClose">
+    <el-dialog title="网上调查" :visible.sync="wsdcdialog" width="30%" :before-close="handleClose">
       <wsdc @handleClose="handleClose"></wsdc>
     </el-dialog>
+    <el-dialog title="举报邮箱" :visible.sync="jbyxdialog" width="30%" :before-close="handleClose">
+      <jbyx></jbyx>
+    </el-dialog>
   </div>
 </template>
 
@@ -44,11 +47,13 @@ import zhfw from './downparts/zhfw.vue';
 import jyxc from './downparts/jyxc.vue';
 // 网上调查
 import wsdc from './downparts/wsdc.vue';
+// 举报邮箱
+import jbyx from './downparts/jbyx.vue';
 
 export default {
   name: 'index',
   props: {},
-  components: { userTwo, gzcy, maps, zhfw, jyxc, wsdc },
+  components: { userTwo, gzcy, maps, zhfw, jyxc, wsdc, jbyx },
   data: () => ({
     centerImage: require('@/assets/dynamic5.png'),
     // 公众参与
@@ -83,7 +88,9 @@ export default {
     // 建言献策
     jyxcdialog: false,
     // 网上调查
-    wsdcialog: false,
+    wsdcdialog: false,
+    // 举报邮箱
+    jbyxdialog: false,
   }),
   created() {},
   computed: {},
@@ -91,12 +98,14 @@ export default {
     show(data) {
       if (data.title == '展会服务') {
         this.zhfwdialog = true;
+      } else if (data.title == '我要发布') {
+        this.$router.push({ path: '/dynamic/product' });
       } else if (data.title == '建言献策') {
         this.jyxcdialog = true;
       } else if (data.title == '网上调查') {
-        this.wsdcialog = true;
-      } else if (data.title == '我要发布') {
-        this.$router.push({ path: '/dynamic/product' });
+        this.wsdcdialog = true;
+      } else if (data.title == '举报邮箱') {
+        this.jbyxdialog = true;
       }
     },
     // 公共关闭
@@ -106,7 +115,9 @@ export default {
       // 建言献策
       this.jyxcdialog = false;
       // 网上调查
-      this.wsdcialog = false;
+      this.wsdcdialog = false;
+      // 举报邮箱
+      this.jbyxdialog = false;
     },
   },
 };