|
@@ -89,6 +89,7 @@
|
|
|
type="text"
|
|
|
v-model="searchQuery"
|
|
|
placeholder="搜索学校"
|
|
|
+ @change="ajax_org_check"
|
|
|
class="table_find"
|
|
|
/>
|
|
|
</div>
|
|
@@ -111,6 +112,25 @@
|
|
|
{{ org.name }}
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
+
|
|
|
+ <el-select
|
|
|
+ style="margin-left: 10px"
|
|
|
+ v-model="selReg"
|
|
|
+ placeholder="请选择区域"
|
|
|
+ class="custom-select"
|
|
|
+ @change="ajax_org_check"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(org, index) in regionCList"
|
|
|
+ :key="index"
|
|
|
+ :label="org.name"
|
|
|
+ :value="org.name"
|
|
|
+ >
|
|
|
+ {{ org.name }}
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
<div class="table_down">
|
|
|
<div v-if="cn_org">
|
|
@@ -361,11 +381,44 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 区域 -->
|
|
|
+ <div class="el-form-item">
|
|
|
+ <label class="el-form-item__label" style="width: 100px"
|
|
|
+ >区域</label
|
|
|
+ >
|
|
|
+ <div class="el-form-item__content" style="margin-left: 5px">
|
|
|
+ <span>
|
|
|
+ <div class="add_input el-input el-input--suffix">
|
|
|
+ <!-- <el-form
|
|
|
+ :model="school"
|
|
|
+ ref="form"
|
|
|
+ > -->
|
|
|
+ <el-select
|
|
|
+ v-model="regionC"
|
|
|
+ placeholder="请选择区域"
|
|
|
+ class="custom-select"
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(org, index) in regionCList"
|
|
|
+ :key="index"
|
|
|
+ :label="org.name"
|
|
|
+ :value="org.name"
|
|
|
+ >
|
|
|
+ {{ org.name }}
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- </el-form> -->
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</form>
|
|
|
</div>
|
|
|
<!-- 按钮区域 -->
|
|
|
<div slot="footer" class="el-dialog__footer">
|
|
|
- <el-button @click="add_school_dialog = false">取 消</el-button>
|
|
|
+ <el-button @click="close_add_school">取 消</el-button>
|
|
|
<el-button type="primary" @click="ajax_add_school">确认</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -374,7 +427,7 @@
|
|
|
title="新增组织"
|
|
|
class="table"
|
|
|
:visible.sync="add_org_dialog"
|
|
|
- :before-close="close_add_org"
|
|
|
+ :before-close="close_add_school"
|
|
|
width="700px"
|
|
|
>
|
|
|
<div class="el_dialog_org_content">
|
|
@@ -416,6 +469,38 @@
|
|
|
</div>
|
|
|
</span>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <!-- 区域 -->
|
|
|
+ <div class="el-form-item">
|
|
|
+ <label class="el-form-item__label" style="width: 100px"
|
|
|
+ >区域</label
|
|
|
+ >
|
|
|
+ <div class="el-form-item__content" style="margin-left: 5px">
|
|
|
+ <span>
|
|
|
+ <div class="add_input el-input el-input--suffix">
|
|
|
+ <!-- <el-form
|
|
|
+ :model="school"
|
|
|
+ ref="form"
|
|
|
+ > -->
|
|
|
+ <el-select
|
|
|
+ v-model="regionC"
|
|
|
+ placeholder="请选择区域"
|
|
|
+ class="custom-select"
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(org, index) in regionCList"
|
|
|
+ :key="index"
|
|
|
+ :label="org.name"
|
|
|
+ :value="org.name"
|
|
|
+ >
|
|
|
+ {{ org.name }}
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- </el-form> -->
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- 登录权限
|
|
|
<div class="el-form-item">
|
|
@@ -430,7 +515,7 @@
|
|
|
</div>
|
|
|
<!-- 按钮区域 -->
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="add_org_dialog = false">取 消</el-button>
|
|
|
+ <el-button @click="close_add_school">取 消</el-button>
|
|
|
<el-button type="primary" @click="ajax_add_org">确认</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -652,6 +737,12 @@ export default {
|
|
|
school: {
|
|
|
OrgId: null, // 初始化 OrgId 为 null 或适当的默认值
|
|
|
},
|
|
|
+ regionCList:[
|
|
|
+ {id:1,name:'hk'},
|
|
|
+ {id:2,name:'cn'}
|
|
|
+ ], //区域列表
|
|
|
+ regionC:'', //区域
|
|
|
+ selReg:'', //区域搜索
|
|
|
// 用来存储传递的参数
|
|
|
ajaxParams: null,
|
|
|
check_user_id: "", // 存放当前选择的用户的ID
|
|
@@ -707,54 +798,97 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
- school:{
|
|
|
- deep:true,
|
|
|
- handler:function(newVal){
|
|
|
- this.schoolList = []
|
|
|
- if (newVal.OrgId) {
|
|
|
- this.schoolList = this.cn_school.filter((e) => {
|
|
|
- return e.org == newVal.OrgId
|
|
|
- })
|
|
|
- if (this.searchQuery) {
|
|
|
- this.schoolList = this.schoolList.filter((e) => {
|
|
|
- return e.name.includes(this.searchQuery)
|
|
|
- })
|
|
|
- }
|
|
|
- }else if (this.searchQuery) {
|
|
|
- this.schoolList = this.cn_school.filter((e) => {
|
|
|
- return e.name.includes(this.searchQuery)
|
|
|
- })
|
|
|
- } else{
|
|
|
- this.schoolList = this.cn_school
|
|
|
- }
|
|
|
- console.log('value is change',newVal)
|
|
|
- },
|
|
|
- immediate:true
|
|
|
- },
|
|
|
- searchQuery(newVal){
|
|
|
- this.schoolList = []
|
|
|
- if (this.school.OrgId) {
|
|
|
- this.schoolList = this.cn_school.filter((e) => {
|
|
|
- return e.org == this.school.OrgId
|
|
|
- })
|
|
|
- if (this.searchQuery) {
|
|
|
- this.schoolList = this.schoolList.filter((e) => {
|
|
|
- return e.name.includes(this.searchQuery)
|
|
|
- })
|
|
|
- }
|
|
|
- console.log('111');
|
|
|
+ // school:{
|
|
|
+ // deep:true,
|
|
|
+ // handler:function(newVal){
|
|
|
+ // this.schoolList = []
|
|
|
+ // if (newVal.OrgId) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.org == newVal.OrgId
|
|
|
+ // })
|
|
|
+ // if (this.searchQuery) {
|
|
|
+ // this.schoolList = this.schoolList.filter((e) => {
|
|
|
+ // return e.name.includes(this.searchQuery)
|
|
|
+ // })
|
|
|
+ // if (this.selReg) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.area == this.selReg
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (this.selReg) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.area == this.selReg
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }else if (this.searchQuery) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.name.includes(this.searchQuery)
|
|
|
+ // })
|
|
|
+ // if (this.selReg) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.area == this.selReg
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // } else if(this.selReg){
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.area == this.selReg
|
|
|
+ // })
|
|
|
+ // }else{
|
|
|
+ // this.schoolList = this.cn_school
|
|
|
+ // }
|
|
|
+ // console.log('value is change',newVal)
|
|
|
+ // },
|
|
|
+ // immediate:true
|
|
|
+ // },
|
|
|
+ // searchQuery(newVal){
|
|
|
+ // this.schoolList = []
|
|
|
+ // if (this.school.OrgId) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.org == this.school.OrgId
|
|
|
+ // })
|
|
|
+ // if (this.searchQuery) {
|
|
|
+ // this.schoolList = this.schoolList.filter((e) => {
|
|
|
+ // return e.name.includes(this.searchQuery)
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // console.log('111');
|
|
|
|
|
|
- } else if (newVal) {
|
|
|
- this.schoolList = this.cn_school.filter((e) => {
|
|
|
- return e.name.includes(newVal)
|
|
|
- })
|
|
|
- console.log('222');
|
|
|
+ // } else if (newVal) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.name.includes(newVal)
|
|
|
+ // })
|
|
|
+ // console.log('222');
|
|
|
|
|
|
- } else{
|
|
|
- this.schoolList = this.cn_school
|
|
|
- }
|
|
|
- console.log('value is change',newVal)
|
|
|
- },
|
|
|
+ // } else{
|
|
|
+ // this.schoolList = this.cn_school
|
|
|
+ // }
|
|
|
+ // console.log('value is change',newVal)
|
|
|
+ // },
|
|
|
+ // selReg(newVal){
|
|
|
+ // this.schoolList = []
|
|
|
+ // if (this.school.OrgId) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.org == this.school.OrgId
|
|
|
+ // })
|
|
|
+ // if (this.searchQuery) {
|
|
|
+ // this.schoolList = this.schoolList.filter((e) => {
|
|
|
+ // return e.name.includes(this.searchQuery)
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // console.log('111');
|
|
|
+
|
|
|
+ // } else if (newVal) {
|
|
|
+ // this.schoolList = this.cn_school.filter((e) => {
|
|
|
+ // return e.name.includes(newVal)
|
|
|
+ // })
|
|
|
+ // console.log('222');
|
|
|
+
|
|
|
+ // } else{
|
|
|
+ // this.schoolList = this.cn_school
|
|
|
+ // }
|
|
|
+ // console.log('value is change',newVal)
|
|
|
+ // },
|
|
|
},
|
|
|
methods: {
|
|
|
handleSelectionChange(selectedRows) {
|
|
@@ -769,6 +903,14 @@ export default {
|
|
|
},
|
|
|
// 移动关闭按钮
|
|
|
close_table() {
|
|
|
+
|
|
|
+ // 清空补充信息查询数据
|
|
|
+ this.searchQuery = '';
|
|
|
+ this.school.OrgId = null;
|
|
|
+ this.selReg = '';
|
|
|
+ this.ajax_school()
|
|
|
+
|
|
|
+
|
|
|
this.isOrgFormVisible = false;
|
|
|
this.isTableUseVisible = false;
|
|
|
this.selectedSchool = ''
|
|
@@ -789,11 +931,13 @@ export default {
|
|
|
this.isTableUseVisible = false;
|
|
|
},
|
|
|
//新增组织关闭
|
|
|
- close_add_org() {
|
|
|
- this.add_org_dialog = false;
|
|
|
- },
|
|
|
+ // close_add_org() {
|
|
|
+ // this.add_org_dialog = false;
|
|
|
+ // },
|
|
|
//新增学校关闭
|
|
|
close_add_school() {
|
|
|
+ this.regionC = ''
|
|
|
+ this.add_org_dialog = false;
|
|
|
this.add_school_dialog = false;
|
|
|
},
|
|
|
showType(type) {
|
|
@@ -1022,7 +1166,20 @@ export default {
|
|
|
},
|
|
|
// 学校查询
|
|
|
ajax_school() {
|
|
|
- const params = [API_CONFIG.ajax_school]; // 使用配置中的接口参数
|
|
|
+ // const params = [API_CONFIG.ajax_school]; // 使用配置中的接口参数
|
|
|
+
|
|
|
+
|
|
|
+ // 构建请求参数
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ functionName: API_CONFIG.ajax_school.functionName, // 调用存储过程的名称
|
|
|
+ u_name: this.searchQuery, // 学校名称,绑定到 orgName
|
|
|
+ u_org: this.school.OrgId || '', // 选择的组织的 ID,绑定到 school.parentOrgId,如果没有选择则为空
|
|
|
+ u_regC: this.selReg
|
|
|
+ },
|
|
|
+ ];
|
|
|
+
|
|
|
+
|
|
|
this.$ajax
|
|
|
.post(API_CONFIG.baseUrl, params)
|
|
|
.then((res) => {
|
|
@@ -1033,11 +1190,13 @@ export default {
|
|
|
name: item.name,
|
|
|
id: item.id,
|
|
|
org: item.org,
|
|
|
+ area:item.area
|
|
|
}));
|
|
|
this.schoolList= res.data[0].map((item) => ({
|
|
|
name: item.name,
|
|
|
id: item.id,
|
|
|
org: item.org,
|
|
|
+ area:item.area
|
|
|
}));
|
|
|
console.log(this.cn_school);
|
|
|
}
|
|
@@ -1075,6 +1234,7 @@ export default {
|
|
|
//组织下拉菜单查询
|
|
|
ajax_org_check() {
|
|
|
this.selectedSchool = "";
|
|
|
+ this.ajax_school()
|
|
|
},
|
|
|
//新增学校
|
|
|
ajax_add_school() {
|
|
@@ -1093,6 +1253,7 @@ export default {
|
|
|
u_dest: this.region || "", // 地区,绑定到 region,如果为空则传空字符串
|
|
|
u_type: this.schoolType || "", // 学校类型,绑定到 schoolType,如果没有选择则为空
|
|
|
u_code: this.schoolCode || "", // 学校编码,绑定到 schoolCode,如果为空则传空字符串
|
|
|
+ u_regionC: this.regionC || "",
|
|
|
u_isLogin: this.loginPermission === "1" ? 1 : 2, // 是否允许登录,默认传 2(不允许登录)如果没有选择
|
|
|
uid: this.userid,
|
|
|
},
|
|
@@ -1116,6 +1277,7 @@ export default {
|
|
|
this.region = ""; // 清空地区选择
|
|
|
this.schoolType = "1"; // 清空学校类型选择
|
|
|
this.schoolCode = ""; // 清空学校编码
|
|
|
+ this.regionC = ''
|
|
|
this.loginPermission = "1"; // 清空登录权限的选择
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -1143,6 +1305,7 @@ export default {
|
|
|
u_name: orgName, // 组织名称
|
|
|
u_create: this.userid, // u_create 固定为0
|
|
|
u_code: randomCode, // 随机码(可以为空)
|
|
|
+ u_regionC: this.regionC,
|
|
|
u_login: uLogin, // 登录状态
|
|
|
},
|
|
|
];
|
|
@@ -1161,6 +1324,7 @@ export default {
|
|
|
this.add_org_dialog = false;
|
|
|
// 清空输入框、下拉菜单选择和单选框
|
|
|
this.orgName = ""; // 清空学校名称
|
|
|
+ this.regionC = ''
|
|
|
this.randomCode = ""; // 清空地区选择
|
|
|
this.uLogin = "1"; // 清空学校类型选择
|
|
|
})
|