1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 23:11:24 +08:00

modify the el-=cascader in page of NoticeCommitForm

This commit is contained in:
cccccyb
2023-06-04 20:17:43 +08:00
parent 279c4bfc67
commit b8ad05b4a1
3 changed files with 12 additions and 7 deletions

View File

@@ -84,7 +84,13 @@
}}</span>
<span v-if="scope.node.level === 2">{{
((scope.node.value = scope.data.id),
(scope.node.label = scope.data.username))
(scope.node.label = scope.data.staff
? scope.data.staff.lastName +
scope.data.staff.firstName +
'(' +
scope.data.username +
')'
: scope.data.username))
}}</span>
</template>
</el-cascader>
@@ -140,7 +146,6 @@ export default {
content: [{ required: true, message: '请填写公告内容', trigger: 'blur' }],
receivers: [
{
type: 'array',
required: true,
message: '请选择公告接收者',
trigger: 'change'

View File

@@ -201,8 +201,8 @@ export const useNoticeStore = defineStore('notice', {
this.departmentList = response.data.data
})
},
handleAddNotice(addFormData: IAddNoticeData) {
void request.post('/notice', addFormData).then((response) => {
async handleAddNotice(addFormData: IAddNoticeData) {
await request.post('/notice', addFormData).then((response) => {
if (response.data.code === DATABASE_SAVE_OK) {
this.dialogAddVisible = false
ElMessage({
@@ -218,8 +218,8 @@ export const useNoticeStore = defineStore('notice', {
})
this.selectAllNotice(1, 5, '', '', '', '', [])
},
handleUpdateNotice(updateNotice: IAddNoticeData) {
void request.put('/notice', updateNotice).then((response) => {
async handleUpdateNotice(updateNotice: IAddNoticeData) {
await request.put('/notice', updateNotice).then((response) => {
if (response.data.code === DATABASE_UPDATE_OK) {
this.dialogEditVisible = false
this.editFlag = false