guhongwei 4 years ago
parent
commit
b4302a0180

File diff suppressed because it is too large
+ 22 - 6
src/assets/icon/iconfont.css


BIN
src/assets/icon/iconfont.eot


File diff suppressed because it is too large
+ 1 - 1
src/assets/icon/iconfont.js


+ 28 - 0
src/assets/icon/iconfont.json

@@ -5,6 +5,34 @@
   "css_prefix_text": "icon",
   "description": "",
   "glyphs": [
+    {
+      "icon_id": "446769",
+      "name": "超市",
+      "font_class": "chaoshi1",
+      "unicode": "e6a7",
+      "unicode_decimal": 59047
+    },
+    {
+      "icon_id": "18043205",
+      "name": "政策",
+      "font_class": "zhengce",
+      "unicode": "e62d",
+      "unicode_decimal": 58925
+    },
+    {
+      "icon_id": "19985212",
+      "name": "首页-选中",
+      "font_class": "index-copy",
+      "unicode": "e622",
+      "unicode_decimal": 58914
+    },
+    {
+      "icon_id": "20567860",
+      "name": "基本信息",
+      "font_class": "jibenxinxi",
+      "unicode": "e715",
+      "unicode_decimal": 59157
+    },
     {
       "icon_id": "3315378",
       "name": "新闻资讯",

File diff suppressed because it is too large
+ 12 - 0
src/assets/icon/iconfont.svg


BIN
src/assets/icon/iconfont.ttf


BIN
src/assets/icon/iconfont.woff


BIN
src/assets/icon/iconfont.woff2


+ 47 - 35
src/router/index.js

@@ -260,41 +260,53 @@ const web = [
         component: () => import('../views/adminCenter/company/basic/index.vue'),
       },
       {
-        path: '/adminCenter/company/policy',
-        name: 'company_policy_index',
-        meta: { title: '政策服务管理' },
-        component: () => import('../views/adminCenter/company/policy/index.vue'),
-      },
-      {
-        path: '/adminCenter/company/policy/detail',
-        name: 'company_policy_detail',
-        meta: { title: '政策服务申请' },
-        component: () => import('../views/adminCenter/company/policy/detail.vue'),
-      },
-      {
-        path: '/adminCenter/company/ticket',
-        name: 'company_ticket_index',
-        meta: { title: '创新券管理' },
-        component: () => import('../views/adminCenter/company/ticket/index.vue'),
-      },
-      {
-        path: '/adminCenter/company/ticket/detail',
-        name: 'company_ticket_detail',
-        meta: { title: '创新券信息管理' },
-        component: () => import('../views/adminCenter/company/ticket/detail.vue'),
-      },
-      {
-        path: '/adminCenter/company/ticket/info',
-        name: 'company_ticket_info',
-        meta: { title: '创新券信息查看' },
-        component: () => import('../views/adminCenter/company/ticket/info.vue'),
-      },
-      {
-        path: '/adminCenter/company/ticket/update',
-        name: 'company_ticket_update',
-        meta: { title: '创新券信息重申' },
-        component: () => import('../views/adminCenter/company/ticket/update.vue'),
-      },
+        path: '/adminCenter/company/product',
+        name: 'company_product_index',
+        meta: { title: '技术超市' },
+        component: () => import('../views/adminCenter/company/product/index.vue'),
+      },
+      {
+        path: '/adminCenter/company/product/detail',
+        name: 'company_product_index',
+        meta: { title: '技术超市-信息管理' },
+        component: () => import('../views/adminCenter/company/product/detail.vue'),
+      },
+      // {
+      //   path: '/adminCenter/company/policy',
+      //   name: 'company_policy_index',
+      //   meta: { title: '政策服务管理' },
+      //   component: () => import('../views/adminCenter/company/policy/index.vue'),
+      // },
+      // {
+      //   path: '/adminCenter/company/policy/detail',
+      //   name: 'company_policy_detail',
+      //   meta: { title: '政策服务申请' },
+      //   component: () => import('../views/adminCenter/company/policy/detail.vue'),
+      // },
+      // {
+      //   path: '/adminCenter/company/ticket',
+      //   name: 'company_ticket_index',
+      //   meta: { title: '创新券管理' },
+      //   component: () => import('../views/adminCenter/company/ticket/index.vue'),
+      // },
+      // {
+      //   path: '/adminCenter/company/ticket/detail',
+      //   name: 'company_ticket_detail',
+      //   meta: { title: '创新券信息管理' },
+      //   component: () => import('../views/adminCenter/company/ticket/detail.vue'),
+      // },
+      // {
+      //   path: '/adminCenter/company/ticket/info',
+      //   name: 'company_ticket_info',
+      //   meta: { title: '创新券信息查看' },
+      //   component: () => import('../views/adminCenter/company/ticket/info.vue'),
+      // },
+      // {
+      //   path: '/adminCenter/company/ticket/update',
+      //   name: 'company_ticket_update',
+      //   meta: { title: '创新券信息重申' },
+      //   component: () => import('../views/adminCenter/company/ticket/update.vue'),
+      // },
 
       // 中介机构
       {

+ 164 - 0
src/views/adminCenter/company/product/detail.vue

@@ -0,0 +1,164 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-col :span="24" class="top">
+            <el-button type="primary" size="mini" @click="back">返回</el-button>
+          </el-col>
+          <el-col :span="24" class="down">
+            <one v-if="type == '0'" :form="form" :rules="rules" @back="back" @drSubmit="drSubmit" @onSubmit="onSubmit"></one>
+            <two v-else-if="type == '1'" :form="form" :rules="rules" @back="back" @drSubmit="drSubmit" @onSubmit="onSubmit"></two>
+            <thr v-else-if="type == '2'" :form="form" :rules="rules" @back="back" @drSubmit="drSubmit" @onSubmit="onSubmit"></thr>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import one from './parts/one.vue';
+import two from './parts/two.vue';
+import thr from './parts/thr.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: organization } = createNamespacedHelpers('organization');
+const { mapActions: product } = createNamespacedHelpers('product');
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    one,
+    two,
+    thr,
+  },
+  data: function () {
+    return {
+      form: {},
+      rules: {
+        company: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
+        email: [{ required: true, message: '请输入电子邮箱', trigger: 'blur' }],
+        contacts: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
+        phone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
+        qqwx: [{ required: true, message: '请输入qq/微信', trigger: 'blur' }],
+        name: [{ required: true, message: '请输入信息名称', trigger: 'blur' }],
+      },
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...organization({ userFetch: 'fetch' }),
+    ...product(['fetch', 'create', 'update']),
+    async search() {
+      if (this.id) {
+        let res = await this.fetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `form`, res.data);
+        }
+      } else {
+        let res = await this.userFetch(this.user.id);
+        if (this.$checkRes(res)) {
+          let data = {
+            user_id: res.data.id,
+            company: res.data.name,
+            email: res.data.email,
+            contacts: res.data.companyperson,
+            phone: res.data.phone,
+            image: [],
+            roadshow: [],
+            patent: [],
+          };
+          this.$set(this, `form`, data);
+        }
+      }
+    },
+    async drSubmit({ data }) {
+      data.status = '0';
+      data.type = this.type;
+      if (this.id) {
+        let res = await this.update(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息修改成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      } else {
+        let res = await this.create(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '草稿保存成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      }
+    },
+    async onSubmit({ data }) {
+      data.status = '1';
+      data.type = this.type;
+      if (this.id) {
+        let res = await this.update(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息修改成功',
+            type: 'success',
+          });
+          this.back();
+        }
+      } else {
+        let res = await this.create(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '信息发布成功,等待审核',
+            type: 'success',
+          });
+          this.back();
+        }
+      }
+    },
+    back() {
+      this.$router.push({ path: '/adminCenter/company/product', query: { type: this.type } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    type() {
+      return this.$route.query.type;
+    },
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  border-radius: 10px;
+  box-shadow: 0 0 5px #cccccc;
+  padding: 20px;
+  .one {
+    .top {
+      text-align: right;
+      margin: 0 0 10px 0;
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 134 - 0
src/views/adminCenter/company/product/index.vue

@@ -0,0 +1,134 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit" @delete="toDelete">
+            <template #selfbtn>
+              <el-button type="primary" size="mini" @click="toAdd">添加</el-button>
+            </template>
+            <template #options="{ item }">
+              <template v-if="item.prop === 'type'">
+                <el-option v-for="(i, index) in typeList" :key="`type-${index}`" :label="i.label" :value="i.value"></el-option>
+              </template>
+            </template>
+          </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const { productType } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('product');
+export default {
+  name: 'productIndex',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '修改',
+          method: 'edit',
+          display: (item) => {
+            return item.status == '0';
+          },
+        },
+        {
+          label: '删除',
+          method: 'delete',
+          type: 'danger',
+          display: (item) => {
+            return item.status == '0';
+          },
+        },
+      ],
+      fields: [
+        { label: '名称', prop: 'name', filter: true },
+        {
+          label: '信息类型',
+          prop: 'type',
+          format: (i) => {
+            const r = productType.find((f) => f.value === i);
+            if (r) return r.label;
+            return '';
+          },
+        },
+        { label: '联系电话', prop: 'phone' },
+        { label: '时间', prop: 'create_time', showTip: true },
+        {
+          label: '状态',
+          prop: 'status',
+          format: (item) => {
+            return item === '0' ? '草稿' : item === '1' ? '审核中' : item === '2' ? '审核通过' : '审核失败';
+          },
+        },
+      ],
+      typeList: productType,
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...product(['query', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.type = this.type;
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    toAdd() {
+      this.$router.push({ path: '/adminCenter/company/product/detail', query: { type: this.type } });
+    },
+    toEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/company/product/detail', query: { id: data._id, type: this.type } });
+    },
+    async toDelete({ data }) {
+      const res = await this.delete(data._id);
+      if (this.$checkRes(res, '删除成功', '删除失败')) {
+        this.search();
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    type() {
+      return this.$route.query.type;
+    },
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  border-radius: 10px;
+  box-shadow: 0 0 5px #cccccc;
+  padding: 20px;
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 188 - 0
src/views/adminCenter/company/product/parts/one.vue

@@ -0,0 +1,188 @@
+<template>
+  <div id="one">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+            <el-col :span="12" class="text">
+              <el-form-item label="企业名称" prop="company">
+                <el-input v-model="form.company"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="电子邮箱" prop="email">
+                <el-input v-model="form.email"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="联系人" prop="contacts">
+                <el-input v-model="form.contacts"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="联系电话" prop="phone">
+                <el-input v-model="form.phone"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="QQ/微信" prop="qqwx">
+                <el-input v-model="form.qqwx"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="信息名称" prop="name">
+                <el-input v-model="form.name"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="需求紧急程度" prop="demand">
+                <el-select v-model="form.demand" placeholder="">
+                  <el-option label="特急" value="特急"></el-option>
+                  <el-option label="一般" value="一般"></el-option>
+                  <el-option label="长期" value="长期"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="所属领域" prop="field">
+                <el-select v-model="form.field" placeholder="">
+                  <el-option v-for="(item, index) in fieldList" :key="index" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="投资预算" prop="budget">
+                <el-input v-model="form.budget"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="合作方式" prop="cooperation">
+                <el-select v-model="form.condition" placeholder="">
+                  <el-option v-for="(item, index) in conditionList" :key="index" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="技术说明" prop="requirementdesc">
+                <el-input v-model="form.requirementdesc" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="预期目标" prop="expect">
+                <el-input v-model="form.expect" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="需求现状" prop="present">
+                <el-input v-model="form.present" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="合作要求" prop="condition">
+                <el-input v-model="form.condition" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="产品图片(6)" prop="image">
+                <e-upload url="/files/cysci/product_image/upload" :limit="6" v-model="form.image"></e-upload>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="btn">
+              <el-button type="danger" size="mini" @click="back">取消保存</el-button>
+              <el-button type="primary" size="mini" @click="drSubmit('form')">保存草稿</el-button>
+              <el-button type="success" size="mini" @click="onSubmit('form')">提交信息</el-button>
+            </el-col>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const { field, condition } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'one',
+  props: {
+    form: { type: Object },
+    rules: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {
+      fieldList: field,
+      conditionList: condition,
+    };
+  },
+  created() {},
+  methods: {
+    back() {
+      this.$emit('back');
+    },
+    drSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.$emit('drSubmit', { data: this.form });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    onSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.$emit('onSubmit', { data: this.form });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    border: 1px solid #ccc;
+    border-radius: 10px;
+    padding: 10px;
+    .text {
+      border-bottom: 1px dashed #ccc;
+      padding: 15px 0;
+    }
+    .btn {
+      text-align: center;
+      padding: 15px 0;
+    }
+    /deep/.el-form-item {
+      margin: 0;
+    }
+    .el-select {
+      width: 100%;
+    }
+  }
+}
+/deep/.el-input__inner {
+  border: 1px solid #333;
+}
+/deep/.el-textarea__inner {
+  border: 1px solid #333;
+}
+</style>

+ 165 - 0
src/views/adminCenter/company/product/parts/thr.vue

@@ -0,0 +1,165 @@
+<template>
+  <div id="thr">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+            <el-col :span="12" class="text">
+              <el-form-item label="企业名称" prop="company">
+                <el-input v-model="form.company"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="电子邮箱" prop="email">
+                <el-input v-model="form.email"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="联系人" prop="contacts">
+                <el-input v-model="form.contacts"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="联系电话" prop="phone">
+                <el-input v-model="form.phone"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="QQ/微信" prop="qqwx">
+                <el-input v-model="form.qqwx"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="信息名称" prop="name">
+                <el-input v-model="form.name"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="信息属性" prop="messattribute">
+                <el-radio-group v-model="form.messattribute">
+                  <el-radio label="提供方"></el-radio>
+                  <el-radio label="需求方"></el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="需求程度" prop="demand">
+                <el-radio-group v-model="form.demand">
+                  <el-radio label="特急"></el-radio>
+                  <el-radio label="一般"></el-radio>
+                  <el-radio label="长期"></el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="信息描述" prop="informationdesc">
+                <el-input v-model="form.informationdesc" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="核心要素" prop="coreelements">
+                <el-input v-model="form.coreelements" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="价格信息" prop="priceinfo">
+                <el-input v-model="form.priceinfo" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="商务预期" prop="expect">
+                <el-input v-model="form.expect" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="btn">
+              <el-button type="danger" size="mini" @click="back">取消保存</el-button>
+              <el-button type="primary" size="mini" @click="drSubmit('form')">保存草稿</el-button>
+              <el-button type="success" size="mini" @click="onSubmit('form')">提交信息</el-button>
+            </el-col>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'thr',
+  props: {
+    form: { type: Object },
+    rules: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    back() {
+      this.$emit('back');
+    },
+    drSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.$emit('drSubmit', { data: this.form });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    onSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.$emit('onSubmit', { data: this.form });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    border: 1px solid #ccc;
+    border-radius: 10px;
+    padding: 10px;
+    .text {
+      border-bottom: 1px dashed #ccc;
+      padding: 15px 0;
+    }
+    .btn {
+      text-align: center;
+      padding: 15px 0;
+    }
+    /deep/.el-form-item {
+      margin: 0;
+    }
+  }
+}
+/deep/.el-input__inner {
+  border: 1px solid #333;
+}
+/deep/.el-textarea__inner {
+  border: 1px solid #333;
+}
+</style>

+ 215 - 0
src/views/adminCenter/company/product/parts/two.vue

@@ -0,0 +1,215 @@
+<template>
+  <div id="two">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+            <el-col :span="12" class="text">
+              <el-form-item label="企业名称" prop="company">
+                <el-input v-model="form.company"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="电子邮箱" prop="email">
+                <el-input v-model="form.email"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="联系人" prop="contacts">
+                <el-input v-model="form.contacts"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="联系电话" prop="phone">
+                <el-input v-model="form.phone"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="QQ/微信" prop="qqwx">
+                <el-input v-model="form.qqwx"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="信息名称" prop="name">
+                <el-input v-model="form.name"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="所属领域" prop="field">
+                <el-select v-model="form.field" placeholder="">
+                  <el-option v-for="(item, index) in fieldList" :key="index" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="合作方式" prop="condition">
+                <el-select v-model="form.condition" placeholder="">
+                  <el-option v-for="(item, index) in conditionList" :key="index" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="成果状态" prop="achievestatus">
+                <el-select v-model="form.achievestatus" placeholder="">
+                  <el-option v-for="(item, index) in achievestatusList" :key="index" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="成果权属" prop="achieveown">
+                <el-input v-model="form.achieveown"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="成果来源" prop="achievesource">
+                <el-select v-model="form.achievesource" placeholder="">
+                  <el-option v-for="(item, index) in achievesourceList" :key="index" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" class="text">
+              <el-form-item label="意向价格" prop="intentionprice">
+                <el-input v-model="form.intentionprice"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="专利信息" prop="patent">
+                <!-- <e-upload url="/files/cysci/product_roadshow/upload" :limit="1" v-model="form.patent" type="text"></e-upload> -->
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="项目路演" prop="roadshow">
+                <e-upload url="/files/cysci/product_roadshow/upload" :limit="1" v-model="form.roadshow" type="text"></e-upload>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="成果简介" prop="achievebrief">
+                <el-input v-model="form.achievebrief" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="技术特点" prop="features">
+                <el-input v-model="form.features" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="技术团队" prop="team">
+                <el-input v-model="form.team" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="商业预期" prop="expect">
+                <el-input v-model="form.expect" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="合作要求" prop="condition">
+                <el-input v-model="form.condition" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-form-item label="产品图片(6)" prop="image">
+                <e-upload url="/files/cysci/product_image/upload" :limit="6" v-model="form.image"></e-upload>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="btn">
+              <el-button type="danger" size="mini" @click="back">取消保存</el-button>
+              <el-button type="primary" size="mini" @click="drSubmit('form')">保存草稿</el-button>
+              <el-button type="success" size="mini" @click="onSubmit('form')">提交信息</el-button>
+            </el-col>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const { field, condition, achievestatus, achievesource } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'two',
+  props: {
+    form: { type: Object },
+    rules: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {
+      fieldList: field,
+      conditionList: condition,
+      achievestatusList: achievestatus,
+      achievesourceList: achievesource,
+    };
+  },
+  created() {},
+  methods: {
+    back() {
+      this.$emit('back');
+    },
+    drSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.$emit('drSubmit', { data: this.form });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    onSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.$emit('onSubmit', { data: this.form });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    border: 1px solid #ccc;
+    border-radius: 10px;
+    padding: 10px;
+    .text {
+      border-bottom: 1px dashed #ccc;
+      padding: 15px 0;
+    }
+    .btn {
+      text-align: center;
+      padding: 15px 0;
+    }
+    /deep/.el-form-item {
+      margin: 0;
+    }
+    .el-select {
+      width: 100%;
+    }
+  }
+}
+/deep/.el-input__inner {
+  border: 1px solid #333;
+}
+/deep/.el-textarea__inner {
+  border: 1px solid #333;
+}
+</style>

+ 1 - 1
vue.config.js

@@ -23,7 +23,7 @@ module.exports = {
         target: 'http://broadcast.waityou24.cn',
       },
       '/api': {
-        target: 'http://cccysci.waityou24.cn', //http://192.168.1.19:9200
+        target: 'http://192.168.1.19:9200', //http://192.168.1.19:9200
         changeOrigin: true,
         ws: false,
       },