|
@@ -181,20 +181,22 @@ const tableColumn1 = [
|
|
|
{ key: 'action', name: '操作', width: 110, align: 'center' },
|
|
|
]
|
|
|
const tableData2 = ref([])
|
|
|
-const getLinkAllForm = async (id) => {
|
|
|
+const getLinkAllForm = async () => {
|
|
|
const { data } = await mainApi.linkAllForm({
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|
|
|
- materialId: id,
|
|
|
+ materialId: tableRowID.value,
|
|
|
})
|
|
|
tableData2.value = getArrValue(data)
|
|
|
}
|
|
|
|
|
|
//编辑
|
|
|
const isFormModal = ref(false)
|
|
|
+const tableRowID = ref('')
|
|
|
const rowEditClick = (row) => {
|
|
|
isFormModal.value = true
|
|
|
- getLinkAllForm(row.id)
|
|
|
+ tableRowID.value = row.id
|
|
|
+ getLinkAllForm()
|
|
|
}
|
|
|
|
|
|
//解除绑定关系
|
|
@@ -206,7 +208,7 @@ const dischargeBinding = (row) => {
|
|
|
const { error, code, msg } = await mainApi.removeLinkForm(row.id)
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success(msg)
|
|
|
- getLinkAllForm(row.id).then()
|
|
|
+ getLinkAllForm()
|
|
|
resolve()
|
|
|
} else {
|
|
|
window.$message.error(msg ?? '操作失败')
|
|
@@ -244,6 +246,7 @@ const modalSave = async () => {
|
|
|
const modalClose = () => {
|
|
|
isFormModal.value = false
|
|
|
tableData2.value = []
|
|
|
+ tableRowID.value = ''
|
|
|
}
|
|
|
|
|
|
//页面卸载
|