armg 1 ano atrás
pai
commit
6211dec0d6

+ 2 - 2
ruoyi-ui/.env.development

@@ -8,7 +8,7 @@ ENV = 'development'
 VUE_APP_BASE_API = '/dev-api'
 # VUE_APP_BASE_API = '192.168.100.234:8080'
 VUE_APP_CORPID = "ding4ab75ecd53106cde4ac5d6980864d335"
-
-
+# 投资部的部门id
+VUE_APP_DEPTID = '103'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 2 - 0
ruoyi-ui/.env.production

@@ -7,3 +7,5 @@ ENV = 'production'
 # 若依管理系统/生产环境
 VUE_APP_BASE_API = '/prod-api'
 VUE_APP_CORPID = "ding4ab75ecd53106cde4ac5d6980864d335"
+# 投资部的部门id
+VUE_APP_DEPTID = '103'

+ 2 - 1
ruoyi-ui/src/api/invest/pool.js

@@ -106,4 +106,5 @@ export function addInvestigatePerson(data) {
     method: 'post',
     data: data
   })
-}
+}
+

+ 18 - 1
ruoyi-ui/src/api/system/file.js

@@ -50,4 +50,21 @@ export function listFileBusinessId(id) {
     method: 'get',
     params: { fileBusinessId: id }
   })
-}
+}
+
+export function downloadFileById(id) {
+  return request({
+    url: '/system/file/download/' + id,
+    method: 'get',
+    
+  })
+}
+
+// 根据fileId()获取项目中所有附件列表  fileId=项目id
+export function listFileId(id) {
+  return request({
+    url: '/system/file/listFileId',
+    method: 'get',
+    params: { fileId: id }
+  })
+}

+ 1 - 1
ruoyi-ui/src/views/invest/channel/index.vue

@@ -317,7 +317,7 @@ export default {
   data() {
     return {
       fileList: [],
-      deptId: "",
+      deptId: process.env.VUE_APP_DEPTID,
       // 遮罩层
       loading: true,
       // 选中数组

+ 10 - 2
ruoyi-ui/src/views/invest/components/fileItem.vue

@@ -11,15 +11,19 @@
       :on-remove="handleRemove"
       :before-remove="beforeRemove"
       :on-success="handleUploadSuccess"
+      :on-preview="handlePreview"
     >
-      <!-- :auto-upload="false" -->
       <el-button size="small" type="primary">点击上传</el-button>
     </el-upload>
   </div>
 </template>
 <script>
 import { getToken } from "@/utils/auth";
-import { listFileBusinessId, delFile } from "@/api/system/file";
+import {
+  listFileBusinessId,
+  delFile,
+  downloadFileById,
+} from "@/api/system/file";
 export default {
   props: {},
   data() {
@@ -80,6 +84,10 @@ export default {
         });
       }
     },
+    //点击文件列表中已上传的文件时的钩子
+    handlePreview(file) {
+      downloadFileById(file.id).then((response) => {});
+    },
   },
 };
 </script>

+ 1 - 1
ruoyi-ui/src/views/invest/components/fileList.vue

@@ -358,7 +358,7 @@ export default {
         this.form.projectName = info[0].projectName;
         this.form.projectStage = info[0].projectStage;
         this.form.projectState = info[0].projectState;
-        this.$refs.form.clearValidate(["projectName"]);
+        this.$refs.fileForm.clearValidate(["projectName"]);
       }
     },
     //展示人员

+ 1 - 1
ruoyi-ui/src/views/invest/components/followList.vue

