n20-common-lib 1.3.2 → 1.3.5
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/g6.js +197 -0
- package/package.json +3 -2
- package/src/components/ECharts/mixins/resize.js +1 -1
- package/src/components/FileImport/index.vue +1 -1
- package/src/components/LoginTemporary/index.vue +3 -3
- package/src/components/NstcG6Components/Form/DatepickerCustom/index.vue +32 -32
- package/src/components/NstcG6Components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +37 -33
- package/src/components/NstcG6Components/NstcCharts/mixins/resize.js +1 -1
- package/src/components/NstcG6Components/NstcDropdownTree/NstcDropdownTree.vue +141 -137
- package/src/components/NstcG6Components/NstcExcelExport/NstcExcelExport.vue +47 -47
- package/src/components/NstcG6Components/NstcExcelImport/NstcExcelImport.vue +1 -1
- package/src/components/NstcG6Components/NstcExcelImportN/NstcExcelImportN.vue +186 -188
- package/src/components/NstcG6Components/NstcFileUpload/NstcFileUpload.vue +429 -451
- package/src/components/NstcG6Components/NstcForm/BusinessSpecific/InputMultiple.vue +66 -68
- package/src/components/NstcG6Components/NstcForm/CascaderCustom/index.vue +7 -7
- package/src/components/NstcG6Components/NstcForm/DatepickerCustom/index.vue +32 -32
- package/src/components/NstcG6Components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/InputCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectAccount/NstcSelectAccount.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectindialogCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/UploadCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcSelectTree/NstcSelectTree.vue +172 -172
- package/src/components/NstcG6Components/NstcSelectTreeList/NstcSelectTreeList.vue +1 -1
- package/src/components/NstcG6Components/NstcSvgIcon/NstcSvgIcon.vue +7 -12
- package/src/components/NstcG6Components/NstcTable/NstcTable.vue +145 -145
- package/src/components/NstcG6Components/NstcTableSet/NstcTableSet.vue +4 -4
- package/src/components/NstcG6Components/NstcWorkBench/NstcWorkBench.vue +45 -36
- package/src/components/NstcG6Components/Search/NstcSearch.vue +6 -6
- package/src/components/NstcG6Components/approvelTwo/main.vue +1 -1
- package/src/components/NstcG6Components/approvelTwo/progress.vue +1 -1
- package/src/components/Search/index.vue +8 -8
- package/src/index.js +3 -3
- package/style/css/normalize.scss +726 -0
- package/style/pageDemo/demo-1.vue +131 -0
- package/style/pageDemo/demo-2.vue +35 -0
- package/style/pageDemo/demo-3.vue +22 -0
- package/style/pageDemo/seeCode.js +20 -0
- package/style/server-config.jsonc +723 -0
|
@@ -2,37 +2,40 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div class="nstc-g6-common-input-multiple">
|
|
4
4
|
<SelectCustom
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
v-model="_value[0]"
|
|
6
|
+
filterable
|
|
7
|
+
:options="options[0]"
|
|
8
|
+
:width="widthConfig[0]"
|
|
9
|
+
class="nstc-g6-common-input-multiple-select"
|
|
10
|
+
@change="inputChange(0)"
|
|
11
11
|
/>
|
|
12
12
|
<SelectCustom
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
v-model="_value[1]"
|
|
14
|
+
filterable
|
|
15
|
+
:options="options[1]"
|
|
16
|
+
:width="widthConfig[1]"
|
|
17
|
+
class="nstc-g6-common-input-multiple-select"
|
|
18
|
+
@change="inputChange(1)"
|
|
19
19
|
/>
|
|
20
20
|
<SelectCustom
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
v-model="_value[2]"
|
|
22
|
+
filterable
|
|
23
|
+
:options="options[2]"
|
|
24
|
+
:width="widthConfig[2]"
|
|
25
|
+
class="nstc-g6-common-input-multiple-select"
|
|
26
|
+
@change="inputChange(2)"
|
|
27
27
|
/>
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script>
|
|
32
32
|
import SelectCustom from '../SelectCustom'
|
|
33
|
-
import axios from '
|
|
33
|
+
import axios from '../../../../utils/axios'
|
|
34
34
|
export default {
|
|
35
|
-
name:
|
|
35
|
+
name: 'NstcInputMultiple',
|
|
36
|
+
components: {
|
|
37
|
+
SelectCustom
|
|
38
|
+
},
|
|
36
39
|
props: {
|
|
37
40
|
value: {
|
|
38
41
|
type: Array,
|
|
@@ -89,8 +92,11 @@ export default {
|
|
|
89
92
|
default: false
|
|
90
93
|
}
|
|
91
94
|
},
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
data() {
|
|
96
|
+
return {
|
|
97
|
+
arr: [null, null, null],
|
|
98
|
+
options: [null, null, null]
|
|
99
|
+
}
|
|
94
100
|
},
|
|
95
101
|
computed: {
|
|
96
102
|
_value: {
|
|
@@ -106,12 +112,6 @@ export default {
|
|
|
106
112
|
this._value = this.default
|
|
107
113
|
this.request(this.url, 0)
|
|
108
114
|
},
|
|
109
|
-
data() {
|
|
110
|
-
return {
|
|
111
|
-
arr: [null, null, null],
|
|
112
|
-
options: [null,null,null]
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
115
|
|
|
116
116
|
methods: {
|
|
117
117
|
request(url, optionsIndex) {
|
|
@@ -121,58 +121,56 @@ export default {
|
|
|
121
121
|
url: url,
|
|
122
122
|
method: 'get',
|
|
123
123
|
params: optionsIndex === 0 ? null : this.params
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
})
|
|
125
|
+
.then((res) => {
|
|
126
|
+
console.log(res)
|
|
127
|
+
let resList = res.list || res
|
|
128
|
+
resList = Array.isArray(resList) ? resList : [resList]
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
// 特殊业务处理
|
|
131
|
+
if (this.father && optionsIndex === 0) {
|
|
132
|
+
let newOptions = []
|
|
133
|
+
that.options[optionsIndex] = resList
|
|
134
|
+
that.options[optionsIndex].map((item) => {
|
|
135
|
+
if (!item.fatherNo) {
|
|
136
|
+
item.label = item[this.labelKey]
|
|
137
|
+
item.value = item[this.valueKey]
|
|
138
|
+
newOptions.push(item)
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
that.options[optionsIndex] = newOptions
|
|
142
|
+
} else {
|
|
143
|
+
// alert(1)
|
|
144
|
+
console.log(resList[0].children)
|
|
145
|
+
let newOptions = resList[0].children
|
|
146
|
+
newOptions.map((item) => {
|
|
135
147
|
item.label = item[this.labelKey]
|
|
136
148
|
item.value = item[this.valueKey]
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
let newOptions = resList[0].children
|
|
145
|
-
newOptions.map(item => {
|
|
146
|
-
item.label = item[this.labelKey]
|
|
147
|
-
item.value = item[this.valueKey]
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
that.options[optionsIndex] = newOptions
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
that.$nextTick(() => {
|
|
155
|
+
that.$forceUpdate()
|
|
148
156
|
})
|
|
149
|
-
|
|
150
|
-
that.options[optionsIndex] = newOptions
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
that.$nextTick(() => {
|
|
155
|
-
that.$forceUpdate()
|
|
156
157
|
})
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
.catch(() => {})
|
|
159
159
|
},
|
|
160
160
|
inputChange(i) {
|
|
161
161
|
switch (i) {
|
|
162
162
|
case 0:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
break
|
|
163
|
+
this._value[1] = ''
|
|
164
|
+
this._value[2] = ''
|
|
165
|
+
this.request(`${this.url}?${this.valueKey}=${this._value[i]}`, 1)
|
|
166
|
+
break
|
|
167
167
|
case 1:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
break
|
|
168
|
+
this._value[2] = ''
|
|
169
|
+
this.request(`${this.url}?${this.valueKey}=${this._value[i]}`, 2)
|
|
170
|
+
break
|
|
171
171
|
}
|
|
172
|
-
|
|
173
172
|
}
|
|
174
|
-
|
|
175
|
-
},
|
|
173
|
+
}
|
|
176
174
|
}
|
|
177
175
|
</script>
|
|
178
176
|
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
v-bind="$attrs"
|
|
5
5
|
:collapse-tags="collapseTags"
|
|
6
6
|
:props="calcProps"
|
|
7
|
-
:style="{width:parseFloat(width) + 'px'}"
|
|
7
|
+
:style="{ width: parseFloat(width) + 'px' }"
|
|
8
8
|
v-on="$listeners"
|
|
9
9
|
>
|
|
10
10
|
<template v-slot="scope">
|
|
11
|
-
<slot v-bind="scope"
|
|
11
|
+
<slot v-bind="scope"></slot>
|
|
12
12
|
</template>
|
|
13
13
|
<template v-slot:empty>
|
|
14
|
-
<slot name="empty"
|
|
14
|
+
<slot name="empty"></slot>
|
|
15
15
|
</template>
|
|
16
16
|
</el-cascader>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script>
|
|
20
|
-
import axios from
|
|
20
|
+
import axios from '../../../../utils/axios'
|
|
21
21
|
|
|
22
22
|
export default {
|
|
23
23
|
name: 'CascaderCustom',
|
|
@@ -72,9 +72,9 @@ export default {
|
|
|
72
72
|
...this.props,
|
|
73
73
|
lazyLoad: this.props.lazy
|
|
74
74
|
? (node) => {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
// Todo 需要后端统一传参格式与返回数据的格式
|
|
76
|
+
console.log('子选项node', node)
|
|
77
|
+
}
|
|
78
78
|
: undefined
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -16,89 +16,89 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
|
-
import dateAndValidator from
|
|
19
|
+
import dateAndValidator from '../../../../utils/dateAndValidator'
|
|
20
20
|
|
|
21
21
|
export default {
|
|
22
|
-
name:
|
|
22
|
+
name: 'DatePickerCustom',
|
|
23
23
|
|
|
24
24
|
inheritAttrs: false,
|
|
25
25
|
|
|
26
26
|
props: {
|
|
27
27
|
value: {
|
|
28
28
|
default: null,
|
|
29
|
-
type: [Date, Array, String]
|
|
29
|
+
type: [Date, Array, String]
|
|
30
30
|
},
|
|
31
|
-
dateType:{
|
|
31
|
+
dateType: {
|
|
32
32
|
type: [String, Number],
|
|
33
|
-
default:
|
|
33
|
+
default: ''
|
|
34
34
|
},
|
|
35
35
|
width: {
|
|
36
36
|
type: [String, Number],
|
|
37
|
-
default:
|
|
37
|
+
default: ''
|
|
38
38
|
},
|
|
39
39
|
|
|
40
40
|
limit: {
|
|
41
41
|
type: Array,
|
|
42
|
-
default: () => []
|
|
42
|
+
default: () => []
|
|
43
43
|
},
|
|
44
44
|
|
|
45
45
|
pickerOptions: {
|
|
46
46
|
type: Object,
|
|
47
|
-
default: () => ({})
|
|
47
|
+
default: () => ({})
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
unlinkPanels: {
|
|
51
51
|
type: Boolean,
|
|
52
|
-
default: true
|
|
52
|
+
default: true
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
valueFormat: {
|
|
56
56
|
type: String,
|
|
57
|
-
default:
|
|
58
|
-
}
|
|
57
|
+
default: 'yyyy-MM-dd'
|
|
58
|
+
}
|
|
59
59
|
},
|
|
60
60
|
|
|
61
61
|
data() {
|
|
62
62
|
return {
|
|
63
|
-
key: `DatePickerCustomID-${Math.random().toString(36).slice(2)}
|
|
64
|
-
}
|
|
63
|
+
key: `DatePickerCustomID-${Math.random().toString(36).slice(2)}`
|
|
64
|
+
}
|
|
65
65
|
},
|
|
66
66
|
created() {
|
|
67
|
-
this.$bus.$on(
|
|
68
|
-
console.log(
|
|
69
|
-
})
|
|
70
|
-
console.log(this.dateType,'----------dateType')
|
|
67
|
+
this.$bus.$on('nstc_custom_form_config_update', (formData) => {
|
|
68
|
+
console.log('监听到的全局事件', formData)
|
|
69
|
+
})
|
|
70
|
+
console.log(this.dateType, '----------dateType')
|
|
71
71
|
},
|
|
72
72
|
beforeDestroy() {
|
|
73
|
-
this.$bus.$off(
|
|
73
|
+
this.$bus.$off('nstc_custom_form_config_update')
|
|
74
74
|
},
|
|
75
75
|
computed: {
|
|
76
76
|
_value: {
|
|
77
77
|
get() {
|
|
78
|
-
return this.value
|
|
78
|
+
return this.value
|
|
79
79
|
},
|
|
80
80
|
set(val) {
|
|
81
|
-
this.$emit(
|
|
82
|
-
this.$emit(
|
|
83
|
-
}
|
|
81
|
+
this.$emit('input', val)
|
|
82
|
+
this.$emit('change', val)
|
|
83
|
+
}
|
|
84
84
|
},
|
|
85
85
|
|
|
86
86
|
_pickerOptions() {
|
|
87
87
|
// 今天以及今天之前
|
|
88
|
-
if(this.dateType == 'includeTodayBefore') {
|
|
88
|
+
if (this.dateType == 'includeTodayBefore') {
|
|
89
89
|
return {
|
|
90
|
-
|
|
90
|
+
disabledDate(time) {
|
|
91
91
|
return time.getTime() > Date.now() - 8.64e6
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
} else if(this.dateType == 'todayBefore') {
|
|
94
|
+
} else if (this.dateType == 'todayBefore') {
|
|
95
95
|
// 今天之前
|
|
96
96
|
return {
|
|
97
97
|
disabledDate(time) {
|
|
98
98
|
return time.getTime() > Date.now()
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
} else if(this.dateType == 'includeTodayAfter') {
|
|
101
|
+
} else if (this.dateType == 'includeTodayAfter') {
|
|
102
102
|
// 今天以及今天之后
|
|
103
103
|
return {
|
|
104
104
|
disabledDate(time) {
|
|
@@ -112,15 +112,15 @@ export default {
|
|
|
112
112
|
return time.getTime() < Date.now()
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
} else{
|
|
115
|
+
} else {
|
|
116
116
|
return {
|
|
117
117
|
...dateAndValidator.limit.pickerOptions(...this.limit),
|
|
118
|
-
...this.pickerOptions
|
|
119
|
-
}
|
|
118
|
+
...this.pickerOptions
|
|
119
|
+
}
|
|
120
120
|
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
124
|
</script>
|
|
125
125
|
|
|
126
126
|
<style scoped>
|