6a8718db by xukangle

fix:数据产品

1 parent a934022e
...@@ -19,6 +19,7 @@ import { getParamsList } from "@/api/modules/dataAsset"; ...@@ -19,6 +19,7 @@ import { getParamsList } from "@/api/modules/dataAsset";
19 import { 19 import {
20 changeNum, 20 changeNum,
21 } from "@/utils/common"; 21 } from "@/utils/common";
22 import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService";
22 23
23 const { proxy } = getCurrentInstance() as any; 24 const { proxy } = getCurrentInstance() as any;
24 const router = useRouter(); 25 const router = useRouter();
...@@ -98,27 +99,64 @@ const tableInfo = ref({ ...@@ -98,27 +99,64 @@ const tableInfo = ref({
98 actionInfo: { 99 actionInfo: {
99 label: "操作", 100 label: "操作",
100 type: "btn", 101 type: "btn",
101 width: 140, 102 width: 170,
102 btns: (scope) => { 103 btns: (scope) => {
103 let row = scope.row, btnArr: any = []; 104 const { row } = scope;
104 if (row.approveState == 'Y') { 105 const approveVO = row.approveVO || {};
105 if (row.listingStatus == 'Y') { 106 const currentStaffGuid = userData.staffGuid
106 btnArr.splice(0, 0, { label: "详情", value: "detail" }); 107 const bizApproveState = row.bizApproveState;
107 } else { 108 const approveState = approveVO.approveState || null;
108 btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" }); 109 const approveStaffGuids = approveVO.approveStaffGuids || [];
110 const staffGuid = approveVO.staffGuid || '';
111 let isShowCancel = false;
112 let flowState;
113 let list: any = [];
114 if (approveState == 'N') {
115 flowState = 1;
109 } 116 }
110 } else { 117 if (approveState == 'A' && approveStaffGuids.indexOf(currentStaffGuid) > -1) {
111 if (row.approveState == 'A') { 118 flowState = 2;
112 btnArr.splice(0, 0, { label: "详情", value: "detail" });
113 } else {
114 btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
115 } 119 }
120 if ((approveState == 'C' || approveState == 'R') && staffGuid == currentStaffGuid) {
121 flowState = 3;
116 } 122 }
117 return btnArr; 123 if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
118 }, 124 isShowCancel = true;
125 }
126 if (flowState === 1) {
127 list = [{ label: "编辑", value: "edit" }, { label: "删除", value: "del" }]
128 }
129 if (flowState === 2) {
130 list = [{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }]
131 }
132 if (flowState === 3) {
133 list.push({ label: "删除", value: "del" })
134 }
135 if (flowState === 3 && bizApproveState != 'D') {
136 list.push({ label: "重新提交", value: "redit" }) //已驳回
137 }
138 if (isShowCancel) {
139 list.push({ label: "撤销", value: "revoke" })
140 }
141 if (flowState !== 1) {
142 list.push({ label: "详情", value: "detail" })
143 }
144 if (approveState === 'Y') {
145 if (row.listingStatus === 'Y') {
146 list.push({ label: "下架", value: "down" });
147 }
148 if (row.listingStatus === 'N') {
149 list.push({ label: "上架", value: "up" });
150 }
151 }
152 return list
119 }, 153 },
154 }
120 }); 155 });
121 156
157
158
159
122 const getTableData = () => { 160 const getTableData = () => {
123 tableInfo.value.loading = true; 161 tableInfo.value.loading = true;
124 getListingList( 162 getListingList(
...@@ -210,17 +248,142 @@ const tableSwitchChange = (val, scope, field) => { ...@@ -210,17 +248,142 @@ const tableSwitchChange = (val, scope, field) => {
210 }) 248 })
211 }) 249 })
212 } 250 }
213 251 const approveSuggest = ref();
252 const dialogTitle = ref('通过流程');
253 const dialogVisible = ref(false);
254 //弹窗类型
255 const approveType = ref();
214 const tableBtnClick = (scope, btn) => { 256 const tableBtnClick = (scope, btn) => {
215 const type = btn.value; 257 const type = btn.value;
216 const row = scope.row; 258 const row = scope.row;
217 currTableData.value = row; 259 currTableData.value = row;
218 if (type == "detail" || type === "edit") { 260 if (type == "detail") {
219 toPatn(type); 261 router.push({
220 } else if (type === "delete") { 262 name: 'dataResourceUpDetail',
221 open("此操作将永久删除,是否继续?", "warning"); 263 query: {
264 guid: row.guid,
222 } 265 }
223 }; 266 });
267 }
268 if (type == "edit" || type == "redit") {
269 router.push({
270 name: 'dataResourceUpEdit',
271 query: {
272 guid: row.guid,
273 }
274 });
275 }
276 if (type == 'del') {
277 ElMessageBox.confirm(`数据删除后不可恢复,确定是否删除?`, "提示", {
278 confirmButtonText: "确定",
279 cancelButtonText: "取消",
280 type: 'warning',
281 }).then(() => {
282 listingDelete([row.guid]).then((res: any) => {
283 if (res.code == '00000') {
284 ElMessage.success('删除成功')
285 getTableData();
286 } else {
287 ElMessage.error(res.msg)
288 }
289 })
290 });
291 }
292 //撤销
293 if (type == 'revoke') {
294 ElMessageBox.confirm(`撤销后,该流程将不再进行审核,确定这样操作吗?`, "提示", {
295 confirmButtonText: "确定",
296 cancelButtonText: "取消",
297 type: 'warning',
298 }).then(() => {
299 revokeFlowData({
300 guid: row.approveVO.approveGuid,
301 flowType: row.approveVO.flowType,
302 approveStaffGuid: userData.staffGuid,
303
304 }).then((res: any) => {
305 if (res.code == '00000') {
306 ElMessage.success('撤销成功!')
307 getTableData();
308 } else {
309 ElMessage.error(res.msg)
310 }
311 })
312 });
313
314 }
315 if (type == 'pass') {
316 approveSuggest.value = '';
317 approveType.value = 'pass';
318 dialogTitle.value = '通过流程'
319 dialogVisible.value = true;
320 }
321 if (type == 'reject') {
322 approveSuggest.value = '';
323 approveType.value = 'reject';
324 dialogTitle.value = '驳回流程'
325 dialogVisible.value = true;
326 }
327 if (type == 'up') {
328 tableSwitchChange('Y', scope, 'listingStatus')
329 }
330 if (type == 'down') {
331 tableSwitchChange('N', scope, 'listingStatus')
332 }
333 }
334
335 const fullscreenLoading = ref(false);
336 const passSubmit = () => {
337 let row = currTableData.value
338 console.log(row)
339 dialogVisible.value = false;
340 fullscreenLoading.value = true;
341 passFlowData({
342 guid: row.approveVO.approveGuid,
343 flowType: row.approveVO.flowType,
344 approveSuggest: approveSuggest.value,
345 approveStaffGuid: userData.staffGuid,
346 }).then((res: any) => {
347 fullscreenLoading.value = false;
348 if (res.code == '00000') {
349 ElMessage.success('审批通过!')
350 getTableData();
351 } else {
352 ElMessage.error(res.msg)
353 }
354 })
355
356 }
357 const rejectSubmit = () => {
358 if (!approveSuggest.value) return ElMessage.error('请填写驳回理由!')
359 let row = currTableData.value
360 dialogVisible.value = false;
361 fullscreenLoading.value = true;
362 rejectFlowData({
363 guid: row.approveVO.approveGuid,
364 flowType: row.approveVO.flowType,
365 approveSuggest: approveSuggest.value,
366 approveStaffGuid: userData.staffGuid,
367 }).then((res: any) => {
368 if (res.code == '00000') {
369 fullscreenLoading.value = false;
370 ElMessage.success('驳回成功!')
371 getTableData();
372 } else {
373 ElMessage.error(res.msg)
374 }
375 })
376 }
377 // const tableBtnClick = (scope, btn) => {
378 // const type = btn.value;
379 // const row = scope.row;
380 // currTableData.value = row;
381 // if (type == "detail" || type === "edit") {
382 // toPatn(type);
383 // } else if (type === "delete") {
384 // open("此操作将永久删除,是否继续?", "warning");
385 // }
386 // };
224 387
225 const toPatn = (type) => { 388 const toPatn = (type) => {
226 if (type == 'add') { 389 if (type == 'add') {
...@@ -375,6 +538,17 @@ const btnClick = (btn) => { ...@@ -375,6 +538,17 @@ const btnClick = (btn) => {
375 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" 538 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange"
376 @tableSwitchBeforeChange="tableSwitchBeforeChange" /> 539 @tableSwitchBeforeChange="tableSwitchBeforeChange" />
377 </div> 540 </div>
541 <el-dialog v-model="dialogVisible" :title="dialogTitle" width="40%">
542 <el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none">
543 </el-input>
544 <template #footer>
545 <div class="dialog-footer">
546 <el-button @click="dialogVisible = false">取消</el-button>
547 <el-button v-if="approveType == 'pass'" type="primary" @click="passSubmit">通过</el-button>
548 <el-button v-if="approveType == 'reject'" type="primary" @click="rejectSubmit">驳回</el-button>
549 </div>
550 </template>
551 </el-dialog>
378 </div> 552 </div>
379 </template> 553 </template>
380 554
......
...@@ -804,10 +804,12 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -804,10 +804,12 @@ const submitForm = (btn, formEl, tosub = false) => {
804 params.timeAreaStart = params.dateRange ? params.dateRange[0] : ''; 804 params.timeAreaStart = params.dateRange ? params.dateRange[0] : '';
805 params.timeAreaEnd = params.dateRange ? params.dateRange[1] : ''; 805 params.timeAreaEnd = params.dateRange ? params.dateRange[1] : '';
806 params.groundingPick = [route.query.groundingPick]; 806 params.groundingPick = [route.query.groundingPick];
807
807 // 删除dateRange字段 808 // 删除dateRange字段
808 delete params.dateRange; 809 delete params.dateRange;
809 flowDetailLoading.value = true; 810 flowDetailLoading.value = true;
810 if (detailType == 'add') { 811 if (detailType == 'add') {
812 params.immediateApprove = btn.value == 'submit' ? true : false;
811 listingSavePortal(params).then((res: any) => { 813 listingSavePortal(params).then((res: any) => {
812 if (res.code == proxy.$passCode) { 814 if (res.code == proxy.$passCode) {
813 ElMessage({ 815 ElMessage({
...@@ -880,7 +882,7 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -880,7 +882,7 @@ const submitForm = (btn, formEl, tosub = false) => {
880 }; 882 };
881 883
882 const btnClick = (btn) => { 884 const btnClick = (btn) => {
883 if (btn.value == 'submit') { 885 if (btn.value == 'submit' || btn.value == 'draft') {
884 const checkForm = listingFormRef.value; 886 const checkForm = listingFormRef.value;
885 const formEl = checkForm.ruleFormRef; 887 const formEl = checkForm.ruleFormRef;
886 const form = checkForm.formInline; 888 const form = checkForm.formInline;
...@@ -1316,18 +1318,35 @@ onBeforeMount(() => { ...@@ -1316,18 +1318,35 @@ onBeforeMount(() => {
1316 <span class="item_value">{{ flowDetail.damName || '--' }}</span> 1318 <span class="item_value">{{ flowDetail.damName || '--' }}</span>
1317 </div> 1319 </div>
1318 <div class="list_item"> 1320 <div class="list_item">
1319 <span class="item_label">产品类型:</span> 1321 <span class="item_label">资产类型:</span>
1320 <span class="item_value">{{ flowDetail.damTypeName || '--' }}</span> 1322 <span class="item_value">{{ flowDetail.damTypeName || '--' }}</span>
1321 </div> 1323 </div>
1322 <div class="list_item"> 1324 <div class="list_item">
1323 <span class="item_label">所属主题:</span> 1325 <span class="item_label">证书编号:</span>
1326 <span class="item_value">{{ flowDetail.damCode || '--' }}</span>
1327 </div>
1328 <div class="list_item">
1329 <span class="item_label">数据时间范围:</span>
1324 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span> 1330 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
1325 </div> 1331 </div>
1326 <div class="list_item"> 1332 <div class="list_item">
1327 <span class="item_label">证书编号:</span> 1333 <span class="item_label">交付方式:</span>
1328 <span class="item_value">{{ flowDetail.damCode || '--' }}</span> 1334 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
1329 </div> 1335 </div>
1330 <div class="list_item"> 1336 <div class="list_item">
1337 <span class="item_label">定价方式:</span>
1338 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
1339 </div>
1340 <div class="list_item">
1341 <span class="item_label">定价金额:</span>
1342 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
1343 </div>
1344 <div class="list_item">
1345 <span class="item_label">所属主题:</span>
1346 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
1347 </div>
1348
1349 <div class="list_item">
1331 <span class="item_label">数据规模(条):</span> 1350 <span class="item_label">数据规模(条):</span>
1332 <span class="item_value">{{ flowDetail.dataScale != null ? changeNum(flowDetail.dataScale, 0) : '--' 1351 <span class="item_value">{{ flowDetail.dataScale != null ? changeNum(flowDetail.dataScale, 0) : '--'
1333 }}</span> 1352 }}</span>
...@@ -1348,7 +1367,7 @@ onBeforeMount(() => { ...@@ -1348,7 +1367,7 @@ onBeforeMount(() => {
1348 }}</span> 1367 }}</span>
1349 </div> 1368 </div>
1350 <div class="list_item"> 1369 <div class="list_item">
1351 <span class="item_label">审核后上架:</span> 1370 <span class="item_label">登记数交所:</span>
1352 <span class="item_value">{{ flowDetail.isApproveGrounding == 'Y' ? `自动上架` : '手动上架' }}</span> 1371 <span class="item_value">{{ flowDetail.isApproveGrounding == 'Y' ? `自动上架` : '手动上架' }}</span>
1353 </div> 1372 </div>
1354 <div class="list_item is_block"> 1373 <div class="list_item is_block">
...@@ -1489,8 +1508,9 @@ onBeforeMount(() => { ...@@ -1489,8 +1508,9 @@ onBeforeMount(() => {
1489 </div> 1508 </div>
1490 <div class="tool_btns" v-if="detailType == 'add' || detailType == 'edit'"> 1509 <div class="tool_btns" v-if="detailType == 'add' || detailType == 'edit'">
1491 <div class="btns"> 1510 <div class="btns">
1492 <el-button @click="btnClick({ value: 'cancel' })">取消</el-button> 1511 <el-button @click="btnClick({ value: 'cancel' })">返回</el-button>
1493 <el-button type="primary" @click="btnClick({ value: 'submit' })">提交</el-button> 1512 <el-button @click="btnClick({ value: 'draft' })">保存草稿</el-button>
1513 <el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button>
1494 </div> 1514 </div>
1495 </div> 1515 </div>
1496 <div class="tool_btns" v-else-if="detailType == 'check'"> 1516 <div class="tool_btns" v-else-if="detailType == 'check'">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!