Переглянути джерело

Merge branch 'master' of http://101.43.129.26:10880/psychological_camera/cpdm_manage

root 1 місяць тому
батько
коміт
8a4be406e2

+ 39 - 10
src/components/PlanRegister.vue

@@ -32,7 +32,7 @@
               class="form_main"
             >
               <el-form-item label="计划名称" prop="planName">
-                <el-input v-model="ruleForm.planName" ></el-input>
+                <el-input v-model="ruleForm.planName"></el-input>
               </el-form-item>
               <el-form-item label="结束时间" prop="endTime">
                 <el-date-picker
@@ -52,7 +52,7 @@
                     <el-select
                       :collapse-tags="true"
                       multiple
-                      placeholder="请选择"
+                      placeholder="请选择年级"
                       v-model="grade"
                       clearable
                       filterable
@@ -86,9 +86,8 @@
                   </el-col>
                 </el-row>
               </el-form-item>
-              <div style="display: flex;"> 
+              <div style="display: flex">
                 <el-form-item label="组织架构" prop="checkedList">
-                 
                   <el-tree
                     :data="treeData"
                     show-checkbox
@@ -100,7 +99,13 @@
                   >
                   </el-tree>
                 </el-form-item>
-                <el-button type="info" style="height: 100%;margin-top:20px" round @click="clearDataOrg()">清空组织架构</el-button>
+                <el-button
+                  type="info"
+                  style="height: 100%; margin-top: 20px"
+                  round
+                  @click="clearDataOrg()"
+                  >清空组织架构</el-button
+                >
               </div>
 
               <!-- <el-button @click="getCheckedNodes"> 获取已选 </el-button> -->
