Bladeren bron

更新企业发布和审核相关等 科技超市商品列表详情

wuhongyuq 5 jaren geleden
bovenliggende
commit
a6f28ba954

+ 14 - 1
src/components/enterprise/enterprisefabu.vue

@@ -25,7 +25,15 @@
             </el-col>
           </el-col>
           <el-col :span="19" class="right">
-            <contextfabuxx v-on="$listeners" :recruitData="recruitData" :total="total"></contextfabuxx>
+            <contextfabuxx
+              v-on="$listeners"
+              :recruitData="recruitData"
+              :successlist="successlist"
+              :shenheList="shenheList"
+              :total="total"
+              :tatalstatus2="tatalstatus2"
+              :tatalstatus1="tatalstatus1"
+            ></contextfabuxx>
           </el-col>
         </div>
       </el-col>
@@ -53,6 +61,11 @@ export default {
     liebiaoList: null, //分类导航
     recruitData: null,
     total: null,
+    shenheList: null,
+    successlist: null,
+    tatalstatus2: null,
+    tatalstatus1: null,
+    // gonggeiData: null,
   },
   components: {
     top, //头部

+ 124 - 0
src/components/supermaket/supermarketlistDetail.vue

@@ -0,0 +1,124 @@
+<template>
+  <div id="policy">
+    <el-row>
+      <el-col :span="24" class="top">
+        <top></top>
+      </el-col>
+      <el-col :span="24" class="logo">
+        <div class="w_1200">
+          <logo :info="info"></logo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="menu">
+        <div class="w_1200">
+          <menuInfo></menuInfo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="24" class="rightcont">
+            <listcontext v-on="$listeners" :contentList="contentList" :columnName="columnName" v-if="display === 'list'" :total="total"></listcontext>
+            <detali v-else :policyInfo="policyInfo"></detali>
+          </el-col>
+        </div>
+      </el-col>
+      <el-col :span="24" class="foot">
+        <div class="w_1200">
+          <foot :info="info"></foot>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from '@/layout/index/top.vue';
+import logo from '@/layout/index/logo.vue';
+import menuInfo from '@/layout/index/menuInfo.vue';
+import foot from '@/layout/index/foot.vue';
+import fenlei from '@/layout/policy/fenlei.vue';
+import listcontext from '@/layout/supermarket/listcontext.vue';
+import detali from '@/layout/supermarket/detali.vue';
+export default {
+  name: 'policy',
+  props: {
+    info: null, //站点信息
+    columnName: null, //栏目标题
+    contentList: null, //内容
+    total: null,
+    display: { type: String, default: 'list' },
+    policyInfo: null,
+  },
+  components: {
+    top, //头部
+    logo, //logo
+    menuInfo, //导航
+    foot, //底部
+    listcontext, //右边栏
+    detali,
+  },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    clickList({ id }) {
+      console.log(id);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.top {
+  height: 40px;
+  overflow: hidden;
+  background-color: rgba(11, 58, 125, 0.8);
+}
+.logo {
+  height: 200px;
+  overflow: hidden;
+}
+.menu {
+  height: 70px;
+  overflow: hidden;
+}
+
+.main {
+  min-height: 600px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+.main .fenlei {
+  float: left;
+  width: 240px;
+  min-height: 600px;
+  margin: 0 10px 0 0;
+  overflow: hidden;
+  background-color: #ffffff;
+}
+.main .rightcont {
+  float: left;
+  width: 1200px;
+  min-height: 600px;
+  overflow: hidden;
+  background-color: #fff;
+}
+
+.main .link {
+  float: left;
+  width: 100%;
+  height: 100px;
+  overflow: hidden;
+  background-color: #fff;
+}
+.foot {
+  float: left;
+  width: 100%;
+  height: 120px;
+  overflow: hidden;
+}
+</style>

+ 85 - 20
src/layout/enterprise/contextfabuxx.vue

@@ -17,7 +17,9 @@
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
                         <el-col :span="6" class="fimage">
-                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
+                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
+                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                          </el-col>
                         </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.name }}</p>
@@ -45,14 +47,16 @@
                       @size-change="handleSizeChange"
                       @current-change="handleCurrentChange"
                       :current-page="currentPage"
+                      background
                       layout="total,  prev, pager, next, jumper"
                       :total="total"
+                      :page-size="pageSize"
                     >
                     </el-pagination>
                   </el-col>
                 </el-tab-pane>
                 <el-tab-pane label="审核中信息" name="second">
-                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
+                  <el-col :span="24" v-for="(item, index) in shenheList" :key="index">
                     <el-col class="xqborder">
                       <el-col :span="24" class="fbListTop">
                         <el-col :span="20"> {{ item.name }} </el-col>
@@ -62,7 +66,9 @@
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
                         <el-col :span="6" class="fimage">
-                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
+                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
+                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                          </el-col>
                         </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.name }}</p>
@@ -88,13 +94,13 @@
                       @current-change="handleCurrentChange"
                       :current-page="currentPage"
                       layout="total,  prev, pager, next, jumper"
-                      :total="total"
+                      :total="tatalstatus1"
                     >
                     </el-pagination>
                   </el-col>
                 </el-tab-pane>
-                <el-tab-pane label="交易成功信息" name="thirth">
-                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
+                <el-tab-pane label="交易" name="thirth">
+                  <el-col :span="24" v-for="(item, index) in successlist" :key="index">
                     <el-col class="xqborder">
                       <el-col :span="24" class="fbListTop">
                         <el-col :span="20"> {{ item.name }} </el-col>
@@ -104,7 +110,9 @@
                       </el-col>
                       <el-col :span="24" class="fbListCenter">
                         <el-col :span="6" class="fimage">
-                          <el-image style="width:100px;height:100px" :src="item.image.url"></el-image>
+                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
+                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                          </el-col>
                         </el-col>
                         <el-col :span="6" class="fbListCenterC">
                           <p class="textOver">产品:{{ item.name }}</p>
@@ -128,7 +136,50 @@
                       @current-change="handleCurrentChange"
                       :current-page="currentPage"
                       layout="total,  prev, pager, next, jumper"
-                      :total="total"
+                      :total="tatalstatus2"
+                    >
+                    </el-pagination>
+                  </el-col>
+                </el-tab-pane>
+
+                <el-tab-pane label="交易完成" name="thirth">
+                  <el-col :span="24" v-for="(item, index) in successlist" :key="index">
+                    <el-col class="xqborder">
+                      <el-col :span="24" class="fbListTop">
+                        <el-col :span="20"> {{ item.name }} </el-col>
+                        <el-col :span="4">
+                          {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
+                        </el-col>
+                      </el-col>
+                      <el-col :span="24" class="fbListCenter">
+                        <el-col :span="6" class="fimage">
+                          <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
+                            <el-image style="width:100px;height:100px" :src="acm.url"></el-image>
+                          </el-col>
+                        </el-col>
+                        <el-col :span="6" class="fbListCenterC">
+                          <p class="textOver">产品:{{ item.name }}</p>
+                          <p>类别:{{ item.totaltype === '0' ? '技术' : item.totaltype === '1' ? '产品' : item.totaltype === '2' ? '服务' : 'underdind' }}</p>
+                          <p class="listMoney">{{ item.price }}/{{ item.priceunit }}</p>
+                        </el-col>
+                        <el-col :span="6" class="fbListCenterTwo">
+                          <el-col :span="24">最新申请:</el-col>
+                        </el-col>
+                        <el-col :span="6" class="fbListCenterR">
+                          <el-col :span="24" class="bainji">
+                            <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
+                          </el-col>
+                        </el-col>
+                      </el-col>
+                    </el-col>
+                  </el-col>
+                  <el-col class="page" :span="24">
+                    <el-pagination
+                      @size-change="handleSizeChange"
+                      @current-change="handleCurrentChange"
+                      :current-page="currentPage"
+                      layout="total,  prev, pager, next, jumper"
+                      :total="tatalstatus2"
                     >
                     </el-pagination>
                   </el-col>
@@ -136,11 +187,11 @@
               </el-tabs>
             </el-row>
           </el-tab-pane>
-          <el-tab-pane label="我的供给" name="second">
+          <!-- <el-tab-pane label="我的供给" name="second">
             <el-row style="padding: 0 20px;">
               <el-tabs v-model="activeNameFirst" @tab-click="handleClickFirst">
                 <el-tab-pane label="已经审核信息" name="first">
-                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
+                  <el-col :span="24" v-for="(item, index) in gonggeiData" :key="index">
                     <el-col class="xqborder">
                       <el-col :span="24" class="fbListTop">
                         <el-col :span="20"> {{ item.name }} </el-col>
@@ -165,9 +216,9 @@
                             <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })">编辑</el-link
                             ><br />
                             <el-link :underline="false" @click="handleDelete(item)">彻底删除</el-link>
