lsc 1 year ago
parent
commit
dd2ad64219

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.67267fa7963e432a5d809696a1eff14c.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.9ec65298e8fb3e21be39.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.d656fdb6091b1e051822b822e805e521.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.f3ad69f5b9ca3b62dda3.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.d656fdb6091b1e051822b822e805e521.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.d656fdb6091b1e051822b822e805e521.css.map


BIN
dist/static/img/paste-icon.2ee0df0.png


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.f3ad69f5b9ca3b62dda3.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.f3ad69f5b9ca3b62dda3.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


BIN
src/assets/icon/test/paste-icon.png


+ 16 - 7
src/components/pages/test/index.vue

@@ -178,6 +178,9 @@
                                     <el-tooltip content="查看" placement="top" effect="dark">
                                         <span class="check" @click="checkToTest(item.courseId)"></span>
                                     </el-tooltip>
+                                    <el-tooltip content="复制" placement="top" effect="dark">
+                                        <span class="copy" @click="copyTest(item.courseId)"></span>
+                                    </el-tooltip>
                                     <el-tooltip content="提醒" placement="top" effect="dark">
                                         <span class="share" @click="shareTest(item)" v-if="((item.userid == userid) ||
                                             (item.course_teacher &&
@@ -230,7 +233,8 @@
                                 v-if="((scope.row.userid == userid) ||
                                     (scope.row.course_teacher &&
                                     scope.row.course_teacher.indexOf(userid) !== -1) || role == '1')">编辑</el-button>
-                            <el-button @click="checkToTest(scope.row.courseId)" type="text" size="small">详情</el-button>
+                            <el-button @click="checkToTest(scope.row.courseId)" type="text" size="small">查看</el-button>
+                            <el-button @click="copyTest(scope.row.courseId)" type="text" size="small">复制</el-button>
                             <el-button @click="shareTest(scope.row)" type="text" size="small">提醒</el-button>
                             <el-button @click="deleteCourse(scope.row.courseId)" type="text" size="small"
                                 style="color: #EE3E3E;"
@@ -260,13 +264,13 @@
                                     <span>{{ item.className ? item.className : '无' }}</span>
                                 </el-tooltip>
                             </div>
-                            <!-- <div class="test_btn">
+                            <div class="test_btn">
                                 <div class="test_o_btn">
                                     <el-tooltip content="查看" placement="top" effect="dark">
                                         <span class="check" @click="checkToTest2(item.userid)"></span>
                                     </el-tooltip>
                                 </div>
-                            </div> -->
+                            </div>
                         </div>
                         <div class="course_empty" v-if="stype == 1 && course.length == 0">暂无数据</div>
                         <div class="course_empty" v-if="stype == 2 && course2.length == 0">暂无数据</div>
@@ -291,11 +295,11 @@
                     </el-table-column>
                     <el-table-column prop="testCount" label="已完成表单" min-width="80" align="center">
                     </el-table-column>
-                    <!-- <el-table-column label="操作" width="350px">
+                    <el-table-column label="操作" width="350px">
                         <template slot-scope="scope">
                             <el-button @click="checkToTest2(scope.row.userid)" type="text" size="small">详情</el-button>
                         </template>
-                    </el-table-column> -->
+                    </el-table-column>
                 </el-table>
             </div>
             <div class="student_page">
@@ -1008,13 +1012,13 @@ export default {
             this.problemCourse = res;
             this.dialogVisible = true;
         },
-        copyCourse(cid) {
+        copyTest(cid) {
             let params = [{
                 cid: cid,
                 uid: this.userid
             }]
             this.ajax
-                .post(this.$store.state.api + "copySCourse", params)
+                .post(this.$store.state.api + "copyTest", params)
                 .then((res) => {
                     this.page = 1
                     if (this.role == "1") {
@@ -1744,6 +1748,11 @@ export default {
     margin-right: 20px;
 }
 
+.test_box>.test_btn>.test_o_btn>.copy {
+    background-image: url('../../../assets/icon/test/paste-icon.png');
+    margin-right: 20px;
+}
+
 .test_box>.test_btn>.test_o_btn>.share {
     background-image: url('../../../assets/icon/test/share_test_icon.png');
     margin-right: 20px;

+ 47 - 15
src/components/pages/test/shareBox/index.vue

@@ -7,26 +7,26 @@
                     <span>表单名称:</span>
                     <span>{{ testJson.title }}</span>
                 </div>
-                <div class="info">
+                <div class="info" >
                     <span>表单范围:</span>
-                    <span>{{ testJson.title }}</span>
+                    <span>{{ testJson.juriP ? testJson.juriP : '所有人' }}</span>
+                </div>
+                <div class="info" v-if="testJson.overtime">
+                    <span>截止时间:</span>
+                    <span>{{ testJson.overtime }}</span>
                 </div>
-                <!-- <div class="info">
-                <span>截止时间:</span>
-                <span>{{ testJson.title }}</span>
-            </div>
-            <div class="info">
-                <span>未完成人数:</span>
-                <span>{{ testJson.title }}</span>
-            </div> -->
                 <div class="info">
+                    <span>未完成人数:</span>
+                    <span>{{ noCount }}</span>
+                </div>
+                <div class="info" v-if="testJson.juriP">
                     <span>已完成人数:</span>
                     <span>{{ testJson.worksPerson }}</span>
                 </div>
-                <!-- <div class="info">
-                <span>未完成名单:</span>
-                <span>{{ testJson.title }}</span>
-            </div> -->
+                <div class="info" v-if="pname.length && testJson.juriP">
+                    <span>未完成名单:</span>
+                    <span>{{ pname.join(',') }}</span>
+                </div>
             </div>
             <div class="url_box">
                 <div class="title">
@@ -69,7 +69,9 @@ export default {
     data() {
         return {
             origin: top.origin,
-            copyText: ""
+            copyText: "",
+            noCount: 0,
+            pname:[]
         };
     },
     methods: {
@@ -116,11 +118,41 @@ export default {
                 clipboard.destroy(); // 释放内存
             });
         },
+        getData() {
+            if(!this.testJson.juriP){
+                return;
+            }
+            let params = {
+                id: this.testJson.courseId,
+            };
+            this.ajax
+                .get(this.$store.state.api + "getTestWorkShare", params)
+                .then((res) => {
+                    let parray = res.data[0]
+                    let is = res.data[1]
+                    this.noCount = parray.length - is.length
+                    let isA = []
+                    for(var i=0;i<is.length;i++){
+                        isA.push(is[i].userid)
+                    }
+                    let pname = []
+                    for(var i=0;i<parray.length;i++){
+                        if(isA.indexOf(parray[i].userid) == -1){
+                            pname.push(parray[i].username)
+                        }
+                    }
+                    this.pname = pname
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        }
     },
     watch: {
         dialogVisibleShare(newValue, oldValue) {
             if (newValue) {
                 this.setQr()
+                this.getData()
             }
         }
     },

Some files were not shown because too many files changed in this diff