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

Now clicking the Specific Content button will bring up the details of the affair

This commit is contained in:
assina045
2023-05-11 17:04:25 +08:00
parent a009158606
commit 5407d0eb0d
3 changed files with 128 additions and 26 deletions

View File

@@ -24,46 +24,44 @@ public class AffairController {
IAffairService affairService;
@PostMapping("/add")
public ResponseResult addAffair(@RequestBody Affair affair){
return ResponseResult.build(ResponseCode.DATABASE_SAVE_OK,"success",affairService.save(affair));
public ResponseResult addAffair(@RequestBody Affair affair) {
return ResponseResult.build(ResponseCode.DATABASE_SAVE_OK, "success", affairService.save(affair));
}
@GetMapping("/NotApproved")
public ResponseResult select_NotApproved(){
public ResponseResult select_NotApproved() {
LambdaQueryWrapper<Affair> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Affair::getStatus, 0);
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper));
}
@GetMapping("/Approved")
public ResponseResult select_Approved(){
LambdaQueryWrapper<Affair> wrapper2 =new LambdaQueryWrapper<>();
wrapper2.ne(Affair::getStatus,0);
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK,"success",affairService.list(wrapper2)) ;
public ResponseResult select_Approved() {
LambdaQueryWrapper<Affair> wrapper2 = new LambdaQueryWrapper<>();
wrapper2.ne(Affair::getStatus, 0);
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper2));
}
@PutMapping("/yes")
public ResponseResult updateAffair_yes(@RequestBody Affair affair){
public ResponseResult updateAffair_yes(@RequestBody Affair affair) {
System.out.println(affair);
return ResponseResult.build(ResponseCode.DATABASE_UPDATE_OK,"success",affairService.updateAffair_Yes(affair));
return ResponseResult.build(ResponseCode.DATABASE_UPDATE_OK, "success", affairService.updateAffair_Yes(affair));
//审批同意
}
@PutMapping("/no")
public ResponseResult updateAffair_No(@RequestBody Affair affair){
return ResponseResult.build(ResponseCode.DATABASE_UPDATE_OK,"success",affairService.updateAffair_No(affair));
public ResponseResult updateAffair_No(@RequestBody Affair affair) {
return ResponseResult.build(ResponseCode.DATABASE_UPDATE_OK, "success", affairService.updateAffair_No(affair));
//审批驳回
}
@DeleteMapping("/{id}")
public ResponseResult deleteAffair_Apprioved(@PathVariable Long id){
public ResponseResult deleteAffair_Approved(@PathVariable Long id) {
System.out.println("affair");
return ResponseResult.build(ResponseCode.DATABASE_DELETE_OK,"success",affairService.removeById(id));
return ResponseResult.build(ResponseCode.DATABASE_DELETE_OK, "success", affairService.removeById(id));
//删除已审批事务
}

View File

@@ -51,14 +51,14 @@
</template>
</el-table-column>
<el-table-column label="操作" key="slot" width="180">
<el-table-column label="操作" key="slot" width="180" prop="content">
<template #default="scope">
<el-button size="small" type="text" @click="dialogTure(scope.row)"
>具体内容
</el-button>
<el-button size="small" type="danger" @click="handleDelete(scope.row)">
删除
</el-button>
<el-button size="small" type="text" @click="handleEdit(scope.$index, scope.row)"
>具体内容
</el-button>
</template>
</el-table-column>
@@ -69,6 +69,30 @@
</el-table-column>
</el-table>
<el-dialog title="详细内容" v-model="dialogVisible" width="50%" :data="dialogData" center>
<el-row>
<el-col :span="3"></el-col>
<el-col :span="4">事务标题:</el-col>
<el-col :span="1">{{ dialogData.title }}</el-col>
</el-row>
<el-row>
<el-col :span="3"></el-col>
<el-col :span="4">具体内容:</el-col>
</el-row>
<el-row>
<el-col :span="7"></el-col>
<el-col :span="1">{{ dialogData.content }}</el-col>
</el-row>
<el-row>
<el-col :span="11"></el-col>
<el-col :span="2">
<span class="dialog-footer">
<el-button @click="dialogFalse"> </el-button>
</span>
</el-col>
</el-row>
</el-dialog>
<el-divider :data="labelData">
<div class="block">
<el-pagination
@@ -119,6 +143,26 @@ export default {
currentPage3: 5,
currentPage4: 4
}
],
dialogVisible: false,
dialogData: [
{
id: '',
title: '',
content: '',
type_id: '',
status: '',
applicant_id: '',
inspector_id: '',
create_time: '',
inspect_time: '',
priority: '',
modify_time: '',
origin_id: '',
old: '',
deleted: '',
version: ''
}
]
}
},
@@ -179,10 +223,18 @@ export default {
},
format(time) {
return new Date(time).toLocaleString()
}, // 时间格式转换
dialogTure(data) {
this.dialogVisible = true
this.dialogData = data
},
dialogFalse() {
this.dialogVisible = false
}
},
created() {
this.getApproed()
this.dialogFalse()
console.log(this.tableData)
}
}

