Browse Source

Merge branch 'beta'

SanHQin 1 tuần trước cách đây
mục cha
commit
2f4598ca1a

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.9cc43926efdaff1f8edc35615093a95d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.b7212920b6e58d14a873.js></script><script type=text/javascript src=./static/js/app.c618513265f80f998dfd.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.7f0350c7c58c94a91dc72a67e1a9d06e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.b7212920b6e58d14a873.js></script><script type=text/javascript src=./static/js/app.348ba96eadb546c2a650.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/app.7f0350c7c58c94a91dc72a67e1a9d06e.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/app.7f0350c7c58c94a91dc72a67e1a9d06e.css.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.348ba96eadb546c2a650.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.348ba96eadb546c2a650.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 201 - 0
src/components/pages/dialog/selectHtmlPageDialog.vue

@@ -0,0 +1,201 @@
+<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">
+          <el-table
+            :data="tableData"
+            style="width: 100%;"
+            border
+          >
+            <el-table-column label="文件名称" align="center" prop="fileName" />
+            <el-table-column label="操作" width="200" align="center">
+              <template slot-scope="scope">
+                <el-button type="primary" v-if="!scope.row.isSelect" size="small" @click="select(scope.row)">选择</el-button>
+                <el-button v-if="scope.row.isSelect" size="small" @click="close()">已选</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+				</div>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			loading: false,
+			show: false,
+			data: null,
+      tableData:[],
+		};
+	},
+	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.loading = false;
+		},
+    submit(){
+      this.$message.info("选择确定")
+    },
+    select(row){
+      console.log("选择",row)
+    },
+	},
+};
+</script>
+
+<style scoped>
+.dialog >>> .el-dialog {
+	width: 600px !important;
+	border-radius: 8px;
+	padding: 0;
+	background-color: #fff;
+	overflow: hidden;
+}
+
+.dialog >>> .el-dialog__body {
+	width: 600px !important;
+  height: 500px;
+	height: auto;
+	flex-shrink: 0;
+	padding: 0;
+	box-sizing: border-box;
+	overflow: auto;
+}
+
+.dialog >>> .el-dialog__header {
+	display: none !important;
+}
+
+.box {
+	width: 600px;
+	height: 500px;
+	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: calc(100% - 50px);
+	background: #fff;
+	padding: 20px 20px 20px 20px;
+	box-sizing: border-box;
+  overflow: auto;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.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;
+}
+
+</style>

+ 46 - 42
src/components/pages/easy/addCourse.vue

@@ -8237,6 +8237,7 @@
     ></EnglishVoice>
     <appDialog ref="appDialog" @success="selectAppSuccess"></appDialog>
     <CodeEditor ref="CodeEditorRef" @success="addHtmlSuccess"></CodeEditor>
+    <selectHtmlPageDialog ref="selectHtmlPageDialogRef"/>
   </div>
 </template>
 
@@ -8265,6 +8266,7 @@ let converter = OpenCC.Converter({
   to: "cn"
 });
 import JSZip from 'jszip'
