d65fd3dc by lihua

数据使用

1 parent d6fe651c
...@@ -38,4 +38,11 @@ export const getDataUsePageList = (params) => request({ ...@@ -38,4 +38,11 @@ export const getDataUsePageList = (params) => request({
38 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/page-list`, 38 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/page-list`,
39 method: 'post', 39 method: 'post',
40 data: params 40 data: params
41 })
...\ No newline at end of file ...\ No newline at end of file
41 })
42
43 /** 删除数据使用 */
44 export const deleteDataUse = (params) => request({
45 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/delete`,
46 method: 'delete',
47 data: params
48 });
......
...@@ -179,8 +179,8 @@ onMounted(() => { ...@@ -179,8 +179,8 @@ onMounted(() => {
179 179
180 </template> 180 </template>
181 <template v-else-if="item.type == 'date-time'"> 181 <template v-else-if="item.type == 'date-time'">
182 <el-date-picker v-model="formInline[item.field]" type="datetimerange" start-placeholder="开始时间" 182 <el-date-picker v-model="formInline[item.field]" type="datetimerange" :start-placeholder="item.startPlaceholder ?? '开始时间'"
183 end-placeholder="结束时间" /> 183 :default-time="item.defaultTime ?? [item.defaultStartTime, item.defaultEndTime]" :end-placeholder="item.endPlaceholder ?? '结束时间'" />
184 </template> 184 </template>
185 <template v-else-if="item.type == 'date-range'"> 185 <template v-else-if="item.type == 'date-range'">
186 <el-date-picker v-model="formInline[item.field]" type="daterange" :start-placeholder="item.startPlaceholder ?? '开始日期'" format="YYYY-MM-DD" value-format="YYYY-MM-DD" 186 <el-date-picker v-model="formInline[item.field]" type="daterange" :start-placeholder="item.startPlaceholder ?? '开始日期'" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
......
...@@ -69,7 +69,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -69,7 +69,7 @@ const routes: RouteRecordRaw[] = [
69 name: 'apiDetail', 69 name: 'apiDetail',
70 component: () => import('@/views/data_asset/detail_serviceApi.vue'), 70 component: () => import('@/views/data_asset/detail_serviceApi.vue'),
71 meta: { 71 meta: {
72 title: '流程详情', 72 title: '详情-',
73 sidebar: false, 73 sidebar: false,
74 breadcrumb: false, 74 breadcrumb: false,
75 cache: true, 75 cache: true,
......
...@@ -62,6 +62,42 @@ const routes: RouteRecordRaw[] = [ ...@@ -62,6 +62,42 @@ const routes: RouteRecordRaw[] = [
62 return; 62 return;
63 } 63 }
64 } 64 }
65 },
66 {
67 path: 'usage-register-catalog-detail',
68 name: 'usageCatalogDetail',
69 component: () => import('@/views/data_asset/registerCatalogDetail.vue'),
70 meta: {
71 title: '详情-',
72 sidebar: false,
73 breadcrumb: false,
74 cache: true,
75 reuse: true
76 }
77 },
78 {
79 path: 'usage-api-detail',
80 name: 'usageApiDetail',
81 component: () => import('@/views/data_asset/detail_serviceApi.vue'),
82 meta: {
83 title: '详情-',
84 sidebar: false,
85 breadcrumb: false,
86 cache: true,
87 reuse: true
88 }
89 },
90 {
91 path: 'data-usage-log',
92 name: 'dataUsageLog',
93 component: () => import('@/views/data_asset/dataUsageLog.vue'),
94 meta: {
95 title: '使用日志-',
96 sidebar: false,
97 breadcrumb: false,
98 cache: true,
99 reuse: true
100 }
65 } 101 }
66 ], 102 ],
67 }, 103 },
......
...@@ -234,7 +234,7 @@ const tableInfo = ref({ ...@@ -234,7 +234,7 @@ const tableInfo = ref({
234 } 234 }
235 // 交付只有核验通过有。 235 // 交付只有核验通过有。
236 let verifySatus = row.verifySatus; 236 let verifySatus = row.verifySatus;
237 (verifySatus == 1 || verifySatus == 4) && !row.isRefresh && btns.push({ 237 (deliveryStatus == 3 || verifySatus == 1 || verifySatus == 4) && !row.isRefresh && btns.push({
238 value: 'refresh', label: '刷新', click: (scope) => { 238 value: 'refresh', label: '刷新', click: (scope) => {
239 scope.row.isRefresh = true; 239 scope.row.isRefresh = true;
240 //只刷新当前这一条数据 240 //只刷新当前这一条数据
...@@ -273,7 +273,7 @@ const tableInfo = ref({ ...@@ -273,7 +273,7 @@ const tableInfo = ref({
273 }); 273 });
274 } 274 }
275 //已通过且未交付时,有交付按钮 275 //已通过且未交付时,有交付按钮
276 verifySatus == 3 && deliveryStatus != 2 && btns.push({ 276 verifySatus == 3 && deliveryStatus != 2 && deliveryStatus != 3 && btns.push({
277 value: 'delivery', label: '交付', click: (scope) => { 277 value: 'delivery', label: '交付', click: (scope) => {
278 deliveryContract(scope.row.guid).then((res: any) => { 278 deliveryContract(scope.row.guid).then((res: any) => {
279 if (res?.code == proxy.$passCode) { 279 if (res?.code == proxy.$passCode) {
......
...@@ -3,9 +3,11 @@ import TableTools from "@/components/Tools/table_tools.vue"; ...@@ -3,9 +3,11 @@ import TableTools from "@/components/Tools/table_tools.vue";
3 import { commonPageConfig, TableColumnWidth } from '@/utils/enum'; 3 import { commonPageConfig, TableColumnWidth } from '@/utils/enum';
4 import { 4 import {
5 getDataUsePageList, 5 getDataUsePageList,
6 6 deleteDataUse,
7 } from "@/api/modules/dataDelivery"; 7 } from "@/api/modules/dataDelivery";
8 import { useValidator } from "@/hooks/useValidator";
8 9
10 const { required } = useValidator();
9 const router = useRouter(); 11 const router = useRouter();
10 const route = useRoute(); 12 const route = useRoute();
11 const { proxy } = getCurrentInstance() as any; 13 const { proxy } = getCurrentInstance() as any;
...@@ -40,22 +42,20 @@ const page = ref({ ...@@ -40,22 +42,20 @@ const page = ref({
40 const tableFields = ref([ 42 const tableFields = ref([
41 { label: "序号", type: "index", width: 56, align: "center" }, 43 { label: "序号", type: "index", width: 56, align: "center" },
42 { 44 {
43 label: "数据产品名称", field: "dataProductName", width: 150, type: "text_btn", columClass: 'text_btn', value: "detail", click: (scope) => { 45 label: "数据产品名称", field: "dataProductName", width: 160, type: "text_btn", columClass: 'text_btn', value: "detail", click: (scope) => {
44 //TODO.是在数据使用方使用的
45 router.push({ 46 router.push({
46 path: '/data-asset/register-catalog/register-catalog-detail', 47 name: 'usageCatalogDetail',
47 query: { 48 query: {
48 guid: scope.row.dataProductGuid, 49 guid: scope.row.dataProductGuid,
49 type: 'detail', 50 type: 'detail',
50 dataSources: 2, 51 foundMode: 'use',
51 foundMode: 1,
52 name: scope.row.dataProductName, 52 name: scope.row.dataProductName,
53 } 53 }
54 }); 54 });
55 } 55 }
56 }, 56 },
57 { 57 {
58 label: "合约名称", field: "contractName", width: 160, type: "text_btn", columClass: 'text_btn', value: "detail1", click: (scope) => { 58 label: "合约名称", field: "contractName", width: 170, type: "text_btn", columClass: 'text_btn', value: "detail1", click: (scope) => {
59 //履约中的合约状态 59 //履约中的合约状态
60 router.push({ 60 router.push({
61 name: 'smartContractDetail', 61 name: 'smartContractDetail',
...@@ -73,7 +73,7 @@ const tableFields = ref([ ...@@ -73,7 +73,7 @@ const tableFields = ref([
73 return scope.row.deliveryMethod == 1 ? '文件' : 'API'; 73 return scope.row.deliveryMethod == 1 ? '文件' : 'API';
74 } 74 }
75 }, 75 },
76 { label: "交付方", field: "deliveryPartyName", width: 240 }, 76 { label: "交付方", field: "deliveryPartyName", width: 220 },
77 { label: "交付时间", field: "deliveryTime", width: 170 }, 77 { label: "交付时间", field: "deliveryTime", width: 170 },
78 ]); 78 ]);
79 79
...@@ -92,16 +92,75 @@ const tableInfo = ref({ ...@@ -92,16 +92,75 @@ const tableInfo = ref({
92 actionInfo: { 92 actionInfo: {
93 label: "操作", 93 label: "操作",
94 type: "btn", 94 type: "btn",
95 width: 160, 95 width: 230,
96 btns: (scope) => { 96 btns: (scope) => {
97 let btns: any = []; 97 let actions = scope.row.actions || {};
98 //TODO。根据返回值显示按钮 98 let arrBtns: any = [];
99 btns.push({ label: '日志', value: 'log' }); 99 for (let action in actions) {
100 return btns; 100 arrBtns.push({ label: actions[action], value: action, click: btnHanldesMap[action] });
101 }
102 arrBtns.push({ label: '日志', value: 'log', click: btnHanldesMap['log'] });
103 return arrBtns;
101 } 104 }
102 } 105 }
103 }); 106 });
104 107
108 const btnHanldesMap = {
109 /** 查看产品详情 */
110 read: (scope) => {
111 router.push({
112 name: 'usageCatalogDetail',
113 query: {
114 guid: scope.row.dataProductGuid,
115 type: 'detail',
116 foundMode: 'read',
117 name: scope.row.dataProductName,
118 }
119 });
120 },
121 download: (scope) => { //下载
122 router.push({
123 name: 'usageCatalogDetail',
124 query: {
125 guid: scope.row.dataProductGuid,
126 type: 'detail',
127 foundMode: 'download',
128 name: scope.row.dataProductName,
129 }
130 });
131 },
132 distribute: (scope) => { //分发
133 currTableData.value = scope.row;
134 tenantDialogInfo.value.visible = true;
135 templateFormItems.value[0].options = currTableData.value.deliveryNodes || [];
136 templateFormItems.value[0].default = '';
137 },
138 delete: (scope) => {//删除
139 proxy.$openMessageBox('确定要删除该数据使用吗?', () => {
140 deleteDataUse([scope.row.guid]).then((res: any) => {
141 if (res.code == proxy.$passCode) {
142 page.value.curr = 1;
143 getTableData();
144 proxy.$ElMessage.success("删除成功");
145 } else {
146 proxy.$ElMessage.error(res.msg);
147 }
148 });
149 }, () => {
150 proxy.$ElMessage.info("已取消");
151 })
152 },
153 log: (scope) => { //日志
154 router.push({
155 name: 'dataUsageLog',
156 query: {
157 contractGuid: scope.row.contractGuid,
158 contractName: scope.row.contractName
159 }
160 });
161 }
162 }
163
105 const toSearch = (val: any, clear: boolean = false) => { 164 const toSearch = (val: any, clear: boolean = false) => {
106 if (clear) { 165 if (clear) {
107 searchItemList.value.map((item) => (item.default = "")); 166 searchItemList.value.map((item) => (item.default = ""));
...@@ -149,6 +208,51 @@ onBeforeMount(() => { ...@@ -149,6 +208,51 @@ onBeforeMount(() => {
149 toSearch({}); 208 toSearch({});
150 }); 209 });
151 210
211 const templateFormItems = ref([{
212 type: 'select',
213 label: '分发连接器',
214 field: 'tenantGuids',
215 default: '',
216 block: true,
217 placeholder: '请选择',
218 options: [],
219 props: {
220 value: 'guid',
221 label: 'tenantName'
222 },
223 filterable: true,
224 multiple: true,
225 clearable: true,
226 required: true
227 }]);
228
229 const templateFormRules = ref({
230 tenantGuids: [required('请选择分发连接器')]
231 });
232
233 const tenantDialogInfo = ref({
234 visible: false,
235 size: 480,
236 title: "选择分发连接器",
237 type: 'edit',
238 formInfo: {
239 id: 'copy-form',
240 items: templateFormItems.value,
241 rules: templateFormRules.value
242 },
243 submitBtnLoading: false,
244 btns: {
245 submit: (btn, info) => {
246 tenantDialogInfo.value.submitBtnLoading = true;
247
248 tenantDialogInfo.value.visible = false;
249 },
250 cancel: () => {
251 tenantDialogInfo.value.visible = false;
252 }
253 }
254 });
255
152 </script> 256 </script>
153 257
154 <template> 258 <template>
...@@ -159,6 +263,8 @@ onBeforeMount(() => { ...@@ -159,6 +263,8 @@ onBeforeMount(() => {
159 <div class="table_panel_wrap" style="height: calc(100% - 44px);"> 263 <div class="table_panel_wrap" style="height: calc(100% - 44px);">
160 <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" /> 264 <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" />
161 </div> 265 </div>
266 <!-- 选择分发企业的对话框 -->
267 <Dialog_form :dialogConfigInfo="tenantDialogInfo" />
162 </div> 268 </div>
163 </template> 269 </template>
164 270
......
1 <route lang="yaml">
2 name: dataUsageLog
3 </route>
4
5 <script lang="ts" setup name="dataUsageLog">
6 import TableTools from "@/components/Tools/table_tools.vue";
7 import { commonPageConfig, TableColumnWidth } from "@/utils/enum";
8 import {
9 getContractProcessLog,
10 getContractProcessLogDetail
11 } from "@/api/modules/dataSmartContract";
12 import useUserStore from "@/store/modules/user";
13 const { proxy } = getCurrentInstance() as any;
14 const route = useRoute();
15 const router = useRouter();
16 const fullPath = route.fullPath;
17 const userStore = useUserStore();
18 const userData = JSON.parse(userStore.userData)
19
20 /** 过程记录筛选框 */
21 const processTableSearchItemList = ref([{
22 type: 'date-time',
23 label: '',
24 field: 'operatorTime',
25 default: [],
26 defaultStartTime: new Date(2000, 1, 1, 0, 0, 0),
27 defaultEndTime: new Date(2000, 1, 1, 23, 59, 59),
28 startPlaceholder: '执行开始时间',
29 endPlaceholder: '执行结束时间',
30 clearable: true
31 }, {
32 type: 'select',
33 label: '',
34 field: 'executionProcess',
35 default: '',
36 placeholder: '执行环节',
37 props: {
38 value: 'value',
39 label: 'label'
40 },
41 options: [{
42 value: '策略解析',
43 }, {
44 value: '行为校验',
45 }, {
46 value: '操作执行',
47 }],
48 filterable: true,
49 clearable: true
50 }, {
51 type: "input",
52 label: "",
53 field: "executionEntityName",
54 default: "",
55 placeholder: "执行节点名称",
56 maxlength: 50,
57 clearable: true,
58 },]);
59
60 const currTableData: any = ref({});
61
62 /** ------------------ 过程记录 ----------------------- */
63 const processPage = ref({
64 ...commonPageConfig,
65 executionEntityName: '',
66 operatorTime: [],
67 executionProcess: ''
68 });
69
70 const processTableInfo = ref({
71 id: "process-table",
72 rowKey: 'guid',
73 fields: [
74 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
75 { label: "执行编号", field: "operationId", width: 140 },
76 { label: "执行时间", field: "operationTime", width: 170 },
77 { label: "执行节点名称", field: "executionEntityName", width: 220 },
78 { label: "执行节点标识", field: "executionEntityId", width: 175 },
79 { label: "执行合约名称", field: "contractName", width: 160 },
80 { label: "执行环节", field: "executionProcess", width: 120 },
81 ],
82 data: [],
83 showPage: true,
84 page: {
85 type: "normal",
86 rows: 0,
87 ...processPage.value,
88 },
89 actionInfo: {
90 label: "操作",
91 type: "btn",
92 width: 80,
93 btns: [{
94 value: 'view', label: '查看', click: (scope) => {
95 currTableData.value = scope.row;
96 processDetailDialogInfo.value.visible = true;
97 processDetailDialogInfo.value.contentLoading = true;
98 getContractProcessLogDetail(scope.row.guid).then((res: any) => {
99 processDetailDialogInfo.value.contentLoading = false;
100 if (res?.code == proxy.$passCode) {
101 processDetailInfo.value = res.data || {};
102 execContractTableInfo.value.data = processDetailInfo.value.policys || [];
103 } else {
104 res?.msg && proxy.$ElMessage.error(res?.msg)
105 }
106 })
107 }
108 }]
109 },
110 loading: false
111 });
112
113 const toProcessTableSearch = (val: any, clear: boolean = false) => {
114 if (clear) {
115 processTableSearchItemList.value.map((item) => (item.default = ""));
116 processPage.value.executionEntityName = '';
117 processPage.value.executionProcess = '';
118 processPage.value.operatorTime = [];
119 } else {
120 processPage.value.executionEntityName = val.executionEntityName;
121 processPage.value.executionProcess = val.executionProcess;
122 processPage.value.operatorTime = val.operatorTime;
123 }
124 getProcessTableData();
125 };
126
127 const getProcessTableData = () => {
128 processTableInfo.value.loading = true
129 getContractProcessLog({
130 pageIndex: processPage.value.curr,
131 pageSize: processPage.value.limit,
132 executionEntityName: processPage.value.executionEntityName,
133 executionProcess: processPage.value.executionProcess,
134 operationTimeStart: processPage.value.operatorTime?.[0],
135 operationTimeEnd: processPage.value.operatorTime?.[1],
136 contractGuid: route.query.contractGuid
137 }).then((res: any) => {
138 processTableInfo.value.data = [];
139 if (res?.code == proxy.$passCode) {
140 const data = res.data || {};
141 processTableInfo.value.loading = false
142 processTableInfo.value.data = data.records || []
143 processTableInfo.value.page.limit = data.pageSize
144 processTableInfo.value.page.curr = data.pageIndex
145 processTableInfo.value.page.rows = data.totalRows
146 } else {
147 res?.msg && proxy.$ElMessage.error(res?.msg)
148 processTableInfo.value.loading = false
149 }
150 }).catch(() => {
151 processTableInfo.value.loading = false
152 })
153 }
154
155 const processTablePageChange = (info) => {
156 processPage.value.curr = Number(info.curr);
157 processPage.value.limit = Number(info.limit);
158 processTableInfo.value.page.curr = processPage.value.curr;
159 processTableInfo.value.page.limit = processPage.value.limit;
160 getProcessTableData();
161 };
162
163 onBeforeMount(() => {
164 toProcessTableSearch({});
165 })
166
167 onActivated(() => {
168 if (fullPath === route.fullPath) {
169 document.title = `使用日志-${route.query.contractName}`;
170 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
171 if (tab) {
172 tab.meta.title = `使用日志-${route.query.contractName}`;
173 }
174 }
175 })
176
177
178 /** 过程记录详情对话框 */
179 const processDetailDialogInfo = ref({
180 visible: false,
181 size: 855,
182 direction: "column",
183 header: {
184 title: "查看过程记录",
185 },
186 type: '',
187 contents: [],
188 footer: {
189 show: false
190 },
191 contentLoading: false,
192 });
193
194 /** 查看过程记录详情 */
195 const processDetailInfo: any = ref({});
196
197 const handleProcessDialogBtnClick = (btn) => {
198 if (btn.value == 'cancel') {
199 processDetailDialogInfo.value.visible = false;
200 }
201 }
202
203 const execContractTableInfo = ref({
204 id: "exec-contract-table",
205 height: '214px',
206 fields: <any[]>[
207 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
208 { label: "策略id", field: "strategyId", width: 260 },
209 { label: "操作行为", field: "action", width: 120 },
210 { label: "操作行为英文名称", field: "actionEnName", width: 140 },
211 { label: "约束条件", field: "constraintName", width: 120 },
212 { label: "约束条件英文名称", field: "constraintEnName", width: 140 },
213 { label: "约束条件运算符", field: "constraintOperatorName", width: 140 },
214 { label: "约束条件值", field: "constraintValue", width: 150 },
215 { label: "执行结果", field: "result", width: 130 },
216 // { label: "上报时间", field: "reportingTime", width: 170 },
217 ],
218 data: [],
219 showPage: false,
220 actionInfo: {
221 show: false
222 },
223 loading: false
224 });
225
226 </script>
227
228 <template>
229 <div class="container_wrap">
230 <div class="table_tool_wrap">
231 <TableTools :searchItems="processTableSearchItemList" :init="false" searchId="process-table-search"
232 @search="toProcessTableSearch" />
233 </div>
234 <div class="table_panel_wrap">
235 <Table :tableInfo="processTableInfo" @tablePageChange="processTablePageChange" />
236 </div>
237 <Dialog ref="processDialogRef" :dialogInfo="processDetailDialogInfo" class="log-process-detail"
238 @btnClick="handleProcessDialogBtnClick">
239 <template #extra-content>
240 <div class="main-content" v-loading="processDetailDialogInfo.contentLoading">
241 <div class="list_panel">
242 <div class="list_item">
243 <span class="item_label">执行时间:</span>
244 <span class="item_value">{{ processDetailInfo?.operationTime || '--' }}</span>
245 </div>
246 <div class="list_item">
247 <span class="item_label">执行结果:</span>
248 <span class="item_value"><ellipsis-tooltip :content="processDetailInfo?.executionResult || '--'"
249 class-name="w100f mr8-i" :refName="'tooltipOver' + 'executionResult'"></ellipsis-tooltip></span>
250 </div>
251 <div class="list_item">
252 <span class="item_label">执行环节:</span>
253 <span class="item_value"><ellipsis-tooltip :content="processDetailInfo?.executionProcess || '--'"
254 class-name="w100f mr8-i" :refName="'tooltipOver' + 'executionProcess'"></ellipsis-tooltip></span>
255 </div>
256 <div class="list_item">
257 <span class="item_label">合约名称:</span>
258 <span class="item_value"><ellipsis-tooltip :content="processDetailInfo?.contractName || '--'"
259 class-name="w100f mr8-i" :refName="'tooltipOver' + 'contractName'"></ellipsis-tooltip></span>
260 </div>
261 <div class="list_item">
262 <span class="item_label">执行节点标识:</span>
263 <span class="item_value"><ellipsis-tooltip :content="processDetailInfo?.executionEntityId || '--'"
264 class-name="w100f mr8-i" :refName="'tooltipOver' + 'executionEntityId'"></ellipsis-tooltip></span>
265 </div>
266 <div class="list_item">
267 <span class="item_label">执行节点名称:</span>
268 <span class="item_value"><ellipsis-tooltip :content="processDetailInfo?.executionEntityName || '--'"
269 class-name="w100f mr8-i" :refName="'tooltipOver' + 'executionEntityName'"></ellipsis-tooltip></span>
270 </div>
271 <div class="h-title">策略信息</div>
272 <Table :table-info="execContractTableInfo"></Table>
273 </div>
274 </div>
275 </template>
276 </Dialog>
277 </div>
278 </template>
279
280 <style lang="scss" scoped>
281 .table_panel_wrap {
282 height: calc(100% - 44px);
283 }
284
285 .main-content {
286 margin: 20px;
287 }
288
289 .list_panel {
290 display: flex;
291 flex-wrap: wrap;
292 display: flex;
293 align-items: flex-start;
294
295 &.main {
296 .list_item {
297 width: 25%;
298 }
299 }
300
301 .list_item {
302 width: 50%;
303 line-height: 32px;
304 font-size: 14px;
305 color: var(--el-text-color-regular);
306 display: flex;
307 justify-content: space-between;
308 min-width: 120px;
309
310 .item_label {
311 text-align: left;
312 }
313
314 .item_value {
315 color: var(--el-color-regular);
316 padding: 0 4px 0 0;
317 flex: 1;
318 text-align: justify;
319 min-width: 0;
320
321 .link {
322 color: var(--el-color-primary);
323 cursor: pointer;
324 margin-left: 4px;
325 }
326
327 }
328
329 &.is_block {
330 width: 100%;
331
332 .item_value {
333 white-space: pre-wrap;
334 }
335 }
336
337 }
338 }
339
340 :deep(.policy-table-detail) {
341 .dialog_content {
342 padding: 0px 20px 20px;
343 }
344 }
345
346 .h-title {
347 font-size: 14px;
348 color: #212121;
349 font-weight: 600;
350 margin-right: 8px;
351 margin-bottom: 8px;
352 }
353 </style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -41,6 +41,8 @@ const evaGuid = route.query.evaGuid; ...@@ -41,6 +41,8 @@ const evaGuid = route.query.evaGuid;
41 const costAssessGuid = route.query.costAssessGuid; 41 const costAssessGuid = route.query.costAssessGuid;
42 const certificateGuid = route.query.certificateGuid; 42 const certificateGuid = route.query.certificateGuid;
43 const detailType = ref(route.query.type); 43 const detailType = ref(route.query.type);
44 const dataSources = ref(route.query.dataSources || 2)
45 const foundMode = ref(route.query.foundMode);
44 46
45 const { proxy } = getCurrentInstance() as any; 47 const { proxy } = getCurrentInstance() as any;
46 /** 当前主要类型的详情信息。 */ 48 /** 当前主要类型的详情信息。 */
...@@ -175,7 +177,7 @@ const registerDetailTableInfo = ref({ ...@@ -175,7 +177,7 @@ const registerDetailTableInfo = ref({
175 }); 177 });
176 } else if (row.type == 'trade') { 178 } else if (row.type == 'trade') {
177 router.push({ 179 router.push({
178 path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/register-catalog-transaction-detail' : '/data-asset/register-catalog/register-catalog-transaction-detail', 180 path: dataSources.value == '1' ? '/data-asset/authordata-catalog/register-catalog-transaction-detail' : '/data-asset/register-catalog/register-catalog-transaction-detail',
179 //name: 'transactionManagement' 181 //name: 'transactionManagement'
180 query: { 182 query: {
181 guid: row.guid, 183 guid: row.guid,
...@@ -341,7 +343,24 @@ const productTableInfo = ref({ ...@@ -341,7 +343,24 @@ const productTableInfo = ref({
341 data: [], 343 data: [],
342 showPage: false, 344 showPage: false,
343 actionInfo: { 345 actionInfo: {
344 show: false 346 label: "操作",
347 type: "btn",
348 isMore: false,
349 width: 130,
350 btns: (scope) => {
351 let arrBtns: any = [];
352 //若是使用方,则换一个api地址
353 arrBtns.push({
354 label: '查看', value: 'view', click: (scope) => {
355 router.push({
356 name: (route.query.foundMode == 'read' || route.query.foundMode == 'download') ? 'useApiDetail' : 'apiDetail',
357 query: { guid: scope.row.guid, apiName: scope.row.apiName }
358 });
359 }
360 })
361 // 是否显示下载等。
362 return arrBtns;
363 }
345 }, 364 },
346 loading: false 365 loading: false
347 }); 366 });
...@@ -355,10 +374,10 @@ onBeforeMount(() => { ...@@ -355,10 +374,10 @@ onBeforeMount(() => {
355 onActivated(() => { 374 onActivated(() => {
356 if (detailInfo.value?.damName) { 375 if (detailInfo.value?.damName) {
357 if (fullPath === route.fullPath) { 376 if (fullPath === route.fullPath) {
358 document.title = `详情-${detailInfo.value?.damName}`; 377 document.title = foundMode.value == 'download' ? `下载详情-${detailInfo.value?.damName}` : (foundMode.value == 'read' ? `查看详情-${detailInfo.value?.damName}` : `详情-${detailInfo.value?.damName}`);
359 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); 378 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
360 if (tab) { 379 if (tab) {
361 tab.meta.title = `详情-${detailInfo.value?.damName}`; 380 tab.meta.title = foundMode.value == 'download' ? `下载详情-${detailInfo.value?.damName}` : (foundMode.value == 'read' ? `查看详情-${detailInfo.value?.damName}` : `详情-${detailInfo.value?.damName}`);
362 } 381 }
363 } 382 }
364 } 383 }
...@@ -417,7 +436,7 @@ const handleTableViewData = (scope) => { ...@@ -417,7 +436,7 @@ const handleTableViewData = (scope) => {
417 let row = scope.row; 436 let row = scope.row;
418 router.push({ 437 router.push({
419 // name: 'damTableDataView', 438 // name: 'damTableDataView',
420 path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/damTableDataView' : '/data-asset/register-catalog/damTableDataView', 439 path: dataSources.value == '1' ? '/data-asset/authordata-catalog/damTableDataView' : '/data-asset/register-catalog/damTableDataView',
421 query: { 440 query: {
422 guid: row.guid, 441 guid: row.guid,
423 name: row.tableChName, 442 name: row.tableChName,
...@@ -426,6 +445,11 @@ const handleTableViewData = (scope) => { ...@@ -426,6 +445,11 @@ const handleTableViewData = (scope) => {
426 }); 445 });
427 } 446 }
428 447
448 /** 下载数据 */
449 const handleTableViewDataDown = (scope) => {
450 //TODO
451 }
452
429 const toolBtns: any = computed(() => { 453 const toolBtns: any = computed(() => {
430 let btnsArr: any = [{ 454 let btnsArr: any = [{
431 label: "关闭", value: "cancel", plain: true 455 label: "关闭", value: "cancel", plain: true
...@@ -453,7 +477,7 @@ const btnClick = (btn) => { ...@@ -453,7 +477,7 @@ const btnClick = (btn) => {
453 console.log('detailType', detailType.value); 477 console.log('detailType', detailType.value);
454 if (detailType.value == 'asset') { 478 if (detailType.value == 'asset') {
455 router.push({ 479 router.push({
456 path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog', 480 path: dataSources.value == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog',
457 //name: 'registerCatalogManagement', 481 //name: 'registerCatalogManagement',
458 query: {} 482 query: {}
459 }); 483 });
...@@ -1100,16 +1124,16 @@ const formattedAmount = computed(() => { ...@@ -1100,16 +1124,16 @@ const formattedAmount = computed(() => {
1100 1124
1101 const handleClick = () => { 1125 const handleClick = () => {
1102 // 跳转到 apiDetail 页面 1126 // 跳转到 apiDetail 页面
1103 if (detailInfo.value.foundMode == '2') { 1127 // if (detailInfo.value.foundMode == '2') {
1104 router.push({ 1128 // router.push({
1105 path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/api-detail' : '/data-asset/register-catalog/api-detail', 1129 // path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/api-detail' : '/data-asset/register-catalog/api-detail',
1106 //name: 'apiDetail', 1130 // //name: 'apiDetail',
1107 query: { 1131 // query: {
1108 guid: detailInfo.value.guid, 1132 // guid: detailInfo.value.guid,
1109 type: 'detaile', 1133 // type: 'detaile',
1110 } 1134 // }
1111 }); 1135 // });
1112 } 1136 // }
1113 }; 1137 };
1114 1138
1115 const deliverySpanMethod = ({ 1139 const deliverySpanMethod = ({
...@@ -1229,7 +1253,7 @@ const respParamsTableInfo = ref({ ...@@ -1229,7 +1253,7 @@ const respParamsTableInfo = ref({
1229 <div class="right-main"> 1253 <div class="right-main">
1230 <div class="asset-title"> 1254 <div class="asset-title">
1231 <div style="display: flex;align-items: center;width: 100%"> 1255 <div style="display: flex;align-items: center;width: 100%">
1232 <div @click="handleClick" :class="{ 'foundMode': detailInfo.foundMode == '2', 'title1': true }"><ellipsis-tooltip :content="detailInfo.damName ?? '--'" 1256 <div :class="{ 'title1': true }"><ellipsis-tooltip :content="detailInfo.damName ?? '--'"
1233 class-name="w100f" :refName="'tooltipOver' + 'damName'"></ellipsis-tooltip></div> 1257 class-name="w100f" :refName="'tooltipOver' + 'damName'"></ellipsis-tooltip></div>
1234 <div class="dataLabel">{{ detailInfo.damTypeName }}</div> 1258 <div class="dataLabel">{{ detailInfo.damTypeName }}</div>
1235 <div class="dataLabel" v-show="detailInfo.domainName">{{ detailInfo.domainName }}</div> 1259 <div class="dataLabel" v-show="detailInfo.domainName">{{ detailInfo.domainName }}</div>
...@@ -1448,9 +1472,10 @@ const respParamsTableInfo = ref({ ...@@ -1448,9 +1472,10 @@ const respParamsTableInfo = ref({
1448 <span>{{ scope.row["updateTime"] || '--' }}</span> 1472 <span>{{ scope.row["updateTime"] || '--' }}</span>
1449 </template> 1473 </template>
1450 </el-table-column> 1474 </el-table-column>
1451 <el-table-column label="操作" v-if="!detailInfo?.nodeId" minWidth="120px" align="left" fixed="right" show-overflow-tooltip> 1475 <el-table-column label="操作" v-if="!detailInfo?.nodeId || foundMode == 'download'" minWidth="120px" align="left" fixed="right" show-overflow-tooltip>
1452 <template #default="scope"> 1476 <template #default="scope">
1453 <span class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span> 1477 <span class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span>
1478 <span class="text_btn" @click="handleTableViewDataDown(scope)">下载数据</span>
1454 </template> 1479 </template>
1455 </el-table-column> 1480 </el-table-column>
1456 </el-table> 1481 </el-table>
......
...@@ -196,10 +196,10 @@ const tableInfo = ref({ ...@@ -196,10 +196,10 @@ const tableInfo = ref({
196 btns: (scope) => { 196 btns: (scope) => {
197 const { row } = scope; 197 const { row } = scope;
198 let list: any = []; 198 let list: any = [];
199 list.push({ label: "编辑", disabled: row.apiState == 1, value: "edit", click: apiManageTableBtnMap.EDIT }); 199 list.push({ label: "编辑", disabled: row.apiState == 1 || !!row.nodeId, value: "edit", click: apiManageTableBtnMap.EDIT });
200 list.push({ label: "删除", disabled: row.apiState == 1, value: "del", click: apiManageTableBtnMap.DELETE }); 200 list.push({ label: "删除", disabled: row.apiState == 1 || !!row.nodeId, value: "del", click: apiManageTableBtnMap.DELETE });
201 list.push({ label: "详情", value: "detail", click: apiManageTableBtnMap.DETAIL }); 201 list.push({ label: "详情", value: "detail", click: apiManageTableBtnMap.DETAIL });
202 list.push({ label: "复制", value: "copy", click: apiManageTableBtnMap.COPY }) 202 list.push({ label: "复制", value: "copy", disabled: !!row.nodeId, click: apiManageTableBtnMap.COPY })
203 return list; 203 return list;
204 // const approveVO = row.approveVO || {}; 204 // const approveVO = row.approveVO || {};
205 // if (!approveVO && row.isApprove == 'N') { 205 // if (!approveVO && row.isApprove == 'N') {
......
...@@ -64,8 +64,8 @@ const processTableSearchItemList = ref([{ ...@@ -64,8 +64,8 @@ const processTableSearchItemList = ref([{
64 default: [], 64 default: [],
65 defaultStartTime: new Date(2000, 1, 1, 0, 0, 0), 65 defaultStartTime: new Date(2000, 1, 1, 0, 0, 0),
66 defaultEndTime: new Date(2000, 1, 1, 23, 59, 59), 66 defaultEndTime: new Date(2000, 1, 1, 23, 59, 59),
67 startPlaceholder: '操作开始时间', 67 startPlaceholder: '执行开始时间',
68 endPlaceholder: '操作结束时间', 68 endPlaceholder: '执行结束时间',
69 clearable: true 69 clearable: true
70 }, { 70 }, {
71 type: 'select', 71 type: 'select',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!