SanHQin 2 weeks ago
parent
commit
7a7907f96a

+ 1 - 1
dist/index.html

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

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


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


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


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


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


+ 353 - 0
src/components/pages/sassPlatform/dialog/warnDialog.vue

@@ -0,0 +1,353 @@
+<template>
+    <el-dialog title="提醒" :visible="show" :append-to-body="true" width="560px"
+        :before-close="handleClose" class="dialog_diy">
+        <div class="share_box">
+            <div class="info_box" ref="info">
+                <div class="info">
+                    <span>表单名称:</span>
+                    <span>{{ testJson?testJson.title:'-' }}</span>
+                </div>
+                <div class="info" >
+                    <!-- {{ reversedMessage }} -->
+                    <span>表单范围:</span>
+                    <span>{{ reversedMessage }}</span>
+                </div>
+                <div class="info" v-if="testJson && testJson.overtime">
+                    <span>截止时间:</span>
+                    <span>{{ testJson.overtime }}</span>
+                </div>
+                <div class="info" v-if="testJson">
+                    <span>未完成人数:</span>
+                    <span>{{ noCount }}</span>
+                </div>
+                <div class="info" v-if="testJson">
+                    <span>已完成人数:</span>
+                    <span v-html="testJson.worksPerson"></span>
+                </div>
+                <div class="info" v-if="pname.length">
+                    <span>未完成名单:</span>
+                    <span>{{ pname.length > 20 ? isSuo ? pname.slice(0,20).join(',')+'...' : pname.join(',') : pname.join(',') }}</span>
+                    <span class="more" v-if="pname.length > 20" @click="isSuo = !isSuo">{{ isSuo ? '查看更多' : '收起'}}</span>
+                </div>
+            </div>
+            <div class="url_box">
+                <div class="title">
+                    链接提醒
+                </div>
+                <div class="url">
+                    <el-tooltip :content="origin" placement="top" effect="dark">
+                        <!-- content to trigger tooltip here -->
+                        <span>{{ origin }}</span>
+                    </el-tooltip>
+                    <span @click="copy" :data-clipboard-text="copyText" class="tag-read">复制链接</span>
+                </div>
+            </div>
+            <div class="qrcode_box">
+                <div class="title">
+                    二维码提醒
+                </div>
+                <div class="qrcode">
+                    <span class="qrcodeUrl" ref="qrCodeUrl"></span>
+                    <span @click="downQr">下载二维码</span>
+                </div>
+            </div>
+            <div class="btn_box">
+                <button class="c_pub_button_confirm tag-read2" @click="copy2" :data-clipboard-text="copyText2">复制信息</button>
+            </div>
+        </div>
+        <!-- <span slot="footer" class="dialog-footer">
+        <el-button @click="close()">关 闭</el-button>
+      </span> -->
+    </el-dialog>
+</template>
+
+<script>
+import Clipboard from "clipboard";
+import QRCode from "qrcodejs2";
+export default {
+    props: {
+      TeachingValue: {
+            type: String,
+            default: ''
+        },
+        TeachName: {
+            type: Array,
+            default: ()=>[]
+        }
+    },
+    data() {
+        return {
+            origin: '',
+            copyText: "",
+            copyText2: "",
+            noCount: 0,
+            pname:[],
+            isSuo: true,
+            testJson:null,
+            show:false,
+        };
+    },
+    computed: {
+        reversedMessage() {
+            if(!this.testJson)return '-'
+            if (this.TeachingValue == '') {
+                return this.testJson.juriP ? this.testJson.juriP : '所有人'
+            }else{
+                // return this.testJson.juriP ? this.testJson.juriP : '所有人'
+                return this.TeachName.length>0 ? this.TeachName[0].name : this.testJson.juriP ? this.testJson.juriP : '所有人'
+            }
+        }
+    },
+    methods: {
+        handleClose(done) {
+            this.close();
+            done();
+        },
+        open({testJson}){
+          this.testJson = testJson;
+          this.isSuo = true
+          this.setQr()
+          this.getData()
+          this.show = true;
+        },
+        close() {
+          this.show = false;
+          this.testJson = null;
+        },
+        setQr() {
+            setTimeout(() => {
+                let url = "https://beta.cloud.cocorobo.cn/#/testDetail?testid=" + this.testJson.courseId
+                this.origin = url
+                this.$refs.qrCodeUrl.innerHTML = "";
+                var qrcode = new QRCode(this.$refs.qrCodeUrl, {
+                    text: url, // 需要转换为二维码的内容
+                    width: 100,
+                    height: 100,
+                    colorDark: "#000000",
+                    colorLight: "#ffffff",
+                    correctLevel: QRCode.CorrectLevel.H,
+                });
+            }, 500);
+        },
+        downQr() {
+
+            // 创建一个虚拟链接,并将 canvas 转换为图片文件
+            const link = document.createElement('a');
+            link.href = this.$refs.qrCodeUrl.querySelector('img').src;
+            link.download = 'qrcode.png';
+
+            // 模拟点击链接进行下载
+            link.click();
+        },
+        copy() {
+            this.copyText = "https://beta.cloud.cocorobo.cn/#/testDetail?testid=" + this.testJson.courseId;
+            var clipboard = new Clipboard(".tag-read");
+            clipboard.on("success", (e) => {
+                this.$message.success("复制成功");
+                console.log("复制成功");
+                clipboard.destroy(); // 释放内存
+            });
+            clipboard.on("error", (e) => {
+                console.log("不支持复制,该浏览器不支持自动复制");
+                clipboard.destroy(); // 释放内存
+            });
+        },
+        copy2(){
+            let url = "https://beta.cloud.cocorobo.cn/#/testDetail?testid=" + this.testJson.courseId
+            this.copyText2 =
+            `表单名称:${this.testJson.title}\n表单范围:${this.testJson.juriP ? this.testJson.juriP : '所有人'}\n${this.testJson.overtime ? '截止时间:'+this.testJson.overtime +'\n' : ''}${'未完成人数:'+this.noCount +'\n'}${this.testJson ? '已完成人数:'+this.testJson.worksPerson +'\n' : ''}${this.pname.length ? '未完成名单:'+this.pname.join(',') +'\n' : ''}链接提醒:${url}`;
+            var clipboard = new Clipboard(".tag-read2");
+            clipboard.on("success", (e) => {
+                this.$message.success("复制成功");
+                console.log("复制成功");
+                clipboard.destroy(); // 释放内存
+            });
+            clipboard.on("error", (e) => {
+                console.log("不支持复制,该浏览器不支持自动复制");
+                clipboard.destroy(); // 释放内存
+            });
+        },
+        getData() {
+            // if(!this.testJson.juriP){
+            //     return;
+            // }
+            let params = {
+                id: this.testJson.courseId,
+                tea: this.TeachingValue
+            };
+            this.ajax
+                .get(this.$store.state.api + "getTestWorkShareCopy", params)
+                .then((res) => {
+                    console.log('res.datares.datares.datares.datares.datares.data',res.data);
+                    let parray = res.data[0]
+                    let is = res.data[1]
+                    this.noCount = parray.length - is.length
+                    let isA = []
+                    for(var i=0;i<is.length;i++){
+                        isA.push(is[i].userid)
+                    }
+                    let pname = []
+                    for(var i=0;i<parray.length;i++){
+                        if(isA.indexOf(parray[i].userid) == -1){
+                            pname.push(parray[i].username)
+                        }
+                    }
+                    this.pname = pname
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        }
+    },
+    mounted(){
+
+    },
+};
+</script>
+
+<style scoped>
+.dialog_diy>>>.el-dialog {
+    /* height: 100%; */
+    /* margin: 0 auto !important; */
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #fff !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: #000;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #000;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #000;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    background: #fff;
+}
+
+.share_box {
+    width: 100%;
+    height: 100%;
+    padding: 0 20px 15px;
+    box-sizing: border-box;
+}
+
+.info_box {
+    margin: 0 0 20px;
+}
+
+.info_box>.info {
+    line-height: 18px;
+}
+
+.info_box>.info>span:nth-child(1) {
+    color: #00000099;
+}
+
+.info_box>.info>span:nth-child(2) {
+    color: #000000;
+}
+
+.info_box>.info+.info {
+    margin-top: 10px;
+}
+
+.url_box {
+    margin-bottom: 20px;
+}
+
+.qrcode_box {
+    margin-bottom: 20px;
+}
+
+.url_box>.url {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    border: 1px solid #e7e7e7;
+    border-radius: 4px;
+    height: 35px;
+    padding: 0 7px;
+    box-sizing: border-box;
+}
+
+.url_box>.url>span {
+    font-size: 16px;
+    color: #000000;
+}
+
+.url_box>.url>span:nth-child(1) {
+    width: 100%;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+.url_box>.url>span:nth-child(2) {
+    margin-left: auto;
+    border-left: 1px solid #e7e7e7;
+    padding-left: 7px;
+    cursor: pointer;
+    min-width: fit-content;
+}
+
+.url_box>.title,
+.qrcode_box>.title {
+    font-size: 16px;
+    font-weight: 700;
+    margin-bottom: 10px;
+}
+
+.qrcode_box>.qrcode {
+    padding: 7px;
+    border: 1px solid #e7e7e7;
+    width: fit-content;
+    border-radius: 4px;
+    display: flex;
+    align-items: flex-end;
+}
+
+.qrcode_box>.qrcode>span:nth-child(1) {
+    width: 100px;
+    display: block;
+    height: 100px;
+}
+
+.qrcode_box>.qrcode>span:nth-child(2) {
+    background: #f0f2f5;
+    padding: 7px 15px;
+    font-size: 16px;
+    border-radius: 4px;
+    cursor: pointer;
+    color: #000;
+    margin-left: 7px;
+}
+
+.btn_box{
+    display: flex;
+    justify-content: flex-end;
+}
+
+.more{
+    cursor: pointer;
+    color: #0061ff;
+}
+</style>

+ 23 - 3
src/components/pages/sassPlatform/index.vue

@@ -6,7 +6,7 @@
       </div> -->
       <div class="sp_h_tagArea">
         <span :class="{tagActive:tagIndex==0}" @click="tagIndex = 0">应用中心</span>
-        <span :class="{tagActive:tagIndex==1}" @click="tagIndex = 1">智能分析</span>
+        <span :class="{tagActive:tagIndex==1}" @click="goTestSmarter()">智能分析</span>
       </div>
     </div>
     <div class="sp_bottom">
@@ -21,6 +21,7 @@
       <div class="sp_b_right">
         <tableView v-if="navType == 'formManage' && navShowCardObj.id" :typeId="navShowCardObj.id" :typeList="navShowCardObj.typeList"/>
         <examine v-if="navType == 'annualAssessment'"/>
+        <databoard v-if="navType == 'evaluationDataVisualization'"/>
       </div>
     </div>
   </div>
@@ -29,10 +30,12 @@
 <script>
 import tableView from './view/tableView.vue';
 import examine from './view/examine/index'
+import databoard from './view/databoard.vue';
 export default {
   components:{
     tableView,
-    examine
+    examine,
+    databoard
   },
   data(){
     return{
@@ -40,6 +43,10 @@ export default {
       navList:[ ],
       navIndex:'0-0',
       navType:"",
+      userId: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      role:this.$route.query.role,
     }
   },
   computed:{
@@ -101,7 +108,20 @@ export default {
     changeNavIndex(newIndex,item){
       this.navIndex = newIndex;
       this.navType = item.type
-    }
+    },
+    goTestSmarter(){
+      this.$router.push(
+        "/testSmarter?userid=" +
+          this.userId +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role+
+          "&cid=undefined"
+      );
+    },
   },
   mounted(){
     this.getNavType().then(_=>{

+ 372 - 0
src/components/pages/sassPlatform/view/dataCom/cascader.vue

@@ -0,0 +1,372 @@
+<template>
+  <div class="cascader">
+    <div class="title" @click="showBox">
+      {{ checkArray.length ? setCheckName(checkArray) : "点击选择教研室范围" }}
+    </div>
+    <div class="box" v-if="show" v-loading="loading">
+      <div class="inputBox">
+        <input v-model="searchTerm" placeholder="输入教师名字搜索" />
+        <i class="search" @click="searchTeacher"></i>
+      </div>
+      <div class="options">
+        <div v-if="filteredOptions.length" class="ul">
+          <div
+            @click="selectOption(option)"
+            v-for="(option, index) in filteredOptions"
+            :key="index"
+            class="li"
+            :class="{ active: checkF === option.id }"
+          >
+            <span>{{ option.name }}</span>
+          </div>
+        </div>
+        <div v-if="children.length" class="ul">
+          <div
+            v-for="(option, index) in children"
+            :key="index"
+            class="li"
+            @click="selectOption2(option)"
+            :class="{ active: checkF2 === option.id }"
+          >
+            <span>{{ option.name }}</span>
+          </div>
+        </div>
+        <div v-else-if="checkF" class="ul">
+          <div class="liNone">无子分类</div>
+        </div>
+        <div v-if="teacher.length" class="ul">
+          <div
+            class="li"
+            @click="checkAll()"
+            :class="{ active: panCheckAll === 1 }"
+          >
+            <span>全部</span>
+          </div>
+          <div
+            v-for="(teacher, index) in teacher"
+            :key="index"
+            class="li"
+            @click="selectOption3(teacher)"
+            :class="{ active: checkTeacher(teacher) === 2 }"
+          >
+            <span>{{ teacher.name }}</span>
+          </div>
+        </div>
+        <div v-else-if="checkF2" class="ul">
+          <div class="liNone">暂无教师</div>
+        </div>
+      </div>
+      <div class="button">
+        <el-button size="small" @click="reset">重置</el-button>
+        <el-button type="primary" size="small" @click="confirm">确认</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Cascader",
+  props: {
+    options: {
+      type: Array,
+      required: true
+    }
+  },
+  data() {
+    return {
+      searchTerm: "",
+      filteredOptions: this.options,
+      checkF: "",
+      checkF2: "",
+      children: [],
+      teacher: [],
+      loading: false,
+      show: false,
+      checkArray: [],
+      checkArray2: []
+    };
+  },
+  computed: {
+    setCheckName() {
+      return function(arr) {
+        let content = "";
+        if (arr.length < 3) {
+          content = arr.map(item => item.name).join(" 、 ");
+        } else {
+          content =
+            arr
+              .slice(0, 2)
+              .map(item => item.name)
+              .join(" 、 ") +
+            "...共" +
+            arr.length +
+            "位老师";
+        }
+        return content;
+      };
+    },
+    checkTeacher() {
+      return function(teacher) {
+        let a = 1;
+        this.checkArray2.forEach(element => {
+          if (element.userid == teacher.userid) {
+            a = 2;
+          }
+        });
+        return a;
+      };
+    },
+    panCheckAll() {
+      if (this.teacher.length && this.checkArray2.length) {
+        let userid = this.checkArray2.map(item => item.userid);
+        let userid2 = this.teacher.map(item => item.userid);
+        let userid3 = this.arrayToArray(userid, userid2);
+        if (userid2.length == userid3.length) {
+          return 1;
+        } else {
+          return 2;
+        }
+      } else {
+        return 2;
+      }
+    }
+  },
+  methods: {
+    showBox() {
+      if (this.show) {
+
+        this.reset();
+      } else {
+
+        this.checkArray2 = JSON.parse(JSON.stringify(this.checkArray));
+				if (this.filteredOptions.length && this.checkF=='') {
+					this.selectOption(this.filteredOptions[0]);
+					if(this.filteredOptions[0].child.length){
+						this.selectOption2(this.filteredOptions[0].child[0]);
+					}
+        }
+
+      }
+      this.show = !this.show;
+    },
+    arrayToArray(arrayo, arrayt) {
+      let array1 = arrayo;
+      let array2 = arrayt;
+
+      let commonElements = [];
+
+      for (let i = 0; i < array1.length; i++) {
+        for (let j = 0; j < array2.length; j++) {
+          if (array1[i] === array2[j]) {
+            commonElements.push(array1[i]);
+          }
+        }
+      }
+      return commonElements;
+    },
+    reset() {
+      this.checkArray2 = [];
+      this.checkF = "";
+      this.checkF2 = "";
+      (this.teacher = []), (this.children = []);
+    },
+    confirm() {
+      this.checkArray = JSON.parse(JSON.stringify(this.checkArray2));
+      let array = this.checkArray.map(item => item.userid);
+      this.$emit("setTeacher", array);
+      this.show = false;
+    },
+    selectOption(option) {
+      if (this.checkF == option.id) {
+        return;
+      }
+      console.log(option);
+      this.checkF2 = "";
+      this.teacher = [];
+      this.checkF = option.id;
+      this.children = option.child;
+      if (option.child.length) {
+        this.selectOption2(option.child[0]);
+      }
+      this.$forceUpdate();
+    },
+    selectOption2(option) {
+      if (this.checkF2 == option.id) {
+        return;
+      }
+      this.checkF2 = option.id;
+      this.teacher = [];
+      this.loading = true;
+      let params = {
+        cid: option.id,
+        name: this.searchTerm,
+        userid: this.$route.query.userid
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTypeTeacher", params)
+        .then(res => {
+          this.teacher = res.data[0];
+          this.loading = false;
+        })
+        .catch(err => {
+          this.loading = false;
+          console.error(err);
+        });
+    },
+    searchTeacher() {
+      if (!this.checkF2) {
+        this.$message.error("请先选择子分类");
+      }
+      this.teacher = [];
+      this.loading = true;
+      let params = {
+        cid: this.checkF2,
+        name: this.searchTerm,
+        userid: this.$route.query.userid
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTypeTeacher", params)
+        .then(res => {
+          this.teacher = res.data[0];
+          this.loading = false;
+        })
+        .catch(err => {
+          this.loading = false;
+          console.error(err);
+        });
+    },
+    selectOption3(teacher) {
+      if (this.checkTeacher(teacher) == 1) {
+        this.checkArray2.push(teacher);
+      } else {
+        this.checkArray2 = this.checkArray2.filter(
+          item => item.userid != teacher.userid
+        );
+      }
+    },
+    checkAll() {
+      let userid = this.checkArray2.map(item => item.userid);
+      let userid2 = this.teacher.map(item => item.userid);
+      if (this.panCheckAll == 1) {
+        this.checkArray2 = this.checkArray2.filter(
+          item => !userid2.includes(item.userid)
+        );
+      } else {
+        let userAarray = this.arrayToArray(userid, userid2);
+        let teacher = this.teacher.filter(
+          item => !userAarray.includes(item.userid)
+        );
+        teacher.forEach(item => {
+          this.checkArray2.push(item);
+        });
+      }
+    }
+  }
+};
+</script>
+
+<style scoped>
+.cascader {
+  position: relative;
+}
+
+.cascader > .title {
+  min-width: 300px;
+  background: #fff;
+  border-radius: 5px;
+  height: 30px;
+  display: flex;
+  align-items: center;
+  padding: 0 10px;
+  box-sizing: border-box;
+  cursor: pointer;
+  color: #00000066;
+  margin: 10px 0 10px 10px;
+}
+
+.box {
+  position: absolute;
+  z-index: 999;
+  border-radius: 5px;
+  overflow: hidden;
+  background: #fff;
+  box-shadow: 0 0 3px 2px #0000002b;
+}
+
+.inputBox {
+  padding: 5px 8px;
+  border-bottom: 1px solid #c4c4c4;
+  display: flex;
+  box-sizing: border-box;
+  width: 100%;
+  align-items: center;
+  position: relative;
+}
+
+.inputBox > input {
+  width: 100%;
+  background: #fff;
+  border-radius: 5px;
+  height: 30px;
+  padding: 0 10px;
+  border: 1px solid #c4c4c4;
+  outline: none;
+}
+
+.inputBox > .search {
+  position: absolute;
+  right: 20px;
+  top: 50%;
+  transform: translateY(-50%);
+  width: 13px;
+  height: 13px;
+  background: url("../../../../../assets/icon/test/test_search.png") no-repeat;
+  background-size: 100% 100%;
+  cursor: pointer;
+}
+
+.options {
+  height: 200px;
+  display: flex;
+}
+
+.options > .ul {
+  height: 100%;
+  overflow-y: auto;
+  list-style: none;
+  padding: 0;
+  width: 135px;
+  border-right: 1px solid #c4c4c4;
+  /* width: 100%; */
+  text-align: center;
+}
+
+.options > .ul:nth-child(3) {
+  border-right: none;
+}
+
+.options > .ul > .li.active,
+.options > .ul > .li:hover {
+  color: #3681fc;
+}
+
+.options > .ul > .li,
+.options > .ul > .liNone {
+  cursor: pointer;
+  padding: 10px 8px;
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.button {
+  padding: 5px 8px;
+  border-top: 1px solid #c4c4c4;
+  display: flex;
+  justify-content: flex-end;
+  box-sizing: border-box;
+  width: 100%;
+}
+</style>

+ 246 - 0
src/components/pages/sassPlatform/view/dataCom/radarTeacher.vue

@@ -0,0 +1,246 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%" v-if="this.ooption.xdata.length">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+        <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;"
+            v-show="!this.ooption.xdata.length">暂无数据</div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        evCourseArray: {
+            type: Object,
+            default: function () {
+                return {}
+            }
+        },
+        evCourseArray2: {
+            type: Array,
+            default: []
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                xdata2: [],
+                sdata: [],
+            },
+            option: {
+                tooltip: {},
+                radar: {
+                    axisName: {
+                        color: "#000"
+                    },
+                    // shape: 'circle',
+                    indicator: [
+                        // { name: '目标一', max: 5 },
+                        // { name: '目标二', max: 5 },
+                        // { name: '目标三', max: 5 },
+                        // { name: '目标四', max: 5 },
+                        // { name: '目标五', max: 5 }
+                    ]
+                },
+                series: [
+                    {
+                        name: '教师考核',
+                        type: 'radar',
+                        data: [
+                            // {
+                            //     areaStyle: {
+                            //         opacity: 0.2,
+                            //         color: '#0061FF'
+                            //     },
+                            //     itemStyle: {
+                            //         color: '#0061FF',
+                            //         lineStyle: {
+                            //         color: '#0061FF'
+                            //         }
+                            //     },
+                            //     value: [],
+                            //     name: ''
+                            // }
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+                this.option.radar.indicator = option.sdata;
+                if (option.xdata.length > 0) {
+                    this.option.series[0].data[0] = {
+                        // areaStyle: {
+                        //     opacity: 0.2,
+                        //     color: '#0061FF'
+                        // },
+                        itemStyle: {
+                            color: '#0061FF',
+                            lineStyle: {
+                                color: '#0061FF'
+                            }
+                        },
+                        value: option.xdata,
+                        name: '全体教师平均得分率'
+                    }
+                }
+                if (option.xdata2.length > 0) {
+                    this.option.series[0].data[1] = {
+                        // areaStyle: {
+                        //     opacity: 0.2,
+                        //     color: '#68bbc4'
+                        // },
+                        itemStyle: {
+                            color: '#68bbc4',
+                            lineStyle: {
+                                color: '#68bbc4'
+                            }
+                        },
+                        value: option.xdata2,
+                        name: '平均得分率'
+                    }
+                }
+                // this.option.series[0].data[0].value = option.xdata;
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+        setArray(array, type) {
+            this.ooption.sdata = Object.keys(this.evCourseArray).map((item) => {
+                return {
+                    name: item,
+                    max: 100,
+                };
+            });
+            if (type == 1) {
+                this.ooption.xdata = Object.keys(array).map((item) => {
+                    return array[item].cogScore;
+                })
+            }
+            if (this.evCourseArray2.length) {
+                let xdata2 = []
+                for(var i = 0; i < this.ooption.sdata.length; i++) {
+                    let name = this.ooption.sdata[i]
+                    for(var j = 0; j < this.evCourseArray2.length; j++) {
+                        if(this.evCourseArray2[j].name == name.name) {
+                            xdata2.push(this.evCourseArray2[j].cogScore)
+                            break
+                        }
+                    }
+                }
+                this.ooption.xdata2 = xdata2
+            }
+            if (!this.chartObj) {
+                this.setChart(this.ooption);
+            } else {
+                this.option.radar.indicator = this.ooption.sdata;
+                if (this.ooption.xdata.length > 0) {
+                    this.option.series[0].data[0] = {
+                        // areaStyle: {
+                        //     opacity: 0.2,
+                        //     color: '#0061FF'
+                        // },
+                        itemStyle: {
+                            color: '#0061FF',
+                            lineStyle: {
+                                color: '#0061FF'
+                            }
+                        },
+                        value: this.ooption.xdata,
+                        name: '全体教师平均得分率'
+                    }
+                }
+                if (this.ooption.xdata2.length > 0) {
+                    this.option.series[0].data[1] = {
+                        // areaStyle: {
+                        //     opacity: 0.2,
+                        //     color: '#68bbc4'
+                        // },
+                        itemStyle: {
+                            color: '#68bbc4',
+                            lineStyle: {
+                                color: '#68bbc4'
+                            }
+                        },
+                        value: this.ooption.xdata2,
+                        name: '平均得分率'
+                    }
+                }
+                this.chartObj.setOption(this.option);
+            }
+            setTimeout(() => {
+                if (this.chartObj) {
+                    this.chartObj.resize();
+                }
+            }, 200);
+            this.$forceUpdate();
+        },
+    },
+    watch: {
+        evCourseArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.ooption.xdata = [];
+                this.setArray(newValue, 1)
+                this.$forceUpdate();
+            },
+        },
+        evCourseArray2: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.ooption.xdata2 = [];
+                this.setArray(newValue, 2)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.ooption = {
+            xdata: [],
+            xdata2: [],
+            sdata: [],
+        }
+        this.setArray(this.evCourseArray, 1)
+        // this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 90%;
+    background: #fff;
+}
+</style>

+ 288 - 0
src/components/pages/sassPlatform/view/dataCom/radarZong.vue

@@ -0,0 +1,288 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%" v-if="this.ooption.xdata.length || this.ooption.xdata2.length">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%; "
+      ></div>
+    </div>
+    <div
+      style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;"
+      v-show="!this.ooption.xdata.length && !this.ooption.xdata2.length"
+    >
+      暂无数据
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    evCourseArray: {
+      type: Object,
+      default: function() {
+        return {};
+      }
+    },
+    evCourseArray2: {
+      type: Object,
+      default: function() {
+        return {};
+      }
+    }
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        xdata: [],
+        xdata2: [],
+        sdata: []
+      },
+      option: {
+        legend: {},
+        tooltip: {},
+        radar: {
+          axisName: {
+            color: "#000"
+          },
+          // shape: 'circle',
+          indicator: [
+            // { name: '目标一', max: 5 },
+            // { name: '目标二', max: 5 },
+            // { name: '目标三', max: 5 },
+            // { name: '目标四', max: 5 },
+            // { name: '目标五', max: 5 }
+          ]
+        },
+        series: [
+          {
+            name: "教师考核",
+            type: "radar",
+            data: [
+              // {
+              //     areaStyle: {
+              //         opacity: 0.2,
+              //         color: '#0061FF'
+              //     },
+              //     itemStyle: {
+              //         color: '#0061FF',
+              //         lineStyle: {
+              //         color: '#0061FF'
+              //         }
+              //     },
+              //     value: [],
+              //     name: ''
+              // }
+            ]
+          }
+        ]
+      }
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise(resolve => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.radar.indicator = option.sdata;
+        if (option.xdata.length > 0) {
+				
+          this.option.series[0].data[0] = {
+            // areaStyle: {
+            //     opacity: 0.2,
+            //     color: '#0061FF'
+            // },
+            itemStyle: {
+              color: "#0061FF",
+              lineStyle: {
+                color: "#0061FF"
+              }
+            },
+            value: option.xdata,
+            name: "全体教师平均得分率"
+          };
+        }else{
+					// this.option.series[0].data.splice(0,1)
+					// this.option.series[0].data[0] = {};
+				}
+        if (option.xdata2.length > 0) {
+          this.option.series[0].data[1] = {
+            // areaStyle: {
+            //     opacity: 0.2,
+            //     color: '#68bbc4'
+            // },
+            itemStyle: {
+              // color: "#68bbc4",
+              // lineStyle: {
+              //   color: "#68bbc4"
+              // }
+							color: "#0061FF",
+              lineStyle: {
+                color: "#0061FF"
+              }
+            },
+            value: option.xdata2,
+            name: "平均得分率"
+          };
+        } else {
+          this.option.series[0].data[1] = {};
+        }
+        // this.option.series[0].data[0].value = option.xdata;
+        // 初始化雷达图
+				this.option.series[0].data = this.option.series[0].data.filter(i=>Object.keys(i).length>0);
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setArray(array, type) {
+      if (Object.keys(array).length) {
+        this.ooption.sdata = Object.keys(array).map(item => {
+          return {
+            name: item,
+            max: 100
+          };
+        });
+      } else if (this.evCourseArray.length) {
+        this.ooption.sdata = Object.keys(this.evCourseArray).map(item => {
+          return {
+            name: item,
+            max: 100
+          };
+        });
+        this.ooption.xdata = Object.keys(this.evCourseArray).map(item => {
+          return array[item].cogScore;
+        });
+        this.ooption.xdata2 = [];
+      }
+      if (type == 1) {
+        this.ooption.xdata = Object.keys(array).map(item => {
+          return array[item].cogScore;
+        });
+        this.ooption.xdata2 = [];
+      }
+      if (type == 2) {
+        this.ooption.xdata2 = Object.keys(array).length
+          ? Object.keys(array).map(item => {
+              return array[item].cogScore;
+            })
+          : [];
+					this.ooption.xdata = []
+      }
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.radar.indicator = this.ooption.sdata;
+        if (this.ooption.xdata.length > 0) {
+          this.option.series[0].data[0] = {
+            // areaStyle: {
+            //     opacity: 0.2,
+            //     color: '#0061FF'
+            // },
+            itemStyle: {
+              color: "#0061FF",
+              lineStyle: {
+                color: "#0061FF"
+              }
+            },
+            value: this.ooption.xdata,
+            name: "全体教师平均得分率"
+          };
+        }else{
+					this.option.series[0].data[0] = {};
+				}
+        if (this.ooption.xdata2.length > 0) {
+          this.option.series[0].data[1] = {
+            // areaStyle: {
+            //     opacity: 0.2,
+            //     color: '#68bbc4'
+            // },
+            itemStyle: {
+              // color: "#68bbc4",
+              // lineStyle: {
+              //   color: "#68bbc4"
+              // }
+							color: "#0061FF",
+              lineStyle: {
+                color: "#0061FF"
+              }
+            },
+            value: this.ooption.xdata2,
+            name: "平均得分率"
+          };
+        } else {
+          this.option.series[0].data[1] = {};
+        }
+				this.option.series[0].data = this.option.series[0].data.filter(i=>Object.keys(i).length>0);
+        this.chartObj.setOption(this.option);
+      }
+      setTimeout(() => {
+        if (this.chartObj) {
+          this.chartObj.resize();
+        }
+      }, 200);
+      this.$forceUpdate();
+    }
+  },
+  watch: {
+    evCourseArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.ooption.xdata = [];
+        this.setArray(newValue, 1);
+        this.$forceUpdate();
+      }
+    },
+    evCourseArray2: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.ooption.xdata2 = [];
+				if(Object.keys(newValue).length){
+					this.setArray(newValue, 2);
+				}
+        this.$forceUpdate();
+      }
+    }
+  },
+  mounted() {
+    this.ooption = {
+      xdata: [],
+      xdata2: [],
+      sdata: []
+    };
+    this.setArray(this.evCourseArray, 1);
+    // this.setChart(this.ooption);
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  }
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  background: #fff;
+}
+</style>

+ 504 - 0
src/components/pages/sassPlatform/view/databoard.vue

@@ -0,0 +1,504 @@
+<template>
+    <div class="pb_content" style="height: auto; width: calc(100%); margin: 0 auto;background: unset;">
+        <div class="bbox_serch">
+            <Cascader :options="typeInfo" v-if="typeInfo.length" @setTeacher="setTeacher"></Cascader>
+        </div>
+        <div class="bbox" v-loading="tabLoading">
+            <div class="bbox_nav">
+                <div class="teaLis">
+                    <div class="teal" @click="cutPage(2)" :class="[pType == 2 ? 'Tbor' : '']" v-if="bArray.length">
+                        专任教师
+                    </div>
+                    <div class="teal" @click="cutPage(1)" :class="[pType == 1 ? 'Tbor' : '']" v-if="aArray.length">
+                        班主任
+                    </div>
+                </div>
+                <el-select v-model="checkSet" @change="setArray" style="margin-left: auto">
+                    <el-option label="综合排序" value=""> </el-option>
+                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                </el-select>
+
+            </div>
+            <div class="randarZong">
+                <radarZong :evCourseArray="zongJson" :evCourseArray2="zongJson2" v-if="checkSet"></radarZong>
+                <radarZong :evCourseArray="zongJson2" :evCourseArray2="{}" v-else></radarZong>
+            </div>
+            <div class="randarBox">
+                <div class="title">教师详情</div>
+                <div class="randarTeacher" v-for="(item, index) in tableData" :key="index">
+                    <div class="randarTitle">
+                        <span>{{ item.username }}</span>
+                        <span>{{ item.score }}</span>
+                    </div>
+                    <div class="randar">
+                        <radarTeacher :evCourseArray="zongJson2" :evCourseArray2="item.json"></radarTeacher>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+var OpenCC = require("opencc-js");
+let converter = OpenCC.Converter({
+    from: 'hk',
+    to: 'cn'
+})
+
+import radarZong from "./dataCom/radarZong.vue";
+import radarTeacher from "./dataCom/radarTeacher.vue";
+
+import Cascader from "./dataCom/cascader.vue";
+
+
+export default {
+    name: 'testDataBoard',
+    components: { radarZong, radarTeacher, Cascader },
+    data() {
+        return {
+            userid: this.$route.query.userid, //用户id
+            oid: this.$route.query.oid, //学校id
+            org: this.$route.query.org, //组织id
+            pType: 2,
+            teacherName: '',
+            tabLoading: false,
+            tableData: [],
+            zongJson: {},
+            zongJson2: {},
+            checkSet: "",
+            options: [],
+            data: [],
+            typeInfo: [],
+            teacherArray: [],
+            aArray:[],
+            bArray:[],
+        };
+    },
+    computed: {
+        getScore() {
+            return (item) => {
+                let score = 0;
+                for (var i = 0; i < item.length; i++) {
+                    score += item[i].cogScore
+                }
+                score = (score / item.length).toFixed(0);
+                return score;
+            }
+        }
+    },
+    methods: {
+        getPageBase2(type) {
+            let params = {
+                typ: type,
+                org: this.org,
+                oid: this.oid
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectTestExamineBase", params)
+                .then(res => {
+                console.log('1111111111111111111111', res.data);
+
+                if(type == 1){
+                    this.aArray = res.data[0];
+                }else {
+                    this.bArray = res.data[0];
+                    if(!this.bArray.length){
+                        this.cutPage(2)
+                    }
+                }
+                })
+                .catch(error => {
+                console.log(error);
+            });
+        },
+        goTo(path) {
+            this.$router.push(path);
+        },
+        cutPage(type) {
+            this.checkSet = ""
+            this.pType = type
+            this.getData()
+        },
+        scoreChildren(children) {
+            let score = 0;
+            children.forEach(item => {
+                if (item.sco2 && parseFloat(item.sco2) > 0) {
+                    score += parseFloat(item.sco2);
+                }
+            });
+            return score;
+        },
+        getData() {
+            this.tabLoading = true;
+            let params = [{
+                oid: this.oid,
+                org: this.org,
+                type: this.pType,
+                tname: this.teacherName
+            }];
+            // console.log(params);
+            this.ajax
+                .post(this.$store.state.api + "selectTestExaminePersonData2", params)
+                .then(res => {
+                    let data = res.data[0];
+
+                    data.forEach(e => {
+                        e.json = JSON.parse(e.json);
+                    });
+
+                    data.forEach(e => {
+                        e.evaSca = 0;
+                        e.cogSco = 0;
+                        e.step = 0;
+                        e.allStep = 0;
+
+                        e.json.forEach(i => {
+                            i.evaScore = 0 // 自评
+                            i.cogScore = 0 //考核
+                            i.score = 0 //考核
+                            i.children.forEach(k => {
+                                e.evaSca = e.evaSca + k.sco1 * 1;
+                                e.cogSco = e.cogSco + k.sco2 * 1;
+                                i.evaScore = i.evaScore + k.sco1 * 1;
+                                i.cogScore = i.cogScore + k.sco2 * 1;
+                                i.score = i.score + k.score * 1;
+                                e.allStep++;
+                                if (!!k.sco2 * 1) {
+                                    e.step++;
+                                }
+                            });
+                        });
+                    });
+
+                    data.forEach(e => {
+                        if (e.step == e.allStep) {
+                            e.state = "已完成";
+                        } else {
+                            e.state = "未完成";
+                        }
+                        if (!e.tea) {
+                            e.tea = "";
+                        }
+                        e.evaSca = e.evaSca.toFixed(0);
+                        e.cogSco = e.cogSco.toFixed(0);
+                    });
+                    let _data = []
+                    let zongJson = {}
+                    // zongJson.count = data.length
+                    data.forEach((e, index) => {
+                        _data[index] = {}
+                        _data[index].username = e.username
+                        _data[index].evaSca = e.evaSca
+                        _data[index].cogSco = e.cogSco
+                        _data[index].json = []
+
+                        e.json.forEach((i, iindex) => {
+                            if (converter(i.name) == converter("科组评价") || converter(i.name) == converter("行政巡查")) {
+                                return;
+                            }
+                            _data[index].json[iindex] = {}
+                            _data[index].json[iindex].name = i.name
+                            let _evaScore = parseInt((i.evaScore * (100 / i.score)).toFixed(0))
+                            let _cogScore = parseInt((i.cogScore * (100 / i.score)).toFixed(0))
+                            _data[index].json[iindex].evaScore = _evaScore  // 自评
+                            _data[index].json[iindex].cogScore = _cogScore // 考核
+                            zongJson[i.name] ? "" : zongJson[i.name] = {}
+                            zongJson[i.name].evaScore ? zongJson[i.name].evaScore += _evaScore : zongJson[i.name].evaScore = _evaScore
+                            zongJson[i.name].cogScore ? zongJson[i.name].cogScore += _cogScore : zongJson[i.name].cogScore = _cogScore
+                        });
+                    });
+                    let zongArray = Object.keys(zongJson)
+                    for (var i = 0; i < zongArray.length; i++) {
+                        zongJson[zongArray[i]].evaScore = (zongJson[zongArray[i]].evaScore / data.length).toFixed(0)
+                        zongJson[zongArray[i]].cogScore = (zongJson[zongArray[i]].cogScore / data.length).toFixed(0)
+                    }
+
+                    this.tableData = _data
+                        .filter((e) => {
+                            e.score = this.getScore(e.json);
+                            return e;
+                        })
+                        .sort((a, b) => b.score - a.score);
+                    console.log(this.tableData);
+                    this.zongJson = zongJson
+                    this.zongJson2 = zongJson
+                    console.log(zongJson);
+                    this.options = Object.keys(zongJson).map(item => {
+                        return { label: item, value: item }
+                    })
+                    this.data = data
+                    console.log(data);
+
+                    this.tabLoading = false;
+                })
+                .catch(error => {
+                    this.tabLoading = false;
+                    console.log(error);
+                });
+        },
+        setTeacher(array){
+            this.teacherArray = array
+            this.setArray()
+        },
+        setArray() {
+            let checkSet = this.checkSet
+            let _data = []
+            let zongJson = {}
+            let data = JSON.parse(JSON.stringify(this.data))
+            if(this.teacherArray.length){
+                data = data.filter((e) => {
+                    return this.teacherArray.includes(e.userid)
+                })
+            }
+            data.forEach((e, index) => {
+                _data[index] = {}
+                _data[index].username = e.username
+                if (checkSet == "") {
+                    _data[index].evaSca = e.evaSca
+                    _data[index].cogSco = e.cogSco
+                    _data[index].json = []
+                }
+
+
+                e.json.forEach((i, iindex) => {
+                    if (converter(i.name) == converter("科组评价") || converter(i.name) == converter("行政巡查")) {
+                        return;
+                    }
+                    if (checkSet == i.name) {
+                        _data[index].evaSca = i.evaScore
+                        _data[index].cogSco = i.cogScore
+                        _data[index].json = []
+                        i.children.forEach((ic, icindex) => {
+                            _data[index].json[icindex] = {}
+                            _data[index].json[icindex].name = ic.name
+                            let _evaScore = parseInt((ic.sco1 * 1 * (100 / ic.score)).toFixed(0))
+                            let _cogScore = parseInt((ic.sco2 * 1 * (100 / ic.score)).toFixed(0))
+                            _data[index].json[icindex].evaScore = _evaScore  // 自评
+                            _data[index].json[icindex].cogScore = _cogScore // 考核
+                            zongJson[ic.name] ? "" : zongJson[ic.name] = {}
+                            zongJson[ic.name].evaScore ? zongJson[ic.name].evaScore += _evaScore : zongJson[ic.name].evaScore = _evaScore
+                            zongJson[ic.name].cogScore ? zongJson[ic.name].cogScore += _cogScore : zongJson[ic.name].cogScore = _cogScore
+                        })
+                    } else if (checkSet == "") {
+                        _data[index].json[iindex] = {}
+                        _data[index].json[iindex].name = i.name
+                        let _evaScore = parseInt((i.evaScore * (100 / i.score)).toFixed(0))
+                        let _cogScore = parseInt((i.cogScore * (100 / i.score)).toFixed(0))
+                        _data[index].json[iindex].evaScore = _evaScore  // 自评
+                        _data[index].json[iindex].cogScore = _cogScore // 考核
+                        zongJson[i.name] ? "" : zongJson[i.name] = {}
+                        zongJson[i.name].evaScore ? zongJson[i.name].evaScore += _evaScore : zongJson[i.name].evaScore = _evaScore
+                        zongJson[i.name].cogScore ? zongJson[i.name].cogScore += _cogScore : zongJson[i.name].cogScore = _cogScore
+                    }
+
+                });
+            });
+            let zongArray = Object.keys(zongJson)
+            for (var i = 0; i < zongArray.length; i++) {
+                zongJson[zongArray[i]].evaScore = (zongJson[zongArray[i]].evaScore / data.length).toFixed(0)
+                zongJson[zongArray[i]].cogScore = (zongJson[zongArray[i]].cogScore / data.length).toFixed(0)
+            }
+            this.tableData = _data.filter((e) => {
+                e.score = this.getScore(e.json);
+                return e;
+            })
+            .sort((a, b) => b.score - a.score);
+            console.log(this.tableData);
+            this.zongJson2 = zongJson
+            console.log(zongJson);
+        },
+        //获取分类类名
+        getTypeInfo() {
+            this.tabLoading = true;
+            let params = {
+                oid: this.oid
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectPerInfoAllTea", params)
+                .then((res) => {
+                    this.typeInfo = res.data[0];
+                    let typeInfo = res.data[1];
+                    this.typeInfo.forEach((e) => {
+                        e.child = [];
+                        e.value = '';
+                        typeInfo.forEach((i) => {
+                            if (e.id == i.parentid) {
+                                e.child.push({ id: i.id, name: i.name })
+                            }
+                        })
+                    })
+                    this.getData()
+                })
+                .catch((err) => {
+                    this.tabLoading = false;
+                    console.error(err);
+                });
+        },
+    },
+    mounted() {
+        this.getPageBase2(1)
+        this.getPageBase2(2)
+        this.getTypeInfo()
+    },
+};
+</script>
+
+<style scoped>
+.bbox_serch{
+    width: 100%;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+    background-color: #E6EAF0;
+}
+
+.top {
+    display: flex;
+    justify-content: space-between;
+    width: 100% !important;
+    box-sizing: border-box;
+    margin: 0px auto;
+    padding: 10px 0;
+    height: 54px;
+}
+
+
+.subClick {
+    font-size: 16px;
+    cursor: pointer;
+    margin-left: 10px;
+    /* color: #ab582f; */
+    color: #409eff;
+}
+
+.sub_head {
+    position: relative;
+    font-size: 20px;
+    font-weight: bold;
+    padding: 0 15px;
+}
+
+.sub_head::after {
+    content: "";
+    width: 100%;
+    background: #3681FC;
+    height: 2px;
+    position: absolute;
+    left: 0;
+    bottom: -8px;
+}
+
+.subClick {
+    /* font-size: 16px; */
+    font-size: 20px;
+    cursor: pointer;
+    /* margin-left: 17.5px; */
+    /* color: #ab582f; */
+    /* color: #409eff; */
+    color: #999;
+    padding: 0 15px;
+}
+
+.subClick:hover {
+    color: #000;
+}
+
+.sub_head+.subClick,
+.subClick+.subClick,
+.subClick+.sub_head {
+    margin-left: 17.5px;
+}
+
+.bbox {
+    background: #fff;
+    border-radius: 0 5px 5px 5px;
+    padding: 15px 0;
+    box-sizing: border-box;
+    min-height: 900px;
+}
+
+.bbox_nav {
+    display: flex;
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0 20px;
+    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;
+}
+
+
+.randarZong {
+    max-width: 100%;
+    width: 500px;
+    height: 500px;
+    margin: 0 auto;
+}
+
+.randarBox {
+    padding: 20px;
+    width: 100%;
+    box-sizing: border-box;
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.randarBox .title {
+    width: 100%;
+    font-size: 18px;
+    font-weight: 700;
+    margin-bottom: 20px;
+}
+
+.randarTeacher {
+    width: calc(100% / 4 - 20px);
+    margin-right: 20px;
+    margin-bottom: 20px;
+}
+
+
+.randarTitle {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin-bottom: 10px;
+}
+
+.randarTitle>span:nth-child(1) {}
+
+.randarTitle>span:nth-child(2) {}
+
+.randar {
+    width: calc(100%);
+    height: 350px;
+    border: 1px solid #e4e4e4;
+    border-radius: 5px;
+}
+
+@media screen and (max-width: 1280px) {
+    .randarTeacher {
+        width: calc(100% / 2 - 20px);
+    }
+}
+
+@media screen and (max-width: 800px) {
+    .randarTeacher {
+        width: calc(100%);
+        margin-right: 0;
+    }
+}
+</style>

+ 334 - 34
src/components/pages/sassPlatform/view/tableView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tableView">
+  <div class="tableView" v-loading="loading">
     <div class="tv_header">
       <div class="tv_h_left">
         <span :class="{ tagActive: tagIndex == 0 }" @click="changeTagIndex(0)"
@@ -13,26 +13,35 @@
         <el-input
           placeholder="请输入内容"
           style="width: 300px;margin-right: 30px;"
+          @keyup.enter.native="getData()"
           v-model="searchValue"
           class="input-with-select"
         >
-          <el-button slot="append" icon="el-icon-search"></el-button>
+          <el-button
+            slot="append"
+            icon="el-icon-search"
+            @click="getData()"
+          ></el-button>
         </el-input>
 
-        <el-button type="primary">创建表单</el-button>
+        <el-button type="primary" @click="addForm()">创建表单</el-button>
 
         <!-- <el-button type="primary">数据导入</el-button> -->
       </div>
     </div>
-    <div class="tv_bottom">
+    <div class="tv_bottom" v-loading="tableLoading">
       <el-table
-        v-if="tagIndex == 0"
+        v-if="tagIndex == 0 && !tableLoading"
         :data="showTableData"
         border
         style="width: 100%"
-        v-loading="tableLoading"
       >
-        <el-table-column type="index" width="80" label="序号"></el-table-column>
+        <el-table-column
+          type="index"
+          width="80"
+          label="序号"
+          align="center"
+        ></el-table-column>
         <el-table-column prop="title" width="400" label="表单名称">
         </el-table-column>
         <el-table-column prop="typeN" width="200" label="所属栏目">
@@ -42,45 +51,108 @@
           width="150"
           label="创建人"
         ></el-table-column>
-        <el-table-column
-          prop="look"
-          width="150"
-          label="表单状态"
-        >
-        <template slot-scope="scope">
-          <span>{{ getLook(scope.row) }}</span>
-        </template>
-      </el-table-column>
+        <el-table-column prop="look" width="150" label="表单状态">
+          <template slot-scope="scope">
+            <span>{{ getLook(scope.row) }}</span>
+          </template>
+        </el-table-column>
         <el-table-column
           prop="worksCount"
           width="150"
           label="提交数量"
         ></el-table-column>
-        <el-table-column fixed="right" label="操作">
+        <el-table-column fixed="right" label="操作" min-width="300">
           <template slot-scope="scope">
-            <el-button type="text" size="small">编辑</el-button>
-            <el-button type="text" size="small">查看</el-button>
-            <el-button type="text" size="small">复制</el-button>
-            <el-button type="text" size="small">提醒</el-button>
-            <el-button type="text" size="small">删除</el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="editForm(scope.row)"
+              v-if="
+                scope.row.userid == userId ||
+                  (scope.row.course_teacher &&
+                    scope.row.course_teacher.indexOf(userId) !== -1) ||
+                  role == '1'
+              "
+              >编辑</el-button
+            >
+            <el-button
+              type="text"
+              size="small"
+              @click="checkForm(scope.row.courseId)"
+              >查看</el-button
+            >
+            <el-button
+              type="text"
+              size="small"
+              @click="copyForm(scope.row.courseId)"
+              >复制</el-button
+            >
+            <el-button
+              @click="warnForm(scope.row)"
+              type="text"
+              size="small"
+              v-if="
+                scope.row.userid == userId ||
+                  (scope.row.course_teacher &&
+                    scope.row.course_teacher.indexOf(userId) !== -1) ||
+                  role == '1'
+              "
+              >提醒</el-button
+            >
+            <el-button
+              type="text"
+              size="small"
+              @click="deleteForm(scope.row.courseId)"
+              v-if="
+                scope.row.userid == userId ||
+                  (scope.row.course_teacher &&
+                    scope.row.course_teacher.indexOf(userId) !== -1) ||
+                  role == '1'
+              "
+              >删除</el-button
+            >
           </template>
         </el-table-column>
       </el-table>
+
       <el-table
-        v-if="tagIndex == 1"
+        v-if="tagIndex == 1 && !tableLoading"
         :data="showTableData"
         border
         style="width: 100%"
-        v-loading="tableLoading"
       >
-        <el-table-column type="index" width="80" label="序号"></el-table-column>
+        <el-table-column
+          type="index"
+          width="80"
+          label="序号"
+          align="center"
+        ></el-table-column>
         <el-table-column prop="name" width="200" label="姓名"></el-table-column>
         <el-table-column
-          prop="subject"
+          prop="className"
           width="200"
           label="学科"
         ></el-table-column>
         <el-table-column
+          v-for="item in teaType"
+          :key="item.id"
+          :label="item.name"
+          width="200"
+          align="left"
+          :filters="getNameTTypeFiler(item)"
+          :filter-method="
+            getNameTTypeFiler(item)
+              ? (value, row) => {
+                  return filterTType(value, row, index);
+                }
+              : null
+          "
+        >
+          <template slot-scope="scope">
+            {{ getTType(item.id, scope.row.cclassid) }}
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
           prop="class"
           width="200"
           label="年级"
@@ -89,28 +161,36 @@
           prop="teachingAge"
           width="200"
           label="教龄"
-        ></el-table-column>
+        ></el-table-column> -->
         <el-table-column
-          prop="submitted"
+          prop="worksCount"
           width="200"
           label="已提交数量"
         ></el-table-column>
         <el-table-column
-          prop="completed"
+          prop="testCount"
           width="200"
           label="已完成表单"
         ></el-table-column>
-        <el-table-column fixed="right" label="操作">
+
+        <el-table-column fixed="right" label="操作" min-width="100">
           <template slot-scope="scope">
-            <el-button type="text" size="small">详细</el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="checkPerson(scope.row.userid)"
+              >详细</el-button
+            >
           </template>
         </el-table-column>
       </el-table>
     </div>
+    <warnDialog ref="warnDialogRef" />
   </div>
 </template>
 
 <script>
+import warnDialog from "../dialog/warnDialog.vue";
 export default {
   props: {
     typeId: {
@@ -122,16 +202,23 @@ export default {
       default: () => []
     }
   },
+  components: {
+    warnDialog
+  },
   data() {
     return {
       tableData: [],
       tagIndex: 0,
+      displayRange: 0, //4:所有人  2:他人  0:我的
       searchValue: "",
       showTableData: [],
       userId: this.$route.query.userid,
       oid: this.$route.query.oid,
       org: this.$route.query.org,
-      tableLoading: false
+      role: this.$route.query.role,
+      tableLoading: false,
+      teaType: [],
+      loading: false
     };
   },
   computed: {
@@ -181,12 +268,42 @@ export default {
 
         if (
           item.look == "2" &&
-          item.isUserCount > 0 && item.isUserCount <= item.worksPerson
+          item.isUserCount > 0 &&
+          item.isUserCount <= item.worksPerson
         ) {
           content = "已完成";
         }
         return content;
       };
+    },
+    getTType() {
+      return function(pid, cclassid) {
+        if (cclassid) {
+          let string = [];
+          this.teaType.forEach(e => {
+            if (e.id == pid) {
+              for (var i = 0; i < e.child.length; i++) {
+                if (cclassid.includes(e.child[i].id)) {
+                  string.push(e.child[i].name);
+                }
+              }
+            }
+          });
+          return string.length ? string.join(",") : "-";
+        } else {
+          return "-";
+        }
+      };
+    },
+    getNameTTypeFiler() {
+      return item => {
+        return item.child.length
+          ? item.child.map(child => ({
+              text: child.name,
+              value: child.id
+            }))
+          : null;
+      };
     }
   },
   watch: {
@@ -201,12 +318,13 @@ export default {
       if (this.tagIndex == 0) {
         this.getFormData();
       } else if (this.tagIndex == 1) {
+        this.getPersonData();
       }
     },
     getFormData() {
       let params = {
         uid: this.userId,
-        type: 0,
+        type: this.displayRange,
         oid: this.oid,
         org: this.org,
         typeId: this.typeString,
@@ -225,6 +343,46 @@ export default {
             this.showTableData = this.tableData;
           }
           this.tableLoading = false;
+          this.$forceUpdate();
+        })
+        .catch(e => {
+          console.log(e);
+          this.tableLoading = false;
+        });
+    },
+    getPersonData() {
+      let params = {
+        oid: this.oid,
+        org: this.org,
+        typeId: this.typeString,
+        textValue: this.searchValue
+      };
+      this.tableLoading = true;
+      this.ajax
+        .get(this.$store.state.api + "selectTesttCourse2_sass", params)
+        .then(res => {
+          let _data = res.data[0];
+          let _teaType = res.data[1];
+          let _teaType2 = res.data[2];
+          if (_data.length > 0) {
+            this.tableData = _data;
+            this.showTableData = this.tableData;
+          }
+
+          if (_teaType.length > 0) {
+            this.teaType = _teaType;
+            this.teaType.forEach(e => {
+              e.child = [];
+              e.value = [];
+              _teaType2.forEach(i => {
+                if (e.id == i.parentid) {
+                  e.child.push({ id: i.id, name: i.name });
+                }
+              });
+            });
+          }
+          this.tableLoading = false;
+          this.$forceUpdate();
         })
         .catch(e => {
           console.log(e);
@@ -235,6 +393,148 @@ export default {
       this.tagIndex = newTag;
       this.searchValue = "";
       this.getData();
+    },
+    filterTType(value, row, index) {
+      return row.cclassid && row.cclassid.indexOf(value) != -1;
+    },
+    checkPerson(uid) {
+      this.$router.push(
+        "/checkToTest2?uid=" +
+          uid +
+          "&userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&type=2" +
+          "&role=" +
+          this.role
+      );
+    },
+    editForm(item) {
+      if (item.worksCount > 0) {
+        this.$confirm(
+          "该表单已存在数据,如果修改题目可能会清空已提交数据,是否重新编辑?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        )
+          .then(() => {
+            this.$router.push(
+              "/addTest?cid=" +
+                item.courseId +
+                "&userid=" +
+                this.userid +
+                "&oid=" +
+                this.oid +
+                "&org=" +
+                this.org +
+                "&type=2" +
+                "&role=" +
+                this.role
+            );
+          })
+          .catch(() => {
+            return;
+          });
+      } else {
+        this.$router.push(
+          "/addTest?cid=" +
+            item.courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&type=2" +
+            "&role=" +
+            this.role
+        );
+      }
+    },
+    checkForm(courseId) {
+      this.$router.push(
+        "/checkToTest?cid=" +
+          courseId +
+          "&userid=" +
+          this.userId +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&type=2" +
+          "&role=" +
+          this.role
+      );
+    },
+    copyForm(courseId) {
+      let params = [
+        {
+          cid: courseId,
+          uid: this.userId
+        }
+      ];
+      this.ajax
+        .post(this.$store.state.api + "copyTest", params)
+        .then(res => {
+          this.displayRange = "0";
+          this.$message.success("复制成功");
+          this.getData();
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    deleteForm(courseId) {
+      this.$confirm("确定删除此表单吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.loading = true;
+          let params = [
+            {
+              cid: courseId
+            }
+          ];
+          this.ajax
+            .post(this.$store.state.api + "deleteTestCourse", params)
+            .then(res => {
+              this.loading = false;
+              this.$message.success("删除成功");
+              this.getData();
+            })
+            .catch(err => {
+              loading.close();
+              this.loading = false;
+              console.error(err);
+            });
+        })
+        .catch(() => {
+          return;
+        });
+    },
+    warnForm(data) {
+      this.$refs.warnDialogRef.open({ testJson: data });
+    },
+    addForm() {
+      this.$router.push(
+        "/addTest?userid=" +
+          this.userId +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role +
+          "&typeId1="+ this.typeId
+      );
     }
   },
   mounted() {

+ 9 - 0
src/components/pages/test/add/setInfo/index.vue

@@ -459,6 +459,15 @@ export default {
                           this.type1Value = item.id;
                         }
                       })
+                    }else if(this.$route.query.typeId1){
+                      let _rtype1 = this.$route.query.typeId1;
+                      let _type1Index = _type1.findIndex(i=>i.id==_rtype1)
+                      if(_type1Index!=-1){
+                        this.type1Value = _type1[_type1Index].id;
+                        if(_type1[_type1Index].children.length>0){
+                          this.typeCheck = _type1[_type1Index].children[0].id;
+                        }
+                      }
                     }
                     console.log("👉6",_type1)
                 })

+ 15 - 6
src/components/pages/testPerson/examine/index.vue

@@ -40,20 +40,20 @@
     <div style="flex: 1;overflow: hidden;" class="notes">
       注:评价积分周期为2023年6月30日至2024年6月30日
     </div>
-    <div style="height:100%;overflow: hidden;" v-loading="tabLoad">
+    <div style="height:100%;overflow: auto;" v-loading="tabLoad">
       <div class="sBox_table">
         <div class="table_title">
           <div style="width: 110px;">一级指标</div>
-          <div style="width: 140px;">二级指标</div>
-          <div style="width: 700px;">评价方法</div>
+          <div style="width: 140px;min-width: 140px;">二级指标</div>
+          <div style="width: 700px;min-width: 700px;">评价方法</div>
           <div style="width: 100px;">分值</div>
           <div style="width: 100px;">自评</div>
-          <div style="flex: 1;">自评概述</div>
-          <div style="flex: 0.5;">数据来源</div>
+          <div style="flex: 1;min-width: 150px;">自评概述</div>
+          <div style="flex: 0.5;min-width: 100px;">数据来源</div>
           <!-- <div style="width: 100px;">认定</div>
           <div style="flex: 1;">认定概述</div> -->
         </div>
-        <div style="height: 100%;overflow: auto;">
+        <div style="height: 100%;">
           <div
             class="table_Content"
             v-for="item in PageBaseData"
@@ -669,6 +669,7 @@ export default {
   line-height: 50px;
   border-right: 1px solid #d5d8df;
   border-left: 1px solid #d5d8df;
+  background: #e0eafb;
 }
 
 /* .table_title2 {
@@ -723,6 +724,7 @@ export default {
 
 .ColTit {
   width: 110px !important;
+  min-width: 110px;
   display: flex;
   justify-content: center;
   align-items: center;
@@ -764,6 +766,11 @@ input[type="number"] {
 }
 .twoCon > div:nth-child(2) {
   width: 700px !important;
+  white-space: pre-line;
+  word-break: break-all;
+  text-align: left;
+  justify-content:flex-start;
+  /* background-color:red; */
 }
 .twoCon > div:nth-child(3) {
   width: 100px !important;
@@ -773,9 +780,11 @@ input[type="number"] {
 }
 .twoCon > div:nth-child(5) {
   flex: 1;
+  min-width: 150px;
 }
 .twoCon > div:nth-child(6) {
   flex: 0.5;
+  min-width: 100px;
 }
 .twoCon > div:nth-child(7) {
   width: 100px !important;

+ 2 - 2
src/components/pages/testPerson/test/index.vue

@@ -189,7 +189,7 @@
       </div>
 
       <div class="i_b_l_bottom">
-        <span>
+        <!-- <span>
           <svg
             @click="isFold = !isFold"
             :style="`transform: rotate(${isFold ? '0' : '180'}deg);`"
@@ -208,7 +208,7 @@
               p-id="6103"
             ></path>
           </svg>
-        </span>
+        </span> -->
       </div>
     </div>
     <div class="i_b_right">

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