egova-urbanpro-web 0.0.1
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/README.md +134 -0
- package/es/_plugin-vue_export-helper-BwmSBgGG.js +9 -0
- package/es/act-menu-refresh-3YeQne1X.js +77 -0
- package/es/async-select-modal-lRKCEMBM.js +316 -0
- package/es/bulletin-add-Dt1Xi_oL.js +1251 -0
- package/es/bulletin-config-Ber1L1T2.js +297 -0
- package/es/bulletin-detail-Ce7riX6X.js +1430 -0
- package/es/bulletin-detail-file-2Ij39UlM.js +187 -0
- package/es/bulletin-drawer-DmwW23ng.js +461 -0
- package/es/bulletin-level-Cz_6Mg2x.js +501 -0
- package/es/bulletin-manage-JMjvzUhg.js +1526 -0
- package/es/bulletin-notify-info-drawer-vR3KSaRS.js +487 -0
- package/es/bulletin-property-CvohCK8q.js +656 -0
- package/es/bulletin-type-CQS6_MYv.js +675 -0
- package/es/bulletin-view-DcdZrV19.js +870 -0
- package/es/business-collection-and-repair-B2DfBAsx.js +109 -0
- package/es/cascader-filter-DOg-iNnE.js +68 -0
- package/es/cascader-multiple-filter-C-cKxmkk.js +103 -0
- package/es/chat-BB8_LIT6.js +4634 -0
- package/es/checkbox-filter-DC1VaGo9.js +39 -0
- package/es/chunk-CHb_fpD5.js +29 -0
- package/es/condition-search-criteria-B_HnHQBy.js +190 -0
- package/es/constant-CYnp-Cj8.js +4925 -0
- package/es/constants-BijBPSuc.js +480 -0
- package/es/constants-DQ6XzzDS.js +137 -0
- package/es/contact-DxLrJ_f_.js +339 -0
- package/es/contact-unit-BvCPmyNK.js +708 -0
- package/es/department-radio-filter-BbrntEcc.js +72 -0
- package/es/downtime-timer-repair-D_SuN4fE.js +255 -0
- package/es/dynamic-form-input-10ce5824-Cju2XHEl.js +60 -0
- package/es/dynamic-form-input-number-c60b4ff5-gYvoAgss.js +61 -0
- package/es/dynamic-form-login-type-6c9d78bf-CxtLGfA6.js +175 -0
- package/es/dynamic-form-multiple-select-3e2bd885-CrD_ALk8.js +77 -0
- package/es/dynamic-form-password-57dc81c4-CcmoNfq0.js +84 -0
- package/es/dynamic-form-region-tree-b2c57d1c-BRm2M8Er.js +133 -0
- package/es/dynamic-form-select-cdbf49ad-C0eLS2zd.js +76 -0
- package/es/dynamic-form-upload-768a0d32-ClHw2ZkO.js +116 -0
- package/es/egova-urbanpro-web.css +10907 -0
- package/es/egova-urbanpro-web.d.ts +79 -0
- package/es/egova-urbanpro-web.js +9223 -0
- package/es/field-cell-PNcIBk8w.js +93 -0
- package/es/field-icon-cell-BQvkUM-O.js +65 -0
- package/es/file-cell-ClyA9XoC.js +147 -0
- package/es/hooks-CuXq9j8q.js +324 -0
- package/es/icon-cell-BF-Nf-QP.js +78 -0
- package/es/im-conversation-06-TFmZZ.js +158 -0
- package/es/image-cell-cu9ezfsV.js +92 -0
- package/es/image-gray-surS1IZ2.js +5 -0
- package/es/index-15d85366-BVTMMFAV.js +97 -0
- package/es/index-lib-23bd328c-DtcJvHvJ.js +42122 -0
- package/es/info-card-DgYedeWN.js +30 -0
- package/es/localforage-B_66fZyP.js +1798 -0
- package/es/number-filter-SyfJaaIG.js +55 -0
- package/es/operation-selector-TEcr5s2w.js +157 -0
- package/es/option-style-BTFl4VQj.js +32 -0
- package/es/package.json +46 -0
- package/es/query-CiRQQsE1.js +11 -0
- package/es/radio-filter-t5QSYiRY.js +68 -0
- package/es/rec-delete-DBvqRiKp.js +74 -0
- package/es/rec-timer-refresh-Dfd6hH2t.js +74 -0
- package/es/region-radio-filter-CoybNPaj.js +271 -0
- package/es/render-cell-BI9mUiTe.js +45 -0
- package/es/select-checkbox-filter-B89vKdLG.js +60 -0
- package/es/select-multiple-tree-filter-BEYUKg7q.js +298 -0
- package/es/select-radio-filter-BW2P3uwp.js +58 -0
- package/es/select-single-tree-filter-CKYo3kV1.js +94 -0
- package/es/service-BabEdPB2.js +100 -0
- package/es/service-fs3hJh7w.js +126 -0
- package/es/text-filter-B80UB8KG.js +66 -0
- package/es/time-filter-Nc-cflut.js +211 -0
- package/es/types-DjDPFQk1.js +44 -0
- package/es/use-file-D_9JbApO.js +58 -0
- package/es/user-radio-filter-T79Kp2jW.js +72 -0
- package/es/utils-4fqWDxwG.js +2643 -0
- package/es/utils-BlJtAQle.js +161 -0
- package/es/utils-Cn_7yZzr.js +355 -0
- package/es/utils-D-E5UJPP.js +14 -0
- package/es/version.json +33 -0
- package/package.json +165 -0
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
/*! egova-urbanpro-web v0.0.1 */
|
|
2
|
+
import { F as userCenterHttp, O as BaseService, j as http } from "./utils-4fqWDxwG.js";
|
|
3
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwmSBgGG.js";
|
|
4
|
+
import { t as info_card_default } from "./info-card-DgYedeWN.js";
|
|
5
|
+
import { cloneDeep, groupBy, merge } from "lodash-es";
|
|
6
|
+
import { useTreeSearch } from "@kyjian/libs/hooks";
|
|
7
|
+
import { handleTreeData, isEmptyText } from "@kyjian/libs/utils";
|
|
8
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, onMounted, openBlock, popScopeId, pushScopeId, reactive, ref, renderList, resolveComponent, resolveDirective, toDisplayString, watch, withCtx, withDirectives, withKeys } from "vue";
|
|
9
|
+
import { message } from "ant-design-vue";
|
|
10
|
+
import { Button, Form as Form$1, FormItem, Input as Input$1, Select as Select$1, Space, Spin as Spin$1 } from "ant-design-vue/es";
|
|
11
|
+
import { ZtDynamicForm, ZtEmpty, ZtInfoCard, ZtTextSearch, ZtTreeSearch } from "zartd-biz/es/index";
|
|
12
|
+
//#region ../egova-urbanpro-core/src/views/builder/system/sys/service.ts
|
|
13
|
+
var Service$1 = class extends BaseService {
|
|
14
|
+
getSysGroupTree() {
|
|
15
|
+
return this.http.get("/unity/builder/sysconfig/group/tree", {}, {
|
|
16
|
+
title: "获取系统配置分组树",
|
|
17
|
+
showTip: false
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
getItemByGroupId(groupId) {
|
|
21
|
+
return this.http.get("/unity/builder/sysconfig/get-item-list-by-group", { params: { groupId } }, {
|
|
22
|
+
title: "获取系统配置项分组",
|
|
23
|
+
showTip: false
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
updateGroupItem(params, showTip = true) {
|
|
27
|
+
return this.http.post("/unity/builder/sysconfig/update-list", params, {
|
|
28
|
+
title: "更新配置",
|
|
29
|
+
showTip
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
getSearchDataTree(params) {
|
|
33
|
+
return this.http.post("/unity/builder/sysconfig/group/search", params, {
|
|
34
|
+
title: "查询系统配置",
|
|
35
|
+
showTip: false
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
getSysGroupTreeByName(params) {
|
|
39
|
+
return this.http.get("/unity/builder/sysconfig/group/tree-by-root-name", { params }, {
|
|
40
|
+
title: "根据业务获取系统配置分组树",
|
|
41
|
+
showTip: false
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region ../egova-urbanpro-core/src/views/builder/business/supervise/sup-attribute/service.ts
|
|
47
|
+
var Service = class extends BaseService {
|
|
48
|
+
getRoleListByIds(roleIds) {
|
|
49
|
+
return this.http.get("/unity/org/role/get-role-list-by-role-ids", { params: { roleIds } }, {
|
|
50
|
+
title: "获取岗位列表",
|
|
51
|
+
showTip: false
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
getRoleListByUids(roleUids) {
|
|
55
|
+
return this.http.get("/unity/org/role/get-role-list-by-role-uids", { params: { roleUids } }, {
|
|
56
|
+
title: "获取岗位列表",
|
|
57
|
+
showTip: false
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
updateRemindType(params) {
|
|
61
|
+
return this.http.post("/unity/sup/type/update-remind-type", params, {
|
|
62
|
+
title: "修改消息提醒方式",
|
|
63
|
+
showTip: false
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getRemindTypeList(params) {
|
|
67
|
+
return this.http.get("/unity/sup/type/remind-type-list", { params }, { title: "获取提醒方式列表" });
|
|
68
|
+
}
|
|
69
|
+
getSupExportTemplateList(params) {
|
|
70
|
+
return this.http.get("/unity/sup/export-template/list", { params }, { title: "获取导出模板列表" });
|
|
71
|
+
}
|
|
72
|
+
uplateSupExportTemplate(params) {
|
|
73
|
+
return this.http.post("/unity/sup/export-template/update", params, { title: "更新导出模板列表" });
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ../egova-urbanpro-core/src/views/builder/business/supervise/sup-attribute/type.ts
|
|
78
|
+
var UNIT_TO_LEADER = "UNIT_TO_LEADER_UNIT_CONFIG";
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-config/components/bulletin-property/components/property-config/index.ts?vue&type=script&src=true&lang.ts
|
|
81
|
+
var index_ts_vue_type_script_src_true_lang_default$2 = defineComponent({
|
|
82
|
+
name: "CPropertyConfig",
|
|
83
|
+
props: { selectedNode: {
|
|
84
|
+
type: Object,
|
|
85
|
+
default: void 0
|
|
86
|
+
} },
|
|
87
|
+
setup(props) {
|
|
88
|
+
const roleService = new Service(userCenterHttp);
|
|
89
|
+
const systemService = new Service$1(http);
|
|
90
|
+
const spinning = ref(true);
|
|
91
|
+
const formRef = ref();
|
|
92
|
+
const dynamicFormItem = ref([]);
|
|
93
|
+
const layout = {
|
|
94
|
+
labelCol: { span: 5 },
|
|
95
|
+
wrapperCol: { span: 8 }
|
|
96
|
+
};
|
|
97
|
+
const getRoleList = async (ids) => {
|
|
98
|
+
try {
|
|
99
|
+
const res = await roleService.getRoleListByIds(ids);
|
|
100
|
+
if (!res.hasError) return res.result?.resultList ?? [];
|
|
101
|
+
else return [];
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.error(error);
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
async function handleReset() {
|
|
108
|
+
formRef.value?.resetFields();
|
|
109
|
+
}
|
|
110
|
+
async function handleSave() {
|
|
111
|
+
try {
|
|
112
|
+
spinning.value = true;
|
|
113
|
+
await formRef.value?.validate();
|
|
114
|
+
const info = dynamicFormItem.value.map((item) => {
|
|
115
|
+
const { formValue, options, required, ...rest } = item;
|
|
116
|
+
return {
|
|
117
|
+
...rest,
|
|
118
|
+
value: formValue?.toString(),
|
|
119
|
+
itemValue: formValue?.toString()
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
await systemService.updateGroupItem(info);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
console.error(error);
|
|
125
|
+
} finally {
|
|
126
|
+
spinning.value = false;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function getControlConfigOptions(complex) {
|
|
130
|
+
let options = [];
|
|
131
|
+
if (!isEmptyText(complex)) options = complex.options || [];
|
|
132
|
+
return options;
|
|
133
|
+
}
|
|
134
|
+
async function getDefaultValue(groupId) {
|
|
135
|
+
try {
|
|
136
|
+
if (isEmptyText(groupId)) return;
|
|
137
|
+
const res = await systemService.getItemByGroupId(groupId);
|
|
138
|
+
if (!res.hasError) {
|
|
139
|
+
const totalValue = [];
|
|
140
|
+
const list = [];
|
|
141
|
+
(res.result ?? []).forEach((item) => {
|
|
142
|
+
const value = !isEmptyText(item.value) ? item?.value?.split(",") ?? [] : [];
|
|
143
|
+
if (item.name !== "UNIT_TO_LEADER_UNIT_CONFIG") totalValue.push(...value);
|
|
144
|
+
list.push({
|
|
145
|
+
...item,
|
|
146
|
+
required: true,
|
|
147
|
+
formValue: value,
|
|
148
|
+
options: []
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
const options = groupBy(totalValue.length > 0 ? await getRoleList(totalValue.toString()) : [], "id");
|
|
152
|
+
list.forEach((item) => {
|
|
153
|
+
const value = !isEmptyText(item?.value) ? item?.value?.split(",") ?? [] : [];
|
|
154
|
+
item.options = [];
|
|
155
|
+
if (value.length > 0) item.options = value.map((id) => options[id]?.[0]);
|
|
156
|
+
if (item.controlType === "Select") {
|
|
157
|
+
item.formValue = !isEmptyText(item?.value) ? item.value : void 0;
|
|
158
|
+
if (!isEmptyText(item.controlConfig)) item.options = getControlConfigOptions(JSON.parse(item.controlConfig).complex);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
dynamicFormItem.value = list;
|
|
162
|
+
}
|
|
163
|
+
} catch (error) {
|
|
164
|
+
console.log(error);
|
|
165
|
+
} finally {
|
|
166
|
+
spinning.value = false;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
watch(() => props.selectedNode, (val) => {
|
|
170
|
+
if (!isEmptyText(val)) getDefaultValue(val?.data?.id);
|
|
171
|
+
}, { immediate: true });
|
|
172
|
+
return {
|
|
173
|
+
spinning,
|
|
174
|
+
layout,
|
|
175
|
+
formRef,
|
|
176
|
+
dynamicFormItem,
|
|
177
|
+
UNIT_TO_LEADER,
|
|
178
|
+
handleReset,
|
|
179
|
+
handleSave
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-config/components/bulletin-property/components/property-config/index.vue
|
|
185
|
+
var _hoisted_1$2 = { class: "c-property-config-content" };
|
|
186
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
187
|
+
const _component_a_button = Button;
|
|
188
|
+
const _component_a_space = Space;
|
|
189
|
+
const _component_a_select = Select$1;
|
|
190
|
+
const _component_a_form_item = FormItem;
|
|
191
|
+
const _component_a_form = Form$1;
|
|
192
|
+
const _component_a_spin = Spin$1;
|
|
193
|
+
const _component_zt_info_card = ZtInfoCard;
|
|
194
|
+
return openBlock(), createBlock(_component_zt_info_card, { class: "c-property-config" }, {
|
|
195
|
+
title: withCtx(() => [createTextVNode(toDisplayString(_ctx.selectedNode?.title), 1)]),
|
|
196
|
+
extra: withCtx(() => [createVNode(_component_a_space, null, {
|
|
197
|
+
default: withCtx(() => [createVNode(_component_a_button, { onClick: _ctx.handleReset }, {
|
|
198
|
+
default: withCtx(() => [createTextVNode("重置")]),
|
|
199
|
+
_: 1
|
|
200
|
+
}, 8, ["onClick"]), createVNode(_component_a_button, {
|
|
201
|
+
type: "primary",
|
|
202
|
+
onClick: _ctx.handleSave
|
|
203
|
+
}, {
|
|
204
|
+
default: withCtx(() => [createTextVNode("保存")]),
|
|
205
|
+
_: 1
|
|
206
|
+
}, 8, ["onClick"])]),
|
|
207
|
+
_: 1
|
|
208
|
+
})]),
|
|
209
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [createVNode(_component_a_spin, {
|
|
210
|
+
tip: "加载中...",
|
|
211
|
+
spinning: _ctx.spinning
|
|
212
|
+
}, {
|
|
213
|
+
default: withCtx(() => [createVNode(_component_a_form, mergeProps({ ref: "formRef" }, _ctx.layout, { model: _ctx.dynamicFormItem }), {
|
|
214
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dynamicFormItem, (item, index) => {
|
|
215
|
+
return openBlock(), createBlock(_component_a_form_item, {
|
|
216
|
+
key: item.name,
|
|
217
|
+
label: item.displayName,
|
|
218
|
+
name: [index, "formValue"],
|
|
219
|
+
rules: {
|
|
220
|
+
required: true,
|
|
221
|
+
message: `${item.displayName}必填`
|
|
222
|
+
}
|
|
223
|
+
}, {
|
|
224
|
+
default: withCtx(() => [createVNode(_component_a_select, {
|
|
225
|
+
value: item.formValue,
|
|
226
|
+
"onUpdate:value": ($event) => item.formValue = $event,
|
|
227
|
+
options: item.options,
|
|
228
|
+
"item-key": item.name,
|
|
229
|
+
"option-id": "id",
|
|
230
|
+
"allow-clear": ""
|
|
231
|
+
}, null, 8, [
|
|
232
|
+
"value",
|
|
233
|
+
"onUpdate:value",
|
|
234
|
+
"options",
|
|
235
|
+
"item-key"
|
|
236
|
+
])]),
|
|
237
|
+
_: 2
|
|
238
|
+
}, 1032, [
|
|
239
|
+
"label",
|
|
240
|
+
"name",
|
|
241
|
+
"rules"
|
|
242
|
+
]);
|
|
243
|
+
}), 128))]),
|
|
244
|
+
_: 1
|
|
245
|
+
}, 16, ["model"])]),
|
|
246
|
+
_: 1
|
|
247
|
+
}, 8, ["spinning"])])]),
|
|
248
|
+
_: 1
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
var property_config_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$2, [["render", _sfc_render$2], ["__scopeId", "data-v-d42501ef"]]);
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region ../egova-urbanpro-core/src/views/builder/system/sys/components/sys-dynamic-config/index.ts?vue&type=script&src=true&lang.ts
|
|
254
|
+
var index_ts_vue_type_script_src_true_lang_default$1 = defineComponent({
|
|
255
|
+
name: "CSysDynamicConfig",
|
|
256
|
+
props: {
|
|
257
|
+
title: {
|
|
258
|
+
type: String,
|
|
259
|
+
default: ""
|
|
260
|
+
},
|
|
261
|
+
groupList: {
|
|
262
|
+
type: Array,
|
|
263
|
+
default: () => []
|
|
264
|
+
},
|
|
265
|
+
value: {
|
|
266
|
+
type: String,
|
|
267
|
+
default: ""
|
|
268
|
+
},
|
|
269
|
+
isUpdated: {
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: false
|
|
272
|
+
},
|
|
273
|
+
labelColSpanValue: {
|
|
274
|
+
type: Number,
|
|
275
|
+
default: void 0
|
|
276
|
+
},
|
|
277
|
+
onlyChangeFieldConfig: {
|
|
278
|
+
type: Boolean,
|
|
279
|
+
default: false
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
emits: [
|
|
283
|
+
"update:isUpdated",
|
|
284
|
+
"updateGroupState",
|
|
285
|
+
"save",
|
|
286
|
+
"change"
|
|
287
|
+
],
|
|
288
|
+
setup(props, { emit }) {
|
|
289
|
+
const searchValue = ref("");
|
|
290
|
+
const filterList = ref([]);
|
|
291
|
+
const operationNum = ref(1);
|
|
292
|
+
const scrollId = ref();
|
|
293
|
+
const dynamicFormRef = ref();
|
|
294
|
+
const dynamicFormSubTitle = reactive({ EXTEND_ENABLE_CONFIG: "顶部栏扩展按钮" });
|
|
295
|
+
const showExtraInlineName = ["EXTEND_ENABLE_CONFIG"];
|
|
296
|
+
const model = reactive({ domains: [] });
|
|
297
|
+
const isInit = ref(false);
|
|
298
|
+
const fieldlabelSpanVal = computed(() => props.labelColSpanValue || 5);
|
|
299
|
+
const fieldsList = computed(() => {
|
|
300
|
+
return getFields(props.groupList);
|
|
301
|
+
});
|
|
302
|
+
function scrollToItem(id) {
|
|
303
|
+
const matchedFormItem = document.getElementById("form-container")?.querySelector(`.scrollId_${id}`);
|
|
304
|
+
if (matchedFormItem) matchedFormItem.scrollIntoView({
|
|
305
|
+
behavior: "smooth",
|
|
306
|
+
block: "nearest",
|
|
307
|
+
inline: "start"
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
function handleScroll() {
|
|
311
|
+
if (!filterList.value.length) {
|
|
312
|
+
message.warning({
|
|
313
|
+
content: "无检索匹配",
|
|
314
|
+
duration: 1,
|
|
315
|
+
key: "noResult"
|
|
316
|
+
});
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const { id } = filterList.value[operationNum.value];
|
|
320
|
+
scrollId.value = id?.toString();
|
|
321
|
+
scrollToItem(id);
|
|
322
|
+
operationNum.value += 1;
|
|
323
|
+
}
|
|
324
|
+
function handleEnter() {
|
|
325
|
+
if (isEmptyText(searchValue.value)) return;
|
|
326
|
+
const len = filterList.value.length;
|
|
327
|
+
if (operationNum.value < len) handleScroll();
|
|
328
|
+
else {
|
|
329
|
+
operationNum.value = 0;
|
|
330
|
+
handleScroll();
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
function getFields(nodes = []) {
|
|
334
|
+
const fields = [];
|
|
335
|
+
for (const node of nodes) {
|
|
336
|
+
const defaultConfig = {
|
|
337
|
+
dispaly: { labelCol: { span: fieldlabelSpanVal.value } },
|
|
338
|
+
extraText: node.description,
|
|
339
|
+
placeholder: "请输入" + node.displayName
|
|
340
|
+
};
|
|
341
|
+
merge(defaultConfig, JSON.parse(node.controlConfig || "{}"));
|
|
342
|
+
const field = {
|
|
343
|
+
id: node.id,
|
|
344
|
+
name: node.name,
|
|
345
|
+
displayName: node.displayName,
|
|
346
|
+
description: "",
|
|
347
|
+
controlType: node.controlType ?? "Input",
|
|
348
|
+
controlConfig: JSON.stringify(defaultConfig),
|
|
349
|
+
dataTypeId: node.dataTypeId?.toString(),
|
|
350
|
+
defaultValue: node.itemValue,
|
|
351
|
+
value: node.itemValue
|
|
352
|
+
};
|
|
353
|
+
fields.push(field);
|
|
354
|
+
}
|
|
355
|
+
return fields;
|
|
356
|
+
}
|
|
357
|
+
function updateGroupState() {
|
|
358
|
+
emit("updateGroupState");
|
|
359
|
+
message.success("已重置为上一次保存结果");
|
|
360
|
+
}
|
|
361
|
+
async function handleSave() {
|
|
362
|
+
try {
|
|
363
|
+
if (!await dynamicFormRef.value?.validateFields()) {
|
|
364
|
+
message.error("请完善信息");
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
const data = await dynamicFormRef.value?.save();
|
|
368
|
+
const saveData = cloneDeep(props.groupList);
|
|
369
|
+
for (const o of saveData || []) {
|
|
370
|
+
const find = data?.find((item) => item.name === o.name);
|
|
371
|
+
o.itemValue = find?.value;
|
|
372
|
+
o.value = find?.value;
|
|
373
|
+
}
|
|
374
|
+
emit("save", saveData);
|
|
375
|
+
} catch (e) {
|
|
376
|
+
console.log(e);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
function triggleScrollBySearch(val) {
|
|
380
|
+
if (fieldsList.value.length > 0) {
|
|
381
|
+
filterList.value = fieldsList.value.filter((item) => item.displayName?.indexOf(val) !== -1);
|
|
382
|
+
if (filterList.value.length) {
|
|
383
|
+
const { id } = filterList.value[0];
|
|
384
|
+
scrollId.value = id?.toString();
|
|
385
|
+
scrollToItem(id);
|
|
386
|
+
} else scrollId.value = "-100";
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
function onChange(name, value) {
|
|
390
|
+
emit("change", name, value);
|
|
391
|
+
emit("update:isUpdated", true);
|
|
392
|
+
}
|
|
393
|
+
watch(() => props.value, (val) => {
|
|
394
|
+
if (val) searchValue.value = val;
|
|
395
|
+
}, { immediate: true });
|
|
396
|
+
watch(() => props.groupList, () => {
|
|
397
|
+
if (props.groupList) {
|
|
398
|
+
const domains = [];
|
|
399
|
+
cloneDeep(props.groupList).forEach((item) => {
|
|
400
|
+
domains.push({
|
|
401
|
+
name: item.name,
|
|
402
|
+
value: item.itemValue
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
model.domains = domains;
|
|
406
|
+
isInit.value = true;
|
|
407
|
+
if (searchValue.value) triggleScrollBySearch(searchValue.value);
|
|
408
|
+
}
|
|
409
|
+
}, {
|
|
410
|
+
immediate: true,
|
|
411
|
+
deep: true
|
|
412
|
+
});
|
|
413
|
+
watch(() => searchValue.value, (val) => {
|
|
414
|
+
if (val) triggleScrollBySearch(val);
|
|
415
|
+
else scrollId.value = "-100";
|
|
416
|
+
}, { immediate: true });
|
|
417
|
+
watch(() => model.domains, () => {
|
|
418
|
+
if (isInit.value) {
|
|
419
|
+
isInit.value = false;
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
if (!props.isUpdated) emit("update:isUpdated", true);
|
|
423
|
+
}, {
|
|
424
|
+
immediate: true,
|
|
425
|
+
deep: true
|
|
426
|
+
});
|
|
427
|
+
return {
|
|
428
|
+
scrollId,
|
|
429
|
+
searchValue,
|
|
430
|
+
dynamicFormRef,
|
|
431
|
+
fieldsList,
|
|
432
|
+
model,
|
|
433
|
+
dynamicFormSubTitle,
|
|
434
|
+
showExtraInlineName,
|
|
435
|
+
props,
|
|
436
|
+
onChange,
|
|
437
|
+
handleEnter,
|
|
438
|
+
handleSave,
|
|
439
|
+
updateGroupState
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
//#endregion
|
|
444
|
+
//#region ../egova-urbanpro-core/src/views/builder/system/sys/components/sys-dynamic-config/index.vue
|
|
445
|
+
var _hoisted_1$1 = { class: "c-sys-dynamic-config" };
|
|
446
|
+
var _hoisted_2$1 = { class: "c-sys-dynamic-config-header" };
|
|
447
|
+
var _hoisted_3$1 = { class: "header-title" };
|
|
448
|
+
var _hoisted_4$1 = {
|
|
449
|
+
id: "form-container",
|
|
450
|
+
class: "c-sys-dynamic-config-box"
|
|
451
|
+
};
|
|
452
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
453
|
+
const _component_a_input = Input$1;
|
|
454
|
+
const _component_a_button = Button;
|
|
455
|
+
const _component_a_space = Space;
|
|
456
|
+
const _component_zt_dynamic_form = ZtDynamicForm;
|
|
457
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("div", _hoisted_2$1, [createElementVNode("span", _hoisted_3$1, toDisplayString(_ctx.title), 1), createVNode(_component_a_space, null, {
|
|
458
|
+
default: withCtx(() => [
|
|
459
|
+
createVNode(_component_a_input, {
|
|
460
|
+
value: _ctx.searchValue,
|
|
461
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchValue = $event),
|
|
462
|
+
valueModifiers: { trim: true },
|
|
463
|
+
class: "zt-input-round",
|
|
464
|
+
"allow-clear": "",
|
|
465
|
+
placeholder: "检索当前页",
|
|
466
|
+
onKeyup: withKeys(_ctx.handleEnter, ["enter"])
|
|
467
|
+
}, null, 8, ["value", "onKeyup"]),
|
|
468
|
+
createVNode(_component_a_button, {
|
|
469
|
+
ghost: "",
|
|
470
|
+
onClick: _ctx.updateGroupState
|
|
471
|
+
}, {
|
|
472
|
+
default: withCtx(() => [createTextVNode("重置")]),
|
|
473
|
+
_: 1
|
|
474
|
+
}, 8, ["onClick"]),
|
|
475
|
+
createVNode(_component_a_button, {
|
|
476
|
+
type: "primary",
|
|
477
|
+
onClick: _ctx.handleSave
|
|
478
|
+
}, {
|
|
479
|
+
default: withCtx(() => [createTextVNode("保存")]),
|
|
480
|
+
_: 1
|
|
481
|
+
}, 8, ["onClick"])
|
|
482
|
+
]),
|
|
483
|
+
_: 1
|
|
484
|
+
})]), createElementVNode("div", _hoisted_4$1, [createVNode(_component_zt_dynamic_form, {
|
|
485
|
+
ref: "dynamicFormRef",
|
|
486
|
+
fields: _ctx.fieldsList,
|
|
487
|
+
values: _ctx.model.domains,
|
|
488
|
+
"search-word": _ctx.searchValue,
|
|
489
|
+
"scroll-id": _ctx.scrollId,
|
|
490
|
+
"show-extra-inline-name": _ctx.showExtraInlineName,
|
|
491
|
+
"sub-title": _ctx.dynamicFormSubTitle,
|
|
492
|
+
"only-change-field-config": _ctx.props.onlyChangeFieldConfig,
|
|
493
|
+
onChange: _ctx.onChange
|
|
494
|
+
}, null, 8, [
|
|
495
|
+
"fields",
|
|
496
|
+
"values",
|
|
497
|
+
"search-word",
|
|
498
|
+
"scroll-id",
|
|
499
|
+
"show-extra-inline-name",
|
|
500
|
+
"sub-title",
|
|
501
|
+
"only-change-field-config",
|
|
502
|
+
"onChange"
|
|
503
|
+
])])]);
|
|
504
|
+
}
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-config/components/bulletin-property/index.ts?vue&type=script&src=true&lang.ts
|
|
507
|
+
var index_ts_vue_type_script_src_true_lang_default = defineComponent({
|
|
508
|
+
name: "CBulletinProperty",
|
|
509
|
+
components: {
|
|
510
|
+
CInfoCard: info_card_default,
|
|
511
|
+
CPropertyConfig: property_config_default,
|
|
512
|
+
CSysDynamicConfig: /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$1, [["render", _sfc_render$1], ["__scopeId", "data-v-c2a51e20"]])
|
|
513
|
+
},
|
|
514
|
+
setup() {
|
|
515
|
+
const sysService = new Service$1(http);
|
|
516
|
+
const allNodes = /* @__PURE__ */ new Map();
|
|
517
|
+
const treeData = ref([]);
|
|
518
|
+
const selectedKeys = ref([]);
|
|
519
|
+
const { searchValue, expandedKeys } = useTreeSearch(allNodes);
|
|
520
|
+
const selectedNode = ref();
|
|
521
|
+
const groupList = ref([]);
|
|
522
|
+
const loading = ref(false);
|
|
523
|
+
async function getSysGroupTreeByName() {
|
|
524
|
+
loading.value = true;
|
|
525
|
+
try {
|
|
526
|
+
const res = await sysService.getSysGroupTreeByName({ name: "notice" });
|
|
527
|
+
if (!res.hasError) treeData.value = handleTreeData({
|
|
528
|
+
treeNodes: res.result?.resultList || [],
|
|
529
|
+
allNodes
|
|
530
|
+
});
|
|
531
|
+
} catch (e) {
|
|
532
|
+
console.log(e);
|
|
533
|
+
} finally {
|
|
534
|
+
loading.value = false;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
async function getSysGroup(id) {
|
|
538
|
+
try {
|
|
539
|
+
const res = await sysService.getItemByGroupId(id);
|
|
540
|
+
if (!res.hasError && res.result) groupList.value = res.result;
|
|
541
|
+
} catch (e) {
|
|
542
|
+
console.log(e);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
async function handleTreeSelect(keys) {
|
|
546
|
+
const key = keys[0];
|
|
547
|
+
if (!isEmptyText(key)) {
|
|
548
|
+
const node = allNodes.get(key);
|
|
549
|
+
selectedNode.value = node;
|
|
550
|
+
if (node?.data?.id) await getSysGroup(node.data.id);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
async function handleSave(info) {
|
|
554
|
+
try {
|
|
555
|
+
info = info.map((item) => {
|
|
556
|
+
return {
|
|
557
|
+
...item,
|
|
558
|
+
itemValue: item.value
|
|
559
|
+
};
|
|
560
|
+
});
|
|
561
|
+
await sysService.updateGroupItem(info);
|
|
562
|
+
} catch (e) {
|
|
563
|
+
console.log(e);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
const refreshKey = ref(0);
|
|
567
|
+
function updateGroupState() {
|
|
568
|
+
refreshKey.value++;
|
|
569
|
+
}
|
|
570
|
+
onMounted(() => {
|
|
571
|
+
getSysGroupTreeByName();
|
|
572
|
+
});
|
|
573
|
+
return {
|
|
574
|
+
treeData,
|
|
575
|
+
allNodes,
|
|
576
|
+
searchValue,
|
|
577
|
+
selectedKeys,
|
|
578
|
+
expandedKeys,
|
|
579
|
+
loading,
|
|
580
|
+
selectedNode,
|
|
581
|
+
handleTreeSelect,
|
|
582
|
+
groupList,
|
|
583
|
+
handleSave,
|
|
584
|
+
updateGroupState,
|
|
585
|
+
refreshKey
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-config/components/bulletin-property/index.vue
|
|
591
|
+
var _withScopeId = (n) => (pushScopeId("data-v-6d3df6c1"), n = n(), popScopeId(), n);
|
|
592
|
+
var _hoisted_1 = { class: "c-bulletin-property" };
|
|
593
|
+
var _hoisted_2 = { class: "c-bulletin-property-side" };
|
|
594
|
+
var _hoisted_3 = { class: "c-bulletin-property-side-content" };
|
|
595
|
+
var _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-color-iconfont zt-icon-color-folder" }, null, -1));
|
|
596
|
+
var _hoisted_5 = { class: "c-bulletin-property-content" };
|
|
597
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
598
|
+
const _component_zt_text_search = ZtTextSearch;
|
|
599
|
+
const _component_zt_tree_search = ZtTreeSearch;
|
|
600
|
+
const _component_c_info_card = resolveComponent("c-info-card");
|
|
601
|
+
const _component_c_property_config = resolveComponent("c-property-config");
|
|
602
|
+
const _component_c_sys_dynamic_config = resolveComponent("c-sys-dynamic-config");
|
|
603
|
+
const _component_zt_empty = ZtEmpty;
|
|
604
|
+
const _directive_zt_overlay_scrollbars = resolveDirective("zt-overlay-scrollbars");
|
|
605
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createVNode(_component_c_info_card, null, {
|
|
606
|
+
title: withCtx(() => [createElementVNode("span", null, toDisplayString(_ctx.$t(_ctx.$I18NextKey.NOTICE_SHORT)) + "属性", 1)]),
|
|
607
|
+
extra: withCtx(() => []),
|
|
608
|
+
default: withCtx(() => [withDirectives((openBlock(), createElementBlock("div", _hoisted_3, [createVNode(_component_zt_tree_search, {
|
|
609
|
+
selectedKeys: _ctx.selectedKeys,
|
|
610
|
+
"onUpdate:selectedKeys": _cache[0] || (_cache[0] = ($event) => _ctx.selectedKeys = $event),
|
|
611
|
+
expandedKeys: _ctx.expandedKeys,
|
|
612
|
+
"onUpdate:expandedKeys": _cache[1] || (_cache[1] = ($event) => _ctx.expandedKeys = $event),
|
|
613
|
+
searchValue: _ctx.searchValue,
|
|
614
|
+
"onUpdate:searchValue": _cache[2] || (_cache[2] = ($event) => _ctx.searchValue = $event),
|
|
615
|
+
"show-icon": "",
|
|
616
|
+
loading: _ctx.loading,
|
|
617
|
+
"tree-data": _ctx.treeData,
|
|
618
|
+
onSelect: _ctx.handleTreeSelect
|
|
619
|
+
}, {
|
|
620
|
+
icon: withCtx(() => [_hoisted_4]),
|
|
621
|
+
title: withCtx(({ title }) => [createVNode(_component_zt_text_search, {
|
|
622
|
+
text: title,
|
|
623
|
+
search: _ctx.searchValue
|
|
624
|
+
}, null, 8, ["text", "search"])]),
|
|
625
|
+
_: 1
|
|
626
|
+
}, 8, [
|
|
627
|
+
"selectedKeys",
|
|
628
|
+
"expandedKeys",
|
|
629
|
+
"searchValue",
|
|
630
|
+
"loading",
|
|
631
|
+
"tree-data",
|
|
632
|
+
"onSelect"
|
|
633
|
+
])])), [[_directive_zt_overlay_scrollbars]])]),
|
|
634
|
+
_: 1
|
|
635
|
+
})]), createElementVNode("div", _hoisted_5, [_ctx.selectedNode?.data?.name === "notice_scope" ? (openBlock(), createBlock(_component_c_property_config, {
|
|
636
|
+
key: 0,
|
|
637
|
+
"selected-node": _ctx.selectedNode
|
|
638
|
+
}, null, 8, ["selected-node"])) : _ctx.selectedNode ? (openBlock(), createBlock(_component_c_sys_dynamic_config, {
|
|
639
|
+
key: _ctx.refreshKey,
|
|
640
|
+
title: _ctx.selectedNode.text,
|
|
641
|
+
"group-list": _ctx.groupList,
|
|
642
|
+
onSave: _ctx.handleSave,
|
|
643
|
+
onUpdateGroupState: _ctx.updateGroupState
|
|
644
|
+
}, null, 8, [
|
|
645
|
+
"title",
|
|
646
|
+
"group-list",
|
|
647
|
+
"onSave",
|
|
648
|
+
"onUpdateGroupState"
|
|
649
|
+
])) : createCommentVNode("", true), createVNode(_component_zt_empty, {
|
|
650
|
+
center: "",
|
|
651
|
+
description: "请选择侧边属性"
|
|
652
|
+
})])]);
|
|
653
|
+
}
|
|
654
|
+
var bulletin_property_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default, [["render", _sfc_render], ["__scopeId", "data-v-6d3df6c1"]]);
|
|
655
|
+
//#endregion
|
|
656
|
+
export { bulletin_property_default as default };
|