|
@@ -41,6 +41,7 @@
|
|
|
import { ref, onMounted, watch, toRefs } from 'vue';
|
|
|
import flow from "@/api/flow/flow"
|
|
|
import AddAbility from './AddAbility.vue';
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
export default {
|
|
|
props: {
|
|
|
abModal: {
|
|
@@ -64,6 +65,7 @@ export default {
|
|
|
let tableData = ref([])//表格数据
|
|
|
let editOrAdd = ref(0)//0为新增,1为编辑
|
|
|
let editRow = ref({})//编辑的对象
|
|
|
+ let delFcda = ref("")//需要删除的fcda_id
|
|
|
watch(() => props.modelId, (newVal) => {
|
|
|
modelIds.value = newVal
|
|
|
})
|
|
@@ -108,11 +110,27 @@ export default {
|
|
|
}
|
|
|
// 删除功能
|
|
|
function delAbility(row) {
|
|
|
- console.log(row, 'row');
|
|
|
+ delFcda.value = row.id
|
|
|
}
|
|
|
// 确认删除功能
|
|
|
function firmSure() {
|
|
|
-
|
|
|
+ flow.delModelOn({
|
|
|
+ model_id: modelIds.value - 0,
|
|
|
+ fcda_id: delFcda.value - 0,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功!"
|
|
|
+ })
|
|
|
+ copyReload()
|
|
|
+ }else{
|
|
|
+ ElMessage({
|
|
|
+ message:res.msg,
|
|
|
+ type:"error"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
function addAback(data) {
|
|
|
addModal.value = data
|
|
@@ -137,6 +155,7 @@ export default {
|
|
|
firmSure,//确认删除功能
|
|
|
editOrAdd,//0为新增,1为编辑
|
|
|
editRow,//编辑的对象
|
|
|
+ delFcda,//需要删除的fcdaid
|
|
|
}
|
|
|
},
|
|
|
components: {
|