Compare commits
18 Commits
7a6f57a9b7
...
5b49eef8e8
Author | SHA1 | Date |
---|---|---|
小杨 | 5b49eef8e8 | |
小杨 | 1060929532 | |
baigl | 448c4d979f | |
白了个白 | 222f558807 | |
白了个白 | ef5dfc8ed1 | |
yangws | 733855b95e | |
白了个白 | 48571086c3 | |
白了个白 | b967c684d6 | |
白了个白 | 84e8acdef7 | |
白了个白 | d8c4556393 | |
“zouyf” | 2d9518804e | |
“zouyf” | e405eb041b | |
“zouyf” | 09e6bec69f | |
“zouyf” | d26af6446a | |
白了个白 | 42f24041db | |
白了个白 | b081000f11 | |
白了个白 | 124b584e38 | |
白了个白 | 639178c827 |
|
@ -109,3 +109,20 @@ export function pyOCRAPI(path) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @desc: 菁优网转发
|
||||||
|
* @return: {*}
|
||||||
|
* @param {*} url
|
||||||
|
* @param {*} config
|
||||||
|
*/
|
||||||
|
export function getJYPath(url,config) {
|
||||||
|
config.params = config.params?config.params:{}
|
||||||
|
config.params["getjypath"] = url;
|
||||||
|
return request({
|
||||||
|
url: "/jy/proxy",
|
||||||
|
method: config.method||"get",
|
||||||
|
params: config.params
|
||||||
|
})
|
||||||
|
}
|
|
@ -1,16 +1,46 @@
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { } from '@/api/classTask/index.js'
|
import { } from '@/api/classTask/index.js'
|
||||||
import { listClassmain } from '@/api/classManage/index'
|
import { listClassmain } from '@/api/classManage/index'
|
||||||
|
import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuestion/jyeoo"
|
||||||
|
|
||||||
const useClassTaskStore = defineStore('classTask',{
|
const useClassTaskStore = defineStore('classTask',{
|
||||||
state: () => ({
|
state: () => ({
|
||||||
classListIds: [],
|
classListIds: [],
|
||||||
|
entpCourseWorkTypeList: [
|
||||||
|
{value: 0, label: "不限"},
|
||||||
|
{value: 1, label: "单选题"},
|
||||||
|
{value: 2, label: "填空题"},
|
||||||
|
{value: 3, label: "多选题"},
|
||||||
|
{value: 4, label: "判断题"},
|
||||||
|
{value: 5, label: "主观题"},
|
||||||
|
{value: 6, label: "复合题"},
|
||||||
|
], // 习题查询条件 - 题型
|
||||||
|
entpCourseWorkGroupList: [{
|
||||||
|
Key: -1,
|
||||||
|
Value: '不限',
|
||||||
|
}, {
|
||||||
|
Key: 1,
|
||||||
|
Value: '真题',
|
||||||
|
}, {
|
||||||
|
Key: 0,
|
||||||
|
Value: '非真题',
|
||||||
|
}
|
||||||
|
], // 习题查询条件 - 题源
|
||||||
|
entpCourseWorkYearList: [
|
||||||
|
{label: '不限', value: '-1'},
|
||||||
|
{label: '2024', value: '2024'},
|
||||||
|
{label: '2023', value: '2023'},
|
||||||
|
{label: '2022', value: '2022'},
|
||||||
|
{label: '2021', value: '2021'},
|
||||||
|
{label: '2020', value: '2020'},
|
||||||
|
], // 习题查询条件 - 年份
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
listClassmain(params) {
|
listClassmain(params) {
|
||||||
// 获取班级列表
|
// 获取班级列表
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
listClassmain(params)
|
const education = params.edustage + params.edusubject;
|
||||||
|
listClassmain(education)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.classListIds = res.rows&&res.rows.map((item) => item.id)
|
this.classListIds = res.rows&&res.rows.map((item) => item.id)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
|
@ -20,9 +50,58 @@ const useClassTaskStore = defineStore('classTask',{
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 根据学科和学段获取菁优网对应得年份、题源、题型
|
||||||
|
initJYInfo(params){
|
||||||
|
const education = params.edustage + params.edusubject;
|
||||||
|
Promise.all([getJYYear(), getJYSO(education), getJYCT(education)])
|
||||||
|
.then(results => {
|
||||||
|
console.log('更新第三方题源+题型succ:', results);
|
||||||
|
this.entpCourseWorkYearList = results[0];
|
||||||
|
this.entpCourseWorkTypeList = results[2];
|
||||||
|
this.entpCourseWorkGroupList = results[1];
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('更新第三方题源+题型err:', error);
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
persist: true
|
persist: true
|
||||||
})
|
})
|
||||||
export default useClassTaskStore
|
export default useClassTaskStore
|
||||||
|
|
||||||
|
const getJYYear = () => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
JYApiListOriginYear()
|
||||||
|
.then((res) => {
|
||||||
|
resolve(res)
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getJYSO = (params) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
JYApiListSO(params)
|
||||||
|
.then((res) => {
|
||||||
|
resolve(res)
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getJYCT = (params) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
JYApiListCT(params)
|
||||||
|
.then((res) => {
|
||||||
|
resolve(res)
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { getJYPath } from "@/api/education/entpcoursework";
|
||||||
|
|
||||||
const JY_TOKEN = 'CA82641DA86072DEFD39E287335E035FDA6AEEC0549B58F54F4408734C8683FFAF0585CFA3B25091E588A03A65C66A80F5FF613F539D600954007A35DFFBFDC3C7BB982771C5E13F0918642CFD7596CE3718F06E5579238D92EC809AC6F4C82A9FE4B0E232A67DD3594D4DAC1C219CCBC4A7A093344446107EB11DC317526D0594249DEBBD82B740C794CF5A7065E1982B7779AF16AD25D7';
|
const JY_TOKEN = 'CA82641DA86072DEFD39E287335E035FDA6AEEC0549B58F54F4408734C8683FFAF0585CFA3B25091E588A03A65C66A80F5FF613F539D600954007A35DFFBFDC3C7BB982771C5E13F0918642CFD7596CE3718F06E5579238D92EC809AC6F4C82A9FE4B0E232A67DD3594D4DAC1C219CCBC4A7A093344446107EB11DC317526D0594249DEBBD82B740C794CF5A7065E1982B7779AF16AD25D7';
|
||||||
const JY_SUBJECT = [
|
const JY_SUBJECT = [
|
||||||
{id: 10, subject: 'math3', name: '小学数学'},
|
{id: 10, subject: 'math3', name: '小学数学'},
|
||||||
|
@ -26,8 +28,31 @@ const JY_SUBJECT = [
|
||||||
{id: 39, subject: 'history2', name: '高中历史'},
|
{id: 39, subject: 'history2', name: '高中历史'},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @desc: 获取年份
|
||||||
|
* @return: {*}
|
||||||
|
*/
|
||||||
|
export const JYApiListOriginYear = async () => {
|
||||||
|
const arrYear = [{label: '不限', value: '-1'}];
|
||||||
|
let i = 0;
|
||||||
|
for( ; i < 5; i++) {
|
||||||
|
const year = new Date().getFullYear();
|
||||||
|
const s ={
|
||||||
|
label: `${year - i}`,
|
||||||
|
value: `${year - i}`,
|
||||||
|
}
|
||||||
|
arrYear.push(s);
|
||||||
|
};
|
||||||
|
//arrYear.push({label: '更早', value: '0'})
|
||||||
|
return arrYear;
|
||||||
|
}
|
||||||
|
|
||||||
export const JYApiListCT = async (_this, name = '高中历史') => {
|
/**
|
||||||
|
* @desc: 根据学科+学段获取菁优网-题型
|
||||||
|
* @return: {*}
|
||||||
|
* @param {*} name 学科+学科
|
||||||
|
*/
|
||||||
|
export const JYApiListCT = async (name = '高中历史') => {
|
||||||
if (name === '初中政治') {
|
if (name === '初中政治') {
|
||||||
name = '初中道德与法治';
|
name = '初中道德与法治';
|
||||||
}
|
}
|
||||||
|
@ -35,7 +60,8 @@ export const JYApiListCT = async (_this, name = '高中历史') => {
|
||||||
if(obj.length < 1) {
|
if(obj.length < 1) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const res = await _this.$requestGetJYW(`/${obj[0].subject}/common`, {
|
getJYPath
|
||||||
|
const res = await getJYPath(`/${obj[0].subject}/common`, {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${JY_TOKEN}`
|
authorization: `Token ${JY_TOKEN}`
|
||||||
},
|
},
|
||||||
|
@ -63,22 +89,13 @@ export const JYApiListCT = async (_this, name = '高中历史') => {
|
||||||
return arrCT;
|
return arrCT;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const JYApiListOriginYear = () => {
|
|
||||||
const arrYear = [{label: '不限', value: '-1'}];
|
|
||||||
let i = 0;
|
|
||||||
for( ; i < 10; i++) {
|
|
||||||
const year = new Date().getFullYear();
|
|
||||||
const s ={
|
|
||||||
label: `${year - i}`,
|
|
||||||
value: `${year - i}`,
|
|
||||||
}
|
|
||||||
arrYear.push(s);
|
|
||||||
};
|
|
||||||
//arrYear.push({label: '更早', value: '0'})
|
|
||||||
return arrYear;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const JYApiListSO = async (_this, name = '高中历史') => {
|
/**
|
||||||
|
* @desc: 根据学科+学段获取菁优网-题源
|
||||||
|
* @return: {*}
|
||||||
|
* @param {*} name 学科+学科
|
||||||
|
*/
|
||||||
|
export const JYApiListSO = async (name = '高中历史') => {
|
||||||
if (name === '初中政治') {
|
if (name === '初中政治') {
|
||||||
name = '初中道德与法治';
|
name = '初中道德与法治';
|
||||||
}
|
}
|
||||||
|
@ -87,7 +104,7 @@ export const JYApiListSO = async (_this, name = '高中历史') => {
|
||||||
if(obj.length < 1) {
|
if(obj.length < 1) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const res = await _this.$requestGetJYW(`/${obj[0].subject}/common`, {
|
const res = await getJYPath(`/${obj[0].subject}/common`, {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${JY_TOKEN}`
|
authorization: `Token ${JY_TOKEN}`
|
||||||
},
|
},
|
||||||
|
@ -103,8 +120,12 @@ export const JYApiListSO = async (_this, name = '高中历史') => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
export const JYApiListPoint = async (_this, name = '高中历史') => {
|
* @desc: 根据学科+学段获取菁优网-知识点
|
||||||
|
* @return: {*}
|
||||||
|
* @param {*} name 学科+学科
|
||||||
|
*/
|
||||||
|
export const JYApiListPoint = async (name = '高中历史') => {
|
||||||
if (name === '初中政治') {
|
if (name === '初中政治') {
|
||||||
name = '初中道德与法治';
|
name = '初中道德与法治';
|
||||||
}
|
}
|
||||||
|
@ -113,7 +134,7 @@ export const JYApiListPoint = async (_this, name = '高中历史') => {
|
||||||
if(obj.length < 1) {
|
if(obj.length < 1) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const res = await _this.$requestGetJYW(`/${obj[0].subject}/point`, {
|
const res = await getJYPath(`/${obj[0].subject}/point`, {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${JY_TOKEN}`
|
authorization: `Token ${JY_TOKEN}`
|
||||||
},
|
},
|
||||||
|
@ -126,10 +147,12 @@ export const JYApiListPoint = async (_this, name = '高中历史') => {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc: 获取菁优网的版本内容
|
* @desc: 根据查询条件获取菁优网-教材版本
|
||||||
* @return: {*}
|
* @return: {*}
|
||||||
|
* @param {*} query {}
|
||||||
|
* @param {*} hasPoints
|
||||||
*/
|
*/
|
||||||
export const JYApiListVersion = async (_this, query, hasPoints=true) => {
|
export const JYApiListVersion = async (query, hasPoints=true) => {
|
||||||
const listVersion = {
|
const listVersion = {
|
||||||
status: 0,
|
status: 0,
|
||||||
msg: '',
|
msg: '',
|
||||||
|
@ -148,7 +171,7 @@ export const JYApiListVersion = async (_this, query, hasPoints=true) => {
|
||||||
listVersion.msg = `[${name}]未找到对应菁优网教材版本, 请检查学段或学科是否匹配!`;
|
listVersion.msg = `[${name}]未找到对应菁优网教材版本, 请检查学段或学科是否匹配!`;
|
||||||
return listVersion;
|
return listVersion;
|
||||||
}
|
}
|
||||||
const JYBook = await _this.$requestGetJYW(`/${result[0].subject}/book2`, {
|
const JYBook = await getJYPath(`/${result[0].subject}/book2`, {
|
||||||
headers: {
|
headers: {
|
||||||
// JYToken仅占位, 实际后续已未使用该token
|
// JYToken仅占位, 实际后续已未使用该token
|
||||||
authorization: `Token ${JY_TOKEN}`
|
authorization: `Token ${JY_TOKEN}`
|
||||||
|
|
|
@ -416,6 +416,7 @@ const queryPushRecords = (row) => {
|
||||||
// 获取已推送历史
|
// 获取已推送历史
|
||||||
console.log(row,'查看该行推送历史')
|
console.log(row,'查看该行推送历史')
|
||||||
pushRecordsOpen.value = true;
|
pushRecordsOpen.value = true;
|
||||||
|
pushRecordsList.value = [];
|
||||||
pushRecordsLoading.value = true;
|
pushRecordsLoading.value = true;
|
||||||
homeworklist({
|
homeworklist({
|
||||||
entpcourseid: entpcourseid.value,
|
entpcourseid: entpcourseid.value,
|
||||||
|
@ -875,21 +876,6 @@ watch(() => courseObj.node, (newVal,oldVal) => {
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--
|
|
||||||
<style>
|
|
||||||
.el-table .hidden-row {
|
|
||||||
display: none !important;
|
|
||||||
/* color: #ccc !important; */
|
|
||||||
}
|
|
||||||
.el-table .father-row {
|
|
||||||
--el-table-tr-bg-color: #fff;
|
|
||||||
}
|
|
||||||
.el-table .son-row {
|
|
||||||
--el-table-tr-bg-color: #f0f0f08a;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page-classTaskAssign {
|
.page-classTaskAssign {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
|
|
@ -294,8 +294,8 @@ import FileUpload from "@/components/FileUpload/index.vue";
|
||||||
import whiteboard from '@/components/whiteboard/whiteboard.vue'
|
import whiteboard from '@/components/whiteboard/whiteboard.vue'
|
||||||
import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue'
|
import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue'
|
||||||
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
||||||
import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuestion/jyeoo"
|
|
||||||
|
|
||||||
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
import {throttle,debounce } from '@/utils/comm'
|
import {throttle,debounce } from '@/utils/comm'
|
||||||
import { useToolState } from '@/store/modules/tool'
|
import { useToolState } from '@/store/modules/tool'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
@ -303,6 +303,11 @@ const userStore = useUserStore().user
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const toolStore = useToolState()
|
const toolStore = useToolState()
|
||||||
|
const {
|
||||||
|
entpCourseWorkTypeList,
|
||||||
|
entpCourseWorkGroupList,
|
||||||
|
entpCourseWorkYearList
|
||||||
|
} = useClassTaskStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookobj: {
|
bookobj: {
|
||||||
|
@ -326,39 +331,11 @@ const props = defineProps({
|
||||||
const prevReadMsgDialogRef = ref(null);// 预览框ref
|
const prevReadMsgDialogRef = ref(null);// 预览框ref
|
||||||
|
|
||||||
const classWorkFormRef = ref(null);
|
const classWorkFormRef = ref(null);
|
||||||
const entpCourseWorkTypeList = ref([
|
|
||||||
{value: 0, label: "不限"},
|
|
||||||
{value: 1, label: "单选题"},
|
|
||||||
{value: 2, label: "填空题"},
|
|
||||||
{value: 3, label: "多选题"},
|
|
||||||
{value: 4, label: "判断题"},
|
|
||||||
{value: 5, label: "主观题"},
|
|
||||||
{value: 6, label: "复合题"},
|
|
||||||
]); // 习题查询条件 - 题型
|
|
||||||
|
|
||||||
const entpCourseWorkGroupList = ref([{
|
|
||||||
Key: -1,
|
|
||||||
Value: '不限',
|
|
||||||
}, {
|
|
||||||
Key: 1,
|
|
||||||
Value: '真题',
|
|
||||||
}, {
|
|
||||||
Key: 0,
|
|
||||||
Value: '非真题',
|
|
||||||
}]); // 习题查询条件 - 题源
|
|
||||||
|
|
||||||
const entpCourseWorkPointList = ref([
|
const entpCourseWorkPointList = ref([
|
||||||
{label: '不限', value: []},
|
{label: '不限', value: []},
|
||||||
]); // 习题查询条件 - 知识点
|
]); // 习题查询条件 - 知识点
|
||||||
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
||||||
const entpCourseWorkYearList =ref([
|
|
||||||
{label: '不限', value: '-1'},
|
|
||||||
{label: '2024', value: '2024'},
|
|
||||||
{label: '2023', value: '2023'},
|
|
||||||
{label: '2022', value: '2022'},
|
|
||||||
{label: '2021', value: '2021'},
|
|
||||||
{label: '2020', value: '2020'},
|
|
||||||
]); // 习题查询条件 - 年份
|
|
||||||
|
|
||||||
|
|
||||||
const paginationParams = reactive({
|
const paginationParams = reactive({
|
||||||
|
@ -1006,18 +983,6 @@ const initPageParams = () => {
|
||||||
|
|
||||||
|
|
||||||
onMounted(async() => {
|
onMounted(async() => {
|
||||||
// 获取当前学科下的试题题型
|
|
||||||
const name = userStore.edustage + userStore.edusubject;
|
|
||||||
const jyCT = await JYApiListCT(proxy, name);
|
|
||||||
if (jyCT.length == 0) {
|
|
||||||
ElMessage.error('获取题型失败!');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
entpCourseWorkTypeList.value = jyCT;
|
|
||||||
// 获取当前学科下的试题年份
|
|
||||||
entpCourseWorkYearList.value = JYApiListOriginYear();
|
|
||||||
entpCourseWorkGroupList.value = await JYApiListSO(proxy, name);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// const refreshData = () => {
|
// const refreshData = () => {
|
||||||
|
|
|
@ -29,11 +29,11 @@ import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
const emit = defineEmits(['itemClick'])
|
const emit = defineEmits(['itemClick'])
|
||||||
const items = shallowRef([
|
const items = shallowRef([
|
||||||
{ title: '自主搜题', description: '上千万高质量习题资源,历届考试真题,每道题均有习题解析', icon: '#icon-soutibao-',type:'default' },
|
{ title: '自主搜题', description: '上千万高质量习题资源,历届考试真题,每道题均有习题解析', icon: '#icon-soutibao-',type:'primary' },
|
||||||
{ title: '校本题库', description: '本校公共题库资源。', icon: '#icon-soutibao-',type:'default' },
|
{ title: '校本题库', description: '本校公共题库资源。', icon: '#icon-soutibao-',type:'primary' },
|
||||||
{ title: '个人题库', description: '老师上传维护自己的个人题库。', icon: '#icon-soutibao-',type:'default' },
|
{ title: '个人题库', description: '老师上传维护自己的个人题库。', icon: '#icon-soutibao-',type:'primary' },
|
||||||
{ title: '智能推荐', description: '通过对学生的薄弱知识点分析,推送不同难度的习题进行强化训练。', icon: '#icon-tubiao_wuxing-',type:'default' },
|
{ title: '智能推荐', description: '通过对学生的薄弱知识点分析,推送不同难度的习题进行强化训练。', icon: '#icon-tubiao_wuxing-',type:'primary' },
|
||||||
{ title: '课堂展示', description: '通过课堂白板绘制作业,提升学生的创作思维能力。', icon: '#icon-huaban',type:'primary' },
|
{ title: '课堂展示', description: '通过课堂白板绘制作业,提升学生的创作思维能力。', icon: '#icon-huaban',type:'danger' },
|
||||||
{ title: '常规作业', description: '推送pdf、视频、音频、图片,学生可以拍照上传。', icon: '#icon-zhaoxiangji',type:'danger' },
|
{ title: '常规作业', description: '推送pdf、视频、音频、图片,学生可以拍照上传。', icon: '#icon-zhaoxiangji',type:'danger' },
|
||||||
{ title: 'AI设计作业', description: '通过AI助手,根据课标、教材、考试等分析结果,智能创建作业。', icon: '#icon-jiqiren_o',type:'danger' },
|
{ title: 'AI设计作业', description: '通过AI助手,根据课标、教材、考试等分析结果,智能创建作业。', icon: '#icon-jiqiren_o',type:'danger' },
|
||||||
{ title: '习题上传', description: '自己上传个人题库。', icon: '#icon-shangchuan',type:'danger' },
|
{ title: '习题上传', description: '自己上传个人题库。', icon: '#icon-shangchuan',type:'danger' },
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
<div v-if="classWorkForm.worktype == '习题训练'" class="pageRight-list">
|
<div v-if="classWorkForm.worktype == '习题训练'" class="pageRight-list">
|
||||||
<div :style="{height: '100%', 'overflow': 'auto', 'border':'1px dotted blue','border-radius':'5px', 'background-color': '#f7f7f7'}">
|
<div :style="{height: '100%', 'overflow': 'auto', 'border':'1px dotted blue','border-radius':'5px', 'background-color': '#f7f7f7'}">
|
||||||
<template v-for="(item,index) in classWorkForm.quizlist" :key="item.id">
|
<template v-for="(item,index) in classWorkForm.quizlist" :key="item.id">
|
||||||
<div style="margin: 5px; background-color: white">
|
<div style="margin: 5px; background-color: white; text-align: left;">
|
||||||
<div v-html="item.titleFormat" style="padding: 15px 20px 5px 20px"></div>
|
<div v-html="item.titleFormat" style="padding: 15px 20px 5px 20px"></div>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<el-form-item label="分值">
|
<el-form-item label="分值">
|
||||||
|
@ -126,10 +126,10 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
import { onMounted, ref, watch, reactive, getCurrentInstance, nextTick } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus, Delete } from '@element-plus/icons-vue'
|
||||||
import { delClasswork } from '@/api/teaching/classwork'
|
import { delClasswork } from '@/api/teaching/classwork'
|
||||||
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
||||||
import { addClassworkReturnId } from '@/api/teaching/classwork'
|
import { addClassworkReturnId } from '@/api/teaching/classwork'
|
||||||
|
@ -144,10 +144,6 @@ import whiteboard from '@/components/whiteboard/whiteboard.vue'
|
||||||
import FileUpload from "@/components/FileUpload/index.vue";
|
import FileUpload from "@/components/FileUpload/index.vue";
|
||||||
import Right from './Right/index.vue'
|
import Right from './Right/index.vue'
|
||||||
|
|
||||||
import {
|
|
||||||
Delete
|
|
||||||
} from '@element-plus/icons-vue'
|
|
||||||
|
|
||||||
import SetHomework from '@/components/set-homework/index.vue'
|
import SetHomework from '@/components/set-homework/index.vue'
|
||||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
|
|
|
@ -125,16 +125,26 @@ import { delEntpcoursework, updateEntpcoursework } from "@/api/education/entpCou
|
||||||
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
||||||
import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue";
|
import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue";
|
||||||
import { useHandleData } from "@/hooks/useHandleData";
|
import { useHandleData } from "@/hooks/useHandleData";
|
||||||
import { processList } from '@/hooks/useProcessList'
|
import { processList } from '@/hooks/useProcessList';
|
||||||
|
|
||||||
|
|
||||||
import { debounce } from '@/utils/comm'
|
import { debounce } from '@/utils/comm'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
|
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
const emit = defineEmits(['addQuiz'])
|
const emit = defineEmits(['addQuiz'])
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
|
const {
|
||||||
|
entpCourseWorkTypeList,
|
||||||
|
entpCourseWorkGroupList,
|
||||||
|
entpCourseWorkYearList
|
||||||
|
} = useClassTaskStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookobj: {
|
bookobj: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -142,37 +152,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const entpCourseWorkTypeList = ref([
|
|
||||||
{value: 0, label: "不限"},
|
|
||||||
{value: 1, label: "单选题"},
|
|
||||||
{value: 2, label: "填空题"},
|
|
||||||
{value: 3, label: "多选题"},
|
|
||||||
{value: 4, label: "判断题"},
|
|
||||||
{value: 5, label: "主观题"},
|
|
||||||
{value: 6, label: "复合题"},
|
|
||||||
]); // 习题查询条件 - 题型
|
|
||||||
|
|
||||||
const entpCourseWorkGroupList = ref([{
|
|
||||||
Key: -1,
|
|
||||||
Value: '不限',
|
|
||||||
}, {
|
|
||||||
Key: 1,
|
|
||||||
Value: '真题',
|
|
||||||
}, {
|
|
||||||
Key: 0,
|
|
||||||
Value: '非真题',
|
|
||||||
}]); // 习题查询条件 - 题源
|
|
||||||
|
|
||||||
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
||||||
const entpCourseWorkYearList =ref([
|
|
||||||
{label: '不限', value: '-1'},
|
|
||||||
{label: '2024', value: '2024'},
|
|
||||||
{label: '2023', value: '2023'},
|
|
||||||
{label: '2022', value: '2022'},
|
|
||||||
{label: '2021', value: '2021'},
|
|
||||||
{label: '2020', value: '2020'},
|
|
||||||
]); // 习题查询条件 - 年份
|
|
||||||
|
|
||||||
|
|
||||||
// 习题查询参数条件
|
// 习题查询参数条件
|
||||||
|
@ -220,7 +200,7 @@ const dlgImportSingle = reactive({
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
debounceQueryData(); // 查询习题列表
|
debounceQueryData(); // 查询习题列表
|
||||||
})
|
})
|
||||||
|
/** 前往习题上传页面 */
|
||||||
const goToQuestUpload = () => {
|
const goToQuestUpload = () => {
|
||||||
router.push({ path: '/model/questionUpload', query: { courseObj: JSON.stringify(props.bookobj) } });
|
router.push({ path: '/model/questionUpload', query: { courseObj: JSON.stringify(props.bookobj) } });
|
||||||
}
|
}
|
||||||
|
@ -336,7 +316,7 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
} else if (clueres.rows[i].cluetag == 'mapview') {
|
} else if (clueres.rows[i].cluetag == 'mapview') {
|
||||||
clueres.rows[i].worktype = '学科定位';
|
clueres.rows[i].worktype = '学科定位';
|
||||||
}
|
}
|
||||||
console.log("clueres.rows[i].childlist",clueres.rows[i].childlist);
|
//console.log("clueres.rows[i].childlist",clueres.rows[i].childlist);
|
||||||
if (clueres.rows[i].childlist != '') {
|
if (clueres.rows[i].childlist != '') {
|
||||||
clueres.rows[i].childArray = JSON.parse('['+clueres.rows[i].childlist+']');
|
clueres.rows[i].childArray = JSON.parse('['+clueres.rows[i].childlist+']');
|
||||||
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
|
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<el-form ref="questFormRef" :model="questForm" :rules="MainRules" label-width="80px">
|
<el-form ref="questFormRef" :model="questForm" :rules="MainRules" label-width="80px">
|
||||||
<el-form-item label="题型" prop="worktype">
|
<el-form-item label="题型" prop="worktype">
|
||||||
<el-select v-model="questForm.worktype" placeholder="请选择题型" style="width:20%" :disabled="questForm.id==0?false:true">
|
<el-select v-model="questForm.worktype" placeholder="请选择题型" style="width:20%" :disabled="questForm.id==0?false:true">
|
||||||
<el-option v-for="item in fromOptions.type" :key="item.Key" :label="item.Value" :value="item.Value"></el-option>
|
<el-option v-for="item in fromOptions.type" :key="item.value" :label="item.label" :value="item.label"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-tag v-if="questForm.worktype=='填空题'" type="danger" style=" margin-left: 10px ">温馨提示:填空题题目的填空位置,下划线请连续输入3-10个 _
|
<el-tag v-if="questForm.worktype=='填空题'" type="danger" style=" margin-left: 10px ">温馨提示:填空题题目的填空位置,下划线请连续输入3-10个 _
|
||||||
符号。eg:今天___好日子。</el-tag>
|
符号。eg:今天___好日子。</el-tag>
|
||||||
|
@ -414,7 +414,15 @@ import { isJson } from "@/hooks/useProcessList";
|
||||||
|
|
||||||
import Tinymce from "@/components/tinymce/tinymce.vue"; // 富文本编辑器
|
import Tinymce from "@/components/tinymce/tinymce.vue"; // 富文本编辑器
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
|
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
|
const {
|
||||||
|
entpCourseWorkTypeList,
|
||||||
|
entpCourseWorkGroupList,
|
||||||
|
entpCourseWorkYearList
|
||||||
|
} = useClassTaskStore();
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
const emit = defineEmits(['submit-exam-single-callback','cancel-exam-single-callback','cropper-exam-form-item'])
|
const emit = defineEmits(['submit-exam-single-callback','cancel-exam-single-callback','cropper-exam-form-item'])
|
||||||
|
@ -450,12 +458,13 @@ const fromOptions = reactive({
|
||||||
//题型
|
//题型
|
||||||
type: [
|
type: [
|
||||||
//{"Key": 0, "Value": "不限"},
|
//{"Key": 0, "Value": "不限"},
|
||||||
{"Key": 1, "Value": "单选题"},
|
{value: 0, label: "不限"},
|
||||||
{"Key": 4, "Value": "多选题"},
|
{value: 1, label: "单选题"},
|
||||||
{"Key": 2, "Value": "填空题"},
|
{value: 2, label: "填空题"},
|
||||||
{"Key": 5, "Value": "判断题"},
|
{value: 3, label: "多选题"},
|
||||||
{"Key": 6, "Value": "主观题"},
|
{value: 4, label: "判断题"},
|
||||||
{"Key": 3, "Value": "复合题"},
|
{value: 5, label: "主观题"},
|
||||||
|
{value: 6, label: "复合题"},
|
||||||
//{"Key": 4, "Value": "辨析评析题"},
|
//{"Key": 4, "Value": "辨析评析题"},
|
||||||
],
|
],
|
||||||
// 复合题型
|
// 复合题型
|
||||||
|
@ -476,7 +485,7 @@ const questForm = reactive({
|
||||||
id: 0,
|
id: 0,
|
||||||
title: '',
|
title: '',
|
||||||
worktype: '单选题',
|
worktype: '单选题',
|
||||||
worktagYear: '2024',
|
worktagYear: 2024,
|
||||||
//worktagArea: '',
|
//worktagArea: '',
|
||||||
worktag: '',
|
worktag: '',
|
||||||
workgroup: 0,
|
workgroup: 0,
|
||||||
|
@ -602,8 +611,8 @@ onMounted(() => {
|
||||||
lessionId: lessionid,
|
lessionId: lessionid,
|
||||||
fileAlias: '单题上传',
|
fileAlias: '单题上传',
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取最新年份
|
// 获取最新年份
|
||||||
// yearList =
|
|
||||||
for(var i = 0; i < 15; i++) {
|
for(var i = 0; i < 15; i++) {
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
const s ={
|
const s ={
|
||||||
|
@ -613,7 +622,17 @@ onMounted(() => {
|
||||||
yearList.value.push(s)
|
yearList.value.push(s)
|
||||||
};
|
};
|
||||||
|
|
||||||
// 拿到当前章节下得所有知识点
|
// 更新第三方题型、题源
|
||||||
|
if (entpCourseWorkTypeList.length>0) {
|
||||||
|
const flagDict = ['单选题', '多选题', '判断题', '填空题'];
|
||||||
|
fromOptions.type = entpCourseWorkTypeList.filter(item => flagDict.includes(item.label));
|
||||||
|
}
|
||||||
|
if (entpCourseWorkGroupList.length>0) {
|
||||||
|
fromOptions.flag = entpCourseWorkGroupList;
|
||||||
|
}
|
||||||
|
// if (entpCourseWorkYearList.length>0) {
|
||||||
|
// yearList.value = entpCourseWorkYearList;
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -990,7 +1009,17 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
|
||||||
|
|
||||||
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
|
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
|
||||||
console.log('lessionid', lessionid.value);
|
console.log('lessionid', lessionid.value);
|
||||||
|
|
||||||
// 拿到当前章节下得所有知识点
|
// 拿到当前章节下得所有知识点
|
||||||
|
if( props.bookobj.node.edustage == '高中' && (props.bookobj.node.edusubject == '语文' || props.bookobj.node.edusubject == '英语') ){
|
||||||
|
const res = await listEvaluation({ edusubject: props.bookobj.node.edusubject, edustage: props.bookobj.node.edustage, itemkey: "subject", pageSize: 10 });
|
||||||
|
const id = res.rows[0]?.id;
|
||||||
|
if (id) {
|
||||||
|
const res = await listKnowlegepointFormat({evalId: id, pageNum: 1, pageSize: 5000,});
|
||||||
|
curKnowledgePointList.value = updateKnowledgePoint(res.rows);
|
||||||
|
//console.log('updateKnowledgePoint->', res.rows);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
const res = await getBindlist({ eid: lessionid.value })
|
const res = await getBindlist({ eid: lessionid.value })
|
||||||
if (!res.data || res.data.length < 1) {
|
if (!res.data || res.data.length < 1) {
|
||||||
ElMessage.warning('当前章节下未绑定知识点,暂不更新该试题知识点!');
|
ElMessage.warning('当前章节下未绑定知识点,暂不更新该试题知识点!');
|
||||||
|
@ -999,7 +1028,7 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
|
||||||
else {
|
else {
|
||||||
curKnowledgePointList.value = res.data;
|
curKnowledgePointList.value = res.data;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//item.evalnodeid = '3772b,374112,374233';
|
//item.evalnodeid = '3772b,374112,374233';
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label="知识点" label-width="70">
|
<el-form-item label="知识点" label-width="70">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
|
disabled
|
||||||
v-model="entpCourseWorkQueryParams.point"
|
v-model="entpCourseWorkQueryParams.point"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@ -118,11 +119,18 @@ import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
import {throttle,debounce } from '@/utils/comm'
|
import {throttle,debounce } from '@/utils/comm'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
|
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
const emit = defineEmits(['addQuiz'])
|
const emit = defineEmits(['addQuiz'])
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
|
const {
|
||||||
|
entpCourseWorkTypeList,
|
||||||
|
entpCourseWorkGroupList,
|
||||||
|
entpCourseWorkYearList
|
||||||
|
} = useClassTaskStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookobj: {
|
bookobj: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -130,41 +138,11 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const entpCourseWorkTypeList = ref([
|
|
||||||
{value: 0, label: "不限"},
|
|
||||||
{value: 1, label: "单选题"},
|
|
||||||
{value: 2, label: "填空题"},
|
|
||||||
{value: 3, label: "多选题"},
|
|
||||||
{value: 4, label: "判断题"},
|
|
||||||
{value: 5, label: "主观题"},
|
|
||||||
{value: 6, label: "复合题"},
|
|
||||||
]); // 习题查询条件 - 题型
|
|
||||||
|
|
||||||
const entpCourseWorkGroupList = ref([{
|
|
||||||
Key: -1,
|
|
||||||
Value: '不限',
|
|
||||||
}, {
|
|
||||||
Key: 1,
|
|
||||||
Value: '真题',
|
|
||||||
}, {
|
|
||||||
Key: 0,
|
|
||||||
Value: '非真题',
|
|
||||||
}]); // 习题查询条件 - 题源
|
|
||||||
|
|
||||||
const entpCourseWorkPointList = ref([
|
const entpCourseWorkPointList = ref([
|
||||||
{label: '不限', value: []},
|
{label: '不限', value: []},
|
||||||
]); // 习题查询条件 - 知识点
|
]); // 习题查询条件 - 知识点
|
||||||
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
||||||
//const knowledgePointProps = ref({value: 'thirdId', label: 'knowTitle'});
|
//const knowledgePointProps = ref({value: 'thirdId', label: 'knowTitle'});
|
||||||
const entpCourseWorkYearList =ref([
|
|
||||||
{label: '不限', value: '-1'},
|
|
||||||
{label: '2024', value: '2024'},
|
|
||||||
{label: '2023', value: '2023'},
|
|
||||||
{label: '2022', value: '2022'},
|
|
||||||
{label: '2021', value: '2021'},
|
|
||||||
{label: '2020', value: '2020'},
|
|
||||||
]); // 习题查询条件 - 年份
|
|
||||||
|
|
||||||
|
|
||||||
// 习题查询参数条件
|
// 习题查询参数条件
|
||||||
|
@ -342,7 +320,7 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
} else if (clueres.rows[i].cluetag == 'mapview') {
|
} else if (clueres.rows[i].cluetag == 'mapview') {
|
||||||
clueres.rows[i].worktype = '学科定位';
|
clueres.rows[i].worktype = '学科定位';
|
||||||
}
|
}
|
||||||
console.log("clueres.rows[i].childlist",clueres.rows[i].childlist);
|
//console.log("clueres.rows[i].childlist",clueres.rows[i].childlist);
|
||||||
if (clueres.rows[i].childlist != '') {
|
if (clueres.rows[i].childlist != '') {
|
||||||
clueres.rows[i].childArray = JSON.parse('['+clueres.rows[i].childlist+']');
|
clueres.rows[i].childArray = JSON.parse('['+clueres.rows[i].childlist+']');
|
||||||
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
|
for (var j=0; j<clueres.rows[i].childArray.length; j++) {
|
||||||
|
|
|
@ -58,6 +58,11 @@ import { useGetSubject } from '@/hooks/useGetSubject'
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
import { debounce } from 'lodash'
|
import { debounce } from 'lodash'
|
||||||
|
|
||||||
|
import useUserStore from '@/store/modules/user'
|
||||||
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const classTaskStore = useClassTaskStore();
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { ipcRenderer } = window.electron || {}
|
const { ipcRenderer } = window.electron || {}
|
||||||
const chartDom = ref(null);
|
const chartDom = ref(null);
|
||||||
|
@ -206,11 +211,14 @@ ipcRenderer.on('minWinResize', debounce((e, data) =>{
|
||||||
}, 100))
|
}, 100))
|
||||||
|
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
|
|
||||||
await useGetSubject()
|
await useGetSubject()
|
||||||
// 确保DOM 渲染完成
|
// 确保DOM 渲染完成
|
||||||
await nextTick()
|
await nextTick()
|
||||||
chartInstance = echarts.init(chartDom.value)
|
chartInstance = echarts.init(chartDom.value)
|
||||||
|
|
||||||
|
// 更新第三方题型题类
|
||||||
|
await classTaskStore.initJYInfo(userStore.user);
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|
|
@ -187,7 +187,7 @@ const getWorkType = async (data) => {
|
||||||
if (selName === curName) {
|
if (selName === curName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const jyCT = await JYApiListCT(proxy, selName);
|
const jyCT = await JYApiListCT(selName);
|
||||||
if (jyCT.length == 0) {
|
if (jyCT.length == 0) {
|
||||||
ElMessage.error('获取题型失败!');
|
ElMessage.error('获取题型失败!');
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -59,24 +59,27 @@ const getSubject = () => {
|
||||||
// 选择学段
|
// 选择学段
|
||||||
const handleUserEduStage = (item) => {
|
const handleUserEduStage = (item) => {
|
||||||
userStore.edustage = item
|
userStore.edustage = item
|
||||||
sessionStore.set('edustage',item)
|
sessionStore.set('edustageSelf',item)
|
||||||
if(item === '幼儿园'){
|
if(item === '幼儿园'){
|
||||||
// 默认语文
|
// 默认语文
|
||||||
userStore.edusubject = '语文'
|
userStore.edusubject = '语文'
|
||||||
|
sessionStore.set('edusubjectSelf','语文')
|
||||||
}
|
}
|
||||||
else if(item === '高中' && userStore.edusubject === "道德与法治"){
|
else if(item === '高中' && userStore.edusubject === "道德与法治"){
|
||||||
// 默认语文
|
// 默认语文
|
||||||
userStore.edusubject = '政治'
|
userStore.edusubject = '政治'
|
||||||
|
sessionStore.set('edusubjectSelf','政治')
|
||||||
}
|
}
|
||||||
else if(item != '高中' && userStore.edusubject === "政治"){
|
else if(item != '高中' && userStore.edusubject === "政治"){
|
||||||
// 默认语文
|
// 默认语文
|
||||||
userStore.edusubject = '道德与法治'
|
userStore.edusubject = '道德与法治'
|
||||||
|
sessionStore.set('edusubjectSelf','道德与法治')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 选择学科
|
// 选择学科
|
||||||
const handleUserEduSubject = (item) => {
|
const handleUserEduSubject = (item) => {
|
||||||
userStore.edusubject = item;
|
userStore.edusubject = item;
|
||||||
sessionStore.set('edusubject',item)
|
sessionStore.set('edusubjectSelf',item)
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubject()
|
getSubject()
|
||||||
|
|
|
@ -40,6 +40,9 @@ import {listClassmain} from '@/api/classManage/index'
|
||||||
//班级列表
|
//班级列表
|
||||||
import ClassList from './components/classList.vue'
|
import ClassList from './components/classList.vue'
|
||||||
|
|
||||||
|
import useClassTaskStore from '@/store/modules/classTask'
|
||||||
|
const classTaskStore = useClassTaskStore();
|
||||||
|
|
||||||
//班级列表
|
//班级列表
|
||||||
const classList = ref([])
|
const classList = ref([])
|
||||||
// 未加入的班级
|
// 未加入的班级
|
||||||
|
@ -162,12 +165,12 @@ setTimeout(() => {
|
||||||
function submit() {
|
function submit() {
|
||||||
proxy.$refs.userRef.validate((valid) => {
|
proxy.$refs.userRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
userStore.user.edusubject = sessionStore.get('edusubject') ? sessionStore.get('edusubject') : userStore.user.edusubject
|
userStore.user.edusubject = sessionStore.get('edusubjectSelf') ? sessionStore.get('edusubjectSelf') : userStore.user.edusubject
|
||||||
userStore.user.edustage = sessionStore.get('edustage') ? sessionStore.get('edustage') : userStore.user.edustage
|
userStore.user.edustage = sessionStore.get('edustageSelf') ? sessionStore.get('edustageSelf') : userStore.user.edustage
|
||||||
updateUserInfo(userStore.user).then((response) => {
|
updateUserInfo(userStore.user).then((response) => {
|
||||||
if(response.code == 200){
|
if(response.code == 200){
|
||||||
userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => {
|
userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => {
|
||||||
userStore.getInfo().then(res => {
|
userStore.getInfo().then(async res => {
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
let sessionSubject = {
|
let sessionSubject = {
|
||||||
bookList: null,
|
bookList: null,
|
||||||
|
@ -178,6 +181,10 @@ function submit() {
|
||||||
}
|
}
|
||||||
sessionStore.set( 'subject', sessionSubject)
|
sessionStore.set( 'subject', sessionSubject)
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
|
|
||||||
|
console.log('userStore更新后', res);
|
||||||
|
await classTaskStore.initJYInfo(userStore.user);
|
||||||
|
//console.log('classTaskStore->', classTaskStore);
|
||||||
}else{
|
}else{
|
||||||
ElMessage.error(response.msg)
|
ElMessage.error(response.msg)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue