浏览代码

Merge branch 'master' of http://git.cc-lotus.info/service-platform/mobile-official into master

wxy 4 年之前
父节点
当前提交
7513b6a97a

+ 0 - 135
src/layout/myProduct/prodDetails.vue

@@ -1,135 +0,0 @@
-<template>
-  <div id="prodDetails">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="top">
-          <el-carousel trigger="click" class="carousel">
-            <template v-if="productInfo.image && productInfo.image.length > 0">
-              <el-carousel-item v-for="(item, index) in productInfo.image" :key="index">
-                <el-image :src="item.url" style="width:100%"> </el-image>
-              </el-carousel-item>
-            </template>
-          </el-carousel>
-          <p class="textOver">{{ productInfo.name }}</p>
-        </el-col>
-        <el-col :span="24" class="message">
-          <p>
-            <span>产品类型</span>
-            <span>{{ productInfo.totaltype === '0' ? '技术' : productInfo.totaltype === '1' ? '产品' : productInfo.totaltype === '2' ? '服务' : '暂无' }}</span>
-          </p>
-          <p>
-            <span>类型</span>
-            <span>{{ productInfo.product_type_name || '暂无' }}</span>
-          </p>
-          <p>
-            <span>研发阶段</span>
-            <span>{{ productInfo.phase == 1 ? '阶段成果' : productInfo.phase == 2 ? '最终成果' : '暂无' }}</span>
-          </p>
-          <p>
-            <span>交易方式</span>
-            <span>{{ productInfo.business === '0' ? '公用' : productInfo.business === '1' ? '转让' : productInfo.business === '2' ? '竞价' : '暂无' }}</span>
-          </p>
-          <p>
-            <span>应用领域</span>
-            <span>{{ productInfo.field || '暂无' }}</span>
-          </p>
-          <p>
-            <span>服务范围</span>
-            <span>{{ productInfo.scope || '暂无' }}</span>
-          </p>
-          <p>
-            <span>产品单价</span>
-            <span>{{ productInfo.price }}/{{ productInfo.priceunit }}</span>
-          </p>
-          <p>
-            <span>联系人</span>
-            <span>{{ productInfo.contact_user }}</span>
-          </p>
-          <p>
-            <span>联系电话</span>
-            <span>{{ productInfo.contact_tel }}</span>
-          </p>
-          <div class="introduction">
-            <p>产品简介</p>
-            <p>{{ productInfo.introduction }}</p>
-          </div>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'prodDetails',
-  props: {
-    productInfo: null,
-  },
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  .top {
-    background: #fff;
-    min-height: 250px;
-    padding: 0 15px;
-    margin: 0 0 10px 0;
-    .carousel {
-      height: 200px !important;
-      padding: 10px 0;
-    }
-    .el-image {
-      width: 100%;
-      height: 200px;
-    }
-    p {
-      font-size: 18px;
-      color: #000;
-      padding: 0 0 10px 0;
-    }
-  }
-  .message {
-    background: #fff;
-    padding: 0 15px;
-    min-height: 50px;
-    p {
-      min-height: 50px;
-      line-height: 50px;
-      border-bottom: 1px solid #ccc;
-    }
-    span:first-child {
-      display: inline-block;
-      width: 80px;
-      color: #ccc;
-    }
-    span:last-child {
-      color: #000;
-    }
-    div {
-      p {
-        border-bottom: none;
-      }
-    }
-  }
-}
-/deep/.el-carousel__container {
-  height: 200px !important;
-}
-</style>

+ 0 - 90
src/layout/transaction/detaliinfo.vue

@@ -1,90 +0,0 @@
-<template>
-  <div id="person">
-    <el-col :span="24" class="info">
-      <van-form @submit="onSubmit">
-        <van-field
-          v-model="form.product_name"
-          name="产品名称"
-          label="产品名称"
-          placeholder="请输入产品名称"
-          disabled
-          :rules="[{ required: true, message: '请输入产品名称' }]"
-        />
-
-        <van-field
-          v-model="form.market_username"
-          name="营销人名称"
-          label="营销人名称"
-          placeholder="请输入营销人名称"
-          disabled
-          :rules="[{ required: true, message: '请输入营销人名称' }]"
-        />
-
-        <van-field
-          v-model="form.username"
-          name="购买人名称"
-          label="购买人名称"
-          placeholder="请输入购买人名称"
-          disabled
-          :rules="[{ required: true, message: '请输入购买人名称' }]"
-        />
-      </van-form>
-
-      <van-field
-        type="textarea"
-        v-model="form.description"
-        name="描述"
-        label="描述"
-        placeholder="请输入描述"
-        :rules="[{ required: true, message: '请输入描述' }]"
-      />
-      <van-field name="radio" label="审核">
-        <template #input>
-          <van-radio-group v-model="form.status" direction="horizontal">
-            <van-radio name="0">待确定</van-radio>
-            <van-radio name="1">交易确定</van-radio>
-          </van-radio-group>
-        </template>
-      </van-field>
-
-      <div style="margin: 16px;">
-        <van-button round block type="info" native-type="submit" @click="onSubmit">
-          保存
-        </van-button>
-      </div>
-    </el-col>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'person',
-  props: {
-    form: null,
-  },
-  components: {},
-  data: () => ({
-    // 出生日期
-  }),
-  created() {},
-  computed: {
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  methods: {
-    // 出生日期
-
-    onSubmit() {
-      this.$emit('onSubmit', { data: this.form });
-    },
-    // 图片上传
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  margin: 0 0 50px 0;
-}
-</style>

+ 3 - 3
src/router/index.js

@@ -80,10 +80,10 @@ const routes = [
   },
   //发布产品
   {
-    path: '/userCenter/myProduct/fabu',
+    path: '/userCenter/myProduct/detail',
     name: 'myProduct_index',
-    meta: { title: '信息发布', isleftarrow: true },
-    component: () => import('../views/userCenter/myProduct/fabu.vue'),
+    meta: { title: '信息管理', isleftarrow: true },
+    component: () => import('../views/userCenter/myProduct/detail.vue'),
   },
   // 用户-事项管理
   {

+ 154 - 86
src/views/userCenter/myProduct/detail.vue

@@ -6,7 +6,38 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <release :form="form" @onSubmitDraft="onSubmitDraft" @onSubmit="onSubmit"></release>
+          <van-tabs v-model="active" @click="clickbtn">
+            <van-tab title="科技需求">
+              <producInfo
+                :type="type"
+                :form="form"
+                @onSubmit="onSubmit"
+                :fieldList="fieldList"
+                :achievestatusList="achievestatusList"
+                :cooperationList="cooperationList"
+              ></producInfo>
+            </van-tab>
+            <van-tab title="技术成果">
+              <producInfo
+                :type="type"
+                :form="form"
+                @onSubmit="onSubmit"
+                :fieldList="fieldList"
+                :achievestatusList="achievestatusList"
+                :cooperationList="cooperationList"
+              ></producInfo>
+            </van-tab>
+            <van-tab title="商务服务">
+              <producInfo
+                :type="type"
+                :form="form"
+                @onSubmit="onSubmit"
+                :fieldList="fieldList"
+                :achievestatusList="achievestatusList"
+                :cooperationList="cooperationList"
+              ></producInfo>
+            </van-tab>
+          </van-tabs>
         </el-col>
       </el-col>
     </el-row>
@@ -14,109 +45,152 @@
 </template>
 
 <script>
+import producInfo from './parts/producInfo.vue';
 import NavBar from '@/layout/common/topInfo.vue';
-import release from '@/layout/myProduct/release.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: mapMarketproduct } = createNamespacedHelpers('marketproduct');
+const { mapActions: markettype } = createNamespacedHelpers('markettype');
+const { mapActions: marketuser } = createNamespacedHelpers('marketuser');
+const { mapActions: exportuser } = createNamespacedHelpers('exportuser');
+const { mapActions: product } = createNamespacedHelpers('product');
 export default {
   name: 'detail',
   props: {},
   components: {
     NavBar,
-    release, //产品发布
+    producInfo,
   },
-  data: () => ({
-    // 头部标题
-    title: '',
-    // meta为true
-    isleftarrow: '',
-    // 返回
-    navShow: true,
-    // 发布产品
-    form: {},
-  }),
-  created() {
-    this.searchInfo();
+  data: function() {
+    return {
+      // 头部标题
+      title: '',
+      // meta为true
+      isleftarrow: '',
+      // 返回
+      navShow: true,
+      active: 0,
+      type: '0',
+      form: {},
+      // 字典表
+      fieldList: [],
+      achievestatusList: [],
+      cooperationList: [],
+    };
   },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
+  async created() {
+    await this.searchtype();
+    await this.searchinfo();
+    if (this.id) {
+      await this.searchproductinfo();
+    }
   },
   methods: {
-    ...mapMarketproduct({ productFetch: 'fetch', productCreate: 'create', productUpdate: 'update' }),
-    // 详情
-    async searchInfo() {
-      if (this.id) {
-        let res = await this.productFetch(this.id);
-        if (this.$checkRes(res)) {
-          this.$set(this, `form`, res.data);
-        }
-      }
-    },
-    // 保存草稿
-    async onSubmitDraft({ data }) {
-      if (this.id) {
-        let res = await this.productUpdate(data);
-        if (this.$checkRes(res)) {
-          this.$message({
-            message: '草稿修改成功',
-            type: 'success',
-          });
-          this.$router.push({ path: '/userCenter/myProduct/index' });
-        } else {
-          this.$message.error('草稿修改失败');
+    ...markettype({ markettypeList: 'query' }),
+    ...marketuser({ marketuserfetch: 'fetch' }),
+    ...exportuser({ exportuserfetch: 'fetch' }),
+    ...product({ productFetch: 'fetch', productCreate: 'create', productUpdate: 'update' }),
+    // 查询企业详情
+    async searchinfo() {
+      let user = this.user;
+      if (user.role == '4' || user.role == '5') {
+        let res = await this.marketuserfetch(user.userid);
+        if (res.errcode === 0) {
+          let message = {
+            company: res.data.name,
+            phone: res.data.phone,
+            email: res.data.email,
+            companytype: res.data.companytype,
+            companydate: res.data.companydate,
+            companycapital: res.data.companycapital,
+          };
+          this.$set(this, `form`, message);
         }
       } else {
-        data.status = '3';
-        data.userid = this.user.uid;
-        let res = await this.productCreate(data);
-        if (this.$checkRes(res)) {
-          this.$message({
-            message: '草稿创建成功',
-            type: 'success',
-          });
-          this.$router.push({ path: '/userCenter/myProduct/index' });
-        } else {
-          this.$message.error('草稿创建失败');
+        let res = await this.exportuserfetch(user.userid);
+        if (res.errcode === 0) {
+          let message = {
+            company: res.data.name,
+            phone: res.data.phone,
+            email: res.data.email,
+            qqwx: res.data.qqwx,
+          };
+          this.$set(this, `form`, message);
         }
       }
     },
-    // 信息发布
+    // 查询产品详情
+    async searchproductinfo() {
+      let res = await this.productFetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+      }
+    },
+    // 查询字典表
+    async searchtype() {
+      // 所属领域;
+      let res = await this.markettypeList({ category: '01' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `fieldList`, res.data);
+      }
+      // 成果状态;
+      res = await this.markettypeList({ category: '02' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `achievestatusList`, res.data);
+      }
+      // 合作方式;
+      res = await this.markettypeList({ category: '03' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `cooperationList`, res.data);
+      }
+    },
+    // 选择类型
+    clickbtn(name) {
+      this.$set(this, `type`, String(name));
+    },
+    // 提交
     async onSubmit({ data }) {
-      if (this.id) {
-        data.status = '0';
-        let res = await this.productUpdate(data);
-        if (this.$checkRes(res)) {
-          this.$message({
-            message: '信息发布成功',
-            type: 'success',
-          });
-          this.$router.push({ path: '/userCenter/myProduct/index' });
-        } else {
-          this.$message.error('信息发布失败');
-        }
-      } else {
-        data.status = '0';
-        data.userid = this.user.uid;
-        let res = await this.productCreate(data);
-        if (this.$checkRes(res)) {
-          this.$message({
-            message: '信息发布成功',
-            type: 'success',
-          });
-          this.$router.push({ path: '/userCenter/myProduct/index' });
-        } else {
-          this.$message.error('信息发布失败');
-        }
+      data.type = this.type;
+      data.userid = this.user.uid;
+      let res = await this.productCreate(data);
+      if (this.$checkRes(res)) {
+        this.$notify({
+          message: '保存草稿成功',
+          type: 'success',
+        });
+        this.$router.push({ path: '/userCenter/myProduct/index' });
       }
     },
+    // 监听显示类型
+    changetype() {
+      let type = this.producttype;
+      this.$set(this, `active`, Number(type));
+      this.$set(this, `type`, type);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+    producttype() {
+      return this.$route.query.type;
+    },
+  },
+  watch: {
+    producttype: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        this.changetype();
+      },
+    },
   },
   mounted() {
     this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;
   },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
 };
 </script>
 
@@ -130,14 +204,8 @@ export default {
 .top {
   height: 46px;
   overflow: hidden;
-  position: relative;
-  z-index: 999;
 }
 .main {
   min-height: 570px;
 }
-.foot {
-  position: absolute;
-  bottom: 0;
-}
 </style>

+ 0 - 81
src/views/userCenter/myProduct/detailinfo.vue

@@ -1,81 +0,0 @@
-<template>
-  <div id="">
-    <el-row>
-      <el-col :span="24" class="style">
-        <el-col :span="24" class="top">
-          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
-        </el-col>
-        <el-col :span="24" class="main">
-          <prodDetails :productInfo="productInfo"></prodDetails>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import NavBar from '@/layout/common/topInfo.vue';
-import prodDetails from '@/layout/myProduct/prodDetails.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: mapMarketproduct } = createNamespacedHelpers('marketproduct');
-export default {
-  name: 'prodDetail',
-  props: {},
-  components: {
-    NavBar,
-    prodDetails, //详情
-  },
-  data: () => ({
-    // 头部标题
-    title: '',
-    // meta为true
-    isleftarrow: '',
-    // 返回
-    navShow: true,
-    // 产品名称
-    productInfo: {},
-  }),
-  created() {
-    this.searchInfo();
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  methods: {
-    ...mapMarketproduct({ productFetch: 'fetch', productCreate: 'create', productUpdate: 'update', productQuery: 'query' }),
-    async searchInfo() {
-      if (this.id) {
-        let res = await this.productFetch(this.id);
-        if (this.$checkRes(res)) {
-          this.$set(this, `productInfo`, res.data);
-        }
-      }
-    },
-  },
-  mounted() {
-    this.title = this.$route.meta.title;
-    this.isleftarrow = this.$route.meta.isleftarrow;
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.style {
-  width: 100%;
-  min-height: 667px;
-  position: relative;
-  background-color: #f9fafc;
-}
-.top {
-  height: 46px;
-  overflow: hidden;
-  position: relative;
-  z-index: 999;
-}
-.main {
-  min-height: 570px;
-}
-</style>

+ 0 - 529
src/views/userCenter/myProduct/fabu.vue

@@ -1,529 +0,0 @@
-<template>
-  <div id="fabu">
-    <el-row>
-      <el-col :span="24" class="fabu">
-        <el-col :span="24" class="top">
-          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
-        </el-col>
-        <el-col :span="24" class="info">
-          <van-tabs v-model="activeName">
-            <van-tab title="科技需求" name="a">
-              <van-form ref="form" :model="form" :rules="rules">
-                <el-col :span="24">
-                  <van-field v-model="form.company" name="company" label="企业名称" placeholder="请输入企业名称" readonly />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.phone" name="phone" label="联系电话" placeholder="请输入联系电话" readonly />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请输入电子邮箱" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.contacts" name="contacts" label="联系人" placeholder="请输入联系人" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.qqwx" name="qqwx" label="QQ/微信" placeholder="请输入QQ/微信" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.name" name="name" label="需求名称" placeholder="请输入需求名称" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    readonly
-                    clickable
-                    name="picker"
-                    :value="form.degreeurgency"
-                    label="需求紧急程度"
-                    placeholder="点击选择需求紧急程度"
-                    @click="showPicker = true"
-                  />
-                  <van-popup v-model="showPicker" position="bottom">
-                    <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
-                  </van-popup>
-                </el-col>
-                <el-col :span="24">
-                  <van-field readonly clickable name="picker" :value="form.field" label="所属领域" placeholder="点击选择所属领域" @click="showPicker = true" />
-                  <van-popup v-model="showPicker" position="bottom">
-                    <van-picker show-toolbar :columns="columns1" @confirm="onConfirm1" @cancel="showPicker = false" />
-                  </van-popup>
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.budget" name="budget" label="投资预算" placeholder="请输入投资预算" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    readonly
-                    clickable
-                    name="picker"
-                    :value="form.cooperation"
-                    label="合作方式"
-                    placeholder="点击选择合作方式"
-                    @click="showPicker = true"
-                  />
-                  <van-popup v-model="showPicker" position="bottom">
-                    <van-picker show-toolbar :columns="columns2" @confirm="onConfirm2" @cancel="showPicker = false" />
-                  </van-popup>
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    v-model="form.requirementdesc"
-                    maxlength="300"
-                    rows="1"
-                    show-word-limit
-                    label="技术说明"
-                    type="textarea"
-                    placeholder="请输入技术难题/需求说明"
-                  />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.expect" maxlength="300" rows="1" show-word-limit label="预期目标" type="textarea" placeholder="请输入预期目标" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.present" maxlength="300" rows="1" show-word-limit label="需求现状" type="textarea" placeholder="请输入需求现状" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    v-model="form.condition"
-                    maxlength="300"
-                    rows="1"
-                    show-word-limit
-                    label="合作条件及要求"
-                    type="textarea"
-                    placeholder="请输入合作条件及要求"
-                  />
-                </el-col>
-
-                <el-col :span="24" class="langInfoImage">
-                  <van-field name="expertimage" label="产品图片(6)">
-                    <template #input
-                      ><upload
-                        :limit="6"
-                        :data="form.image"
-                        type="image"
-                        :url="`/files/imgpath/upload`"
-                        @upload="uploadSuccess"
-                        :uploadBtn="true"
-                        @delete="uploadDelete"
-                      ></upload>
-                    </template>
-                  </van-field>
-                </el-col>
-              </van-form>
-            </van-tab>
-            <van-tab title="科技成果" name="b">
-              <van-form ref="form" :model="form" :rules="rules">
-                <el-col :span="24">
-                  <van-field v-model="form.company" name="company" label="企业名称" placeholder="请输入企业名称" readonly />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.phone" name="phone" label="联系电话" placeholder="请输入联系电话" readonly />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请输入电子邮箱" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.contacts" name="contacts" label="联系人" placeholder="请输入联系人" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.qqwx" name="qqwx" label="QQ/微信" placeholder="请输入QQ/微信" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.name" name="name" label="成果名称" placeholder="请输入成果名称" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field readonly clickable name="picker" :value="form.field" label="所属领域" placeholder="点击选择所属领域" @click="showPicker = true" />
-                  <van-popup v-model="showPicker" position="bottom">
-                    <van-picker show-toolbar :columns="columns1" @confirm="onConfirm1" @cancel="showPicker = false" />
-                  </van-popup>
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    readonly
-                    clickable
-                    name="picker"
-                    :value="form.cooperation"
-                    label="合作方式"
-                    placeholder="点击选择合作方式"
-                    @click="showPicker = true"
-                  />
-                  <van-popup v-model="showPicker" position="bottom">
-                    <van-picker show-toolbar :columns="columns2" @confirm="onConfirm2" @cancel="showPicker = false" />
-                  </van-popup>
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    readonly
-                    clickable
-                    name="picker"
-                    :value="form.achievestatus"
-                    label="成果状态"
-                    placeholder="点击选择成果状态"
-                    @click="showPicker = true"
-                  />
-                  <van-popup v-model="showPicker" position="bottom">
-                    <van-picker show-toolbar :columns="columns3" @confirm="onConfirm3" @cancel="showPicker = false" />
-                  </van-popup>
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.achieveown" name="achieveown" label="成果权属" placeholder="请输入成果权属" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    readonly
-                    clickable
-                    name="picker"
-                    :value="form.achievesource"
-                    label="成果来源"
-                    placeholder="点击选择成果来源"
-                    @click="showPicker = true"
-                  />
-                  <van-popup v-model="showPicker" position="bottom">
-                    <van-picker show-toolbar :columns="columns4" @confirm="onConfirm4" @cancel="showPicker = false" />
-                  </van-popup>
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.intentionprice" name="intentionprice" label="意向价格" placeholder="请输入意向价格" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.patentinfo" name="intentionprice" label="专利信息" placeholder="请输入专利信息" />
-                </el-col>
-                <el-col :span="24" class="langInfoImage">
-                  <van-field name="expertimage" label="项目路演">
-                    <template #input
-                      ><uploadraw
-                        :limit="1"
-                        :data="form.roadshow"
-                        type="roadshow"
-                        listType=""
-                        :url="'/files/roadshow/upload'"
-                        @upload="uploadroadshow"
-                        @delete="uploaddelroadshow"
-                      ></uploadraw>
-                    </template>
-                  </van-field>
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    v-model="form.achievebrief"
-                    maxlength="300"
-                    rows="1"
-                    show-word-limit
-                    label="成果简介"
-                    type="textarea"
-                    placeholder="请输入成果简介"
-                  />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.features" maxlength="300" rows="1" show-word-limit label="技术特点" type="textarea" placeholder="请输入技术特点" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.team" maxlength="300" rows="1" show-word-limit label="技术团队" type="textarea" placeholder="请输入技术团队" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    v-model="form.expectations"
-                    maxlength="300"
-                    rows="1"
-                    show-word-limit
-                    label="商业预期"
-                    type="textarea"
-                    placeholder="请输入商业预期"
-                  />
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    v-model="form.condition"
-                    maxlength="300"
-                    rows="1"
-                    show-word-limit
-                    label="合作条件及要求"
-                    type="textarea"
-                    placeholder="请输入合作条件及要求"
-                  />
-                </el-col>
-                <el-col :span="24" class="langInfoImage">
-                  <van-field name="expertimage" label="产品图片(6)">
-                    <template #input
-                      ><upload
-                        :limit="6"
-                        :data="form.image"
-                        type="image"
-                        :url="`/files/imgpath/upload`"
-                        @upload="uploadSuccess"
-                        :uploadBtn="true"
-                        @delete="uploadDelete"
-                      ></upload>
-                    </template>
-                  </van-field>
-                </el-col>
-              </van-form>
-            </van-tab>
-            <van-tab title="商务服务" name="c">
-              <van-form ref="form" :model="form" :rules="rules">
-                <el-col :span="24">
-                  <van-field v-model="form.company" name="company" label="企业名称" placeholder="请输入企业名称" readonly />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.phone" name="phone" label="联系电话" placeholder="请输入联系电话" readonly />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请输入电子邮箱" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.contacts" name="contacts" label="联系人" placeholder="请输入联系人" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.qqwx" name="qqwx" label="QQ/微信" placeholder="请输入QQ/微信" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.name" name="name" label="信息名称" placeholder="请输入信息名称" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field name="radio" label="信息属性">
-                    <template #input>
-                      <van-radio-group v-model="form.messattribute" direction="horizontal">
-                        <van-radio name="提供方">提供方</van-radio>
-                        <van-radio name="需求方">需求方</van-radio>
-                      </van-radio-group>
-                    </template>
-                  </van-field>
-                </el-col>
-                <el-col :span="24">
-                  <van-field name="radio" label="需求程度">
-                    <template #input>
-                      <van-radio-group v-model="form.demand" direction="horizontal">
-                        <van-radio name="特急">特急</van-radio>
-                        <van-radio name="一般">一般</van-radio>
-                        <van-radio name="长期">长期</van-radio>
-                      </van-radio-group>
-                    </template>
-                  </van-field>
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    v-model="form.informationdesc"
-                    maxlength="300"
-                    rows="1"
-                    show-word-limit
-                    label="信息描述"
-                    type="textarea"
-                    placeholder="请输入信息描述"
-                  />
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    v-model="form.coreelements"
-                    maxlength="300"
-                    rows="1"
-                    show-word-limit
-                    label="核心要素"
-                    type="textarea"
-                    placeholder="请输入核心要素"
-                  />
-                </el-col>
-                <el-col :span="24">
-                  <van-field v-model="form.priceinfo" maxlength="300" rows="1" show-word-limit label="价格信息" type="textarea" placeholder="请输入价格信息" />
-                </el-col>
-                <el-col :span="24">
-                  <van-field
-                    v-model="form.businessexpect"
-                    maxlength="300"
-                    rows="1"
-                    show-word-limit
-                    label="商务预期"
-                    type="textarea"
-                    placeholder="请输入商务预期"
-                  />
-                </el-col>
-              </van-form>
-            </van-tab>
-          </van-tabs>
-          <el-col :span="24" class="btn1">
-            <el-button @click="draftBtn('form')">保存草稿</el-button>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-import NavBar from '@/layout/common/topInfo.vue';
-var moment = require('moment');
-import upload from '@/components/upload.vue';
-import uploadraw from '@/components/uploadraw.vue';
-// const { mapActions: markettype } = createNamespacedHelpers('markettype');
-const { mapActions: mapMarketproduct } = createNamespacedHelpers('product');
-const { mapActions: market } = createNamespacedHelpers('marketuser');
-const { mapActions: expertsuser } = createNamespacedHelpers('exportuser');
-
-export default {
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  name: 'fabu',
-  props: {},
-  components: {
-    NavBar,
-    upload,
-    uploadraw,
-  },
-  data: function() {
-    return {
-      form: {},
-      // 企业信息&专家信息
-      companyInfo: {},
-      addpatentform: {},
-      addpatent: [],
-      activeName: 'a',
-      // 头部标题
-      title: '',
-      // meta为true
-      isleftarrow: '',
-      // 返回
-      navShow: true,
-      //需求紧急程度
-      columns: ['特急', '一般', '储备'],
-      showPicker: false,
-      //所属领域
-      columns1: ['电子信息技术', '生物与新医药技术', '航空航天技术', '新材料技术', '高技术服务业', '新能源及节能技术', '资源与环境技术', '先进制造与自动化'],
-      //合作方式
-      columns2: ['合作开发', '技术转让', '技术入股', '其他方式'],
-      //成果状态
-      columns3: ['原理样机', '实验室阶段', '小试产品', '中试技术', '产业化(成熟)技术'],
-      //成果来源
-      columns4: ['国家项目', '省级项目', '市级项目', '自选项目'],
-      rules: {
-        name: [{ required: true, message: '请输入需求名称', trigger: 'blur' }],
-        contacts: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
-        qqwx: [{ required: false, message: '请输入QQ/微信', trigger: 'blur' }],
-      },
-    };
-  },
-  created() {
-    // this.searchtype();
-  },
-  methods: {
-    // ...markettype({ markettypeList: 'query' }),
-    ...mapMarketproduct({ productFetch: 'fetch', productCreate: 'create', productUpdate: 'update' }),
-    ...market(['fetch', 'update']),
-    ...expertsuser({ expertsuserFetch: 'fetch', expertsuserUpdate: 'update', expertsuserUpgrade: 'upgrade' }),
-    //需求紧急程度
-    onConfirm(value) {
-      if (value) {
-        this.$set(this.form, `degreeurgency`, value);
-      }
-      this.showPicker = false;
-    },
-    //所属领域
-    onConfirm1(value) {
-      if (value) {
-        this.$set(this.form, `field`, value);
-      }
-      this.showPicker = false;
-    },
-    //合作方式
-    onConfirm2(value) {
-      if (value) {
-        this.$set(this.form, `cooperation`, value);
-      }
-      this.showPicker = false;
-    },
-    //成果状态
-    onConfirm3(value) {
-      if (value) {
-        this.$set(this.form, `achievestatus`, value);
-      }
-      this.showPicker = false;
-    },
-    //成果来源
-    onConfirm4(value) {
-      if (value) {
-        this.$set(this.form, `achievesource`, value);
-      }
-      this.showPicker = false;
-    },
-    uploadSuccess({ type, data }) {
-      let arr = _.get(this.form, type);
-      if (_.isArray(arr)) {
-        let datas = { name: data.name, url: data.uri };
-        this.form[type].push({ name: data.name, url: data.uri });
-      } else {
-        let newArr = [{ name: data.name, url: data.uri }];
-        this.$set(this.form, `${type}`, newArr);
-      }
-    },
-    // 删除图片
-    uploadDelete(index) {
-      this.form.image.splice(index, 1);
-    },
-    uploadroadshow({ type, filetype, data }) {
-      this.$set(this.form, `${type}`, data.uri);
-    },
-    uploaddelroadshow(index) {},
-    // 草稿
-    async draftBtn({ data }) {
-      if (data.id) {
-        let res = await this.productUpdate(data);
-        if (this.$checkRes(res)) {
-          this.$message({
-            message: '草稿修改成功',
-            type: 'success',
-          });
-          window.location.reload();
-        } else {
-          this.$message.error('草稿保存失败');
-        }
-      } else {
-        data.patent = this.addpatent;
-        data.userid = this.user.uid;
-        let res = await this.productCreate(data);
-        if (this.$checkRes(res)) {
-          this.$message({
-            message: '草稿创建成功',
-            type: 'success',
-          });
-          window.location.reload();
-        } else {
-          this.$message.error('草稿创建失败');
-        }
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-  },
-  mounted() {
-    this.title = this.$route.meta.title;
-    this.isleftarrow = this.$route.meta.isleftarrow;
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.top {
-  height: 46px;
-  overflow: hidden;
-}
-/deep/.van-tab {
-  text-align: center;
-}
-/deep/.van-tabs--line .van-tabs__wrap {
-  height: 70px;
-  margin: 0 0 10px 0;
-}
-/deep/.van-tab--active {
-  color: red;
-}
-.van-icon {
-  font-size: 20px;
-}
-.btn1 {
-  text-align: center;
-  margin: 15px 0;
-}
-</style>

+ 49 - 83
src/views/userCenter/myProduct/index.vue

@@ -6,19 +6,19 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <el-col :span="24" class="two">
-            <el-button type="primary" size="mini" @click="add()">发布产品</el-button>
+          <el-col :span="24" class="btn">
+            <el-button type="primary" size="mini" @click="add()">信息发布</el-button>
           </el-col>
-          <el-col :span="24" class="one">
+          <el-col :span="24">
             <van-tabs v-model="active">
               <van-tab title="待发布">
-                <productList :list="nextList" @del="del" @release="release" @detailBtn="detailBtn"></productList>
+                <productList :list="oneList" @editbtn="editbtn" @checkbtn="checkbtn" @deletebtn="deletebtn"> </productList>
               </van-tab>
               <van-tab title="审核中">
-                <productList :list="nowList" @del="del" @detailBtn="detailBtn"></productList>
+                <productList :list="twoList" @editbtn="editbtn" @checkbtn="checkbtn" @deletebtn="deletebtn"></productList>
               </van-tab>
               <van-tab title="已发布">
-                <productList :list="pastList" @del="del" @detailBtn="detailBtn"></productList>
+                <productList :list="threeList" @editbtn="editbtn" @checkbtn="checkbtn" @deletebtn="deletebtn"></productList>
               </van-tab>
             </van-tabs>
           </el-col>
@@ -29,25 +29,15 @@
 </template>
 
 <script>
-import { mapState, createNamespacedHelpers } from 'vuex';
 import NavBar from '@/layout/common/topInfo.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
 import productList from './parts/productList.vue';
 const { mapActions: product } = createNamespacedHelpers('product');
-// import caogaoList from './parts/caogaoList.vue';
-// import noauditList from './parts/noauditList.vue';
-// import auditList from './parts/auditList.vue';
-
 export default {
   name: 'index',
   props: {},
   components: {
     NavBar,
-    //待发布
-    // caogaoList,
-    //审核中
-    // noauditList,
-    //已发布
-    // auditList,
     productList,
   },
   data: function() {
@@ -58,14 +48,13 @@ export default {
       isleftarrow: '',
       // 返回
       navShow: true,
-      // 标签
       active: '1',
-      //待发布
-      nextList: [],
-      //审核中
-      nowList: [],
-      //已发布
-      pastList: [],
+      // 待发布
+      oneList: [],
+      // 审核中
+      twoList: [],
+      // 已发布
+      threeList: [],
     };
   },
   async created() {
@@ -75,70 +64,60 @@ export default {
     ...product({ productQuery: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete', upup: 'update' }),
     async search() {
       let userid = this.user.uid;
-      //待发布
       let res = await this.productQuery({ userid, status: 2 });
       let res1 = await this.productQuery({ userid, status: 3 });
-      //数组的拼接
       var newDate = res.data.concat(res1.data);
-      if (newDate.length != 0) {
-        this.$set(this, `nextList`, newDate);
+      if (newDate.length > 0) {
+        this.$set(this, `oneList`, newDate);
       }
-      //审核中
       res = await this.productQuery({ userid, status: 0 });
       if (this.$checkRes(res)) {
-        this.$set(this, `nowList`, res.data);
+        this.$set(this, `twoList`, res.data);
       }
-      //已发布
       res = await this.productQuery({ userid, status: 1 });
       if (this.$checkRes(res)) {
-        this.$set(this, `pastList`, res.data);
+        this.$set(this, `threeList`, res.data);
       }
     },
-    //点击发布
+    // 添加
     add() {
-      this.$router.push({ path: './fabu' });
+      this.$router.push({ path: '/userCenter/myProduct/detail', query: { type: '0' } });
     },
-    // 发布,编辑
-    detailBtn(data) {
-      if (data.status == '0' || data.status == '1') {
-        this.$router.push({ path: './fabu', query: { id: data.id } });
+    // 编辑
+    editbtn(data) {
+      this.$router.push({ path: '/userCenter/myProduct/detail', query: { id: data.id, type: data.type } });
+    },
+    // 发布
+    async checkbtn(data) {
+      data.status = '0';
+      data.userid = this.user.uid;
+      let res = await this.upup(data);
+      if (this.$checkRes(res)) {
+        this.$notify({
+          message: '发布成功',
+          type: 'success',
+        });
+        this.search();
       } else {
-        console.log(data);
+        this.$notify({
+          message: res.errmsg,
+          type: 'danger',
+        });
       }
     },
     //删除
-    async del(data) {
-      // console.log(data);
-      if (data.id) {
-        const res = await this.productdeltet(data.id);
-        if (this.$checkRes(res)) {
-          this.$message({
-            message: '刪除成功',
-            type: 'success',
-          });
-          this.search();
-        } else {
-          this.$message({
-            message: res.errmsg,
-            type: 'error',
-          });
-        }
-      }
-    },
-    //发布按钮
-    async release(data) {
-      data.status = '0';
-      let res = await this.upup(data);
+    async deletebtn(data) {
+      const res = await this.productdeltet(data.id);
       if (this.$checkRes(res)) {
-        this.$message({
-          message: '信息发布成功',
+        this.$notify({
+          message: '删除成功',
           type: 'success',
         });
         this.search();
       } else {
-        this.$message({
+        this.$notify({
           message: res.errmsg,
-          type: 'error',
+          type: 'danger',
         });
       }
     },
@@ -150,6 +129,9 @@ export default {
     this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;
   },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
 };
 </script>
 
@@ -163,28 +145,12 @@ export default {
 .top {
   height: 46px;
   overflow: hidden;
-  position: relative;
-  z-index: 999;
 }
 .main {
   min-height: 570px;
-  .two {
+  .btn {
     text-align: center;
-    margin: 5px 0px;
-    border-radius: 10px;
+    padding: 10px 0;
   }
 }
-/deep/.van-tab {
-  text-align: center;
-}
-/deep/.van-tabs--line .van-tabs__wrap {
-  height: 70px;
-  margin: 0 0 10px 0;
-}
-/deep/.van-tab--active {
-  color: red;
-}
-.van-icon {
-  font-size: 20px;
-}
 </style>

+ 0 - 126
src/views/userCenter/myProduct/parts/auditList.vue

@@ -1,126 +0,0 @@
-<template>
-  <div id="noauditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <el-col :span="19" class="messag">
-            <p>
-              <span class="textOver" @click="$router.push({ path: '/userCenter/myProduct/detailinfo', query: { id: item.id } })">{{ item.name }}</span>
-              <span>{{ item.status == '1' ? '审核通过' : '未识别' }}</span>
-            </p>
-            <p>
-              <span class="two"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
-              <span class="two"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>
-            </p>
-            <p class="textOver"><span class="three">应用领域:</span>{{ item.field || '暂无' }}</p>
-          </el-col>
-          <el-col :span="5" class="btn">
-            <el-button type="danger" size="mini" @click="deleteBtn(item.id)">删除</el-button>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: mapMarketproduct } = createNamespacedHelpers('marketproduct');
-export default {
-  name: 'noauditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...mapMarketproduct({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete', upup: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let userid = this.user.uid;
-      const res = await this.productList({ skip, limit, status: 1, userid, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-      }
-    },
-    async deleteBtn(id) {
-      const res = await this.productdeltet(id);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: '删除信息成功',
-          type: 'success',
-        });
-        this.searchInfo();
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    .messag {
-      padding: 10px 0;
-      p:first-child {
-        font-size: 16px;
-        padding: 0 0 8px 0;
-        span:first-child {
-          display: inline-block;
-          width: 75%;
-        }
-        span:nth-child(2) {
-          display: inline-block;
-          width: 25%;
-          color: #ff0000;
-          font-weight: bold;
-        }
-      }
-      p:nth-child(2) {
-        font-size: 14px;
-        padding: 0 0 10px 0;
-        .two {
-          display: inline-block;
-          width: 50%;
-          span {
-            color: #ccc;
-          }
-        }
-      }
-      p:nth-child(3) {
-        font-size: 14px;
-        padding: 0 0 10px 0;
-        .three {
-          color: #ccc;
-        }
-      }
-    }
-    .btn {
-      text-align: center;
-    }
-  }
-}
-/deep/.el-button + .el-button {
-  margin-left: 0;
-}
-/deep/.el-button {
-  margin: 5px 0;
-}
-</style>

+ 0 - 261
src/views/userCenter/myProduct/parts/caogaoList.vue

@@ -1,261 +0,0 @@
-<template>
-  <div id="technologyList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <!-- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <el-col :span="19" class="messag">
-            <p>
-              <span class="textOver" @click="$router.push({ path: '/userCenter/myProduct/detailinfo', query: { id: item.id } })">{{ item.name }}</span>
-              <span>{{ item.status == '2' ? '审核拒绝' : item.status == '3' ? '草稿' : '未识别' }}</span>
-            </p>
-            <p>
-              <span class="two"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
-              <span class="two"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>
-            </p>
-            <p class="textOver"><span class="three">应用领域:</span>{{ item.field || '暂无' }}</p>
-          </el-col>
-          <el-col :span="5" class="btn">
-            <el-button
-              type="primary"
-              size="mini"
-              v-if="item.status == '3'"
-              @click="$router.push({ path: '/userCenter/myProduct/detail', query: { id: item.id } })"
-              >编辑</el-button
-            >
-            <el-button type="success" size="mini" v-if="item.status == '3'" @click="releaseBtn(item)">发布</el-button>
-            <el-button type="danger" size="mini" @click="deleteBtn(item.id)">删除</el-button>
-          </el-col>
-        </el-col> -->
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <el-col :span="24" class="top">
-            <span class="textOver">{{ item.name }}</span>
-            <span>{{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
-          </el-col>
-          <el-col :span="24" class="down">
-            <el-col :span="3" class="image">
-              <span v-if="item.image.length > 0">
-                <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                  <template v-if="index === 0">
-                    <vant-image style="width:100%;height:100px" :src="acm.url"></vant-image>
-                  </template>
-                </el-col>
-              </span>
-              <span v-else>
-                <el-col :span="24" style="width: 100%;height: 100px;text-align: center;line-height: 100px;font-size: 20px;">
-                  <span>暂无图片</span>
-                </el-col>
-              </span>
-            </el-col>
-            <el-col :span="6" class="product">
-              <p>类型:{{ item.type === '0' ? '技术' : item.type === '1' ? '产品' : item.type === '2' ? '服务' : 'underdind' }}</p>
-              <span v-if="item.type === '0' || item.type === '1'">
-                <p>所属领域:{{ item.field }}</p>
-                <p>合作方式:{{ item.cooperation }}</p>
-              </span>
-              <span v-else>
-                <p>信息属性:{{ item.messattribute }}</p>
-                <p>需求程度:{{ item.demand }}</p>
-              </span>
-            </el-col>
-            <el-col :span="9" class="intro">
-              <span v-if="item.type == '0'">
-                <p>技术难题&需求说明:</p>
-                <p>{{ item.requirementdesc }}</p>
-              </span>
-              <span v-else-if="item.type == '1'">
-                <p>产品简介:</p>
-                <p>{{ item.achievebrief }}</p>
-              </span>
-              <span v-else>
-                <p>信息描述:</p>
-                <p>{{ item.informationdesc }}</p>
-              </span>
-            </el-col>
-            <el-col :span="6" class="status">
-              <p>状态:{{ item.status === '2' ? '审核拒绝' : item.status === '3' ? '草稿' : '未识别' }}</p>
-              <van-button type="primary" size="mini" @click="previewBtn(item)" v-if="item.status == '3'">预览</van-button>
-              <van-button type="info" size="mini" @click="editBtn(item)" v-if="item.status == '3'">编辑</van-button>
-              <van-button type="success" size="mini" @click="releaseBtn(item)" v-if="item.status == '3'">发布</van-button>
-              <van-button type="danger" size="mini" @click="deleteBtn(item.id)">删除</van-button>
-            </el-col>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: product } = createNamespacedHelpers('product');
-export default {
-  name: 'technologyList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    // ...mapMarketproduct({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete', upup: 'update' }),
-    // async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-    //   let userid = this.user.uid;
-    //   const res = await this.productList({ skip, limit, status: 2, userid, ...info });
-    //   const resTwo = await this.productList({ skip, limit, status: 3, userid, ...info });
-    //   var newData = res.data.concat(resTwo.data);
-    //   if (newData.length != 0) {
-    //     this.$set(this, `list`, newData);
-    //   }
-    // },
-    // async releaseBtn(data) {
-    //   data.status = 0;
-    //   const res = await this.upup(data);
-    //   if (this.$checkRes(res)) {
-    //     this.$message({
-    //       message: '信息发布成功',
-    //       type: 'success',
-    //     });
-    //     this.searchInfo();
-    //   }
-    // },
-    // async deleteBtn(id) {
-    //   const res = await this.productdeltet(id);
-    //   if (this.$checkRes(res)) {
-    //     this.$message({
-    //       message: '删除信息成功',
-    //       type: 'success',
-    //     });
-    //     this.searchInfo();
-    //   }
-    // },
-    ...product({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete', upup: 'update' }),
-    // 查询列表
-    async searchInfo({ skip = 0, limit = 6, ...info } = {}) {
-      skip = this.skip;
-      let userid = this.user.uid;
-      const res = await this.productList({ skip, status: 2, userid, ...info });
-      // console.log(res);
-      const resTwo = await this.productList({ skip, status: 3, userid, ...info });
-      //   var newData = res.data.concat(resTwo.data);
-      //   if (newData.length != 0) {
-      //     this.$set(this, `newDataList`, newData);
-      //     this.$set(this, `total`, newData.length);
-      //   }
-    },
-    // // 预览
-    // previewBtn(item) {
-    //   this.$set(this, `type`, item.type);
-    //   this.dialogVisible = true;
-    //   this.$set(this, `detailInfo`, item);
-    // },
-    // handleClose() {
-    //   this.dialogVisible = false;
-    // },
-    // // 修改
-    // editBtn(item) {
-    //   this.$emit('editBtn', item);
-    // },
-    // // 信息发布
-    // async releaseBtn(data) {
-    //   data.status = '0';
-    //   let res = await this.upup(data);
-    //   if (this.$checkRes(res)) {
-    //     this.$message({
-    //       message: '信息发布成功',
-    //       type: 'success',
-    //     });
-    //     this.searchInfo();
-    //   } else {
-    //     this.$message.error('信息发布失败');
-    //   }
-    // },
-    // // 删除信息
-    // async deleteBtn(id) {
-    //   let res = await this.productdeltet(id);
-    //   if (this.$checkRes(res)) {
-    //     this.$message({
-    //       message: '信息删除成功',
-    //       type: 'success',
-    //     });
-    //     this.searchInfo();
-    //   } else {
-    //     this.$message.error('信息删除失败');
-    //   }
-    // },
-    // 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 };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    .messag {
-      padding: 10px 0;
-      p:first-child {
-        font-size: 16px;
-        padding: 0 0 8px 0;
-        span:first-child {
-          display: inline-block;
-          width: 75%;
-        }
-        span:nth-child(2) {
-          display: inline-block;
-          width: 25%;
-          color: #ff0000;
-          font-weight: bold;
-        }
-      }
-      p:nth-child(2) {
-        font-size: 14px;
-        padding: 0 0 10px 0;
-        .two {
-          display: inline-block;
-          width: 50%;
-          span {
-            color: #ccc;
-          }
-        }
-      }
-      p:nth-child(3) {
-        font-size: 14px;
-        padding: 0 0 10px 0;
-        .three {
-          color: #ccc;
-        }
-      }
-    }
-    .btn {
-      text-align: center;
-    }
-  }
-}
-/deep/.el-button + .el-button {
-  margin-left: 0;
-}
-/deep/.el-button {
-  margin: 5px 0;
-}
-</style>

+ 0 - 126
src/views/userCenter/myProduct/parts/noauditList.vue

@@ -1,126 +0,0 @@
-<template>
-  <div id="noauditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <el-col :span="19" class="messag">
-            <p>
-              <span class="textOver" @click="$router.push({ path: '/userCenter/myProduct/detailinfo', query: { id: item.id } })">{{ item.name }}</span>
-              <span>{{ item.status == '0' ? '审核中' : '未识别' }}</span>
-            </p>
-            <p>
-              <span class="two"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
-              <span class="two"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>
-            </p>
-            <p class="textOver"><span class="three">应用领域:</span>{{ item.field || '暂无' }}</p>
-          </el-col>
-          <el-col :span="5" class="btn">
-            <el-button type="danger" size="mini" @click="deleteBtn(item.id)">删除</el-button>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: mapMarketproduct } = createNamespacedHelpers('marketproduct');
-export default {
-  name: 'noauditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...mapMarketproduct({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete', upup: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let userid = this.user.uid;
-      const res = await this.productList({ skip, limit, status: 0, userid, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-      }
-    },
-    async deleteBtn(id) {
-      const res = await this.productdeltet(id);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: '删除信息成功',
-          type: 'success',
-        });
-        this.searchInfo();
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    .messag {
-      padding: 10px 0;
-      p:first-child {
-        font-size: 16px;
-        padding: 0 0 8px 0;
-        span:first-child {
-          display: inline-block;
-          width: 75%;
-        }
-        span:nth-child(2) {
-          display: inline-block;
-          width: 25%;
-          color: #ff0000;
-          font-weight: bold;
-        }
-      }
-      p:nth-child(2) {
-        font-size: 14px;
-        padding: 0 0 10px 0;
-        .two {
-          display: inline-block;
-          width: 50%;
-          span {
-            color: #ccc;
-          }
-        }
-      }
-      p:nth-child(3) {
-        font-size: 14px;
-        padding: 0 0 10px 0;
-        .three {
-          color: #ccc;
-        }
-      }
-    }
-    .btn {
-      text-align: center;
-    }
-  }
-}
-/deep/.el-button + .el-button {
-  margin-left: 0;
-}
-/deep/.el-button {
-  margin: 5px 0;
-}
-</style>

+ 265 - 0
src/views/userCenter/myProduct/parts/producInfo.vue

@@ -0,0 +1,265 @@
+<template>
+  <div id="producInfo">
+    <el-row>
+      <el-col :span="24">
+        <span v-if="type == '0'">
+          <van-form>
+            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
+            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
+            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
+            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
+            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
+            <van-field v-model="form.name" name="需求名称" label="需求名称" placeholder="需求名称" />
+            <van-field name="radio" label="紧急程度">
+              <template #input>
+                <van-radio-group v-model="form.degreeurgency" direction="horizontal">
+                  <van-radio name="特急">特急</van-radio>
+                  <van-radio name="一般">一般</van-radio>
+                  <van-radio name="长期">长期</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
+            <van-field readonly clickable name="picker" :value="form.field" label="所属领域" placeholder="点击选择" @click="fieldpic = true" />
+            <van-popup v-model="fieldpic" position="bottom">
+              <van-picker show-toolbar :columns="field" @confirm="fieldSubmit" @cancel="fieldpic = false" />
+            </van-popup>
+            <van-field readonly clickable name="picker" :value="form.cooperation" label="合作方式" placeholder="点击选择" @click="cooperationpic = true" />
+            <van-popup v-model="cooperationpic" position="bottom">
+              <van-picker show-toolbar :columns="cooperation" @confirm="cooperationSubmit" @cancel="cooperationpic = false" />
+            </van-popup>
+            <van-field v-model="form.budget" name="投资预算" label="投资预算" placeholder="投资预算" />
+            <van-field v-model="form.requirementdesc" rows="1" autosize label="技术说明" type="textarea" placeholder="技术说明" />
+            <van-field v-model="form.expect" rows="1" autosize label="预期目标" type="textarea" placeholder="预期目标" />
+            <van-field v-model="form.present" rows="1" autosize label="合作要求" type="textarea" placeholder="合作要求" />
+            <van-field name="expertimage" label="产品图片(6)">
+              <template #input
+                ><upload
+                  :limit="6"
+                  :data="form.image"
+                  type="image"
+                  :url="`/files/imgpath/upload`"
+                  @upload="uploadSuccess"
+                  :uploadBtn="true"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+            </van-field>
+            <div style="margin: 16px;">
+              <van-button round block type="info" @click="onSubmit">
+                提交
+              </van-button>
+            </div>
+          </van-form>
+        </span>
+        <span v-else-if="type == '1'">
+          <van-form>
+            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
+            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
+            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
+            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
+            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
+            <van-field v-model="form.name" name="成果名称" label="成果名称" placeholder="成果名称" />
+            <van-field readonly clickable name="picker" :value="form.field" label="所属领域" placeholder="点击选择" @click="fieldpic = true" />
+            <van-popup v-model="fieldpic" position="bottom">
+              <van-picker show-toolbar :columns="field" @confirm="fieldSubmit" @cancel="fieldpic = false" />
+            </van-popup>
+            <van-field readonly clickable name="picker" :value="form.cooperation" label="合作方式" placeholder="点击选择" @click="cooperationpic = true" />
+            <van-popup v-model="cooperationpic" position="bottom">
+              <van-picker show-toolbar :columns="cooperation" @confirm="cooperationSubmit" @cancel="cooperationpic = false" />
+            </van-popup>
+            <van-field readonly clickable name="picker" :value="form.achievestatus" label="成果状态" placeholder="点击选择" @click="achievestatuspic = true" />
+            <van-popup v-model="achievestatuspic" position="bottom">
+              <van-picker show-toolbar :columns="achievestatus" @confirm="achievestatusOnsubmit" @cancel="achievestatuspic = false" />
+            </van-popup>
+            <van-field v-model="form.achieveown" name="成果权属" label="成果权属" placeholder="成果权属" />
+            <van-field name="radio" label="成果来源">
+              <template #input>
+                <van-radio-group v-model="form.achievesource" direction="horizontal">
+                  <van-radio name="国家项目">国家项目</van-radio>
+                  <van-radio name="省级项目">省级项目</van-radio>
+                  <van-radio name="市级项目">市级项目</van-radio>
+                  <van-radio name="市级项目">市级项目</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
+            <van-field v-model="form.intentionprice" name="意向价格" label="意向价格" placeholder="意向价格" />
+            <van-field v-model="form.name" name="专利信息" label="专利信息" placeholder="专利信息" />
+            <van-field v-model="form.roadshow" name="项目路演" label="项目路演" placeholder="项目路演" />
+            <van-field v-model="form.achievebrief" rows="1" autosize label="成果简介" type="textarea" placeholder="成果简介" />
+            <van-field v-model="form.features" rows="1" autosize label="技术特点" type="textarea" placeholder="技术特点" />
+            <van-field v-model="form.team" rows="1" autosize label="技术团队" type="textarea" placeholder="技术团队" />
+            <van-field v-model="form.expectations" rows="1" autosize label="商业预期" type="textarea" placeholder="商业预期" />
+            <van-field v-model="form.condition" rows="1" autosize label="合作要求" type="textarea" placeholder="合作要求" />
+            <van-field name="expertimage" label="产品图片(6)">
+              <template #input
+                ><upload
+                  :limit="6"
+                  :data="form.image"
+                  type="image"
+                  :url="`/files/imgpath/upload`"
+                  @upload="uploadSuccess"
+                  :uploadBtn="true"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+            </van-field>
+            <div style="margin: 16px;">
+              <van-button round block type="info" @click="onSubmit">
+                提交
+              </van-button>
+            </div>
+          </van-form>
+        </span>
+        <span v-else-if="type == '2'">
+          <van-form>
+            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
+            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
+            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
+            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
+            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
+            <van-field v-model="form.name" name="信息名称" label="信息名称" placeholder="信息名称" />
+            <van-field name="radio" label="信息属性">
+              <template #input>
+                <van-radio-group v-model="form.messattribute" direction="horizontal">
+                  <van-radio name="提供方">提供方</van-radio>
+                  <van-radio name="需求方">需求方</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
+            <van-field name="radio" label="需求程度">
+              <template #input>
+                <van-radio-group v-model="form.demand" direction="horizontal">
+                  <van-radio name="特急">特急</van-radio>
+                  <van-radio name="一般">一般</van-radio>
+                  <van-radio name="长期">长期</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
+            <van-field v-model="form.informationdesc" rows="1" autosize label="信息描述" type="textarea" placeholder="信息描述" />
+            <van-field v-model="form.coreelements" rows="1" autosize label="核心要素" type="textarea" placeholder="核心要素" />
+            <van-field v-model="form.priceinfo" rows="1" autosize label="价格信息" type="textarea" placeholder="价格信息" />
+            <van-field v-model="form.businessexpect" rows="1" autosize label="商业预期" type="textarea" placeholder="商业预期" />
+            <div style="margin: 16px;">
+              <van-button round block type="info" @click="onSubmit">
+                提交
+              </van-button>
+            </div>
+          </van-form>
+        </span>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import upload from '@/components/upload.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'producInfo',
+  props: {
+    type: { type: String, default: '0' },
+    form: { type: Object },
+    fieldList: { type: Array },
+    cooperationList: { type: Array },
+    achievestatusList: { type: Array },
+  },
+  components: {
+    upload,
+  },
+  data: function() {
+    return {
+      field: [],
+      fieldpic: false,
+      cooperation: [],
+      cooperationpic: false,
+      achievestatus: [],
+      achievestatuspic: false,
+    };
+  },
+  created() {},
+  methods: {
+    // 重组数组
+    seachfield() {
+      let field = this.fieldList.map(item => item.name);
+      this.$set(this, `field`, field);
+    },
+    // 所屬領域
+    fieldSubmit(value) {
+      this.$set(this.form, `field`, value);
+      this.fieldpic = false;
+    },
+    // 重组数组
+    searchcooperation() {
+      let cooperation = this.cooperationList.map(item => item.name);
+      this.$set(this, `cooperation`, cooperation);
+    },
+    // 合作方式
+    cooperationSubmit(value) {
+      this.$set(this.form, `cooperation`, value);
+      this.cooperationpic = false;
+    },
+    // 重组数组
+    searchachievestatus() {
+      let achievestatus = this.achievestatusList.map(item => item.name);
+      this.$set(this, `achievestatus`, achievestatus);
+    },
+    // 成果状态
+    achievestatusOnsubmit(value) {
+      this.$set(this.form, `achievestatus`, value);
+      this.achievestatuspic = false;
+    },
+
+    uploadSuccess({ type, data }) {
+      let arr = _.get(this.form, type);
+      if (_.isArray(arr)) {
+        let datas = { name: data.name, url: data.uri };
+        this.form[type].push({ name: data.name, url: data.uri });
+      } else {
+        let newArr = [{ name: data.name, url: data.uri }];
+        this.$set(this.form, `${type}`, newArr);
+      }
+    },
+    // 删除图片
+    uploadDelete(index) {
+      this.form.image.splice(index, 1);
+    },
+    onSubmit() {
+      this.$emit('onSubmit', { data: this.form });
+    },
+  },
+  watch: {
+    fieldList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        this.seachfield();
+      },
+    },
+    cooperationList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        this.searchcooperation();
+      },
+    },
+    achievestatusList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        this.searchachievestatus();
+      },
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 48 - 76
src/views/userCenter/myProduct/parts/productList.vue

@@ -1,49 +1,24 @@
 <template>
   <div id="productList">
     <el-row>
-      <el-col :span="24" class="main">
+      <el-col :span="24" class="productList">
         <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <el-col :span="24" class="name">{{ item.name }}</el-col>
-          <el-col :span="8" class="img">
-            <span v-if="item.image.length > 0">
-              <el-col :span="24" v-for="(acm, index) in item.image" :key="index">
-                <template v-if="index === 0">
-                  <van-image
-                    style="width:100%;height: 115px;
-    margin-top: 9px;"
-                    :src="acm.url"
-                  ></van-image>
-                </template>
-              </el-col>
-            </span>
-            <span v-else>
-              <el-col
-                :span="24"
-                style="width: 100%;height: 115px;text-align: center;line-height: 100px;font-size: 20px; border: 1px solid #ccc; margin-top: 9px;"
-              >
-                <span>暂无图片</span>
-              </el-col>
-            </span>
-          </el-col>
-          <el-col :span="16" class="info">
-            <p>类型:{{ item.type === '0' ? '技术' : item.type === '1' ? '产品' : item.type === '2' ? '服务' : 'underdind' }}</p>
-            <span v-if="item.type === '0' || item.type === '1'">
-              <p>所属领域:{{ item.field }}</p>
-              <p>合作方式:{{ item.cooperation }}</p>
-            </span>
-            <span v-else>
-              <p>信息属性:{{ item.messattribute }}</p>
-              <p>需求程度:{{ item.demand }}</p>
-            </span>
-            <p>状态:{{ item.status === '2' ? '审核拒绝' : item.status === '3' ? '草稿' : '未识别' }}</p>
-            <el-col :span="24" class="btn">
-              <el-button type="primary" size="mini" @click="del(item)">删除</el-button>
-              <span v-if="item.status === '2' || item.status === '3'" class="btn1">
-                <el-button type="info" size="mini" @click="detailBtn(item)">编辑</el-button>
-                <el-button type="success" size="mini" @click="release(item)">发布</el-button>
-              </span>
-            </el-col>
-          </el-col>
+          <p class="textOver">{{ item.name }}</p>
+          <p>
+            <span class="textOver">所属领域:{{ item.field }}</span>
+            <span class="textOver">合作方式:{{ item.cooperation }}</span>
+          </p>
+          <p>
+            <span class="textOver">产品类型:{{ item.type == '0' ? '技术' : item.type == '1' ? '产品' : '服务' }}</span>
+            <span class="textOver"
+              >状态:{{ item.status == '0' ? '待审核' : item.status == '1' ? '审核通过' : item.status == '2' ? '审核未通过' : '草稿' }}</span
+            >
+          </p>
+          <p>
+            <el-button type="primary" size="mini" v-if="item.status == '3'" @click="editbtn(item)">编辑</el-button>
+            <el-button type="success" size="mini" v-if="item.status == '3'" @click="checkbtn(item)">发布</el-button>
+            <el-button type="danger" size="mini" @click="deletebtn(item)">删除</el-button>
+          </p>
         </el-col>
       </el-col>
     </el-row>
@@ -53,9 +28,6 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
   name: 'productList',
   props: {
     list: { type: Array },
@@ -66,54 +38,54 @@ export default {
   },
   created() {},
   methods: {
-    //编辑,发布产品
-    detailBtn(data) {
-      this.$emit('detailBtn', data);
+    // 编辑
+    editbtn(data) {
+      this.$emit('editbtn', data);
     },
-    //删除
-    del(data) {
-      this.$emit('del', data);
+    // 发布
+    checkbtn(data) {
+      this.$emit('checkbtn', data);
     },
-    //发布按钮
-    release(data) {
-      this.$emit('release', data);
+    // 删除
+    deletebtn(data) {
+      this.$emit('deletebtn', data);
     },
   },
   computed: {
     ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
   },
 };
 </script>
 
 <style lang="less" scoped>
-.main {
+.productList {
   padding: 0 10px;
   .list {
-    padding: 10px 0px;
+    padding: 10px 0;
     border-bottom: 1px dashed #ccc;
-    .name {
-      font-weight: bolder;
+    p {
+      font-size: 16px;
+      padding: 0 0 5px 0;
+      color: #666;
+      span {
+        display: inline-block;
+        width: 50%;
+      }
+    }
+    p:nth-child(1) {
       font-size: 18px;
-      margin-bottom: 5px;
+      color: #000;
+      font-weight: bold;
     }
-    .info {
-      padding-left: 10px;
-      p:nth-child(1) {
-        margin-top: 1px;
-      }
-      span:nth-child(2) p {
-        margin-top: 8px;
-      }
-      .btn {
-        margin-top: 5px;
-        .btn1 {
-          margin-left: 10px;
-        }
-      }
+    p:nth-child(4) {
+      text-align: center;
     }
   }
 }
-p {
-  margin-top: 8px;
-}
 </style>