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,189 @@
|
|
|
1
|
+
import menuKindDialog from "../menuKindDialog.vue";
|
|
2
|
+
import { getJsxBtn } from "@base/views/bd/setting/utils/index";
|
|
3
|
+
|
|
4
|
+
const BRANCH_CODE_REG = /^[0-9a-zA-Z_.-]{1,80}$/;
|
|
5
|
+
|
|
6
|
+
let modules = {};
|
|
7
|
+
modules = {
|
|
8
|
+
name: "bdBranchEdit",
|
|
9
|
+
components: { menuKindDialog },
|
|
10
|
+
props: {
|
|
11
|
+
_dataId: [String, Number],
|
|
12
|
+
},
|
|
13
|
+
created() {
|
|
14
|
+
if (this._dataId && !isNaN(this._dataId)) {
|
|
15
|
+
this.dataId = this._dataId;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
mounted() {
|
|
19
|
+
this.initTableMenuKind();
|
|
20
|
+
this.getData();
|
|
21
|
+
},
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
isEdit: false,
|
|
25
|
+
dataId: "",
|
|
26
|
+
bdBranch: {
|
|
27
|
+
enabled: true,
|
|
28
|
+
},
|
|
29
|
+
menuKindRows: [],
|
|
30
|
+
menuKindOption: {},
|
|
31
|
+
showMenuKindDialog: false,
|
|
32
|
+
branchCodeRules: [
|
|
33
|
+
{ required: true, message: this.$t1("分支编码不能为空"), trigger: "blur" },
|
|
34
|
+
{
|
|
35
|
+
pattern: BRANCH_CODE_REG,
|
|
36
|
+
message: this.$t1("分支编码只允许是字母或数字或'_.-',长度80位以内"),
|
|
37
|
+
trigger: "blur",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
branchNameRules: [
|
|
41
|
+
{ required: true, message: this.$t1("分支名称不能为空"), trigger: "blur" },
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
checkedMenuKindRows() {
|
|
47
|
+
return this.menuKindRows.map((item) => {
|
|
48
|
+
return { id: item.menuKindId, name: item.menuKindName };
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
getData() {
|
|
54
|
+
if (!this.dataId || isNaN(this.dataId)) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.isEdit = true;
|
|
58
|
+
this.$commonHttp({
|
|
59
|
+
url: USER_PREFIX + `/bd_branch/get`,
|
|
60
|
+
method: `post`,
|
|
61
|
+
data: {
|
|
62
|
+
id: this.dataId,
|
|
63
|
+
},
|
|
64
|
+
isLoading: true,
|
|
65
|
+
modalStrictly: true,
|
|
66
|
+
success: (res) => {
|
|
67
|
+
this.bdBranch = res.objx || {};
|
|
68
|
+
this.getMenuKinds();
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
getMenuKinds() {
|
|
73
|
+
this.$http({
|
|
74
|
+
url: USER_PREFIX + `/bd_branch/getBdBranchMenuKinds`,
|
|
75
|
+
method: `post`,
|
|
76
|
+
data: {
|
|
77
|
+
id: this.dataId,
|
|
78
|
+
},
|
|
79
|
+
success: (res) => {
|
|
80
|
+
this.menuKindRows = res.objx || [];
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
initTableMenuKind() {
|
|
85
|
+
let tableOption = {
|
|
86
|
+
vue: this,
|
|
87
|
+
tableRef: "table-menuKind",
|
|
88
|
+
tableName: "bd_branch_edit-menuKind",
|
|
89
|
+
config: {
|
|
90
|
+
height: "auto",
|
|
91
|
+
},
|
|
92
|
+
columns: [
|
|
93
|
+
{ type: "checkbox", width: 48, resizable: false, fixed: "left" },
|
|
94
|
+
{
|
|
95
|
+
title: this.$t1("表单分类名称"),
|
|
96
|
+
field: "menuKindName",
|
|
97
|
+
minWidth: 250,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
width: 47,
|
|
101
|
+
fixed: "right",
|
|
102
|
+
title: "",
|
|
103
|
+
sortable: false,
|
|
104
|
+
slots: {
|
|
105
|
+
default: ({ rowIndex }) => {
|
|
106
|
+
return getJsxBtn({
|
|
107
|
+
iconName: "el-icon-delete",
|
|
108
|
+
content: this.$t1("删除"),
|
|
109
|
+
onclick: () => {
|
|
110
|
+
this.menuKindRows.splice(rowIndex, 1);
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
119
|
+
this.menuKindOption = opts;
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
openMenuKindDialog() {
|
|
123
|
+
this.showMenuKindDialog = true;
|
|
124
|
+
},
|
|
125
|
+
confirmMenuKindDialog(rows) {
|
|
126
|
+
let oldMap = {};
|
|
127
|
+
this.menuKindRows.forEach((item) => {
|
|
128
|
+
oldMap[item.menuKindId] = item;
|
|
129
|
+
});
|
|
130
|
+
this.menuKindRows = (rows || []).map((row) => {
|
|
131
|
+
// 保留已有明细的 id/branchId,避免更新时被当成新增
|
|
132
|
+
let old = oldMap[row.id];
|
|
133
|
+
if (old) {
|
|
134
|
+
return old;
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
menuKindId: row.id,
|
|
138
|
+
menuKindName: row.name,
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
saveData() {
|
|
143
|
+
this.$refs.editForm.$baseValidate((valid) => {
|
|
144
|
+
if (!valid) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (!this.menuKindRows.length) {
|
|
148
|
+
this.$message({
|
|
149
|
+
type: "error",
|
|
150
|
+
message: this.$t1("分支菜单类型不能为空"),
|
|
151
|
+
});
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
this.$baseConfirm(this.$t1("您确定要保存吗?")).then(() => {
|
|
155
|
+
let url =
|
|
156
|
+
USER_PREFIX + (this.isEdit ? `/bd_branch/update` : `/bd_branch/save`);
|
|
157
|
+
this.$http({
|
|
158
|
+
url: url,
|
|
159
|
+
method: `post`,
|
|
160
|
+
data: {
|
|
161
|
+
...this.bdBranch,
|
|
162
|
+
bdBranchMenuKindDTOs: this.menuKindRows,
|
|
163
|
+
},
|
|
164
|
+
isLoading: true,
|
|
165
|
+
success: (res) => {
|
|
166
|
+
this.$message({
|
|
167
|
+
message: res.content,
|
|
168
|
+
type: "success",
|
|
169
|
+
duration: 500,
|
|
170
|
+
onClose: () => {
|
|
171
|
+
if (this.isEdit) {
|
|
172
|
+
this.$baseReload();
|
|
173
|
+
} else {
|
|
174
|
+
this.$baseReload({
|
|
175
|
+
updateParam: {
|
|
176
|
+
_dataId: res.objx,
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
export default modules;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import tableForm from "@base/components/table/tableForm.vue";
|
|
2
|
+
import editView from "../edit.vue";
|
|
3
|
+
import { getJsxBtn, getJsxStatus } from "@base/views/bd/setting/utils/index";
|
|
4
|
+
|
|
5
|
+
let modules = {};
|
|
6
|
+
modules = {
|
|
7
|
+
name: "bd_branch:list",
|
|
8
|
+
components: { tableForm, editView },
|
|
9
|
+
mounted() {
|
|
10
|
+
this.initTableList();
|
|
11
|
+
},
|
|
12
|
+
data() {
|
|
13
|
+
return {
|
|
14
|
+
activeName: "second",
|
|
15
|
+
dataId: 0,
|
|
16
|
+
showEdit: false,
|
|
17
|
+
vxeOption: {},
|
|
18
|
+
formData: {},
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
searchEvent() {
|
|
23
|
+
this.$refs["table-m1"].commitProxy("reload");
|
|
24
|
+
},
|
|
25
|
+
resetEvent() {
|
|
26
|
+
this.formData = {};
|
|
27
|
+
this.$refs["table-m1"].commitProxy("reload");
|
|
28
|
+
},
|
|
29
|
+
openEditDialog(id) {
|
|
30
|
+
this.dataId = !id || typeof id == "object" ? 0 : id;
|
|
31
|
+
this.activeName = "first";
|
|
32
|
+
this.$openEditView("showEdit");
|
|
33
|
+
},
|
|
34
|
+
getSearchParam() {
|
|
35
|
+
return {
|
|
36
|
+
...this.formData,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
initTableList() {
|
|
40
|
+
let tableOption = {
|
|
41
|
+
vue: this,
|
|
42
|
+
tableRef: "table-m1",
|
|
43
|
+
tableName: "bd_branch_list-m1",
|
|
44
|
+
path: USER_PREFIX + "/bd_branch/listPage",
|
|
45
|
+
param: () => {
|
|
46
|
+
return this.getSearchParam();
|
|
47
|
+
},
|
|
48
|
+
columns: [
|
|
49
|
+
{ type: "checkbox", width: 48, resizable: false, fixed: "left" },
|
|
50
|
+
{
|
|
51
|
+
title: this.$t1("分支编码"),
|
|
52
|
+
field: "branchCode",
|
|
53
|
+
width: 200,
|
|
54
|
+
fixed: "left",
|
|
55
|
+
},
|
|
56
|
+
{ title: this.$t1("分支名称"), field: "branchName", width: 200 },
|
|
57
|
+
{
|
|
58
|
+
title: this.$t1("是否启用"),
|
|
59
|
+
field: "enabled",
|
|
60
|
+
width: 120,
|
|
61
|
+
slots: {
|
|
62
|
+
default: ({ row }) => {
|
|
63
|
+
if (row.enabled) {
|
|
64
|
+
return getJsxStatus(null, this.$t1("启用"));
|
|
65
|
+
}
|
|
66
|
+
return getJsxStatus("s-3", this.$t1("禁用"));
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{ title: this.$t1("备注"), field: "remark", width: 250 },
|
|
71
|
+
{ field: "createBy", title: this.$t1("创建人"), width: 120 },
|
|
72
|
+
{ field: "createDate", title: this.$t1("创建时间"), width: 150 },
|
|
73
|
+
{ field: "modifyBy", title: this.$t1("更新人"), width: 120 },
|
|
74
|
+
{ field: "modifyDate", title: this.$t1("更新时间"), width: 150 },
|
|
75
|
+
{
|
|
76
|
+
width: 47,
|
|
77
|
+
fixed: "right",
|
|
78
|
+
title: "",
|
|
79
|
+
sortable: false,
|
|
80
|
+
slots: {
|
|
81
|
+
default: ({ row }) => {
|
|
82
|
+
return getJsxBtn({
|
|
83
|
+
iconName: "el-icon-edit",
|
|
84
|
+
content: this.$t1("查看"),
|
|
85
|
+
onclick: () => {
|
|
86
|
+
this.openEditDialog(row.id);
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
searchColumns: [
|
|
94
|
+
{
|
|
95
|
+
title: this.$t1("分支编码"),
|
|
96
|
+
field: "branchCode",
|
|
97
|
+
type: "input",
|
|
98
|
+
common: true,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: this.$t1("分支名称"),
|
|
102
|
+
field: "branchName",
|
|
103
|
+
type: "input",
|
|
104
|
+
common: true,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
title: this.$t1("是否启用"),
|
|
108
|
+
field: "enabled",
|
|
109
|
+
type: "select",
|
|
110
|
+
common: true,
|
|
111
|
+
itemOption: [
|
|
112
|
+
{ label: this.$t1("启用"), value: true },
|
|
113
|
+
{ label: this.$t1("禁用"), value: false },
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
119
|
+
this.vxeOption = opts;
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
export default modules;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { selectDialogMixins } from "@base/mixins/selectDialog";
|
|
2
|
+
import { BRANCH_FLAG } from "../../../core/branchContext";
|
|
3
|
+
|
|
4
|
+
let modules = {};
|
|
5
|
+
modules = {
|
|
6
|
+
props: ["visiable", "multi", "rows"],
|
|
7
|
+
mixins: [selectDialogMixins],
|
|
8
|
+
created() {
|
|
9
|
+
this.initSetting();
|
|
10
|
+
},
|
|
11
|
+
mounted() {
|
|
12
|
+
this.initTableM1();
|
|
13
|
+
},
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
showDialog: true,
|
|
17
|
+
falseValue: false,
|
|
18
|
+
selectMulti: true,
|
|
19
|
+
formData: {},
|
|
20
|
+
vxeOption: {},
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
initTableM1() {
|
|
25
|
+
let that = this;
|
|
26
|
+
let tableOption = {
|
|
27
|
+
vue: that,
|
|
28
|
+
tableRef: "table-m1",
|
|
29
|
+
tableName: "bd_branch_menuKind_dialog-m1",
|
|
30
|
+
path: USER_PREFIX + "/menuKind/getAllList",
|
|
31
|
+
param: () => {
|
|
32
|
+
return {
|
|
33
|
+
...this.formData,
|
|
34
|
+
// 只能选择「分类-通用」的一级分类
|
|
35
|
+
parent: 0,
|
|
36
|
+
enabled: true,
|
|
37
|
+
branchFlag: BRANCH_FLAG.COMMON,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
// getAllList 返回的是普通数组而非分页对象
|
|
41
|
+
config: {
|
|
42
|
+
pagerConfig: {
|
|
43
|
+
autoHidden: true,
|
|
44
|
+
},
|
|
45
|
+
proxyConfig: {
|
|
46
|
+
props: {
|
|
47
|
+
result: "objx",
|
|
48
|
+
total: "objx.length",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
checkboxConfig: {
|
|
52
|
+
showHeader: this.selectMulti,
|
|
53
|
+
trigger: "row",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
columns: [
|
|
57
|
+
{ type: "checkbox", width: 50, resizable: false, fixed: "left" },
|
|
58
|
+
{
|
|
59
|
+
title: this.$t1("表单分类名称"),
|
|
60
|
+
field: "name",
|
|
61
|
+
width: 250,
|
|
62
|
+
fixed: "left",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
field: "menuKindCode",
|
|
66
|
+
title: this.$t1("表单分类编码"),
|
|
67
|
+
width: 180,
|
|
68
|
+
},
|
|
69
|
+
{ field: "treePathName", title: this.$t1("上级分类"), width: 180 },
|
|
70
|
+
{ field: "serviceName", title: this.$t1("服务名"), width: 150 },
|
|
71
|
+
{
|
|
72
|
+
width: 47,
|
|
73
|
+
fixed: "right",
|
|
74
|
+
title: "",
|
|
75
|
+
sortable: false,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
80
|
+
that.vxeOption = opts;
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
export default modules;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<branchPageWrap
|
|
3
|
+
:branchCode.sync="branchCode"
|
|
4
|
+
:branchLabel="branchLabel"
|
|
5
|
+
@branch-change="onBranchChange"
|
|
6
|
+
@open-new="openNewBranch"
|
|
7
|
+
>
|
|
8
|
+
<baseList :key="branchCode"></baseList>
|
|
9
|
+
</branchPageWrap>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import branchPage from "../../core/branchPage";
|
|
14
|
+
// 逻辑脚本对应 scriptType=1 的 list1
|
|
15
|
+
import baseList from "@base/views/bd/setting/form_script/list1.vue";
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: "branch_form_script:list",
|
|
19
|
+
components: { baseList },
|
|
20
|
+
mixins: [branchPage],
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<branchPageWrap
|
|
3
|
+
:branchCode.sync="branchCode"
|
|
4
|
+
:branchLabel="branchLabel"
|
|
5
|
+
@branch-change="onBranchChange"
|
|
6
|
+
@open-new="openNewBranch"
|
|
7
|
+
>
|
|
8
|
+
<baseList :key="branchCode"></baseList>
|
|
9
|
+
</branchPageWrap>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import branchPage from "../../core/branchPage";
|
|
14
|
+
import baseList from "@base/views/bd/setting/form_template/list.vue";
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: "branch_form_template:list",
|
|
18
|
+
components: { baseList },
|
|
19
|
+
mixins: [branchPage],
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<branchPageWrap
|
|
3
|
+
:branchCode.sync="branchCode"
|
|
4
|
+
:branchLabel="branchLabel"
|
|
5
|
+
@branch-change="onBranchChange"
|
|
6
|
+
@open-new="openNewBranch"
|
|
7
|
+
>
|
|
8
|
+
<baseList :key="branchCode"></baseList>
|
|
9
|
+
</branchPageWrap>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import branchPage from "../../core/branchPage";
|
|
14
|
+
import baseList from "@base/views/bd/setting/menu_kind/list.vue";
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: "branch_menu_kind:list",
|
|
18
|
+
components: { baseList },
|
|
19
|
+
mixins: [branchPage],
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<baseList></baseList>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import branchScope from "../../core/branchScope";
|
|
7
|
+
import { BRANCH_FLAG } from "../../core/branchContext";
|
|
8
|
+
// 逻辑脚本对应 scriptType=1 的 list1
|
|
9
|
+
import baseList from "@base/views/bd/setting/form_script/list1.vue";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: "common_form_script:list",
|
|
13
|
+
components: { baseList },
|
|
14
|
+
mixins: [branchScope(BRANCH_FLAG.COMMON)],
|
|
15
|
+
};
|
|
16
|
+
</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/form_template/list.vue";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: "common_form_template:list",
|
|
12
|
+
components: { baseList },
|
|
13
|
+
mixins: [branchScope(BRANCH_FLAG.COMMON)],
|
|
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/menu_kind/list.vue";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: "common_menu_kind:list",
|
|
12
|
+
components: { baseList },
|
|
13
|
+
mixins: [branchScope(BRANCH_FLAG.COMMON)],
|
|
14
|
+
};
|
|
15
|
+
</script>
|
|
@@ -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;
|