From e0ccfe8da767ad7782ced3c02972a48de9638460 Mon Sep 17 00:00:00 2001 From: "DESKTOP-6C3NK6N\\WXS" <815034831@qq.com> Date: Thu, 1 Aug 2024 16:15:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/feedBack/index.vue | 15 ++++++++++++++- src/components/feedBack/uploadImage.vue | 1 - src/components/feedBackTable/fun.js | 6 +++--- src/components/feedBackTable/index.vue | 3 ++- .../trial-summary/trial-information/index.vue | 7 ++++++- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/components/feedBack/index.vue b/src/components/feedBack/index.vue index a0ef96d3..a509c457 100644 --- a/src/components/feedBack/index.vue +++ b/src/components/feedBack/index.vue @@ -316,6 +316,12 @@ export default { if (res.Result.State > 0) { this.isStateChange = false; } + let code = this.$fd("UserType", res.Result.UserTypeEnum); + this.title = this.setTitle(code, res.Result.FeedBackFullName); + if (visitTaskId) { + code = `${res.Result.SubjectCode}-${res.Result.SubjectVisitName}`; + this.title = this.setTitle(code, res.Result.FeedBackFullName); + } this.$refs.uploadImage.initFileList(res.Result.ScreenshotList); } } catch (err) { @@ -330,9 +336,16 @@ export default { return (this.option = this.$d.FeedBackTypeToCRC); }, setTitle(code, name) { - if (this.hasPermi(["role:pm"])) { + console.log(code, name); + if (this.hasPermi(["role:pm"]) && this.visitTaskId) { + return `${this.$t("feedBack:form:title:pm2")}(${code}/${name})`; + } + if (this.hasPermi(["role:pm", "role:dev", "role:admin"])) { return `${this.$t("feedBack:form:title:pm")}(${code},${name})`; } + if (this.hasPermi(["role:ir", "role:crc"]) && this.type === "detail") { + return `${this.$t("feedBack:form:detail:title")}`; + } if (this.hasPermi(["role:ir", "role:crc"])) { return `${this.$t("feedBack:form:title")}`; } diff --git a/src/components/feedBack/uploadImage.vue b/src/components/feedBack/uploadImage.vue index 17526f37..18c38d2d 100644 --- a/src/components/feedBack/uploadImage.vue +++ b/src/components/feedBack/uploadImage.vue @@ -101,7 +101,6 @@ export default { } }, initFileList(list) { - console.log(list); if (list && list.length > 0) { this.fileList = []; list.forEach((item, index) => { diff --git a/src/components/feedBackTable/fun.js b/src/components/feedBackTable/fun.js index 16fd09c2..d3083b5a 100644 --- a/src/components/feedBackTable/fun.js +++ b/src/components/feedBackTable/fun.js @@ -2,8 +2,8 @@ import Vue from "vue"; import FEEDBACKCOMP from "./index.vue"; const FBConstructor = Vue.extend(FEEDBACKCOMP); -const FBT = options => { - // const { cancelBack } = options; +const FBT = (options = {}) => { + const { data = {} } = options; // if (!UserId) throw `UserId is requred.but ${UserId}` const id = `FB${new Date().getTime()}`; const instance = new FBConstructor(); @@ -11,7 +11,7 @@ const FBT = options => { instance.vm = instance.$mount(); if (instance.vm.visible) return; document.body.appendChild(instance.vm.$el); - instance.vm.open(); + instance.vm.open({ ...data }); instance.vm.$on("success", (Id) => { }); instance.vm.$on("closed", () => { diff --git a/src/components/feedBackTable/index.vue b/src/components/feedBackTable/index.vue index f39e260f..90e2f230 100644 --- a/src/components/feedBackTable/index.vue +++ b/src/components/feedBackTable/index.vue @@ -28,7 +28,8 @@ export default { computed: {}, methods: { open(data) { - this.title = this.setTitle(); + let { code, name } = data; + this.title = this.setTitle(code, name); this.visible = true; }, cancel() { diff --git a/src/views/trials/trials-panel/trial-summary/trial-information/index.vue b/src/views/trials/trials-panel/trial-summary/trial-information/index.vue index e8e3d60c..59a0b3d6 100644 --- a/src/views/trials/trials-panel/trial-summary/trial-information/index.vue +++ b/src/views/trials/trials-panel/trial-summary/trial-information/index.vue @@ -169,7 +169,12 @@ export default { }, // 打开反馈意见列表 openFeedBack() { - this.$FBT(); + this.$FBT({ + data: { + code: this.$route.query.trialCode, + name: this.$route.query.researchProgramNo, + }, + }); }, }, };