学生组织编辑限制、实验台

dev_2022-05-11
yujialong 3 years ago
parent 653209b48c
commit ce6c46f6d4
  1. 24
      src/pages/station/list/index.vue
  2. 4
      src/pages/station/preview/index.vue
  3. 32
      src/pages/student/list/index.vue
  4. 4
      src/setting.js

@ -9,7 +9,6 @@
<template v-for="(item,index) in curriculumList">
<a class="item" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.coverUrl" alt="">
<p class="text" v-html="item.curriculumName"></p>
</a>
</template>
</div>
@ -57,7 +56,7 @@ export default {
.search {
position: relative;
width: 30%;
margin: 50px auto 150px;
margin: 50px auto 130px;
border-radius: 30px;
border: 1px solid #9076FF;
border-right: 0;
@ -90,31 +89,22 @@ export default {
.wrap {
display: flex;
flex-wrap: wrap;
width: 70%;
width: 1072px;
margin: 0 auto;
min-height: calc(100vh - 520px);
box-sizing: border-box;
.item {
width: 16%;
margin: 20px;
text-align: center;
width: 256px;
height: 195px;
margin: 0 6px 4px;
cursor: pointer;
&:hover {
opacity: .9;
}
img {
width: 100px;
height: 100px;
margin: 0 auto 6px;
}
.text {
font-size: 14px;
text-align: center;
color: #333;
width: 100%;
height: 100%;
}
}
}

@ -33,8 +33,7 @@
<span @click="changePdfPage(1)" class="turn el-icon-arrow-right"
:class="{grey: currentPage==pageCount}"></span>
</p>
<div style='color:#393A3D;height: 30px;
background: #393A3D;'></div>
<div style='color:#393A3D;height: 30px;background: #393A3D;'></div>
<pdf
class="pdf-wrap"
:src="pdfSrc"
@ -290,7 +289,6 @@ export default {
let token = util.local.get(Setting.tokenKey);
let roleId = this.roleId == 4 ? 0 : 1;
let userName = window.btoa(encodeURIComponent(this.userName));
if (id == 11) {
href = `${Setting.bankPath}/#/index/list?token=${token}&cid=${this.courseId}&systemId=${this.assessmentList[0].systemId}&projectId=&assessmentId=&classId=&stopTime=&test=true`
} else if (id == 21) {

@ -67,7 +67,6 @@
<el-input v-model.trim="orgForm.organizationName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="上级部门">
<!--:options="cascaderOptions"-->
<el-cascader
v-if="showCascader"
v-model="cascaderValue"
@ -302,6 +301,7 @@ export default {
organizationName: ""
},
cascaderValue: [], //
cascaderLevel: 1,
cascaderProps: {
checkStrictly: true,
label: "organizationName",
@ -315,10 +315,13 @@ export default {
parentId = node.data.id;
}
that.$post(`${that.api.stuOrganizationTree}?level=${level}&parentId=${parentId}`).then(res => {
let { status, treeList } = res;
const { status, treeList } = res;
const isGrade = that.labelName === '年级' //
const deepLevel = that.cascaderLevel //
if (status === 200 && treeList.length) {
treeList.forEach(i => {
i.leaf = i.level === 2;
if (deepLevel === 3 || (isGrade && i.leaf) || (deepLevel === 2 && i.leaf)) i.disabled = true
});
return resolve(treeList);
} else {
@ -446,7 +449,6 @@ export default {
util.debounce(this.getOrgStudentData(), 1000);
},
handleAdd(node, data) { //
console.log(JSON.stringify(data));
this.orgVisible = true;
this.orgTitle = "新增";
this.isAddOrg = true;
@ -472,8 +474,17 @@ export default {
};
}
},
//
getDeep(data) {
let list = data
let level = 1
while (list.childNodes.length) {
list = list.childNodes[0]
++level
}
return level
},
handleEdit(node, data) { //
// console.log("data=", data.ids);
this.orgVisible = true;
this.orgForm = data;
this.orgTitle = "编辑";
@ -490,6 +501,7 @@ export default {
tempArr.splice(tempArr.length - 1, 1);
this.cascaderValue = tempArr;
}
this.cascaderLevel = this.getDeep(node)
},
handleChangeCascader(value) {
// console.log(JSON.stringify(value));
@ -512,9 +524,10 @@ export default {
orgSubmit() { // /
this.$refs.orgForm.validate((valid) => {
if (valid) {
if (this.cascaderValue && this.cascaderValue.length) {
this.orgForm.parentId = this.cascaderValue[this.cascaderValue.length - 1];
this.orgForm.level = this.cascaderValue.length + 1;
const cas = this.cascaderValue
if (cas && cas.length) {
this.orgForm.parentId = cas[cas.length - 1];
this.orgForm.level = cas.length + 1;
}
if (this.isAddOrg) {
//
@ -525,6 +538,7 @@ export default {
}).catch(err => {
});
} else {
if (cas.length === 1 && this.labelName === '班级名称') return util.errorMsg('请选择年级!')
//
this.$post(this.api.updateOrg, this.orgForm).then(res => {
util.successMsg("编辑成功!");
@ -583,7 +597,6 @@ export default {
i.ids = ids ? `${ids},${i.id}` : `${i.id}`; //
result.push(i);
});
// console.log(JSON.stringify(result));
return resolve(result);
} else {
return resolve([]);
@ -859,7 +872,6 @@ export default {
let { status, treeList } = res;
if (status === 200 && treeList.length) {
let result = [];
// console.log(this.form.classId);
treeList.forEach(i => {
i.disabled = i.level < 3;
if (i.level === 3) {
@ -874,7 +886,6 @@ export default {
i.leaf = false;
i.showCheckbox = false;
}
// console.log(JSON.stringify(i));
result.push(i);
});
return resolve(result);
@ -1005,7 +1016,6 @@ export default {
},
uploadSuccess(res, file, fileList) {
this.uploadFaild = false;
console.log(res)
if (res.status === 200) {
if (res.data.exportCode) {
this.exportCode = res.data.exportCode;

@ -40,8 +40,8 @@ if (isHh) {
jumpPath = "http://192.168.31.154:8087/";
bankPath = `http://192.168.31.125:8093`
// host = "http://www.occupationlab.com:9000/";//线上
host = "http://39.108.250.202:9000/"; // 中台测试服
// host = "http://192.168.31.151:9000/"; // 榕
// host = "http://39.108.250.202:9000/"; // 中台测试服
host = "http://192.168.31.151:9000/"; // 榕
// host = 'http://192.168.31.137:9000/'; // 赓
title = "职站服务端管理系统";
} else {

Loading…
Cancel
Save