Browse Source

提交项目列表

ljb 11 months ago
parent
commit
05318d6feb

+ 51 - 0
src/api/projectManage/projectList.js

@@ -0,0 +1,51 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/kd-scientific/xm/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/kd-scientific/technician/save',
+    method: 'post',
+    data: row
+  })
+}
+
+
+export const update = (row) => {
+  return request({
+    url: '/api/kd-scientific/technician/update',
+    method: 'post',
+    data: row
+  })
+}
+
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/kd-scientific/technician/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const getLastMonthData = params => {
+  return request({
+    url: '/kd-scientific/technician/fetchLastMonthData',
+    method: 'get',
+    params: {
+      ...params,
+    }
+  })
+}

+ 219 - 0
src/option/projectManage/projectList.js

@@ -0,0 +1,219 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  addBtn: false,
+  menu: false,
+  selection: false,
+  searchLabelWidth: 140,
+  labelWidth: 140,
+  menuWidth: 220,
+  dialogClickModal: false,
+  dialogWidth: 760,
+  dialogType: "drawer",
+  column: [
+    {
+      label: '研发项目编号',
+      prop: 'xmbh',
+      type: 'input',
+      width: 100,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目名称',
+      prop: 'xmmc',
+      type: 'input',
+      width: 160,
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '项目开始时间',
+      prop: 'xmkssj',
+      type: 'date',
+      width: 120,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '项目结束时间',
+      prop: 'xmjssj',
+      type: 'date',
+      width: 120,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '项目负责人',
+      prop: 'xmfzr',
+      type: 'input',
+      width: 100,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '项目申请单位',
+      prop: 'xmsqdw',
+      type: 'select',
+      width: 120,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '项目状态',
+      prop: 'xmzt',
+      type: 'select',
+      width: 90,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '项目报告进度',
+      align: 'center',
+      display: false,
+      children: [{
+        label: '立项报告(份)',
+        prop: 'xmbg',
+        type: 'number',
+        width: 90,
+        align: 'center',
+        showOverflowTooltip: true,
+      }, {
+        label: '阶段性报告(份)',
+        prop: 'jdxbg',
+        type: 'number',
+        width: 105,
+        align: 'center',
+        showOverflowTooltip: true,
+      }, {
+        label: '验收报告(份)',
+        prop: 'ysbg',
+        type: 'number',
+        width: 90,
+        align: 'center',
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '项目费用进度',
+      align: 'center',
+      display: false,
+      children: [{
+        label: '全周期',
+        align: 'center',
+        display: false,
+        children: [{
+          label: '总预算(万元)',
+          prop: 'zys',
+          type: 'number',
+          width: 90,
+          align: 'center',
+          showOverflowTooltip: true,
+        }, {
+          label: '全周期已归集(万元)',
+          prop: 'qzqygz',
+          type: 'number',
+          width: 130,
+          align: 'center',
+          showOverflowTooltip: true,
+        }, {
+          label: '总预算完成率(%)',
+          prop: 'zyswcl',
+          type: 'number',
+          width: 120,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }, {
+        label: '本年度',
+        align: 'center',
+        display: false,
+        children: [{
+          label: '年度预算(万元)',
+          prop: 'ndys',
+          type: 'number',
+          width: 105,
+          align: 'center',
+          showOverflowTooltip: true,
+        }, {
+          label: '年度已归集研发费用(万元)',
+          prop: 'ndgjyffy',
+          type: 'number',
+          width: 165,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }]
+    },
+    {
+      label: '项目成果情况(数量)',
+      align: 'center',
+      display: false,
+      children: [{
+        label: '专利',
+        align: 'center',
+        display: false,
+        children: [{
+          label: '发明专利',
+          prop: 'fmzl',
+          type: 'number',
+          width: 70,
+          align: 'center',
+          showOverflowTooltip: true,
+        }, {
+          label: '实用新型专利',
+          prop: 'sysxzl',
+          type: 'number',
+          width: 100,
+          align: 'center',
+          showOverflowTooltip: true,
+        }]
+      }, {
+        label: '软著',
+        prop: 'lz',
+        type: 'number',
+        width: 50,
+        align: 'center',
+        showOverflowTooltip: true,
+      }, {
+        label: '标准',
+        prop: 'bz',
+        type: 'number',
+        width: 50,
+        align: 'center',
+        showOverflowTooltip: true,
+      }, {
+        label: '论文',
+        prop: 'lw',
+        type: 'number',
+        width: 50,
+        align: 'center',
+        showOverflowTooltip: true,
+      }, {
+        label: '其他',
+        prop: 'other',
+        type: 'number',
+        width: 50,
+        align: 'center',
+        showOverflowTooltip: true,
+      }]
+    },
+    {
+      label: '是否委外',
+      prop: 'sfww',
+      type: 'number',
+      width: 70,
+      align: 'center',
+      showOverflowTooltip: true,
+    }
+  ],
+};

+ 11 - 6
src/views/device-manage/device-work-hours-record-list.vue

@@ -81,8 +81,12 @@ export default window.$crudCommon({
   },
   async created() {
     this.defaultColumns = deepClone(this.option.column);
+    console.log(this.option.column)
     this.refreshTableCol(this.params.yearAndMonth);
   },
+  beforeDestroy() {
+    this.option.column = deepClone(this.defaultColumns);
+  },
   methods: {
     refreshTableCol(yearAndMonth) {
       let yearMonth = moment(yearAndMonth).format("YYYY-MM").split("-");
@@ -97,6 +101,7 @@ export default window.$crudCommon({
           type: 'input',
           width: 40,
           align: 'center',
+          isWorkDay: ChineseHoliday.isWorkday(item.dateString)
         };
         if (!ChineseHoliday.isWorkday(item.dateString)) {
           col.labelClassName = 'red';
@@ -117,6 +122,12 @@ export default window.$crudCommon({
         this.$refs.printWideTable.printTable(isLandscape);
       })
     },
+    headerCellStyle ({ column }) {
+      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
+      return {
+        color
+      }
+    }
   },
 }, {
   // 模块路径
@@ -126,9 +137,3 @@ export default window.$crudCommon({
   },
 });
 </script>
-
-<style lang="scss">
-.cell.red {
-  color: red;
-}
-</style>

+ 9 - 0
src/views/project-manage/accept.vue

@@ -0,0 +1,9 @@
+<template>
+  <div>项目结题表</div>
+</template>
+
+<script>
+export default {
+  
+}
+</script>

+ 9 - 0
src/views/project-manage/apply.vue

@@ -0,0 +1,9 @@
+<template>
+  <div>项目立项</div>
+</template>
+
+<script>
+export default {
+  
+}
+</script>

+ 9 - 0
src/views/project-manage/change.vue

@@ -0,0 +1,9 @@
+<template>
+  <div>项目变更</div>
+</template>
+
+<script>
+export default {
+  
+}
+</script>

+ 9 - 0
src/views/project-manage/implement.vue

@@ -0,0 +1,9 @@
+<template>
+  <div>项目实施报告</div>
+</template>
+
+<script>
+export default {
+  
+}
+</script>

+ 9 - 0
src/views/project-manage/ky-budget.vue

@@ -0,0 +1,9 @@
+<template>
+  <div>研发项目经费预算表</div>
+</template>
+
+<script>
+export default {
+  
+}
+</script>

+ 9 - 0
src/views/project-manage/outsourcing.vue

@@ -0,0 +1,9 @@
+<template>
+  <div>委外项目</div>
+</template>
+
+<script>
+export default {
+  
+}
+</script>

+ 101 - 0
src/views/project-manage/project-list.vue

@@ -0,0 +1,101 @@
+<template>
+  <basic-container>
+    <avue-crud
+      v-bind="bindVal"
+      v-on="onEvent"
+      v-model="form"
+      :page.sync="page"
+      :before-open="handleBeforeOpen"
+      :permission="permissionList"
+    >
+      <template slot="menuLeft">
+        <el-button
+          type="primary"
+          size="small"
+          icon="el-icon-plus"
+        >
+          创建立项项目
+        </el-button>
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
+        <print-table-btn @click="printTable" />
+        
+        <div style="display: flex; align-items: center;">
+          <year-month-select v-model="params.yearAndMonth" :showAllYear="false"></year-month-select>
+        </div>
+      </template>
+      
+    </avue-crud>
+
+    <WideTablePrinter
+      ref="printWideTable"
+      :columns="wideTableColumns"
+      :data="data"
+      :print-title="printTitle"
+      :rows-per-page="30"
+      :default-landscape="true"
+    />
+  </basic-container>
+</template>
+
+<script>
+import {exportBloByPost} from "@/api/common";
+import YearMonthSelect from "@/components/year-month-select";
+import moment from "moment";
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
+
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format('YYYYMM'),
+      },
+
+      wideTableColumns: [],
+      printTitle: "",
+    };
+  },
+  watch: {
+    'params.yearAndMonth'(newVal) {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
+  methods: {
+    handleExport() {
+      exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+        downloadXls(res.data, `科研项目汇总表${this.params.yearAndMonth}.xlsx`);
+      });
+    },
+    /**
+     * 打印表格
+     * @param isLandscape 是否横向打印
+     */
+    printTable(isLandscape) {
+      this.wideTableColumns = this.$refs.crud.columnOption;
+      this.printTitle = `科研项目汇总表${this.params.yearAndMonth}`;
+      this.$nextTick(() => {
+        this.$refs.printWideTable.printTable(isLandscape);
+      })
+    },
+  },
+}, {
+  // 模块路径
+  name: 'projectManage/projectList',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>

+ 9 - 0
src/views/project-manage/result-table.vue

@@ -0,0 +1,9 @@
+<template>
+  <div>研发项目成果表</div>
+</template>
+
+<script>
+export default {
+  
+}
+</script>