guhongwei 3 lat temu
rodzic
commit
708e383788

+ 76 - 0
src/layout/scientific/personnel/info-1.vue

@@ -0,0 +1,76 @@
+<template>
+  <div id="info-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-form>
+          <van-col span="24" class="one">
+            <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 实验室主任 </van-divider>
+            <van-field v-model="info.labName" name="labName" label="姓名" readonly />
+            <van-field v-model="info.labCardtime" name="labCardtime" label="出生年月" readonly />
+            <van-field v-model="info.labJob" name="labJob" label="职称" readonly />
+            <van-field v-model="info.labArea" name="labArea" label="专业领域" readonly />
+            <van-field v-model="info.labJobtime" name="labJobtime" label="任职时间" readonly />
+            <van-field v-model="info.labPosition" name="labPosition" label="依托专业职务" readonly />
+          </van-col>
+          <van-col span="24" class="one">
+            <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 学术委员会主任 </van-divider>
+            <van-field v-model="info.committeeName" name="committeeName" label="姓名" readonly />
+            <van-field v-model="info.committeeCardtime" name="committeeCardtime" label="出生年月" readonly />
+            <van-field v-model="info.assistantJob" name="assistantJob" label="职称" readonly />
+            <van-field v-model="info.committeeArea" name="committeeArea" label="专业领域" readonly />
+            <van-field v-model="info.committeeJobtime" name="committeeJobtime" label="任职时间" readonly />
+            <van-field v-model="info.committeePosition" name="committeePosition" label="依托专业职务" readonly />
+          </van-col>
+          <van-col span="24" class="one">
+            <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 10px' }"> 科研助理 </van-divider>
+            <van-field v-model="info.assistantName" name="assistantName" label="姓名" readonly />
+            <van-field v-model="info.assistantCardtime" name="assistantCardtime" label="出生年月" readonly />
+            <van-field v-model="info.assistantJob" name="assistantJob" label="职称" readonly />
+            <van-field v-model="info.assistantArea" name="assistantArea" label="专业领域" readonly />
+            <van-field v-model="info.assistantJobtime" name="assistantJobtime" label="任职时间" readonly />
+            <van-field v-model="info.assistantPosition" name="assistantPosition" label="依托专业职务" readonly />
+          </van-col>
+        </van-form>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'info-1',
+  props: {
+    info: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  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 {
+    .van-divider {
+      margin: 10px 0;
+    }
+  }
+}
+</style>

+ 91 - 0
src/layout/scientific/personnel/list-1.vue

