f8d07716 by xukangle

update: 联调分类分级目录接口

1 parent e74fabf2
1 # 页面标题 1 # 页面标题
2 VITE_APP_TITLE = 数据资产管理系统 2 VITE_APP_TITLE = 数据资产管理系统
3 # 接口域名 3 # 接口域名
4 VITE_API_BASEURL = https://www.zgsjzc.com/api 4 VITE_API_BASEURL = http://192.168.6.20:28052/
5 # VITE_API_BASEURL = http://49.4.26.201:31709/ 5 # VITE_API_BASEURL = http://49.4.26.201:31709/
6 # # 平台用户 接口请地址
7 # VITE_APP_USER_API_BASEURL = gateway-server
8 # # 系统管理 接口地址
9 # VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
10 # # 文件上传请求地址
11 # VITE_APP_ADD_FILE = ms-daop-import-data-service
12 # # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
13 # VITE_APP_DEBUG_TOOL =
14 # # 是否开启代理
15 # VITE_OPEN_PROXY = true
16 # # vite serve base
17 # VITE_SERVE_BASE = /
18 # # 流程设计访问地址
19 # VITE_BPMN_URL = https://workflow.zgsjzc.com
20 # # 数据标准、元数据、数据目录 接口地址
21 # VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
22 # #数据质量接口地址
23 # VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
24
25 # #门户接口
26 # VITE_API_PORTALURL = https://www.zgsjzc.com/portal
27
28 # #数据资产接口地址
29 # VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
30 # #数据同步接口地址
31 # VITE_API_DATA_SYNC = ms-swzl-data-sync-service
32 # #消息接口
33 # VITE_API_MESSAGE = ms-swzl-message-notification-service
6 # 平台用户 接口请地址 34 # 平台用户 接口请地址
7 VITE_APP_USER_API_BASEURL = gateway-server 35 VITE_APP_USER_API_BASEURL = gateway-server
36
37 #AUTH服务
38 VITE_APP_AUTH_URL = 'ms-daop-auth-service'
39
8 # 系统管理 接口地址 40 # 系统管理 接口地址
9 VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service 41 VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
42
10 # 文件上传请求地址 43 # 文件上传请求地址
11 VITE_APP_ADD_FILE = ms-daop-import-data-service 44 VITE_APP_ADD_FILE = ms-daop-import-data-service
12 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 45 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
...@@ -16,14 +49,22 @@ VITE_OPEN_PROXY = true ...@@ -16,14 +49,22 @@ VITE_OPEN_PROXY = true
16 # vite serve base 49 # vite serve base
17 VITE_SERVE_BASE = / 50 VITE_SERVE_BASE = /
18 # 流程设计访问地址 51 # 流程设计访问地址
19 VITE_BPMN_URL = https://workflow.zgsjzc.com 52 VITE_BPMN_URL = https://workflow-swzl-test.csbr.cn
20 # 数据标准、元数据、数据目录 接口地址 53 # 数据标准、元数据、数据目录 接口地址
21 VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service 54 VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
22 #数据质量接口地址 55 #数据质量接口地址
23 VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service 56 VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
24 57
58 #数据盘点接口地址ms-daop-zcgl-data-inventory
59 # VITE_APP_CHECK_BASEURL = /mock
60 VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory
61
62 # 数据字典接口地址
63 VITE_APP_CONFIG_URL = 'ms-daop-configure-service'
64
65
25 #门户接口 66 #门户接口
26 VITE_API_PORTALURL = https://www.zgsjzc.com/portal 67 VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
27 68
28 #数据资产接口地址 69 #数据资产接口地址
29 VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service 70 VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
......
1 FROM 192.168.5.4:82/csbr/nginx:stable-alpine 1
2
3 FROM 192.168.6.22:8081/csbr/nginx:stable-alpine
2 VOLUME /tmp 4 VOLUME /tmp
3 #将当前文件夹的dist文件复制到容器的/usr/share/nginx/html目录 5 #将当前文件夹的dist文件复制到容器的/usr/share/nginx/html目录
4 COPY ./dist/* /usr/share/nginx/html/ 6 COPY ./dist/* /usr/share/nginx/html/
5 COPY ./dist/assets /usr/share/nginx/html/assets 7 COPY ./dist/assets /usr/share/nginx/html/assets
6 #COPY ./dist/importTemplate /usr/share/nginx/html/importTemplate
7 COPY default.conf /etc/nginx/conf.d/ 8 COPY default.conf /etc/nginx/conf.d/
8 #声明运行时容器暴露的端口(容器提供的服务端口) 9 #声明运行时容器暴露的端口(容器提供的服务端口)
9 EXPOSE 8911 10 RUN chown -R nginx:nginx /usr/share/nginx/html
11 EXPOSE 29900
10 #CMD:指定容器启动时要运行的命令 12 #CMD:指定容器启动时要运行的命令
11 CMD ["nginx", "-g", "daemon off;"]
...\ No newline at end of file ...\ No newline at end of file
13 CMD ["nginx", "-g", "daemon off;"]
......
...@@ -3,21 +3,22 @@ pipeline { ...@@ -3,21 +3,22 @@ pipeline {
3 //环境定义 3 //环境定义
4 environment{ 4 environment{
5 //服务名称 5 //服务名称
6 SVN_FOLD = "fe-swzl-asset-temp" 6 SVN_FOLD = "fe-data-asset-management"
7 //部署远程服务器 7 //部署远程服务器
8 //192.168.4.4服务器 8 //192.168.4.4服务器
9 //SSH_PATH = "csbr4.4" 9 //SSH_PATH = "csbr4.4"
10 //192.168.5.4 10 //192.168.5.4
11 SSH_PATH = "csbr5.2" 11 SSH_PATH = "csbr20"
12 SVN_TYPE = "dev"
12 //139.9.190.186 13 //139.9.190.186
13 //SSH_PATH = "csbr190.186" 14 //SSH_PATH = "csbr190.186"
14 //SVN_TYPE = "master" 15 //SVN_TYPE = "master"
15 //镜像版本号 16 //镜像版本号
16 image_tag = "1.0.0" 17 image_tag = "1.0.0"
17 //docker私服ip 18 //docker私服ip
18 ip = "192.168.5.4:82" 19 ip = "192.168.6.22:8081"
19 //前端端口号 20 //前端端口号
20 port = "8911" 21 port = "29900"
21 //映射端口号 22 //映射端口号
22 vport = "80" 23 vport = "80"
23 24
...@@ -63,9 +64,9 @@ pipeline { ...@@ -63,9 +64,9 @@ pipeline {
63 steps { 64 steps {
64 //分分支构建 65 //分分支构建
65 script{ 66 script{
66 if(env.BRANCH_NAME=='master-asset'){ 67 if(env.BRANCH_NAME=='develop'){
67 //master-asset分支环境 68 //master-asset分支环境
68 echo 'start to deploy ${SVN_FOLD} on master-asset ...' 69 echo 'start to deploy ${SVN_FOLD} on develop ...'
69 sh ''' 70 sh '''
70 #docker rmi -f $(docker images | grep "none" | awk '{print $3}') 71 #docker rmi -f $(docker images | grep "none" | awk '{print $3}')
71 CID=$(docker ps -a | grep "${SVN_FOLD}" | awk '{print $1}') 72 CID=$(docker ps -a | grep "${SVN_FOLD}" | awk '{print $1}')
...@@ -107,14 +108,14 @@ pipeline { ...@@ -107,14 +108,14 @@ pipeline {
107 echo 'Deploying' 108 echo 'Deploying'
108 //分分支部署 109 //分分支部署
109 script{ 110 script{
110 if(env.BRANCH_NAME=='master-asset'){ 111 if(env.BRANCH_NAME=='develop'){
111 //master-asset分支环境 112 //master-asset分支环境
112 echo 'start to deploy ${SVN_FOLD} on master-asset ...' 113 echo 'start to deploy ${SVN_FOLD} on develop ...'
113 //调用Publish Over SSH插件,上传docker-compose.yaml文件并且执行deploy脚本 114 //调用Publish Over SSH插件,上传docker-compose.yaml文件并且执行deploy脚本
114 sshPublisher(publishers: [sshPublisherDesc(configName: "csbr5.3", transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: """ 115 sshPublisher(publishers: [sshPublisherDesc(configName: "csbr5.3", transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: """
115 #使用k8s构建 116 #使用k8s构建
116 kubectl delete -f /mnt/k8s/production/fe-swzl-asset.yaml 117 kubectl delete -f /mnt/k8s/develop/daop-jgjf/fe-data-asset-management.yaml
117 kubectl apply -f /mnt/k8s/production/fe-swzl-asset.yaml 118 kubectl apply -f /mnt/k8s/develop/daop-jgjf/fe-data-asset-management.yaml
118 """, execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/mnt/csbr/data', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'output/*.*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) 119 """, execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/mnt/csbr/data', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'output/*.*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
119 120
120 echo 'Depoly ${SVN_FOLD} success ...' 121 echo 'Depoly ${SVN_FOLD} success ...'
......
...@@ -2,48 +2,53 @@ server { ...@@ -2,48 +2,53 @@ server {
2 listen 80; 2 listen 80;
3 listen [::]:80; 3 listen [::]:80;
4 server_name localhost; 4 server_name localhost;
5 # server_name http://192.168.6.20:8052;
5 6
6 #charset koi8-r; 7
7 #access_log /var/log/nginx/host.access.log main; 8 # 设置允许跨域的域名,可以使用通配符 '*' 允许所有域访问
9 add_header 'Access-Control-Allow-Origin' * always;
10 # 设置允许的 HTTP 方法
11 add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
12 # 设置允许的请求头
13 add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Accept, Origin, X-Requested-With';
14 # 如果需要支持 cookie,可以设置以下 header
15 add_header 'Access-Control-Allow-Credentials' 'true';
16 # 缓存设置
17 add_header Cache-Control no-cache;
18 add_header Cache-Control private;
19 # # 预检请求处理
20 # if ($request_method = OPTIONS) {
21 # return 204;
22 # }
8 23
9 location / { 24 location / {
10 root /usr/share/nginx/html; 25 root /usr/share/nginx/html;
11 index index.html index.htm; 26 index index.html index.htm;
12 try_files $uri $uri/ /index.html; 27 try_files $uri $uri/ /index.html;
28 expires -1s;
29 }
30
31 location /api {
32 # 设置允许跨域的域名,可以使用通配符 '*' 允许所有域访问
33 add_header 'Access-Control-Allow-Origin' * always;
34 # 设置允许的 HTTP 方法
35 add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
36 # 设置允许的请求头
37 add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Accept, Origin, X-Requested-With';
38 # 如果需要支持 cookie,可以设置以下 header
39 add_header 'Access-Control-Allow-Credentials' 'true';
40 # 缓存设置
13 add_header Cache-Control no-cache; 41 add_header Cache-Control no-cache;
14 add_header Cache-Control private; 42 add_header Cache-Control private;
15 expires -1s; 43
44 # 使用 rewrite 将 /api 替换为 /new-api
45 rewrite ^/api/(.*)$ /$1 break;
46 proxy_pass http://192.168.6.20:28052;
16 } 47 }
17 48
18 #error_page 404 /404.html;
19 49
20 # redirect server error pages to the static page /50x.html
21 #
22 error_page 500 502 503 504 /50x.html; 50 error_page 500 502 503 504 /50x.html;
23 location = /50x.html { 51 location = /50x.html {
24 root /usr/share/nginx/html; 52 root /usr/share/nginx/html;
25 } 53 }
26
27 # proxy the PHP scripts to Apache listening on 127.0.0.1:80
28 #
29 #location ~ \.php$ {
30 # proxy_pass http://127.0.0.1;
31 #}
32
33 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
34 #
35 #location ~ \.php$ {
36 # root html;
37 # fastcgi_pass 127.0.0.1:9000;
38 # fastcgi_index index.php;
39 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
40 # include fastcgi_params;
41 #}
42
43 # deny access to .htaccess files, if Apache's document root
44 # concurs with nginx's one
45 #
46 #location ~ /\.ht {
47 # deny all;
48 #}
49 } 54 }
......
...@@ -4,6 +4,7 @@ import request from "@/utils/request"; ...@@ -4,6 +4,7 @@ import request from "@/utils/request";
4 /** 4 /**
5 * 数据字典 5 * 数据字典
6 **/ 6 **/
7
7 // 编码规则流水号 8 // 编码规则流水号
8 export const getCoderuleList = (params) => request({ 9 export const getCoderuleList = (params) => request({
9 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/code-rule/list`, 10 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/code-rule/list`,
...@@ -48,11 +49,11 @@ export const checkDeleteDictionaryScheme = (params) => request({ ...@@ -48,11 +49,11 @@ export const checkDeleteDictionaryScheme = (params) => request({
48 data: params 49 data: params
49 }) 50 })
50 // 分页查询 51 // 分页查询
51 export const getDictionary = (params) => request({ 52 // export const getDictionary = (params) => request({
52 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/page-list`, 53 // url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/page-list`,
53 method: 'post', 54 // method: 'post',
54 data: params 55 // data: params
55 }) 56 // })
56 // 查询数据字典启用状态的数据 57 // 查询数据字典启用状态的数据
57 export const getDictionaryAll = (params) => request({ 58 export const getDictionaryAll = (params) => request({
58 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/list-all`, 59 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/list-all`,
...@@ -161,10 +162,14 @@ export const checkDictionaryData = (params) => request({ ...@@ -161,10 +162,14 @@ export const checkDictionaryData = (params) => request({
161 * DATA-CLASSIFY 数据类别 162 * DATA-CLASSIFY 数据类别
162 * DATA-GRADE 数据级别 163 * DATA-GRADE 数据级别
163 */ 164 */
164 export const getLargeCategoryList = (data) => request({ 165 // export const getLargeCategoryList = (data) => request({
165 url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`, 166 // url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
166 method: 'post', 167 // method: 'post',
167 data 168 // data
169 // })
170 export const getLargeCategoryList = (params) => request({
171 url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${params.dictType}`,
172 method: 'get',
168 }) 173 })
169 174
170 175
...@@ -355,6 +360,18 @@ export const getCgTemplateClassifyTreeList = (data) => request({ ...@@ -355,6 +360,18 @@ export const getCgTemplateClassifyTreeList = (data) => request({
355 360
356 361
357 /**-------------------------分类分级目录--------------------------------- */ 362 /**-------------------------分类分级目录--------------------------------- */
363 /**
364 * 查询执行guid和目录名称
365 * @param {no params}
366 * @path /cg-dir/get-exec-guid-and-name
367 */
368 export const getExecGuidAndName = () => request({
369 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/get-exec-guid-and-name`,
370 method: 'post',
371 })
372
373
374
358 375
359 /** 376 /**
360 * 分类分级目录树形列表 377 * 分类分级目录树形列表
...@@ -383,10 +400,10 @@ export const getCgDirFieldPageList = (data) => request({ ...@@ -383,10 +400,10 @@ export const getCgDirFieldPageList = (data) => request({
383 /** 获取字典列表 400 /** 获取字典列表
384 * VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据 401 * VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据
385 */ 402 */
386 // export const getDictionary = (params) => request({ 403 export const getDictionary = (params) => request({
387 // url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/data-dictionary-general/list-all?state=1`, 404 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/data-dictionary-general/list-all?state=1`,
388 // method: 'post' 405 method: 'post'
389 // }) 406 })
390 407
391 408
392 409
...@@ -422,7 +439,109 @@ export const getDbDirTablePageList = (data) => request({ ...@@ -422,7 +439,109 @@ export const getDbDirTablePageList = (data) => request({
422 data 439 data
423 }) 440 })
424 441
442 /**
443 * 数据库目录-已有数据库列表
444 * @param {no params}
445 * @path /db-dir/data-source/list
446 */
447 export const getDbDirDataSourceList = (params) => request({
448 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/data-source/list?execGuid=${params.execGuid}`,
449 method: 'post',
450 })
451
452 /**
453 * 获取列表
454 * @param {Object}
455 * @path /db-dir/field/page-list
456 * @returns
457 */
458 export const getDbDirFieldPageList = (data) => request({
459 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/field/page-list`,
460 method: 'post',
461 data
462 })
463
464
465
466 /** 获取已有字段信息 */
467 export const getDsTableStructure= (data) => request({
468 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/field/list-by-table-guid`,
469 method: 'post',
470 data
471 });
472
473 /** 根据选择的连接池获取表列表 */
474 export const getDsTableByDs = (params) => request({
475 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/list-by-datasource-guid`,
476 method: 'post',
477 data: params
478 })
479
480 /** 根据数据表获取表结构 */
481 export const getDsData= (params) => request({
482 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-subject/table-column-list`,
483 method: 'post',
484 data: params
485 });
486
487
488 /**
489 * 数据库新建目录表
490 * @param {Object}
491 * @path /db-dir/table/save
492 */
493 export const saveDbDirTable = (data) => request({
494 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/save`,
495 method: 'post',
496 data
497 })
498
499 /**
500 * 数据库目录修改表
501 * @param {Object}
502 * @path /db-dir/table/update
503 */
504 export const updateDbDirTable = (data) => request({
505 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/update`,
506 method: 'post',
507 data
508 })
509
510 /**
511 * 生成建表sql语句
512 * @param {Object}
513 * @path /db-dir/table/create-table-sql
514 */
515 export const createTableSql = (data) => request({
516 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/create-table-sql`,
517 method: 'post',
518 data
519 })
520
425 521
426 522
427 523
524 /*********************业务规则配置 ************数据库目录************************* */
525
526 /**
527 * 业务规则配置-详情
528 * @param {Object}
529 * @path /biz-rule-config/detail
530 * @returns
531 */
532 export const getBizRuleConfigDetail = (params) => request({
533 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/detail?tableGuid=${params.tableGuid}&execGuid=${params.execGuid}`,
534 method: 'get',
535 })
428 536
537 /**
538 * 业务规则配置-修改
539 * @param {Object}
540 * @path /biz-rule-config/update
541 * @returns
542 */
543 export const updateBizRuleConfig = (data) => request({
544 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/update`,
545 method: 'post',
546 data
547 })
......
...@@ -284,14 +284,340 @@ export const getDbDirTablePageList = { ...@@ -284,14 +284,340 @@ export const getDbDirTablePageList = {
284 databaseChName: '@cword(3, 5)', 284 databaseChName: '@cword(3, 5)',
285 foundMode: '@integer(1, 3)', 285 foundMode: '@integer(1, 3)',
286 state: '@integer(0,2)', 286 state: '@integer(0,2)',
287 isDataAsset: 'Y' 287 isDataAsset: 'Y',
288 description: '@cword(10, 15)',
288 }] 289 }]
289 } 290 }
290 } 291 }
291 } 292 }
292 } 293 }
293 294
295 /**
296 * export const getDbDirDataSourceList = () => request({
297 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/data-source/list`,
298 method: 'post',
299 })
300 "data": [
301 {
302 "tableGuid": "string",
303 "tableName": "string",
304 "tableChName": "string",
305 "databaseGuid": "string",
306 "database": "string",
307 "databaseChName": "string"
308 }
309 ],
310 */
311
312 export const getDbDirDataSourceList = {
313 url: '/mock/db-dir/data-source/list',
314 method: 'post',
315 response: ({body}:{body:any}) => {
316 return {
317 code: '00000',
318 message: '成功',
319 'data|10-30': [{
320 tableGuid: '@guid',
321 tableName: '@cword(3, 5)',
322 tableChName: '@cword(3, 5)',
323 databaseGuid: '@guid',
324 database: '@cword(3, 5)',
325 databaseChName: '@cword(3, 5)'
326 }]
327 }
328 }
329 }
330
331 /**
332 * export const getDsData = (params) => request({
333 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/list-by-datasource-guid`,
334 method: 'post',
335 data: params
336 });
337 "data": {
338 "totalRows": 0,
339 "totalPages": 0,
340 "pageSize": 0,
341 "pageIndex": 0,
342 "records": [
343 {
344 "tableGuid": "string",
345 "tableName": "string",
346 "tableChName": "string",
347 "databaseGuid": "string",
348 "database": "string",
349 "databaseChName": "string"
350 }
351 ],
352 */
353
354 export const getDsTableByDs = {
355 url: '/mock/db-dir/table/list-by-datasource-guid',
356 method: 'post',
357 response: ({body}:{body:any}) => {
358 return {
359 code: '00000',
360 message: '成功',
361 'data': {
362 totalRows: '@integer(50, 100)',
363 totalPages: '@integer(1, 10)',
364 pageSize: 10,
365 pageIndex: 1,
366 'records|50-100': [{
367 tableGuid: '@guid',
368 tableName: '@cword(3, 5)',
369 tableChName: '@cword(3, 5)',
370 databaseGuid: '@guid',
371 database: '@cword(3, 5)',
372 databaseChName: '@cword(3, 5)'
373 }]
374 }
375 }
376 }
377 }
378 export const getDsTableStructure = {
379 url: '/mock/db-dir/field/list-by-table-guid',
380 method: 'post',
381 response: ({body}:{body:any}) => {
382 return {
383 code: '00000',
384 message: '成功',
385 'data|2-5': [{
386 guid: '@guid',
387 tableGuid: '@guid',
388 tableName: '@cword(3, 5)',
389 tableChName: '@cword(3, 5)',
390 databaseGuid: '@guid',
391 database: '@cword(3, 5)',
392 databaseChName: '@cword(3, 5)',
393 fieldGuid: '@guid',
394 fieldName: '@cword(3, 5)',
395 fieldChName: '@cword(3, 5)',
396 fieldType: '@cword(3, 5)',
397 fieldLength: '@integer(1, 100)',
398 fieldPrecision: '@integer(1, 100)',
399 dimGuid: '@guid',
400 dictionaryGuid: '@guid',
401 sortValue: '@integer(1, 100)',
402 isPrimary: 'Y',
403 isFk: 'Y',
404 isNotNull: 'Y'
405 }]
406 }
407 }
408 }
409
410 /**
411 * export const getDbDirFieldPageList = (data) => request({
412 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/field/page-list`,
413 method: 'post',
414 data
415 })
416 {
417 "code": "string",
418 "msg": "string",
419 "data": {
420 "totalRows": 0,
421 "totalPages": 0,
422 "pageSize": 0,
423 "pageIndex": 0,
424 "records": [
425 {
426 "guid": "string",
427 "tenantGuid": "string",
428 "cgDirName": "string",
429 "dirGuid": "string",
430 "classifyName": "string",
431 "gradeDetailName": "string",
432 "label": "string",
433 "fieldName": "string",
434 "fieldChName": "string",
435 "tableName": "string",
436 "tableChName": "string",
437 "database": "string",
438 "databaseChName": "string"
439 }
440 ],
441 */
294 442
443 export const getDbDirFieldPageList = {
444 url: '/mock/db-dir/field/page-list',
445 method: 'post',
446 response: ({body}:{body:any}) => {
447 return {
448 code: '00000',
449 message: '成功',
450 'data': {
451 totalRows: '@integer(50, 100)',
452 totalPages: '@integer(1, 10)',
453 pageSize: 10,
454 pageIndex: 1,
455 'records|20-30': [{
456 guid: '@guid',
457 tenantGuid: '@guid',
458 cgDirName: '@cword(3, 5)',
459 dirGuid: '@guid',
460 classifyName: '@cword(3, 5)',
461 gradeDetailName: '@cword(3, 5)',
462 label: '@cword(3, 5)',
463 fieldName: '@cword(3, 5)',
464 fieldChName: '@cword(3, 5)',
465 tableName: '@cword(3, 5)',
466 tableChName: '@cword(3, 5)',
467 database: '@cword(3, 5)',
468 databaseChName: '@cword(3, 5)'
469 }]
470 }
471 }
472 }
473 }
474 /**
475 * export const getBizRuleConfigDetail = (params) => request({
476 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/detail?tableGuid=${params.tableGuid}&execGuid=${params.execGuid}`,
477 method: 'get',
478 })
479 "data": [
480 {
481 "guid": "string",
482 "tenantGuid": "string",
483 "classifyName": "string",
484 "gradeDetailName": "string",
485 "fieldName": "string",
486 "fieldChName": "string",
487 "fieldGuid": "string",
488 "fieldType": "string",
489 "fieldLengthCondition": "string",
490 "fieldPrecision": 0,
491 "dictionaryGuid": "string",
492 "isUnique": "string",
493 "isNotNull": "string",
494 "fieldValueRange": "string"
495 }
496 ],
497 */
498 export const getBizRuleConfigDetail = {
499 url: '/mock/biz-rule-config/detail',
500 method: 'get',
501 response: ({body}:{body:any}) => {
502 return {
503 code: '00000',
504 message: '成功',
505 'data|1-3': [{
506 guid: '@guid',
507 tenantGuid: '@guid',
508 classifyName: '@cword(3, 5)',
509 gradeDetailName: '@cword(3, 5)',
510 fieldName: '@cword(3, 5)',
511 fieldChName: '@cword(3, 5)',
512 fieldGuid: '@guid',
513 fieldType: '@cword(3, 5)',
514 fieldLengthCondition: '>#10',
515 fieldPrecision: '@integer(1, 100)',
516 dictionaryGuid: '@guid',
517 isUnique: 'Y',
518 isNotNull: 'Y',
519 fieldValueRange: '0-100'
520 }]
521 }
522 }
523 }
524 /**
525 * export const updateBizRuleConfig = (data) => request({
526 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/update`,
527 method: 'post',
528 data
529 }){
530 "code": "string",
531 "msg": "string",
532 "data": true,
533 "at": "string",
534 "serviceCode": "string"
535 }
536 */
537 export const updateBizRuleConfig = {
538 url: '/mock/biz-rule-config/update',
539 method: 'post',
540 response: ({body}:{body:any}) => {
541 return {
542 code: '00000',
543 message: '成功',
544 data: true,
545 at: 'string',
546 serviceCode: 'string'
547 }
548 }
549 }
550 /**
551 * /**
552 * 数据库新建目录表
553 * @param {Object}
554 * @path /db-dir/table/save
555 * export const saveDbDirTable = (data) => request({
556 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/save`,
557 method: 'post',
558 data
559 })
560 */
561 export const saveDbDirTable = {
562 url: '/mock/db-dir/table/save',
563 method: 'post',
564 response: ({body}:{body:any}) => {
565 return {
566 code: '00000',
567 message: '成功'
568 }
569 }
570 }
571
572 /**
573 * /**
574 * 数据库目录修改表
575 * @param {Object}
576 * @path /db-dir/table/update
577 * export const updateDbDirTable = (data) => request({
578 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/update`,
579 method: 'post',
580 data
581 })
582
583 */
584 export const updateDbDirTable = {
585 url: '/mock/db-dir/table/update',
586 method: 'post',
587 response: ({body}:{body:any}) => {
588 return {
589 code: '00000',
590 message: '成功'
591 }
592 }
593 }
295 594
595 /***
596 * /**
597 * 生成建表sql语句
598 * @param {Object}
599 * @path /db-dir/table/create-table-sql
600 * export const createTableSql = (data) => request({
601 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/create-table-sql`,
602 method: 'post',
603 data
604 })
605 */
606
607 export const createTableSql = {
608 url: '/mock/db-dir/table/create-table-sql',
609 method: 'post',
610 response: ({body}:{body:any}) => {
611 return {
612 code: '00000',
613 message: '成功',
614 data: 'create table test_table (id int, name varchar(255))'
615 }
616 }
617 }
296 618
297 export default [getCgDirTreeList,getCgDirFieldPageList, getDictionary,saveBizRuleConfig, getDbDirTreeList, getDbDirTablePageList] as MockMethod[] 619 export default [getCgDirTreeList,getCgDirFieldPageList,
620 getDictionary,saveBizRuleConfig, getDbDirTreeList,
621 getDbDirTablePageList,getDbDirDataSourceList,getDsTableByDs,
622 getDsTableStructure,getDbDirFieldPageList,getBizRuleConfigDetail,
623 updateBizRuleConfig,saveDbDirTable,createTableSql,updateDbDirTable] as MockMethod[]
......
...@@ -219,7 +219,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -219,7 +219,7 @@ const routes: RouteRecordRaw[] = [
219 { 219 {
220 path: 'configure-rules', 220 path: 'configure-rules',
221 name: 'configureRules', 221 name: 'configureRules',
222 component: () => import('@/views/data_inventory/configureRules.vue'), 222 component: () => import('@/views/data_inventory/configureRules1.vue'),
223 meta: { 223 meta: {
224 title: '配置业务规则', 224 title: '配置业务规则',
225 sidebar: false, 225 sidebar: false,
...@@ -230,10 +230,43 @@ const routes: RouteRecordRaw[] = [ ...@@ -230,10 +230,43 @@ const routes: RouteRecordRaw[] = [
230 activeMenu: '/data-inventory/classify-grade-catalogue', 230 activeMenu: '/data-inventory/classify-grade-catalogue',
231 }, 231 },
232 }, 232 },
233 {
234 path: 'table-create-existing',
235 name: 'tableCreateExisting',
236 component: () => import('@/views/data_inventory/tableCreateExisting.vue'),
237 meta: {
238 title: '已有表新建',
239 sidebar: false,
240 breadcrumb: false,
241 cache: true,
242 reuse: true
243 },
244 beforeEnter: (to, from) => {
245 if (to.query.domainName) {
246 to.meta.title = `已有表新建(${to.query.domainName})`;
247 to.meta.editPage = true;
248 }
249 }
250 },
251 {
252 path: 'table-create-file',
253 name: 'tableCreateFile',
254 component: () => import('@/views/data_inventory/tableCreateFile.vue'),
255 meta: {
256 title: '根据文件新建',
257 sidebar: false,
258 breadcrumb: false,
259 cache: true,
260 reuse: true
261 },
262 beforeEnter: (to, from) => {
263
264 }
265 },
233 ], 266 ],
234 }, 267 },
235 { 268 {
236 path: '/data-standards/data-dictionary', 269 path: '/data-inventory/data-dictionary',
237 component: Layout, 270 component: Layout,
238 meta: { 271 meta: {
239 title: '数据字典', 272 title: '数据字典',
...@@ -243,7 +276,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -243,7 +276,7 @@ const routes: RouteRecordRaw[] = [
243 { 276 {
244 path: '', 277 path: '',
245 name: 'dictionary', 278 name: 'dictionary',
246 component: () => import('@/views/data_standards/dictionary.vue'), 279 component: () => import('@/views/data_inventory/dictionary.vue'),
247 meta: { 280 meta: {
248 title: '数据字典', 281 title: '数据字典',
249 sidebar: false, 282 sidebar: false,
......
...@@ -101,6 +101,13 @@ const systemRoutes: RouteRecordRaw[] = [ ...@@ -101,6 +101,13 @@ const systemRoutes: RouteRecordRaw[] = [
101 // 动态路由(异步路由、导航栏路由) 101 // 动态路由(异步路由、导航栏路由)
102 const asyncRoutes: Route.recordMainRaw[] = [ 102 const asyncRoutes: Route.recordMainRaw[] = [
103 { 103 {
104 meta:{
105 title: '首页',
106 },
107 children: [
108 ],
109 },
110 {
104 meta: { 111 meta: {
105 title: '数据资产管理', 112 title: '数据资产管理',
106 }, 113 },
......
...@@ -72,9 +72,12 @@ const tableInfo = ref({ ...@@ -72,9 +72,12 @@ const tableInfo = ref({
72 return status == 'Y' ? '有效' : '停用'; 72 return status == 'Y' ? '有效' : '停用';
73 } 73 }
74 }, 74 },
75 { label: "定义说明", width: 360, field: "description", }, 75 { label: "定义说明", width: 140, field: "description", },
76 { 76 {
77 label: "最低安全级别参考", field: "name", width: 140, 77 label: "最低安全级别参考", field: "name", width: 140, getName: (scope) => {
78 let dataGrade = scope.row.dataGrade;
79 return dataGrade + '级';
80 }
78 }, 81 },
79 { label: "修改人", field: "updateUserName", width: 140 }, 82 { label: "修改人", field: "updateUserName", width: 140 },
80 { label: "更新时间", field: "updateTime", width: 180 }, 83 { label: "更新时间", field: "updateTime", width: 180 },
...@@ -386,6 +389,7 @@ const getGradeListData = async () => { ...@@ -386,6 +389,7 @@ const getGradeListData = async () => {
386 389
387 const newCreateClass = () => { 390 const newCreateClass = () => {
388 drawerInfo.value.visible = true; 391 drawerInfo.value.visible = true;
392 classEditFormItems.value[2].options = treeListData.value;
389 drawerInfo.value.header.title = '添加分类'; 393 drawerInfo.value.header.title = '添加分类';
390 classEditFormItems.value.forEach(item => { 394 classEditFormItems.value.forEach(item => {
391 if (item.field == 'status') { 395 if (item.field == 'status') {
...@@ -702,7 +706,7 @@ onMounted(() => { ...@@ -702,7 +706,7 @@ onMounted(() => {
702 style="margin-top:16px; height: calc(100% - 161px)"> 706 style="margin-top:16px; height: calc(100% - 161px)">
703 <div class="tools_btns"> 707 <div class="tools_btns">
704 <el-button v-show="dataShowMethod == 'table'" type="primary" @click="newCreateClass">添加分类</el-button> 708 <el-button v-show="dataShowMethod == 'table'" type="primary" @click="newCreateClass">添加分类</el-button>
705 <el-button v-show="dataShowMethod == 'table'" @click="importClass">导入分类</el-button> 709 <!-- <el-button v-show="dataShowMethod == 'table'" @click="importClass">导入分类</el-button> -->
706 <el-button class="show-change-btn" @click="changeShowMethod">{{ '图形展示' }}</el-button> 710 <el-button class="show-change-btn" @click="changeShowMethod">{{ '图形展示' }}</el-button>
707 </div> 711 </div>
708 <Table v-show="dataShowMethod == 'table'" :tableInfo="tableInfo" /> 712 <Table v-show="dataShowMethod == 'table'" :tableInfo="tableInfo" />
......
...@@ -31,14 +31,14 @@ const getGradeListData = async () => { ...@@ -31,14 +31,14 @@ const getGradeListData = async () => {
31 // 获取数据类别 31 // 获取数据类别
32 const getDataGrade = async () => { 32 const getDataGrade = async () => {
33 const params = { 33 const params = {
34 paramCode: "DATA-CLASSIFY" 34 dictType: "数据类别"
35 } 35 }
36 const res: any = await getLargeCategoryList(params); 36 const res: any = await getLargeCategoryList(params);
37 if (res.code == proxy.$passCode) { 37 if (res.code == proxy.$passCode) {
38 // 提出value和label 作为select的options 38 // 提出value和label 作为select的options
39 const options = res.data.map((item: any) => ({ 39 const options = res.data.map((item: any) => ({
40 label: item.paramName, 40 label: item.label,
41 value: item.paramValue 41 value: item.value
42 })); 42 }));
43 newCreateGradeFormItems.value[1].options = options; 43 newCreateGradeFormItems.value[1].options = options;
44 classDataRef.value = options; 44 classDataRef.value = options;
...@@ -50,14 +50,14 @@ const getDataGrade = async () => { ...@@ -50,14 +50,14 @@ const getDataGrade = async () => {
50 // 获取数据级别 50 // 获取数据级别
51 const getDataClassify = async () => { 51 const getDataClassify = async () => {
52 const params = { 52 const params = {
53 paramCode: "DATA-GRADE" 53 dictType: "数据级别"
54 } 54 }
55 const res: any = await getLargeCategoryList(params); 55 const res: any = await getLargeCategoryList(params);
56 if (res.code == proxy.$passCode) { 56 if (res.code == proxy.$passCode) {
57 // 提出value和label 作为select的options 57 // 提出value和label 作为select的options
58 const options = res.data.map((item: any) => ({ 58 const options = res.data.map((item: any) => ({
59 label: item.paramName, 59 label: item.label,
60 value: item.paramValue 60 value: item.value
61 })); 61 }));
62 newCreateGradeFormItems.value[0].options = options; 62 newCreateGradeFormItems.value[0].options = options;
63 // 这里需要过滤已经在表格中数据级别 63 // 这里需要过滤已经在表格中数据级别
......
1 <template>
2 <el-select v-if="!readonly && isEdit && isSelectType(dbType, scope)" v-model="scope.row['defaultValue']" placeholder="请选择" collapse-tags-tooltip
3 filterable allow-create default-first-option :reserve-keyword="false">
4 <el-option v-for="opt in optionsConfig[dataType]" :key="opt['value']" :label="opt['label']" :value="opt['value']" />
5 </el-select>
6 <el-date-picker v-else-if="!readonly && isEdit && dataType === 'date'" v-model="scope.row['defaultValue']" type="date"
7 format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择" />
8 <el-date-picker v-else-if="!readonly && isEdit && dbType === 'mysql' && dataType === 'datetime'"
9 v-model="scope.row['defaultValue']" placeholder="请选择" type="datetime" format="YYYY-MM-DD HH:mm:ss"
10 value-format="YYYY-MM-DD HH:mm:ss" />
11 <el-input v-else-if="!readonly && isEdit" v-model.trim="scope.row['defaultValue']" placeholder="请填写"
12 @input="(val) => inputChange(val, scope.row.dataType, scope)" />
13 <span v-else>{{ scope.row["defaultValue"] == null ? '--' : (isSelectType(dbType, scope) ?
14 (optionsConfig[dataType].find(s => s.value == scope.row["defaultValue"])?.label ??
15 scope.row["defaultValue"]) : scope.row["defaultValue"]) }}</span>
16 </template>
17
18 <script lang="ts" setup name="tableDefaultValue">
19 import { ref } from "vue";
20 import { useDefault } from "@/hooks/useDefault";
21 const { optionsConfig, inputChange, isSelectType } = useDefault()
22
23 const props = defineProps({
24 dbType: {
25 type: String,
26 default: ''
27 },
28 scope: {
29 type: Object,
30 default: {}
31 },
32 readonly: {
33 type: Boolean,
34 default: false
35 }
36 })
37
38 const isEdit = computed(() => {
39 return props.scope.row['isEdit'];
40 });
41
42 const dataType = computed(() => {
43 return props.scope.row['dataType'];
44 });
45
46 </script>
...\ No newline at end of file ...\ No newline at end of file
...@@ -123,7 +123,7 @@ const treeInfo = ref<any>({ ...@@ -123,7 +123,7 @@ const treeInfo = ref<any>({
123 filter: true, 123 filter: true,
124 queryValue: "", 124 queryValue: "",
125 className: 'tree-list', 125 className: 'tree-list',
126 queryPlaceholder: "输入标准集名称搜索", 126 queryPlaceholder: "输入目录名称搜索",
127 props: { 127 props: {
128 label: "classifyName", 128 label: "classifyName",
129 value: "guid", 129 value: "guid",
......
1 <route lang="yaml">
2 name: tableCreateFile
3 </route>
4
5 <script lang="ts" setup name="tableCreateFile">
6
7 import { ref } from "vue";
8 import { ElMessage, ElMessageBox, ElTable } from "element-plus";
9 import useUserStore from "@/store/modules/user";
10 import useDataCatalogStore from "@/store/modules/dataCatalog";
11 import expandPropertyDialog from "./expandPropertyDialog.vue";
12 import tableDefaultValue from "./components/tableDefaultValue.vue";
13 // import {
14 // getDatabase,
15 // getFileStandards,
16 // getDictionary,
17 // getSubjectFieldByFile,
18 // tableCategoryList,
19 // syncPolicys,
20 // getDataTypeList,
21 // tableModels,
22 // aggMethodList,
23 // getCharacterList,
24 // saveSubjectTable,
25 // updateSubjectTable,
26 // getTableStandardDetail,
27 // getSubjectDomainDetail,
28 // saveSubjectTableDraft,
29 // updateSubjectTableDraft,
30 // getFieldStandardTree,
31 // dimTypeList,
32 // getDimList,
33 // getSubjectTableDetail,
34 // checkSubjectTableData
35 // } from "@/api/modules/dataCatalogService";
36 import { useDefault } from "@/hooks/useDefault";
37 import uploadExcelFile from "./components/uploadExcelFile.vue";
38
39 const userStore = useUserStore();
40 const dataCatalogStore = useDataCatalogStore();
41 const { checkDefault } = useDefault();
42 const userData = JSON.parse(userStore.userData);
43 const { proxy } = getCurrentInstance() as any;
44 const router = useRouter();
45 const route = useRoute();
46 const isDimTable = route.query.isDim;
47 const subjectDomainGuid: any = ref(route.query.domainGuid);
48 const fullPath = route.fullPath;
49 const standardSetGuids = ref([]);
50 //记录已入库的表创建信息。
51 const originTableCreateInfo = ref({});
52
53 //记录当前正在编辑的表创建信息。
54 const tableCreateInfo: Ref<any> = ref({
55 guid: "",
56 isCreate: false,
57 inputNameValue: '',
58 isSync: 'Y', //是否默认同步数据。
59 sheetName: '', //所选择的sheet页。
60 tableData: [
61 {
62 //数据库表信息。
63 dataSourceGuid: '',
64 dataServerName: "",
65 dataServerChName: "",
66 enName: "",
67 chName: "",
68 subjectDomain: route.query.domainName,
69 subjectDomainGuid: subjectDomainGuid.value,
70 tableCategory: route.query.layereAttribute == '3' ? 6 : 1,
71 dimType: isDimTable ? 1 : null,
72 codeColumn: '',
73 codeName: '',
74 syncPolicy: 3,
75 characterSet: 'utf8mb3',
76 tableModel: 1, //若是聚合模型,下方出现一列聚合方式选择。处了主键列,其余列都需要选择。每个表里都要有主键。
77 description: "",
78 },
79 ],
80 partitionAttribute: {},
81 tableFields: [], // 字段标准数组。
82 });
83
84 const stepsInfo = ref({
85 step: 0,
86 list: [
87 { title: "上传文件", value: 1 },
88 { title: "设置属性字段", value: 2 },
89 ],
90 });
91
92 /** 上传的文件字段信息。 */
93 const fileTableFields: any = ref([]);
94 /** 上传的文件数据信息 */
95 const fileTableData: any = ref([]);
96 /** 上传的文件信息。 */
97 const uploadDataFileInfo: any = ref([]);
98
99 const handleFileDataChange = (fileFields, files, sheetName, data) => {
100 if (fileTableFields.value != fileFields) {//文件字段改变,下一步时需要清空。
101 fileTableFields.value = fileFields.slice(0);
102 tableCreateInfo.value.tableFields = [];
103 }
104 fileTableData.value = data;
105 uploadDataFileInfo.value = files;
106 tableCreateInfo.value.sheetName = sheetName;
107 console.log(files);
108 }
109
110 const uploadFileRef = ref();
111
112 // const getSubjectField = () => {
113 // tableFieldsLoading.value = true;
114 // getSubjectFieldByFile(fileTableFields.value.map(f => f.chName), tableCreateInfo.value.tableData[0].subjectDomainGuid).then((res: any) => {
115 // tableFieldsLoading.value = false;
116 // if (res.code == proxy.$passCode) {
117 // tableCreateInfo.value.tableFields = res.data?.map((field, i) => {
118 // field.dimOrdictionaryGuid = field.dictionaryGuid;
119 // field.fileFieldName = fileTableFields.value[i].chName;
120 // field.isEdit = true;
121 // !field.notNull && (field.notNull = 'N');
122 // return field;
123 // }) || [];
124 // } else {
125 // ElMessage.error(res.msg);
126 // }
127 // });
128 // }
129
130 const nextStep = () => {
131 uploadFileRef.value.fileFormRef.ruleFormRef.validate((valid) => {
132 if (valid) {
133 if (!fileTableFields.value.length) {
134 ElMessage({
135 type: "error",
136 message: "上传文件字段不能为空!",
137 });
138 return;
139 }
140 if (!fileTableData.value.length) {
141 tableCreateInfo.value.isSync = 'N';
142 } else {
143 tableCreateInfo.value.isSync = 'Y';
144 }
145 stepsInfo.value.step = 1;
146 // getDictionaryList();
147 // getDimListData();
148 // if (!fieldTypes.value.length) {
149 // getFieldTypeList();
150 // getCharacterListData();
151 // }
152 // if (!databaseList.value.length) {
153 // getDatabaseList();
154 // }
155 // getDomainDetail(subjectDomainGuid.value);
156 // if (!tableCreateInfo.value.tableFields.length) {
157 // getSubjectField();
158 // }
159 }
160 });
161 };
162
163 const isPrevious = ref(false);
164
165 /** 上一步 */
166 const previousStep = () => {
167 stepsInfo.value.step = 0;
168 isPrevious.value = true;
169 };
170
171 /** 记录是否开启字段标准,根据主题域相关信息获取 */
172 const isOpenStandard = ref(true);
173
174 const selectTableFieldRows = ref([]);
175
176 const tableStandardGuid = ref('');
177 const tableStandardDetail: any = ref({});
178 const fieldStandardSetGuids = ref([]);
179
180 // 实际显示的字段标准列表
181 const standardListOptions: any = ref([]);
182
183 const databaseList: any = ref([]);
184
185 //字段类型
186 const fieldTypes: any = ref([]);
187
188 //字符集
189 const characterList: any = ref([]);
190
191 //是否列表
192 const isNotList = ref([
193 {
194 label: "Y",
195 value: "Y",
196 },
197 {
198 label: "N",
199 value: "N",
200 },
201 ]);
202
203 const batchAddFieldStandardPage = ref({
204 pageSize: 50,
205 pageIndex: 1,
206 standardSetGuids: [],
207 approveState: 'Y',
208 name: '',
209 standardSetLevelCode: ""
210 });
211
212 const init = ref(true);
213
214 const fullscreenLoading = ref(false);
215
216 /** 表里有数据时不能修改字段类型,长度,精度 */
217 const hasSubjectData = ref(false);
218
219
220
221 /** 保存表 */
222 const saveTable = () => {
223 }
224 </script>
225
226 <template>
227 <div class="container_wrap full" v-loading.fullscreen.lock="fullscreenLoading">
228 <div class="content_main">
229 <div class="top_tool_wrap">
230 <StepBar :steps-info="stepsInfo" />
231 </div>
232 <uploadExcelFile ref="uploadFileRef" v-show="stepsInfo.step === 0" @fileDataChange="handleFileDataChange">
233 </uploadExcelFile>
234 <div class="second-step-content" v-show="stepsInfo.step === 1">
235 aaa
236 </div>
237 </div>
238 <div class="bottom_tool_wrap">
239 <template v-if="stepsInfo.step == 0">
240 <el-button type="primary" @click="nextStep">下一步</el-button>
241 </template>
242 <template v-else>
243 <el-checkbox v-model="tableCreateInfo.isSync" true-label="Y" :disabled="!fileTableData?.length"
244 false-label="N">同步数据(说明:勾选代表建表同时写入表格数据。)</el-checkbox>
245 <el-button @click="previousStep">上一步</el-button>
246 <el-button type="primary">保存为草稿</el-button>
247 <el-button type="primary" @click="saveTable">提交</el-button>
248 </template>
249 </div>
250
251 </div>
252 </template>
253
254 <style lang="scss" scoped>
255 .top_tool_wrap {
256 width: 100%;
257 height: 80px;
258 display: flex;
259 justify-content: center;
260 align-items: center;
261 border-bottom: 1px solid #d9d9d9;
262
263 :deep(.el-steps) {
264 width: 30%;
265 }
266 }
267
268 .content_main {
269 height: calc(100% - 40px);
270
271 .header-bg-title {
272 margin: 16px 16px 0px;
273 background: #F5F5F5;
274 padding-left: 16px;
275 height: 48px;
276 font-size: 14px;
277 color: #212121;
278 letter-spacing: 0;
279 line-height: 21px;
280 font-weight: 600;
281 display: flex;
282 align-items: center;
283 position: relative;
284
285 .preview-data-totals {
286 position: absolute;
287 right: 16px;
288 line-height: 32px;
289 font-size: 14px;
290 color: #666666;
291 font-weight: 400;
292 }
293
294 .fontC-4fa1a4 {
295 color: var(--el-color-primary);
296 }
297 }
298
299 .form-main {
300 border: 1px solid #d9d9d9;
301 margin: 0px 16px;
302 padding: 16px 16px 0px 16px;
303 height: 125px;
304
305 .dialog-form-inline {
306 align-items: flex-start;
307 }
308
309 :deep(.el-form) {
310 .item-label {
311 width: 100%;
312 }
313
314 .el-select {
315 max-width: 300px;
316 }
317 }
318 }
319
320 .table-main {
321 height: calc(100% - 350px);
322 border: 1px solid #d9d9d9;
323 margin: 0px 16px 16px 16px;
324 padding: 16px;
325 }
326
327 .empty-content {
328 display: flex;
329 align-items: center;
330 justify-content: center;
331 height: 100%;
332 width: 100%;
333 flex-direction: column;
334
335 .empty-text {
336 font-size: 14px;
337 color: #b2b2b2;
338 }
339 }
340
341 .second-step-content {
342 height: calc(100% - 80px);
343 width: 100%;
344 padding: 16px;
345
346 .tools_btns {
347 padding: 8px 0;
348 }
349
350 :deep(.el-table) {
351 .cell {
352
353 .prefix-or-suffix-cell {
354 display: inline-flex;
355 align-items: center;
356 }
357 }
358 }
359
360 .table_panel {
361 height: calc(100% - 114px);
362 }
363
364 :deep(.el-table) {
365 & td.el-table__cell {
366 padding: 3px 0;
367 height: 36px;
368 }
369 }
370 }
371 }
372
373 :deep(.el-dialog) {
374 .dialog-form-inline {
375 .checkbox_input {
376 display: flex;
377 flex-direction: column;
378
379 .input_panel {
380 margin: 0;
381 }
382 }
383
384 .select_group {
385 .el-form-item__content>.el-input {
386 margin-top: 21px;
387 }
388 }
389
390 .radio_panel {
391 .panel_content {
392 display: none;
393 }
394 }
395 }
396 }
397
398 :deep(.batchDialog) {
399 .el-tree-node__content {
400 padding-left: 8px !important;
401
402 .el-icon {
403 display: none;
404 }
405 }
406 }
407
408 .bottom_tool_wrap {
409 height: 40px;
410 padding: 0 16px;
411 border-top: 1px solid #d9d9d9;
412 display: flex;
413 justify-content: flex-end;
414 align-items: center;
415
416 .el-checkbox {
417 margin-right: 20px;
418 }
419
420 :deep(.el-checkbox__input.is-checked + .el-checkbox__label) {
421 color: var(--el-color-regular);
422 }
423 }
424 </style>
...@@ -137,6 +137,9 @@ const handleClassDataEdit = (params) => { ...@@ -137,6 +137,9 @@ const handleClassDataEdit = (params) => {
137 if (item.field === 'classStandardName') { 137 if (item.field === 'classStandardName') {
138 item.default = params.name 138 item.default = params.name
139 } 139 }
140 if (item.field === 'description') {
141 item.default = params.description
142 }
140 }) 143 })
141 } 144 }
142 145
...@@ -209,6 +212,15 @@ const classStandardFormItems = ref([{ ...@@ -209,6 +212,15 @@ const classStandardFormItems = ref([{
209 default: '', 212 default: '',
210 required: true, 213 required: true,
211 block: true, 214 block: true,
215 }, {
216 label: '分类描述',
217 type: 'textarea',
218 placeholder: '请输入',
219 field: 'description',
220 default: '',
221 clearable: true,
222 required: false,
223 block: true
212 }]); 224 }]);
213 225
214 const classStandardFormRules = ref({ 226 const classStandardFormRules = ref({
...@@ -235,6 +247,7 @@ const newCreateClassStandardDialogInfo = ref({ ...@@ -235,6 +247,7 @@ const newCreateClassStandardDialogInfo = ref({
235 if (newCreateClassStandardDialogInfo.value.title === '新增分类') { 247 if (newCreateClassStandardDialogInfo.value.title === '新增分类') {
236 newCreateClassStandardDialogInfo.value.submitBtnLoading = true; 248 newCreateClassStandardDialogInfo.value.submitBtnLoading = true;
237 const params = { 249 const params = {
250 description: info.description,
238 name: info.classStandardName, 251 name: info.classStandardName,
239 refGradeGuid: info.refGradeGuid, 252 refGradeGuid: info.refGradeGuid,
240 type: 'C' 253 type: 'C'
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!