lsc 2 سال پیش
والد
کامیت
8e21e4902d

+ 1 - 1
dist/index.html

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

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.1a23aebe69aa2984a2e2f3b115e35708.css.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.c9dda7e8e2b2dffe11334a18e295633f.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.c9dda7e8e2b2dffe11334a18e295633f.css.map


BIN
dist/static/img/checka.462e87f.png


BIN
dist/static/img/fengmian.fb0414c.jpg


BIN
dist/static/img/image.a761254.png


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.e13aa4fc959758fe1898.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.f523615872b6fb8be51d.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.f523615872b6fb8be51d.js.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


BIN
src/assets/icon/source/check.png


BIN
src/assets/icon/source/checka.png


BIN
src/assets/icon/source/fengmian.jpg


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
src/components/json2.json


+ 14 - 0
src/components/pages/studio/addCourse.vue

@@ -6148,6 +6148,11 @@ export default {
           this.taskCount
         ].toolArray[this.toolIndex].sourceIndex = 0;
       }
+      let time = new Date()
+      let nowTime = this.timestampToTime(time.toLocaleString('en-US',{hour12: false}).split(" "))
+      this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.taskCount
+        ].toolArray[this.toolIndex].createTime = nowTime
       this.setPeople(this.unitIndex, this.taskCount, this.userid);
       this.editSourceType = 1;
       this.sourcesData = [];
@@ -6155,6 +6160,15 @@ export default {
       this.dialogVisibleTool = false;
       this.setVHeight();
     },
+    timestampToTime(times) {
+        let time = times[1]
+        let mdy = times[0]
+        mdy = mdy.split('/')
+        let month = parseInt(mdy[0]) > 9 ? parseInt(mdy[0]) : '0'+parseInt(mdy[0]);
+        let day = parseInt(mdy[1]) > 9 ? parseInt(mdy[1]) : '0'+parseInt(mdy[1]);
+        let year = parseInt(mdy[2])
+        return year + '-' + month + '-' + day + ' ' + time
+    },
     openToolFun(tool, taskCount, i) {
       this.taskCount = taskCount;
       this.toolIndex = i;

+ 43 - 5
src/components/pages/teacherSource/dialog.vue

@@ -5,6 +5,7 @@
           padding: 0px 25px;
           box-sizing: border-box;
           border-radius: 5px;
+          font-size: 16px;
         ">
             <div class="reBox">
                 <div class="reTop">
@@ -20,7 +21,7 @@
                 </div>
                 <div class="choose">
                     <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
-                        :style="{ margin: !CourseTypeJson[item.id].length && 0 }">
+                        :style="{ margin: !CourseTypeJson[item.id].length && 0 }"  v-if="(item.name != '类型') || typea != '' || typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1">
                         <span v-if="CourseTypeJson[item.id].length">{{ item.name }}:</span>
                         <div class="typeCss" v-if="CourseTypeJson[item.id].length">
                             <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
@@ -46,8 +47,12 @@
                 <div class="source-box" v-for="(item, index) in res" :key="index">
                     <img class="checkImg" src="../../../assets/icon/source/checka.png" @click="checka(item)" v-if="sourceData[item.id]"/>
                     <img class="checkImg" src="../../../assets/icon/source/check.png" @click="checka(item)" v-else/>
-                    <div class="iamge"><img src="../../../assets/icon/source/image.png" alt=""></div>
-                    <div class="title"><span>{{ item.name }}</span></div>
+                    <!-- <div class="iamge"><img src="../../../assets/icon/source/image.png" alt=""></div>
+                    <div class="title"><span>{{ item.name }}</span></div> -->
+                    <div class="fengmian">
+                        <img src="../../../assets/icon/source/fengmian.jpg" alt="">
+                        <div class="ftitle"><span>{{ item.name }}</span></div>
+                    </div>
                     <div class="detail">{{ item.detail }}</div>
                     <div class="label"><span v-for="(k, ki) in item.label.split(',')" :key="index + '-' + ki">{{ k ? k : "无" }}</span>
                     </div>
@@ -260,6 +265,10 @@ export default {
                     }
                 }
             }
