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

ccap项目管理-删除新增同步

parent 478815af
......@@ -83,3 +83,10 @@ export function coypAddCcapManager(data) {
data:data
})
}
// 删除主表
export function deletetable(id) {
return request({
url: '/control/ccapProjectManagement/deletetable/'+id,
method: 'DELETE'
})
}
......@@ -41,7 +41,7 @@
<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="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>
<el-button type="text" style="color: rgb(244,93,93)" v-else="scope.row.id === adminId" @click="tableDel(scope.row)">删除</el-button>
</div>
</template>
</el-table-column>
......@@ -210,7 +210,8 @@ import {
getBusinessExclude,
addBusinessUnit,
getBusinessExclude2,
coypAddCcapManager
coypAddCcapManager,
deletetable
} from "@/api/CCAPProjectManagement/list";
const tableDialogForm = ref({
......@@ -298,6 +299,34 @@ function getDataProjectListById() {
drawer2TableList.value = res.data;
});
}
function tableDel(row){
console.log(row)
ElMessageBox.confirm(
'是否删除该数据?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deletetable(row.id).then(res=>{
if(res.code === 200){
ElMessage.success("删除成功")
getList()
dialogVisible.value = false;
}
})
})
.catch(() => {
})
}
function piliangDel(){
if(ids.value.length === 0) return ElMessage.warning("请先选择要删除的数据项")
ElMessageBox.confirm(
......
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