wuhongyuq 5 سال پیش
والد
کامیت
3b4a995eb3
4فایلهای تغییر یافته به همراه210 افزوده شده و 36 حذف شده
  1. 5 4
      src/layout/layout-part/menus.vue
  2. 162 16
      src/layout/supermarket/newsInfo.vue
  3. 5 0
      src/views/institution/index.vue
  4. 38 16
      src/views/supermarket/debt.vue

+ 5 - 4
src/layout/layout-part/menus.vue

@@ -2,16 +2,17 @@
   <div id="menus">
     <el-menu :default-active="thisRouter()" class="el-menu-vertical-demo" :router="false" :default-openeds="defalutMenu" @select="to">
       <el-menu-item index="/"> <i class="el-icon-s-grid"></i>首页 </el-menu-item>
-      <el-submenu index="1">
-        <template v-slot:title>
+      <el-menu-item index="/supermarket/debt"> <i class="el-icon-s-grid"></i>金融数字超市</el-menu-item>
+      <!-- <el-submenu index="1">
+     <template v-slot:title>
           <i class="el-icon-s-grid"></i>
           <span>金融数字超市</span>
         </template>
         <el-menu-item-group>
           <el-menu-item index="/supermarket/debt">债权产品</el-menu-item>
           <el-menu-item index="/supermarket/stock">股权产品</el-menu-item>
-        </el-menu-item-group>
-      </el-submenu>
+        </el-menu-item-group> 
+      </el-submenu> -->
       <el-submenu index="2">
         <template v-slot:title>
           <i class="el-icon-s-grid"></i>

+ 162 - 16
src/layout/supermarket/newsInfo.vue

@@ -2,18 +2,124 @@
   <div id="newsInfo">
     <el-row>
       <el-col :span="24">
-        <el-table ref="debtTable" :data="debtTable" style="width: 100%" border>
-          <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
-          <el-table-column property="name" label="姓名" align="center"> </el-table-column>
-          <el-table-column property="date" label="日期" align="center"> </el-table-column>
-          <el-table-column property="status" label="状态" align="center"> </el-table-column>
-          <el-table-column fixed="right" label="操作" align="center">
-            <template slot-scope="scope">
-              <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-edit"></i></el-button>
-              <el-button @click.native.prevent="deleteRow(scope.$index, debtTable)" type="text"><i class="el-icon-delete"></i></el-button>
-            </template>
-          </el-table-column>
-        </el-table>
+        <template>
+          <el-tabs v-model="activeName" @tab-click="handleClicks">
+            <el-tab-pane label="未发布" name="first">
+              <el-col :span="24" class="info">
+                <el-col :span="10" class="input">
+                  <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
+                </el-col>
+                <el-col :span="2" class="btn">
+                  <el-button type="primary" icon="el-icon-search" circle></el-button>
+                </el-col>
+              </el-col>
+              <el-table ref="debtTable" :data="debtTable" style="width: 100%" border>
+                <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
+                <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
+                <el-table-column label="状态" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.status === '0' ? '未发布' : scope.row.status === '1' ? '发布' : '下架' }}</span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column property="publish_time" label="发布时间" align="center"> </el-table-column>
+                <el-table-column property="mongey_max_rate" label="贷款期限(小)" align="center"> </el-table-column>
+                <el-table-column fixed="right" label="操作" align="center">
+                  <template slot-scope="scope">
+                    <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
+                    <el-button @click="clickRest(scope.row)" type="text"><i class="el-icon-refresh"></i></el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-col class="page" :span="24">
+                <el-pagination
+                  @size-change="handleSizeChange"
+                  @current-change="handleCurrentChange"
+                  :current-page="currentPage"
+                  layout="total,  prev, pager, next, jumper"
+                  :total="total"
+                >
+                </el-pagination>
+              </el-col>
+            </el-tab-pane>
+            <el-tab-pane label="发布" name="second">
+              <el-col :span="24" class="info">
+                <el-col :span="10" class="input">
+                  <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
+                </el-col>
+                <el-col :span="2" class="btn">
+                  <el-button type="primary" icon="el-icon-search" circle></el-button>
+                </el-col>
+              </el-col>
+              <el-table ref="shenheTable" :data="shenheTable" style="width: 100%" border>
+                <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
+                <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
+                <el-table-column label="状态" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.status === '0' ? '未发布' : scope.row.status === '1' ? '发布' : '下架' }}</span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column property="publish_time" label="发布时间" align="center"> </el-table-column>
+                <el-table-column property="mongey_max_rate" label="贷款期限(小)" align="center"> </el-table-column>
+                <el-table-column fixed="right" label="操作" align="center">
+                  <template slot-scope="scope">
+                    <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
+                    <el-button @click="clickRest(scope.row.id)" type="text"><i class="el-icon-refresh"></i></el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-col class="page" :span="24">
+                <el-pagination
+                  @size-change="handleSizeChange"
+                  @current-change="handleCurrentChange"
+                  :current-page="currentPage"
+                  layout="total,  prev, pager, next, jumper"
+                  :total="total"
+                >
+                </el-pagination>
+              </el-col>
+            </el-tab-pane>
+            <el-tab-pane label="下架" name="third">
+              <el-col :span="24" class="info">
+                <el-col :span="10" class="input">
+                  <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
+                </el-col>
+                <el-col :span="2" class="btn">
+                  <el-button type="primary" icon="el-icon-search" circle></el-button>
+                </el-col>
+              </el-col>
+              <el-table ref="noshenhetable" :data="noshenhetable" style="width: 100%" border>
+                <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
+                <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
+                <el-table-column label="状态" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.status === '0' ? '未发布' : scope.row.status === '1' ? '发布' : '下架' }}</span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column property="publish_time" label="发布时间" align="center"> </el-table-column>
+                <el-table-column property="mongey_max_rate" label="贷款期限(小)" align="center"> </el-table-column>
+                <el-table-column fixed="right" label="操作" align="center">
+                  <template slot-scope="scope">
+                    <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
+                    <el-button @click="clickRest(scope.row.id)" type="text"><i class="el-icon-refresh"></i></el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-col class="page" :span="24">
+                <el-pagination
+                  @size-change="handleSizeChange"
+                  @current-change="handleCurrentChange"
+                  :current-page="currentPage"
+                  layout="total,  prev, pager, next, jumper"
+                  :total="total"
+                >
+                </el-pagination>
+              </el-col>
+            </el-tab-pane>
+          </el-tabs>
+        </template>
       </el-col>
     </el-row>
   </div>
@@ -24,13 +130,53 @@ export default {
   name: 'newsInfo',
   props: {
     debtTable: null,
+    shenheTable: null,
+    noshenhetable: null,
+    total: null,
   },
   components: {},
-  data: () => ({}),
+  data: () => ({
+    currentPage: 1,
+    activeName: 'first',
+    input: '',
+  }),
   created() {},
-  computed: {},
-  methods: {},
+  computed: {
+    status() {
+      return this.$route.params.status;
+    },
+  },
+  methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+    },
+    handleClicks(tab, event) {
+      console.log(tab, event);
+    },
+    handleClick(id) {
+      let newid = id.id;
+
+      this.$emit('handleClick', newid);
+    },
+  },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.info {
+  padding: 15px 0;
+}
+.info .input {
+  padding: 6px 0;
+}
+.info .btn {
+  text-align: center;
+}
+/deep/.el-input__inner {
+  height: 30px;
+  line-height: 30px;
+}
+</style>

+ 5 - 0
src/views/institution/index.vue

@@ -106,6 +106,11 @@ export default {
       this.$set(this, `debtTable`, weishenhe);
     },
 
+    // async deleteRow(id) {
+    //   const res = await this.delete(id);
+    //   this.$checkRes(res, '删除成功', '删除失败');
+    //   this.searchInfo();
+    // },
     handleClick(newid) {
       this.$router.push({ path: '/institution/detail', query: { id: newid } });
     },

+ 38 - 16
src/views/supermarket/debt.vue

@@ -3,13 +3,11 @@
     <el-row>
       <el-col :span="24" class="debt">
         <el-col :span="24" class="top">
-          <topInfo :topTitle="topTitle" @clickBtn="clickBtn"></topInfo>
-        </el-col>
-        <el-col :span="24" class="search">
-          <searchInfo></searchInfo>
+          <topInfo :topTitle="topTitle"></topInfo>
         </el-col>
+        <el-col :span="24" class="search"> </el-col>
         <el-col :span="24" class="main">
-          <newsInfo :debtTable="debtTable"></newsInfo>
+          <newsInfo :debtTable="debtTable" :total="total" @handleClick="handleClick" :noshenhetable="noshenhetable" :shenheTable="shenheTable"></newsInfo>
         </el-col>
       </el-col>
     </el-row>
@@ -18,31 +16,55 @@
 
 <script>
 import topInfo from '@/layout/common/topInfo.vue';
-import searchInfo from '@/layout/common/searchInfo.vue';
+
 import newsInfo from '@/layout/supermarket/newsInfo.vue';
+// import { createNamespacedHelpers } from 'vuex';
+// const { mapActions } = createNamespacedHelpers('companyup');
 export default {
-  name: 'debt',
+  name: 'dept',
   props: {},
   components: {
     topInfo, //头部导航
-    searchInfo, //搜素
-    newsInfo, //
+    // searchInfo, //搜素
+    newsInfo, //其他用户列表
   },
   data: () => ({
-    topTitle: '债权产品',
+    topTitle: '企业信息',
+    display: 'none',
     debtTable: [
       {
-        name: '名字',
-        date: '2020-12-12',
-        status: '通过',
+        name: '产品1',
+        status: '0',
+        publish_time: '13:34',
+        mongey_min_rate: '1',
+        mongey_max_rate: '1',
+        claims_min_term: '1',
+        claims_max_term: '2',
       },
     ],
+    shenheTable: [],
+    noshenhetable: [],
+    total: 1,
   }),
-  created() {},
+  created() {
+    // this.search();
+  },
   computed: {},
   methods: {
-    clickBtn() {
-      console.log('添加');
+    // ...mapActions(['query', 'delete']),
+    // async search({ skip = 0, limit = 10, ...info } = {}) {
+    // const res = await this.query({ skip, limit, ...info });
+    // var weishenhe = res.data.filter(item => item.status === '0');
+    // var success = res.data.filter(item => item.status === '1');
+    // var shibai = res.data.filter(item => item.status === '2');
+    // this.$set(this, `debtTable`, weishenhe);
+    // this.$set(this, `shenheTable`, success);
+    // this.$set(this, `noshenhetable`, shibai);
+    // },
+
+    // 修改
+    handleClick(newid) {
+      this.$router.push({ path: '/companyup/detail', query: { id: newid } });
     },
   },
 };