意见反馈添加字段
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c13fe6b521
commit
96cb8a478c
|
@ -3,7 +3,7 @@ import FEEDBACKCOMP from "./index.vue";
|
|||
const FBConstructor = Vue.extend(FEEDBACKCOMP);
|
||||
|
||||
const FB = options => {
|
||||
const { type, cancelBack, trialId = null, Id = null } = options;
|
||||
const { type, callBack, cancelBack, trialId = null, Id = null, visitTaskId = null } = options;
|
||||
if (!type) throw `type is requred.but ${type}`
|
||||
const id = `FB${new Date().getTime()}`;
|
||||
const instance = new FBConstructor();
|
||||
|
@ -12,8 +12,10 @@ const FB = options => {
|
|||
if (instance.vm.visible) return;
|
||||
document.body.appendChild(instance.vm.$el);
|
||||
console.log(type);
|
||||
instance.vm.open({ type, trialId, Id });
|
||||
instance.vm.open({ type, trialId, Id, visitTaskId });
|
||||
instance.vm.$on("success", (Id) => {
|
||||
if (callBack) callBack();
|
||||
|
||||
});
|
||||
instance.vm.$on("closed", () => {
|
||||
document.body.removeChild(instance.vm.$el);
|
||||
|
|
|
@ -149,8 +149,9 @@ export default {
|
|||
loading: false,
|
||||
options: [],
|
||||
type: null, // detail 表格详情 feedback 填写反馈 imgfail 影像异常
|
||||
trialId: null,
|
||||
Id: null,
|
||||
trialId: null, // 项目id
|
||||
Id: null, // 反馈数据id
|
||||
visitTaskId: null, // 任务id
|
||||
form: {
|
||||
Code: null,
|
||||
UserId: null,
|
||||
|
@ -200,10 +201,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
open(data) {
|
||||
let { type, trialId, Id } = data;
|
||||
let { type, trialId, Id, visitTaskId } = data;
|
||||
this.type = type;
|
||||
this.trialId = trialId;
|
||||
this.Id = Id;
|
||||
this.visitTaskId = visitTaskId;
|
||||
this.visible = true;
|
||||
if (!Id) {
|
||||
this.title = this.setTitle();
|
||||
|
|
|
@ -294,7 +294,7 @@ export default {
|
|||
],
|
||||
data() {
|
||||
return {
|
||||
list: [{ PublishUserName: 1 }],
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
datetimerange: [],
|
||||
|
|
|
@ -28,12 +28,10 @@ export default {
|
|||
return {
|
||||
visible: false,
|
||||
show: null,
|
||||
lock: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
document.getElementsByTagName("body")[0].addEventListener("click", () => {
|
||||
if (this.lock) return;
|
||||
this.visible = false;
|
||||
if (this.show) {
|
||||
this.show = false;
|
||||
|
@ -57,13 +55,9 @@ export default {
|
|||
},
|
||||
// 打开意见反馈
|
||||
openFeedBack() {
|
||||
this.lock = true;
|
||||
this.$FB({
|
||||
type: "feedback",
|
||||
trialId: this.$route.query.trialId,
|
||||
cancelBack: () => {
|
||||
this.lock = false;
|
||||
},
|
||||
});
|
||||
},
|
||||
// 打开反馈列表
|
||||
|
|
Loading…
Reference in New Issue