|
@@ -109,7 +109,7 @@
|
|
|
<script setup>
|
|
|
import { onActivated, ref } from 'vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
-import { getErtractInfo } from '~api/other'
|
|
|
+import { getDictionaryBiz, getErtractInfo } from '~api/other'
|
|
|
import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
|
import mainApi from '~api/tentative/acquisition/data'
|
|
|
|
|
@@ -120,6 +120,7 @@ const contractId = ref(store.getContractId)
|
|
|
|
|
|
//渲染完成
|
|
|
onActivated(() => {
|
|
|
+ getTestDataType()
|
|
|
getContractData()
|
|
|
})
|
|
|
|
|
@@ -181,6 +182,11 @@ const menuData = ref([
|
|
|
],
|
|
|
},
|
|
|
])
|
|
|
+//获取分类数据
|
|
|
+const getTestDataType = async () => {
|
|
|
+ const { data } = await getDictionaryBiz({ code: 'test_data_type' })
|
|
|
+ console.log(data)
|
|
|
+}
|
|
|
|
|
|
//右键菜单数据
|
|
|
const contextMenuItemRef = ref(null)
|
|
@@ -252,7 +258,21 @@ const tableData = ref([
|
|
|
//获取表格数据
|
|
|
const tableLoading = ref(false)
|
|
|
const getTableData = async () => {
|
|
|
-
|
|
|
+ tableLoading.value = true
|
|
|
+ const { error, code, data } = await mainApi.page({
|
|
|
+ ...searchForm.value,
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ })
|
|
|
+ //处理数据
|
|
|
+ tableLoading.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ tableData.value = getArrValue(data?.records)
|
|
|
+ searchForm.value.total = data.total || 0
|
|
|
+ } else {
|
|
|
+ tableData.value = []
|
|
|
+ searchForm.value.total = 0
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//多选
|