Procházet zdrojové kódy

新增年份筛选

hzj18279462576@163.com před 4 dny
rodič
revize
0c6b94ae6c

+ 52 - 7
src/views/dataOverview/dataOverview.vue

@@ -18,6 +18,20 @@
             :value="i.id"
           />
         </el-select>
+        <el-select
+          @change="yearChange"
+          clearable
+          v-model="searchInput.yearId"
+          placeholder="请选择年份"
+          style="width: 250px; margin-left: 20px"
+        >
+          <el-option
+            v-for="i in yearData"
+            :key="i.id"
+            :label="i.name"
+            :value="i.id"
+          />
+        </el-select>
       </div>
     </div>
     <!-- 处置情况 -->
@@ -279,6 +293,7 @@ const carSchoolChange = (title) => {
 let registerEcharts = null;
 const searchInput = reactive({
   college: "",
+  yearId:"",
 });
 const studentTotal = ref();
 const studentTotalP = ref();
@@ -300,6 +315,22 @@ const collegeList = async () => {
   }
 };
 
+const yearData=ref([])
+const yearList = async () => {
+  let res = await https.get("/welcome/api/systemSetting/yearDatas", "params");
+  console.log(res, "年份数据");
+  if (res.code == 200) {
+    yearData.value = res.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.message,
+      center: true,
+    });
+  }
+};
+
 // 学院新生报到情况
 let trafficEcharts = null;
 const wayTotal = ref();
@@ -316,11 +347,12 @@ const studentOverview = async () => {
   let params = {
     // accountId: sessionStorage.getItem("accountId"),
     collegeId: searchInput.college,
+    yearId:searchInput.yearId
   };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentOverview",
     "params",
-    params
+    params,
   );
   console.log(res, "处置情况");
   if (res.code == 200) {
@@ -378,12 +410,13 @@ const register = async () => {
   registerEcharts = echarts.init(dom);
   let params = {
     collegeId: searchInput.college,
+    yearId:searchInput.yearId
     // accountId: sessionStorage.getItem("accountId"),
   };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentRegister",
     "params",
-    params
+    params,
   );
   console.log(res, "新生报到情况");
   if (res.code == 200) {
@@ -486,6 +519,13 @@ const collegeChange = () => {
   traffic();
   gender();
 };
+const yearChange = () => {
+  studentOverview();
+  register();
+  levelRegister();
+  traffic();
+  gender();
+};
 
 // 新生报到层次统计
 const levelRegister = async () => {
@@ -494,11 +534,12 @@ const levelRegister = async () => {
   let params = {
     // accountId: sessionStorage.getItem("accountId"),
     collegeId: searchInput.college,
+    yearId:searchInput.yearId
   };
   let res = await https.get(
     "/welcome/api/welcomeStudent/levelRegister",
     "params",
-    params
+    params,
   );
   console.log(res, "新生报到层次统计");
   if (res.code == 200) {
@@ -518,7 +559,7 @@ const levelRegister = async () => {
     const arr = sortedData.sort((a, b) => {
       return customOrder.indexOf(a.name) - customOrder.indexOf(b.name);
     });
-    console.log(sortedData,"整合数据");
+    console.log(sortedData, "整合数据");
 
     let manTotal = 0;
     arr.forEach((i) => {
@@ -679,11 +720,12 @@ const traffic = async () => {
   let params = {
     // accountId: sessionStorage.getItem("accountId"),
     collegeId: searchInput.college,
+    yearId:searchInput.yearId
   };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentTraffic",
     "params",
-    params
+    params,
   );
   console.log(res, "学生交通方式");
   if (res.code == 200) {
@@ -771,11 +813,12 @@ const gender = async () => {
   let params = {
     // accountId: sessionStorage.getItem("accountId"),
     collegeId: searchInput.college,
+    yearId:searchInput.yearId
   };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentSexRatio",
     "params",
-    params
+    params,
   );
   console.log(res, "学生性别比例");
   if (res.code == 200) {
@@ -876,11 +919,12 @@ const studentStay = async () => {
   let params = {
     // accountId: sessionStorage.getItem("accountId"),
     collegeId: searchInput.college,
+    yearId:searchInput.yearId
   };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentStay",
     "params",
-    params
+    params,
   );
   console.log(res, "学生住宿情况");
   if (res.code == 200) {
@@ -917,6 +961,7 @@ onMounted(() => {
   gender();
   studentStay();
   collegeList();
+  yearList()
   window.addEventListener("resize", updateChartSize);
 });
 

+ 34 - 0
src/views/quarterage/quarterage.vue

@@ -38,6 +38,21 @@
               <el-option label="女" value="女" />
             </el-select>
           </div>
+          <div class="condition">
+            <span>年份 :</span>
+            <el-select
+              clearable
+              v-model="searchInput.yearId"
+              placeholder="请选择年份"
+            >
+              <el-option
+                v-for="i in yearData"
+                :key="i.id"
+                :label="i.name"
+                :value="i.id"
+              />
+            </el-select>
+          </div>
           <el-button
             style="margin-left: 20px"
             color="rgba(38, 151, 255, 1)"
@@ -190,10 +205,12 @@ const tableData = reactive({
 const searchInput = reactive({
   sex: "",
   collegeId: "",
+  yearId:""
 }); // 搜索按钮数据
 
 // 学院
 const collegeData = ref([]);
+const yearData = ref([]);
 
 const collegeList = async () => {
   collegeData.value = collegeRole.value;
@@ -210,12 +227,27 @@ const collegeList = async () => {
   //   });
   // }
 };
+const yearList = async () => {
+  let res = await https.get("/welcome/api/systemSetting/yearDatas", "params");
+  console.log(res, "年份数据");
+  if (res.code == 200) {
+    yearData.value = res.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.message,
+      center: true,
+    });
+  }
+};
 // 获取账户列表
 const getList = async () => {
   loading.value = true;
   let params = {
     collegeId: searchInput.collegeId,
     sex: searchInput.sex,
+    yearId:searchInput.yearId
   };
   let res = null;
   if (activeName.value == "first") {
@@ -283,6 +315,7 @@ const buildExportbtn = async () => {
   let params = {
     sex: searchInput.sex,
     collegeId: searchInput.collegeId,
+    yearId:searchInput.yearId
   };
   let res = null;
   let name = null;
@@ -322,6 +355,7 @@ const buildExportbtn = async () => {
 onBeforeMount(() => {
   getList();
   collegeList();
+  yearList()
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);

+ 44 - 8
src/views/student/student.vue

@@ -111,6 +111,21 @@
               style="width: 180px"
             />
           </div>
+          <div class="condition">
+            <span>年份 :</span>
+            <el-select
+              clearable
+              v-model="searchInput.yearId"
+              placeholder="请选择年份"
+            >
+              <el-option
+                v-for="i in yearData"
+                :key="i.id"
+                :label="i.name"
+                :value="i.id"
+              />
+            </el-select>
+          </div>
           <el-button
             style="margin-left: 20px"
             color="rgba(38, 151, 255, 1)"
@@ -126,7 +141,7 @@
         <!-- 按钮列表 -->
         <div class="gongneng">
           <el-button
-          v-if="store.BtnRole('studentAccommodationSetting1')"
+            v-if="store.BtnRole('studentAccommodationSetting1')"
             type="primary"
             style="margin-left: 0"
             color="rgba(48, 201, 191, 1)"
@@ -249,7 +264,7 @@ const router = useRouter();
 const store = useCounterStore();
 
 // 为避免解构时失去响应性
-const { name, age, isCollapse, realAge,collegeRole } = storeToRefs(store);
+const { name, age, isCollapse, realAge, collegeRole } = storeToRefs(store);
 
 // 表格数据
 const loading = ref(false);
@@ -266,6 +281,7 @@ const searchInput = reactive({
   majorId: null,
   collegeId: null,
   classstrId: null,
+  yearId: null,
 }); // 搜索按钮数据
 
 const currentPage = ref(1); // 当前页
@@ -317,6 +333,8 @@ const collegeData = ref([]);
 const majorData = ref([]);
 // 班级
 const classstrData = ref([]);
+// 年份
+const yearData = ref([]);
 
 const schoolList = async () => {
   let res = await https.get("/welcome/api/welcome-build/schoolGroup", "params");
@@ -341,7 +359,7 @@ const buildList = async (flag) => {
     // "/welcome/api/welcome-build/buildGroup",
     "/welcome/api/welcome-dormitory/saveBedBuildGroup",
     "params",
-    params
+    params,
   );
   console.log(res, "楼栋数据");
   if (res.code == 200) {
@@ -363,7 +381,7 @@ const dormitoryList = async (flag) => {
   let res = await https.get(
     "/welcome/api/welcome-dormitory/dormitoryGroup",
     "params",
-    params
+    params,
   );
   console.log(res, "寝室号数据");
   if (res.code == 200) {
@@ -399,7 +417,7 @@ const majorList = async (flag) => {
   let res = await https.get(
     "/welcome/api/welcomeOrg/getMajors",
     "params",
-    params
+    params,
   );
   console.log(res, "专业数据");
   if (res.code == 200) {
@@ -420,7 +438,7 @@ const classstrList = async (flag) => {
   let res = await https.get(
     "/welcome/api/welcomeOrg/getClasss",
     "params",
-    params
+    params,
   );
   console.log(res, "班级数据");
   if (res.code == 200) {
@@ -434,6 +452,20 @@ const classstrList = async (flag) => {
     });
   }
 };
+const yearList = async () => {
+  let res = await https.get("/welcome/api/systemSetting/yearDatas", "params");
+  console.log(res, "年份数据");
+  if (res.code == 200) {
+    yearData.value = res.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.message,
+      center: true,
+    });
+  }
+};
 
 const schoolChange = async (val) => {
   console.log(val);
@@ -502,12 +534,13 @@ const getList = async () => {
     majorId: searchInput.majorId,
     classstrId: searchInput.classstrId,
     name: searchInput.name,
+    yearId: searchInput.yearId,
   };
 
   let res = await https.get(
     "/welcome/api/welcomeBed/studentAccommodationPage",
     "params",
-    params
+    params,
   );
   console.log(res, "床位信息");
   if (res.code == 200) {
@@ -542,6 +575,7 @@ const resetBtn = lodash.debounce(async () => {
   majorData.value = [];
   searchInput.classstrId = null;
   classstrData.value = [];
+  searchInput.yearId=null
   getList();
 }, 300);
 
@@ -584,11 +618,12 @@ const buildExportbtn = async () => {
     collegeId: searchInput.collegeId,
     majorId: searchInput.majorId,
     classstrId: searchInput.classstrId,
+    yearId: searchInput.yearId,
   };
   let res = await https.getBlob(
     "/welcome/api/welcomeBed/studentAccommodationListExport",
     "params",
-    params
+    params,
   );
   console.log(res, "学生住宿信息");
   let name = `学生住宿信息`;
@@ -612,6 +647,7 @@ onBeforeMount(() => {
   getList();
   schoolList();
   collegeList();
+  yearList()
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);

+ 35 - 0
src/views/studentInfo/studentInfo.vue

@@ -157,6 +157,21 @@
               @clear="searchBtn"
             />
           </div>
+          <div class="condition">
+            <span>年份 :</span>
+            <el-select
+              clearable
+              v-model="searchInput.yearId"
+              placeholder="请选择年份"
+            >
+              <el-option
+                v-for="i in yearData"
+                :key="i.id"
+                :label="i.name"
+                :value="i.id"
+              />
+            </el-select>
+          </div>
           <el-button
             style="margin-left: 20px"
             color="rgba(38, 151, 255, 1)"
@@ -1937,6 +1952,8 @@ const schoolData = ref([]);
 const buildData = ref([]);
 const dormitoryData = ref([]);
 const bedData = ref([]);
+// 年份
+const yearData = ref([]);
 
 const schoolList = async () => {
   let res = await https.get("/welcome/api/welcome-build/schoolGroup", "params");
@@ -2016,6 +2033,20 @@ const bedList = async () => {
     });
   }
 };
+const yearList = async () => {
+  let res = await https.get("/welcome/api/systemSetting/yearDatas", "params");
+  console.log(res, "年份数据");
+  if (res.code == 200) {
+    yearData.value = res.data;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.message,
+      center: true,
+    });
+  }
+};
 
 const schoolChange = (val) => {
   ruleForm.build = null;
@@ -2081,6 +2112,7 @@ const getList = async () => {
     school: searchInput.schoolId,
     batchValue: searchInput.batchValue,
     carNumber: searchInput.carNumber,
+    yearId: searchInput.yearId,
   };
   console.log(params);
 
@@ -2125,6 +2157,7 @@ const resetBtn = lodash.debounce(async () => {
   searchInput.schoolId=null
   searchInput.batchValue=null
   searchInput.carNumber=null
+  searchInput.yearId=null
   getList();
 }, 300);
 
@@ -2817,6 +2850,7 @@ const buildExportbtn = async () => {
     school: searchInput.schoolId,
     batchValue: searchInput.batchValue,
     carNumber: searchInput.carNumber,
+    yearId: searchInput.yearId,
   };
   let res = await https.getBlob(
     "/welcome/api/welcomeStudent/welcomeStudentExport",
@@ -2937,6 +2971,7 @@ onBeforeMount(() => {
   schoolList(); // 校区
   provinceList(); // 省
   arriveList(); // 时间段
+  yearList()
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);