View File

@@ -46,9 +46,9 @@
</template>
</el-table-column>
<el-table-column label="操作" key="slot" width="240">
<el-table-column label="操作" width="240" prop="content">
<template #default="scope">
<el-button size="small" type="text" @click="handleYes(scope.row)"
<el-button size="small" type="text" @click="dialogTure(scope.row)"
>具体内容
</el-button>
@@ -63,6 +63,30 @@
</el-table-column>
</el-table>
<el-dialog title="详细内容" v-model="dialogVisible" width="50%" :data="dialogData" center>
<el-row>
<el-col :span="3"></el-col>
<el-col :span="4">事务标题:</el-col>
<el-col :span="1">{{ dialogData.title }}</el-col>
</el-row>
<el-row>
<el-col :span="3"></el-col>
<el-col :span="4">具体内容:</el-col>
</el-row>
<el-row>
<el-col :span="7"></el-col>
<el-col :span="1">{{ dialogData.content }}</el-col>
</el-row>
<el-row>
<el-col :span="11"></el-col>
<el-col :span="2">
<span class="dialog-footer">
<el-button @click="dialogFalse"> </el-button>
</span>
</el-col>
</el-row>
</el-dialog>
<el-divider :data="labelData">
<div class="block">
<el-pagination
@@ -114,6 +138,26 @@ export default {
currentPage3: 5,
currentPage4: 4
}
],
dialogVisible: false,
dialogData: [
{
id: '',
title: '',
content: '',
type_id: '',
status: '',
applicant_id: '',
inspector_id: '',
create_time: '',
inspect_time: '',
priority: '',
modify_time: '',
origin_id: '',
old: '',
deleted: '',
version: ''
}
]
}
},
@@ -128,7 +172,7 @@ export default {
})
.catch((reportError) => {
console.log(reportError)
})
}) // 执行审批同意
},
handleNo(row) {
console.log(row)
@@ -140,7 +184,7 @@ export default {
})
.catch((reportError) => {
console.log(reportError)
})
}) // 审批驳回
},
handleSizeChange(val) {
@@ -148,7 +192,7 @@ export default {
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
},
}, // 标签页
getApproed() {
request
.get('http://localhost:8621/affair/NotApproved')
@@ -158,16 +202,24 @@ export default {
})
.catch((reportError) => {
console.log(reportError)
})
}) // 获取事务信息或者重新刷新页面
},
format(time) {
return new Date(time).toLocaleString()
}, // 时间格式转换
dialogTure(data) {
this.dialogVisible = true
this.dialogData = data
},
dialogFalse() {
this.dialogVisible = false
}
},
created() {
this.getApproed()
this.dialogFalse()
console.log(this.tableData)
}
} // 获取事务信息
}
</script>
<style></style>