mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-04 22:41:24 +08:00
add the function of updateNoticeType
This commit is contained in:
@@ -4,6 +4,7 @@ import com.cfive.pinnacle.entity.NoticeType;
|
|||||||
import com.cfive.pinnacle.entity.common.ResponseCode;
|
import com.cfive.pinnacle.entity.common.ResponseCode;
|
||||||
import com.cfive.pinnacle.entity.common.ResponseResult;
|
import com.cfive.pinnacle.entity.common.ResponseResult;
|
||||||
import com.cfive.pinnacle.service.INoticeTypeService;
|
import com.cfive.pinnacle.service.INoticeTypeService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -23,8 +24,8 @@ import java.util.List;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/notice_type")
|
@RequestMapping("/notice_type")
|
||||||
@CrossOrigin
|
@CrossOrigin
|
||||||
|
@Slf4j
|
||||||
public class NoticeTypeController {
|
public class NoticeTypeController {
|
||||||
private final Logger LOGGER = LoggerFactory.getLogger(getClass());
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
INoticeTypeService noticeTypeService;
|
INoticeTypeService noticeTypeService;
|
||||||
@@ -49,21 +50,19 @@ public class NoticeTypeController {
|
|||||||
|
|
||||||
//修改公告类型启用或禁用
|
//修改公告类型启用或禁用
|
||||||
@GetMapping("/update")
|
@GetMapping("/update")
|
||||||
public ResponseResult updateTypeEnableById(String typeId,Boolean enable){
|
public ResponseResult updateTypeEnableById(String typeId,Integer enable){
|
||||||
Long tid=null;
|
Long tid=null;
|
||||||
Integer isEnable = null;
|
if (StringUtils.hasText(typeId)){
|
||||||
if (StringUtils.hasText(typeId)&&null!=enable){
|
|
||||||
tid = Long.parseLong(typeId);
|
tid = Long.parseLong(typeId);
|
||||||
isEnable = (enable == true ? 1 : 0);
|
|
||||||
}
|
}
|
||||||
Boolean updateEnableById = noticeTypeService.updateTypeEnableById(tid, isEnable);
|
Boolean updateEnableById = noticeTypeService.updateTypeEnableById(tid, enable);
|
||||||
String msg = updateEnableById ? "" : "修改失败,请重试!";
|
String msg = updateEnableById ? "" : "修改失败,请重试!";
|
||||||
return ResponseResult.build(updateEnableById ? ResponseCode.DATABASE_UPDATE_OK : ResponseCode.DATABASE_UPDATE_ERROR, msg, updateEnableById);
|
return ResponseResult.build(updateEnableById ? ResponseCode.DATABASE_UPDATE_OK : ResponseCode.DATABASE_UPDATE_ERROR, msg, updateEnableById);
|
||||||
}
|
}
|
||||||
|
|
||||||
//添加公告类型
|
//添加公告类型
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public ResponseResult addNoticeType(NoticeType noticeType){
|
public ResponseResult addNoticeType(@RequestBody NoticeType noticeType){
|
||||||
Boolean insertNotice = noticeTypeService.addNoticeType(noticeType);
|
Boolean insertNotice = noticeTypeService.addNoticeType(noticeType);
|
||||||
String msg = insertNotice ? "" : "数据添加失败,请重试!";
|
String msg = insertNotice ? "" : "数据添加失败,请重试!";
|
||||||
return ResponseResult.build(insertNotice ? ResponseCode.DATABASE_SAVE_OK : ResponseCode.DATABASE_SAVE_ERROR, msg, insertNotice);
|
return ResponseResult.build(insertNotice ? ResponseCode.DATABASE_SAVE_OK : ResponseCode.DATABASE_SAVE_ERROR, msg, insertNotice);
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ public class NoticeTypeServiceImpl extends ServiceImpl<NoticeTypeMapper, NoticeT
|
|||||||
NoticeTypeMapper noticeTypeMapper;
|
NoticeTypeMapper noticeTypeMapper;
|
||||||
@Override
|
@Override
|
||||||
public List<NoticeType> selectTypeList() {
|
public List<NoticeType> selectTypeList() {
|
||||||
return noticeTypeMapper.selectList(null);
|
LambdaQueryWrapper<NoticeType> lqw = new LambdaQueryWrapper<>();
|
||||||
|
lqw.orderByDesc(NoticeType::getId);
|
||||||
|
return noticeTypeMapper.selectList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -40,11 +40,6 @@ public class NoticeTest {
|
|||||||
ResponseResult selectByNoticeId = noticeController.selectByNoticeId(21L);
|
ResponseResult selectByNoticeId = noticeController.selectByNoticeId(21L);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void selectAllTest() {
|
|
||||||
// ResponseResult noticeList = noticeController.selectAllNotice(null, null,null,null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void updateTest() {
|
void updateTest() {
|
||||||
ResponseResult notice = noticeController.selectByNoticeId(23L);
|
ResponseResult notice = noticeController.selectByNoticeId(23L);
|
||||||
|
|||||||
@@ -181,8 +181,6 @@ export default {
|
|||||||
// 编辑操作
|
// 编辑操作
|
||||||
if (noticeStore.editFlag===true) {
|
if (noticeStore.editFlag===true) {
|
||||||
this.addData = noticeStore.noticeShowData
|
this.addData = noticeStore.noticeShowData
|
||||||
// 判断是否置顶
|
|
||||||
this.addData.top=(noticeStore.noticeShowData.top===1);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ export default {
|
|||||||
return new Date(data).toLocaleString()
|
return new Date(data).toLocaleString()
|
||||||
},
|
},
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
console.log(row)
|
|
||||||
noticeStore.$patch((state) => {
|
noticeStore.$patch((state) => {
|
||||||
state.hackReset = true
|
state.hackReset = true
|
||||||
state.noticeShowData = row
|
state.noticeShowData = row
|
||||||
@@ -228,7 +227,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleShow(row) {
|
handleShow(row) {
|
||||||
console.log(row)
|
|
||||||
noticeStore.$patch((state) => {
|
noticeStore.$patch((state) => {
|
||||||
state.dialogShowVisible = true
|
state.dialogShowVisible = true
|
||||||
state.noticeShowData = row
|
state.noticeShowData = row
|
||||||
|
|||||||
@@ -16,14 +16,24 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
import { useNoticeTypeStore } from '@/store/notice'
|
||||||
|
|
||||||
|
const noticeTypeStore = useNoticeTypeStore()
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NoticeTypeCommitForm',
|
name: 'NoticeTypeCommitForm',
|
||||||
|
computed: {
|
||||||
|
...mapState(useNoticeTypeStore, [
|
||||||
|
'noticeTypeList',
|
||||||
|
'dataLoading',
|
||||||
|
'addTypeData',
|
||||||
|
'editFlag',
|
||||||
|
'showTypeData'
|
||||||
|
])
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addTypeData: {
|
|
||||||
name: '',
|
|
||||||
enable: 1
|
|
||||||
},
|
|
||||||
typeRule: {
|
typeRule: {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入类型名称', trigger: 'blur' },
|
{ required: true, message: '请输入类型名称', trigger: 'blur' },
|
||||||
@@ -32,7 +42,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {},
|
||||||
|
created() {
|
||||||
|
// 编辑操作
|
||||||
|
if (noticeTypeStore.editFlag === true) {
|
||||||
|
noticeTypeStore.addTypeData = this.showTypeData
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,7 @@
|
|||||||
:header-cell-style="{
|
:header-cell-style="{
|
||||||
background: 'darksalmon',
|
background: 'darksalmon',
|
||||||
'text-align': 'center',
|
'text-align': 'center',
|
||||||
color: '#fff',
|
color: '#fff'
|
||||||
'font-size': '20px'
|
|
||||||
}"
|
}"
|
||||||
><el-table-column type="selection" width="65" align="center" />
|
><el-table-column type="selection" width="65" align="center" />
|
||||||
<el-table-column type="index" label="序号" width="80" align="center" />
|
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||||
@@ -25,6 +24,8 @@
|
|||||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #afb2b8"
|
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #afb2b8"
|
||||||
active-text="启用"
|
active-text="启用"
|
||||||
inactive-text="禁用"
|
inactive-text="禁用"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
@change="switchChang(scope.row.id, scope.row.enable)"
|
@change="switchChang(scope.row.id, scope.row.enable)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
@@ -34,10 +35,7 @@
|
|||||||
<el-input v-model="search" size="default" placeholder="请输入关键字搜索" />
|
<el-input v-model="search" size="default" placeholder="请输入关键字搜索" />
|
||||||
</template>
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button size="default" type="primary" @click="handleOpenEditDialog(scope.row)"
|
||||||
size="default"
|
|
||||||
type="primary"
|
|
||||||
@click="handleEdit(scope.$index, scope.row)"
|
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button size="default" type="danger" @click="handleDeleteById(scope.row)"
|
<el-button size="default" type="danger" @click="handleDeleteById(scope.row)"
|
||||||
@@ -61,18 +59,27 @@
|
|||||||
>
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<!-- 编辑会话框-->
|
<!-- 编辑公告类型会话框-->
|
||||||
<!-- <el-dialog-->
|
<el-dialog
|
||||||
<!-- v-model="dialogEditVisible"-->
|
v-model="dialogEditTypeVisible"
|
||||||
<!-- center-->
|
center
|
||||||
<!-- v-if="hackReset"-->
|
v-if="hackReset"
|
||||||
<!-- :before-close="handleDialogClose"-->
|
:close-on-click-modal="false"
|
||||||
<!-- >-->
|
:before-close="closeEditForm"
|
||||||
<!-- <template #header>-->
|
>
|
||||||
<!-- <h2 style="color: red">编辑公告</h2>-->
|
<template #header>
|
||||||
<!-- </template>-->
|
<h2 style="color: red">编辑公告类型</h2>
|
||||||
<!-- <commitForm />-->
|
</template>
|
||||||
<!-- </el-dialog>-->
|
<notice-type-commit-form ref="editForm" />
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitEditForm" style="margin-right: 20px">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="closeEditForm">取消</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -83,8 +90,15 @@ const noticeTypeStore = useNoticeTypeStore()
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useNoticeStore, ['total', 'dialogEditVisible']),
|
...mapState(useNoticeTypeStore, [
|
||||||
...mapState(useNoticeTypeStore, ['noticeTypeList', 'dataLoading'])
|
'total',
|
||||||
|
'dialogEditTypeVisible',
|
||||||
|
'noticeTypeList',
|
||||||
|
'dataLoading',
|
||||||
|
'hackReset',
|
||||||
|
'showTypeData',
|
||||||
|
'addTypeData'
|
||||||
|
])
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -107,12 +121,13 @@ export default {
|
|||||||
noticeTypeStore.selectNoticeType()
|
noticeTypeStore.selectNoticeType()
|
||||||
}, 800)
|
}, 800)
|
||||||
},
|
},
|
||||||
handleEdit(index, row) {},
|
handleOpenEditDialog(row) {
|
||||||
handleDialogClose() {
|
noticeTypeStore.$patch((state) => {
|
||||||
noticeStore.$patch((state) => {
|
state.hackReset = true
|
||||||
state.dialogEditVisible = false
|
state.showTypeData.name = row.name
|
||||||
state.editFlag = false
|
state.showTypeData.enable = row.enable
|
||||||
state.hackReset = false
|
state.editFlag = true
|
||||||
|
state.dialogEditTypeVisible = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDeleteById(deleteId) {
|
handleDeleteById(deleteId) {
|
||||||
@@ -125,6 +140,23 @@ export default {
|
|||||||
handleCurrentChange(currentPage) {
|
handleCurrentChange(currentPage) {
|
||||||
// currentPage:当前第几页
|
// currentPage:当前第几页
|
||||||
noticeStore.selectAllNotice(parseInt(currentPage), this.pageSize)
|
noticeStore.selectAllNotice(parseInt(currentPage), this.pageSize)
|
||||||
|
},
|
||||||
|
submitEditForm() {
|
||||||
|
this.$refs.editForm.$refs.addTypeData.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// noticeTypeStore.handleUpdateNoticeType(this.addTypeData)
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
closeEditForm() {
|
||||||
|
noticeTypeStore.$patch((state) => {
|
||||||
|
state.dialogEditTypeVisible = false
|
||||||
|
state.editFlag = false
|
||||||
|
state.hackReset = false
|
||||||
|
state.addTypeData = { name: '', enable: 1 }
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -21,16 +21,20 @@
|
|||||||
v-model="dialogAddTypeVisible"
|
v-model="dialogAddTypeVisible"
|
||||||
center
|
center
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
destroy-on-close
|
v-if="hackReset"
|
||||||
|
:before-close="closeForm"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<h2 style="color: red">添加公告类型</h2>
|
<h2 style="color: red">添加公告类型</h2>
|
||||||
</template>
|
</template>
|
||||||
<notice-type-commit-form />
|
<notice-type-commit-form ref="addForm" />
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button>取消</el-button>
|
<el-button @click="resetForm" style="margin-right: 20px">重置</el-button>
|
||||||
<el-button type="primary" @click="submitForm"> 确定 </el-button>
|
<el-button type="primary" @click="submitForm" style="margin-right: 20px">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="closeForm">取消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -50,7 +54,13 @@ const noticeTypeStore = useNoticeTypeStore()
|
|||||||
export default {
|
export default {
|
||||||
name: 'NoticeTypeManage',
|
name: 'NoticeTypeManage',
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useNoticeTypeStore, ['dialogAddTypeVisible', 'editFlag'])
|
...mapState(useNoticeTypeStore, [
|
||||||
|
'dialogAddTypeVisible',
|
||||||
|
'dialogEditTypeVisible',
|
||||||
|
'editFlag',
|
||||||
|
'hackReset',
|
||||||
|
'addTypeData'
|
||||||
|
])
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {}
|
||||||
@@ -64,22 +74,31 @@ export default {
|
|||||||
noticeTypeStore.selectNoticeType()
|
noticeTypeStore.selectNoticeType()
|
||||||
},
|
},
|
||||||
handleOpenAddDialog() {
|
handleOpenAddDialog() {
|
||||||
noticeTypeStore.dialogAddTypeVisible = true
|
noticeTypeStore.$patch((state) => {
|
||||||
|
state.dialogAddTypeVisible = true
|
||||||
|
state.hackReset = true
|
||||||
|
})
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs.addTypeData.validate((valid) => {
|
this.$refs.addForm.$refs.addTypeData.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.editFlag) {
|
noticeTypeStore.handleAddNoticeType(this.addTypeData)
|
||||||
// 编辑操作
|
|
||||||
// noticeTypeStore.handleUpdateNoticeType(this.addTypeData)
|
|
||||||
} else {
|
|
||||||
// 添加操作
|
|
||||||
// noticeTypeStore.handleAddNoticeType(this.addTypeData)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
closeForm() {
|
||||||
|
noticeTypeStore.$patch((state) => {
|
||||||
|
state.dialogAddTypeVisible = false
|
||||||
|
state.dialogEditTypeVisible = false
|
||||||
|
state.hackReset = false
|
||||||
|
state.editFlag = false
|
||||||
|
state.addTypeData = { name: '', enable: 1 }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.$refs.addForm.$refs.addTypeData.resetFields()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {}
|
mounted() {}
|
||||||
|
|||||||
@@ -61,12 +61,12 @@ export const useNoticeStore = defineStore('notice', {
|
|||||||
noticeType: {
|
noticeType: {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
enable: 0
|
enable: 1
|
||||||
},
|
},
|
||||||
sender: {
|
sender: {
|
||||||
id: '',
|
id: '',
|
||||||
username: '',
|
username: '',
|
||||||
enable: 0
|
enable: 1
|
||||||
},
|
},
|
||||||
senderId: '',
|
senderId: '',
|
||||||
typeId: ''
|
typeId: ''
|
||||||
@@ -95,12 +95,12 @@ export const useNoticeStore = defineStore('notice', {
|
|||||||
noticeType: {
|
noticeType: {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
enable: 0
|
enable: 1
|
||||||
},
|
},
|
||||||
sender: {
|
sender: {
|
||||||
id: '',
|
id: '',
|
||||||
username: '',
|
username: '',
|
||||||
enable: 0
|
enable: 1
|
||||||
},
|
},
|
||||||
senderId: '',
|
senderId: '',
|
||||||
typeId: ''
|
typeId: ''
|
||||||
@@ -177,6 +177,7 @@ export const useNoticeStore = defineStore('notice', {
|
|||||||
await request.put('/notice', updateNotice).then((response) => {
|
await request.put('/notice', updateNotice).then((response) => {
|
||||||
if (response.data.code === 20023) {
|
if (response.data.code === 20023) {
|
||||||
this.dialogEditVisible = false
|
this.dialogEditVisible = false
|
||||||
|
this.editFlag = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '修改成功.',
|
message: '修改成功.',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@@ -222,18 +223,28 @@ export const useNoticeStore = defineStore('notice', {
|
|||||||
export const useNoticeTypeStore = defineStore('notice_type', {
|
export const useNoticeTypeStore = defineStore('notice_type', {
|
||||||
state: () => {
|
state: () => {
|
||||||
return {
|
return {
|
||||||
|
total: 0,
|
||||||
dataLoading: true,
|
dataLoading: true,
|
||||||
dialogAddTypeVisible: false,
|
dialogAddTypeVisible: false,
|
||||||
dialogEditTypeVisible: false,
|
dialogEditTypeVisible: false,
|
||||||
|
hackReset: true,
|
||||||
editFlag: false,
|
editFlag: false,
|
||||||
enableNoticeTypeList: [],
|
enableNoticeTypeList: [],
|
||||||
noticeTypeList: [
|
noticeTypeList: [
|
||||||
{
|
{
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
enable: true
|
enable: 1
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
addTypeData: {
|
||||||
|
name: '',
|
||||||
|
enable: 1
|
||||||
|
},
|
||||||
|
showTypeData: {
|
||||||
|
name: '',
|
||||||
|
enable: 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
@@ -246,12 +257,7 @@ export const useNoticeTypeStore = defineStore('notice_type', {
|
|||||||
await request.get('/notice_type').then((response) => {
|
await request.get('/notice_type').then((response) => {
|
||||||
if (response.data.code === 20021) {
|
if (response.data.code === 20021) {
|
||||||
this.noticeTypeList = response.data.data
|
this.noticeTypeList = response.data.data
|
||||||
if (response.data.data.length >= 0) {
|
this.dataLoading = false
|
||||||
for (let i = 0; i < this.noticeTypeList.length; i++) {
|
|
||||||
this.noticeTypeList[i].enable = response.data.data[i].enable === 1
|
|
||||||
}
|
|
||||||
this.dataLoading = false
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.dataLoading = false
|
this.dataLoading = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@@ -261,7 +267,7 @@ export const useNoticeTypeStore = defineStore('notice_type', {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async updateNoticeTypeEnable(typeId: string, enable: boolean) {
|
async updateNoticeTypeEnable(typeId: string, enable: number) {
|
||||||
await request
|
await request
|
||||||
.get('/notice_type/update', {
|
.get('/notice_type/update', {
|
||||||
typeId,
|
typeId,
|
||||||
@@ -302,6 +308,7 @@ export const useNoticeTypeStore = defineStore('notice_type', {
|
|||||||
await request.put('/notice_type', updateNotice).then((response) => {
|
await request.put('/notice_type', updateNotice).then((response) => {
|
||||||
if (response.data.code === 20023) {
|
if (response.data.code === 20023) {
|
||||||
this.dialogEditTypeVisible = false
|
this.dialogEditTypeVisible = false
|
||||||
|
this.editFlag = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '修改成功.',
|
message: '修改成功.',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|||||||
Reference in New Issue
Block a user