|
@@ -27,16 +27,18 @@
|
|
|
<el-option label="学生" value="2"></el-option>
|
|
|
</el-select>
|
|
|
</div> -->
|
|
|
+ <div class="typeBox" style="display: flex;align-items: center;">
|
|
|
+ <span>权限选择:</span>
|
|
|
+ <div class="checkJuri" @click="checkJuri">
|
|
|
+ <span v-if="!getCName(checkList)" style="color: #c0c4d6;">选择权限</span>
|
|
|
+ <span>{{ getCName(checkList) }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="typeBox">
|
|
|
<span>截止日期:</span>
|
|
|
- <el-date-picker
|
|
|
- v-model="selectedDate"
|
|
|
- type="date"
|
|
|
- :picker-options="pickerOptions"
|
|
|
- @change="DateChange"
|
|
|
- format="yyyy-MM-dd"
|
|
|
- clearable=""
|
|
|
- ></el-date-picker>
|
|
|
+ <el-date-picker v-model="selectedDate" type="date" :picker-options="pickerOptions"
|
|
|
+ @change="DateChange" format="yyyy-MM-dd" clearable=""
|
|
|
+ placeholder="选择截止日期"></el-date-picker>
|
|
|
</div>
|
|
|
<div class="typeBox" v-if="typeArray.length">
|
|
|
<span>类型:</span>
|
|
@@ -61,9 +63,10 @@
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 0px">
|
|
|
<div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">测评描述</div>
|
|
|
<div style="width: 100%;box-sizing: border-box;">
|
|
|
- <div style="width: calc((100%))">
|
|
|
- <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText" placeholder="测评描述" @change="briefChange"></textarea>
|
|
|
- </div>
|
|
|
+ <div style="width: calc((100%))">
|
|
|
+ <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
|
|
|
+ v-model="courseText" placeholder="测评描述" @change="briefChange"></textarea>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -92,6 +95,26 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<aiCreate :aiJson.sync="manualJson" :aiDialogVisible.sync="aiDialogVisible" v-if="aiDialogVisible"></aiCreate>
|
|
|
+ <el-dialog title="选择权限" :visible.sync="juriDialog" :append-to-body="true" :before-close="handleClose"
|
|
|
+ class="dialog_diy" width="500px">
|
|
|
+ <van-divider>
|
|
|
+ <div class="people_name">
|
|
|
+ <el-checkbox v-model="checkAll" @change="checkAllChange">全选</el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div style="max-height: 300px;overflow: auto;">
|
|
|
+ <el-checkbox-group v-model="checkList2" class="people_name" @change="pChange">
|
|
|
+ <el-checkbox v-for="item in classJuri" :key="item.id" :label="item.id">
|
|
|
+ {{ item.name }}
|
|
|
+ </el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </van-divider>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="juriDialog = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmCheck">确 定
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -104,6 +127,12 @@ export default {
|
|
|
aiCreate
|
|
|
},
|
|
|
props: {
|
|
|
+ oid: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ org: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
title: {
|
|
|
type: String
|
|
|
},
|
|
@@ -119,17 +148,20 @@ export default {
|
|
|
cJson: {
|
|
|
type: Array
|
|
|
},
|
|
|
- typeid:{
|
|
|
+ typeid: {
|
|
|
type: String
|
|
|
},
|
|
|
- brief:{
|
|
|
+ brief: {
|
|
|
type: String
|
|
|
},
|
|
|
- juri:{
|
|
|
+ juri: {
|
|
|
type: String
|
|
|
},
|
|
|
- overDate:{
|
|
|
+ overDate: {
|
|
|
type: String
|
|
|
+ },
|
|
|
+ juriList: {
|
|
|
+ type: Array
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -149,19 +181,49 @@ export default {
|
|
|
selectedDate: '',
|
|
|
pickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
- return time.getTime() < Date.now(); // 只能选择大于今天的日期
|
|
|
+ return time.getTime() < Date.now(); // 只能选择大于今天的日期
|
|
|
},
|
|
|
},
|
|
|
+ classJuri: [],
|
|
|
+ checkList: [],
|
|
|
+ checkList2: [],
|
|
|
+ juriDialog: false,
|
|
|
+ checkAll: false,
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ getCName() {
|
|
|
+ return function (clist) {
|
|
|
+ let _people = [];
|
|
|
+ let _people2 = [];
|
|
|
+ let _people3 = [];
|
|
|
+ if (this.classJuri.length) {
|
|
|
+ for (var i = 0; i < this.classJuri.length; i++) {
|
|
|
+ _people2.push(this.classJuri[i].id);
|
|
|
+ }
|
|
|
+ for(var i = 0; i < clist.length; i++){
|
|
|
+ if(_people2.indexOf(clist[i]) !== -1){
|
|
|
+ _people3.push(clist[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (var i = 0; i < this.classJuri.length; i++) {
|
|
|
+ if(_people3.indexOf(this.classJuri[i].id) !== -1){
|
|
|
+ _people.push(this.classJuri[i].name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this.classJuri.length ? _people.join(',') : "";
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
directives: {
|
|
|
autoHeight: {
|
|
|
update(el, binding) {
|
|
|
const { value } = binding
|
|
|
if (value && typeof value === 'number') {
|
|
|
- el.style.height = `${value}px`
|
|
|
+ el.style.height = `${value}px`
|
|
|
} else {
|
|
|
- el.style.height = 'auto'
|
|
|
+ el.style.height = 'auto'
|
|
|
}
|
|
|
},
|
|
|
componentUpdated(el) {
|
|
@@ -170,6 +232,9 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleClose(done) {
|
|
|
+ done();
|
|
|
+ },
|
|
|
selectAllType() {
|
|
|
let params = {
|
|
|
org: this.org && this.org != "" ? this.org : "",
|
|
@@ -251,16 +316,16 @@ export default {
|
|
|
seeChange() {
|
|
|
this.$emit("update:see", this.isTeacherSee)
|
|
|
},
|
|
|
- typeChange2(){
|
|
|
+ typeChange2() {
|
|
|
this.$emit("update:typeid", this.typeCheck)
|
|
|
},
|
|
|
- juriChange(){
|
|
|
+ juriChange() {
|
|
|
this.$emit("update:juri", this.sJuri)
|
|
|
},
|
|
|
- DateChange(){
|
|
|
+ DateChange() {
|
|
|
this.$emit("update:overDate", this.selectedDate)
|
|
|
},
|
|
|
- briefChange(){
|
|
|
+ briefChange() {
|
|
|
this.$emit("update:brief", this.courseText)
|
|
|
},
|
|
|
depthCopy(s) {
|
|
@@ -290,6 +355,58 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ //获取教研室列表
|
|
|
+ getClass2() {
|
|
|
+ let params = {
|
|
|
+ oid: this.oid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.classJuri = res.data[0];
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ checkJuri() {
|
|
|
+ let clist = []
|
|
|
+ let clist2 = []
|
|
|
+ for(var i = 0; i< this.classJuri.length;i++){
|
|
|
+ clist2.push(this.classJuri[i].id)
|
|
|
+ }
|
|
|
+ for(var i = 0; i< this.checkList.length;i++){
|
|
|
+ if(clist2.indexOf(this.checkList[i]) !== -1){
|
|
|
+ clist.push(this.checkList[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.checkList2 = JSON.parse(JSON.stringify(clist));
|
|
|
+ this.checkAll = this.checkList2.length == this.classJuri.length;
|
|
|
+ this.juriDialog = true
|
|
|
+ },
|
|
|
+ checkAllChange(){
|
|
|
+ if(this.checkAll){
|
|
|
+ this.checkList2 = []
|
|
|
+ for(var i = 0; i < this.classJuri.length; i++){
|
|
|
+ this.checkList2.push(this.classJuri[i].id)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.checkList2 = []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ pChange(val){
|
|
|
+ if(val.length == this.classJuri.length){
|
|
|
+ this.checkAll = true
|
|
|
+ }else{
|
|
|
+ this.checkAll = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ confirmCheck(){
|
|
|
+ this.checkList = JSON.parse(JSON.stringify(this.checkList2));
|
|
|
+ this.$emit("update:juriList", this.checkList)
|
|
|
+ this.juriDialog = false
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.courseTypeId = this.depthCopy(this.testType)
|
|
@@ -300,9 +417,12 @@ export default {
|
|
|
this.courseText = this.depthCopy(this.brief)
|
|
|
this.sJuri = this.depthCopy(this.juri)
|
|
|
this.selectedDate = this.depthCopy(this.overDate)
|
|
|
+ this.checkList = this.depthCopy(this.juriList)
|
|
|
+
|
|
|
this.$forceUpdate()
|
|
|
// this.selectAllType();
|
|
|
this.selectType();
|
|
|
+ this.getClass2();
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -530,21 +650,95 @@ export default {
|
|
|
right: 20px;
|
|
|
}
|
|
|
|
|
|
-.typeBox{
|
|
|
+.typeBox {
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
|
|
|
-.typeBox > span{
|
|
|
+.typeBox>span {
|
|
|
font-weight: bold;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.binfo_textarea {
|
|
|
- border: 1.5px solid #CAD1DC;
|
|
|
- font-size: 16px;
|
|
|
- resize: none;
|
|
|
- /* background: #f6f6f6; */
|
|
|
- font-family: 'Microsoft YaHei';
|
|
|
+ border: 1.5px solid #CAD1DC;
|
|
|
+ font-size: 16px;
|
|
|
+ resize: none;
|
|
|
+ /* background: #f6f6f6; */
|
|
|
+ font-family: 'Microsoft YaHei';
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+.checkJuri {
|
|
|
+ width: 220px;
|
|
|
+ height: 40px;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ padding: 0 15px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin-left: 5px;
|
|
|
+ border-radius: 4px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #464646;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+.dialog_diy>>>.el-dialog {
|
|
|
+ /* height: 100%; */
|
|
|
+ /* margin: 15vh auto !important; */
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_diy>>>.el-dialog__header {
|
|
|
+ background: #454545 !important;
|
|
|
+ padding: 15px 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_diy>>>.el-dialog__body {
|
|
|
+ /* height: calc(100% - 54px); */
|
|
|
+ box-sizing: border-box;
|
|
|
+ /* padding: 0px; */
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_diy>>>.el-dialog__title {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_diy>>>.el-dialog__headerbtn {
|
|
|
+ top: 19px;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_diy>>>.el-dialog__body,
|
|
|
+.dialog_diy>>>.el-dialog__footer {
|
|
|
+ /* background: #e8ebf1; */
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.people_name>>>.el-checkbox {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.people_name>>>.el-checkbox__label {
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ width: calc(100%);
|
|
|
+}
|
|
|
+
|
|
|
+.people_name2>>>.el-checkbox__label {
|
|
|
+ width: calc(100% - 130px);
|
|
|
+}
|
|
|
</style>
|