获取子模块修复bug2
This commit is contained in:
parent
6fb9ef8a5a
commit
c3b598258f
@ -32,26 +32,26 @@
|
|||||||
<p class="text-green-100">剩余 3 天</p>
|
<p class="text-green-100">剩余 3 天</p>
|
||||||
<CaretUpOutlined class="absolute bottom-[32%] ml-2"/>
|
<CaretUpOutlined class="absolute bottom-[32%] ml-2"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="left-0 absolute bottom-0 h-[35%] w-full bg-white flex justify-center items-center space-x-3">
|
<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">
|
<div class="text-blue-400 flex absolute left-5">
|
||||||
<CheckOutlined class="mt-1"/>
|
<CheckOutlined class="mt-1"/>
|
||||||
<p >进行中</p>
|
<p >进行中</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex absolute right-16">
|
<div class="flex absolute right-16">
|
||||||
<p class="text-blue-400 font-bold text-2xl">2</p>
|
<p class="text-blue-400 font-bold text-2xl">2</p>
|
||||||
<p class="text-blue-400 mt-2">人/天</p>
|
<p class="text-blue-400 mt-2">人/天</p>
|
||||||
</div>
|
</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')">
|
<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">
|
<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>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
<a-form>
|
||||||
<div class="flex space-x-5">
|
<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>
|
<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>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {CaretUpOutlined, CheckOutlined} from '@ant-design/icons-vue';
|
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";
|
import request from "@/js/request.js";
|
||||||
|
|
||||||
const AddModule = ref(false)
|
const AddModule = ref(false)
|
||||||
@ -92,17 +92,7 @@ function showAddModal(){
|
|||||||
}
|
}
|
||||||
//根据子系统id获取子模块
|
//根据子系统id获取子模块
|
||||||
const token = window.localStorage.getItem('token')
|
const token = window.localStorage.getItem('token')
|
||||||
const ChildModules = ref({
|
const ChildModules = ref([]);
|
||||||
data:[{
|
|
||||||
name:'',
|
|
||||||
id:-1,
|
|
||||||
isFinish:'',
|
|
||||||
workLoad:'',
|
|
||||||
description:'',
|
|
||||||
cycle:'',
|
|
||||||
principalUser: ''
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
|
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const sysId = params.get('id');
|
const sysId = params.get('id');
|
||||||
@ -114,30 +104,5 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const formData = reactive({
|
|
||||||
name: "",
|
|
||||||
status: "",
|
|
||||||
cycle: "",
|
|
||||||
workLoad: "",
|
|
||||||
description: "",
|
|
||||||
isFinish:'',
|
|
||||||
type:1, //0代表子系统,1代表子模块
|
|
||||||
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>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user