@blueking/ai-ui-sdk 0.1.0-beta.3 → 0.1.0-beta.4

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 (106) hide show
  1. package/dist/common/util.d.ts +6 -0
  2. package/dist/common/util.ts.js +16 -0
  3. package/dist/components/render-aside/index.vue.css +9 -9
  4. package/dist/components/render-aside/index.vue.js +1 -1
  5. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  6. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  7. package/dist/components/render-collapse/index.vue.css +2 -2
  8. package/dist/components/render-collapse/index.vue.js +1 -1
  9. package/dist/components/render-dataset/components/edit-dataset-data/index.script.vue.js.js +358 -0
  10. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +24 -0
  11. package/dist/components/{render-dataset-detail-origin-data/components/operation-record → render-dataset/components/edit-dataset-data}/index.vue.d.ts +3 -3
  12. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +5 -0
  13. package/dist/components/render-dataset/components/operation-record/index.script.vue.js.js +114 -0
  14. package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/index.vue.css +4 -4
  15. package/dist/components/render-dataset/components/operation-record/index.vue.d.ts +7 -0
  16. package/dist/components/render-dataset/components/operation-record/index.vue.js +5 -0
  17. package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/table/index.script.vue.js.js +24 -18
  18. package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/table/index.vue.css +1 -1
  19. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +5 -0
  20. package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/view-op-result/index.script.vue.js.js +15 -19
  21. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +12 -0
  22. package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/view-op-result/index.vue.d.ts +2 -1
  23. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +5 -0
  24. package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.css +3 -3
  25. package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.js +1 -1
  26. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -5
  27. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  28. package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.script.vue.js.js +6 -3
  29. package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.vue.d.ts +2 -0
  30. package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js +66 -12
  31. package/dist/components/render-dataset/components/plus-dataset-data/form/file.vue.d.ts +2 -0
  32. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  33. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  34. package/dist/components/render-dataset/components/plus-dataset-data/form/index.script.vue.js.js +83 -26
  35. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -5
  36. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.d.ts +3 -0
  37. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  38. package/dist/components/render-dataset/components/plus-dataset-data/form/manual.script.vue.js.js +72 -47
  39. package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.d.ts +2 -0
  40. package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +9 -1
  41. package/dist/components/render-dataset/components/plus-dataset-data/index.vue.d.ts +8 -3
  42. package/dist/components/render-dataset/components/search-dataset-data/index.script.vue.js.js +1 -1
  43. package/dist/components/render-dataset/components/search-operation-record/index.script.vue.js.js +20 -93
  44. package/dist/components/render-dataset/components/search-operation-record/index.vue.d.ts +0 -1
  45. package/dist/components/render-dataset/components/source-type-icon/index.vue.css +3 -3
  46. package/dist/components/render-dataset/components/source-type-icon/index.vue.js +1 -1
  47. package/dist/components/render-dataset/index.vue.css +1 -1
  48. package/dist/components/render-dataset/index.vue.js +1 -1
  49. package/dist/components/render-dataset-detail/components/header.script.vue.js.js +41 -12
  50. package/dist/components/render-dataset-detail/components/header.vue.d.ts +5 -1
  51. package/dist/components/render-dataset-detail/index.script.vue.js.js +11 -1
  52. package/dist/components/render-dataset-detail/index.vue.d.ts +5 -1
  53. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +69 -12
  54. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.vue.d.ts +12 -1
  55. package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js.js +197 -161
  56. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.css +1 -1
  57. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.d.ts +10 -2
  58. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.js +1 -1
  59. package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +33 -12
  60. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  61. package/dist/components/render-dataset-detail-origin-data/index.vue.d.ts +1 -0
  62. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  63. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  64. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  65. package/dist/components/render-dataset-list/components/table.script.vue.js.js +32 -43
  66. package/dist/components/render-expand-collapse/index.vue.css +3 -3
  67. package/dist/components/render-expand-collapse/index.vue.js +1 -1
  68. package/dist/components/render-file-card/index.script.vue.js.js +2 -2
  69. package/dist/components/render-file-card/index.vue.css +11 -11
  70. package/dist/components/render-file-card/index.vue.js +1 -1
  71. package/dist/components/render-file-type-icon/index.script.vue.js.js +8 -8
  72. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  73. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  74. package/dist/components/render-header/index.vue.css +5 -5
  75. package/dist/components/render-header/index.vue.js +1 -1
  76. package/dist/components/render-router-tab/index.vue.css +3 -3
  77. package/dist/components/render-router-tab/index.vue.js +1 -1
  78. package/dist/components/render-search-select/index.script.vue.js.js +43 -33
  79. package/dist/css/fonts/iconcool.eot +0 -0
  80. package/dist/css/fonts/iconcool.svg +27 -0
  81. package/dist/css/fonts/iconcool.ttf +0 -0
  82. package/dist/css/fonts/iconcool.woff +0 -0
  83. package/dist/css/iconcool.js +1 -1
  84. package/dist/css/style.css +27 -0
  85. package/dist/event/index.ts.js +1 -2
  86. package/dist/hooks/use-dataset-http.d.ts +18 -6
  87. package/dist/hooks/use-dataset-http.ts.js +36 -13
  88. package/dist/http/fetch/error-interceptor.ts.js +8 -14
  89. package/dist/http/fetch/index.ts.js +3 -2
  90. package/dist/http/helper/dataset.d.ts +8 -2
  91. package/dist/http/helper/dataset.ts.js +127 -28
  92. package/dist/types/common.d.ts +1 -1
  93. package/dist/types/dataset.d.ts +51 -31
  94. package/dist/types/enum.d.ts +15 -19
  95. package/dist/types/enum.ts.js +19 -22
  96. package/package.json +1 -1
  97. package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.script.vue.js.js +0 -268
  98. package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.css +0 -38
  99. package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.d.ts +0 -12
  100. package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.js +0 -5
  101. package/dist/components/render-dataset-detail-origin-data/components/operation-record/index.script.vue.js.js +0 -96
  102. package/dist/components/render-dataset-detail-origin-data/components/operation-record/index.vue.js +0 -5
  103. package/dist/components/render-dataset-detail-origin-data/components/operation-record/table/index.vue.js +0 -5
  104. package/dist/components/render-dataset-detail-origin-data/components/operation-record/view-op-result/index.vue.css +0 -6
  105. package/dist/components/render-dataset-detail-origin-data/components/operation-record/view-op-result/index.vue.js +0 -5
  106. /package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/table/index.vue.d.ts +0 -0
