cloud-web-corejs 1.0.54-dev.787 → 1.0.54-dev.789

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 (42) hide show
  1. package/package.json +1 -1
  2. package/src/components/baseInputExport/mixins.js +13 -2
  3. package/src/components/code-editor/async.js +29 -0
  4. package/src/components/code-editor/index.vue +65 -6
  5. package/src/components/table/index.js +4 -0
  6. package/src/components/xform/docs/2026-08 /345/210/227/350/241/250/345/257/274/345/207/272/350/204/261/346/225/217/345/210/227/345/211/224/351/231/244/350/220/275/345/234/260/346/226/207/346/241/243.md" +173 -0
  7. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +18 -73
  8. package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +3 -0
  9. package/src/components/xform/form-render/container-item/data-table-mixin.js +20 -0
  10. package/src/components/xform/form-render/container-item/list-h5-item.vue +12 -0
  11. package/src/components/xform/utils/textMaskUtil.js +179 -0
  12. package/src/index.js +2 -3
  13. package/src/store/config/index.js +224 -0
  14. package/src/store/modules/tagsView.js +4 -2
  15. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  16. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  17. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  18. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  19. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  20. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  21. package/src/views/bd/project/branch/form_script/list.vue +22 -0
  22. package/src/views/bd/project/branch/form_template/list.vue +21 -0
  23. package/src/views/bd/project/branch/menu_kind/list.vue +21 -0
  24. package/src/views/bd/project/common/form_script/list.vue +16 -0
  25. package/src/views/bd/project/common/form_template/list.vue +15 -0
  26. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  27. package/src/views/bd/project/core/branchContext.js +100 -0
  28. package/src/views/bd/project/core/branchPage.js +78 -0
  29. package/src/views/bd/project/core/branchPageWrap.vue +216 -0
  30. package/src/views/bd/project/core/branchScope.js +44 -0
  31. package/src/views/bd/project/core/branchSelect.vue +106 -0
  32. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  33. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  34. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  35. package/src/views/bd/setting/form_template/formDesignerDialog.vue +1 -0
  36. package/src/views/bd/setting/form_template/list.vue +2 -2
  37. package/src/views/bd/setting/form_template/mixins/edit.js +3 -3
  38. package/src/views/bd/setting/form_template/mixins/list.js +3 -3
  39. package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
  40. package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -3
  41. package/src/views/bd/setting/form_template/wf_list.vue +2 -2
  42. package/src/views/user/form/vform/designer.vue +51 -22
@@ -0,0 +1,100 @@
1
+ /**
2
+ * 分支作用域上下文。
3
+ *
4
+ * 通用工程/分支工程/数据表管理三组菜单直接复用 bd/setting 下的原页面组件,
5
+ * 原组件不感知分支,所以由外层壳组件在自身实例上挂一个作用域标记,
6
+ * 请求注入器沿组件树向上找到该标记后给请求补上 branchFlag / branchCode。
7
+ */
8
+
9
+ export const SCOPE_KEY = "__bdBranchScope__";
10
+
11
+ /** 分支标识:0通用工程 1分支工程 99数据表分类 */
12
+ export const BRANCH_FLAG = {
13
+ COMMON: 0,
14
+ BRANCH: 1,
15
+ DATA_TABLE: 99,
16
+ };
17
+
18
+ /**
19
+ * 只有后端 DTO 真正声明了 branchCode/branchFlag 的接口才允许注入,
20
+ * 否则多余字段会被反序列化拒绝。以路径结尾精确匹配。
21
+ */
22
+ const INJECT_URLS = [
23
+ "/menuKind/getAllList",
24
+ "/menuKind/getChildren",
25
+ "/menuKind/save",
26
+ "/menuKind/update",
27
+
28
+ "/formTemplate/listPage",
29
+ "/formTemplate/listOtherPage",
30
+ "/formTemplate/listPageWf",
31
+ "/formTemplate/save",
32
+ "/formTemplate/update",
33
+ "/formTemplate/updateDesign",
34
+
35
+ "/formScript/listPage",
36
+ "/formScript/listOtherPage",
37
+ "/formScript/save",
38
+ "/formScript/update",
39
+ "/formScript/saves",
40
+ "/formScript/getServiceName",
41
+
42
+ "/szTaMb/listPage",
43
+ "/szTaMb/listOtherPage",
44
+ "/szTaMb/save",
45
+ "/szTaMb/update",
46
+
47
+ "/formVersion/listPage",
48
+ "/form_oplog/listPage",
49
+ "/form_import_log/listPage",
50
+ ];
51
+
52
+ /**
53
+ * 脱离组件树创建的实例($jsonImport 动态弹框等)找不到父链,
54
+ * 由当前激活的分支页面兜底。
55
+ */
56
+ let fallbackScope = null;
57
+
58
+ export function setFallbackScope(scope) {
59
+ fallbackScope = scope || null;
60
+ }
61
+
62
+ export function getFallbackScope() {
63
+ return fallbackScope;
64
+ }
65
+
66
+ /** 沿 $parent 向上找最近的分支作用域,找不到则用兜底作用域 */
67
+ export function findScope(vm) {
68
+ let cur = vm;
69
+ while (cur) {
70
+ if (cur[SCOPE_KEY]) {
71
+ return cur[SCOPE_KEY];
72
+ }
73
+ cur = cur.$parent;
74
+ }
75
+ return fallbackScope;
76
+ }
77
+
78
+ export function needInject(url) {
79
+ if (!url) {
80
+ return false;
81
+ }
82
+ let path = url;
83
+ let qIndex = path.indexOf("?");
84
+ if (qIndex >= 0) {
85
+ path = path.substring(0, qIndex);
86
+ }
87
+ return INJECT_URLS.some((item) => path.endsWith(item));
88
+ }
89
+
90
+ /** 作用域转成请求参数:通用工程/数据表管理没有分支编码 */
91
+ export function getScopeParams(scope) {
92
+ if (!scope) {
93
+ return null;
94
+ }
95
+ let params = { branchFlag: scope.branchFlag };
96
+ if (scope.branchCode) {
97
+ params.branchCode = scope.branchCode;
98
+ }
99
+ return params;
100
+ }
@@ -0,0 +1,78 @@
1
+ import branchScope from "./branchScope";
2
+ import { BRANCH_FLAG } from "./branchContext";
3
+ import branchPageWrap from "./branchPageWrap.vue";
4
+
5
+ /**
6
+ * 分支工程页面通用逻辑:
7
+ * 1. 进入先选分支,选中后再渲染被复用的原组件
8
+ * 2. 选中后分支锁定,不可再改
9
+ * 3. 「打开新分支」以独立标签再开一页(需菜单 meta.repeatOpen)
10
+ */
11
+ let modules = {};
12
+ modules = {
13
+ components: { branchPageWrap },
14
+ mixins: [branchScope(BRANCH_FLAG.BRANCH)],
15
+ data() {
16
+ return {
17
+ branchCode: "",
18
+ branchName: "",
19
+ // 组件创建时记下原始菜单名,避免 route.meta.title 被改写后叠加多个分支名
20
+ baseTabTitle: "",
21
+ };
22
+ },
23
+ computed: {
24
+ branchLabel() {
25
+ if (!this.branchCode) {
26
+ return "";
27
+ }
28
+ if (this.branchName) {
29
+ return `${this.branchName}(${this.branchCode})`;
30
+ }
31
+ return this.branchCode;
32
+ },
33
+ },
34
+ created() {
35
+ this.baseTabTitle = this.resolveBaseTabTitle();
36
+ },
37
+ methods: {
38
+ resolveBaseTabTitle() {
39
+ let matched = this.$route.matched || [];
40
+ let last = matched[matched.length - 1] || {};
41
+ // 优先用路由记录上的原始 menuName,勿用可能已被污染的 meta.title
42
+ return (
43
+ last.menuName ||
44
+ this.$route.menuName ||
45
+ last.meta?.originTitle ||
46
+ this.$route.meta?.originTitle ||
47
+ last.meta?.title ||
48
+ this.$route.meta?.title ||
49
+ ""
50
+ );
51
+ },
52
+ onBranchChange(branch) {
53
+ if (!branch || !branch.branchCode) {
54
+ return;
55
+ }
56
+ this.branchCode = branch.branchCode;
57
+ this.branchName = branch.branchName || "";
58
+ this.updateTabTitle();
59
+ },
60
+ updateTabTitle() {
61
+ let base = this.baseTabTitle || this.resolveBaseTabTitle();
62
+ let title = this.branchName
63
+ ? `${base}-${this.branchName}`
64
+ : this.branchCode
65
+ ? `${base}-${this.branchCode}`
66
+ : base;
67
+ this.$store.dispatch("tagsView/updateVisitedView2", {
68
+ view: this.$route,
69
+ title,
70
+ });
71
+ },
72
+ openNewBranch() {
73
+ // 带 repeatOpen 的菜单:附带唯一 _rk,新开独立标签回到选分支态
74
+ this.$openView({ path: this.$route.path }, this.$route);
75
+ },
76
+ },
77
+ };
78
+ export default modules;
@@ -0,0 +1,216 @@
1
+ <template>
2
+ <div class="bd-branch-page" :class="{ 'has-branch': !!branchCode }">
3
+ <!-- 已选分支:内容区顶部工具条,不可改;提供打开新分支 -->
4
+ <div class="branch-bar" v-if="branchCode">
5
+ <span class="branch-locked">
6
+ <span class="label">{{ $t1("分支") }}:</span>
7
+ <span class="value">{{ branchLabel || branchCode }}</span>
8
+ </span>
9
+ <el-button
10
+ size="mini"
11
+ type="primary"
12
+ plain
13
+ icon="el-icon-plus"
14
+ @click="$emit('open-new')"
15
+ >
16
+ {{ $t1("打开新分支") }}
17
+ </el-button>
18
+ </div>
19
+ <div class="branch-body" ref="branchBody" v-if="branchCode">
20
+ <slot></slot>
21
+ </div>
22
+ <!-- 未选:先选分支再进入具体页面 -->
23
+ <div class="branch-empty" v-else>
24
+ <i class="el-icon-office-building"></i>
25
+ <p class="tip">{{ $t1("请先选择分支") }}</p>
26
+ <branchSelect
27
+ :value="branchCode"
28
+ :auto-restore="false"
29
+ @input="$emit('update:branchCode', $event)"
30
+ @change="$emit('branch-change', $event)"
31
+ ></branchSelect>
32
+ </div>
33
+ </div>
34
+ </template>
35
+
36
+ <script>
37
+ import branchSelect from "./branchSelect.vue";
38
+
39
+ const BADGE_CLASS = "bd-branch-detail-badge";
40
+
41
+ export default {
42
+ name: "bdBranchPageWrap",
43
+ components: { branchSelect },
44
+ props: {
45
+ branchCode: String,
46
+ branchLabel: String,
47
+ },
48
+ watch: {
49
+ branchCode() {
50
+ this.scheduleInjectBadge();
51
+ },
52
+ branchLabel() {
53
+ this.scheduleInjectBadge();
54
+ },
55
+ },
56
+ mounted() {
57
+ this.scheduleInjectBadge();
58
+ },
59
+ beforeDestroy() {
60
+ this.clearInjectTimer();
61
+ this.clearBodyObserver();
62
+ },
63
+ methods: {
64
+ clearInjectTimer() {
65
+ if (this._injectTimer) {
66
+ clearTimeout(this._injectTimer);
67
+ this._injectTimer = null;
68
+ }
69
+ },
70
+ clearBodyObserver() {
71
+ if (this._bodyObserver) {
72
+ this._bodyObserver.disconnect();
73
+ this._bodyObserver = null;
74
+ }
75
+ },
76
+ scheduleInjectBadge() {
77
+ this.clearInjectTimer();
78
+ this._injectTimer = setTimeout(() => {
79
+ this.ensureBodyObserver();
80
+ this.injectDetailBadges();
81
+ }, 50);
82
+ },
83
+ ensureBodyObserver() {
84
+ let body = this.$refs.branchBody;
85
+ if (!body || this._bodyObserver) {
86
+ return;
87
+ }
88
+ // 详情页通过 x-tabs 异步挂载,监听后补上分支名
89
+ this._bodyObserver = new MutationObserver(() => {
90
+ if (this._injecting) {
91
+ return;
92
+ }
93
+ this.scheduleInjectBadge();
94
+ });
95
+ this._bodyObserver.observe(body, { childList: true, subtree: true });
96
+ },
97
+ injectDetailBadges() {
98
+ let body = this.$refs.branchBody;
99
+ if (!body || !this.branchCode || this._injecting) {
100
+ return;
101
+ }
102
+ this._injecting = true;
103
+ try {
104
+ let text = this.$t1("分支") + ":" + (this.branchLabel || this.branchCode);
105
+ let headers = body.querySelectorAll(".detail-wrap .d-header .fl");
106
+ headers.forEach((el) => {
107
+ let badge = el.querySelector("." + BADGE_CLASS);
108
+ if (!badge) {
109
+ badge = document.createElement("span");
110
+ badge.className = BADGE_CLASS;
111
+ badge.textContent = text;
112
+ el.appendChild(badge);
113
+ return;
114
+ }
115
+ // 相同文案不要再写,否则会反复触发 MutationObserver 卡死页面
116
+ if (badge.textContent !== text) {
117
+ badge.textContent = text;
118
+ }
119
+ });
120
+ } finally {
121
+ this._injecting = false;
122
+ }
123
+ },
124
+ },
125
+ };</script>
126
+
127
+ <style lang="scss" scoped>
128
+ .bd-branch-page {
129
+ position: relative;
130
+ height: 100%;
131
+
132
+ &.has-branch {
133
+ display: flex;
134
+ flex-direction: column;
135
+ }
136
+
137
+ .branch-bar {
138
+ flex: none;
139
+ display: flex;
140
+ align-items: center;
141
+ gap: 12px;
142
+ margin: 0 10px 8px;
143
+ padding: 8px 12px;
144
+ background: #fff;
145
+ border-radius: 2px;
146
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
147
+
148
+ .branch-locked {
149
+ display: inline-flex;
150
+ align-items: center;
151
+ color: #606266;
152
+ font-size: 13px;
153
+
154
+ .label {
155
+ margin-right: 6px;
156
+ color: #909399;
157
+ }
158
+
159
+ .value {
160
+ max-width: 320px;
161
+ overflow: hidden;
162
+ text-overflow: ellipsis;
163
+ white-space: nowrap;
164
+ font-weight: 500;
165
+ color: #303133;
166
+ }
167
+ }
168
+ }
169
+
170
+ .branch-body {
171
+ flex: 1;
172
+ min-height: 0;
173
+ overflow: hidden;
174
+ }
175
+
176
+ .branch-empty {
177
+ height: 100%;
178
+ display: flex;
179
+ flex-direction: column;
180
+ align-items: center;
181
+ justify-content: center;
182
+ color: #909399;
183
+ background-color: #fff;
184
+ border-radius: 2px;
185
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
186
+ margin: 0 10px;
187
+
188
+ i {
189
+ font-size: 48px;
190
+ margin-bottom: 12px;
191
+ color: #c0c4cc;
192
+ }
193
+
194
+ .tip {
195
+ margin: 0 0 16px;
196
+ font-size: 14px;
197
+ }
198
+ }
199
+ }
200
+ </style>
201
+
202
+ <style lang="scss">
203
+ /* 注入到原详情页标题栏,不能用 scoped */
204
+ .bd-branch-detail-badge {
205
+ display: inline-block;
206
+ margin-left: 12px;
207
+ padding: 2px 8px;
208
+ font-size: 12px;
209
+ font-weight: 400;
210
+ line-height: 18px;
211
+ color: #6386fa;
212
+ background: #f0f3ff;
213
+ border-radius: 2px;
214
+ vertical-align: middle;
215
+ }
216
+ </style>
@@ -0,0 +1,44 @@
1
+ import { SCOPE_KEY, setFallbackScope } from "./branchContext";
2
+ import { installBranchHttp } from "./httpBranchPatch";
3
+
4
+ /**
5
+ * 壳组件 mixin:在实例上挂分支作用域标记。
6
+ *
7
+ * created 早于子组件的 created,保证被复用的原组件发出的第一个请求就带上分支参数;
8
+ * 请求补丁也在这里安装,无需改动 main.js。
9
+ *
10
+ * @param {number} branchFlag 分支标识:0通用工程 1分支工程 99数据表分类
11
+ */
12
+ export default function branchScope(branchFlag) {
13
+ return {
14
+ created() {
15
+ installBranchHttp();
16
+ this[SCOPE_KEY] = {
17
+ branchFlag,
18
+ branchCode: this.branchCode || null,
19
+ branchName: this.branchName || null,
20
+ };
21
+ setFallbackScope(this[SCOPE_KEY]);
22
+ },
23
+ mounted() {
24
+ setFallbackScope(this[SCOPE_KEY]);
25
+ },
26
+ activated() {
27
+ setFallbackScope(this[SCOPE_KEY]);
28
+ },
29
+ deactivated() {
30
+ setFallbackScope(null);
31
+ },
32
+ beforeDestroy() {
33
+ setFallbackScope(null);
34
+ },
35
+ watch: {
36
+ branchCode(val) {
37
+ this[SCOPE_KEY].branchCode = val || null;
38
+ },
39
+ branchName(val) {
40
+ this[SCOPE_KEY].branchName = val || null;
41
+ },
42
+ },
43
+ };
44
+ }
@@ -0,0 +1,106 @@
1
+ <template>
2
+ <div class="bd-branch-select">
3
+ <span class="label">{{ $t1("分支") }}:</span>
4
+ <el-select
5
+ :value="value"
6
+ size="small"
7
+ filterable
8
+ :placeholder="$t1('请选择分支')"
9
+ @change="handleChange"
10
+ >
11
+ <el-option
12
+ v-for="item in branches"
13
+ :key="item.branchCode"
14
+ :label="item.branchName + '(' + item.branchCode + ')'"
15
+ :value="item.branchCode"
16
+ ></el-option>
17
+ </el-select>
18
+ </div>
19
+ </template>
20
+
21
+ <script>
22
+ const STORAGE_KEY = "bdProjectBranchCode";
23
+
24
+ export default {
25
+ name: "bdBranchSelect",
26
+ props: {
27
+ value: String,
28
+ // 首次进入时是否自动回填上次选择的分支
29
+ autoRestore: {
30
+ type: Boolean,
31
+ default: true,
32
+ },
33
+ },
34
+ data() {
35
+ return {
36
+ branches: [],
37
+ };
38
+ },
39
+ mounted() {
40
+ this.initData();
41
+ },
42
+ methods: {
43
+ initData() {
44
+ this.$http({
45
+ url: USER_PREFIX + "/bd_branch/listPage",
46
+ method: "post",
47
+ data: {
48
+ enabled: true,
49
+ current: 1,
50
+ size: 500,
51
+ },
52
+ success: (res) => {
53
+ this.branches = res?.objx?.records || [];
54
+ this.restore();
55
+ },
56
+ });
57
+ },
58
+ restore() {
59
+ if (!this.autoRestore || this.value) {
60
+ return;
61
+ }
62
+ let last = localStorage.getItem(STORAGE_KEY);
63
+ if (last && this.branches.some((item) => item.branchCode === last)) {
64
+ this.handleChange(last);
65
+ }
66
+ },
67
+ handleChange(val) {
68
+ let branchCode = val || "";
69
+ if (branchCode) {
70
+ localStorage.setItem(STORAGE_KEY, branchCode);
71
+ } else {
72
+ localStorage.removeItem(STORAGE_KEY);
73
+ }
74
+ this.$emit("input", branchCode);
75
+ this.$emit(
76
+ "change",
77
+ this.branches.find((item) => item.branchCode === branchCode) || null
78
+ );
79
+ },
80
+ },
81
+ };
82
+ </script>
83
+
84
+ <style lang="scss" scoped>
85
+ .bd-branch-select {
86
+ display: inline-flex;
87
+ align-items: center;
88
+
89
+ .label {
90
+ margin-right: 6px;
91
+ color: #666;
92
+ white-space: nowrap;
93
+ }
94
+
95
+ /* 覆盖全局 .el-select{display:block} / .el-input{width:148px},避免框体和内层宽度不一致 */
96
+ ::v-deep .el-select {
97
+ display: inline-block;
98
+ width: 180px;
99
+
100
+ .el-input,
101
+ .el-input__inner {
102
+ width: 100% !important;
103
+ }
104
+ }
105
+ }
106
+ </style>
@@ -0,0 +1,58 @@
1
+ import Vue from "vue";
2
+ import { findScope, getScopeParams, needInject } from "./branchContext";
3
+
4
+ /**
5
+ * 给 Vue.prototype.$http 追加分支参数。
6
+ *
7
+ * $commonHttp 内部也是转调 this.$http,vxe 表格代理、$jsonExport、表单设计器保存、
8
+ * 版本回滚等全部走这一个出口,所以只需要在这里包一层就能覆盖所有请求点,
9
+ * 不必改动 bd/setting 下的任何原文件。
10
+ */
11
+
12
+ let patched = false;
13
+
14
+ /** 调用方已显式指定分支参数时以调用方为准(如分支定义里固定查通用分类) */
15
+ function merge(data, params) {
16
+ let next = { ...(data || {}) };
17
+ Object.keys(params).forEach((key) => {
18
+ if (next[key] === undefined || next[key] === null) {
19
+ next[key] = params[key];
20
+ }
21
+ });
22
+ return next;
23
+ }
24
+
25
+ export function installBranchHttp() {
26
+ if (patched) {
27
+ return;
28
+ }
29
+ const origin = Vue.prototype.$http;
30
+ // $http 由 utils/vab.js 在启动时安装,此处尚未就绪则不标记已打补丁,留待下次调用
31
+ if (typeof origin !== "function") {
32
+ return;
33
+ }
34
+ patched = true;
35
+
36
+ const wrapped = function (option) {
37
+ let scope = findScope(this);
38
+ let params = needInject(option && option.url) ? getScopeParams(scope) : null;
39
+ if (!params) {
40
+ return origin.apply(this, arguments);
41
+ }
42
+ let data = option.data;
43
+ let nextData;
44
+ if (Array.isArray(data)) {
45
+ // /formScript/saves 的 body 是 DTO 数组,需要逐项补参数
46
+ nextData = data.map((item) => merge(item, params));
47
+ } else {
48
+ nextData = merge(data, params);
49
+ }
50
+ return origin.call(this, { ...option, data: nextData });
51
+ };
52
+
53
+ // request.js 在 $http 上挂了额外属性(如取消、拦截相关),透传出去
54
+ Object.assign(wrapped, origin);
55
+ wrapped.prototype = origin.prototype;
56
+
57
+ Vue.prototype.$http = wrapped;
58
+ }
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <baseList></baseList>
3
+ </template>
4
+
5
+ <script>
6
+ import branchScope from "../../core/branchScope";
7
+ import { BRANCH_FLAG } from "../../core/branchContext";
8
+ import baseList from "@base/views/bd/setting/menu_kind/list.vue";
9
+
10
+ export default {
11
+ name: "dt_menu_kind:list",
12
+ components: { baseList },
13
+ mixins: [branchScope(BRANCH_FLAG.DATA_TABLE)],
14
+ };
15
+ </script>
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <baseList></baseList>
3
+ </template>
4
+
5
+ <script>
6
+ import branchScope from "../../core/branchScope";
7
+ import { BRANCH_FLAG } from "../../core/branchContext";
8
+ import baseList from "@base/views/bd/setting/table_model/list.vue";
9
+
10
+ export default {
11
+ name: "dt_table_model:list",
12
+ components: { baseList },
13
+ mixins: [branchScope(BRANCH_FLAG.DATA_TABLE)],
14
+ };
15
+ </script>
@@ -17,6 +17,7 @@
17
17
  <designer
18
18
  ref="designer"
19
19
  :formCode.sync="formCode"
20
+ :id="formTemplate && formTemplate.id"
20
21
  @reflushTemplateList="reflushTemplateList"
21
22
  :readonly="readonly"
22
23
  :historyFlag="historyFlag"
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div id="containt">
3
- <x-tabs ref="xTabs" v-model="activeName" class="tab-box" paneKeyName="formCode">
3
+ <x-tabs ref="xTabs" v-model="activeName" class="tab-box" paneKeyName="id">
4
4
  <el-tab-pane :label="$t1('常规')" name="first">
5
5
  <editView
6
6
  v-if="showEdit"
@@ -201,7 +201,7 @@
201
201
  <el-tab-pane
202
202
  :key="tab.data.id"
203
203
  :label.sync="tab.data.formName"
204
- :name="tab.data.formCode"
204
+ :name="tab.data.id + ''"
205
205
  :closable="true"
206
206
  >
207
207
  <editView
@@ -116,10 +116,10 @@ modules = {
116
116
  }else if (this.dataId) {
117
117
  this.$commonHttp({
118
118
  aes: true,
119
- url: USER_PREFIX + `/formTemplate/getByFormCode`,
119
+ url: USER_PREFIX + `/formTemplate/get`,
120
120
  method: `post`,
121
121
  data: {
122
- stringOne: this.dataId
122
+ id: this.dataId
123
123
  },
124
124
  isLoading: true,
125
125
  modalStrictly: true,
@@ -195,7 +195,7 @@ modules = {
195
195
  } else {
196
196
  this.$baseReload({
197
197
  updateParam: {
198
- _dataId: this.formTemplate.formCode
198
+ _dataId: res.objx || this.formTemplate.id
199
199
  }
200
200
  });
201
201
  }
@@ -185,13 +185,13 @@ modules = {
185
185
  this.$refs["table-m1"].commitProxy("reload");
186
186
  },
187
187
  openEditDialog(row) {
188
- let formCode = row?.formCode || null;
188
+ let dataId = row?.id || 0;
189
189
  /*this.dataId = !id || typeof id === 'object' ? 0 : id;
190
190
  this.activeName = 'first';
191
191
  this.showItemEdit = false;
192
192
  this.$openEditView('showEdit');*/
193
- if (!formCode) {
194
- this.dataId = formCode;
193
+ if (!dataId) {
194
+ this.dataId = dataId;
195
195
  this.activeName = "first";
196
196
  this.$openEditView("showEdit");
197
197
  } else {