|
|
@@ -37,6 +37,12 @@
|
|
|
<!-- 如果 org 为空,显示 '-' -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column show-overflow-tooltip prop="code" label="随机码" min-width="45">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.code2 || "-" }}
|
|
|
+ <!-- 如果 org 为空,显示 '-' -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column show-overflow-tooltip prop="detail" label="描述" min-width="45">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.detail || '-' }} <!-- 如果 org 为空,显示 '-' -->
|
|
|
@@ -116,6 +122,18 @@
|
|
|
</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">
|
|
|
+ <input v-model="schoolCode2" type="text" autocomplete="off" placeholder="请输入随机码"
|
|
|
+ class="el-input__inner" />
|
|
|
+ </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">
|
|
|
@@ -211,6 +229,18 @@
|
|
|
</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">
|
|
|
+ <input v-model.trim="schoolCode2" type="text" autocomplete="off" placeholder="请输入随机码"
|
|
|
+ class="el-input__inner" />
|
|
|
+ </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">
|
|
|
@@ -328,6 +358,7 @@ export default {
|
|
|
},
|
|
|
region: "", //地区
|
|
|
schoolCode: "", //学校编码
|
|
|
+ schoolCode2: "", //学校编码
|
|
|
regionC: "cn", //区域
|
|
|
regionCList: [
|
|
|
{ id: 1, name: "hk" },
|
|
|
@@ -444,6 +475,7 @@ export default {
|
|
|
this.regionC = "cn";
|
|
|
this.schoolType = "1"; // 清空学校类型选择
|
|
|
this.schoolCode = ""; // 清空学校编码
|
|
|
+ this.schoolCode2 = ""; // 清空学校编码
|
|
|
this.schoolDetail = ""; // 清空学校描述
|
|
|
this.loginPermission = "1"; // 清空登录权限的选择
|
|
|
},
|
|
|
@@ -478,16 +510,18 @@ export default {
|
|
|
this.$message.error("学校名称不能为空!");
|
|
|
return;
|
|
|
}
|
|
|
+ if (this.schoolCode2.length && this.schoolCode2.length != 4) return this.$message.error("随机码须4位数");
|
|
|
|
|
|
// 构建请求参数
|
|
|
let params = [
|
|
|
{
|
|
|
- functionName: API_CONFIG.ajax_add_school.functionName, // 调用存储过程的名称
|
|
|
+ functionName: API_CONFIG.ajax_add_schoolN.functionName, // 调用存储过程的名称
|
|
|
u_name: this.sch_name, // 学校名称,绑定到 orgName
|
|
|
u_org: this.school.parentOrgId || "", // 选择的组织的 ID,绑定到 school.parentOrgId,如果没有选择则为空
|
|
|
u_dest: this.region || "", // 地区,绑定到 region,如果为空则传空字符串
|
|
|
u_type: this.schoolType || "", // 学校类型,绑定到 schoolType,如果没有选择则为空
|
|
|
u_code: this.schoolCode || "", // 学校编码,绑定到 schoolCode,如果为空则传空字符串
|
|
|
+ u_code2: this.schoolCode2 || "", // 学校随机码,绑定到 schoolCode,如果为空则传空字符串
|
|
|
u_detail: this.schoolDetail || "", // 学校描述,绑定到 schoolDetail,如果为空则传空字符串
|
|
|
u_regionC: this.regionC || "",
|
|
|
u_isLogin: this.loginPermission === "1" ? 1 : 2, // 是否允许登录,默认传 2(不允许登录)如果没有选择
|
|
|
@@ -534,6 +568,7 @@ export default {
|
|
|
this.regionC = "cn";
|
|
|
this.schoolType = "1"; // 清空学校类型选择
|
|
|
this.schoolCode = ""; // 清空学校编码
|
|
|
+ this.schoolCode2 = ""; // 清空学校随机码
|
|
|
this.loginPermission = "1"; // 清空登录权限的选择
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -548,17 +583,21 @@ export default {
|
|
|
this.school.parentOrgId = row.org;
|
|
|
this.region = row.dest;
|
|
|
this.schoolCode = row.code;
|
|
|
+ this.schoolCode2 = row.code2;
|
|
|
this.schoolDetail = row.detail;
|
|
|
this.regionC = row.area;
|
|
|
},
|
|
|
updateSchool() {
|
|
|
+ if (this.schoolCode2.length && this.schoolCode2.length != 4) return this.$message.error("随机码须4位数");
|
|
|
+
|
|
|
let params = [
|
|
|
{
|
|
|
- functionName: "updateSchool2",
|
|
|
+ functionName: "updateSchool2N",
|
|
|
id: this.nid,
|
|
|
name: this.sch_name,
|
|
|
dest: this.region,
|
|
|
code: this.schoolCode,
|
|
|
+ code2: this.schoolCode2,
|
|
|
organ: this.school.parentOrgId,
|
|
|
detail: this.schoolDetail,
|
|
|
area: this.regionC,
|
|
|
@@ -574,6 +613,16 @@ export default {
|
|
|
type: "success",
|
|
|
});
|
|
|
this.getSchool();
|
|
|
+ // 清空输入框、下拉菜单选择和单选框
|
|
|
+ this.sch_name = ""; // 清空学校名称
|
|
|
+ this.school.parentOrgId = ""; // 清空组织选择
|
|
|
+ this.region = ""; // 清空地区选择
|
|
|
+ this.schoolDetail = ""; // 清空学校描述
|
|
|
+ this.regionC = "cn";
|
|
|
+ this.schoolType = "1"; // 清空学校类型选择
|
|
|
+ this.schoolCode = ""; // 清空学校编码
|
|
|
+ this.schoolCode2 = ""; // 清空学校随机码
|
|
|
+ this.loginPermission = "1"; // 清空登录权限的选择
|
|
|
await addOp({
|
|
|
uid: this.userid,
|
|
|
cid: "",
|