Sfoglia il codice sorgente

修改测试报告中下载--及进行中的测试计划--某个人员重新测试的接口

plg 2 settimane fa
parent
commit
3d2dcd13b2

+ 113 - 25
src/components/PlanReport.vue

@@ -133,7 +133,10 @@
         </div>
 
         <div class="table-content">
-          <div class="radio_group_style">
+          <div
+            class="radio_group_style"
+            style="display: flex; justify-content: space-between; align-items: center"
+          >
             <el-radio-group
               v-model="userType"
               style="margin-top: 40px; margin-bottom: 20px"
@@ -146,6 +149,16 @@
               <el-radio-button label="精神障碍"></el-radio-button>
               <!-- <el-radio-button label="其他"></el-radio-button> -->
             </el-radio-group>
+
+            <el-button
+              style="margin-top: 40px; margin-bottom: 20px"
+              @click="funExport"
+              type="success"
+              round
+              class="add_class"
+            >
+              心理异常导出
+            </el-button>
           </div>
 
           <el-table
@@ -165,26 +178,54 @@
             </el-table-column>
             <el-table-column prop="orgName" label="所属组织架构" align="center" width="">
             </el-table-column>
-            <el-table-column label="操作" align="center"  v-if="userType == '心理异常'">
+            <el-table-column label="操作" align="center" v-if="userType == '心理异常'">
               <template slot-scope="scope">
-                <div v-show="scope.row.symptom == '重度'" style="display: flex;align-items: center;justify-content: center;">
-                  <img style="width: 18px;height:18px;margin-right:4px" src="../assets/img/report/1.png" alt="" />
+                <div
+                  v-show="scope.row.symptom == '重度'"
+                  style="display: flex; align-items: center; justify-content: center"
+                >
+                  <img
+                    style="width: 18px; height: 18px; margin-right: 4px"
+                    src="../assets/img/report/1.png"
+                    alt=""
+                  />
                   <div style="color: #d91b00">{{ scope.row.symptom }}</div>
                 </div>
-                <div v-show="scope.row.symptom == '中度'" style="display: flex;align-items: center;justify-content: center;">
-                  <img style="width: 18px;height:18px;margin-right:4px" src="../assets/img/report/2.png" alt="" />
+                <div
+                  v-show="scope.row.symptom == '中度'"
+                  style="display: flex; align-items: center; justify-content: center"
+                >
+                  <img
+                    style="width: 18px; height: 18px; margin-right: 4px"
+                    src="../assets/img/report/2.png"
+                    alt=""
+                  />
                   <div style="color: #f0a900">{{ scope.row.symptom }}</div>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="操作" align="center"  v-if="userType != '心理异常'">
+            <el-table-column label="操作" align="center" v-if="userType != '心理异常'">
               <template slot-scope="scope">
-                <div v-show="scope.row.dimensionSymptom == '重度'" style="display: flex;align-items: center;justify-content: center;">
-                  <img style="width: 18px;height:18px;margin-right:4px" src="../assets/img/report/1.png" alt="" />
+                <div
+                  v-show="scope.row.dimensionSymptom == '重度'"
+                  style="display: flex; align-items: center; justify-content: center"
+                >
+                  <img
+                    style="width: 18px; height: 18px; margin-right: 4px"
+                    src="../assets/img/report/1.png"
+                    alt=""
+                  />
                   <div style="color: #d91b00">{{ scope.row.dimensionSymptom }}</div>
                 </div>
-                <div v-show="scope.row.dimensionSymptom == '中度'" style="display: flex;align-items: center;justify-content: center;">
-                  <img style="width: 18px;height:18px;margin-right:4px" src="../assets/img/report/2.png" alt="" />
+                <div
+                  v-show="scope.row.dimensionSymptom == '中度'"
+                  style="display: flex; align-items: center; justify-content: center"
+                >
+                  <img
+                    style="width: 18px; height: 18px; margin-right: 4px"
+                    src="../assets/img/report/2.png"
+                    alt=""
+                  />
                   <div style="color: #f0a900">{{ scope.row.dimensionSymptom }}</div>
                 </div>
               </template>
@@ -307,20 +348,37 @@
             <div style="flex: 1">
               <div style="display: flex; font-size: 16px; flex-direction: row">
                 <div style="display: flex; flex-direction: column">
-             
-                  <span class="sex_class">{{  tabNameCurrent }}</span>
+                  <span class="sex_class">{{ tabNameCurrent }}</span>
                   <span class="sex_class">心理健康</span>
-                  <span class="sex_class">中重度{{ dime == "躯体化" ? "压力" : dime }}</span>
+                  <span class="sex_class"
+                    >中重度{{ dime == "躯体化" ? "压力" : dime }}</span
+                  >
                 </div>
                 <div style="display: flex; flex-direction: column">
-                  <span class="sex_class">:<span style="visibility: hidden;">你</span></span>
-                  <span class="sex_class">:<span style="visibility: hidden;">你</span></span>
-                  <span class="sex_class">:<span style="visibility: hidden;">你</span></span>
+                  <span class="sex_class"
+                    >:<span style="visibility: hidden">你</span></span
+                  >
+                  <span class="sex_class"
+                    >:<span style="visibility: hidden">你</span></span
+                  >
+                  <span class="sex_class"
+                    >:<span style="visibility: hidden">你</span></span
+                  >
                 </div>
                 <div style="display: flex; flex-direction: column">
                   <span class="sex_class1"> {{ subValue }}&nbsp;{{ subAll }}人</span>
-                  <span class="sex_class1" style="background-color: #5470C6;text-align: center;color:#ffffff"> {{ subAll }}人</span>
-                  <span class="sex_class1" style="background-color: #FFAE00;text-align: center;color:#ffffff"> {{ subSingle }}人</span>
+                  <span
+                    class="sex_class1"
+                    style="background-color: #5470c6; text-align: center; color: #ffffff"
+                  >
+                    {{ subAll }}人</span
+                  >
+                  <span
+                    class="sex_class1"
+                    style="background-color: #ffae00; text-align: center; color: #ffffff"
+                  >
+                    {{ subSingle }}人</span
+                  >
                 </div>
 
                 <!-- <div style="display: flex; flex: 1; flex-direction: row">
@@ -458,6 +516,7 @@ import * as echarts from "echarts";
 import PieChart from "@/components/PieChart";
 import BingChart from "@/components/BingChart";
 import BingChart2 from "@/components/BingChart2";
+import { basePath } from "../utils/http";
 export default {
   components: {
     BingChart,
@@ -465,6 +524,7 @@ export default {
   },
   data() {
     return {
+      basePath: basePath,
       //获取计划名称
       planName: "",
       planId: "",
@@ -649,6 +709,35 @@ export default {
     window.removeEventListener("resize", this.echartsAllSize);
   },
   methods: {
+    //导出心理异常的人员
+    funExport() {
+      // this.$http.getDown(
+      //   `/planUser/exportCompletedUserHighRisk?planId=${this.planId}`,
+      //   {},
+      //   (res) => {
+      //     // if (res && res.code == 200) {
+      //     var blob = new Blob([res.data], {
+      //       type: [
+      //         "application/vnd.ms-excel;charset=utf-8", // xls
+      //         "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8", // xlsx
+      //       ],
+      //     });
+      //     //var url = window.URL.createObjectURL(blob);
+      //     //新窗口打开
+      //     var link = document.createElement("a");
+      //     link.href = window.URL.createObjectURL(blob);
+      //     //这个顺属性加了浏览器回闪一下
+      //     // link.target = "_blank";
+      //     link.click();
+      //   }
+      // );
+      //下载
+      let a = document.createElement("a");
+      document.body.appendChild(a);
+      console.log(basePath + `/planUser/exportCompletedUserHighRisk?planId=${this.planId}`)
+      a.setAttribute("href", basePath + `/planUser/exportCompletedUserHighRisk?planId=${this.planId}`);
+      a.click();
+    },
     echartsAllSize() {
       let flag = false;
       setTimeout(() => {
@@ -865,7 +954,7 @@ export default {
       );
     },
     userTypeChange(val) {
-      console.log(this.userType)
+      console.log(this.userType);
       this.pageNum = 1;
       if (val == "心理异常") {
         this.getAbnormalList();
@@ -911,12 +1000,12 @@ export default {
 
     handleCurrentChange(val) {
       this.pageNum = val;
-      if(this.userType=='心理异常'){
+      if (this.userType == "心理异常") {
         this.getAbnormalList();
-      }else if(this.userType=="压力"){
+      } else if (this.userType == "压力") {
         //---
         this.getDimensionPeopleList("躯体化");
-      }else {
+      } else {
         this.getDimensionPeopleList(this.userType);
       }
       // this.searchList();
@@ -1271,13 +1360,12 @@ export default {
 // }
 
 .sex_class1 {
-
   text-align: left;
   margin: 2px;
   line-height: 24px;
 }
 // .sex_class1:after {
-  
+
 //   display: inline-block;
 //   width: 100%;
 //   content: "";

+ 102 - 10
src/components/PlanUserStatus.vue

@@ -14,7 +14,15 @@
             <p v-if="!isView" class="dig_title">编辑计划</p>
             <div slot=""></div>
             <div slot="footer"></div>
-
+            <div style="margin-bottom: 20px;">
+              <el-input v-model="studentName" clearable placeholder="请输入姓名" style="width: 200px;"></el-input
+                >&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
+                <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
+              >搜索</el-button
+            >
+            <el-button type="info" round @click="clearSearch">清空</el-button>
+            </div>
+          
             <div class="table-content">
               <el-table
                 :data="tableData"
@@ -82,16 +90,16 @@
                   width=""
                 >
                 </el-table-column>
-                <!-- <el-table-column label="操作" width="510px" align="center">
+                <el-table-column label="操作" width="" align="center">
                   <template slot-scope="scope">
-                    <div class="detail_button_out">
-                      <div class="detail_button" @click="deleteUser(scope.row)">
-                        <img style="width: 20px" src="../assets/img/table/delete.png" />
-                        <span> 移除 </span>
+                    <div class="detail_button_out" v-show="scope.row.isComplete == '1'&&proDataLin.planStatus=='2'&&scope.row.isReset=='0'">
+                      <div class="detail_button" @click="anewStart(scope.row)">
+                        <img style="width: 18px" src="../assets/img/table/pro.png" />
+                        <span> 重新测试 </span>
                       </div>
                     </div>
                   </template>
-                </el-table-column> -->
+                </el-table-column>
               </el-table>
             </div>
             <el-pagination
@@ -111,6 +119,29 @@
           </div>
         </div>
       </el-dialog>
+
+      <el-dialog
+        class="dig_update"
+        :visible.sync="resetVisible"
+        width="30%"
+        center
+        style="border-radius: 40px"
+      >
+        <div slot="title">
+          <div class="demo-ruleForm">
+            <p  class="dig_title">重新测试</p>
+         
+            <p style="margin-bottom: 40px;text-align: center;">确认重新测试吗?</p>
+            <div class="dig_button">
+              <el-button type="info" round @click="cancleReset()">取消</el-button>
+              <!-- <el-button type="success" round @click="submitForm('ruleForm')"
+                >提交</el-button
+              > -->
+              <el-button type="success" round @click="submitCom()">确定</el-button>
+            </div>
+          </div>
+        </div>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -121,6 +152,11 @@ import md5 from "md5";
 export default {
   data() {
     return {
+      //学生名字
+      studentName:'',
+      //重新测试弹出确认框
+      resetVisible:false,
+
       userVisible: false,
       //编辑返回的值
       userDetailData: {},
@@ -150,6 +186,7 @@ export default {
       userPageNum: 1,
       userTableData: [],
       multipleSelection: [],
+      userNo:''
     };
   },
   mounted() {
@@ -160,6 +197,41 @@ export default {
     // this.ruleForm.type = "3";
   },
   methods: {
+    clearSearch() {
+      this.studentName = "";
+      //搜索的用户编号
+      this.searchTarget();
+    },
+    //取消关闭重新测试框
+    cancleReset(){
+      //关闭弹出框
+      this.resetVisible=false;
+    },
+    //提交确认框
+    submitCom(){
+      //提交进行重新测试
+      //然后重新查询页面列表
+      let url = `/record/resetUserRecord?planId=${this.proDataLin.id}&userNo=${this.userNo}`;
+      this.$http.get(url, {}, (res) => {
+        this.resetVisible=false;
+        if (res && res.code == 200) {
+          //关闭弹出框
+          //调用列表刷线接口
+          //
+          this.$message.success('设置重新测试成功');
+          this.searchList();
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+
+    },
+    anewStart(val){
+      this.userNo=val.userNo
+      //保存选择个人的信息
+      this.resetVisible=true;
+    },
     formaCom(val) {
       if (val.isComplete == "0") {
         return "未完成";
@@ -189,7 +261,6 @@ export default {
     },
     isComUser(val, row) {
       //添加已选用户
-
       let data = [];
       if (val == 1) {
         for (let i = 0; i < this.multipleSelection.length; i++) {
@@ -238,7 +309,8 @@ export default {
     },
     //进来调用已选列表接口
     searchList() {
-      let url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.proDataLin.id}`;
+     
+      let url = `/planUser/findUserProgressByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}&planId=${this.proDataLin.id}&userName=${this.studentName}`;
       this.$http.get(url, {}, (res) => {
         if (res && res.code == 200) {
           this.tableData = res.data.content;
@@ -371,7 +443,7 @@ export default {
 }
 
 .demo-ruleForm /deep/.el-input {
-  width: 100% !important;
+  // width: 100% !important;
 }
 
 .demo-ruleForm /deep/.el-input__inner {
@@ -402,4 +474,24 @@ export default {
     font-weight: 700;
   }
 }
+
+.detail_button_out {
+  display: flex;
+  justify-content: center;
+  .detail_button {
+    display: flex;
+    // margin-left: 20px;
+    align-items: center;
+    cursor: pointer;
+    letter-spacing: 2px;
+    img {
+      width: 15px;
+      margin-right: 5px;
+    }
+    span {
+      color: #00bf78;
+      // font-weight: 600;
+    }
+  }
+}
 </style>

+ 1 - 1
src/views/manage/channelInfo/invite.vue

@@ -803,7 +803,7 @@ export default {
 }
 .detail_button_out {
   display: flex;
-  justify-content: flex-start;
+  justify-content: center;
   .detail_button {
     display: flex;
     margin-left: 20px;

+ 6 - 1
src/views/manage/manageMain.vue

@@ -26,7 +26,12 @@
           "
           src="../../assets/img/commons/jhTop1.png"
         /> -->
-        <p class="aac">郑大计智心理测评系统</p>
+        <!-- <p class="aac">郑大计智</p>
+        <p class="aac">心理测评系统</p> -->
+        <div class="aac" style="display: flex;flex-direction: column;;justify-content: center;align-items: center;">
+           <div>郑大计智</div>
+           <div>心理测评系统</div>
+        </div>
         <!-- <p class="aab"></p> -->
         <!-- <img
           v-show="!isCollapse"