guhongwei 3 yıl önce
ebeveyn
işleme
a9f0725d12

+ 5 - 0
src/router/index.js

@@ -70,6 +70,11 @@ const service = [
     meta: { title: '咨询服务-专利维权' },
     component: () => import('../views/service/dimension/index.vue'),
   },
+  {
+    path: '/service/dimension/detail',
+    meta: { title: '专利维权-详细信息' },
+    component: () => import('../views/service/dimension/detail.vue'),
+  },
   {
     path: '/service/interflow/index',
     meta: { title: '咨询服务-交流互动' },

+ 2 - 0
src/store/index.js

@@ -7,6 +7,7 @@ import upload from './upload';
 import news from '@common/src/store/news';
 import column from '@common/src/store/column';
 import viewPoint from '@common/src/store/viewPoint';
+import dimension from '@common/src/store/dimension';
 import questionnaire from '@common/src/store/question/questionnaire';
 import answer from '@common/src/store/question/answer';
 import question from '@common/src/store/question';
@@ -77,6 +78,7 @@ export default new Vuex.Store({
     column,
     news,
     viewPoint,
+    dimension,
     questionnaire,
     answer,
     question,

+ 6 - 6
src/views/market/patentInfo/index.vue

@@ -112,10 +112,10 @@ export default {
   padding: 10px 0;
   text-align: center;
 }
-.dialog {
-  /deep/.van-dialog__content {
-    // height: 300px;
-    // overflow-y: auto;
-  }
-}
+// .dialog {
+//   /deep/.van-dialog__content {
+//     height: 300px;
+//     overflow-y: auto;
+//   }
+// }
 </style>

+ 63 - 0
src/views/service/dimension/detail.vue

@@ -0,0 +1,63 @@
+<template>
+  <div id="detail">
+    <admin-frame topType="2" @back="back" :rightArrow="false" :usePage="false" :useNav="false">
+      <template v-slot:info>
+        <info-1 :info="info"></info-1>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import info1 from './parts/info-1.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dimension } = createNamespacedHelpers('dimension');
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    adminFrame,
+    info1,
+  },
+  data: function () {
+    return {
+      info: {},
+    };
+  },
+  async created() {
+    if (this.id) await this.search();
+  },
+  methods: {
+    ...dimension(['fetch']),
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/service/dimension/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 34 - 7
src/views/service/dimension/index.vue

@@ -1,22 +1,49 @@
 <template>
   <div id="index">
-    <van-row>
-      <van-col span="24" class="main"> 专利维权 </van-col>
-    </van-row>
+    <admin-frame @search="search" :limit="limit" :total="total" :useNav="false">
+      <template v-slot:info>
+        <list-1 :list="list" @detail="detail"></list-1>
+      </template>
+    </admin-frame>
   </div>
 </template>
 
 <script>
+import list1 from './parts/list-1.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dimension } = createNamespacedHelpers('dimension');
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: {
+    adminFrame,
+    list1,
+  },
   data: function () {
-    return {};
+    return {
+      list: [],
+      limit: 5,
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...dimension(['query']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      let res = await this.query({ skip, limit, is_show: true, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 详情
+    detail(data) {
+      this.$router.push({ path: '/service/dimension/detail', query: { id: data.id } });
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
   },

+ 83 - 0
src/views/service/dimension/parts/info-1.vue

@@ -0,0 +1,83 @@
+<template>
+  <div id="info-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-col :span="24" class="one">
+          <van-col :span="24" class="name">
+            {{ info.title }}
+          </van-col>
+          <van-col :span="24" class="other">
+            <van-col :span="24" class="otherInfo">
+              信息来源:<span>{{ info.origin }}</span>
+            </van-col>
+            <van-col :span="24" class="otherInfo">
+              发布时间:<span>{{ info.publish_time }}</span>
+            </van-col>
+          </van-col>
+          <van-col :span="24" class="content">
+            <p v-html="info.content"></p>
+          </van-col>
+          <el-col :span="24" class="filepath" v-if="info.filepath">
+            <el-link :href="info.filepath.url" type="primary">{{ info.filepath.name }}</el-link>
+          </el-col>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'info-1',
+  props: {
+    info: { ttype: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    padding: 8px;
+    .name {
+      font-size: 16px;
+      font-weight: bold;
+      margin: 0 0 5px 0;
+      text-align: center;
+    }
+    .other {
+      .otherInfo {
+        font-size: 14px;
+        margin: 0 0 5px 0;
+        color: #666;
+        span {
+          color: #000;
+        }
+      }
+    }
+    .filepath {
+      margin: 20px 0 0 0;
+    }
+  }
+}
+</style>

+ 85 - 0
src/views/service/dimension/parts/list-1.vue

@@ -0,0 +1,85 @@
+<template>
+  <div id="list-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-col :span="24" class="one">
+          <van-col span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detail(item)">
+            <van-col :span="24" class="name textOver">
+              {{ item.title }}
+            </van-col>
+            <van-col :span="24" class="other">
+              <van-col :span="24" class="otherInfo">
+                信息来源:<span>{{ item.origin }}</span>
+              </van-col>
+              <van-col :span="24" class="otherInfo">
+                发布时间:<span>{{ item.publish_time }}</span>
+              </van-col>
+            </van-col>
+          </van-col>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'list-1',
+  props: {
+    list: { type: Array },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    detail(data) {
+      this.$emit('detail', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    padding: 8px;
+    .list {
+      padding: 8px;
+      margin: 0 0 5px 0;
+      background-color: #fff;
+      border-radius: 5px;
+      .name {
+        font-size: 16px;
+        font-weight: bold;
+        margin: 0 0 5px 0;
+      }
+      .other {
+        .otherInfo {
+          font-size: 14px;
+          margin: 0 0 5px 0;
+          color: #666;
+          span {
+            color: #000;
+          }
+        }
+      }
+    }
+  }
+}
+</style>