zs 3 年之前
父節點
當前提交
6b94027a55

文件差異過大導致無法顯示
+ 97 - 15391
package-lock.json


+ 7 - 8
src/layout/scientific/laboratory/award-1.vue

@@ -11,7 +11,7 @@
               成果编号:<span>{{ item.resulnumber || '暂无' }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              研究方向:<span>{{ getData(item.direction) || '暂无' }}</span>
+              研究方向:<span>{{ toFormat(item.direction) || '暂无' }}</span>
             </van-col>
           </van-col>
         </van-col>
@@ -26,7 +26,7 @@ export default {
   name: 'personnel-1',
   props: {
     list: { type: Array },
-    directionList: { type: Array },
+    directionL: { type: Array },
   },
   components: {},
   data: function () {
@@ -34,12 +34,11 @@ export default {
   },
   created() {},
   methods: {
-    // 整理数据
-    getData(direction) {
-      if (direction && this.directionList) {
-        let data = this.directionList.find((i) => i.id == direction);
-        if (data) return data.name;
-      }
+    //过滤id-name
+    toFormat(id) {
+      console.log(id);
+      let data = this.directionL.find((i) => i._id == id);
+      if (data) return data.name;
     },
   },
   computed: {

+ 6 - 8
src/layout/scientific/laboratory/direction-1.vue

@@ -8,7 +8,7 @@
           </van-col>
           <van-col span="24" class="other">
             <van-col span="24" class="otherInfo">
-              方向带头人:<span>{{ getData(item.person_id) || '暂无' }}</span>
+              方向带头人:<span>{{ toFormat(item.person_id) || '暂无' }}</span>
             </van-col>
           </van-col>
         </van-col>
@@ -23,7 +23,7 @@ export default {
   name: 'direction-1',
   props: {
     list: { type: Array },
-    personnelList: { type: Array },
+    userL: { type: Array },
   },
   components: {},
   data: function () {
@@ -31,12 +31,10 @@ export default {
   },
   created() {},
   methods: {
-    // 整理数据
-    getData(person_id) {
-      if (person_id && this.personnelList) {
-        let data = this.personnelList.find((i) => i.id == person_id);
-        if (data) return data.name;
-      }
+    //过滤id-name
+    toFormat(id) {
+      let data = this.userL.find((i) => i._id == id);
+      if (data) return data.name;
     },
   },
   computed: {

+ 1 - 1
src/layout/scientific/laboratory/equipment-1.vue

@@ -11,7 +11,7 @@
               设备价值:<span>{{ item.equipment_money || '暂无' }}万元</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              设备总数:<span>{{ item.equipment_numb || '暂无' }}</span>
+              是否加入大型仪器服务共享平台:<span>{{ item.instruments_numb || '暂无' }}</span>
             </van-col>
           </van-col>
         </van-col>

+ 3 - 3
src/layout/scientific/laboratory/info-1.vue

@@ -5,9 +5,9 @@
         <van-col span="24" class="one">
           <van-form>
             <van-field v-model="info.name" name="name" label="实验室名称" readonly />
-            <van-field v-model="info.english_name" name="englishName" label="英文名称" readonly />
-            <van-field v-model="info.lab_acreage" name="labAcreage" label="实验室面积" readonly />
-            <van-field v-model="info.lab_address" name="labAddress" label="实验室地址" readonly />
+            <van-field v-model="info.english_name" name="english_name" label="英文名称" readonly />
+            <van-field v-model="info.lab_acreage" name="lab_acreage" label="实验室面积" readonly />
+            <van-field v-model="info.lab_address" name="lab_address" label="实验室地址" readonly />
           </van-form>
         </van-col>
       </van-col>

+ 7 - 1
src/layout/scientific/laboratory/learning-1.vue

@@ -14,7 +14,7 @@
               职务:<span>{{ item.job || '暂无' }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              研究方向:<span>{{ item.direction_id || '暂无' }}</span>
+              研究方向:<span>{{ toFormat(item.direction_id) || '暂无' }}</span>
             </van-col>
           </van-col>
         </van-col>
@@ -29,6 +29,7 @@ export default {
   name: 'learning-1',
   props: {
     list: { type: Array },
+    directionL: { type: Array },
   },
   components: {},
   data: function () {
@@ -40,6 +41,11 @@ export default {
     toView(data) {
       this.$emit('toView', data);
     },
+    //过滤id-name
+    toFormat(id) {
+      let data = this.directionL.find((i) => i._id == id);
+      if (data) return data.name;
+    },
   },
   computed: {
     ...mapState(['user']),

+ 2 - 2
src/layout/scientific/laboratory/list-1.vue

@@ -8,10 +8,10 @@
           </van-col>
           <van-col span="24" class="other">
             <van-col span="24" class="otherInfo">
-              实验室主任:<span>{{ item.lab_name || '暂无' }}</span>
+              实验室主任:<span>{{ item.chief_name || '暂无' }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              实验室联系人:<span>{{ item.lab_person || '暂无' }}</span>
+              实验室联系人:<span>{{ item.unit_person || '暂无' }}</span>
             </van-col>
           </van-col>
           <van-col span="24" class="btn">

+ 1 - 1
src/layout/scientific/laboratory/outcome-1.vue

@@ -8,7 +8,7 @@
           </van-col>
           <van-col span="24" class="other">
             <van-col span="24" class="otherInfo">
-              重要成果:<span>{{ item.content || '暂无' }}</span>
+              <p v-html="item.content"></p>
             </van-col>
           </van-col>
         </van-col>

+ 7 - 8
src/layout/scientific/laboratory/paper-1.vue

@@ -11,7 +11,7 @@
               期刊及卷号:<span>{{ item.number || '暂无' }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              作者:<span>{{ getData(item.user_id) || '暂无' }}</span>
+              作者:<span>{{ toFormat(item.user_id) || '暂无' }}</span>
             </van-col>
           </van-col>
         </van-col>
@@ -26,7 +26,7 @@ export default {
   name: 'personnel-1',
   props: {
     list: { type: Array },
-    personnelList: { type: Array },
+    userL: { type: Array },
   },
   components: {},
   data: function () {
@@ -34,12 +34,11 @@ export default {
   },
   created() {},
   methods: {
-    // 整理数据
-    getData(user_id) {
-      if (user_id && this.personnelList) {
-        let data = this.personnelList.find((i) => i.id == user_id);
-        if (data) return data.name;
-      }
+    //过滤id-name
+    toFormat(id) {
+      let data = this.userL.find((i) => i._id == id);
+      if (data) return data.name;
+      console.log(data);
     },
   },
   computed: {

+ 6 - 8
src/layout/scientific/laboratory/patent-1.vue

@@ -14,7 +14,7 @@
               获奖等级:<span>{{ item.level || '暂无' }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              研究方向:<span>{{ getData(item.direction) || '暂无' }}</span>
+              研究方向:<span>{{ toFormat(item.direction) || '暂无' }}</span>
             </van-col>
           </van-col>
         </van-col>
@@ -29,7 +29,7 @@ export default {
   name: 'personnel-1',
   props: {
     list: { type: Array },
-    directionList: { type: Array },
+    directionL: { type: Array },
   },
   components: {},
   data: function () {
@@ -37,12 +37,10 @@ export default {
   },
   created() {},
   methods: {
-    // 整理数据
-    getData(direction) {
-      if (direction && this.directionList) {
-        let data = this.directionList.find((i) => i.id == direction);
-        if (data) return data.name;
-      }
+    //过滤id-name
+    toFormat(id) {
+      let data = this.directionL.find((i) => i._id == id);
+      if (data) return data.name;
     },
   },
   computed: {

+ 1 - 1
src/layout/scientific/laboratory/task-1.vue

@@ -11,7 +11,7 @@
               项目(课题)编号:<span>{{ item.projectlevelone || '暂无' }}</span>
             </van-col>
             <van-col span="24" class="otherInfo">
-              项目来源:<span>{{ item.laiyuancontent || '暂无' }}</span>
+              项目来源:<span>{{ item.projectsource || '暂无' }}</span>
             </van-col>
           </van-col>
         </van-col>

+ 89 - 0
src/store/index.js

@@ -2,7 +2,67 @@ import Vue from 'vue';
 import Vuex from 'vuex';
 import * as ustate from '@common/src/store/user/state';
 import * as umutations from '@common/src/store/user/mutations';
+// 活动时间
+import activitys from '@common/src/store/activitys';
+// 重要成果
+import outcome from '@common/src/store/outcome';
+// 人才称号
+import personnelname from '@common/src/store/personnelname';
+// 职称提升
+import title from '@common/src/store/title';
+// 博硕培养
+import doctor from '@common/src/store/doctor';
+// 固定人员
+import fixedpersonnel from '@common/src/store/fixedpersonnel';
+// 字典表类型表
+import sysdicttype from '@common/src/store/sysdicttype';
+// 字典表数据表
+import sysdictdata from '@common/src/store/sysdictdata';
+// 所属方向
+import direction from '@common/src/store/direction';
+// 省级及以上活动
+import sjactivity from '@common/src/store/sjactivity';
+// 技术服务、转移、检测
+import technicalservice from '@common/src/store/technicalservice';
+// 科普活动
+import scienceactivities from '@common/src/store/scienceactivities';
+// 发表,提交报告
+import report from '@common/src/store/report';
+// 获奖情况
+import award from '@common/src/store/award';
+// 承担科研任务
+import science from '@common/src/store/science';
+// 标准明细
+import tecAward from '@common/src/store/tecAward';
+// 项目来源
+import resource from '@common/src/store/resource';
+// 其他成果
+import otherAward from '@common/src/store/otherAward';
+// 设备情况
+import equipment from '@common/src/store/equipment';
+// 发表论文情况
+import paper from '@common/src/store/paper';
+// 固定投入
+import fixInput from '@common/src/store/fixInput';
+// 流动人员
+import flowpersonnel from '@common/src/store/flowpersonnel';
+// 学术委员会
+import committee from '@common/src/store/committee';
+// 实验室基本信息
+import basic from '@common/src/store/basic';
+// 主任及科研助理
+import chief from '@common/src/store/chief';
+// 用户
+import users from '@common/src/store/user';
+// 公共方法
 import usual from '@common/src/store/usual';
+// 菜单
+import menu from '@common/src/store/menu';
+// 通知公告
+import notice from '@common/src/store/notice';
+// 角色
+import role from '@common/src/store/role';
+
 Vue.use(Vuex);
 
 export default new Vuex.Store({
@@ -10,6 +70,35 @@ export default new Vuex.Store({
   mutations: { ...umutations },
   actions: {},
   modules: {
+    activitys,
+    outcome,
+    personnelname,
+    title,
+    doctor,
+    fixedpersonnel,
+    sysdicttype,
+    sysdictdata,
+    direction,
+    sjactivity,
+    technicalservice,
+    scienceactivities,
+    report,
+    award,
+    science,
+    tecAward,
+    resource,
+    otherAward,
+    equipment,
+    paper,
+    fixInput,
+    committee,
+    flowpersonnel,
+    basic,
+    chief,
+    users,
     usual,
+    menu,
+    notice,
+    role,
   },
 });

+ 4 - 4
src/views/scientific/laboratory/index.vue

@@ -12,7 +12,7 @@
 import list1 from '@/layout/scientific/laboratory/list-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions } = createNamespacedHelpers('usual');
+const { mapActions } = createNamespacedHelpers('basic');
 export default {
   name: 'index',
   props: {},
@@ -33,15 +33,15 @@ export default {
   methods: {
     ...mapActions(['query', 'fetch']),
     async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
-      if (searchName) info.name = searchName;
-      const res = await this.query({ table: 'BasicInformation', skip, limit, ...info });
+      if (searchName) info.chief_name = searchName;
+      const res = await this.query({ skip, limit, ...info });
       if (res.errcode == '0') {
         this.$set(this, 'list', res.data);
         this.$set(this, 'total', res.total);
       }
     },
     toView(data) {
-      this.$router.push({ path: '/scientific/laboratory/info', query: { id: data.id } });
+      this.$router.push({ path: '/scientific/laboratory/info', query: { id: data._id } });
     },
   },
 

+ 46 - 17
src/views/scientific/laboratory/info.vue

@@ -15,7 +15,7 @@
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 主任 </van-divider>
                 <director-1 :info="info"></director-1>
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 学术委员会 </van-divider>
-                <learning-1 :list="learningList"></learning-1>
+                <learning-1 :list="learningList" :directionL="directionL"></learning-1>
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 联系人 </van-divider>
                 <contacts-1 :info="info"></contacts-1>
               </van-col>
@@ -23,7 +23,7 @@
             <van-tab name="1" title="实力">
               <van-col span="24" class="tabs_1" :style="{ height: client.height - 240 + 'px' }" style="overflow-y: auto">
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 主要研究方向 </van-divider>
-                <direction-1 :list="directionList" :personnelList="personnelList"></direction-1>
+                <direction-1 :list="directionList" :personnelList="personnelList" :userL="userL"></direction-1>
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 承担科研项目 </van-divider>
                 <task-1 :list="taskList"></task-1>
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 核心成员(固定人员) </van-divider>
@@ -35,11 +35,11 @@
             <van-tab name="2" title="成果">
               <van-col span="24" class="tabs_1" :style="{ height: client.height - 240 + 'px' }" style="overflow-y: auto">
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 制定标准明细 </van-divider>
-                <award-1 :list="awardList" :directionList="directionList"></award-1>
+                <award-1 :list="awardList" :directionList="directionList" :directionL="directionL"></award-1>
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 论文 </van-divider>
-                <paper-1 :list="paperList" :personnelList="personnelList"></paper-1>
+                <paper-1 :list="paperList" :personnelList="personnelList" :userL="userL"></paper-1>
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 奖励 </van-divider>
-                <patent-1 :list="patentList" :directionList="directionList"></patent-1>
+                <patent-1 :list="patentList" :directionList="directionList" :directionL="directionL"></patent-1>
                 <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 重大成果 </van-divider>
                 <outcome-1 :list="outcomeList"></outcome-1>
               </van-col>
@@ -66,7 +66,16 @@ import patent1 from '@/layout/scientific/laboratory/patent-1.vue';
 import outcome1 from '@/layout/scientific/laboratory/outcome-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions } = createNamespacedHelpers('usual');
+const { mapActions } = createNamespacedHelpers('basic');
+const { mapActions: committee } = createNamespacedHelpers('committee');
+const { mapActions: direction } = createNamespacedHelpers('direction');
+const { mapActions: science } = createNamespacedHelpers('science');
+const { mapActions: fixedpersonnel } = createNamespacedHelpers('fixedpersonnel');
+const { mapActions: equipment } = createNamespacedHelpers('equipment');
+const { mapActions: tecAward } = createNamespacedHelpers('tecAward');
+const { mapActions: paper } = createNamespacedHelpers('paper');
+const { mapActions: award } = createNamespacedHelpers('award');
+const { mapActions: outcome } = createNamespacedHelpers('outcome');
 export default {
   name: 'index',
   props: {},
@@ -102,48 +111,68 @@ export default {
       paperList: [],
       patentList: [],
       outcomeList: [],
+      // 研究方向
+      directionL: [],
+      //固定人员
+      userL: [],
     };
   },
   async created() {
+    await this.searchOther();
     if (this.id) await this.search();
   },
   methods: {
     ...mapActions(['query', 'fetch']),
+    ...committee({ cquery: 'query' }),
+    ...direction({ dquery: 'query' }),
+    ...science({ squery: 'query' }),
+    ...fixedpersonnel({ fquery: 'query' }),
+    ...equipment({ equery: 'query' }),
+    ...tecAward({ tquery: 'query' }),
+    ...paper({ pquery: 'query' }),
+    ...award({ aquery: 'query' }),
+    ...outcome({ oquery: 'query' }),
     async search() {
-      let res = await this.fetch({ table: 'BasicInformation', id: this.id });
+      let res = await this.fetch(this.id);
       if (res.errcode == '0') this.$set(this, `info`, res.data);
       // 学术委员会
-      res = await this.query({ table: 'Committee', create_by: this.id });
+      res = await this.cquery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `learningList`, res.data);
       // 主要研究方向
-      res = await this.query({ table: 'ResearchDirection', create_by: this.id });
+      res = await this.dquery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `directionList`, res.data);
       // 承担科研项目
-      res = await this.query({ table: 'BearScience', create_by: this.id });
+      res = await this.squery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `taskList`, res.data);
       // 核心成员(固定人员)
-      res = await this.query({ table: 'FixedPersonnel', create_by: this.id });
+      res = await this.fquery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `personnelList`, res.data);
       // 仪器设备
-      res = await this.query({ table: 'Equipment', create_by: this.id });
+      res = await this.equery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `equipmentList`, res.data);
       // 制定标准明细
-      res = await this.query({ table: 'Soa', create_by: this.id });
+      res = await this.tquery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `awardList`, res.data);
       // 论文
-      res = await this.query({ table: 'Sopaper', create_by: this.id });
+      res = await this.pquery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `paperList`, res.data);
       // 奖励
-      res = await this.query({ table: 'Sopatent', create_by: this.id });
+      res = await this.aquery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `patentList`, res.data);
-      // 重大成果
-      res = await this.query({ table: 'Outcome', create_by: this.id });
+      //重大成果
+      res = await this.oquery({ lab_id: this.id });
       if (res.errcode == '0') this.$set(this, `outcomeList`, res.data);
     },
     // 返回
     back() {
       this.$router.push({ path: '/scientific/laboratory/index' });
     },
+    async searchOther() {
+      let res = await this.dquery();
+      if (res.errcode == '0') this.$set(this, `directionL`, res.data);
+      res = await this.fquery();
+      if (res.errcode == '0') this.$set(this, `userL`, res.data);
+    },
   },
   computed: {
     ...mapState(['user']),

+ 11 - 11
vue.config.js

@@ -20,19 +20,19 @@ module.exports = {
     port: '8001',
     proxy: {
       '/files': {
-        target: 'http://broadcast.kqyjy.com',
+        target: 'http://broadcast.waityou24.cn',
       },
-      '/api/label': {
-        target: 'http://broadcast.kqyjy.com',
-      },
-      [process.env.VUE_APP_BASE_API]: {
-        target: 'http://broadcast.kqyjy.com',
-        changeOrigin: true,
-        ws: false,
-        // pathRewrite: {
-        //   ['^' + process.env.VUE_APP_BASE_API]: '',
-        // },
+      '/freeLabel/api': {
+        target: 'http://broadcast.waityou24.cn',
       },
+      // [process.env.VUE_APP_BASE_API]: {
+      //   target: 'http://broadcast.kqyjy.com',
+      //   changeOrigin: true,
+      //   ws: false,
+      //   // pathRewrite: {
+      //   //   ['^' + process.env.VUE_APP_BASE_API]: '',
+      //   // },
+      // },
     },
   },
 };