+            if(this.typea == "" && this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') == -1){
+                this.typeb = "";
+                this.typeE = []
+            }
             this.getSource();
         },
         getSource() {
@@ -616,6 +625,8 @@ export default {
     overflow: hidden;
     margin: 0 20px 20px 0;
     position: relative;
+    display:flex;
+    flex-direction: column;
 }
 .source-box:nth-child(4n){
     margin-right: 0;
@@ -626,10 +637,35 @@ export default {
     z-index: 10;
     right: 10px;
     cursor: pointer;
+    width: 30px;
+    border-radius:5px;
+}
+
+.fengmian{
+    width: 100%;
+    position: relative;
+}
+.fengmian>img{
+    width: 100%;
+}
+
+.fengmian>.ftitle{
+    position: absolute;
+    bottom: 10%;
+    color: rgb(88, 121, 198);
+    width: 90%;
+    text-align: center;
+    font-weight: 700;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 24px;
+    left: 50%;
+    transform: translateX(-50%);
 }
 .source-box .iamge {
-    width: 208px;
-    height: 180px;
+    width: 150px;
+    height: 125px;
     margin: 0 auto;
 }
 
@@ -663,6 +699,7 @@ export default {
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     height: 42px;
+    font-size: 15px;
 }
 
 .source-box .label {
@@ -686,6 +723,7 @@ export default {
     display: flex;
     height: 40px;
     background: rgb(244, 244, 244);
+    margin-top:auto;
 }
 
 .source-box .button>span {

+ 91 - 7
src/components/pages/teacherSource/index.vue

@@ -26,7 +26,7 @@
                 </div>
                 <div class="choose">
                     <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
-                        :style="{ margin: !CourseTypeJson[item.id].length && 0 }">
+                        :style="{ margin: !CourseTypeJson[item.id].length && 0 }" v-if="(item.name != '类型') || typea != '' || typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1">
                         <span v-if="CourseTypeJson[item.id].length">{{ item.name }}:</span>
                         <div class="typeCss" v-if="CourseTypeJson[item.id].length">
                             <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
@@ -50,12 +50,16 @@
         <div class="pb_content_body">
             <div class="student_table" v-loading="loading">
                 <div class="source-box" v-for="(item, index) in res" :key="index">
-                    <div class="iamge"><img src="../../../assets/icon/source/image.png" alt=""></div>
-                    <div class="title"><span>{{ item.name }}</span></div>
+                    <!-- <div class="iamge"><img src="../../../assets/icon/source/image.png" alt=""></div>
+                    <div class="title"><span>{{ item.name }}</span></div> -->
+                    <div class="fengmian">
+                        <img src="../../../assets/icon/source/fengmian.jpg" alt="">
+                        <div class="ftitle"><span>{{ item.name }}</span></div>
+                    </div>
                     <div class="detail">{{ item.detail }}</div>
                     <div class="label"><span v-for="(k, ki) in item.label.split(',')" :key="index + '-' + ki">{{ k ? k : "无" }}</span>
                     </div>
-                    <div class="button"><span @click="check(item.url)">查看</span></div>
+                    <div class="button"><span @click="check(item.url)">查看</span><span @click="updateSource(item)" v-show="false">修改</span></div>
                 </div>
                 <div v-if="!res.length" style="text-align: center; width: 100%;">暂无数据</div>
             </div>
@@ -110,7 +114,8 @@
             </div>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="dialogVisible = false">取 消</el-button>
-                <el-button type="primary" @click="add()">确定</el-button>
+                <el-button type="primary" @click="add()" v-if="updateType == 1">确定</el-button>
+                <el-button type="primary" @click="update()" v-if="updateType == 2">确定</el-button>
             </span>
         </el-dialog>
     </div>
@@ -145,6 +150,8 @@ export default {
             s_url: "",
             s_detail: "",
             s_label: [],
+            updateType:1,
+            updateId:""
         };
     },
     mounted() {
@@ -249,6 +256,10 @@ export default {
                     }
                 }
             }
+            if(this.typea == "" && this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') == -1){
+                this.typeb = "";
+                this.typeE = []
+            }
             this.getSource();
         },
         getSource() {
@@ -281,6 +292,17 @@ export default {
             this.s_url = ""
             this.s_detail = ""
             this.s_label = []
+            this.updateType = 1
+            this.dialogVisible = true
+        },
+        updateSource(item) {
+            this.courseTypeId2 = item.typeid ? item.typeid.split(",") : []
+            this.s_title = item.name
+            this.s_url = item.url
+            this.s_detail = item.detail
+            this.s_label = item.label.split(",")
+            this.updateType = 2
+            this.updateId = item.id
             this.dialogVisible = true
         },
         add() {
@@ -318,6 +340,43 @@ export default {
                     this.$message.error("网络不佳");
                     console.error(err);
                 });
+        },
+        update() {
+            if (this.s_title == '') {
+                this.$message.error('请填写工具名称')
+                return
+            }
+            if (this.s_url == '') {
+                this.$message.error('请填写网址来源')
+                return
+            }
+            if (this.s_detail == '') {
+                this.$message.error('请填写工具描述')
+                return
+            }
+            let params = [{
+                id:this.updateId,
+                name: this.s_title,
+                url: this.s_url,
+                detail: this.s_detail,
+                label: this.s_label.join(","),
+                userid: this.userid,
+                courseType: JSON.stringify(this.courseTypeId2)
+            }]
+            this.ajax
+                .post(this.$store.state.api + "updateSource", params)
+                .then((res) => {
+                    this.$message({
+                        message: "修改成功",
+                        type: "success",
+                    });
+                    this.dialogVisible = false
+                    this.getSource();
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
         }
     },
     created() {
@@ -604,13 +663,15 @@ export default {
     background: #fff;
     overflow: hidden;
     margin: 0 20px 20px 0;
+    display: flex;
+    flex-direction: column;
 }
 .source-box:nth-child(4n){
     margin-right: 0;
 }
 .source-box .iamge {
-    width: 208px;
-    height: 180px;
+    width: 150px;
+    height: 125px;
     margin: 0 auto;
 }
 
@@ -618,7 +679,28 @@ export default {
     width: 100%;
     height: 100%;
 }
+.fengmian{
+    width: 100%;
+    position: relative;
+}
+.fengmian>img{
+    width: 100%;
+}
 
+.fengmian>.ftitle{
+    position: absolute;
+    bottom: 10%;
+    color: rgb(88, 121, 198);
+    width: 90%;
+    text-align: center;
+    font-weight: 700;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 24px;
+    left: 50%;
+    transform: translateX(-50%);
+}
 .source-box .title {
     width: 90%;
     font-size: 18px;
@@ -644,6 +726,7 @@ export default {
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     height: 42px;
+    font-size: 15px;
 }
 
 .source-box .label {
@@ -667,6 +750,7 @@ export default {
     display: flex;
     height: 40px;
     background: rgb(244, 244, 244);
+    margin-top: auto;
 }
 
 .source-box .button>span {

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است