获取子模块修复bug2
This commit is contained in:
parent
6fb9ef8a5a
commit
c3b598258f
@ -51,7 +51,7 @@
|
|||||||
</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