Compare commits

...

10 Commits

4 changed files with 9 additions and 3 deletions

View File

@ -169,7 +169,7 @@ const handleNodeClick = (data, node) => {
}
else {
// parentNode
nodeData.parentNode = parentNode
nodeData.parentNode = toRaw(parentNode)
}
let curData = {

View File

@ -61,7 +61,7 @@ function stateSyncWatch(storeName, newState) {
// console.log('state-change-diffData', diffData)
try {
for(const key in diffData) {
const value = diffData[key]
const value = diffData[key] || null
const newValue = {} // 重新组装pinia需要的数据 {a:{b:1}} 这种
const keyArr = key.split('.') || []
keyArr.reduce((o,c,i)=>{o[c] = i === keyArr.length-1 ? value : {};return o[c]}, newValue)
@ -172,6 +172,8 @@ const getObjValue = (obj, key) => {
const findDifferences = (obj1, obj2) => {
const differences = {};
function compareObjects(o1, o2, path = '') {
if (o1 == null) return
if (o2 == null) return
for (const key in o1) {
if (o1.hasOwnProperty(key)) {
const newPath = path ? `${path}.${key}` : key;

View File

@ -86,7 +86,7 @@ import useUserStore from '@/store/modules/user'
import { ElMessage } from 'element-plus'
import { getCurrentTime, getAfterMinutes } from '@/utils/date'
const emit = defineEmits(['addSuccess'])
const emit = defineEmits(['addSuccess','close'])
const props = defineProps({
bookId: {
type: Number,
@ -217,6 +217,8 @@ const closeDialog = () => {
ruleFormDialog.value.resetFields()
centerDialogVisible.value = false
form.name = props.currentNode.label
emit('close')
}
const classList = ref([])
onMounted(() => {

View File

@ -158,6 +158,7 @@
:current-node="currentNode"
:book-id="uploadData.textbookId"
@add-success="initReserv"
@close="closeChange"
></reserv>
<!-- 上课配置 -->
<class-start ref="calssRef" @close="closeChange"/>
@ -319,6 +320,7 @@ export default {
this.activeClass = item
},
closeChange() { // -
console.log('关闭上课弹窗')
this.activeClass = null
sessionStore.delete('activeClass')
},