guhongwei 3 年之前
父節點
當前提交
177c828a3e

+ 5 - 0
src/router/index.js

@@ -68,6 +68,11 @@ const service = [
     meta: { title: '服务在线-成果评价' },
     component: () => import('../views/service/achieve/index.vue'),
   },
+  {
+    path: '/service/achieve/detail',
+    meta: { title: '成果评价-详细信息' },
+    component: () => import('../views/service/achieve/detail.vue'),
+  },
   {
     path: '/service/novelty/index',
     meta: { title: '服务在线-查新服务' },

+ 73 - 0
src/views/service/achieve/achieve/info-1.vue

@@ -0,0 +1,73 @@
+<template>
+  <div id="info-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-form>
+          <van-col span="24" class="one">
+            <van-field v-model="info.basic.achieve_num" name="成果编号" label="成果编号" readonly />
+            <van-field v-model="info.basic.achieve_name" name="成果名称" label="成果名称" readonly />
+            <van-field v-model="info.basic.achieve_type" name="成果类别" label="成果类别" readonly />
+            <van-field v-model="info.basic.achieve_form" name="成果形式" label="成果形式" readonly />
+            <van-field v-model="info.basic.achieve_date" name="成果取得时间" label="成果取得时间" readonly />
+            <van-field v-model="info.basic.apply_personal" name="申请人" label="申请人" readonly />
+            <van-field v-model="info.basic.apply_company" name="申请单位" label="申请单位" readonly />
+            <van-field v-model="info.basic.address" name="地址" label="地址" readonly />
+            <van-field v-model="info.basic.apply_nature" name="单位属性" label="单位属性" readonly />
+            <van-field v-model="info.basic.fax" name="传真" label="传真" readonly />
+            <van-field v-model="info.basic.objective" name="评价目的" label="评价目的" readonly />
+            <van-field v-model="info.basic.stage" name="成果所处阶段" label="成果所处阶段" readonly />
+          </van-col>
+          <van-col span="24" class="two">
+            <van-field v-model="info.brief.achieve_brief" name="成果简介" label="成果简介" type="textarea" rows="1" autosize readonly />
+          </van-col>
+          <van-col span="24" class="thr">
+            <van-col span="24" class="thr_1">成果专家评价意见</van-col>
+            <van-col span="24" class="thr_2">
+              <van-image :src="info.file.page6"></van-image>
+            </van-col>
+          </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 {
+  .thr {
+    background-color: #ffffff;
+    .thr_1 {
+      font-size: 16px;
+      font-weight: bold;
+      padding: 8px;
+    }
+  }
+}
+</style>

+ 86 - 0
src/views/service/achieve/achieve/list-1.vue

@@ -0,0 +1,86 @@
+<template>
+  <div id="list-1">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-col span="24" class="one">
+          <van-col span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detail(item)">
+            <van-col span="24" class="title">
+              {{ item.basic.achieve_name }}
+            </van-col>
+            <van-col span="24" class="other">
+              <van-col span="24" class="otherInfo">
+                成果取得时间:<span>{{ item.basic.achieve_date }}</span>
+              </van-col>
+              <van-col span="24" class="otherInfo">
+                申请单位:<span>{{ item.basic.apply_company }}</span>
+              </van-col>
+            </van-col>
+          </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: {
+    // 详情
+    detail(data) {
+      this.$emit('detail', 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 {
+  margin: 8px 0 0 0;
+  .one {
+    .list {
+      background-color: #fff;
+      margin: 0 0 10px 0;
+      box-shadow: 0 0 5px #f1f1f1;
+      padding: 8px;
+      .title {
+        font-size: 16px;
+        font-weight: bold;
+        margin: 0 0 5px 0;
+      }
+      .other {
+        .otherInfo {
+          font-size: 14px;
+          color: #666;
+          margin: 0 0 5px 0;
+          span {
+            color: #000;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 63 - 0
src/views/service/achieve/detail.vue

@@ -0,0 +1,63 @@
+<template>
+  <div id="detail">
+    <admin-frame topType="2" @back="back" :rightArrow="false" :useNav="false" :usePage="false">
+      <template v-slot:info>
+        <info-1 :info="info"></info-1>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import info1 from './achieve/info-1.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    info1,
+    adminFrame,
+  },
+  data: function () {
+    return {
+      info: { basic: {}, brief: {}, file: {} },
+    };
+  },
+  async created() {
+    if (this.id) await this.search();
+  },
+  methods: {
+    ...achieveApply(['fetch']),
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/service/achieve/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    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></style>

+ 41 - 0
src/views/service/achieve/index copy.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <admin-frame :usePage="false" :useTop="false">
+      <template v-slot:info><achieve-frame></achieve-frame></template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import achieveFrame from './achieve/index.vue';
+import adminFrame from '@/layout/common/admin-frame.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    adminFrame,
+    achieveFrame,
+  },
+  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>

+ 37 - 6
src/views/service/achieve/index.vue

@@ -1,27 +1,58 @@
 <template>
   <div id="index">
-    <admin-frame :usePage="false" :useTop="false">
-      <template v-slot:info><achieve-frame></achieve-frame></template>
+    <admin-frame :useTop="false" :usePage="false" :useNav="false">
+      <template v-slot:info>
+        <van-col span="24" class="two">
+          <van-tabs v-model="active" color="#409eff">
+            <van-tab title="成果评价">
+              <list-1 :list="list" @detail="detail"></list-1>
+            </van-tab>
+            <van-tab title="成果申报">
+              <achieve-frame></achieve-frame>
+            </van-tab>
+          </van-tabs>
+        </van-col>
+      </template>
     </admin-frame>
   </div>
 </template>
 
 <script>
 import achieveFrame from './achieve/index.vue';
-import adminFrame from '@/layout/common/admin-frame.vue';
+import list1 from './achieve/list-1.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
 export default {
   name: 'index',
   props: {},
   components: {
     adminFrame,
     achieveFrame,
+    list1,
   },
   data: function () {
-    return {};
+    return {
+      active: 0,
+      list: [],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...achieveApply(['query']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.query({ status: '7' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+      }
+    },
+    // 查看详情
+    detail(data) {
+      this.$router.push({ path: '/service/achieve/detail', query: { id: data.id } });
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
   },

+ 1 - 1
vue.config.js

@@ -22,7 +22,7 @@ module.exports = {
     port: '8001',
     proxy: {
       '/files': {
-        target: 'http://106.12.161.200:8080',
+        target: 'http://broadcast.kqyjy.com',
       },
       '/api/mission': {
         target: 'http://broadcast.kqyjy.com',