bm-admin-ui 1.0.54-alpha → 1.0.55-alpha
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/es/components/form-create/index.js +128 -31
- package/es/components/form-designer/index.js +7 -0
- package/es/components/staffs-selector/index.d.ts +1 -0
- package/es/components/staffs-selector/index.js +4 -1
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +1 -0
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -0
- package/es/utils/isNull.d.ts +1 -0
- package/es/utils/isNull.js +5 -0
- package/lib/components/form-create/index.js +127 -30
- package/lib/components/form-designer/index.js +7 -0
- package/lib/components/staffs-selector/index.d.ts +1 -0
- package/lib/components/staffs-selector/index.js +4 -1
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +1 -0
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -0
- package/lib/utils/isNull.d.ts +1 -0
- package/lib/utils/isNull.js +9 -0
- package/package.json +1 -1
- package/theme-chalk/form-create.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/types/components/staffs-selector/index.d.ts +1 -0
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +1 -0
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -0
- package/types/utils/isNull.d.ts +1 -0
|
@@ -12,6 +12,7 @@ var components = require('bm-admin-ui/lib/components');
|
|
|
12
12
|
var iconsVue = require('@ant-design/icons-vue');
|
|
13
13
|
var lodashEs = require('lodash-es');
|
|
14
14
|
var customParseFormat = require('dayjs/plugin/customParseFormat');
|
|
15
|
+
var isNull = require('bm-admin-ui/lib/utils/isNull');
|
|
15
16
|
|
|
16
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
18
|
|
|
@@ -822,6 +823,9 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
822
823
|
function handleAdd() {
|
|
823
824
|
visible.value = true;
|
|
824
825
|
}
|
|
826
|
+
function getPopupContainer() {
|
|
827
|
+
return document.body;
|
|
828
|
+
}
|
|
825
829
|
vue.watch(
|
|
826
830
|
() => props.defaultSelected,
|
|
827
831
|
(val) => {
|
|
@@ -841,9 +845,12 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
841
845
|
"onUpdate:list": _cache[0] || (_cache[0] = ($event) => selected.value = $event),
|
|
842
846
|
"show-empty-btn": false,
|
|
843
847
|
disabled: __props.disabled,
|
|
848
|
+
"tool-tip-props": {
|
|
849
|
+
getPopupContainer
|
|
850
|
+
},
|
|
844
851
|
"show-empty": "",
|
|
845
852
|
onAddClick: handleAdd
|
|
846
|
-
}, null, 8, ["list", "disabled"]),
|
|
853
|
+
}, null, 8, ["list", "disabled", "tool-tip-props"]),
|
|
847
854
|
vue.createVNode(vue.unref(BmStaffsSelector__default["default"]), {
|
|
848
855
|
select: selected.value,
|
|
849
856
|
"onUpdate:select": _cache[1] || (_cache[1] = ($event) => selected.value = $event),
|
|
@@ -1289,7 +1296,8 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1289
1296
|
"extraConfig",
|
|
1290
1297
|
"disabled",
|
|
1291
1298
|
"disabledTable",
|
|
1292
|
-
"hidden"
|
|
1299
|
+
"hidden",
|
|
1300
|
+
"formCreateInject"
|
|
1293
1301
|
],
|
|
1294
1302
|
emits: ["change"],
|
|
1295
1303
|
setup(__props, { emit: emits }) {
|
|
@@ -1314,6 +1322,9 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1314
1322
|
const config = vue.computed(() => ({
|
|
1315
1323
|
columns: [...columns],
|
|
1316
1324
|
data: [...data],
|
|
1325
|
+
columnConfig: {
|
|
1326
|
+
resizable: true
|
|
1327
|
+
},
|
|
1317
1328
|
checkboxConfig: {
|
|
1318
1329
|
trigger: "cell",
|
|
1319
1330
|
checkMethod() {
|
|
@@ -1352,12 +1363,15 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1352
1363
|
return result;
|
|
1353
1364
|
}, {}) || {}
|
|
1354
1365
|
);
|
|
1366
|
+
const productInputSlots = vue.reactive([]);
|
|
1367
|
+
const formData = vue.computed(() => props.formCreateInject.api.bind());
|
|
1355
1368
|
function isShow(key) {
|
|
1356
1369
|
return props.rule.config.tableAdvancedFeatures.includes(key);
|
|
1357
1370
|
}
|
|
1358
1371
|
function initConfig() {
|
|
1359
1372
|
columns.splice(0, columns.length);
|
|
1360
1373
|
data.splice(0, data.length);
|
|
1374
|
+
productInputSlots.splice(0, productInputSlots.length);
|
|
1361
1375
|
const childRules = lodashEs.cloneDeep(props.rule.config.childRules);
|
|
1362
1376
|
const value = props.rule.value;
|
|
1363
1377
|
if (deleteFeature.value && !props.hidden) {
|
|
@@ -1411,6 +1425,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1411
1425
|
const productName = `\u5546\u54C1${String(++productIndex).padStart(2, "0")}`;
|
|
1412
1426
|
const field = rule.field;
|
|
1413
1427
|
const associatedFields = rule.config.associatedFields;
|
|
1428
|
+
productInputSlots.push(rule);
|
|
1414
1429
|
const columns2 = [
|
|
1415
1430
|
{
|
|
1416
1431
|
field,
|
|
@@ -1418,19 +1433,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1418
1433
|
headerClassName: rule.effect.required ? "is-required" : "",
|
|
1419
1434
|
minWidth: "138px",
|
|
1420
1435
|
slots: {
|
|
1421
|
-
default
|
|
1422
|
-
return vue.h(antDesignVue.Input, {
|
|
1423
|
-
value: row[field],
|
|
1424
|
-
placeholder: "\u8BF7\u8F93\u5165",
|
|
1425
|
-
disabled: rule.disabled,
|
|
1426
|
-
"onUpdate:value": (value) => {
|
|
1427
|
-
row[field] = value;
|
|
1428
|
-
},
|
|
1429
|
-
onPressEnter() {
|
|
1430
|
-
queryProductInfo(rule, row);
|
|
1431
|
-
}
|
|
1432
|
-
});
|
|
1433
|
-
}
|
|
1436
|
+
default: rule.field
|
|
1434
1437
|
}
|
|
1435
1438
|
}
|
|
1436
1439
|
];
|
|
@@ -1506,9 +1509,9 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1506
1509
|
const field = rule.field;
|
|
1507
1510
|
const associatedFields = rule?.config?.associatedFields;
|
|
1508
1511
|
return await props.extraConfig.product.fetch({ productCode: row[field] }).then((data2) => {
|
|
1509
|
-
if (
|
|
1512
|
+
if (associatedFields.length)
|
|
1510
1513
|
associatedFields.forEach((item) => {
|
|
1511
|
-
row[field + item.value] = data2[productInfoKeyMap[item.value]];
|
|
1514
|
+
row[field + item.value] = data2 ? data2[productInfoKeyMap[item.value]] : void 0;
|
|
1512
1515
|
});
|
|
1513
1516
|
return data2;
|
|
1514
1517
|
});
|
|
@@ -1666,6 +1669,18 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1666
1669
|
return Promise.resolve(rowData);
|
|
1667
1670
|
}
|
|
1668
1671
|
}
|
|
1672
|
+
function pruductInputDisabled(shopField) {
|
|
1673
|
+
if (!shopField)
|
|
1674
|
+
return false;
|
|
1675
|
+
return !formData.value[shopField];
|
|
1676
|
+
}
|
|
1677
|
+
function handlePressEnter(rule, row) {
|
|
1678
|
+
queryProductInfo(rule, row).then((data2) => {
|
|
1679
|
+
if (!data2) {
|
|
1680
|
+
row[rule.field] = "";
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1669
1684
|
vue.watch(
|
|
1670
1685
|
() => props.rule,
|
|
1671
1686
|
() => {
|
|
@@ -1748,7 +1763,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1748
1763
|
ref_key: "bmFloatTableRef",
|
|
1749
1764
|
ref: bmFloatTableRef,
|
|
1750
1765
|
config: vue.unref(config)
|
|
1751
|
-
}, {
|
|
1766
|
+
}, vue.createSlots({
|
|
1752
1767
|
floatHandle: vue.withCtx(({ row, rowIndex }) => [
|
|
1753
1768
|
vue.unref(copyFeature) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
1754
1769
|
vue.createVNode(vue.unref(antDesignVue.Button), {
|
|
@@ -1776,8 +1791,23 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1776
1791
|
_: 2
|
|
1777
1792
|
}, 1032, ["disabled", "onClick"])
|
|
1778
1793
|
]),
|
|
1779
|
-
_:
|
|
1780
|
-
},
|
|
1794
|
+
_: 2
|
|
1795
|
+
}, [
|
|
1796
|
+
vue.renderList(productInputSlots, (item) => {
|
|
1797
|
+
return {
|
|
1798
|
+
name: item.field,
|
|
1799
|
+
fn: vue.withCtx(({ row }) => [
|
|
1800
|
+
vue.createVNode(vue.unref(antDesignVue.Input), {
|
|
1801
|
+
value: row[item.field],
|
|
1802
|
+
"onUpdate:value": ($event) => row[item.field] = $event,
|
|
1803
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
1804
|
+
disabled: item.disabled || pruductInputDisabled(item.config?.dataFiltering),
|
|
1805
|
+
onPressEnter: ($event) => handlePressEnter(item, row)
|
|
1806
|
+
}, null, 8, ["value", "onUpdate:value", "disabled", "onPressEnter"])
|
|
1807
|
+
])
|
|
1808
|
+
};
|
|
1809
|
+
})
|
|
1810
|
+
]), 1032, ["config"])
|
|
1781
1811
|
]),
|
|
1782
1812
|
_: 1
|
|
1783
1813
|
})
|
|
@@ -1982,7 +2012,8 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1982
2012
|
return void 0;
|
|
1983
2013
|
}
|
|
1984
2014
|
function handleTableDataChange(value) {
|
|
1985
|
-
getAcitvePane()
|
|
2015
|
+
const activePane2 = getAcitvePane();
|
|
2016
|
+
activePane2.tableData = value;
|
|
1986
2017
|
}
|
|
1987
2018
|
function emitChange() {
|
|
1988
2019
|
emits("change", {
|
|
@@ -1993,7 +2024,8 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1993
2024
|
tempIdSelected: pane.tempSelected.templateCode || pane.tempIdSelected,
|
|
1994
2025
|
templateName: pane.tempSelected?.templateName || pane.templateName,
|
|
1995
2026
|
tableData: pane.tableData,
|
|
1996
|
-
uploadList: pane.uploadList
|
|
2027
|
+
uploadList: pane.uploadList,
|
|
2028
|
+
tableRequiredFields: pane.tableRule?.config?.childRules?.filter((rule) => rule.effect?.required).map((rule) => rule.field)
|
|
1997
2029
|
}))
|
|
1998
2030
|
});
|
|
1999
2031
|
}
|
|
@@ -2331,6 +2363,30 @@ var materialTemp = {
|
|
|
2331
2363
|
inject.self.value = value;
|
|
2332
2364
|
},
|
|
2333
2365
|
},
|
|
2366
|
+
validate: [
|
|
2367
|
+
{
|
|
2368
|
+
validator(rule, value) {
|
|
2369
|
+
if (isNull.isNull(value)) {
|
|
2370
|
+
return Promise.reject();
|
|
2371
|
+
}
|
|
2372
|
+
const panes = value.panes;
|
|
2373
|
+
for (const pane of panes) {
|
|
2374
|
+
if (!pane.tempIdSelected) {
|
|
2375
|
+
return Promise.reject();
|
|
2376
|
+
}
|
|
2377
|
+
if (pane.tableRequiredFields) {
|
|
2378
|
+
for (const field of pane.tableRequiredFields) {
|
|
2379
|
+
if (pane.tableData.some((row) => isNull.isNull(row[field]))) {
|
|
2380
|
+
return Promise.reject();
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
return Promise.resolve();
|
|
2386
|
+
},
|
|
2387
|
+
message: '请检查必填项',
|
|
2388
|
+
},
|
|
2389
|
+
],
|
|
2334
2390
|
},
|
|
2335
2391
|
],
|
|
2336
2392
|
class: 'bm-fc-module-widget',
|
|
@@ -2348,7 +2404,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2348
2404
|
"required",
|
|
2349
2405
|
"extraConfig",
|
|
2350
2406
|
"defalutValue",
|
|
2351
|
-
"disabled"
|
|
2407
|
+
"disabled",
|
|
2408
|
+
"formCreateInject"
|
|
2352
2409
|
],
|
|
2353
2410
|
emits: ["change"],
|
|
2354
2411
|
setup(__props, { emit: emits }) {
|
|
@@ -2363,8 +2420,9 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2363
2420
|
\u5546\u54C1\u5355\u4F4D: "unit"
|
|
2364
2421
|
};
|
|
2365
2422
|
const unitMap = ["\u652F", "\u74F6", "\u5957", "\u7EC4", "\u7BB1", "\u4E2A", "\u5F20"];
|
|
2423
|
+
const formData = vue.computed(() => props.formCreateInject.api.bind());
|
|
2366
2424
|
async function fetch(value) {
|
|
2367
|
-
productInfo.value = await props.extraConfig.fetch({
|
|
2425
|
+
productInfo.value = await props.extraConfig.product.fetch({
|
|
2368
2426
|
productCode: value,
|
|
2369
2427
|
filterByShopcode: props.dataFiltering
|
|
2370
2428
|
}) || {};
|
|
@@ -2380,6 +2438,9 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2380
2438
|
function emitChange(value) {
|
|
2381
2439
|
emits("change", value);
|
|
2382
2440
|
}
|
|
2441
|
+
function inputDisbale(shopField) {
|
|
2442
|
+
return shopField && !formData.value[shopField];
|
|
2443
|
+
}
|
|
2383
2444
|
vue.watch(
|
|
2384
2445
|
() => props.defalutValue,
|
|
2385
2446
|
(val) => {
|
|
@@ -2412,7 +2473,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2412
2473
|
vue.createVNode(vue.unref(antDesignVue.Input), {
|
|
2413
2474
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
2414
2475
|
value: __props.defalutValue,
|
|
2415
|
-
disabled: __props.disabled,
|
|
2476
|
+
disabled: __props.disabled || inputDisbale(__props.dataFiltering),
|
|
2416
2477
|
onPressEnter: handleBlur
|
|
2417
2478
|
}, null, 8, ["value", "disabled"])
|
|
2418
2479
|
]),
|
|
@@ -2446,7 +2507,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2446
2507
|
getValue(field.value) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
2447
2508
|
field.value === "\u5546\u54C1\u56FE\u7247" ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
2448
2509
|
key: 0,
|
|
2449
|
-
|
|
2510
|
+
class: "bm-fc-form-item__img",
|
|
2511
|
+
src: __props.extraConfig.common.previewImg(getValue(field.value))
|
|
2450
2512
|
}, null, 8, _hoisted_2$2)) : field.value === "\u5546\u54C1\u5355\u4F4D" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
2451
2513
|
vue.createTextVNode(vue.toDisplayString(unitMap[getValue(field.value)]), 1)
|
|
2452
2514
|
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
@@ -2487,7 +2549,7 @@ var product = {
|
|
|
2487
2549
|
required: data.effect.required,
|
|
2488
2550
|
associatedFields: data.config.associatedFields,
|
|
2489
2551
|
dataFiltering: data.config.dataFiltering,
|
|
2490
|
-
extraConfig: extraConfig
|
|
2552
|
+
extraConfig: extraConfig,
|
|
2491
2553
|
defalutValue: data.value,
|
|
2492
2554
|
},
|
|
2493
2555
|
inject: true,
|
|
@@ -2501,7 +2563,7 @@ var product = {
|
|
|
2501
2563
|
},
|
|
2502
2564
|
};
|
|
2503
2565
|
},
|
|
2504
|
-
rowRule(data) {
|
|
2566
|
+
rowRule(data, extraConfig) {
|
|
2505
2567
|
return {
|
|
2506
2568
|
type: 'ProductInfo',
|
|
2507
2569
|
component: ProductInfo,
|
|
@@ -2514,6 +2576,7 @@ var product = {
|
|
|
2514
2576
|
associatedFields: data.config.associatedFields,
|
|
2515
2577
|
dataFiltering: data.config.dataFiltering,
|
|
2516
2578
|
defalutValue: data.value,
|
|
2579
|
+
extraConfig: extraConfig,
|
|
2517
2580
|
},
|
|
2518
2581
|
inject: true,
|
|
2519
2582
|
on: {
|
|
@@ -3041,6 +3104,20 @@ var department = {
|
|
|
3041
3104
|
},
|
|
3042
3105
|
};
|
|
3043
3106
|
|
|
3107
|
+
function validator(rule, value) {
|
|
3108
|
+
var _a;
|
|
3109
|
+
const childRules = ((_a = rule.config) === null || _a === void 0 ? void 0 : _a.childRules) || [];
|
|
3110
|
+
const requiredRules = childRules.filter((rule) => { var _a; return (_a = rule === null || rule === void 0 ? void 0 : rule.effect) === null || _a === void 0 ? void 0 : _a.required; });
|
|
3111
|
+
if (requiredRules.length && isNull.isNull(value)) {
|
|
3112
|
+
return Promise.reject();
|
|
3113
|
+
}
|
|
3114
|
+
for (const rule of requiredRules) {
|
|
3115
|
+
if (value.some((item) => isNull.isNull(item[rule.field]))) {
|
|
3116
|
+
return Promise.reject();
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
return Promise.resolve();
|
|
3120
|
+
}
|
|
3044
3121
|
var table = {
|
|
3045
3122
|
name: 'table',
|
|
3046
3123
|
rule(data, extraConfig) {
|
|
@@ -3055,9 +3132,19 @@ var table = {
|
|
|
3055
3132
|
inject: true,
|
|
3056
3133
|
on: {
|
|
3057
3134
|
change(inject, value) {
|
|
3058
|
-
inject.self
|
|
3135
|
+
const rule = inject.self;
|
|
3136
|
+
rule.value = value;
|
|
3137
|
+
inject.api.emit('table-change', inject.api.bind());
|
|
3059
3138
|
},
|
|
3060
3139
|
},
|
|
3140
|
+
validate: [
|
|
3141
|
+
{
|
|
3142
|
+
validator(rule, value) {
|
|
3143
|
+
return validator(data, value);
|
|
3144
|
+
},
|
|
3145
|
+
message: '请检查必填项',
|
|
3146
|
+
},
|
|
3147
|
+
],
|
|
3061
3148
|
};
|
|
3062
3149
|
},
|
|
3063
3150
|
rowRule(data, extraConfig) {
|
|
@@ -3073,8 +3160,17 @@ var table = {
|
|
|
3073
3160
|
on: {
|
|
3074
3161
|
change(inject, value) {
|
|
3075
3162
|
inject.self.value = value;
|
|
3163
|
+
inject.api.emit('table-change', inject.api.bind());
|
|
3076
3164
|
},
|
|
3077
3165
|
},
|
|
3166
|
+
validate: [
|
|
3167
|
+
{
|
|
3168
|
+
validator(rule, value) {
|
|
3169
|
+
return validator(data, value);
|
|
3170
|
+
},
|
|
3171
|
+
message: '请检查必填项',
|
|
3172
|
+
},
|
|
3173
|
+
],
|
|
3078
3174
|
col: {
|
|
3079
3175
|
span: 24,
|
|
3080
3176
|
},
|
|
@@ -3395,7 +3491,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3395
3491
|
"model-value": __props.value,
|
|
3396
3492
|
option,
|
|
3397
3493
|
rule: rule.value,
|
|
3398
|
-
"onUpdate:modelValue": handleValue
|
|
3494
|
+
"onUpdate:modelValue": handleValue,
|
|
3495
|
+
onTableChange: handleValue
|
|
3399
3496
|
}, null, 8, ["api", "model-value", "rule"])
|
|
3400
3497
|
], 64);
|
|
3401
3498
|
};
|
|
@@ -1364,6 +1364,7 @@ var date = {
|
|
|
1364
1364
|
props: {
|
|
1365
1365
|
placeholder: '请选择',
|
|
1366
1366
|
format: 'YYYY-MM',
|
|
1367
|
+
valueFormat: 'YYYY-MM',
|
|
1367
1368
|
},
|
|
1368
1369
|
config: {
|
|
1369
1370
|
propsFields: Object.values(fieldsMap$b),
|
|
@@ -1414,6 +1415,12 @@ var date = {
|
|
|
1414
1415
|
},
|
|
1415
1416
|
],
|
|
1416
1417
|
value: rule.props.format,
|
|
1418
|
+
inject: true,
|
|
1419
|
+
on: {
|
|
1420
|
+
change({ api, self }, format) {
|
|
1421
|
+
api.emit('props.valueFormat', format.value);
|
|
1422
|
+
},
|
|
1423
|
+
},
|
|
1417
1424
|
},
|
|
1418
1425
|
{
|
|
1419
1426
|
type: 'input',
|
|
@@ -917,6 +917,7 @@ declare const BmStaffsSelector: import("bm-admin-ui/es/utils/with-install").SFCW
|
|
|
917
917
|
}> | null | undefined)[]>;
|
|
918
918
|
isFulfill: import("vue").Ref<boolean>;
|
|
919
919
|
changeTreeCheck: (checkedKeys: any) => void;
|
|
920
|
+
departmentSelect: import("vue").Ref<never[]>;
|
|
920
921
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "fetchList")[], "update:selected" | "fetchList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
921
922
|
limit: {
|
|
922
923
|
type: NumberConstructor;
|
|
@@ -160,7 +160,9 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
160
160
|
},
|
|
161
161
|
{ deep: true }
|
|
162
162
|
);
|
|
163
|
+
const departmentSelect = vue.ref([]);
|
|
163
164
|
function changeTreeCheck(checkedKeys) {
|
|
165
|
+
departmentSelect.value = checkedKeys;
|
|
164
166
|
let flatMap = selectState.dataMap;
|
|
165
167
|
let curlistKeys = selectState.curlistKeys;
|
|
166
168
|
let hadselected = new Set(selectState.multipDepartment);
|
|
@@ -185,6 +187,7 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
185
187
|
}
|
|
186
188
|
return {
|
|
187
189
|
changeTreeCheck,
|
|
190
|
+
departmentSelect,
|
|
188
191
|
...vue.toRefs(state),
|
|
189
192
|
...vue.toRefs(selectState),
|
|
190
193
|
list,
|
|
@@ -265,7 +268,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
265
268
|
}), 128))
|
|
266
269
|
], 64)) : _ctx.isTree ? (vue.openBlock(), vue.createBlock(_component_ATree, {
|
|
267
270
|
key: 1,
|
|
268
|
-
"checked-keys": _ctx.
|
|
271
|
+
"checked-keys": _ctx.departmentSelect,
|
|
269
272
|
checkable: "",
|
|
270
273
|
"tree-data": _ctx.list,
|
|
271
274
|
onCheck: _ctx.changeTreeCheck
|
|
@@ -35,6 +35,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
}> | null | undefined)[]>;
|
|
36
36
|
isFulfill: import("vue").Ref<boolean>;
|
|
37
37
|
changeTreeCheck: (checkedKeys: any) => void;
|
|
38
|
+
departmentSelect: import("vue").Ref<never[]>;
|
|
38
39
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "fetchList")[], "update:selected" | "fetchList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
40
|
limit: {
|
|
40
41
|
type: NumberConstructor;
|
|
@@ -917,6 +917,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
917
917
|
}> | null | undefined)[]>;
|
|
918
918
|
isFulfill: import("vue").Ref<boolean>;
|
|
919
919
|
changeTreeCheck: (checkedKeys: any) => void;
|
|
920
|
+
departmentSelect: import("vue").Ref<never[]>;
|
|
920
921
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "fetchList")[], "update:selected" | "fetchList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
921
922
|
limit: {
|
|
922
923
|
type: NumberConstructor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isNull(value: any): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNull = void 0;
|
|
4
|
+
function isNull(value) {
|
|
5
|
+
return (!value ||
|
|
6
|
+
(Array.isArray(value) && !value.length) ||
|
|
7
|
+
(value.constructor === Object && !Object.keys(value).length));
|
|
8
|
+
}
|
|
9
|
+
exports.isNull = isNull;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.bm-fc-material-temp__add{display:inline-block;width:24px;height:24px;background:#fafafa;border-radius:2px;border:1px solid #e8e8e8;text-align:center;color:#bcbcc6}.bm-fc-module-widget{width:100%;margin:24px 0}.bm-fc-module-widget+.bm-fc-module-widget{margin-top:0}.bm-fc-head-line{width:100%;margin-bottom:24px;font-weight:700}.bm-fc-form-item-label{display:inline-block;line-height:32px;width:127px;text-align:right}.bm-fc-form-item-label.is-required::before{display:inline-block;margin-right:4px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:'*'}.bm-fc-form-item{line-height:32px;color:#9393a3}.bm-fc-form-item__cover{width:170px;height:170px;-o-object-position:center;object-position:center;-o-object-fit:contain;object-fit:contain}.bm-fc-form-item__temp-content{width:170px;height:170px!important}.bm-fc-row-widget{margin-bottom:24px}.bm-fc-row-widget .ant-form-item{margin-bottom:0}.bm-dc-table-widget__title{line-height:32px;font-size:16px;font-weight:700;overflow:hidden}.bm-dc-table-widget__title-samll{font-size:14px;font-weight:initial}.bm-dc-table-widget__top-bar{float:right}.bm-dc-table-widget__top-bar .ant-btn+.ant-btn{margin-left:8px}.bm-dc-table-widget__table{margin-top:16px}.bm-dc-table-widget .vxe-header--column.is-required .vxe-cell--title::before{display:inline-block;margin-right:4px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:'*'}.bm-fc-select-material-temp__sider{width:225px;height:612px;padding:20px 24px;background-color:#fff;border-right:1px solid rgba(0,0,0,.06);overflow:auto}.bm-fc-select-material-temp__content{padding:24px;background-color:#fff}.bm-fc-select-material-temp__content__input{width:432px}.bm-fc-select-material-temp__content__btn{margin-left:8px}.bm-fc-select-material-temp__content__item-info{padding:10px}.bm-fc-select-material-temp__content__item-info__cover{width:170px;height:170px}.bm-fc-select-material-temp__content__item-info__cover__img{width:100%;height:100%;-o-object-position:center;object-position:center;-o-object-fit:contain;object-fit:contain}.bm-fc-select-material-temp__content__item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.bm-fc-select-material-temp__content__item-name:hover{color:#2f4eed}.bm-fc-select-material-temp__content__circle{vertical-align:-.125em;display:inline-block;width:14px;height:14px;border:1px solid #e8e8e8;border-radius:50%}.bm-fc-select-material-temp__content__check-icon{color:#2f4eed}.bm-fc-select-material-temp__content__item-time{color:#9393a3;font-size:12px}.bm-fc-select-material-temp__content__name{margin-left:4px}.bm-fc-rect-outer{position:relative;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat}.bm-fc-rect-outer .bm-fc-rect{position:absolute;border:1px solid #2f4eed;background-repeat:no-repeat;background-size:cover;background-position:center}.bm-fc-rect-outer .bm-fc-rect.is-ele{border:unset}.bm-form-basic-info__title{font-size:16px;font-weight:700;color:#242633}.bm-form-basic-info__shop{margin-left:4px;padding:4px 12px;color:#2f4eed;background:#e6f7ff;border-radius:2px;border:1px solid #91d5ff}.bm-form-basic-info__summary{font-size:12px;color:#9393a3;margin-top:15px}.bm-form-basic-info__summary.mt10{margin-top:10px}.bm-form-basic-info__status{float:right;padding:0 12px;margin-top:8px;background:#f5f5f5;border-radius:2px;opacity:.9;border:1px solid #d9d9d9;color:#242633}.bm-form-basic-info__approval-status{float:right;margin-top:3px}.bm-fc-form-basic-info{margin-bottom:48px}
|
|
1
|
+
.bm-fc-material-temp__add{display:inline-block;width:24px;height:24px;background:#fafafa;border-radius:2px;border:1px solid #e8e8e8;text-align:center;color:#bcbcc6}.bm-fc-module-widget{width:100%;margin:24px 0}.bm-fc-module-widget+.bm-fc-module-widget{margin-top:0}.bm-fc-head-line{width:100%;margin-bottom:24px;font-weight:700}.bm-fc-form-item-label{display:inline-block;line-height:32px;width:127px;text-align:right}.bm-fc-form-item-label.is-required::before{display:inline-block;margin-right:4px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:'*'}.bm-fc-form-item{line-height:32px;color:#9393a3}.bm-fc-form-item__cover,.bm-fc-form-item__img{width:170px;height:170px;-o-object-position:center;object-position:center;-o-object-fit:contain;object-fit:contain}.bm-fc-form-item__temp-content{width:170px;height:170px!important}.bm-fc-row-widget{margin-bottom:24px}.bm-fc-row-widget .ant-form-item{margin-bottom:0}.bm-dc-table-widget__title{line-height:32px;font-size:16px;font-weight:700;overflow:hidden}.bm-dc-table-widget__title-samll{font-size:14px;font-weight:initial}.bm-dc-table-widget__top-bar{float:right}.bm-dc-table-widget__top-bar .ant-btn+.ant-btn{margin-left:8px}.bm-dc-table-widget__table{margin-top:16px}.bm-dc-table-widget .vxe-header--column.is-required .vxe-cell--title::before{display:inline-block;margin-right:4px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:'*'}.bm-fc-select-material-temp__sider{width:225px;height:612px;padding:20px 24px;background-color:#fff;border-right:1px solid rgba(0,0,0,.06);overflow:auto}.bm-fc-select-material-temp__content{padding:24px;background-color:#fff}.bm-fc-select-material-temp__content__input{width:432px}.bm-fc-select-material-temp__content__btn{margin-left:8px}.bm-fc-select-material-temp__content__item-info{padding:10px}.bm-fc-select-material-temp__content__item-info__cover{width:170px;height:170px}.bm-fc-select-material-temp__content__item-info__cover__img{width:100%;height:100%;-o-object-position:center;object-position:center;-o-object-fit:contain;object-fit:contain}.bm-fc-select-material-temp__content__item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.bm-fc-select-material-temp__content__item-name:hover{color:#2f4eed}.bm-fc-select-material-temp__content__circle{vertical-align:-.125em;display:inline-block;width:14px;height:14px;border:1px solid #e8e8e8;border-radius:50%}.bm-fc-select-material-temp__content__check-icon{color:#2f4eed}.bm-fc-select-material-temp__content__item-time{color:#9393a3;font-size:12px}.bm-fc-select-material-temp__content__name{margin-left:4px}.bm-fc-rect-outer{position:relative;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat}.bm-fc-rect-outer .bm-fc-rect{position:absolute;border:1px solid #2f4eed;background-repeat:no-repeat;background-size:cover;background-position:center}.bm-fc-rect-outer .bm-fc-rect.is-ele{border:unset}.bm-form-basic-info__title{font-size:16px;font-weight:700;color:#242633}.bm-form-basic-info__shop{margin-left:4px;padding:4px 12px;color:#2f4eed;background:#e6f7ff;border-radius:2px;border:1px solid #91d5ff}.bm-form-basic-info__summary{font-size:12px;color:#9393a3;margin-top:15px}.bm-form-basic-info__summary.mt10{margin-top:10px}.bm-form-basic-info__status{float:right;padding:0 12px;margin-top:8px;background:#f5f5f5;border-radius:2px;opacity:.9;border:1px solid #d9d9d9;color:#242633}.bm-form-basic-info__approval-status{float:right;margin-top:3px}.bm-fc-form-basic-info{margin-bottom:48px}
|