反馈设置为已解决后,统计数量刷新

uat_us
DESKTOP-6C3NK6N\WXS 2024-08-07 10:37:12 +08:00
parent 6e72825dff
commit 2e56e069d2
4 changed files with 12 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import FEEDBACKCOMP from "./index.vue";
const FBConstructor = Vue.extend(FEEDBACKCOMP); const FBConstructor = Vue.extend(FEEDBACKCOMP);
const FBT = (options = {}) => { const FBT = (options = {}) => {
const { data = {} } = options; const { data = {}, callBack } = 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();
@ -13,6 +13,7 @@ const FBT = (options = {}) => {
document.body.appendChild(instance.vm.$el); document.body.appendChild(instance.vm.$el);
instance.vm.open({ ...data }); instance.vm.open({ ...data });
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);

View File

@ -10,7 +10,7 @@
<div slot="title"> <div slot="title">
{{ title }} {{ title }}
</div> </div>
<feedBackTable :trialId="trialId" /> <feedBackTable :trialId="trialId" @success="success" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -46,6 +46,9 @@ export default {
return `${this.$t("feedBack:table:title")}`; return `${this.$t("feedBack:table:title")}`;
} }
}, },
success() {
this.$emit("success");
},
}, },
}; };
</script> </script>

View File

@ -116,14 +116,14 @@
> >
{{ $t("common:button:reset") }} {{ $t("common:button:reset") }}
</el-button> </el-button>
<el-button <!-- <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="report" @click="report"
v-if="level > 7" v-if="level > 7"
> >
{{ $t("common:button:export") }} {{ $t("common:button:export") }}
</el-button> </el-button> -->
</el-form-item> </el-form-item>
<el-button <el-button
type="primary" type="primary"
@ -445,6 +445,7 @@ export default {
Id: row.Id, Id: row.Id,
callBack: () => { callBack: () => {
this.getList(); this.getList();
this.$emit("success");
}, },
}); });
}, },

View File

@ -179,6 +179,9 @@ export default {
name: this.$route.query.researchProgramNo, name: this.$route.query.researchProgramNo,
trialId: this.trialId, trialId: this.trialId,
}, },
callBack: () => {
this.initForm();
},
}); });
}, },
}, },