cloud-web-corejs 1.0.54-dev.786 → 1.0.54-dev.788
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/package.json +2 -1
- package/src/components/VabUpload/index.vue +1 -1
- package/src/components/baseInputExport/mixins.js +13 -2
- package/src/components/code-editor/async.js +29 -0
- package/src/components/code-editor/index.vue +65 -6
- package/src/components/excelImport/index.js +69 -7
- package/src/components/excelImport/mixins.js +841 -9
- package/src/components/fileLibrary/fileHistoryDialog.vue +1 -1
- package/src/components/fileLibrary/fileObjAuthEdit.vue +1 -1
- package/src/components/fileLibrary/filterDialog.vue +1 -1
- package/src/components/formDialog/README.md +324 -241
- package/src/components/formDialog/actionButtons.js +90 -0
- package/src/components/formDialog/index.js +48 -35
- package/src/components/formDialog/index.vue +802 -724
- package/src/components/formDrawer/drawer.vue +719 -0
- package/src/components/formDrawer/index.js +50 -0
- package/src/components/onlineTalk/talkUserDialog.vue +1 -1
- package/src/components/table/index.js +4 -0
- package/src/components/tempStorage/tempStorageDialog.vue +1 -1
- package/src/components/wf/addTaskUserdialog.vue +1 -1
- 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" +165 -0
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +115 -4
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +102 -5
- package/src/components/xform/form-designer/form-widget/dialog/formFieldDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +18 -73
- package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/action-button-config-dialog.vue +241 -0
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +116 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +6 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1480 -1460
- package/src/components/xform/form-render/container-item/detail-item.vue +11 -2
- package/src/components/xform/form-render/container-item/list-h5-item.vue +12 -0
- package/src/components/xform/form-render/indexMixin.js +5 -0
- package/src/components/xform/utils/textMaskUtil.js +186 -0
- package/src/index.js +505 -472
- package/src/store/config/index.js +224 -0
- package/src/store/modules/tagsView.js +4 -2
- package/src/utils/lazyPlugin.js +66 -0
- package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
- package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
- package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
- package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
- package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
- package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
- package/src/views/bd/project/branch/form_script/list.vue +22 -0
- package/src/views/bd/project/branch/form_template/list.vue +21 -0
- package/src/views/bd/project/branch/menu_kind/list.vue +21 -0
- package/src/views/bd/project/common/form_script/list.vue +16 -0
- package/src/views/bd/project/common/form_template/list.vue +15 -0
- package/src/views/bd/project/common/menu_kind/list.vue +15 -0
- package/src/views/bd/project/core/branchContext.js +100 -0
- package/src/views/bd/project/core/branchPage.js +78 -0
- package/src/views/bd/project/core/branchPageWrap.vue +216 -0
- package/src/views/bd/project/core/branchScope.js +44 -0
- package/src/views/bd/project/core/branchSelect.vue +106 -0
- package/src/views/bd/project/core/httpBranchPatch.js +58 -0
- package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
- package/src/views/bd/project/datatable/table_model/list.vue +15 -0
- package/src/views/bd/setting/bd_attach_setting/dialog.vue +1 -1
- package/src/views/bd/setting/bd_attach_setting/list.vue +1 -1
- package/src/views/bd/setting/bd_company_env/dialog.vue +1 -1
- package/src/views/bd/setting/bd_company_env/list.vue +1 -1
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +1 -1
- package/src/views/bd/setting/form_import_log/list.vue +1 -1
- package/src/views/bd/setting/form_script/dialog.vue +1 -1
- package/src/views/bd/setting/form_script/form_list.vue +1 -1
- package/src/views/bd/setting/form_script/list.vue +1 -1
- package/src/views/bd/setting/form_script/list1.vue +1 -1
- package/src/views/bd/setting/form_template/dialog.vue +1 -1
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +1 -0
- package/src/views/bd/setting/form_template/ftHistoryDialog.vue +1 -1
- package/src/views/bd/setting/form_template/itemList.vue +1 -1
- package/src/views/bd/setting/form_template/list.vue +3 -3
- package/src/views/bd/setting/form_template/mixins/edit.js +3 -3
- package/src/views/bd/setting/form_template/mixins/list.js +3 -3
- package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
- package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -3
- package/src/views/bd/setting/form_template/wf_list.vue +3 -3
- package/src/views/bd/setting/logic_param/list.vue +1 -1
- package/src/views/bd/setting/menu_kind/dialog.vue +1 -1
- package/src/views/bd/setting/menu_kind/list.vue +1 -1
- package/src/views/bd/setting/push_data/list.vue +1 -1
- package/src/views/bd/setting/push_data_h/list.vue +1 -1
- package/src/views/bd/setting/request_async_setting/list.vue +1 -1
- package/src/views/bd/setting/request_setting/list.vue +1 -1
- package/src/views/bd/setting/table_model/dialog.vue +1 -1
- package/src/views/bd/setting/table_model/list.vue +1 -1
- package/src/views/bd/setting/table_model/zdDialog.vue +1 -1
- package/src/views/support/export_template/list.vue +1 -1
- package/src/views/user/access_log/list.vue +1 -1
- package/src/views/user/access_log/list2.vue +1 -1
- package/src/views/user/api_request/list.vue +1 -1
- package/src/views/user/area/dialog.vue +1 -1
- package/src/views/user/area/list.vue +1 -1
- package/src/views/user/bill_setting/list.vue +1 -1
- package/src/views/user/bill_setting/userDialog.vue +1 -1
- package/src/views/user/code_rules/list.vue +1 -1
- package/src/views/user/common_attribute/list.vue +1 -1
- package/src/views/user/common_script/list.vue +1 -1
- package/src/views/user/company_info/dialog.vue +1 -1
- package/src/views/user/country/dialog.vue +1 -1
- package/src/views/user/country/list.vue +1 -1
- package/src/views/user/data_type_setting/dialog.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +1 -1
- package/src/views/user/extend_datasource/list.vue +1 -1
- package/src/views/user/fieldTranslation/list.vue +1 -1
- package/src/views/user/field_values_invisible/list.vue +1 -1
- package/src/views/user/file_type/list.vue +1 -1
- package/src/views/user/file_view_area/list.vue +1 -1
- package/src/views/user/form/form_template/dialog.vue +1 -1
- package/src/views/user/form/form_template/itemList.vue +1 -1
- package/src/views/user/form/form_template/list.vue +1 -1
- package/src/views/user/form/form_template_field/dialog.vue +1 -1
- package/src/views/user/form/form_type/dialog.vue +1 -1
- package/src/views/user/form/form_type/list.vue +1 -1
- package/src/views/user/form/report_requestaccess/dialog.vue +1 -1
- package/src/views/user/form/report_requestaccess/list.vue +1 -1
- package/src/views/user/form/vform/designer.vue +51 -22
- package/src/views/user/groups/dialog.vue +1 -1
- package/src/views/user/groups/list.vue +1 -1
- package/src/views/user/lang_tag/dialog.vue +1 -1
- package/src/views/user/lang_tag/list.vue +1 -1
- package/src/views/user/language_setting/list.vue +1 -1
- package/src/views/user/menu/list.vue +1 -1
- package/src/views/user/mobile_menu/list.vue +1 -1
- package/src/views/user/notify_message/list.vue +1 -1
- package/src/views/user/notify_template/list.vue +1 -1
- package/src/views/user/notify_template/list2.vue +1 -1
- package/src/views/user/oplog/list.vue +1 -1
- package/src/views/user/position/dialog.vue +1 -1
- package/src/views/user/position/list.vue +1 -1
- package/src/views/user/project_tag/dialog.vue +1 -1
- package/src/views/user/project_tag/list.vue +1 -1
- package/src/views/user/push_setting/list.vue +1 -1
- package/src/views/user/request_setting/list.vue +1 -1
- package/src/views/user/role/dialog.vue +1 -1
- package/src/views/user/role/list.vue +1 -1
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/sale_org/list.vue +1 -1
- package/src/views/user/system_notice/list.vue +1 -1
- package/src/views/user/system_parameter/list.vue +1 -1
- package/src/views/user/user/dialog.vue +1 -1
- package/src/views/user/user/form_dialog.vue +1 -1
- package/src/views/user/user/form_list.vue +1 -1
- package/src/views/user/user/list.vue +2 -2
- package/src/views/user/user_log_classify/list.vue +1 -1
- package/src/views/user/wf/wfReport/index.vue +2 -2
- package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -2
- package/src/views/user/wf/wf_manage/list.vue +2 -2
- package/src/views/user/wf/wf_manage/list2.vue +2 -2
- package/src/views/user/wf/wf_obj_config/dialog.vue +1 -1
- package/src/views/user/wf/wf_obj_config/list.vue +1 -1
- package/src/views/user/wf/wf_obj_config/list_form.vue +1 -1
- package/src/views/user/wf/wf_transfer_setting/list.vue +1 -1
- package/src/views/user/workbench_menu/list.vue +1 -1
|
@@ -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>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
<template #buttonRight>
|
|
31
31
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
32
|
-
plain>{{ $t1('
|
|
32
|
+
plain>{{ $t1('刷新') }}
|
|
33
33
|
</vxe-button>
|
|
34
34
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">{{
|
|
35
35
|
$t1('搜索')
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
<template #buttonRight>
|
|
19
19
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
20
|
-
plain>{{ $t1('
|
|
20
|
+
plain>{{ $t1('刷新') }}
|
|
21
21
|
</vxe-button>
|
|
22
22
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">{{ $t1('搜索') }}
|
|
23
23
|
</vxe-button>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
<template #buttonRight>
|
|
31
31
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
32
|
-
plain>{{ $t1('
|
|
32
|
+
plain>{{ $t1('刷新') }}
|
|
33
33
|
</vxe-button>
|
|
34
34
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">{{
|
|
35
35
|
$t1('搜索')
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
<template #buttonRight>
|
|
20
20
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
21
|
-
plain>{{ $t1('
|
|
21
|
+
plain>{{ $t1('刷新') }}
|
|
22
22
|
</vxe-button>
|
|
23
23
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
|
24
24
|
{{ $t1('搜索') }}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</div>
|
|
16
16
|
<div class="fr">
|
|
17
17
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
18
|
-
plain>{{ $t1('
|
|
18
|
+
plain>{{ $t1('刷新') }}
|
|
19
19
|
</vxe-button>
|
|
20
20
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
|
21
21
|
{{ $t1('搜索') }}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<div class="clearfix screen-btns">
|
|
37
37
|
<div class="fr">
|
|
38
38
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
39
|
-
plain>{{ $t1('
|
|
39
|
+
plain>{{ $t1('刷新') }}
|
|
40
40
|
</vxe-button>
|
|
41
41
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
|
42
42
|
{{ $t1('搜索') }}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<div class="clearfix screen-btns">
|
|
28
28
|
<div class="fr">
|
|
29
29
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
30
|
-
plain>{{ $t1('
|
|
30
|
+
plain>{{ $t1('刷新') }}
|
|
31
31
|
</vxe-button>
|
|
32
32
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
|
33
33
|
{{ $t1('搜索') }}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div class="clearfix screen-btns">
|
|
29
29
|
<div class="fr">
|
|
30
30
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
31
|
-
plain>{{ $t1('
|
|
31
|
+
plain>{{ $t1('刷新') }}
|
|
32
32
|
</vxe-button>
|
|
33
33
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
|
34
34
|
{{ $t1('搜索') }}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
<div class="fr">
|
|
24
24
|
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
25
|
-
plain>{{$t1('
|
|
25
|
+
plain>{{$t1('刷新')}}
|
|
26
26
|
</vxe-button>
|
|
27
27
|
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">{{ $t1('搜索') }}
|
|
28
28
|
</vxe-button>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="containt">
|
|
3
|
-
<x-tabs ref="xTabs" v-model="activeName" class="tab-box" paneKeyName="
|
|
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"
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
type="text"
|
|
95
95
|
status="primary"
|
|
96
96
|
plain
|
|
97
|
-
>{{ $t1("
|
|
97
|
+
>{{ $t1("刷新") }}
|
|
98
98
|
</vxe-button>
|
|
99
99
|
<vxe-button
|
|
100
100
|
status="warning"
|
|
@@ -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.
|
|
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/
|
|
119
|
+
url: USER_PREFIX + `/formTemplate/get`,
|
|
120
120
|
method: `post`,
|
|
121
121
|
data: {
|
|
122
|
-
|
|
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.
|
|
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
|
|
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 (!
|
|
194
|
-
this.dataId =
|
|
193
|
+
if (!dataId) {
|
|
194
|
+
this.dataId = dataId;
|
|
195
195
|
this.activeName = "first";
|
|
196
196
|
this.$openEditView("showEdit");
|
|
197
197
|
} else {
|