525e8f30 by lihua

修改产品详情策略按钮控制

1 parent adef202e
...@@ -105,12 +105,29 @@ const tableInfo = ref({ ...@@ -105,12 +105,29 @@ const tableInfo = ref({
105 actionInfo: { 105 actionInfo: {
106 label: "操作", 106 label: "操作",
107 type: "btn", 107 type: "btn",
108 width: 230, 108 width: 200,
109 btns: (scope) => { 109 btns: (scope) => {
110 let actions = scope.row.actions || {}; 110 let actions = scope.row.actions || {};
111 let arrBtns: any = []; 111 let arrBtns: any = [];
112 if (scope.row.contractStatus != '06') { 112 if (scope.row.contractStatus != '06') {
113 for (let action in actions) { 113 for (let action in actions) {
114 if (action == 'download') {
115 let index = arrBtns.findIndex(a => a.value == 'read');
116 if (index > -1) {
117 arrBtns[index] = { label: '查看', value: 'readAndDown', click: btnHanldesMap[action] };
118 continue;
119 }
120 }
121 if (action == 'read') {
122 let index = arrBtns.findIndex(a => a.value == 'download');
123 if (index > -1) {
124 arrBtns[index] = { label: '查看', value: 'readAndDown', click: btnHanldesMap[action] };
125 continue;
126 }
127 }
128 if (action == 'distribute' && scope.row.isDistribute == 'Y') {
129 continue
130 }
114 arrBtns.push({ label: actions[action], value: action, click: btnHanldesMap[action] }); 131 arrBtns.push({ label: actions[action], value: action, click: btnHanldesMap[action] });
115 } 132 }
116 } 133 }
...@@ -146,6 +163,18 @@ const btnHanldesMap = { ...@@ -146,6 +163,18 @@ const btnHanldesMap = {
146 } 163 }
147 }); 164 });
148 }, 165 },
166 readAndDown: (scope) => { //下载
167 router.push({
168 name: 'usageCatalogDetail',
169 query: {
170 guid: scope.row.dataProductGuid,
171 type: 'detail',
172 foundMode: 'readAndDown',
173 name: scope.row.dataProductName,
174 useGuid: scope.row.guid
175 }
176 });
177 },
149 distribute: (scope) => { //分发 178 distribute: (scope) => { //分发
150 currTableData.value = scope.row; 179 currTableData.value = scope.row;
151 tenantDialogInfo.value.visible = true; 180 tenantDialogInfo.value.visible = true;
......
...@@ -33,6 +33,7 @@ import { ...@@ -33,6 +33,7 @@ import {
33 downloadTableData, 33 downloadTableData,
34 downloadTableDataCheck 34 downloadTableDataCheck
35 } from "@/api/modules/dataDelivery"; 35 } from "@/api/modules/dataDelivery";
36 import StrategyTable from '../data_smart_contract/components/strategyTable.vue';
36 37
37 const router = useRouter(); 38 const router = useRouter();
38 const route = useRoute(); 39 const route = useRoute();
...@@ -370,18 +371,24 @@ const productTableInfo = ref({ ...@@ -370,18 +371,24 @@ const productTableInfo = ref({
370 loading: false 371 loading: false
371 }); 372 });
372 373
374 /** ----- 服务信息 ----- */
375 const strategyDetail = ref([]);
376
377 const strategyContentLoading = ref(false);
378
373 onBeforeMount(() => { 379 onBeforeMount(() => {
374 if (!assetStore.isRefreshDamCatalog) { 380 if (!assetStore.isRefreshDamCatalog) {
375 getDetailInfo(); 381 getDetailInfo();
376 } 382 }
383
377 }); 384 });
378 385
379 onActivated(() => { 386 onActivated(() => {
380 if (fullPath === route.fullPath) { 387 if (fullPath === route.fullPath) {
381 document.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : (foundMode.value == 'read' ? `查看详情-${route.query.name}` : `详情-${route.query.name}`); 388 document.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : ((foundMode.value == 'read' || foundMode.value == 'readAndDown') ? `查看详情-${route.query.name}` : `详情-${route.query.name}`);
382 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); 389 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
383 if (tab) { 390 if (tab) {
384 tab.meta.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : (foundMode.value == 'read' ? `查看详情-${route.query.name}` : `详情-${route.query.name}`); 391 tab.meta.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : ((foundMode.value == 'read' || foundMode.value == 'readAndDown') ? `查看详情-${route.query.name}` : `详情-${route.query.name}`);
385 } 392 }
386 } 393 }
387 if (assetStore.isRefreshDamCatalog) { 394 if (assetStore.isRefreshDamCatalog) {
...@@ -1494,15 +1501,24 @@ const respParamsTableInfo = ref({ ...@@ -1494,15 +1501,24 @@ const respParamsTableInfo = ref({
1494 <span>{{ scope.row["updateTime"] || '--' }}</span> 1501 <span>{{ scope.row["updateTime"] || '--' }}</span>
1495 </template> 1502 </template>
1496 </el-table-column> 1503 </el-table-column>
1497 <el-table-column label="操作" v-if="!detailInfo?.nodeId || foundMode == 'download' || foundMode == 'read'" minWidth="120px" align="left" fixed="right" show-overflow-tooltip> 1504 <el-table-column label="操作" v-if="!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read' || foundMode == 'readAndDown'"
1505 width="220px" align="left" fixed="right" show-overflow-tooltip>
1498 <template #default="scope"> 1506 <template #default="scope">
1499 <span class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span> 1507 <!-- 如果是下载,就只显示下载,如果是查看和下载就都显示,就两个按钮都显示。仅查看,就仅查看 -->
1500 <el-divider v-show="foundMode == 'download'" direction="vertical" /> 1508 <span v-show="foundMode != 'download'" class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span>
1501 <span v-show="foundMode == 'download'" class="text_btn" @click="handleTableViewDataDown(scope)">下载数据</span> 1509 <el-divider v-show="foundMode == 'readAndDown'" direction="vertical" />
1510 <span v-show="foundMode == 'download' || foundMode == 'readAndDown'" class="text_btn"
1511 @click="handleTableViewDataDown(scope)">下载数据</span>
1502 </template> 1512 </template>
1503 </el-table-column> 1513 </el-table-column>
1504 </el-table> 1514 </el-table>
1505 </ContentWrap> 1515 </ContentWrap>
1516 <ContentWrap v-if="strategyDetail?.length" id="strategy-info" title="合约策略信息" style="margin: 16px 16px 16px">
1517 <div v-loading="strategyContentLoading">
1518 <StrategyTable ref="strategyTableDetailRef" :show-title="true" :is-look="true" :value="strategyDetail">
1519 </StrategyTable>
1520 </div>
1521 </ContentWrap>
1506 <ContentWrap 1522 <ContentWrap
1507 v-if="(route.query.type == 'qualityEvaluate' && evaDetailInfo?.qualityEvaluationFile?.length > 0) || (route.query.type == 'costAssess' && costAssessDetail?.costAssessmentFile?.length > 0)" 1523 v-if="(route.query.type == 'qualityEvaluate' && evaDetailInfo?.qualityEvaluationFile?.length > 0) || (route.query.type == 'costAssess' && costAssessDetail?.costAssessmentFile?.length > 0)"
1508 id="id-assetContent" title="附件信息" description="" style="margin: 16px 16px 16px"> 1524 id="id-assetContent" title="附件信息" description="" style="margin: 16px 16px 16px">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!