Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
c435fba3
Commit
c435fba3
authored
Oct 25, 2023
by
Cat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://49.232.152.146:6688/qangqi/dd_school
parents
85807a4a
801bdf89
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1166 additions
and
517 deletions
+1166
-517
ruoyi-ui/src/views/smartSchool/personWork/recordingroomAppointment/IdleSituation/index.vue
+9
-3
ruoyi-ui/src/views/smartSchool/schoolManage/schoolNotice/infoPush/components/receiveList.vue
+2
-2
ruoyi-ui/src/views/smartSchool/schoolManage/schoolNotice/infoPush/school/index copy.vue
+508
-0
ruoyi-ui/src/views/smartSchool/schoolManage/schoolNotice/infoPush/school/index.vue
+1
-1
ruoyi-ui/src/views/smartSchool/schoolManage/schoolNotice/personnelGrouping/authUser.vue
+1
-3
ruoyi-ui/src/views/smartSchool/teachAffairAdministration/affairClassManage/index.vue
+1
-1
ruoyi-ui/src/views/smartSchool/teachAffairAdministration/statistics/age/index.vue
+3
-3
ruoyi-ui/src/views/smartSchool/teacherManage/teacherInforManage/components/Resume.vue
+6
-8
ruoyi-ui/src/views/smartSchool/teacherManage/teacherInforManage/index.vue
+510
-486
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacherFiles/TeacherFilesController.java
+38
-3
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacherFiles/TeacherFilesNoticeController.java
+20
-3
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/teacherFiles/TeacherFilesAward.java
+1
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/teacherFiles/TeacherFilesMapper.java
+11
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/teacherFiles/TeacherFilesNoticeServiceImpl.java
+33
-3
smart-campus/src/main/java/yangtz/cs/liu/campus/service/teacherFiles/ITeacherFilesNoticeService.java
+4
-0
smart-campus/src/main/resources/mapper/teacherFiles/TeacherFilesMapper.xml
+18
-0
No files found.
ruoyi-ui/src/views/smartSchool/personWork/recordingroomAppointment/IdleSituation/index.vue
View file @
c435fba3
...
...
@@ -144,12 +144,18 @@ export default {
};
this
.
fetchStudioUseData
();
// 重新发一次请求
},
// changeStudio(value) {
// console.log('value', value);
// console.log('this.queryParams.startTime', this.queryParams.startTime);
// this.queryParams.studioId = value;
// this.fetchStudioUseData();
// },
changeStudio
(
value
)
{
console
.
log
(
'value'
,
value
);
console
.
log
(
'this.queryParams.startTime'
,
this
.
queryParams
.
startTime
);
this
.
selectedTimeSlots
=
[];
// 在切换录播室时清空已选时间段
this
.
queryParams
.
studioId
=
value
;
this
.
fetchStudioUseData
();
},
changeDate
()
{
this
.
endTime
=
moment
(
this
.
queryParams
.
startTime
).
add
(
9
,
'days'
)
// this.fetchData();
...
...
@@ -224,7 +230,7 @@ export default {
if
(
selectObj
!=
undefined
)
{
this
.
remark
=
true
this
.
selectedTimeSlots
=
this
.
selectedTimeSlots
.
filter
(
item
=>
item
.
index
!=
index
)
this
.
selectedTimeSlots
.
length
==
0
?
this
.
remark
=
false
:
this
.
selectedTimeSlots
this
.
selectedTimeSlots
.
length
==
=
0
?
this
.
remark
=
false
:
this
.
selectedTimeSlots
}
else
{
this
.
selectedTimeSlots
.
push
({
day
,
index
})
}
...
...
ruoyi-ui/src/views/smartSchool/schoolManage/schoolNotice/infoPush/components/receiveList.vue
View file @
c435fba3
...
...
@@ -31,10 +31,10 @@
<!-- >新增-->
<!--
</el-button>
-->
<!--
</el-col>
-->
<el-col
:span=
"1.5"
>
<
!--
<
el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
size=
"mini"
icon=
"el-icon-delete"
:disabled=
"!isMultiple"
@
click=
"handleDelete"
>
删除
</el-button>
</el-col>
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
size=
"mini"
icon=
"el-icon-close"
@
click=
"handleClose"
>
关闭
</el-button>
...
...
ruoyi-ui/src/views/smartSchool/schoolManage/schoolNotice/infoPush/school/index copy.vue
0 → 100644
View file @
c435fba3
<
template
>
<div
class=
"app-container"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleTabChange"
>
<el-tab-pane
label=
"正常"
:name=
"State.NORMAL"
></el-tab-pane>
<el-tab-pane
label=
"停用"
:name=
"State.STOP"
></el-tab-pane>
</el-tabs>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"标题"
prop=
"title"
>
<el-input
size=
"small"
v-model=
"queryParams.title"
placeholder=
"请输入标题"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"接收人"
prop=
"groupId"
>
<el-select
v-model=
"queryParams.groupId"
size=
"small"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
placeholder=
"请选择接收人"
>
<el-option
v-for=
"item in roleList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:push:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-search"
size=
"mini"
:disabled=
"single"
@
click=
"viewDetailButton"
v-hasPermi=
"['system:push:export']"
>
详情
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:push:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:push:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:push:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
:columns=
"columns"
></right-toolbar>
</el-row>
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"pushList"
@
selection-change=
"handleSelectionChange"
@
row-click=
"rowClick"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"标题"
align=
"center"
v-if=
"columns[0].visible"
prop=
"title"
show-overflow-tooltip
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"messageType"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_notice_type"
:value=
"scope.row.messageType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
v-if=
"columns[1].visible"
prop=
"createTime"
width=
"200"
show-overflow-tooltip
/>
<el-table-column
label=
"创建人"
align=
"center"
v-if=
"columns[2].visible"
prop=
"createBy"
width=
"200"
show-overflow-tooltip
/>
<el-table-column
label=
"接收人"
align=
"center"
v-if=
"columns[3].visible"
prop=
"groupName"
width=
"200"
show-overflow-tooltip
>
<!-- <template slot-scope="scope">
<span>{{ resolveRole(scope.row.receivePacket) }}</span>
</template> -->
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
v-if=
"columns[4].visible"
prop=
"state"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.state"
active-value=
"0"
inactive-value=
"1"
@
change=
"handleChangeState(scope.row)"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
v-if=
"columns[5].visible"
width=
"200"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-user"
@
click=
"getReceiveList(scope.row)"
v-hasPermi=
"['system:push:edit']"
>
接收人列表
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:push:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:push:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改学校消息推送对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"960px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"标题"
prop=
"title"
>
<el-input
size=
"small"
v-model=
"form.title"
placeholder=
"请输入标题"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"接收人"
prop=
"groupName"
>
<el-select
size=
"small"
v-model=
"form.groupName"
placeholder=
"请选择角色"
style=
"width: 100%;"
>
<el-option
v-for=
"item in roleList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"类型"
prop=
"messageType"
>
<el-select
v-model=
"form.messageType"
style=
"width: 100%;"
>
<el-option
v-for=
"dict in dict.type.sys_notice_type"
:key=
"dict.value"
:value=
"dict.value"
:label=
"dict.label"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"内容"
prop=
"content"
>
<editor
v-model=
"form.content"
:min-height=
"192"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- 查看详细内容学校消息推送对话框 -->
<el-dialog
title=
"详细内容查看"
:visible
.
sync=
"viewDetail"
width=
"960px"
append-to-body
>
<el-card
type=
"always"
>
<div
style=
"text-align: center"
>
<h1
style=
"display: inline-block"
>
{{ form.title }}
</h1>
</div>
<span
class=
"info-container"
:disabled=
"true"
v-html=
"form.content"
></span>
<br
/><br
/>
<div
style=
"float: right;"
>
<el-descriptions
column=
"3"
>
<!-- <el-descriptions-item label="标题">{{ form.title }}</el-descriptions-item>-->
<el-descriptions-item
label=
"接收人"
>
{{ resolveRole(form.receivePacket) }}
</el-descriptions-item>
<el-descriptions-item
label=
"创建时间"
>
{{ form.createTime }}
</el-descriptions-item>
<el-descriptions-item
label=
"创建人"
>
{{ form.createBy }}
</el-descriptions-item>
</el-descriptions>
</div>
<br>
</el-card>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"viewDetail = false"
>
关闭
</el-button>
</div>
</el-dialog>
<!-- 导出对话框 -->
<ExportTable
:open-export
.
sync=
"exportOptions.open"
:title=
"exportOptions.title"
@
export=
"exportFile"
></ExportTable>
</div>
</template>
<
script
>
import
{
getList
,
getInfoOne
,
addInfo
,
editInfo
,
deleteInfo
,
changeState
}
from
"@/api/smartSchool/informationPush/school"
;
import
{
State
}
from
"@/enums/infoPush"
;
// import { getUser } from "@/api/system/user";
import
{
ExportType
}
from
"@/enums/common"
;
import
{
getUserList
,
//获取分组集合
}
from
"@/api/smartSchool/informationPush/personnelGrouping"
;
export
default
{
name
:
"SchoolMessage"
,
dicts
:
[
'status'
,
'inform_push_state'
,
'receive_packet'
,
'sys_notice_type'
],
data
()
{
return
{
selection
:
[],
pageState
:
'0'
,
// 状态
State
,
viewDetail
:
false
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 学校消息推送表格数据
pushList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
title
:
null
,
groupId
:
null
,
state
:
State
.
NORMAL
,
// content: null,
// messageType: null,
},
// 导出选项
exportOptions
:
{
title
:
'选择导出类别'
,
open
:
false
},
//分组
idList
:
[],
// 表单参数
form
:
{},
// 列信息
columns
:
[
{
key
:
0
,
label
:
`标题`
,
visible
:
true
},
{
key
:
1
,
label
:
`创建时间`
,
visible
:
true
},
{
key
:
2
,
label
:
`创建人`
,
visible
:
true
},
{
key
:
3
,
label
:
`接收人`
,
visible
:
true
},
{
key
:
4
,
label
:
`状态`
,
visible
:
true
},
{
key
:
5
,
label
:
`操作`
,
visible
:
true
},
],
// 表单校验
rules
:
{
title
:
[
{
required
:
true
,
message
:
"请输入标题"
,
trigger
:
"blur"
}
],
receivePacket
:
[
{
required
:
true
,
message
:
"接收人不能为空"
,
trigger
:
"blur"
}
],
messageType
:
[
{
required
:
true
,
message
:
"类型不能为空"
,
trigger
:
"blur"
}
],
content
:
[
{
required
:
true
,
message
:
"内容不能为空"
,
trigger
:
"blur"
}
],
},
// 当前状态
activeName
:
State
.
NORMAL
,
// 角色列表
roleList
:
[]
};
},
computed
:
{
resolveRole
()
{
return
value
=>
{
const
result
=
this
.
roleList
.
find
(
item
=>
item
.
roleId
===
value
);
return
result
?
result
.
roleName
:
''
;
}
}
},
created
()
{
this
.
getList
();
// this.getRoleList();
this
.
groupList
();
},
methods
:
{
//接收人分组
groupList
()
{
getUserList
().
then
(
response
=>
{
this
.
roleList
=
response
.
rows
;
console
.
log
(
'this.roleList'
,
this
.
roleList
);
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 查询学校消息推送列表 */
getList
()
{
this
.
loading
=
true
;
getList
(
this
.
queryParams
).
then
(
response
=>
{
this
.
pushList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
title
:
null
,
content
:
null
,
receivePacket
:
null
,
messageType
:
'1'
,
state
:
State
.
STOP
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
throttle
(()
=>
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
})
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
selection
=
selection
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加学校消息推送"
;
},
getReceiveList
(
row
)
{
this
.
$router
.
push
({
path
:
'/schoolManage/infoPush/receiveList'
,
query
:
{
id
:
row
.
id
,
// title: row.title,
// type: row.messageType,
}
})
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
[
0
];
this
.
open
=
true
;
this
.
title
=
"修改学校消息推送"
;
getInfoOne
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
console
.
log
(
'this.form'
,
this
.
form
);
});
},
/** 提交按钮 */
submitForm
()
{
const
groupId
=
this
.
form
.
groupId
this
.
form
.
groupName
=
groupId
==
''
?
''
:
this
.
roleList
.
find
(
item
=>
item
.
id
==
groupId
).
name
this
.
throttle
(()
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
console
.
log
(
valid
);
this
.
$modal
.
loading
(
'正在上传数据,请稍等...'
);
if
(
this
.
form
.
id
!=
null
)
{
editInfo
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
closeLoading
();
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}).
catch
(
error
=>
{
this
.
$modal
.
closeLoading
();
})
}
else
{
addInfo
(
this
.
form
).
then
(
response
=>
{
console
.
log
(
this
.
form
);
this
.
$modal
.
closeLoading
();
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}).
catch
(
error
=>
{
this
.
$modal
.
closeLoading
();
})
}
}
});
})
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
this
.
throttle
(()
=>
{
const
ids
=
row
.
id
||
this
.
ids
;
if
(
ids
)
{
this
.
$modal
.
confirm
(
`是否确认删除选中的
${
Object
.
hasOwnProperty
.
call
(
ids
,
'length'
)
?
ids
.
length
:
1
}
条数据?`
).
then
(
function
()
{
return
deleteInfo
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{
});
}
})
},
/** 导出按钮操作 */
handleExport
()
{
this
.
exportOptions
.
open
=
true
;
// this.$confirm(`是否确认导出${ !!this.ids.length ? this.ids.length + '条' : '所有' }数据?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// if (this.ids.length) {
// console.log("this.ids", this.ids)
// this.download('/schoolMessagePush/export/' + this.ids, {
// ...this.queryParams
// }, `学校信息推送.xlsx`)
// } else {
// this.download('/schoolMessagePush/export/', {
// ...this.queryParams
// }, `学校信息推送.xlsx`)
// }
// this.$message({
// type: 'success',
// message: '导出成功!'
// });
// }).catch(() => {
// this.$message({
// type: 'info',
// message: '已取消'
// });
// });
},
viewDetailButton
()
{
this
.
viewDetail
=
true
;
this
.
reset
();
const
id
=
this
.
ids
[
0
];
getInfoOne
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
});
},
/** 停用/推送消息 */
handleChangeState
(
row
)
{
let
text
=
row
.
state
===
"0"
?
"推送"
:
"停用"
;
this
.
$modal
.
confirm
(
'确认要'
+
text
+
'当前通知(公告)?'
).
then
(
function
()
{
return
changeState
(
row
.
id
,
row
.
state
);
return
Promise
.
reject
();
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
text
+
"成功"
);
this
.
getList
();
}).
catch
(
function
()
{
row
.
state
=
row
.
state
===
"0"
?
"1"
:
"0"
;
});
},
// 切换状态
handleTabChange
({
name
})
{
if
(
name
==
State
.
NORMAL
)
{
this
.
pageState
=
0
}
else
{
this
.
pageState
=
1
}
this
.
queryParams
.
state
=
name
;
this
.
handleQuery
();
},
// 获取角色信息
// getRoleList() {
// getUser().then(response => {
// this.roleList = response.roles;
// }).catch(error => {
// })
// },
/** 导出 */
exportFile
(
callback
)
{
const
ids
=
this
.
ids
;
const
options
=
[
{
type
:
ExportType
.
TOTAL
,
path
:
'/schoolMessagePush/exportAll'
,
params
:
{
state
:
this
.
pageState
}
},
{
type
:
ExportType
.
SELECT
,
path
:
'/schoolMessagePush/export/'
+
ids
,
params
:
{}
},
{
type
:
ExportType
.
QUERY
,
path
:
'/schoolMessagePush/exportAll'
,
params
:
{
state
:
this
.
pageState
,
...
this
.
queryParams
}
},
]
callback
(
options
,
`学校信息推送
${
new
Date
().
getTime
()}
.xlsx`
);
},
rowClick
(
row
)
{
if
(
this
.
selection
.
includes
(
row
))
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
false
)
}
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
)
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.info-container
{
max-height
:
500px
;
overflow-y
:
auto
;
}
</
style
>
ruoyi-ui/src/views/smartSchool/schoolManage/schoolNotice/infoPush/school/index.vue
View file @
c435fba3
...
...
@@ -363,7 +363,7 @@ export default {
/** 提交按钮 */
submitForm
()
{
const
groupId
=
this
.
form
.
groupId
this
.
form
.
group
=
groupId
==
''
?
''
:
this
.
roleList
.
find
(
item
=>
item
.
id
==
groupId
).
name
this
.
form
.
group
Name
=
groupId
==
''
?
''
:
this
.
roleList
.
find
(
item
=>
item
.
id
==
groupId
).
name
console
.
log
(
this
.
form
.
borrowBy
);
this
.
throttle
(()
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
...
...
ruoyi-ui/src/views/smartSchool/schoolManage/schoolNotice/personnelGrouping/authUser.vue
View file @
c435fba3
...
...
@@ -78,8 +78,6 @@
</el-table>
<pagination
v-show=
"totalcy > 0"
:total=
"total"
:page
.
sync=
"queryParam.pageNum"
:limit
.
sync=
"queryParam.pageSize"
@
pagination=
"getListcy"
/>
</el-row>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSelectUser"
>
确 定
</el-button>
...
...
@@ -167,7 +165,7 @@ export default {
this
.
notificationId
=
this
.
$route
.
query
.
id
;
console
.
log
(
'this..notificationId'
,
this
.
notificationId
);
getUser
(
this
.
notificationId
).
then
(
response
=>
{
this
.
userList
=
response
.
rows
;
this
.
userList
=
response
.
data
;
console
.
log
(
'this.userList'
,
this
.
userList
);
this
.
loading
=
false
;
});
...
...
ruoyi-ui/src/views/smartSchool/teachAffairAdministration/affairClassManage/index.vue
View file @
c435fba3
...
...
@@ -473,7 +473,7 @@ export default {
classValue
:
[{
required
:
true
,
message
:
'班级不能为空'
,
trigger
:
'change'
}],
teacherName
:
[{
required
:
true
,
message
:
'班主任姓名不能为空'
,
trigger
:
'change'
}],
teacherTel
:
[{
required
:
true
,
message
:
'班主任手机号不能为空'
,
trigger
:
'change'
}],
houseName
:
[{
required
:
true
,
message
:
'所在教学楼不能为空'
,
trigger
:
'change'
}],
//
houseName: [{required: true, message: '所在教学楼不能为空', trigger: 'change'}],
classNum1
:
[{
required
:
true
,
message
:
'高一班级数量不能为空'
,
trigger
:
'blur'
}],
classNum2
:
[{
required
:
true
,
message
:
'高二班级数量不能为空'
,
trigger
:
'blur'
}],
classNum3
:
[{
required
:
true
,
message
:
'高三班级数量不能为空'
,
trigger
:
'blur'
}],
...
...
ruoyi-ui/src/views/smartSchool/teachAffairAdministration/statistics/age/index.vue
View file @
c435fba3
...
...
@@ -3,7 +3,7 @@
<el-form
:model=
"queryForm"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"70px"
>
<el-form-item
label=
"学年"
prop=
"classYear"
>
<el-date-picker
v-model=
"queryForm.classYear"
type=
"year"
@
change=
"getList"
format=
"yyyy"
value-format=
"yyyy"
placeholder=
"选择年度"
></el-date-picker>
placeholder=
"选择年度"
:clearable=
"false"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
>
导出
</el-button>
...
...
@@ -155,7 +155,7 @@ export default {
newYear
()
{
getNewYear
().
then
((
res
)
=>
{
//数值类型转换成字符串
this
.
queryForm
.
classYear
=
res
.
schoolYear
+
''
;
this
.
queryForm
.
classYear
=
res
.
schoolYear
+
''
;
console
.
log
(
'this.queryForm.classYear'
,
typeof
this
.
queryForm
.
classYear
);
this
.
getList
();
});
...
...
@@ -172,7 +172,7 @@ export default {
this
.
total
=
response
.
total
;
})
.
catch
(
error
=>
{
});
},
...
...
ruoyi-ui/src/views/smartSchool/teacherManage/teacherInforManage/components/Resume.vue
View file @
c435fba3
...
...
@@ -47,10 +47,8 @@
<el-table-column
type=
"selection"
align=
"center"
width=
"55"
/>
<el-table-column
label=
"序号"
type=
"index"
align=
"center"
width=
"55"
/>
<el-table-column
label=
"学校/工作单位"
width=
"width"
align=
"center"
prop=
"learnSchool"
/>
<el-table-column
label=
"履历开始时间"
:formatter=
"dateFormat"
width=
"width"
align=
"center"
prop=
"learnStart"
></el-table-column>
<el-table-column
label=
"履历结束时间"
:formatter=
"dateFormat"
width=
"width"
align=
"center"
prop=
"learnEnd"
></el-table-column>
<el-table-column
label=
"履历开始时间"
width=
"width"
align=
"center"
prop=
"learnStart"
></el-table-column>
<el-table-column
label=
"履历结束时间"
width=
"width"
align=
"center"
prop=
"learnEnd"
></el-table-column>
<el-table-column
label=
"备注"
width=
"width"
align=
"center"
prop=
"remark"
/>
</el-table>
<ExPagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
...
...
@@ -64,12 +62,12 @@
<el-input
v-model=
"resumeForm.learnSchool"
clearable
style=
"width: 100%"
/>
</el-form-item>
<el-form-item
label=
"履历开始时间"
prop=
"learnStart"
>
<el-date-picker
v-model=
"resumeForm.learnStart"
type=
"date"
style=
"width: 100%"
placeholder=
"履历开始时间
"
></el-date-picker>
<el-date-picker
v-model=
"resumeForm.learnStart"
type=
"date"
style=
"width: 100%"
placeholder=
"履历开始时间"
value-format=
"yyyy-MM-dd
"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"履历结束时间"
clearable
prop=
"learnEnd"
>
<el-date-picker
v-model=
"resumeForm.learnEnd"
type=
"date"
style=
"width: 100%"
placeholder=
"履历结束时间
"
></el-date-picker>
<el-date-picker
v-model=
"resumeForm.learnEnd"
type=
"date"
style=
"width: 100%"
placeholder=
"履历结束时间"
value-format=
"yyyy-MM-dd
"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"备注"
clearable
prop=
"remark"
>
<el-input
type=
"textarea"
:rows=
"3"
style=
"width: 100%"
v-model=
"resumeForm.remark"
clearable
/>
...
...
ruoyi-ui/src/views/smartSchool/teacherManage/teacherInforManage/index.vue
View file @
c435fba3
...
...
@@ -195,8 +195,6 @@
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</
template
>
</el-form-item>
<div
style=
"width:50px; height: 20px; margin:auto;"
><b>
照片
</b></div>
...
...
@@ -232,12 +230,19 @@
<el-date-picker
clearable
v-model=
"form.birthday"
type=
"date"
style=
"width: 100%"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择生日"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"岗位"
prop=
"postId"
>
<el-select
v-model=
"form.postIds"
multiple
placeholder=
"请选择岗位"
style=
"width: 100%"
>
<el-option
v-for=
"item in postOptions"
:key=
"item.postId"
:label=
"item.postName"
:value=
"item.postId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"任职部门"
prop=
"deptIds"
>
<treeselect
:disabled=
"isDisabled"
v-model=
"form.deptIds"
:options=
"deptOptions"
:show-count=
"true"
:defaultExpandLevel=
"2"
placeholder=
"请选择主部门"
@
change=
"handleSelectionChange"
multiple
:max=
"8"
/>
<!-- 添加 multiple 和 max 属性 -->
</el-form-item>
</el-col>
...
...
@@ -254,9 +259,9 @@
</el-form-item>
<div
style=
"width:50px; height: 20px;margin:auto;"
><b>
签名
</b></div>
<br
/>
<el-form-item
label=
"
归属
部门"
prop=
"deptId"
>
<el-form-item
label=
"
主
部门"
prop=
"deptId"
>
<treeselect
:disabled=
"isDisabled"
v-model=
"form.deptId"
:options=
"deptOptions"
:show-count=
"true"
:defaultExpandLevel=
"2"
placeholder=
"请选择
归属
部门"
/>
:defaultExpandLevel=
"2"
placeholder=
"请选择
主
部门"
/>
</el-form-item>
<!-- :placeholder="isDisabled ? '' : '请选择归属部门'"-->
<el-form-item
label=
"密码"
v-if=
"!form.id"
prop=
"password"
>
...
...
@@ -384,10 +389,15 @@ export default {
},
data
()
{
return
{
peV
:
process
.
env
.
VUE_APP_BASE_API
,
// 民族
Nations
,
honorQueryAdd
:
{},
isDisabled
:
false
,
// 根据需要设置是否禁用
deptOptions
:
[
// 选项数据
],
honorTitle
:
undefined
,
honorQuery
:
{},
resumeTitle
:
undefined
,
...
...
@@ -459,7 +469,9 @@ export default {
employeeType
:
null
,
},
// 表单参数
form
:
{},
form
:
{
deptIds
:
[],
},
// 列信息
columns
:
[
{
key
:
0
,
label
:
`头像`
,
visible
:
true
},
...
...
@@ -545,515 +557,527 @@ export default {
deptName
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
);
},
},
created
()
{
this
.
getList
();
this
.
getDeptTree
();
// this.getConfigKey('sys.user.initPassword').then(response => {
// this.initPassword = response.msg
// })
},
methods
:
{
// 筛选节点
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
},
// 节点单击事件
handleNodeClick
(
data
)
{
this
.
queryParams
.
deptId
=
data
.
id
;
this
.
handleQuery
();
},
/** 查询学校老师列表 */
getList
()
{
this
.
loading
=
true
;
listInform
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
informList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
teacherName
:
null
,
// userName: null,
teacherTel
:
null
,
// phonenumber: null,
teacherCode
:
null
,
idCard
:
null
,
homeAddress
:
null
,
nation
:
null
,
picUrl
:
null
,
birthday
:
null
,
education
:
null
,
sex
:
null
,
postIds
:
null
,
roleIds
:
null
,
deptId
:
null
,
password
:
null
,
};
this
.
imageUrl
=
""
;
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
throttle
(()
=>
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
});
'form.deptIds'
(
newVal
)
{
if
(
newVal
.
length
>
8
)
{
// If the selection exceeds the limit, remove the last item
this
.
form
.
deptIds
.
pop
();
}
},
getResumelist
()
{
this
.
resumeListLoading
=
true
;
listResume
({
teacherId
:
this
.
teacherId
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
resumeList
=
res
.
rows
;
this
.
resumeListLoading
=
false
;
}
else
{
this
.
$message
.
error
(
"数据请求失败"
);
this
.
resumeListLoading
=
false
;
}
});
},
created
()
{
this
.
getList
();
this
.
getDeptTree
();
// this.getConfigKey('sys.user.initPassword').then(response => {
// this.initPassword = response.msg
// })
},
getHonorlist
()
{
this
.
honorListLoading
=
true
;
listTeacherAward
({
teacherId
:
this
.
teacherId
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
honorList
=
res
.
rows
;
this
.
honorListLoading
=
false
;
}
else
{
this
.
$message
.
error
(
"数据请求失败"
);
this
.
honorListLoading
=
false
;
methods
:
{
handleSelectionChange
(
selectedItems
)
{
if
(
selectedItems
.
length
>
8
)
{
// 用户选择的项数超过了最大限制,您可以在此处进行处理,例如取消选择最后一个项
this
.
form
.
deptIds
.
pop
();
}
});
},
handleResume
(
row
)
{
this
.
$router
.
push
({
path
:
"/teacherManage/resume"
,
query
:
{
teacherId
:
row
.
id
,
},
});
},
handleHonor
(
row
)
{
// 进入下一个页面
this
.
$router
.
push
({
path
:
"/teacherManage/awardDetails"
,
query
:
{
teacherId
:
row
.
id
,
},
});
},
handleClassView
(
row
)
{
this
.
$router
.
push
({
path
:
"/teachManage/classView"
,
query
:
{
teacherId
:
row
.
id
,
},
});
},
},
// 筛选节点
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
},
// 节点单击事件
handleNodeClick
(
data
)
{
this
.
queryParams
.
deptId
=
data
.
id
;
this
.
handleQuery
();
},
/** 重置密码按钮操作 */
handleResetPwd
(
row
)
{
this
.
$prompt
(
'请输入"'
+
row
.
teacherName
+
'"的新密码'
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
closeOnClickModal
:
false
,
inputPattern
:
/^.
{5,20}
$/
,
inputErrorMessage
:
"用户密码长度必须介于 5 和 20 之间"
}).
then
(({
value
})
=>
{
resetUserPwd
(
row
.
userId
,
value
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功,新密码是:"
+
value
);
});
}).
catch
(()
=>
{
});
},
/** 分配角色操作 */
handleAuthRole
:
function
(
row
)
{
// const userId = row.userId;
this
.
$router
.
push
({
path
:
"/teacherInforManage/authRole"
,
query
:
{
userId
:
row
.
userId
}
});
},
/** 查询学校老师列表 */
getList
()
{
this
.
loading
=
true
;
listInform
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
informList
=
response
.
rows
;
//确认分配角色
submitAssignRoles
()
{
console
.
log
(
this
.
authRole
);
let
query
=
{};
query
.
id
=
this
.
userId
;
query
.
authRole
=
this
.
authRole
;
submitRoles
(
query
).
then
((
res
)
=>
{
this
.
assignRolesopen
=
false
;
this
.
$message
({
type
:
"success"
,
message
:
`分配角色成功`
,
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
});
},
// 关闭对话框
close
()
{
this
.
assignRolesopen
=
false
;
this
.
resetPasswordopen
=
false
;
},
//确认重置密码
submitReset
()
{
let
query
=
{};
query
.
userId
=
this
.
userId
;
query
.
password
=
this
.
password
;
sendResetPassword
(
query
).
then
((
res
)
=>
{
this
.
resetPasswordopen
=
false
;
this
.
$message
({
type
:
"info"
,
message
:
`重置密码成功`
,
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
teacherName
:
null
,
// userName: null,
teacherTel
:
null
,
// phonenumber: null,
teacherCode
:
null
,
idCard
:
null
,
homeAddress
:
null
,
nation
:
null
,
picUrl
:
null
,
birthday
:
null
,
education
:
null
,
sex
:
null
,
postIds
:
null
,
roleIds
:
null
,
deptId
:
null
,
password
:
null
,
};
this
.
imageUrl
=
""
;
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
throttle
(()
=>
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
});
});
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
);
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
isDisabled
=
false
;
this
.
reset
();
this
.
signUrl
=
""
,
this
.
imageUrl
=
""
,
this
.
open
=
true
;
this
.
title
=
"添加教职工信息"
;
this
.
getPostAndRoleList
();
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
this
.
getPostAndRoleList
();
const
id
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
loading
(
"正在加载数据,请稍等..."
);
getInform
(
id
)
.
then
((
response
)
=>
{
this
.
$modal
.
closeLoading
();
this
.
form
=
response
.
data
;
this
.
imageUrl
=
this
.
peV
+
this
.
form
.
picUrl
;
this
.
signUrl
=
this
.
peV
+
this
.
form
.
sign
;
this
.
open
=
true
;
this
.
isDisabled
=
false
;
this
.
title
=
"修改教职工信息"
;
})
.
catch
((
error
)
=>
{
this
.
$modal
.
closeLoading
();
},
getResumelist
()
{
this
.
resumeListLoading
=
true
;
listResume
({
teacherId
:
this
.
teacherId
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
resumeList
=
res
.
rows
;
this
.
resumeListLoading
=
false
;
}
else
{
this
.
$message
.
error
(
"数据请求失败"
);
this
.
resumeListLoading
=
false
;
}
});
},
/** 查看详情 */
handleDetail
(
row
)
{
this
.
reset
();
this
.
getPostAndRoleList
();
const
id
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
loading
(
"正在加载数据,请稍等..."
);
getInform
(
id
)
.
then
((
response
)
=>
{
this
.
$modal
.
closeLoading
();
this
.
form
=
response
.
data
;
this
.
imageUrl
=
this
.
form
.
picUrl
;
this
.
open
=
true
;
this
.
isDisabled
=
true
;
this
.
title
=
"查看教职工信息"
;
})
.
catch
((
error
)
=>
{
this
.
$modal
.
closeLoading
();
},
getHonorlist
()
{
this
.
honorListLoading
=
true
;
listTeacherAward
({
teacherId
:
this
.
teacherId
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
honorList
=
res
.
rows
;
this
.
honorListLoading
=
false
;
}
else
{
this
.
$message
.
error
(
"数据请求失败"
);
this
.
honorListLoading
=
false
;
}
});
},
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
},
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
},
},
handleResume
(
row
)
{
this
.
$router
.
push
({
path
:
"/teacherManage/resume"
,
query
:
{
teacherId
:
row
.
id
,
},
});
},
handleHonor
(
row
)
{
// 进入下一个页面
this
.
$router
.
push
({
path
:
"/teacherManage/awardDetails"
,
query
:
{
teacherId
:
row
.
id
,
},
});
},
handleClassView
(
row
)
{
this
.
$router
.
push
({
path
:
"/teachManage/classView"
,
query
:
{
teacherId
:
row
.
id
,
},
});
},
// 上传图片
uploadImage
(
file
,
type
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
if
(
type
==
'photo'
)
{
this
.
photoUploadLoading
=
true
;
commonUpload
(
formData
).
then
((
response
)
=>
{
console
.
log
(
response
,
1147
)
this
.
photoUploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
imageUrl
=
process
.
env
.
VUE_APP_BASE_API
+
response
.
url
;
this
.
form
.
avatar
=
response
.
url
;
}).
catch
((
error
)
=>
{
this
.
photoUploadLoading
=
false
;
/** 重置密码按钮操作 */
handleResetPwd
(
row
)
{
this
.
$prompt
(
'请输入"'
+
row
.
teacherName
+
'"的新密码'
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
closeOnClickModal
:
false
,
inputPattern
:
/^.
{5,20}
$/
,
inputErrorMessage
:
"用户密码长度必须介于 5 和 20 之间"
}).
then
(({
value
})
=>
{
resetUserPwd
(
row
.
userId
,
value
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功,新密码是:"
+
value
);
});
}).
catch
(()
=>
{
});
}
else
{
this
.
signUploadLoading
=
true
;
signUpload
(
formData
).
then
((
response
)
=>
{
this
.
signUploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
signUrl
=
process
.
env
.
VUE_APP_BASE_API
+
response
.
url
;
this
.
form
.
sign
=
response
.
url
;
}).
catch
((
error
)
=>
{
this
.
signUploadLoading
=
false
;
}
,
/** 分配角色操作 */
handleAuthRole
:
function
(
row
)
{
// const userId = row.userId
;
this
.
$router
.
push
({
path
:
"/teacherInforManage/authRole"
,
query
:
{
userId
:
row
.
userId
}
});
}
}
,
},
//确认分配角色
submitAssignRoles
()
{
console
.
log
(
this
.
authRole
);
let
query
=
{};
query
.
id
=
this
.
userId
;
query
.
authRole
=
this
.
authRole
;
submitRoles
(
query
).
then
((
res
)
=>
{
this
.
assignRolesopen
=
false
;
this
.
$message
({
type
:
"success"
,
message
:
`分配角色成功`
,
});
});
},
// 关闭对话框
close
()
{
this
.
assignRolesopen
=
false
;
this
.
resetPasswordopen
=
false
;
},
//确认重置密码
submitReset
()
{
let
query
=
{};
query
.
userId
=
this
.
userId
;
query
.
password
=
this
.
password
;
sendResetPassword
(
query
).
then
((
res
)
=>
{
this
.
resetPasswordopen
=
false
;
this
.
$message
({
type
:
"info"
,
message
:
`重置密码成功`
,
});
});
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
);
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
isDisabled
=
false
;
this
.
reset
();
this
.
signUrl
=
""
,
this
.
imageUrl
=
""
,
this
.
open
=
true
;
this
.
title
=
"添加教职工信息"
;
this
.
getPostAndRoleList
();
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
this
.
getPostAndRoleList
();
const
id
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
loading
(
"正在加载数据,请稍等..."
);
getInform
(
id
)
.
then
((
response
)
=>
{
this
.
$modal
.
closeLoading
();
this
.
form
=
response
.
data
;
this
.
imageUrl
=
this
.
peV
+
this
.
form
.
picUrl
;
this
.
signUrl
=
this
.
peV
+
this
.
form
.
sign
;
this
.
open
=
true
;
this
.
isDisabled
=
false
;
this
.
title
=
"修改教职工信息"
;
})
.
catch
((
error
)
=>
{
this
.
$modal
.
closeLoading
();
});
},
/** 查看详情 */
handleDetail
(
row
)
{
this
.
reset
();
this
.
getPostAndRoleList
();
const
id
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
loading
(
"正在加载数据,请稍等..."
);
getInform
(
id
)
.
then
((
response
)
=>
{
this
.
$modal
.
closeLoading
();
this
.
form
=
response
.
data
;
this
.
imageUrl
=
this
.
form
.
picUrl
;
this
.
open
=
true
;
this
.
isDisabled
=
true
;
this
.
title
=
"查看教职工信息"
;
})
.
catch
((
error
)
=>
{
this
.
$modal
.
closeLoading
();
});
},
// 上传成功回调
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
res
.
data
.
url
;
this
.
commonUpload
(
file
);
},
// 上传前格式和图片大小限制
beforeAvatarUpload
(
file
)
{
const
type
=
file
.
type
===
"image/jpeg"
||
"image/jpg"
||
"image/webp"
||
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
type
)
{
this
.
$message
.
error
(
"图片格式不正确!(只能包含jpg,png,webp,JPEG)"
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
"上传图片大小不能超过 2MB!"
);
}
return
type
&&
isLt2M
;
},
/** 提交按钮 */
submitForm
()
{
if
(
!
this
.
form
.
picUrl
)
{
if
(
this
.
form
.
sex
===
Gender
.
FEMALE
)
{
this
.
form
.
picUrl
=
"https://eos-wuxi-1.cmecloud.cn/dy-pro/image/2022/08/09/b076ed42bfca4a8cae062dfffd5f3618.jpg"
;
// 上传图片
uploadImage
(
file
,
type
)
{
const
fileData
=
file
.
file
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
fileData
);
if
(
type
==
'photo'
)
{
this
.
photoUploadLoading
=
true
;
commonUpload
(
formData
).
then
((
response
)
=>
{
console
.
log
(
response
,
1147
)
this
.
photoUploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
imageUrl
=
process
.
env
.
VUE_APP_BASE_API
+
response
.
url
;
this
.
form
.
avatar
=
response
.
url
;
}).
catch
((
error
)
=>
{
this
.
photoUploadLoading
=
false
;
});
}
else
{
this
.
form
.
picUrl
=
"https://eos-wuxi-1.cmecloud.cn/dy-pro/image/2022/08/09/8a6c1334494d418d8a53cc7bf5abd668.jpg"
;
this
.
signUploadLoading
=
true
;
signUpload
(
formData
).
then
((
response
)
=>
{
this
.
signUploadLoading
=
false
;
this
.
$modal
.
msgSuccess
(
"上传成功"
);
this
.
signUrl
=
process
.
env
.
VUE_APP_BASE_API
+
response
.
url
;
this
.
form
.
sign
=
response
.
url
;
}).
catch
((
error
)
=>
{
this
.
signUploadLoading
=
false
;
});
}
}
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateInform
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
})
;
},
/** 提交按钮 */
submitForm
()
{
if
(
!
this
.
form
.
picUrl
)
{
if
(
this
.
form
.
sex
===
Gender
.
FEMALE
)
{
this
.
form
.
picUrl
=
"https://eos-wuxi-1.cmecloud.cn/dy-pro/image/2022/08/09/b076ed42bfca4a8cae062dfffd5f3618.jpg"
;
}
else
{
addInform
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
this
.
form
.
picUrl
=
"https://eos-wuxi-1.cmecloud.cn/dy-pro/image/2022/08/09/8a6c1334494d418d8a53cc7bf5abd668.jpg"
;
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
`是否确认删除选中的
${
Object
.
hasOwnProperty
.
call
(
ids
,
"length"
)
?
ids
.
length
:
1
}
条数据?`
)
.
then
(()
=>
{
this
.
$modal
.
loading
(
"正在删除数据,请稍等..."
);
return
delInform
(
ids
);
})
.
then
(()
=>
{
this
.
$modal
.
closeLoading
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
this
.
getList
();
})
.
catch
(()
=>
{
this
.
$modal
.
closeLoading
();
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateInform
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addInform
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 导出按钮操作 */
handleExport
()
{
// 导出选中,导出全部,根据查询条件导出
this
.
exportOptions
.
open
=
true
;
// this.$confirm(`是否确认导出${ !!this.ids.length ? this.ids.length + '条' : '所有' }数据?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// if (this.ids.length) {
// this.download('/school/teacher/export/' + this.ids, {
// ...this.queryParams
// }, `教师信息.xlsx`)
// } else {
// this.download('/school/teacher/export', {
// ...this.queryParams
// }, `教师信息.xlsx`)
// }
//
// }).catch(() => {
//
// });
},
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
`是否确认删除选中的
${
Object
.
hasOwnProperty
.
call
(
ids
,
"length"
)
?
ids
.
length
:
1
}
条数据?`
)
.
then
(()
=>
{
this
.
$modal
.
loading
(
"正在删除数据,请稍等..."
);
return
delInform
(
ids
);
})
.
then
(()
=>
{
this
.
$modal
.
closeLoading
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
this
.
getList
();
})
.
catch
(()
=>
{
this
.
$modal
.
closeLoading
();
});
},
/** 导出按钮操作 */
handleExport
()
{
// 导出选中,导出全部,根据查询条件导出
this
.
exportOptions
.
open
=
true
;
// this.$confirm(`是否确认导出${ !!this.ids.length ? this.ids.length + '条' : '所有' }数据?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// if (this.ids.length) {
// this.download('/school/teacher/export/' + this.ids, {
// ...this.queryParams
// }, `教师信息.xlsx`)
// } else {
// this.download('/school/teacher/export', {
// ...this.queryParams
// }, `教师信息.xlsx`)
// }
//
// }).catch(() => {
//
// });
},
/** 导入按钮 */
handleImport
()
{
this
.
upload
.
title
=
"用户导入"
;
this
.
upload
.
open
=
true
;
},
dateFormat
(
row
,
column
,
cellValue
,
index
)
{
const
daterc
=
row
[
column
.
property
];
if
(
daterc
)
{
if
(
daterc
.
indexOf
(
"T"
)
===
-
1
)
return
daterc
;
const
arr
=
daterc
.
split
(
"T"
);
const
d
=
arr
[
0
];
const
darr
=
d
.
split
(
"-"
);
const
t
=
arr
[
1
];
const
tarr
=
t
.
split
(
".000"
);
const
marr
=
tarr
[
0
].
split
(
":"
);
const
dd
=
darr
[
0
]
+
"-"
+
darr
[
1
]
+
"-"
+
darr
[
2
];
return
dd
;
}
},
/** 更多下拉菜单 */
// handleCommand(command, row) {
// this[command].apply(undefined, [row]);
// },
// 更多操作触发
handleCommand
(
command
,
row
)
{
switch
(
command
)
{
case
"handleHonor"
:
this
.
handleHonor
(
row
)
break
;
case
"handleResume"
:
this
.
handleResume
(
row
)
break
;
case
"handleResetPwd"
:
this
.
handleResetPwd
(
row
);
break
;
case
"handleAuthRole"
:
this
.
handleAuthRole
(
row
);
break
;
default
:
break
;
}
},
/** 导入按钮 */
handleImport
()
{
this
.
upload
.
title
=
"用户导入"
;
this
.
upload
.
open
=
true
;
},
dateFormat
(
row
,
column
,
cellValue
,
index
)
{
const
daterc
=
row
[
column
.
property
];
if
(
daterc
)
{
if
(
daterc
.
indexOf
(
"T"
)
===
-
1
)
return
daterc
;
const
arr
=
daterc
.
split
(
"T"
);
const
d
=
arr
[
0
];
const
darr
=
d
.
split
(
"-"
);
const
t
=
arr
[
1
];
const
tarr
=
t
.
split
(
".000"
);
const
marr
=
tarr
[
0
].
split
(
":"
);
const
dd
=
darr
[
0
]
+
"-"
+
darr
[
1
]
+
"-"
+
darr
[
2
];
return
dd
;
}
},
/** 更多下拉菜单 */
// handleCommand(command, row) {
// this[command].apply(undefined, [row]);
// },
// 更多操作触发
handleCommand
(
command
,
row
)
{
switch
(
command
)
{
case
"handleHonor"
:
this
.
handleHonor
(
row
)
break
;
case
"handleResume"
:
this
.
handleResume
(
row
)
break
;
case
"handleResetPwd"
:
this
.
handleResetPwd
(
row
);
break
;
case
"handleAuthRole"
:
this
.
handleAuthRole
(
row
);
break
;
default
:
break
;
}
},
/** 查询部门下拉树结构 */
getDeptTree
()
{
this
.
$store
.
dispatch
(
"getDeptTree"
)
.
then
((
response
)
=>
{
this
.
deptOptions
=
response
;
})
.
catch
((
error
)
=>
{
this
.
deptOptions
=
[];
});
},
/** 查询岗位列表,角色列表 */
getPostAndRoleList
()
{
this
.
$store
.
dispatch
(
"getPostList"
)
.
then
((
response
)
=>
{
/** 查询部门下拉树结构 */
getDeptTree
()
{
this
.
$store
.
dispatch
(
"getDeptTree"
)
.
then
((
response
)
=>
{
this
.
deptOptions
=
response
;
})
.
catch
((
error
)
=>
{
this
.
deptOptions
=
[];
});
},
/** 查询岗位列表,角色列表 */
getPostAndRoleList
()
{
this
.
$store
.
dispatch
(
"getPostList"
)
.
then
((
response
)
=>
{
this
.
postOptions
=
response
.
posts
;
console
.
log
(
this
.
postOptions
,
1304
);
this
.
roleOptions
=
response
.
roles
;
})
.
catch
((
error
)
=>
{
this
.
postOptions
=
[];
this
.
roleOptions
=
[];
});
},
/** 下载模板操作 */
importTemplate
()
{
this
.
download
(
"school/teacher/importTemplate"
,
{},
`老师信息模板_
${
new
Date
().
getTime
()}
.xlsx`
);
},
// 文件上传中处理
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
}
);
this
.
getList
();
},
// 提交上传文件
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
},
/** 导出 */
exportFile
(
callback
)
{
const
ids
=
this
.
ids
;
const
options
=
[
{
type
:
ExportType
.
TOTAL
,
path
:
"/school/teacher/export"
,
params
:
{}
},
{
type
:
ExportType
.
SELECT
,
path
:
"/school/teacher/export/"
+
ids
,
params
:
{},
},
{
type
:
ExportType
.
QUERY
,
path
:
"/school/teacher/export"
,
params
:
this
.
queryParams
,
},
];
callback
(
options
,
`老师信息
${
new
Date
().
getTime
()}
.xlsx`
);
},
this
.
postOptions
=
response
.
posts
;
console
.
log
(
this
.
postOptions
,
1304
);
this
.
roleOptions
=
response
.
roles
;
})
.
catch
((
error
)
=>
{
this
.
postOptions
=
[];
this
.
roleOptions
=
[];
});
},
/** 下载模板操作 */
importTemplate
()
{
this
.
download
(
"school/teacher/importTemplate"
,
{},
`老师信息模板_
${
new
Date
().
getTime
()}
.xlsx`
);
},
// 文件上传中处理
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
}
);
this
.
getList
();
},
// 提交上传文件
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
},
/** 导出 */
exportFile
(
callback
)
{
const
ids
=
this
.
ids
;
const
options
=
[
{
type
:
ExportType
.
TOTAL
,
path
:
"/school/teacher/export"
,
params
:
{}
},
{
type
:
ExportType
.
SELECT
,
path
:
"/school/teacher/export/"
+
ids
,
params
:
{},
},
{
type
:
ExportType
.
QUERY
,
path
:
"/school/teacher/export"
,
params
:
this
.
queryParams
,
},
];
callback
(
options
,
`老师信息
${
new
Date
().
getTime
()}
.xlsx`
);
},
/** 是否可以被勾选 */
isSelected
(
row
,
index
)
{
if
(
row
.
id
==
1
)
{
return
false
;
}
return
true
;
},
switchChange
(
row
,
status
)
{
this
.
$modal
.
confirm
(
status
===
'1'
?
'是否确认停用此用户状态?'
:
'是否确认启用此用户状态?'
)
.
then
(()
=>
{
this
.
$modal
.
loading
(
'正在修改状态,请稍等...'
)
statusChange
(
status
,
row
.
id
)
.
then
(
response
=>
{
this
.
$modal
.
closeLoading
()
this
.
$modal
.
msgSuccess
(
'修改成功'
)
})
})
.
catch
(()
=>
{
this
.
$modal
.
closeLoading
()
})
// console.log(row, status, 56565656)
// statusChange(status, row.id).then(() => {
/** 是否可以被勾选 */
isSelected
(
row
,
index
)
{
if
(
row
.
id
==
1
)
{
return
false
;
}
return
true
;
},
switchChange
(
row
,
status
)
{
this
.
$modal
.
confirm
(
status
===
'1'
?
'是否确认停用此用户状态?'
:
'是否确认启用此用户状态?'
)
.
then
(()
=>
{
this
.
$modal
.
loading
(
'正在修改状态,请稍等...'
)
statusChange
(
status
,
row
.
id
)
.
then
(
response
=>
{
this
.
$modal
.
closeLoading
()
this
.
$modal
.
msgSuccess
(
'修改成功'
)
})
})
.
catch
(()
=>
{
this
.
$modal
.
closeLoading
()
})
// console.log(row, status, 56565656)
// statusChange(status, row.id).then(() => {
// })
}
// })
}
},
};
},
};
</
script
>
<
style
scoped
>
.avatar-uploader
{
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacherFiles/TeacherFilesController.java
View file @
c435fba3
...
...
@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles
;
import
yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice
;
import
yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -90,10 +91,10 @@ public class TeacherFilesController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:files:remove')"
)
@Log
(
title
=
"教师档案"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id
s
}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
@DeleteMapping
(
"/{id}"
)
public
AjaxResult
remove
(
@PathVariable
Long
id
)
{
return
toAjax
(
teacherFilesService
.
deleteTeacherFilesById
s
(
ids
));
return
toAjax
(
teacherFilesService
.
deleteTeacherFilesById
(
id
));
}
...
...
@@ -108,4 +109,38 @@ public class TeacherFilesController extends BaseController
return
toAjax
(
teacherFilesService
.
synchronous
(
id
));
}
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:notice:edit')"
)
@Log
(
title
=
"教师档案审核通过"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/passThrough/{id}"
)
public
AjaxResult
passThrough
(
@PathVariable
(
"id"
)
Long
id
)
{
TeacherFiles
teacherFiles
=
new
TeacherFiles
();
teacherFiles
.
setId
(
id
);
teacherFiles
.
setState
(
"5"
);
return
toAjax
(
teacherFilesService
.
updateTeacherFiles
(
teacherFiles
));
}
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:notice:edit')"
)
@Log
(
title
=
"教师档案审核驳回"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/reject/{id}"
)
public
AjaxResult
reject
(
@PathVariable
(
"id"
)
Long
id
)
{
TeacherFiles
teacherFiles
=
new
TeacherFiles
();
teacherFiles
.
setId
(
id
);
teacherFiles
.
setState
(
"9"
);
return
toAjax
(
teacherFilesService
.
updateTeacherFiles
(
teacherFiles
));
}
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:notice:edit')"
)
@Log
(
title
=
"教师档案提交"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/submitTo/{id}"
)
public
AjaxResult
submitTo
(
@PathVariable
(
"id"
)
Long
id
)
{
TeacherFiles
teacherFiles
=
new
TeacherFiles
();
teacherFiles
.
setId
(
id
);
teacherFiles
.
setState
(
"4"
);
return
toAjax
(
teacherFilesService
.
updateTeacherFiles
(
teacherFiles
));
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacherFiles/TeacherFilesNoticeController.java
View file @
c435fba3
...
...
@@ -94,14 +94,31 @@ public class TeacherFilesNoticeController extends BaseController
return
toAjax
(
teacherFilesNoticeService
.
release
(
id
));
}
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:notice:edit')"
)
@Log
(
title
=
"教师档案通知撤回"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/withdraw/{id}"
)
public
AjaxResult
withdraw
(
@PathVariable
(
"id"
)
String
id
)
{
return
toAjax
(
teacherFilesNoticeService
.
withdraw
(
id
));
}
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:notice:edit')"
)
@Log
(
title
=
"教师档案通知完成"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/complete/{id}"
)
public
AjaxResult
complete
(
@PathVariable
(
"id"
)
String
id
)
{
return
toAjax
(
teacherFilesNoticeService
.
complete
(
id
));
}
/**
* 删除教师档案通知
*/
@PreAuthorize
(
"@ss.hasPermi('teacherFiles:notice:remove')"
)
@Log
(
title
=
"教师档案通知"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id
s
}"
)
public
AjaxResult
remove
(
@PathVariable
String
[]
ids
)
@DeleteMapping
(
"/{id}"
)
public
AjaxResult
remove
(
@PathVariable
(
"id"
)
String
id
)
{
return
toAjax
(
teacherFilesNoticeService
.
deleteTeacherFilesNoticeById
s
(
ids
));
return
toAjax
(
teacherFilesNoticeService
.
deleteTeacherFilesNoticeById
(
id
));
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/teacherFiles/TeacherFilesAward.java
View file @
c435fba3
...
...
@@ -39,7 +39,7 @@ public class TeacherFilesAward extends BaseEntity
private
Date
awardTime
;
/** 获奖等级(1一等奖,2二等奖,3三等奖) */
@Excel
(
name
=
"获奖等级"
,
readConverterExp
=
"1=一等奖,2
二等奖,3
三等奖"
)
@Excel
(
name
=
"获奖等级"
,
readConverterExp
=
"1=一等奖,2
=二等奖,3=
三等奖"
)
private
String
gradeOfAward
;
/** 发证机关 */
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/teacherFiles/TeacherFilesMapper.java
View file @
c435fba3
...
...
@@ -4,6 +4,7 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles;
import
yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesVO
;
import
java.util.List
;
import
java.util.Map
;
/**
* 教师档案Mapper接口
...
...
@@ -47,6 +48,13 @@ public interface TeacherFilesMapper
public
int
updateTeacherFilesState
(
String
noticeId
);
public
int
updateTeacherFilesState1
(
String
noticeId
);
public
int
updateTeacherFilesState7
(
String
noticeId
);
public
int
updateTeacherFilesName
(
Map
map
);
/**
* 删除教师档案
*
...
...
@@ -62,4 +70,7 @@ public interface TeacherFilesMapper
* @return 结果
*/
public
int
deleteTeacherFilesByIds
(
Long
[]
ids
);
public
int
deleteTeacherFilesByNoticeId
(
String
noticeId
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/teacherFiles/TeacherFilesNoticeServiceImpl.java
View file @
c435fba3
...
...
@@ -176,7 +176,6 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
teacherFiles
.
setIdCard
(
schoolTeacher
.
getIdCard
());
teacherFiles
.
setSex
(
schoolTeacher
.
getSex
());
teacherFiles
.
setEducation
(
schoolTeacher
.
getEducation
());
System
.
out
.
println
(
schoolTeacher
.
getTeacherName
()+
"---------"
+
schoolTeacher
.
getBirthday
());
Date
birthday
=
schoolTeacher
.
getBirthday
();
if
(
birthday
!=
null
){
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy"
);
...
...
@@ -200,7 +199,13 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
public
int
updateTeacherFilesNotice
(
TeacherFilesNotice
teacherFilesNotice
)
{
teacherFilesNotice
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
teacherFilesNoticeMapper
.
updateTeacherFilesNotice
(
teacherFilesNotice
);
teacherFilesNotice
.
setNoticeName
(
teacherFilesNotice
.
getNoticeYear
()+
"学年"
+
teacherFilesNotice
.
getNoticeSemester
()+
"教师档案填写"
);
int
i
=
teacherFilesNoticeMapper
.
updateTeacherFilesNotice
(
teacherFilesNotice
);
Map
map
=
new
HashMap
();
map
.
put
(
"noticeId"
,
teacherFilesNotice
.
getId
());
map
.
put
(
"filesSemester"
,
teacherFilesNotice
.
getNoticeYear
()+
"学年"
+
teacherFilesNotice
.
getNoticeSemester
());
teacherFilesMapper
.
updateTeacherFilesName
(
map
);
return
i
;
}
@Override
...
...
@@ -208,11 +213,34 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
TeacherFilesNotice
teacherFilesNotice
=
new
TeacherFilesNotice
();
teacherFilesNotice
.
setId
(
id
);
teacherFilesNotice
.
setUpdateTime
(
DateUtils
.
getNowDate
());
teacherFilesNotice
.
setNoticeState
(
"2"
);
int
i
=
teacherFilesMapper
.
updateTeacherFilesState
(
id
);
teacherFilesNoticeMapper
.
updateTeacherFilesNotice
(
teacherFilesNotice
);
return
i
;
}
@Override
public
int
withdraw
(
String
id
)
{
TeacherFilesNotice
teacherFilesNotice
=
new
TeacherFilesNotice
();
teacherFilesNotice
.
setId
(
id
);
teacherFilesNotice
.
setUpdateTime
(
DateUtils
.
getNowDate
());
teacherFilesNotice
.
setNoticeState
(
"1"
);
int
i
=
teacherFilesMapper
.
updateTeacherFilesState1
(
id
);
teacherFilesNoticeMapper
.
updateTeacherFilesNotice
(
teacherFilesNotice
);
return
i
;
}
@Override
public
int
complete
(
String
id
)
{
TeacherFilesNotice
teacherFilesNotice
=
new
TeacherFilesNotice
();
teacherFilesNotice
.
setId
(
id
);
teacherFilesNotice
.
setUpdateTime
(
DateUtils
.
getNowDate
());
teacherFilesNotice
.
setNoticeState
(
"7"
);
int
i
=
teacherFilesMapper
.
updateTeacherFilesState7
(
id
);
teacherFilesNoticeMapper
.
updateTeacherFilesNotice
(
teacherFilesNotice
);
return
i
;
}
/**
* 批量删除教师档案通知
*
...
...
@@ -234,6 +262,8 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
@Override
public
int
deleteTeacherFilesNoticeById
(
String
id
)
{
return
teacherFilesNoticeMapper
.
deleteTeacherFilesNoticeById
(
id
);
int
i
=
teacherFilesNoticeMapper
.
deleteTeacherFilesNoticeById
(
id
);
teacherFilesMapper
.
deleteTeacherFilesByNoticeId
(
id
);
return
i
;
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/teacherFiles/ITeacherFilesNoticeService.java
View file @
c435fba3
...
...
@@ -47,6 +47,10 @@ public interface ITeacherFilesNoticeService
public
int
release
(
String
id
);
public
int
withdraw
(
String
id
);
public
int
complete
(
String
id
);
/**
* 批量删除教师档案通知
*
...
...
smart-campus/src/main/resources/mapper/teacherFiles/TeacherFilesMapper.xml
View file @
c435fba3
...
...
@@ -143,14 +143,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<update
id=
"updateTeacherFilesName"
parameterType=
"Map"
>
update teacher_files set files_semester = #{filesSemester} where notice_id = #{noticeId}
</update>
<update
id=
"updateTeacherFilesState"
parameterType=
"String"
>
update teacher_files set state = 2 where notice_id = #{noticeId}
</update>
<update
id=
"updateTeacherFilesState1"
parameterType=
"String"
>
update teacher_files set state = 1 where notice_id = #{noticeId}
</update>
<update
id=
"updateTeacherFilesState7"
parameterType=
"String"
>
update teacher_files set state = 7 where notice_id = #{noticeId}
</update>
<delete
id=
"deleteTeacherFilesById"
parameterType=
"Long"
>
delete from teacher_files where id = #{id}
</delete>
<delete
id=
"deleteTeacherFilesByNoticeId"
parameterType=
"String"
>
delete from teacher_files where notice_id = #{noticeId}
</delete>
<delete
id=
"deleteTeacherFilesByIds"
parameterType=
"String"
>
delete from teacher_files where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment