@gct-paas/render-web 6.0.0-dev.32 → 6.0.0-dev.34
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.
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +2 -2
- package/es/Event/Events.d.ts +3 -2
- package/es/Event/modeling-traceability/assets/empty.png.mjs +4 -0
- package/es/Event/modeling-traceability/components/expression-condition.vue.d.ts +5 -0
- package/es/Event/modeling-traceability/components/expression-condition.vue.mjs +5 -0
- package/es/Event/modeling-traceability/components/expression-condition.vue_vue_type_script_setup_true_lang.mjs +22 -0
- package/es/Event/modeling-traceability/components/file-cell.vue.d.ts +5 -0
- package/es/Event/modeling-traceability/components/file-cell.vue.mjs +7 -0
- package/es/Event/modeling-traceability/components/file-cell.vue_vue_type_script_setup_true_lang.mjs +81 -0
- package/es/Event/modeling-traceability/components/file-cell.vue_vue_type_style_index_0_scoped_104536e3_lang.css +74 -0
- package/es/Event/modeling-traceability/components/image-cell.vue.d.ts +5 -0
- package/es/Event/modeling-traceability/components/image-cell.vue.mjs +7 -0
- package/es/Event/modeling-traceability/components/image-cell.vue_vue_type_script_setup_true_lang.mjs +83 -0
- package/es/Event/modeling-traceability/components/image-cell.vue_vue_type_style_index_0_scoped_1b5cd3ef_lang.css +86 -0
- package/es/Event/modeling-traceability/components/serial-rule.vue.d.ts +5 -0
- package/es/Event/modeling-traceability/components/serial-rule.vue.mjs +5 -0
- package/es/Event/modeling-traceability/components/serial-rule.vue_vue_type_script_setup_true_lang.mjs +47 -0
- package/es/Event/modeling-traceability/components/signature-cell.vue.d.ts +5 -0
- package/es/Event/modeling-traceability/components/signature-cell.vue.mjs +7 -0
- package/es/Event/modeling-traceability/components/signature-cell.vue_vue_type_script_setup_true_lang.mjs +79 -0
- package/es/Event/modeling-traceability/components/signature-cell.vue_vue_type_style_index_0_scoped_c9ef9bd9_lang.css +83 -0
- package/es/Event/modeling-traceability/components/trace-table.vue.d.ts +7 -0
- package/es/Event/modeling-traceability/components/trace-table.vue.mjs +7 -0
- package/es/Event/modeling-traceability/components/trace-table.vue_vue_type_script_setup_true_lang.mjs +158 -0
- package/es/Event/modeling-traceability/components/trace-table.vue_vue_type_style_index_0_scoped_a3754f9c_lang.css +67 -0
- package/es/Event/modeling-traceability/index.d.ts +15 -0
- package/es/Event/modeling-traceability/index.mjs +40 -0
- package/es/Event/modeling-traceability/modeling-trace-template.vue.mjs +8 -0
- package/es/Event/modeling-traceability/modeling-trace-template.vue_vue_type_script_setup_true_lang.mjs +610 -0
- package/es/Event/modeling-traceability/modeling-trace-template.vue_vue_type_style_index_0_scoped_3663bfcb_lang.css +176 -0
- package/es/Event/modeling-traceability/modeling-trace-template.vue_vue_type_style_index_1_lang.css +20 -0
- package/es/components/form-component/field-label/tag-label.vue_vue_type_script_setup_true_name_TagLabel_lang.mjs +1 -1
- package/es/components/layouts/basic-page/basic-page.vue.mjs +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +3 -1
- package/es/locale/sys/appDesigner.d.ts +5 -0
- package/es/locale/sys/appDesigner.mjs +5 -0
- package/es/locale/sys/component.d.ts +3 -0
- package/es/locale/sys/component.mjs +13 -10
- package/es/locale/sys/model.d.ts +2 -0
- package/es/locale/sys/model.mjs +2 -0
- package/es/locale/sys/pageDesigner.d.ts +3 -0
- package/es/locale/sys/pageDesigner.mjs +3 -0
- package/es/locale/sys.d.ts +2 -0
- package/es/locale/sys.mjs +3 -1
- package/package.json +15 -12
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
import empty_default from "./assets/empty.png.mjs";
|
|
2
|
+
import expression_condition_default from "./components/expression-condition.vue.mjs";
|
|
3
|
+
import file_cell_default from "./components/file-cell.vue.mjs";
|
|
4
|
+
import image_cell_default from "./components/image-cell.vue.mjs";
|
|
5
|
+
import serial_rule_default from "./components/serial-rule.vue.mjs";
|
|
6
|
+
import signature_cell_default from "./components/signature-cell.vue.mjs";
|
|
7
|
+
import trace_table_default from "./components/trace-table.vue.mjs";
|
|
8
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, reactive, ref, renderList, resolveComponent, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
9
|
+
import { FIELD_TYPE, t, useNamespace } from "@gct-paas/core";
|
|
10
|
+
import { CaretDownOutlined, CaretRightOutlined, CloseOutlined, FullscreenExitOutlined, FullscreenOutlined } from "@ant-design/icons-vue";
|
|
11
|
+
import { BasicTable } from "@gct-paas/v-ben";
|
|
12
|
+
import { ConfigProvider, Modal, message } from "ant-design-vue";
|
|
13
|
+
import dayjs from "dayjs";
|
|
14
|
+
import { useLocale } from "@gct-paas/core-web";
|
|
15
|
+
//#region src/Event/modeling-traceability/modeling-trace-template.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
+
var _hoisted_1 = { class: "flex" };
|
|
17
|
+
var _hoisted_2 = ["onClick"];
|
|
18
|
+
var _hoisted_3 = ["title"];
|
|
19
|
+
var _hoisted_4 = ["title"];
|
|
20
|
+
var _hoisted_5 = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "mb-12px ml-16px"
|
|
23
|
+
};
|
|
24
|
+
var _hoisted_6 = {
|
|
25
|
+
key: 3,
|
|
26
|
+
class: "ml-16px"
|
|
27
|
+
};
|
|
28
|
+
var _hoisted_7 = { class: "my-12px" };
|
|
29
|
+
var _hoisted_8 = { key: 0 };
|
|
30
|
+
var _hoisted_9 = { class: "my-12px pl27px" };
|
|
31
|
+
var _hoisted_10 = { key: 5 };
|
|
32
|
+
var _hoisted_11 = ["onClick"];
|
|
33
|
+
var _hoisted_12 = ["src"];
|
|
34
|
+
var _hoisted_13 = {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: "color-[#717682] mt-12px"
|
|
37
|
+
};
|
|
38
|
+
var _hoisted_14 = {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: "color-[#717682] mt-12px"
|
|
41
|
+
};
|
|
42
|
+
var modeling_trace_template_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
43
|
+
__name: "modeling-trace-template",
|
|
44
|
+
props: {
|
|
45
|
+
id: {},
|
|
46
|
+
modelKey: {},
|
|
47
|
+
title: {},
|
|
48
|
+
destroyVm: {}
|
|
49
|
+
},
|
|
50
|
+
setup(__props, { expose: __expose }) {
|
|
51
|
+
const ns = useNamespace("modeling-trace");
|
|
52
|
+
const displayValue = _gct.store.getEmptyDisplay;
|
|
53
|
+
const { getAntdLocale } = useLocale();
|
|
54
|
+
const expandedRowKeys = ref({});
|
|
55
|
+
const isFullscreen = ref(false);
|
|
56
|
+
const operationTypeMap = new Map([
|
|
57
|
+
["update", t("sys.edit")],
|
|
58
|
+
["insert", t("sys.new")],
|
|
59
|
+
["deleted", t("sys.delText")]
|
|
60
|
+
]);
|
|
61
|
+
const defProps = __props;
|
|
62
|
+
const enumField = [
|
|
63
|
+
FIELD_TYPE.E_DHR_TEMPLATE,
|
|
64
|
+
FIELD_TYPE.ONLINE_FORM_TEMPLATE,
|
|
65
|
+
FIELD_TYPE.LABEL_TEMPLATE_REF,
|
|
66
|
+
FIELD_TYPE.DOCUMENT_TEMPLATE,
|
|
67
|
+
FIELD_TYPE.REF,
|
|
68
|
+
FIELD_TYPE.REF_MULTI,
|
|
69
|
+
FIELD_TYPE.RDO_REF,
|
|
70
|
+
FIELD_TYPE.TRANSACTION,
|
|
71
|
+
FIELD_TYPE.USER,
|
|
72
|
+
FIELD_TYPE.USER_MULTI,
|
|
73
|
+
FIELD_TYPE.PRINTER,
|
|
74
|
+
FIELD_TYPE.ORG,
|
|
75
|
+
FIELD_TYPE.ENUM,
|
|
76
|
+
FIELD_TYPE.ORG_MULTI,
|
|
77
|
+
FIELD_TYPE.MESSAGE_TMPL
|
|
78
|
+
];
|
|
79
|
+
const dataSource = ref([]);
|
|
80
|
+
const logDetails = ref({});
|
|
81
|
+
const sunDetails = ref({});
|
|
82
|
+
const { id, modelKey } = reactive(defProps);
|
|
83
|
+
const visible = ref(false);
|
|
84
|
+
/** 模型建模追溯是否开启 */
|
|
85
|
+
const isTrace = ref(1);
|
|
86
|
+
const modalProps = reactive({
|
|
87
|
+
title: defProps.title || t("sys.appDesigner.modelTrace"),
|
|
88
|
+
width: isFullscreen.value ? "100%" : dataSource.value.length ? 1200 : 640
|
|
89
|
+
});
|
|
90
|
+
const newSonColumns = ref([
|
|
91
|
+
{
|
|
92
|
+
title: t("序号"),
|
|
93
|
+
dataIndex: "index",
|
|
94
|
+
key: "index",
|
|
95
|
+
maxwidth: 72,
|
|
96
|
+
width: 60,
|
|
97
|
+
customCell: (_) => {
|
|
98
|
+
return { rowSpan: _.recordIdRowSpan };
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: t("sys.appDesigner.operationType"),
|
|
103
|
+
dataIndex: "operationType",
|
|
104
|
+
key: "operationType",
|
|
105
|
+
width: 100,
|
|
106
|
+
customCell: (_) => {
|
|
107
|
+
return { rowSpan: _.recordIdRowSpan };
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: t("sys.model.data") + "ID",
|
|
112
|
+
dataIndex: "recordId",
|
|
113
|
+
key: "recordId",
|
|
114
|
+
width: 100,
|
|
115
|
+
customCell: (_) => {
|
|
116
|
+
return { rowSpan: _.recordIdRowSpan };
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: t("sys.appDesigner.detailData"),
|
|
121
|
+
dataIndex: "detailData",
|
|
122
|
+
key: "detailData",
|
|
123
|
+
width: 150,
|
|
124
|
+
customCell: (_) => {
|
|
125
|
+
return { rowSpan: _.detailDataRowSpan };
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
title: t("sys.model.fieldName"),
|
|
130
|
+
dataIndex: "fieldName",
|
|
131
|
+
key: "fieldName",
|
|
132
|
+
width: 150,
|
|
133
|
+
ellipsis: true
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
title: t("sys.pageDesigner.oldData"),
|
|
137
|
+
dataIndex: "oldData",
|
|
138
|
+
key: "oldData",
|
|
139
|
+
width: 280
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: t("sys.pageDesigner.newData"),
|
|
143
|
+
dataIndex: "newData",
|
|
144
|
+
key: "newData",
|
|
145
|
+
width: 280
|
|
146
|
+
}
|
|
147
|
+
]);
|
|
148
|
+
const toggle = () => {
|
|
149
|
+
isFullscreen.value = !isFullscreen.value;
|
|
150
|
+
};
|
|
151
|
+
const pagination = ref({
|
|
152
|
+
current: 1,
|
|
153
|
+
pageSize: 20,
|
|
154
|
+
total: 0,
|
|
155
|
+
size: "small",
|
|
156
|
+
showQuickJumper: false,
|
|
157
|
+
showSizeChanger: true,
|
|
158
|
+
showTotal: (total) => t("sys.component.table.total", { total })
|
|
159
|
+
});
|
|
160
|
+
const getTableData = async () => {
|
|
161
|
+
if (!id) return message.warn("id");
|
|
162
|
+
const { data, totalCount } = await _gct.api.apaas.traceLogDetails.getPageListByRecodeId({
|
|
163
|
+
modelKey,
|
|
164
|
+
recodeId: id,
|
|
165
|
+
pageNo: pagination.value.current,
|
|
166
|
+
pageSize: pagination.value.pageSize
|
|
167
|
+
}) || {};
|
|
168
|
+
pagination.value.total = totalCount ?? 0;
|
|
169
|
+
dataSource.value = data || [];
|
|
170
|
+
modalProps.width = data.length ? 1200 : 640;
|
|
171
|
+
if (!data.length) _gct.api.apaas.traceSetting.getTreeByModelKey({ modelKey }).then((res) => {
|
|
172
|
+
isTrace.value = res.enable;
|
|
173
|
+
});
|
|
174
|
+
if (totalCount === 1) onTableExpand(true, dataSource.value[0]);
|
|
175
|
+
};
|
|
176
|
+
const changePagination = (page, pageSize) => {
|
|
177
|
+
pagination.value.current = page;
|
|
178
|
+
pagination.value.pageSize = pageSize;
|
|
179
|
+
getTableData();
|
|
180
|
+
};
|
|
181
|
+
async function open(opts) {
|
|
182
|
+
if (!id) return message.warn("id");
|
|
183
|
+
if (opts?.title) modalProps.title = opts?.title;
|
|
184
|
+
await getTableData();
|
|
185
|
+
visible.value = true;
|
|
186
|
+
}
|
|
187
|
+
function cancel() {
|
|
188
|
+
defProps.destroyVm && defProps.destroyVm();
|
|
189
|
+
}
|
|
190
|
+
const onTableExpand = async (expanded, record) => {
|
|
191
|
+
if (!expanded) record.expanded = expanded;
|
|
192
|
+
if (expanded && !record.children) {
|
|
193
|
+
const logDetailsRes = await _gct.api.apaas.traceLogDetails.getInfoTreeById({
|
|
194
|
+
modelKey,
|
|
195
|
+
id: record.id
|
|
196
|
+
});
|
|
197
|
+
setTimeout(() => {
|
|
198
|
+
record.expanded = expanded;
|
|
199
|
+
}, 100);
|
|
200
|
+
if (logDetailsRes && logDetailsRes.length) {
|
|
201
|
+
logDetailsRes.map((item) => {
|
|
202
|
+
if (item.children) {
|
|
203
|
+
const children = [];
|
|
204
|
+
let idx = 0;
|
|
205
|
+
for (let key in item.children) item.children[key].map((i, iidx) => {
|
|
206
|
+
i.recordFieldJson && i.recordFieldJson.map((p, index) => {
|
|
207
|
+
p.id = record.id;
|
|
208
|
+
p.sonId = i.id;
|
|
209
|
+
p.sonIndex = Object.keys(item.children).indexOf(key);
|
|
210
|
+
p.recordId = i.recordId;
|
|
211
|
+
p.detailData = `${operationTypeMap.get(i.operationType)}了「${i.detailData || displayValue}」数据`;
|
|
212
|
+
p.operationType = i.operationType;
|
|
213
|
+
p.modelName = i.modelName;
|
|
214
|
+
p.parentFieldKey = i.parentFieldKey;
|
|
215
|
+
p.index = iidx + 1;
|
|
216
|
+
p.key = idx += 1;
|
|
217
|
+
if (index === i.recordFieldJson.length - 1) {
|
|
218
|
+
p.children = index === i.recordFieldJson.length - 1 && i.children.length ? i.children : void 0;
|
|
219
|
+
if (i.children && i.children.length) i.recordFieldJson[0].expandIndex = p.key;
|
|
220
|
+
}
|
|
221
|
+
return { ...p };
|
|
222
|
+
});
|
|
223
|
+
if (!i.recordFieldJson && i.children && i.children.length) {
|
|
224
|
+
i.recordFieldJson = [{
|
|
225
|
+
recordId: i.recordId,
|
|
226
|
+
operationType: i.operationType,
|
|
227
|
+
detailData: `${operationTypeMap.get(i.operationType)}了「${i.detailData || displayValue}」数据`,
|
|
228
|
+
newData: "",
|
|
229
|
+
oldData: "",
|
|
230
|
+
index: iidx + 1,
|
|
231
|
+
key: 1,
|
|
232
|
+
sonId: i.id,
|
|
233
|
+
parentFieldKey: i.parentFieldKey,
|
|
234
|
+
children: i.children
|
|
235
|
+
}];
|
|
236
|
+
i.recordFieldJson[0].expandIndex = 1;
|
|
237
|
+
}
|
|
238
|
+
!children[Object.keys(item.children).indexOf(key)] ? children[Object.keys(item.children).indexOf(key)] = i.recordFieldJson : children[Object.keys(item.children).indexOf(key)] = children?.[Object.keys(item.children).indexOf(key)]?.concat(i.recordFieldJson);
|
|
239
|
+
if (i.children && i.children.length) {
|
|
240
|
+
let idxx = 0;
|
|
241
|
+
const no = {};
|
|
242
|
+
i.children.map((z) => {
|
|
243
|
+
if (!no[z.parentFieldKey]) no[z.parentFieldKey] = 1;
|
|
244
|
+
else no[z.parentFieldKey] = (no[z.parentFieldKey] ?? 0) + 1;
|
|
245
|
+
z.recordFieldJson.map((n) => {
|
|
246
|
+
n.recordId = z.recordId;
|
|
247
|
+
n.detailData = `${operationTypeMap.get(z.operationType)}了「${z.detailData || displayValue}」数据`;
|
|
248
|
+
n.operationType = z.operationType;
|
|
249
|
+
n.modelName = z.modelName;
|
|
250
|
+
n.key = idxx += 1;
|
|
251
|
+
n.index = no[z.parentFieldKey];
|
|
252
|
+
return { ...n };
|
|
253
|
+
});
|
|
254
|
+
const sunKey = item.id + i.id;
|
|
255
|
+
if (!sunDetails.value[sunKey]) {
|
|
256
|
+
sunDetails.value[sunKey] = {};
|
|
257
|
+
if (!sunDetails.value[sunKey][z.parentFieldKey]) {
|
|
258
|
+
sunDetails.value[sunKey][z.parentFieldKey] = z;
|
|
259
|
+
sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson = processedData(sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson);
|
|
260
|
+
} else {
|
|
261
|
+
sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson = sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson.concat(z.recordFieldJson);
|
|
262
|
+
sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson = processedData(sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson);
|
|
263
|
+
}
|
|
264
|
+
} else if (!sunDetails.value[sunKey][z.parentFieldKey]) {
|
|
265
|
+
sunDetails.value[sunKey][z.parentFieldKey] = z;
|
|
266
|
+
sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson = processedData(sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson);
|
|
267
|
+
} else {
|
|
268
|
+
sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson = sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson.concat(z.recordFieldJson);
|
|
269
|
+
sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson = processedData(sunDetails.value[sunKey][z.parentFieldKey].recordFieldJson);
|
|
270
|
+
}
|
|
271
|
+
return { ...z };
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
return i.recordFieldJson;
|
|
275
|
+
});
|
|
276
|
+
item.children = children.map((y) => {
|
|
277
|
+
return processedData(y);
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
const temp = logDetailsRes.map((item) => {
|
|
282
|
+
const regex = /.*?(.*?[::].*?)/;
|
|
283
|
+
const regex1 = /(.*?)((.*?)[::](.*?))/;
|
|
284
|
+
if (regex.test(item.detailData) && !item.detailData.match(regex1)[1]) item.detailData = `${displayValue}${item.detailData}`;
|
|
285
|
+
if (regex.test(item.detailData) && item.detailData.match(regex1)[1] === "null") item.detailData = item.detailData.replace("null", displayValue);
|
|
286
|
+
if (!item.recordFieldJson || item.recordFieldJson.length === 0) item.recordFieldJson = [{
|
|
287
|
+
recordId: item.recordId,
|
|
288
|
+
operationType: item.operationType,
|
|
289
|
+
detailData: `${operationTypeMap.get(item.operationType)}了「${item.detailData || displayValue}」数据`,
|
|
290
|
+
newData: "",
|
|
291
|
+
oldData: "",
|
|
292
|
+
index: 1
|
|
293
|
+
}];
|
|
294
|
+
else {
|
|
295
|
+
item.recordFieldJson.map((i) => {
|
|
296
|
+
i.index = 1;
|
|
297
|
+
i.id = item.id;
|
|
298
|
+
i.recordId = item.recordId;
|
|
299
|
+
i.detailData = `${operationTypeMap.get(item.operationType)}了「${item.detailData || displayValue}」数据`;
|
|
300
|
+
i.operationType = item.operationType;
|
|
301
|
+
return { ...i };
|
|
302
|
+
});
|
|
303
|
+
item.recordFieldJson = processedData(item.recordFieldJson);
|
|
304
|
+
}
|
|
305
|
+
return item;
|
|
306
|
+
});
|
|
307
|
+
logDetails.value[record.id] = temp || [];
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
logDetails.value[record.id] = logDetailsRes || [];
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
const handleExpand = (index, id) => {
|
|
314
|
+
const keys = expandedRowKeys.value[id] || [];
|
|
315
|
+
if (keys.includes(index)) expandedRowKeys.value[id] = keys.filter((i) => i !== index);
|
|
316
|
+
else expandedRowKeys.value[id] = [...keys, index];
|
|
317
|
+
};
|
|
318
|
+
__expose({ open });
|
|
319
|
+
const itemRefs = ref([]);
|
|
320
|
+
const setItemRef = (el, index) => {
|
|
321
|
+
if (el) itemRefs.value[index] = el;
|
|
322
|
+
};
|
|
323
|
+
const getColumns = (type) => {
|
|
324
|
+
if (type === "deleted") return [
|
|
325
|
+
{
|
|
326
|
+
title: t("序号"),
|
|
327
|
+
dataIndex: "index",
|
|
328
|
+
key: "index",
|
|
329
|
+
width: 60,
|
|
330
|
+
customCell: (_) => {
|
|
331
|
+
return { rowSpan: _.recordIdRowSpan };
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
title: t("sys.appDesigner.operationType"),
|
|
336
|
+
dataIndex: "operationType",
|
|
337
|
+
key: "operationType",
|
|
338
|
+
width: 330,
|
|
339
|
+
customCell: (_) => {
|
|
340
|
+
return { rowSpan: _.recordIdRowSpan };
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
title: t("sys.model.data") + "ID",
|
|
345
|
+
dataIndex: "recordId",
|
|
346
|
+
key: "recordId",
|
|
347
|
+
width: 330,
|
|
348
|
+
customCell: (_) => {
|
|
349
|
+
return { rowSpan: _.recordIdRowSpan };
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
title: t("sys.appDesigner.detailData"),
|
|
354
|
+
dataIndex: "detailData",
|
|
355
|
+
key: "detailData",
|
|
356
|
+
width: 400,
|
|
357
|
+
customCell: (_) => {
|
|
358
|
+
return { rowSpan: _.detailDataRowSpan };
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
];
|
|
362
|
+
else return newSonColumns.value;
|
|
363
|
+
};
|
|
364
|
+
const processedData = (dataSourse) => {
|
|
365
|
+
if (!dataSourse) return dataSourse;
|
|
366
|
+
const data = (Array.isArray(dataSourse) ? dataSourse : [dataSourse]).map((row) => ({ ...row }));
|
|
367
|
+
mergeCells(data, "operationType");
|
|
368
|
+
mergeCells(data, "recordId");
|
|
369
|
+
mergeCells(data, "detailData");
|
|
370
|
+
return data;
|
|
371
|
+
};
|
|
372
|
+
function mergeCells(data, field) {
|
|
373
|
+
let pos = 0;
|
|
374
|
+
while (pos < data.length) {
|
|
375
|
+
const current = data[pos]?.[field];
|
|
376
|
+
let count = 1;
|
|
377
|
+
while (pos + count < data.length && data[pos + count]?.[field] === current) count += 1;
|
|
378
|
+
if (count > 1) {
|
|
379
|
+
data[pos][`${field}RowSpan`] = count;
|
|
380
|
+
for (let i = 1; i < count; i++) data[pos + i][`${field}RowSpan`] = 0;
|
|
381
|
+
pos += count;
|
|
382
|
+
} else {
|
|
383
|
+
data[pos][`${field}RowSpan`] = 1;
|
|
384
|
+
pos += 1;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return (_ctx, _cache) => {
|
|
389
|
+
const _component_a_descriptions_item = resolveComponent("a-descriptions-item");
|
|
390
|
+
const _component_a_descriptions = resolveComponent("a-descriptions");
|
|
391
|
+
const _component_a_pagination = resolveComponent("a-pagination");
|
|
392
|
+
const _component_a_button = resolveComponent("a-button");
|
|
393
|
+
return openBlock(), createBlock(unref(Modal), mergeProps(modalProps, {
|
|
394
|
+
ref: "modalTrace",
|
|
395
|
+
visible: visible.value,
|
|
396
|
+
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => visible.value = $event),
|
|
397
|
+
style: [{ "top": "40px" }, {
|
|
398
|
+
top: isFullscreen.value ? "0" : "100px",
|
|
399
|
+
maxWidth: isFullscreen.value ? "100%" : "calc(100% - 32px)",
|
|
400
|
+
width: isFullscreen.value ? "100%" : modalProps.width + "px",
|
|
401
|
+
height: isFullscreen.value ? "100%" : "auto"
|
|
402
|
+
}],
|
|
403
|
+
"cancel-text": unref(t)("sys.cancelOpenness"),
|
|
404
|
+
"body-style": {
|
|
405
|
+
height: isFullscreen.value ? "calc(100vh - 108px)" : "auto",
|
|
406
|
+
maxHeight: isFullscreen.value ? "calc(100vh - 108px)" : "auto",
|
|
407
|
+
overflow: "auto"
|
|
408
|
+
},
|
|
409
|
+
class: unref(ns).b()
|
|
410
|
+
}), {
|
|
411
|
+
closeIcon: withCtx(() => [createElementVNode("div", _hoisted_1, [createElementVNode("span", {
|
|
412
|
+
class: normalizeClass([unref(ns).e("close"), "mr8px"]),
|
|
413
|
+
onClick: withModifiers(toggle, ["stop"])
|
|
414
|
+
}, [!isFullscreen.value ? (openBlock(), createBlock(unref(FullscreenOutlined), { key: 0 })) : (openBlock(), createBlock(unref(FullscreenExitOutlined), { key: 1 }))], 2), createElementVNode("div", {
|
|
415
|
+
class: normalizeClass(unref(ns).e("close")),
|
|
416
|
+
onClick: cancel
|
|
417
|
+
}, [createVNode(unref(CloseOutlined))], 2)])]),
|
|
418
|
+
footer: withCtx(() => [createVNode(_component_a_button, { onClick: cancel }, {
|
|
419
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("sys.cancelOpenness")), 1)]),
|
|
420
|
+
_: 1
|
|
421
|
+
})]),
|
|
422
|
+
default: withCtx(() => [createVNode(unref(ConfigProvider), { locale: unref(getAntdLocale) }, {
|
|
423
|
+
default: withCtx(() => [dataSource.value.length ? (openBlock(), createElementBlock("div", {
|
|
424
|
+
key: 0,
|
|
425
|
+
class: normalizeClass(unref(ns).e("scroll-container"))
|
|
426
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(dataSource.value, (item, index) => {
|
|
427
|
+
return openBlock(), createElementBlock("div", {
|
|
428
|
+
key: item.id,
|
|
429
|
+
ref_for: true,
|
|
430
|
+
ref: (el) => setItemRef(el, index),
|
|
431
|
+
class: normalizeClass(["position-relative mb1px pl1px", { [unref(ns).e("expanded-border")]: item.expanded }])
|
|
432
|
+
}, [
|
|
433
|
+
createElementVNode("div", {
|
|
434
|
+
class: normalizeClass([
|
|
435
|
+
unref(ns).e("item-header"),
|
|
436
|
+
"px16px",
|
|
437
|
+
unref(ns).e("sticky-header"),
|
|
438
|
+
{ [unref(ns).m("expanded")]: item.expanded }
|
|
439
|
+
]),
|
|
440
|
+
onClick: ($event) => onTableExpand(false, item)
|
|
441
|
+
}, [item.expanded ? (openBlock(), createBlock(unref(CaretDownOutlined), {
|
|
442
|
+
key: 0,
|
|
443
|
+
class: normalizeClass(unref(ns).e("expanded-icon"))
|
|
444
|
+
}, null, 8, ["class"])) : (openBlock(), createBlock(unref(CaretRightOutlined), {
|
|
445
|
+
key: 1,
|
|
446
|
+
class: normalizeClass(unref(ns).e("expanded-icon")),
|
|
447
|
+
onClick: ($event) => onTableExpand(true, item)
|
|
448
|
+
}, null, 8, ["class", "onClick"])), createVNode(_component_a_descriptions, {
|
|
449
|
+
column: 5,
|
|
450
|
+
class: "ell"
|
|
451
|
+
}, {
|
|
452
|
+
default: withCtx(() => [
|
|
453
|
+
createVNode(_component_a_descriptions_item, { label: "操作人" }, {
|
|
454
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
455
|
+
class: "ell",
|
|
456
|
+
title: item.createUserName
|
|
457
|
+
}, toDisplayString(item.triggerType ? "系统" : item.createUserName), 9, _hoisted_3)]),
|
|
458
|
+
_: 2
|
|
459
|
+
}, 1024),
|
|
460
|
+
createVNode(_component_a_descriptions_item, { label: "账号" }, {
|
|
461
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
462
|
+
class: "ell",
|
|
463
|
+
title: item.userName
|
|
464
|
+
}, toDisplayString(item.triggerType ? unref(displayValue) : item.userName), 9, _hoisted_4)]),
|
|
465
|
+
_: 2
|
|
466
|
+
}, 1024),
|
|
467
|
+
createVNode(_component_a_descriptions_item, { label: "触发方式" }, {
|
|
468
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.triggerType ? unref(t)("sys.appDesigner.systemTriggered") : unref(t)("sys.appDesigner.userBehavior")), 1)]),
|
|
469
|
+
_: 2
|
|
470
|
+
}, 1024),
|
|
471
|
+
createVNode(_component_a_descriptions_item, { label: "操作类型" }, {
|
|
472
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(operationTypeMap).get(item.operationType)), 1)]),
|
|
473
|
+
_: 2
|
|
474
|
+
}, 1024),
|
|
475
|
+
createVNode(_component_a_descriptions_item, { label: "操作时间" }, {
|
|
476
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(dayjs)(item.modifyTime).format("YYYY-MM-DD HH:mm")), 1)]),
|
|
477
|
+
_: 2
|
|
478
|
+
}, 1024)
|
|
479
|
+
]),
|
|
480
|
+
_: 2
|
|
481
|
+
}, 1024)], 10, _hoisted_2),
|
|
482
|
+
item.expanded && logDetails.value[item.id] ? (openBlock(), createElementBlock("div", {
|
|
483
|
+
key: 0,
|
|
484
|
+
class: normalizeClass(unref(ns).e("title"))
|
|
485
|
+
}, " 主表追溯详情 ", 2)) : createCommentVNode("", true),
|
|
486
|
+
item.expanded && logDetails.value[item.id] ? (openBlock(), createElementBlock("div", _hoisted_5, [_cache[3] || (_cache[3] = createElementVNode("span", { class: "color-[#717682]" }, " 所属模型:", -1)), createTextVNode(" " + toDisplayString(logDetails.value[item.id][0].modelName), 1)])) : createCommentVNode("", true),
|
|
487
|
+
item.expanded && logDetails.value[item.id] && logDetails.value[item.id][0].recordFieldJson ? (openBlock(), createBlock(trace_table_default, {
|
|
488
|
+
key: 2,
|
|
489
|
+
class: "my-12px ml-16px",
|
|
490
|
+
"is-main": true,
|
|
491
|
+
"data-sourse": logDetails.value[item.id][0].recordFieldJson,
|
|
492
|
+
type: item.operationType
|
|
493
|
+
}, null, 8, ["data-sourse", "type"])) : createCommentVNode("", true),
|
|
494
|
+
item.expanded && logDetails.value[item.id] && logDetails.value[item.id][0].children.length ? (openBlock(), createElementBlock("div", _hoisted_6, [createElementVNode("div", { class: normalizeClass([unref(ns).e("title"), unref(ns).e("sub-title")]) }, "子表追溯详情", 2), (openBlock(true), createElementBlock(Fragment, null, renderList(logDetails.value[item.id][0].children, (p, index_) => {
|
|
495
|
+
return openBlock(), createElementBlock("div", { key: index_ }, [createElementVNode("div", _hoisted_7, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "color-[#717682]" }, " 所属模型:", -1)), createTextVNode(" " + toDisplayString(p[0].modelName), 1)]), (openBlock(), createBlock(unref(BasicTable), {
|
|
496
|
+
key: `${item.id}-${p[0].parentFieldKey}`,
|
|
497
|
+
columns: getColumns(item.operationType),
|
|
498
|
+
"data-source": p,
|
|
499
|
+
pagination: false,
|
|
500
|
+
"expanded-row-keys": expandedRowKeys.value[item.id + p[0].parentFieldKey] || [],
|
|
501
|
+
class: normalizeClass(unref(ns).e("trace-table")),
|
|
502
|
+
size: "small",
|
|
503
|
+
"show-index-column": false,
|
|
504
|
+
"show-expand-column": false,
|
|
505
|
+
scroll: { y: "max-content" }
|
|
506
|
+
}, {
|
|
507
|
+
expandedRowRender: withCtx(({ record }) => [record.children && record.children.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_8, [(openBlock(true), createElementBlock(Fragment, null, renderList(sunDetails.value[item.id + record.sonId], (value, _index) => {
|
|
508
|
+
return openBlock(), createElementBlock("div", { key: _index }, [createElementVNode("div", _hoisted_9, [_cache[5] || (_cache[5] = createElementVNode("span", { class: "color-s[#717682]" }, " 所属模型:", -1)), createTextVNode(" " + toDisplayString(value.modelName), 1)]), createVNode(trace_table_default, {
|
|
509
|
+
"is-main": false,
|
|
510
|
+
type: item.operationType,
|
|
511
|
+
"data-sourse": value.recordFieldJson
|
|
512
|
+
}, null, 8, ["type", "data-sourse"])]);
|
|
513
|
+
}), 128))])) : createCommentVNode("", true)]),
|
|
514
|
+
bodyCell: withCtx(({ column, record }) => [record.fieldType === unref(FIELD_TYPE).IMAGE && (column.key === "newData" || column.key === "oldData") ? (openBlock(), createBlock(image_cell_default, {
|
|
515
|
+
key: 0,
|
|
516
|
+
"file-list": record[column.key]
|
|
517
|
+
}, null, 8, ["file-list"])) : record.fieldType === unref(FIELD_TYPE).ATTACHMENT && (column.key === "newData" || column.key === "oldData") ? (openBlock(), createBlock(file_cell_default, {
|
|
518
|
+
key: 1,
|
|
519
|
+
"file-list": record[column.key]
|
|
520
|
+
}, null, 8, ["file-list"])) : record.fieldType === unref(FIELD_TYPE).SERIALRULE && (column.key === "newData" || column.key === "oldData") ? (openBlock(), createBlock(serial_rule_default, {
|
|
521
|
+
key: 2,
|
|
522
|
+
"rule-config": record[column.key]
|
|
523
|
+
}, null, 8, ["rule-config"])) : record.fieldType === unref(FIELD_TYPE).EXPRESSION_CONDITION && (column.key === "newData" || column.key === "oldData") ? (openBlock(), createBlock(expression_condition_default, {
|
|
524
|
+
key: 3,
|
|
525
|
+
"condition-config": record[column.key]
|
|
526
|
+
}, null, 8, ["condition-config"])) : record.fieldType === unref(FIELD_TYPE).SIGNATURE && (column.key === "newData" || column.key === "oldData") ? (openBlock(), createBlock(signature_cell_default, {
|
|
527
|
+
key: 4,
|
|
528
|
+
"file-list": record[column.key]
|
|
529
|
+
}, null, 8, ["file-list"])) : column.key === "operationType" ? (openBlock(), createElementBlock("div", _hoisted_10, [record.expandIndex ? (openBlock(), createElementBlock("span", {
|
|
530
|
+
key: 0,
|
|
531
|
+
style: { "cursor": "pointer" },
|
|
532
|
+
onClick: ($event) => handleExpand(record.expandIndex, item.id + record.parentFieldKey)
|
|
533
|
+
}, [expandedRowKeys.value[item.id + record.parentFieldKey]?.includes(record.expandIndex) ? (openBlock(), createBlock(unref(CaretDownOutlined), {
|
|
534
|
+
key: 0,
|
|
535
|
+
class: normalizeClass(unref(ns).e("color-blue"))
|
|
536
|
+
}, null, 8, ["class"])) : (openBlock(), createBlock(unref(CaretRightOutlined), { key: 1 }))], 8, _hoisted_11)) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(unref(operationTypeMap).get(record[column.key])), 1)])) : enumField.includes(record.fieldType) && column.key === "newData" ? (openBlock(), createElementBlock("div", {
|
|
537
|
+
key: 6,
|
|
538
|
+
class: normalizeClass(unref(ns).e("wrap"))
|
|
539
|
+
}, toDisplayString(record.newDict && record.newDict.length ? record.newDict.join(",") : record.newData ? record.newData : unref(displayValue)), 3)) : enumField.includes(record.fieldType) && column.key === "oldData" ? (openBlock(), createElementBlock("div", {
|
|
540
|
+
key: 7,
|
|
541
|
+
class: normalizeClass(unref(ns).e("wrap"))
|
|
542
|
+
}, toDisplayString(record.oldDict && record.oldDict.length ? record.oldDict.join(",") : record.oldData ? record.oldData : unref(displayValue)), 3)) : record.fieldType == unref(FIELD_TYPE).ENUM_MULTI && column.key === "oldData" ? (openBlock(), createElementBlock("div", {
|
|
543
|
+
key: 8,
|
|
544
|
+
class: normalizeClass(unref(ns).e("wrap"))
|
|
545
|
+
}, toDisplayString(record.oldDict && record.oldDict.length ? record.oldDict.join(",") : record.oldData ? record.oldData.replaceAll("|", ",") : unref(displayValue)), 3)) : record.fieldType == unref(FIELD_TYPE).ENUM_MULTI && column.key === "newData" ? (openBlock(), createElementBlock("div", {
|
|
546
|
+
key: 9,
|
|
547
|
+
class: normalizeClass(unref(ns).e("wrap"))
|
|
548
|
+
}, toDisplayString(record.newDict && record.newDict.length ? record.newDict.join(",") : record.newData ? record.newData.replaceAll("|", ",") : unref(displayValue)), 3)) : column.key !== "fieldName" ? (openBlock(), createElementBlock("div", {
|
|
549
|
+
key: 10,
|
|
550
|
+
class: normalizeClass(unref(ns).e("wrap"))
|
|
551
|
+
}, toDisplayString(record[column.key] === false ? record[column.key].toString() : record[column.key] || unref(displayValue)), 3)) : (openBlock(), createElementBlock(Fragment, { key: 11 }, [createTextVNode(toDisplayString(record[column.key] || unref(displayValue)), 1)], 64))]),
|
|
552
|
+
_: 2
|
|
553
|
+
}, 1032, [
|
|
554
|
+
"columns",
|
|
555
|
+
"data-source",
|
|
556
|
+
"expanded-row-keys",
|
|
557
|
+
"class"
|
|
558
|
+
]))]);
|
|
559
|
+
}), 128))])) : createCommentVNode("", true)
|
|
560
|
+
], 2);
|
|
561
|
+
}), 128))], 2)) : createCommentVNode("", true), dataSource.value.length ? (openBlock(), createElementBlock("div", {
|
|
562
|
+
key: 1,
|
|
563
|
+
class: normalizeClass(unref(ns).e("pagination"))
|
|
564
|
+
}, [createVNode(_component_a_pagination, {
|
|
565
|
+
current: pagination.value.current,
|
|
566
|
+
"onUpdate:current": _cache[0] || (_cache[0] = ($event) => pagination.value.current = $event),
|
|
567
|
+
"page-size": pagination.value.pageSize,
|
|
568
|
+
"onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => pagination.value.pageSize = $event),
|
|
569
|
+
class: "float-right",
|
|
570
|
+
total: pagination.value.total,
|
|
571
|
+
"show-total": pagination.value.showTotal,
|
|
572
|
+
"show-quick-jumper": "",
|
|
573
|
+
"show-size-changer": "",
|
|
574
|
+
size: "small",
|
|
575
|
+
onChange: changePagination
|
|
576
|
+
}, null, 8, [
|
|
577
|
+
"current",
|
|
578
|
+
"page-size",
|
|
579
|
+
"total",
|
|
580
|
+
"show-total"
|
|
581
|
+
])], 2)) : (openBlock(), createElementBlock("div", {
|
|
582
|
+
key: 2,
|
|
583
|
+
class: normalizeClass([
|
|
584
|
+
unref(ns).e("empty"),
|
|
585
|
+
"w100%",
|
|
586
|
+
"h100%",
|
|
587
|
+
"flex",
|
|
588
|
+
"items-center",
|
|
589
|
+
"justify-center",
|
|
590
|
+
"ks-column"
|
|
591
|
+
])
|
|
592
|
+
}, [createElementVNode("img", {
|
|
593
|
+
src: unref(empty_default),
|
|
594
|
+
class: "w92px"
|
|
595
|
+
}, null, 8, _hoisted_12), !isTrace.value ? (openBlock(), createElementBlock("div", _hoisted_13, " 未开启建模追溯,此处暂无追溯信息 ")) : (openBlock(), createElementBlock("div", _hoisted_14, "暂无数据"))], 2))]),
|
|
596
|
+
_: 1
|
|
597
|
+
}, 8, ["locale"])]),
|
|
598
|
+
_: 1
|
|
599
|
+
}, 16, [
|
|
600
|
+
"visible",
|
|
601
|
+
"cancel-text",
|
|
602
|
+
"style",
|
|
603
|
+
"body-style",
|
|
604
|
+
"class"
|
|
605
|
+
]);
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
//#endregion
|
|
610
|
+
export { modeling_trace_template_vue_vue_type_script_setup_true_lang_default as default };
|