bf91316a by xukangle

Merge branch 'dev_20241202_xukangle' into develop

2 parents b35fe61c 555c7f5b
1 import request from "@/utils/request";
2 /**
3 *@description 获取数据产品目录合规信息分页
4 *@path /dam-catalog-table/compliance-info/page-list
5 *@method post
6 */
7 export const getComplianceInfoPageList = (params) => {
8 return request({
9 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/compliance-info/page-list`,
10 method: 'post',
11 data: params
12 })
13 }
14
15 /**
16 * @description 修改数据产品目录合规信息
17 * @path /dam-catalog-table/compliance-info/update
18 * @method post
19 */
20
21 export const updateComplianceInfo = (params) => {
22 return request({
23 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/compliance-info/update`,
24 method: 'post',
25 data: params
26 })
27 }
...@@ -126,7 +126,6 @@ const getDetailInfo = () => { ...@@ -126,7 +126,6 @@ const getDetailInfo = () => {
126 if (res.code == proxy.$passCode) { 126 if (res.code == proxy.$passCode) {
127 const data = res.data || {}; 127 const data = res.data || {};
128 costAssessDetail.value = data; 128 costAssessDetail.value = data;
129 console.log('costAssessDetail', costAssessDetail.value);
130 evaDetailInfo.value = data; 129 evaDetailInfo.value = data;
131 deploymentId.value = data.approveVO.camundaDeploymentId; 130 deploymentId.value = data.approveVO.camundaDeploymentId;
132 processInstanceId.value = data.approveVO?.camundaInstanceId; 131 processInstanceId.value = data.approveVO?.camundaInstanceId;
...@@ -973,8 +972,8 @@ const formattedAmount = computed(() => { ...@@ -973,8 +972,8 @@ const formattedAmount = computed(() => {
973 </div> 972 </div>
974 </ContentWrap> 973 </ContentWrap>
975 <ContentWrap id="id-qualityEvaluate" 974 <ContentWrap id="id-qualityEvaluate"
976 v-if="route.query.type == 'qualityEvaluate' && evaDetailInfo.qualityScore != null" title="质量评价" 975 v-if="(route.query.type == 'qualityEvaluate' && evaDetailInfo.qualityScore != null) || (route.query.type == 'costAssess' && evaDetailInfo.qualityScore != null)"
977 description="资产质量评价信息" style="margin: 16px 16px 16px"> 976 title="质量评价" description="资产质量评价信息" style="margin: 16px 16px 16px">
978 <div class="list_panel"> 977 <div class="list_panel">
979 <div class="list_item"> 978 <div class="list_item">
980 <span class="item_label">质量得分:</span> 979 <span class="item_label">质量得分:</span>
......
...@@ -140,6 +140,27 @@ const getDetailInfo = () => { ...@@ -140,6 +140,27 @@ const getDetailInfo = () => {
140 tabsInfo.value.tabs.splice(3, 1); 140 tabsInfo.value.tabs.splice(3, 1);
141 } 141 }
142 } 142 }
143
144 if (data.qualityScore) {
145 // 确保"质量评价"标签存在于tabs中,并插入到"价值评估"前面
146 const qualityTabIndex = tabsInfo.value.tabs.findIndex(tab => tab.name === "qualityEvaluate");
147 const costAssessTabIndex = tabsInfo.value.tabs.findIndex(tab => tab.name === "costAssess");
148
149 if (qualityTabIndex === -1) {
150 if (costAssessTabIndex > -1) {
151 // 如果"价值评估"标签存在,插入"质量评价"在它之前
152 tabsInfo.value.tabs.splice(costAssessTabIndex, 0, { label: "质量评价", name: "qualityEvaluate", description: '质量评估相关信息' });
153 } else {
154 // 如果没有"价值评估"标签,插入到最后
155 tabsInfo.value.tabs.push({ label: "质量评价", name: "qualityEvaluate", description: '质量评估相关信息' });
156 }
157 }
158 evaDetailInfo.value.qualityScore = data.qualityScore;
159 evaDetailInfo.value.evaluationRangeStart = data.evaluationRangeStart;
160 evaDetailInfo.value.evaluationRangeEnd = data.evaluationRangeEnd;
161 evaDetailInfo.value.evaluationNote = data.evaluationNote;
162 evaDetailInfo.value.evaluationFile = data.evaluationFile;
163 }
143 if (fullPath === route.fullPath) { 164 if (fullPath === route.fullPath) {
144 document.title = `详情-${data.daName}`; 165 document.title = `详情-${data.daName}`;
145 } 166 }
...@@ -1690,8 +1711,9 @@ const formattedDate = (dateVal) => { ...@@ -1690,8 +1711,9 @@ const formattedDate = (dateVal) => {
1690 </div> 1711 </div>
1691 </div> 1712 </div>
1692 </ContentWrap> 1713 </ContentWrap>
1693 <ContentWrap id="id-qualityEvaluate" v-if="tabsInfo.tabs.find(t => t.name == 'qualityEvaluate')" title="质量评价" 1714 <ContentWrap id="id-qualityEvaluate"
1694 description="资产质量评价信息" expandSwicth style="margin-top: 15px" :isExpand="qualityEvaluateExpand" 1715 v-if="tabsInfo.tabs.find(t => t.name == 'qualityEvaluate') || (route.query.type == 'costAssess' && evaDetailInfo.qualityScore != null)"
1716 title="质量评价" description="资产质量评价信息" expandSwicth style="margin-top: 15px" :isExpand="qualityEvaluateExpand"
1695 @expand="(v) => qualityEvaluateExpand = v"> 1717 @expand="(v) => qualityEvaluateExpand = v">
1696 <div class="list_panel"> 1718 <div class="list_panel">
1697 <div class="list_item"> 1719 <div class="list_item">
......
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
3 </route> 3 </route>
4 4
5 <script lang="ts" setup name="securityMenu"> 5 <script lang="ts" setup name="securityMenu">
6 import { onUploadFilePreview } from '@/api/modules/common';
7 import { getComplianceInfoPageList, updateComplianceInfo } from '@/api/modules/securityMenu';
6 import TableTools from '@/components/Tools/table_tools.vue'; 8 import TableTools from '@/components/Tools/table_tools.vue';
9 import { ElMessage } from 'element-plus';
7 const { proxy } = getCurrentInstance() as any; 10 const { proxy } = getCurrentInstance() as any;
8 const dialogLabelFormRef = ref(); 11 const dialogLabelFormRef = ref();
9 12
...@@ -13,11 +16,7 @@ onBeforeMount(async () => { ...@@ -13,11 +16,7 @@ onBeforeMount(async () => {
13 }); 16 });
14 // 右侧表格配置 17 // 右侧表格配置
15 const tableDataList = ref([]); 18 const tableDataList = ref([]);
16 // 删除标签guids
17 const deleteLabelGuids = ref<any>([]);
18 19
19 // 保存编辑的guid
20 const editLabelRow = ref<any>('');
21 const page = ref({ 20 const page = ref({
22 limit: 50, 21 limit: 50,
23 curr: 1, 22 curr: 1,
...@@ -35,16 +34,41 @@ const tableInfo = ref({ ...@@ -35,16 +34,41 @@ const tableInfo = ref({
35 fixedSelection: true, 34 fixedSelection: true,
36 fields: [ 35 fields: [
37 { label: "序号", type: "index", width: 56, align: "center" }, 36 { label: "序号", type: "index", width: 56, align: "center" },
38 { label: "数据产品编号", field: "label", type: 'text_btn', class: 'drawer-detail-cell', width: 160, value: 'detail', columClass: 'text_btn' }, 37 { label: "数据产品编号", field: "label", width: 140, },
39 { 38 {
40 label: "数据产品名称", field: "classifyNames", width: 200, 39 label: "数据产品名称", field: "damName", width: 150,
41 }, 40 },
42 { label: "数据类型", field: "gradeDetailName", width: 100 }, 41 { label: "数据类型", field: "damTypeName", width: 100 },
43 { 42 {
44 label: '权力主体', field: 'bizState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 'Y', inactiveValue: 'N', switchWidth: 56, width: 100, align: 'center' 43 label: '权力主体', field: 'rightMain', width: 100,
45 }, 44 },
46 { label: "是否公共数据", field: "updateUserName", width: 120 }, 45 {
47 { label: "状态", field: "updateTime", width: 160 }, 46 label: "是否公共数据", field: "isPublicData", width: 120, getName: (scope) => {
47 return scope.isPublicData == "Y" ? '是' : '否';
48 }
49 },
50 {
51 label: "状态", field: "updateTime", width: 100, getName: (scope) => {
52 //状态(1:待上传 2:部分上传 3:全部上传 )
53 return statusList.find((item) => item.value == scope.row.state)?.label || '待上传';
54 }
55 },
56 {
57 label: "合规评估报告", field: "complianceEvaluateReport", width: 120, type: 'text_btn', value: 'complianceEvaluateReport', columClass: 'text_btn', getName: (scope) => {
58 return scope.row.complianceEvaluateReport?.length > 0 ? '预览' : '--';
59 }
60 },
61 {
62 label: "合规法律意见书", field: "complianceLegalOpinion", width: 130, type: 'text_btn', value: 'complianceLegalOpinion', columClass: 'text_btn', getName: (scope) => {
63 return scope.row.complianceLegalOpinion?.length > 0 ? '预览' : '--';
64 }
65 },
66 {
67 label: "入表合规方案", field: "entryComplianceProgram", width: 120, type: 'text_btn', value: 'entryComplianceProgram', columClass: 'text_btn', getName: (scope) => {
68 return scope.row.entryComplianceProgram?.length > 0 ? '预览' : '--';
69 }
70 },
71 { label: "操作时间", field: "updateTime", width: 120 },
48 ], 72 ],
49 data: tableDataList.value, 73 data: tableDataList.value,
50 page: { 74 page: {
...@@ -52,63 +76,91 @@ const tableInfo = ref({ ...@@ -52,63 +76,91 @@ const tableInfo = ref({
52 rows: 0, 76 rows: 0,
53 ...page.value, 77 ...page.value,
54 }, 78 },
79 loading: false,
55 actionInfo: { 80 actionInfo: {
56 label: "操作", 81 label: "操作",
57 type: "btn", 82 type: "btn",
58 width: 120, 83 width: 80,
59 fixed: 'right', 84 fixed: 'right',
60 btns: [ 85 btns: (scope) => {
61 { 86 if (scope.row.state == 3) {
62 label: "编辑", value: "edit", click: async (scope) => { 87 return [
63 console.log('编辑', scope); 88 {
64 } 89 label: "详情", value: "detail", click: (scope) => {
65 }, 90 tableTempValue.value = scope.row;
66 { 91 formItems.value.forEach((item) => {
67 label: "删除 ", value: "delete", click: (scope) => { 92 item.default = scope.row[item.field] || [];
68 console.log('删除', scope); 93 });
69 94 dialogInfo.value.visible = true;
70 } 95 },
71 }, 96 },
72 ] 97 ]
98 } else {
99 return [
100 {
101 label: "上传", value: "upload", click: (scope) => {
102 tableTempValue.value = scope.row;
103 formItems.value.forEach((item) => {
104 item.default = scope.row[item.field] || [];
105 });
106 dialogInfo.value.visible = true;
107 },
108 },
109 ]
110 }
111 },
73 }, 112 },
74 loading: false
75 }); 113 });
76 114
115 const tableBtnClick = (scope, btn) => {
116 const type = btn.value;
117 const row = scope.row;
118 if ((type == 'complianceEvaluateReport' && row.complianceEvaluateReport.length > 0)) {
119 onUploadFilePreview(row.complianceEvaluateReport[0]);
120 }
121 else if ((type == 'complianceLegalOpinion' && row.complianceLegalOpinion.length > 0)) {
122 onUploadFilePreview(row.complianceLegalOpinion[0]);
123 }
124 else if ((type == 'entryComplianceProgram' && row.entryComplianceProgram.length > 0)) {
125 onUploadFilePreview(row.entryComplianceProgram[0]);
126 }
127 }
128
77 129
78 130
79 const formItems = ref([ 131 const formItems = ref([
80 { 132 {
81 label: '附件上传', 133 label: '合规评估报告',
82 tip: '支持格式:pdf,单个文件不能超过10MB ', 134 tip: '支持格式:pdf,单个文件不能超过10MB ',
83 type: 'upload-file', 135 type: 'upload-file',
84 accept: '.pdf', 136 accept: '.pdf',
85 field: 'costAssessmentFile', 137 field: 'complianceEvaluateReport',
86 templateUrl: '', 138 templateUrl: '',
87 required: true, 139 required: false,
88 block: true, 140 block: true,
89 visible: true, 141 visible: true,
90 default: [], 142 default: [],
91 }, 143 },
92 { 144 {
93 label: '附件上传', 145 label: '合规法律意见书',
94 tip: '支持格式:pdf,单个文件不能超过10MB ', 146 tip: '支持格式:pdf,单个文件不能超过10MB ',
95 type: 'upload-file', 147 type: 'upload-file',
96 accept: '.pdf', 148 accept: '.pdf',
97 field: 'costAssessmentFile1', 149 field: 'complianceLegalOpinion',
98 templateUrl: '', 150 templateUrl: '',
99 required: true, 151 required: false,
100 block: true, 152 block: true,
101 visible: true, 153 visible: true,
102 default: [], 154 default: [],
103 }, 155 },
104 { 156 {
105 label: '附件上传', 157 label: '入表合规方案',
106 tip: '支持格式:pdf,单个文件不能超过10MB ', 158 tip: '支持格式:pdf,单个文件不能超过10MB ',
107 type: 'upload-file', 159 type: 'upload-file',
108 accept: '.pdf', 160 accept: '.pdf',
109 field: 'costAssessmentFile2', 161 field: 'entryComplianceProgram',
110 templateUrl: '', 162 templateUrl: '',
111 required: true, 163 required: false,
112 block: true, 164 block: true,
113 visible: true, 165 visible: true,
114 default: [], 166 default: [],
...@@ -116,18 +168,7 @@ const formItems = ref([ ...@@ -116,18 +168,7 @@ const formItems = ref([
116 ]); 168 ]);
117 169
118 const formRules = ref({ 170 const formRules = ref({
119 registerGuid: [ 171
120 { required: true, trigger: 'change', message: "请填写资产名称" }
121 ],
122 costAssessmentFile: [{
123 validator: (rule: any, value: any, callback: any) => {
124 if (!value?.length) {
125 callback(new Error('请上传数据价值评估附件'))
126 } else {
127 callback();
128 }
129 }, trigger: 'change'
130 }]
131 }); 172 });
132 173
133 const dialogInfo = ref({ 174 const dialogInfo = ref({
...@@ -135,7 +176,7 @@ const dialogInfo = ref({ ...@@ -135,7 +176,7 @@ const dialogInfo = ref({
135 size: 510, 176 size: 510,
136 direction: "column", 177 direction: "column",
137 header: { 178 header: {
138 title: "价值评估发起", 179 title: "合规信息",
139 }, 180 },
140 type: '',//标识是否是重新提交 181 type: '',//标识是否是重新提交
141 contents: [ 182 contents: [
...@@ -157,22 +198,72 @@ const dialogInfo = ref({ ...@@ -157,22 +198,72 @@ const dialogInfo = ref({
157 }, 198 },
158 }); 199 });
159 200
160 const dialogBtnClick = () => { 201 const tableTempValue = ref<any>('');
161 console.log('handleSelectChange'); 202 const dialogBtnClick = (btn, info) => {
203 console.log('currTableData', info);
204 if (btn.value == 'submit') {
205 tableInfo.value.loading = true;
206 let params: any = {
207 damGuid: tableTempValue.value.guid,
208 complianceEvaluateReport: info.complianceEvaluateReport?.map(file => {
209 return {
210 name: file.name,
211 url: file.url
212 }
213 }) || [],
214 complianceLegalOpinion: info.complianceLegalOpinion?.map(file => {
215 return {
216 name: file.name,
217 url: file.url
218 }
219 }) || [],
220 entryComplianceProgram: info.entryComplianceProgram?.map(file => {
221 return {
222 name: file.name,
223 url: file.url
224 }
225 }) || [],
226 }
227 updateComplianceInfo(params).then((res: any) => {
228 tableInfo.value.loading = false;
229 if (res?.code == proxy.$passCode) {
230 if (res.data) {
231 ElMessage.success('上传成功');
232 dialogInfo.value.visible = false;
233 getTableData();
234 } else {
235 ElMessage.error('上传失败');
236 }
237 } else {
238 ElMessage.error(res.msg);
239 }
240 }).catch(() => {
241 tableInfo.value.loading = false;
242 });
243 }
244 else if (btn.value == 'cancel') {
245 dialogInfo.value.visible = false;
246 }
162 }; 247 };
163 248
164 249
250 //状态(1:待上传 2:部分上传 3:全部上传 )
251
252 const statusList = [
253 { label: '待上传', value: 1 },
254 { label: '部分上传', value: 2 },
255 { label: '全部上传', value: 3 },
256 ];
257
165 const classSearchItemList = ref<any>([ 258 const classSearchItemList = ref<any>([
166 { 259 {
167 type: 'select', 260 type: 'input',
168 multiple: true, 261 multiple: true,
169 label: '', 262 label: '',
170 field: 'labelName', 263 field: 'damName',
171 default: [], 264 default: '',
172 options: [], 265 placeholder: '请输入产品类型',
173 placeholder: '请选择标签名称',
174 clearable: true, 266 clearable: true,
175 filterable: true,
176 visible: true 267 visible: true
177 }, 268 },
178 // 状态,可以编辑。 269 // 状态,可以编辑。
...@@ -183,43 +274,54 @@ const classSearchItemList = ref<any>([ ...@@ -183,43 +274,54 @@ const classSearchItemList = ref<any>([
183 label: '', 274 label: '',
184 field: 'state', 275 field: 'state',
185 default: [], 276 default: [],
186 options: [], 277 options: statusList,
187 placeholder: '状态', 278 multiply: true,
279 placeholder: '请选择状态',
188 clearable: true, 280 clearable: true,
189 filterable: true, 281 filterable: true,
190 visible: true 282 visible: true
191 } 283 }
192 284
193 ]); 285 ]);
194 286 const searchItemValue: any = ref({});
195 const guids = ref<any>([])
196 const selectChange = async (val: any, row: any) => {
197 console.log('selectChange', val, row);
198 if (val) {
199 guids.value = val;
200 }
201 };
202
203 /** 搜索查询分类标准 */ 287 /** 搜索查询分类标准 */
204 const refCount = ref(0); 288 const toSearch = (val: any, clear: boolean = false) => {
205 const searchClass = async (val: any, clear: boolean = false) => {
206 console.log('searchClass', val, clear);
207 if (clear) { 289 if (clear) {
208 classSearchItemList.value.map(item => item.default = '') 290 classSearchItemList.value.map((item) => (item.default = ""));
209 guids.value = [] 291 searchItemValue.value = {};
210 292 } else {
211 return; 293 searchItemValue.value = Object.keys(val).length ? { ...val } : {};
212 } 294 }
213 if (val?.labelName?.length !== 0 || refCount.value >= 1) { 295 page.value.curr = 1;
214 296 tableInfo.value.page.curr = 1;
215 } 297 getTableData();
216
217 }; 298 };
218 299
219 const addNewLabel = () => { 300 const tablePageChange = (info) => {
220 dialogInfo.value.visible = true; 301 page.value.curr = Number(info.curr);
221 } 302 page.value.limit = Number(info.limit);
303 getTableData();
304 };
222 305
306 const getTableData = () => {
307 tableInfo.value.loading = true;
308 getComplianceInfoPageList(
309 Object.assign({}, searchItemValue.value, {
310 pageIndex: page.value.curr,
311 pageSize: page.value.limit,
312 })
313 )
314 .then((res: any) => {
315 tableInfo.value.loading = false;
316 tableInfo.value.data = res.data.records || [];
317 tableInfo.value.page.curr = res.data.pageIndex;
318 tableInfo.value.page.limit = res.data.pageSize;
319 tableInfo.value.page.rows = res.data.totalRows;
320 })
321 .catch((res) => {
322 tableInfo.value.loading = false;
323 });
324 };
223 325
224 326
225 </script> 327 </script>
...@@ -230,16 +332,10 @@ const addNewLabel = () => { ...@@ -230,16 +332,10 @@ const addNewLabel = () => {
230 <div class="container_wrap"> 332 <div class="container_wrap">
231 <div class="main_wrap"> 333 <div class="main_wrap">
232 <div class="main_wrap-top-area"> 334 <div class="main_wrap-top-area">
233 <TableTools :searchItems="classSearchItemList" :searchId="'template-manage-search'" @search="searchClass" 335 <TableTools :searchItems="classSearchItemList" :searchId="'template-manage-search'" @search="toSearch" />
234 @select-change="selectChange" />
235 </div>
236 <div>
237 <el-button type="primary" class="v-add" @click="addNewLabel">新增</el-button>
238 <!-- <el-button class="v-import">导入</el-button>
239 <el-button>导出</el-button> -->
240 </div> 336 </div>
241 <div class="table_panel_wrap"> 337 <div class="table_panel_wrap">
242 <Table :tableInfo="tableInfo" /> 338 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
243 </div> 339 </div>
244 </div> 340 </div>
245 </div> 341 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!