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) { ...@@ -74,3 +74,12 @@ export function addBusinessUnit(data) {
data:data data:data
}) })
} }
// 复制新增
export function coypAddCcapManager(data) {
return request({
url: '/control/ccapProjectManagement/coypAddCcapManager',
method: 'post',
data:data
})
}
...@@ -209,7 +209,8 @@ import { ...@@ -209,7 +209,8 @@ import {
updateCcap, updateCcap,
getBusinessExclude, getBusinessExclude,
addBusinessUnit, addBusinessUnit,
getBusinessExclude2 getBusinessExclude2,
coypAddCcapManager
} from "@/api/CCAPProjectManagement/list"; } from "@/api/CCAPProjectManagement/list";
const tableDialogForm = ref({ const tableDialogForm = ref({
...@@ -272,8 +273,12 @@ const groupList = ref([ ...@@ -272,8 +273,12 @@ const groupList = ref([
function getList() { function getList() {
getDataList(queryParams.value).then(res => { getDataList(queryParams.value).then(res => {
tableList.value = res.rows.sort((a, b) => { tableList.value = res.rows.sort((a, b) => {
if (a.id === adminId) return 1 if (a.id === adminId && b.id !== adminId) {
else if (b.id === adminId) return 1 return -1;
} else if (a.id !== adminId && b.id === adminId) {
return 1;
}
return 0;
}); });
total.value = res.total; total.value = res.total;
}); });
...@@ -460,13 +465,23 @@ function dialog2Sure(){ ...@@ -460,13 +465,23 @@ function dialog2Sure(){
dialogForm2.value.validate((v)=>{ dialogForm2.value.validate((v)=>{
if (v){ if (v){
console.log(tableDialogForm.value) console.log(tableDialogForm.value)
if(tableDialogTitle.value === "添加事业部"){
addBusinessUnit(tableDialogForm.value).then(res=>{ addBusinessUnit(tableDialogForm.value).then(res=>{
console.log(res)
if(res.code === 200){ if(res.code === 200){
ElMessage.success("添加成功") ElMessage.success("添加成功")
dialog2Cancel() 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