意见反馈title
parent
bbfd119d08
commit
e0ccfe8da7
|
@ -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")}`;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,6 @@ export default {
|
|||
}
|
||||
},
|
||||
initFileList(list) {
|
||||
console.log(list);
|
||||
if (list && list.length > 0) {
|
||||
this.fileList = [];
|
||||
list.forEach((item, index) => {
|
||||
|
|
|
@ -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", () => {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -169,7 +169,12 @@ export default {
|
|||
},
|
||||
// 打开反馈意见列表
|
||||
openFeedBack() {
|
||||
this.$FBT();
|
||||
this.$FBT({
|
||||
data: {
|
||||
code: this.$route.query.trialCode,
|
||||
name: this.$route.query.researchProgramNo,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue