数据资产登记更新
Showing
1 changed file
with
22 additions
and
25 deletions
| ... | @@ -17,7 +17,7 @@ import useDataAssetStore from "@/store/modules/dataAsset"; | ... | @@ -17,7 +17,7 @@ import useDataAssetStore from "@/store/modules/dataAsset"; |
| 17 | import useUserStore from "@/store/modules/user"; | 17 | import useUserStore from "@/store/modules/user"; |
| 18 | 18 | ||
| 19 | const userStore = useUserStore(); | 19 | const userStore = useUserStore(); |
| 20 | const userData = JSON.parse(userStore.userData) | 20 | const userData = JSON.parse(localStorage.userData) |
| 21 | 21 | ||
| 22 | const assetStore = useDataAssetStore(); | 22 | const assetStore = useDataAssetStore(); |
| 23 | 23 | ||
| ... | @@ -83,8 +83,6 @@ const searchItemList = ref([ | ... | @@ -83,8 +83,6 @@ const searchItemList = ref([ |
| 83 | const pageInfo = ref({ | 83 | const pageInfo = ref({ |
| 84 | limit: 50, | 84 | limit: 50, |
| 85 | curr: 1, | 85 | curr: 1, |
| 86 | rows: 0, | ||
| 87 | type: "normal", | ||
| 88 | sizes: [ | 86 | sizes: [ |
| 89 | { label: "10", value: 10 }, | 87 | { label: "10", value: 10 }, |
| 90 | { label: "50", value: 50 }, | 88 | { label: "50", value: 50 }, |
| ... | @@ -151,7 +149,11 @@ const tableInfo = ref({ | ... | @@ -151,7 +149,11 @@ const tableInfo = ref({ |
| 151 | loading: false, | 149 | loading: false, |
| 152 | fields: tableFields.value, | 150 | fields: tableFields.value, |
| 153 | data: listData.value, | 151 | data: listData.value, |
| 154 | showPage: false, | 152 | page: { |
| 153 | type: "normal", | ||
| 154 | rows: 0, | ||
| 155 | ...pageInfo.value, | ||
| 156 | }, | ||
| 155 | actionInfo: { | 157 | actionInfo: { |
| 156 | label: "操作", | 158 | label: "操作", |
| 157 | type: "btn", | 159 | type: "btn", |
| ... | @@ -208,10 +210,9 @@ const currTableData: any = ref({}); | ... | @@ -208,10 +210,9 @@ const currTableData: any = ref({}); |
| 208 | const btnClick = (btn) => { | 210 | const btnClick = (btn) => { |
| 209 | const type = btn.value; | 211 | const type = btn.value; |
| 210 | if (type == 'create') { | 212 | if (type == 'create') { |
| 211 | localStorage.setItem('isRestart', ''); | ||
| 212 | router.push({ | 213 | router.push({ |
| 213 | name: 'registerStart', | 214 | name: 'registerStart', |
| 214 | query: { exchangeGuid: btn.exchangeGuid, type } | 215 | query: { exchangeGuid: btn.exchangeGuid, isRestart: '', type } |
| 215 | }); | 216 | }); |
| 216 | } else if (type == 'search') { | 217 | } else if (type == 'search') { |
| 217 | exchangGuid.value = btn.exchangeGuid; | 218 | exchangGuid.value = btn.exchangeGuid; |
| ... | @@ -226,10 +227,9 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -226,10 +227,9 @@ const tableBtnClick = (scope, btn) => { |
| 226 | const row = scope.row; | 227 | const row = scope.row; |
| 227 | currTableData.value = row; | 228 | currTableData.value = row; |
| 228 | if (type === "edit") { //草稿中\已驳回\已撤销\已通过 状态,才可以编辑。 | 229 | if (type === "edit") { //草稿中\已驳回\已撤销\已通过 状态,才可以编辑。 |
| 229 | localStorage.setItem('isRestart', btn.label == '重新提交' ? 'true' : ''); | ||
| 230 | router.push({ | 230 | router.push({ |
| 231 | name: 'registerStart', | 231 | name: 'registerStart', |
| 232 | query: { guid: row.guid, exchangeGuid: row.exchangeGuid, name: row.daName, type, serviceTenantGuid: row.tenantGuid } | 232 | query: { guid: row.guid, exchangeGuid: row.exchangeGuid, name: row.daName, isRestart: btn.label == '重新提交' ? 'true' : '', tenantGuid: row.tenantGuid, type } |
| 233 | }); | 233 | }); |
| 234 | } else if (type == "delete") { | 234 | } else if (type == "delete") { |
| 235 | delTableOpen("此操作将永久删除该资产登记,是否继续?", "warning"); | 235 | delTableOpen("此操作将永久删除该资产登记,是否继续?", "warning"); |
| ... | @@ -245,7 +245,7 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -245,7 +245,7 @@ const tableBtnClick = (scope, btn) => { |
| 245 | flowType: row.approveVO.flowType, | 245 | flowType: row.approveVO.flowType, |
| 246 | approveStaffGuid: userData.staffGuid, | 246 | approveStaffGuid: userData.staffGuid, |
| 247 | } | 247 | } |
| 248 | revokeFlowData(params).then((res: any) => { | 248 | revokeFlowData(params, currTableData.value.tenantGuid).then((res: any) => { |
| 249 | loading.value = false; | 249 | loading.value = false; |
| 250 | if (res?.code == proxy.$passCode) { | 250 | if (res?.code == proxy.$passCode) { |
| 251 | if (res.data) { | 251 | if (res.data) { |
| ... | @@ -269,7 +269,7 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -269,7 +269,7 @@ const tableBtnClick = (scope, btn) => { |
| 269 | } else if (type === 'detail') { // 详情, 若是草稿中,详情就是编辑, | 269 | } else if (type === 'detail') { // 详情, 若是草稿中,详情就是编辑, |
| 270 | router.push({ | 270 | router.push({ |
| 271 | name: 'registerInfoDetail', | 271 | name: 'registerInfoDetail', |
| 272 | query: { guid: row.guid, name: row.daName, type: 'asset', serviceTenantGuid: row.tenantGuid } | 272 | query: { guid: row.guid, name: row.daName, tenantGuid: row.tenantGuid, type: 'asset' } |
| 273 | }); | 273 | }); |
| 274 | } else if (type === 'pass') { | 274 | } else if (type === 'pass') { |
| 275 | passDialogInfo.value.visible = true; | 275 | passDialogInfo.value.visible = true; |
| ... | @@ -327,12 +327,11 @@ const getTableData = () => { | ... | @@ -327,12 +327,11 @@ const getTableData = () => { |
| 327 | }).then((res: any) => { | 327 | }).then((res: any) => { |
| 328 | loading.value = false; | 328 | loading.value = false; |
| 329 | if (res.code == proxy.$passCode) { | 329 | if (res.code == proxy.$passCode) { |
| 330 | const data = res.data || {} | 330 | const data = res.data || {}; |
| 331 | // listData.value = tableInfo.value.data = data.records || []; | 331 | tableInfo.value.data = data.records || []; |
| 332 | tableInfo.value.data = data.records || [] | 332 | tableInfo.value.page.curr = res.data.pageIndex; |
| 333 | pageInfo.value.limit = data.pageSize | 333 | tableInfo.value.page.limit = res.data.pageSize; |
| 334 | pageInfo.value.curr = data.pageIndex | 334 | tableInfo.value.page.rows = res.data.totalRows || 0; |
| 335 | pageInfo.value.rows = data.totalRows | ||
| 336 | } else { | 335 | } else { |
| 337 | ElMessage.error(res.msg); | 336 | ElMessage.error(res.msg); |
| 338 | } | 337 | } |
| ... | @@ -373,7 +372,7 @@ const toSearch = (val: any, clear: boolean = false) => { | ... | @@ -373,7 +372,7 @@ const toSearch = (val: any, clear: boolean = false) => { |
| 373 | // getExchangeData(); | 372 | // getExchangeData(); |
| 374 | }; | 373 | }; |
| 375 | 374 | ||
| 376 | const pageChange = (info) => { | 375 | const tablePageChange = (info) => { |
| 377 | pageInfo.value.curr = Number(info.curr); | 376 | pageInfo.value.curr = Number(info.curr); |
| 378 | pageInfo.value.limit = Number(info.limit); | 377 | pageInfo.value.limit = Number(info.limit); |
| 379 | getTableData(); | 378 | getTableData(); |
| ... | @@ -435,7 +434,7 @@ const passDialogBtnClick = (btn, info) => { | ... | @@ -435,7 +434,7 @@ const passDialogBtnClick = (btn, info) => { |
| 435 | guid: currTableData.value.approveVO.approveGuid, | 434 | guid: currTableData.value.approveVO.approveGuid, |
| 436 | flowType: currTableData.value.approveVO.flowType, | 435 | flowType: currTableData.value.approveVO.flowType, |
| 437 | approveSuggest: info.approveSuggest, | 436 | approveSuggest: info.approveSuggest, |
| 438 | approveStaffGuid: userData.staffGuid | 437 | approveStaffGuid: userData.staffGuid, |
| 439 | } | 438 | } |
| 440 | passFlowData(params, currTableData.value.tenantGuid).then((res: any) => { | 439 | passFlowData(params, currTableData.value.tenantGuid).then((res: any) => { |
| 441 | loading.value = false; | 440 | loading.value = false; |
| ... | @@ -505,7 +504,7 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -505,7 +504,7 @@ const rejectDialogBtnClick = (btn, info) => { |
| 505 | guid: currTableData.value.approveVO.approveGuid, | 504 | guid: currTableData.value.approveVO.approveGuid, |
| 506 | flowType: currTableData.value.approveVO.flowType, | 505 | flowType: currTableData.value.approveVO.flowType, |
| 507 | approveSuggest: info.approveSuggest, | 506 | approveSuggest: info.approveSuggest, |
| 508 | approveStaffGuid: userData.staffGuid | 507 | approveStaffGuid: userData.staffGuid, |
| 509 | } | 508 | } |
| 510 | rejectFlowData(params, currTableData.value.tenantGuid).then((res: any) => { | 509 | rejectFlowData(params, currTableData.value.tenantGuid).then((res: any) => { |
| 511 | loading.value = false; | 510 | loading.value = false; |
| ... | @@ -563,8 +562,7 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -563,8 +562,7 @@ const rejectDialogBtnClick = (btn, info) => { |
| 563 | </template> | 562 | </template> |
| 564 | </CarouselPanel> | 563 | </CarouselPanel> |
| 565 | <div class="table_panel_wrap"> | 564 | <div class="table_panel_wrap"> |
| 566 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" /> | 565 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> |
| 567 | <PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" /> | ||
| 568 | </div> | 566 | </div> |
| 569 | </div> | 567 | </div> |
| 570 | <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" /> | 568 | <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" /> |
| ... | @@ -593,7 +591,7 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -593,7 +591,7 @@ const rejectDialogBtnClick = (btn, info) => { |
| 593 | } | 591 | } |
| 594 | 592 | ||
| 595 | .table_panel { | 593 | .table_panel { |
| 596 | height: calc(100% - 44px) !important; | 594 | // height: calc(100% - 44px) !important; |
| 597 | } | 595 | } |
| 598 | 596 | ||
| 599 | .tools_btns { | 597 | .tools_btns { |
| ... | @@ -729,9 +727,8 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -729,9 +727,8 @@ const rejectDialogBtnClick = (btn, info) => { |
| 729 | position: relative; | 727 | position: relative; |
| 730 | } | 728 | } |
| 731 | 729 | ||
| 732 | :deep(.el-carousel) { | 730 | :deep(.el-carousel__container) { |
| 733 | margin: 0 -16px 16px; | 731 | margin-bottom: 16px; |
| 734 | padding: 0 16px; | ||
| 735 | 732 | ||
| 736 | .card-content { | 733 | .card-content { |
| 737 | width: calc(25% - 12px); | 734 | width: calc(25% - 12px); | ... | ... |
-
Please register or sign in to post a comment