SanHQin hace 1 semana
padre
commit
4f888aa1c6

+ 3 - 0
src/components/pages/noticeCenter/dialog/noticeDetailDialog.vue

@@ -221,6 +221,7 @@ export default {
 .b_m_t_title{
   font-size: 3em;
   margin-bottom: 30px;
+  color: #000;
 }
 
 .b_m_top>div{
@@ -243,5 +244,7 @@ export default {
   font-size: 18px;
   padding: 10px;
   box-sizing: border-box;
+  white-space:pre-line;
+  color: #000;
 }
 </style>

+ 24 - 17
src/components/pages/test/check/index.vue

@@ -1588,7 +1588,7 @@
                     @click="returnTest(scope.row)"
                     type="primary"
                     size="small"
-                   v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'"
+
                     >退回</el-button
                   >
                   <!-- v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'" -->
@@ -2051,6 +2051,7 @@
       @changeCover="changeCover"
     />
     <checkFileListDialog ref="checkFileListDialogRef" @checkFile="checkFile" @downloadFile="downloadFile"/>
+    <returnTestDialog ref="returnTestDialogRef" :title="testJson.title" @success="getData"/>
   </div>
 </template>
 
@@ -2082,6 +2083,9 @@ import docxTemplateDialog from "./docxTemplateDialog";
 //查看文件
 import checkFileListDialog from "./checkFileListDialog.vue";
 
+//退回弹窗
+import returnTestDialog from "./returnTestDialog.vue";
+
 const getFile = (url) => {
   return new Promise((resolve, reject) => {
     var credentials = {
@@ -2138,7 +2142,8 @@ export default {
     wordcloud,
     aiBoxRight,
     docxTemplateDialog,
-    checkFileListDialog
+    checkFileListDialog,
+    returnTestDialog
   },
   data() {
     return {
@@ -2920,7 +2925,7 @@ ${JSON.stringify(forAllList)}
       // jiu评分
       scoArr = this.scoListCopy.filter(item => !ids1.includes(item.id));
       console.log('scoArr',JSON.parse(JSON.stringify('scoArr')));
-      
+
 
       scoArr = [...this.scoList,...scoArr]
 
@@ -3437,6 +3442,7 @@ ${JSON.stringify(forAllList)}
                 name: this.works[i].username ? this.works[i].username : "匿名",
                 time: this.works[i].time,
                 array: _json2,
+                testName:this.works[i].testName,
                 isReview:this.works[i].isReview,
                 cut: 0,
                 uteaName: this.works[i].uteaName,
@@ -4929,20 +4935,21 @@ ${JSON.stringify(item.array)}
     returnTest(row){
       if(row.type=='1')return this.$message.info("该表单未提交")
       if(row.type=='4')return this.$message.info("该表单已退回")
-      let params = [{
-        id:row.id,
-        type:"4"
-      }];
-
-      this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
-        if(res.data==1){
-          this.getData();
-          // this.tableWorksArray = this.tableWorksArray.filter(i=>i.id!==row.id);
-          this.$message.success("表单退回成功");
-        }
-      }).catch(e=>{
-        console.log(e);
-      })
+      this.$refs.returnTestDialogRef.open(row)
+      // let params = [{
+      //   id:row.id,
+      //   type:"4"
+      // }];
+
+      // this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
+      //   if(res.data==1){
+      //     this.getData();
+      //     // this.tableWorksArray = this.tableWorksArray.filter(i=>i.id!==row.id);
+      //     this.$message.success("表单退回成功");
+      //   }
+      // }).catch(e=>{
+      //   console.log(e);
+      // })
 
     },
   },

+ 315 - 0
src/components/pages/test/check/returnTestDialog.vue

@@ -0,0 +1,315 @@
+<template>
+	<div>
+		<el-dialog
+			:center="true"
+			:visible.sync="show"
+			:close-on-click-modal="true"
+			:modal="true"
+			width="auto"
+			height="auto"
+      top="10vh"
+			:append-to-body="true"
+			class="dialog"
+		>
+			<div class="box">
+				<div class="b_head">
+					<span>退回表单</span>
+					<svg
+						@click="close()"
+						t="1748587270371"
+						class="icon"
+						viewBox="0 0 1024 1024"
+						version="1.1"
+						xmlns="http://www.w3.org/2000/svg"
+						p-id="5023"
+						width="200"
+						height="200"
+					>
+						<path
+							d="M0 0h1024v1024H0z"
+							fill="#FF0033"
+							fill-opacity="0"
+							p-id="5024"
+						></path>
+						<path
+							d="M240.448 168l2.346667 2.154667 289.92 289.941333 279.253333-279.253333a42.666667 42.666667 0 0 1 62.506667 58.026666l-2.133334 2.346667-279.296 279.210667 279.274667 279.253333a42.666667 42.666667 0 0 1-58.005333 62.528l-2.346667-2.176-279.253333-279.253333-289.92 289.962666a42.666667 42.666667 0 0 1-62.506667-58.005333l2.154667-2.346667 289.941333-289.962666-289.92-289.92a42.666667 42.666667 0 0 1 57.984-62.506667z"
+							fill="#fff"
+							p-id="5025"
+						></path>
+					</svg>
+				</div>
+				<div class="b_main" v-loading="loading" v-if="data">
+          <div>您将退回内容,并发送以下内容给提交人:</div>
+
+          <div>您提交的“<span>{{ title }}-{{ data.testName?data.testName:'提交记录' }}</span>”的内容已被管理员退回。点击表单链接进行修改后提交。</div>
+          <textarea placeholder="请输入" v-model="textValue"></textarea>
+				</div>
+				<div class="b_bottom">
+          <div @click="close()">取消</div>
+          <div class="b_b_submit" @click="submit()">确定</div>
+				</div>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+export default {
+  props:{
+    title:{
+      type:String,
+      default:""
+    }
+  },
+	data() {
+		return {
+			loading: false,
+			show: false,
+			data: null,
+      textValue:"",
+      userid:this.$route.query.userid
+		};
+	},
+	methods: {
+		open(data) {
+			this.data = JSON.parse(JSON.stringify(data));
+			this.loading = false;
+			this.show = true;
+		},
+		close() {
+			this.show = false;
+			this.init();
+		},
+		init() {
+			this.data = null;
+      this.textValue = "",
+			this.loading = false;
+		},
+    async submit(){
+      if(!this.textValue.trim()){
+        this.$message({
+          message: '请输入退回理由',
+          type: 'warning'
+        })
+        return
+      }
+
+    // 判断 window.location.href 是否包含 'beta'
+    this.loading = true;
+    let _url =""
+    let _betaUrl = "https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/"
+    let _mainUrl = "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/"
+    let _userInfo = await this.getUserInfo(this.data.userid)
+
+    if( window.location.href.indexOf('beta') !== -1){
+      _url = `${_betaUrl}doTest?cid=${this.data.courseid}&tid=${this.data.id}&userid=${this.data.userid}&oid=${_userInfo.organizeid}&org=${_userInfo.org}&type=3&role=${_userInfo.role}`
+    }else{
+      _url = `${_mainUrl}doTest?cid=${this.data.courseid}&tid=${this.data.id}&userid=${this.data.userid}&oid=${_userInfo.organizeid}&org=${_userInfo.org}&type=3&role=${_userInfo.role}`
+    }
+
+    let content = `您提交的“<a href="${_url}" target="_blank">${ this.title }-${ this.data.testName?this.data.testName:'提交记录' }</a>”的内容已被管理员退回。点击表单链接进行修改后提交。\n\n退回理由如下:\n\n${this.textValue}`
+
+    let params = [{
+      uid:this.userid,
+      title:`${this.title}表单已被退回`,
+      status:0,
+      type:"教研通知",
+      content:JSON.stringify({text:content}),
+      redUid:this.data.userid,
+      soc:"教师发展-年度考核"
+    }]
+
+
+    let _result  = await this.returnTestFn();
+    if(_result===0)return this.$message.error("退回失败")
+
+    this.ajax.post(this.$store.state.api+"insert_noticeCenter",params).then(res=>{
+      if(res.data==1){
+        this.$message({
+          message: '退回并发送通知成功',
+          type: 'success'
+        })
+        this.$emit("success")
+        this.close()
+      }else{
+        this.$message.error("发送通知失败")
+      }
+      this.loading=  false;
+
+    }).catch(err=>{
+      console.log(err)
+      this.$message.error("发送通知失败")
+      this.loading =false
+    })
+
+    },
+    getUserInfo(uid) {
+      let params = {
+        uid: uid,
+      };
+      return new Promise((resolve)=>{
+        this.ajax
+        .get(this.$store.state.api + "selectTestUser", params)
+        .then((res) => {
+          resolve(res.data[0][0])
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+      })
+    },
+    returnTestFn(){
+      let params = [{
+        id:this.data.id,
+        type:"4"
+      }];
+
+      return new Promise((resolve)=>{
+        this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
+          if(res.data==1){
+            resolve(1)
+          }else{
+            resolve(0)
+          }
+        }).catch(e=>{
+          console.log(e);
+          resolve(0)
+        })
+      })
+    }
+	},
+  mounted(){
+
+  },
+};
+</script>
+
+<style scoped>
+.dialog >>> .el-dialog {
+	width: 700px !important;
+	border-radius: 8px;
+	padding: 0;
+	background-color: #fff;
+	overflow: hidden;
+}
+
+.dialog >>> .el-dialog__body {
+	width: 700px !important;
+  height: 80vh;
+	height: auto;
+	flex-shrink: 0;
+	padding: 0;
+	box-sizing: border-box;
+	overflow: auto;
+}
+
+.dialog >>> .el-dialog__header {
+	display: none !important;
+}
+
+.box {
+	width: 700px;
+	height: 380px;
+	background: #fff;
+	border-radius: 15px;
+	box-shadow: 0px 6px 30px 5px rgba(0, 0, 0, 0.05),
+		0px 16px 24px 2px rgba(0, 0, 0, 0.04), 0px 8px 10px -5px rgba(0, 0, 0, 0.08);
+
+}
+
+.b_head {
+	width: 100%;
+	height: 50px;
+	/* border-radius: 15px 15px 0 0; */
+	background: #1A1A1A;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	box-sizing: border-box;
+	padding: 0 20px;
+  color: #fff;
+}
+
+.b_head > span {
+	font-size: 18px;
+	font-weight: bold;
+	color: #fff;
+}
+
+.b_head > img {
+	width: 20px;
+	height: 20px;
+	cursor: pointer;
+}
+
+.b_head > svg {
+	width: 20px;
+	height: 20px;
+	cursor: pointer;
+}
+
+.b_main {
+	width: 100%;
+	height: 250px;
+	background: #fff;
+	padding: 20px 20px 20px 20px;
+	box-sizing: border-box;
+  overflow: auto;
+  font-size:16px;
+}
+
+.b_bottom {
+	width: 100%;
+	height: 70px;
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	box-sizing: border-box;
+	padding: 0 20px;
+}
+
+.b_bottom>div{
+  padding: 10px 25px;
+  background: #fff;
+  color: #000;
+  border-radius: 4px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border: solid 1px #EEEEEE;
+  margin-left: 15px;
+  cursor: pointer;
+  font-size: 16px;
+}
+
+.b_bottom>.b_b_submit{
+  background: #1A1A1A;
+  color: #D4D4D4;
+  border-color: #1A1A1A;
+}
+
+.b_main>div{
+  margin-top:20px;
+  font-size:16px;
+}
+.b_main>div>span{
+  color:#124BF6;
+  text-decoration:underline;
+}
+
+.b_main>textarea{
+  width: 100%;
+  height: 100px;
+  border-radius: 4px;
+  border: solid 1px #D4D4D4;
+  padding: 10px;
+  box-sizing: border-box;
+  margin-top: 20px;
+  resize: none;
+  transition: border-color 0.2s;
+}
+.b_main>textarea:focus {
+  border-color: #7AB8FF; /* 浅蓝色 */
+  outline: none;
+}
+</style>

+ 6 - 4
src/components/pages/test/examine/conpoments/personPage.vue

@@ -123,6 +123,7 @@
           <div class="teaLis">
             <div
               class="teal"
+              v-if="digType==2"
               @click="cutPage(2)"
               :class="[digType == 2 ? 'Tbor' : '']"
             >
@@ -131,6 +132,7 @@
             <div
               class="teal"
               @click="cutPage(1)"
+               v-if="digType == 1"
               :class="[digType == 1 ? 'Tbor' : '']"
             >
               班主任考核
@@ -548,7 +550,7 @@ export default {
      var XLSX = require("xlsx");
      let data = [
       ...headers,
-      ...this.PageBaseData.flatMap(parent => 
+      ...this.PageBaseData.flatMap(parent =>
         parent.children.map(child => [
           parent.name, // 一级指标
           child.name,  // 二级指标
@@ -564,7 +566,7 @@ export default {
     const wb = XLSX.utils.book_new(); //创建一个新的工作簿对象
     // 创建一个Worksheet对象
     let ws = XLSX.utils.aoa_to_sheet(data);
-    
+
 
 
 
@@ -876,11 +878,11 @@ ws['!rows'] = [
     remindExamine() {
       this.remDig = true;
     },
-  
+
     // 下载excel
     getExcel() {
       var res = this.tableData;
-      
+
       // console.log('导出数据',res);
       //如果value的json字段的key值和想要的headers值不一致时,可做如下更改
       //将和下面的Object.fromEntries结合,将json字段的key值改变为要求的excel的header值