@indfnd/common-mobile 0.0.6 → 0.0.7
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/CHANGELOG.md +11 -0
- package/dist/ind-common-mobile.es.js +118 -30
- package/dist/ind-common-mobile.umd.cjs +57 -57
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.7](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.6...v0.0.7) (2024-03-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 组件初始化 ([93e740c](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/93e740c7b974271dc1974594ef07f407ce087b81))
|
|
11
|
+
* 组件init ([c68d3d4](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/c68d3d4d409fd872cd8e7375d49d49ed95d35206))
|
|
12
|
+
* init ([3e792d2](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/3e792d29194f0a13530ef148d49eae342384d7bd))
|
|
13
|
+
* init ([f4d7452](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/f4d745296b2d3ab9f4e2aa465c3f9ba4b93594a6))
|
|
14
|
+
* init ([d32064f](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/d32064f9020c93b1fffb591b7344b289469f00db))
|
|
15
|
+
|
|
5
16
|
### [0.0.6](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.5...v0.0.6) (2024-03-11)
|
|
6
17
|
|
|
7
18
|
|
|
@@ -2,7 +2,7 @@ import { formatDate, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axi
|
|
|
2
2
|
import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
const name = "@indfnd/common-mobile";
|
|
5
|
-
const version$1 = "0.0.
|
|
5
|
+
const version$1 = "0.0.6";
|
|
6
6
|
const author = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -6308,6 +6308,7 @@ var FormImpl = {
|
|
|
6308
6308
|
}
|
|
6309
6309
|
},
|
|
6310
6310
|
render(h) {
|
|
6311
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6311
6312
|
let formItems = [];
|
|
6312
6313
|
let spanList;
|
|
6313
6314
|
if (this.formType == "search") {
|
|
@@ -6337,10 +6338,19 @@ var FormImpl = {
|
|
|
6337
6338
|
let statusField = _.remove(renderFieldList, (d) => {
|
|
6338
6339
|
return d.isStatus === "true" || d.isStatus === true;
|
|
6339
6340
|
})[0];
|
|
6341
|
+
let statusText = this.form[statusField == null ? void 0 : statusField.formKey];
|
|
6342
|
+
if (statusField.enumKey) {
|
|
6343
|
+
statusText = (_b = (_a = this.enumData[statusField == null ? void 0 : statusField.enumKey]) == null ? void 0 : _a.enumData) == null ? void 0 : _b[statusText];
|
|
6344
|
+
} else if ((statusField == null ? void 0 : statusField.enumList) && ((_c = statusField == null ? void 0 : statusField.enumList) == null ? void 0 : _c.length)) {
|
|
6345
|
+
statusText = (_e = (_d = statusField.enumList) == null ? void 0 : _d.find(({ K }) => K === statusText)) == null ? void 0 : _e.V;
|
|
6346
|
+
} else if (statusField.enumData) {
|
|
6347
|
+
statusText = (_f = statusField.enumData) == null ? void 0 : _f[statusText];
|
|
6348
|
+
}
|
|
6340
6349
|
formItems.push(
|
|
6341
6350
|
h(
|
|
6342
6351
|
"Col",
|
|
6343
6352
|
{
|
|
6353
|
+
class: "ind-card-title",
|
|
6344
6354
|
props: {
|
|
6345
6355
|
span: 24
|
|
6346
6356
|
}
|
|
@@ -6363,9 +6373,6 @@ var FormImpl = {
|
|
|
6363
6373
|
}
|
|
6364
6374
|
},
|
|
6365
6375
|
[
|
|
6366
|
-
h("div", {
|
|
6367
|
-
class: "ind-page-icon need-icon ind-flex-no-shrink"
|
|
6368
|
-
}),
|
|
6369
6376
|
h(
|
|
6370
6377
|
"div",
|
|
6371
6378
|
{
|
|
@@ -6384,16 +6391,18 @@ var FormImpl = {
|
|
|
6384
6391
|
{
|
|
6385
6392
|
class: "ind-page-sub-title"
|
|
6386
6393
|
},
|
|
6387
|
-
[
|
|
6394
|
+
[
|
|
6395
|
+
(subTitleField == null ? void 0 : subTitleField.dateFormat) ? formatDate(this.form[subTitleField == null ? void 0 : subTitleField.formKey]) : this.form[subTitleField == null ? void 0 : subTitleField.formKey]
|
|
6396
|
+
]
|
|
6388
6397
|
)
|
|
6389
6398
|
]
|
|
6390
6399
|
),
|
|
6391
6400
|
h(
|
|
6392
6401
|
"div",
|
|
6393
6402
|
{
|
|
6394
|
-
class: "ind-status ind-flex-no-shrink " + (statusField.class instanceof Function ? statusField.class(this.form) : statusField.class)
|
|
6403
|
+
class: "ind-status ind-flex-no-shrink " + ((statusField == null ? void 0 : statusField.class) instanceof Function ? statusField == null ? void 0 : statusField.class(this.form) : statusField == null ? void 0 : statusField.class)
|
|
6395
6404
|
},
|
|
6396
|
-
[
|
|
6405
|
+
[statusText]
|
|
6397
6406
|
)
|
|
6398
6407
|
]
|
|
6399
6408
|
)
|
|
@@ -6413,6 +6422,7 @@ var FormImpl = {
|
|
|
6413
6422
|
h(
|
|
6414
6423
|
"Col",
|
|
6415
6424
|
{
|
|
6425
|
+
class: "ind-card-title",
|
|
6416
6426
|
props: {
|
|
6417
6427
|
span: 24
|
|
6418
6428
|
}
|
|
@@ -6435,9 +6445,6 @@ var FormImpl = {
|
|
|
6435
6445
|
}
|
|
6436
6446
|
},
|
|
6437
6447
|
[
|
|
6438
|
-
h("div", {
|
|
6439
|
-
class: "ind-page-icon need-icon ind-flex-no-shrink"
|
|
6440
|
-
}),
|
|
6441
6448
|
h(
|
|
6442
6449
|
"div",
|
|
6443
6450
|
{
|
|
@@ -6456,7 +6463,9 @@ var FormImpl = {
|
|
|
6456
6463
|
{
|
|
6457
6464
|
class: "ind-page-sub-title"
|
|
6458
6465
|
},
|
|
6459
|
-
[
|
|
6466
|
+
[
|
|
6467
|
+
(subTitleField == null ? void 0 : subTitleField.formatDate) ? formatDate(this.form[subTitleField == null ? void 0 : subTitleField.formKey]) : this.form[subTitleField == null ? void 0 : subTitleField.formKey]
|
|
6468
|
+
]
|
|
6460
6469
|
)
|
|
6461
6470
|
]
|
|
6462
6471
|
)
|
|
@@ -6470,7 +6479,7 @@ var FormImpl = {
|
|
|
6470
6479
|
}
|
|
6471
6480
|
let diff = this.fieldList.length - renderFieldList.length;
|
|
6472
6481
|
_.forEach(renderFieldList, (d, idx) => {
|
|
6473
|
-
var
|
|
6482
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m;
|
|
6474
6483
|
let itemInner;
|
|
6475
6484
|
if (d.render) {
|
|
6476
6485
|
itemInner = d.render(h, d, this.form);
|
|
@@ -6514,11 +6523,11 @@ var FormImpl = {
|
|
|
6514
6523
|
},
|
|
6515
6524
|
on: {
|
|
6516
6525
|
"on-blur": (event) => {
|
|
6517
|
-
var
|
|
6526
|
+
var _a3;
|
|
6518
6527
|
let v = event.target.value;
|
|
6519
6528
|
let formatRlt = /(-?)(\d{1,10})(\d{0,999})(\.\d{1,6})?/.exec(v);
|
|
6520
6529
|
if (formatRlt && formatRlt.length) {
|
|
6521
|
-
v = (((
|
|
6530
|
+
v = (((_a3 = d == null ? void 0 : d.props) == null ? void 0 : _a3.enableNegative) ? formatRlt[1] : "") + formatRlt[2] + (formatRlt[4] || "");
|
|
6522
6531
|
}
|
|
6523
6532
|
this.form[d.formKey] = parseFloat(v);
|
|
6524
6533
|
this.$refs[d.formKey] && this.$refs[d.formKey].setCurrentValue(v);
|
|
@@ -6537,9 +6546,9 @@ var FormImpl = {
|
|
|
6537
6546
|
value: this.form[d.formKey],
|
|
6538
6547
|
disabled,
|
|
6539
6548
|
type: "textarea",
|
|
6540
|
-
rows: ((
|
|
6541
|
-
maxlength: ((
|
|
6542
|
-
showWordLimit: ((
|
|
6549
|
+
rows: ((_a2 = d.props) == null ? void 0 : _a2.rows) || 3,
|
|
6550
|
+
maxlength: ((_b2 = d.props) == null ? void 0 : _b2.maxlength) || 1024,
|
|
6551
|
+
showWordLimit: ((_c2 = d.props) == null ? void 0 : _c2.showWordLimit) || true
|
|
6543
6552
|
},
|
|
6544
6553
|
on: {
|
|
6545
6554
|
input: (val) => {
|
|
@@ -6555,7 +6564,7 @@ var FormImpl = {
|
|
|
6555
6564
|
ref: d.formKey,
|
|
6556
6565
|
props: {
|
|
6557
6566
|
title: d.title,
|
|
6558
|
-
options: d.enumList || ((
|
|
6567
|
+
options: d.enumList || ((_d2 = this.enumData[d.enumKey]) == null ? void 0 : _d2.enumList) || [],
|
|
6559
6568
|
...d.props || {},
|
|
6560
6569
|
value: this.form[d.formKey],
|
|
6561
6570
|
disabled
|
|
@@ -6599,7 +6608,7 @@ var FormImpl = {
|
|
|
6599
6608
|
}
|
|
6600
6609
|
}
|
|
6601
6610
|
},
|
|
6602
|
-
(d.enumList || ((
|
|
6611
|
+
(d.enumList || ((_e2 = this.enumData[d.enumKey]) == null ? void 0 : _e2.enumList) || []).map((d2) => {
|
|
6603
6612
|
return h(
|
|
6604
6613
|
"Checkbox",
|
|
6605
6614
|
{
|
|
@@ -6619,7 +6628,7 @@ var FormImpl = {
|
|
|
6619
6628
|
ref: d.formKey,
|
|
6620
6629
|
props: {
|
|
6621
6630
|
...d.props,
|
|
6622
|
-
options: d.enumList || ((
|
|
6631
|
+
options: d.enumList || ((_f2 = this.enumData[d.enumKey]) == null ? void 0 : _f2.enumList) || [],
|
|
6623
6632
|
value: this.form[d.formKey]
|
|
6624
6633
|
},
|
|
6625
6634
|
on: {
|
|
@@ -6792,6 +6801,11 @@ var FormImpl = {
|
|
|
6792
6801
|
},
|
|
6793
6802
|
[text || ""]
|
|
6794
6803
|
),
|
|
6804
|
+
h("span", {
|
|
6805
|
+
domProps: {
|
|
6806
|
+
innerHTML: d.unit ? " " : ""
|
|
6807
|
+
}
|
|
6808
|
+
}),
|
|
6795
6809
|
h("span", {}, [d.unit || ""])
|
|
6796
6810
|
]);
|
|
6797
6811
|
}
|
|
@@ -6930,6 +6944,7 @@ var FormImpl = {
|
|
|
6930
6944
|
"IndButton",
|
|
6931
6945
|
{
|
|
6932
6946
|
props: {
|
|
6947
|
+
size: "default",
|
|
6933
6948
|
bizType: d.bizType
|
|
6934
6949
|
},
|
|
6935
6950
|
on: {
|
|
@@ -6960,7 +6975,7 @@ var FormImpl = {
|
|
|
6960
6975
|
props: {
|
|
6961
6976
|
model: this.form,
|
|
6962
6977
|
rules: this.rules,
|
|
6963
|
-
labelWidth: this.formType == "searchMobile" ?
|
|
6978
|
+
labelWidth: this.formType == "searchMobile" ? 110 : this.labelWidth,
|
|
6964
6979
|
labelColon: false
|
|
6965
6980
|
},
|
|
6966
6981
|
nativeOn: {
|
|
@@ -44354,7 +44369,11 @@ var render$g = function() {
|
|
|
44354
44369
|
var _vm = this;
|
|
44355
44370
|
var _h = _vm.$createElement;
|
|
44356
44371
|
var _c = _vm._self._c || _h;
|
|
44357
|
-
return _c("div", { staticClass: "ind-page-view ind-flex-column" }, [_c("IndMSearch", { attrs: { "value": _vm.searchForm, "showFilter": _vm.searchFormFields && _vm.searchFormFields.length > 0, "fieldList": _vm.searchFormFields
|
|
44372
|
+
return _c("div", { staticClass: "ind-page-view ind-flex-column" }, [_c("IndMSearch", { attrs: { "value": _vm.searchForm, "showFilter": _vm.searchFormFields && _vm.searchFormFields.length > 0, "fieldList": _vm.searchFormFields, "searchVal": _vm.searchVal }, on: { "update:searchVal": function($event) {
|
|
44373
|
+
_vm.searchVal = $event;
|
|
44374
|
+
}, "update:search-val": function($event) {
|
|
44375
|
+
_vm.searchVal = $event;
|
|
44376
|
+
}, "doSearch": _vm.doSearch, "doSearchFilter": _vm.doSearchFilter } }), _c("div", { staticClass: "ind-page" }, [_c("IndMLoadMore", { attrs: { "datas": _vm.displayRows, "dataUrl": _vm.dataUrl, "params": _vm.searchForm }, scopedSlots: _vm._u([{ key: "item", fn: function(ref) {
|
|
44358
44377
|
var item2 = ref.item;
|
|
44359
44378
|
return [_vm._t("item", function() {
|
|
44360
44379
|
return [_c("IndMForm", { attrs: { "fieldList": _vm.formFieldList, "cardBtns": _vm.cardBtns, "value": item2, "formType": "card" } })];
|
|
@@ -44379,6 +44398,7 @@ const __vue2_script$g = {
|
|
|
44379
44398
|
cardFieldsExt: Array,
|
|
44380
44399
|
searchFields: Array,
|
|
44381
44400
|
searchForm: Object,
|
|
44401
|
+
apiParams: Object,
|
|
44382
44402
|
cardFields: Array
|
|
44383
44403
|
},
|
|
44384
44404
|
data() {
|
|
@@ -44390,7 +44410,8 @@ const __vue2_script$g = {
|
|
|
44390
44410
|
columns: [],
|
|
44391
44411
|
searchFormFields: [],
|
|
44392
44412
|
formFieldList: [],
|
|
44393
|
-
subTable: []
|
|
44413
|
+
subTable: [],
|
|
44414
|
+
searchVal: ""
|
|
44394
44415
|
};
|
|
44395
44416
|
},
|
|
44396
44417
|
created() {
|
|
@@ -44403,6 +44424,26 @@ const __vue2_script$g = {
|
|
|
44403
44424
|
},
|
|
44404
44425
|
dataApi: function() {
|
|
44405
44426
|
this.initData();
|
|
44427
|
+
},
|
|
44428
|
+
apiParams: {
|
|
44429
|
+
handler: function() {
|
|
44430
|
+
console.log("apiParams \u53D8\u5316\u89E6\u53D1\u8BF7\u6C42\u6570\u636E");
|
|
44431
|
+
this.initData();
|
|
44432
|
+
},
|
|
44433
|
+
deep: true
|
|
44434
|
+
}
|
|
44435
|
+
},
|
|
44436
|
+
computed: {
|
|
44437
|
+
displayRows() {
|
|
44438
|
+
if (this.searchVal) {
|
|
44439
|
+
return _.filter(this.rows, (d) => {
|
|
44440
|
+
return _.some(this.formFieldList, (dd) => {
|
|
44441
|
+
return _.includes(d[dd.formKey], this.searchVal);
|
|
44442
|
+
});
|
|
44443
|
+
});
|
|
44444
|
+
} else {
|
|
44445
|
+
return this.rows;
|
|
44446
|
+
}
|
|
44406
44447
|
}
|
|
44407
44448
|
},
|
|
44408
44449
|
methods: {
|
|
@@ -44437,7 +44478,7 @@ const __vue2_script$g = {
|
|
|
44437
44478
|
this.loadingComp = true;
|
|
44438
44479
|
try {
|
|
44439
44480
|
if (this.dataApi) {
|
|
44440
|
-
const { data: data49 } = await this.dataApi(this.searchForm);
|
|
44481
|
+
const { data: data49 } = await this.dataApi(this.apiParams ? this.apiParams : this.searchForm);
|
|
44441
44482
|
this.rows = data49;
|
|
44442
44483
|
}
|
|
44443
44484
|
} catch (e) {
|
|
@@ -44446,9 +44487,12 @@ const __vue2_script$g = {
|
|
|
44446
44487
|
this.loadingComp = false;
|
|
44447
44488
|
}, 5),
|
|
44448
44489
|
async doSearch(searchParams) {
|
|
44490
|
+
console.log("doSearch by \u7B5B\u9009\u6309\u94AE", searchParams);
|
|
44449
44491
|
this.$emit("update:searchForm", searchParams);
|
|
44450
44492
|
await this.$nextTick();
|
|
44451
44493
|
this.initData();
|
|
44494
|
+
},
|
|
44495
|
+
doSearchFilter(search2) {
|
|
44452
44496
|
}
|
|
44453
44497
|
}
|
|
44454
44498
|
};
|
|
@@ -62645,9 +62689,9 @@ var render$c = function() {
|
|
|
62645
62689
|
return _c("van-search", { attrs: { "show-action": _vm.showFilter, "placeholder": "\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD" }, on: { "search": function($event) {
|
|
62646
62690
|
return _vm.$emit("doSearch");
|
|
62647
62691
|
} }, scopedSlots: _vm._u([{ key: "action", fn: function() {
|
|
62648
|
-
return [_c("div", {
|
|
62692
|
+
return [_c("div", { class: ["toggle-condition", _vm.isFiltering ? "active" : ""], on: { "click": function($event) {
|
|
62649
62693
|
return _vm.$emit("showCondition");
|
|
62650
|
-
} } }
|
|
62694
|
+
} } })];
|
|
62651
62695
|
}, proxy: true }]), model: { value: _vm.searchVal, callback: function($$v) {
|
|
62652
62696
|
_vm.searchVal = $$v;
|
|
62653
62697
|
}, expression: "searchVal" } });
|
|
@@ -62656,7 +62700,8 @@ var staticRenderFns$c = [];
|
|
|
62656
62700
|
const __vue2_script$c = {
|
|
62657
62701
|
props: {
|
|
62658
62702
|
value: String,
|
|
62659
|
-
showFilter: Boolean
|
|
62703
|
+
showFilter: Boolean,
|
|
62704
|
+
isFiltering: Boolean
|
|
62660
62705
|
},
|
|
62661
62706
|
data() {
|
|
62662
62707
|
return {
|
|
@@ -62696,7 +62741,9 @@ var render$b = function() {
|
|
|
62696
62741
|
var _vm = this;
|
|
62697
62742
|
var _h = _vm.$createElement;
|
|
62698
62743
|
var _c = _vm._self._c || _h;
|
|
62699
|
-
return _c("div", { staticClass: "ind-mobile-search ind-flex-no-shrink" }, [_c("SearchTop", { attrs: { "
|
|
62744
|
+
return _c("div", { staticClass: "ind-mobile-search ind-flex-no-shrink" }, [_c("SearchTop", { attrs: { "value": _vm.searchVal, "isFiltering": _vm.isFiltering, "showFilter": _vm.showFilter }, on: { "input": function($event) {
|
|
62745
|
+
return _vm.$emit("update:searchVal", $event);
|
|
62746
|
+
}, "showCondition": _vm.showCondition } }), _vm.showFilter ? _c("van-popup", { style: { width: "80%" }, attrs: { "position": "right" }, model: { value: _vm.displayCondition, callback: function($$v) {
|
|
62700
62747
|
_vm.displayCondition = $$v;
|
|
62701
62748
|
}, expression: "displayCondition" } }, [_c("div", { staticClass: "ind-page-view ind-flex-column", staticStyle: { "height": "100vh" } }, [_c("IndMForm", { staticClass: "height100", staticStyle: { "background": "var(--ind-white)" }, attrs: { "formType": "searchMobile", "fieldList": _vm.fieldList }, model: { value: _vm.searchForm, callback: function($$v) {
|
|
62702
62749
|
_vm.searchForm = $$v;
|
|
@@ -62708,6 +62755,7 @@ const __vue2_script$b = {
|
|
|
62708
62755
|
props: {
|
|
62709
62756
|
showFilter: Boolean,
|
|
62710
62757
|
value: Object,
|
|
62758
|
+
searchVal: String,
|
|
62711
62759
|
fieldList: Array
|
|
62712
62760
|
},
|
|
62713
62761
|
data() {
|
|
@@ -62719,6 +62767,11 @@ const __vue2_script$b = {
|
|
|
62719
62767
|
created() {
|
|
62720
62768
|
this.searchForm = this.value;
|
|
62721
62769
|
},
|
|
62770
|
+
computed: {
|
|
62771
|
+
isFiltering() {
|
|
62772
|
+
return !_.isEmpty(this.searchForm);
|
|
62773
|
+
}
|
|
62774
|
+
},
|
|
62722
62775
|
watch: {
|
|
62723
62776
|
value: {
|
|
62724
62777
|
handler: function() {
|
|
@@ -62766,7 +62819,7 @@ var render$a = function() {
|
|
|
62766
62819
|
var _c = _vm._self._c || _h;
|
|
62767
62820
|
return _c("van-popup", { style: { width: "100%", height: "100%" }, attrs: { "value": _vm.show, "position": "right", "lazy-render": true, "get-container": "body" }, on: { "opened": _vm.getTableData } }, [_c("div", { staticClass: "ind-select-panel ind-vcenter", staticStyle: { "width": "100%", "height": "100vh" } }, [_c("van-nav-bar", { staticClass: "ind-flex-no-shrink", attrs: { "title": "\u8BF7\u9009\u62E9" + _vm.title, "left-text": "\u8FD4\u56DE", "left-arrow": "" }, on: { "click-left": _vm.cancel } }), _c("div", { staticClass: "ind-main-content-wrapper ind-flex-grow ind-vcenter" }, [_c("van-search", { staticClass: "ind-flex-no-shrink", staticStyle: { "position": "relative", "z-index": "3" }, attrs: { "placeholder": "\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD" }, on: { "search": _vm.doSearch }, model: { value: _vm.searchVal, callback: function($$v) {
|
|
62768
62821
|
_vm.searchVal = $$v;
|
|
62769
|
-
}, expression: "searchVal" } }), _c("IndTable", { ref: "table", attrs: { "rowClick": "", "rowMultiSelectWithClick": _vm.multiple, "isRowSelectable": _vm.isRowSelectable, "groupSelectsChildren": _vm.multiple, "showBottom": false, "dataApi": _vm.selectDataApi, "columns": _vm.columnsData, "rowKey": _vm.selectRowKey, "showTableOption": false, "groupDefaultExpanded": 3, "disablePage": "" } }), _c("div", { staticClass: "ind-bottom-btn ind-flex ind-flex-no-shrink ind-space-between", staticStyle: { "position": "absolute", "bottom": "0" } }, [_c("IndButton", { attrs: { "bizType": "cancel" }, on: { "click": _vm.cancel } }, [_vm._v("\u53D6\u6D88")]), _c("IndButton", { attrs: { "bizType": "primary" }, on: { "click": _vm.confirm } }, [_vm._v("\u786E\u8BA4")])], 1)], 1)], 1)]);
|
|
62822
|
+
}, expression: "searchVal" } }), _c("IndTable", { ref: "table", attrs: { "rowClick": "", "headerHeight": 49, "rowMultiSelectWithClick": _vm.multiple, "isRowSelectable": _vm.isRowSelectable, "groupSelectsChildren": _vm.multiple, "showBottom": false, "dataApi": _vm.selectDataApi, "searchParams": _vm.searchParams, "columns": _vm.columnsData, "rowKey": _vm.selectRowKey, "showTableOption": false, "groupDefaultExpanded": 3, "disablePage": "" }, on: { "on-select-change": _vm.onSelectChange } }), _c("div", { staticClass: "ind-bottom-btn ind-flex ind-flex-no-shrink ind-space-between", staticStyle: { "position": "absolute", "bottom": "0" } }, [_c("IndButton", { attrs: { "bizType": "cancel" }, on: { "click": _vm.cancel } }, [_vm._v("\u53D6\u6D88")]), _c("IndButton", { attrs: { "bizType": "primary" }, on: { "click": _vm.confirm } }, [_vm._v("\u786E\u8BA4")])], 1)], 1)], 1)]);
|
|
62770
62823
|
};
|
|
62771
62824
|
var staticRenderFns$a = [];
|
|
62772
62825
|
const __vue2_script$a = {
|
|
@@ -62778,6 +62831,7 @@ const __vue2_script$a = {
|
|
|
62778
62831
|
multiple: Boolean,
|
|
62779
62832
|
options: Array,
|
|
62780
62833
|
dataApi: Function,
|
|
62834
|
+
searchParams: Object,
|
|
62781
62835
|
columns: Array,
|
|
62782
62836
|
rowKey: String,
|
|
62783
62837
|
defaultVisible: Boolean
|
|
@@ -62790,7 +62844,8 @@ const __vue2_script$a = {
|
|
|
62790
62844
|
selectRowKey: "",
|
|
62791
62845
|
selectDataApi: null,
|
|
62792
62846
|
columnsData: [],
|
|
62793
|
-
dataInited: false
|
|
62847
|
+
dataInited: false,
|
|
62848
|
+
selectedRows: []
|
|
62794
62849
|
};
|
|
62795
62850
|
},
|
|
62796
62851
|
created() {
|
|
@@ -62808,6 +62863,12 @@ const __vue2_script$a = {
|
|
|
62808
62863
|
},
|
|
62809
62864
|
dataApi() {
|
|
62810
62865
|
this.initConfig();
|
|
62866
|
+
},
|
|
62867
|
+
value: {
|
|
62868
|
+
handler: function() {
|
|
62869
|
+
this.setSelected();
|
|
62870
|
+
},
|
|
62871
|
+
deep: true
|
|
62811
62872
|
}
|
|
62812
62873
|
},
|
|
62813
62874
|
methods: {
|
|
@@ -62874,7 +62935,34 @@ const __vue2_script$a = {
|
|
|
62874
62935
|
var _a, _b;
|
|
62875
62936
|
this.dataInited = true;
|
|
62876
62937
|
(_b = (_a = this.$refs) == null ? void 0 : _a.table) == null ? void 0 : _b.tableRefresh();
|
|
62938
|
+
this.setSelected();
|
|
62877
62939
|
}, 2);
|
|
62940
|
+
},
|
|
62941
|
+
onSelectChange(selectedRows) {
|
|
62942
|
+
var _a, _b, _c, _d;
|
|
62943
|
+
if (!this.multiple) {
|
|
62944
|
+
let preLen = this.selectedRows.length;
|
|
62945
|
+
let curLen = selectedRows.length;
|
|
62946
|
+
if (preLen === 1 && curLen === 0) {
|
|
62947
|
+
(_b = (_a = this.$refs) == null ? void 0 : _a.table) == null ? void 0 : _b.setSelection(this.selectedRows, true);
|
|
62948
|
+
return;
|
|
62949
|
+
} else if (preLen === 1 && curLen === 2) {
|
|
62950
|
+
let selectedRowsClone = _.cloneDeep(selectedRows);
|
|
62951
|
+
_.remove(selectedRowsClone, (d) => {
|
|
62952
|
+
return _.some(this.selectedRows, (dd) => {
|
|
62953
|
+
return dd[this.rowKey || "id"] == d[this.rowKey || "id"];
|
|
62954
|
+
});
|
|
62955
|
+
});
|
|
62956
|
+
(_d = (_c = this.$refs) == null ? void 0 : _c.table) == null ? void 0 : _d.setSelection(selectedRowsClone, true);
|
|
62957
|
+
return;
|
|
62958
|
+
}
|
|
62959
|
+
}
|
|
62960
|
+
this.selectedRows = selectedRows;
|
|
62961
|
+
},
|
|
62962
|
+
async setSelected() {
|
|
62963
|
+
var _a, _b;
|
|
62964
|
+
await this.$nextTick();
|
|
62965
|
+
(_b = (_a = this.$refs) == null ? void 0 : _a.table) == null ? void 0 : _b.setSelection(this.value, !this.multiple);
|
|
62878
62966
|
}
|
|
62879
62967
|
}
|
|
62880
62968
|
};
|