lsc 1 vuosi sitten
vanhempi
commit
be83c08d77

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.6b01350b7efcfa400f42b3b13c780086.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.3cd0a0187ca1f70ded67.js></script><script type=text/javascript src=./static/js/app.8fdfe66eeef4852200cc.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.1b9bb3c9e1dff48c5caf32b39fb72acb.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.3cd0a0187ca1f70ded67.js></script><script type=text/javascript src=./static/js/app.1808beab617ca422cf29.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.1b9bb3c9e1dff48c5caf32b39fb72acb.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.1b9bb3c9e1dff48c5caf32b39fb72acb.css.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.6b01350b7efcfa400f42b3b13c780086.css.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.1808beab617ca422cf29.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.1808beab617ca422cf29.js.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 3 - 0
src/assets/icon/course/edit2.svg

@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M13.282 6.00005C13.1512 5.99818 13.0248 6.04771 12.93 6.138L6.655 12.114C6.60601 12.1607 6.56701 12.2169 6.54036 12.2791C6.51372 12.3413 6.49999 12.4083 6.5 12.476V14.948C6.49997 15.0788 6.55121 15.2044 6.64272 15.2979C6.73422 15.3914 6.85872 15.4453 6.9895 15.448L9.4235 15.5C9.54834 15.5026 9.66963 15.4583 9.7635 15.376L16.3295 9.625C16.3809 9.58001 16.4225 9.52497 16.4518 9.46327C16.4811 9.40158 16.4975 9.33453 16.4999 9.26627C16.5023 9.19801 16.4906 9.12998 16.4657 9.06638C16.4408 9.00279 16.4031 8.94497 16.355 8.8965L13.63 6.148C13.5379 6.05504 13.4129 6.00192 13.282 6.00005ZM17.341 14.25L13.5935 14.177C13.5278 14.1757 13.4631 14.1873 13.4019 14.2112C13.3407 14.2351 13.2849 14.2709 13.2375 14.3164C13.1902 14.3619 13.1522 14.4163 13.1259 14.4764C13.0995 14.5366 13.0853 14.6013 13.084 14.667C13.0827 14.7327 13.0943 14.7979 13.1182 14.8591C13.1421 14.9203 13.1779 14.9761 13.2234 15.0235C13.2689 15.0708 13.3233 15.1088 13.3834 15.1351C13.4436 15.1615 13.5083 15.1757 13.574 15.177L17.3215 15.25C17.3872 15.2513 17.4524 15.2396 17.5136 15.2157C17.5747 15.1917 17.6306 15.156 17.6779 15.1104C17.7252 15.0649 17.7631 15.0105 17.7895 14.9503C17.8158 14.8902 17.83 14.8254 17.8313 14.7597C17.8325 14.6941 17.8209 14.6288 17.7969 14.5677C17.773 14.5065 17.7372 14.4507 17.6917 14.4033C17.6462 14.356 17.5918 14.3181 17.5316 14.2918C17.4714 14.2655 17.4067 14.2513 17.341 14.25ZM17.6712 16.8208C17.5767 16.7277 17.4491 16.676 17.3165 16.677L7.4965 16.75C7.36389 16.751 7.23711 16.8046 7.14404 16.8991C7.05098 16.9936 6.99926 17.1211 7.00025 17.2537C7.00124 17.3864 7.05488 17.5131 7.14935 17.6062C7.24382 17.6993 7.37139 17.751 7.504 17.75L17.324 17.677C17.4566 17.676 17.5834 17.6224 17.6765 17.5279C17.7695 17.4334 17.8212 17.3059 17.8202 17.1732C17.8193 17.0406 17.7656 16.9139 17.6712 16.8208Z" fill="black" fill-opacity="0.9"/>
+</svg>

+ 4 - 0
src/assets/icon/course/restart.svg

