lsc 1 rok temu
rodzic
commit
ca4d935e00

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.c8d884a699347b4a14135db83d5f3f0f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.b99f0ffaf6e2bdd0ae12.js></script><script type=text/javascript src=./static/js/app.60a788eb8bb7440d9c5a.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.399c2a832f399f0c4474f4b2dab3d027.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.b99f0ffaf6e2bdd0ae12.js></script><script type=text/javascript src=./static/js/app.d54f1c36e4eb5501add9.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Plik diff jest za duży
+ 0 - 0
dist/static/css/app.399c2a832f399f0c4474f4b2dab3d027.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/app.399c2a832f399f0c4474f4b2dab3d027.css.map


Plik diff jest za duży
+ 0 - 0
dist/static/css/app.c8d884a699347b4a14135db83d5f3f0f.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/app.c8d884a699347b4a14135db83d5f3f0f.css.map


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.d54f1c36e4eb5501add9.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.d54f1c36e4eb5501add9.js.map


Plik diff jest za duży
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 31 - 6
src/components/pages/test/add/addTest.vue

@@ -25,7 +25,7 @@
                 </div>
                 <div class="step_box" :style="{ width: steps == 2 && '100%' }">
                     <setInfo v-if="steps == 1 && !loading" :oid="oid" :org="org" :steps.sync="steps" :title.sync="title"
-                        :testType.sync="testType" :see.sync="see" :cJson.sync="cJson" :typeid.sync="typeid" :brief.sync="brief" :juri.sync="juri" :overDate.sync="overDate"></setInfo>
+                        :testType.sync="testType" :see.sync="see" :cJson.sync="cJson" :typeid.sync="typeid" :brief.sync="brief" :juri.sync="juri" :overDate.sync="overDate" :juriList.sync="juriList"></setInfo>
                     <editInfo v-if="steps == 2 && !loading" :oid="oid" :org="org" :steps.sync="steps" :title.sync="title"
                         :cJson.sync="cJson" @save="save" @publish="publish"></editInfo>
                 </div>
@@ -58,7 +58,8 @@ export default {
             typeid:"",
             brief:"",
             juri:'0',
-            overDate:"2024-11-01",
+            overDate:"",
+            juriList:"",
         }
     },
     watch: {
@@ -68,6 +69,11 @@ export default {
                 this.steps = 1
                 return;
             }
+            // else if(!this.juriList.length){
+            //     this.$message.error("请选择权限")
+            //     this.steps = 1
+            //     return
+            // } 
             if (this.cid) {
                 this.updateWork(this.look)
             } else {
@@ -89,14 +95,20 @@ export default {
                         if (this.title == "") {
                             this.$message.error("请补充填写课程名称");
                             return;
-                        } else {
+                        }else if(!this.juriList.length){
+                            this.$message.error("请选择权限")
+                            return
+                        }else {
                             this.addWork(5);
                         }
                     } else {
                         if (this.title == "") {
                             this.$message.error("请补充填写课程名称");
                             return;
-                        } else {
+                        }else if(!this.juriList.length){
+                            this.$message.error("请选择权限")
+                            return
+                        }else {
                             this.updateWork(5);
                         }
                     }
@@ -136,10 +148,12 @@ export default {
                     ateacher: "",
                     inviteCode: "",
                     typeid: this.typeid ? this.typeid : '',
+                    overtime: this.overDate ? this.formatTime(this.overDate) : '',
+                    j2: this.juriList.length ? this.juriList.join(",") : ''
                 },
             ];
             this.ajax
-                .post(this.$store.state.api + "addTestCourse2", params)
+                .post(this.$store.state.api + "addTestCourse", params)
                 .then((res) => {
                     this.cid = res.data.courseId;
                     if(look == 5){
@@ -164,6 +178,14 @@ export default {
                     console.error(err);
                 });
         },
+        formatTime(timestamp) {
+            const date = new Date(timestamp);
+            const year = date.getFullYear();
+            const month = String(date.getMonth() + 1).padStart(2, '0');
+            const day = String(date.getDate()).padStart(2, '0');
+            
+            return `${year}-${month}-${day}`;
+        },
         updateWork(look) {
             let params = [
                 {
@@ -181,10 +203,12 @@ export default {
                     inviteCode: "",
                     look: look == 3 ? 2 : look == 4 ? this.look : look == 5 ? this.look : look,
                     typeid: this.typeid ? this.typeid : '',
+                    overtime: this.overDate ? this.formatTime(this.overDate) : '',
+                    j2: this.juriList.length ? this.juriList.join(",") : ''
                 },
             ];
             this.ajax
-                .post(this.$store.state.api + "updateTestCourse2", params)
+                .post(this.$store.state.api + "updateTestCourse", params)
                 .then((res) => {
                     if(look == 3){
                         this.$message.success("发布成功")
@@ -241,6 +265,7 @@ export default {
                         this.title = res.data[0][0].title;
                         this.juri = res.data[0][0].juri ? res.data[0][0].juri : '0';
                         this.overDate = res.data[0][0].overTime ? res.data[0][0].overTime : '';
+                        this.juriList = res.data[0][0].juri2 ? res.data[0][0].juri2.split(',') : [];
                         this.see = res.data[0][0].open == 1 ? true : false;
 
                         this.typeid = res.data[0][0].typeid;

+ 223 - 29
src/components/pages/test/add/setInfo/index.vue

@@ -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>

+ 11 - 1
src/components/pages/test/index.vue

@@ -146,6 +146,16 @@
                             <div class="test_time">
                                 <span><span>修改日期</span></span><span>{{ item.utime }}</span>
                             </div>
+                            <div class="test_time">
+                                <span><span>截止日期</span></span><span>{{ item.overtime ? item.overtime : '未设置' }}</span>
+                            </div>
+                            <div class="test_time">
+                                <span><span>填写范围</span></span><el-tooltip :content="item.juriP ? item.juriP : '所有人'" placement="top" effect="dark">
+                                    <!-- content to trigger tooltip here -->
+                                    <span>{{ item.juriP ? item.juriP : '所有人' }}</span>
+                                </el-tooltip>
+                                
+                            </div>
                             <div class="test_time tset_type" v-if="typeArray.length">
                                 <span><span>类型</span></span>
                                 <span v-if="!item.typeN">未设置类型</span>
@@ -1553,7 +1563,7 @@ export default {
 }
 
 .test_box>.test_time>span:nth-child(2) {
-    width: calc(100% - 70px);
+    max-width: calc(100% - 70px);
     overflow: hidden;
     display: block;
     text-overflow: ellipsis;

+ 2 - 0
src/components/pages/testPerson/test/test.vue

@@ -32,6 +32,7 @@
                     <div class="time">
                         <span>创建时间: {{ item.time }}</span>
                         <span>修改时间: {{ item.utime }}</span>
+                        <span v-if="item.overtime">截止时间: {{ item.overtime }}</span>
                     </div>
                 </div>
                 <div class="test_panel_box">
@@ -316,6 +317,7 @@ export default {
                             title: item.title,
                             time: item.time,
                             utime: item.utime,
+                            overtime: item.overtime,
                             chapters: item.chapters,
                             brief: item.brief,
                             array: []

+ 19 - 9
src/components/pages/testStudent/index.vue

@@ -96,6 +96,16 @@
             <div class="test_time">
               <span><span>修改日期</span></span><span>{{ item.utime }}</span>
             </div>
+            <div class="test_time">
+              <span><span>截止日期</span></span><span>{{ item.overtime ? item.overtime : '未设置' }}</span>
+            </div>
+            <div class="test_time">
+              <span><span>填写范围</span></span><el-tooltip :content="item.juriP ? item.juriP : '所有人'" placement="top"
+                effect="dark">
+                <!-- content to trigger tooltip here -->
+                <span>{{ item.juriP ? item.juriP : '所有人' }}</span>
+              </el-tooltip>
+            </div>
             <div class="test_time tset_type" v-if="typeArray.length">
               <span><span>类型</span></span>
               <span v-if="!item.typeN">未设置类型</span>
@@ -1375,7 +1385,7 @@ export default {
 }
 
 .test_top>.bj {
-    background: rgb(98, 158, 188);
+  background: rgb(98, 158, 188);
 }
 
 
@@ -1405,7 +1415,7 @@ export default {
 }
 
 .test_top>.bj:after {
-    background-image: url('../../../assets/icon/test/bj_icon_b.png');
+  background-image: url('../../../assets/icon/test/bj_icon_b.png');
 }
 
 .test_top>.test_top_title {
@@ -1442,22 +1452,22 @@ export default {
 }
 
 .test_box>.test_time>span:nth-child(1) {
-    width: 70px;
-    display: flex;
+  width: 70px;
+  display: flex;
 }
 
 
-.test_box>.test_time>span:nth-child(1) > span{
+.test_box>.test_time>span:nth-child(1)>span {
   width: 100%;
   text-align-last: justify;
 }
 
-.test_box>.test_time>span:nth-child(1)::after{
-    content: ':';
+.test_box>.test_time>span:nth-child(1)::after {
+  content: ':';
 }
 
-.test_box>.test_time > span:nth-child(2){
-  width: calc(100% - 70px);
+.test_box>.test_time>span:nth-child(2) {
+  max-width: calc(100% - 70px);
   overflow: hidden;
   display: block;
   text-overflow: ellipsis;

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików