33be468e by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents e98b429c ee58ebe9
...@@ -82,7 +82,7 @@ export const onUploadFilePreview = async (params) => { ...@@ -82,7 +82,7 @@ export const onUploadFilePreview = async (params) => {
82 export const setFileName = (name) => { 82 export const setFileName = (name) => {
83 if(name && name.indexOf('_') > -1){ 83 if(name && name.indexOf('_') > -1){
84 const s = name.indexOf("_"); 84 const s = name.indexOf("_");
85 const e = name.indexOf("."); 85 const e = name.lastIndexOf(".");
86 const newName = name.slice(0, s) + name.slice(e); 86 const newName = name.slice(0, s) + name.slice(e);
87 return newName 87 return newName
88 } else { 88 } else {
......
...@@ -114,7 +114,7 @@ export const getRegisteredList = (type) => request({ ...@@ -114,7 +114,7 @@ export const getRegisteredList = (type) => request({
114 114
115 /** 质量评价审批通过 */ 115 /** 质量评价审批通过 */
116 export const qualityAllow = (params) => request({ 116 export const qualityAllow = (params) => request({
117 url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/allow`, 117 url: `${import.meta.env.VITE_API_NEW_PORTAL}/quality-evaluation/submit-flow`,
118 method: 'post', 118 method: 'post',
119 data: params 119 data: params
120 }); 120 });
......
...@@ -38,13 +38,13 @@ export const getFlowData = (params) => request({ ...@@ -38,13 +38,13 @@ export const getFlowData = (params) => request({
38 method: 'post', 38 method: 'post',
39 data: params 39 data: params
40 }) 40 })
41 export const getCamundaDeploymentId = (flowType) => request({ 41 export const getCamundaDeploymentId = (flowType, tenantGuid = null, staffGuid = null) => request({
42 url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/get-camunda-deployment-id`, 42 url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/get-camunda-deployment-id`,
43 method: 'post', 43 method: 'post',
44 data: { 44 data: {
45 tenantGuid: userData.tenantGuid, 45 tenantGuid: tenantGuid || userData.tenantGuid,
46 flowType:flowType, 46 flowType:flowType,
47 staffGuid: userData.staffGuid, 47 staffGuid: staffGuid || userData.staffGuid,
48 } 48 }
49 }) 49 })
50 50
......
...@@ -982,7 +982,7 @@ const panelChange = (scope, row) => { ...@@ -982,7 +982,7 @@ const panelChange = (scope, row) => {
982 </div> 982 </div>
983 <div v-if="item.example" class="panel_header-expample">{{ item.example }}</div> 983 <div v-if="item.example" class="panel_header-expample">{{ item.example }}</div>
984 <el-input ref="exampleTextareaRef" :id="item.field" 984 <el-input ref="exampleTextareaRef" :id="item.field"
985 :class="[item.col, { is_block: item.block, 'extra-textarea-class': item.type === 'textarea' && !item.label }]" 985 :class="[item.col, { is_block: item.block }]"
986 v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder" 986 v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder"
987 :disabled="item.disabled || readonly" :readonly="item.readonly" resize="none" 987 :disabled="item.disabled || readonly" :readonly="item.readonly" resize="none"
988 :maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)" 988 :maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)"
......
...@@ -86,7 +86,19 @@ const routes: RouteRecordRaw[] = [ ...@@ -86,7 +86,19 @@ const routes: RouteRecordRaw[] = [
86 cache: true, 86 cache: true,
87 reuse: true 87 reuse: true
88 } 88 }
89 },
90 {
91 path: 'register-catalog-detail',
92 name: 'evaCatalogDetail',
93 component: () => import('@/views/data_asset/registerCatalogDetail.vue'),
94 meta: {
95 title: '详情-',
96 sidebar: false,
97 breadcrumb: false,
98 cache: true,
99 reuse: true
89 } 100 }
101 },
90 ], 102 ],
91 }, 103 },
92 { 104 {
......
...@@ -51,14 +51,14 @@ const useUserStore = defineStore( ...@@ -51,14 +51,14 @@ const useUserStore = defineStore(
51 //获取用户信息 51 //获取用户信息
52 account.value = res.data.logonUser 52 account.value = res.data.logonUser
53 userId.value = res.data.userId 53 userId.value = res.data.userId
54 userName.value = res.data.userName
55 // userData.value = JSON.stringify(res.data.data);
56 currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : ''; 54 currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
57 localStorage.setItem('currentTenantGuid', currentTenantGuid.value); 55 localStorage.setItem('currentTenantGuid', currentTenantGuid.value);
58 let currentTenant = res.data.tenantInfoList?.[0]; 56 let currentTenant = res.data.tenantInfoList?.[0];
59 getCurrentUserInfo({tenantGuid: currentTenantGuid.value}).then((res: any) => { 57 getCurrentUserInfo({tenantGuid: currentTenantGuid.value}).then((res: any) => {
60 console.log(res, 'getCurrentUserInfo'); 58 console.log(res, 'getCurrentUserInfo');
61 if (res.code == '00000') { 59 if (res.code == '00000') {
60 userName.value = res.data.staffName;
61 localStorage.setItem('userName', res.data?.staffName);
62 localStorage.setItem('userData', JSON.stringify(res.data)); 62 localStorage.setItem('userData', JSON.stringify(res.data));
63 } else { 63 } else {
64 ElMessage.error(res.msg) 64 ElMessage.error(res.msg)
...@@ -66,7 +66,6 @@ const useUserStore = defineStore( ...@@ -66,7 +66,6 @@ const useUserStore = defineStore(
66 }) 66 })
67 return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => { 67 return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
68 if (info.code == '00000') { 68 if (info.code == '00000') {
69 localStorage.setItem('userName', currentTenant?.name)
70 localStorage.setItem('userInfoData', JSON.stringify(info.data)); 69 localStorage.setItem('userInfoData', JSON.stringify(info.data));
71 userInfoData.value = info.data; 70 userInfoData.value = info.data;
72 } else { 71 } else {
......
...@@ -11,15 +11,13 @@ import { ...@@ -11,15 +11,13 @@ import {
11 getQualityEvaList, 11 getQualityEvaList,
12 getRegisteredList, 12 getRegisteredList,
13 saveQuality, 13 saveQuality,
14 registerApproveCancel,
15 registerApproveBackup,
16 qualityAllow, 14 qualityAllow,
17 deleteQuality, 15 deleteQuality,
18 updatQuality 16 updatQuality
19 } from "@/api/modules/dataAsset"; 17 } from "@/api/modules/dataAsset";
20 import useUserStore from "@/store/modules/user"; 18 import useUserStore from "@/store/modules/user";
21 import useDataAssetStore from "@/store/modules/dataAsset"; 19 import useDataAssetStore from "@/store/modules/dataAsset";
22 import { passFlowData, rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise } from "@/api/modules/workFlowService"; 20 import { rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise } from "@/api/modules/workFlowService";
23 21
24 const assetStore = useDataAssetStore(); 22 const assetStore = useDataAssetStore();
25 23
...@@ -44,7 +42,7 @@ const tableFields = ref([ ...@@ -44,7 +42,7 @@ const tableFields = ref([
44 const deploymentId = ref(''); 42 const deploymentId = ref('');
45 43
46 onBeforeMount(() => { 44 onBeforeMount(() => {
47 getCamundaDeploymentId('10018').then((res: any) => { 45 getCamundaDeploymentId('10018', userData.tenantGuid, userData.staffGuid).then((res: any) => {
48 if (res.code == proxy.$passCode) { 46 if (res.code == proxy.$passCode) {
49 deploymentId.value = res.data; 47 deploymentId.value = res.data;
50 } else { 48 } else {
...@@ -168,7 +166,7 @@ const tableInfo = ref({ ...@@ -168,7 +166,7 @@ const tableInfo = ref({
168 actionInfo: { 166 actionInfo: {
169 label: "操作", 167 label: "操作",
170 type: "btn", 168 type: "btn",
171 width: 160, 169 width: 175,
172 btns: (scope) => { 170 btns: (scope) => {
173 let row = scope.row; 171 let row = scope.row;
174 return getTableBtns(row); 172 return getTableBtns(row);
...@@ -178,25 +176,43 @@ const tableInfo = ref({ ...@@ -178,25 +176,43 @@ const tableInfo = ref({
178 176
179 const getTableBtns = (row) => { 177 const getTableBtns = (row) => {
180 let btnsArr: any[] = []; 178 let btnsArr: any[] = [];
181 if (row.approveState == 'A') {//审批中 179 const approveVO = row.approveVO || {};
182 btnsArr.push({ label: "详情", value: "path_detail" }) 180 const approveState = row.approveState || null;
183 if (row.tenantGuid == userData.tenantGuid) { 181 const approveStaffGuids = approveVO.approveStaffGuids || [];
184 btnsArr.push({ label: "撤销", value: "revoke" }); 182 const staffGuid = approveVO.staffGuid || '';
183 const bizApproveState = row.bizApproveState;
184 const currentStaffGuid = userData.staffGuid
185 let isShowCancel = false;
186 let flowState;
187 if (approveState == 'N') {
188 flowState = 1;
185 } 189 }
186 if (row.approveTenantGuids?.includes(userData.tenantGuid)) { 190 if (approveState == 'A' && approveStaffGuids.indexOf(currentStaffGuid) > -1) {
187 btnsArr.push({ label: "通过", value: "pass" }); 191 flowState = 2;
188 btnsArr.push({ label: "驳回", value: "backup" });
189 } 192 }
190 } else if (row.approveState == 'Y') {//已通过的不能删除。 193 if ((approveState == 'C' || approveState == 'R') && staffGuid == currentStaffGuid) {
191 btnsArr.push({ label: "详情", value: "path_detail" }) 194 flowState = 3;
192 } else if (row.approveState == 'R' || row.approveState == 'C') {//已驳回或已撤销
193 btnsArr.push({ label: "详情", value: "path_detail" });
194 if (row.tenantGuid == userData.tenantGuid) {
195 btnsArr.push({ label: "重新提交", value: "edit", disabled: false })
196 } 195 }
197 if (row.tenantGuid == userData.tenantGuid) { 196 if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
198 btnsArr.push({ label: "删除", value: "delete" }); 197 isShowCancel = true;
199 } 198 }
199 if (flowState === 1) {
200 btnsArr = [{ label: "删除", value: "del" }]
201 }
202 if (flowState === 2) {
203 btnsArr = [{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }]
204 }
205 if (flowState === 3) {
206 btnsArr.push({ label: "删除", value: "del" })
207 }
208 if (flowState === 3 && bizApproveState != 'D') {
209 btnsArr.push({ label: "重新提交", value: "redit" })
210 }
211 if (isShowCancel) {
212 btnsArr.push({ label: "撤销", value: "revoke" })
213 }
214 if (flowState !== 1) {
215 btnsArr.push({ label: "详情", value: "detail" })
200 } 216 }
201 return btnsArr; 217 return btnsArr;
202 } 218 }
...@@ -207,15 +223,15 @@ const tableBtnClick = (scope, btn) => { ...@@ -207,15 +223,15 @@ const tableBtnClick = (scope, btn) => {
207 const type = btn.value; 223 const type = btn.value;
208 const row = scope.row; 224 const row = scope.row;
209 currTableData.value = row; 225 currTableData.value = row;
210 if (type == "edit") { 226 if (type == "redit") {
211 dialogInfo.value.visible = true; 227 dialogInfo.value.visible = true;
212 dialogInfo.value.type = 'reSubmit'; 228 dialogInfo.value.type = 'reSubmit';
213 formItems.value[0].visible = false; 229 formItems.value[0].visible = false;
214 formItems.value[0].default = row.registerGuid; 230 formItems.value[0].default = row.registerGuid;
215 formItems.value[1].default = row.qualityEvaluationFile || []; 231 formItems.value[1].default = row.qualityEvaluationFile || [];
216 } else if (type == "delete") { 232 } else if (type == "del") {
217 delTableOpen("此操作将永久删除该资产质量评价,是否继续?", "warning"); 233 delTableOpen("此操作将永久删除该资产质量评价,是否继续?", "warning");
218 } else if (type === 'backup') { 234 } else if (type === 'reject') {
219 rejectDialogInfo.value.visible = true; 235 rejectDialogInfo.value.visible = true;
220 } else if (type === 'pass') { 236 } else if (type === 'pass') {
221 passDialogInfo.value.visible = true; 237 passDialogInfo.value.visible = true;
...@@ -251,7 +267,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -251,7 +267,7 @@ const tableBtnClick = (scope, btn) => {
251 message: '已取消撤销' 267 message: '已取消撤销'
252 }); 268 });
253 }); 269 });
254 } else if (type === 'path_detail') { // 详情 270 } else if (type === 'detail') { // 详情
255 if (row.registerApproveState == 'Y') { 271 if (row.registerApproveState == 'Y') {
256 router.push({ 272 router.push({
257 name: 'registerDetail', 273 name: 'registerDetail',
...@@ -259,14 +275,14 @@ const tableBtnClick = (scope, btn) => { ...@@ -259,14 +275,14 @@ const tableBtnClick = (scope, btn) => {
259 }); 275 });
260 } else { 276 } else {
261 router.push({ 277 router.push({
262 name: 'registerCatalogDetail', 278 name: 'evaCatalogDetail',
263 query: { guid: row.damGuid, type: 'asset' } 279 query: { guid: row.damGuid, evaGuid: row.guid, type: 'qualityEvaluate' }
264 }); 280 });
265 } 281 }
266 } else if (type == 'productDetail') { 282 } else if (type == 'productDetail') {
267 router.push({ 283 router.push({
268 name: 'registerCatalogDetail', 284 name: 'registerCatalogDetail',
269 query: { guid: row.damGuid, type: 'asset' } 285 query: { guid: row.damGuid }
270 }); 286 });
271 } 287 }
272 }; 288 };
...@@ -403,9 +419,10 @@ const dialogBtnClick = (btn, info) => { ...@@ -403,9 +419,10 @@ const dialogBtnClick = (btn, info) => {
403 damGuid: currTableData.value.damGuid, 419 damGuid: currTableData.value.damGuid,
404 daName: currTableData.value.daName, 420 daName: currTableData.value.daName,
405 immediateApprove: true, 421 immediateApprove: true,
406 issuingEntityGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid, 422 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
407 qualityEvaluationFile: info.qualityEvaluationFile?.map(f => f.url) || [] 423 qualityEvaluationFile: info.qualityEvaluationFile || []
408 }).then((res: any) => { 424 }).then((res: any) => {
425 dialogInfo.value.footer.btns[1].loading = false;
409 if (res?.code == proxy.$passCode) { 426 if (res?.code == proxy.$passCode) {
410 ElMessage.success('该资产质量评价重新提交成功'); 427 ElMessage.success('该资产质量评价重新提交成功');
411 dialogInfo.value.visible = false; 428 dialogInfo.value.visible = false;
...@@ -422,10 +439,10 @@ const dialogBtnClick = (btn, info) => { ...@@ -422,10 +439,10 @@ const dialogBtnClick = (btn, info) => {
422 damGuid: info.damGuid, 439 damGuid: info.damGuid,
423 daName: daInfo.damName, 440 daName: daInfo.damName,
424 immediateApprove: true, 441 immediateApprove: true,
425 // registerTime: daInfo.registerTime, 442 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
426 issuingEntityGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid, 443 qualityEvaluationFile: info.qualityEvaluationFile || []
427 qualityEvaluationFile: info.qualityEvaluationFile?.map(f => f.url) || []
428 }).then((res: any) => { 444 }).then((res: any) => {
445 dialogInfo.value.footer.btns[1].loading = false;
429 if (res?.code == proxy.$passCode) { 446 if (res?.code == proxy.$passCode) {
430 ElMessage.success('质量评价发起成功'); 447 ElMessage.success('质量评价发起成功');
431 dialogInfo.value.visible = false; 448 dialogInfo.value.visible = false;
...@@ -568,7 +585,7 @@ const passDialogInfo = ref({ ...@@ -568,7 +585,7 @@ const passDialogInfo = ref({
568 footer: { 585 footer: {
569 btns: [ 586 btns: [
570 { type: "default", label: "取消", value: "cancel" }, 587 { type: "default", label: "取消", value: "cancel" },
571 { type: "primary", label: "确定", value: "submit" }, 588 { type: "primary", label: "确定", value: "submit", loading: false },
572 ], 589 ],
573 }, 590 },
574 }); 591 });
...@@ -581,14 +598,19 @@ const passDialogInputChange = (val, item) => { ...@@ -581,14 +598,19 @@ const passDialogInputChange = (val, item) => {
581 598
582 const passDialogBtnClick = (btn, info) => { 599 const passDialogBtnClick = (btn, info) => {
583 if (btn.value == 'submit') { 600 if (btn.value == 'submit') {
601 passDialogInfo.value.footer.btns[1].loading = true;
584 qualityAllow({ 602 qualityAllow({
585 guid: currTableData.value.guid, 603 guid: currTableData.value.approveVO.approveGuid,
604 bizGuid: currTableData.value.guid,
605 flowType: currTableData.value.approveVO.flowType,
606 approveStaffGuid: userData.staffGuid,
586 qualityScore: info.qualityScore, 607 qualityScore: info.qualityScore,
587 evaluationRangeStart: info.evaluationRange[0], 608 evaluationRangeStart: info.evaluationRange[0],
588 evaluationRangeEnd: info.evaluationRange[1], 609 evaluationRangeEnd: info.evaluationRange[1],
589 evaluationNote: info.evaluationNote, 610 evaluationNote: info.evaluationNote,
590 evaluationFile: info.evaluationFile.map(f => f.url), 611 evaluationFile: info.evaluationFile || [],
591 }).then((res: any) => { 612 }).then((res: any) => {
613 passDialogInfo.value.footer.btns[1].loading = false;
592 if (res?.code == proxy.$passCode) { 614 if (res?.code == proxy.$passCode) {
593 if (res.data) { 615 if (res.data) {
594 ElMessage.success('审批成功'); 616 ElMessage.success('审批成功');
...@@ -648,13 +670,15 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -648,13 +670,15 @@ const rejectDialogBtnClick = (btn, info) => {
648 ElMessage.error('请填写驳回理由'); 670 ElMessage.error('请填写驳回理由');
649 return 671 return
650 } 672 }
673 let row = currTableData.value;
651 tableInfo.value.loading = true; 674 tableInfo.value.loading = true;
652 let params = { 675 let params = {
653 bizGuid: currTableData.value.guid, 676 guid: row.approveVO.approveGuid,
654 funcCode: currTableData.value.funcCode, 677 flowType: row.approveVO.flowType,
678 approveStaffGuid: userData.staffGuid,
655 approveSuggest: info.approveSuggest 679 approveSuggest: info.approveSuggest
656 } 680 }
657 registerApproveBackup(params).then((res: any) => { 681 rejectFlowData(params).then((res: any) => {
658 tableInfo.value.loading = false; 682 tableInfo.value.loading = false;
659 if (res?.code == proxy.$passCode) { 683 if (res?.code == proxy.$passCode) {
660 if (res.data) { 684 if (res.data) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!