@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 5L10.5256 6.77564L13.5505 8.46373L13.5323 7.21629C15.8243 7.87982 17.5 9.99422 17.5 12.5C17.5 15.5376 15.0376 18 12 18C8.96243 18 6.5 15.5376 6.5 12.5C6.5 10.8574 7.21947 9.3834 8.36213 8.37487C8.56916 8.19214 8.58887 7.87617 8.40613 7.66913C8.2234 7.4621 7.90743 7.4424 7.7004 7.62513C6.35179 8.81543 5.5 10.5586 5.5 12.5C5.5 16.0899 8.41015 19 12 19C15.5899 19 18.5 16.0899 18.5 12.5C18.5 9.43256 16.3752 6.8614 13.5172 6.17802L13.5 5Z" fill="black" fill-opacity="0.9"/>
+<path d="M14 12.5C14 13.6046 13.1046 14.5 12 14.5C10.8954 14.5 10 13.6046 10 12.5C10 11.3954 10.8954 10.5 12 10.5C13.1046 10.5 14 11.3954 14 12.5Z" fill="black" fill-opacity="0.9"/>
+</svg>

+ 45 - 3
src/components/pages/aiAddCourse/addCourse.vue

@@ -3704,7 +3704,15 @@
         </div>
       </div>
       <div class="leftBar" v-if="promptShow">
-        <aiTips title="课程描述优化" :detail="aiJson.aiDetail" />
+        <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson"/>
+        <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson"/>
+        <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson"/>
+        <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson"/>
+        <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail" @setAiJson="setAiJson"/>
+        <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson"/>
+        <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson"/>
+        <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson"/>
+        <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson"/>
       </div>
     </div>
     <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
@@ -5411,7 +5419,8 @@ export default {
       aiCallBack: "",
       aiIndex: "",
       clickType: 1,
-      promptShow: false
+      promptShow: true,
+      templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : ""
     };
   },
   directives: {
@@ -5615,6 +5624,7 @@ export default {
             //   type: "success",
             // });
             // this.courseId = this.cid;
+            this.addtips()
           })
           .catch((err) => {
             this.$message.error("网络不佳");
@@ -6313,6 +6323,23 @@ export default {
           console.error(err);
         });
     },
+    addtips(){
+      let params = [
+        {
+          cid: this.cid,
+          tips: JSON.stringify(this.aiJson),
+          tid: this.templateid
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "addTips", params)
+        .then((res) => {
+        })
+        .catch((err) => {
+          this.$message.error("网络不佳");
+          console.error(err);
+        });
+    },
     time() {
       if (!this.now) {
         this.now = new Date().getTime();
@@ -8184,6 +8211,7 @@ export default {
           this.courseUserid = this.userid;
           this.islogin = true;
           this.updateCourseState(4);
+          this.addtips()
         })
         .catch((err) => {
           this.$message.error("网络不佳");
@@ -8257,6 +8285,7 @@ export default {
             type: "success",
           });
           this.courseId = this.cid;
+          this.addtips();
         })
         .catch((err) => {
           this.$message.error("网络不佳");
@@ -8327,6 +8356,7 @@ export default {
           //   type: "success",
           // });
           this.courseId = this.cid;
+          this.addtips()
         })
         .catch((err) => {
           this.$message.error("网络不佳");
@@ -8427,6 +8457,7 @@ export default {
           }
           this.number = this.nbOrder;
           this.courseId = this.cid;
+          this.addtips()
         })
         .catch((err) => {
           this.$message.error("网络不佳");
@@ -10431,7 +10462,13 @@ export default {
             if (this.timer) clearTimeout(this.timer);
             this.timer = null;
             // this.timer = setInterval(() => {
-
+            if(res.data[3].length){
+              try {
+                this.aiJson = JSON.parse(res.data[3][0].tips);
+              }catch(error){
+                console.error(error)
+              }
+            }
             this.seleteCourseUpdate();
             this.setMan();
             this.selectAllType();
@@ -12272,6 +12309,10 @@ export default {
           console.error(err);
         });
     },
+    setAiJson(pan,string){
+      this.aiJson[pan] = string
+      this.$forceUpdate();
+    },
     openAiDialog(clickType, type, callback, index, tindex) {
       this.clickType = clickType
       let sub = []
@@ -12587,6 +12628,7 @@ ${_text}
           this.isOutline2 = true
         })
       }
+      this.setAiJson(this.aitype, msg)
     },
     detailYou(message) {
       this.textLoading = true

+ 169 - 11
src/components/pages/aiAddCourse/aiTips.vue

@@ -1,19 +1,35 @@
 <template>
-  <div class="at_body">
-    <div class="at_title">{{ title }}</div>
-    <div class="at_text">
-        <div class="at_text_img">
-            <div class="at_restart"></div>
-            <div class="at_edit"></div>
+    <div class="at_body">
+        <div class="at_title">
+            <span style="color: #00000066;">{{ ttitle }}</span>
+            <span style="margin: 0 5px;color: #00000066;">></span>
+            <span>{{ title }}</span>
+        </div>
+        <div class="at_text">
+            <div class="at_text_img">
+                <div class="at_restart" @click="reset"></div>
+                <div class="at_edit" @click="edit"></div>
+            </div>
+            <div class="at_text_detail">
+                <span v-if="!edtiPan">{{ detail }}</span>
+                <textarea v-else rows="5" class="binfo_input binfo_textarea" cols v-model="eDetail"
+                    placeholder="请输入提示词"></textarea>
+            </div>
+            <div class="at_btn" v-if="edtiPan">
+                <el-button type="primary" size="mini" @click="confrim">保存</el-button>
+            </div>
         </div>
-        <div class="at_text_detail">{{ detail }}</div>
     </div>
-  </div>
 </template>
 
 <script>
+
 export default {
     props: {
+        ttitle: {
+            type: String,
+            default: ''
+        },
         title: {
             type: String,
             default: ''
@@ -22,18 +38,160 @@ export default {
             type: String,
             default: ''
         },
+        pan: {
+            type: String,
+            default: ''
+        }
     },
     data() {
         return {
+            aiJson: {
+                aiDetail: "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
+                aiOutline: "请根据<课程简要描述>及#补充参考资料为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
+                aiTask: "请根据<教学任务教案>。",
+                aiDetail1: "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
+                aiDetail2: "请你在考虑到整个课程的情况下,优化该任务描述和任务名:<任务名>:<任务描述>",
+                aiDetail3: "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
+                aiDetail4: "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
+                aiTeacher: "请根据<任务大纲>为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。",
+                teacherDetail: "请根据<教案描述>重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。",
+            },
+            eDetail: "",
+            edtiPan: false
+        }
+    },
+    methods: {
+        edit() {
+            if (this.edtiPan) {
+                this.edtiPan = false
+            }
+            this.edtiPan = true;
+            this.eDetail = JSON.parse(JSON.stringify(this.detail));
+        },
+        confrim() {
+            this.$emit("setAiJson", this.pan, this.eDetail);
+            this.edtiPan = false;
+        },
+        reset() {
+            this.$confirm("确定重置此提示词么?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            })
+                .then(() => {
+                    this.edtiPan = false;
+                    this.$emit("setAiJson", this.pan, this.aiJson[this.pan]);
+                })
+                .catch(() => {
+
+                });
         }
     },
 }
 </script>
 
 <style scoped>
-    .at_body{}
+.at_body {
+    width: 100%;
+    margin-bottom: 10px;
+}
 
-    .at_title{}
+.at_title {
+    font-size: 14px;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.at_text {
+    background: #fffef6;
+    padding: 8px;
+    width: 100%;
+    box-sizing: border-box;
+    font-size: 15px;
+    line-height: 22px;
+    border-radius: 4px;
+}
+
+.at_text_img {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    margin-bottom: 5px;
+}
 
-    .at_text{}
+.at_restart {
+    background-image: url(../../../assets/icon/course/restart.svg);
+    width: 25px;
+    height: 25px;
+    background-size: 100% 100%;
+    cursor: pointer;
+}
+
+.at_edit {
+    background-image: url(../../../assets/icon/course/edit2.svg);
+    width: 25px;
+    height: 25px;
+    background-size: 100% 100%;
+    cursor: pointer;
+}
+
+.at_text_detail {}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 5px 7px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 15px;
+    resize: none;
+    font-family: "Microsoft YaHei";
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1.5px solid #cad1dc;
+}
+
+.binfo_textarea {
+    border: 1.5px solid #cad1dc;
+    font-size: 15px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: "Microsoft YaHei";
+}
+
+.binfo_input:focus-visible {
+    border: 1.5px solid #3681fc !important;
+}
+
+.at_btn {
+    margin-top: 5px;
+    text-align: right;
+}
+
+.binfo_textarea::-webkit-scrollbar {
+    /*滚动条整体样式*/
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 6px;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+.binfo_textarea::-webkit-scrollbar-track {
+    border-radius: 10px;
+    background-color: rgba(0, 0, 0, 0.1);
+}
+
+/*定义滑块 内阴影+圆角*/
+.binfo_textarea::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
+    background-color: rgba(0, 0, 0, 0.1);
+}
 </style>

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä