9df5e5b2 by lihua

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

1 parent 4e620154
...@@ -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();
...@@ -372,18 +373,24 @@ const productTableInfo = ref({ ...@@ -372,18 +373,24 @@ const productTableInfo = ref({
372 loading: false 373 loading: false
373 }); 374 });
374 375
376 /** ----- 服务信息 ----- */
377 const strategyDetail = ref([]);
378
379 const strategyContentLoading = ref(false);
380
375 onBeforeMount(() => { 381 onBeforeMount(() => {
376 if (!assetStore.isRefreshDamCatalog) { 382 if (!assetStore.isRefreshDamCatalog) {
377 getDetailInfo(); 383 getDetailInfo();
378 } 384 }
385
379 }); 386 });
380 387
381 onActivated(() => { 388 onActivated(() => {
382 if (fullPath === route.fullPath) { 389 if (fullPath === route.fullPath) {
383 document.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : (foundMode.value == 'read' ? `查看详情-${route.query.name}` : `详情-${route.query.name}`); 390 document.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : ((foundMode.value == 'read' || foundMode.value == 'readAndDown') ? `查看详情-${route.query.name}` : `详情-${route.query.name}`);
384 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); 391 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
385 if (tab) { 392 if (tab) {
386 tab.meta.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : (foundMode.value == 'read' ? `查看详情-${route.query.name}` : `详情-${route.query.name}`); 393 tab.meta.title = foundMode.value == 'download' ? `下载详情-${route.query.name}` : ((foundMode.value == 'read' || foundMode.value == 'readAndDown') ? `查看详情-${route.query.name}` : `详情-${route.query.name}`);
387 } 394 }
388 } 395 }
389 if (assetStore.isRefreshDamCatalog) { 396 if (assetStore.isRefreshDamCatalog) {
...@@ -1499,17 +1506,24 @@ const respParamsTableInfo = ref({ ...@@ -1499,17 +1506,24 @@ const respParamsTableInfo = ref({
1499 <span>{{ scope.row["updateTime"] || '--' }}</span> 1506 <span>{{ scope.row["updateTime"] || '--' }}</span>
1500 </template> 1507 </template>
1501 </el-table-column> 1508 </el-table-column>
1502 <el-table-column label="操作" v-if="!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read'" 1509 <el-table-column label="操作" v-if="!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read' || foundMode == 'readAndDown'"
1503 width="220px" align="left" fixed="right" show-overflow-tooltip> 1510 width="220px" align="left" fixed="right" show-overflow-tooltip>
1504 <template #default="scope"> 1511 <template #default="scope">
1505 <span class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span> 1512 <!-- 如果是下载,就只显示下载,如果是查看和下载就都显示,就两个按钮都显示。仅查看,就仅查看 -->
1506 <el-divider v-show="foundMode == 'download'" direction="vertical" /> 1513 <span v-show="foundMode != 'download'" class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span>
1507 <span v-show="foundMode == 'download'" class="text_btn" 1514 <el-divider v-show="foundMode == 'readAndDown'" direction="vertical" />
1515 <span v-show="foundMode == 'download' || foundMode == 'readAndDown'" class="text_btn"
1508 @click="handleTableViewDataDown(scope)">下载数据</span> 1516 @click="handleTableViewDataDown(scope)">下载数据</span>
1509 </template> 1517 </template>
1510 </el-table-column> 1518 </el-table-column>
1511 </el-table> 1519 </el-table>
1512 </ContentWrap> 1520 </ContentWrap>
1521 <ContentWrap v-if="strategyDetail?.length" id="strategy-info" title="合约策略信息" style="margin: 16px 16px 16px">
1522 <div v-loading="strategyContentLoading">
1523 <StrategyTable ref="strategyTableDetailRef" :show-title="true" :is-look="true" :value="strategyDetail">
1524 </StrategyTable>
1525 </div>
1526 </ContentWrap>
1513 <ContentWrap 1527 <ContentWrap
1514 v-if="(route.query.type == 'qualityEvaluate' && evaDetailInfo?.qualityEvaluationFile?.length > 0) || (route.query.type == 'costAssess' && costAssessDetail?.costAssessmentFile?.length > 0)" 1528 v-if="(route.query.type == 'qualityEvaluate' && evaDetailInfo?.qualityEvaluationFile?.length > 0) || (route.query.type == 'costAssess' && costAssessDetail?.costAssessmentFile?.length > 0)"
1515 id="id-assetContent" title="附件信息" description="" style="margin: 16px 16px 16px"> 1529 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!