@blueking/ai-ui-sdk 0.1.19-beta.31 → 0.1.19-beta.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/components/render-auth/auth-dialog.script.vue.js.js +1 -1
  2. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  3. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  4. package/dist/components/render-auto-refresh/index.vue.css +8 -8
  5. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  6. package/dist/components/render-checkbox/index.vue.css +9 -9
  7. package/dist/components/render-checkbox/index.vue.js +1 -1
  8. package/dist/components/render-choose-tag/index.vue.css +7 -7
  9. package/dist/components/render-choose-tag/index.vue.js +1 -1
  10. package/dist/components/render-collapse/index.vue.css +2 -2
  11. package/dist/components/render-collapse/index.vue.js +1 -1
  12. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.script.vue.js +86 -0
  13. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +16 -0
  14. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.d.ts +16 -0
  15. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +5 -0
  16. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.script.vue.js.js +133 -0
  17. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +4 -0
  18. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.d.ts +16 -0
  19. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +5 -0
  20. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  21. package/dist/components/render-dataset/components/dataset-data-valid/index.script.vue.js.js +176 -0
  22. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +4 -0
  23. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.d.ts +16 -0
  24. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +5 -0
  25. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  26. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  27. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  28. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  29. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  30. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  31. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  32. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  33. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  34. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  35. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  36. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  37. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  38. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  39. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  40. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  41. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  42. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  43. package/dist/components/render-dataset/components/search-dataset-data/index.script.vue.js.js +14 -0
  44. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +61 -39
  45. package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +17 -0
  46. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  47. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  48. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  49. package/dist/components/render-dataset-list/components/main.vue.d.ts +2 -2
  50. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  51. package/dist/components/render-dataset-list/components/table.vue.d.ts +2 -2
  52. package/dist/components/render-dataset-list/index.vue.css +2 -2
  53. package/dist/components/render-dataset-list/index.vue.js +1 -1
  54. package/dist/components/render-file-card/index.vue.css +11 -11
  55. package/dist/components/render-file-card/index.vue.js +1 -1
  56. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  57. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  58. package/dist/components/render-header/index.vue.css +3 -3
  59. package/dist/components/render-header/index.vue.js +1 -1
  60. package/dist/components/render-like/index.vue.css +5 -5
  61. package/dist/components/render-like/index.vue.js +1 -1
  62. package/dist/components/render-router-tab/index.vue.css +3 -3
  63. package/dist/components/render-router-tab/index.vue.js +1 -1
  64. package/dist/components/render-t-table/index.script.vue.js +2 -1
  65. package/dist/components/render-t-table/index.vue.css +28 -25
  66. package/dist/components/render-t-table/index.vue.js +1 -1
  67. package/dist/components/render-tag-tree/index.script.vue.js.js +34 -18
  68. package/dist/components/render-tag-tree/index.vue.css +7 -7
  69. package/dist/components/render-tag-tree/index.vue.d.ts +1 -0
  70. package/dist/components/render-tag-tree/index.vue.js +1 -1
  71. package/dist/css/tailwind.css +13 -1
  72. package/dist/hooks/use-common-http.d.ts +4 -0
  73. package/dist/hooks/use-common-http.ts.js +12 -2
  74. package/dist/hooks/use-dataset-http.d.ts +2 -1
  75. package/dist/hooks/use-dataset-http.ts.js +8 -1
  76. package/dist/hooks/use-t-table.d.ts +2 -2
  77. package/dist/hooks/use-t-table.ts.js +1 -5
  78. package/dist/http/helper/agent.d.ts +13 -1
  79. package/dist/http/helper/agent.ts.js +69 -24
  80. package/dist/http/helper/dataset.d.ts +7 -1
  81. package/dist/http/helper/dataset.ts.js +16 -2
  82. package/dist/transforms.d.ts +1 -0
  83. package/dist/transforms.ts.js +1 -0
  84. package/dist/types/agent.d.ts +41 -24
  85. package/dist/types/dataset.d.ts +14 -0
  86. package/dist/types/enum.d.ts +8 -1
  87. package/dist/types/enum.ts.js +8 -0
  88. package/package.json +1 -1
@@ -6,7 +6,7 @@ export default /*@__PURE__*/ _defineComponent({
6
6
  setup (__props, { expose: __expose }) {
7
7
  const isShow = ref(false);
8
8
  const perm = ref();
9
- const tableData = ref();
9
+ const tableData = ref([]);
10
10
  let cancelCallback;
11
11
  const getColumns = ()=>[
12
12
  {
@@ -1,40 +1,40 @@
1
1
 
2
- .send-container[data-v-eypmd3am] {
2
+ .send-container[data-v-crt3ctdg] {
3
3
  position: relative;
4
4
  }
5
- .send-container[data-v-eypmd3am]:has(textarea:focus) {
5
+ .send-container[data-v-crt3ctdg]:has(textarea:focus) {
6
6
  z-index: 2;
7
7
  }
8
- .send-container:hover .send-clear[data-v-eypmd3am] {
8
+ .send-container:hover .send-clear[data-v-crt3ctdg] {
9
9
  display: inline-flex !important;
10
10
  }
11
- .send-input[data-v-eypmd3am] {
11
+ .send-input[data-v-crt3ctdg] {
12
12
  width: 100%;
13
13
  flex-direction: row;
14
14
  height: var(--origin-height);
15
15
  }
16
- .send-input[data-v-eypmd3am]:has(textarea:focus) {
16
+ .send-input[data-v-crt3ctdg]:has(textarea:focus) {
17
17
  height: var(--text-height);
18
18
  }
19
- .send-input[data-v-eypmd3am] textarea {
19
+ .send-input[data-v-crt3ctdg] textarea {
20
20
  font-size: 12px;
21
21
  line-height: 16px;
22
22
  padding: 7px;
23
23
  resize: none !important;
24
24
  }
25
- .send-input[data-v-eypmd3am] textarea::-webkit-scrollbar {
25
+ .send-input[data-v-crt3ctdg] textarea::-webkit-scrollbar {
26
26
  width: 4px;
27
27
  height: 4px;
28
28
  }
29
- .send-input[data-v-eypmd3am] textarea::-webkit-scrollbar-thumb {
29
+ .send-input[data-v-crt3ctdg] textarea::-webkit-scrollbar-thumb {
30
30
  height: 5px;
31
31
  border-radius: 3px;
32
32
  background-color: #dcdee5;
33
33
  }
34
- .send-input[data-v-eypmd3am] textarea::placeholder {
34
+ .send-input[data-v-crt3ctdg] textarea::placeholder {
35
35
  line-height: 16px;
36
36
  }
37
- .send-clear[data-v-eypmd3am] {
37
+ .send-clear[data-v-crt3ctdg] {
38
38
  display: none !important;
39
39
  position: absolute;
40
40
  right: 10px;
@@ -43,6 +43,6 @@
43
43
  font-size: 14px;
44
44
  cursor: pointer;
45
45
  }
46
- .send-clear[data-v-eypmd3am]:hover {
46
+ .send-clear[data-v-crt3ctdg]:hover {
47
47
  color: #313238;
48
48
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-eypmd3am";
2
+ script.__scopeId = "data-v-crt3ctdg";
3
3
  script.__file = "./src/components/render-auto-height-textarea/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,12 +1,12 @@
1
1
 
2
- .auto-refresh[data-v-197lluel] {
2
+ .auto-refresh[data-v-5p45wzq1] {
3
3
  position: relative;
4
4
  cursor: pointer;
5
5
  line-height: 26px;
6
6
  padding: 0 4px;
7
7
  white-space: nowrap;
8
8
  }
9
- .auto-refresh[data-v-197lluel]:after {
9
+ .auto-refresh[data-v-5p45wzq1]:after {
10
10
  content: '';
11
11
  position: absolute;
12
12
  top: 5px;
@@ -16,31 +16,31 @@
16
16
  background-color: #dcdee5;
17
17
  z-index: 1;
18
18
  }
19
- .auto-refresh[data-v-197lluel]:hover {
19
+ .auto-refresh[data-v-5p45wzq1]:hover {
20
20
  color: #3A84FF;
21
21
  background-color: #E1ECFF;
22
22
  }
23
- .refresh[data-v-197lluel] {
23
+ .refresh[data-v-5p45wzq1] {
24
24
  cursor: pointer;
25
25
  line-height: 26px;
26
26
  padding: 0 4px;
27
27
  }
28
- .refresh[data-v-197lluel]:hover {
28
+ .refresh[data-v-5p45wzq1]:hover {
29
29
  color: #3A84FF;
30
30
  background-color: #E1ECFF;
31
31
  }
32
- .textarea-list[data-v-197lluel] {
32
+ .textarea-list[data-v-5p45wzq1] {
33
33
  padding: 4px 0;
34
34
  line-height: 32px;
35
35
  max-height: 300px;
36
36
  position: relative;
37
37
  z-index: 2;
38
38
  }
39
- .textarea-list .textarea-item[data-v-197lluel] {
39
+ .textarea-list .textarea-item[data-v-5p45wzq1] {
40
40
  padding: 0 12px;
41
41
  cursor: pointer;
42
42
  }
43
- .textarea-list .textarea-item[data-v-197lluel]:hover {
43
+ .textarea-list .textarea-item[data-v-5p45wzq1]:hover {
44
44
  background: #E1ECFF;
45
45
  color: #3A84FF;
46
46
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-197lluel";
2
+ script.__scopeId = "data-v-5p45wzq1";
3
3
  script.__file = "./src/components/render-auto-refresh/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,5 +1,5 @@
1
1
 
2
- .checkbox[data-v-hg8ekks3] {
2
+ .checkbox[data-v-2x2xyxsl] {
3
3
  position: relative;
4
4
  display: inline-block;
5
5
  width: 16px;
@@ -8,27 +8,27 @@
8
8
  border-radius: 2px;
9
9
  cursor: pointer;
10
10
  }
11
- .checkbox.disabled[data-v-hg8ekks3] {
11
+ .checkbox.disabled[data-v-2x2xyxsl] {
12
12
  cursor: not-allowed;
13
13
  background: #fafbfd;
14
14
  border-color: #dcdee5;
15
15
  }
16
- .checkbox.disabled.checked[data-v-hg8ekks3] {
16
+ .checkbox.disabled.checked[data-v-2x2xyxsl] {
17
17
  background-color: #a3c5fd;
18
18
  border-color: #a3c5fd;
19
19
  }
20
- .checkbox.disabled.indeterminate[data-v-hg8ekks3] {
20
+ .checkbox.disabled.indeterminate[data-v-2x2xyxsl] {
21
21
  background-color: #fafbfd;
22
22
  border-color: #dcdee5;
23
23
  }
24
- .checkbox.disabled.indeterminate[data-v-hg8ekks3]:after {
24
+ .checkbox.disabled.indeterminate[data-v-2x2xyxsl]:after {
25
25
  background: #dcdee5;
26
26
  }
27
- .checkbox.checked[data-v-hg8ekks3] {
27
+ .checkbox.checked[data-v-2x2xyxsl] {
28
28
  background-color: #3a84ff;
29
29
  border: 1px solid #3a84ff;
30
30
  }
31
- .checkbox.checked[data-v-hg8ekks3]:after {
31
+ .checkbox.checked[data-v-2x2xyxsl]:after {
32
32
  position: absolute;
33
33
  top: 50%;
34
34
  left: 50%;
@@ -41,11 +41,11 @@
41
41
  transform: translate(-50%, -60%) rotate(45deg);
42
42
  transform-origin: center;
43
43
  }
44
- .checkbox.indeterminate[data-v-hg8ekks3] {
44
+ .checkbox.indeterminate[data-v-2x2xyxsl] {
45
45
  background-color: #3a84ff;
46
46
  border: 1px solid #3a84ff;
47
47
  }
48
- .checkbox.indeterminate[data-v-hg8ekks3]:after {
48
+ .checkbox.indeterminate[data-v-2x2xyxsl]:after {
49
49
  position: absolute;
50
50
  top: 50%;
51
51
  left: 50%;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-hg8ekks3";
2
+ script.__scopeId = "data-v-2x2xyxsl";
3
3
  script.__file = "./src/components/render-checkbox/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,29 +1,29 @@
1
1
 
2
- .plus-tag-input[data-v-0ioil6sp] {
2
+ .plus-tag-input[data-v-hn3guj0o] {
3
3
  padding: 7px 12px;
4
4
  height: 40px;
5
5
  background: #FAFBFD;
6
6
  border-top: 1px solid #DCDEE5;
7
7
  }
8
- .plus-tag-input .plus-tag-done[data-v-0ioil6sp] {
8
+ .plus-tag-input .plus-tag-done[data-v-hn3guj0o] {
9
9
  cursor: pointer;
10
10
  font-size: 22px;
11
11
  color: #2DCB56;
12
12
  margin: 0 5px 0 10px;
13
13
  }
14
- .plus-tag-input .plus-tag-error[data-v-0ioil6sp] {
14
+ .plus-tag-input .plus-tag-error[data-v-hn3guj0o] {
15
15
  cursor: pointer;
16
16
  font-size: 16px;
17
17
  color: #C4C6CC;
18
18
  margin-right: 5px;
19
19
  }
20
- .plus-tag-input .plus-tag-form[data-v-0ioil6sp] {
20
+ .plus-tag-input .plus-tag-form[data-v-hn3guj0o] {
21
21
  flex: 1;
22
22
  }
23
- .plus-tag-input .plus-tag-form-item[data-v-0ioil6sp] {
23
+ .plus-tag-input .plus-tag-form-item[data-v-hn3guj0o] {
24
24
  margin-bottom: 0;
25
25
  }
26
- .plus-tag[data-v-0ioil6sp] {
26
+ .plus-tag[data-v-hn3guj0o] {
27
27
  cursor: pointer;
28
28
  width: 100%;
29
29
  height: 40px;
@@ -36,7 +36,7 @@
36
36
  font-size: 12px;
37
37
  line-height: 20px;
38
38
  }
39
- .plus-tag[data-v-0ioil6sp]:hover {
39
+ .plus-tag[data-v-hn3guj0o]:hover {
40
40
  color: #3A84FF;
41
41
  }
42
42
 
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-0ioil6sp";
2
+ script.__scopeId = "data-v-hn3guj0o";
3
3
  script.__file = "./src/components/render-choose-tag/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,10 +1,10 @@
1
1
 
2
- .collapse-title[data-v-nctoytv1] {
2
+ .collapse-title[data-v-66vjyu99] {
3
3
  height: 28px;
4
4
  background: #F0F1F5;
5
5
  border-radius: 2px;
6
6
  padding: 0 12px;
7
7
  }
8
- .collapse-title .is-hidden[data-v-nctoytv1] {
8
+ .collapse-title .is-hidden[data-v-66vjyu99] {
9
9
  transform: rotate(-90deg);
10
10
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-nctoytv1";
2
+ script.__scopeId = "data-v-66vjyu99";
3
3
  script.__file = "./src/components/render-collapse/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -0,0 +1,86 @@
1
+ import { defineComponent as _defineComponent, createVNode as _createVNode2 } from 'vue';
2
+ import { createElementVNode as _createElementVNode, createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
3
+ const _hoisted_1 = {
4
+ class: "g-flex-column"
5
+ };
6
+ import { toRef } from 'vue';
7
+ import RenderTTable from '../../../render-t-table/index.vue.js';
8
+ import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
9
+ export default /*@__PURE__*/ _defineComponent({
10
+ props: {
11
+ modelValue: {
12
+ type: Boolean
13
+ },
14
+ datasetDataIds: {},
15
+ datasetId: {},
16
+ apiPrefix: {},
17
+ spaceId: {}
18
+ },
19
+ emits: [
20
+ "update:modelValue",
21
+ "success-delete"
22
+ ],
23
+ setup (__props, { emit: __emit }) {
24
+ const props = __props;
25
+ const emits = __emit;
26
+ const { batchDeleteDatasetData } = useDatasetHttp(props.apiPrefix, toRef(props, 'spaceId'));
27
+ const getColumns = ()=>[
28
+ {
29
+ colKey: 'description',
30
+ title: `已选择以下${props.datasetDataIds.length}个原数据`,
31
+ ellipsis: true,
32
+ cell: (h, { row })=>{
33
+ return _createVNode2("span", null, [
34
+ row || '--'
35
+ ]);
36
+ }
37
+ }
38
+ ];
39
+ const handleClosed = ()=>{
40
+ emits('update:modelValue', false);
41
+ };
42
+ const handleDeleteDatasetDatas = ()=>{
43
+ batchDeleteDatasetData(props.datasetDataIds, props.datasetId).then(()=>{
44
+ emits('success-delete');
45
+ handleClosed();
46
+ });
47
+ };
48
+ return (_ctx, _cache)=>{
49
+ const _component_bk_dialog = _resolveComponent("bk-dialog");
50
+ return _openBlock(), _createBlock(_component_bk_dialog, {
51
+ width: "508",
52
+ "render-directive": "if",
53
+ "header-align": "center",
54
+ "footer-align": "center",
55
+ "confirm-button-theme": "danger",
56
+ "confirm-text": "删除",
57
+ class: "delete-dialog",
58
+ "is-show": _ctx.modelValue,
59
+ title: `确定删除${props.datasetDataIds.length}条原数据?`,
60
+ onClosed: handleClosed,
61
+ onConfirm: handleDeleteDatasetDatas
62
+ }, {
63
+ default: _withCtx(()=>[
64
+ _createElementVNode("section", _hoisted_1, [
65
+ _cache[0] || (_cache[0] = _createElementVNode("span", {
66
+ class: "sub-title g-text-14 g-learning-22 g-mb-16 g-text-center g-width-full"
67
+ }, " 删除后将不可恢复,请谨慎操作! ", -1 /* HOISTED */ )),
68
+ _createVNode(RenderTTable, {
69
+ class: "select-table g-align-self-center",
70
+ "row-key": "id",
71
+ columns: getColumns(),
72
+ "table-data": props.datasetDataIds
73
+ }, null, 8 /* PROPS */ , [
74
+ "columns",
75
+ "table-data"
76
+ ])
77
+ ])
78
+ ]),
79
+ _: 1 /* STABLE */
80
+ }, 8 /* PROPS */ , [
81
+ "is-show",
82
+ "title"
83
+ ]);
84
+ };
85
+ }
86
+ });
@@ -0,0 +1,16 @@
1
+
2
+ .sub-title[data-v-mc15bbu7] {
3
+ padding: 12px 16px;
4
+ background: #F5F7FA;
5
+ border-radius: 2px;
6
+ }
7
+ .select-table[data-v-mc15bbu7] {
8
+ height: 192px;
9
+ border: 1px solid #EAEBF0;
10
+ border-radius: 2px;
11
+ }
12
+ .delete-dialog[data-v-mc15bbu7] .bk-dialog-footer {
13
+ padding: 0 16px 24px 16px;
14
+ background-color: #FFFFFF;
15
+ border-top: 1px solid transparent;
16
+ }
@@ -0,0 +1,16 @@
1
+ interface IProps {
2
+ modelValue: boolean;
3
+ datasetDataIds: number[];
4
+ datasetId: number;
5
+ apiPrefix: string;
6
+ spaceId?: string;
7
+ }
8
+ declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:modelValue": (value: boolean) => any;
10
+ "success-delete": () => any;
11
+ }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
12
+ "onUpdate:modelValue"?: (value: boolean) => any;
13
+ "onSuccess-delete"?: () => any;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import script from './index.script.vue.js';
2
+ script.__scopeId = "data-v-mc15bbu7";
3
+ script.__file = "./src/components/render-dataset/components/batch-delete-dataset-data/index.vue";
4
+ import './index.vue.css';
5
+ export default script;
@@ -0,0 +1,133 @@
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from "vue";
3
+ import { ref, toRef } from 'vue';
4
+ import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
5
+ export default /*@__PURE__*/ _defineComponent({
6
+ props: {
7
+ modelValue: {
8
+ type: Boolean
9
+ },
10
+ datasetDataIds: {},
11
+ datasetId: {},
12
+ apiPrefix: {},
13
+ spaceId: {}
14
+ },
15
+ emits: [
16
+ "update:modelValue",
17
+ "success-edit"
18
+ ],
19
+ setup (__props, { emit: __emit }) {
20
+ const props = __props;
21
+ const emits = __emit;
22
+ const { batchUpdateDatasetDataValidity } = useDatasetHttp(props.apiPrefix, toRef(props, 'spaceId'));
23
+ const validStatus = ref(false);
24
+ const handleClosed = ()=>{
25
+ emits('update:modelValue', false);
26
+ };
27
+ // 批量编辑有效性
28
+ const handleBatchEditValidDatasetData = ()=>{
29
+ batchUpdateDatasetDataValidity({
30
+ datasetId: props.datasetId,
31
+ datasetItemIds: props.datasetDataIds,
32
+ isValid: validStatus.value
33
+ }).then(()=>{
34
+ emits('success-edit');
35
+ handleClosed();
36
+ });
37
+ };
38
+ return (_ctx, _cache)=>{
39
+ const _component_bk_radio = _resolveComponent("bk-radio");
40
+ const _component_bk_radio_group = _resolveComponent("bk-radio-group");
41
+ const _component_bk_form_item = _resolveComponent("bk-form-item");
42
+ const _component_bk_form = _resolveComponent("bk-form");
43
+ const _component_bk_dialog = _resolveComponent("bk-dialog");
44
+ return _openBlock(), _createBlock(_component_bk_dialog, {
45
+ title: "批量编辑有效性",
46
+ width: "508",
47
+ "render-directive": "if",
48
+ "is-show": _ctx.modelValue,
49
+ onClosed: handleClosed,
50
+ onConfirm: handleBatchEditValidDatasetData
51
+ }, {
52
+ default: _withCtx(()=>[
53
+ _createVNode(_component_bk_form, {
54
+ "form-type": "vertical"
55
+ }, {
56
+ default: _withCtx(()=>[
57
+ _createElementVNode("span", null, "已选数据: " + _toDisplayString(props.datasetDataIds.length) + "条", 1 /* TEXT */ ),
58
+ _createVNode(_component_bk_form_item, {
59
+ class: "g-mt-14",
60
+ label: "有效性",
61
+ required: ""
62
+ }, {
63
+ default: _withCtx(()=>[
64
+ _createVNode(_component_bk_radio_group, {
65
+ modelValue: validStatus.value,
66
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>validStatus.value = $event),
67
+ class: "g-flex-column"
68
+ }, {
69
+ default: _withCtx(()=>[
70
+ _createVNode(_component_bk_radio, {
71
+ label: false
72
+ }, {
73
+ default: _withCtx(()=>_cache[1] || (_cache[1] = [
74
+ _createElementVNode("div", {
75
+ class: "g-flex-row g-align-items-center"
76
+ }, [
77
+ _createElementVNode("svg", {
78
+ class: "g-mr-4 g-width-16 g-height-16 g-min-width-16 g-text-red"
79
+ }, [
80
+ _createElementVNode("use", {
81
+ href: "#ai-ui-sdk-sync-failed"
82
+ })
83
+ ]),
84
+ _createTextVNode(" 无效(不参与模型训练) ")
85
+ ], -1 /* HOISTED */ )
86
+ ])),
87
+ _: 1 /* STABLE */ ,
88
+ __: [
89
+ 1
90
+ ]
91
+ }),
92
+ _createVNode(_component_bk_radio, {
93
+ class: "radio",
94
+ label: true
95
+ }, {
96
+ default: _withCtx(()=>_cache[2] || (_cache[2] = [
97
+ _createElementVNode("div", {
98
+ class: "g-flex-row g-align-items-center"
99
+ }, [
100
+ _createElementVNode("svg", {
101
+ class: "g-mr-4 g-width-16 g-height-16 g-min-width-16 g-text-green"
102
+ }, [
103
+ _createElementVNode("use", {
104
+ href: "#ai-ui-sdk-sync-success"
105
+ })
106
+ ]),
107
+ _createTextVNode(" 有效 ")
108
+ ], -1 /* HOISTED */ )
109
+ ])),
110
+ _: 1 /* STABLE */ ,
111
+ __: [
112
+ 2
113
+ ]
114
+ })
115
+ ]),
116
+ _: 1 /* STABLE */
117
+ }, 8 /* PROPS */ , [
118
+ "modelValue"
119
+ ])
120
+ ]),
121
+ _: 1 /* STABLE */
122
+ })
123
+ ]),
124
+ _: 1 /* STABLE */
125
+ })
126
+ ]),
127
+ _: 1 /* STABLE */
128
+ }, 8 /* PROPS */ , [
129
+ "is-show"
130
+ ]);
131
+ };
132
+ }
133
+ });
@@ -0,0 +1,4 @@
1
+
2
+ .radio[data-v-bxvk06is] {
3
+ margin-left: 0px;
4
+ }
@@ -0,0 +1,16 @@
1
+ interface IProps {
2
+ modelValue: boolean;
3
+ datasetDataIds: number[];
4
+ datasetId: number;
5
+ apiPrefix: string;
6
+ spaceId?: string;
7
+ }
8
+ declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:modelValue": (value: boolean) => any;
10
+ "success-edit": () => any;
11
+ }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
12
+ "onUpdate:modelValue"?: (value: boolean) => any;
13
+ "onSuccess-edit"?: () => any;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import script from './index.script.vue.js.js';
2
+ script.__scopeId = "data-v-bxvk06is";
3
+ script.__file = "./src/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue";
4
+ import './index.vue.css';
5
+ export default script;
@@ -39,7 +39,7 @@ export default /*@__PURE__*/ _defineComponent({
39
39
  }
40
40
  ]
41
41
  ]),
42
- _cache[1] || (_cache[1] = _createStaticVNode("<span class=\"click-full-screen g-cursor-pointer g-flex-row\" data-v-3stjni4o><i class=\"ai-ui-sdk-icon ai-ui-sdk-full-screen click-full-screen g-text-14 g-ml-24 g-mr-2\" data-v-3stjni4o></i><span class=\"g-text-12 click-full-screen\" data-v-3stjni4o>全屏</span></span><span class=\"click-un-full-screen g-cursor-pointer g-flex-row\" data-v-3stjni4o><i class=\"ai-ui-sdk-icon ai-ui-sdk-un-full-screen click-un-full-screen g-text-14 g-ml-24 g-mr-2\" data-v-3stjni4o></i><span class=\"g-text-12 click-un-full-screen\" data-v-3stjni4o>取消全屏</span></span>", 2))
42
+ _cache[1] || (_cache[1] = _createStaticVNode("<span class=\"click-full-screen g-cursor-pointer g-flex-row\" data-v-5u01nk1a><i class=\"ai-ui-sdk-icon ai-ui-sdk-full-screen click-full-screen g-text-14 g-ml-24 g-mr-2\" data-v-5u01nk1a></i><span class=\"g-text-12 click-full-screen\" data-v-5u01nk1a>全屏</span></span><span class=\"click-un-full-screen g-cursor-pointer g-flex-row\" data-v-5u01nk1a><i class=\"ai-ui-sdk-icon ai-ui-sdk-un-full-screen click-un-full-screen g-text-14 g-ml-24 g-mr-2\" data-v-5u01nk1a></i><span class=\"g-text-12 click-un-full-screen\" data-v-5u01nk1a>取消全屏</span></span>", 2))
43
43
  ]);
44
44
  };
45
45
  }