cloud-web-corejs 1.0.54-dev.787 → 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.
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" +165 -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 +186 -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,106 @@
1
+ <template>
2
+ <el-dialog
3
+ :title="$t1('分类-通用一级分类')"
4
+ :append-to-body="true"
5
+ :modal-append-to-body="true"
6
+ :close-on-click-modal="falseValue"
7
+ :visible.sync="showDialog"
8
+ :modal="falseValue"
9
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
10
+ width="1000px"
11
+ @close="dialogClose"
12
+ v-el-drag-dialog
13
+ v-el-dialog-center
14
+ >
15
+ <div class="cont" style="height: 450px">
16
+ <vxe-grid
17
+ class="is-pointer"
18
+ ref="table-m1"
19
+ v-bind="vxeOption"
20
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
21
+ @custom="$vxeTableUtil.customHandle"
22
+ @checkbox-change="addDataTable"
23
+ @checkbox-all="checkAll"
24
+ @cell-dblclick="checkWithSubmit"
25
+ >
26
+ <template #form>
27
+ <div class="clearfix screen-btns">
28
+ <div class="fr">
29
+ <vxe-button
30
+ icon="el-icon-brush"
31
+ class="button-sty"
32
+ @click="resetEvent"
33
+ type="text"
34
+ status="primary"
35
+ plain
36
+ >{{ $t1("刷新") }}
37
+ </vxe-button>
38
+ <vxe-button
39
+ status="warning"
40
+ icon="el-icon-search"
41
+ class="button-sty"
42
+ @click="searchEvent"
43
+ >
44
+ {{ $t1("搜索") }}
45
+ </vxe-button>
46
+ </div>
47
+ </div>
48
+ <vxe-form
49
+ class="screen-box"
50
+ title-width="92px"
51
+ title-align="right"
52
+ :data="formData"
53
+ @submit="searchEvent"
54
+ @reset="resetEvent"
55
+ >
56
+ <vxe-form-item :title="$t1('表单分类名称') + ':'" field="name">
57
+ <template v-slot>
58
+ <el-input v-model="formData.name" size="small" clearable />
59
+ </template>
60
+ </vxe-form-item>
61
+ <vxe-button type="submit" @click="searchEvent" v-show="false"></vxe-button>
62
+ </vxe-form>
63
+ </template>
64
+ </vxe-grid>
65
+ </div>
66
+ <label id="labBtn" class="transverse">
67
+ <div class="icon">
68
+ <i class="el-icon-more"></i>
69
+ <i class="el-icon-more"></i>
70
+ </div>
71
+ </label>
72
+ <div class="multipleChoice">
73
+ <el-tooltip
74
+ :enterable="false"
75
+ effect="dark"
76
+ :content="$t1('全部删除')"
77
+ placement="top"
78
+ ><a class="allDel icon-quanbushanchu" @click="clearChecked()"></a
79
+ ></el-tooltip>
80
+ <div class="list">
81
+ <div class="item" v-for="(checkRow, index) in checkRows" :key="index">
82
+ <p>{{ checkRow.name }}</p>
83
+ <a class="el-icon-close" @click="clearTable1Select(index)"></a>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ <span slot="footer" class="dialog-footer">
88
+ <el-button type="primary" plain class="button-sty" @click="dialogClose">
89
+ <i class="el-icon-close el-icon"></i>
90
+ {{ $t1("取 消") }}
91
+ </el-button>
92
+ <el-button type="primary" @click="dialogPrimary" class="button-sty">
93
+ <i class="el-icon-check el-icon"></i>
94
+ {{ $t1("确 定") }}
95
+ </el-button>
96
+ </span>
97
+ </el-dialog>
98
+ </template>
99
+
100
+ <script>
101
+ import mixin from "./mixins/menuKindDialog";
102
+
103
+ export default {
104
+ mixins: [mixin],
105
+ };
106
+ </script>
@@ -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>