leisure-core 0.4.6 → 0.4.8
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/index.js
CHANGED
|
@@ -41,6 +41,7 @@ import LeMpurl from "./le-mpurl/index.js";
|
|
|
41
41
|
import { LeHelp, LeHelpDetail } from "./le-help/index.js";
|
|
42
42
|
import LeDistribution from "./le-distribution/index.js";
|
|
43
43
|
import LeDistributionCategory from "./le-distribution-category/index.js";
|
|
44
|
+
import LeSelectUser from "./le-select-user/index.js";
|
|
44
45
|
|
|
45
46
|
const components = [
|
|
46
47
|
LeArea,
|
|
@@ -83,6 +84,7 @@ const components = [
|
|
|
83
84
|
LeHelpDetail,
|
|
84
85
|
LeDistribution,
|
|
85
86
|
LeDistributionCategory,
|
|
87
|
+
LeSelectUser,
|
|
86
88
|
];
|
|
87
89
|
|
|
88
90
|
const install = function (Vue) {
|
|
@@ -195,4 +197,5 @@ export default {
|
|
|
195
197
|
LeHelpDetail,
|
|
196
198
|
LeDistribution,
|
|
197
199
|
LeDistributionCategory,
|
|
200
|
+
LeSelectUser,
|
|
198
201
|
};
|
package/le-area/src/main.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-cascader
|
|
3
|
+
ref="elcascader"
|
|
3
4
|
v-model="value"
|
|
4
5
|
clearable
|
|
5
6
|
:props="props"
|
|
@@ -37,13 +38,6 @@ export default {
|
|
|
37
38
|
};
|
|
38
39
|
},
|
|
39
40
|
watch: {
|
|
40
|
-
initArea: {
|
|
41
|
-
handler(val) {
|
|
42
|
-
this.value = val;
|
|
43
|
-
},
|
|
44
|
-
deep: true,
|
|
45
|
-
immediate: true,
|
|
46
|
-
},
|
|
47
41
|
isAny: {
|
|
48
42
|
handler(val) {
|
|
49
43
|
this.props.checkStrictly = val;
|
|
@@ -51,7 +45,9 @@ export default {
|
|
|
51
45
|
immediate: true,
|
|
52
46
|
},
|
|
53
47
|
},
|
|
54
|
-
mounted() {
|
|
48
|
+
mounted() {
|
|
49
|
+
this.value = this.initArea;
|
|
50
|
+
},
|
|
55
51
|
methods: {
|
|
56
52
|
LoadData(node, resolve) {
|
|
57
53
|
let nodes = [];
|
|
@@ -67,7 +63,12 @@ export default {
|
|
|
67
63
|
});
|
|
68
64
|
},
|
|
69
65
|
handleChange(currentValue) {
|
|
70
|
-
|
|
66
|
+
let selectValue = {};
|
|
67
|
+
selectValue.code = currentValue;
|
|
68
|
+
if (!selectValue.code || selectValue.code.length <= 0) return;
|
|
69
|
+
let names = this.$refs["elcascader"].getCheckedNodes()[0].pathLabels;
|
|
70
|
+
selectValue.name = names.join("");
|
|
71
|
+
this.$emit("areaChange", selectValue);
|
|
71
72
|
},
|
|
72
73
|
},
|
|
73
74
|
};
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
:editType="editType"
|
|
98
98
|
:rowData="rowData"
|
|
99
99
|
@list="list"
|
|
100
|
+
:dtype="dtype"
|
|
100
101
|
v-if="showDetails"
|
|
101
102
|
>
|
|
102
103
|
<template v-slot:default="data">
|
|
@@ -114,6 +115,12 @@ import LePromotionsActivitiesSub from "./sub.vue";
|
|
|
114
115
|
export default {
|
|
115
116
|
name: "le-promotions-activities",
|
|
116
117
|
components: { LePromotionsActivitiesSub },
|
|
118
|
+
props: {
|
|
119
|
+
dtype: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: "date",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
117
124
|
data() {
|
|
118
125
|
return {
|
|
119
126
|
tableHeight: 200,
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<el-date-picker
|
|
26
26
|
value-format="timestamp"
|
|
27
27
|
v-model="form.date_start"
|
|
28
|
-
type="
|
|
28
|
+
:type="dtype"
|
|
29
29
|
placeholder="开始日期"
|
|
30
30
|
>
|
|
31
31
|
</el-date-picker>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<el-date-picker
|
|
35
35
|
value-format="timestamp"
|
|
36
36
|
v-model="form.date_end"
|
|
37
|
-
type="
|
|
37
|
+
:type="dtype"
|
|
38
38
|
placeholder="结束日期"
|
|
39
39
|
>
|
|
40
40
|
</el-date-picker>
|
|
@@ -71,6 +71,10 @@ export default {
|
|
|
71
71
|
type: Object,
|
|
72
72
|
default: () => {},
|
|
73
73
|
},
|
|
74
|
+
dtype: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "date",
|
|
77
|
+
},
|
|
74
78
|
},
|
|
75
79
|
data() {
|
|
76
80
|
return {
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-select
|
|
3
|
+
v-model="value"
|
|
4
|
+
multiple
|
|
5
|
+
:multiple-limit="limitNum"
|
|
6
|
+
filterable
|
|
7
|
+
remote
|
|
8
|
+
reserve-keyword
|
|
9
|
+
placeholder="请输入用户关键字"
|
|
10
|
+
:remote-method="getUserBackByComment"
|
|
11
|
+
:loading="loading"
|
|
12
|
+
@change="onChange"
|
|
13
|
+
>
|
|
14
|
+
<el-option
|
|
15
|
+
v-for="item in userList"
|
|
16
|
+
:key="item.id"
|
|
17
|
+
:label="item.account + '-' + (item.nick ? item.nick : '')"
|
|
18
|
+
:value="item.id"
|
|
19
|
+
>
|
|
20
|
+
</el-option>
|
|
21
|
+
</el-select>
|
|
22
|
+
</template>
|
|
23
|
+
<script>
|
|
24
|
+
import { listBack } from "@/api/user.js";
|
|
25
|
+
export default {
|
|
26
|
+
name: "le-select-user",
|
|
27
|
+
props: {
|
|
28
|
+
limitNum: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 999,
|
|
31
|
+
},
|
|
32
|
+
initUserIds: {
|
|
33
|
+
type: Array,
|
|
34
|
+
default: () => {
|
|
35
|
+
return [];
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
value: [],
|
|
42
|
+
userList: [],
|
|
43
|
+
loading: false,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
watch: {},
|
|
47
|
+
mounted() {
|
|
48
|
+
this.value = this.initUserIds;
|
|
49
|
+
if (this.value.length > 0) {
|
|
50
|
+
this.getUserBackByUid();
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
getUserBackByComment(comment) {
|
|
55
|
+
let param = {};
|
|
56
|
+
param.comment = comment;
|
|
57
|
+
this.getUserBack(param);
|
|
58
|
+
},
|
|
59
|
+
getUserBackByUid() {
|
|
60
|
+
let param = {};
|
|
61
|
+
param.id = this.value[0];
|
|
62
|
+
this.getUserBack(param);
|
|
63
|
+
},
|
|
64
|
+
getUserBack(param) {
|
|
65
|
+
this.userList = [];
|
|
66
|
+
if (param) {
|
|
67
|
+
this.loading = true;
|
|
68
|
+
listBack(param)
|
|
69
|
+
.then((res) => {
|
|
70
|
+
let data = res.data.data;
|
|
71
|
+
if (data) {
|
|
72
|
+
this.userList = data;
|
|
73
|
+
}
|
|
74
|
+
this.loading = false;
|
|
75
|
+
})
|
|
76
|
+
.catch((err) => {
|
|
77
|
+
console.log(err);
|
|
78
|
+
this.loading = false;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
onChange(value) {
|
|
83
|
+
this.$emit("onChange", value);
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
</script>
|