面授讲师

This commit is contained in:
joshen
2025-03-09 14:00:48 +08:00
parent 771adb8764
commit c038a6890f
2 changed files with 53 additions and 3 deletions

23
src/hooks/useOrgName.js Normal file
View File

@@ -0,0 +1,23 @@
/**截取机构名称路径namePath最后两段不包含第一个 */
const useOrgName = (namePath) => {
let newName = namePath;
if (newName) {
let names = newName.split('/');
let len = names.length;
//使用最后两们
if (len > 1) {
newName = names[1];
if (!newName) {
newName = names[0]
}
}
}
return newName;
};
export {
useOrgName
}

View File

@@ -223,7 +223,11 @@
<el-dialog v-model="centerDialogVisible" title="" width="70%" center :show-close="false" :align-center="true">
<div style="text-align: center;font-size:16px;"> <span style="color:black">
您已完成评估
</span></div>
</span>
<div style="color:black;font-size:16px;">
将于<span style="margin: 0 2px 0 2px;">{{ deadline }}</span>秒后跳转到首页
</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button class="cancel"
@@ -231,7 +235,7 @@
@click="centerDialogVisible = false">取消</el-button>
<el-button class="back"
style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;"
type="primary" @click="centerDialogVisible = false">
type="primary" @click="pauseCountdown()">
确定
</el-button>
</span>
@@ -335,6 +339,9 @@ const { data } = useRequest(
if (res.code === 7) {
router.push({
path: "/loseefficacy",
query: {
msg: res.message,
}
});
} else {
if (res.code === 6) {
@@ -439,11 +446,31 @@ onMounted(() => {
})
console.log(data,'data')
});
const deadline = ref(3);
const centerDialogVisible = ref(false);
const timer = ref(null);
const open = () => {
centerDialogVisible.value = true;
timer.value = setInterval(() => {
if (deadline.value > 0) {
deadline.value -= 1;
} else {
pauseCountdown();
}
}, 1000);
};
const goBack = () => {
window.location.href =
window.location.protocol + import.meta.env.VITE_BOE_HOME;
}
const pauseCountdown = () => {
centerDialogVisible.value = false;
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
goBack()
}
};
const isEmptyValue = ref(false);
function emptyValuePromp() {
if (data.value.isSubmit) {