Browse Source

项目立项申请表、项目实施申请表、项目结题申请表头部的企业名称改为动态获取

ljb 9 months ago
parent
commit
3f1ac8b22a

+ 0 - 2
src/page/index/logo.vue

@@ -35,7 +35,6 @@ export default {
     ...mapGetters(["website", "keyCollapse", "userInfo"])
   },
   mounted() {
-    console.log(this.website)
     this.getTenantDetailFunc(this.userInfo.tenant_id);
   },
   methods: {
@@ -43,7 +42,6 @@ export default {
       getTenantDetail(tenantId).then(({ data }) => {
         if (data.code == 200) {
           this.teantData = data.data;
-          console.log(this.teantData)
         }
       });
     },

+ 15 - 3
src/views/project-manage/components/accept-form.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="doc-page" v-loading="loading">
-    <h3 class="page-title" style="margin: 24px 0 16px;">科德集团</h3>
-    <h3 class="page-title" style="margin: 24px 0 16px;">研发项目验收资料</h3>
+    <h3 class="page-title" style="height: 60px; line-height: 60px; margin: 0;">{{ teantData.tenantName }}</h3>
+    <h3 class="page-title" style="margin: 5px 0 16px;">研发项目验收资料</h3>
 
     <div class="project-basic-info">
       <div class="info-row">{{ `研发项目名称:${ selProject.xmmc || '' }` }}</div>
@@ -95,6 +95,8 @@ import projectSelect from "@/components/project-select";
 import secondUnitCascader from "@/components/second-unit-cascader";
 import { save, getDetail } from "@/api/projectManage/accept";
 import moment from "moment";
+import { mapGetters } from "vuex";
+import { getDetail as getTenantDetail } from '@/api/system/tenant';
 
 export default {
   components: {
@@ -114,10 +116,11 @@ export default {
 
       currProjectId: '',
 
-      loading: false
+      teantData: {},
     };
   },
   computed: {
+    ...mapGetters(["userInfo"]),
     getXmDateRange() {
       if (this.selProject.xmkssj && this.selProject.xmjssj) {
         let xmkssj = moment(this.selProject.xmkssj).format('yyyy年MM月DD日');
@@ -236,9 +239,18 @@ export default {
     }
   },
   mounted() {
+    this.getTenantDetailFunc(this.userInfo.tenant_id);
     this.currProjectId = this.projectId || '';
   },
   methods: {
+    // 获取租户详情信息
+    getTenantDetailFunc(tenantId) {
+      getTenantDetail(tenantId).then(({ data }) => {
+        if (data.code == 200) {
+          this.teantData = data.data;
+        }
+      });
+    },
     getImplementDetail() {
       this.loading = true;
       getDetail({ xmId: this.currProjectId, yearAndMonth: this.yearAndMonth }).then(({ data }) => {

+ 17 - 4
src/views/project-manage/components/apply-form.vue

@@ -1,8 +1,7 @@
 <template>
   <div class="apply-form" v-loading="loading">
-    <h3 class="page-title">科德集团</h3>
-
-    <h3 class="page-title" style="margin-bottom: 10px;">{{ getDocTile }}</h3>
+    <h3 class="page-title" style="height: 60px; line-height: 60px; margin: 0;">{{ teantData.tenantName }}</h3>
+    <h3 class="page-title" style="margin: 5px 0 16px;">{{ getDocTile }}</h3>
     <div class="project-basic-info">
       <div class="info-row">{{ `研发项目名称:${ formData.xmmc || '' }` }}</div>
       <div class="info-row">{{ `项目负责人:${ getXmfzrName || '' }` }}</div>
@@ -204,6 +203,8 @@ import { add, update, getDetail } from "@/api/projectManage/projectList";
 import moment from "moment";
 import { deepClone } from "@/util/util";
 import Decimal from "decimal.js";
+import { mapGetters } from "vuex";
+import { getDetail as getTenantDetail } from '@/api/system/tenant';
 
 export default {
   components: {
@@ -237,8 +238,10 @@ export default {
       // 经济目标
       economicObjectivesList: [],
 
-      xmsqdwName: ''
+      xmsqdwName: '',
 
+      // 租户信息
+      teantData: {}
     };
   },
   watch: {
@@ -261,6 +264,7 @@ export default {
     }
   },
   computed: {
+    ...mapGetters(["userInfo"]),
     isEdit() {
       return this.operateType == 'edit';
     },
@@ -374,6 +378,7 @@ export default {
     }
   },
   mounted() {
+    this.getTenantDetailFunc(this.userInfo.tenant_id);
     this.getDictList("study_type", "studyTypeList");
     this.getDictList("project_source", "projectSourceList");
     this.getDictList("implementation_format", "implementFormatList");
@@ -384,6 +389,14 @@ export default {
     }
   },
   methods: {
+    // 获取租户详情信息
+    getTenantDetailFunc(tenantId) {
+      getTenantDetail(tenantId).then(({ data }) => {
+        if (data.code == 200) {
+          this.teantData = data.data;
+        }
+      });
+    },
     handleSecondUnitChange(val, nameArr) {
       this.xmsqdwName = nameArr.join('/');
     },

+ 16 - 2
src/views/project-manage/components/implement-form.vue

@@ -4,7 +4,8 @@
       <el-button type="primary" v-print="'#printWrap'">打印</el-button>
     </div>
     <div id="printWrap" class="doc-page" v-loading="loading">
-      <h3 class="page-title" style="margin: 24px 0 16px;">研发项目阶段性报告</h3>
+      <h3 class="page-title" style="height: 60px; line-height: 60px; margin: 0;">{{ teantData.tenantName }}</h3>
+      <h3 class="page-title" style="margin: 5px 0 16px;">研发项目阶段性报告</h3>
 
       <div class="project-basic-info">
         <div class="info-row">
@@ -146,6 +147,8 @@ import projectSelect from "@/components/project-select";
 import { getDictionary } from "@/api/system/dictbiz";
 import { save, getDetail } from "@/api/projectManage/implement";
 import moment from "moment";
+import { mapGetters } from "vuex";
+import { getDetail as getTenantDetail } from '@/api/system/tenant';
 
 export default {
   props: {
@@ -168,9 +171,12 @@ export default {
       selProject: {},
 
       typeList: [],
+
+      teantData: {},
     };
   },
   computed: {
+    ...mapGetters(["userInfo"]),
     getXmDateRange() {
       if (this.disabled) {
         let xmkssj = this.formData.xmEntity.xmkssj ? moment(this.formData.xmEntity.xmkssj).format('yyyy年MM月DD日') : '';
@@ -222,13 +228,21 @@ export default {
     }
   },
   mounted() {
+    this.getTenantDetailFunc(this.userInfo.tenant_id);
     if (this.implementId) {
       this.getImplementDetail();
     }
-    console.log(this.disabled)
     this.getDictList("项目实施-阶段性报告-附件类型", "typeList");
   },
   methods: {
+    // 获取租户详情信息
+    getTenantDetailFunc(tenantId) {
+      getTenantDetail(tenantId).then(({ data }) => {
+        if (data.code == 200) {
+          this.teantData = data.data;
+        }
+      });
+    },
     handleFillDateChange(e) {
       this.loading = true;
       this.$refs.proSelect.getProjectList((list) => {