@@ -338,7 +338,7 @@ export default {
   data() {
     return {
       pageType: null, //1=新增表单
-      deptId: "",
+      deptId: process.env.VUE_APP_DEPTID,
       fileList: [],
       showProjectItem: false,
       // 遮罩层

+ 116 - 0
ruoyi-ui/src/views/invest/components/listAllfile.vue

@@ -0,0 +1,116 @@
+<template>
+  <div class="app-container">
+    <div>
+      <el-card class="box-card public-margin-b-20" v-for="(item, index) in fileList" :key="index">
+        <div slot="header" class="clearfix">
+          <span>{{ item.uploadTypeName }}</span>
+        </div>
+        <div v-for="(items, indexs) in item.children" :key="indexs">
+            <div class="fileItems" title="点击下载" @click="handlePreview(items.id)"> {{ items.newUploadName }}</div>
+        </div>
+      </el-card>
+    </div>
+  </div>
+</template>
+
+<script>
+// FileType:
+// 【0:其他】
+// 【1:跟进记录】
+// 【2:研究资料】
+// 【3:文件资料】
+// 【4:会议记录】
+// 【5:渠道信息】
+// 【6:合同管理】
+// 【7:公司信息】
+// 【8:尽职调查】
+import { listFileId, downloadFileById } from "@/api/system/file";
+import fileItem from "./fileItem";
+export default {
+  props: {
+    projectId: {
+      type: String,
+    },
+  },
+  components: { fileItem },
+  data() {
+    return {
+      fileList: [],
+      nameList: [
+        "其他",
+        "跟进记录",
+        "研究资料",
+        "文件资料",
+        "会议记录",
+        "渠道信息",
+        "合同管理",
+        "公司信息",
+        "尽职调查",
+      ],
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    //点击文件列表中已上传的文件时的钩子
+    handlePreview(id) {
+      downloadFileById(id).then((response) => {});
+    },
+    getList() {
+      let fileData;
+      listFileId(this.projectId)
+        .then((response) => {
+          fileData = response.data;
+        })
+        .then(() => {
+          this.fileList = this.handleList(fileData);
+          console.log(this.fileList);
+        });
+    },
+    handleList(arr) {
+      let level1 = "uploadType"; //获取一级属性名称
+      let list = Array.from(
+        new Set(
+          arr.map((item) => {
+            return item[level1];
+          })
+        )
+      );
+      let subList = [];
+      list.forEach((res) => {
+        arr.forEach((ele) => {
+          if (ele[level1] === res) {
+            let nameArr = subList.map((item) => item[level1]);
+            if (nameArr.indexOf(res) !== -1) {
+              subList[nameArr.indexOf(res)].children.push({
+                ...ele,
+              });
+            } else {
+              let resIndex = parseInt(res);
+              subList.push({
+                uploadType: res,
+                uploadTypeName: this.nameList[resIndex],
+                children: [
+                  {
+                    ...ele,
+                  },
+                ],
+              });
+            }
+          }
+        });
+      });
+      return subList;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.fileItems{
+    cursor: pointer;
+    color:#2440b3;
+    text-decoration: underline;
+    margin:8px 0;
+}
+</style>

+ 3 - 2
ruoyi-ui/src/views/invest/components/meetingList.vue

@@ -490,7 +490,7 @@ export default {
       verifyProjectName: false,
       fileList: [],
       showProjectItem: false,
-      deptId: "",
+      deptId: process.env.VUE_APP_DEPTID,
       // 遮罩层
       loading: true,
 
@@ -702,10 +702,11 @@ export default {
     // 获取公司信息
     getProjectInfo(info) {
       if (info.length > 0) {
+        console.log("info=",info)
         this.form.projectPoolId = info[0].id;
         this.form.projectName = info[0].projectName;
         this.form.projectStage = info[0].projectStage;
-        this.form.projectGroup = info[0].projectGroup;
+        this.form.projectGroup = info[0].tProjectChannel.channelGroup;
         this.form.projectState = info[0].projectState;
         this.$refs.form.clearValidate(["projectName"]);
       }

+ 2 - 1
ruoyi-ui/src/views/invest/components/poolForm.vue

@@ -297,7 +297,7 @@ export default {
   dicts: ["CUSTOMER_TRADE", "project_group"],
   data() {
     return {
-      deptId: "103",
+      deptId: process.env.VUE_APP_DEPTID,
       title: "新增项目",
       baseUrl: process.env.VUE_APP_BASE_API,
 
@@ -444,6 +444,7 @@ export default {
     };
   },
   mounted() {
+    console.log("000",this.deptId)
     if (this.id) {
       this.getPoolDetail(this.id);
     } else {

+ 26 - 9
ruoyi-ui/src/views/invest/components/projectItem.vue

@@ -14,18 +14,28 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="55" align="center" />
+
         <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
         <el-table-column label="项目名称" align="center" prop="projectName" />
-        <el-table-column label="所属组别" align="center" prop="projectGroup">
+        <el-table-column
+          label="渠道"
+          align="center"
+          prop="tProjectChannel.channelName"
+        />
+        <el-table-column
+          label="所属组别"
+          align="center"
+          prop="tProjectChannel.channelGroup"
+        >
           <template slot-scope="scope">
             <dict-tag
               :options="dict.type.project_group"
-              :value="scope.row.projectGroup"
+              :value="scope.row.tProjectChannel.channelGroup"
             />
           </template>
         </el-table-column>
-        <el-table-column label="项目编号" align="center" prop="projectCode" />
-        <el-table-column label="渠道" align="center" prop="channel" />
+        <!-- <el-table-column label="项目编号" align="center" prop="projectCode" /> -->
+
         <el-table-column label="投资负责人" align="center" prop="investHead" />
         <el-table-column label="项目阶段" align="center" prop="projectStage">
           <template slot-scope="scope">
@@ -35,7 +45,14 @@
             />
           </template>
         </el-table-column>
-        <el-table-column label="项目状态" align="center" prop="projectState" />
+        <el-table-column label="项目状态" align="center" prop="projectState">
+          <template slot-scope="scope">
+            <dict-tag
+              :options="dict.type.project_state"
+              :value="scope.row.projectState"
+            />
+          </template>
+        </el-table-column>
       </el-table>
       <pagination
         v-show="projectItemTotal > 0"
@@ -60,7 +77,7 @@ export default {
     //   default: false,
     // },
   },
-  dicts: ["project_group", "project_stage"],
+  dicts: ["project_group", "project_stage", "project_state"],
   data() {
     return {
       showProjectItem: false,
@@ -73,10 +90,10 @@ export default {
         orderByColumn: "createTime",
         isAsc: "desc",
       },
-      
-    // 选中数组
+
+      // 选中数组
       ids: [],
-      idsName:[],
+      idsName: [],
       // 非单个禁用
       single: true,
       // 非多个禁用

+ 15 - 2
ruoyi-ui/src/views/invest/components/projectList.vue

@@ -253,7 +253,11 @@
         align="center"
         prop="tProjectChannel.channelName"
       />
-      <el-table-column label="所属组别" align="center" prop="tProjectChannel.channelGroup">
+      <el-table-column
+        label="所属组别"
+        align="center"
+        prop="tProjectChannel.channelGroup"
+      >
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.project_group"
@@ -480,7 +484,11 @@
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="项目阶段" prop="projectStage">
-          <el-select v-model="form.projectStage" placeholder="请选择项目阶段">
+          <el-select
+            v-model="form.projectStage"
+            ref="selectLable"
+            placeholder="请选择项目阶段"
+          >
             <el-option
               @click.native="handleProjectSelect(index, dict)"
               v-for="(dict, index) in dict.type.project_stage"
@@ -998,6 +1006,8 @@ export default {
     handleProjectSelect(index, dict) {
       this.form.projectState = null;
       this.project_state = this.projectState[index];
+      // 给个默认值
+      this.form.projectState = this.project_state[0].dictValue;
       if (dict && dict.label) {
         this.form.stageName = dict.label;
       }
@@ -1052,6 +1062,9 @@ export default {
       this.form = row;
       this.open = true;
       this.title = "设置项目阶段";
+      setTimeout(() => {
+        this.form.stageName = this.$refs.selectLable.selected.label;
+      }, 300);
     },
     // 发起会议
     handleMeeting(row, meetingType) {

+ 2 - 0
ruoyi-ui/src/views/invest/components/selecDept.vue

@@ -143,6 +143,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        status:"0",
         userName: "",
         phonenumber: "",
         deptId: "",
@@ -154,6 +155,7 @@ export default {
   methods: {
     // 显示弹框
     show(type) {
+      console.log("deptId=",this.deptId)
       this.queryParams.deptId = this.deptId;
       if (type) {
         this.type = type;

+ 8 - 0
ruoyi-ui/src/views/invest/pool/detail.vue

@@ -91,6 +91,7 @@
         <el-tab-pane label="会议记录" name="6"></el-tab-pane>
         <el-tab-pane label="文件资料" name="7"></el-tab-pane>
         <el-tab-pane label="合同" name="8"></el-tab-pane>
+        <el-tab-pane label="附件" name="9"></el-tab-pane>
       </el-tabs>
       <section>
         <div v-show="activeName === '0'">
@@ -150,6 +151,9 @@
             :projectId="id"
           ></contractList>
         </div>
+        <div v-show="activeName === '9'">
+          <listAllfile :projectId="id"></listAllfile>
+        </div>
       </section>
     </section>
   </div>
@@ -162,8 +166,11 @@ import followList from "../components/followList";
 import meetingList from "../components/meetingList";
 import projectList from "../components/projectList";
 import tableForm from "../components/tableForm";
+import listAllfile from "../components/listAllfile";
+
 import { getPool, listProjectPoolId } from "@/api/invest/pool";
 import { listMeeting } from "@/api/invest/meeting";
+
 export default {
   name: "investPoolDetail",
   components: {
@@ -174,6 +181,7 @@ export default {
     meetingList,
     projectList,
     tableForm,
+    listAllfile
   },
   data() {
     return {