armg преди 1 година
родител
ревизия
0278a3c8c9

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

@@ -56,7 +56,7 @@ export function downloadFileById(id) {
   return request({
     url: '/system/file/download/' + id,
     method: 'get',
-    
+    responseType: "blob"
   })
 }
 

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

@@ -86,7 +86,14 @@ export default {
     },
     //点击文件列表中已上传的文件时的钩子
     handlePreview(file) {
-      downloadFileById(file.id).then((response) => {});
+      downloadFileById(file.id).then((response) => {
+        const url = window.URL.createObjectURL(new Blob([response]));
+        const link = document.createElement("a");
+        link.href = url;
+        link.setAttribute("download", file.newUploadName);
+        document.body.appendChild(link);
+        link.click();
+      });
     },
   },
 };

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

@@ -328,7 +328,7 @@ export default {
   components: { projectItem, fileItem, selecDept },
   watch: {
     open: function (newValue, oldValue) {
-      console.log("newValue=", newValue);
+      // console.log("newValue=", newValue);
       if (newValue === false) {
         this.queryParams.projectId = null;
         this.pageType = null;

+ 11 - 4
ruoyi-ui/src/views/invest/components/listAllfile.vue

@@ -6,7 +6,7 @@
           <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 class="fileItems" title="点击下载" @click="handlePreview(items)"> {{ items.newUploadName }}</div>
         </div>
       </el-card>
     </div>
@@ -54,8 +54,15 @@ export default {
   },
   methods: {
     //点击文件列表中已上传的文件时的钩子
-    handlePreview(id) {
-      downloadFileById(id).then((response) => {});
+    handlePreview(file) {
+      downloadFileById(file.id).then((response) => {
+        const url = window.URL.createObjectURL(new Blob([response]));
+        const link = document.createElement("a");
+        link.href = url;
+        link.setAttribute("download", file.newUploadName);
+        document.body.appendChild(link);
+        link.click();
+      });
     },
     getList() {
       let fileData;
@@ -65,7 +72,7 @@ export default {
         })
         .then(() => {
           this.fileList = this.handleList(fileData);
-          console.log(this.fileList);
+          // console.log(this.fileList);
         });
     },
     handleList(arr) {

+ 11 - 5
ruoyi-ui/src/views/invest/components/meetingList.vue

@@ -480,6 +480,7 @@ export default {
   },
   data() {
     return {
+      showMenu:false,
       // 人员选择器
       checkType: "multiple",
       // 数据回显
@@ -612,19 +613,18 @@ export default {
     },
     getButtonItem(row) {
       this.showMarkBtn = false;
+      this.isInitiator = false;
       // 是否是发起人
-      this.isInitiator = row.promoterId == this.user.userId;
+      let isInitiator = row.promoterId == this.user.userId;
       // 参与人数组
       let participantsIdList = row.participantsId.split(",");
       // console.log("是否是发起人",this.isInitiator)
       // console.log("参与人数组",participantsIdList,"this.user.userId=",this.user.userId,participantsIdList.indexOf(this.user.userId) > -1)
-      if (this.isInitiator) {
+      if (isInitiator) {
         // 参与人里面包含发起人
         if (participantsIdList.indexOf(this.user.userId) > -1) {
           this.showMarkBtn = true;
         }
-      } else {
-        this.showMarkBtn = true;
       }
       // console.log("this.showMarkBtn=",this.showMarkBtn)
       getCanScoringMeetingId(row.id).then((response) => {
@@ -632,9 +632,14 @@ export default {
         if (response.tProjectScoring) {
           this.showLookMark = true;
           this.$store.commit("SET_TPROJECTSCORING", response.tProjectScoring);
+          this.isInitiator = true;
         } else {
           // 去打分
           this.showLookMark = false;
+          this.isInitiator = false;
+          if (!this.showMarkBtn) {
+            this.$message.warning("暂无更多操作权限");
+          }
         }
       });
     },
@@ -672,6 +677,7 @@ export default {
         // this.$refs.selecDepts1.show(type);
       } else {
         this.$refs.selecDepts.show(type);
+        this.$refs.selecDepts.handler(this.form.promoter,this.form.promoterId)
       }
     },
     getDeptUserInfo(info) {
@@ -702,7 +708,7 @@ export default {
     // 获取公司信息
     getProjectInfo(info) {
       if (info.length > 0) {
-        console.log("info=",info)
+        // console.log("info=", info);
         this.form.projectPoolId = info[0].id;
         this.form.projectName = info[0].projectName;
         this.form.projectStage = info[0].projectStage;

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

@@ -444,7 +444,6 @@ export default {
     };
   },
   mounted() {
-    console.log("000",this.deptId)
     if (this.id) {
       this.getPoolDetail(this.id);
     } else {

+ 23 - 3
ruoyi-ui/src/views/invest/components/selecDept.vue

@@ -127,9 +127,16 @@ export default {
       type: Boolean,
       default: true,
     },
+    // 回显数据传值
+    // selectValues: {
+    //   type: Number | String | Array,
+    //   default: null,
+    //   required: false,
+    // },
   },
   data() {
     return {
+      selectValues: [],
       type: 1,
       // 遮罩层
       visible: false,
@@ -143,7 +150,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        status:"0",
+        status: "0",
         userName: "",
         phonenumber: "",
         deptId: "",
@@ -155,7 +162,6 @@ export default {
   methods: {
     // 显示弹框
     show(type) {
-      console.log("deptId=",this.deptId)
       this.queryParams.deptId = this.deptId;
       if (type) {
         this.type = type;
@@ -168,7 +174,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      // console.log("多选框选中数据",selection)
+      console.log("多选框选中数据",selection)
       if (this.type == 1) {
         if (selection.length > 1) {
           this.$modal.msg("只能选择一个跟进人");
@@ -216,6 +222,20 @@ export default {
       }
       this.visible = false;
     },
+    handler(promoter, promoterId) {
+      console.log(promoter, promoterId);
+      // this.$nextTick(() => {
+      this.ids = [];
+      // table与table的ref绑定的一样
+      // this.$refs.table.clearSelection();
+      // selectRoleList?.split(",").forEach((key) => {
+      //   this.$refs.table.toggleRowSelection(
+      //     selectRoleList.find((item) => key == item.roleId),
+      //     true
+      //   );
+      // });
+      // });
+    },
   },
 };
 </script>