测试用例修改
This commit is contained in:
@@ -225,7 +225,7 @@ const tableStore = new TableStore({
|
||||
width: 350,
|
||||
formatter: function (row) {
|
||||
console.log('🚀 ~ row:', row)
|
||||
return 123 //row.cellValue ? row.cellValue : '/'
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -328,6 +328,14 @@ const tableStore = new TableStore({
|
||||
setTimeout(() => {
|
||||
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
|
||||
}, 0)
|
||||
},
|
||||
resetCallback:() =>{
|
||||
// 重置表单数据到默认值
|
||||
formData.value.statisticalType = classificationData[0]
|
||||
formData.value.deptIndex = treeData.value[0]?.id
|
||||
formData.value.scale = voltageleveloption
|
||||
formData.value.manufacturer = terminaloption
|
||||
formData.value.loadType = interfereoption
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ const treeData = ref([])
|
||||
const idArr = ref([])
|
||||
const activeName = ref(0)
|
||||
const getTreeData = async () => {
|
||||
console.log('getTreeData')
|
||||
await getAreaDept().then(res => {
|
||||
var data = res.data
|
||||
data.forEach(element => {
|
||||
@@ -293,10 +294,19 @@ const tableStore = new TableStore({
|
||||
// treeData = tree2List(tableStore.table.data)
|
||||
// tableStore.table.data = JSON.parse(JSON.stringify(treeData))
|
||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
||||
console.log('tableStore.table.params---2', tableStore.table.params)
|
||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||
setTimeout(() => {
|
||||
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
|
||||
}, 0)
|
||||
},
|
||||
resetCallback: () => {
|
||||
// 重置表单数据到默认值
|
||||
formData.value.statisticalType = classificationData[0]
|
||||
formData.value.deptIndex = treeData.value[0]?.id
|
||||
formData.value.scale = voltageleveloption
|
||||
formData.value.manufacturer = terminaloption
|
||||
formData.value.loadType = interfereoption
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user