-                            <!-- <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })"
+                             <el-link :underline="false" @click="$router.push({ path: '/enterprise/enterprisexuqiu', query: { id: item.id } })"
                               >查看申请</el-link
-                            > -->
+                            > 
                           </el-col>
                         </el-col>
                       </el-col>
@@ -185,7 +236,7 @@
                   </el-col>
                 </el-tab-pane>
                 <el-tab-pane label="审核中信息" name="second">
-                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
+                  <el-col :span="24" v-for="(item, index) in gonggeiData" :key="index">
                     <el-col class="xqborder">
                       <el-col :span="24" class="fbListTop">
                         <el-col :span="20"> {{ item.name }} </el-col>
@@ -229,7 +280,7 @@
                   </el-col>
                 </el-tab-pane>
                 <el-tab-pane label="交易成功信息" name="thirth">
-                  <el-col :span="24" v-for="(item, index) in recruitData" :key="index">
+                  <el-col :span="24" v-for="(item, index) in gonggeiData" :key="index">
                     <el-col class="xqborder">
                       <el-col :span="24" class="fbListTop">
                         <el-col :span="20"> {{ item.name }} </el-col>
@@ -271,7 +322,7 @@
                 </el-tab-pane>
               </el-tabs>
             </el-row>
-          </el-tab-pane>
+        </el-tab-pane> -->
         </el-tabs>
         <el-link :underline="false" class="fabuBtn" @click="messFabu()">信息发布</el-link>
       </el-col>
@@ -286,12 +337,18 @@ export default {
     recruitData: null,
     columnName: null,
     total: null,
+    successlist: null,
+    shenheList: null,
+    tatalstatus2: null,
+    tatalstatus1: null,
+    // gonggeiData: null,
   },
   components: {},
   data: () => ({
-    currentPage: 1,
+    currentPage: 0,
     activeName: 'first',
     activeNameFirst: 'first',
+    pageSize: 3,
   }),
   created() {},
   computed: {},
@@ -308,11 +365,19 @@ export default {
     handleClickFirst(tab, event) {
       console.log(tab, event);
     },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`);
+    // handleSizeChange(val) {
+    //   console.log(`每页 ${val} 条`);
+    // },
+    // handleCurrentChange(val) {
+    //   console.log(`当前页: ${val}`);
+    // },
+
+    handleSizeChange(pageSize) {
+      // this.$emit('handleSizeChange', pageSize);
     },
-    handleCurrentChange(val) {
-      console.log(`当前页: ${val}`);
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
     },
   },
 };

+ 105 - 0
src/layout/supermarket/detali.vue

@@ -0,0 +1,105 @@
+<template>
+  <div id="policyrightcont">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="infoMess">
+          <el-col :span="24" class="info"> 名称{{ policyInfo.name }} </el-col>
+          <el-col :span="24" class="info">
+            总分类:{{ policyInfo.totaltype === '0' ? '技术' : policyInfo.totaltype === '1' ? '产品' : policyInfo.totaltype === '2' ? '服务' : 'underdind' }}
+          </el-col>
+          <el-col :span="24" class="info"> 类型名称:{{ policyInfo.product_type_name }} </el-col>
+          <el-col :span="24" class="info"> 单价{{ policyInfo.price }} </el-col>
+          <el-col :span="24" class="info"> 单位 {{ policyInfo.priceunit }} </el-col>
+          <el-col :span="24" class="infos" v-for="(acm, index) in policyInfo.image" :key="index">
+            <span> 产品图片:</span><span><el-image style="width:100px;height:100px" :src="acm.url"></el-image></span>
+          </el-col>
+
+          <el-col :span="24" class="info"> 产品参数:{{ policyInfo.product_args }} </el-col>
+          <el-col :span="24" class="info">
+            交易方式:{{ policyInfo.business === '0' ? '公用' : policyInfo.business === '1' ? '转让' : policyInfo.business === '2' ? '竞价' : 'underdind' }}
+          </el-col>
+          <el-col :span="24" class="info"> 研发阶段:{{ policyInfo.phase === '0' ? '阶段成果' : policyInfo.phase === '1' ? '最终成果' : 'underdind' }} </el-col>
+          <el-col :span="24" class="info"> 应用领域:{{ policyInfo.field }} </el-col>
+          <el-col :span="24" class="info"> 市场前景:{{ policyInfo.prospect }} </el-col>
+          <el-col :span="24" class="info"> 电子合同:{{ policyInfo.contract }} </el-col>
+          <el-col :span="24" class="info">
+            供/需{{ policyInfo.business === '0' ? '公用' : policyInfo.business === '1' ? '供' : policyInfo.business === '2' ? '需' : 'underdind' }}
+          </el-col>
+          <el-col :span="24" class="info"> 服务范围:{{ policyInfo.scope }} </el-col>
+          <el-col :span="24" class="info"> 描述{{ policyInfo.description }} </el-col>
+          <el-col :span="24" class="info"> 知识产权:{{ policyInfo.property }} </el-col>
+          <el-col :span="24" class="info">
+            状态:{{ policyInfo.status === '0' ? '待审核' : policyInfo.status === '1' ? '通过审核' : policyInfo.status === '2' ? '审核拒绝' : 'underdind' }}
+          </el-col>
+          <el-col :span="24" class="info"> 是否删除:{{ policyInfo.is_del === '0' ? '否' : policyInfo.is_del === '1' ? '是' : 'underdind' }} </el-col>
+          <el-col :span="24" class="info"> 联系人:{{ policyInfo.contact_user }} </el-col>
+          <el-col :span="24" class="info"> 联系电话:{{ policyInfo.contact_tel }} </el-col>
+          <el-col :span="24" class="info"> 简介:{{ policyInfo.introduction }} </el-col>
+        </el-col>
+        <el-col :span="24" class="topInfo"> </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'policyrightcont',
+  props: {
+    policyInfo: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.info {
+  padding: 10px 0 10px 20px;
+}
+.infos {
+  height: 120px;
+  
+}
+.topInfo {
+  height: 60px;
+  line-height: 60px;
+  font-size: 22px;
+}
+.infoMess .title {
+  line-height: 30px;
+  text-align: center;
+  font-size: 16px;
+  font-weight: bold;
+  color: #000000;
+  margin: 0 0 20px 0;
+}
+.infoDate {
+  height: 36px;
+  line-height: 36px;
+}
+.infoDate p {
+  width: 700px;
+  background: #eeeeee;
+  margin: 0 105px;
+}
+.infoDate p span {
+  font-size: 14px;
+  color: #000;
+  padding: 0 0 0 80px;
+}
+.infoMess .image {
+  text-align: center;
+  margin: 20px 0 0 0;
+}
+.content {
+  padding: 0px 0 20px 0;
+}
+</style>

+ 113 - 0
src/layout/supermarket/listcontext.vue

@@ -0,0 +1,113 @@
+<template>
+  <div id="rightcont">
+    <el-col class="zhengce">
+      <el-col :span="24" class="topTitle">
+        {{ columnName }}
+      </el-col>
+      <el-col :span="24" class="info">
+        <ul>
+          <li v-for="(item, index) in contentList" :key="index" @click="$emit('fetch', item.id)">
+            <el-col :span="21" class="title textOver">{{ item.name }}</el-col>
+            <el-col :span="3" class="date">
+              {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
+            </el-col>
+          </li>
+        </ul>
+        <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-col>
+    </el-col>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'rightcont',
+  props: {
+    columnName: null,
+    contentList: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 0,
+    pageSize: 10,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    handleSizeChange(pageSize) {
+      // this.$emit('handleSizeChange', pageSize);
+    },
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+ul {
+  margin: 0;
+}
+li {
+  padding: 0;
+  margin: 0;
+  color: #a8abb7;
+}
+.zhengce {
+  height: 660px;
+  padding: 20px;
+  overflow: hidden;
+}
+.topTitle {
+  font-size: 22px;
+  color: #22529a;
+  margin: 0 0 20px 0;
+}
+.info {
+  height: 570px;
+  overflow: hidden;
+}
+.info ul {
+  height: 510px;
+  overflow: hidden;
+  padding: 0 0 0 20px;
+}
+.info ul li {
+  float: left;
+  width: 100%;
+  padding: 0 0 13px 0;
+}
+.info ul li .title {
+  font-size: 16px;
+  color: #60636d;
+}
+.info ul li .date {
+  font-size: 16px;
+  color: #a8abb7;
+  text-align: right;
+}
+.info ul li:hover {
+  cursor: pointer;
+}
+.info ul li:hover .title {
+  color: #22529a;
+}
+.info ul li:hover .date {
+  color: #22529a;
+}
+.page {
+  padding: 11px 0;
+  text-align: center;
+}
+</style>

+ 23 - 8
src/layout/supermarket/rightcont.vue

@@ -17,8 +17,8 @@
       </el-col>
     </el-col>
     <el-col :span="24" class="info">
-      <el-tabs type="border-card">
-        <el-tab-pane>
+      <el-tabs type="border-card" @tab-click="handleClick(activeName)" v-model="activeName">
+        <el-tab-pane name="1">
           <span slot="label">技术供求</span>
           <el-col :span="12" class="jishuList" v-for="(item, index) in jishuList" :key="index">
             <el-link :underline="false">
@@ -35,7 +35,7 @@
             </el-link>
           </el-col>
         </el-tab-pane>
-        <el-tab-pane>
+        <el-tab-pane name="2">
           <span slot="label">产品供求</span>
           <el-col :span="6" class="chanpinList" v-for="(item, index) in chanpinList" :key="index">
             <el-link :underline="false">
@@ -52,7 +52,7 @@
             </el-link>
           </el-col>
         </el-tab-pane>
-        <el-tab-pane>
+        <el-tab-pane name="3">
           <span slot="label">服务供求</span>
           <el-col :span="24" class="serviceList" v-for="(item, index) in serviceList" :key="index">
             <el-col :span="10" class="title">
@@ -65,13 +65,15 @@
             </el-col>
           </el-col>
         </el-tab-pane>
-        <el-tab-pane>
+        <el-tab-pane name="4">
           <span slot="label" @click="clickPerson()">人才供求</span>
         </el-tab-pane>
       </el-tabs>
-      <el-link class="more" :underline="false">
-        <el-image :src="more"></el-image>
-      </el-link>
+      <el-button class="more" type="text" @click="clickmore"><el-image :src="more"></el-image></el-button>
+      <!-- 
+      <el-link class="more" span="24" href="/personnel/personnel?totaltype=0" v-if="this.activeName == '1'"> <el-image :src="more"></el-image> </el-link>
+      <el-link class="more" span="24" href="/personnel/personnel?totaltype=1" v-else-if="this.activeName == '2'"> <el-image :src="more"></el-image> </el-link>
+      <el-link class="more" span="24" href="/personnel/personnel?totaltype=2" v-else-if="this.activeName == '3'"> <el-image :src="more"></el-image> </el-link> -->
     </el-col>
   </div>
 </template>
@@ -87,11 +89,15 @@ export default {
   data: () => ({
     input: '',
     inputs: '',
+    activeName: '1',
     more: require('@/assets/更多.png'),
   }),
   created() {},
   computed: {},
   methods: {
+    handleClick(activeName) {
+      console.log(activeName);
+    },
     handleOpen(key, keyPath) {
       console.log(key, keyPath);
     },
@@ -101,6 +107,15 @@ export default {
     clickPerson() {
       this.$router.push({ path: '/personnel/personnel' });
     },
+    clickmore() {
+      if (this.activeName == 1) {
+        this.$router.push({ path: '/supermaket/supermarketlist', query: { totaltype: '0' } });
+      } else if (this.activeName == 2) {
+        this.$router.push({ path: '/supermaket/supermarketlist', query: { totaltype: '1' } });
+      } else if (this.activeName == 3) {
+        this.$router.push({ path: '/supermaket/supermarketlist', query: { totaltype: '2' } });
+      }
+    },
   },
 };
 </script>

+ 7 - 0
src/router/index.js

@@ -47,6 +47,13 @@ const routes = [
     name: 'supermarket',
     component: () => import('../views/supermaket/supermarket.vue'),
   },
+
+  // 科技超市产品列表
+  {
+    path: '/supermaket/supermarketlist',
+    name: 'supermarketlist',
+    component: () => import('../views/supermaket/supermarketlist.vue'),
+  },
   // 科技超市-高校院所
   {
     path: '/supermaket/supermarketColleges',

+ 7 - 7
src/store/markettype.js

@@ -3,30 +3,30 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  columnInfo: `/api/market/protype`,
+  interface: `/api/setting/codeitem`,
 };
 const state = () => ({});
 const mutations = {};
 
 const actions = {
   async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.columnInfo}`, { skip, limit, ...info });
+    const res = await this.$axios.$get(api.interface, { skip, limit, ...info });
     return res;
   },
   async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.columnInfo}`, payload);
+    const res = await this.$axios.$post(`${api.interface}`, payload);
     return res;
   },
   async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.columnInfo}/${payload}`);
+    const res = await this.$axios.$get(`${api.interface}/${payload}`);
     return res;
   },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.columnInfo}/update/${id}`, data);
+  async update({ commit }, { id, ...info } = {}) {
+    const res = await this.$axios.$post(`${api.interface}/${id}`, { ...info });
     return res;
   },
   async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.columnInfo}/${payload}`);
+    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
     return res;
   },
 };

+ 43 - 10
src/views/enterprise/enterprisefabu.vue

@@ -6,7 +6,12 @@
       :recruitData="recruitData"
       @delete="deleteData"
       @onsave="onsaveClick"
+      :successlist="successlist"
+      :shenheList="shenheList"
       :total="total"
+      :tatalstatus1="tatalstatus1"
+      :tatalstatus2="tatalstatus2"
+      @handleCurrentChange="handleCurrentChange"
     ></enterprisefabu-detail>
   </div>
 </template>
@@ -24,14 +29,22 @@ export default {
     enterprisefabuDetail,
   },
   data: () => ({
+    shenheList: [],
+    successlist: [],
     info: {},
     liebiaoList: [{ name: '基本信息' }, { name: '消息管理' }, { name: '我的发布' }, { name: '我的订购' }, { name: '注销账号' }],
     recruitData: [],
+    gonggeiData: [],
     total: 1,
+    tatalstatus1: 1,
+    tatalstatus2: 1,
+    skip: '',
   }),
   created() {
     this.searchSite();
     this.searchInfo();
+    this.searchstatus1();
+    this.searchstaus2();
   },
   computed: {},
   methods: {
@@ -50,21 +63,41 @@ export default {
     },
     // 查询列表
     async searchInfo({ skip = 0, limit = 3, ...info } = {}) {
-      const res = await this.productList({ skip, limit, ...info });
+      let status = 1;
+      skip = this.skip;
+
+      const res = await this.productList({ skip, limit, status, ...info });
+      console.log(res);
       if (this.$checkRes(res)) {
-        // for (const val of res.data) {
-        //   if (val.gxtype == 0) {
-        //     this.$set(this, `recruitData`, res.data);
-        //     this.$set(this, `total`, res.total);
-        //   } else {
-        //     console.log(res.data);
-        //     console.log('供给');
-        //   }
-        // }
         this.$set(this, `recruitData`, res.data);
         this.$set(this, `total`, res.total);
       }
     },
+    async searchstatus1({ skip = 0, limit = 3, ...info } = {}) {
+      let status = 0;
+      console.log();
+      const res = await this.productList({ skip, limit, status, ...info });
+      console.log(res);
+      if (this.$checkRes(res)) {
+        this.$set(this, `shenheList`, res.data);
+        this.$set(this, `tatalstatus1`, res.total);
+      }
+    },
+    async searchstaus2({ skip = 0, limit = 3, ...info } = {}) {
+      let status = 2;
+      console.log();
+      const res = await this.productList({ skip, limit, status, ...info });
+      console.log(res);
+      if (this.$checkRes(res)) {
+        this.$set(this, `successlist`, res.data);
+        this.$set(this, `tatalstatus2`, res.total);
+      }
+    },
+    //分页
+    async handleCurrentChange({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.searchInfo();
+    },
     // 删除信息
     async deleteData({ item }) {
       const res = await this.productdeltet(item.id);

+ 5 - 2
src/views/enterprise/enterprisexuqiu.vue

@@ -74,6 +74,9 @@ export default {
     async demandSubmit(demandForm) {
       let data = this.demandForm;
       console.log(data);
+      data.userid = '1234556677';
+      console.log(data);
+
       let res;
       let msg;
       if (data.id) {
@@ -86,8 +89,8 @@ export default {
       if (this.$checkRes(res, msg)) this.$router.push({ path: '/enterprise/enterprisefabu' });
     },
     // 查询类型
-    async maarkettype({ ...info } = {}) {
-      const res = await this.markettypeList({ ...info });
+    async maarkettype({ category = 123, ...info } = {}) {
+      const res = await this.markettypeList({ category, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `columnList`, res.data);
       }

+ 91 - 0
src/views/supermaket/supermarketlist.vue

@@ -0,0 +1,91 @@
+<template>
+  <div id="policy">
+    <supermarketlist-detail
+      :info="info"
+      @handleCurrentChange="handleCurrentChange"
+      :contentList="contentList"
+      :total="total"
+      :columnName="columnName"
+      @fetch="fetchInfo"
+      :display="display"
+      :policyInfo="policyInfo"
+    ></supermarketlist-detail>
+  </div>
+</template>
+
+<script>
+import supermarketlistDetail from '@/components/supermaket/supermarketlistDetail.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+import _ from 'loadsh';
+const { mapActions: mapSite } = createNamespacedHelpers('site');
+const { mapActions: mapEnterpriseproject } = createNamespacedHelpers('enterpriseproject');
+export default {
+  name: 'policy',
+  props: {},
+  components: {
+    supermarketlistDetail,
+  },
+  data: () => ({
+    info: {},
+    policyInfo: {},
+    display: 'list',
+    columnName: '',
+    contentList: [],
+    total: 1,
+    skip: '',
+  }),
+  async created() {
+    this.searchSite();
+    this.search();
+  },
+  computed: {
+    totaltype() {
+      return this.$route.query.totaltype;
+    },
+  },
+  methods: {
+    ...mapSite(['showInfo']),
+    ...mapEnterpriseproject({ list: 'query', fetch: 'fetch' }),
+    // 查询站点信息
+    async searchSite() {
+      let res = await this.showInfo();
+      let object = JSON.parse(JSON.stringify(res.data));
+      if (object) {
+        this.$set(this, `info`, res.data);
+      } else {
+        this.$message.error(res.errmsg ? res.errmsg : 'error');
+      }
+    },
+    async search({ skip = 0, limit = 10 } = {}) {
+      let totaltype = this.totaltype;
+      skip = this.skip;
+      const res = await this.list({ skip, limit, totaltype });
+      console.log(res.data);
+      console.log(res.data);
+      for (const val of res.data) {
+        if (val.totaltype == 0) {
+          this.$set(this, `columnName`, '技术供求');
+        } else if (val.totaltype == 1) {
+          this.$set(this, `columnName`, '产品供求');
+        } else if (val.totaltype == 2) {
+          this.$set(this, `columnName`, '服务供求');
+        }
+      }
+      this.$set(this, `contentList`, res.data);
+      this.$set(this, `total`, res.total);
+    },
+
+    async fetchInfo(id) {
+      this.display = 'detail';
+      const res = await this.fetch(id);
+      this.$set(this, `policyInfo`, res.data);
+    },
+    async handleCurrentChange({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 3 - 3
vue.config.js

@@ -23,10 +23,10 @@ module.exports = {
         ws: true,
       },
       '/files': {
-        target: 'http://smart.cc-lotus.info',
+        target: 'http://free.liaoningdoupo.com',
       },
       '/api/setting': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://10.16.10.72:9000',
         changeOrigin: true,
         ws: true,
       },
@@ -58,7 +58,7 @@ module.exports = {
         // pathRewrite: { '^/api/affairs': '/api' },
       },
       '/api/market': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://10.16.10.72:9004',
         changeOrigin: true,
         ws: true,
         // pathRewrite: { '^/api/affairs': '/api' },