eoss-ui 0.5.81-beta15 → 0.5.81-beta17
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/lib/clients.js +4 -3
- package/lib/data-table.js +208 -54
- package/lib/eoss-ui.common.js +387 -126
- package/lib/flow.js +69 -10
- package/lib/index.js +1 -1
- package/lib/login.js +9 -4
- package/lib/main.js +79 -37
- package/package.json +1 -1
- package/packages/clients/src/main.vue +2 -1
- package/packages/data-table/src/column.vue +111 -41
- package/packages/data-table/src/formItem.vue +430 -0
- package/packages/data-table/src/main.vue +1 -0
- package/packages/flow/src/main.vue +30 -17
- package/packages/login/src/main.vue +3 -2
- package/packages/main/src/default/index.vue +6 -6
- package/packages/main/src/simplicity/index.vue +46 -12
- package/src/index.js +1 -1
package/lib/login.js
CHANGED
|
@@ -3970,7 +3970,7 @@ var bankCard = { pattern: new RegExp('^([1-9]{1})(\\d{14}|\\d{18})$'), message:
|
|
|
3970
3970
|
// ESM COMPAT FLAG
|
|
3971
3971
|
__webpack_require__.r(__webpack_exports__);
|
|
3972
3972
|
|
|
3973
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=
|
|
3973
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=66e72714&
|
|
3974
3974
|
var render = function () {
|
|
3975
3975
|
var _vm = this
|
|
3976
3976
|
var _h = _vm.$createElement
|
|
@@ -4882,7 +4882,11 @@ var render = function () {
|
|
|
4882
4882
|
},
|
|
4883
4883
|
},
|
|
4884
4884
|
},
|
|
4885
|
-
[
|
|
4885
|
+
[
|
|
4886
|
+
_c("es-clients", {
|
|
4887
|
+
attrs: { downloads: _vm.download, showTips: _vm.showIosTips },
|
|
4888
|
+
}),
|
|
4889
|
+
],
|
|
4886
4890
|
1
|
|
4887
4891
|
),
|
|
4888
4892
|
_vm._t("calogin"),
|
|
@@ -4919,7 +4923,7 @@ var staticRenderFns = []
|
|
|
4919
4923
|
render._withStripped = true
|
|
4920
4924
|
|
|
4921
4925
|
|
|
4922
|
-
// CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=
|
|
4926
|
+
// CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=66e72714&
|
|
4923
4927
|
|
|
4924
4928
|
// EXTERNAL MODULE: external "babel-runtime/regenerator"
|
|
4925
4929
|
var regenerator_ = __webpack_require__(13);
|
|
@@ -6074,7 +6078,8 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
6074
6078
|
type: Number,
|
|
6075
6079
|
default: 1500
|
|
6076
6080
|
},
|
|
6077
|
-
isScale: Boolean
|
|
6081
|
+
isScale: Boolean,
|
|
6082
|
+
showIosTips: Boolean
|
|
6078
6083
|
},
|
|
6079
6084
|
computed: {
|
|
6080
6085
|
transform: function transform() {
|
package/lib/main.js
CHANGED
|
@@ -3975,8 +3975,8 @@ render._withStripped = true
|
|
|
3975
3975
|
|
|
3976
3976
|
// CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=d62e142c&
|
|
3977
3977
|
|
|
3978
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=
|
|
3979
|
-
var
|
|
3978
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=41b0483a&scoped=true&
|
|
3979
|
+
var simplicityvue_type_template_id_41b0483a_scoped_true_render = function () {
|
|
3980
3980
|
var _vm = this
|
|
3981
3981
|
var _h = _vm.$createElement
|
|
3982
3982
|
var _c = _vm._self._c || _h
|
|
@@ -4585,11 +4585,11 @@ var simplicityvue_type_template_id_46b7eb38_scoped_true_render = function () {
|
|
|
4585
4585
|
),
|
|
4586
4586
|
])
|
|
4587
4587
|
}
|
|
4588
|
-
var
|
|
4589
|
-
|
|
4588
|
+
var simplicityvue_type_template_id_41b0483a_scoped_true_staticRenderFns = []
|
|
4589
|
+
simplicityvue_type_template_id_41b0483a_scoped_true_render._withStripped = true
|
|
4590
4590
|
|
|
4591
4591
|
|
|
4592
|
-
// CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=
|
|
4592
|
+
// CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=41b0483a&scoped=true&
|
|
4593
4593
|
|
|
4594
4594
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/avatar.vue?vue&type=template&id=1560e8bf&scoped=true&
|
|
4595
4595
|
var avatarvue_type_template_id_1560e8bf_scoped_true_render = function () {
|
|
@@ -9774,6 +9774,8 @@ var events = [function (tabs, index, that) {
|
|
|
9774
9774
|
* @date 2024年9月7日
|
|
9775
9775
|
**/
|
|
9776
9776
|
handlerClickMenu: function handlerClickMenu(res) {
|
|
9777
|
+
var _this5 = this;
|
|
9778
|
+
|
|
9777
9779
|
if (this.recordApp) {
|
|
9778
9780
|
utils_util["a" /* default */].ajax({
|
|
9779
9781
|
url: api["mb" /* recordUserApp */],
|
|
@@ -9793,6 +9795,16 @@ var events = [function (tabs, index, that) {
|
|
|
9793
9795
|
} else {
|
|
9794
9796
|
if (res.method == 'iframe') {
|
|
9795
9797
|
res.url = utils_util["a" /* default */].handlerUrl(res.url);
|
|
9798
|
+
} else {
|
|
9799
|
+
var _tab6 = this.tabs[i];
|
|
9800
|
+
if (_tab6.method === 'iframe') {
|
|
9801
|
+
this.$set(this.tabs[i], 'url', utils_util["a" /* default */].handlerUrl(_tab6.url));
|
|
9802
|
+
} else {
|
|
9803
|
+
this.$set(this.tabs[i], 'refresh', false);
|
|
9804
|
+
this.$nextTick(function () {
|
|
9805
|
+
_this5.$set(_this5.tabs[i], 'refresh', true);
|
|
9806
|
+
});
|
|
9807
|
+
}
|
|
9796
9808
|
}
|
|
9797
9809
|
}
|
|
9798
9810
|
},
|
|
@@ -9843,15 +9855,23 @@ var events = [function (tabs, index, that) {
|
|
|
9843
9855
|
* @date 2024年9月7日
|
|
9844
9856
|
**/
|
|
9845
9857
|
handleRefresh: function handleRefresh() {
|
|
9858
|
+
var _this6 = this;
|
|
9859
|
+
|
|
9846
9860
|
var i = utils_util["a" /* default */].indexOfObj(this.tabs, this.activeName, 'id');
|
|
9847
9861
|
var tab = this.tabs[i];
|
|
9848
9862
|
if (tab.method === 'iframe') {
|
|
9849
9863
|
tab.url = utils_util["a" /* default */].handlerUrl(tab.url);
|
|
9864
|
+
} else {
|
|
9865
|
+
var _tab7 = this.tabs[i];
|
|
9866
|
+
if (_tab7.method === 'iframe') {
|
|
9867
|
+
this.$set(this.tabs[i], 'url', utils_util["a" /* default */].handlerUrl(_tab7.url));
|
|
9868
|
+
} else {
|
|
9869
|
+
this.$set(this.tabs[i], 'refresh', false);
|
|
9870
|
+
this.$nextTick(function () {
|
|
9871
|
+
_this6.$set(_this6.tabs[i], 'refresh', true);
|
|
9872
|
+
});
|
|
9873
|
+
}
|
|
9850
9874
|
}
|
|
9851
|
-
tab.refresh = false;
|
|
9852
|
-
this.$nextTick(function () {
|
|
9853
|
-
tab.refresh = true;
|
|
9854
|
-
});
|
|
9855
9875
|
},
|
|
9856
9876
|
|
|
9857
9877
|
/**
|
|
@@ -9929,6 +9949,8 @@ var events = [function (tabs, index, that) {
|
|
|
9929
9949
|
* @date 2024年9月7日
|
|
9930
9950
|
**/
|
|
9931
9951
|
handleClick: function handleClick(res) {
|
|
9952
|
+
var _this7 = this;
|
|
9953
|
+
|
|
9932
9954
|
var type = res.type,
|
|
9933
9955
|
event = res.event,
|
|
9934
9956
|
open = res.open,
|
|
@@ -9939,7 +9961,7 @@ var events = [function (tabs, index, that) {
|
|
|
9939
9961
|
} else if (open) {
|
|
9940
9962
|
utils_util["a" /* default */].win.open(open);
|
|
9941
9963
|
} else if (link) {
|
|
9942
|
-
utils_util["a" /* default */].win.
|
|
9964
|
+
utils_util["a" /* default */].win.open(link, '_self');
|
|
9943
9965
|
} else {
|
|
9944
9966
|
switch (type) {
|
|
9945
9967
|
case 'quit':
|
|
@@ -9963,15 +9985,23 @@ var events = [function (tabs, index, that) {
|
|
|
9963
9985
|
this.showMsg = false;
|
|
9964
9986
|
break;
|
|
9965
9987
|
case 'home':
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9988
|
+
var i = utils_util["a" /* default */].indexOfObj(this.tabs, this.homePage.id, 'id');
|
|
9989
|
+
if (i == -1) {
|
|
9990
|
+
this.tabs.unshift(this.homePage);
|
|
9991
|
+
} else {
|
|
9992
|
+
var tab = this.tabs[i];
|
|
9993
|
+
if (tab.method === 'iframe') {
|
|
9994
|
+
this.$set(this.tabs[i], 'url', utils_util["a" /* default */].handlerUrl(tab.url));
|
|
9995
|
+
} else {
|
|
9996
|
+
this.$set(this.tabs[i], 'refresh', false);
|
|
9997
|
+
this.$nextTick(function () {
|
|
9998
|
+
_this7.$set(_this7.tabs[i], 'refresh', true);
|
|
9999
|
+
});
|
|
9970
10000
|
}
|
|
9971
|
-
this.activeName = this.homePage.id;
|
|
9972
|
-
this.showMsg = false;
|
|
9973
|
-
this.showSet = false;
|
|
9974
10001
|
}
|
|
10002
|
+
this.activeName = this.homePage.id;
|
|
10003
|
+
this.showMsg = false;
|
|
10004
|
+
this.showSet = false;
|
|
9975
10005
|
break;
|
|
9976
10006
|
case 'search':
|
|
9977
10007
|
this.handlerSetDrawer(res);
|
|
@@ -9992,7 +10022,7 @@ var events = [function (tabs, index, that) {
|
|
|
9992
10022
|
* @date 2024年9月7日
|
|
9993
10023
|
**/
|
|
9994
10024
|
handleQuit: function handleQuit() {
|
|
9995
|
-
var
|
|
10025
|
+
var _this8 = this;
|
|
9996
10026
|
|
|
9997
10027
|
this.$confirm('确定注销吗?', '退出系统', {
|
|
9998
10028
|
confirmButtonText: '确定',
|
|
@@ -10002,8 +10032,8 @@ var events = [function (tabs, index, that) {
|
|
|
10002
10032
|
utils_util["a" /* default */].ajax({ method: 'post', url: api["eb" /* logout */] }).then(function (res) {
|
|
10003
10033
|
if (res.rCode == 0) {
|
|
10004
10034
|
utils_util["a" /* default */].removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'auth', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
|
|
10005
|
-
if (
|
|
10006
|
-
|
|
10035
|
+
if (_this8.onQuit && typeof _this8.onQuit === 'function') {
|
|
10036
|
+
_this8.onQuit();
|
|
10007
10037
|
} else {
|
|
10008
10038
|
try {
|
|
10009
10039
|
var loginPage = utils_util["a" /* default */].getStorage('login') || utils_util["a" /* default */].getStorage('loginPage');
|
|
@@ -10041,7 +10071,7 @@ var events = [function (tabs, index, that) {
|
|
|
10041
10071
|
}
|
|
10042
10072
|
}).catch(function (err) {
|
|
10043
10073
|
if (err.message && err.message !== 'canceled') {
|
|
10044
|
-
|
|
10074
|
+
_this8.$message.error(err.message);
|
|
10045
10075
|
}
|
|
10046
10076
|
});
|
|
10047
10077
|
}).catch(function (e) {});
|
|
@@ -10086,19 +10116,21 @@ var events = [function (tabs, index, that) {
|
|
|
10086
10116
|
* @date 2024年9月7日
|
|
10087
10117
|
**/
|
|
10088
10118
|
handleOpened: function handleOpened(res) {
|
|
10089
|
-
var
|
|
10119
|
+
var _this9 = this;
|
|
10090
10120
|
|
|
10091
10121
|
if (res === undefined) {
|
|
10092
10122
|
this.sysMsg = [];
|
|
10093
10123
|
} else if (res == false && this.sysMsg.length) {
|
|
10094
10124
|
this.sysMsgOut = setTimeout(function () {
|
|
10095
|
-
|
|
10125
|
+
_this9.sysMsg = [];
|
|
10096
10126
|
}, 3000);
|
|
10097
10127
|
} else if (this.sysMsgOut) {
|
|
10098
10128
|
clearTimeout(this.sysMsgOut);
|
|
10099
10129
|
}
|
|
10100
10130
|
},
|
|
10101
10131
|
jumpMenu: function jumpMenu(res) {
|
|
10132
|
+
var _this10 = this;
|
|
10133
|
+
|
|
10102
10134
|
var apps = res;
|
|
10103
10135
|
if (typeof res === 'string') {
|
|
10104
10136
|
apps = res.split(',');
|
|
@@ -10111,6 +10143,16 @@ var events = [function (tabs, index, that) {
|
|
|
10111
10143
|
if (i == -1) {
|
|
10112
10144
|
var tab = this.setIframeType(obj);
|
|
10113
10145
|
this.tabs.splice(n + 1, 0, tab);
|
|
10146
|
+
} else {
|
|
10147
|
+
var _tab8 = this.tabs[i];
|
|
10148
|
+
if (_tab8.method === 'iframe') {
|
|
10149
|
+
this.$set(this.tabs[i], 'url', utils_util["a" /* default */].handlerUrl(_tab8.url));
|
|
10150
|
+
} else {
|
|
10151
|
+
this.$set(this.tabs[i], 'refresh', false);
|
|
10152
|
+
this.$nextTick(function () {
|
|
10153
|
+
_this10.$set(_this10.tabs[i], 'refresh', true);
|
|
10154
|
+
});
|
|
10155
|
+
}
|
|
10114
10156
|
}
|
|
10115
10157
|
} else {
|
|
10116
10158
|
this.$message.error('没有此菜单!');
|
|
@@ -10119,13 +10161,13 @@ var events = [function (tabs, index, that) {
|
|
|
10119
10161
|
|
|
10120
10162
|
//监听改变菜单
|
|
10121
10163
|
handleListener: function handleListener() {
|
|
10122
|
-
var
|
|
10164
|
+
var _this11 = this;
|
|
10123
10165
|
|
|
10124
10166
|
utils_util["a" /* default */].win.addEventListener('message', function (e) {
|
|
10125
10167
|
var msg = e.data;
|
|
10126
10168
|
if (msg.key == 'jump_Menu') {
|
|
10127
10169
|
var res = msg.data1;
|
|
10128
|
-
|
|
10170
|
+
_this11.jumpMenu(res);
|
|
10129
10171
|
}
|
|
10130
10172
|
}, false);
|
|
10131
10173
|
}
|
|
@@ -10150,18 +10192,18 @@ var events = [function (tabs, index, that) {
|
|
|
10150
10192
|
|
|
10151
10193
|
var simplicity_component = Object(componentNormalizer["a" /* default */])(
|
|
10152
10194
|
src_simplicityvue_type_script_lang_js_,
|
|
10153
|
-
|
|
10154
|
-
|
|
10195
|
+
simplicityvue_type_template_id_41b0483a_scoped_true_render,
|
|
10196
|
+
simplicityvue_type_template_id_41b0483a_scoped_true_staticRenderFns,
|
|
10155
10197
|
false,
|
|
10156
10198
|
null,
|
|
10157
|
-
"
|
|
10199
|
+
"41b0483a",
|
|
10158
10200
|
null
|
|
10159
10201
|
|
|
10160
10202
|
)
|
|
10161
10203
|
|
|
10162
10204
|
/* harmony default export */ var simplicity = (simplicity_component.exports);
|
|
10163
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/index.vue?vue&type=template&id=
|
|
10164
|
-
var
|
|
10205
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/index.vue?vue&type=template&id=4fbf4cba&
|
|
10206
|
+
var defaultvue_type_template_id_4fbf4cba_render = function () {
|
|
10165
10207
|
var _vm = this
|
|
10166
10208
|
var _h = _vm.$createElement
|
|
10167
10209
|
var _c = _vm._self._c || _h
|
|
@@ -10544,11 +10586,11 @@ var defaultvue_type_template_id_5522873a_render = function () {
|
|
|
10544
10586
|
1
|
|
10545
10587
|
)
|
|
10546
10588
|
}
|
|
10547
|
-
var
|
|
10548
|
-
|
|
10589
|
+
var defaultvue_type_template_id_4fbf4cba_staticRenderFns = []
|
|
10590
|
+
defaultvue_type_template_id_4fbf4cba_render._withStripped = true
|
|
10549
10591
|
|
|
10550
10592
|
|
|
10551
|
-
// CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=
|
|
10593
|
+
// CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=4fbf4cba&
|
|
10552
10594
|
|
|
10553
10595
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/userinfo.vue?vue&type=template&id=bd3da0e0&
|
|
10554
10596
|
var userinfovue_type_template_id_bd3da0e0_render = function () {
|
|
@@ -13765,11 +13807,11 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
|
|
|
13765
13807
|
}
|
|
13766
13808
|
} else {
|
|
13767
13809
|
if (node.fourthTabs.length) {
|
|
13768
|
-
this.tabsId =
|
|
13810
|
+
this.tabsId = node.fourthTabs[0].id;
|
|
13769
13811
|
this.$nextTick(function () {
|
|
13770
13812
|
_this6.tabs = node.fourthTabs;
|
|
13813
|
+
_this6.handleJump(_this6.tabs[0].url, _this6.tabs[0].urlopenmode, _this6.tabs[0]);
|
|
13771
13814
|
});
|
|
13772
|
-
this.handleJump(this.tabs[0].url, this.tabs[0].urlopenmode, this.tabs[0]);
|
|
13773
13815
|
//this.navIds = this.getId(this.menus, this.tabs[0].url);
|
|
13774
13816
|
}
|
|
13775
13817
|
}
|
|
@@ -14211,8 +14253,8 @@ var appCode = utils_util["a" /* default */].getParams('appCode') || utils_util["
|
|
|
14211
14253
|
|
|
14212
14254
|
var default_component = Object(componentNormalizer["a" /* default */])(
|
|
14213
14255
|
src_defaultvue_type_script_lang_js_,
|
|
14214
|
-
|
|
14215
|
-
|
|
14256
|
+
defaultvue_type_template_id_4fbf4cba_render,
|
|
14257
|
+
defaultvue_type_template_id_4fbf4cba_staticRenderFns,
|
|
14216
14258
|
false,
|
|
14217
14259
|
null,
|
|
14218
14260
|
null,
|
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<div class="es-qr-code-box" v-else>
|
|
49
49
|
<es-qr-code :content="item" auto></es-qr-code>
|
|
50
50
|
</div>
|
|
51
|
-
<div class="es-clients-remark" v-if="key == 'ios'">
|
|
51
|
+
<div class="es-clients-remark" v-if="key == 'ios' && showTips">
|
|
52
52
|
备注: 苹果手机安装后请在设置- -通用- -设备管理中进行激活操作
|
|
53
53
|
</div>
|
|
54
54
|
</li>
|
|
@@ -80,6 +80,7 @@ export default {
|
|
|
80
80
|
name: 'EsClients',
|
|
81
81
|
inheritAttrs: false,
|
|
82
82
|
props: {
|
|
83
|
+
showTips: Boolean,
|
|
83
84
|
downloads: Object,
|
|
84
85
|
logo: String,
|
|
85
86
|
pcImage: {
|
|
@@ -10,10 +10,49 @@
|
|
|
10
10
|
:rules="isNotRule(scope) ? [] : rules"
|
|
11
11
|
:index="scope.$index"
|
|
12
12
|
>
|
|
13
|
+
<component
|
|
14
|
+
v-if="getType(scope.row.formConfigs, 'component')"
|
|
15
|
+
:is="tag"
|
|
16
|
+
v-bind="formOption"
|
|
17
|
+
v-model="scope.row[field || prop]"
|
|
18
|
+
:data="getData(scope.row.formOptions)"
|
|
19
|
+
@blur="
|
|
20
|
+
(event) => {
|
|
21
|
+
handleBlur({
|
|
22
|
+
item: config,
|
|
23
|
+
event: event,
|
|
24
|
+
data: scope.row,
|
|
25
|
+
scope: scope
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
"
|
|
29
|
+
@focus="
|
|
30
|
+
(event) => {
|
|
31
|
+
handleFocus({
|
|
32
|
+
item: config,
|
|
33
|
+
event: event,
|
|
34
|
+
data: scope.row,
|
|
35
|
+
scope: scope
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
"
|
|
39
|
+
@change="
|
|
40
|
+
(value) => {
|
|
41
|
+
handleChange({
|
|
42
|
+
item: config,
|
|
43
|
+
name: field || prop,
|
|
44
|
+
value: value,
|
|
45
|
+
data: scope.row,
|
|
46
|
+
scope: scope
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
"
|
|
50
|
+
></component>
|
|
13
51
|
<es-select
|
|
14
|
-
v-if="
|
|
52
|
+
v-else-if="getType(scope.row.formConfigs, 'select')"
|
|
15
53
|
v-bind="formOption"
|
|
16
54
|
v-model="scope.row[field || prop]"
|
|
55
|
+
:data="getData(scope.row.formOptions)"
|
|
17
56
|
@blur="
|
|
18
57
|
(event) => {
|
|
19
58
|
handleBlur({
|
|
@@ -45,11 +84,13 @@
|
|
|
45
84
|
});
|
|
46
85
|
}
|
|
47
86
|
"
|
|
48
|
-
|
|
87
|
+
>
|
|
88
|
+
</es-select>
|
|
49
89
|
<es-cascader
|
|
50
|
-
v-else-if="
|
|
90
|
+
v-else-if="getType(scope.row.formConfigs, 'cascader')"
|
|
51
91
|
v-bind="formOption"
|
|
52
92
|
v-model="scope.row[field || prop]"
|
|
93
|
+
:data="getData(scope.row.formOptions)"
|
|
53
94
|
@blur="
|
|
54
95
|
(event) => {
|
|
55
96
|
handleBlur({
|
|
@@ -84,10 +125,10 @@
|
|
|
84
125
|
>
|
|
85
126
|
</es-cascader>
|
|
86
127
|
<es-select-ganged
|
|
87
|
-
v-else-if="
|
|
128
|
+
v-else-if="getType(scope.row.formConfigs, 'ganged')"
|
|
88
129
|
v-bind="formOption"
|
|
89
130
|
v-model="scope.row[field || prop]"
|
|
90
|
-
:data="init(
|
|
131
|
+
:data="init(getData(scope.row.formOptions), config)"
|
|
91
132
|
@change="
|
|
92
133
|
(value) => {
|
|
93
134
|
handleChange({
|
|
@@ -98,11 +139,13 @@
|
|
|
98
139
|
});
|
|
99
140
|
}
|
|
100
141
|
"
|
|
101
|
-
|
|
142
|
+
>
|
|
143
|
+
</es-select-ganged>
|
|
102
144
|
<es-radio-group
|
|
103
|
-
v-else-if="
|
|
145
|
+
v-else-if="getType(scope.row.formConfigs, 'radio')"
|
|
104
146
|
v-bind="formOption"
|
|
105
147
|
v-model="scope.row[field || prop]"
|
|
148
|
+
:data="getData(scope.row.formOptions)"
|
|
106
149
|
@change="
|
|
107
150
|
(value) => {
|
|
108
151
|
handleChange({
|
|
@@ -113,11 +156,13 @@
|
|
|
113
156
|
});
|
|
114
157
|
}
|
|
115
158
|
"
|
|
116
|
-
|
|
159
|
+
>
|
|
160
|
+
</es-radio-group>
|
|
117
161
|
<es-checkbox-group
|
|
118
|
-
v-else-if="
|
|
162
|
+
v-else-if="getType(scope.row.formConfigs, 'checkbox')"
|
|
119
163
|
v-bind="formOption"
|
|
120
164
|
v-model="scope.row[field || prop]"
|
|
165
|
+
:data="getData(scope.row.formOptions)"
|
|
121
166
|
@change="
|
|
122
167
|
(value) => {
|
|
123
168
|
handleChange({
|
|
@@ -128,11 +173,13 @@
|
|
|
128
173
|
});
|
|
129
174
|
}
|
|
130
175
|
"
|
|
131
|
-
|
|
176
|
+
>
|
|
177
|
+
</es-checkbox-group>
|
|
132
178
|
<es-switch
|
|
133
|
-
v-else-if="
|
|
179
|
+
v-else-if="getType(scope.row.formConfigs, 'switch')"
|
|
134
180
|
v-bind="formOption"
|
|
135
181
|
v-model="scope.row[field || prop]"
|
|
182
|
+
:data="getData(scope.row.formOptions)"
|
|
136
183
|
@change="
|
|
137
184
|
(value) => {
|
|
138
185
|
handleChange({
|
|
@@ -143,22 +190,25 @@
|
|
|
143
190
|
});
|
|
144
191
|
}
|
|
145
192
|
"
|
|
146
|
-
|
|
193
|
+
>
|
|
194
|
+
</es-switch>
|
|
147
195
|
<es-date-picker
|
|
148
196
|
v-else-if="
|
|
149
197
|
config.date ||
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
198
|
+
getType(scope.row.formConfigs, [
|
|
199
|
+
'date',
|
|
200
|
+
'year',
|
|
201
|
+
'month',
|
|
202
|
+
'date',
|
|
203
|
+
'dates',
|
|
204
|
+
'week',
|
|
205
|
+
'datetime',
|
|
206
|
+
'datetimerange',
|
|
207
|
+
'daterange',
|
|
208
|
+
'monthrange',
|
|
209
|
+
'quarter',
|
|
210
|
+
'halfyear'
|
|
211
|
+
])
|
|
162
212
|
"
|
|
163
213
|
v-bind="formOption"
|
|
164
214
|
v-model="scope.row[field || prop]"
|
|
@@ -194,9 +244,10 @@
|
|
|
194
244
|
});
|
|
195
245
|
}
|
|
196
246
|
"
|
|
197
|
-
|
|
247
|
+
>
|
|
248
|
+
</es-date-picker>
|
|
198
249
|
<es-input-number
|
|
199
|
-
v-else-if="
|
|
250
|
+
v-else-if="getType(scope.row.formConfigs, 'number')"
|
|
200
251
|
v-bind="formOption"
|
|
201
252
|
v-model="scope.row[field || prop]"
|
|
202
253
|
@blur="
|
|
@@ -230,9 +281,10 @@
|
|
|
230
281
|
});
|
|
231
282
|
}
|
|
232
283
|
"
|
|
233
|
-
|
|
284
|
+
>
|
|
285
|
+
</es-input-number>
|
|
234
286
|
<es-selector
|
|
235
|
-
v-else-if="
|
|
287
|
+
v-else-if="getType(scope.row.formConfigs, 'selector')"
|
|
236
288
|
v-bind="formOption"
|
|
237
289
|
v-model="scope.row[field || prop]"
|
|
238
290
|
v-on="
|
|
@@ -251,15 +303,16 @@
|
|
|
251
303
|
});
|
|
252
304
|
}
|
|
253
305
|
"
|
|
254
|
-
|
|
306
|
+
>
|
|
307
|
+
</es-selector>
|
|
255
308
|
<template
|
|
256
309
|
v-else-if="
|
|
257
|
-
|
|
310
|
+
getType(scope.row.formConfigs, ['text', 'input', 'textarea'])
|
|
258
311
|
"
|
|
259
312
|
>
|
|
260
313
|
<template v-if="config.lazy">
|
|
261
314
|
<input
|
|
262
|
-
v-if="
|
|
315
|
+
v-if="getType(scope.row.formConfigs, ['text', 'input'])"
|
|
263
316
|
class="el-input__inner"
|
|
264
317
|
v-bind="formOption"
|
|
265
318
|
v-model.lazy="scope.row[field]"
|
|
@@ -370,7 +423,8 @@
|
|
|
370
423
|
});
|
|
371
424
|
}
|
|
372
425
|
"
|
|
373
|
-
|
|
426
|
+
>
|
|
427
|
+
</es-input>
|
|
374
428
|
</template>
|
|
375
429
|
</el-form-item>
|
|
376
430
|
</template>
|
|
@@ -460,6 +514,7 @@ export default {
|
|
|
460
514
|
}
|
|
461
515
|
},
|
|
462
516
|
props: {
|
|
517
|
+
tag: String,
|
|
463
518
|
mode: String,
|
|
464
519
|
service: String,
|
|
465
520
|
form: Boolean,
|
|
@@ -584,8 +639,7 @@ export default {
|
|
|
584
639
|
: this.valueKey,
|
|
585
640
|
rules: this.rules,
|
|
586
641
|
events: this.events,
|
|
587
|
-
...this.$attrs
|
|
588
|
-
data: this.option
|
|
642
|
+
...this.$attrs
|
|
589
643
|
};
|
|
590
644
|
return config;
|
|
591
645
|
},
|
|
@@ -727,6 +781,18 @@ export default {
|
|
|
727
781
|
}
|
|
728
782
|
return data;
|
|
729
783
|
},
|
|
784
|
+
getType(config, types) {
|
|
785
|
+
let type =
|
|
786
|
+
config && config[this.field || this.prop]
|
|
787
|
+
? config[this.field || this.prop]
|
|
788
|
+
: this.type;
|
|
789
|
+
return Array.isArray(types) ? types.includes(type) : type == types;
|
|
790
|
+
},
|
|
791
|
+
getData(res) {
|
|
792
|
+
return res && res[this.field || this.prop]
|
|
793
|
+
? res[this.field || this.prop]
|
|
794
|
+
: this.option;
|
|
795
|
+
},
|
|
730
796
|
exclAttribute({ data, attrs }) {
|
|
731
797
|
return util.exclAttribute({ data, attrs });
|
|
732
798
|
},
|
|
@@ -826,10 +892,14 @@ export default {
|
|
|
826
892
|
this.$emit('formFocus', data);
|
|
827
893
|
this.$emit('form-focus', data);
|
|
828
894
|
},
|
|
829
|
-
handleChange(
|
|
830
|
-
let { item } =
|
|
831
|
-
if (
|
|
832
|
-
|
|
895
|
+
handleChange(datas) {
|
|
896
|
+
let { item, name, data } = datas;
|
|
897
|
+
if (
|
|
898
|
+
item &&
|
|
899
|
+
((data.formConfigs && data.formConfigs[name] == 'ganged') ||
|
|
900
|
+
this.type == 'ganged')
|
|
901
|
+
) {
|
|
902
|
+
let { index, value } = datas.value;
|
|
833
903
|
if (
|
|
834
904
|
(item.url || this.sysCode) &&
|
|
835
905
|
((item.ganged && index > item.ganged - 1) || value.hasSub)
|
|
@@ -890,9 +960,9 @@ export default {
|
|
|
890
960
|
}
|
|
891
961
|
}
|
|
892
962
|
}
|
|
893
|
-
this.events && this.events.change && this.events.change(
|
|
894
|
-
this.$emit('formChange',
|
|
895
|
-
this.$emit('form-change',
|
|
963
|
+
this.events && this.events.change && this.events.change(datas);
|
|
964
|
+
this.$emit('formChange', datas);
|
|
965
|
+
this.$emit('form-change', datas);
|
|
896
966
|
},
|
|
897
967
|
handleClick(data) {
|
|
898
968
|
this.$emit('handleClick', data);
|