|
@@ -0,0 +1,99 @@
|
|
|
+<template>
|
|
|
+ <div id="list-2">
|
|
|
+ <van-row>
|
|
|
+ <van-col span="24" class="main">
|
|
|
+ <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <van-col span="24" class="title textOver">
|
|
|
+ {{ item.patent_name }}
|
|
|
+ </van-col>
|
|
|
+ <van-col span="24" class="other">
|
|
|
+ <van-col span="24" class="otherInfo">
|
|
|
+ 发送时间:<span>{{ getDate(item.meta) }}</span>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ <van-col span="24" class="btn">
|
|
|
+ <van-button size="small" type="info" @click="download(item)">下载文件</van-button>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+var moment = require('moment');
|
|
|
+export default {
|
|
|
+ name: 'list-2',
|
|
|
+ props: {
|
|
|
+ list: { type: Array },
|
|
|
+ },
|
|
|
+ components: {},
|
|
|
+ data: function () {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ download(data) {
|
|
|
+ if (data.file_url.length > 0) {
|
|
|
+ let url = data.file_url.map((i) => i.url);
|
|
|
+ window.location.href = `${process.env.VUE_APP_HOST}/${url[0]}`;
|
|
|
+ } else {
|
|
|
+ this.$toast({ type: `fail`, message: `未上传文件` });
|
|
|
+ }
|
|
|
+ console.log(data);
|
|
|
+ },
|
|
|
+ getDate(val) {
|
|
|
+ let newDate = moment(val.createdAt).format('YYYY-MM-DD hh:mm:ss');
|
|
|
+ if (newDate) return newDate;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ test: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {},
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main {
|
|
|
+ padding: 8px 8px 0 8px;
|
|
|
+ .list {
|
|
|
+ background-color: #fff;
|
|
|
+ margin: 0 0 8px 0;
|
|
|
+ padding: 8px;
|
|
|
+ border-radius: 5px;
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ }
|
|
|
+ .other {
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ .otherInfo {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #666;
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ span {
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+ text-align: center;
|
|
|
+ .van-button {
|
|
|
+ margin: 0 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|