逻辑空间管理连接器接口联调
Showing
6 changed files
with
520 additions
and
92 deletions
| ... | @@ -598,6 +598,41 @@ export const getTdsRegisterCatalogDetail = (damGuid) => request({ | ... | @@ -598,6 +598,41 @@ export const getTdsRegisterCatalogDetail = (damGuid) => request({ |
| 598 | method: 'get' | 598 | method: 'get' |
| 599 | }); | 599 | }); |
| 600 | 600 | ||
| 601 | /** --------------------------- 逻辑空间接口 --------------------------------------- */ | ||
| 602 | export const getLogicSpacePageList = (params) => request({ | ||
| 603 | url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/logic-space/page-list`, | ||
| 604 | method: 'post', | ||
| 605 | data: params | ||
| 606 | }) | ||
| 607 | |||
| 608 | /** 获取逻辑空间详情 */ | ||
| 609 | export const getLogicSpaceDetail = (params) => request({ | ||
| 610 | url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/logic-space/detail`, | ||
| 611 | method: 'get', | ||
| 612 | params | ||
| 613 | }) | ||
| 614 | |||
| 615 | /** 保存新建逻辑空间 */ | ||
| 616 | export const saveLogicSpace = (params) => request({ | ||
| 617 | url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/logic-space/save`, | ||
| 618 | method: 'post', | ||
| 619 | data: params | ||
| 620 | }) | ||
| 621 | |||
| 622 | /** 编辑逻辑空间 */ | ||
| 623 | export const updateLogicSpace = (params) => request({ | ||
| 624 | url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/logic-space/update`, | ||
| 625 | method: 'put', | ||
| 626 | data: params | ||
| 627 | }) | ||
| 628 | |||
| 629 | /** 删除逻辑空间 */ | ||
| 630 | export const deleteLogicSpace = (guids) => request({ | ||
| 631 | url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/logic-space/delete`, | ||
| 632 | method: 'delete', | ||
| 633 | data: guids | ||
| 634 | }) | ||
| 635 | |||
| 601 | /** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */ | 636 | /** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */ |
| 602 | 637 | ||
| 603 | export const getDataApplyPageList = (params) => request({ | 638 | export const getDataApplyPageList = (params) => request({ | ... | ... |
| ... | @@ -474,6 +474,9 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -474,6 +474,9 @@ const routes: RouteRecordRaw[] = [ |
| 474 | breadcrumb: false, | 474 | breadcrumb: false, |
| 475 | cache: true, | 475 | cache: true, |
| 476 | reuse: true | 476 | reuse: true |
| 477 | }, | ||
| 478 | beforeEnter: (to, from) => { | ||
| 479 | to.query.guid && (to.meta.title = `逻辑空间详情-${to.query.name}`); | ||
| 477 | } | 480 | } |
| 478 | }, | 481 | }, |
| 479 | ] | 482 | ] | ... | ... |
src/store/modules/productSpace.ts
0 → 100644
| 1 | const useDataProductSpaceStore = defineStore( | ||
| 2 | // 产品逻辑空间 | ||
| 3 | 'productSpace', | ||
| 4 | () => { | ||
| 5 | const isRefresh = ref<boolean>(false); | ||
| 6 | function setIsRefresh(v: boolean) { | ||
| 7 | isRefresh.value = v; | ||
| 8 | } | ||
| 9 | |||
| 10 | return { | ||
| 11 | isRefresh, | ||
| 12 | setIsRefresh, | ||
| 13 | }; | ||
| 14 | } | ||
| 15 | ); | ||
| 16 | |||
| 17 | export default useDataProductSpaceStore; |
| 1 | <template> | 1 | <template> |
| 2 | <div class="container_wrap full" v-loading="fullscreenLoading"> | 2 | <div class="container_wrap full" v-loading="fullscreenLoading"> |
| 3 | <div class="content_main"> | 3 | <div class="content_main"> |
| 4 | <div v-if="detailInfo.bizApproveState" | ||
| 5 | :class="['panel_wrap', 'mb16', 'results_panel', detailInfo.bizApproveState == 'Y' ? 'success' : ((detailInfo.bizApproveState == 'R' || detailInfo.bizApproveState == 'E') ? 'reject' : (detailInfo.bizApproveState == 'C' ? 'revoke' : 'audit'))]"> | ||
| 6 | <div class="panel_header"> | ||
| 7 | <div class="header_title" v-if="detailInfo.bizApproveState == 'Y'"> | ||
| 8 | <el-icon class="title-icon"> | ||
| 9 | <svg-icon name="icon-success" /> | ||
| 10 | </el-icon> | ||
| 11 | <span class="title_text">审批通过</span> | ||
| 12 | </div> | ||
| 13 | <div class="header_title" v-else-if="detailInfo.bizApproveState == 'R'"> | ||
| 14 | <el-icon class="title-icon"> | ||
| 15 | <CircleCloseFilled /> | ||
| 16 | </el-icon> | ||
| 17 | <span class="title_text">审批被驳回</span> | ||
| 18 | </div> | ||
| 19 | <div class="header_title" v-else-if="detailInfo.bizApproveState == 'E'"> | ||
| 20 | <el-icon class="title-icon"> | ||
| 21 | <CircleCloseFilled /> | ||
| 22 | </el-icon> | ||
| 23 | <span class="title_text">审批发起失败</span> | ||
| 24 | </div> | ||
| 25 | <div class="header_title" v-else-if="detailInfo.bizApproveState == 'A'"> | ||
| 26 | <el-icon class="title-icon"> | ||
| 27 | <svg-icon name="icon-audit" /> | ||
| 28 | </el-icon> | ||
| 29 | <span class="title_text">审批中</span> | ||
| 30 | </div> | ||
| 31 | <div class="header_title" v-else-if="detailInfo.bizApproveState == 'C'"> | ||
| 32 | <el-icon class="title-icon"> | ||
| 33 | <svg-icon name="icon-revoke" /> | ||
| 34 | </el-icon> | ||
| 35 | <span class="title_text">已撤销</span> | ||
| 36 | </div> | ||
| 37 | </div> | ||
| 38 | <div class="panel_body" v-if="detailInfo.bizApproveState == 'R'" style="padding: 0px 16px 10px;"> | ||
| 39 | <div class="results_list"> | ||
| 40 | <div class="list_item"> | ||
| 41 | <span class="item_label">平台审批意见:</span> | ||
| 42 | <span class="item_value">{{ detailInfo?.tdsApproveSuggest || '--' }}</span> | ||
| 43 | </div> | ||
| 44 | </div> | ||
| 45 | </div> | ||
| 46 | <div class="panel_body" v-if="detailInfo.bizApproveState == 'E'" style="padding: 0px 16px 10px;"> | ||
| 47 | <div class="results_list"> | ||
| 48 | <div class="list_item"> | ||
| 49 | <span class="item_label">失败原因:</span> | ||
| 50 | <span class="item_value">{{ detailInfo?.tdsApproveErrorMsg || '--' }}</span> | ||
| 51 | </div> | ||
| 52 | </div> | ||
| 53 | </div> | ||
| 54 | </div> | ||
| 4 | <ContentWrap id="id-baseInfo" title="逻辑空间信息" description="" :isExpand="baseInfoExpand" :expand-swicth="true" | 55 | <ContentWrap id="id-baseInfo" title="逻辑空间信息" description="" :isExpand="baseInfoExpand" :expand-swicth="true" |
| 5 | class="mb16" @expand="(v) => baseInfoExpand = v"> | 56 | class="mb16" @expand="(v) => baseInfoExpand = v"> |
| 6 | <div class="list_panel"> | 57 | <div class="list_panel"> |
| ... | @@ -22,7 +73,11 @@ | ... | @@ -22,7 +73,11 @@ |
| 22 | </div> | 73 | </div> |
| 23 | <div class="list_item"> | 74 | <div class="list_item"> |
| 24 | <span class="item_label">是否开启:</span> | 75 | <span class="item_label">是否开启:</span> |
| 25 | <span class="item_value">{{ detailInfo.bizState ? '是' : '否' }}</span> | 76 | <span class="item_value">{{ detailInfo.isActivate == 'Y' ? '是' : '否' }}</span> |
| 77 | </div> | ||
| 78 | <div class="list_item is_block"> | ||
| 79 | <span class="item_label">逻辑空间描述:</span> | ||
| 80 | <span class="item_value">{{ detailInfo.spaceDescription || '--' }}</span> | ||
| 26 | </div> | 81 | </div> |
| 27 | </div> | 82 | </div> |
| 28 | <el-tabs v-model="activeTabName" class="param-tabs" style="margin-top: 8px;"> | 83 | <el-tabs v-model="activeTabName" class="param-tabs" style="margin-top: 8px;"> |
| ... | @@ -36,16 +91,18 @@ | ... | @@ -36,16 +91,18 @@ |
| 36 | </el-tab-pane> | 91 | </el-tab-pane> |
| 37 | </el-tabs> | 92 | </el-tabs> |
| 38 | </ContentWrap> | 93 | </ContentWrap> |
| 39 | <ContentWrap id="id-approveInfo" title="流程审批" expandSwicth style="margin-top: 15px" :isExpand="expandApprove" | 94 | <!-- 只有可信空间才有流程审批,连接器是提交给可信空间审批的 --> |
| 95 | <!-- <ContentWrap id="id-approveInfo" title="流程审批" expandSwicth style="margin-top: 15px" :isExpand="expandApprove" | ||
| 40 | @expand="(v) => expandApprove = v"> | 96 | @expand="(v) => expandApprove = v"> |
| 41 | <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" | 97 | <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" |
| 42 | :processInstanceId="processInstanceId"> | 98 | :processInstanceId="processInstanceId"> |
| 43 | </ApprovalProcess> | 99 | </ApprovalProcess> |
| 44 | </ContentWrap> | 100 | </ContentWrap> --> |
| 45 | </div> | 101 | </div> |
| 46 | <div class="tool_btns"> | 102 | <div class="tool_btns"> |
| 47 | <div class="btns"> | 103 | <div class="btns"> |
| 48 | <el-button v-for="btn in toolBtns" :type="btn.type" :plain="btn.plain" @click="btnClick(btn)">{{ btn.label }}</el-button> | 104 | <el-button v-for="btn in toolBtns" :type="btn.type" :plain="btn.plain" @click="btnClick(btn)">{{ btn.label |
| 105 | }}</el-button> | ||
| 49 | </div> | 106 | </div> |
| 50 | </div> | 107 | </div> |
| 51 | </div> | 108 | </div> |
| ... | @@ -55,6 +112,8 @@ | ... | @@ -55,6 +112,8 @@ |
| 55 | import useUserStore from "@/store/modules/user"; | 112 | import useUserStore from "@/store/modules/user"; |
| 56 | import StrategyTable from "../data_smart_contract/components/strategyTable.vue"; | 113 | import StrategyTable from "../data_smart_contract/components/strategyTable.vue"; |
| 57 | import { TableColumnWidth } from "@/utils/enum"; | 114 | import { TableColumnWidth } from "@/utils/enum"; |
| 115 | import { CircleCloseFilled } from "@element-plus/icons-vue"; | ||
| 116 | import { getLogicSpaceDetail } from "@/api/modules/dataAsset"; | ||
| 58 | 117 | ||
| 59 | 118 | ||
| 60 | const { proxy } = getCurrentInstance() as any; | 119 | const { proxy } = getCurrentInstance() as any; |
| ... | @@ -96,21 +155,32 @@ const btnClick = (btn: any) => { | ... | @@ -96,21 +155,32 @@ const btnClick = (btn: any) => { |
| 96 | const cancel = () => { | 155 | const cancel = () => { |
| 97 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 156 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 98 | router.push({ | 157 | router.push({ |
| 99 | name: 'productApplicationManage' | 158 | name: 'productSpaceManage' |
| 100 | }); | 159 | }); |
| 101 | } | 160 | } |
| 102 | 161 | ||
| 103 | onBeforeMount(() => { | 162 | onBeforeMount(() => { |
| 104 | 163 | fullscreenLoading.value = true; | |
| 164 | getLogicSpaceDetail({ guid: route.query.guid }).then((res: any) => { | ||
| 165 | fullscreenLoading.value = false; | ||
| 166 | if (res?.code == proxy.$passCode) { | ||
| 167 | detailInfo.value = res.data || {}; | ||
| 168 | memberTableInfo.value.data = detailInfo.value.permissionRSVOS || []; | ||
| 169 | } else { | ||
| 170 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 171 | } | ||
| 172 | }) | ||
| 105 | }) | 173 | }) |
| 106 | 174 | ||
| 107 | const memberTableInfo = ref({ | 175 | const memberTableInfo = ref({ |
| 108 | id: "input-member-table", | 176 | id: "input-member-table", |
| 109 | height: '214px', | 177 | height: '214px', |
| 110 | fields: [ | 178 | fields: [ |
| 111 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, | 179 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, |
| 112 | { label: "成员名称", field: "memberGuid", width: 200 }, | 180 | { label: "成员名称", field: "memberName", width: 200 }, |
| 113 | { label: "角色类型", field: "roleType", width: 160 }, | 181 | { label: "角色类型", field: "characterType", width: 160, getName: (scope) => { |
| 182 | return !scope.row.characterType ? '--' : (scope.row.characterType == '1' ? '数据使用方' : '数据提供方') | ||
| 183 | } }, | ||
| 114 | { label: "描述", field: "description", width: 300 }, | 184 | { label: "描述", field: "description", width: 300 }, |
| 115 | ], | 185 | ], |
| 116 | data: [], | 186 | data: [], |
| ... | @@ -197,4 +267,134 @@ const memberTableInfo = ref({ | ... | @@ -197,4 +267,134 @@ const memberTableInfo = ref({ |
| 197 | 267 | ||
| 198 | } | 268 | } |
| 199 | } | 269 | } |
| 270 | |||
| 271 | .panel_wrap { | ||
| 272 | |||
| 273 | .panel_header { | ||
| 274 | .header_title { | ||
| 275 | height: 40px; | ||
| 276 | padding: 0 16px; | ||
| 277 | background-color: #fafafa; | ||
| 278 | box-shadow: 0 0 0 1px #e5e5e5; | ||
| 279 | display: flex; | ||
| 280 | align-items: center; | ||
| 281 | } | ||
| 282 | |||
| 283 | .title_text { | ||
| 284 | line-height: 22px; | ||
| 285 | font-size: 14px; | ||
| 286 | color: var(--el-color-regular); | ||
| 287 | font-weight: 600; | ||
| 288 | display: flex; | ||
| 289 | align-items: center; | ||
| 290 | |||
| 291 | .title_icon { | ||
| 292 | width: 26px; | ||
| 293 | height: 21px; | ||
| 294 | margin-right: 4px; | ||
| 295 | cursor: pointer; | ||
| 296 | |||
| 297 | &.active { | ||
| 298 | transform: rotate(90deg); | ||
| 299 | } | ||
| 300 | } | ||
| 301 | } | ||
| 302 | } | ||
| 303 | |||
| 304 | &.results_panel { | ||
| 305 | box-shadow: 0 0 0 1px #d9d9d9; | ||
| 306 | |||
| 307 | .panel_header { | ||
| 308 | .header_title { | ||
| 309 | background-color: transparent; | ||
| 310 | box-shadow: none; | ||
| 311 | |||
| 312 | .el-icon { | ||
| 313 | margin-right: 8px; | ||
| 314 | width: 20px; | ||
| 315 | height: 20px; | ||
| 316 | |||
| 317 | svg { | ||
| 318 | width: 100%; | ||
| 319 | height: 100%; | ||
| 320 | } | ||
| 321 | } | ||
| 322 | } | ||
| 323 | } | ||
| 324 | |||
| 325 | .panel_body { | ||
| 326 | padding-top: 0; | ||
| 327 | margin-top: 0; | ||
| 328 | box-shadow: none; | ||
| 329 | |||
| 330 | .results_list { | ||
| 331 | display: flex; | ||
| 332 | |||
| 333 | .list_item { | ||
| 334 | display: flex; | ||
| 335 | margin-bottom: 8px; | ||
| 336 | margin-right: 60px; | ||
| 337 | color: #666; | ||
| 338 | |||
| 339 | .item_value { | ||
| 340 | padding: 0 8px; | ||
| 341 | color: var(--el-color-regular); | ||
| 342 | } | ||
| 343 | } | ||
| 344 | } | ||
| 345 | } | ||
| 346 | |||
| 347 | &.success { | ||
| 348 | background-color: #F4FEF6; | ||
| 349 | box-shadow: 0 0 0 1px #4FA55D; | ||
| 350 | |||
| 351 | .panel_header { | ||
| 352 | .header_title { | ||
| 353 | .el-icon { | ||
| 354 | color: #4FA55D; | ||
| 355 | } | ||
| 356 | } | ||
| 357 | } | ||
| 358 | } | ||
| 359 | |||
| 360 | &.reject { | ||
| 361 | background-color: #FDF2F4; | ||
| 362 | box-shadow: 0 0 0 1px #E63E33; | ||
| 363 | |||
| 364 | .panel_header { | ||
| 365 | .header_title { | ||
| 366 | .el-icon { | ||
| 367 | color: #E63E33; | ||
| 368 | } | ||
| 369 | } | ||
| 370 | } | ||
| 371 | } | ||
| 372 | |||
| 373 | &.audit { | ||
| 374 | background-color: #FEFBF3; | ||
| 375 | box-shadow: 0 0 0 1px #F19E40; | ||
| 376 | |||
| 377 | .panel_header { | ||
| 378 | .header_title { | ||
| 379 | .el-icon { | ||
| 380 | color: #F19E40; | ||
| 381 | } | ||
| 382 | } | ||
| 383 | } | ||
| 384 | } | ||
| 385 | |||
| 386 | &.revoke { | ||
| 387 | background-color: #F5F5F5; | ||
| 388 | box-shadow: 0 0 0 1px #CCCCCC; | ||
| 389 | |||
| 390 | .panel_header { | ||
| 391 | .header_title { | ||
| 392 | .el-icon { | ||
| 393 | color: #666666; | ||
| 394 | } | ||
| 395 | } | ||
| 396 | } | ||
| 397 | } | ||
| 398 | } | ||
| 399 | } | ||
| 200 | </style> | 400 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -13,21 +13,19 @@ | ... | @@ -13,21 +13,19 @@ |
| 13 | </div> | 13 | </div> |
| 14 | </el-tab-pane> | 14 | </el-tab-pane> |
| 15 | <el-tab-pane label="策略配置" name="strategy"> | 15 | <el-tab-pane label="策略配置" name="strategy"> |
| 16 | <StrategyTable ref="strategyTableRef" :value="detailInfo.policyRSVOS || (route.query.guid ? [] : [{ | 16 | <StrategyTable ref="strategyTableRef" :value="detailInfo.policyRSVOS || []" |
| 17 | index: 1, | 17 | :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" |
| 18 | action: '', | ||
| 19 | children: [{ childIndex: 1 }] | ||
| 20 | }])" :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" | ||
| 21 | :constraintOptionsList="constraintOptionsList"></StrategyTable> | 18 | :constraintOptionsList="constraintOptionsList"></StrategyTable> |
| 22 | </el-tab-pane> | 19 | </el-tab-pane> |
| 23 | </el-tabs> | 20 | </el-tabs> |
| 24 | </ContentWrap> | 21 | </ContentWrap> |
| 25 | <ContentWrap id="id-approveInfo" title="流程审批" expandSwicth style="margin-top: 15px" :isExpand="expandApprove" | 22 | <!-- 可信空间需要显示 --> |
| 23 | <!-- <ContentWrap id="id-approveInfo" title="流程审批" expandSwicth style="margin-top: 15px" :isExpand="expandApprove" | ||
| 26 | @expand="(v) => expandApprove = v"> | 24 | @expand="(v) => expandApprove = v"> |
| 27 | <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" | 25 | <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" |
| 28 | :processInstanceId="processInstanceId"> | 26 | :processInstanceId="processInstanceId"> |
| 29 | </ApprovalProcess> | 27 | </ApprovalProcess> |
| 30 | </ContentWrap> | 28 | </ContentWrap> --> |
| 31 | </div> | 29 | </div> |
| 32 | <div class="bottom_tool_wrap"> | 30 | <div class="bottom_tool_wrap"> |
| 33 | <el-button @click="cancel">取消</el-button> | 31 | <el-button @click="cancel">取消</el-button> |
| ... | @@ -46,20 +44,22 @@ import { | ... | @@ -46,20 +44,22 @@ import { |
| 46 | import { | 44 | import { |
| 47 | getActionPolicyList, | 45 | getActionPolicyList, |
| 48 | getConstraintPolicyList, | 46 | getConstraintPolicyList, |
| 47 | getContractTenantList | ||
| 49 | } from "@/api/modules/dataSmartContract" | 48 | } from "@/api/modules/dataSmartContract" |
| 50 | import useUserStore from "@/store/modules/user"; | 49 | import useUserStore from "@/store/modules/user"; |
| 51 | import useDataProductApplicationStore from "@/store/modules/productApplication"; | 50 | import useDataProductSpaceStore from "@/store/modules/productSpace"; |
| 52 | import { useValidator } from '@/hooks/useValidator'; | 51 | import { useValidator } from '@/hooks/useValidator'; |
| 53 | import { TableColumnWidth } from "@/utils/enum"; | 52 | import { TableColumnWidth } from "@/utils/enum"; |
| 54 | import { scrollLastRowToView } from "@/utils/common"; | 53 | import { scrollLastRowToView } from "@/utils/common"; |
| 55 | import StrategyTable from "../data_smart_contract/components/strategyTable.vue"; | 54 | import StrategyTable from "../data_smart_contract/components/strategyTable.vue"; |
| 55 | import { getLogicSpaceDetail, saveLogicSpace, updateLogicSpace } from "@/api/modules/dataAsset"; | ||
| 56 | 56 | ||
| 57 | const { required } = useValidator(); | 57 | const { required } = useValidator(); |
| 58 | 58 | ||
| 59 | const { proxy } = getCurrentInstance() as any; | 59 | const { proxy } = getCurrentInstance() as any; |
| 60 | 60 | ||
| 61 | const userStore = useUserStore(); | 61 | const userStore = useUserStore(); |
| 62 | const productApplicationStore = useDataProductApplicationStore(); | 62 | const productSpaceStore = useDataProductSpaceStore(); |
| 63 | const route = useRoute(); | 63 | const route = useRoute(); |
| 64 | const router = useRouter(); | 64 | const router = useRouter(); |
| 65 | const userData = JSON.parse(localStorage.userData); | 65 | const userData = JSON.parse(localStorage.userData); |
| ... | @@ -86,6 +86,9 @@ const activeTabName = ref('member'); | ... | @@ -86,6 +86,9 @@ const activeTabName = ref('member'); |
| 86 | const deploymentId = ref(''); | 86 | const deploymentId = ref(''); |
| 87 | const processInstanceId = ref(''); | 87 | const processInstanceId = ref(''); |
| 88 | 88 | ||
| 89 | /** 策略表格组件引用 */ | ||
| 90 | const strategyTableRef = ref(); | ||
| 91 | |||
| 89 | const baseInfoFormRef = ref(); | 92 | const baseInfoFormRef = ref(); |
| 90 | 93 | ||
| 91 | const domainDictList: any = ref([]); | 94 | const domainDictList: any = ref([]); |
| ... | @@ -130,11 +133,11 @@ const baseInfoFormItems = ref([ | ... | @@ -130,11 +133,11 @@ const baseInfoFormItems = ref([ |
| 130 | { | 133 | { |
| 131 | label: '是否开启', | 134 | label: '是否开启', |
| 132 | type: 'switch', | 135 | type: 'switch', |
| 133 | field: 'bizState', | 136 | field: 'isActivate', |
| 134 | default: 'Y', | 137 | default: 'Y', |
| 135 | placeholder: '请选择', | 138 | placeholder: '请选择', |
| 136 | activeValue: 'Y', | 139 | activeValue: 'Y', |
| 137 | inactiveValue: 'S', | 140 | inactiveValue: 'N', |
| 138 | required: true, | 141 | required: true, |
| 139 | switchWidth: 32, | 142 | switchWidth: 32, |
| 140 | }, | 143 | }, |
| ... | @@ -142,7 +145,7 @@ const baseInfoFormItems = ref([ | ... | @@ -142,7 +145,7 @@ const baseInfoFormItems = ref([ |
| 142 | label: '逻辑空间描述', | 145 | label: '逻辑空间描述', |
| 143 | type: 'textarea', | 146 | type: 'textarea', |
| 144 | placeholder: '该逻辑空间主要为医疗机构的数据产品,限制了数据产品以及只有进行查看操作。参与方为某某医药企业、某某医疗机构以及运营方。', | 147 | placeholder: '该逻辑空间主要为医疗机构的数据产品,限制了数据产品以及只有进行查看操作。参与方为某某医药企业、某某医疗机构以及运营方。', |
| 145 | field: 'description', | 148 | field: 'spaceDescription', |
| 146 | default: '', | 149 | default: '', |
| 147 | block: true, | 150 | block: true, |
| 148 | maxlength: 500, | 151 | maxlength: 500, |
| ... | @@ -154,7 +157,7 @@ const baseInfoFormItems = ref([ | ... | @@ -154,7 +157,7 @@ const baseInfoFormItems = ref([ |
| 154 | const baseInfoFormRules = ref({ | 157 | const baseInfoFormRules = ref({ |
| 155 | spaceName: [required('请输入逻辑空间名称')], | 158 | spaceName: [required('请输入逻辑空间名称')], |
| 156 | domain: [required('请选择所属领域')], | 159 | domain: [required('请选择所属领域')], |
| 157 | description: [required('请输入逻辑空间描述')] | 160 | spaceDescription: [required('请输入逻辑空间描述')] |
| 158 | }) | 161 | }) |
| 159 | 162 | ||
| 160 | const cancel = () => { | 163 | const cancel = () => { |
| ... | @@ -171,10 +174,10 @@ const cancel = () => { | ... | @@ -171,10 +174,10 @@ const cancel = () => { |
| 171 | const memberTenantList: any = ref([]); | 174 | const memberTenantList: any = ref([]); |
| 172 | 175 | ||
| 173 | const roleTypeList: any = ref([{ | 176 | const roleTypeList: any = ref([{ |
| 174 | value: 'use', | 177 | value: '1', |
| 175 | label: '数据使用方' | 178 | label: '数据使用方' |
| 176 | }, { | 179 | }, { |
| 177 | value: 'provider', | 180 | value: '2', |
| 178 | label: '数据提供方' | 181 | label: '数据提供方' |
| 179 | }]); | 182 | }]); |
| 180 | 183 | ||
| ... | @@ -191,7 +194,7 @@ const memberTableInfo = ref({ | ... | @@ -191,7 +194,7 @@ const memberTableInfo = ref({ |
| 191 | fields: [ | 194 | fields: [ |
| 192 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, | 195 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, |
| 193 | { label: "成员名称", field: "memberGuid", width: 200, required: true, columClass: 'edit-colum', type: 'edit' }, | 196 | { label: "成员名称", field: "memberGuid", width: 200, required: true, columClass: 'edit-colum', type: 'edit' }, |
| 194 | { label: "角色类型", field: "roleType", width: 160, required: true, columClass: 'edit-colum', type: 'edit' }, | 197 | { label: "角色类型", field: "characterType", width: 160, required: true, columClass: 'edit-colum', type: 'edit' }, |
| 195 | { label: "描述", field: "description", width: 300, required: false, columClass: 'edit-colum', type: 'edit' }, | 198 | { label: "描述", field: "description", width: 300, required: false, columClass: 'edit-colum', type: 'edit' }, |
| 196 | ], | 199 | ], |
| 197 | editInfo: { | 200 | editInfo: { |
| ... | @@ -209,10 +212,10 @@ const memberTableInfo = ref({ | ... | @@ -209,10 +212,10 @@ const memberTableInfo = ref({ |
| 209 | clearable: true, | 212 | clearable: true, |
| 210 | filterable: true | 213 | filterable: true |
| 211 | }, | 214 | }, |
| 212 | roleType: { | 215 | characterType: { |
| 213 | label: '', | 216 | label: '', |
| 214 | type: 'select', | 217 | type: 'select', |
| 215 | field: 'roleType', | 218 | field: 'characterType', |
| 216 | default: '', | 219 | default: '', |
| 217 | options: roleTypeList.value, | 220 | options: roleTypeList.value, |
| 218 | props: { | 221 | props: { |
| ... | @@ -271,29 +274,111 @@ const addMember = () => { | ... | @@ -271,29 +274,111 @@ const addMember = () => { |
| 271 | 274 | ||
| 272 | const save = () => { | 275 | const save = () => { |
| 273 | // 保存不检验。 | 276 | // 保存不检验。 |
| 277 | let formInline = baseInfoFormRef.value.formInline; | ||
| 278 | let params = { ...formInline }; | ||
| 279 | if (!params.spaceName) { | ||
| 280 | proxy.$ElMessage.error('逻辑空间名称不能为空'); | ||
| 281 | return; | ||
| 282 | } | ||
| 283 | params.permissionRQVOS = memberTableInfo.value.data || []; | ||
| 284 | params.policyRQVOS = strategyTableRef.value.strategyData?.map((d, index) => { | ||
| 285 | return Object.assign({}, d, { orderNum: index + 1 }) | ||
| 286 | }); | ||
| 287 | params.tenantGuid = userData.tenantGuid; | ||
| 288 | fullscreenLoading.value = true; | ||
| 289 | if (route.query.guid) { | ||
| 290 | params.guid = route.query.guid; | ||
| 291 | updateLogicSpace(params).then((res: any) => { | ||
| 292 | fullscreenLoading.value = false; | ||
| 293 | if (res?.code == proxy.$passCode) { | ||
| 294 | proxy.$ElMessage.success('编辑保存成功'); | ||
| 295 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 296 | router.push({ | ||
| 297 | name: 'productSpaceManage' | ||
| 298 | }); | ||
| 299 | productSpaceStore.setIsRefresh(true); | ||
| 300 | } else { | ||
| 301 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 302 | } | ||
| 303 | }) | ||
| 304 | } else { | ||
| 305 | saveLogicSpace(params).then((res: any) => { | ||
| 306 | fullscreenLoading.value = false; | ||
| 307 | if (res?.code == proxy.$passCode) { | ||
| 308 | proxy.$ElMessage.success('保存成功'); | ||
| 309 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 310 | router.push({ | ||
| 311 | name: 'productSpaceManage' | ||
| 312 | }); | ||
| 313 | productSpaceStore.setIsRefresh(true); | ||
| 314 | } else { | ||
| 315 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 316 | } | ||
| 317 | }) | ||
| 318 | } | ||
| 274 | } | 319 | } |
| 275 | 320 | ||
| 276 | const submit = () => { | 321 | const submit = () => { |
| 277 | baseInfoFormRef.value?.ruleFormRef?.validate().then((valid, errorItem) => { | 322 | baseInfoFormRef.value?.ruleFormRef?.validate().then((valid, errorItem) => { |
| 278 | if (valid) { | 323 | if (valid) { |
| 279 | let formInline = baseInfoFormRef.value.formInline; | 324 | let formInline = baseInfoFormRef.value.formInline; |
| 280 | // TODO,判断成员不能重复添加选择,相同的角色。 | 325 | // for循环判断相同成员不能重复添加相同的角色类型,且每行数据的成员guid和角色类型不能出现为空的,若为空则提示。 |
| 281 | // fullscreenLoading.value = true; | 326 | for (let data of memberTableData.value) { |
| 282 | // listingSavePortal(params).then((res: any) => { | 327 | if (!data.memberGuid || !data.characterType) { |
| 283 | // fullscreenLoading.value = false; | 328 | proxy.$ElMessage.error('成员名称和角色类型请填写完整'); |
| 284 | // if (res?.code == proxy.$passCode) { | 329 | activeTabName.value = 'member'; |
| 285 | // proxy.$ElMessage.success('提交审批成功'); | 330 | return; |
| 286 | // userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 331 | } |
| 287 | // productApplicationStore.setIsRefresh(true); | 332 | let isExist = memberTableData.value.find((item: any) => data !== item && item.memberGuid == data.memberGuid && item.characterType == data.characterType); |
| 288 | // router.push({ | 333 | if (isExist) { |
| 289 | // name: "productApplicationManage", | 334 | proxy.$ElMessage.error('相同成员不能重复添加相同的角色类型'); |
| 290 | // }); | 335 | activeTabName.value = 'member'; |
| 291 | // } else { | 336 | return; |
| 292 | // res?.msg && proxy.$ElMessage.error(res.msg); | 337 | } |
| 293 | // } | 338 | } |
| 294 | // }).catch((res) => { | 339 | let validate = strategyTableRef.value?.validateValue(); |
| 295 | // fullscreenLoading.value = false; | 340 | if (!validate) { |
| 296 | // }); | 341 | activeTabName.value = 'strategy'; |
| 342 | return; | ||
| 343 | } | ||
| 344 | let params = { ...formInline }; | ||
| 345 | params.permissionRQVOS = memberTableInfo.value.data || []; | ||
| 346 | params.policyRQVOS = strategyTableRef.value.strategyData?.map((d, index) => { | ||
| 347 | return Object.assign({}, d, { orderNum: index + 1 }) | ||
| 348 | }); | ||
| 349 | params.immediateApprove = true; | ||
| 350 | params.tenantGuid = userData.tenantGuid; | ||
| 351 | fullscreenLoading.value = true; | ||
| 352 | if (route.query.guid) { | ||
| 353 | params.guid = route.query.guid; | ||
| 354 | updateLogicSpace(params).then((res: any) => { | ||
| 355 | fullscreenLoading.value = false; | ||
| 356 | if (res?.code == proxy.$passCode) { | ||
| 357 | proxy.$ElMessage.success('编辑提交审批成功'); | ||
| 358 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 359 | router.push({ | ||
| 360 | name: 'productSpaceManage' | ||
| 361 | }); | ||
| 362 | productSpaceStore.setIsRefresh(true); | ||
| 363 | } else { | ||
| 364 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 365 | } | ||
| 366 | }) | ||
| 367 | } else { | ||
| 368 | saveLogicSpace(params).then((res: any) => { | ||
| 369 | fullscreenLoading.value = false; | ||
| 370 | if (res?.code == proxy.$passCode) { | ||
| 371 | proxy.$ElMessage.success('提交审批成功'); | ||
| 372 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 373 | router.push({ | ||
| 374 | name: 'productSpaceManage' | ||
| 375 | }); | ||
| 376 | productSpaceStore.setIsRefresh(true); | ||
| 377 | } else { | ||
| 378 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 379 | } | ||
| 380 | }) | ||
| 381 | } | ||
| 297 | } else { | 382 | } else { |
| 298 | var obj = Object.keys(errorItem); | 383 | var obj = Object.keys(errorItem); |
| 299 | baseInfoFormRef.value.ruleFormRef.scrollToField(obj[0]); | 384 | baseInfoFormRef.value.ruleFormRef.scrollToField(obj[0]); |
| ... | @@ -303,31 +388,38 @@ const submit = () => { | ... | @@ -303,31 +388,38 @@ const submit = () => { |
| 303 | 388 | ||
| 304 | onActivated(() => { | 389 | onActivated(() => { |
| 305 | let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath == fullPath); | 390 | let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath == fullPath); |
| 306 | let detailType = route.query.type; | ||
| 307 | let name = route.query.name; | 391 | let name = route.query.name; |
| 308 | if (tab) { | 392 | if (tab) { |
| 309 | switch (detailType) { | 393 | tab.meta.title = route.query.guid ? `编辑-${name}` : '新增逻辑空间'; |
| 310 | case 'edit': | 394 | } |
| 311 | tab.meta.title = `编辑-${name}`; | 395 | document.title = tab.meta.title; |
| 312 | break; | ||
| 313 | case 'redit': | ||
| 314 | tab.meta.title = `编辑-${name}`; | ||
| 315 | break; | ||
| 316 | default: | ||
| 317 | tab.meta.title = '新增逻辑空间'; | ||
| 318 | } | ||
| 319 | document.title = tab.meta.title; | ||
| 320 | }; | ||
| 321 | }) | 396 | }) |
| 322 | 397 | ||
| 323 | onBeforeMount(() => { | 398 | onBeforeMount(() => { |
| 324 | // getCamundaDeploymentId('10016', userData.tenantGuid, userData.staffGuid).then((res: any) => { | 399 | // 可信空间需要 |
| 400 | // getCamundaDeploymentId('10034', userData.tenantGuid, userData.staffGuid).then((res: any) => { | ||
| 325 | // if (res.code == proxy.$passCode) { | 401 | // if (res.code == proxy.$passCode) { |
| 326 | // deploymentId.value = res.data; | 402 | // deploymentId.value = res.data; |
| 327 | // } else { | 403 | // } else { |
| 328 | // proxy.$ElMessage.error(res.msg); | 404 | // proxy.$ElMessage.error(res.msg); |
| 329 | // } | 405 | // } |
| 330 | // }) | 406 | // }) |
| 407 | if (route.query.guid) { | ||
| 408 | fullscreenLoading.value = true; | ||
| 409 | getLogicSpaceDetail({ guid: route.query.guid }).then((res: any) => { | ||
| 410 | fullscreenLoading.value = false; | ||
| 411 | if (res?.code == proxy.$passCode) { | ||
| 412 | detailInfo.value = res.data || {}; | ||
| 413 | baseInfoFormItems.value.forEach((item: any) => { | ||
| 414 | item.default = detailInfo.value[item.field] || ''; | ||
| 415 | }) | ||
| 416 | memberTableInfo.value.data = detailInfo.value?.permissionRSVOS || []; | ||
| 417 | strategyTableRef.value.strategyData = detailInfo.value?.policyRSVOS || []; | ||
| 418 | } else { | ||
| 419 | res?.msg && proxy.$ElMessage.error(res?.msg); | ||
| 420 | } | ||
| 421 | }) | ||
| 422 | } | ||
| 331 | 423 | ||
| 332 | getParamsList({ dictType: '领域' }).then((res: any) => { | 424 | getParamsList({ dictType: '领域' }).then((res: any) => { |
| 333 | if (res.code == proxy.$passCode) { | 425 | if (res.code == proxy.$passCode) { |
| ... | @@ -364,6 +456,15 @@ onBeforeMount(() => { | ... | @@ -364,6 +456,15 @@ onBeforeMount(() => { |
| 364 | res?.msg && proxy.$ElMessage.error(res?.msg); | 456 | res?.msg && proxy.$ElMessage.error(res?.msg); |
| 365 | } | 457 | } |
| 366 | }) | 458 | }) |
| 459 | /** 获取可选择的成员下拉列表 */ | ||
| 460 | getContractTenantList().then((res: any) => { | ||
| 461 | if (res.code == proxy.$passCode) { | ||
| 462 | memberTenantList.value = res.data || []; | ||
| 463 | memberTableInfo.value.editInfo.memberGuid.options = memberTenantList.value; | ||
| 464 | } else { | ||
| 465 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 466 | } | ||
| 467 | }) | ||
| 367 | }) | 468 | }) |
| 368 | 469 | ||
| 369 | </script> | 470 | </script> |
| ... | @@ -403,7 +504,7 @@ onBeforeMount(() => { | ... | @@ -403,7 +504,7 @@ onBeforeMount(() => { |
| 403 | } | 504 | } |
| 404 | 505 | ||
| 405 | :deep(.el-tabs) { | 506 | :deep(.el-tabs) { |
| 406 | margin-top: -8px; | 507 | margin-top: 0px; |
| 407 | 508 | ||
| 408 | .el-tabs__header { | 509 | .el-tabs__header { |
| 409 | margin-bottom: 8px; | 510 | margin-bottom: 8px; | ... | ... |
| ... | @@ -5,27 +5,39 @@ | ... | @@ -5,27 +5,39 @@ |
| 5 | <el-input v-model.trim="pageInfo.keyWord" placeholder="名称搜索" :suffix-icon="Search" clearable | 5 | <el-input v-model.trim="pageInfo.keyWord" placeholder="名称搜索" :suffix-icon="Search" clearable |
| 6 | @blur="toSearch(true, true)" @keyup.enter.native="searchEnterFun" /> | 6 | @blur="toSearch(true, true)" @keyup.enter.native="searchEnterFun" /> |
| 7 | </div> | 7 | </div> |
| 8 | <div class="table_panel_wrap"> | 8 | <div class="table_panel_wrap" v-loading="listDataLoading"> |
| 9 | <div v-show="listData.length" class="data-content" v-loading="listDataLoading"> | 9 | <div v-show="listData.length" class="data-content"> |
| 10 | <div class="card-content" v-for="(item, index) in listData" :key="item.guid" @click="handleDataClick(item)"> | 10 | <div class="card-content" v-for="(item, index) in listData" :key="item.guid" @click="handleDataClick(item)"> |
| 11 | <div class="v-top"> | 11 | <div class="v-top"> |
| 12 | <span class="title">{{ item.name }}</span> | 12 | <span class="title">{{ item.spaceName }}</span> |
| 13 | <el-tag :type="tagType(item, 'approveState')">{{ tagMethod(item, 'approveState') }}</el-tag> | 13 | <el-tag :type="tagType(item, 'bizApproveState')">{{ tagMethod(item, 'bizApproveState') }}</el-tag> |
| 14 | </div> | 14 | </div> |
| 15 | <div class="v-middle"> | 15 | <div class="v-middle"> |
| 16 | <div class="per"> | 16 | <div class="per"> |
| 17 | <div class="desc">产品数量</div> | 17 | <div class="desc">产品数量</div> |
| 18 | <div class="cnt">{{ item.productNum == null ? '--' : changeNum(item.productNum, 0) }}</div> | 18 | <div class="cnt">{{ item.damCount == null ? '--' : changeNum(item.damCount, 0) }}</div> |
| 19 | </div> | 19 | </div> |
| 20 | <div class="per"> | 20 | <div class="per"> |
| 21 | <div class="desc">成员数量</div> | 21 | <div class="desc">成员数量</div> |
| 22 | <div class="cnt">{{ item.productNum == null ? '--' : changeNum(item.productNum, 0) }}</div> | 22 | <div class="cnt">{{ item.memberCount == null ? '--' : changeNum(item.memberCount, 0) }}</div> |
| 23 | </div> | 23 | </div> |
| 24 | </div> | 24 | </div> |
| 25 | <div class="v-bottom"> | 25 | <div class="v-bottom"> |
| 26 | <div class="per" @click.stop="clickDetail(item)">详情</div> | 26 | <template v-if="item.bizApproveState == 'N'"> |
| 27 | <div class="divider" @click.stop></div> | 27 | <div class="per" @click.stop="clickEdit(item)">编辑</div> |
| 28 | <div class="per" @click.stop="clickDelete(item)">删除</div> | 28 | <div class="divider" @click.stop></div> |
| 29 | <div class="per" @click.stop="clickDelete(item)">删除</div> | ||
| 30 | </template> | ||
| 31 | <template v-else-if="item.bizApproveState == 'A'"> | ||
| 32 | <div class="per" @click.stop="clickDetail(item)">详情</div> | ||
| 33 | <div class="divider" @click.stop></div> | ||
| 34 | <div class="per" style="cursor: default;">--</div> | ||
| 35 | </template> | ||
| 36 | <template v-else> | ||
| 37 | <div class="per" @click.stop="clickDetail(item)">详情</div> | ||
| 38 | <div class="divider" @click.stop></div> | ||
| 39 | <div class="per" @click.stop="clickDelete(item)">删除</div> | ||
| 40 | </template> | ||
| 29 | <!-- TODO 只有审批中才有删除 --> | 41 | <!-- TODO 只有审批中才有删除 --> |
| 30 | </div> | 42 | </div> |
| 31 | </div> | 43 | </div> |
| ... | @@ -42,16 +54,19 @@ | ... | @@ -42,16 +54,19 @@ |
| 42 | import { commonPageConfig } from '@/components/PageNav'; | 54 | import { commonPageConfig } from '@/components/PageNav'; |
| 43 | import { changeNum, tagMethod, tagType } from '@/utils/common'; | 55 | import { changeNum, tagMethod, tagType } from '@/utils/common'; |
| 44 | import { Search } from "@element-plus/icons-vue"; | 56 | import { Search } from "@element-plus/icons-vue"; |
| 57 | import { getLogicSpacePageList, deleteLogicSpace } from '@/api/modules/dataAsset'; | ||
| 58 | import useDataProductSpaceStore from "@/store/modules/productSpace"; | ||
| 59 | |||
| 60 | const productSpaceStore = useDataProductSpaceStore(); | ||
| 45 | 61 | ||
| 46 | const router = useRouter(); | 62 | const router = useRouter(); |
| 47 | const { proxy } = getCurrentInstance() as any; | 63 | const { proxy } = getCurrentInstance() as any; |
| 64 | const userData = JSON.parse(localStorage.userData); | ||
| 48 | 65 | ||
| 49 | /** 卡片加载条 */ | 66 | /** 卡片加载条 */ |
| 50 | const listDataLoading = ref(false); | 67 | const listDataLoading = ref(false); |
| 51 | /** 列表数据 */ | 68 | /** 列表数据 */ |
| 52 | const listData: any = ref([{ guid: '1', name: '产品空间1' }, { guid: '2', name: '产品空间1' }, { guid: '3', name: '产品空间1' }, { guid: '4', name: '产品空间1' }, | 69 | const listData: any = ref([]); |
| 53 | { guid: '5', name: '产品空间1' } | ||
| 54 | ]); | ||
| 55 | 70 | ||
| 56 | const oldKeyWord = ref(""); // 记录上次输入的关键字,避免重复搜索 | 71 | const oldKeyWord = ref(""); // 记录上次输入的关键字,避免重复搜索 |
| 57 | const isEnter = ref(false); // 标识是否通过回车键触发搜索 | 72 | const isEnter = ref(false); // 标识是否通过回车键触发搜索 |
| ... | @@ -64,23 +79,23 @@ const pageInfo = ref({ | ... | @@ -64,23 +79,23 @@ const pageInfo = ref({ |
| 64 | }); | 79 | }); |
| 65 | 80 | ||
| 66 | const getTableData = (clear = false) => { | 81 | const getTableData = (clear = false) => { |
| 67 | // listDataLoading.value = true; | 82 | listDataLoading.value = true; |
| 68 | // getDamCatalogTable({ | 83 | getLogicSpacePageList({ |
| 69 | // pageSize: pageInfo.value.limit, | 84 | pageSize: pageInfo.value.limit, |
| 70 | // pageIndex: pageInfo.value.curr, | 85 | pageIndex: pageInfo.value.curr, |
| 71 | // keyWord: pageInfo.value.keyWord | 86 | spaceName: pageInfo.value.keyWord |
| 72 | // }).then((res: any) => { | 87 | }).then((res: any) => { |
| 73 | // listDataLoading.value = false; | 88 | listDataLoading.value = false; |
| 74 | // if (res.code == proxy.$passCode) { | 89 | if (res.code == proxy.$passCode) { |
| 75 | // const data = res.data || {} | 90 | const data = res.data || {} |
| 76 | // listData.value = data.records || []; | 91 | listData.value = data.records || []; |
| 77 | // pageInfo.value.limit = data.pageSize | 92 | pageInfo.value.limit = data.pageSize |
| 78 | // pageInfo.value.curr = data.pageIndex | 93 | pageInfo.value.curr = data.pageIndex |
| 79 | // pageInfo.value.rows = data.totalRows | 94 | pageInfo.value.rows = data.totalRows |
| 80 | // } else { | 95 | } else { |
| 81 | // proxy.$ElMessage.error(res.msg); | 96 | proxy.$ElMessage.error(res.msg); |
| 82 | // } | 97 | } |
| 83 | // }); | 98 | }); |
| 84 | } | 99 | } |
| 85 | 100 | ||
| 86 | const pageChange = (info) => { | 101 | const pageChange = (info) => { |
| ... | @@ -124,11 +139,35 @@ const newCreate = () => { | ... | @@ -124,11 +139,35 @@ const newCreate = () => { |
| 124 | } | 139 | } |
| 125 | 140 | ||
| 126 | const handleDataClick = (item) => { | 141 | const handleDataClick = (item) => { |
| 142 | let approveState = item.bizApproveState; | ||
| 143 | if (approveState == 'A' || approveState == 'Y') { //通过或审批中,点进去是详情 | ||
| 144 | router.push({ | ||
| 145 | name: 'productSpaceDetail', | ||
| 146 | query: { | ||
| 147 | guid: item.guid, | ||
| 148 | name: item.spaceName | ||
| 149 | } | ||
| 150 | }) | ||
| 151 | return; | ||
| 152 | } | ||
| 153 | const staffGuid = item.createUserId || ''; | ||
| 154 | let currentStaffGuid = userData.tenantGuid; | ||
| 155 | // 如果是驳回等状态,是自己创建的可以编辑。 | ||
| 156 | if ((approveState == 'C' || approveState == 'E' || approveState == 'R')) { | ||
| 157 | router.push({ | ||
| 158 | name: staffGuid == currentStaffGuid ? 'productSpaceEdit' : 'productSpaceDetail', | ||
| 159 | query: { | ||
| 160 | guid: item.guid, | ||
| 161 | name: item.spaceName | ||
| 162 | } | ||
| 163 | }) | ||
| 164 | return; | ||
| 165 | } | ||
| 127 | router.push({ | 166 | router.push({ |
| 128 | name: 'productSpaceEdit', | 167 | name: 'productSpaceEdit', |
| 129 | query: { | 168 | query: { |
| 130 | guid: item.guid, | 169 | guid: item.guid, |
| 131 | name: item.name | 170 | name: item.spaceName |
| 132 | } | 171 | } |
| 133 | }) | 172 | }) |
| 134 | } | 173 | } |
| ... | @@ -138,19 +177,52 @@ const clickDetail = (item) => { | ... | @@ -138,19 +177,52 @@ const clickDetail = (item) => { |
| 138 | name: 'productSpaceDetail', | 177 | name: 'productSpaceDetail', |
| 139 | query: { | 178 | query: { |
| 140 | guid: item.guid, | 179 | guid: item.guid, |
| 141 | name: item.name | 180 | name: item.spaceName |
| 181 | } | ||
| 182 | }) | ||
| 183 | } | ||
| 184 | |||
| 185 | const clickEdit = (item) => { | ||
| 186 | router.push({ | ||
| 187 | name: 'productSpaceEdit', | ||
| 188 | query: { | ||
| 189 | guid: item.guid, | ||
| 190 | name: item.spaceName | ||
| 142 | } | 191 | } |
| 143 | }) | 192 | }) |
| 144 | } | 193 | } |
| 145 | 194 | ||
| 146 | const clickDelete = (item) => { | 195 | const clickDelete = (item) => { |
| 147 | proxy.$openMessageBox('此操作将永久删除该空间,是否继续?', () => { | 196 | proxy.$openMessageBox('此操作将永久删除该逻辑空间,是否继续?', () => { |
| 148 | // TODO | 197 | deleteLogicSpace([item.guid]).then((res: any) => { |
| 198 | if (res?.code == proxy.$passCode) { | ||
| 199 | proxy.$ElMessage.success('删除成功'); | ||
| 200 | pageInfo.value.curr = 1; | ||
| 201 | getTableData(); | ||
| 202 | } else { | ||
| 203 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 204 | } | ||
| 205 | }) | ||
| 149 | }, () => { | 206 | }, () => { |
| 150 | proxy.$ElMessage.info('已取消删除'); | 207 | proxy.$ElMessage.info('已取消删除'); |
| 151 | }); | 208 | }); |
| 152 | } | 209 | } |
| 153 | 210 | ||
| 211 | onActivated(() => { | ||
| 212 | if (productSpaceStore.isRefresh) { | ||
| 213 | pageInfo.value.keyWord = ''; | ||
| 214 | pageInfo.value.curr = 1; | ||
| 215 | getTableData(); | ||
| 216 | productSpaceStore.setIsRefresh(false); | ||
| 217 | } | ||
| 218 | }) | ||
| 219 | |||
| 220 | onBeforeMount(() => { | ||
| 221 | pageInfo.value.keyWord = ''; | ||
| 222 | pageInfo.value.curr = 1; | ||
| 223 | getTableData(); | ||
| 224 | }) | ||
| 225 | |||
| 154 | </script> | 226 | </script> |
| 155 | 227 | ||
| 156 | <style lang="scss" scoped> | 228 | <style lang="scss" scoped> | ... | ... |
-
Please register or sign in to post a comment