Bläddra i källkod

Merge branch 'master' of http://git.cc-lotus.info/service-platform/mobile-official

guhongwei 4 år sedan
förälder
incheckning
0fe2abd392

+ 13 - 10
src/router/index.js

@@ -20,14 +20,6 @@ const routes = [
     component: () => import('../views/live/index.vue'),
   },
 
-  // 我的发布
-  {
-    path: '/myfabu/index',
-    name: 'myfabu_index',
-    meta: { title: '我的发布', isleftarrow: true },
-    component: () => import('../views/myfabu/index.vue'),
-  },
-
   // 科技超市
   {
     path: '/market/index',
@@ -57,13 +49,24 @@ const routes = [
     meta: { title: '发布产品', isleftarrow: true },
     component: () => import('../views/market/detail.vue'),
   },
-  // 科技超市-发布产品
+
+  // 我的发布
+  {
+    path: '/userCenter/myProduct/index',
+    name: 'myProduct_index',
+    meta: { title: '我的发布', isleftarrow: true },
+    component: () => import('../views/userCenter/myProduct/index.vue'),
+  },
+
+  // 发布产品
   {
-    path: '/myfabu/detail',
+    path: '/detail',
     name: 'myfabu_detail',
     meta: { title: '我的发布', isleftarrow: true },
     component: () => import('../views/myfabu/detail.vue'),
   },
+
+  // 事项管理
   // 用户-事项管理
   {
     path: '/userCenter/matter/index',

+ 1 - 1
src/views/home/parts/clickBtn.vue

@@ -14,7 +14,7 @@
           :span="11"
           class="btn"
           v-if="this.user.role == '2' || this.user.role == '3' || this.user.role == '6' || this.user.role == '7'"
-          @click.native="$router.push({ path: '/myfabu/index' })"
+          @click.native="$router.push({ path: '/userCenter/myProduct/index' })"
         >
           <p><i class="el-icon-pie-chart"></i></p>
 

+ 70 - 0
src/views/userCenter/myProduct/detail.vue

@@ -0,0 +1,70 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
+        </el-col>
+        <el-col :span="24" class="main">
+          <release></release>
+        </el-col>
+        <!-- <el-col :span="24" class="foot">
+          <footInfo></footInfo>
+        </el-col> -->
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import NavBar from '@/layout/common/topInfo.vue';
+// import footInfo from '@/layout/common/footInfo.vue';
+import release from '@/layout/myfabu/release.vue';
+
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    NavBar,
+    // footInfo,
+    release, //产品发布
+  },
+  data: () => ({
+    // 头部标题
+    title: '',
+    // meta为true
+    isleftarrow: '',
+    // 返回
+    navShow: true,
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.style {
+  width: 100%;
+  min-height: 667px;
+  position: relative;
+  background-color: #f9fafc;
+}
+.top {
+  height: 46px;
+  overflow: hidden;
+  position: relative;
+  z-index: 999;
+}
+.main {
+  min-height: 570px;
+}
+.foot {
+  position: absolute;
+  bottom: 0;
+}
+</style>

+ 101 - 9
src/views/userCenter/myProduct/index.vue

@@ -1,30 +1,122 @@
 <template>
   <div id="index">
-    <p>我的发布</p>
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
+        </el-col>
+        <el-col :span="24" class="main">
+          <el-col :span="24" class="main">
+            <el-col :span="24" class="one">
+              <van-tabs v-model="active" animated>
+                <van-tab>
+                  <template #title>
+                    <van-icon name="todo-list" />
+                    <p>草稿</p>
+                  </template>
+                  <caogaoList></caogaoList>
+                </van-tab>
+                <van-tab>
+                  <template #title>
+                    <van-icon name="column" />
+                    <p>待审核</p>
+                  </template>
+                  <noauditList></noauditList>
+                </van-tab>
+                <van-tab>
+                  <template #title>
+                    <van-icon name="label" />
+                    <p>审核成功</p>
+                  </template>
+                  <auditList></auditList>
+                </van-tab>
+              </van-tabs>
+            </el-col>
+            <el-col :span="24" class="two">
+              <van-button type="primary" @click="$router.push({ path: '/myfabu/detail' })">发布产品</van-button>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+import NavBar from '@/layout/common/topInfo.vue';
+import caogaoList from './parts/caogaoList.vue';
+import noauditList from './parts/noauditList.vue';
+import auditList from './parts/auditList.vue';
+
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: {
+    NavBar,
+    caogaoList,
+    noauditList,
+    auditList,
+  },
   data: function() {
-    return {};
+    return {
+      // 头部标题
+      title: '',
+      // meta为true
+      isleftarrow: '',
+      // 返回
+      navShow: true,
+
+      // 标签
+      active: '1',
+    };
   },
   created() {},
   methods: {},
   computed: {
     ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
   },
-  metaInfo() {
-    return { title: this.$route.meta.title };
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
   },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.style {
+  width: 100%;
+  min-height: 667px;
+  position: relative;
+  background-color: #f9fafc;
+}
+.top {
+  height: 46px;
+  overflow: hidden;
+  position: relative;
+  z-index: 999;
+}
+.main {
+  min-height: 570px;
+  .two {
+    position: fixed;
+    top: 80%;
+
+    left: 10px;
+    z-index: 999;
+  }
+}
+/deep/.van-tab {
+  text-align: center;
+}
+/deep/.van-tabs--line .van-tabs__wrap {
+  height: 70px;
+  margin: 0 0 10px 0;
+}
+/deep/.van-tab--active {
+  color: red;
+}
+.van-icon {
+  font-size: 20px;
+}
+</style>

+ 94 - 0
src/views/userCenter/myProduct/parts/auditList.vue

@@ -0,0 +1,94 @@
+<template>
+  <div id="auditList">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="list" @click.native="$router.push({ path: '/market/prodDetail' })" v-for="(item, index) in list" :key="index">
+          <p class="textOver">{{ item.name }}</p>
+          <p>
+            <span class="ptwo"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
+            <span class="ptwo"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>
+          </p>
+          <p class="textOver"><span>应用领域:</span>{{ item.field || '暂无' }}</p>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('marketproduct');
+export default {
+  name: 'auditList',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      list: [
+        {
+          name: '最最新新技术',
+          product_type_name: '技术',
+          phase: '1',
+          field: '最新技术',
+        },
+        {
+          name: '最最新新技术',
+          product_type_name: '技术',
+          phase: '1',
+          field: '最新技术',
+        },
+      ],
+    };
+  },
+  created() {
+    this.searchInfo();
+  },
+  methods: {
+    ...product(['newquery']),
+    async searchInfo() {
+      // let res = await this.newquery({ skip: 0, limit: 6, totaltype: '0', status: '1' });
+      // if (this.$checkRes(res)) {
+      //   this.$set(this, `list`, res.data);
+      // }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  border-top: 1px solid #f5f5f5;
+  .list {
+    background: #fff;
+    padding: 0 10px;
+    border-bottom: 1px solid #ccc;
+    p {
+      font-size: 14px;
+      color: #000;
+      padding: 5px 0;
+    }
+    p:first-child {
+      font-size: 16px;
+    }
+    p:nth-child(2) .ptwo {
+      display: inline-block;
+      width: 50%;
+    }
+    p:nth-child(2) .ptwo span:first-child {
+      color: #ccc;
+    }
+    p:last-child span {
+      color: #ccc;
+    }
+  }
+}
+</style>

+ 94 - 0
src/views/userCenter/myProduct/parts/caogaoList.vue

@@ -0,0 +1,94 @@
+<template>
+  <div id="technologyList">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="list" @click.native="$router.push({ path: '/market/prodDetail' })" v-for="(item, index) in list" :key="index">
+          <p class="textOver">{{ item.name }}</p>
+          <p>
+            <span class="ptwo"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
+            <span class="ptwo"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>
+          </p>
+          <p class="textOver"><span>应用领域:</span>{{ item.field || '暂无' }}</p>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('marketproduct');
+export default {
+  name: 'technologyList',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      list: [
+        {
+          name: '技术技术技术技术',
+          product_type_name: '技术',
+          phase: '1',
+          field: '技术技术技术技术',
+        },
+        {
+          name: '技术技术技术技术',
+          product_type_name: '技术',
+          phase: '1',
+          field: '技术技术技术技术',
+        },
+      ],
+    };
+  },
+  created() {
+    this.searchInfo();
+  },
+  methods: {
+    ...product(['newquery']),
+    async searchInfo() {
+      // let res = await this.newquery({ skip: 0, limit: 6, totaltype: '0', status: '1' });
+      // if (this.$checkRes(res)) {
+      //   this.$set(this, `list`, res.data);
+      // }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  border-top: 1px solid #f5f5f5;
+  .list {
+    background: #fff;
+    padding: 0 10px;
+    border-bottom: 1px solid #ccc;
+    p {
+      font-size: 14px;
+      color: #000;
+      padding: 5px 0;
+    }
+    p:first-child {
+      font-size: 16px;
+    }
+    p:nth-child(2) .ptwo {
+      display: inline-block;
+      width: 50%;
+    }
+    p:nth-child(2) .ptwo span:first-child {
+      color: #ccc;
+    }
+    p:last-child span {
+      color: #ccc;
+    }
+  }
+}
+</style>

+ 94 - 0
src/views/userCenter/myProduct/parts/noauditList.vue

@@ -0,0 +1,94 @@
+<template>
+  <div id="noauditList">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="list" @click.native="$router.push({ path: '/market/prodDetail' })" v-for="(item, index) in list" :key="index">
+          <p class="textOver">{{ item.name }}</p>
+          <p>
+            <span class="ptwo"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
+            <span class="ptwo"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>
+          </p>
+          <p class="textOver"><span>应用领域:</span>{{ item.field || '暂无' }}</p>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('marketproduct');
+export default {
+  name: 'noauditList',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      list: [
+        {
+          name: '新技术',
+          product_type_name: '技术',
+          phase: '1',
+          field: '最新技术',
+        },
+        {
+          name: '新技术',
+          product_type_name: '技术',
+          phase: '1',
+          field: '最新技术',
+        },
+      ],
+    };
+  },
+  created() {
+    this.searchInfo();
+  },
+  methods: {
+    ...product(['newquery']),
+    async searchInfo() {
+      // let res = await this.newquery({ skip: 0, limit: 6, totaltype: '0', status: '1' });
+      // if (this.$checkRes(res)) {
+      //   this.$set(this, `list`, res.data);
+      // }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  border-top: 1px solid #f5f5f5;
+  .list {
+    background: #fff;
+    padding: 0 10px;
+    border-bottom: 1px solid #ccc;
+    p {
+      font-size: 14px;
+      color: #000;
+      padding: 5px 0;
+    }
+    p:first-child {
+      font-size: 16px;
+    }
+    p:nth-child(2) .ptwo {
+      display: inline-block;
+      width: 50%;
+    }
+    p:nth-child(2) .ptwo span:first-child {
+      color: #ccc;
+    }
+    p:last-child span {
+      color: #ccc;
+    }
+  }
+}
+</style>