基地校优化

This commit is contained in:
paidaxing444
2020-09-04 11:57:14 +08:00
parent d0c0116e6f
commit a295566e3d
7 changed files with 390 additions and 329 deletions

View File

@ -425,7 +425,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除基地校编号为"' + ids + '"的数据项?', "警告", {
this.$confirm('是否确认删除基地校数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",

View File

@ -1,6 +1,12 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="姓名" prop="name">
<el-input
v-model="queryParams.name"
@ -136,7 +142,7 @@
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
</el-form-item>-->
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -173,21 +179,12 @@
v-hasPermi="['jxjs:jxjsjbxx:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['jxjs:jxjsjbxx:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jxjsjbxxList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="性别" align="center" prop="xb" :formatter="xbFormat" />
<el-table-column label="政治面貌" align="center" prop="zzmm" :formatter="zzmmFormat" />
@ -227,7 +224,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -256,18 +253,21 @@
</el-select>
</el-form-item>
<el-form-item label="出生日期" prop="csrq">
<el-date-picker clearable size="small" style="width: 200px"
<el-date-picker
clearable
size="small"
style="width: 200px"
v-model="form.csrq"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择出生日期">
</el-date-picker>
placeholder="选择出生日期"
></el-date-picker>
</el-form-item>
<el-form-item label="电子邮件" prop="email">
<el-input v-model="form.email" placeholder="请输入电子邮件" />
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11"/>
<el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" />
</el-form-item>
<el-form-item label="邮编" prop="yzbm">
<el-input v-model="form.yzbm" placeholder="请输入邮编" />
@ -384,7 +384,13 @@
</template>
<script>
import { listJxjsjbxx, getJxjsjbxx, delJxjsjbxx, addJxjsjbxx, updateJxjsjbxx, exportJxjsjbxx } from "@/api/jxjs/jxjsjbxx";
import {
listJxjsjbxx,
getJxjsjbxx,
delJxjsjbxx,
addJxjsjbxx,
updateJxjsjbxx,
} from "@/api/jxjs/jxjsjbxx";
export default {
name: "Jxjsjbxx",
@ -464,49 +470,44 @@ export default {
jxbh: [
{ required: true, message: "进修编号不能为空", trigger: "blur" },
],
xb: [
{ required: true, message: "教师性别不能为空", trigger: "blur" },
],
xb: [{ required: true, message: "教师性别不能为空", trigger: "blur" }],
csrq: [
{ required: true, message: "出生日期不能为空", trigger: "blur" },
],
phone: [
{ required: true, message: "电话不能为空", trigger: "blur" },
],
}
phone: [{ required: true, message: "电话不能为空", trigger: "blur" }],
},
};
},
created() {
this.getList();
this.getDicts("sys_user_sex").then(response => {
this.getDicts("sys_user_sex").then((response) => {
this.xbOptions = response.data;
});
this.getDicts("sys_dm_zzmm").then(response => {
this.getDicts("sys_dm_zzmm").then((response) => {
this.zzmmOptions = response.data;
});
this.getDicts("sys_dm_mz").then(response => {
this.getDicts("sys_dm_mz").then((response) => {
this.mzOptions = response.data;
});
this.getDicts("sys_dm_rjxd").then(response => {
this.getDicts("sys_dm_rjxd").then((response) => {
this.rjxdOptions = response.data;
});
this.getDicts("sys_dm_rjxk").then(response => {
this.getDicts("sys_dm_rjxk").then((response) => {
this.rjxkOptions = response.data;
});
this.getDicts("sys_dm_rjnj").then(response => {
this.getDicts("sys_dm_rjnj").then((response) => {
this.rjnjOptions = response.data;
});
this.getDicts("sys_dm_xl").then(response => {
this.getDicts("sys_dm_xl").then((response) => {
this.xlOptions = response.data;
});
this.getDicts("sys_dm_xw").then(response => {
this.getDicts("sys_dm_xw").then((response) => {
this.xwOptions = response.data;
});
this.getDicts("sys_dm_sfsfs").then(response => {
this.getDicts("sys_dm_sfsfs").then((response) => {
this.sfsfsOptions = response.data;
});
this.getDicts("sys_dm_rxnf").then(response => {
this.getDicts("sys_dm_rxnf").then((response) => {
this.lqnfOptions = response.data;
});
},
@ -514,7 +515,7 @@ export default {
/** 查询见习教师基本信息列表 */
getList() {
this.loading = true;
listJxjsjbxx(this.queryParams).then(response => {
listJxjsjbxx(this.queryParams).then((response) => {
this.jxjsjbxxList = response.rows;
this.total = response.total;
this.loading = false;
@ -590,7 +591,7 @@ export default {
xw: null,
sfsfs: null,
lqnf: null,
createTime: null
createTime: null,
};
this.resetForm("form");
},
@ -606,9 +607,9 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -619,8 +620,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getJxjsjbxx(id).then(response => {
const id = row.id || this.ids;
getJxjsjbxx(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改见习教师基本信息";
@ -628,10 +629,10 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateJxjsjbxx(this.form).then(response => {
updateJxjsjbxx(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
@ -639,7 +640,7 @@ export default {
}
});
} else {
addJxjsjbxx(this.form).then(response => {
addJxjsjbxx(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
@ -653,30 +654,24 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除见习教师基本信息编号为"' + ids + '"的数据项?', "警告", {
this.$confirm(
'是否确认删除见习教师基本信息数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
type: "warning",
}
)
.then(function () {
return delJxjsjbxx(ids);
}).then(() => {
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
})
.catch(function () {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有见习教师基本信息数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportJxjsjbxx(queryParams);
}).then(response => {
this.download(response.msg);
}).catch(function() {});
}
}
},
};
</script>

View File

@ -293,11 +293,8 @@ export default {
endtime: [
{ required: true, message: "考核结束时间不能为空", trigger: "blur" },
],
filename: [
{ required: true, message: "考核文件名称不能为空", trigger: "blur" },
],
filepath: [
{ required: true, message: "文件路径不能为空", trigger: "blur" },
{ required: true, message: "文件不能为空", trigger: "blur" },
],
khnf: [
{ required: true, message: "考核年份不能为空", trigger: "blur" },

View File

@ -56,22 +56,24 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
<el-button
v-if="!(scope.row.parentId==200)"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dept:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
<el-button
v-if="!(scope.row.parentId==200)"
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['system:dept:add']"
>新增</el-button>
<el-button
v-if="scope.row.parentId != 0"
v-if="!(scope.row.parentId == 0)&&!(scope.row.parentId==200)"
size="mini"
type="text"
icon="el-icon-delete"
@ -88,7 +90,12 @@
<el-row>
<el-col :span="24" v-if="form.parentId !== 0">
<el-form-item label="上级部门" prop="parentId">
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
<treeselect
v-model="form.parentId"
:options="deptOptions"
:normalizer="normalizer"
placeholder="选择上级部门"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -138,7 +145,14 @@
</template>
<script>
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import {
listDept,
getDept,
delDept,
addDept,
updateDept,
listDeptExcludeChild,
} from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@ -164,41 +178,41 @@ export default {
// 查询参数
queryParams: {
deptName: undefined,
status: undefined
status: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
parentId: [
{ required: true, message: "上级部门不能为空", trigger: "blur" }
{ required: true, message: "上级部门不能为空", trigger: "blur" },
],
deptName: [
{ required: true, message: "部门名称不能为空", trigger: "blur" }
{ required: true, message: "部门名称不能为空", trigger: "blur" },
],
orderNum: [
{ required: true, message: "菜单顺序不能为空", trigger: "blur" }
{ required: true, message: "菜单顺序不能为空", trigger: "blur" },
],
email: [
{
type: "email",
message: "'请输入正确的邮箱地址",
trigger: ["blur", "change"]
}
trigger: ["blur", "change"],
},
],
phone: [
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur"
}
]
}
trigger: "blur",
},
],
},
};
},
created() {
this.getList();
this.getDicts("sys_normal_disable").then(response => {
this.getDicts("sys_normal_disable").then((response) => {
this.statusOptions = response.data;
});
},
@ -206,7 +220,7 @@ export default {
/** 查询部门列表 */
getList() {
this.loading = true;
listDept(this.queryParams).then(response => {
listDept(this.queryParams).then((response) => {
this.deptList = this.handleTree(response.data, "deptId");
this.loading = false;
});
@ -219,7 +233,7 @@ export default {
return {
id: node.deptId,
label: node.deptName,
children: node.children
children: node.children,
};
},
// 字典状态字典翻译
@ -241,7 +255,7 @@ export default {
leader: undefined,
phone: undefined,
email: undefined,
status: "0"
status: "0",
};
this.resetForm("form");
},
@ -262,28 +276,28 @@ export default {
}
this.open = true;
this.title = "添加部门";
listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "deptId");
listDept().then((response) => {
this.deptOptions = this.handleTree(response.data, "deptId");
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
getDept(row.deptId).then(response => {
getDept(row.deptId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改部门";
});
listDeptExcludeChild(row.deptId).then(response => {
this.deptOptions = this.handleTree(response.data, "deptId");
listDeptExcludeChild(row.deptId).then((response) => {
this.deptOptions = this.handleTree(response.data, "deptId");
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.deptId != undefined) {
updateDept(this.form).then(response => {
updateDept(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
@ -291,7 +305,7 @@ export default {
}
});
} else {
addDept(this.form).then(response => {
addDept(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
@ -304,17 +318,24 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
this.$confirm('是否确认删除名称为"' + row.deptName + '"的数据项?', "警告", {
this.$confirm(
'是否确认删除名称为"' + row.deptName + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
type: "warning",
}
)
.then(function () {
return delDept(row.deptId);
}).then(() => {
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}
}
})
.catch(function () {});
},
},
};
</script>