guhongwei 5 年之前
父節點
當前提交
7378671fc3

+ 56 - 7
src/views/adminCenter/dynamicInfo/index.vue

@@ -4,24 +4,73 @@
       <el-col :span="24">
         <el-col :span="24" class="leftTop"> <span>|</span> <span>动态监测</span> </el-col>
         <el-col :span="24" class="info">
-          动态监测
+          <el-tabs v-model="activeName" type="card">
+            <el-tab-pane label="正在洽谈" name="first">
+              <zzqt :zzqtList="zzqtList" :total="zzqtTotal"></zzqt>
+            </el-tab-pane>
+            <el-tab-pane label="达成意向" name="second">
+              <dcyx :dcyxList="dcyxList" :total="dxyxTotal"></dcyx>
+            </el-tab-pane>
+            <el-tab-pane label="交易完成" name="third">
+              <jywc :jywcList="jywcList" :total="jywcTotal"></jywc>
+            </el-tab-pane>
+          </el-tabs>
         </el-col>
-      </el-col></el-row
-    >
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+import zzqt from './parts/zzqt.vue';
+import dcyx from './parts/dcyx.vue';
+import jywc from './parts/jywc.vue';
+const { mapActions: transactions } = createNamespacedHelpers('transaction');
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: {
+    zzqt,
+    dcyx,
+    jywc,
+  },
   data: function() {
-    return {};
+    return {
+      activeName: 'first',
+      dock_id: '',
+      zzqtList: [],
+      zzqtTotal: 0,
+      dcyxList: [],
+      dxyxTotal: 0,
+      jywcList: [],
+      jywcTotal: 0,
+    };
+  },
+  created() {
+    this.searchInfo();
+  },
+  methods: {
+    ...transactions({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
+    ...dock({ dockQuery: 'query' }),
+    async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.dockQuery({ skip, limit, uid: this.user.uid });
+      for (const val of res.data) {
+        this.$set(this, `dock_id`, val.id);
+      }
+      let arr = await this.transactionslist({ skip, limit, dockid: this.dock_id, ...info });
+      var zzqt = arr.data.filter(item => item.status === '0');
+      var dcyx = arr.data.filter(item => item.status === '1');
+      var jywc = arr.data.filter(item => item.status === '2');
+      this.$set(this, `zzqtList`, zzqt);
+      this.$set(this, `zzqtTotal`, zzqt.length);
+      this.$set(this, `dcyxList`, dcyx);
+      this.$set(this, `dxyxTotal`, dcyx.length);
+      this.$set(this, `jywcList`, jywc);
+      this.$set(this, `jywcTotal`, jywc.length);
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
     pageTitle() {

+ 79 - 0
src/views/adminCenter/dynamicInfo/parts/dcyx.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="dcyx">
+    <el-row>
+      <el-col :span="24">
+        <el-table :data="list" border style="width: 100%">
+          <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
+          <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
+          <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+        </el-table>
+        <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 _ from 'lodash';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'dcyx',
+  props: {
+    dcyxList: null,
+    total: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1,
+      pageSize: 10,
+      origin: [],
+      list: [],
+    };
+  },
+  created() {},
+  methods: {
+    search(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.search(currentPage);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    dcyxList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.page {
+  text-align: right;
+  padding: 10px 0;
+}
+</style>

+ 79 - 0
src/views/adminCenter/dynamicInfo/parts/jywc.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="jywc">
+    <el-row>
+      <el-col :span="24">
+        <el-table :data="list" border style="width: 100%">
+          <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
+          <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
+          <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+        </el-table>
+        <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 _ from 'lodash';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'jywc',
+  props: {
+    jywcList: null,
+    total: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1,
+      pageSize: 10,
+      origin: [],
+      list: [],
+    };
+  },
+  created() {},
+  methods: {
+    search(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.search(currentPage);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    jywcList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.page {
+  text-align: right;
+  padding: 10px 0;
+}
+</style>

+ 79 - 0
src/views/adminCenter/dynamicInfo/parts/zzqt.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="zzqt">
+    <el-row>
+      <el-col :span="24">
+        <el-table :data="list" border style="width: 100%">
+          <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
+          <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
+          <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+        </el-table>
+        <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 _ from 'lodash';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'zzqt',
+  props: {
+    zzqtList: null,
+    total: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1,
+      pageSize: 10,
+      origin: [],
+      list: [],
+    };
+  },
+  created() {},
+  methods: {
+    search(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.search(currentPage);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    zzqtList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.page {
+  text-align: right;
+  padding: 10px 0;
+}
+</style>

+ 2 - 2
src/views/adminCenter/transaction/parts/detail.vue

@@ -14,8 +14,8 @@
               <el-input v-model="form.username" :disabled="true"></el-input>
             </el-form-item>
             <el-form-item label="审核">
-              <el-radio v-model="form.status" label="0">待审核</el-radio>
-              <el-radio v-model="form.status" label="1">审核通过</el-radio>
+              <el-radio v-model="form.status" label="0">待确定</el-radio>
+              <el-radio v-model="form.status" label="1">交易确定</el-radio>
             </el-form-item>
             <el-form-item label="描述">
               <el-input v-model="form.description"></el-input>

+ 2 - 2
src/views/adminCenter/transaction/parts/list.vue

@@ -20,14 +20,14 @@
                       : `${scoped.row.status}` === `3`
                       ? '交易失败'
                       : `${scoped.row.status}` === `4`
-                      ? '合同待审核'
+                      ? '待确定'
                       : '未识别'
                   }}
                 </template>
               </el-table-column>
               <el-table-column label="操作" align="center">
                 <template slot-scope="scoped">
-                  <el-button v-if="scoped.row.status == 4" type="primary" size="mini" @click="shareBtn(scoped.row.id)">审核 </el-button>
+                  <el-button v-if="scoped.row.status == 4" type="primary" size="mini" @click="shareBtn(scoped.row.id)">确定 </el-button>
                   <!-- <el-button type="danger" size="mini" @click="handleDelete(scoped.row.id)">删除</el-button> -->
                 </template>
               </el-table-column>

+ 1 - 8
src/views/hall/dock/dockDetail.vue

@@ -78,15 +78,8 @@
                     </el-col>
                   </el-col>
                 </span>
-                <!-- <span v-if="display === '2'">
-                  <el-col :span="24" class="two">
-                    <chat :room="room"></chat>
-                  </el-col>
-                </span> -->
               </el-col>
               <el-col class="mainDown">
-                <!-- <el-button @click="btnInfo()" type="info">项目详情</el-button> -->
-                <!-- <el-button v-if="this.user.uid != detailInfo.userid" @click="btnPhone()" type="primary">对接聊天</el-button> -->
                 <el-button type="warning" style="float:left;" @click.native="back()">返回</el-button>
                 <el-button type="primary" @click="btnPhone()" v-if="this.user.uid != detailInfo.userid">对接聊天</el-button>
                 <el-button v-if="this.user.uid != detailInfo.userid" @click="btnTrade()" type="success">洽谈交易</el-button>
@@ -416,7 +409,7 @@ p {
       padding: 15px 20px;
       color: #606266;
       font-size: 14px;
-      height: 660px;
+      height: 460px;
       word-break: break-all;
     }
   }

+ 4 - 4
src/views/hall/dock/parts/chat.vue

@@ -17,9 +17,9 @@
           </template>
         </template>
       </el-col>
-      <el-col :span="24" style="text-align:right">
-        <el-button type="primary" size="mini" @click="sendMessage" style="margin-bottom:10px">发送</el-button>
-        <wang-editor v-model="content" ref="editor"></wang-editor>
+      <el-col :span="24">
+        <el-input v-model="content" type="textarea"></el-input>
+        <el-button type="primary" size="mini" @click="sendMessage" style="margin-top:10px;text-align:center">发送</el-button>
       </el-col>
     </el-row>
   </div>
@@ -34,7 +34,7 @@ export default {
   props: {
     room: { type: Object },
   },
-  components: { wangEditor },
+  components: {},
   data: () => {
     return {
       content: '',

+ 56 - 7
src/views/vipCenter/dynamicInfo/index.vue

@@ -4,24 +4,73 @@
       <el-col :span="24">
         <el-col :span="24" class="leftTop"> <span>|</span> <span>动态监测</span> </el-col>
         <el-col :span="24" class="info">
-          动态监测
+          <el-tabs v-model="activeName" type="card">
+            <el-tab-pane label="正在洽谈" name="first">
+              <zzqt :zzqtList="zzqtList" :total="zzqtTotal"></zzqt>
+            </el-tab-pane>
+            <el-tab-pane label="达成意向" name="second">
+              <dcyx :dcyxList="dcyxList" :total="dxyxTotal"></dcyx>
+            </el-tab-pane>
+            <el-tab-pane label="交易完成" name="third">
+              <jywc :jywcList="jywcList" :total="jywcTotal"></jywc>
+            </el-tab-pane>
+          </el-tabs>
         </el-col>
-      </el-col></el-row
-    >
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+import zzqt from './parts/zzqt.vue';
+import dcyx from './parts/dcyx.vue';
+import jywc from './parts/jywc.vue';
+const { mapActions: transactions } = createNamespacedHelpers('transaction');
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: {
+    zzqt,
+    dcyx,
+    jywc,
+  },
   data: function() {
-    return {};
+    return {
+      activeName: 'first',
+      dock_id: '',
+      zzqtList: [],
+      zzqtTotal: 0,
+      dcyxList: [],
+      dxyxTotal: 0,
+      jywcList: [],
+      jywcTotal: 0,
+    };
+  },
+  created() {
+    this.searchInfo();
+  },
+  methods: {
+    ...transactions({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
+    ...dock({ dockQuery: 'query' }),
+    async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.dockQuery({ skip, limit, uid: this.user.uid });
+      for (const val of res.data) {
+        this.$set(this, `dock_id`, val.id);
+      }
+      let arr = await this.transactionslist({ skip, limit, dockid: this.dock_id, ...info });
+      var zzqt = arr.data.filter(item => item.status === '0');
+      var dcyx = arr.data.filter(item => item.status === '1');
+      var jywc = arr.data.filter(item => item.status === '2');
+      this.$set(this, `zzqtList`, zzqt);
+      this.$set(this, `zzqtTotal`, zzqt.length);
+      this.$set(this, `dcyxList`, dcyx);
+      this.$set(this, `dxyxTotal`, dcyx.length);
+      this.$set(this, `jywcList`, jywc);
+      this.$set(this, `jywcTotal`, jywc.length);
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
     pageTitle() {

+ 79 - 0
src/views/vipCenter/dynamicInfo/parts/dcyx.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="dcyx">
+    <el-row>
+      <el-col :span="24">
+        <el-table :data="list" border style="width: 100%">
+          <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
+          <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
+          <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+        </el-table>
+        <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 _ from 'lodash';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'dcyx',
+  props: {
+    dcyxList: null,
+    total: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1,
+      pageSize: 10,
+      origin: [],
+      list: [],
+    };
+  },
+  created() {},
+  methods: {
+    search(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.search(currentPage);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    dcyxList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.page {
+  text-align: right;
+  padding: 10px 0;
+}
+</style>

+ 79 - 0
src/views/vipCenter/dynamicInfo/parts/jywc.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="jywc">
+    <el-row>
+      <el-col :span="24">
+        <el-table :data="list" border style="width: 100%">
+          <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
+          <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
+          <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+        </el-table>
+        <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 _ from 'lodash';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'jywc',
+  props: {
+    jywcList: null,
+    total: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1,
+      pageSize: 10,
+      origin: [],
+      list: [],
+    };
+  },
+  created() {},
+  methods: {
+    search(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.search(currentPage);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    jywcList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.page {
+  text-align: right;
+  padding: 10px 0;
+}
+</style>

+ 79 - 0
src/views/vipCenter/dynamicInfo/parts/zzqt.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="zzqt">
+    <el-row>
+      <el-col :span="24">
+        <el-table :data="list" border style="width: 100%">
+          <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
+          <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
+          <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+        </el-table>
+        <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 _ from 'lodash';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'zzqt',
+  props: {
+    zzqtList: null,
+    total: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1,
+      pageSize: 10,
+      origin: [],
+      list: [],
+    };
+  },
+  created() {},
+  methods: {
+    search(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.search(currentPage);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    zzqtList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.page {
+  text-align: right;
+  padding: 10px 0;
+}
+</style>

+ 86 - 53
src/views/vipCenter/statisInfo/parts/achievements.vue

@@ -6,7 +6,7 @@
           <template>
             <el-col :span="24" class="search">
               <el-col :span="5">
-                <el-select v-model="field" placeholder="请选择所属领域" @change="change">
+                <el-select v-model="field" filterable clearable placeholder="请选择所属领域" @change="changeField">
                   <el-option label="先进制造" value="0"></el-option>
                   <el-option label="新材料" value="1"></el-option>
                   <el-option label="光电子" value="2"></el-option>
@@ -15,7 +15,7 @@
                 </el-select>
               </el-col>
               <el-col :span="12">
-                <el-radio-group v-model="radio1" @change="submits">
+                <el-radio-group v-model="radio1" @change="changeRadio">
                   <el-radio label="0" border>是我处支持范围</el-radio>
                   <el-radio label="1" border>不是我处支持范围</el-radio>
                 </el-radio-group>
@@ -24,7 +24,6 @@
             <el-table :data="list" style="width: 100%" border>
               <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
               <el-table-column prop="name" label="商品名称 " align="center"> </el-table-column>
-              <el-table-column prop="company" label="所属单位 " align="center"> </el-table-column>
               <el-table-column prop="field" label="所属技术领域" align="center">
                 <template v-slot="scoped">
                   {{
@@ -42,14 +41,43 @@
                   }}
                 </template>
               </el-table-column>
-              <!-- <el-table-column label="操作" align="center">
-                <template slot-scope="scoped">
-                  <el-button v-if="scoped.row.status == 4" type="primary" size="mini" @click="shareBtn(scoped.row.id)">审核 </el-button>
-                  
-              </el-table-column> -->
+              <el-table-column prop="phase" label="研发阶段" align="center">
+                <template v-slot="scoped">
+                  {{ scoped.row.phase == '0' ? '阶段成果' : scoped.row.phase == '1' ? '最终成果' : '暂无' }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="coopermode" label="合作方式" align="center">
+                <template v-slot="scoped">
+                  {{
+                    scoped.row.coopermode == '0'
+                      ? '技术转让'
+                      : scoped.row.coopermode == '1'
+                      ? '技术服务'
+                      : scoped.row.coopermode == '2'
+                      ? '技术许可'
+                      : scoped.row.coopermode == '3'
+                      ? '技术融资'
+                      : scoped.row.coopermode == '4'
+                      ? '其他'
+                      : '暂无'
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="business" label="交易方式" align="center">
+                <template v-slot="scoped">
+                  {{ scoped.row.business == '0' ? '公用' : scoped.row.business == '1' ? '竞价' : scoped.row.business == '2' ? '转让' : '暂无' }}
+                </template>
+              </el-table-column>
             </el-table>
             <el-col :span="24" class="page">
-              <page v-bind="$attrs" position="center" :limit="limit" :total="total" @query="search"></page>
+              <el-pagination
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+                :page-size="pageSize"
+              >
+              </el-pagination>
             </el-col>
           </template>
         </el-col>
@@ -59,65 +87,70 @@
 </template>
 
 <script>
-import page from '@/components/pagination.vue';
 import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
-const { mapActions: product } = createNamespacedHelpers('marketproduct');
+const { mapActions: dock } = createNamespacedHelpers('dock');
+import _ from 'loadsh';
 export default {
   name: 'column',
   props: {},
-  components: {
-    page,
-  },
+  components: {},
   data: () => ({
-    currentPage: 0,
-    pageSize: 10,
-    limit: 10,
+    applyList: [], //查询数据
+    currentPage: 1, //默认数据1
+    pageSize: 10, //每页显示数据数量
+    origin: [], //分割数据
+    list: [], //显示数据列表
     total: 0,
-    list: [],
-    field: [],
+    // 技术领域
+    field: '',
+    // 是否我处支持
     radio1: '',
   }),
   created() {
     this.search();
   },
-  computed: {},
   methods: {
-    ...product({ productQuery: 'query' }),
+    ...dock(['query', 'delete', 'update', 'fetch']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      if (this.field) {
-        if (this.radio1) {
-          let res = await this.productQuery({ skip, totaltype: 1, field: this.field, radio1: this.radio1, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        } else {
-          let res = await this.productQuery({ skip, totaltype: 1, field: this.field, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        }
-      } else if (this.radio1) {
-        if (this.field) {
-          let res = await this.productQuery({ skip, totaltype: 1, field: this.field, radio1: this.radio1, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        } else {
-          let res = await this.productQuery({ skip, totaltype: 1, radio1: this.radio1, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        }
-      } else {
-        let res = await this.productQuery({ skip, totaltype: 1, limit, ...info });
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
+      let res = await this.query({ skip, limit, uid: this.user.uid, ...info });
+      let arr = res.data.map(item => item.apply.map(apply => apply.goodsList));
+      arr = _.flattenDeep(arr);
+      var newArr = arr.filter(item => item.totaltype === '1');
+      this.$set(this, `applyList`, newArr);
+      this.$set(this, `total`, newArr.length);
     },
-    async change(value) {
-      this.$set(this, `field`, value);
-      this.search();
+    searchPage(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
     },
-
-    submits(value) {
-      this.$set(this, `radio1`, value);
-      this.search();
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+    // 筛选技术领域
+    changeField(value) {
+      var arr = this.applyList.filter(item => item.field === value);
+      this.$set(this, `list`, arr);
+      this.$set(this, `total`, arr.length);
+    },
+    // 筛选是否是我处支持
+    changeRadio() {},
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    applyList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
     },
   },
 };

+ 86 - 54
src/views/vipCenter/statisInfo/parts/technology.vue

@@ -6,7 +6,7 @@
           <template>
             <el-col :span="24" class="search">
               <el-col :span="5">
-                <el-select v-model="field" placeholder="请选择所属领域" @change="change">
+                <el-select v-model="field" filterable clearable placeholder="请选择所属领域" @change="changeField">
                   <el-option label="先进制造" value="0"></el-option>
                   <el-option label="新材料" value="1"></el-option>
                   <el-option label="光电子" value="2"></el-option>
@@ -15,7 +15,7 @@
                 </el-select>
               </el-col>
               <el-col :span="12">
-                <el-radio-group v-model="radio1" @change="submits">
+                <el-radio-group v-model="radio1" @change="changeRadio">
                   <el-radio label="0" border>是我处支持范围</el-radio>
                   <el-radio label="1" border>不是我处支持范围</el-radio>
                 </el-radio-group>
@@ -41,14 +41,43 @@
                   }}
                 </template>
               </el-table-column>
-              <!-- <el-table-column label="操作" align="center">
-                <template slot-scope="scoped">
-                  <el-button v-if="scoped.row.status == 4" type="primary" size="mini" @click="shareBtn(scoped.row.id)">审核 </el-button>
-                  
-              </el-table-column> -->
+              <el-table-column prop="phase" label="研发阶段" align="center">
+                <template v-slot="scoped">
+                  {{ scoped.row.phase == '0' ? '阶段成果' : scoped.row.phase == '1' ? '最终成果' : '暂无' }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="coopermode" label="合作方式" align="center">
+                <template v-slot="scoped">
+                  {{
+                    scoped.row.coopermode == '0'
+                      ? '技术转让'
+                      : scoped.row.coopermode == '1'
+                      ? '技术服务'
+                      : scoped.row.coopermode == '2'
+                      ? '技术许可'
+                      : scoped.row.coopermode == '3'
+                      ? '技术融资'
+                      : scoped.row.coopermode == '4'
+                      ? '其他'
+                      : '暂无'
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="business" label="交易方式" align="center">
+                <template v-slot="scoped">
+                  {{ scoped.row.business == '0' ? '公用' : scoped.row.business == '1' ? '竞价' : scoped.row.business == '2' ? '转让' : '暂无' }}
+                </template>
+              </el-table-column>
             </el-table>
             <el-col :span="24" class="page">
-              <page v-bind="$attrs" position="center" :limit="limit" :total="total" @query="search"></page>
+              <el-pagination
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+                :page-size="pageSize"
+              >
+              </el-pagination>
             </el-col>
           </template>
         </el-col>
@@ -58,67 +87,70 @@
 </template>
 
 <script>
-import page from '@/components/pagination.vue';
 import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
-const { mapActions: product } = createNamespacedHelpers('marketproduct');
+const { mapActions: dock } = createNamespacedHelpers('dock');
+import _ from 'loadsh';
 export default {
   name: 'column',
   props: {},
-  components: {
-    page,
-  },
+  components: {},
   data: () => ({
-    currentPage: 0,
-    pageSize: 10,
-    limit: 10,
+    applyList: [], //查询数据
+    currentPage: 1, //默认数据1
+    pageSize: 10, //每页显示数据数量
+    origin: [], //分割数据
+    list: [], //显示数据列表
     total: 0,
-    list: [],
-    field: [],
+    // 技术领域
+    field: '',
+    // 是否我处支持
     radio1: '',
   }),
   created() {
     this.search();
   },
-  computed: {},
   methods: {
-    ...product({ productQuery: 'query' }),
+    ...dock(['query', 'delete', 'update', 'fetch']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      if (this.field) {
-        if (this.radio1) {
-          let res = await this.productQuery({ skip, totaltype: 0, field: this.field, radio1: this.radio1, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        } else {
-          let res = await this.productQuery({ skip, totaltype: 0, field: this.field, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        }
-      } else if (this.radio1) {
-        if (this.field) {
-          let res = await this.productQuery({ skip, totaltype: 0, field: this.field, radio1: this.radio1, limit, ...info });
-
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        } else {
-          let res = await this.productQuery({ skip, totaltype: 0, radio1: this.radio1, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        }
-      } else {
-        let res = await this.productQuery({ skip, totaltype: 0, limit, ...info });
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
+      let res = await this.query({ skip, limit, uid: this.user.uid, ...info });
+      let arr = res.data.map(item => item.apply.map(apply => apply.goodsList));
+      arr = _.flattenDeep(arr);
+      var newArr = arr.filter(item => item.totaltype === '0');
+      this.$set(this, `applyList`, newArr);
+      this.$set(this, `total`, newArr.length);
     },
-
-    async change(value) {
-      this.$set(this, `field`, value);
-      this.search();
+    searchPage(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
     },
-
-    submits(value) {
-      this.$set(this, `radio1`, value);
-      this.search();
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+    // 筛选技术领域
+    changeField(value) {
+      var arr = this.applyList.filter(item => item.field === value);
+      this.$set(this, `list`, arr);
+      this.$set(this, `total`, arr.length);
+    },
+    // 筛选是否是我处支持
+    changeRadio() {},
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    applyList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
     },
   },
 };