Commit 314e1aee by zhaopanyu

zpy 12.13 教师电子档案

parent 5034f015
...@@ -50,3 +50,11 @@ export function exportInformation(data) { ...@@ -50,3 +50,11 @@ export function exportInformation(data) {
data: data, data: data,
}); });
} }
//学生照片导入
export function filesUpload(files) {
return request({
url: "/teacher/basiclnformation/importTeacherPicture",
method: "post",
data: files,
});
}
...@@ -8,6 +8,14 @@ export function listHonors(query) { ...@@ -8,6 +8,14 @@ export function listHonors(query) {
params: query, params: query,
}); });
} }
//查看综合荣誉列表(个人)
export function listHonorsgr(query) {
return request({
url: "/system/honors/listGr",
method: "get",
params: query,
});
}
// 查询综合荣誉详细 // 查询综合荣誉详细
export function getHonors(id) { export function getHonors(id) {
...@@ -42,3 +50,20 @@ export function delHonors(id) { ...@@ -42,3 +50,20 @@ export function delHonors(id) {
method: "delete", method: "delete",
}); });
} }
//获取用户
export function getUserList(data) {
return request({
url: "/system/achievements/getUserList",
method: "get",
params: data,
});
}
//审核
export function audit(data) {
return request({
url: "/system/honors/audit",
method: "post",
data: data,
});
}
...@@ -42,3 +42,11 @@ export function delWorks(id) { ...@@ -42,3 +42,11 @@ export function delWorks(id) {
method: "delete", method: "delete",
}); });
} }
//审核
export function audit(data) {
return request({
url: "/system/works/audit",
method: "post",
data: data,
});
}
...@@ -42,3 +42,11 @@ export function delAwards(id) { ...@@ -42,3 +42,11 @@ export function delAwards(id) {
method: "delete", method: "delete",
}); });
} }
//审核
export function audit(data) {
return request({
url: "/system/awards/audit",
method: "post",
data: data,
});
}
...@@ -3,7 +3,7 @@ import request from "@/utils/request"; ...@@ -3,7 +3,7 @@ import request from "@/utils/request";
// 查询教师获奖列表 // 查询教师获奖列表
export function listAwards(query) { export function listAwards(query) {
return request({ return request({
url: "/system/awards/list", url: "/school/teacherAwards/list",
method: "get", method: "get",
params: query, params: query,
}); });
...@@ -12,7 +12,7 @@ export function listAwards(query) { ...@@ -12,7 +12,7 @@ export function listAwards(query) {
// 查询教师获奖详细 // 查询教师获奖详细
export function getAwards(id) { export function getAwards(id) {
return request({ return request({
url: "/system/awards/" + id, url: "/school/teacherAwards/" + id,
method: "get", method: "get",
}); });
} }
...@@ -20,7 +20,7 @@ export function getAwards(id) { ...@@ -20,7 +20,7 @@ export function getAwards(id) {
// 新增教师获奖 // 新增教师获奖
export function addAwards(data) { export function addAwards(data) {
return request({ return request({
url: "/system/awards", url: "/school/teacherAwards",
method: "post", method: "post",
data: data, data: data,
}); });
...@@ -29,7 +29,7 @@ export function addAwards(data) { ...@@ -29,7 +29,7 @@ export function addAwards(data) {
// 修改教师获奖 // 修改教师获奖
export function updateAwards(data) { export function updateAwards(data) {
return request({ return request({
url: "/system/awards", url: "/school/teacherAwards",
method: "put", method: "put",
data: data, data: data,
}); });
...@@ -38,7 +38,15 @@ export function updateAwards(data) { ...@@ -38,7 +38,15 @@ export function updateAwards(data) {
// 删除教师获奖 // 删除教师获奖
export function delAwards(id) { export function delAwards(id) {
return request({ return request({
url: "/system/awards/" + id, url: "/school/teacherAwards/" + id,
method: "delete", method: "delete",
}); });
} }
//审核
export function audit(data) {
return request({
url: "/school/teacherAwards/audit",
method: "post",
data: data,
});
}
import request from "@/utils/request";
// 查询班主任考核列表
export function listAssessment(query) {
return request({
url: "/assessment/list",
method: "get",
params: query,
});
}
// 查询班主任考核详细
export function getAssessment(id) {
return request({
url: "/assessment/" + id,
method: "get",
});
}
// 新增班主任考核
export function addAssessment(data) {
return request({
url: "/assessment",
method: "post",
data: data,
});
}
// 修改班主任考核
export function updateAssessment(data) {
return request({
url: "/assessment",
method: "put",
data: data,
});
}
// 删除班主任考核
export function delAssessment(id) {
return request({
url: "/assessment/" + id,
method: "delete",
});
}
import request from "@/utils/request";
// 查询工作量信息列表
export function listAworkload(query) {
return request({
url: "/aworkload/list",
method: "get",
params: query,
});
}
// 查询工作量信息详细
export function getAworkload(id) {
return request({
url: "/aworkload/" + id,
method: "get",
});
}
// 新增工作量信息
export function addAworkload(data) {
return request({
url: "/aworkload",
method: "post",
data: data,
});
}
// 修改工作量信息
export function updateAworkload(data) {
return request({
url: "/aworkload",
method: "put",
data: data,
});
}
// 删除工作量信息
export function delAworkload(id) {
return request({
url: "/aworkload/" + id,
method: "delete",
});
}
...@@ -82,6 +82,7 @@ export default { ...@@ -82,6 +82,7 @@ export default {
// 添加选中导出判断 // 添加选中导出判断
isSelectedData(path) { isSelectedData(path) {
console.log('path', path)
if (this.exportType === ExportType.SELECT) { if (this.exportType === ExportType.SELECT) {
const params = path.slice(path.lastIndexOf("/") + 1); const params = path.slice(path.lastIndexOf("/") + 1);
if (!params) { if (!params) {
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete"
v-hasPermi="['system:student:remove']">删除 v-hasPermi="['system:student:remove']">删除
</el-button> </el-button>
</el-col> </el-col>
...@@ -847,7 +847,8 @@ ...@@ -847,7 +847,8 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 导出对话框 --> <!-- 导出对话框 -->
<ExportTable :open-export.sync="exportOptions.open" :title="exportOptions.title" @export="exportFile"></ExportTable> <ExportTableNew :open-export.sync="exportOptions.open" :title="exportOptions.title" @export="exportFile">
</ExportTableNew>
</div> </div>
</template> </template>
...@@ -857,6 +858,7 @@ import { ...@@ -857,6 +858,7 @@ import {
getInformation, getInformation,
delInformation, delInformation,
addInformation, addInformation,
filesUpload,
updateInformation, updateInformation,
} from "@/api/smartSchool/electronicArchives/basicInformation"; } from "@/api/smartSchool/electronicArchives/basicInformation";
import { uploadImage as commonUpload } from "@/api/common"; import { uploadImage as commonUpload } from "@/api/common";
...@@ -903,6 +905,7 @@ export default { ...@@ -903,6 +905,7 @@ export default {
}, },
uploadForm: {}, uploadForm: {},
baseUrl: [process.env.VUE_APP_BASE_API], baseUrl: [process.env.VUE_APP_BASE_API],
uploadLoading: false,
uploadFileLoading: false, uploadFileLoading: false,
// 遮罩层 // 遮罩层
loading: true, loading: true,
...@@ -1258,8 +1261,9 @@ export default { ...@@ -1258,8 +1261,9 @@ export default {
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.selection = selection; this.selection = selection;
this.ids = selection.map(item => item.id); this.ids = selection.map(item => item.id);
this.single = selection.length !== 1; this.single = selection.length == 1;
this.multiple = !selection.length; this.multiple = selection.length > 1;
// 先定义 isMultiple 变量为 false // 先定义 isMultiple 变量为 false
let isMultiple = false; let isMultiple = false;
if (this.selection.length === 1) { if (this.selection.length === 1) {
...@@ -1291,6 +1295,7 @@ export default { ...@@ -1291,6 +1295,7 @@ export default {
const id = row.id || this.ids; const id = row.id || this.ids;
getInformation(id).then((response) => { getInformation(id).then((response) => {
this.form = response.data; this.form = response.data;
this.pictureUrl = this.pev + response.url;
console.log(this.form, "this.form "); console.log(this.form, "this.form ");
this.title = "修改教师基础信息"; this.title = "修改教师基础信息";
}); });
...@@ -1303,7 +1308,7 @@ export default { ...@@ -1303,7 +1308,7 @@ export default {
updateInformation(this.form).then((response) => { updateInformation(this.form).then((response) => {
console.log(this.form, 'this.form'); console.log(this.form, 'this.form');
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.look = false;
this.getList(); this.getList();
}); });
} else { } else {
...@@ -1333,36 +1338,44 @@ export default { ...@@ -1333,36 +1338,44 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.exportOptions.open = true; this.download('teacher/basiclnformation/export', {
...this.queryParams
}, `data_${Date.now()}.xlsx`)
// this.exportOptions.open = true;
// this.download('/teacher/basiclnformation/export', { // this.download('/teacher/basiclnformation/export', {
// ...this.queryParams // ...this.queryParams
// }, `information_${new Date().getTime()}.xlsx`) // }, `information_${new Date().getTime()}.xlsx`)
}, },
/** 导出 */ /** 导出 */
exportFile(callback) { exportFile(callback) {
// 获取当前选中的多选项的 ids 和单选项的 id
const ids = this.ids;
const id = this.id;
console.log(ids, id);
const options = [
{
type: ExportType.TOTAL,
path: "/teacher/basiclnformation/export",
params: {},
},
{
type: ExportType.SELECT,
path: "/teacher/basiclnformation/export/",
params: { ids, id },
},
{
type: ExportType.QUERY,
path: "/teacher/basiclnformation/export",
params: this.queryParams,
},
];
callback(options, `教师基础信息${Date.now()}.xlsx`); // let exportId = ''
// if (this.multiple == true) {
// exportId = this.ids
// } else {
// exportId = this.id
// }
// console.log('exportId', exportId);
// const options = [
// {
// type: ExportType.TOTAL,
// path: "/teacher/basiclnformation/export",
// params: {},
// },
// {
// type: ExportType.SELECT,
// path: "/teacher/basiclnformation/export/",
// params: { exportId },
// },
// {
// type: ExportType.QUERY,
// path: "/teacher/basiclnformation/export",
// params: this.queryParams,
// },
// ];
// callback(options, `教师基础信息${Date.now()}.xlsx`);
}, },
......
<template>
<div>
<h2>教师个人信息汇总</h2>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<div>
<h2></h2>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名" clearable
@keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="phone" label="联系电话">
<el-input v-model.trim="form.phone" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column key="userName" prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column key="phone" prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
userName: '',
phone: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.userId,
name: this.selectUser.userName,
tel: this.selectUser.phone
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getUserList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名" clearable
@keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="phone" label="联系电话">
<el-input v-model.trim="form.phone" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column key="userName" prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column key="phone" prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
userName: '',
phone: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.userId,
name: this.selectUser.userName,
tel: this.selectUser.phone
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getUserList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名" clearable
@keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="phone" label="联系电话">
<el-input v-model.trim="form.phone" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column key="userName" prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column key="phone" prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
userName: '',
phone: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.userId,
name: this.selectUser.userName,
tel: this.selectUser.phone
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getUserList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名" clearable
@keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="phone" label="联系电话">
<el-input v-model.trim="form.phone" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column key="userName" prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column key="phone" prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
userName: '',
phone: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.userId,
name: this.selectUser.userName,
tel: this.selectUser.phone
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getUserList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名" clearable
@keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="phone" label="联系电话">
<el-input v-model.trim="form.phone" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column key="userName" prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column key="phone" prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
userName: '',
phone: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.userId,
name: this.selectUser.userName,
tel: this.selectUser.phone
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getUserList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名" clearable
@keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="phone" label="联系电话">
<el-input v-model.trim="form.phone" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column key="userName" prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column key="phone" prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
userName: '',
phone: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.userId,
name: this.selectUser.userName,
tel: this.selectUser.phone
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getUserList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名" clearable
@keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="phone" label="联系电话">
<el-input v-model.trim="form.phone" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column key="userName" prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column key="phone" prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
userName: '',
phone: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.userId,
name: this.selectUser.userName,
tel: this.selectUser.phone
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getUserList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名" clearable
@keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="phone" label="联系电话">
<el-input v-model.trim="form.phone" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column key="userName" prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column key="phone" prop="phone" label="联系电话" align="center"></el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserList } from "@/api/smartSchool/electronicArchives/professionalDevelopment/comprehensiveHonors";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
userName: '',
phone: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.userId,
name: this.selectUser.userName,
tel: this.selectUser.phone
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getUserList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment