|
|
@@ -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);
|