|
@@ -159,10 +159,10 @@ const data = reactive<any>({
|
|
|
const { optionForm, optionWindow, project, musicList, classList, chooseArea, chooseAllState, loading } = toRefs(data);
|
|
|
|
|
|
//打开
|
|
|
-const open = (data: any) => {
|
|
|
+const open = async (data: any) => {
|
|
|
console.log("data", data);
|
|
|
- getClass();
|
|
|
- getMusic();
|
|
|
+ await getClass();
|
|
|
+ await getMusic();
|
|
|
project.value = data;
|
|
|
chooseArea.value = [];
|
|
|
optionWindow.value.show = true;
|
|
@@ -187,12 +187,12 @@ const areaList = computed(() => {
|
|
|
});
|
|
|
|
|
|
//获取音乐
|
|
|
-const getMusic = () => {
|
|
|
+const getMusic = async () => {
|
|
|
const list: any = useAppStore().getMusic();
|
|
|
if (list.length) {
|
|
|
musicList.value = list;
|
|
|
} else {
|
|
|
- proxy?.$http.train.musicList().then((res: any) => {
|
|
|
+ await proxy?.$http.train.musicList().then((res: any) => {
|
|
|
if (res.data.length > 0) {
|
|
|
let myList: any = res.data;
|
|
|
musicList.value = myList;
|
|
@@ -204,7 +204,7 @@ const getMusic = () => {
|
|
|
};
|
|
|
|
|
|
//获取班级列表
|
|
|
-const getClass = () => {
|
|
|
+const getClass = async () => {
|
|
|
const list: any = useAppStore().getClass();
|
|
|
if (list.length) {
|
|
|
classList.value = list;
|
|
@@ -213,7 +213,7 @@ const getClass = () => {
|
|
|
page: 1,
|
|
|
per_page: 9999,
|
|
|
};
|
|
|
- proxy?.$http.common.classList(params).then((res: any) => {
|
|
|
+ await proxy?.$http.common.classList(params).then((res: any) => {
|
|
|
if (res.data.length > 0) {
|
|
|
let myList: any = res.data;
|
|
|
classList.value = myList;
|
|
@@ -265,7 +265,8 @@ const getAllArea = (data: any) => {
|
|
|
};
|
|
|
|
|
|
//确定
|
|
|
-const confirm = (data: any) => {
|
|
|
+const confirm = () => {
|
|
|
+ console.log("project.value", project.value)
|
|
|
optionForm.value.project = project.value.key;
|
|
|
optionForm.value.classes = classList.value.map((item: any) => { return item.id; }).join();
|
|
|
optionForm.value.area = chooseArea.value.join();
|
|
@@ -281,11 +282,11 @@ const confirm = (data: any) => {
|
|
|
ElMessage({ message: message, type: 'error', duration: 3 * 1000 });
|
|
|
return false;
|
|
|
}
|
|
|
- if (optionForm.value.standard == null) {
|
|
|
- let message = "请选择评分标准";
|
|
|
- ElMessage({ message: message, type: 'error', duration: 3 * 1000 });
|
|
|
- return false;
|
|
|
- }
|
|
|
+ // if (optionForm.value.standard == null) {
|
|
|
+ // let message = "请选择评分标准";
|
|
|
+ // ElMessage({ message: message, type: 'error', duration: 3 * 1000 });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
loading.value = true;
|
|
|
if (chooseArea.value.length > 1) {
|
|
|
//多区域
|
|
@@ -300,6 +301,15 @@ const confirm = (data: any) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+//手势赋值跳转
|
|
|
+const getGesture = async (myProject, data) => {
|
|
|
+ await getClass();
|
|
|
+ project.value = myProject;
|
|
|
+ chooseArea.value = data.area.split(",");
|
|
|
+ optionForm.value = data;
|
|
|
+ confirm();
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
})
|
|
|
|
|
@@ -311,7 +321,8 @@ onBeforeUnmount(() => {
|
|
|
defineExpose({
|
|
|
open,
|
|
|
close,
|
|
|
- optionWindow
|
|
|
+ optionWindow,
|
|
|
+ getGesture
|
|
|
})
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|