意见反馈添加字段
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-08-01 10:39:54 +08:00
parent c13fe6b521
commit 96cb8a478c
4 changed files with 10 additions and 12 deletions

View File

@ -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);

View File

@ -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();

View File

@ -294,7 +294,7 @@ export default {
],
data() {
return {
list: [{ PublishUserName: 1 }],
list: [],
total: 0,
loading: false,
datetimerange: [],

View File

@ -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;
},
});
},
//