xs-common-plugins 1.3.4 → 1.3.6
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/package.json
CHANGED
|
@@ -63,10 +63,11 @@ export default {
|
|
|
63
63
|
|
|
64
64
|
//报表名称按钮点击
|
|
65
65
|
clickReportBtn(url, param) {
|
|
66
|
+
if(param.id == undefined) return
|
|
66
67
|
const that = this;
|
|
67
68
|
this.$http.get(url, param).then(res => {
|
|
68
|
-
this.reportList = res.data;
|
|
69
69
|
if (res.data.length > 0) {
|
|
70
|
+
this.reportList = res.data;
|
|
70
71
|
that.handlerSelReport(res.data[0])
|
|
71
72
|
that.toSearch();
|
|
72
73
|
}
|
|
@@ -14,17 +14,28 @@
|
|
|
14
14
|
<!-- 3. remote 是否为远程搜索 -->
|
|
15
15
|
<!-- 4. remote-method 远程搜索方法 -->
|
|
16
16
|
<el-select v-if="option.dataSourceType == 0" v-model="inputValue" :placeholder="option.defaultValue" clearable
|
|
17
|
-
|
|
17
|
+
:filterable="
|
|
18
18
|
option.fifilterable === undefined ? true : option.fifilterable
|
|
19
19
|
" remote :remote-method="remoteMethod" :loading="loading" @focus="handleFocus">
|
|
20
20
|
<el-option v-for="(item, index) in selectData" :key="index" :label="item"
|
|
21
|
-
|
|
21
|
+
:value="option && option.props && option.props.value=='label'?item:index">{{ item }}</el-option>
|
|
22
22
|
</el-select>
|
|
23
23
|
|
|
24
|
+
|
|
25
|
+
<el-select v-if="option.dataSourceType == 5" v-model="inputValue" :placeholder="option.defaultValue" clearable
|
|
26
|
+
:filterable="option.fifilterable === undefined ? true : option.fifilterable" remote :loading="loading" @focus="handleFocus">
|
|
27
|
+
<el-option v-for="(item, index) in selectData" :key="index" :label="item"
|
|
28
|
+
:value="option && option.props && option.props.value=='label'?item:index">{{ item }}</el-option>
|
|
29
|
+
</el-select>
|
|
30
|
+
|
|
31
|
+
|
|
24
32
|
<!-- 通过 Api 获取下拉框内容, 内容格式: [{value:xxx,label:xxx}] -->
|
|
25
33
|
<el-select v-else-if="option.dataSourceType == 10" v-model="inputValue" :placeholder="option.defaultValue" clearable
|
|
26
|
-
|
|
27
|
-
<el-option v-for="(item, index) in selectData"
|
|
34
|
+
filterable remote default-first-option :remote-method="remoteMethod" @focus="handleFocus">
|
|
35
|
+
<el-option v-for="(item, index) in selectData"
|
|
36
|
+
:key="index"
|
|
37
|
+
:label="option.label ? item[option.label] : item.label"
|
|
38
|
+
:value="option.value ? item[option.value] : item.value"></el-option>
|
|
28
39
|
</el-select>
|
|
29
40
|
|
|
30
41
|
<!-- 通过配置项获取下拉框内容 -->
|
|
@@ -35,16 +46,16 @@
|
|
|
35
46
|
|
|
36
47
|
<!--通过枚举获取下拉框内容,仅支持单选-->
|
|
37
48
|
<el-select v-else-if="option.dataSourceType == 2" v-model="inputValue" :placeholder="option.defaultValue"
|
|
38
|
-
|
|
49
|
+
value-key="Name" @clear="clearOption" clearable>
|
|
39
50
|
<!-- clearable -->
|
|
40
51
|
<el-option v-for="item in enumList" :key="item.Id" :label="item.Text"
|
|
41
|
-
|
|
52
|
+
:value="option.valueKey?item[option.valueKey]:item.Id">{{ item.Text }}
|
|
42
53
|
</el-option>
|
|
43
54
|
</el-select>
|
|
44
55
|
|
|
45
56
|
<!-- 通过枚举获取下拉框内容,支持多选 -->
|
|
46
57
|
<el-select v-else-if="option.dataSourceType == 4" v-model="tempArray" :placeholder="option.defaultValue" multiple
|
|
47
|
-
|
|
58
|
+
:multiple-limit="option.multiplelimit" value-key="Name" collapse-tags>
|
|
48
59
|
<el-option v-for="item in enumList" :key="item.Id" :label="item.Text" :value="item.Id">{{ item.Text }}</el-option>
|
|
49
60
|
</el-select>
|
|
50
61
|
</div>
|
|
@@ -52,63 +63,63 @@
|
|
|
52
63
|
|
|
53
64
|
<script>
|
|
54
65
|
import methods from "./methods";
|
|
55
|
-
import {
|
|
66
|
+
import {MIX_VMODEL} from "@/mixin/vmodel";
|
|
56
67
|
|
|
57
68
|
export default {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
$$route: {
|
|
70
|
+
meta: {
|
|
71
|
+
title: "标题名称",
|
|
72
|
+
icon: "菜单图标",
|
|
73
|
+
hidden: true,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
props: {
|
|
77
|
+
option: Object,
|
|
78
|
+
value: {
|
|
79
|
+
type: [Number, String, Array, Object],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
data() {
|
|
83
|
+
return {
|
|
84
|
+
selectData: [],
|
|
85
|
+
loading: false,
|
|
86
|
+
tempArray: [],
|
|
87
|
+
};
|
|
63
88
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
89
|
+
methods,
|
|
90
|
+
mixins: [MIX_VMODEL],
|
|
91
|
+
components: {},
|
|
92
|
+
watch: {
|
|
93
|
+
value: {
|
|
94
|
+
handler(newVal) {
|
|
95
|
+
this.tempArray = newVal;
|
|
96
|
+
},
|
|
97
|
+
immediate: true,
|
|
98
|
+
deep: true,
|
|
99
|
+
},
|
|
100
|
+
tempArray: {
|
|
101
|
+
handler(nVal) {
|
|
102
|
+
this.inputValue = nVal;
|
|
103
|
+
},
|
|
104
|
+
deep: true,
|
|
105
|
+
},
|
|
69
106
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
};
|
|
77
|
-
},
|
|
78
|
-
methods,
|
|
79
|
-
mixins: [MIX_VMODEL],
|
|
80
|
-
components: {},
|
|
81
|
-
watch: {
|
|
82
|
-
value: {
|
|
83
|
-
handler(newVal) {
|
|
84
|
-
this.tempArray = newVal;
|
|
85
|
-
},
|
|
86
|
-
immediate: true,
|
|
87
|
-
deep: true,
|
|
107
|
+
computed: {
|
|
108
|
+
enumList() {
|
|
109
|
+
if (this.option.dataSourceType == 4 || this.option.dataSourceType == 2) {
|
|
110
|
+
return this.$orgEnum[this.option.url].slice(0, -1);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
88
113
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
114
|
+
// ------------------------------------------------------------------
|
|
115
|
+
// pragma mark - Life Cycle(生命周期)
|
|
116
|
+
// ------------------------------------------------------------------
|
|
117
|
+
created() {
|
|
118
|
+
this.createdInit();
|
|
94
119
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
enumList() {
|
|
98
|
-
if (this.option.dataSourceType == 4 || this.option.dataSourceType == 2) {
|
|
99
|
-
return this.$orgEnum[this.option.url].slice(0, -1);
|
|
100
|
-
}
|
|
120
|
+
mounted() {
|
|
121
|
+
this.mountedInit();
|
|
101
122
|
},
|
|
102
|
-
},
|
|
103
|
-
// ------------------------------------------------------------------
|
|
104
|
-
// pragma mark - Life Cycle(生命周期)
|
|
105
|
-
// ------------------------------------------------------------------
|
|
106
|
-
created() {
|
|
107
|
-
this.createdInit();
|
|
108
|
-
},
|
|
109
|
-
mounted() {
|
|
110
|
-
this.mountedInit();
|
|
111
|
-
},
|
|
112
123
|
};
|
|
113
124
|
</script>
|
|
114
125
|
<style lang="scss" src="./index.scss" scoped></style>
|