|
@@ -0,0 +1,152 @@
|
|
|
+<template>
|
|
|
+ <div id="allList">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="info">
|
|
|
+ <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <span>{{ item.product_name }}</span>
|
|
|
+ <span>{{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="down">
|
|
|
+ <el-col :span="6" class="product">
|
|
|
+ 左侧
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="descr">
|
|
|
+ <p>说明:</p>
|
|
|
+ <p>{{ item.desrciption }}</p>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="status">
|
|
|
+ <p>状态:{{ item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : '未识别' }}</p>
|
|
|
+ <!-- <el-button type="primary">同意交易</el-button> -->
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="page">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ :page-size="pageSize"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
+export default {
|
|
|
+ name: 'allList',
|
|
|
+ props: {},
|
|
|
+ components: {},
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ currentPage: 0,
|
|
|
+ pageSize: 6,
|
|
|
+ skip: '',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
|
|
|
+ // 列表
|
|
|
+ async searchInfo({ skip = 0, limit = 6, ...info } = {}) {
|
|
|
+ let market_userid = this.user.uid;
|
|
|
+ skip = this.skip;
|
|
|
+ const res = await this.transactionList({ skip, limit, market_userid, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 分页
|
|
|
+ handleCurrentChange(currentPage) {
|
|
|
+ this.$set(this, `skip`, (currentPage - 1) * this.pageSize);
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ pageTitle() {
|
|
|
+ return `${this.$route.meta.title}`;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.textOver {
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
+.list {
|
|
|
+ height: 185px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ margin: 0 0 15px 0;
|
|
|
+ .top {
|
|
|
+ height: 45px;
|
|
|
+ line-height: 45px;
|
|
|
+ background-color: #fafafa;
|
|
|
+ span:first-child {
|
|
|
+ float: left;
|
|
|
+ width: 74%;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #888;
|
|
|
+ padding: 0 15px;
|
|
|
+ }
|
|
|
+ span:last-child {
|
|
|
+ float: right;
|
|
|
+ width: 20%;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #888;
|
|
|
+ padding: 0 15px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .down {
|
|
|
+ padding: 18px;
|
|
|
+ .product {
|
|
|
+ height: 100px;
|
|
|
+ overflow: hidden;
|
|
|
+ padding: 0 15px;
|
|
|
+ border-right: 1px dashed #ccc;
|
|
|
+ }
|
|
|
+ .descr {
|
|
|
+ height: 100px;
|
|
|
+ overflow: hidden;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 0 10px;
|
|
|
+ border-right: 1px dashed #ccc;
|
|
|
+ }
|
|
|
+ .status {
|
|
|
+ height: 100px;
|
|
|
+ text-align: center;
|
|
|
+ p {
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #2d64b3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.info {
|
|
|
+ padding: 0 0 15px 0;
|
|
|
+}
|
|
|
+.page {
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+</style>
|