50655c6f by lihua

产品上架支持点击查看产品详情

1 parent 9e4d2ddb
...@@ -302,10 +302,10 @@ const routes: RouteRecordRaw[] = [ ...@@ -302,10 +302,10 @@ const routes: RouteRecordRaw[] = [
302 beforeEnter: (to, from) => { 302 beforeEnter: (to, from) => {
303 if(to.query.type){ 303 if(to.query.type){
304 if (to.query.type == 'detail') { 304 if (to.query.type == 'detail') {
305 to.meta.title = `详情-${to.query.name}`; 305 to.meta.title = `上架详情-${to.query.name}`;
306 } else { 306 } else {
307 to.meta.editPage = true; 307 to.meta.editPage = true;
308 to.meta.title = to.query.type=='add'? '新增产品上架': to.query.type=='edit'? `编辑-${to.query.name}`: `详情-${to.query.name}`; 308 to.meta.title = to.query.type=='add'? '新增产品上架': to.query.type=='edit'? `编辑-${to.query.name}`: `上架详情-${to.query.name}`;
309 } 309 }
310 } 310 }
311 } 311 }
......
1 const useDataFacilitatorStore = defineStore(
2 /** 产品上架 */
3 'isRefresh',
4 () => {
5 const isRefresh = ref<boolean>(false)
6 function set(v: boolean) {
7 isRefresh.value = v;
8 }
9
10 return {
11 isRefresh,
12 set,
13 }
14 },
15 )
16
17 export default useDataFacilitatorStore
18
...\ No newline at end of file ...\ No newline at end of file
...@@ -3,20 +3,13 @@ const useDataProductStore = defineStore( ...@@ -3,20 +3,13 @@ const useDataProductStore = defineStore(
3 'isRefresh', 3 'isRefresh',
4 () => { 4 () => {
5 const isRefresh = ref<boolean>(false) 5 const isRefresh = ref<boolean>(false)
6 const isRefreshDamCatalog = ref<boolean>(false)
7 function set(v: boolean) { 6 function set(v: boolean) {
8 isRefresh.value = v; 7 isRefresh.value = v;
9 } 8 }
10
11 function setDamCatalogRefresh(v: boolean) {
12 isRefreshDamCatalog.value = v;
13 }
14 9
15 return { 10 return {
16 isRefreshDamCatalog,
17 isRefresh, 11 isRefresh,
18 set, 12 set,
19 setDamCatalogRefresh,
20 } 13 }
21 }, 14 },
22 ) 15 )
......
...@@ -9,12 +9,12 @@ import { ElMessage, ElMessageBox } from 'element-plus'; ...@@ -9,12 +9,12 @@ import { ElMessage, ElMessageBox } from 'element-plus';
9 import { getParamsList } from "@/api/modules/queryService"; 9 import { getParamsList } from "@/api/modules/queryService";
10 import { getTaskGressList, getTaskRestart, getTaskExecutionLog, getFlowEnterpriseList, enterpriseDelete, enterpriseChangeDelete } from "@/api/modules/dataRequire"; 10 import { getTaskGressList, getTaskRestart, getTaskExecutionLog, getFlowEnterpriseList, enterpriseDelete, enterpriseChangeDelete } from "@/api/modules/dataRequire";
11 import { passFlowData, rejectFlowData, myLastNode } from "@/api/modules/workFlowService"; 11 import { passFlowData, rejectFlowData, myLastNode } from "@/api/modules/workFlowService";
12 import useDataAssetStore from "@/store/modules/dataAsset"; 12 import useDataFacilitatorStore from "@/store/modules/dataFacilitator";
13 import Moment from "moment"; 13 import Moment from "moment";
14 import { TableColumnWidth } from '@/utils/enum'; 14 import { TableColumnWidth } from '@/utils/enum';
15 import DialogApproval from '@/components/ApprovalProcess/dialog_approval.vue'; 15 import DialogApproval from '@/components/ApprovalProcess/dialog_approval.vue';
16 16
17 const assetStore = useDataAssetStore(); 17 const certStore = useDataFacilitatorStore();
18 18
19 const router = useRouter(); 19 const router = useRouter();
20 const { proxy } = getCurrentInstance() as any; 20 const { proxy } = getCurrentInstance() as any;
...@@ -690,10 +690,10 @@ onBeforeMount(() => { ...@@ -690,10 +690,10 @@ onBeforeMount(() => {
690 }); 690 });
691 691
692 onActivated(() => { 692 onActivated(() => {
693 if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 693 if (certStore.isRefresh) {//如果是首次加载,则不需要调用
694 page.value.curr = 1; 694 page.value.curr = 1;
695 getTableData(); 695 getTableData();
696 assetStore.set(false); 696 certStore.set(false);
697 } 697 }
698 }) 698 })
699 699
......
...@@ -8,7 +8,7 @@ import { useRouter, useRoute } from "vue-router"; ...@@ -8,7 +8,7 @@ import { useRouter, useRoute } from "vue-router";
8 import { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
9 import { CircleCloseFilled } from '@element-plus/icons-vue' 9 import { CircleCloseFilled } from '@element-plus/icons-vue'
10 import useUserStore from "@/store/modules/user"; 10 import useUserStore from "@/store/modules/user";
11 import useDataAssetStore from "@/store/modules/dataAsset"; 11 import useDataFacilitatorStore from "@/store/modules/dataFacilitator";
12 import { getEnterpriseDetail, enterpriseApprove } from "@/api/modules/dataRequire"; 12 import { getEnterpriseDetail, enterpriseApprove } from "@/api/modules/dataRequire";
13 import { getAreaData, getParamsList } from "@/api/modules/queryService"; 13 import { getAreaData, getParamsList } from "@/api/modules/queryService";
14 import { getLastChange, passFlowData, rejectFlowData, myLastNode, crossPlatformApprove } from "@/api/modules/workFlowService"; 14 import { getLastChange, passFlowData, rejectFlowData, myLastNode, crossPlatformApprove } from "@/api/modules/workFlowService";
...@@ -21,7 +21,7 @@ const route = useRoute(); ...@@ -21,7 +21,7 @@ const route = useRoute();
21 const userStore = useUserStore(); 21 const userStore = useUserStore();
22 const userData = JSON.parse(localStorage.userData) 22 const userData = JSON.parse(localStorage.userData)
23 const fullPath = route.fullPath; 23 const fullPath = route.fullPath;
24 const assetStore = useDataAssetStore(); 24 const certStore = useDataFacilitatorStore();
25 const guid = route.query.guid; 25 const guid = route.query.guid;
26 const detailType = route.query.type; 26 const detailType = route.query.type;
27 const tName = route.query.tName; 27 const tName = route.query.tName;
...@@ -965,7 +965,7 @@ const tableSpanMethod = ({ row, column, rowIndex, columnIndex }) => { ...@@ -965,7 +965,7 @@ const tableSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
965 965
966 const toPath = () => { 966 const toPath = () => {
967 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 967 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
968 assetStore.set(true); 968 certStore.set(true);
969 router.push({ name: 'certificationAudit' }) 969 router.push({ name: 'certificationAudit' })
970 } 970 }
971 971
......
1 <route lang="yaml">
2 name: productListingCheck
3 </route>
4
5 <script lang="ts" setup name="productListingCheck">
6 import { ref, onMounted } from "vue";
7 import { useRouter, useRoute } from "vue-router";
8 import useUserStore from "@/store/modules/user";
9 import useDataAssetStore from "@/store/modules/dataAsset";
10 import { ElMessage, ElMessageBox } from "element-plus";
11
12 import { getListingList, filterVal, getParamsDataList } from "@/api/modules/dataProduct";
13 import { registerApproveAllow, registerApproveBackup, } from "@/api/modules/dataAsset";
14 import { TableColumnWidth } from '@/utils/enum';
15
16 import TableTools from "@/components/Tools/table_tools.vue";
17 import Table from "@/components/Table/index.vue";
18 import Dialog from "@/components/Dialog/index.vue";
19
20 const { proxy } = getCurrentInstance() as any;
21 const router = useRouter();
22 const userStore = useUserStore();
23 const assetStore = useDataAssetStore();
24 const userData = JSON.parse(userStore.userData);
25 const damTypes = ref([]);
26
27 const searchItemList: any = ref([
28 {
29 type: "input",
30 label: "",
31 field: "damName",
32 default: "",
33 placeholder: "产品名称",
34 clearable: true
35 },
36 {
37 type: "select",
38 label: "",
39 field: "damType",
40 default: "",
41 props: {
42 value: 'paramValue',
43 label: 'paramName'
44 },
45 placeholder: "产品类型",
46 options: damTypes.value,
47 clearable: true,
48 },
49 ]);
50 const page = ref({
51 limit: 50,
52 curr: 1,
53 sizes: [
54 { label: "10", value: 10 },
55 { label: "50", value: 50 },
56 { label: "100", value: 100 },
57 { label: "150", value: 150 },
58 { label: "200", value: 200 },
59 ],
60 });
61 const searchItemValue: any = ref({});
62 const tableInfo = ref({
63 id: "mapping-table",
64 fields: [
65 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
66 { label: "数据产品编号", field: "productCode", width: 160 },
67 { label: "数据证书编号", field: "damCode", width: 160 },
68 { label: "数据产品名称", field: "damName", width: 140 },
69 {
70 label: "产品类型", field: "damTypeName", width: 100
71 },
72 { label: "权利主体", field: "tenantName", width: 200,
73 // getName: (scope) => {
74 // return userData.tenantName;
75 // }
76 },
77 {
78 label: "是否公共数据", field: "isPublicData", width: 120, getName: (scope) => {
79 return scope.row.isPublicData == 'Y' ? '是' : '否';
80 }
81 },
82 {
83 label: "审核状态", field: "approveState", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
84 return filterVal(scope.row.approveState, 'approveState');
85 }
86 },
87 { label: "申请时间", field: "applicationTime", width: TableColumnWidth.DATETIME },
88 { label: "操作时间", field: "updateTime", width: TableColumnWidth.DATETIME },
89 ],
90 loading: false,
91 data: [],
92 page: {
93 type: "normal",
94 rows: 0,
95 ...page.value,
96 },
97 actionInfo: {
98 label: "操作",
99 type: "btn",
100 width: 140,
101 btns: (scope) => {
102 let row = scope.row, btnsArr = [];
103 if (row.approveState == 'A') {
104 if (row.approveTenantGuids?.includes(userData.tenantGuid)) {
105 btnsArr.splice(0, 0, { label: "通过", value: "pass", type: 'primary' }, { label: "驳回", value: "reject", type: 'danger', plain: true });
106 }
107 btnsArr.splice(0, 0, { label: "详情", value: "check" });
108 } else {
109 btnsArr.splice(0, 0, { label: "详情", value: "check" });
110 }
111 return btnsArr;
112 },
113 },
114 });
115
116 const contents = ref({
117 pass: [
118 {
119 type: 'form',
120 title: '',
121 formInfo: {
122 id: 'batch-pass-form',
123 items: [
124 {
125 label: '',
126 type: "textarea",
127 placeholder: "请填写通过备注(选填)",
128 field: "approveSuggest",
129 clearable: true,
130 maxlength: 400,
131 block: true,
132 col: 'margin_b_0',
133 }
134 ]
135 }
136 }
137 ],
138 reject: [
139 {
140 type: 'form',
141 title: '',
142 formInfo: {
143 id: 'batch-reject-form',
144 items: [
145 {
146 label: '',
147 type: "textarea",
148 placeholder: "请填写驳回理由(必填)",
149 field: "approveSuggest",
150 clearable: true,
151 maxlength: 400,
152 block: true,
153 col: 'margin_b_0',
154 }
155 ]
156 }
157 }
158 ],
159 });
160
161 const listingDialogRef = ref();
162 const dialogInfo = ref({
163 visible: false,
164 size: 460,
165 direction: "column",
166 header: {
167 title: "",
168 },
169 type: '',
170 contents: [],
171 footer: {
172 btns: [
173 { type: "default", label: "取消", value: "cancel" },
174 { type: "primary", label: "确定", value: "submit" },
175 ],
176 },
177 });
178
179 const getTableData = () => {
180 tableInfo.value.loading = true;
181 getListingList(
182 Object.assign({}, searchItemValue.value, {
183 isGrounding: 1,
184 pageIndex: page.value.curr,
185 pageSize: page.value.limit,
186 currentStaffGuid: userData.staffGuid
187 })
188 )
189 .then((res: any) => {
190 tableInfo.value.loading = false;
191 tableInfo.value.data = res.data.records || [];
192 tableInfo.value.page.curr = res.data.pageIndex;
193 tableInfo.value.page.limit = res.data.pageSize;
194 tableInfo.value.page.rows = res.data.totalRows;
195 })
196 .catch((res) => {
197 tableInfo.value.loading = false;
198 });
199 };
200
201 /** 搜索同步任务列表 */
202 const toSearch = (val: any, clear: boolean = false) => {
203 if (clear) {
204 searchItemList.value.map((item) => (item.default = ""));
205 searchItemValue.value = {};
206 } else {
207 searchItemValue.value = Object.keys(val).length ? { ...val } : {};
208 }
209 page.value.curr = 1;
210 tableInfo.value.page.curr = 1;
211 getTableData();
212 };
213
214 const currTableData: any = ref({});
215 const tableBtnClick = (scope, btn) => {
216 const type = btn.value;
217 const row = scope.row;
218 currTableData.value = row;
219 if (type == "check") {
220 toPatn(type);
221 } else {
222 dialogInfo.value.type = type
223 dialogInfo.value.header.title = type == 'pass' ? '通过' : '驳回'
224 dialogInfo.value.contents = contents.value[type]
225 dialogInfo.value.visible = true
226 }
227 };
228
229 const toPatn = (type) => {
230 router.push({
231 name: "productListingCheckDetail",
232 query: {
233 guid: currTableData.value.guid,
234 name: currTableData.value.damName,
235 type
236 },
237 });
238 }
239
240 const tablePageChange = (info) => {
241 page.value.curr = Number(info.curr);
242 page.value.limit = Number(info.limit);
243 tableInfo.value.page.limit = page.value.limit;
244 tableInfo.value.page.curr = page.value.curr;
245 getTableData();
246 };
247
248 const getFirstPageData = () => {
249 page.value.curr = 1
250 getTableData();
251 }
252
253 const dialogBtnClick = (btn, info) => {
254 if (btn.value == 'submit') {
255 let params = { ...info }
256 params.bizGuid = currTableData.value.guid
257 params.funcCode = currTableData.value.funcCode
258 if (dialogInfo.value.type == 'pass') {
259 dialogInfo.value.visible = false;
260 registerApproveAllow(params).then((res: any) => {
261 if (res.code == proxy.$passCode) {
262 getFirstPageData();
263 ElMessage({
264 type: 'success',
265 message: '审批成功'
266 })
267 } else {
268 ElMessage({
269 type: 'error',
270 message: res.msg,
271 })
272 }
273 }).catch(() => {
274 })
275 } else if (dialogInfo.value.type == 'reject') {
276 if (info.approveSuggest == '') {
277 ElMessage.error('请填写驳回原因')
278 return
279 }
280 dialogInfo.value.visible = false;
281 registerApproveBackup(params).then((res: any) => {
282 if (res.code == proxy.$passCode) {
283 getFirstPageData();
284 ElMessage({
285 type: 'success',
286 message: '驳回成功'
287 })
288 } else {
289 ElMessage({
290 type: 'error',
291 message: res.msg,
292 })
293 }
294 }).catch(() => {
295
296 })
297 }
298 } else if (btn.value == 'cancel') {
299 nextTick(() => {
300 dialogInfo.value.visible = false;
301 })
302 }
303 };
304
305 onActivated(() => {
306 if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
307 getFirstPageData();
308 assetStore.set(false);
309 }
310 })
311
312 onBeforeMount(() => {
313 getParamsDataList({ paramCode: 'DAM-TYPE' }).then((res: any) => {
314 if (res.code == proxy.$passCode) {
315 damTypes.value = res.data || [];
316 let item = searchItemList.value.find(item => item.field == 'damType');
317 item && (item.options = damTypes.value);
318 } else {
319 proxy.$ElMessage.error(res.msg);
320 }
321 })
322 })
323
324 </script>
325
326 <template>
327 <div class="container_wrap">
328 <div class="table_tool_wrap">
329 <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" />
330 </div>
331 <div class="table_panel_wrap">
332 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
333 </div>
334 <!-- 审核对话框 -->
335 <Dialog ref="listingDialogRef" :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" />
336 </div>
337 </template>
338
339 <style scoped lang="scss">
340 .table_tool_wrap {
341 width: 100%;
342 height: auto;
343 padding: 0 8px;
344 min-height: 44px;
345
346 .tools_btns {
347 padding: 0px 0 0;
348 }
349 }
350
351 .table_panel_wrap {
352 width: 100%;
353 height: calc(100% - 44px);
354 padding: 0px 8px 0;
355 }
356 </style>
...@@ -1317,10 +1317,10 @@ onActivated(() => { ...@@ -1317,10 +1317,10 @@ onActivated(() => {
1317 tab.meta.title = `编辑-${damName}`; 1317 tab.meta.title = `编辑-${damName}`;
1318 break; 1318 break;
1319 case 'check': 1319 case 'check':
1320 tab.meta.title = `详情-${damName}`; 1320 tab.meta.title = `上架详情-${damName}`;
1321 break; 1321 break;
1322 case 'detail': 1322 case 'detail':
1323 tab.meta.title = `详情-${damName}`; 1323 tab.meta.title = `上架详情-${damName}`;
1324 break; 1324 break;
1325 } 1325 }
1326 }; 1326 };
...@@ -1878,6 +1878,13 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -1878,6 +1878,13 @@ const rejectDialogBtnClick = (btn, info) => {
1878 } 1878 }
1879 }; 1879 };
1880 1880
1881 const viewProductDetail = () => {
1882 router.push({
1883 path: '/data-asset/register-catalog/register-catalog-detail',
1884 query: { guid: flowDetail.value.damGuid, type: "asset", dataSources: 2, foundMode: flowDetail.value.foundMode, name: flowDetail.value.damName },
1885 });
1886 }
1887
1881 </script> 1888 </script>
1882 1889
1883 <template> 1890 <template>
...@@ -1919,7 +1926,7 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -1919,7 +1926,7 @@ const rejectDialogBtnClick = (btn, info) => {
1919 <div class="list_panel" v-else> 1926 <div class="list_panel" v-else>
1920 <div class="list_item"> 1927 <div class="list_item">
1921 <span class="item_label">数据产品名称:</span> 1928 <span class="item_label">数据产品名称:</span>
1922 <span class="item_value">{{ flowDetail.damName || '--' }}</span> 1929 <span class="item_value link" @click="viewProductDetail">{{ flowDetail.damName || '--' }}</span>
1923 </div> 1930 </div>
1924 <div class="list_item"> 1931 <div class="list_item">
1925 <span class="item_label">资产类型:</span> 1932 <span class="item_label">资产类型:</span>
...@@ -2272,6 +2279,11 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -2272,6 +2279,11 @@ const rejectDialogBtnClick = (btn, info) => {
2272 text-align: justify; 2279 text-align: justify;
2273 min-width: 100px; 2280 min-width: 100px;
2274 2281
2282 &.link {
2283 color: var(--el-color-primary);
2284 cursor: pointer;
2285 }
2286
2275 .file-operate { 2287 .file-operate {
2276 display: flex; 2288 display: flex;
2277 align-items: center; 2289 align-items: center;
......
...@@ -63,6 +63,7 @@ const processTableInfo = ref({ ...@@ -63,6 +63,7 @@ const processTableInfo = ref({
63 { label: "业务Guid", field: "bizGuid", width: 262 }, 63 { label: "业务Guid", field: "bizGuid", width: 262 },
64 { label: "业务名称", field: "bizName", width: 220 }, 64 { label: "业务名称", field: "bizName", width: 220 },
65 { label: "节点名称", field: "nodeName", width: 220 }, 65 { label: "节点名称", field: "nodeName", width: 220 },
66 { label: "功能名称", field: "operatingLoc", width: 160 },
66 { label: "操作时间", field: "operatingTime", width: 170 }, 67 { label: "操作时间", field: "operatingTime", width: 170 },
67 { label: "操作类型", field: "operatingType", width: 110, getName: (scope) => { 68 { label: "操作类型", field: "operatingType", width: 110, getName: (scope) => {
68 let typeMap = { 69 let typeMap = {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!