+import selectHtmlPageDialog from '../dialog/selectHtmlPageDialog.vue'
 
 export default {
   mixins: [ myMixin,uploadFileMixin],
@@ -8280,7 +8282,8 @@ export default {
     interVideo,
     englishRight,
     EnglishVoice,
-    appDialog
+    appDialog,
+    selectHtmlPageDialog
   },
   data() {
     return {
@@ -14108,48 +14111,49 @@ export default {
     },
     // zip压缩文件上传
     uploadZIPFile(i){
-      this.lineCount = i;
-      // 只支持上传zip文件
-      let input = document.createElement('input');
-      input.type = 'file';
-      input.accept = '.zip';
-      input.style.display = 'none';
-      // 只允许上传一个文件
-      input.multiple = false;
-      input.onchange = async (e) => {
-        let file = e.target.files[0];
-        if (!file) return;
-        if (file.type !== 'application/zip' && !file.name.endsWith('.zip')) {
-          this.$message.error('只支持上传zip文件');
-          return;
-        }
-        // this.awsupload({file:file,path:"zip/"+file.name}).then(res=>{
-        //   console.log('uploadZIPFile', res);
-        //   // 转成正常的网址
-        //   let url = res && res.Location ? decodeURIComponent(res.Location) : "";
-        //   console.log('正常网址:', url);
-
-        // })
-        // 这里可以根据实际需求进行上传处理
-        try{
-          const zip = new JSZip();
-          const content = await zip.loadAsync(file);
-          let _fileStructure = this.buildFileStructure(file,content);
-          let _time = new Date().getTime();
-          let _resultList = await this.uploadZipFileFn(_fileStructure.files,`${_time}_${_fileStructure.folderName}`);
-          console.log("_resultList",_resultList)
-
-        }catch(e){
-          console.log(e)
-          this.$message.error("解析zip文件失败")
-        }
+      this.$refs.selectHtmlPageDialogRef.open("测试");
+      // this.lineCount = i;
+      // // 只支持上传zip文件
+      // let input = document.createElement('input');
+      // input.type = 'file';
+      // input.accept = '.zip';
+      // input.style.display = 'none';
+      // // 只允许上传一个文件
+      // input.multiple = false;
+      // input.onchange = async (e) => {
+      //   let file = e.target.files[0];
+      //   if (!file) return;
+      //   if (file.type !== 'application/zip' && !file.name.endsWith('.zip')) {
+      //     this.$message.error('只支持上传zip文件');
+      //     return;
+      //   }
+      //   // this.awsupload({file:file,path:"zip/"+file.name}).then(res=>{
+      //   //   console.log('uploadZIPFile', res);
+      //   //   // 转成正常的网址
+      //   //   let url = res && res.Location ? decodeURIComponent(res.Location) : "";
+      //   //   console.log('正常网址:', url);
+
+      //   // })
+      //   // 这里可以根据实际需求进行上传处理
+      //   try{
+      //     const zip = new JSZip();
+      //     const content = await zip.loadAsync(file);
+      //     let _fileStructure = this.buildFileStructure(file,content);
+      //     let _time = new Date().getTime();
+      //     let _resultList = await this.uploadZipFileFn(_fileStructure.files,`${_time}_${_fileStructure.folderName}`);
+      //     console.log("_resultList",_resultList)
+
+      //   }catch(e){
+      //     console.log(e)
+      //     this.$message.error("解析zip文件失败")
+      //   }
 
-      };
-      document.body.appendChild(input);
-      input.click();
-      setTimeout(() => {
-        document.body.removeChild(input);
-      }, 1000);
+      // };
+      // document.body.appendChild(input);
+      // input.click();
+      // setTimeout(() => {
+      //   document.body.removeChild(input);
+      // }, 1000);
     },
     // 构建文件结构树
     buildFileStructure(file,zip) {

+ 2 - 2
src/components/pages/test/check/check.vue

@@ -65,7 +65,7 @@
         <div class="step_box">
           <div class="edit_top">
             <div class="op_btn">
-              <el-button type="primary" size="small" @click="publish">确定批改</el-button>
+              <el-button type="primary" size="small" @click="publish" v-if="false">确定批改</el-button>
             </div>
           </div>
           <topicVue :cJson="cJson" :title="title" :brief="brief" :checktype="2" :see="see" :isTeacher="1" :name="name" ref="topicVue"></topicVue>
@@ -259,4 +259,4 @@ export default {
   margin: 0 auto;
   box-sizing: border-box;
 }
-</style>
+</style>

+ 76 - 22
src/components/pages/test/examine/conpoments/personPage.vue

@@ -189,8 +189,10 @@
               </el-tooltip>
             </div>
             <div>审核进度:{{ computedStep }}/{{ twoTarget }}</div>
-            <div>自评分数:{{ DigSelfSco }}</div>
-            <div>考核分数:{{ computedSco }}</div>
+            <div>自评分:{{ DigSelfSco }}</div>
+            <div>认定分:{{ computedSco }}</div>
+            <div v-if="formula">加权分:{{formulaScore}}</div>
+
           </div>
         </div>
         <div style="height:100%;overflow: auto;padding-bottom: 80px;">
@@ -460,7 +462,8 @@ export default {
       PageBaseDataTwo: [],
       remDig: false,
       timeSortList:[],
-      typeStatusList:["待办","已完成",'/']
+      typeStatusList:["待办","已完成",'/'],
+      formula:""
     };
   },
   watch: {
@@ -538,6 +541,45 @@ export default {
         return score;
       }
     },
+
+    formulaScore(){
+      let _result = "0.00"
+
+      if(this.formula && this.PageBaseData){
+        let scoreObj = {}
+        this.PageBaseData.forEach(i=>{
+          if(!scoreObj[i.id]){
+            scoreObj[i.id] = 0;
+          }
+
+          i.children.forEach(i2=>{
+            if(i2.sco2){
+              scoreObj[i.id]+=parseFloat(i2.sco2)
+            }
+          })
+        })
+
+        let formulaText = this.formula;
+        for (const key in scoreObj) {
+            if (scoreObj.hasOwnProperty(key)) {
+              const regex = new RegExp('\\b' + key + '\\b', 'g');
+              formulaText = formulaText.replace(regex, scoreObj[key]);
+            }
+        }
+
+        if(!formulaText)return _result;
+
+        try{
+          _result = eval(formulaText).toFixed(2)
+        }catch(e){
+          console.log(e)
+        }
+
+      }
+
+
+      return _result;
+    }
   },
   mounted() {
     this.getData();
@@ -546,9 +588,9 @@ export default {
   methods: {
   exportExlec(){
     let headers = [
-      ['一级指标', '二级指标', '评价方法', '分值', '自评', '自评概述', '认定', '认定概述']
+      ['一级指标', '二级指标', '分值', '自评', '自评概述', '认定', '认定概述']
     ];
-    let info = [['姓名:'+this.digUsername ,'','','','','自评分:'+this.DigSelfSco,'','认定分:'+this.computedSco]]
+    let info = [['姓名:'+this.digUsername ,'','','','自评分:'+this.DigSelfSco,'认定分:'+this.computedSco,'加权分:'+this.formulaScore]]
     //  var XLSX = require("xlsx");
      let data = [
       ...info,
@@ -557,7 +599,6 @@ export default {
         parent.children.map(child => [
           parent.name, // 一级指标
           child.name,  // 二级指标
-          child.evaMethod,   // 评分方法
           child.score,   // 分值
           child.sco1,   // 自评
           child.selfSummary,   // 自评概述
@@ -577,7 +618,8 @@ export default {
 const commonStyle = {
   alignment: {
     horizontal: "center",
-    vertical: "center"
+    vertical: "center",
+    wrapText: true  // 关键属性:启用自动换行
   },
   font: {
     sz: 12
@@ -596,14 +638,13 @@ for (let r = 0; r < data.length; ++r) {
 
 // 设置列宽
 ws['!cols'] = [
-    { wch: 20 }, // 一级指标
+    { wch: 15 }, // 一级指标
     { wch: 20 }, // 二级指标
-    { wch: 30 }, // 评价方法
-    { wch: 10 }, // 分值
-    { wch: 10 }, // 自评
-    { wch: 30 }, // 自评概述
-    { wch: 10 }, // 认定
-    { wch: 30 }  // 认定概述
+    { wch: 8 }, // 分值
+    { wch: 8 }, // 自评
+    { wch: 13 }, // 自评概述
+    { wch: 13 }, // 认定
+    { wch: 16 }  // 认定概述
 ];
 
 // 设置行高
@@ -615,7 +656,18 @@ ws['!rows'] = [
   console.log('kk',data);
     // 合并单元格
   ws['!merges'] = [];
-
+  // 设置打印参数
+ws['!page'] = {
+    orientation: 'portrait',  // 强制竖向打印
+    margins: {left:0.5, right:0.5, top:0.75, bottom:0.75}, // 单位:英寸
+    fitToPage: true,          // 启用自动缩放
+    fitToHeight: 0,           // 不限制垂直页数
+    fitToWidth: 1             // 强制缩放到1页宽度
+  };
+
+  // 可选:压缩字体提升兼容性
+  if(!ws['A1'].s) ws['A1'].s = {};
+  ws['A1'].s.font = {sz:10}; // 设置基准字体10pt
 
   // 记录合并单元格的逻辑
   let startRow = 2; // 数据开始行
@@ -642,8 +694,9 @@ ws['!rows'] = [
       previousParentName = currentParentName; // 更新前一个一级指标
   }
   ws['A1'].s = { alignment: { horizontal: 'left' } }
+  ws['E1'].s = { alignment: { horizontal: 'left' } }
   ws['F1'].s = { alignment: { horizontal: 'left' } }
-  ws['H1'].s = { alignment: { horizontal: 'left' } }
+  ws['G1'].s = { alignment: { horizontal: 'left' } }
   // 检查最后一组
   if (count > 0) {
       ws['!merges'].push({
@@ -651,9 +704,9 @@ ws['!rows'] = [
           e: { r: startRow + count, c: 0 }
       });
   }
-  ws['!merges'].push( { s: { r: 0, c: 0 }, e: { r: 0, c: 4 } },  // 合并姓名部分(A1-E1)
-    { s: { r: 0, c: 5 }, e: { r: 0, c: 6 } },  // 单独保留自评分数(G1)
-    { s: { r: 0, c: 7 }, e: { r: 0, c: 7 } }   // 单独保留认定分数(H1));
+  ws['!merges'].push( { s: { r: 0, c: 0 }, e: { r: 0, c: 3 } },  // 合并姓名部分(A1-E1)
+    // { s: { r: 0, c: 5 }, e: { r: 0, c: 6 } },  // 单独保留自评分数(G1)
+    // { s: { r: 0, c: 7 }, e: { r: 0, c: 7 } }   // 单独保留认定分数(H1));
 )
 
       XLSX.utils.book_append_sheet(wb, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
@@ -967,8 +1020,8 @@ ws['!rows'] = [
         _json["教师账号"] = res[i].eName;
         _json["所属教研室"] = res[i].tea;
         _json["考核进度"] = `${res[i].step}/${res[i].allStep}`;
-        _json["自评分"] = res[i].evaSca;
-        _json["考核分数"] = res[i].cogSco;
+        _json["自评分"] = res[i].evaSca;
+        _json["认定分"] = res[i].cogSco;
         array.push(_json);
       }
 
@@ -1209,7 +1262,8 @@ ws['!rows'] = [
         .get(this.$store.state.api + "selectTestExamineBase", params)
         .then(res => {
           // console.log("selectTestExamineBase", res.data[0][0]);
-
+          this.formula = res.data[0][0].formula?res.data[0][0].formula:"";
+          console.log("formula",this.formula)
           this.PageBaseData = JSON.parse(res.data[0][0].json);
           this.PageBaseDataTwo = JSON.parse(res.data[0][0].json);
           // 处理数据来源

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác