93c44ebe by lxs

Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop

2 parents 7baee977 f9a212b4
...@@ -242,14 +242,14 @@ export const getParamsList = () => request({ ...@@ -242,14 +242,14 @@ export const getParamsList = () => request({
242 242
243 /** 获取参数类型列表 */ 243 /** 获取参数类型列表 */
244 export const getDamTypesList = () => request({ 244 export const getDamTypesList = () => request({
245 url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`, 245 url:`${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-dict/get-data-list`,
246 method: 'post', 246 method: 'post',
247 data: { paramCode: "DAM-TYPE" } 247 data: { paramCode: "DAM-TYPE" }
248 }) 248 })
249 249
250 /** 获取所属主题的四级参数类型列表 */ 250 /** 获取所属主题的四级参数类型列表 */
251 export const getSubjectDoaminList = () => request({ 251 export const getSubjectDoaminList = () => request({
252 url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-tree`, 252 url:`${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-dict/get-data-tree`,
253 method: 'post', 253 method: 'post',
254 data: { paramCode: "SUBJECT-DOMAIN" } 254 data: { paramCode: "SUBJECT-DOMAIN" }
255 }) 255 })
...@@ -262,85 +262,85 @@ export const getDataTypeList = () => request({ ...@@ -262,85 +262,85 @@ export const getDataTypeList = () => request({
262 }) 262 })
263 263
264 export const getDamCatalogTable = (params) => request({ 264 export const getDamCatalogTable = (params) => request({
265 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/page-list`, 265 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/page-list`,
266 method: 'post', 266 method: 'post',
267 data: params 267 data: params
268 }) 268 })
269 269
270 /** 删除数据资产目录 */ 270 /** 删除数据资产目录 */
271 export const registerCatalogDelete = (params) => request({ 271 export const registerCatalogDelete = (params) => request({
272 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/delete`, 272 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/delete`,
273 method: 'delete', 273 method: 'delete',
274 data: params 274 data: params
275 }); 275 });
276 276
277 /** 保存数据资产目录 */ 277 /** 保存数据资产目录 */
278 export const registerCatalogSave = (params) => request({ 278 export const registerCatalogSave = (params) => request({
279 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/save`, 279 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/save`,
280 method: 'post', 280 method: 'post',
281 data: params 281 data: params
282 }); 282 });
283 283
284 /** 验证资产名称是否存在 */ 284 /** 验证资产名称是否存在 */
285 export const existDamName = (params) => request({ 285 export const existDamName = (params) => request({
286 url:`${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/exists?damName=${params}`, 286 url:`${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/exists?damName=${params}`,
287 method: 'get' 287 method: 'get'
288 }); 288 });
289 289
290 /** 获取资产目录基本信息的详情 */ 290 /** 获取资产目录基本信息的详情 */
291 export const getRegisterCatalogDetail = (guid) => request({ 291 export const getRegisterCatalogDetail = (guid) => request({
292 url:`${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/detail?guid=${guid}`, 292 url:`${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/detail?guid=${guid}`,
293 method: 'get' 293 method: 'get'
294 }); 294 });
295 295
296 /** 获取资产目录表的详情 */ 296 /** 获取资产目录表的详情 */
297 export const getRegisterCatalogTableDetail = (subjectGuid) => request({ 297 export const getRegisterCatalogTableDetail = (subjectGuid) => request({
298 url:`${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/get-table-detail?subjectGuid=${subjectGuid}`, 298 url:`${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-table-detail?subjectGuid=${subjectGuid}`,
299 method: 'get' 299 method: 'get'
300 }); 300 });
301 301
302 /** 编辑资产目录基本信息 */ 302 /** 编辑资产目录基本信息 */
303 export const registerCatalogUpdate = (params) => request({ 303 export const registerCatalogUpdate = (params) => request({
304 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/update`, 304 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/update`,
305 method: 'post', 305 method: 'post',
306 data: params 306 data: params
307 }); 307 });
308 308
309 /** 新增资产目录表 */ 309 /** 新增资产目录表 */
310 export const registerCatalogTableSave = (params) => request({ 310 export const registerCatalogTableSave = (params) => request({
311 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/add-table`, 311 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/add-table`,
312 method: 'post', 312 method: 'post',
313 data: params 313 data: params
314 }); 314 });
315 315
316 /** 编辑资产目录表 */ 316 /** 编辑资产目录表 */
317 export const registerCatalogTableUpdate = (params) => request({ 317 export const registerCatalogTableUpdate = (params) => request({
318 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/update-table`, 318 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/update-table`,
319 method: 'post', 319 method: 'post',
320 data: params 320 data: params
321 }); 321 });
322 322
323 /** 删除资产目录表 */ 323 /** 删除资产目录表 */
324 export const registerCatalogTableDelete = (params) => request({ 324 export const registerCatalogTableDelete = (params) => request({
325 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/remove-table?damGuid=${params.damGuid}&subjectGuid=${params.subjectGuid}`, 325 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/remove-table?damGuid=${params.damGuid}&subjectGuid=${params.subjectGuid}`,
326 method: 'post' 326 method: 'post'
327 }); 327 });
328 328
329 /** 获取资产目录表 */ 329 /** 获取资产目录表 */
330 export const getRegisterCatalogTableList = (damGuid) => request({ 330 export const getRegisterCatalogTableList = (damGuid) => request({
331 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/get-table-list?damGuid=${damGuid}`, 331 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-table-list?damGuid=${damGuid}`,
332 method: 'get' 332 method: 'get'
333 }); 333 });
334 334
335 /** 查看资产表数据 */ 335 /** 查看资产表数据 */
336 export const queryData = (subjectGuid) => request({ 336 export const queryData = (subjectGuid) => request({
337 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/preview-data/${subjectGuid}`, 337 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/preview-data/${subjectGuid}`,
338 method: 'get' 338 method: 'get'
339 }); 339 });
340 340
341 /** 验证新增和编辑资产表 */ 341 /** 验证新增和编辑资产表 */
342 export const checkDamTableChange = (params) => request({ 342 export const checkDamTableChange = (params) => request({
343 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/check-table-change`, 343 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/check-table-change`,
344 method: 'post', 344 method: 'post',
345 data: params 345 data: params
346 }); 346 });
...@@ -349,14 +349,14 @@ export const checkDamTableChange = (params) => request({ ...@@ -349,14 +349,14 @@ export const checkDamTableChange = (params) => request({
349 /** ------------------ 公示异议处理 -------------------------------- */ 349 /** ------------------ 公示异议处理 -------------------------------- */
350 /** 获取异议列表数据 */ 350 /** 获取异议列表数据 */
351 export const getDissentList = (params) => request({ 351 export const getDissentList = (params) => request({
352 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-dissent-handle/page-list`, 352 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-dissent-handle/page-list`,
353 method: 'post', 353 method: 'post',
354 data: params 354 data: params
355 }) 355 })
356 356
357 /** 更新异议处理 */ 357 /** 更新异议处理 */
358 export const updateDissentState = (params) => request({ 358 export const updateDissentState = (params) => request({
359 url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-dissent-handle/update-state`, 359 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-dissent-handle/update-state`,
360 method: 'post', 360 method: 'post',
361 data: params 361 data: params
362 }) 362 })
......
...@@ -7,9 +7,10 @@ export const getHomeServiceInfo = () => request({ ...@@ -7,9 +7,10 @@ export const getHomeServiceInfo = () => request({
7 }) 7 })
8 8
9 /** 获取首页资产统计信息 */ 9 /** 获取首页资产统计信息 */
10 export const getStatisticsInfo = () => request({ 10 export const getStatisticsInfo = (data) => request({
11 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/company/statistics-info`, 11 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/company/statistics-info`,
12 method: 'get', 12 method: 'post',
13 data
13 }) 14 })
14 15
15 /** 获取首页资产登记情况 */ 16 /** 获取首页资产登记情况 */
...@@ -20,9 +21,10 @@ export const getRegisterInfo = (params) => request({ ...@@ -20,9 +21,10 @@ export const getRegisterInfo = (params) => request({
20 }) 21 })
21 22
22 /** 获取首页资产质量情况 */ 23 /** 获取首页资产质量情况 */
23 export const getQualityInfo = () => request({ 24 export const getQualityInfo = (data) => request({
24 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/company/quality-info`, 25 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/company/quality-info`,
25 method: 'get', 26 method: 'post',
27 data
26 }) 28 })
27 29
28 /** 获取首页资产交易情况 */ 30 /** 获取首页资产交易情况 */
...@@ -40,43 +42,50 @@ export const getFinanceInfo = (params) => request({ ...@@ -40,43 +42,50 @@ export const getFinanceInfo = (params) => request({
40 }) 42 })
41 43
42 /** 获取资产证件照url */ 44 /** 获取资产证件照url */
43 export const getRegisterUrl = () => request({ 45 export const getRegisterUrl = (data) => request({
44 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/company/list-doc-url`, 46 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/company/list-doc-url`,
45 method: 'get', 47 method: 'post',
48 data
46 }) 49 })
47 50
48 /** 获取资产行业类型分布 */ 51 /** 获取资产行业类型分布 */
49 export const getIndustryInfo = () => request({ 52 export const getIndustryInfo = (data) => request({
50 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/industry-statistics`, 53 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/industry-statistics`,
51 method: 'get', 54 method: 'post',
55 data
52 }) 56 })
53 57
54 /** 获取平台授信主体金额分布 */ 58 /** 获取平台授信主体金额分布 */
55 export const getCreditMoneyInfo = () => request({ 59 export const getCreditMoneyInfo = (data) => request({
56 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/credit-money-statistics`, 60 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/credit-money-statistics`,
57 method: 'get', 61 method: 'post',
62 data
58 }) 63 })
59 64
60 /** 获取平台资产统计信息 */ 65 /** 获取平台资产统计信息 */
61 export const getPlatformStatisticsInfo = () => request({ 66 export const getPlatformStatisticsInfo = (data) => request({
62 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/statistics-info`, 67 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/statistics-info`,
63 method: 'get', 68 method: 'post',
69 data
64 }) 70 })
65 71
66 /** 获取平台服务企业地区分布 */ 72 /** 获取平台服务企业地区分布 */
67 export const getPlatformService = () => request({ 73 export const getPlatformService = (data) => request({
68 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/service-statistics`, 74 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/service-statistics`,
69 method: 'get', 75 method: 'post',
76 data
70 }) 77 })
71 78
72 /** 获取平台服务企业地区分布-按省 */ 79 /** 获取平台服务企业地区分布-按省 */
73 export const getPlatformProvinceService = () => request({ 80 export const getPlatformProvinceService = (data) => request({
74 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/service-statistics-province`, 81 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/service-statistics-province`,
75 method: 'get', 82 method: 'post',
83 data
76 }) 84 })
77 85
78 /** 获取平台数据资产登记趋势 */ 86 /** 获取平台数据资产登记趋势 */
79 export const getPlatformMonth = () => request({ 87 export const getPlatformMonth = (data) => request({
80 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/register-month-statistics`, 88 url: `${import.meta.env.VITE_API_NEW_PORTAL}/home/platform/register-month-statistics`,
81 method: 'get', 89 method: 'post',
90 data
82 }) 91 })
......
...@@ -142,7 +142,7 @@ export const getTableFieldLineage = (params) => request({ ...@@ -142,7 +142,7 @@ export const getTableFieldLineage = (params) => request({
142 142
143 /** 获取表的所有字段血缘数据 */ 143 /** 获取表的所有字段血缘数据 */
144 export const getTableAllFieldLineage = (params) => request({ 144 export const getTableAllFieldLineage = (params) => request({
145 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/lineage-query-field?databaseName=${params.databaseName}&tableName=${params.tableName}`, 145 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/lineage-query-field?databaseName=${params.databaseName}&tableName=${params.tableName}&tableGuid=${params.tableGuid}`,
146 method: 'get', 146 method: 'get',
147 }) 147 })
148 148
......
...@@ -155,8 +155,14 @@ const batchDelete = () => { ...@@ -155,8 +155,14 @@ const batchDelete = () => {
155 selectedRows.value = []; 155 selectedRows.value = [];
156 }; 156 };
157 157
158 // 暂存编辑的行数据
159 const tempRowData = ref<any>();
160
158 // 编辑行 161 // 编辑行
159 const editRow = (row) => { 162 const editRow = (row) => {
163 console.log('编辑:', row);
164 // 暂存编辑前的数据
165 tempRowData.value = { ...row };
160 if (row.fieldLengthCondition) { 166 if (row.fieldLengthCondition) {
161 const arr = row.fieldLengthCondition.split('#') 167 const arr = row.fieldLengthCondition.split('#')
162 row.lengthSymbol = arr[0] 168 row.lengthSymbol = arr[0]
...@@ -307,6 +313,15 @@ const cancel = () => { ...@@ -307,6 +313,15 @@ const cancel = () => {
307 }); 313 });
308 } 314 }
309 315
316 // 点击取消
317 const cancelEdit = (row) => {
318 console.log('取消编辑:', row);
319 // 可在此恢复原始数据逻辑,如果需要
320 Object.assign(row, tempRowData.value);
321
322 row.isEdit = false; // 退出编辑状态
323 }
324
310 </script> 325 </script>
311 <template> 326 <template>
312 <div class="configure-rules"> 327 <div class="configure-rules">
...@@ -323,11 +338,11 @@ const cancel = () => { ...@@ -323,11 +338,11 @@ const cancel = () => {
323 <el-table-column prop="description" label="描述" width="180" show-overflow-tooltip /> 338 <el-table-column prop="description" label="描述" width="180" show-overflow-tooltip />
324 </el-table> 339 </el-table>
325 </div> 340 </div>
326 <div class="btn-area"> 341 <!-- <div class="btn-area">
327 <el-button @click="moveUp">上移</el-button> 342 <el-button @click="moveUp">上移</el-button>
328 <el-button @click="moveDown">下移</el-button> 343 <el-button @click="moveDown">下移</el-button>
329 <el-button @click="batchDelete">批量删除</el-button> 344 <el-button @click="batchDelete">批量删除</el-button>
330 </div> 345 </div> -->
331 <div class="bottom_table"> 346 <div class="bottom_table">
332 <el-table :data="tableData" v-loading="tableFieldsLoading" :highlight-current-row="true" stripe border 347 <el-table :data="tableData" v-loading="tableFieldsLoading" :highlight-current-row="true" stripe border
333 height="100%" row-key="guid" @selection-change="selectionFieldsChange" tooltip-effect="light" :style="{ 348 height="100%" row-key="guid" @selection-change="selectionFieldsChange" tooltip-effect="light" :style="{
...@@ -351,9 +366,9 @@ const cancel = () => { ...@@ -351,9 +366,9 @@ const cancel = () => {
351 </template> 366 </template>
352 </el-table-column> 367 </el-table-column>
353 <!-- 分类(不可编辑)classifyName --> 368 <!-- 分类(不可编辑)classifyName -->
354 <el-table-column prop="classifyName" label="分类" width="80" show-overflow-tooltip> 369 <el-table-column prop="classifyDetailName" label="分类" width="120" show-overflow-tooltip>
355 <template #default="scope"> 370 <template #default="scope">
356 {{ scope.row.classifyName ? scope.row.classifyName : '--' }} 371 {{ scope.row.classifyDetailName ? scope.row.classifyDetailName : '--' }}
357 </template> 372 </template>
358 </el-table-column> 373 </el-table-column>
359 <!-- 分级(不可编辑) --> 374 <!-- 分级(不可编辑) -->
...@@ -383,6 +398,8 @@ const cancel = () => { ...@@ -383,6 +398,8 @@ const cancel = () => {
383 <el-option label="大于" value=">"></el-option> 398 <el-option label="大于" value=">"></el-option>
384 <el-option label="等于" value="="></el-option> 399 <el-option label="等于" value="="></el-option>
385 <el-option label="小于" value="<"></el-option> 400 <el-option label="小于" value="<"></el-option>
401 <el-option label="大于等于" value=">="></el-option>
402 <el-option label="小于等于" value="<="></el-option>
386 </el-select> 403 </el-select>
387 <el-input v-model="scope.row.lengthValue" placeholder="请输入" style="width: 45%;" /> 404 <el-input v-model="scope.row.lengthValue" placeholder="请输入" style="width: 45%;" />
388 </div> 405 </div>
...@@ -411,7 +428,8 @@ const cancel = () => { ...@@ -411,7 +428,8 @@ const cancel = () => {
411 <!-- 数据是否唯一(可编辑) --> 428 <!-- 数据是否唯一(可编辑) -->
412 <el-table-column prop="isUnique" label="数据是否唯一" width="150" align="center"> 429 <el-table-column prop="isUnique" label="数据是否唯一" width="150" align="center">
413 <template #default="scope"> 430 <template #default="scope">
414 <span v-if="!scope.row.isEdit || !editableFields.isUnique">{{ scope.row.isUnique ? scope.row.isUnique : '--' 431 <span v-if="!scope.row.isEdit || !editableFields.isUnique">{{ scope.row.isUnique ? (scope.row.isUnique ===
432 'Y' ? '是' : '否') : '--'
415 }}</span> 433 }}</span>
416 <el-select v-else v-model="scope.row.isUnique" placeholder="请选择"> 434 <el-select v-else v-model="scope.row.isUnique" placeholder="请选择">
417 <el-option label="是" value="Y" /> 435 <el-option label="是" value="Y" />
...@@ -420,10 +438,11 @@ const cancel = () => { ...@@ -420,10 +438,11 @@ const cancel = () => {
420 </template> 438 </template>
421 </el-table-column> 439 </el-table-column>
422 <!-- 是否必填(可编辑) --> 440 <!-- 是否必填(可编辑) -->
423 <el-table-column prop="isRequired" label="是否必填" width="120" align="center"> 441 <el-table-column prop="notNull" label="是否必填" width="120" align="center">
424 <template #default="scope"> 442 <template #default="scope">
425 <span v-if="!scope.row.isEdit">{{ scope.row.isRequired ? scope.row.isRequired : '--' }}</span> 443 <span v-if="!scope.row.isEdit">{{ scope.row.notNull ? (scope.row.notNull === 'Y' ? '是' : '否') : '--'
426 <el-select v-else v-model="scope.row.isRequired" placeholder="请选择"> 444 }}</span>
445 <el-select v-else v-model="scope.row.notNull" placeholder="请选择">
427 <el-option label="是" value="Y" /> 446 <el-option label="是" value="Y" />
428 <el-option label="否" value="N" /> 447 <el-option label="否" value="N" />
429 </el-select> 448 </el-select>
...@@ -448,14 +467,17 @@ const cancel = () => { ...@@ -448,14 +467,17 @@ const cancel = () => {
448 </el-table-column> 467 </el-table-column>
449 468
450 <!-- 操作列 --> 469 <!-- 操作列 -->
451 <el-table-column label="操作" width="100" align="center" fixed="right"> 470 <el-table-column label="操作" width="120" align="center" fixed="right">
452 <template #default="scope"> 471 <template #default="scope">
453 <span class="text_btn" v-if="!scope.row.isEdit" @click="editRow(scope.row)">编辑</span> 472 <span class="text_btn" v-if="!scope.row.isEdit" @click="editRow(scope.row)">编辑</span>
454 <span class="text_btn" v-else @click="saveRow(scope.row)">保存</span> 473 <span v-else>
455 <el-divider direction="vertical" /> 474 <span class="text_btn" @click="saveRow(scope.row)">保存</span>
456 <span class="text_btn" @click="deleteRow(scope.$index)">删除</span> 475 <el-divider direction="vertical" />
476 <span class="text_btn" @click="cancelEdit(scope.row)">取消</span>
477 </span>
457 </template> 478 </template>
458 </el-table-column> 479 </el-table-column>
480
459 </el-table> 481 </el-table>
460 </div> 482 </div>
461 <div class="botton_btn"> 483 <div class="botton_btn">
...@@ -485,7 +507,7 @@ const cancel = () => { ...@@ -485,7 +507,7 @@ const cancel = () => {
485 507
486 :deep(.bottom_table) { 508 :deep(.bottom_table) {
487 margin-top: 12px; 509 margin-top: 12px;
488 height: calc(100% - 150px); 510 height: calc(100% - 115px);
489 overflow-y: auto; 511 overflow-y: auto;
490 512
491 .el-table td.el-table__cell { 513 .el-table td.el-table__cell {
......
...@@ -320,7 +320,7 @@ watch( ...@@ -320,7 +320,7 @@ watch(
320 if (val?.length && !currDatasourceSelect.value?.tableName) { 320 if (val?.length && !currDatasourceSelect.value?.tableName) {
321 currDatasourceSelect.value = val[0]; 321 currDatasourceSelect.value = val[0];
322 } 322 }
323 emits("datasourceSelectedChange", val, databaseGuid.value); 323 emits("datasourceSelectedChange", val, currDatasourceSelect.value);
324 }, 324 },
325 { 325 {
326 deep: true, 326 deep: true,
...@@ -361,9 +361,9 @@ const getTextAlign = (field) => { ...@@ -361,9 +361,9 @@ const getTextAlign = (field) => {
361 <el-table-column type="selection" :width="22" align="center" /> 361 <el-table-column type="selection" :width="22" align="center" />
362 <el-table-column prop="tableName" label="名称" width="100px" align="left" show-overflow-tooltip> 362 <el-table-column prop="tableName" label="名称" width="100px" align="left" show-overflow-tooltip>
363 </el-table-column> 363 </el-table-column>
364 <el-table-column prop="tableComment" label="表注释" width="60px" align="left" show-overflow-tooltip> 364 <el-table-column prop="tableChName" label="表中文名称" width="80px" align="left" show-overflow-tooltip>
365 <template #default="scope"> 365 <template #default="scope">
366 <span>{{ scope.row['tableComment'] ?? '--' }}</span> 366 <span>{{ scope.row['tableChName'] ?? '--' }}</span>
367 </template> 367 </template>
368 </el-table-column> 368 </el-table-column>
369 </el-table> 369 </el-table>
...@@ -497,7 +497,7 @@ const getTextAlign = (field) => { ...@@ -497,7 +497,7 @@ const getTextAlign = (field) => {
497 height: calc(100% - 80px); 497 height: calc(100% - 80px);
498 498
499 .content-left { 499 .content-left {
500 width: 200px; 500 width: 220px;
501 border-right: 1px solid #d9d9d9; 501 border-right: 1px solid #d9d9d9;
502 502
503 .title-left { 503 .title-left {
...@@ -532,7 +532,7 @@ const getTextAlign = (field) => { ...@@ -532,7 +532,7 @@ const getTextAlign = (field) => {
532 } 532 }
533 533
534 .content-right { 534 .content-right {
535 width: calc(100% - 200px); 535 width: calc(100% - 220px);
536 536
537 .title-right { 537 .title-right {
538 height: 44px; 538 height: 44px;
......
...@@ -284,7 +284,7 @@ const loadTreeNode = (node, resolve) => { ...@@ -284,7 +284,7 @@ const loadTreeNode = (node, resolve) => {
284 }) 284 })
285 node.data.children = data; 285 node.data.children = data;
286 nextTick(() => { 286 nextTick(() => {
287 treeInfo.value.currentNodeKey && treeInfoRef.value.setCurrentKey(treeInfo.value.currentNodeKey); 287 treeInfo.value.currentNodeKey && treeInfoRef.value.setCurrentKey(treeInfo.value.currentNodeKey);
288 treeInfo.value.currentNodeKey && isCurrentNodeField && scrollToNode(treeInfo.value.currentNodeKey); 288 treeInfo.value.currentNodeKey && isCurrentNodeField && scrollToNode(treeInfo.value.currentNodeKey);
289 let node1 = treeInfoRef.value.treeRef.store.nodesMap[treeInfo.value.currentNodeKey]; 289 let node1 = treeInfoRef.value.treeRef.store.nodesMap[treeInfo.value.currentNodeKey];
290 if (node1) { 290 if (node1) {
...@@ -1010,7 +1010,7 @@ const getTableFieldLineageMap = () => { ...@@ -1010,7 +1010,7 @@ const getTableFieldLineageMap = () => {
1010 const getAllTableFieldLineageMap = () => { 1010 const getAllTableFieldLineageMap = () => {
1011 lineageLoading.value = true; 1011 lineageLoading.value = true;
1012 isFieldLineage.value = true; 1012 isFieldLineage.value = true;
1013 getTableAllFieldLineage({ databaseName: lastClickNode.value.databaseName, tableName: lastClickNode.value.tableName }).then((res: any) => { 1013 getTableAllFieldLineage({ databaseName: lastClickNode.value.databaseName, tableName: lastClickNode.value.tableName, tableGuid: lastClickNode.value.guid }).then((res: any) => {
1014 if (res.code == proxy.$passCode) { 1014 if (res.code == proxy.$passCode) {
1015 let data1 = res.data || []; 1015 let data1 = res.data || [];
1016 lineageData.value = data1; 1016 lineageData.value = data1;
...@@ -1152,4 +1152,4 @@ const handleLineageSwitchChange = (val, type) => { ...@@ -1152,4 +1152,4 @@ const handleLineageSwitchChange = (val, type) => {
1152 z-index: 10000; 1152 z-index: 10000;
1153 /* 设置一个较高的z-index值确保在最上层显示 */ 1153 /* 设置一个较高的z-index值确保在最上层显示 */
1154 } 1154 }
1155 </style>
...\ No newline at end of file ...\ No newline at end of file
1155 </style>
......
...@@ -100,11 +100,11 @@ const fieldTableInfo = ref({ ...@@ -100,11 +100,11 @@ const fieldTableInfo = ref({
100 //跳转倒查看血缘页面。 100 //跳转倒查看血缘页面。
101 let row = scope.row; 101 let row = scope.row;
102 set({ 102 set({
103 tableGuid: sheetInfo.value.guid, 103 tableGuid: sheetInfo.value.guid,
104 table: sheetInfo.value.tableName, 104 table: sheetInfo.value.tableName,
105 databas: sheetInfo.value.databaseName, 105 databas: sheetInfo.value.databaseName,
106 databaseCh: sheetInfo.value.databaseChName, 106 databaseCh: sheetInfo.value.databaseChName,
107 dsGuid: sheetInfo.value.databaseGuid, 107 dsGuid: sheetInfo.value.databaseGuid,
108 fGuid: row.guid, 108 fGuid: row.guid,
109 fEnName: row.enName 109 fEnName: row.enName
110 }) 110 })
...@@ -191,7 +191,7 @@ const tabsPaneMap = ref({ ...@@ -191,7 +191,7 @@ const tabsPaneMap = ref({
191 type: 'table', 191 type: 'table',
192 tableInfo: fieldTableInfo.value, 192 tableInfo: fieldTableInfo.value,
193 show: true 193 show: true
194 }, 194 },
195 { 195 {
196 title: '索引信息', 196 title: '索引信息',
197 type: 'table', 197 type: 'table',
...@@ -680,11 +680,11 @@ const handleRefres = () => { ...@@ -680,11 +680,11 @@ const handleRefres = () => {
680 const handleEdit = () => { 680 const handleEdit = () => {
681 lineageGraph.value[0].handleEdit({});//先退出全屏再跳转,否则回来查看时就没有了。 681 lineageGraph.value[0].handleEdit({});//先退出全屏再跳转,否则回来查看时就没有了。
682 set({ 682 set({
683 tableGuid: sheetInfo.value.guid, 683 tableGuid: sheetInfo.value.guid,
684 table: sheetInfo.value.tableName, 684 table: sheetInfo.value.tableName,
685 databas: sheetInfo.value.databaseName, 685 databas: sheetInfo.value.databaseName,
686 databaseCh: sheetInfo.value.databaseChName, 686 databaseCh: sheetInfo.value.databaseChName,
687 dsGuid: sheetInfo.value.databaseGuid, 687 dsGuid: sheetInfo.value.databaseGuid,
688 isFieldLine: isFieldLineage.value 688 isFieldLine: isFieldLineage.value
689 }) 689 })
690 router.push({ 690 router.push({
...@@ -722,7 +722,7 @@ const getTableLineageMap = () => { ...@@ -722,7 +722,7 @@ const getTableLineageMap = () => {
722 const getAllTableFieldLineageMap = () => { 722 const getAllTableFieldLineageMap = () => {
723 lineageDataLoading.value = true; 723 lineageDataLoading.value = true;
724 isFieldLineage.value = true; 724 isFieldLineage.value = true;
725 getTableAllFieldLineage({ databaseName: sheetInfo.value.databaseName, tableName: sheetInfo.value.tableName }).then((res: any) => { 725 getTableAllFieldLineage({ databaseName: sheetInfo.value.databaseName, tableName: sheetInfo.value.tableName, tableGuid: sheetInfo.value.guid }).then((res: any) => {
726 if (res.code == proxy.$passCode) { 726 if (res.code == proxy.$passCode) {
727 let data1 = res.data || []; 727 let data1 = res.data || [];
728 lineageData.value = data1; 728 lineageData.value = data1;
...@@ -802,8 +802,8 @@ const handleLineageSwitchChange = (val) => { ...@@ -802,8 +802,8 @@ const handleLineageSwitchChange = (val) => {
802 <LineageGraph ref="lineageGraph" v-if="lineageData.length" layout="vertical" :lineageData="lineageData" 802 <LineageGraph ref="lineageGraph" v-if="lineageData.length" layout="vertical" :lineageData="lineageData"
803 :is-field-lineage="isFieldLineage" :primary-table="sheetInfo.tableName" :is-detail="true" 803 :is-field-lineage="isFieldLineage" :primary-table="sheetInfo.tableName" :is-detail="true"
804 :primaryDatabase="sheetInfo.databaseName" :isEdit="true" @handleSave="handleSave" 804 :primaryDatabase="sheetInfo.databaseName" :isEdit="true" @handleSave="handleSave"
805 @tableContextMenu="handleTableContextMenu" @handleToggle="handleToggle" :isToggle="isToggle" @handleChOrEn=handleChOrEn :isCh="isCh" 805 @tableContextMenu="handleTableContextMenu" @handleToggle="handleToggle" :isToggle="isToggle"
806 @handleRefres="handleRefres" @handleEdit="handleEdit" 806 @handleChOrEn=handleChOrEn :isCh="isCh" @handleRefres="handleRefres" @handleEdit="handleEdit"
807 @handleLineageSwitchChange="handleLineageSwitchChange" /> 807 @handleLineageSwitchChange="handleLineageSwitchChange" />
808 808
809 </div> 809 </div>
......
...@@ -229,6 +229,8 @@ const getAssetTableData = () => { ...@@ -229,6 +229,8 @@ const getAssetTableData = () => {
229 getRegisterInfo({ 229 getRegisterInfo({
230 pageSize: 200, 230 pageSize: 200,
231 pageIndex: 1, 231 pageIndex: 1,
232 startTime: startTime.value || '',
233 endTime: endTime.value || '',
232 }).then((res: any) => { 234 }).then((res: any) => {
233 assetTableInfo.value.loading1 = false; 235 assetTableInfo.value.loading1 = false;
234 if (res.code == proxy.$passCode) { 236 if (res.code == proxy.$passCode) {
...@@ -291,6 +293,9 @@ const getTradeTableData = () => { ...@@ -291,6 +293,9 @@ const getTradeTableData = () => {
291 getDaTradeInfo({ 293 getDaTradeInfo({
292 pageSize: 200, 294 pageSize: 200,
293 pageIndex: 1, 295 pageIndex: 1,
296 startTime: startTime.value || '',
297 endTime: endTime.value || '',
298
294 }).then((res: any) => { 299 }).then((res: any) => {
295 tradeTableInfo.value.loading1 = false; 300 tradeTableInfo.value.loading1 = false;
296 if (res.code == proxy.$passCode) { 301 if (res.code == proxy.$passCode) {
...@@ -368,6 +373,8 @@ const getFinancingTableData = () => { ...@@ -368,6 +373,8 @@ const getFinancingTableData = () => {
368 getFinanceInfo({ 373 getFinanceInfo({
369 pageSize: 200, 374 pageSize: 200,
370 pageIndex: 1, 375 pageIndex: 1,
376 startTime: startTime.value || '',
377 endTime: endTime.value || '',
371 }).then((res: any) => { 378 }).then((res: any) => {
372 financingTableInfo.value.loading1 = false; 379 financingTableInfo.value.loading1 = false;
373 if (res.code == proxy.$passCode) { 380 if (res.code == proxy.$passCode) {
...@@ -408,95 +415,108 @@ const assetTableRef = ref(); ...@@ -408,95 +415,108 @@ const assetTableRef = ref();
408 const rolltimer = ref(); 415 const rolltimer = ref();
409 416
410 onBeforeMount(() => { 417 onBeforeMount(() => {
411 if (userData.tenantType != 1) { 418 if (userData.tenantType == 1) {
419 // 获取数据表格
412 getAssetTableData(); 420 getAssetTableData();
413 statisticsInfoLoading.value = true; 421
414 getStatisticsInfo().then((res: any) => { 422 // 获取统计信息
415 statisticsInfoLoading.value = false; 423 fetchStatisticsInfo();
416 if (res.code == proxy.$passCode) { 424
417 let data = res.data || {}; 425 // 获取质量饼图数据
418 registerNum.value = changeNum(data.registerNum ?? 0); 426 fetchQualityInfo();
419 costAssessNum.value = changeNum(data.costAssessNum ?? 0); 427
420 qualityAssessNum.value = changeNum(data.qualityAssessNum ?? 0); 428 // 获取交易和融资数据
421 cardList.value.forEach((card) => {
422 if (card.name == 'assessmentMoney') {
423 card.value = changeNum((data[card.name] ?? 0) / 10000, 2, true);
424 } else if (card.name == "lastIntableTime") {
425 card.value = data[card.name] ?? "--";
426 } else if (card.name == "dataScale") {
427 card.value = changeNum(data[card.name] ?? 0, 2, true);
428 } else {
429 card.value = changeNum(data[card.name] ?? 0);
430 }
431 });
432 } else {
433 ElMessage.error(res.msg);
434 }
435 });
436 qualityPieLoading.value = true;
437 getQualityInfo().then((res: any) => {
438 qualityPieLoading.value = false;
439 // qualityPieChart = echarts.init(document.getElementById("pie-quality"));
440 if (res.code == proxy.$passCode) {
441 qualityPieData.value = res.data || [];
442 let sum = qualityPieData.value
443 .map((d) => d.value)
444 .reduce(function (prev, curr, idx, arr) {
445 return prev + curr;
446 });
447 qualityPieData.value.forEach(v => {
448 v.percent = changeNum((v.value / sum) * 100, 2, true) + '%';
449 });
450 } else {
451 ElMessage.error(res.msg);
452 }
453 });
454 getTradeTableData(); 429 getTradeTableData();
455 getFinancingTableData(); 430 getFinancingTableData();
456 docUrlLoading.value = true; 431
457 getRegisterUrl().then((res: any) => { 432 // 获取注册文档数据
458 if (res.code == proxy.$passCode) { 433 fetchRegisterUrl();
459 let data = docData.value = res.data || []; 434 }
460 if (data.length) { 435 });
461 let ps: any = []; 436 // 获取统计信息
462 for (const d of data) { 437 function fetchStatisticsInfo() {
463 d.documentTypeDesc = d.documentType == 1 ? 'A证' : (d.documentType == 2 ? 'B证' : 'C证'); 438 statisticsInfoLoading.value = true;
464 ps.push( 439 getStatisticsInfo({
465 getImageContent(d.documentFile[0]).then((res: any) => { 440 startTime: startTime.value || '',
466 if (res) { 441 endTime: endTime.value || '',
467 return URL.createObjectURL(res); 442 }).then((res: any) => {
468 } 443 statisticsInfoLoading.value = false;
469 }) 444 if (res.code == proxy.$passCode) {
470 ); 445 const data = res.data || {};
471 } 446 registerNum.value = changeNum(data.registerNum ?? 0);
472 Promise.all(ps).then((res: any[]) => { 447 costAssessNum.value = changeNum(data.costAssessNum ?? 0);
473 console.log(res); 448 qualityAssessNum.value = changeNum(data.qualityAssessNum ?? 0);
474 docUrl.value = res; 449
475 docUrlList.value = res.flatMap((value, index, array) => { 450 cardList.value.forEach((card) => {
476 return [ 451 if (card.name === 'assessmentMoney') {
477 array.slice(index, index + 1).map((a) => { 452 card.value = changeNum((data[card.name] ?? 0) / 10000, 2, true);
478 return { url: a }; 453 } else if (card.name === 'lastIntableTime') {
479 }), 454 card.value = data[card.name] ?? '--';
480 ]; 455 } else if (card.name === 'dataScale') {
481 }); 456 card.value = changeNum(data[card.name] ?? 0, 2, true);
482 docUrlLoading.value = false;
483 nextTick(() => {
484 processImgDesc();
485 });
486 });
487 } else { 457 } else {
488 docUrl.value = []; 458 card.value = changeNum(data[card.name] ?? 0);
489 docData.value = [];
490 docUrlList.value = [];
491 docUrlLoading.value = false;
492 } 459 }
460 });
461 } else {
462 ElMessage.error(res.msg);
463 }
464 });
465 }
466
467 // 获取质量信息
468 function fetchQualityInfo() {
469 qualityPieLoading.value = true;
470 getQualityInfo({
471 startTime: startTime.value || '',
472 endTime: endTime.value || '',
473 }).then((res: any) => {
474 qualityPieLoading.value = false;
475 if (res.code == proxy.$passCode) {
476 const qualityData = res.data || [];
477 const sum = qualityData.reduce((acc, item) => acc + item.value, 0);
478 qualityPieData.value = qualityData.map((item) => ({
479 ...item,
480 percent: changeNum((item.value / sum) * 100, 2, true) + '%',
481 }));
482 } else {
483 ElMessage.error(res.msg);
484 }
485 });
486 }
487
488 // 获取注册文档 URL
489 function fetchRegisterUrl() {
490 docUrlLoading.value = true;
491 getRegisterUrl({
492 startTime: startTime.value || '',
493 endTime: endTime.value || '',
494 }).then((res: any) => {
495 docUrlLoading.value = false;
496 if (res.code == proxy.$passCode) {
497 const data = res.data || [];
498 if (data.length) {
499 const promises = data.map((d) => {
500 d.documentTypeDesc = d.documentType === 1 ? 'A证' : d.documentType === 2 ? 'B证' : 'C证';
501 return getImageContent(d.documentFile[0]).then((res: any) => (res ? URL.createObjectURL(res) : null));
502 });
503
504 Promise.all(promises).then((urls: any[]) => {
505 docUrl.value = urls;
506 docUrlList.value = urls.map((url) => [{ url }]);
507 nextTick(() => {
508 processImgDesc();
509 });
510 });
493 } else { 511 } else {
494 docUrlLoading.value = false; 512 docUrl.value = [];
495 ElMessage.error(res.msg); 513 docUrlList.value = [];
496 } 514 }
497 }); 515 } else {
498 } 516 ElMessage.error(res.msg);
499 }); 517 }
518 });
519 }
500 520
501 const processImgDesc = () => { 521 const processImgDesc = () => {
502 let domImg = document.getElementById('register-img'); 522 let domImg = document.getElementById('register-img');
...@@ -600,15 +620,35 @@ watch( ...@@ -600,15 +620,35 @@ watch(
600 620
601 ); 621 );
602 622
623 const startTime = ref()
624 const endTime = ref()
603 const handleChangeTime = (val) => { 625 const handleChangeTime = (val) => {
604 console.log(val) 626 console.log(val)
627 startTime.value = val[0]
628 endTime.value = val[1]
629 // 获取数据表格
630 getAssetTableData();
631
632 // 获取统计信息
633 fetchStatisticsInfo();
634
635 // 获取质量饼图数据
636 fetchQualityInfo();
637
638 // 获取交易和融资数据
639 getTradeTableData();
640 getFinancingTableData();
641
642 // 获取注册文档数据
643 fetchRegisterUrl();
644
605 } 645 }
606 646
607 </script> 647 </script>
608 648
609 <template> 649 <template>
610 <div style="width: 100%;height: 100%"> 650 <div style="width: 100%;height: 100%">
611 <div class="right-filter-main" v-if="userData.tenantType != 1"> 651 <div class="right-filter-main" v-if="userData.tenantType == 1">
612 <div class="right-filter"> 652 <div class="right-filter">
613 <div class="filter-btns"> 653 <div class="filter-btns">
614 <div class="btn" :class="{ 'is-active': filterDate == 'today' }" @click="handleFilterClick('today')">今日</div> 654 <div class="btn" :class="{ 'is-active': filterDate == 'today' }" @click="handleFilterClick('today')">今日</div>
...@@ -622,7 +662,7 @@ const handleChangeTime = (val) => { ...@@ -622,7 +662,7 @@ const handleChangeTime = (val) => {
622 ref="datePickerRef" /> 662 ref="datePickerRef" />
623 </div> 663 </div>
624 </div> 664 </div>
625 <div v-if="userData.tenantType != 1" class="main-content"> 665 <div v-if="userData.tenantType == 1" class="main-content">
626 <div class="one-row"> 666 <div class="one-row">
627 <div class="row-per"> 667 <div class="row-per">
628 <div class="header"> 668 <div class="header">
...@@ -778,7 +818,7 @@ const handleChangeTime = (val) => { ...@@ -778,7 +818,7 @@ const handleChangeTime = (val) => {
778 </div> 818 </div>
779 </div> 819 </div>
780 <!-- <platformIndex v-else-if="userData.tenantType != 1" /> --> 820 <!-- <platformIndex v-else-if="userData.tenantType != 1" /> -->
781 <platformIndexNewBigScreen v-else-if="userData.tenantType == 1" /> 821 <platformIndexNewBigScreen v-else-if="userData.tenantType != 1" />
782 <div v-else class="main-placeholder"> 822 <div v-else class="main-placeholder">
783 <img width="210" height="100" src="../../public/swzl_logo.png" /> 823 <img width="210" height="100" src="../../public/swzl_logo.png" />
784 </div> 824 </div>
......
...@@ -135,6 +135,8 @@ const getFinancingTableData = () => { ...@@ -135,6 +135,8 @@ const getFinancingTableData = () => {
135 getFinanceInfo({ 135 getFinanceInfo({
136 pageSize: 500, 136 pageSize: 500,
137 pageIndex: 1, 137 pageIndex: 1,
138 startTime: startTime.value || '',
139 endTime: endTime.value || '',
138 }).then((res: any) => { 140 }).then((res: any) => {
139 financingTableInfo.value.loading1 = false; 141 financingTableInfo.value.loading1 = false;
140 if (res.code == proxy.$passCode) { 142 if (res.code == proxy.$passCode) {
...@@ -151,7 +153,10 @@ const statisticsInfoLoading = ref(false); ...@@ -151,7 +153,10 @@ const statisticsInfoLoading = ref(false);
151 onBeforeMount(() => { 153 onBeforeMount(() => {
152 getFinancingTableData(); 154 getFinancingTableData();
153 statisticsInfoLoading.value = true; 155 statisticsInfoLoading.value = true;
154 getPlatformStatisticsInfo().then((res: any) => { 156 getPlatformStatisticsInfo({
157 startTime: startTime.value || '',
158 endTime: endTime.value || '',
159 }).then((res: any) => {
155 statisticsInfoLoading.value = false; 160 statisticsInfoLoading.value = false;
156 if (res.code == proxy.$passCode) { 161 if (res.code == proxy.$passCode) {
157 let data = res.data || {}; 162 let data = res.data || {};
...@@ -961,7 +966,10 @@ const bindPieAction = (chart, data) => { ...@@ -961,7 +966,10 @@ const bindPieAction = (chart, data) => {
961 onMounted(() => { 966 onMounted(() => {
962 industryPieChart = echarts.init(document.getElementById("pie-industry")); 967 industryPieChart = echarts.init(document.getElementById("pie-industry"));
963 industryPieLoading.value = true; 968 industryPieLoading.value = true;
964 getIndustryInfo().then((res: any) => { 969 getIndustryInfo({
970 startTime: startTime.value || '',
971 endTime: endTime.value || '',
972 }).then((res: any) => {
965 industryPieLoading.value = false; 973 industryPieLoading.value = false;
966 if (res.code == proxy.$passCode) { 974 if (res.code == proxy.$passCode) {
967 industryPieData.value = res.data?.homeGraphStatistics || []; 975 industryPieData.value = res.data?.homeGraphStatistics || [];
...@@ -977,7 +985,10 @@ onMounted(() => { ...@@ -977,7 +985,10 @@ onMounted(() => {
977 creditMoneyPieChart = echarts.init( 985 creditMoneyPieChart = echarts.init(
978 document.getElementById("pie-creditMoney") 986 document.getElementById("pie-creditMoney")
979 ); 987 );
980 getCreditMoneyInfo().then((res: any) => { 988 getCreditMoneyInfo({
989 startTime: startTime.value || '',
990 endTime: endTime.value || '',
991 }).then((res: any) => {
981 creditMoneyPieLoading.value = false; 992 creditMoneyPieLoading.value = false;
982 if (res.code == proxy.$passCode) { 993 if (res.code == proxy.$passCode) {
983 creditMoneyPieData.value = res.data || []; 994 creditMoneyPieData.value = res.data || [];
...@@ -991,7 +1002,10 @@ onMounted(() => { ...@@ -991,7 +1002,10 @@ onMounted(() => {
991 1002
992 serviceAreaBarLoading.value = true; 1003 serviceAreaBarLoading.value = true;
993 serviceAreaBarChart = echarts.init(document.getElementById("bar-area")); 1004 serviceAreaBarChart = echarts.init(document.getElementById("bar-area"));
994 getPlatformService().then((res: any) => { 1005 getPlatformService({
1006 startTime: startTime.value || '',
1007 endTime: endTime.value || '',
1008 }).then((res: any) => {
995 serviceAreaBarLoading.value = false; 1009 serviceAreaBarLoading.value = false;
996 if (res.code == proxy.$passCode) { 1010 if (res.code == proxy.$passCode) {
997 serviceAreaBarData.value = res.data || []; 1011 serviceAreaBarData.value = res.data || [];
...@@ -1001,7 +1015,10 @@ onMounted(() => { ...@@ -1001,7 +1015,10 @@ onMounted(() => {
1001 } 1015 }
1002 }); 1016 });
1003 1017
1004 getPlatformProvinceService().then((res: any) => { 1018 getPlatformProvinceService({
1019 startTime: startTime.value || '',
1020 endTime: endTime.value || '',
1021 }).then((res: any) => {
1005 if (res.code == proxy.$passCode) { 1022 if (res.code == proxy.$passCode) {
1006 serviceAreaMapData.value = res.data || []; 1023 serviceAreaMapData.value = res.data || [];
1007 } else { 1024 } else {
...@@ -1010,7 +1027,10 @@ onMounted(() => { ...@@ -1010,7 +1027,10 @@ onMounted(() => {
1010 }); 1027 });
1011 platformMonthBarLoading.value = true; 1028 platformMonthBarLoading.value = true;
1012 platformMonthBarChart = echarts.init(document.getElementById("bar-month")); 1029 platformMonthBarChart = echarts.init(document.getElementById("bar-month"));
1013 getPlatformMonth().then((res: any) => { 1030 getPlatformMonth({
1031 startTime: startTime.value || '',
1032 endTime: endTime.value || '',
1033 }).then((res: any) => {
1014 platformMonthBarLoading.value = false; 1034 platformMonthBarLoading.value = false;
1015 if (res.code == proxy.$passCode) { 1035 if (res.code == proxy.$passCode) {
1016 platformMonthBarData.value = res.data || []; 1036 platformMonthBarData.value = res.data || [];
...@@ -1063,8 +1083,111 @@ watch( ...@@ -1063,8 +1083,111 @@ watch(
1063 1083
1064 ); 1084 );
1065 1085
1086 const startTime = ref()
1087 const endTime = ref()
1088
1066 const handleChangeTime = (val) => { 1089 const handleChangeTime = (val) => {
1067 console.log(val) 1090 startTime.value = val[0];
1091 endTime.value = val[1];
1092 getFinancingTableData();
1093 statisticsInfoLoading.value = true;
1094 getPlatformStatisticsInfo({
1095 startTime: startTime.value || '',
1096 endTime: endTime.value || '',
1097 }).then((res: any) => {
1098 statisticsInfoLoading.value = false;
1099 if (res.code == proxy.$passCode) {
1100 let data = res.data || {};
1101 cardList.value.forEach((card) => {
1102 if (card.name == 'assessmentMoney') {
1103 card.value = changeNum((data[card.name] ?? 0) / 10000, 2, true);
1104 } else if (card.name == "dataScale") {
1105 card.value = changeNum(data[card.name] ?? 0, 2);
1106 } else {
1107 card.value = changeNum(data[card.name] ?? 0);
1108 }
1109 });
1110 } else {
1111 ElMessage.error(res.msg);
1112 }
1113 });
1114
1115 industryPieChart = echarts.init(document.getElementById("pie-industry"));
1116 industryPieLoading.value = true;
1117 getIndustryInfo({
1118 startTime: startTime.value || '',
1119 endTime: endTime.value || '',
1120 }).then((res: any) => {
1121 industryPieLoading.value = false;
1122 if (res.code == proxy.$passCode) {
1123 industryPieData.value = res.data?.homeGraphStatistics || [];
1124 industryPieDataTotal.value = res.data?.totalCompanyNum ?? 0;
1125 setPieChartOption().then(() => {
1126 bindPieAction(industryPieChart, industryPieData.value);
1127 });
1128 } else {
1129 ElMessage.error(res.msg);
1130 }
1131 });
1132 creditMoneyPieLoading.value = true;
1133 creditMoneyPieChart = echarts.init(
1134 document.getElementById("pie-creditMoney")
1135 );
1136 getCreditMoneyInfo({
1137 startTime: startTime.value || '',
1138 endTime: endTime.value || '',
1139 }).then((res: any) => {
1140 creditMoneyPieLoading.value = false;
1141 if (res.code == proxy.$passCode) {
1142 creditMoneyPieData.value = res.data || [];
1143 setCreditPieChartOption().then(() => {
1144 bindPieAction(creditMoneyPieChart, creditMoneyPieData.value);
1145 });
1146 } else {
1147 ElMessage.error(res.msg);
1148 }
1149 });
1150
1151 serviceAreaBarLoading.value = true;
1152 serviceAreaBarChart = echarts.init(document.getElementById("bar-area"));
1153 getPlatformService({
1154 startTime: startTime.value || '',
1155 endTime: endTime.value || '',
1156 }).then((res: any) => {
1157 serviceAreaBarLoading.value = false;
1158 if (res.code == proxy.$passCode) {
1159 serviceAreaBarData.value = res.data || [];
1160 setBarChartOption(serviceAreaBarData.value.slice(0, 5), serviceAreaBarChart);
1161 } else {
1162 ElMessage.error(res.msg);
1163 }
1164 });
1165
1166 getPlatformProvinceService({
1167 startTime: startTime.value || '',
1168 endTime: endTime.value || '',
1169 }).then((res: any) => {
1170 if (res.code == proxy.$passCode) {
1171 serviceAreaMapData.value = res.data || [];
1172 } else {
1173 ElMessage.error(res.msg);
1174 }
1175 });
1176 platformMonthBarLoading.value = true;
1177 platformMonthBarChart = echarts.init(document.getElementById("bar-month"));
1178 getPlatformMonth({
1179 startTime: startTime.value || '',
1180 endTime: endTime.value || '',
1181 }).then((res: any) => {
1182 platformMonthBarLoading.value = false;
1183 if (res.code == proxy.$passCode) {
1184 platformMonthBarData.value = res.data || [];
1185 setAreaChartOption(platformMonthBarData.value, platformMonthBarChart);
1186 } else {
1187 ElMessage.error(res.msg);
1188 }
1189 });
1190
1068 } 1191 }
1069 1192
1070 </script> 1193 </script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!