b68ea3d6 by lxs

数据资产登记更新

1 parent 3b9357a6
...@@ -35,7 +35,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -35,7 +35,7 @@ const routes: RouteRecordRaw[] = [
35 reuse: true 35 reuse: true
36 }, 36 },
37 beforeEnter: (to, from) => { 37 beforeEnter: (to, from) => {
38 to.meta.title = to.query.type == 'edit' ? `编辑-${to.query.name}` : '新建资产登记'; 38 to.meta.title = to.query.type == 'create' ? '新建资产登记' : `编辑-${to.query.name}`;
39 to.meta.editPage = true; 39 to.meta.editPage = true;
40 } 40 }
41 }, 41 },
......
...@@ -4,7 +4,7 @@ import router from '@/router' ...@@ -4,7 +4,7 @@ import router from '@/router'
4 import { ElMessage } from 'element-plus' 4 import { ElMessage } from 'element-plus'
5 import apiUser from '@/api/modules/user' 5 import apiUser from '@/api/modules/user'
6 import { getCurrentTime } from '@/utils/common' 6 import { getCurrentTime } from '@/utils/common'
7 import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface, getCurrentUserInfo, getCurrentUserInfo } from '@/api/modules/queryService' 7 import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface, getCurrentUserInfo } from '@/api/modules/queryService'
8 8
9 const useUserStore = defineStore( 9 const useUserStore = defineStore(
10 // 唯一ID 10 // 唯一ID
......
...@@ -1167,10 +1167,11 @@ const handleClickDamCatalogDetail = () => { ...@@ -1167,10 +1167,11 @@ const handleClickDamCatalogDetail = () => {
1167 </div> 1167 </div>
1168 <div class="list_item"> 1168 <div class="list_item">
1169 <span class="item_label">所属行业:</span> 1169 <span class="item_label">所属行业:</span>
1170 <span class="item_value"><ellipsis-tooltip :content="(assetDetailInfo.ownIndustryName?.filter(u => u != '其他')?.join(',') + 1170 <span class="item_value"><ellipsis-tooltip
1171 :content="(assetDetailInfo.ownIndustryName?.filter(u => u != '其他')?.join(',') +
1171 (assetDetailInfo.ownIndustry?.includes(4) 1172 (assetDetailInfo.ownIndustry?.includes(4)
1172 ? ((assetDetailInfo.ownIndustryName?.length > 1 ? ',' : '') + assetDetailInfo.ownIndustryOther) : '')) ?? '--'" 1173 ? ((assetDetailInfo.ownIndustryName?.length > 1 ? ',' : '') + assetDetailInfo.ownIndustryOther) : '')) ?? '--'" class-name="w100f"
1173 class-name="w100f" :refName="'tooltipOver' + 'ownIndustryName'"></ellipsis-tooltip></span> 1174 :refName="'tooltipOver' + 'ownIndustryName'"></ellipsis-tooltip></span>
1174 </div> 1175 </div>
1175 <div class="list_item"> 1176 <div class="list_item">
1176 <span class="item_label">本次登记:</span> 1177 <span class="item_label">本次登记:</span>
...@@ -1179,7 +1180,8 @@ const handleClickDamCatalogDetail = () => { ...@@ -1179,7 +1180,8 @@ const handleClickDamCatalogDetail = () => {
1179 </div> 1180 </div>
1180 <div class="list_item"> 1181 <div class="list_item">
1181 <span class="item_label">数据规模():</span> 1182 <span class="item_label">数据规模():</span>
1182 <span class="item_value">{{ assetDetailInfo.dataScale != null ? changeNum(assetDetailInfo.dataScale, 0) : 1183 <span class="item_value">{{ assetDetailInfo.dataScale != null ? changeNum(assetDetailInfo.dataScale, 0)
1184 :
1183 '--' }}</span> 1185 '--' }}</span>
1184 </div> 1186 </div>
1185 <div class="list_item"> 1187 <div class="list_item">
...@@ -1187,6 +1189,11 @@ const handleClickDamCatalogDetail = () => { ...@@ -1187,6 +1189,11 @@ const handleClickDamCatalogDetail = () => {
1187 <span class="item_value">{{ assetDetailInfo.subjectDomainName || assetDetailInfo.subjectDomain || '--' 1189 <span class="item_value">{{ assetDetailInfo.subjectDomainName || assetDetailInfo.subjectDomain || '--'
1188 }}</span> 1190 }}</span>
1189 </div> 1191 </div>
1192 <div class="list_item" v-if="assetDetailInfo.damGuid">
1193 <span class="item_label">数据来源:</span>
1194 <span class="item_value">{{ dataSourcesList.find(d => d.value == assetDetailInfo.dataSources)?.label ||
1195 '--' }}</span>
1196 </div>
1190 </div> 1197 </div>
1191 <div class="first-col" style="width: 250px;"> 1198 <div class="first-col" style="width: 250px;">
1192 <div class="list_item"> 1199 <div class="list_item">
...@@ -1204,8 +1211,13 @@ const handleClickDamCatalogDetail = () => { ...@@ -1204,8 +1211,13 @@ const handleClickDamCatalogDetail = () => {
1204 + assetDetailInfo.updateFrequencyOther) : '')) ?? '--' }}</span> 1211 + assetDetailInfo.updateFrequencyOther) : '')) ?? '--' }}</span>
1205 </div> 1212 </div>
1206 <div class="list_item"> 1213 <div class="list_item">
1207 <span class="item_label">质量及价值评估:</span> 1214 <span class="item_label">是否完成质量评估:</span>
1208 <span class="item_value">{{ assetDetailInfo.isEvaluationAssessment == 'Y' ? '是' : '否' }}</span> 1215 <span class="item_value">{{ assetDetailInfo.isQualityAssessment == 'Y' ? '是' : '否' }}</span>
1216 </div>
1217 <div class="list_item" v-if="(detailType == 'asset' && assetDetailInfo.isQualityAssessment == 'Y')">
1218 <span class="item_label">质量评估机构:</span>
1219 <span class="item_value">{{ assetDetailInfo.registerAttachment.qualityEvaluationInstitution || '--'
1220 }}</span>
1209 </div> 1221 </div>
1210 <div class="list_item"> 1222 <div class="list_item">
1211 <span class="item_label">病例总数():</span> 1223 <span class="item_label">病例总数():</span>
...@@ -1226,10 +1238,11 @@ const handleClickDamCatalogDetail = () => { ...@@ -1226,10 +1238,11 @@ const handleClickDamCatalogDetail = () => {
1226 </div> 1238 </div>
1227 <div class="list_item"> 1239 <div class="list_item">
1228 <span class="item_label">取得方式:</span> 1240 <span class="item_label">取得方式:</span>
1229 <span class="item_value"><ellipsis-tooltip :content="(assetDetailInfo.dataGetWayName?.filter(u => u != '其他')?.join(',') + 1241 <span class="item_value"><ellipsis-tooltip
1242 :content="(assetDetailInfo.dataGetWayName?.filter(u => u != '其他')?.join(',') +
1230 (assetDetailInfo.dataGetWay?.includes(8) ? 1243 (assetDetailInfo.dataGetWay?.includes(8) ?
1231 ((assetDetailInfo.dataGetWayName?.length > 1 ? ',' : '') + assetDetailInfo.dataGetWayOther) : '')) ?? '--'" 1244 ((assetDetailInfo.dataGetWayName?.length > 1 ? ',' : '') + assetDetailInfo.dataGetWayOther) : '')) ?? '--'" class-name="w100f"
1232 class-name="w100f" :refName="'tooltipOver' + 'dataGetWayName'"></ellipsis-tooltip> 1245 :refName="'tooltipOver' + 'dataGetWayName'"></ellipsis-tooltip>
1233 </span> 1246 </span>
1234 </div> 1247 </div>
1235 <div class="list_item"> 1248 <div class="list_item">
...@@ -1238,6 +1251,15 @@ const handleClickDamCatalogDetail = () => { ...@@ -1238,6 +1251,15 @@ const handleClickDamCatalogDetail = () => {
1238 (assetDetailInfo.registeredExchangeName?.join(',') ?? '--') }}</span> 1251 (assetDetailInfo.registeredExchangeName?.join(',') ?? '--') }}</span>
1239 </div> 1252 </div>
1240 <div class="list_item"> 1253 <div class="list_item">
1254 <span class="item_label">是否完成价值评估:</span>
1255 <span class="item_value">{{ assetDetailInfo.isCostAssessment == 'Y' ? '是' : '否' }}</span>
1256 </div>
1257 <div class="list_item" v-if="(detailType == 'asset' && assetDetailInfo.isCostAssessment == 'Y')">
1258 <span class="item_label">价值评估机构:</span>
1259 <span class="item_value">{{ assetDetailInfo.registerAttachment.costAssessmentInstitution || '--'
1260 }}</span>
1261 </div>
1262 <div class="list_item">
1241 <span class="item_label">资产类型:</span> 1263 <span class="item_label">资产类型:</span>
1242 <span class="item_value">{{ assetDetailInfo.damTypeName || '--' }}</span> 1264 <span class="item_value">{{ assetDetailInfo.damTypeName || '--' }}</span>
1243 </div> 1265 </div>
...@@ -1246,11 +1268,6 @@ const handleClickDamCatalogDetail = () => { ...@@ -1246,11 +1268,6 @@ const handleClickDamCatalogDetail = () => {
1246 <span class="item_value">{{ assetDetailInfo.dataStartDate ? 1268 <span class="item_value">{{ assetDetailInfo.dataStartDate ?
1247 `${assetDetailInfo.dataStartDate}至${assetDetailInfo.dataEndDate}` : '--' }}</span> 1269 `${assetDetailInfo.dataStartDate}至${assetDetailInfo.dataEndDate}` : '--' }}</span>
1248 </div> 1270 </div>
1249 <div class="list_item" v-if="assetDetailInfo.damGuid">
1250 <span class="item_label">数据来源:</span>
1251 <span class="item_value">{{ dataSourcesList.find(d => d.value == assetDetailInfo.dataSources)?.label ||
1252 '--' }}</span>
1253 </div>
1254 </div> 1271 </div>
1255 </div> 1272 </div>
1256 <div class="list_item is_block"> 1273 <div class="list_item is_block">
...@@ -1380,6 +1397,82 @@ const handleClickDamCatalogDetail = () => { ...@@ -1380,6 +1397,82 @@ const handleClickDamCatalogDetail = () => {
1380 </div> 1397 </div>
1381 </span> 1398 </span>
1382 </div> 1399 </div>
1400 <div class="list_item is_block isFile" :style="{ width: '40%' }"
1401 v-if="(detailType == 'asset' && assetDetailInfo.isQualityAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length">
1402 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">质量评估报告</span>
1403 <span v-for="(item) in (assetDetailInfo.registerAttachment?.qualityEvaluationFile || [])"
1404 class="item_value" :style="{ 'padding-left': '0px' }">
1405 <div class="file-operate">
1406 <template
1407 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'xls' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'xlsx' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'csv'">
1408 <img class="file-img" src="../../assets/images/excel.png" />
1409 </template>
1410 <template
1411 v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'doc' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'docx'">
1412 <img class="file-img" src="../../assets/images/word.png" />
1413 </template>
1414 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'zip'">
1415 <img class="file-img" src="../../assets/images/zip.png" />
1416 </template>
1417 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'rar'">
1418 <img class="file-img" src="../../assets/images/RAR.png" />
1419 </template>
1420 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf'">
1421 <img class="file-img" src="../../assets/images/PDF.png" />
1422 </template>
1423 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'png'">
1424 <img class="file-img" src="../../assets/images/png.png" />
1425 </template>
1426 <template
1427 v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'">
1428 <img class="file-img" src="../../assets/images/jpg.png" />
1429 </template>
1430 <div class="file-name">{{ item.name }}</div>
1431 <div :style="{ right: '36px' }"
1432 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'png' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'"
1433 class="file-preview" @click="onUploadFilePreview(item)">查看</div>
1434 <div :style="{ right: '0px' }" class="file-preview" @click="onUploadFileDownload(item)">下载</div>
1435 </div>
1436 </span>
1437 </div>
1438 <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
1439 v-if="(detailType == 'asset' && assetDetailInfo.isCostAssessment == 'Y') && assetDetailInfo.registerAttachment?.costAssessmentFile?.length">
1440 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">价值评估报告</span>
1441 <span v-for="(item) in (assetDetailInfo.registerAttachment?.costAssessmentFile || [])" class="item_value"
1442 :style="{ 'padding-left': '0px' }">
1443 <div class="file-operate">
1444 <template
1445 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'xls' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'xlsx' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'csv'">
1446 <img class="file-img" src="../../assets/images/excel.png" />
1447 </template>
1448 <template
1449 v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'doc' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'docx'">
1450 <img class="file-img" src="../../assets/images/word.png" />
1451 </template>
1452 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'zip'">
1453 <img class="file-img" src="../../assets/images/zip.png" />
1454 </template>
1455 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'rar'">
1456 <img class="file-img" src="../../assets/images/RAR.png" />
1457 </template>
1458 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf'">
1459 <img class="file-img" src="../../assets/images/PDF.png" />
1460 </template>
1461 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'png'">
1462 <img class="file-img" src="../../assets/images/png.png" />
1463 </template>
1464 <template
1465 v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'">
1466 <img class="file-img" src="../../assets/images/jpg.png" />
1467 </template>
1468 <div class="file-name">{{ item.name }}</div>
1469 <div :style="{ right: '36px' }"
1470 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'png' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'"
1471 class="file-preview" @click="onUploadFilePreview(item)">查看</div>
1472 <div :style="{ right: '0px' }" class="file-preview" @click="onUploadFileDownload(item)">下载</div>
1473 </div>
1474 </span>
1475 </div>
1383 <!-- <span 1476 <!-- <span
1384 v-if="tenantDetail.businessLicense?.length || assetDetailInfo.registerAttachment?.commitmentLetter?.length" 1477 v-if="tenantDetail.businessLicense?.length || assetDetailInfo.registerAttachment?.commitmentLetter?.length"
1385 class="small-title" :style="{ marginTop: '10px' }">公司信息</span> --> 1478 class="small-title" :style="{ marginTop: '10px' }">公司信息</span> -->
......
...@@ -8,21 +8,8 @@ import TableTools from "@/components/Tools/table_tools.vue"; ...@@ -8,21 +8,8 @@ import TableTools from "@/components/Tools/table_tools.vue";
8 import { ElMessage, ElMessageBox } from 'element-plus'; 8 import { ElMessage, ElMessageBox } from 'element-plus';
9 import { useRouter, useRoute } from "vue-router"; 9 import { useRouter, useRoute } from "vue-router";
10 import { MoreFilled } from "@element-plus/icons-vue"; 10 import { MoreFilled } from "@element-plus/icons-vue";
11 import { 11 import { changeNum, tagMethod, tagType, } from "@/utils/common";
12 changeNum, 12 import { getRegisterList, registerDelete, getExchangeList } from "@/api/modules/dataAsset";
13 tagMethod,
14 tagType,
15 } from "@/utils/common";
16 import {
17 getRegisterList,
18 registerDelete,
19 registerApproveCancel,
20 registerApproveReSubmit,
21 registerApproveAllow,
22 registerApproveBackup,
23 getRegisterTenant,
24 getExchangeList
25 } from "@/api/modules/dataAsset";
26 import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService"; 13 import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService";
27 import useDataAssetStore from "@/store/modules/dataAsset"; 14 import useDataAssetStore from "@/store/modules/dataAsset";
28 import useUserStore from "@/store/modules/user"; 15 import useUserStore from "@/store/modules/user";
...@@ -108,7 +95,39 @@ const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "ce ...@@ -108,7 +95,39 @@ const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "ce
108 return scope.row['ownIndustryName']?.join(',') 95 return scope.row['ownIndustryName']?.join(',')
109 } 96 }
110 }, 97 },
111 { label: "状态", field: "approveState", type: "tag", width: 96, align: 'center' }, 98 {
99 label: "状态", field: "approveState", type: "tag", width: 96, align: 'center', getName: (scope) => {
100 const approveVO = scope.row.approveVO || {}
101 switch (approveVO.approveState) {
102 case 'N':
103 return '草稿中';
104 case 'A':
105 return '审批中';
106 case 'Y':
107 return '已通过';
108 case 'R':
109 return '已驳回';
110 case 'C':
111 return '已撤销';
112 case 'I':
113 return '--';
114 default:
115 return '草稿中';
116 }
117 }, tagType: (scope) => {
118 const approveVO = scope.row.approveVO || {}
119 switch (approveVO.approveState) {
120 case 'A':
121 return 'warning';
122 case 'Y':
123 return 'success';
124 case 'R':
125 return 'danger';
126 default:
127 return 'info';
128 }
129 }
130 },
112 { label: "修改人", field: "updateUserName", width: 140 }, 131 { label: "修改人", field: "updateUserName", width: 140 },
113 { label: "修改时间", field: "updateTime", width: 180 }]); 132 { label: "修改时间", field: "updateTime", width: 180 }]);
114 133
...@@ -134,7 +153,7 @@ const tableInfo = ref({ ...@@ -134,7 +153,7 @@ const tableInfo = ref({
134 actionInfo: { 153 actionInfo: {
135 label: "操作", 154 label: "操作",
136 type: "btn", 155 type: "btn",
137 width: 160, 156 width: 180,
138 btns: (scope) => { 157 btns: (scope) => {
139 let row = scope.row; 158 let row = scope.row;
140 return getTableBtns(row); 159 return getTableBtns(row);
...@@ -143,34 +162,45 @@ const tableInfo = ref({ ...@@ -143,34 +162,45 @@ const tableInfo = ref({
143 }); 162 });
144 163
145 const getTableBtns = (row, includeDetail = true) => { 164 const getTableBtns = (row, includeDetail = true) => {
146 console.log(userData)
147 let btnsArr: any[] = []; 165 let btnsArr: any[] = [];
148 if (row.approveState == 'N') {//只有草稿中的详情是可以编辑的 166 const approveVO = row.approveVO;
149 includeDetail && btnsArr.push({ label: "编辑", value: "edit" }) 167 const currentStaffGuid = userData.staffGuid
150 if (row.tenantGuid == userData.tenantGuid) { 168 const bizApproveState = row.approveState;
151 btnsArr.push({ label: "删除", value: "delete" }); 169 const approveState = approveVO?.approveState || 'N';
170 const approveStaffGuids = approveVO?.approveStaffGuids || [];
171 const staffGuid = approveVO?.staffGuid || '';
172 let isShowCancel = false;
173 let flowState;
174 if (approveState == 'N') {
175 flowState = 1;
176 }
177 if (approveState == 'A' && approveStaffGuids.indexOf(currentStaffGuid) > -1) {
178 flowState = 2;
152 } 179 }
153 } else if (row.approveState == 'A') {//审批中 180 if ((approveState == 'C' || approveState == 'R') && staffGuid == currentStaffGuid) {
154 includeDetail && btnsArr.push({ label: "详情", value: "path_detail" }) 181 flowState = 3;
155 if (row.tenantGuid == userData.tenantGuid) {
156 btnsArr.push({ label: "撤销", value: "revoke" });
157 } 182 }
158 if (row.approveTenantGuids?.includes(userData.tenantGuid)) { 183 if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
159 btnsArr.push({ label: "通过", value: "pass" }); 184 isShowCancel = true;
160 btnsArr.push({ label: "驳回", value: "backup" });
161 } 185 }
162 } else if (row.approveState == 'Y') {//已通过的不能删除。 186
163 includeDetail && btnsArr.push({ label: "详情", value: "path_detail" }) 187 if (flowState === 1) {
164 } else if (row.approveState == 'R' || row.approveState == 'C') {//已驳回或已撤销 188 btnsArr = [{ label: "编辑", value: "edit" }, { label: "删除", value: "delete" }]
165 includeDetail && btnsArr.push({ label: "编辑", value: "edit" }); 189 } else {
166 if (row.tenantGuid == userData.tenantGuid) { 190 btnsArr.push({ label: "详情", value: "detail" })
167 btnsArr.push({ label: "重新提交", value: "edit", disabled: false }) 191 if (flowState === 2) {
192 btnsArr.push(...[{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }])
193 if (isShowCancel) {
194 btnsArr.push({ label: "撤销", value: "revoke" })
195 }
196 } else if (flowState === 3) {
197 if (bizApproveState != 'D') {
198 btnsArr.push({ label: "重新提交", value: "edit" })
168 } 199 }
169 if (row.tenantGuid == userData.tenantGuid) { 200 btnsArr.push({ label: "删除", value: "delete" })
170 btnsArr.push({ label: "删除", value: "delete" });
171 } 201 }
172 } 202 }
173 return btnsArr; 203 return btnsArr
174 } 204 }
175 205
176 const currTableData: any = ref({}); 206 const currTableData: any = ref({});
...@@ -195,6 +225,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -195,6 +225,7 @@ const tableBtnClick = (scope, btn) => {
195 const row = scope.row; 225 const row = scope.row;
196 currTableData.value = row; 226 currTableData.value = row;
197 if (type === "edit") { //草稿中\已驳回\已撤销\已通过 状态,才可以编辑。 227 if (type === "edit") { //草稿中\已驳回\已撤销\已通过 状态,才可以编辑。
228 localStorage.setItem('isRestart', btn.label == '重新提交' ? 'true' : '');
198 router.push({ 229 router.push({
199 name: 'registerStart', 230 name: 'registerStart',
200 query: { guid: row.guid, damGuid: row.damGuid, name: row.daName, type } 231 query: { guid: row.guid, damGuid: row.damGuid, name: row.daName, type }
...@@ -207,24 +238,26 @@ const tableBtnClick = (scope, btn) => { ...@@ -207,24 +238,26 @@ const tableBtnClick = (scope, btn) => {
207 cancelButtonText: "取消", 238 cancelButtonText: "取消",
208 type: 'warning', 239 type: 'warning',
209 }).then(() => { 240 }).then(() => {
210 listDataLoading.value = true; 241 loading.value = true;
211 let params = { 242 let params = {
212 guid: row.approveVO.approveGuid, 243 guid: row.approveVO.approveGuid,
213 flowType: row.approveVO.flowType, 244 flowType: row.approveVO.flowType,
214 approveStaffGuid: userData.staffGuid, 245 approveStaffGuid: userData.staffGuid,
215 } 246 }
216 revokeFlowData(params).then((res: any) => { 247 revokeFlowData(params).then((res: any) => {
217 listDataLoading.value = false; 248 loading.value = false;
218 if (res?.code == proxy.$passCode) { 249 if (res?.code == proxy.$passCode) {
219 if (res.data) { 250 if (res.data) {
220 ElMessage.success('该审批流程撤销成功!'); 251 ElMessage.success('该审批流程撤销成功!');
221 row.approveState = "C"; 252 getTableData();
222 } else { 253 } else {
223 ElMessage.error('该审批流程撤销失败!'); 254 ElMessage.error('该审批流程撤销失败!');
224 } 255 }
225 } else { 256 } else {
226 ElMessage.error(res.msg); 257 ElMessage.error(res.msg);
227 } 258 }
259 }).catch(() => {
260 loading.value = false;
228 }); 261 });
229 }).catch(() => { 262 }).catch(() => {
230 ElMessage({ 263 ElMessage({
...@@ -232,25 +265,14 @@ const tableBtnClick = (scope, btn) => { ...@@ -232,25 +265,14 @@ const tableBtnClick = (scope, btn) => {
232 message: '已取消撤销' 265 message: '已取消撤销'
233 }); 266 });
234 }); 267 });
235 } else if (type === 'path_detail') { // 详情, 若是草稿中,详情就是编辑, 268 } else if (type === 'detail') { // 详情, 若是草稿中,详情就是编辑,
236 // if (row.approveState === 'N') {
237 // router.push({
238 // name: 'registerStart',
239 // query: { guid: row.guid, name: row.daName, type: 'detail' }
240 // });
241 // } else {
242 // router.push({
243 // name: 'registerInfoDetail',
244 // query: { guid: row.guid, type: 'asset', daTenantGuid: row.tenantGuid }
245 // });
246 // }
247 router.push({ 269 router.push({
248 name: 'registerInfoDetail', 270 name: 'registerInfoDetail',
249 query: { guid: row.guid, name: row.daName, type: 'asset' } 271 query: { guid: row.guid, name: row.daName, type: 'asset' }
250 }); 272 });
251 } else if (type === 'pass') { 273 } else if (type === 'pass') {
252 passDialogInfo.value.visible = true; 274 passDialogInfo.value.visible = true;
253 } else if (type == 'backup') { 275 } else if (type == 'reject') {
254 rejectDialogInfo.value.visible = true; 276 rejectDialogInfo.value.visible = true;
255 } 277 }
256 }; 278 };
...@@ -277,7 +299,9 @@ const delTableOpen = (msg, type, isBatch: boolean = false) => { ...@@ -277,7 +299,9 @@ const delTableOpen = (msg, type, isBatch: boolean = false) => {
277 }).then(() => { 299 }).then(() => {
278 let guids: any = []; 300 let guids: any = [];
279 guids = [currTableData.value.guid] 301 guids = [currTableData.value.guid]
302 loading.value = true;
280 registerDelete(guids).then((res: any) => { 303 registerDelete(guids).then((res: any) => {
304 loading.value = false;
281 if (res.code == proxy.$passCode) { 305 if (res.code == proxy.$passCode) {
282 pageInfo.value.curr = 1; 306 pageInfo.value.curr = 1;
283 getTableData(); 307 getTableData();
...@@ -291,7 +315,9 @@ const delTableOpen = (msg, type, isBatch: boolean = false) => { ...@@ -291,7 +315,9 @@ const delTableOpen = (msg, type, isBatch: boolean = false) => {
291 message: res.msg, 315 message: res.msg,
292 }); 316 });
293 } 317 }
294 }) 318 }).catch(() => {
319 loading.value = false;
320 });
295 }).catch(() => { 321 }).catch(() => {
296 ElMessage({ 322 ElMessage({
297 type: 'info', 323 type: 'info',
...@@ -301,8 +327,7 @@ const delTableOpen = (msg, type, isBatch: boolean = false) => { ...@@ -301,8 +327,7 @@ const delTableOpen = (msg, type, isBatch: boolean = false) => {
301 }; 327 };
302 328
303 const getTableData = () => { 329 const getTableData = () => {
304 listDataLoading.value = true; 330 loading.value = true;
305 tableInfo.value.loading = true;
306 getRegisterList({ 331 getRegisterList({
307 pageSize: pageInfo.value.limit, 332 pageSize: pageInfo.value.limit,
308 pageIndex: pageInfo.value.curr, 333 pageIndex: pageInfo.value.curr,
...@@ -311,17 +336,19 @@ const getTableData = () => { ...@@ -311,17 +336,19 @@ const getTableData = () => {
311 tenantGuid: pageInfo.value.tenantGuid, 336 tenantGuid: pageInfo.value.tenantGuid,
312 exchangGuid: exchangGuid.value 337 exchangGuid: exchangGuid.value
313 }).then((res: any) => { 338 }).then((res: any) => {
314 listDataLoading.value = false; 339 loading.value = false;
315 tableInfo.value.loading = false;
316 if (res.code == proxy.$passCode) { 340 if (res.code == proxy.$passCode) {
317 const data = res.data || {} 341 const data = res.data || {}
318 listData.value = tableInfo.value.data = data.records || []; 342 // listData.value = tableInfo.value.data = data.records || [];
343 tableInfo.value.data = data.records || []
319 pageInfo.value.limit = data.pageSize 344 pageInfo.value.limit = data.pageSize
320 pageInfo.value.curr = data.pageIndex 345 pageInfo.value.curr = data.pageIndex
321 pageInfo.value.rows = data.totalRows 346 pageInfo.value.rows = data.totalRows
322 } else { 347 } else {
323 ElMessage.error(res.msg); 348 ElMessage.error(res.msg);
324 } 349 }
350 }).catch(() => {
351 loading.value = false;
325 }) 352 })
326 } 353 }
327 354
...@@ -423,7 +450,7 @@ const passDialogInfo = ref({ ...@@ -423,7 +450,7 @@ const passDialogInfo = ref({
423 450
424 const passDialogBtnClick = (btn, info) => { 451 const passDialogBtnClick = (btn, info) => {
425 if (btn.value == 'submit') { 452 if (btn.value == 'submit') {
426 listDataLoading.value = true; 453 loading.value = true;
427 let params = { 454 let params = {
428 guid: currTableData.value.approveVO.approveGuid, 455 guid: currTableData.value.approveVO.approveGuid,
429 flowType: currTableData.value.approveVO.flowType, 456 flowType: currTableData.value.approveVO.flowType,
...@@ -431,7 +458,7 @@ const passDialogBtnClick = (btn, info) => { ...@@ -431,7 +458,7 @@ const passDialogBtnClick = (btn, info) => {
431 approveStaffGuid: userData.staffGuid, 458 approveStaffGuid: userData.staffGuid,
432 } 459 }
433 passFlowData(params).then((res: any) => { 460 passFlowData(params).then((res: any) => {
434 listDataLoading.value = false; 461 loading.value = false;
435 if (res?.code == proxy.$passCode) { 462 if (res?.code == proxy.$passCode) {
436 if (res.data) { 463 if (res.data) {
437 ElMessage.success('审批成功'); 464 ElMessage.success('审批成功');
...@@ -443,6 +470,8 @@ const passDialogBtnClick = (btn, info) => { ...@@ -443,6 +470,8 @@ const passDialogBtnClick = (btn, info) => {
443 } else { 470 } else {
444 ElMessage.error(res.msg); 471 ElMessage.error(res.msg);
445 } 472 }
473 }).catch(() => {
474 loading.value = false;
446 }); 475 });
447 } else if (btn.value == 'cancel') { 476 } else if (btn.value == 'cancel') {
448 passDialogInfo.value.visible = false; 477 passDialogInfo.value.visible = false;
...@@ -491,7 +520,7 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -491,7 +520,7 @@ const rejectDialogBtnClick = (btn, info) => {
491 ElMessage.error('请填写驳回理由'); 520 ElMessage.error('请填写驳回理由');
492 return 521 return
493 } 522 }
494 listDataLoading.value = true; 523 loading.value = true;
495 let params = { 524 let params = {
496 guid: currTableData.value.approveVO.approveGuid, 525 guid: currTableData.value.approveVO.approveGuid,
497 flowType: currTableData.value.approveVO.flowType, 526 flowType: currTableData.value.approveVO.flowType,
...@@ -499,7 +528,7 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -499,7 +528,7 @@ const rejectDialogBtnClick = (btn, info) => {
499 approveStaffGuid: userData.staffGuid, 528 approveStaffGuid: userData.staffGuid,
500 } 529 }
501 rejectFlowData(params).then((res: any) => { 530 rejectFlowData(params).then((res: any) => {
502 listDataLoading.value = false; 531 loading.value = false;
503 if (res?.code == proxy.$passCode) { 532 if (res?.code == proxy.$passCode) {
504 if (res.data) { 533 if (res.data) {
505 ElMessage.success('驳回成功'); 534 ElMessage.success('驳回成功');
...@@ -511,6 +540,8 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -511,6 +540,8 @@ const rejectDialogBtnClick = (btn, info) => {
511 } else { 540 } else {
512 ElMessage.error(res.msg); 541 ElMessage.error(res.msg);
513 } 542 }
543 }).catch(() => {
544 loading.value = false;
514 }); 545 });
515 } else if (btn.value == 'cancel') { 546 } else if (btn.value == 'cancel') {
516 rejectDialogInfo.value.visible = false; 547 rejectDialogInfo.value.visible = false;
......
...@@ -407,8 +407,8 @@ onBeforeMount(() => { ...@@ -407,8 +407,8 @@ onBeforeMount(() => {
407 const data = res.data || {} 407 const data = res.data || {}
408 let { approveVO } = data; 408 let { approveVO } = data;
409 draftDetailInfo.value = data; 409 draftDetailInfo.value = data;
410 deploymentId.value = approveVO.camundaDeploymentId; 410 deploymentId.value = approveVO?.camundaDeploymentId;
411 processInstanceId.value = approveVO.camundaInstanceId 411 processInstanceId.value = approveVO?.camundaInstanceId
412 let coverageArea = ''; 412 let coverageArea = '';
413 let coverageAreas = []; 413 let coverageAreas = [];
414 let damTypeItem = baseFormItems.value.find(item => item.field == 'damType'); 414 let damTypeItem = baseFormItems.value.find(item => item.field == 'damType');
...@@ -609,7 +609,6 @@ onBeforeMount(() => { ...@@ -609,7 +609,6 @@ onBeforeMount(() => {
609 }) 609 })
610 getParamsList({ dictType: '数据资产目录主题名称' }).then((res: any) => { 610 getParamsList({ dictType: '数据资产目录主题名称' }).then((res: any) => {
611 if (res.code == proxy.$passCode) { 611 if (res.code == proxy.$passCode) {
612 subjectDomainListData.value = replaceChildDictListKey(res.data) || [];
613 let item = baseFormItems.value.find(item => item.field == 'subjectDomain'); 612 let item = baseFormItems.value.find(item => item.field == 'subjectDomain');
614 item && (item.options = subjectDomainListData.value); 613 item && (item.options = subjectDomainListData.value);
615 } else { 614 } else {
...@@ -1326,8 +1325,11 @@ const baseFormRules = ref({ ...@@ -1326,8 +1325,11 @@ const baseFormRules = ref({
1326 registeredExchangeGuid: [{ 1325 registeredExchangeGuid: [{
1327 type: 'array', required: true, trigger: 'change', message: "请填写其他登记的交易所" 1326 type: 'array', required: true, trigger: 'change', message: "请填写其他登记的交易所"
1328 }], 1327 }],
1329 isEvaluationAssessment: [ 1328 isQualityAssessment: [
1330 { required: true, trigger: 'change', message: "请填写是否质量及价值评估" } 1329 { required: true, trigger: 'change', message: "请填写是否完成质量评估" }
1330 ],
1331 isCostAssessment: [
1332 { required: true, trigger: 'change', message: "请填写是否完成价值评估" }
1331 ], 1333 ],
1332 applicationScenarios: [ 1334 applicationScenarios: [
1333 { required: true, trigger: 'blur', message: "请填写数据资产应用场景" } 1335 { required: true, trigger: 'blur', message: "请填写数据资产应用场景" }
...@@ -2023,6 +2025,8 @@ const save = () => { ...@@ -2023,6 +2025,8 @@ const save = () => {
2023 qualityEvaluationFile: uploadFormInline['qualityEvaluationFile']?.map(u => u.url) || [], 2025 qualityEvaluationFile: uploadFormInline['qualityEvaluationFile']?.map(u => u.url) || [],
2024 costAssessmentFile: uploadFormInline['costAssessmentFile']?.map(u => u.url) || [], 2026 costAssessmentFile: uploadFormInline['costAssessmentFile']?.map(u => u.url) || [],
2025 commitmentLetter: uploadFormInline['commitmentLetter']?.map(u => u.url) || [], 2027 commitmentLetter: uploadFormInline['commitmentLetter']?.map(u => u.url) || [],
2028 qualityEvaluationInstitution: uploadFormInline.qualityEvaluationInstitution || '',
2029 costAssessmentInstitution: uploadFormInline.costAssessmentInstitution || '',
2026 }, 2030 },
2027 immediateApprove: true, 2031 immediateApprove: true,
2028 isSubmit: true, 2032 isSubmit: true,
...@@ -2034,6 +2038,7 @@ const save = () => { ...@@ -2034,6 +2038,7 @@ const save = () => {
2034 fullscreenLoading.value = true; 2038 fullscreenLoading.value = true;
2035 if (draftDetailInfo.value.guid) { 2039 if (draftDetailInfo.value.guid) {
2036 params.guid = draftDetailInfo.value.guid; 2040 params.guid = draftDetailInfo.value.guid;
2041 params.isRestart = localStorage.getItem('isRestart') ? true : false;
2037 registerUpdate(params).then((res: any) => { 2042 registerUpdate(params).then((res: any) => {
2038 fullscreenLoading.value = false; 2043 fullscreenLoading.value = false;
2039 if (res.code == proxy.$passCode) { 2044 if (res.code == proxy.$passCode) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!