意见反馈title
parent
bbfd119d08
commit
e0ccfe8da7
|
@ -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")}`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) => {
|
||||||
|
|
|
@ -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", () => {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -169,7 +169,12 @@ export default {
|
||||||
},
|
},
|
||||||
// 打开反馈意见列表
|
// 打开反馈意见列表
|
||||||
openFeedBack() {
|
openFeedBack() {
|
||||||
this.$FBT();
|
this.$FBT({
|
||||||
|
data: {
|
||||||
|
code: this.$route.query.trialCode,
|
||||||
|
name: this.$route.query.researchProgramNo,
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue