Compare commits

..

10 Commits

7 changed files with 74 additions and 43 deletions

View File

@ -17,7 +17,7 @@ asarUnpack:
nsis: nsis:
oneClick: false oneClick: false
allowToChangeInstallationDirectory: true allowToChangeInstallationDirectory: true
artifactName: ${name}-${version}-setup.${ext} artifactName: ${name}-${version}-setup-lt.${ext}
shortcutName: ${productName} shortcutName: ${productName}
uninstallDisplayName: ${productName} uninstallDisplayName: ${productName}
createDesktopShortcut: always createDesktopShortcut: always

View File

@ -1,6 +1,6 @@
{ {
"name": "aix-win", "name": "aix-win",
"version": "2.0.6", "version": "2.0.7",
"description": "", "description": "",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": "example.com", "author": "example.com",

View File

@ -114,6 +114,7 @@ const emitChangeBook = async () => {
*/ */
let levelFirstId = null let levelFirstId = null
let levelSecondId = null let levelSecondId = null
let bookeId = curBook.data.id
if (curData.parentNode) { if (curData.parentNode) {
levelFirstId = curData.parentNode.id levelFirstId = curData.parentNode.id
levelSecondId = curData.id levelSecondId = curData.id
@ -121,7 +122,7 @@ const emitChangeBook = async () => {
levelFirstId = curData.id levelFirstId = curData.id
levelSecondId = '' levelSecondId = ''
} }
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId})) localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId}))
emit('changeBook', data) emit('changeBook', data)
} }
@ -206,6 +207,7 @@ const handleNodeClick = (data, node) => {
*/ */
let levelFirstId = null let levelFirstId = null
let levelSecondId = null let levelSecondId = null
let bookeId = curBook.data.id
if (nodeData.parentNode) { if (nodeData.parentNode) {
levelFirstId = nodeData.parentNode.id levelFirstId = nodeData.parentNode.id
levelSecondId = nodeData.id levelSecondId = nodeData.id
@ -213,7 +215,7 @@ const handleNodeClick = (data, node) => {
levelFirstId = nodeData.id levelFirstId = nodeData.id
levelSecondId = '' levelSecondId = ''
} }
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId})) localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId}))
emit('nodeClick', curData) emit('nodeClick', curData)

View File

@ -102,8 +102,9 @@ const getTreeData = () => {
levelFirstId = curNode.id levelFirstId = curNode.id
levelSecondId = '' levelSecondId = ''
} }
let bookeId = curBookId
// 头部 教材分析、作业设计打开外部链接需要当前章节ID // 头部 教材分析、作业设计打开外部链接需要当前章节ID
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId})) localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId}))
// const data = { // const data = {
// textBook: { // textBook: {

View File

@ -168,10 +168,11 @@ const clickMenu = ({isOuter, path, disabled}) =>{
let fullPath = configObj.fullPath + path let fullPath = configObj.fullPath + path
if(path == '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask' || path == '/teaching/classtaskassign?titleName=作业布置'){ if(path == '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask' || path == '/teaching/classtaskassign?titleName=作业布置'){
// ID // ID
const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId')) const { levelFirstId, levelSecondId, bookeId } = JSON.parse(localStorage.getItem('unitId'))
let unitId = levelSecondId ? levelSecondId : levelFirstId let unitId = levelSecondId ? levelSecondId : levelFirstId
fullPath = fullPath + `&unitId=${unitId}`
fullPath = fullPath + `&unitId=${unitId}&bookeId=${bookeId}`
console.log(fullPath) console.log(fullPath)
} }

View File

@ -7,7 +7,7 @@
:before-close="handleClose" :before-close="handleClose"
> >
<el-steps v-if="type==1" style="max-width: 100%;-webkit-app-region: no-drag;height:35px" :active="activeIndex" finish-status="success" simple> <el-steps v-if="type==1" style="max-width: 100%;-webkit-app-region: no-drag;height:35px" :active="activeIndex" finish-status="success" simple>
<el-step title="1.基本信息" @click="activeIndex=1" /> <el-step title="1.基本信息" @click="activeIndex=1" style="cursor:pointer"/>
<el-step title="2.在校信息" /> <el-step title="2.在校信息" />
</el-steps> </el-steps>
<el-form <el-form
@ -37,12 +37,14 @@
<el-form-item label="确认密码" prop="confirmPassword" v-if="activeIndex==1"> <el-form-item label="确认密码" prop="confirmPassword" v-if="activeIndex==1">
<el-input v-model="ruleForm.confirmPassword" type="password" placeholder="请确认密码" /> <el-input v-model="ruleForm.confirmPassword" type="password" placeholder="请确认密码" />
</el-form-item> </el-form-item>
<el-form-item label="所属地区" prop="address" v-if="activeIndex==2"> <el-form-item label="所属地区" prop="address" v-if="activeIndex==2">
<el-cascader <el-cascader
style="width:100%" style="width:100%"
popper-class="aix-regist-address"
v-model="ruleForm.address" v-model="ruleForm.address"
:options="regionData" :options="regionData"
@change="handleChange" @change="handleChange"
:props="{checkStrictly: true}"
/> />
</el-form-item> </el-form-item>
<el-form-item label="学校" prop="school" v-if="activeIndex==2"> <el-form-item label="学校" prop="school" v-if="activeIndex==2">
@ -60,7 +62,7 @@
<el-form-item label="学科" prop="discipline" v-if="activeIndex==2"> <el-form-item label="学科" prop="discipline" v-if="activeIndex==2">
<div v-for="item in schoolSubject" style="display: flex;"> <div v-for="item in schoolSubject" style="display: flex;">
<span style="width:50px">{{ item.name }}</span> <span style="width:50px">{{ item.name }}</span>
<el-checkbox-group style="width:100%" v-model="ruleForm.discipline"> <el-checkbox-group style="width:100%" v-model="ruleForm.discipline">
<el-checkbox style="margin-right:10px" v-for="el in item.children" :key="el.id" :label="el.itemtitle" :value="el" /> <el-checkbox style="margin-right:10px" v-for="el in item.children" :key="el.id" :label="el.itemtitle" :value="el" />
</el-checkbox-group> </el-checkbox-group>
</div> </div>
@ -72,6 +74,7 @@
</el-form-item> </el-form-item>
<el-form-item v-if="activeIndex==2"> <el-form-item v-if="activeIndex==2">
<div class="centerDiv"> <div class="centerDiv">
<el-button type="default" @click="activeIndex=1">上一步</el-button>
<el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button> <el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button>
</div> </div>
</el-form-item> </el-form-item>
@ -104,7 +107,7 @@
</template> --> </template> -->
</el-dialog> </el-dialog>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
@ -216,7 +219,7 @@ const rules = reactive({
required: true, required: true,
message: '请选择学科', message: '请选择学科',
trigger: 'change', trigger: 'change',
},] },]
}) })
const dialogVisible = ref(false) const dialogVisible = ref(false)
@ -294,7 +297,6 @@ const nextStep = (formEl) => {
} }
}) })
getSubject() getSubject()
console.log(res)
}) })
console.log('submit!') console.log('submit!')
} }
@ -308,7 +310,8 @@ const getSubject = async ()=>{
const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 }) const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 })
console.log(rows,'所有学科') console.log(rows,'所有学科')
allSubjectList.value = rows.data allSubjectList.value = rows.data
accessToDisciplines()
getClassmain()
} }
const submitForm = async (formEl) => { const submitForm = async (formEl) => {
@ -409,46 +412,53 @@ const sbmitImg=()=>{
ruleForm.Code=res.data ruleForm.Code=res.data
isImg.value=false isImg.value=false
} }
}) })
}else{ }else{
ElMessage.error('请根据图片输入验证码') ElMessage.error('请根据图片输入验证码')
} }
// //
} }
const handleChange = (value) => { const handleChange = (value) => {
console.log('选中的地址值:', value); console.log('选中的地址值:', value);
}; };
const handleSchoolChange= async ()=>{ const handleSchoolChange= ()=>{
ruleForm.discipline=[]; ruleForm.discipline=[];
ruleForm.class=[]; ruleForm.class=[];
//
accessToDisciplines()
getClassmain()
}
//
const accessToDisciplines = () => {
getDept({deptId:ruleForm.school[2]}).then(res =>{ getDept({deptId:ruleForm.school[2]}).then(res =>{
if(res.data.studying && res.data.studying.length){ if(res.data.studying && res.data.studying.length){
let studying = res.data.studying.split(',') let studying = res.data.studying.split(',')
let ary = [] let ary = []
studying.forEach(item =>{ studying.forEach(item =>{
let obj = { let obj = {
name: item, name: item,
children: [] children: []
}
allSubjectList.value.forEach(el =>{
if(item == el.edustage){
obj.children.push(el)
} }
allSubjectList.value.forEach(el =>{
if(item == el.edustage){
obj.children.push(el)
}
})
ary.push(obj)
}) })
schoolSubject.value = ary ary.push(obj)
} })
else{ schoolSubject.value = ary
schoolSubject.value = [] }
} else{
}) schoolSubject.value = []
listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'}).then(res=>{ }
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
console.log(gradeTree.value,'班级')
}) })
}
//
const getClassmain = async ()=>{
console.log(ruleForm.school)
const res = await listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'})
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
} }
// //
const groupByCondition = (arr, condition)=>{ const groupByCondition = (arr, condition)=>{
@ -484,8 +494,11 @@ const gradeName = (key) =>{
} }
} }
onMounted(()=>{ onMounted(()=>{
//
}) ruleForm.address = ['50']
//
ruleForm.school = [100,255,279]
})
defineExpose({ defineExpose({
OpenModel, OpenModel,
}) })
@ -498,4 +511,17 @@ defineExpose({
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
</style>
<style lang="scss">
.aix-regist-address{
.el-cascader-node{
position: relative!important;
.el-radio{
position: absolute!important;
width: 90%!important;
left:5px!important;
}
}
}
</style> </style>

View File

@ -208,7 +208,8 @@ export default {
openFileWin(items) { openFileWin(items) {
if (items.fileFlag === 'apt') { if (items.fileFlag === 'apt') {
console.log(this.curNode); console.log(this.curNode);
const path="/teaching/aptindex?id="+items.fileId + "&cataId=" + this.curNode.id; let curBook = JSON.parse(localStorage.getItem('curBook'))
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + this.curNode.id + "&bookId=" + curBook.id;
let configObj = outLink().getBaseData() let configObj = outLink().getBaseData()
let fullPath = configObj.fullPath + path let fullPath = configObj.fullPath + path
fullPath = fullPath.replaceAll('//', '/') fullPath = fullPath.replaceAll('//', '/')