Browse Source

Merge branch 'beta' into HK

lsc 1 year ago
parent
commit
7139b4841f

+ 4 - 0
dist/index.html

@@ -32,7 +32,11 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
+<<<<<<< HEAD
     }</style><link href=./static/css/app.5af616cd0e540f49029188ccf1370873.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.6c4ea0d95d82bb3e7d94.js></script><script type=text/javascript src=./static/js/vendor.db6df1a135af570772a8.js></script><script type=text/javascript src=./static/js/app.2d5f9854a58936457446.js></script></body></html><script>function stopSafari() {
+=======
+    }</style><link href=./static/css/app.e8a2fcd607d02c4800beb92b632ad761.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.d5f0d79dbb0d92c052d4.js></script><script type=text/javascript src=./static/js/app.0f8ea7bcc92783a98acd.js></script></body></html><script>function stopSafari() {
+>>>>>>> beta
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 1 - 0
dist/static/css/app.5af616cd0e540f49029188ccf1370873.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.5af616cd0e540f49029188ccf1370873.css.map


File diff suppressed because it is too large
+ 1 - 0
dist/static/css/app.e8a2fcd607d02c4800beb92b632ad761.css


File diff suppressed because it is too large
+ 1 - 0
dist/static/css/app.e8a2fcd607d02c4800beb92b632ad761.css.map


File diff suppressed because it is too large
+ 1 - 0
dist/static/js/app.0f8ea7bcc92783a98acd.js


File diff suppressed because it is too large
+ 1 - 0
dist/static/js/app.0f8ea7bcc92783a98acd.js.map


File diff suppressed because it is too large
+ 1 - 0
dist/static/js/app.2d5f9854a58936457446.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.2d5f9854a58936457446.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.6c4ea0d95d82bb3e7d94.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.d5f0d79dbb0d92c052d4.js


File diff suppressed because it is too large
+ 1 - 0
dist/static/js/vendor.d5f0d79dbb0d92c052d4.js.map


File diff suppressed because it is too large
+ 1 - 0
dist/static/js/vendor.db6df1a135af570772a8.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.db6df1a135af570772a8.js.map


File diff suppressed because it is too large
+ 338 - 14
package-lock.json


+ 1 - 0
package.json

@@ -36,6 +36,7 @@
     "lamejs": "^1.2.1",
     "language-hk-loader": "^1.0.1",
     "markdown-it": "^14.1.0",
+    "opencc-js": "^1.0.5",
     "pdfjs-dist": "^2.5.207",
     "pptxgenjs": "^3.12.0",
     "qrcodejs2": "^0.0.2",

+ 1 - 0
src/components/pages/aiAddCourse/aiCreateDialog.vue

@@ -257,6 +257,7 @@ ${mclass.length ? "#参考资料\n面向年级:" + mclass.join(",") : ""}
   5.知识点:知识点5
 
 # 限制
+- 如果有参考资料请根据参考资料,如果没有无需根据参考资料进行。
 - 你不能输出错误的知识,如果你实在不清楚,输出“对不起,我不确定”
 - 你不能输出违反伦理的内容
 `;

+ 9 - 9
src/components/pages/classroomObservation/components/analysisItem.vue

@@ -269,15 +269,15 @@ export default {
 					.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
 					.then((res) => {
 						let _data = res.data.FunctionResponse;
-						if (
-							!_data.message ||
-							_data.message.indexOf("由于我无法直接访问您上传的文件内容") > -1
-						) {
-							this.loading = false;
-							this.loadNum = 2;
-							// this.$message.error("AI无法识别优化");
-							return 
-						}
+						// if (
+						// 	!_data.message ||
+						// 	_data.message.indexOf("由于我无法直接访问您上传的文件内容") > -1
+						// ) {
+						// 	this.loading = false;
+						// 	this.loadNum = 2;
+						// 	// this.$message.error("AI无法识别优化");
+						// 	return 
+						// }
 						let _copyData = JSON.parse(JSON.stringify(this.data));
 						// _copyData.jsonData.result = "";
 						_copyData.jsonData.content = _data.message;

+ 8 - 2
src/components/pages/classroomObservation/components/chatArea.vue

@@ -1052,6 +1052,11 @@ export default {
 		},
 		// 发送消息
 		send(_text = this.textareaValue) {
+			var OpenCC = require("opencc-js");
+			let converter = OpenCC.Converter({
+					from:'cn',
+					to:'hk'
+			})
 			this.textareaValue = "";
 			// 判断输入的文本是否为空
 			if (!_text.trim()) return;
@@ -1121,7 +1126,7 @@ export default {
 					this.ajax
 						.post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
 						.then((res) => {
-							if (res.data.FunctionResponse.result == "发送成功") {
+							if (converter(res.data.FunctionResponse.result) == converter("发送成功")) {
 							} else {
 								this.$message.warning(res.data.FunctionResponse.result);
 							}
@@ -1183,11 +1188,12 @@ export default {
 				// 	uid: _uuid,
 				// 	model: "Claude 3 Sonnet", // Claude 3 Sonnet或者Claude 3 Haiku
 				// });
+				
 				this.ajax
 					.post("https://gpt4.cocorobo.cn/chat", params)
 					// .post("https://claude3.cocorobo.cn/chat", params)
 					.then((res) => {
-						if (res.data.FunctionResponse.result == "发送成功") {
+						if (converter(res.data.FunctionResponse.result) == converter("发送成功")) {
 						} else {
 							this.$message.warning(res.data.FunctionResponse.result);
 						}

+ 8 - 3
src/components/pages/classroomObservation/index.vue

@@ -211,6 +211,11 @@ export default {
 			});
 		},
 		addNewCourse() {
+			var OpenCC = require("opencc-js");
+			let converter = OpenCC.Converter({
+					from:'cn',
+					to:'hk'
+			})
 			return new Promise((resolve, reject) => {
 				if (this.loading) return this.$message.info("请稍等");
 				this.loading = true;
@@ -238,7 +243,7 @@ export default {
 					)
 					.then((res) => {
 						let _data = res.data.FunctionResponse;
-						if (_data.message == "创建成功") {
+						if (converter(_data.message)== converter("创建成功")) {
 							// 设置该课堂的tid
 							this.tid = params.tid;
 							this.ajax
@@ -251,7 +256,7 @@ export default {
 								})
 								.then((res2) => {
 									let _data2 = res2.data.FunctionResponse;
-									if (_data2.message == "创建成功") {
+									if (converter(_data2.message) == converter("创建成功")) {
 										this.loading = false;
 										this.$nextTick(() => {
 											this.getCourseList().then((_) => {
@@ -265,7 +270,7 @@ export default {
 										this.$message.error("创建fileIds失败");
 									}
 								});
-						} else if (_data.message == "tid重复") {
+						} else if (converter(_data.message) == converter("tid重复")) {
 							this.$message.error("该课堂已存在");
 							this.loading = false;
 						} else {

File diff suppressed because it is too large
+ 463 - 307
src/components/pages/test/examine/conpoments/targetPage.vue


+ 655 - 4
src/components/pages/testPerson/examine/index.vue

@@ -1,13 +1,664 @@
 <template>
-  <div>审核</div>
+  <div class="testPersonExamine">
+    <div class="testTit">
+      <div class="teaLis">
+        <div
+          class="teal"
+          @click="cutPage(2)"
+          :class="[pType == 2 ? 'Tbor' : '']"
+        >
+          专任教师
+        </div>
+        <div
+          class="teal"
+          @click="cutPage(1)"
+          :class="[pType == 1 ? 'Tbor' : '']"
+        >
+          班主任考核
+        </div>
+      </div>
+      <div style="margin-right: 30px;display: flex;">
+        <el-button
+          type="primary"
+          size="mini"
+          style="margin-right: 15px;"
+          @click="saveTab"
+          v-if="allData.type == 1"
+          >保存</el-button
+        >
+        <el-button
+          v-if="!allData.rjson"
+          type="primary"
+          size="mini"
+          @click="Submit"
+          >提交</el-button
+        >
+      </div>
+    </div>
+
+    <div v-if="pType == 2" v-loading="tabLoad">
+      <div class="sBox_table">
+        <div class="table_title">
+          <div>一级指标</div>
+          <div>二级指标</div>
+          <div>评价方法</div>
+          <div>分值</div>
+          <div>自评</div>
+          <div>自评概述</div>
+          <div>数据来源</div>
+          <div>认定</div>
+          <div>认定概述</div>
+        </div>
+        <div class="table_Content" v-for="item in tableJsonCon" :key="item.id">
+          <div class="twoCol">
+            <div class="ColTit">{{ item.name }}</div>
+            <div class="ColCon">
+              <div class="twoCon" v-for="k in item.children" :key="k.id">
+                <div>{{ k.name }}</div>
+                <div style="padding: 10px;box-sizing: border-box;">
+                  {{ k.evaMethod }}
+                </div>
+                <div>{{ k.score }}</div>
+                <div>
+                  <el-input-number
+                    v-model="k.sco1"
+                    :controls="false"
+                    :min="0"
+                    :max="k.score"
+                  ></el-input-number>
+                </div>
+                <div><textarea v-model.trim="k.selfSummary" /></div>
+                <div>
+                  <div v-if="!k.testid.test.length">/</div>
+                  <div v-else style="padding-top: 10px;">
+                    <!-- {{ reverseString(k.testid.test) }} -->
+                    <div
+                      v-for="(item2, index) in k.testid.test"
+                      :key="item2.courseId"
+                      @click="lookPrize(item2.courseId)"
+                      class="orgData"
+                    >
+                      {{ item2.title }}:{{ item2.num }}份
+                    </div>
+                  </div>
+                </div>
+                <div style="display: flex;justify-content: center;">
+                  {{ k.sco2 }}
+                </div>
+                <div style="display: flex;justify-content: center;">
+                  {{ k.cogSum }}
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div v-if="pType == 1" v-loading="tabLoad">
+      <div class="sBox_table">
+        <div class="table_title2">
+          <div>一级指标</div>
+          <div>二级指标</div>
+          <div>评价方法</div>
+          <div>分值</div>
+          <div>自评</div>
+          <div>自评概述</div>
+          <div>数据来源</div>
+          <div>认定</div>
+          <div>认定概述</div>
+        </div>
+        <div class="table_Content2" v-for="item in tableJsonCon" :key="item.id">
+          <div class="twoCol">
+            <div class="ColTit">{{ item.name }}</div>
+            <div class="ColCon">
+              <div class="twoCon" v-for="k in item.children" :key="k.id">
+                <div>{{ k.name }}</div>
+                <div>{{ k.evaMethod }}</div>
+                <div>{{ k.score }}</div>
+                <div>
+                  <el-input-number
+                    v-model="k.sco1"
+                    :controls="false"
+                    :min="0"
+                    :max="k.score"
+                  ></el-input-number>
+                </div>
+                <div><textarea v-model.trim="k.selfSummary" /></div>
+                <div>
+                  <div v-if="!k.testid.test.length">/</div>
+                  <div v-else style="padding-top: 10px;">
+                    <div
+                      v-for="(item2, index) in k.testid.test"
+                      :key="item2.courseId"
+                      @click="lookPrize(item2.courseId)"
+                      class="orgData"
+                    >
+                      {{ item2.title }}:{{ item2.num }}份
+                    </div>
+                  </div>
+                </div>
+                <div>{{ k.sco2 }}</div>
+                <div>{{ k.cogSum }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- 点击数据来源 -->
+    <el-dialog
+      title=""
+      :visible.sync="diaIframe"
+      :append-to-body="true"
+      width="95%"
+      :before-close="handleClose"
+      class="dialog_diy"
+    >
+      <div style="height: 100%;">
+        <iframe
+          ref="viframe"
+          style="width: 100%; height: 99%; border: none"
+          :src="ifmUrl"
+        ></iframe>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="diaIframe = false">关 闭</el-button>
+      </span>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
 export default {
+  data() {
+    return {
+      pType: 2,
+      allData: {
+        type: 1,
+        rjson: ""
+      },
+      tableJsonCon: [],
+      tabLoad: false, //表格加载状态
+      userid: this.$route.query.userid, //用户id
+      oid: this.$route.query.oid, //学校id
+      org: this.$route.query.org, //组织id
+      ifmUrl: "", //数据来源地址
+      diaIframe: false //数据来源弹框
+    };
+  },
+  watch: {
+    pType(newVal, oldVal) {
+      this.getData();
+    }
+  },
+  computed: {},
+  mounted() {
+    this.getData();
+    // console.log(JSON.stringify(this.TeaTabJson));
+  },
+  methods: {
+    // 提交
+    Submit() {
+      if (this.allData.type == 2) {
+        this.$message({
+          type: "info",
+          message: "您已提交过,请勿重复提交"
+        });
+        return;
+      }
 
-}
+      for (const e of this.tableJsonCon) {
+        for (const k of e.children) {
+          if (k.testid.test.length > 0) {
+            k.testid.test = k.testid.test.map(item => item.courseId);
+          }
+        }
+      }
+
+      this.$confirm("确认提交?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: " info"
+      })
+        .then(() => {
+          let params = [
+            {
+              uid: this.userid,
+              oid: this.oid,
+              org: this.org,
+              type: this.pType,
+              json: JSON.stringify(this.tableJsonCon),
+              ttype: 2
+            }
+          ];
+          this.ajax
+            .post(this.$store.state.api + "addTestExamineWorks", params)
+            .then(res => {
+              this.getData();
+            })
+            .catch(error => {
+              console.log(error);
+            });
+        })
+        .catch(() => {
+          this.handleData();
+
+          this.$message({
+            type: "info",
+            message: "已取消提交"
+          });
+        });
+    },
+    // 保存
+    saveTab() {
+      for (const e of this.tableJsonCon) {
+        for (const k of e.children) {
+          if (k.testid.test.length > 0) {
+            k.testid.test = k.testid.test.map(item => item.courseId);
+          }
+        }
+      }
+      this.$confirm("确认保存?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: " info"
+      })
+        .then(() => {
+          let params = [
+            {
+              uid: this.userid,
+              oid: this.oid,
+              org: this.org,
+              type: this.pType,
+              json: JSON.stringify(this.tableJsonCon),
+              ttype: 1
+            }
+          ];
+          this.ajax
+            .post(this.$store.state.api + "addTestExamineWorks", params)
+            .then(res => {
+              this.getData();
+              // console.log();
+              // console.log("resresresres", res.data[0]);
+            })
+            .catch(error => {
+              console.log(error);
+            });
+        })
+        .catch(() => {
+          this.handleData();
+
+          this.$message({
+            type: "info",
+            message: "已取消保存"
+          });
+        });
+    },
+    // 切换专任,班主任
+    cutPage(e) {
+      this.pType = e;
+    },
+    // 获取页面ui
+    getData() {
+      this.tabLoad = true;
+      let params = {
+        uid: this.userid,
+        type: this.pType
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestExamineByUserId", params)
+        .then(res => {
+          console.log("getTestExamineByUserId", res);
+
+          if (res.data[0].length > 0) {
+            this.allData = res.data[0][0];
+            this.tableJsonCon = JSON.parse(res.data[0][0].json);
+            this.handleData();
+            return (this.tabLoad = false);
+          } else {
+            this.allData.type = 1;
+            this.allData.rjson = "";
+            this.getPageBase();
+            this.tabLoad = false;
+          }
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    // 获取页面基础ui信息
+    getPageBase() {
+      let params = {
+        typ: this.pType,
+        org: this.org,
+        oid: this.oid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTestExamineBase", params)
+        .then(res => {
+          // console.log("resresresres", res.data[0]);
+          console.log("selectTestExamineBase", res.data[0][0]);
+          this.tableJsonCon = JSON.parse(res.data[0][0].json);
+          this.handleData();
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    async handleData() {
+      for (const e of this.tableJsonCon) {
+        for (const k of e.children) {
+          if (k.testid.test.length > 0) {
+            k.testid.test = await this.computedTest(k.testid.test);
+          }
+        }
+      }
+    },
+    computedTest(val) {
+      let params = [
+        {
+          uid: this.uid,
+          testId: val.join(",")
+        }
+      ];
+      return new Promise(resolve => {
+        this.ajax
+          .post(this.$store.state.api + "selectExamineTestName", params)
+          .then(res => {
+            resolve(res.data[0]);
+          })
+          .catch(error => {
+            console.log(error);
+          });
+      });
+    },
+    // 查看数据来源
+    lookPrize(val) {
+      return;
+      this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0`;
+      // this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/test?userid=${this.userid}&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=&role=0`;
+      this.diaIframe = true;
+    },
+    // 关闭弹框
+    handleClose(done) {
+      done();
+    }
+  }
+};
 </script>
 
-<style>
+<style scoped>
+.testPersonExamine {
+  width: 100%;
+  min-width: calc(100px * 10);
+  min-height: 100%;
+  padding: 10px;
+  box-sizing: border-box;
+  background-color: #fff;
+}
+
+.testPersonExamine > .testTit {
+  height: 100px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.teaLis {
+  display: flex;
+}
+.teal {
+  padding: 10px 20px;
+  cursor: pointer;
+}
+.Tbor {
+  border-bottom: 2px rgba(54, 129, 252, 1) solid;
+  font-weight: 600;
+}
+.testCon {
+  box-sizing: border-box;
+  padding: 20px;
+}
+
+.orgData {
+  cursor: pointer;
+  color: #528df6;
+  margin-bottom: 10px;
+}
+
+.diaScoreTop {
+  display: flex;
+  justify-content: space-between;
+  height: 60px;
+}
+
+.diaScoreLeft {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.diaScoreLeft > div {
+  margin-right: 30px;
+}
+
+.diaScoreRight {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.TabBtn {
+  cursor: pointer;
+  color: #528df6;
+}
+
+.sBox_table {
+  width: 100%;
+  min-width: calc(110px * 9);
+  margin: 0 auto;
+  /* min-width: 1520px; */
+  font-size: 14px;
+}
+
+.table_title {
+  width: 100%;
+  min-width: calc(110px * 9);
+  height: 50px;
+  background: #e0eafb;
+  border: 1px solid #d5d8df;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+}
+
+.table_title > div {
+  width: calc(100% / 9);
+  min-width: 110px;
+  text-align: center;
+  height: 100%;
+  line-height: 50px;
+  border-right: 1px solid #d5d8df;
+}
+
+.table_title2 {
+  width: 100%;
+  min-width: calc(110px * 8);
+  height: 50px;
+  background: #e0eafb;
+  border: 1px solid #d5d8df;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+}
+.table_title2 > div {
+  width: calc(100% / 8);
+  min-width: 110px;
+  text-align: center;
+  height: 100%;
+  line-height: 50px;
+  border-right: 1px solid #d5d8df;
+}
+
+.table_title > div:last-child {
+  border: none;
+}
+
+.table_Content {
+  width: 100%;
+  min-width: calc(110px * 9);
+  border: 1px solid #d5d8df;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  text-align: center;
+  align-items: center;
+}
+.table_Content2 {
+  width: 100%;
+  min-width: calc(110px * 8);
+  border: 1px solid #d5d8df;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  text-align: center;
+  align-items: center;
+}
+
+.twoCol {
+  width: 100%;
+  display: flex;
+}
+
+.ColTit {
+  width: calc(100% / 9);
+  min-width: 110px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.ColTit2 {
+  width: calc(100% / 8);
+  min-width: 110px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.twoCon {
+  display: flex;
+}
+.twoCon > div > .el-input-number {
+  height: 100%;
+}
+.twoCon > div > .el-input{
+  height: 100%;
+
+}
+.twoCon > div > input {
+  border: none;
+  width: 100%;
+  height: 100%;
+  outline-style: none;
+  text-align: center;
+}
+.twoCon {
+  display: flex;
+}
+.twoCon > div > textarea {
+  border: none;
+  width: 100%;
+  height: 100%;
+  resize: none;
+  outline-style: none;
+}
+/* 取消[type='number']的input的上下箭头 */
+input::-webkit-inner-spin-button {
+  -webkit-appearance: none !important;
+}
+
+input::-webkit-outer-spin-button {
+  -webkit-appearance: none !important;
+}
+
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+
+.twoCon > div {
+  width: calc(100% / 8);
+  /* min-width: 110px; */
+  min-height: 50px;
+  /* line-height: 50px; */
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-left: 1px #ccc solid;
+  border-bottom: 1px #ccc solid;
+}
+.twoCon > div >>> .el-input__inner {
+  height: 100%;
+  border: none;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+.twoCon2 {
+  display: flex;
+}
+.twoCon2 > div {
+  width: calc(100% / 7);
+  min-width: 110px;
+  min-height: 50px;
+  /* line-height: 50px; */
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-left: 1px #ccc solid;
+  border-bottom: 1px #ccc solid;
+}
+
+.ColCon {
+  flex: 1;
+}
+
+.dialog_diy >>> .el-dialog {
+  height: 95%;
+  margin: 0 auto !important;
+  margin-top: 20px !important;
+  overflow: hidden;
+}
+
+.dialog_diy >>> .el-dialog__header {
+  background: #454545 !important;
+  padding: 25px 20px;
+}
+
+.dialog_diy >>> .el-dialog__body {
+  height: calc(100% - 50px);
+  box-sizing: border-box;
+  padding: 0px;
+}
+
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 19px;
+}
 
-</style>
+.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;
+}
+</style>

+ 1 - 1
src/components/pages/testPerson/test/test.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="i_body_box">
         <div class="check_nav">
-            <div class="nav all" v-show="false" :class="{ active: type == '1' }" @click="checkType('1')">
+            <div class="nav all" v-show="true" :class="{ active: type == '1' }" @click="checkType('1')">
                 年度考核
             </div>
             <div class="nav all" :class="{ active: type == '' }" @click="checkType('')">

+ 47 - 1
src/components/pages/works.vue

@@ -364,7 +364,8 @@
 import WorkDate from "./components/workData";
 import Report from "./components/report";
 import studentReport from "./components/studentReport";
-import { T } from "caniuse-lite/data/browserVersions";
+import "../../common/aws-sdk-2.235.1.min.js";
+
 export default {
   components: {
     WorkDate,
@@ -528,6 +529,8 @@ export default {
       (this.page2 = 1), this.getStudnet();
     },
     getStudnet(row) {
+      this.downloadFile('https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/student01-%E5%AD%A6%E7%94%9F%E6%88%90%E9%95%BF%E6%8A%A5%E5%91%8A1719315423787.pdf');
+      return
       //获取作业
       this.signDialog = true;
       this.isLoading2 = true;
@@ -552,6 +555,48 @@ export default {
           console.error(err);
         });
     },
+    downloadFile(url){
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+      let url2 = url;
+      let _url2 = "";
+      if (
+        url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+      ) {
+        _url2 = url2.split(
+          "https://view.officeapps.live.com/op/view.aspx?src="
+        )[1];
+      } else {
+        _url2 = url2;
+      }
+      let _this = this;
+
+      _this.downLoading = true
+      var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+      let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
+      var params = {
+        Bucket: "ccrb",
+        Key: name
+      };
+      s3.getObject(params, function (err, data) {
+        _this.downLoading = false
+        if (err) console.log(err, err.stack); // an error occurred
+        else {
+          let url = window.URL.createObjectURL(new Blob([data.Body]));
+          let a = document.createElement("a");
+          a.name = 'student01-学生成长报告.pdf';
+          a.href = url;
+          a.download = 'student01-学生成长报告.pdf';
+          a.click();
+          console.log(data); 
+        }          // sxuccessful response
+
+      });
+    },
     getCourseDetail() {
       let params = {
         cid: this.checkCourse,
@@ -570,6 +615,7 @@ export default {
       this.reportVisible = true;
       this.signDialog = false;
     },
+
     getClass() {
       let params = {
         oid: this.oid,

Some files were not shown because too many files changed in this diff