@@ -468,6 +473,31 @@ export default {
           if (res && res.code == 200) {
             //将值赋值给list
             if (res.data.length > 0) {
+              //选择出来需要的级
+              //--------------------------------开始
+              let list = [];
+              for (let i = 0; i < res.data.length; i++) {
+                if (res.data[i].extend !== null && res.data[i].extend !== "") {
+                  let obj = {
+                    value: res.data[i].extend,
+                    label: res.data[i].extend + "级",
+                  };
+                  list.push(obj);
+                }
+              }
+              //存储最新的
+              let listTT = [];
+              //储存最后过滤数据
+              let listTMP = [];
+              //过滤重复数据
+              listTMP = list.filter((item, index, arr) => {
+                if (listTT.indexOf(item.label) == -1) {
+                  listTT.push(item.label);
+                  return true;
+                }
+              });
+              this.gradeOption = listTMP.reverse();
+              //--------------------------------结束
               let resAdd = this.addPro(res.data);
               this.ppData = JSON.parse(JSON.stringify(resAdd));
               let forRes = this.arrToTree(resAdd);
@@ -549,7 +579,6 @@ export default {
             item.isAdd = false;
           }
         }
-
         if (item.children && item.children.length) {
           //
           this.markersFun(item.children, level + 1);
@@ -570,7 +599,7 @@ export default {
         //
         let obj = {
           value: i + "",
-          label: i + "",
+          label: i + "",
         };
         list.push(obj);
       }
@@ -609,7 +638,7 @@ export default {
       this.dialogVisible = true;
       this.isView = val;
       //获取渠道信息
-      this.getGradeFun();
+      // this.getGradeFun();
       this.getChannel();
       this.getTeacher();
       this.queryStudentTemp();
@@ -639,7 +668,7 @@ export default {
       this.ruleForm.checkboxGroup2 = [];
       this.$refs["ruleForm"].clearValidate();
       this.userDetailData = val;
-      this.getGradeFun();
+      // this.getGradeFun();
       this.getChannel();
       this.getTeacher();
       this.queryStudentTemp();
@@ -679,7 +708,7 @@ export default {
         }
       });
     },
-    clearDataOrg(){
+    clearDataOrg() {
       this.grade = [];
       this.instructor = [];
       this.$refs.tree.setCheckedKeys([]);

+ 136 - 32
src/components/PlanReport.vue

@@ -53,26 +53,33 @@
                 align="center"
                 width=""
               >
-              <template slot-scope="scope">
-                    <div v-if="scope.row.isComplete == '0'" style="color: #ff7800">
-                      未开始
-                    </div>
+                <template slot-scope="scope">
+                  <div v-if="scope.row.isComplete == '0'" style="color: #ff7800">
+                    未开始
+                  </div>
 
-                    <div v-if="scope.row.isComplete == '1'" style="color: #333333">
-                      已完成
-                    </div>
-                  </template>
+                  <div v-if="scope.row.isComplete == '1'" style="color: #333333">
+                    已完成
+                  </div>
+                </template>
               </el-table-column>
             </el-table>
+            <!-- complatePageSize: 10,
+      //未完成的分页--第几页
+      complatePageNum: 1,
+      //未完成的数据
+      complateTableData: [],
+      //未完成的总条数
+      complateTotal: 0, -->
             <el-pagination
               class="pag_class"
               background
-              @current-change="handleCurrentChange"
-              :current-page.sync="pageNum"
+              @current-change="complateHandleCurrentChange"
+              :current-page.sync="complatePageNum"
               layout="total, prev, pager, next"
-              :page-size="pageSize"
+              :page-size="complatePageSize"
               :page-sizes="[10, 20, 50, 100]"
-              :total="total"
+              :total="complateTotal"
             >
             </el-pagination>
           </div>
@@ -103,11 +110,11 @@
         </div>
         <div class="table-content">
           <el-form :inline="true" class="demo-form-inline">
-            <el-form-item label="人员类型">
+            <el-form-item label="维度占比">
               <el-select
                 v-model="userType"
                 @change="userTypeChange"
-                placeholder="请选择人员类型"
+                placeholder="请选择维度占比"
               >
                 <el-option label="焦虑" value="焦虑"></el-option>
                 <el-option label="抑郁" value="抑郁"></el-option>
@@ -143,7 +150,6 @@
               width=""
             >
             </el-table-column>
-        
           </el-table>
         </div>
         <el-pagination
@@ -157,6 +163,17 @@
           :total="total"
         >
         </el-pagination>
+        <div
+          style="
+            text-align: center;
+            font-size: 14px;
+            font-weight: 600;
+            margin-bottom: 40px;
+            margin-top: 40px;
+          "
+        >
+          已完成人数中各个维度人员情况
+        </div>
         <el-form :inline="true" class="demo-form-inline">
           <el-form-item label="维度选择">
             <el-select
@@ -170,21 +187,30 @@
                 :label="item.paramName"
                 :value="item.paramValue"
               ></el-option>
-              <!-- <el-option label="抑郁" value="抑郁"></el-option>
-              <el-option label="压力" value="躯体化"></el-option>
-              <el-option label="精神障碍" value="精神障碍"></el-option> -->
-              <!-- collapse-tags -->
             </el-select>
           </el-form-item>
-          <el-form-item label="组织架构选择">
+          <!-- @change="userDimensionality" -->
+          <el-form-item label="年级选择">
+            <el-select v-model="grade" placeholder="请选择年级" @change="gradeChange" >
+              <el-option
+                v-for="item in gradeList"
+                :key="item.id"
+                :label="item == '全部' ? '' : item + '级'"
+                :value="item"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="组织架构选择" class="org_class">
             <el-select
+             width="300px"
               multiple
               v-model="orgName"
+           
               @change="userOrgName"
               placeholder="请选择组织架构"
             >
               <el-option
-                style="width: 200px"
+                style="width: 300px"
                 v-for="item in orgList"
                 :key="item.id"
                 :label="item.orgName"
@@ -237,8 +263,6 @@
           </el-table-column>
           <el-table-column prop="orgName" label="所属组织架构" align="center" width="">
           </el-table-column>
-          <el-table-column prop="dimensionSymptom" label="症状" align="center" width="">
-          </el-table-column>
           <el-table-column
             prop="dimensionName"
             label="维度"
@@ -247,6 +271,8 @@
             width=""
           >
           </el-table-column>
+          <el-table-column prop="dimensionSymptom" label="症状" align="center" width="">
+          </el-table-column>
         </el-table>
         <el-pagination
           class="pag_class"
@@ -335,6 +361,8 @@ export default {
       //未完成的总条数
       complateTotal: 0,
       abnormalNum: 0,
+      grade: "",
+      gradeList: [],
     };
   },
   mounted() {
@@ -383,6 +411,10 @@ export default {
     // myChart.setOption(option_bing);
   },
   methods: {
+    //年级改变参数
+    gradeChange(val) {
+      this.getOrgList(val);
+    },
     //格式化页面数据
     forDimen(row) {
       if (row.dimensionName == "躯体化") {
@@ -399,7 +431,7 @@ export default {
       //调用统计
       let params = {
         dimensionName: this.dime,
-        orgList: [],
+        orgList: this.orgName,
         planId: this.planId,
         quesType: this.tabName,
         quesValue: this.subValue,
@@ -421,7 +453,7 @@ export default {
     userOrgName() {
       let params = {
         dimensionName: this.dime,
-        orgList: [],
+        orgList: this.orgName,
         planId: this.planId,
         quesType: this.tabName,
         quesValue: this.subValue,
@@ -442,13 +474,28 @@ export default {
       this.isScore();
       this.searchTarget();
       //个维度异常初次调用
-
+      this.queryGrade();
       //获取维度列表
       this.getDimensionList();
       //获取组织架构信息
-      this.getOrgList();
     },
+    //查询计划下年级
+    queryGrade() {
+      this.$http.get(`/planOrg/findPlanGrade?planId=${this.planId}`, {}, (res) => {
+        if (res && res.code == 200) {
+          this.gradeList = res.data;
+
+          this.gradeList.unshift("全部");
+          this.grade = res.data[0];
+          this.getOrgList(this.grade);
 
+          // this.orgName = [res.data[0].orgNo];
+          // this.orgList = res.data;
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
     //管理端统计完成情况
     isFin() {
       //调用接口返回信息
@@ -555,6 +602,11 @@ export default {
       //将首页重置为1时---且总条数变化
       //设置为当前总条数
     },
+    complateHandleCurrentChange(val) {
+      this.complatePageNum=val
+      this.getUnCompleteList();
+    },
+
     handleCurrentChange(val) {
       this.pageNum = val;
       this.searchList();
@@ -639,16 +691,44 @@ export default {
       });
     },
     //组织架构选择--
-    getOrgList() {
+    getOrgList1() {
       this.$http.get(`/planOrg/findAllByPlanId?planId=${this.planId}`, {}, (res) => {
         if (res && res.code == 200) {
-          this.orgName = [res.data[0].orgNo];
-          this.orgList = res.data;
+          if (res.data.length > 0) {
+            let list = [];
+            for (let i = 0; i < res.data.length; i++) {
+              list.push(res.data[i].orgNo);
+            }
+            this.orgName = list;
+            this.orgList = res.data;
+          }
         } else {
           this.$message.error(res.msg);
         }
       });
     },
+    getOrgList(val) {
+      let url = "";
+      if (val == "全部") {
+        this.getOrgList1();
+      } else {
+        url = `/planOrg/findPlanGradeOrg?planId=${this.planId}&grade=${val}`;
+        this.$http.get(url, {}, (res) => {
+          if (res && res.code == 200) {
+            if (res.data.length > 0) {
+              let list = [];
+              for (let i = 0; i < res.data.length; i++) {
+                list.push(res.data[i].orgNo);
+              }
+              this.orgName = list;
+            }
+            this.orgList = res.data;
+          } else {
+            this.$message.error(res.msg);
+          }
+        });
+      }
+    },
     //获取维度下变的子项维度
     getSexList() {
       this.$http.get(`/param/findAllByType?type=ques`, {}, (res) => {
@@ -670,7 +750,7 @@ export default {
           this.subValue = res.data[0];
           let params = {
             dimensionName: this.dime,
-            orgList: [],
+            orgList: this.orgName,
             planId: this.planId,
             quesType: this.tabName,
             quesValue: this.subValue,
@@ -726,7 +806,6 @@ export default {
         {},
         (res) => {
           if (res && res.code == 200) {
-            debugger;
             this.subData = res.data.content;
             this.subTotal = res.data.totalElements;
             //调用接口开始查询选择的列表
@@ -748,6 +827,31 @@ export default {
 .el-tabs__content {
   display: contents !important;
 }
+.org_class>>>.el-select-dropdown.is-multiple .el-select-dropdown__item {
+
+width: 300px !important;
+}
+.org_class>>>.el-select-dropdown__item {
+
+width: 300px !important;
+}
+</style>
+<style scoped>
+.org_class>>>.el-input__inner {
+  width: 300px !important;
+}
+.org_class>>>.el-input {
+  width: 300px;
+}
+.org_class>>>.el-select-dropdown.is-multiple .el-select-dropdown__item {
+
+    width: 300px !important;
+}
+.org_class>>>.el-select-dropdown__item {
+
+    width: 300px !important;
+}
+
 </style>
 <style lang="less" scoped>
 .pag_class /deep/ .el-input__inner {

+ 0 - 12
src/views/manage/channelInfo/invite.vue

@@ -8,7 +8,6 @@
               <el-input v-model="planName" clearable placeholder="请输入名称"></el-input
               >&nbsp;&nbsp;&nbsp;&nbsp;
             </div>
-
             <el-select v-model="planStatus" clearable placeholder="请选择状态">
               <el-option
                 v-for="item in options"
@@ -19,16 +18,6 @@
               </el-option>
             </el-select>
             &nbsp;&nbsp;&nbsp;&nbsp;
-
-            <!-- <el-select v-model="channel" placeholder="请选择所属组织架构">
-              <el-option
-                :label="item.name"
-                :value="item.id"
-                v-for="item in channelList"
-                :key="item.id"
-              ></el-option> 
-            </el-select> -->
-
             &nbsp;&nbsp;&nbsp;&nbsp;
             <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
               >搜索</el-button
@@ -624,7 +613,6 @@ export default {
       }${this.planStatus == "" ? "" : `&planStatus=${this.planStatus}`}`;
       this.$http.get(url, {}, (res) => {
         if (res && res.code == 200) {
-          debugger;
           this.tableData = res.data.content;
           this.total = res.data.totalElements;
         } else {

+ 4 - 4
src/views/manage/channelInfo/orderSettlement.vue

@@ -18,7 +18,7 @@
       <div class="tips">
         <el-form :model="ruleForm" ref="ruleForm" :rules="rules" class="demo-ruleForm">
           <el-form-item
-            label="所属"
+            label="所属年级"
             prop="grade"
             class="imput_com"
             v-show="isShowGrade"
@@ -26,7 +26,7 @@
             <el-select
               v-model="ruleForm.grade"
               clearable
-              placeholder="请选择所属"
+              placeholder="请选择所属年级"
               style="width: 100%"
             >
               <el-option
@@ -118,7 +118,7 @@ export default {
       },
       rules: {
         orgName: [{ required: true, message: "请输入组织名称", trigger: "blur" }],
-        grade: [{ required: true, message: "请选择届数", trigger: "change" }],
+        grade: [{ required: true, message: "请选择年级", trigger: "change" }],
       },
       shareholderTypeOptions: [
         {
@@ -169,7 +169,7 @@ export default {
         //
         let obj = {
           value: i + "",
-          label: i + "",
+          label: i + "",
         };
         list.push(obj);
       }

+ 4 - 3
src/views/manage/channelManagement/channelManagement.vue

@@ -207,12 +207,12 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="选择" v-show="dimensionality == '1'">
-              <el-select v-model="grade" placeholder="请选择">
+            <el-form-item label="选择年级" v-show="dimensionality == '1'">
+              <el-select v-model="grade" placeholder="请选择年级">
                 <el-option
                   v-for="item in gradeList"
                   :key="item.id"
-                  :label="item"
+                  :label="item+'级'"
                   :value="item"
                 ></el-option>
               </el-select>
@@ -400,6 +400,7 @@ export default {
         if (res && res.code == 200) {
           this.grade = res.data[0];
           this.gradeList = res.data;
+          debugger;
           // this.orgName = [res.data[0].orgNo];
           // this.orgList = res.data;
         } else {