Browse Source

合作产品展示

shixr 1 year ago
parent
commit
04ee08ca20

+ 4 - 0
src/api/index.js

@@ -52,6 +52,10 @@ export function cooperatorList() {
     return request.get('/cooperator/cooperatorList');
 }
 
+export function cooperatorProductList(){
+    return request.get('/cooperator/cooperatorProductList');
+}
+
 export function findCooperatorListByName(name) {
     return request.get('/cooperator/findCooperatorListByName?name=' + name);
 }

+ 18 - 0
src/router/index.js

@@ -272,6 +272,24 @@ var routes = [{
                     show: true
                 }
             },
+            {
+                path: '/cooperatorProductInfo',
+                name: '合作方产品信息',
+                component: () => import('../views/system/cooperatorProductInfo.vue'),
+                meta: {
+                    keepAlive: false,
+                    show: true
+                }
+            },
+            {
+                path: '/cooperatorProductInfoBase',
+                name: '合作方产品基础信息',
+                component: () => import('../views/system/cooperatorProductInfoBase.vue'),
+                meta: {
+                    keepAlive: false,
+                    show: true
+                }
+            },
             
         ]
     },

+ 34 - 22
src/views/system/cooperatorInfo.vue

@@ -29,51 +29,49 @@
 
           <el-main>
             <div class = "filter-container">
-              <el-input v-model="input" placeholder="合作方名称/合作方编号" style="width: 30%" size="small" clearable/>
-              <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px">查询</el-button>
+              <el-input v-model="input" placeholder="产品名称/产品编号" style="width: 30%" size="small" clearable/>
+              <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" @click="filterTable">查询</el-button>
               <el-button type="primary" round @click="onButtonClickAdd" size="small" style="margin-left: 350px"
               >新增</el-button
               >
             </div>
 
+            
+
+
+
         
-            <el-table :data="cooperatorData" style="width: 100%;">
-              <el-table-column align="center" label="合作方编号" width="130">
+            <el-table :data="cooperatorData" style="width: 100%;" @row-click="onButtonClick">
+              <el-table-column align="center" label="合作方编号" width="150">
                 <template v-slot="{row}">
                   <span>{{ row.Id}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="合作方名称" width="130">
+              <el-table-column align="center" label="合作方名称" width="150">
                 <template v-slot="{row}">
                   <span>{{ row.cooperatorName}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="字段数量" width="130">
+              <el-table-column align="center" label="字段数量" width="150">
                 <template v-slot="{row}">
                   <span>{{ row.fieldCount}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="模型数量" width="130">
+              <el-table-column align="center" label="模型数量" width="150">
                 <template v-slot="{row}">
                   <span>{{ row.modelCount}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="创建时间" width="130">
+              <el-table-column align="center" label="创建时间" width="150">
                 <template v-slot="{row}">
                   <span>{{ row.createTime}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" width="130">
-                <template v-slot="{row}">
-                  <el-button type="primary" round @click="onButtonClick(row.id, row.cooperatorName, row.cooperatorNum, row.fieldCount, row.modelCount, row.createTime)" size="small" >查看</el-button>
-                </template>
-              
-              </el-table-column>
 
             </el-table>
 
@@ -162,7 +160,7 @@ export default {
     gotolink3()
     {
       //指定跳转地址
-      this.$router.replace('/cooperatorInfo');
+      this.$router.replace('/cooperatorProductInfo');
       this.selected1 = true;
       this.selected2 = false;
       this.selected3 = true;
@@ -183,16 +181,16 @@ export default {
       }
       return this.cooperatorData
     },
-    onButtonClick (cooperatorId, cooperatorName, cooperatorNum, fieldCount, modelCount, createTime){
+    onButtonClick (row){
       this.$router.push({
         path: '/cooperatorDetailed',
         query: {
-          cooperatorId : cooperatorId,
-          cooperatorName: cooperatorName,
-          cooperatorNum : cooperatorNum,
-          fieldCount : fieldCount,
-          modelCount : modelCount,
-          createTime : createTime
+          cooperatorId : row.cooperatorId,
+          cooperatorName: row.cooperatorName,
+          cooperatorNum : row.cooperatorNum,
+          fieldCount : row.fieldCount,
+          modelCount : row.modelCount,
+          createTime : row.createTime
         }// 要传递的参数
       })
     },
@@ -206,6 +204,20 @@ export default {
     },
 
   },
+  filterTable(){
+      if (this.input.trim() === '') {
+        // 如果输入框为空,显示所有数据
+        this.cooperatorData = this.getTableData();
+      } else {
+        // 否则,只显示与输入文本匹配的数据
+        this.cooperatorData = this.cooperatorData.filter(item =>
+        {
+            const values = Object.values(item);
+            const str = values.join(' ').toLowerCase();
+            return str.includes(this.input.toLowerCase());
+        });
+      }
+    },
   fillter: {},
 }
 </script>

+ 261 - 0
src/views/system/cooperatorProductInfo.vue

@@ -0,0 +1,261 @@
+<template>
+    <div class="container" style="min-height: 100%; padding-bottom: 100px;">
+  
+      <el-tabs v-model="activeName" @tab-click="handleClick"  stretch>
+        <el-tab-pane label="首页" name="first"  >首页</el-tab-pane>
+        <el-tab-pane label="业务" name="second">业务</el-tab-pane>
+        <el-tab-pane label="合作方" name="third">合作方</el-tab-pane>
+        <el-tab-pane label="字段列表" name="fourth">字段列表</el-tab-pane>
+        <el-tab-pane label="模型列表" name="fifth">模型列表</el-tab-pane>
+        <el-tab-pane label="管理" name="sixth">管理</el-tab-pane>
+  
+      </el-tabs>
+      <van-sidebar v-model="activeKey">
+        <van-sidebar-item title="标签名称"></van-sidebar-item>
+        <van-sidebar-item title="标签名称"></van-sidebar-item>
+        <van-sidebar-item title="标签名称"></van-sidebar-item>
+  
+      </van-sidebar>
+  
+          <el-container>
+            <el-aside width="250px">
+  
+              <button @click="gotolink1" v-bind:class="{ button: selected1, buttonselected: selected2 }">待办任务</button>
+              <button @click="gotolink2" v-bind:class="{ button: selected3, buttonselected: selected4 }">合作方</button>
+              <button @click="gotolink3" v-bind:class="{ button: selected5, buttonselected: selected6 }">合作产品</button>
+  
+            </el-aside>
+            <div class="line" />
+  
+            <el-main>
+              <div class = "filter-container">
+              <el-input v-model="input" placeholder="产品名称/产品编号" style="width: 30%" size="small" clearable/>
+              <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" @click="filterTable">查询</el-button>
+            </div>
+
+  
+          
+              <el-table :data="cooperatorProductData" style="width: 100%;" @row-click="gotolink4">
+                <el-table-column align="center" label="产品编号" width="160">
+                  <template v-slot="{row}">
+                    <span>{{ row.productNum}}</span>
+                  </template>
+                </el-table-column>
+  
+                <el-table-column align="center" label="产品名称" width="160">
+                  <template v-slot="{row}">
+                    <span>{{ row.productName}}</span>
+                  </template>
+                </el-table-column>
+  
+                <el-table-column align="center" label="产品状态" width="80">
+                  <template v-slot="{row}">
+                    <span>{{ row.productStatus}}</span>
+                  </template>
+                </el-table-column>
+  
+                <el-table-column align="center" label="合作方名称" width="160">
+                  <template v-slot="{row}">
+                    <span>{{ row.cooperatorName}}</span>
+                  </template>
+                </el-table-column>
+  
+                <el-table-column align="center" label="对应模型" width="80">
+                  <template v-slot="{row}">
+                    <span>{{ row.modelName}}</span>
+                  </template>
+                </el-table-column>
+  
+                <el-table-column align="center" label="创建日期" width="160">
+                  <template v-slot="{row}">
+                    <span>{{ row.createTime}}</span>
+                  </template>
+                </el-table-column>
+              
+              
+              </el-table>
+  
+              
+            </el-main>
+          </el-container>
+    </div>
+  </template>
+  
+  <script>
+  
+  import {
+    getList,
+    userInfo, partnerList, roleDel
+  } from '@/api/index.js'
+  import store from "@/store";
+  import request from '@/utils/request.js'
+  import { fieldInfo, modelInfo } from '../../api';
+  import {
+    cooperatorProductList
+  } from '@/api/index.js'
+import { Row } from 'element-ui';
+  export default {
+  
+    name: "cooperatorProductInfo",
+    props: [],
+    components: {},
+    data() {
+      return {
+        activeKey: 0,
+        activeName: "second",
+        currentPage: 1,
+        cooperatorProductData : [],
+        selected1: true,
+        selected2: false,
+        selected3: true,
+        selected4: false,
+        selected5: false,
+        selected6: true,
+        input:'',
+      }
+    },
+    watch: {},
+    computed: {},
+    beforeCreate() {},
+    created() {},
+    beforeMount() {},
+    mounted() 
+    {
+      cooperatorProductList().then(
+          res=>
+          {
+            this.cooperatorProductData=res.data.cooperator_Product_List;
+            // console.log(this.fieldData)
+          }
+      )
+    },
+    beforeUpdate() {},
+    updated() {},
+    destroyed() {},
+    methods: {
+      request() {},
+      handleClick() {},
+      handleCurrentChange() {},
+      handleSizeChange() {},
+      gotolink1()
+      {
+        this.$router.replace('/cooperatorProductInfo');
+        this.selected1 = false;
+        this.selected2 = true;
+        this.selected3 = true;
+        this.selected4 = false;
+        this.selected5 = true;
+        this.selected6 = false;
+      },
+      gotolink2()
+      {
+        //指定跳转地址
+        this.$router.push('/cooperatorInfo');
+        this.selected1 = true;
+        this.selected2 = false;
+        this.selected3 = false;
+        this.selected4 = true;
+        this.selected5 = true;
+        this.selected6 = false;
+      },
+      gotolink3()
+      {
+        //指定跳转地址
+        this.$router.replace('/cooperatorProductInfo');
+        this.selected1 = true;
+        this.selected2 = false;
+        this.selected3 = true;
+        this.selected4 = false;
+        this.selected5 = false;
+        this.selected6 = true;
+      },
+      gotolink4(row)
+      {
+        //指定跳转地址
+        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:row.productNum,productName:row.productName,modelName:row.modelName}});
+        this.selected1 = true;
+        this.selected2 = false;
+        this.selected3 = false;
+        this.selected4 = true;
+        this.selected5 = true;
+        this.selected6 = false;
+      },
+      tables:function () { //在你的数据表格中定义tabels
+        const input = this.input
+        if (input) {
+          // console.log("input输入的搜索内容:" + this.input)
+          return this.cooperatorProductData.filter(data => {
+            console.log("object:" + Object.keys(data))
+            return Object.keys(data).some(key => {
+              return String(data[key]).indexOf(input) > -1
+            })
+          })
+        }
+        return this.cooperatorProductData
+      },
+      filterTable(){
+      if (this.input.trim() == "") {
+        // 如果输入框为空,显示所有数据
+        this.cooperatorProductData = this.getTableData();
+      } else {
+        // 否则,只显示与输入文本匹配的数据
+        this.cooperatorProductData = this.cooperatorProductData.filter(item =>
+        {
+            const values = Object.values(item);
+            const str = values.join(' ').toLowerCase();
+            return str.includes(this.input.toLowerCase());
+        });
+      }
+    },
+  
+    },
+    tableFilter(){
+        
+    },
+    fillter: {},
+  }
+  </script>
+  
+  <style scoped>
+  /* 竖线 */
+  .line{
+    float: left;
+    width: 0.1em;
+    height: 19.5em;
+    margin-right: 1em;
+    margin-left: 0em;
+    background:#000000;
+  }
+  
+  .button {
+      background-color: white; 
+      border: none;
+      color: black;
+      padding: 15px 32px;
+      text-align: center;
+      text-decoration: none;
+      display: inline-block;
+      font-size: 16px;
+      width:180px;
+      height:50px;
+      font-weight: normal
+  }
+  
+  .buttonselected {
+      background-color: white; 
+      border: none;
+      color: black;
+      padding: 15px 32px;
+      text-align: center;
+      text-decoration: none;
+      display: inline-block;
+      font-size: 18px;
+      width:180px;
+      height:50px;
+      font-weight: 900
+  }
+  
+  
+  .container {  }
+  </style>
+  

+ 230 - 0
src/views/system/cooperatorProductInfoBase.vue

@@ -0,0 +1,230 @@
+<template>
+    <div class="container" style="min-height: 100%; padding-bottom: 100px;">
+  
+      <el-tabs v-model="activeName" @tab-click="handleClick"  stretch>
+        <el-tab-pane label="首页" name="first"  >首页</el-tab-pane>
+        <el-tab-pane label="业务" name="second">业务</el-tab-pane>
+        <el-tab-pane label="合作方" name="third">合作方</el-tab-pane>
+        <el-tab-pane label="字段列表" name="fourth">字段列表</el-tab-pane>
+        <el-tab-pane label="模型列表" name="fifth">模型列表</el-tab-pane>
+        <el-tab-pane label="管理" name="sixth">管理</el-tab-pane>
+  
+      </el-tabs>
+      <van-sidebar v-model="activeKey">
+        <van-sidebar-item title="标签名称"></van-sidebar-item>
+        <van-sidebar-item title="标签名称"></van-sidebar-item>
+        <van-sidebar-item title="标签名称"></van-sidebar-item>
+  
+      </van-sidebar>
+  
+          <el-container>
+            <el-aside width="250px">
+  
+              <button @click="gotolink1" v-bind:class="{ button: selected1, buttonselected: selected2 }">待办任务</button>
+              <button @click="gotolink2" v-bind:class="{ button: selected3, buttonselected: selected4 }">合作方</button>
+              <button @click="gotolink3" v-bind:class="{ button: selected5, buttonselected: selected6 }">合作产品</button>
+  
+            </el-aside>
+            <div class="line" />
+  
+            <el-main>
+                <div class = "top-bar" >
+                    <el-button round type="primary" size="small" style="margin-left: 10px" @click="gotolink4" >产品基础信息</el-button>
+                    <el-button round type="primary" size="small" style="margin-left: 20px" @click="gotolink5" >产品字段信息</el-button>
+                    <el-button round type="primary" size="small" style="margin-left: 500px" @click="gotolink3" >返回</el-button>
+                </div>
+                
+                <el-descriptions style="margin-top: 20px" direction="vertical" :column="1" border>
+                    <el-descriptions-item label="合作方产品编号">
+                        <p>
+                            {{this.$route.query.productNum }}
+                        </p>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="合作方产品名称">
+                        <p>
+                            {{this.$route.query.productName }}
+                        </p>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="产品模型">
+                        <p>
+                            {{this.$route.query.modelName }}
+                        </p>
+                    </el-descriptions-item>
+                    
+                </el-descriptions>
+                <div class = "bottom-bar" style="margin-top: 20px" >
+                    <el-button round type="success" size="small" style="margin-left:auto" @click="gotolink3" >完成</el-button>
+                </div>
+              
+            </el-main>
+          </el-container>
+    </div>
+  </template>
+  
+  <script>
+  
+  import {
+    getList,
+    userInfo, partnerList, roleDel
+  } from '@/api/index.js'
+  import store from "@/store";
+  import request from '@/utils/request.js'
+  import { fieldInfo, modelInfo } from '../../api';
+  import {
+    cooperatorProductList
+  } from '@/api/index.js'
+import { Row } from 'element-ui';
+  export default {
+  
+    name: "cooperatorProductInfoBase",
+    props: [],
+    components: {},
+    data() {
+      return {
+        activeKey: 0,
+        activeName: "second",
+        currentPage: 1,
+        selected1: true,
+        selected2: false,
+        selected3: true,
+        selected4: false,
+        selected5: false,
+        selected6: true,
+        buttondisabled1: 'true',
+        buttondisabled2: 'false',
+        input:'',
+      }
+    },
+    watch: {},
+    computed: {},
+    beforeCreate() {},
+    created() {},
+    beforeMount() {},
+    mounted() 
+    {
+
+    },
+    beforeUpdate() {},
+    updated() {},
+    destroyed() {},
+    methods: {
+      request() {},
+      handleClick() {},
+      handleCurrentChange() {},
+      handleSizeChange() {},
+      gotolink1()
+      {
+        this.$router.replace('/cooperatorProductInfo');
+        this.selected1 = false;
+        this.selected2 = true;
+        this.selected3 = true;
+        this.selected4 = false;
+        this.selected5 = true;
+        this.selected6 = false;
+      },
+      gotolink2()
+      {
+        //指定跳转地址
+        this.$router.push('/cooperatorInfo');
+        this.selected1 = true;
+        this.selected2 = false;
+        this.selected3 = false;
+        this.selected4 = true;
+        this.selected5 = true;
+        this.selected6 = false;
+      },
+      gotolink3()
+      {
+        //指定跳转地址
+        this.$router.replace('/cooperatorProductInfo');
+        this.selected1 = true;
+        this.selected2 = false;
+        this.selected3 = true;
+        this.selected4 = false;
+        this.selected5 = false;
+        this.selected6 = true;
+      },
+      gotolink4()
+      {
+        //指定跳转地址
+        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelId:this.$route.query.modelId}});
+        this.selected1 = true;
+        this.selected2 = false;
+        this.selected3 = true;
+        this.selected4 = false;
+        this.selected5 = false;
+        this.selected6 = true;
+      },
+      gotolink5()
+      {
+        //指定跳转地址
+        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelId:this.$route.query.modelId}});
+        this.selected1 = true;
+        this.selected2 = false;
+        this.selected3 = true;
+        this.selected4 = false;
+        this.selected5 = false;
+        this.selected6 = true;
+      },
+      tables:function () { //在你的数据表格中定义tabels
+        const input = this.input
+        if (input) {
+          // console.log("input输入的搜索内容:" + this.input)
+          return this.cooperatorProductData.filter(data => {
+            console.log("object:" + Object.keys(data))
+            return Object.keys(data).some(key => {
+              return String(data[key]).indexOf(input) > -1
+            })
+          })
+        }
+        return this.cooperatorProductData
+      }
+  
+    },
+    fillter: {},
+  }
+  </script>
+  
+  <style scoped>
+  /* 竖线 */
+  .line{
+    float: left;
+    width: 0.1em;
+    height: 19.5em;
+    margin-right: 1em;
+    margin-left: 0em;
+    background:#000000;
+  }
+  
+  .button {
+      background-color: white; 
+      border: none;
+      color: black;
+      padding: 15px 32px;
+      text-align: center;
+      text-decoration: none;
+      display: inline-block;
+      font-size: 16px;
+      width:180px;
+      height:50px;
+      font-weight: normal
+  }
+  
+  .buttonselected {
+      background-color: white; 
+      border: none;
+      color: black;
+      padding: 15px 32px;
+      text-align: center;
+      text-decoration: none;
+      display: inline-block;
+      font-size: 18px;
+      width:180px;
+      height:50px;
+      font-weight: 900
+  }
+  
+  
+  .container {  }
+  </style>
+