意见反馈title

uat_us
DESKTOP-6C3NK6N\WXS 2024-08-01 16:15:27 +08:00
parent bbfd119d08
commit e0ccfe8da7
5 changed files with 25 additions and 7 deletions

View File

@ -316,6 +316,12 @@ export default {
if (res.Result.State > 0) { if (res.Result.State > 0) {
this.isStateChange = false; 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); this.$refs.uploadImage.initFileList(res.Result.ScreenshotList);
} }
} catch (err) { } catch (err) {
@ -330,9 +336,16 @@ export default {
return (this.option = this.$d.FeedBackTypeToCRC); return (this.option = this.$d.FeedBackTypeToCRC);
}, },
setTitle(code, name) { 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})`; 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"])) { if (this.hasPermi(["role:ir", "role:crc"])) {
return `${this.$t("feedBack:form:title")}`; return `${this.$t("feedBack:form:title")}`;
} }

View File

@ -101,7 +101,6 @@ export default {
} }
}, },
initFileList(list) { initFileList(list) {
console.log(list);
if (list && list.length > 0) { if (list && list.length > 0) {
this.fileList = []; this.fileList = [];
list.forEach((item, index) => { list.forEach((item, index) => {

View File

@ -2,8 +2,8 @@ import Vue from "vue";
import FEEDBACKCOMP from "./index.vue"; import FEEDBACKCOMP from "./index.vue";
const FBConstructor = Vue.extend(FEEDBACKCOMP); const FBConstructor = Vue.extend(FEEDBACKCOMP);
const FBT = options => { const FBT = (options = {}) => {
// const { cancelBack } = options; const { data = {} } = options;
// if (!UserId) throw `UserId is requred.but ${UserId}` // if (!UserId) throw `UserId is requred.but ${UserId}`
const id = `FB${new Date().getTime()}`; const id = `FB${new Date().getTime()}`;
const instance = new FBConstructor(); const instance = new FBConstructor();
@ -11,7 +11,7 @@ const FBT = options => {
instance.vm = instance.$mount(); instance.vm = instance.$mount();
if (instance.vm.visible) return; if (instance.vm.visible) return;
document.body.appendChild(instance.vm.$el); document.body.appendChild(instance.vm.$el);
instance.vm.open(); instance.vm.open({ ...data });
instance.vm.$on("success", (Id) => { instance.vm.$on("success", (Id) => {
}); });
instance.vm.$on("closed", () => { instance.vm.$on("closed", () => {

View File

@ -28,7 +28,8 @@ export default {
computed: {}, computed: {},
methods: { methods: {
open(data) { open(data) {
this.title = this.setTitle(); let { code, name } = data;
this.title = this.setTitle(code, name);
this.visible = true; this.visible = true;
}, },
cancel() { cancel() {

View File

@ -169,7 +169,12 @@ export default {
}, },
// //
openFeedBack() { openFeedBack() {
this.$FBT(); this.$FBT({
data: {
code: this.$route.query.trialCode,
name: this.$route.query.researchProgramNo,
},
});
}, },
}, },
}; };