leisure-core 0.4.47 → 0.4.49
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/le-common-page/src/main.vue +13 -4
- package/package.json +1 -1
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
</el-form-item>
|
|
12
12
|
</el-form>
|
|
13
13
|
<el-table
|
|
14
|
+
ref="eltablemain"
|
|
15
|
+
:max-height="elTableMaxHeight"
|
|
14
16
|
:data="tableData"
|
|
15
17
|
border
|
|
16
18
|
row-key="id"
|
|
@@ -123,9 +125,10 @@
|
|
|
123
125
|
</template>
|
|
124
126
|
<script>
|
|
125
127
|
import { Number } from "core-js";
|
|
126
|
-
|
|
128
|
+
import leMixins from "../../le-libs/mixins/main";
|
|
127
129
|
export default {
|
|
128
130
|
name: "le-common-page",
|
|
131
|
+
mixins: [leMixins],
|
|
129
132
|
props: {
|
|
130
133
|
tableData: {
|
|
131
134
|
type: Array,
|
|
@@ -201,7 +204,6 @@ export default {
|
|
|
201
204
|
data() {
|
|
202
205
|
return {
|
|
203
206
|
formPop: {},
|
|
204
|
-
|
|
205
207
|
searchData: {
|
|
206
208
|
pageNo: 1,
|
|
207
209
|
total: 1,
|
|
@@ -215,6 +217,12 @@ export default {
|
|
|
215
217
|
this.getList();
|
|
216
218
|
},
|
|
217
219
|
methods: {
|
|
220
|
+
initFormItem() {
|
|
221
|
+
this.formPop = this.formColumns.reduce((acc, item) => {
|
|
222
|
+
acc[item.prop] = item.default;
|
|
223
|
+
return acc;
|
|
224
|
+
}, {});
|
|
225
|
+
},
|
|
218
226
|
onClickQuery() {
|
|
219
227
|
this.searchData.pageNo = 1;
|
|
220
228
|
this.getList();
|
|
@@ -237,7 +245,7 @@ export default {
|
|
|
237
245
|
this.showDialog = true;
|
|
238
246
|
},
|
|
239
247
|
addItem() {
|
|
240
|
-
this.
|
|
248
|
+
this.initFormItem();
|
|
241
249
|
this.showDialog = true;
|
|
242
250
|
},
|
|
243
251
|
saveData() {
|
|
@@ -247,6 +255,7 @@ export default {
|
|
|
247
255
|
if (valid) {
|
|
248
256
|
this.$emit("saveForm", this.formPop, () => {
|
|
249
257
|
this.getList();
|
|
258
|
+
this.closeDialog();
|
|
250
259
|
});
|
|
251
260
|
} else {
|
|
252
261
|
return false;
|
|
@@ -254,7 +263,7 @@ export default {
|
|
|
254
263
|
});
|
|
255
264
|
},
|
|
256
265
|
closeDialog() {
|
|
257
|
-
this.
|
|
266
|
+
this.initFormItem();
|
|
258
267
|
this.showDialog = false;
|
|
259
268
|
},
|
|
260
269
|
getOptions(prop) {
|