This commit is contained in:
yuping
2022-12-13 13:16:30 +08:00
parent bdcf953d34
commit 3188cfe351

View File

@@ -41,7 +41,7 @@
<botton
class="btn"
style="background: rgb(59, 191, 252)"
@click="commitClick"
@click="showClick"
>观看</botton
>
<botton
@@ -159,15 +159,16 @@ import { reactive, toRefs } from "vue";
import img from "@/assets/image/uploadimg.png";
import { request, useRequest } from "@/api/request";
import {
TASK_BROADCAST_COMMIT,
TASK_BROADCAST_DETAIL,
TASK_BROADCAST_SIGN,
} from "@/api/api";
import { useRoute } from "vue-router/dist/vue-router";
import {useRouter} from "vue-router";
const {
query: { courseId: liveId },
} = useRoute();
const router = useRouter()
const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId });
const state = reactive({
@@ -182,20 +183,20 @@ const state = reactive({
},
],
});
const { activeName, teacher } = toRefs(state);
const {activeName, teacher} = toRefs(state)
const signClick = (id) => {
request(TASK_BROADCAST_SIGN, { id }).then(() => {
console.log(data.value);
data.value.signFlag = 1;
});
request(TASK_BROADCAST_SIGN, {id}).then(() => {
data.value.signFlag = 1
})
};
const commitClick = (id) => {
request(TASK_BROADCAST_COMMIT, { id }).then(() => {
data.value.evalFlag = 1;
});
const commitClick = () => {
router.push({path: '/surveydetail', query: {courseId: data.value.assessmentId}})
};
function showClick() {}
function showClick() {
window.open(data.value.liveLink)
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->