guhongwei 4 år sedan
förälder
incheckning
37f0f39e6e

+ 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>

+ 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>

+ 0 - 190
src/views/userCenter/myProduct/index copy.vue

@@ -1,190 +0,0 @@
-<template>
-  <div id="index">
-    <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">
-          <el-col :span="24" class="two">
-            <el-button type="primary" size="mini" @click="add()">发布产品</el-button>
-          </el-col>
-          <el-col :span="24" class="one">
-            <van-tabs v-model="active">
-              <van-tab title="待发布">
-                <productList :list="nextList" @del="del" @release="release" @detailBtn="detailBtn"></productList>
-              </van-tab>
-              <van-tab title="审核中">
-                <productList :list="nowList" @del="del" @detailBtn="detailBtn"></productList>
-              </van-tab>
-              <van-tab title="已发布">
-                <productList :list="pastList" @del="del" @detailBtn="detailBtn"></productList>
-              </van-tab>
-            </van-tabs>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-import NavBar from '@/layout/common/topInfo.vue';
-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() {
-    return {
-      // 头部标题
-      title: '',
-      // meta为true
-      isleftarrow: '',
-      // 返回
-      navShow: true,
-      // 标签
-      active: '1',
-      //待发布
-      nextList: [],
-      //审核中
-      nowList: [],
-      //已发布
-      pastList: [],
-    };
-  },
-  async created() {
-    await this.search();
-  },
-  methods: {
-    ...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);
-      }
-      //审核中
-      res = await this.productQuery({ userid, status: 0 });
-      if (this.$checkRes(res)) {
-        this.$set(this, `nowList`, res.data);
-      }
-      //已发布
-      res = await this.productQuery({ userid, status: 1 });
-      if (this.$checkRes(res)) {
-        this.$set(this, `pastList`, res.data);
-      }
-    },
-    //点击发布
-    add() {
-      this.$router.push({ path: './fabu' });
-    },
-    // 发布,编辑
-    detailBtn(data) {
-      if (data.status == '0' || data.status == '1') {
-        this.$router.push({ path: './fabu', query: { id: data.id } });
-      } else {
-        console.log(data);
-      }
-    },
-    //删除
-    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);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: '信息发布成功',
-          type: 'success',
-        });
-        this.search();
-      } else {
-        this.$message({
-          message: res.errmsg,
-          type: 'error',
-        });
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-  },
-  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;
-  .two {
-    text-align: center;
-    margin: 5px 0px;
-    border-radius: 10px;
-  }
-}
-/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>