|
@@ -98,7 +98,7 @@
|
|
|
<div class="condition">
|
|
<div class="condition">
|
|
|
<span>入住情况 :</span>
|
|
<span>入住情况 :</span>
|
|
|
<el-select
|
|
<el-select
|
|
|
- clearable
|
|
|
|
|
|
|
+ clearable
|
|
|
v-model="searchInput.status"
|
|
v-model="searchInput.status"
|
|
|
placeholder="请选择入住情况"
|
|
placeholder="请选择入住情况"
|
|
|
>
|
|
>
|
|
@@ -110,7 +110,7 @@
|
|
|
<div class="condition">
|
|
<div class="condition">
|
|
|
<span>是否保留 :</span>
|
|
<span>是否保留 :</span>
|
|
|
<el-select
|
|
<el-select
|
|
|
- clearable
|
|
|
|
|
|
|
+ clearable
|
|
|
v-model="searchInput.retentionState"
|
|
v-model="searchInput.retentionState"
|
|
|
placeholder="请选择是否保留"
|
|
placeholder="请选择是否保留"
|
|
|
>
|
|
>
|
|
@@ -134,14 +134,14 @@
|
|
|
<!-- 按钮列表 -->
|
|
<!-- 按钮列表 -->
|
|
|
<div class="gongneng">
|
|
<div class="gongneng">
|
|
|
<el-button
|
|
<el-button
|
|
|
- v-if="store.BtnRole('dormitoryManagementSetting1')"
|
|
|
|
|
|
|
+ v-if="store.BtnRole('dormitoryManagementSetting1')"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
color="rgba(38, 151, 255, 1)"
|
|
color="rgba(38, 151, 255, 1)"
|
|
|
@click="buildImportBtn"
|
|
@click="buildImportBtn"
|
|
|
>导入</el-button
|
|
>导入</el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
- v-if="store.BtnRole('dormitoryManagementSetting2')"
|
|
|
|
|
|
|
+ v-if="store.BtnRole('dormitoryManagementSetting2')"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
style="margin-left: 0"
|
|
style="margin-left: 0"
|
|
|
color="rgba(48, 201, 191, 1)"
|
|
color="rgba(48, 201, 191, 1)"
|
|
@@ -149,7 +149,7 @@
|
|
|
>导出</el-button
|
|
>导出</el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
- v-if="store.BtnRole('dormitoryManagementSetting3')"
|
|
|
|
|
|
|
+ v-if="store.BtnRole('dormitoryManagementSetting3')"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
style="margin-left: 0"
|
|
style="margin-left: 0"
|
|
|
color="rgba(38, 151, 255, 1)"
|
|
color="rgba(38, 151, 255, 1)"
|
|
@@ -157,7 +157,7 @@
|
|
|
>新增</el-button
|
|
>新增</el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
- v-if="store.BtnRole('dormitoryManagementSetting4')"
|
|
|
|
|
|
|
+ v-if="store.BtnRole('dormitoryManagementSetting4')"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
style="margin-left: 0"
|
|
style="margin-left: 0"
|
|
|
color="rgba(38, 151, 255, 1)"
|
|
color="rgba(38, 151, 255, 1)"
|
|
@@ -165,7 +165,7 @@
|
|
|
>批量保留</el-button
|
|
>批量保留</el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
- v-if="store.BtnRole('dormitoryManagementSetting5')"
|
|
|
|
|
|
|
+ v-if="store.BtnRole('dormitoryManagementSetting5')"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
style="margin-left: 0"
|
|
style="margin-left: 0"
|
|
|
color="rgba(38, 151, 255, 1)"
|
|
color="rgba(38, 151, 255, 1)"
|
|
@@ -258,10 +258,36 @@
|
|
|
>
|
|
>
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div class="options">
|
|
<div class="options">
|
|
|
- <span class="open" v-if="row.retentionState == 1 && store.BtnRole('dormitoryManagementSetting6')" @click="retainS(row, 2)">保留</span>
|
|
|
|
|
- <span class="open" v-if="row.retentionState == 2 && store.BtnRole('dormitoryManagementSetting7')" @click="retainS(row, 1)">开放</span>
|
|
|
|
|
- <span class="edit" v-if="store.BtnRole('dormitoryManagementSetting8')" @click="updateS(row)">编辑</span>
|
|
|
|
|
- <span class="delete" v-if="store.BtnRole('dormitoryManagementSetting9')" @click="deleteS(row)">删除</span>
|
|
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="open"
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ row.retentionState == 1 &&
|
|
|
|
|
+ store.BtnRole('dormitoryManagementSetting6')
|
|
|
|
|
+ "
|
|
|
|
|
+ @click="retainS(row, 2)"
|
|
|
|
|
+ >保留</span
|
|
|
|
|
+ >
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="open"
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ row.retentionState == 2 &&
|
|
|
|
|
+ store.BtnRole('dormitoryManagementSetting7')
|
|
|
|
|
+ "
|
|
|
|
|
+ @click="retainS(row, 1)"
|
|
|
|
|
+ >开放</span
|
|
|
|
|
+ >
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="edit"
|
|
|
|
|
+ v-if="store.BtnRole('dormitoryManagementSetting8')"
|
|
|
|
|
+ @click="updateS(row)"
|
|
|
|
|
+ >编辑</span
|
|
|
|
|
+ >
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="delete"
|
|
|
|
|
+ v-if="store.BtnRole('dormitoryManagementSetting9')"
|
|
|
|
|
+ @click="deleteS(row)"
|
|
|
|
|
+ >删除</span
|
|
|
|
|
+ >
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -307,6 +333,7 @@
|
|
|
>
|
|
>
|
|
|
<el-form-item label="校区名称 :" prop="school">
|
|
<el-form-item label="校区名称 :" prop="school">
|
|
|
<el-select
|
|
<el-select
|
|
|
|
|
+ :disabled="dialongTitle == '编辑寝室信息'"
|
|
|
@change="schoolFormChange"
|
|
@change="schoolFormChange"
|
|
|
v-model="ruleForm.school"
|
|
v-model="ruleForm.school"
|
|
|
clearable
|
|
clearable
|
|
@@ -322,6 +349,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="楼栋名称 :" prop="build">
|
|
<el-form-item label="楼栋名称 :" prop="build">
|
|
|
<el-select
|
|
<el-select
|
|
|
|
|
+ :disabled="dialongTitle == '编辑寝室信息'"
|
|
|
clearable
|
|
clearable
|
|
|
v-model="ruleForm.build"
|
|
v-model="ruleForm.build"
|
|
|
placeholder="请选择楼栋名称"
|
|
placeholder="请选择楼栋名称"
|
|
@@ -344,7 +372,11 @@
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="寝室性别 :" prop="sex">
|
|
<el-form-item label="寝室性别 :" prop="sex">
|
|
|
- <el-select disabled v-model="ruleForm.sex" placeholder="请选择寝室性别">
|
|
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ disabled
|
|
|
|
|
+ v-model="ruleForm.sex"
|
|
|
|
|
+ placeholder="请选择寝室性别"
|
|
|
|
|
+ >
|
|
|
<el-option label="男" value="男" />
|
|
<el-option label="男" value="男" />
|
|
|
<el-option label="女" value="女" />
|
|
<el-option label="女" value="女" />
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -477,7 +509,7 @@ const router = useRouter();
|
|
|
const store = useCounterStore();
|
|
const store = useCounterStore();
|
|
|
|
|
|
|
|
// 为避免解构时失去响应性
|
|
// 为避免解构时失去响应性
|
|
|
-const { name, age, isCollapse, realAge,collegeRole } = storeToRefs(store);
|
|
|
|
|
|
|
+const { name, age, isCollapse, realAge, collegeRole } = storeToRefs(store);
|
|
|
|
|
|
|
|
// 表格数据
|
|
// 表格数据
|
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
@@ -635,7 +667,7 @@ const majorList = async (flag) => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
const collegeList = async () => {
|
|
const collegeList = async () => {
|
|
|
- collegeData.value=collegeRole.value
|
|
|
|
|
|
|
+ collegeData.value = collegeRole.value;
|
|
|
// let res = await https.get("/welcome/api/welcomeOrg/getColleges", "params");
|
|
// let res = await https.get("/welcome/api/welcomeOrg/getColleges", "params");
|
|
|
// console.log(res, "学院数据");
|
|
// console.log(res, "学院数据");
|
|
|
// if (res.code == 200) {
|
|
// if (res.code == 200) {
|
|
@@ -673,24 +705,24 @@ const buildChange = async (val) => {
|
|
|
}
|
|
}
|
|
|
dormitoryList();
|
|
dormitoryList();
|
|
|
};
|
|
};
|
|
|
-const buildFormChange=(val)=>{
|
|
|
|
|
|
|
+const buildFormChange = (val) => {
|
|
|
console.log(val);
|
|
console.log(val);
|
|
|
// 选择楼栋时判断是性别
|
|
// 选择楼栋时判断是性别
|
|
|
- if(val){
|
|
|
|
|
- buildFormData.value.forEach(i=>{
|
|
|
|
|
- if(i.id==val.split(',')[1]){
|
|
|
|
|
- ruleForm.sex=i.sex
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }else{
|
|
|
|
|
- ruleForm.sex=null
|
|
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ buildFormData.value.forEach((i) => {
|
|
|
|
|
+ if (i.id == val.split(",")[1]) {
|
|
|
|
|
+ ruleForm.sex = i.sex;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ruleForm.sex = null;
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
const schoolFormChange = async (val) => {
|
|
const schoolFormChange = async (val) => {
|
|
|
console.log(val);
|
|
console.log(val);
|
|
|
ruleForm.build = null;
|
|
ruleForm.build = null;
|
|
|
- ruleForm.sex=null
|
|
|
|
|
|
|
+ ruleForm.sex = null;
|
|
|
if (!val) {
|
|
if (!val) {
|
|
|
buildFormData.value = null;
|
|
buildFormData.value = null;
|
|
|
return;
|
|
return;
|
|
@@ -726,7 +758,7 @@ const collegeFormChange = async (val) => {
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
let params = {
|
|
let params = {
|
|
|
- accountId:sessionStorage.getItem("accountId"),
|
|
|
|
|
|
|
+ accountId: sessionStorage.getItem("accountId"),
|
|
|
currentPage: currentPage.value, // 当前页
|
|
currentPage: currentPage.value, // 当前页
|
|
|
pageCount: pageSize.value, // 一页数据条数
|
|
pageCount: pageSize.value, // 一页数据条数
|
|
|
schoolId: searchInput.schoolId,
|
|
schoolId: searchInput.schoolId,
|
|
@@ -889,7 +921,7 @@ const batchRetainS = async (title, flag) => {
|
|
|
message: "至少选择一条数据",
|
|
message: "至少选择一条数据",
|
|
|
center: true,
|
|
center: true,
|
|
|
});
|
|
});
|
|
|
- return
|
|
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
ElMessageBox.confirm(`是否${title}数据?`, "提示!!!", {
|
|
ElMessageBox.confirm(`是否${title}数据?`, "提示!!!", {
|
|
|
confirmButtonText: "确认",
|
|
confirmButtonText: "确认",
|
|
@@ -1041,13 +1073,14 @@ const handleCurrentChange = (value) => {
|
|
|
// 楼栋导出
|
|
// 楼栋导出
|
|
|
const buildExportbtn = async () => {
|
|
const buildExportbtn = async () => {
|
|
|
let params = {
|
|
let params = {
|
|
|
|
|
+ accountId: sessionStorage.getItem("accountId"),
|
|
|
schoolId: searchInput.schoolId,
|
|
schoolId: searchInput.schoolId,
|
|
|
buildId: searchInput.buildId,
|
|
buildId: searchInput.buildId,
|
|
|
dormitoryId: searchInput.dormitoryId,
|
|
dormitoryId: searchInput.dormitoryId,
|
|
|
sex: searchInput.sex,
|
|
sex: searchInput.sex,
|
|
|
status: searchInput.status,
|
|
status: searchInput.status,
|
|
|
collegeId: searchInput.collegeId ? searchInput.collegeId : "",
|
|
collegeId: searchInput.collegeId ? searchInput.collegeId : "",
|
|
|
- retentionState:searchInput.retentionState
|
|
|
|
|
|
|
+ retentionState: searchInput.retentionState,
|
|
|
};
|
|
};
|
|
|
let res = await https.getBlob(
|
|
let res = await https.getBlob(
|
|
|
"/welcome/api/welcome-dormitory/welcomeDormitoryExport",
|
|
"/welcome/api/welcome-dormitory/welcomeDormitoryExport",
|