From 546c8ad72fb50d8a1ee2137bd4f0e66e9844224b Mon Sep 17 00:00:00 2001 From: lyc Date: Mon, 16 Dec 2024 16:17:32 +0800 Subject: [PATCH] =?UTF-8?q?edit=20=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template-study/container/right.vue | 2 +- src/renderer/src/layout/components/Aside.vue | 1 - src/renderer/src/utils/comm.js | 7 ++ .../container/keyword-dialog.vue | 2 +- .../views/teachingDesign/container/left.vue | 45 ++++++---- .../views/teachingDesign/container/right.vue | 90 ++++++++++++++++--- 6 files changed, 113 insertions(+), 34 deletions(-) diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue index a21073e..b2fd574 100644 --- a/src/renderer/src/components/template-study/container/right.vue +++ b/src/renderer/src/components/template-study/container/right.vue @@ -392,9 +392,9 @@ onMounted(() => { let data = sessionStore.get('subject.curNode') Object.assign(curNode, data); modeType.value = props.type == 1 ? '课标' : props.type == 2 ? '教材' : '考试' + getTemplateList() let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}` - params.dataset_id = dataSetJson[jsonKey] }) diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue index ba2186f..2d1383c 100644 --- a/src/renderer/src/layout/components/Aside.vue +++ b/src/renderer/src/layout/components/Aside.vue @@ -65,7 +65,6 @@ import defaultUserImg from '@/assets/images/img-avatar.png' const { ipcRenderer } = window.electron || {} const dev_api = ref(import.meta.env.VITE_APP_BASE_API) const userStore = useUserStore() -console.log(userStore) const router = useRouter() const currentRoute = ref('') const activeId = ref('/home') diff --git a/src/renderer/src/utils/comm.js b/src/renderer/src/utils/comm.js index 35d87f6..b7d3035 100644 --- a/src/renderer/src/utils/comm.js +++ b/src/renderer/src/utils/comm.js @@ -396,5 +396,12 @@ export const dataSetJson = { "课标-高中-数学": "e03aa4fe9fd011ef91270242ac140006", "课标-高中-地理": "270516829fd111efb13c0242ac140006", "课标-高中-政治": "a2f0b247b85d11ef84290242ac140005", + "教材-高中-语文": "cee3062a9fcf11efa6910242ac140006", + "教材-高中-生物": "fb5d01d59fd011ef9bb90242ac140006", + "教材-高中-历史": "f2f6c1fb9fd011ef98740242ac140006", + "教材-高中-英语": "e889fcac9fd011efb22a0242ac140006", + "教材-高中-数学": "e03aa4fe9fd011ef91270242ac140006", + "教材-高中-地理": "270516829fd111efb13c0242ac140006", + "教材-高中-政治": "a2f0b247b85d11ef84290242ac140005", "鉴权": "ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm" } \ No newline at end of file diff --git a/src/renderer/src/views/teachingDesign/container/keyword-dialog.vue b/src/renderer/src/views/teachingDesign/container/keyword-dialog.vue index 87c3d6f..db1aa90 100644 --- a/src/renderer/src/views/teachingDesign/container/keyword-dialog.vue +++ b/src/renderer/src/views/teachingDesign/container/keyword-dialog.vue @@ -85,7 +85,7 @@ const saveAdd = async () => { try { // 系统预设模板 copy一份 const { msg } = await addKeyWords({ name: form.name, id }) - emitter.emit('onGetMain') + emitter.emit('onGetMain', props.item) ElMessage.success(msg) mode.value = false } finally { diff --git a/src/renderer/src/views/teachingDesign/container/left.vue b/src/renderer/src/views/teachingDesign/container/left.vue index 7df70fa..a6d8585 100644 --- a/src/renderer/src/views/teachingDesign/container/left.vue +++ b/src/renderer/src/views/teachingDesign/container/left.vue @@ -3,26 +3,26 @@
教学模式
-
+
{{ item.name }} 选择模式
-
- -

- - {{ el.name }} - -

-
- - {{ el.prompt }} - -
-
-
+
+ +

+ + {{ el.name }} + +

+
+ + {{ el.prompt }} + +
+
+
@@ -49,6 +49,7 @@ const getTemplate = async (id) => { } // 获取子模板 +const actId = ref('') const loading = ref(false) const tempList = ref([]) const getChildTemp = async (parentId) => { @@ -65,6 +66,7 @@ const getChildTemp = async (parentId) => { } finally { loading.value = false } + actId.value = tempList.value[0].id } if(parentId){ const item = tempList.value.find(item => item.id == parentId) @@ -90,6 +92,7 @@ emitter.on('onGetMain', (item) => { // 选择模板 const emit = defineEmits(['']) const onSelect = (item) =>{ + actId.value = item.id emitter.emit('changeMode', item) } @@ -98,8 +101,6 @@ const curNode = reactive({}) onMounted(() => { let data = sessionStore.get('subject.curNode') Object.assign(curNode, data); - - getTemplate() }) @@ -143,10 +144,16 @@ onUnmounted(() => { .con-item { margin-bottom: 20px; display: flex; - flex-direction: column + flex-direction: column; + padding: 10px; } .item-list{ - margin-bottom: 10px; + + padding: 10px; + } + .item-act{ + border: solid 1px #409eff; + border-radius: 5px; } .item-card { width: 130px; diff --git a/src/renderer/src/views/teachingDesign/container/right.vue b/src/renderer/src/views/teachingDesign/container/right.vue index 61b323b..d757d60 100644 --- a/src/renderer/src/views/teachingDesign/container/right.vue +++ b/src/renderer/src/views/teachingDesign/container/right.vue @@ -15,7 +15,7 @@ 生成PPT
-
+
@@ -30,14 +30,12 @@ 移除 -
{{ item.prompt }}
-
+
+
@@ -68,18 +66,19 @@