@@ -118,6 +118,12 @@
|
||||
<script setup name="WarningList" lang="ts">
|
||||
import { listDemo, updateDemo } from '@/api/WarningList/index';
|
||||
//import { DemoVO, DemoQuery, DemoForm } from '@/api/WarningList/types';
|
||||
import { useDeviceStore } from '@/store/modules/equipmentList';
|
||||
import { storeToRefs } from 'pinia';
|
||||
|
||||
const deviceStore = useDeviceStore();
|
||||
const { deviceList } = storeToRefs(deviceStore);
|
||||
const { getdeviceList } = deviceStore;
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
@@ -256,5 +262,6 @@ const submitForm = async () => {
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getdeviceList();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -48,6 +48,7 @@ import type { UploadProps, UploadUserFile } from 'element-plus';
|
||||
import { uploadDemo, getDemo, updateDemo } from '@/api/systemList/index';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { Plus } from '@element-plus/icons-vue';
|
||||
import router from '@/router';
|
||||
|
||||
const uploadUrl = import.meta.env.VITE_BASE_API + '/system/logo/upload';
|
||||
|
||||
@@ -84,6 +85,8 @@ const save = async () => {
|
||||
.then((res) => {
|
||||
console.log('保存成功', res);
|
||||
ElMessage.success('保存成功');
|
||||
// 刷新当前路由
|
||||
router.go(0);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('保存失败', err);
|
||||
|
||||
Reference in New Issue
Block a user