Browse Source

修改测试计划

plg 1 month ago
parent
commit
cd53211415
2 changed files with 126 additions and 9 deletions
  1. 123 6
      src/components/PlanReport.vue
  2. 3 3
      src/components/pieChart.vue

+ 123 - 6
src/components/PlanReport.vue

@@ -102,17 +102,61 @@
         <el-form :inline="true" class="demo-form-inline">
         <el-form :inline="true" class="demo-form-inline">
           <el-form-item label="维度选择">
           <el-form-item label="维度选择">
             <el-select
             <el-select
-              v-model="userType"
+              v-model="dime"
               @change="userDimensionality"
               @change="userDimensionality"
               placeholder="请选择维度"
               placeholder="请选择维度"
             >
             >
-              <el-option label="焦虑" value="焦虑"></el-option>
-              <el-option label="抑郁" value="抑郁"></el-option>
+              <el-option
+                v-for="item in dimeList"
+                :key="item.id"
+                :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>
-              <el-option label="精神障碍" value="精神障碍"></el-option>
+              <el-option label="精神障碍" value="精神障碍"></el-option> -->
+            </el-select>
+          </el-form-item>
+          <el-form-item label="组织架构选择">
+            <el-select
+              v-model="orgName"
+              @change="userOrgName"
+              placeholder="请选择组织架构"
+            >
+              <el-option
+                v-for="item in orgList"
+                :key="item.id"
+                :label="item.orgName"
+                :value="item.orgNo"
+              ></el-option>
+              <!-- <el-option label="抑郁" value="抑郁"></el-option>
+              <el-option label="压力" value="躯体化"></el-option>
+              <el-option label="精神障碍" value="精神障碍"></el-option> -->
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
+        <el-tabs type="border-card" @tab-click="tabFun">
+          <el-tab-pane v-for="item in subDimeList" :key="item.id" :label="item.paramName">
+          <!-- {{item.paramName}} -->
+          <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label="维度选择">
+            <el-select
+              v-model="dime"
+              @change="userDimensionality"
+              placeholder="请选择维度"
+            >
+              <el-option
+                v-for="item in dimeList"
+                :key="item.id"
+                :label="item.paramName"
+                :value="item.paramValue"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+          
+          </el-tab-pane>
+        </el-tabs>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
 
 
@@ -151,7 +195,17 @@ export default {
       options6: [],
       options6: [],
       completeNum: 0,
       completeNum: 0,
       unComplete: 0,
       unComplete: 0,
-      userType: "",
+      userType: "未完成",
+      //维度选择--字段
+      dime: "焦虑",
+      dimeList: [],
+
+      //组织架构列表
+      orgList: [],
+      //组织编号name
+      orgName: "",
+      //子维度的列表
+      subDimeList:[],
       dimensionName: "",
       dimensionName: "",
     };
     };
   },
   },
@@ -201,16 +255,35 @@ export default {
     // myChart.setOption(option_bing);
     // myChart.setOption(option_bing);
   },
   },
   methods: {
   methods: {
+    //tab状态改变
+    tabFun(a) {
+      console.log(a)
+      //根据已选的tab --- 
+      //根据已选的value--
+      //开始查询下边的小项
+
+      //根据点击的name---查询里边的选项
+      //查询出来  下边的选项
+
+      
+    },
+    //组织架构--选择变化
+    userOrgName() {},
+    //维度选择
     userDimensionality() {},
     userDimensionality() {},
     open(val) {
     open(val) {
       this.planId = val.id;
       this.planId = val.id;
       this.planName = val.planName;
       this.planName = val.planName;
-      this.userType = "";
+      this.userType = "未完成";
       this.pageNum = 1;
       this.pageNum = 1;
       this.dialogVisible = true;
       this.dialogVisible = true;
       this.isFin();
       this.isFin();
       this.isScore();
       this.isScore();
       this.searchTarget();
       this.searchTarget();
+      //获取维度列表
+      this.getDimensionList();
+      //获取组织架构信息
+      this.getOrgList();
     },
     },
 
 
     //管理端统计完成情况
     //管理端统计完成情况
@@ -379,6 +452,50 @@ export default {
         }
         }
       );
       );
     },
     },
+    //查询维度选择框
+    getDimensionList() {
+      this.$http.get(`/param/findAllByType?type=dimension`, {}, (res) => {
+        if (res && res.code == 200) {
+          this.dimeList = res.data;
+          this.getSexList();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //组织架构选择--
+    getOrgList() {
+      this.$http.get(`/planOrg/findAllByPlanId?planId=${this.planId}`, {}, (res) => {
+        if (res && res.code == 200) {
+          debugger;
+          this.orgList = res.data;
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //获取维度下变的子项维度
+    getSexList() {
+      this.$http.get(`/param/findAllByType?type=ques`, {}, (res) => {
+        if (res && res.code == 200) {
+          debugger;
+          this.subDimeList = res.data;
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //获取子维度的下边的选项
+    getSubOption(val){
+      this.$http.get(`/questionnaire/findListById?id=${val}`, {}, (res) => {
+        if (res && res.code == 200) {
+          debugger;
+          
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
   },
   },
 };
 };
 </script>
 </script>

+ 3 - 3
src/components/pieChart.vue

@@ -58,11 +58,11 @@ export default {
             },
             },
           },
           },
           {
           {
-            text: pieData[0].value==0?'未有人测试' :'((pieData[1].value /pieData[0].value)*100).toFixed(2)+'%'',
+            text: pieData[0].value==0?'未有人测试' :((pieData[1].value /pieData[0].value)*100).toFixed(2)+'%',
             x: "center",
             x: "center",
             y: "center",
             y: "center",
             textStyle: {
             textStyle: {
-              fontSize: "20",
+              fontSize: "14",
               color: "#000000",
               color: "#000000",
               fontFamily: "DINAlternate-Bold, DINAlternate",
               fontFamily: "DINAlternate-Bold, DINAlternate",
               foontWeight: "600",
               foontWeight: "600",
@@ -71,7 +71,7 @@ export default {
         ],
         ],
         backgroundColor: "#ffffff",
         backgroundColor: "#ffffff",
         polar: {
         polar: {
-          radius: ["42%", "52%"],
+          radius: ["42%", "52%"], 
           center: ["50%", "50%"],
           center: ["50%", "50%"],
         },
         },
         angleAxis: {
         angleAxis: {