guhongwei hace 4 años
padre
commit
3e0dd6a8c2

+ 21 - 0
src/router/index.js

@@ -170,6 +170,27 @@ export default new Router({
           component: () => import('../views/patent/detail.vue'),
           meta: { title: 'e专利信息管理' },
         },
+        // 调研调查
+        {
+          path: '/investigation',
+          component: () => import('../views/investigation/index.vue'),
+          meta: { title: '调研调查' },
+        },
+        {
+          path: '/investigation/detail',
+          component: () => import('../views/investigation/detail.vue'),
+          meta: { title: '调研调查信息管理' },
+        },
+        {
+          path: '/investigation/project',
+          component: () => import('../views/investigation/project.vue'),
+          meta: { title: '项目征集信息' },
+        },
+        {
+          path: '/investigation/projectDetail',
+          component: () => import('../views/investigation/projectDetail.vue'),
+          meta: { title: '项目征集详细信息' },
+        },
         // 培训问诊
         {
           path: '/train',

+ 5 - 0
src/store/index.js

@@ -35,6 +35,9 @@ import notice from '@common/src/store/notice';
 import science from '@common/src/store/science';
 // e专利
 import patent from '@common/src/store/patent';
+// 调研调查
+import question from '@common/src/store/question';
+import projectsolic from '@common/src/store/projectsolic';
 // 字典表
 import category from '@common/src/store/category';
 import code from '@common/src/store/code';
@@ -63,6 +66,8 @@ export default new Vuex.Store({
     notice,
     science,
     patent,
+    question,
+    projectsolic,
     category,
     code,
     place,

+ 147 - 0
src/views/investigation/detail.vue

@@ -0,0 +1,147 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="back">
+          <el-button type="primary" size="mini" @click="back">返回</el-button>
+        </el-col>
+        <el-col :span="24" class="detail">
+          <data-form :data="form" :fields="formFields" :rules="rules" @save="toSave">
+            <template #custom="{item,form}">
+              <template v-if="item.model == 'img_path'">
+                <upload
+                  :limit="1"
+                  :data="form.img_path"
+                  type="img_path"
+                  :url="'/files/platlive_imgpath/upload'"
+                  @upload="uploadSuccess"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+              <template v-else-if="item.model == 'file_path'">
+                <upload
+                  :limit="1"
+                  :data="form.file_path"
+                  type="file_path"
+                  listType=""
+                  :url="'/files/platlive_filepath/upload'"
+                  @upload="uploadSuccess"
+                  @delete="uploadDelete"
+                ></upload>
+              </template>
+            </template>
+          </data-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataForm from '@common/src/components/frame/form.vue';
+import upload from '@common/src/components/frame/upload.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: question } = createNamespacedHelpers('question');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'detail',
+  props: {},
+  components: {
+    dataForm,
+    upload,
+  },
+  data: function() {
+    return {
+      formFields: [
+        { label: '信息标题', model: 'title' },
+        { label: '发布时间', model: 'create_date', type: 'date' },
+        { label: '信息来源', model: 'origin' },
+        { label: '图片', model: 'img_path', custom: true },
+        { label: '附件', model: 'file_path', custom: true },
+        { label: '信息内容', model: 'content', type: 'editor' },
+      ],
+      form: {},
+      rules: {
+        // create_number: [{ required: true, message: '申请号', trigger: 'blur' }],
+        // create_date: [{ type: 'string', required: true, message: '申请日', trigger: 'change' }],
+        // name: [{ required: true, message: '请输入标题', trigger: 'blur' }],
+        // success_number: [{ required: true, message: '公开(公告)号', trigger: 'blur' }],
+        // success_date: [{ type: 'string', required: true, message: '公开(公告)日', trigger: 'change' }],
+        // inventor: [{ required: true, message: '发明人', trigger: 'blur' }],
+        // address: [{ required: false, message: '发明人地址', trigger: 'blur' }],
+        // apply_personal: [{ required: false, message: '申请人', trigger: 'blur' }],
+        // term: [{ required: false, message: '专利有效性', trigger: 'blur' }],
+        // type: [{ required: false, message: '专利类型', trigger: 'blur' }],
+        // agent_personal: [{ required: false, message: '代理人', trigger: 'blur' }],
+        // agent: [{ required: false, message: '代理机构', trigger: 'blur' }],
+        // abstract: [{ required: false, message: '摘要', trigger: 'blur' }],
+      },
+    };
+  },
+  async created() {
+    if (this.id) await this.search();
+  },
+  methods: {
+    ...question(['fetch', 'create', 'update']),
+    // 查询详情
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+      }
+    },
+    // 提交
+    async toSave({ data }) {
+      if (data.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: '/investigation' });
+    },
+    // 图片上传
+    uploadSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, data.uri);
+    },
+    // 删除图片
+    uploadDelete(data) {
+      this.$set(this.form, `${data.type}`, null);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .back {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 98 - 0
src/views/investigation/index.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="add">添加</el-button>
+        </el-col>
+        <el-col :span="24" class="down">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView" @edit="toEdit" @delete="toDelete"></data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: question } = createNamespacedHelpers('question');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: { dataTable },
+  data: function() {
+    return {
+      opera: [
+        {
+          label: '查看项目征集',
+          method: 'view',
+        },
+        {
+          label: '编辑',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '信息标题', prop: 'title', filter: 'input' },
+        { label: '信息来源', prop: 'origin' },
+        { label: '发布时间', prop: 'create_date' },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...question(['query', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 添加
+    add() {
+      this.$router.push({ path: '/investigation/detail' });
+    },
+    // 修改
+    toEdit({ data }) {
+      this.$router.push({ path: '/investigation/detail', query: { id: data.id } });
+    },
+    // 删除
+    async toDelete({ data }) {
+      const res = await this.delete(data.id);
+      if (this.$checkRes(res, '删除成功', '删除失败' || res.errmsg)) {
+        this.search();
+      }
+    },
+    // 查看
+    toView({ data }) {
+      this.$router.push({ path: '/investigation/project', query: { id: data._id } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 94 - 0
src/views/investigation/project.vue

@@ -0,0 +1,94 @@
+<template>
+  <div id="project">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="back">返回列表</el-button>
+        </el-col>
+        <el-col :span="24" class="down">
+          <el-col :span="24" class="title">
+            2022年度吉林省科技发展计划高新技术领域项目建议书
+          </el-col>
+          <el-col :span="24" class="list">
+            <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView"></data-table>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: projectsolic } = createNamespacedHelpers('projectsolic');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'project',
+  props: {},
+  components: { dataTable },
+  data: function() {
+    return {
+      opera: [
+        {
+          label: '详情',
+          method: 'view',
+        },
+      ],
+      fields: [
+        { label: '项目名称', prop: 'name', showTip: true },
+        { label: '项目负责人', prop: 'pro_user', showTip: true },
+        { label: '联系电话', prop: 'pro_phone', showTip: true },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...projectsolic(['query']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, question_id: this.id, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 查看详情
+    toView({ data }) {
+      this.$router.push({ path: '/investigation/projectDetail', query: { id: data.id } });
+    },
+    // 返回列表
+    back() {
+      this.$router.push({ path: '/investigation' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+  .down {
+    .title {
+      text-align: center;
+      font-size: 25px;
+      margin: 0 0 15px 0;
+    }
+  }
+}
+</style>

+ 310 - 0
src/views/investigation/projectDetail.vue

@@ -0,0 +1,310 @@
+<template>
+  <div id="projectDetail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-button type="primary" size="mini" @click="back">返回列表</el-button>
+        </el-col>
+        <el-col :span="24" class="down">
+          <el-col :span="24" class="downtitle">
+            2022年度吉林省科技发展计划高新技术领域项目建议书
+          </el-col>
+          <el-col :span="24" class="list">
+            <el-col :span="24" class="one">
+              <el-col :span="24" class="txt">
+                <span>项目基本信息</span>
+              </el-col>
+              <el-col :span="24" class="info">
+                <el-col :span="24" class="infoMess">
+                  <el-col :span="3" class="title">
+                    项目名称:
+                  </el-col>
+                  <el-col :span="21" class="message textOver">
+                    {{ form.name }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    项目负责人:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.pro_user || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    联系电话:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.pro_phone || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    技术阶段:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.techol_stage || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    技术水平:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.techol_level || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    所属领域:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.field || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    市场预估:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.scale || '暂无' }}
+                  </el-col>
+                </el-col>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="one">
+              <el-col :span="24" class="txt">
+                <span>项目建议单位</span>
+              </el-col>
+              <el-col :span="24" class="info">
+                <el-col :span="24" class="infoMess">
+                  <el-col :span="3" class="title">
+                    建议单位:
+                  </el-col>
+                  <el-col :span="21" class="message textOver">
+                    {{ form.proposal_company }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    联系人:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.proposal_user || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    联系电话:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.proposal_phone || '暂无' }}
+                  </el-col>
+                </el-col>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="one">
+              <el-col :span="24" class="txt">
+                <span>主要合作单位</span>
+              </el-col>
+              <el-col :span="24" class="info">
+                <el-col :span="24" class="infoMess">
+                  <el-col :span="3" class="title">
+                    合作单位:
+                  </el-col>
+                  <el-col :span="21" class="message textOver">
+                    {{ form.coopera_company }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    联系人:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.coopera_user || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="infoMess">
+                  <el-col :span="6" class="title">
+                    联系电话:
+                  </el-col>
+                  <el-col :span="18" class="message textOver">
+                    {{ form.coopera_phone || '暂无' }}
+                  </el-col>
+                </el-col>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="one">
+              <el-col :span="24" class="txt">
+                <span>项目内容简介</span>
+              </el-col>
+              <el-col :span="24" class="info">
+                <el-col :span="24" class="loangInfoMess">
+                  <el-col :span="24" class="title"> <span>立项背景</span>(含解决“卡脖子”技术问题及在行业中所处的地位和作用): </el-col>
+                  <el-col :span="24" class="longMessage">
+                    {{ form.sign || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="loangInfoMess">
+                  <el-col :span="24" class="title"> <span>前期基础</span>(含知识产权状况): </el-col>
+                  <el-col :span="24" class="longMessage">
+                    {{ form.work_basics || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="loangInfoMess">
+                  <el-col :span="24" class="title"> <span>研究内容</span>(含项目创新点): </el-col>
+                  <el-col :span="24" class="longMessage">
+                    {{ form.content || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="loangInfoMess">
+                  <el-col :span="24" class="title"> <span>技术路线</span>(含拟解决关键技术): </el-col>
+                  <el-col :span="24" class="longMessage">
+                    {{ form.route || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="loangInfoMess">
+                  <el-col :span="24" class="title">
+                    核心指标(要求可量化、可考核、可检测):
+                  </el-col>
+                  <el-col :span="24" class="longMessage">
+                    {{ form.quota || '暂无' }}
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="loangInfoMess">
+                  <el-col :span="24" class="title"> <span>经济效益</span>(含市场分析和产业化预期): </el-col>
+                  <el-col :span="24" class="longMessage">
+                    {{ form.influence || '暂无' }}
+                  </el-col>
+                </el-col>
+              </el-col>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: projectsolic } = createNamespacedHelpers('projectsolic');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'projectDetail',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      form: {},
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...projectsolic(['fetch']),
+    async search() {
+      if (this.id) {
+        let res = await this.fetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `form`, res.data);
+        }
+      }
+    },
+    // 返回列表
+    back() {
+      this.$router.push({ path: '/investigation/project' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+  .down {
+    .downtitle {
+      text-align: center;
+      font-size: 25px;
+      margin: 0 0 30px 0;
+    }
+    .list {
+      padding: 0 15%;
+      .one {
+        position: relative;
+        border: 1px solid #41719c;
+        margin: 0 0 35px 0;
+        min-height: 150px;
+        .txt {
+          position: absolute;
+          top: -22px;
+          text-align: center;
+          span {
+            height: 40px;
+            line-height: 40px;
+            display: inline-block;
+            padding: 0 35px;
+            background: #fff;
+            font-weight: bold;
+            font-size: 18px;
+          }
+        }
+        .info {
+          padding: 20px 10px;
+          .infoMess {
+            padding: 10px 0;
+            border-bottom: 1px dashed #ccc;
+            .title {
+              font-size: 16px;
+              color: #666;
+            }
+            .message {
+              font-size: 16px;
+            }
+            .longMessage {
+              margin: 10px 0 0 0;
+              min-height: 150px;
+              border: 1px dashed #ccc;
+              padding: 10px;
+              font-size: 16px;
+            }
+          }
+          .loangInfoMess {
+            padding: 10px 0;
+            margin: 0 0 15px 0;
+            .title {
+              font-size: 16px;
+              color: #666;
+              span {
+                font-weight: bold;
+              }
+            }
+            .longMessage {
+              margin: 10px 0 0 0;
+              min-height: 150px;
+              border: 1px dashed #ccc;
+              padding: 10px;
+              font-size: 16px;
+              line-height: 25px;
+            }
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 5 - 5
vue.config.js

@@ -22,16 +22,16 @@ module.exports = {
     //api地址前缀
     proxy: {
       '/files': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://broadcast.waityou24.cn',
       },
       '/api': {
-        target: 'http://192.168.1.118',
+        target: 'http://broadcast.waityou24.cn',
         changeOrigin: true,
-        ws: true,
+        ws: false,
       },
       '/ws': {
-        target: 'http://free.liaoningdoupo.com',
-        ws: true,
+        target: 'http://broadcast.waityou24.cn',
+        ws: false,
       },
     },
   },