@@ -0,0 +1,91 @@
+<template>
+  <div id="list-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
+          <van-col span="24" class="title textOver">
+            {{ item.labName }}
+          </van-col>
+          <van-col span="24" class="other">
+            <van-col span="24" class="otherInfo">
+              专业领域:<span>{{ item.labArea || '暂无' }}</span>
+            </van-col>
+            <van-col span="24" class="otherInfo">
+              依托专业职务:<span>{{ item.labPosition || '暂无' }}</span>
+            </van-col>
+          </van-col>
+          <van-col span="24" class="btn">
+            <van-button type="info" size="small" @click="toView(item)">详细信息</van-button>
+          </van-col>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'list-1',
+  props: {
+    list: { type: Array },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    // 查看详情
+    toView(data) {
+      this.$emit('toView', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .list {
+    background-color: #fff;
+    margin: 0 0 8px 0;
+    padding: 8px;
+    border-radius: 5px;
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      margin: 0 0 5px 0;
+      .otherInfo {
+        font-size: 14px;
+        color: #666;
+        margin: 0 0 5px 0;
+        span {
+          color: #000;
+        }
+      }
+    }
+    .btn {
+      text-align: center;
+      .van-button {
+        margin: 0 5px;
+      }
+    }
+  }
+}
+</style>

+ 147 - 0
src/layout/scientific/personnel/search-1.vue

@@ -0,0 +1,147 @@
+<template>
+  <div id="search-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-col span="24" class="one">
+          <van-form>
+            <van-field v-model="form.labName" name="labName" label="实验室主任姓名" placeholder="实验室主任姓名" />
+            <van-field
+              readonly
+              clickable
+              name="calendar"
+              :value="form.labCardtime"
+              label="实验室主任出生年月"
+              placeholder="点击选择"
+              @click="changeCreate('labCardtime')"
+            />
+            <van-field v-model="form.labJob" name="labJob" label="实验室主任职称" placeholder="实验室主任职称" />
+            <van-field v-model="form.labArea" name="labArea" label="实验室主任专业领域" placeholder="实验室主任专业领域" />
+            <van-field
+              readonly
+              clickable
+              name="calendar"
+              :value="form.labJobtime"
+              label="实验室主任任职时间"
+              placeholder="点击选择"
+              @click="changeCreate('labJobtime')"
+            />
+            <van-field v-model="form.labPosition" name="labPosition" label="实验室主任依托专业职务" placeholder="实验室主任依托专业职务" />
+            <van-field v-model="form.committeeName" name="committeeName" label="学术委员会主任姓名" placeholder="学术委员会主任姓名" />
+            <van-field
+              readonly
+              clickable
+              name="calendar"
+              :value="form.committeeCardtime"
+              label="学术委员会主任出生年月"
+              placeholder="点击选择"
+              @click="changeCreate('committeeCardtime')"
+            />
+            <van-field v-model="form.assistantJob" name="assistantJob" label="学术委员会主任职称" placeholder="学术委员会主任职称" />
+            <van-field v-model="form.committeeArea" name="committeeArea" label="学术委员会主任专业领域" placeholder="学术委员会主任专业领域" />
+            <van-field
+              readonly
+              clickable
+              name="calendar"
+              :value="form.committeeJobtime"
+              label="学术委员会主任任职时间"
+              placeholder="点击选择"
+              @click="changeCreate('committeeJobtime')"
+            />
+            <van-field v-model="form.committeePosition" name="committeePosition" label="学术委员会主任依托专业职务" placeholder="学术委员会主任依托专业职务" />
+            <van-field v-model="form.assistantName" name="assistantName" label="科研助理姓名" placeholder="科研助理姓名" />
+            <van-field
+              readonly
+              clickable
+              name="calendar"
+              :value="form.assistantCardtime"
+              label="科研助理出生年月"
+              placeholder="点击选择"
+              @click="changeCreate('assistantCardtime')"
+            />
+            <van-field v-model="form.assistantJob" name="assistantJob" label="科研助理职称" placeholder="科研助理职称" />
+            <van-field v-model="form.assistantArea" name="assistantArea" label="科研助理专业领域" placeholder="科研助理专业领域" />
+            <van-field
+              readonly
+              clickable
+              name="calendar"
+              :value="form.assistantJobtime"
+              label="科研助理任职时间"
+              placeholder="点击选择"
+              @click="changeCreate('assistantJobtime')"
+            />
+            <van-field v-model="form.assistantPosition" name="assistantPosition" label="科研助理所在单位职务" placeholder="科研助理所在单位职务" />
+            <van-calendar v-model="oneShow" @confirm="oneChange" position="right" :min-date="minDate" :max-date="maxDate" />
+            <div class="btn">
+              <van-button type="info" size="small" @click="reseat">重置条件</van-button>
+              <van-button type="primary" size="small" @click="onSubmit">提交查询</van-button>
+            </div>
+          </van-form>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const moment = require('moment');
+export default {
+  name: 'search-1',
+  props: { form: { type: Object } },
+  components: {},
+  data: function () {
+    return {
+      // 选择申请日
+      oneShow: false,
+      minDate: new Date(1900, 1, 1),
+      maxDate: new Date(2050, 1, 1),
+      type: '',
+    };
+  },
+  created() {},
+  methods: {
+    reseat() {
+      this.$emit('reseat');
+    },
+    onSubmit() {
+      this.$emit('onSubmit', { data: this.form });
+    },
+    changeCreate(type) {
+      this.$set(this, `type`, type);
+      this.oneShow = true;
+    },
+    // 日期
+    oneChange(value) {
+      this.$set(this.form, this.type, moment(value).format('YYYY-MM-DD'));
+      this.oneShow = 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 {
+    .btn {
+      text-align: center;
+      margin: 10px 0;
+      .van-button {
+        margin: 0 5px;
+      }
+    }
+  }
+}
+</style>

+ 19 - 14
src/router/index.js

@@ -31,39 +31,44 @@ const infoview = [
 // 科研信息
 const scientific = [
   {
-    path: '/scientific-personnel/index',
+    path: '/scientific/index',
+    meta: { title: '科研信息' },
+    component: () => import('../views/scientific/index.vue'),
+  },
+  {
+    path: '/scientific/personnel/index',
     meta: { title: '主任及科研助理信息展示' },
-    component: () => import('../views/scientific-personnel/index.vue'),
+    component: () => import('../views/scientific/personnel/index.vue'),
   },
   {
-    path: '/scientific-learning/index',
+    path: '/scientific/learning/index',
     meta: { title: '学术委员会信息展示' },
-    component: () => import('../views/scientific-learning/index.vue'),
+    component: () => import('../views/scientific/learning/index.vue'),
   },
   {
-    path: '/scientific-task/index',
+    path: '/scientific/task/index',
     meta: { title: '承担科研任务信息展示' },
-    component: () => import('../views/scientific-task/index.vue'),
+    component: () => import('../views/scientific/task/index.vue'),
   },
   {
-    path: '/scientific-award/index',
+    path: '/scientific/award/index',
     meta: { title: '获奖信息展示' },
-    component: () => import('../views/scientific-award/index.vue'),
+    component: () => import('../views/scientific/award/index.vue'),
   },
   {
-    path: '/scientific-paper/index',
+    path: '/scientific/paper/index',
     meta: { title: '论文发表记录展示' },
-    component: () => import('../views/scientific-paper/index.vue'),
+    component: () => import('../views/scientific/paper/index.vue'),
   },
   {
-    path: '/scientific-achieve/index',
+    path: '/scientific/achieve/index',
     meta: { title: '成果展示' },
-    component: () => import('../views/scientific-achieve/index.vue'),
+    component: () => import('../views/scientific/achieve/index.vue'),
   },
   {
-    path: '/scientific-otherachieve/index',
+    path: '/scientific/otherachieve/index',
     meta: { title: '其他成果' },
-    component: () => import('../views/scientific-otherachieve/index.vue'),
+    component: () => import('../views/scientific/otherachieve/index.vue'),
   },
 ];
 // 学术交流

+ 2 - 26
src/views/index.vue

@@ -41,32 +41,8 @@ export default {
         },
         // 科研信息
         {
-          label: '科研信息-主任及科研助理信息展示',
-          router: '/scientific-personnel/index',
-        },
-        {
-          label: '科研信息-学术委员会信息展示',
-          router: '/scientific-learning/index',
-        },
-        {
-          label: '科研信息-承担科研任务信息展示',
-          router: '/scientific-task/index',
-        },
-        {
-          label: '科研信息-获奖信息展示',
-          router: '/scientific-award/index',
-        },
-        {
-          label: '科研信息-论文发表记录展示',
-          router: '/scientific-paper/index',
-        },
-        {
-          label: '科研信息-成果展示',
-          router: '/scientific-achieve/index',
-        },
-        {
-          label: '科研信息-其他成果',
-          router: '/scientific-otherachieve/index',
+          label: '科研信息',
+          router: '/scientific/index',
         },
         // 学术交流
         {

+ 0 - 36
src/views/scientific-task/index.vue

@@ -1,36 +0,0 @@
-<template>
-  <div id="index">
-    <van-row>
-      <van-col span="24" class="main"> test </van-col>
-    </van-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'index',
-  props: {},
-  components: {},
-  data: function () {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    test: {
-      deep: true,
-      immediate: true,
-      handler(val) {},
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

src/views/scientific-achieve/index.vue → src/views/scientific/achieve/index.vue


src/views/scientific-award/index.vue → src/views/scientific/award/index.vue


+ 94 - 0
src/views/scientific/index.vue

@@ -0,0 +1,94 @@
+<template>
+  <div id="index">
+    <admin-frame :useTop="false" :usePage="false" :useNav="false">
+      <template v-slot:info>
+        <van-col span="24" class="one">
+          <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
+            <van-swipe-item>1</van-swipe-item>
+            <van-swipe-item>2</van-swipe-item>
+            <van-swipe-item>3</van-swipe-item>
+            <van-swipe-item>4</van-swipe-item>
+          </van-swipe>
+        </van-col>
+        <van-col span="24" class="two">
+          <van-grid :gutter="5">
+            <van-grid-item class="list" v-for="(item, index) in menu" :key="index" :to="item.router">
+              <i :class="['iconfont', item.icon]"></i>
+              <p>{{ item.label }}</p>
+            </van-grid-item>
+          </van-grid>
+        </van-col>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    adminFrame,
+  },
+  data: function () {
+    return {
+      menu: [
+        { icon: 'icon-shouye', label: '主任及科研助理', router: '/scientific/personnel/index' },
+        { icon: 'icon-shouye', label: '学术委员会', router: '/scientific/learning/index' },
+        { icon: 'icon-shouye', label: '承担科研任务', router: '/scientific/task/index' },
+        { icon: 'icon-shouye', label: '获奖信息', router: '/scientific/award/index' },
+        { icon: 'icon-shouye', label: '论文发表', router: '/scientific/paper/index' },
+        { icon: 'icon-shouye', label: '成果展示', router: '/scientific/achieve/index' },
+        { icon: 'icon-shouye', label: '其他成果', router: '/scientific/otherachieve/index' },
+      ],
+    };
+  },
+  async created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  height: 200px;
+  background-color: #fff;
+  margin: 0 0 5px 0;
+}
+.two {
+  .list {
+    height: 90px;
+    i {
+      margin: 0 0 5px 0;
+    }
+    p {
+      font-size: 14px;
+      padding: 0px 5px;
+      text-align: center;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      -webkit-line-clamp: 2;
+      word-break: break-all;
+      display: -webkit-box;
+      -webkit-box-orient: vertical;
+    }
+  }
+  /deep/.van-grid-item__content {
+    border-radius: 10px;
+  }
+}
+</style>

src/views/scientific-learning/index.vue → src/views/scientific/learning/index.vue


src/views/scientific-otherachieve/index.vue → src/views/scientific/otherachieve/index.vue


src/views/scientific-paper/index.vue → src/views/scientific/paper/index.vue


+ 125 - 0
src/views/scientific/personnel/index.vue

@@ -0,0 +1,125 @@
+<template>
+  <div id="index">
+    <admin-frame @search="search" :limit="limit" :total="total" topType="2" :leftArrow="false" @add="toAdd" :useNav="false">
+      <template v-slot:info>
+        <list-1 :list="list" @toView="toView"></list-1>
+      </template>
+    </admin-frame>
+    <van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
+      <info-1 :info="info" v-if="dialog.type == '1'"></info-1>
+      <search-1 :form="searhForm" v-else-if="dialog.type == '2'" @reseat="reseat" @onSubmit="onSubmit"></search-1>
+    </van-dialog>
+  </div>
+</template>
+
+<script>
+import list1 from '@/layout/scientific/personnel/list-1.vue';
+import info1 from '@/layout/scientific/personnel/info-1.vue';
+import search1 from '@/layout/scientific/personnel/search-1.vue';
+import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    adminFrame,
+    list1,
+    info1,
+    search1,
+  },
+  data: function () {
+    return {
+      list: [
+        {
+          assistantArea: null,
+          assistantCardtime: null,
+          assistantJob: '',
+          assistantJobtime: null,
+          assistantName: '',
+          assistantPosition: null,
+          committeeArea: '脑功能和脑疾病机制及其神经调控',
+          committeeCardtime: '2021-10-07',
+          committeeJob: null,
+          committeeJobtime: null,
+          committeeName: '舒友生',
+          committeePosition: '副院长',
+          createBy: '1',
+          createTime: '1900-01-20 00:05:43',
+          delFlag: '0',
+          id: '1',
+          labArea: '癫痫及小儿神经系统疾病基础与临床',
+          labCardtime: '2021-09-23',
+          labJob: null,
+          labJobtime: null,
+          labName: '梁建民',
+          labPosition: '科主任',
+          params: {},
+          remark: null,
+          searchValue: null,
+          updateBy: null,
+          updateTime: '2021-09-23 13:17:54',
+        },
+      ],
+      total: 0,
+      limit: 5,
+      // 查询
+      searhForm: {},
+      // 弹框
+      dialog: { show: false, title: '详细信息', type: '1' },
+      // 详细信息
+      info: {},
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
+      if (searchName) info.name = searchName;
+      console.log(this.searhForm);
+    },
+    // 查看信息
+    async toView(data) {
+      this.$set(this, `info`, data);
+      this.dialog = { show: true, title: '详细信息', type: '1' };
+    },
+    // 添加查询条件
+    toAdd() {
+      this.dialog = { show: true, title: '查询条件', type: '2' };
+    },
+    // 重置条件
+    reseat() {
+      this.searhForm = {};
+      this.dialog = { show: false, title: '查询条件', type: '2' };
+      this.search();
+    },
+    // 提交查询
+    onSubmit({ data }) {
+      this.search(data);
+      this.dialog = { show: false, title: '查询条件', type: '2' };
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dialog {
+  /deep/.van-dialog__content {
+    max-height: 350px;
+    overflow-y: auto;
+  }
+}
+</style>

src/views/scientific-personnel/index.vue → src/views/scientific/task/index.vue