f3abdb2e by fanguang Committed by lihua

fix

1 parent c70996d6
...@@ -583,23 +583,7 @@ const getTreeData = (needClick = false, currData = {}) => { ...@@ -583,23 +583,7 @@ const getTreeData = (needClick = false, currData = {}) => {
583 }) 583 })
584 treeInfo.value.data = data 584 treeInfo.value.data = data
585 standardOptions.value = data 585 standardOptions.value = data
586 // 默认展开第一个 586
587 if (data.length === 0) return
588 let params = {
589 pageIndex: 1,
590 pageSize: 50,
591 standardTypeCode: data[0].value,
592 // codeName: '标准类型'
593 }
594 getStandardCodeList(params).then((res:any) => {
595 if (res.code === proxy.$passCode) {
596 let data = res.data
597 tableInfo.value.data = data.records
598 tableInfo.value.page.limit = data.pageSize
599 tableInfo.value.page.curr = data.pageIndex
600 tableInfo.value.page.rows = data.totalRows
601 }
602 })
603 } 587 }
604 }) 588 })
605 } 589 }
...@@ -1300,6 +1284,8 @@ const saveData = async (params, btnValue) => { ...@@ -1300,6 +1284,8 @@ const saveData = async (params, btnValue) => {
1300 if (btnValue === 'saveAndAdd') { 1284 if (btnValue === 'saveAndAdd') {
1301 // 跳转代码详情 1285 // 跳转代码详情
1302 toStandardCodeDetail(res.data) 1286 toStandardCodeDetail(res.data)
1287 } else {
1288 getFirstPageData()
1303 } 1289 }
1304 }) 1290 })
1305 } else { 1291 } else {
...@@ -1399,7 +1385,26 @@ const radioGroupChange = async (val, info) => { ...@@ -1399,7 +1385,26 @@ const radioGroupChange = async (val, info) => {
1399 1385
1400 onBeforeMount(() => { 1386 onBeforeMount(() => {
1401 // getDataType() 1387 // getDataType()
1402 getTreeData() 1388 getTreeData().then(() => {
1389 // 默认展开第一个
1390 let data = treeInfo.value.data
1391 if (data.length === 0) return
1392 let params = {
1393 pageIndex: 1,
1394 pageSize: 50,
1395 standardTypeCode: data[0].value,
1396 // codeName: '标准类型'
1397 }
1398 getStandardCodeList(params).then((res:any) => {
1399 if (res.code === proxy.$passCode) {
1400 let data = res.data
1401 tableInfo.value.data = data.records
1402 tableInfo.value.page.limit = data.pageSize
1403 tableInfo.value.page.curr = data.pageIndex
1404 tableInfo.value.page.rows = data.totalRows
1405 }
1406 })
1407 })
1403 getParamsList({ dictType: '发布单位' }).then((res:any) => { 1408 getParamsList({ dictType: '发布单位' }).then((res:any) => {
1404 if (res.code === proxy.$passCode) { 1409 if (res.code === proxy.$passCode) {
1405 const data = res.data || [] 1410 const data = res.data || []
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!