获取子模块修复bug2

This commit is contained in:
GUjiYN 2024-03-17 00:09:30 +08:00
parent 6fb9ef8a5a
commit c3b598258f

View File

@ -32,26 +32,26 @@
<p class="text-green-100">剩余 3 </p>
<CaretUpOutlined class="absolute bottom-[32%] ml-2"/>
</div>
<div class="left-0 absolute bottom-0 h-[35%] w-full bg-white flex justify-center items-center space-x-3">
<div class="text-blue-400 flex absolute left-5">
<CheckOutlined class="mt-1"/>
<p >进行中</p>
</div>
<div class="flex absolute right-16">
<p class="text-blue-400 font-bold text-2xl">2</p>
<p class="text-blue-400 mt-2">/</p>
</div>
<button class="absolute right-8 w-6 h-6 flex items-center justify-center bg-blue-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105" @click="$router.push('/WorkLoad/I_Manage/LoginRegisterModule')">
<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"/>
</svg>
</button>
<div class="left-0 absolute bottom-0 h-[35%] w-full bg-white flex justify-center items-center space-x-3">
<div class="text-blue-400 flex absolute left-5">
<CheckOutlined class="mt-1"/>
<p >进行中</p>
</div>
<div class="flex absolute right-16">
<p class="text-blue-400 font-bold text-2xl">2</p>
<p class="text-blue-400 mt-2">/</p>
</div>
<button class="absolute right-8 w-6 h-6 flex items-center justify-center bg-blue-400 text-black rounded-full transition duration-300 ease-in-out transform hover:scale-105" @click="$router.push('/WorkLoad/I_Manage/LoginRegisterModule')">
<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"/>
</svg>
</button>
</div>
</a-card>
</div>
</div>
<!--新增子模块对话框-->
<a-modal v-model:open="AddModule" :okButtonProps="{ style: { backgroundColor: '#347def',color: 'white'} }" cancel-text="取消" ok-text="确定" title="新增子模块" @ok="handleAdd">
<a-modal v-model:open="AddModule" :okButtonProps="{ style: { backgroundColor: '#347def',color: 'white'} }" cancel-text="取消" ok-text="确定" title="新增子模块">
<a-form>
<div class="flex space-x-5">
<a-form-item class="my-4" label="子模块名称:"><a-input class="h-8 w-36 border-gray-300 rounded-md"/></a-form-item>
@ -83,7 +83,7 @@
</template>
<script setup>
import {CaretUpOutlined, CheckOutlined} from '@ant-design/icons-vue';
import {onMounted, reactive, ref} from 'vue';
import {onMounted, ref} from 'vue';
import request from "@/js/request.js";
const AddModule = ref(false)
@ -92,17 +92,7 @@ function showAddModal(){
}
//id
const token = window.localStorage.getItem('token')
const ChildModules = ref({
data:[{
name:'',
id:-1,
isFinish:'',
workLoad:'',
description:'',
cycle:'',
principalUser: ''
}]
});
const ChildModules = ref([]);
const params = new URLSearchParams(window.location.search);
const sysId = params.get('id');
@ -114,30 +104,5 @@ onMounted(() => {
})
})
const formData = reactive({
name: "",
status: "",
cycle: "",
workLoad: "",
description: "",
isFinish:'',
type:1, //01
principalId:'',
projectId: '',
// pid: ''
});
const handleAdd = () => {
//
// console.log(2222)
formData.projectId = ChildModules.data[0].id
console.log("formData:",formData)
request.projectWorkAdd(formData,token).then((res)=>{
console.log(res)
})
//
AddModule.value = false;
};
</script>