获取子系统id

This commit is contained in:
妖姐 2024-03-16 12:24:58 +08:00
parent 95c824f0b0
commit c70d22e18c

View File

@ -28,7 +28,7 @@
<p class="ml-3 text-xl">{{ChildSystem.name}}</p> <p class="ml-3 text-xl">{{ChildSystem.name}}</p>
</div> </div>
<div class="ml-auto mr-10"> <div class="ml-auto mr-10">
<button v-if="showButton[index]" class="mt-8 w-6 h-6 flex items-center justify-center bg-green-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105" @click="$router.push('/WorkLoad/I_Manage/ChildModule')" > <button v-if="showButton[index]" class="mt-8 w-6 h-6 flex items-center justify-center bg-green-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105" @click="EnterChildModule(ChildSystem)" >
<svg aria-hidden="true" class="rtl:rotate-180 w-4 h-4 text-white" fill="none" viewBox="0 0 14 10" xmlns="http://www.w3.org/2000/svg"> <svg aria-hidden="true" class="rtl:rotate-180 w-4 h-4 text-white" fill="none" viewBox="0 0 14 10" xmlns="http://www.w3.org/2000/svg">
<path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> <path d="M1 5h12m0 0L9 1m4 4L9 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</svg> </svg>
@ -74,6 +74,7 @@
<script setup> <script setup>
import {onMounted, reactive, ref} from "vue"; import {onMounted, reactive, ref} from "vue";
import request from "@/js/request.js"; import request from "@/js/request.js";
import router from "@/router/index.js";
const showButton = reactive([]); const showButton = reactive([]);
const AddModule = ref(false) const AddModule = ref(false)
@ -99,4 +100,11 @@ onMounted(() => {
ChildSystems.value = res.data.data ChildSystems.value = res.data.data
}) })
}) })
function EnterChildModule(ChildSystem){
console.log(ChildSystem.id)
window.localStorage.setItem('id',ChildSystem.id)
router.push('/WorkLoad/I_Manage/ChildModule')
}
</script> </script>