@@ -41,6 +41,12 @@ export declare const isJSON: (str: string) => boolean;
41
41
  * @returns {boolean}
42
42
  */
43
43
  export declare function isObject(item: any): boolean;
44
+ /**
45
+ * 获取 cookie
46
+ * @param key cookie key
47
+ * @returns cookie value
48
+ */
49
+ export declare function getCookies(key: string): string;
44
50
  /**
45
51
  * 深度合并多个对象
46
52
  * @param objectArray 待合并列表
@@ -103,6 +103,22 @@ import { Message } from 'bkui-vue';
103
103
  */ export function isObject(item) {
104
104
  return Object.prototype.toString.apply(item) === '[object Object]';
105
105
  }
106
+ /**
107
+ * 获取 cookie
108
+ * @param key cookie key
109
+ * @returns cookie value
110
+ */ export function getCookies(key) {
111
+ const arrCookie = document.cookie.split('; '); // 分割
112
+ const cookiesObj = {};
113
+ arrCookie.forEach((cookieStr)=>{
114
+ const arr = cookieStr.split('=');
115
+ const [key, value] = arr;
116
+ if (key) {
117
+ cookiesObj[key] = value;
118
+ }
119
+ });
120
+ return cookiesObj[key];
121
+ }
106
122
  /**
107
123
  * 深度合并多个对象
108
124
  * @param objectArray 待合并列表
@@ -1,12 +1,12 @@
1
1
 
2
- .aside-home[data-v-6cgy4iso] {
2
+ .aside-home[data-v-dljjqrds] {
3
3
  width: 300px;
4
4
  height: 100%;
5
5
  background: #FFFFFF;
6
6
  padding: 16px;
7
7
  border-right: 1px solid #eaebf0;
8
8
  }
9
- [data-v-6cgy4iso] .aside-item {
9
+ [data-v-dljjqrds] .aside-item {
10
10
  width: 268px;
11
11
  line-height: 36px;
12
12
  border-radius: 2px;
@@ -16,30 +16,30 @@
16
16
  justify-content: space-between;
17
17
  color: #979BA5;
18
18
  }
19
- [data-v-6cgy4iso] .aside-item.is-tab {
19
+ [data-v-dljjqrds] .aside-item.is-tab {
20
20
  background: #F5F7FA;
21
21
  cursor: pointer;
22
22
  color: #4D4F56;
23
23
  }
24
- [data-v-6cgy4iso] .aside-item.is-tab:hover {
24
+ [data-v-dljjqrds] .aside-item.is-tab:hover {
25
25
  background: #F0F5FF;
26
26
  }
27
- [data-v-6cgy4iso] .aside-item.active {
27
+ [data-v-dljjqrds] .aside-item.active {
28
28
  background: #F0F5FF;
29
29
  color: #3A84FF;
30
30
  font-weight: 700;
31
31
  }
32
- [data-v-6cgy4iso] .aside-item.active .tab-num {
32
+ [data-v-dljjqrds] .aside-item.active .tab-num {
33
33
  background: #3A84FF;
34
34
  color: #fff;
35
35
  }
36
- [data-v-6cgy4iso] .aside-item.active .active-text {
36
+ [data-v-dljjqrds] .aside-item.active .active-text {
37
37
  color: #3A84FF;
38
38
  }
39
- [data-v-6cgy4iso] .aside-item .tab-name {
39
+ [data-v-dljjqrds] .aside-item .tab-name {
40
40
  flex: 1;
41
41
  }
42
- [data-v-6cgy4iso] .aside-item .tab-num {
42
+ [data-v-dljjqrds] .aside-item .tab-num {
43
43
  background: #EAEBF0;
44
44
  border-radius: 2px;
45
45
  margin-left: 5px;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js';
2
- script.__scopeId = "data-v-6cgy4iso";
2
+ script.__scopeId = "data-v-dljjqrds";
3
3
  script.__file = "./src/components/render-aside/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,40 +1,40 @@
1
1
 
2
- .send-container[data-v-hxfg179q] {
2
+ .send-container[data-v-ojmo5a62] {
3
3
  position: relative;
4
4
  }
5
- .send-container[data-v-hxfg179q]:has(textarea:focus) {
5
+ .send-container[data-v-ojmo5a62]:has(textarea:focus) {
6
6
  z-index: 2;
7
7
  }
8
- .send-container:hover .send-clear[data-v-hxfg179q] {
8
+ .send-container:hover .send-clear[data-v-ojmo5a62] {
9
9
  display: inline-flex !important;
10
10
  }
11
- .send-input[data-v-hxfg179q] {
11
+ .send-input[data-v-ojmo5a62] {
12
12
  width: 100%;
13
13
  flex-direction: row;
14
14
  height: var(--origin-height);
15
15
  }
16
- .send-input[data-v-hxfg179q]:has(textarea:focus) {
16
+ .send-input[data-v-ojmo5a62]:has(textarea:focus) {
17
17
  height: var(--text-height);
18
18
  }
19
- .send-input[data-v-hxfg179q] textarea {
19
+ .send-input[data-v-ojmo5a62] 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-hxfg179q] textarea::-webkit-scrollbar {
25
+ .send-input[data-v-ojmo5a62] textarea::-webkit-scrollbar {
26
26
  width: 4px;
27
27
  height: 4px;
28
28
  }
29
- .send-input[data-v-hxfg179q] textarea::-webkit-scrollbar-thumb {
29
+ .send-input[data-v-ojmo5a62] 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-hxfg179q] textarea::placeholder {
34
+ .send-input[data-v-ojmo5a62] textarea::placeholder {
35
35
  line-height: 16px;
36
36
  }
37
- .send-clear[data-v-hxfg179q] {
37
+ .send-clear[data-v-ojmo5a62] {
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-hxfg179q]:hover {
46
+ .send-clear[data-v-ojmo5a62]: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-hxfg179q";
2
+ script.__scopeId = "data-v-ojmo5a62";
3
3
  script.__file = "./src/components/render-auto-height-textarea/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,10 +1,10 @@
1
1
 
2
- .collapse-title[data-v-faojwd00] {
2
+ .collapse-title[data-v-hmw4m41e] {
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-faojwd00] {
8
+ .collapse-title .is-hidden[data-v-hmw4m41e] {
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-faojwd00";
2
+ script.__scopeId = "data-v-hmw4m41e";
3
3
  script.__file = "./src/components/render-collapse/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -0,0 +1,358 @@
1
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2
+ try {
3
+ var info = gen[key](arg);
4
+ var value = info.value;
5
+ } catch (error) {
6
+ reject(error);
7
+ return;
8
+ }
9
+ if (info.done) {
10
+ resolve(value);
11
+ } else {
12
+ Promise.resolve(value).then(_next, _throw);
13
+ }
14
+ }
15
+ function _async_to_generator(fn) {
16
+ return function() {
17
+ var self = this, args = arguments;
18
+ return new Promise(function(resolve, reject) {
19
+ var gen = fn.apply(self, args);
20
+ function _next(value) {
21
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
22
+ }
23
+ function _throw(err) {
24
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
25
+ }
26
+ _next(undefined);
27
+ });
28
+ };
29
+ }
30
+ function _define_property(obj, key, value) {
31
+ if (key in obj) {
32
+ Object.defineProperty(obj, key, {
33
+ value: value,
34
+ enumerable: true,
35
+ configurable: true,
36
+ writable: true
37
+ });
38
+ } else {
39
+ obj[key] = value;
40
+ }
41
+ return obj;
42
+ }
43
+ function _object_spread(target) {
44
+ for(var i = 1; i < arguments.length; i++){
45
+ var source = arguments[i] != null ? arguments[i] : {};
46
+ var ownKeys = Object.keys(source);
47
+ if (typeof Object.getOwnPropertySymbols === "function") {
48
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
49
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
50
+ }));
51
+ }
52
+ ownKeys.forEach(function(key) {
53
+ _define_property(target, key, source[key]);
54
+ });
55
+ }
56
+ return target;
57
+ }
58
+ function ownKeys(object, enumerableOnly) {
59
+ var keys = Object.keys(object);
60
+ if (Object.getOwnPropertySymbols) {
61
+ var symbols = Object.getOwnPropertySymbols(object);
62
+ if (enumerableOnly) {
63
+ symbols = symbols.filter(function(sym) {
64
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
65
+ });
66
+ }
67
+ keys.push.apply(keys, symbols);
68
+ }
69
+ return keys;
70
+ }
71
+ function _object_spread_props(target, source) {
72
+ source = source != null ? source : {};
73
+ if (Object.getOwnPropertyDescriptors) {
74
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
75
+ } else {
76
+ ownKeys(Object(source)).forEach(function(key) {
77
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
78
+ });
79
+ }
80
+ return target;
81
+ }
82
+ import { defineComponent as _defineComponent } from 'vue';
83
+ import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createBlock as _createBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createSlots as _createSlots } from "vue";
84
+ const _hoisted_1 = {
85
+ key: 0,
86
+ class: "id"
87
+ };
88
+ const _hoisted_2 = {
89
+ key: 1,
90
+ class: "value-content"
91
+ };
92
+ import { EditLine } from 'bkui-vue/lib/icon';
93
+ import { ref, watch } from 'vue';
94
+ import RenderAutoHeightTextarea from '../../../render-auto-height-textarea/index.vue.js';
95
+ import Collapse from '../../../render-collapse/index.vue.js';
96
+ import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
97
+ import useTable from '../../../../hooks/use-table.ts.js';
98
+ export default /*@__PURE__*/ _defineComponent({
99
+ props: {
100
+ index: {},
101
+ datasetId: {},
102
+ apiPrefix: {}
103
+ },
104
+ emits: [
105
+ "success-edit"
106
+ ],
107
+ setup (__props, { emit: __emit }) {
108
+ const props = __props;
109
+ const emits = __emit;
110
+ const { updateDatasetData, getDatasetDataList } = useDatasetHttp(props.apiPrefix);
111
+ const renderFormData = ref();
112
+ const editFormData = ref();
113
+ const isShow = ref(false);
114
+ const loading = ref(false);
115
+ const showEditKeys = ref([]);
116
+ const formRef = ref();
117
+ const handleGetDatasetDataList = (params)=>{
118
+ return getDatasetDataList(_object_spread({
119
+ datasetId: props.datasetId
120
+ }, params));
121
+ };
122
+ const { tableData, pagination, isLoading, handlePageChange, triggerApi } = useTable(handleGetDatasetDataList, 'results', {
123
+ current: 1,
124
+ limit: 1,
125
+ count: 0
126
+ });
127
+ const handleEdit = (key)=>{
128
+ showEditKeys.value.push(key);
129
+ editFormData.value[key] = renderFormData.value[key];
130
+ };
131
+ const handleShow = ()=>{
132
+ isShow.value = true;
133
+ // 设置页码
134
+ pagination.value.current = props.index + 1;
135
+ // 获取数据
136
+ triggerApi();
137
+ };
138
+ const handleClose = ()=>{
139
+ isShow.value = false;
140
+ return true;
141
+ };
142
+ // 确认
143
+ const handleConfirm = function() {
144
+ var _ref = _async_to_generator(function*() {
145
+ try {
146
+ loading.value = true;
147
+ // 校验
148
+ yield formRef.value.validate();
149
+ // 更新数据
150
+ const datasetData = _object_spread_props(_object_spread({}, tableData.value[0]), {
151
+ data: editFormData.value
152
+ });
153
+ yield updateDatasetData(datasetData, datasetData.id);
154
+ // emits
155
+ emits('success-edit');
156
+ // 刷新
157
+ yield triggerApi();
158
+ } catch (error) {
159
+ console.error(error);
160
+ } finally{
161
+ loading.value = false;
162
+ }
163
+ });
164
+ return function handleConfirm() {
165
+ return _ref.apply(this, arguments);
166
+ };
167
+ }();
168
+ // 取消
169
+ const handleCancel = ()=>{
170
+ showEditKeys.value = [];
171
+ };
172
+ // 获取数据以后,修改表单数据
173
+ const handleInitData = ()=>{
174
+ var _tableData_value_, _tableData_value;
175
+ showEditKeys.value = [];
176
+ const formData = tableData === null || tableData === void 0 ? void 0 : (_tableData_value = tableData.value) === null || _tableData_value === void 0 ? void 0 : (_tableData_value_ = _tableData_value[0]) === null || _tableData_value_ === void 0 ? void 0 : _tableData_value_.data;
177
+ renderFormData.value = _object_spread({}, formData);
178
+ editFormData.value = _object_spread({}, formData);
179
+ };
180
+ watch(()=>tableData.value, handleInitData, {
181
+ deep: true
182
+ });
183
+ return (_ctx, _cache)=>{
184
+ const _component_bk_button = _resolveComponent("bk-button");
185
+ const _component_bk_loading = _resolveComponent("bk-loading");
186
+ const _component_bk_pagination = _resolveComponent("bk-pagination");
187
+ const _component_bk_form_item = _resolveComponent("bk-form-item");
188
+ const _component_bk_form = _resolveComponent("bk-form");
189
+ const _component_bk_sideslider = _resolveComponent("bk-sideslider");
190
+ const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
191
+ return _openBlock(), _createElementBlock(_Fragment, null, [
192
+ _createVNode(_component_bk_button, {
193
+ text: "",
194
+ theme: "primary",
195
+ onClick: handleShow
196
+ }, {
197
+ default: _withCtx(()=>_cache[0] || (_cache[0] = [
198
+ _createTextVNode(" 编辑 ")
199
+ ])),
200
+ _: 1 /* STABLE */ ,
201
+ __: [
202
+ 0
203
+ ]
204
+ }),
205
+ _createVNode(_component_bk_sideslider, {
206
+ class: "data-set-edit-slider",
207
+ width: 960,
208
+ "is-show": isShow.value,
209
+ "before-close": handleClose
210
+ }, _createSlots({
211
+ header: _withCtx(()=>[
212
+ _createVNode(_component_bk_loading, {
213
+ class: "g-flex-row g-justify-between",
214
+ loading: _unref(isLoading)
215
+ }, {
216
+ default: _withCtx(()=>[
217
+ _cache[1] || (_cache[1] = _createElementVNode("span", null, "编辑数据", -1 /* HOISTED */ )),
218
+ _unref(tableData)[0] ? (_openBlock(), _createElementBlock("span", _hoisted_1, _toDisplayString(`#${_unref(tableData)[0].id}`), 1 /* TEXT */ )) : _createCommentVNode("v-if", true)
219
+ ]),
220
+ _: 1 /* STABLE */ ,
221
+ __: [
222
+ 1
223
+ ]
224
+ }, 8 /* PROPS */ , [
225
+ "loading"
226
+ ]),
227
+ _createVNode(_component_bk_pagination, {
228
+ small: "",
229
+ class: "g-mr-24",
230
+ "show-limit": false,
231
+ "model-value": _unref(pagination).current,
232
+ count: _unref(pagination).count,
233
+ limit: 1,
234
+ onChange: _unref(handlePageChange)
235
+ }, null, 8 /* PROPS */ , [
236
+ "model-value",
237
+ "count",
238
+ "onChange"
239
+ ])
240
+ ]),
241
+ default: _withCtx(()=>[
242
+ _createVNode(_component_bk_loading, {
243
+ loading: _unref(isLoading),
244
+ class: "content"
245
+ }, {
246
+ default: _withCtx(()=>[
247
+ _createVNode(_component_bk_form, {
248
+ ref_key: "formRef",
249
+ ref: formRef,
250
+ "label-width": 0,
251
+ model: editFormData.value
252
+ }, {
253
+ default: _withCtx(()=>[
254
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(renderFormData.value, (value, key)=>{
255
+ return _openBlock(), _createBlock(Collapse, {
256
+ key: key,
257
+ title: key,
258
+ class: "g-mb-16"
259
+ }, {
260
+ suffix: _withCtx(()=>[
261
+ _createVNode(_unref(EditLine), {
262
+ class: "g-ml-10 g-text-blue g-cursor-pointer",
263
+ onClick: ($event)=>handleEdit(key)
264
+ }, null, 8 /* PROPS */ , [
265
+ "onClick"
266
+ ])
267
+ ]),
268
+ default: _withCtx(()=>[
269
+ showEditKeys.value.includes(key) ? (_openBlock(), _createBlock(_component_bk_form_item, {
270
+ key: 0,
271
+ property: key,
272
+ required: ""
273
+ }, {
274
+ default: _withCtx(()=>[
275
+ _createVNode(RenderAutoHeightTextarea, {
276
+ modelValue: editFormData.value[key],
277
+ "onUpdate:modelValue": ($event)=>editFormData.value[key] = $event,
278
+ height: 500
279
+ }, null, 8 /* PROPS */ , [
280
+ "modelValue",
281
+ "onUpdate:modelValue"
282
+ ])
283
+ ]),
284
+ _: 2 /* DYNAMIC */
285
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
286
+ "property"
287
+ ])) : (_openBlock(), _createElementBlock("h5", _hoisted_2, _toDisplayString(value), 1 /* TEXT */ ))
288
+ ]),
289
+ _: 2 /* DYNAMIC */
290
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
291
+ "title"
292
+ ]);
293
+ }), 128 /* KEYED_FRAGMENT */ ))
294
+ ]),
295
+ _: 1 /* STABLE */
296
+ }, 8 /* PROPS */ , [
297
+ "model"
298
+ ])
299
+ ]),
300
+ _: 1 /* STABLE */
301
+ }, 8 /* PROPS */ , [
302
+ "loading"
303
+ ])
304
+ ]),
305
+ _: 2 /* DYNAMIC */
306
+ }, [
307
+ showEditKeys.value.length > 0 ? {
308
+ name: "footer",
309
+ fn: _withCtx(()=>[
310
+ _withDirectives((_openBlock(), _createBlock(_component_bk_button, {
311
+ class: "g-width-88 g-mr-8",
312
+ theme: "primary",
313
+ loading: loading.value,
314
+ onClick: handleConfirm
315
+ }, {
316
+ default: _withCtx(()=>_cache[2] || (_cache[2] = [
317
+ _createTextVNode(" 保存 ")
318
+ ])),
319
+ _: 1 /* STABLE */ ,
320
+ __: [
321
+ 2
322
+ ]
323
+ }, 8 /* PROPS */ , [
324
+ "loading"
325
+ ])), [
326
+ [
327
+ _directive_bk_tooltips,
328
+ {
329
+ content: '如数据已审核通过,重新编辑后,将会重新进入待审核状态',
330
+ placement: 'top'
331
+ }
332
+ ]
333
+ ]),
334
+ _createVNode(_component_bk_button, {
335
+ class: "g-width-88",
336
+ disabled: loading.value,
337
+ onClick: handleCancel
338
+ }, {
339
+ default: _withCtx(()=>_cache[3] || (_cache[3] = [
340
+ _createTextVNode(" 取消 ")
341
+ ])),
342
+ _: 1 /* STABLE */ ,
343
+ __: [
344
+ 3
345
+ ]
346
+ }, 8 /* PROPS */ , [
347
+ "disabled"
348
+ ])
349
+ ]),
350
+ key: "0"
351
+ } : undefined
352
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */ , [
353
+ "is-show"
354
+ ])
355
+ ], 64 /* STABLE_FRAGMENT */ );
356
+ };
357
+ }
358
+ });
@@ -0,0 +1,24 @@
1
+
2
+ .content[data-v-xgqh4hcu] {
3
+ padding: 18px 24px 0;
4
+ height: 100%;
5
+ overflow: auto;
6
+ }
7
+ .data-set-edit-slider .value-content[data-v-xgqh4hcu] {
8
+ margin-top: 8px;
9
+ padding: 16px;
10
+ border: 1px solid #DCDEE5;
11
+ line-height: 22px;
12
+ }
13
+ .data-set-edit-slider[data-v-xgqh4hcu] .bk-sideslider-title {
14
+ justify-content: space-between;
15
+ width: 100%;
16
+ }
17
+ .data-set-edit-slider[data-v-xgqh4hcu] .bk-sideslider-title .id::before {
18
+ content: '';
19
+ display: inline-block;
20
+ width: 1px;
21
+ height: 14px;
22
+ background: #DCDEE5;
23
+ margin: 0 8px 0 16px;
24
+ }
@@ -1,11 +1,11 @@
1
1
  interface IProps {
2
- isShow: boolean;
2
+ index: number;
3
3
  datasetId: number;
4
4
  apiPrefix: string;
5
5
  }
6
6
  declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
- "update:isShow": (value: boolean) => any;
7
+ "success-edit": () => any;
8
8
  }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
9
- "onUpdate:isShow"?: (value: boolean) => any;
9
+ "onSuccess-edit"?: () => any;
10
10
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  export default _default;
@@ -0,0 +1,5 @@
1
+ import script from './index.script.vue.js.js';
2
+ script.__scopeId = "data-v-xgqh4hcu";
3
+ script.__file = "./src/components/render-dataset/components/edit-dataset-data/index.vue";
4
+ import './index.vue.css';
5
+ export default script;