Commit 364901a1 authored by yanzhengyang's avatar yanzhengyang

Merge remote-tracking branch 'origin/dev' into dev

parents d976c142 23649205
......@@ -74,3 +74,12 @@ export function addBusinessUnit(data) {
data:data
})
}
// 复制新增
export function coypAddCcapManager(data) {
return request({
url: '/control/ccapProjectManagement/coypAddCcapManager',
method: 'post',
data:data
})
}
......@@ -209,7 +209,8 @@ import {
updateCcap,
getBusinessExclude,
addBusinessUnit,
getBusinessExclude2
getBusinessExclude2,
coypAddCcapManager
} from "@/api/CCAPProjectManagement/list";
const tableDialogForm = ref({
......@@ -272,8 +273,12 @@ const groupList = ref([
function getList() {
getDataList(queryParams.value).then(res => {
tableList.value = res.rows.sort((a, b) => {
if (a.id === adminId) return 1
else if (b.id === adminId) return 1
if (a.id === adminId && b.id !== adminId) {
return -1;
} else if (a.id !== adminId && b.id === adminId) {
return 1;
}
return 0;
});
total.value = res.total;
});
......@@ -460,13 +465,23 @@ function dialog2Sure(){
dialogForm2.value.validate((v)=>{
if (v){
console.log(tableDialogForm.value)
addBusinessUnit(tableDialogForm.value).then(res=>{
console.log(res)
if(res.code === 200){
ElMessage.success("添加成功")
dialog2Cancel()
}
})
if(tableDialogTitle.value === "添加事业部"){
addBusinessUnit(tableDialogForm.value).then(res=>{
if(res.code === 200){
ElMessage.success("添加成功")
dialog2Cancel()
}
})
}else{
//复制新增
coypAddCcapManager(tableDialogForm.value).then(res=>{
if(res.code === 200){
ElMessage.success("复制成功")
dialog2Cancel()
}
})
}
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment