leisure-core 0.4.65 → 0.4.67
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 +57 -9
- package/le-common-page/src/sub.vue +55 -48
- package/le-mpurl/src/main.vue +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<le-button type="primary" @click="addItem()" v-if="isDispAddBtn"
|
|
9
9
|
>新建</le-button
|
|
10
10
|
>
|
|
11
|
+
<slot name="headerBtns"></slot>
|
|
11
12
|
</el-form-item>
|
|
12
13
|
</el-form>
|
|
13
14
|
<el-table
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
>
|
|
24
25
|
<el-table-column
|
|
25
26
|
v-for="column in tableColumns"
|
|
27
|
+
show-overflow-tooltip
|
|
26
28
|
:key="column.prop"
|
|
27
29
|
:prop="column.prop"
|
|
28
30
|
:label="column.label"
|
|
@@ -53,15 +55,29 @@
|
|
|
53
55
|
</span>
|
|
54
56
|
</template>
|
|
55
57
|
</el-table-column>
|
|
56
|
-
<el-table-column
|
|
58
|
+
<el-table-column
|
|
59
|
+
fixed="right"
|
|
60
|
+
label="操作"
|
|
61
|
+
:width="opWidht"
|
|
62
|
+
align="center"
|
|
63
|
+
>
|
|
57
64
|
<template slot-scope="scope">
|
|
58
65
|
<div class="rowBtns">
|
|
59
66
|
<el-button
|
|
67
|
+
v-if="disBtn === 'edit'"
|
|
60
68
|
type="primary"
|
|
61
69
|
size="small"
|
|
62
70
|
@click="editItem(scope.row)"
|
|
63
|
-
>{{ editMode === "edit" ? "编辑" : "详情" }}</el-button
|
|
64
71
|
>
|
|
72
|
+
编辑
|
|
73
|
+
</el-button>
|
|
74
|
+
<el-button
|
|
75
|
+
v-if="disBtn === 'detail'"
|
|
76
|
+
type="primary"
|
|
77
|
+
size="small"
|
|
78
|
+
@click="detail(scope.row)"
|
|
79
|
+
>详情
|
|
80
|
+
</el-button>
|
|
65
81
|
<el-popconfirm
|
|
66
82
|
v-if="isDispDelBtn"
|
|
67
83
|
:title="`该操作不可逆,确定删除?`"
|
|
@@ -74,7 +90,7 @@
|
|
|
74
90
|
</template>
|
|
75
91
|
</el-popconfirm>
|
|
76
92
|
<div class="rowBtnsExt">
|
|
77
|
-
<slot name="rowBtns"></slot>
|
|
93
|
+
<slot name="rowBtns" :scope="scope"></slot>
|
|
78
94
|
</div>
|
|
79
95
|
</div>
|
|
80
96
|
</template>
|
|
@@ -102,11 +118,13 @@
|
|
|
102
118
|
:formColumns="formColumns"
|
|
103
119
|
:field-options="fieldOptions"
|
|
104
120
|
:formData="rowItem"
|
|
105
|
-
:
|
|
121
|
+
:isEditMode="isEditMode"
|
|
106
122
|
@closeDialog="closeDialog"
|
|
107
123
|
@saveData="saveData"
|
|
108
|
-
v-if="showDialog"
|
|
109
|
-
|
|
124
|
+
v-if="showDialog && isUserInnerSub"
|
|
125
|
+
>
|
|
126
|
+
</le-common-page-sub>
|
|
127
|
+
<slot name="sub" v-if="showDialog && !isUserInnerSub"></slot>
|
|
110
128
|
</le-dialog-container>
|
|
111
129
|
</div>
|
|
112
130
|
</template>
|
|
@@ -127,6 +145,10 @@ export default {
|
|
|
127
145
|
type: Array,
|
|
128
146
|
default: () => [],
|
|
129
147
|
},
|
|
148
|
+
opWidht: {
|
|
149
|
+
type: String,
|
|
150
|
+
default: "130px",
|
|
151
|
+
},
|
|
130
152
|
totalData: {
|
|
131
153
|
type: Number,
|
|
132
154
|
default: 1,
|
|
@@ -135,6 +157,10 @@ export default {
|
|
|
135
157
|
type: Array,
|
|
136
158
|
default: () => [],
|
|
137
159
|
},
|
|
160
|
+
isUserInnerSub: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
default: true,
|
|
163
|
+
},
|
|
138
164
|
formColumns: {
|
|
139
165
|
type: Array,
|
|
140
166
|
default: () => [],
|
|
@@ -179,7 +205,7 @@ export default {
|
|
|
179
205
|
type: Object,
|
|
180
206
|
default: () => {},
|
|
181
207
|
},
|
|
182
|
-
|
|
208
|
+
disBtn: {
|
|
183
209
|
type: String,
|
|
184
210
|
default: "edit",
|
|
185
211
|
},
|
|
@@ -207,6 +233,7 @@ export default {
|
|
|
207
233
|
pageSize: 10,
|
|
208
234
|
},
|
|
209
235
|
showDialog: false,
|
|
236
|
+
isEditMode: true,
|
|
210
237
|
};
|
|
211
238
|
},
|
|
212
239
|
computed: {},
|
|
@@ -238,10 +265,30 @@ export default {
|
|
|
238
265
|
});
|
|
239
266
|
},
|
|
240
267
|
editItem(row) {
|
|
241
|
-
this.
|
|
268
|
+
this.isEditMode = true;
|
|
269
|
+
if (this.$listeners["handleData"]) {
|
|
270
|
+
this.$emit("handleData", row, (res) => {
|
|
271
|
+
this.rowItem = res;
|
|
272
|
+
});
|
|
273
|
+
} else {
|
|
274
|
+
this.rowItem = row;
|
|
275
|
+
}
|
|
242
276
|
this.showDialog = true;
|
|
243
277
|
},
|
|
278
|
+
detail(row) {
|
|
279
|
+
this.isEditMode = false;
|
|
280
|
+
if (this.$listeners["handleData"]) {
|
|
281
|
+
this.$emit("handleData", row, (res) => {
|
|
282
|
+
this.rowItem = res;
|
|
283
|
+
this.showDialog = true;
|
|
284
|
+
});
|
|
285
|
+
} else {
|
|
286
|
+
this.rowItem = row;
|
|
287
|
+
this.showDialog = true;
|
|
288
|
+
}
|
|
289
|
+
},
|
|
244
290
|
addItem() {
|
|
291
|
+
this.isEditMode = true;
|
|
245
292
|
this.initFormItem();
|
|
246
293
|
this.showDialog = true;
|
|
247
294
|
},
|
|
@@ -261,10 +308,11 @@ export default {
|
|
|
261
308
|
.rowBtns {
|
|
262
309
|
display: flex;
|
|
263
310
|
display: -webkit-flex;
|
|
311
|
+
flex-direction: row;
|
|
264
312
|
justify-content: center;
|
|
265
313
|
}
|
|
266
314
|
|
|
267
315
|
.rowBtnsExt {
|
|
268
|
-
margin-left:
|
|
316
|
+
margin-left: 3px;
|
|
269
317
|
}
|
|
270
318
|
</style>
|
|
@@ -11,54 +11,56 @@
|
|
|
11
11
|
:label="item.label"
|
|
12
12
|
:prop="item.prop"
|
|
13
13
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<el-radio
|
|
32
|
-
v-for="(option, index) in item.options"
|
|
33
|
-
:label="option.id"
|
|
34
|
-
:key="index + '_radio'"
|
|
35
|
-
>{{ option.label }}</el-radio
|
|
14
|
+
<div class="comContainerClass">
|
|
15
|
+
<le-input
|
|
16
|
+
v-if="!item.type || item.type === 'input'"
|
|
17
|
+
v-model="formPop[item.prop]"
|
|
18
|
+
v-bind="item.attr || {}"
|
|
19
|
+
/>
|
|
20
|
+
<le-input-number
|
|
21
|
+
v-else-if="item.type === 'number'"
|
|
22
|
+
v-model="formPop[item.prop]"
|
|
23
|
+
v-bind="item.attr || {}"
|
|
24
|
+
:min="item.min || 0"
|
|
25
|
+
:max="item.max || 9999999999"
|
|
26
|
+
label="item.label||''"
|
|
27
|
+
/>
|
|
28
|
+
<el-radio-group
|
|
29
|
+
v-else-if="item.type === 'radio'"
|
|
30
|
+
v-model="formPop[item.prop]"
|
|
36
31
|
>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
>
|
|
52
|
-
<le-option
|
|
53
|
-
:options="fieldOptions[item.prop]"
|
|
54
|
-
:label="item.kv.label"
|
|
55
|
-
:value="item.kv.key"
|
|
56
|
-
:keyNum="item.keyNum"
|
|
32
|
+
<el-radio
|
|
33
|
+
v-for="(option, index) in item.options"
|
|
34
|
+
:label="option.id"
|
|
35
|
+
:key="index + '_radio'"
|
|
36
|
+
>{{ option.label }}</el-radio
|
|
37
|
+
>
|
|
38
|
+
</el-radio-group>
|
|
39
|
+
<el-date-picker
|
|
40
|
+
v-else-if="item.type === 'date'"
|
|
41
|
+
v-model="formPop[item.prop]"
|
|
42
|
+
v-bind="item.attr || {}"
|
|
43
|
+
value-format="timestamp"
|
|
44
|
+
type="date"
|
|
45
|
+
placeholder="选择日期"
|
|
57
46
|
/>
|
|
58
|
-
|
|
47
|
+
<le-select
|
|
48
|
+
v-else-if="item.type === 'select'"
|
|
49
|
+
v-model="formPop[item.prop]"
|
|
50
|
+
v-bind="item.attr || {}"
|
|
51
|
+
placeholder="请选择"
|
|
52
|
+
>
|
|
53
|
+
<le-option
|
|
54
|
+
:options="fieldOptions[item.prop]"
|
|
55
|
+
:label="item.kv.label"
|
|
56
|
+
:value="item.kv.key"
|
|
57
|
+
:keyNum="item.keyNum"
|
|
58
|
+
/>
|
|
59
|
+
</le-select>
|
|
60
|
+
</div>
|
|
59
61
|
</el-form-item>
|
|
60
62
|
<el-form-item v-rfooter>
|
|
61
|
-
<le-button type="primary" @click="saveData" v-if="
|
|
63
|
+
<le-button type="primary" @click="saveData" v-if="isEditMode"
|
|
62
64
|
>保存</le-button
|
|
63
65
|
>
|
|
64
66
|
<le-button type="info" @click="close()">关闭</le-button>
|
|
@@ -94,9 +96,9 @@ export default {
|
|
|
94
96
|
type: Object,
|
|
95
97
|
default: () => {},
|
|
96
98
|
},
|
|
97
|
-
|
|
98
|
-
type:
|
|
99
|
-
default:
|
|
99
|
+
isEditMode: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: true,
|
|
100
102
|
},
|
|
101
103
|
},
|
|
102
104
|
watch: {
|
|
@@ -139,4 +141,9 @@ export default {
|
|
|
139
141
|
},
|
|
140
142
|
};
|
|
141
143
|
</script>
|
|
142
|
-
<style lang="
|
|
144
|
+
<style lang="scss" scoped>
|
|
145
|
+
.comContainerClass {
|
|
146
|
+
display: flex;
|
|
147
|
+
display: -webkit-flex;
|
|
148
|
+
}
|
|
149
|
+
</style>
|
package/le-mpurl/src/main.vue
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<el-table-column prop="mp_param" label="参数" width="50"> </el-table-column>
|
|
16
16
|
<el-table-column prop="wx_url" label="微信url" width="100">
|
|
17
17
|
</el-table-column>
|
|
18
|
-
<el-table-column prop="url_jump" label="推广链接" width="200">
|
|
18
|
+
<el-table-column prop="url_jump" label="推广链接(仅系统使用)" width="200">
|
|
19
19
|
</el-table-column>
|
|
20
20
|
<!-- <el-table-column prop="url_wx" label="小程序url地址"> </el-table-column> -->
|
|
21
21
|
<el-table-column prop="cdate" label="时间" width="150">
|