wxy 4 år sedan
förälder
incheckning
a4ce0577b6

+ 6 - 0
src/router/index.js

@@ -106,6 +106,12 @@ const routes = [
     meta: { title: '展会管理', isleftarrow: true },
     component: () => import('../views/userCenter/dock/index.vue'),
   },
+  {
+    path: '/userCenter/dock/apply',
+    name: 'apply',
+    meta: { title: '申请', isleftarrow: true },
+    component: () => import('../views/userCenter/dock/apply.vue'),
+  },
   // 用户-基本信息
   {
     path: '/userCenter/user/index',

+ 3 - 3
src/views/user/parts/clickBtn.vue

@@ -5,9 +5,9 @@
         <span v-if="user.role == '4' || user.role == '5' || user.role == '6'">
           <van-cell is-link title="基本信息" @click="$router.push({ path: '/userCenter/user/index' })" />
           <van-cell is-link title="我的发布" @click="$router.push({ path: '/userCenter/myProduct/index' })" />
-          <van-cell is-link title="事项管理" @click="$router.push({ path: '/userCenter/matter/index' })" />
-          <!--<van-cell is-link title="展会管理" @click="$router.push({ path: '/userCenter/dock/index' })" />
-          <van-cell is-link title="退出登录" @click="$router.push({ path: '/userCenter/out/index' })" /> -->
+          <!-- <van-cell is-link title="事项管理" @click="$router.push({ path: '/userCenter/matter/index' })" /> -->
+          <van-cell is-link title="展会管理" @click="$router.push({ path: '/userCenter/dock/index' })" />
+          <!--<van-cell is-link title="退出登录" @click="$router.push({ path: '/userCenter/out/index' })" /> -->
         </span>
         <span v-else>
           <span v-if="user.role == '0'">

+ 59 - 58
src/views/userCenter/dock/index.vue

@@ -6,21 +6,13 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <el-col :span="24" class="one">
-            <van-tabs v-model="active" animated>
-              <van-tab>
-                <template #title>
-                  <van-icon name="live" />
-                  <p>下期直播</p>
-                </template>
-                <nextList :nextLive="nextLive"></nextList>
+          <el-col :span="24">
+            <van-tabs v-model="active">
+              <van-tab title="下期直播">
+                <docklist :list="nextList" @detailBtn="detailBtn" :province="province" :place="place"></docklist>
               </van-tab>
-              <van-tab>
-                <template #title>
-                  <van-icon name="live" />
-                  <p>已往直播</p>
-                </template>
-                <alreadyList :alreadyLive="alreadyLive"></alreadyList>
+              <van-tab title="以往直播">
+                <docklist :list="pastList" @detailBtn="detailBtn" :province="province" :place="place"></docklist>
               </van-tab>
             </van-tabs>
           </el-col>
@@ -31,54 +23,78 @@
 </template>
 
 <script>
+import docklist from './parts/docklist.vue';
 import NavBar from '@/layout/common/topInfo.vue';
-import nextList from './parts/nextList.vue';
-import alreadyList from './parts/alreadyList.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
+const { mapActions: place } = createNamespacedHelpers('place');
 export default {
   name: 'index',
   props: {},
   components: {
     NavBar,
-    nextList, //下期直播
-    alreadyList, //已往直播
+    docklist,
   },
-  data: () => ({
-    // 头部标题
-    title: '',
-    // meta为true
-    isleftarrow: '',
-    // 返回
-    navShow: true,
-    // 标签
-    active: '1',
-    // 下期直播
-    nextLive: [],
-    // 已往直播
-    alreadyLive: [],
-  }),
-  created() {
-    this.searchList();
+  data: function() {
+    return {
+      // 头部标题
+      title: '',
+      // meta为true
+      isleftarrow: '',
+      // 返回
+      navShow: true,
+      active: '1',
+      // 下期直播
+      nextList: [],
+      // 以往直播
+      pastList: [],
+      // 省
+      province: [],
+      // 市
+      place: [],
+    };
+  },
+  async created() {
+    await this.searchplace();
+    await this.search();
   },
-  computed: {},
   methods: {
-    ...dock({ dockQuery: 'query' }),
-    async searchList({ skip = 0, limit = 10, ...info } = {}) {
-      let res = await this.dockQuery({ skip, limit, status: 0, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `nextLive`, res.data);
+    ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
+    ...dock(['query', 'delete', 'update', 'create']),
+    async search() {
+      let res = await this.query({ status: '0' });
+      if (this.$checkRes(res)) this.$set(this, `nextList`, res.data);
+      res = await this.query({ status: '2' });
+      if (this.$checkRes(res)) this.$set(this, `pastList`, res.data);
+    },
+    // 申请
+    detailBtn(data) {
+      if (data.status == '0') {
+        this.$router.push({ path: '/userCenter/matter/apply', query: { id: data.id } });
+      } else {
+        console.log(data);
       }
-      res = await this.dockQuery({ skip, limit, status: 2, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `alreadyLive`, res.data);
+    },
+    // 查询省市
+    async searchplace() {
+      let res = await this.palcequery({ level: 1 });
+      let arr = await this.palcequery({ level: 2 });
+      if (res || arr) {
+        this.$set(this, `province`, res.data);
+        this.$set(this, `place`, arr.data);
       }
     },
   },
+  computed: {
+    ...mapState(['user']),
+  },
   mounted() {
     this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;
   },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
 };
 </script>
 
@@ -92,23 +108,8 @@ export default {
 .top {
   height: 46px;
   overflow: hidden;
-  position: relative;
-  z-index: 999;
 }
 .main {
   min-height: 570px;
 }
-/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>

+ 104 - 0
src/views/userCenter/dock/parts/docklist.vue

@@ -0,0 +1,104 @@
+<template>
+  <div id="docklist">
+    <el-row>
+      <el-col :span="24" class="docklist">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p>
+            <span class="textOver">[{{ item.room_id }}]</span>
+            <span class="textOver">{{ item.title }}</span>
+          </p>
+          <p>
+            <span class="textOver">负责人:{{ item.adminuser }}</span>
+            <span class="textOver">手机号:{{ item.phone }}</span>
+          </p>
+          <p>
+            <span class="textOver">地址:{{ getprovince(item.province) }}-{{ getplace(item.place) }}</span>
+            <span class="textOver">状态:{{ item.status == '0' ? '准备中' : item.status == '1' ? '开始' : '结束' }}</span>
+          </p>
+          <el-col :span="24" class="btn">
+            <!-- <el-button type="primary" size="mini" @click="detailBtn(item)">{{
+              item.status == '0' || item.status == '1' ? '编辑/状态审核' : '查看成果'
+            }}</el-button> -->
+            <el-button v-if="item.status === '0'" type="primary" size="mini" @click="detailBtn(item)">申请</el-button>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'docklist',
+  props: {
+    list: { type: Array },
+    // 省
+    province: { type: Array, default: () => [] },
+    // 市
+    place: { type: Array, default: () => [] },
+  },
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {
+    // 过滤省
+    getprovince(item) {
+      let res = this.province.find(i => i.code == item);
+      if (res) return res.name;
+    },
+    // 过滤市
+    getplace(item) {
+      let res = this.place.find(i => i.code == item);
+      if (res) return res.name;
+    },
+    detailBtn(data) {
+      this.$emit('detailBtn', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.docklist {
+  padding: 0 10px;
+  .list {
+    border-bottom: 1px dashed #ccc;
+    padding: 10px 0;
+    p {
+      font-size: 16px;
+      color: #666;
+      padding: 0 0 5px 0;
+      span {
+        display: inline-block;
+        width: 50%;
+      }
+    }
+    p:nth-child(1) {
+      font-size: 18px;
+      font-weight: bold;
+      span:nth-child(1) {
+        width: 15%;
+        color: #ff0000;
+      }
+      span:nth-child(2) {
+        width: 85%;
+      }
+    }
+    .btn {
+      text-align: center;
+    }
+  }
+}
+</style>

+ 328 - 22
src/views/userCenter/matter/apply.vue

@@ -2,51 +2,357 @@
   <div id="apply">
     <el-row>
       <el-col :span="24">
-        <el-col :span="24" class="top">
-          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
-        </el-col>
+        <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 name="patent" label="专利信息">
+              <template #input>
+                <el-button type="primary" size="mini" @click="addPatent">添加</el-button>
+                <el-button type="primary" size="mini" @click="viewPatent">查看</el-button>
+              </template>
+            </van-field>
+            <!-- <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>
+    <van-dialog v-model="show" title="添加专利信息" :showConfirmButton="false" :closeOnClickOverlay="true">
+      <van-form>
+        <van-field v-model="patentform.patentinfo" name="名称" label="名称" placeholder="名称" />
+        <van-field name="radio" label="专利状态">
+          <template #input>
+            <van-radio-group v-model="patentform.patentstatus" direction="horizontal">
+              <van-radio name="已申请">已申请</van-radio>
+              <van-radio name="已授权">已授权</van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
+        <div style="margin: 16px;">
+          <van-button round block type="info" @click="patentSubmit">
+            提交
+          </van-button>
+        </div>
+      </van-form>
+    </van-dialog>
+    <van-dialog v-model="patentshow" title="查看专利信息" :showConfirmButton="false" :closeOnClickOverlay="true">
+      <div class="patentList" v-for="(item, index) in patentList" :key="index">
+        <p class="textOver">{{ item.patentinfo }}</p>
+        <p>专利状态:{{ item.patentstatus }}</p>
+        <p>
+          <el-button type="primary" size="mini" @click="delPatent(index, item)">刪除</el-button>
+        </p>
+      </div>
+    </van-dialog>
   </div>
 </template>
 
 <script>
+import upload from '@/components/upload.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-import NavBar from '@/layout/common/topInfo.vue';
 export default {
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
   name: 'apply',
-  props: {},
+  props: {
+    type: { type: String, default: '0' },
+    form: { type: Object },
+    fieldList: { type: Array },
+    cooperationList: { type: Array },
+    achievestatusList: { type: Array },
+  },
   components: {
-    NavBar,
+    upload,
   },
   data: function() {
     return {
-      // 头部标题
-      title: '',
-      // meta为true
-      isleftarrow: '',
-      // 返回
-      navShow: true,
+      field: [],
+      fieldpic: false,
+      cooperation: [],
+      cooperationpic: false,
+      achievestatus: [],
+      achievestatuspic: false,
+      // 专利信息
+      show: false,
+      patentform: {},
+      patentshow: false,
+      patentList: [],
     };
   },
   created() {},
-  methods: {},
+  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);
+    },
+    // 添加专利信息
+    addPatent() {
+      this.show = true;
+    },
+    // 提交专利信息
+    patentSubmit() {
+      this.patentList.push(this.patentform);
+      this.show = false;
+    },
+    // 查看专利信息
+    viewPatent() {
+      this.patentshow = true;
+    },
+    // 删除专利信息
+    delPatent(index, val) {
+      this.patentList.splice(index, 1);
+      this.$notify({
+        message: '删除成功',
+        type: 'success',
+      });
+      this.patentshow = false;
+    },
+    onSubmit() {
+      this.form.patent = this.patentList;
+      this.$emit('onSubmit', { data: this.form });
+    },
+    // 查询专利信息
+    searchpatent() {
+      let data = this.form;
+      if (data.patent) {
+        console.log(data.patent);
+        this.$set(this, `patentList`, data.patent);
+      }
+    },
+  },
+  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();
+      },
+    },
+    form: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        this.searchpatent();
+      },
+    },
+  },
   computed: {
     ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
   },
-  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;
+.patentList {
+  padding: 0 10px;
+  border-bottom: 1px dashed #ccc;
+  p {
+    font-size: 16px;
+    color: #666;
+    padding: 0 0 5px 0;
+  }
+  p:nth-child(1) {
+    font-size: 18px;
+    color: #000;
+    font-weight: bold;
+  }
+  p:nth-child(3) {
+    text-align: center;
+  }
 }
 </style>