Kaynağa Gözat

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

SanHQin 10 ay önce
ebeveyn
işleme
724bc3ef7e

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</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() {
+    }</style><link href=./static/css/app.119c96b6d01b62db7c4317fbba136c4b.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.91d7e564f7808b4b469a.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.119c96b6d01b62db7c4317fbba136c4b.css


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.119c96b6d01b62db7c4317fbba136c4b.css.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/css/app.1b9bb3c9e1dff48c5caf32b39fb72acb.css.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.91d7e564f7808b4b469a.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/app.91d7e564f7808b4b469a.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 11 - 2
src/components/pages/aiAddCourse/addCourse.vue

@@ -3649,6 +3649,7 @@
                     }">
                       {{ steps == 3 ? "确认上传" : "下一步" }}
                     </button>
+                    <button class="c_pub_button_confirm" v-if="steps < 4" @click="openSaveTips">保存模板</button>
                   </div>
                 </div>
               </div>
@@ -5056,6 +5057,7 @@
       :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
     <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
     </aiDialog>
+    <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"></tipsDialog>
   </div>
 </template>
 
@@ -5079,6 +5081,7 @@ import EnglishVoice from "../EnglishVoice/index.vue";
 import aiBox from './aiBox.vue'
 import aiDialog from './aiDialog'
 import aiTips from './aiTips.vue'
+import tipsDialog from './tipsDialog.vue'
 import { v4 as uuidv4 } from "uuid";
 
 export default {
@@ -5096,7 +5099,8 @@ export default {
     EnglishVoice,
     aiBox,
     aiDialog,
-    aiTips
+    aiTips,
+    tipsDialog
   },
   data() {
     return {
@@ -5420,7 +5424,9 @@ export default {
       aiIndex: "",
       clickType: 1,
       promptShow: true,
-      templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : ""
+      templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
+      dialogVisibleTips: false,
+      tipsJson: {}
     };
   },
   directives: {
@@ -6340,6 +6346,9 @@ export default {
           console.error(err);
         });
     },
+    openSaveTips(){
+      this.dialogVisibleTips = true
+    },
     time() {
       if (!this.now) {
         this.now = new Date().getTime();

+ 410 - 0
src/components/pages/aiAddCourse/templateDialog.vue

@@ -0,0 +1,410 @@
+<template>
+    <el-dialog :center="true" :visible.sync="dialogVisible" width="1200px" class="addTemplateDialog">
+			<!-- <div v-if="showDialog == true" class="a-dialog" v-el-drag-dialog> -->
+			<div class="a-d-top">
+				<div class="a-d-topTit"><div style="width: 136px">模板库</div></div>
+				<div>
+					<el-input
+						placeholder="请输入内容"
+						prefix-icon="el-icon-search"
+						v-model="input2"
+						clearable
+					>
+					</el-input>
+				</div>
+				<div class="a-d-t-right">
+					<span @click.stop="dialogVisible = false">×</span>
+				</div>
+			</div>
+			<div style="display: flex; height: 100%">
+				<div class="a-d-t-left">
+					<div class="itemTit">我的模块</div>
+					<div
+						:style="
+							tagIndex == index
+								? 'background: rgba(226, 238, 255, 1);color: rgba(54, 129, 252, 1)'
+								: ''
+						"
+						class="a-d-t-l-item"
+						v-for="(item, index) in dialogTagList"
+						:key="item.id"
+						@click.stop="tagIndex = index"
+					>
+						{{ item.name }}
+					</div>
+				</div>
+				<div class="a-d-box">
+					
+					<div
+						style="
+							font-family: PingFang SC;
+							font-size: 16px;
+							font-weight: 600;
+							line-height: 22px;
+							text-align: left;
+							margin: 20px 0;
+							margin-bottom: 10px;
+						"
+					>
+						推荐
+					</div>
+					<div class="a-d-b-subject">
+						<span :class="['a_d_b_s_btn',tagSubject==item?'a_d_b_s_ActiveBtn':'']" v-for="(item,index) in tagSubjectList" :key="index+'-'+tagIndex" @click.stop="tagSubject=item">{{ item }}</span>
+						<!-- <el-button :type="tagSubject==item?'primary':'default'" v-for="(item,index) in tagSubjectList" :key="index+'-'+tagIndex" @click.stop="tagSubject=item">{{ item }}</el-button> -->
+					</div>
+					<div style="display: flex; flex-wrap: wrap">
+						<div
+							class="a-d-b-item"
+							v-for="(item, index) in searchDataList"
+							:key="index"
+						>
+							<div class="a-d-b-i-top">
+								<img
+									style="height: 22px; width: 22px"
+									:src="
+										require('../../../../assets/icon/classroomObservation/digImg.svg')
+									"
+								/>
+								<div class="a-d-b-i-t-title">{{ item.title }}</div>
+							</div>
+							<div class="a-d-b-i-bottom">{{ item.brief }}</div>
+							<div class="a-d-b-i-bottomPer" style="display: block">
+								{{item.sum}}人已使用
+							</div>
+							<div class="a-d-b-i-bottomBtn" style="display: none">
+								<div
+									style="
+										display: flex;
+										width: 100%;
+										justify-content: space-around;
+									"
+								>
+									<!-- <div class="a-d-b-i-t-btn">详情</div> -->
+									<div
+										class="a-d-b-i-t-btn1"
+										@click="addAnalysisItem(item.title)"
+									>
+										添加
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			<!-- </div> -->
+		</el-dialog>
+</template>
+  
+<script>
+
+export default {
+    props: {
+        dialogVisibleAiD: {
+            type: Boolean,
+            default: false
+        },
+    },
+    data() {
+        return {
+            dialogTagList: [
+				{ id: 0, name: "社区模板" },
+				{ id: 1, name: "我的模板" },
+			],
+        }
+    },
+    watch:{
+        dialogVisibleAiD(newValue, oldValue) {
+            if(newValue){
+            
+            }
+        },
+    },
+    methods: {
+        handleClose(done) {
+            this.close()
+            done();
+        },
+        close() {
+            this.$emit('update:dialogVisibleAiD', false)
+        },
+        confirm(){
+            this.$emit('update:dialogVisibleAiD', false)
+        }
+    },
+}
+</script>
+  
+<style scoped>
+.addTemplateDialog >>> .el-dialog {
+	min-width: 1200px;
+
+	height: 700px;
+	box-shadow: 0px 0 8px 0px #555555;
+	border-radius: 8px;
+	background-color: #fff;
+	/* top: 0px; */
+	/* margin: 0 auto; */
+	overflow: hidden;
+}
+.addTemplateDialog >>> .el-dialog__body {
+	height: 100%;
+	min-width: 1200px;
+	flex-shrink: 0;
+	box-sizing: border-box;
+	padding-bottom: 50px;
+	padding-top: 10px;
+}
+.addTemplateDialog >>> .el-dialog__header {
+	display: none;
+}
+
+
+.a-d-top {
+	/* background: #adadad; */
+	display: flex;
+	flex-direction: row;
+	flex-wrap: nowrap;
+	align-items: center;
+	justify-content: space-between;
+	height: 54px;
+	border-radius: 8px 8px 0 0;
+	user-select: none;
+	border-bottom: 1px #ccc solid;
+}
+.a-d-top >>> .el-input__inner {
+	width: 320px;
+	height: 32px;
+}
+.a-d-top >>> .el-input__icon {
+	line-height: 32px;
+}
+.a-d-topTit {
+	width: 171px;
+	height: 32px;
+	display: flex;
+	align-items: center;
+	font-family: PingFang SC;
+	box-sizing: border-box;
+	padding: 5px;
+	line-height: 22px;
+	justify-content: center;
+	/* text-align: left; */
+}
+.a-d-t-left {
+	width: 200px;
+	height: 100%;
+	display: flex;
+	align-items: center;
+	flex-direction: column;
+	justify-content: flex-start;
+	box-sizing: border-box;
+	padding-left: 5px;
+}
+
+.a-d-t-l-item {
+	/* width: auto;
+	height: 90%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	padding: 0 10px;
+	border-radius: 10px;
+	background-color: #d4d9da;
+	margin-right: 3px;
+	cursor: pointer; */
+	cursor: pointer;
+	width: 136px;
+	height: 32px;
+	display: flex;
+	align-items: center;
+	border-radius: 5px;
+	font-family: PingFang SC;
+	box-sizing: border-box;
+	padding: 5px;
+	font-size: 14px;
+	font-weight: 600;
+	line-height: 22px;
+	text-align: left;
+	margin-bottom: 20px;
+}
+
+.a-d-t-l-item:hover {
+	background-color: white;
+}
+
+.a-d-t-right {
+	width: 40px;
+	height: 40px;
+	margin-right: 10px;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	color: black !important;
+}
+
+.a-d-t-right > span {
+	width: 25px;
+	height: 25px;
+	border-radius: 25px;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	/* align-items: center; */
+	font-size: 22px;
+	color: #fff;
+	/* background-color: #adadad; */
+	cursor: pointer;
+	/* background-color: #e6e6e6; */
+	color: #adadad;
+}
+
+.a-d-box {
+	width: 100%;
+	height: 100%;
+	background-color: #f0f2f5;
+	overflow: scroll;
+	overflow-x: hidden;
+	box-sizing: border-box;
+	padding: 15px;
+	padding-bottom: 50px;
+}
+
+.a-d-b-item {
+	width: 22%;
+	height: 200px;
+	display: flex;
+	flex-direction: column;
+	background-color: #fff;
+	border-radius: 10px;
+	padding: 15px;
+	float: left;
+	box-sizing: border-box;
+	margin-bottom: 10px;
+	margin-right: 20px;
+	/* position: relative; */
+}
+.a-d-b-item:hover .a-d-b-i-bottomBtn {
+	display: block !important;
+}
+.a-d-b-item:hover .a-d-b-i-bottomPer {
+	display: none !important;
+}
+.a-d-b-i-top {
+	width: 100%;
+	/* height: 50%; */
+	height: 20px;
+	margin-bottom: 15px;
+	display: flex;
+	align-items: center;
+	/* justify-content: space-between; */
+}
+.a-d-b-i-top > img {
+	width: 35px;
+	height: 35px;
+}
+/* .a-d-b-i-top>div{ */
+/* width: auto;
+	height: 35px;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	margin-left: 10px; */
+/* } */
+
+.a-d-b-i-t-title {
+	width: 100%;
+	height: 35px;
+	display: block;
+	align-items: center;
+	box-sizing: border-box;
+	padding: 0 10px;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	word-break: break-all;
+	white-space: nowrap;
+	line-height: 35px;
+	/* display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 1;
+	overflow: hidden; */
+}
+
+.a-d-b-i-bottom {
+	width: 100%;
+	flex: 1;
+	overflow: hidden;
+	/* max-height: 186px; */
+	font-size: 14px;
+	-webkit-line-clamp: 5;
+	line-height: 20px;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
+
+.a-d-b-i-t-btn {
+	font-size: 14px;
+	box-sizing: border-box;
+	padding: 8px 25px;
+	border: 1px solid rgba(54, 129, 252, 1);
+	border-radius: 5px;
+	color: rgba(54, 129, 252, 1);
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	cursor: pointer;
+}
+.a-d-b-i-t-btn1 {
+	font-size: 14px;
+	width: 98%;
+	box-sizing: border-box;
+	padding: 8px 25px;
+	border: 1px solid rgba(54, 129, 252, 1);
+	border-radius: 5px;
+	background-color: rgba(54, 129, 252, 1);
+	display: flex;
+	color: #fff;
+	justify-content: center;
+	align-items: center;
+	cursor: pointer;
+}
+
+.itemTit {
+	width: 136px;
+	height: 32px;
+	padding: 5px 8px 5px 8px;
+	gap: 8px;
+	opacity: 0px;
+	margin: 20px 0;
+	margin-bottom: 10px;
+	border-bottom: 1px #ccc solid;
+}
+
+.a-d-b-subject{
+	margin: 20px 0 20px 0;
+}
+
+.a_d_b_s_btn{
+	/* box-sizing: border-box; */
+	padding: 5px 10px;
+	border-radius: 4px;
+	border: solid 1px #3681FC;
+	color: #3681FC;
+	background-color: white;
+	margin-right: 10px;
+	cursor: pointer;
+	transition: .3s;
+}
+
+.a_d_b_s_ActiveBtn{
+	background-color: #3681FC;
+	color: white;
+}
+
+.a-d-b-i-t-btn:hover {
+	background-color: rgba(54, 129, 252, 1);
+	color: #fff;
+}
+</style>

+ 218 - 0
src/components/pages/aiAddCourse/tipsDialog.vue

@@ -0,0 +1,218 @@
+<template>
+    <el-dialog title="保存提示词模板" :visible.sync="dialogVisibleTips" :append-to-body="true" width="650px"
+        :before-close="handleClose" class="dialog_diy">
+        <div style="height: 100%;padding:15px">
+            <div class="t_box">
+                <span>模板名称:</span>
+                <input type="text" class="binfo_input" v-model="title">
+            </div>
+            <div class="t_box">
+                <span>模板描述:</span>
+                <textarea rows="3" class="binfo_input binfo_textarea" cols placeholder="请输入内容"
+                    v-model="detail"></textarea>
+            </div>
+            <div class="t_box">
+                <span>权限:</span>
+                <el-radio-group v-model="radio">
+                    <el-radio :label="0">个人</el-radio>
+                    <el-radio :label="1">组织内</el-radio>
+                    <el-radio :label="2">所有人</el-radio>
+                </el-radio-group>
+            </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="selectT" type="primary">确 定</el-button>
+            <el-button @click="close">关 闭</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+
+export default {
+    props: {
+        dialogVisibleTips: {
+            type: Boolean,
+            default: false
+        },
+        tipsJson: {
+            type: Object,
+            default: () => { }
+        },
+        aiJson: {
+            type: Object,
+            default: () => { }
+        },
+        userid: {
+            type: String,
+            default: ''
+        },
+    },
+    data() {
+        return {
+            title: "",
+            detail: "",
+            radio: 0
+        }
+    },
+    watch: {
+        dialogVisibleTips(newValue, oldValue) {
+            if (newValue) {
+
+            }
+        },
+    },
+    methods: {
+        handleClose(done) {
+            this.close()
+            done();
+        },
+        close() {
+            this.$emit('update:dialogVisibleTips', false)
+        },
+        selectT() {
+            if (!this.title) {
+                this.$message.error('请输入模板名称');
+                return
+            }
+            let params = {
+                userid: this.userid,
+                name: this.title
+            }
+            this.ajax
+                .get(this.$store.state.api + "selectTipsTemplateB", params)
+                .then((res) => {
+                    if (res.data[0].length) {
+                        this.$confirm(
+                            "发现已有此模板,是否以现在的内容覆盖此模板?",
+                            "提示",
+                            {
+                                confirmButtonText: "确定",
+                                cancelButtonText: "取消",
+                                type: "warning",
+                            }
+                        )
+                            .then(() => {
+                                this.addTipsTemplate();
+                            })
+                            .catch(() => {
+                                return;
+                            });
+                    } else {
+                        this.addTipsTemplate();
+                    }
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        },
+        addTipsTemplate() {
+            let params = [{
+                n: this.title,
+                d: this.detail,
+                json: JSON.stringify(this.aiJson),
+                o: this.radio,
+                uid: this.userid
+            }]
+            this.ajax
+                .post(this.$store.state.api + "addTipsTemplate", params)
+                .then((res) => {
+                    this.$message.success("保存成功");
+                    this.close();
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        }
+    },
+}
+</script>
+
+<style scoped>
+.dialog_diy>>>.el-dialog {
+    height: auto;
+    margin: 15vh auto 0 !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #454545 !important;
+    padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    height: calc(100% - 124px);
+    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: #fafafa;
+}
+
+
+
+.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;
+}
+
+
+.t_box {
+    display: flex;
+    margin-bottom: 15px;
+}
+
+.t_box>span:nth-child(1) {
+    min-width: 80px;
+    font-size: 16px;
+    color: #000;
+}
+</style>

+ 5 - 0
src/components/pages/student/addCourse.vue

@@ -8861,6 +8861,11 @@ export default {
 
     },
   },
+  mounted(){
+    this.$nextTick(()=>{
+      this.scrollChange()
+    })
+  },
   beforeDestroy() {
     clearTimeout(this.timer);
     this.timer = null;

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor