rjy преди 4 години
родител
ревизия
ea2a1be74b
променени са 3 файла, в които са добавени 215 реда и са изтрити 18 реда
  1. 7 0
      src/router/index.js
  2. 35 18
      src/views/notice/index.vue
  3. 173 0
      src/views/notice/productForm.vue

+ 7 - 0
src/router/index.js

@@ -182,6 +182,13 @@ const live = [
         meta: { title: '通知详情' },
         component: () => import('../views/notice/index.vue'),
       },
+      //技术成果征集信息
+      {
+        path: '/notice/productForm',
+        name: 'id',
+        meta: { title: '通知详情' },
+        component: () => import('../views/notice/productForm.vue'),
+      },
     ],
   },
   //企业-信息管理

+ 35 - 18
src/views/notice/index.vue

@@ -2,17 +2,15 @@
   <div id="index">
     <el-row>
       <el-col :span="24">
-        <el-col class="bt">通知标题</el-col>
-        <el-col :span="2" class="ly">来源:</el-col>
-        <el-col :span="8" class="block">
-          <span class="demonstration">发布时间</span>
-          <el-date-picker v-model="value1" type="date" placeholder="选择日期"> </el-date-picker>
-        </el-col>
-        <el-col :data="data">通知内容:</el-col>
-        <el-col>
-          <el-button type="primary">科技成果信息征集</el-button>
-        </el-col>
-        <el-button type="primary">科技需求信息征集</el-button>
+        <div class="w_1200">
+          <el-col class="bt">{{ noticeInfo.title }}</el-col>
+          <el-col :span="19" class="ly">来源:{{ noticeInfo.source }}</el-col>
+          <el-col :span="5">时间:{{ noticeInfo.create_time }}</el-col>
+          <el-col :span="24" v-html="noticeInfo.content"></el-col>
+          <el-col class="cg">
+            <el-button type="primary" @click="clickk">信息申报</el-button>
+          </el-col>
+        </div>
       </el-col>
     </el-row>
   </div>
@@ -20,17 +18,31 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+import productForm from './productForm.vue';
+const { mapActions: notice } = createNamespacedHelpers('notice');
 export default {
   name: 'index',
   props: {},
   components: {},
   data: function() {
     return {
-      value1: '',
+      noticeInfo: {},
     };
   },
-  created() {},
-  methods: {},
+  created() {
+    this.search();
+  },
+  methods: {
+    ...notice(['query']),
+    // 列表
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let arr = await this.query({ skip, limit, ...info });
+      this.$set(this, `noticeInfo`, arr.data[0]);
+    },
+    clickk() {
+      this.$router.push({ path: '/notice/productForm', query: { id: 1 } });
+    },
+  },
   computed: {
     ...mapState(['user']),
     pageTitle() {
@@ -44,14 +56,19 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.w_1200 {
+  width: 80%;
+  margin: 0 auto;
+}
 .bt {
+  font-size: 18px;
   text-align: center;
   margin-top: 10px;
 }
-.ly {
-  margin-left: 720px;
+.cg {
+  margin: 10px 0 5px 730px;
 }
-.block {
-  margin-left: 400px;
+.xq {
+  margin: 0 0 10px 900px;
 }
 </style>

+ 173 - 0
src/views/notice/productForm.vue

@@ -0,0 +1,173 @@
+<template>
+  <div id="productForm">
+    <el-row>
+      <div class="w_1200">
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="技术成果信息征集" name="first"></el-tab-pane>
+          <el-tab-pane label="科技需求信息征集" name="second"></el-tab-pane>
+        </el-tabs>
+        <el-col :span="24">
+          <el-col :span="24">
+            <h3>企业信息</h3>
+            <el-col :span="24">
+              <span>企业名称:</span>
+              <el-input v-model="form.company" placeholder="请输入企业名称"></el-input>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>注册类型:</span>
+                <el-input v-model="form.type" placeholder="请输入注册类型"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>组织机构代码:</span>
+                <el-input v-model="form.zzjgdm" placeholder="请输入组织机构代码"></el-input>
+              </el-col>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>注册时间:</span>
+                <el-input v-model="form.companydate" placeholder="请输入注册时间"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>注册资金:</span>
+                <el-input v-model="form.companycapital" placeholder="请输入注册资金"></el-input>
+              </el-col>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>企业法人:</span>
+                <el-input v-model="form.companyperson" placeholder="请输入企业法人"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>企业网站:</span>
+                <el-input v-model="form.companyweb" placeholder="请输入企业网站"></el-input>
+              </el-col>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>上年度企业总收入:</span>
+                <el-input v-model="form.sndqyzsr" placeholder="请输入上年度企业总收入"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>上年度研发费用:</span>
+                <el-input v-model="form.sndyffy" placeholder="请输入上年度研发费用"></el-input>
+              </el-col>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>企业总人数:</span>
+                <el-input v-model="form.companytotal" placeholder="请输入企业总人数"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>专&兼职研发人数:</span>
+                <el-input v-model="form.zjzyfrs" placeholder="请输入专&兼职研发人数"></el-input>
+              </el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24">
+            <h3>技术需求</h3>
+            <el-col :span="24">
+              <span>技术难题名称:</span>
+              <el-input v-model="form.name" placeholder="请输入技术难题名称"></el-input>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>需求紧急程度:</span>
+                <el-input v-model="form.degreeurgency" placeholder="请输入需求紧急程度"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>所属领域:</span>
+                <el-input v-model="form.field" placeholder="请输入所属领域"></el-input>
+              </el-col>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>合作方式:</span>
+                <el-input v-model="form.cooperation" placeholder="请输入合作方式"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>投资预算:</span>
+                <el-input v-model="form.budget" placeholder="请输入投资预算"></el-input>
+              </el-col>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>技术难题说明:</span>
+                <el-input v-model="form.requirementdesc" placeholder="请输入技术难题说明"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>预期技术目标描述:</span>
+                <el-input v-model="form.expect" placeholder="请输入预期技术目标描述"></el-input>
+              </el-col>
+            </el-col>
+            <el-col :span="24">
+              <el-col :span="12">
+                <span>需求现状及应对措施:</span>
+                <el-input v-model="form.present" placeholder="请输入需求现状及应对措施"></el-input>
+              </el-col>
+              <el-col :span="12">
+                <span>合作条件及要求:</span>
+                <el-input v-model="form.condition" placeholder="请输入合作条件及要求"></el-input>
+              </el-col>
+            </el-col>
+
+            <el-button type="primary" @click="isenableBtn()">保存</el-button>
+          </el-col>
+        </el-col>
+      </div>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: notice } = createNamespacedHelpers('notice');
+export default {
+  name: 'productForm',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      activeName: 'second',
+      form: {},
+    };
+  },
+  created() {},
+  methods: {
+    async isenableBtn() {
+      let arr = await this.query();
+      let data = arr.data.filter(i => i.isenable == '1');
+      if (data.length > 0 && this.noticeInfo.isenable == '1') {
+        alert('已有信息启用');
+      } else {
+        console.log(this.noticeInfo);
+        let res = await this.update(this.noticeInfo);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '添加信息成功',
+            type: 'success',
+          });
+        }
+        this.handleClose();
+      }
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 80%;
+  margin: 0 auto;
+}
+</style>