Commit 6eb712b9 authored by 祁正's avatar 祁正

ccap项目管理-复制新增

parent afb00fa5
......@@ -56,6 +56,16 @@ export function getBusinessExclude() {
method: 'get'
})
}
// 获取所有事业部(除了奇瑞,除了列表里面的出现的在第一条数据的)-复制新增
export function getBusinessExclude2() {
return request({
url: '/control/ccapProjectManagement/getBusinessExclude2',
method: 'get'
})
}
// 添加事业部
export function addBusinessUnit(data) {
return request({
......
......@@ -39,7 +39,7 @@
<template #default="scope">
<div style="display: flex;align-items: flex-start">
<el-button type="text" style="color: rgb(0,0,255)" @click="handleMaintain(scope.row)">维护项目</el-button>
<el-button type="text" style="color: rgb(255,153,0)" v-if="scope.row.id === adminId" @click="handleView(scope.row)">复制新增</el-button>
<el-button type="text" style="color: rgb(255,153,0)" v-if="scope.row.id === adminId" @click="copeAdd(scope.row)">复制新增</el-button>
<el-button type="text" v-if="scope.row.id === adminId" @click="addBusiness(scope.row)">添加事业部</el-button>
<el-button type="text" style="color: rgb(244,93,93)" v-else="scope.row.id === adminId" @click="handleView(scope.row)">删除</el-button>
</div>
......@@ -167,7 +167,7 @@
<div style="width: 70%;margin-left: 15%;padding: 20px 0">
<el-form :model="tableDialogForm" ref="dialogForm2">
<el-form-item :rules="[
{ required: true, message: '请选择事业部', trigger: 'change' }
{ required: true, message: '请选择事业部', trigger: 'blur' }
]" label="事业部:" prop="businessId" >
<el-select
v-model="tableDialogForm.businessId"
......@@ -176,7 +176,7 @@
>
<el-option
v-for="dict in businessListExclude"
:label="dict.business_unit_name"
:label="dict.businessUnitName"
:value="dict.id"
/>
</el-select>
......@@ -208,7 +208,8 @@ import {
deleteBatch,
updateCcap,
getBusinessExclude,
addBusinessUnit
addBusinessUnit,
getBusinessExclude2
} from "@/api/CCAPProjectManagement/list";
const tableDialogForm = ref({
......@@ -243,7 +244,7 @@ const dialogRules = {
groupName: [{ required: true, message: '分组不能为空', trigger: 'blur' }]
};
//所有事业部(除了奇瑞,除了列表里面的出现的)
//所有事业部
const businessListExclude = ref([])
const dialogForm = ref({
......@@ -285,6 +286,7 @@ function handleSelectionChange(arr){
}
}
//获取抽屉里面的表格数据
function getDataProjectListById() {
getProjectListById(drawerQueryParams.value).then(res => {
......@@ -314,10 +316,20 @@ function addBusiness(row){
tableDialogTitle.value = '添加事业部'
tableDialogVisible.value =true
tableDialogForm.value.id = row.id
getBusinessListExclude();
}
//获取所有事业部(除了奇瑞,除了列表里面的出现的)
function getBusinessListExclude(){
getBusinessExclude().then(res=>{
console.log("添加事业部",res)
businessListExclude.value = res.data
})
}
// //获取所有事业部(除了奇瑞,除了列表里面的出现的在第一条数据的)-复制新增
function getBusinessListExclude2(){
getBusinessExclude2().then(res=>{
console.log("复制新增",res)
businessListExclude.value = res.data
})
}
......@@ -420,6 +432,14 @@ function dialogSave() {
}
//复制新增
function copeAdd(row){
tableDialogTitle.value = '复制新增'
tableDialogVisible.value =true
tableDialogForm.value.id = row.id
getBusinessListExclude2()
}
//对话框里面的取消
function dialogCencal() {
dialogForm.value.project = null;
......@@ -528,7 +548,7 @@ function handleExport() {
getList();
getBusinessList();
getBusinessListExclude();
</script>
<style scoped lang="scss">
......
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