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