e855b9c0 by xukangle

fix

1 parent 9f4bed7a
......@@ -180,19 +180,21 @@ const toSearch = (val: any, clear: boolean = false) => {
} else {
page.value.daName = val.daName;
}
tableInfo.value.isEdit = false
getTableData();
};
// 查公司
const documentList = async () => {
const res = await getDocumentList({
daName: tableSelectInfo.value.selectValue,
isCompany: true,
type: 1
})
companyOption.value = res.data || []
// const documentList = async () => {
// const res = await getDocumentList({
// daName: tableSelectInfo.value.selectValue,
// isCompany: true,
// type: 1
// })
// companyOption.value = res.data || []
return Promise.resolve()
}
// return Promise.resolve()
// }
// const params = {
// daName: row.damName,
// type: 1,
......@@ -240,6 +242,7 @@ const getTableData = () => {
const createOneData = () => {
if (companyOption.value.length > 0) {
findTab(true)
columnInfoReset()
assetsOption.value = []
const currentDate = dayjs().format('YYYY-MM-DD');
tableInfo.value.flag = "create"
......@@ -285,7 +288,7 @@ const columnDel = (row) => {
if (res?.code === proxy.$passCode) {
ElMessage.success("删除成功")
getTableData()
documentList()
// documentList()
columnCancel()
findTab(false)
tableRef.value.columnInfo = {}
......@@ -356,7 +359,7 @@ const columnEdit = (row) => {
tableSelectInfo.value.companyGuid = row.companyGuid
assetsOption.value = []
addAssetsOption(null, row, true)
addCompanyOption(row)
// addCompanyOption(row)
//getAssetsList()
const info = { ...row }
tableInfo.value.currentId = info.guid
......@@ -481,25 +484,25 @@ const addAssetsOption = (values, row, flag = false) => {
})
}
const addCompanyOption = (row) => {
let flag = true
documentList().then(() => {
const obj = {
tenantName: row.companyName,
tenantGuid: row.companyGuid
}
const arr = companyOption.value
arr.forEach((item) => {
if (item.tenantGuid === row.companyGuid) {
flag = false
}
})
if (flag) {
arr.unshift(obj)
companyOption.value = arr
}
})
}
// const addCompanyOption = (row) => {
// let flag = true
// documentList().then(() => {
// const obj = {
// tenantName: row.companyName,
// tenantGuid: row.companyGuid
// }
// const arr = companyOption.value
// arr.forEach((item) => {
// if (item.tenantGuid === row.companyGuid) {
// flag = false
// }
// })
// if (flag) {
// arr.unshift(obj)
// companyOption.value = arr
// }
// })
// }
onBeforeMount(() => {
//getTableData()
// getAssetsList()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!