Update Room.vue

main
wangqiujuan0808 2024-03-23 14:44:47 +08:00
parent e906a05cd5
commit 186de06aad
1 changed files with 7 additions and 4 deletions

View File

@ -151,7 +151,7 @@ import { usrRoomStore } from '../store/project'
import { Plus } from '@element-plus/icons-vue' import { Plus } from '@element-plus/icons-vue'
import myApi from "@/api/myApi.js"; import myApi from "@/api/myApi.js";
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { ElMessage,ElMessageBox } from "element-plus";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
@ -186,8 +186,7 @@ const room_info = reactive({
}) })
var currentRoom = ref({});
var currentRoom = reactive(room_info);
const get_project = async () => { const get_project = async () => {
const param = { const param = {
action: 100, action: 100,
@ -197,6 +196,10 @@ const get_project = async () => {
} }
const res = await myApi.getProjects(param); const res = await myApi.getProjects(param);
if (res.code === 0) { if (res.code === 0) {
ElMessage({
message: res.message,
type: "success",
});
project.name = res.data.name; project.name = res.data.name;
project.description = res.data.description; project.description = res.data.description;
if (Array.isArray(res.data.content)) { if (Array.isArray(res.data.content)) {
@ -220,7 +223,7 @@ onMounted(() => {
}); });
const select_room = (item) => { const select_room = (item) => {
currentRoom = item; currentRoom.value = item;
console.log(123, currentRoom); console.log(123, currentRoom);
} }
const add_room = () => { const add_room = () => {