@fmdeui/fmui 1.0.136 → 1.0.138

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.
@@ -42,6 +42,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  let checkedUsersList = ref([]);
43
43
  const state = reactive({
44
44
  total: 0,
45
+ pdata: null,
45
46
  queryParams: {
46
47
  orgId: -1,
47
48
  page: 1,
@@ -75,11 +76,19 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
75
76
  }
76
77
  function handleSelectUser(row) {
77
78
  if (!row || row.id == "") return;
78
- emits("change", { id: row.id, name: row.supplierName, supplierType: row.supplierType, data: row });
79
+ if (row.pid == 0) state.pdata = null;
80
+ emits("change", { id: row.id, name: row.supplierName, supplierType: row.supplierType, pdata: state.pdata, data: row });
79
81
  }
80
82
  const handledbclick = (row) => {
81
83
  handleSelectUser(row);
82
84
  };
85
+ const loadSub = async (row, treeNode, resolve) => {
86
+ var _a, _b, _c;
87
+ state.pdata = row;
88
+ let res = await useBaseApi(props.userService).post({ ...state.queryParams, ...props.userParams, pid: row.id }, props.userAction);
89
+ row.children = (_b = (_a = res.data.result) == null ? void 0 : _a.items) != null ? _b : [];
90
+ resolve((_c = row.children) != null ? _c : []);
91
+ };
83
92
  const handleSizeChange = (val) => {
84
93
  state.queryParams.pageSize = val;
85
94
  handleQuery();
@@ -100,8 +109,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
100
109
  const _component_el_button = resolveComponent("el-button");
101
110
  const _component_el_button_group = resolveComponent("el-button-group");
102
111
  const _component_el_form = resolveComponent("el-form");
103
- const _component_ele_Plus = resolveComponent("ele-Plus");
104
112
  const _component_el_table_column = resolveComponent("el-table-column");
113
+ const _component_ele_Plus = resolveComponent("ele-Plus");
105
114
  const _component_el_table = resolveComponent("el-table");
106
115
  const _component_el_pagination = resolveComponent("el-pagination");
107
116
  const _component_el_card = resolveComponent("el-card");
@@ -238,36 +247,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
238
247
  ref: "refTable",
239
248
  data: userList.value,
240
249
  style: { "height": "calc(70vh - 96px)" },
250
+ "row-key": "id",
251
+ lazy: "",
252
+ load: loadSub,
253
+ "tree-props": { children: "children", hasChildren: "hasChildren" },
241
254
  onRowDblclick: handledbclick
242
255
  }, {
243
256
  default: withCtx(() => [
244
- createVNode(_component_el_table_column, {
245
- label: "\u64CD\u4F5C",
246
- width: "60",
247
- align: "center"
248
- }, {
249
- default: withCtx((scope) => [
250
- createVNode(_component_el_button, {
251
- link: "",
252
- type: "primary",
253
- onClick: ($event) => handleSelectUser(scope.row)
254
- }, {
255
- default: withCtx(() => [
256
- createVNode(_component_el_icon, null, {
257
- default: withCtx(() => [
258
- createVNode(_component_ele_Plus)
259
- ]),
260
- _: 1
261
- /* STABLE */
262
- })
263
- ]),
264
- _: 1
265
- /* STABLE */
266
- }, 8, ["onClick"])
267
- ]),
268
- _: 1
269
- /* STABLE */
270
- }),
271
257
  createVNode(_component_el_table_column, {
272
258
  label: _ctx.$t("\u540D\u79F0"),
273
259
  prop: "supplierName",
@@ -330,7 +316,34 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
330
316
  }),
331
317
  _: 1
332
318
  /* STABLE */
333
- }, 8, ["label"])
319
+ }, 8, ["label"]),
320
+ createVNode(_component_el_table_column, {
321
+ label: "\u64CD\u4F5C",
322
+ width: "60",
323
+ align: "center"
324
+ }, {
325
+ default: withCtx((scope) => [
326
+ createVNode(_component_el_button, {
327
+ link: "",
328
+ type: "primary",
329
+ onClick: ($event) => handleSelectUser(scope.row)
330
+ }, {
331
+ default: withCtx(() => [
332
+ createVNode(_component_el_icon, null, {
333
+ default: withCtx(() => [
334
+ createVNode(_component_ele_Plus)
335
+ ]),
336
+ _: 1
337
+ /* STABLE */
338
+ })
339
+ ]),
340
+ _: 1
341
+ /* STABLE */
342
+ }, 8, ["onClick"])
343
+ ]),
344
+ _: 1
345
+ /* STABLE */
346
+ })
334
347
  ]),
335
348
  _: 1
336
349
  /* STABLE */
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fmdeui-fmui v1.0.136 */
1
+ /*! fmdeui-fmui v1.0.138 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('vue-router'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', 'vue-router', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
@@ -27933,6 +27933,7 @@
27933
27933
  let checkedUsersList = vue.ref([]);
27934
27934
  const state = vue.reactive({
27935
27935
  total: 0,
27936
+ pdata: null,
27936
27937
  queryParams: {
27937
27938
  orgId: -1,
27938
27939
  page: 1,
@@ -27966,11 +27967,19 @@
27966
27967
  }
27967
27968
  function handleSelectUser(row) {
27968
27969
  if (!row || row.id == "") return;
27969
- emits("change", { id: row.id, name: row.supplierName, supplierType: row.supplierType, data: row });
27970
+ if (row.pid == 0) state.pdata = null;
27971
+ emits("change", { id: row.id, name: row.supplierName, supplierType: row.supplierType, pdata: state.pdata, data: row });
27970
27972
  }
27971
27973
  const handledbclick = (row) => {
27972
27974
  handleSelectUser(row);
27973
27975
  };
27976
+ const loadSub = async (row, treeNode, resolve) => {
27977
+ var _a, _b, _c;
27978
+ state.pdata = row;
27979
+ let res = await useBaseApi(props.userService).post({ ...state.queryParams, ...props.userParams, pid: row.id }, props.userAction);
27980
+ row.children = (_b = (_a = res.data.result) == null ? void 0 : _a.items) != null ? _b : [];
27981
+ resolve((_c = row.children) != null ? _c : []);
27982
+ };
27974
27983
  const handleSizeChange = (val) => {
27975
27984
  state.queryParams.pageSize = val;
27976
27985
  handleQuery();
@@ -27991,8 +28000,8 @@
27991
28000
  const _component_el_button = vue.resolveComponent("el-button");
27992
28001
  const _component_el_button_group = vue.resolveComponent("el-button-group");
27993
28002
  const _component_el_form = vue.resolveComponent("el-form");
27994
- const _component_ele_Plus = vue.resolveComponent("ele-Plus");
27995
28003
  const _component_el_table_column = vue.resolveComponent("el-table-column");
28004
+ const _component_ele_Plus = vue.resolveComponent("ele-Plus");
27996
28005
  const _component_el_table = vue.resolveComponent("el-table");
27997
28006
  const _component_el_pagination = vue.resolveComponent("el-pagination");
27998
28007
  const _component_el_card = vue.resolveComponent("el-card");
@@ -28129,36 +28138,13 @@
28129
28138
  ref: "refTable",
28130
28139
  data: userList.value,
28131
28140
  style: { "height": "calc(70vh - 96px)" },
28141
+ "row-key": "id",
28142
+ lazy: "",
28143
+ load: loadSub,
28144
+ "tree-props": { children: "children", hasChildren: "hasChildren" },
28132
28145
  onRowDblclick: handledbclick
28133
28146
  }, {
28134
28147
  default: vue.withCtx(() => [
28135
- vue.createVNode(_component_el_table_column, {
28136
- label: "\u64CD\u4F5C",
28137
- width: "60",
28138
- align: "center"
28139
- }, {
28140
- default: vue.withCtx((scope) => [
28141
- vue.createVNode(_component_el_button, {
28142
- link: "",
28143
- type: "primary",
28144
- onClick: ($event) => handleSelectUser(scope.row)
28145
- }, {
28146
- default: vue.withCtx(() => [
28147
- vue.createVNode(_component_el_icon, null, {
28148
- default: vue.withCtx(() => [
28149
- vue.createVNode(_component_ele_Plus)
28150
- ]),
28151
- _: 1
28152
- /* STABLE */
28153
- })
28154
- ]),
28155
- _: 1
28156
- /* STABLE */
28157
- }, 8, ["onClick"])
28158
- ]),
28159
- _: 1
28160
- /* STABLE */
28161
- }),
28162
28148
  vue.createVNode(_component_el_table_column, {
28163
28149
  label: _ctx.$t("\u540D\u79F0"),
28164
28150
  prop: "supplierName",
@@ -28221,7 +28207,34 @@
28221
28207
  }),
28222
28208
  _: 1
28223
28209
  /* STABLE */
28224
- }, 8, ["label"])
28210
+ }, 8, ["label"]),
28211
+ vue.createVNode(_component_el_table_column, {
28212
+ label: "\u64CD\u4F5C",
28213
+ width: "60",
28214
+ align: "center"
28215
+ }, {
28216
+ default: vue.withCtx((scope) => [
28217
+ vue.createVNode(_component_el_button, {
28218
+ link: "",
28219
+ type: "primary",
28220
+ onClick: ($event) => handleSelectUser(scope.row)
28221
+ }, {
28222
+ default: vue.withCtx(() => [
28223
+ vue.createVNode(_component_el_icon, null, {
28224
+ default: vue.withCtx(() => [
28225
+ vue.createVNode(_component_ele_Plus)
28226
+ ]),
28227
+ _: 1
28228
+ /* STABLE */
28229
+ })
28230
+ ]),
28231
+ _: 1
28232
+ /* STABLE */
28233
+ }, 8, ["onClick"])
28234
+ ]),
28235
+ _: 1
28236
+ /* STABLE */
28237
+ })
28225
28238
  ]),
28226
28239
  _: 1
28227
28240
  /* STABLE */