n20-common-lib 2.7.0-beta.21 → 2.7.0-beta.23

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.7.0-beta.21",
3
+ "version": "2.7.0-beta.23",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,157 +1,5 @@
1
- // &-item {
2
- // position: relative;
3
- // display: inline-block;
4
- // vertical-align: middle;
5
- // max-width: 426px;
6
- // margin-right: 8px;
7
- // padding-left: 8px;
8
- // border-radius: 4px;
9
- // border: 1px solid #dcdfe5;
10
- // background: #fff;
11
- // cursor: pointer;
12
-
13
- // &__name {
14
- // display: inline-block;
15
- // vertical-align: middle;
16
- // white-space: nowrap;
17
- // overflow: hidden;
18
- // max-width: 168px;
19
- // margin-right: 6px;
20
- // color: #182b50;
21
- // }
22
-
23
- // &__value {
24
- // display: inline-block;
25
- // vertical-align: middle;
26
- // white-space: nowrap;
27
- // overflow: hidden;
28
- // text-overflow: ellipsis;
29
- // max-width: 312px;
30
-
31
- // //margin-right: 14px;
32
- // .el-input .el-input__inner {
33
- // border: none;
34
- // padding-left: 0;
35
- // background-color: transparent;
36
- // }
37
-
38
- // .el-input__inner:focus {
39
- // box-shadow: none;
40
- // }
41
-
42
- // }
43
-
44
- // .filter_remove {
45
- // display: none;
46
- // position: absolute;
47
- // height: 13px;
48
- // width: 13px;
49
- // background: #f1f1f1;
50
- // right: -5px;
51
- // top: -7px;
52
- // font-size: 14px;
53
- // z-index: 1;
54
- // border-radius: 50%;
55
- // cursor: pointer;
56
- // }
57
-
58
- // &:hover {
59
- // .filter_remove {
60
- // display: block;
61
- // }
62
- // }
63
-
64
-
65
-
66
- // .el-form-item__label {
67
- // padding: 0;
68
- // display: inline-block;
69
- // vertical-align: middle;
70
- // white-space: nowrap;
71
- // overflow: hidden;
72
- // text-overflow: ellipsis;
73
- // margin-right: 4px;
74
- // }
75
-
76
-
77
- // .el-range-editor.el-input__inner {
78
- // min-width: 168px;
79
- // max-width: 224px;
80
-
81
- // .el-range-input {
82
- // background-color: transparent;
83
- // }
84
- // }
85
-
86
- // .n20-date-editor.el-date-editor--datetimerange.el-range-editor--small.has-value {
87
- // min-width: 168px;
88
- // max-width: 380px;
89
- // }
90
-
91
- // .n20-date-editor .el-input__prefix {
92
- // display: none;
93
- // }
94
-
95
- // .el-input,
96
- // .el-input__inner {
97
- // border: none;
98
- // width: 100%;
99
- // background-color: transparent;
100
- // }
101
-
102
-
103
-
104
- // .el-input__inner:active,
105
- // .el-input__inner:focus {
106
- // box-shadow: none;
107
- // border: none;
108
- // border-color: #fff;
109
- // }
110
-
111
- // .el-checkbox-group {
112
- // height: 32px;
113
- // line-height: 32px;
114
- // vertical-align: middle;
115
- // padding: 0 10px;
116
- // }
117
-
118
- // .el-radio-group {
119
- // padding: 0 10px;
120
- // }
121
-
122
- // .n20-num-w {
123
- // padding-left: 5px;
124
-
125
- // .el-input,
126
- // .el-input__inner {
127
- // padding-left: 0;
128
- // }
129
-
130
- // .el-input--suffix .el-input__inner {
131
- // padding-right: 26px;
132
- // }
133
- // }
134
-
135
- // .n20-numberRange {
136
- // padding-right: 8px;
137
- // }
138
-
139
- // &-close {
140
- // display: none;
141
- // position: absolute;
142
- // top: -6px;
143
- // right: -20px;
144
- // }
145
-
146
- // &:hover {
147
- // .n20-advanced-filter-item-close {
148
- // display: inline-block;
149
- // }
150
- // }
151
- // }
152
-
153
-
154
1
  .n20-advanced-filter {
2
+ box-sizing: border-box;
155
3
  position: relative;
156
4
  display: flex;
157
5
  align-items: center;
@@ -226,6 +74,8 @@
226
74
  padding-left: 0;
227
75
  border: none;
228
76
  width: 100%;
77
+ white-space: nowrap;
78
+ text-overflow: ellipsis;
229
79
  background-color: transparent;
230
80
  }
231
81
 
@@ -233,8 +83,6 @@
233
83
  margin-left: 0;
234
84
  }
235
85
 
236
-
237
-
238
86
  .el-input__inner:active,
239
87
  .el-input__inner:focus {
240
88
  box-shadow: none;
@@ -253,6 +101,10 @@
253
101
  padding: 0 10px;
254
102
  }
255
103
 
104
+ .el-date-editor .el-range-separator {
105
+ padding: 0;
106
+ }
107
+
256
108
  .n20-num-w {
257
109
  // padding-left: 5px;
258
110
 
@@ -320,6 +172,7 @@
320
172
  display: inline-block;
321
173
  white-space: nowrap;
322
174
  text-overflow: ellipsis;
175
+ line-height: 1;
323
176
 
324
177
  .el-select.el-select--small {
325
178
  .el-select__tags {
@@ -280,7 +280,7 @@ $--header-color: #3d4a57;
280
280
  color: #333333;
281
281
  }
282
282
 
283
- .menu {
283
+ .n20_menu_header {
284
284
  color: #33383d;
285
285
  letter-spacing: 0;
286
286
  line-height: 22px;
@@ -303,7 +303,7 @@ $--header-color: #3d4a57;
303
303
  align-items: center;
304
304
 
305
305
  &_drawer_box {
306
- width: 992px;
306
+ width: 1024px;
307
307
  }
308
308
 
309
309
  &_drawer_layout {
@@ -318,6 +318,7 @@ $--header-color: #3d4a57;
318
318
  &_title {
319
319
 
320
320
  display: inline-block;
321
+ font-weight: 700;
321
322
  padding: 4px;
322
323
 
323
324
  &:hover {
@@ -334,7 +335,6 @@ $--header-color: #3d4a57;
334
335
 
335
336
  &-first-item {
336
337
  flex: 0 0 33.33%;
337
- margin-bottom: 8px;
338
338
 
339
339
  &_title {
340
340
 
@@ -362,7 +362,7 @@ $--header-color: #3d4a57;
362
362
  z-index: 900;
363
363
  }
364
364
 
365
- .menu.show_drawer {
365
+ .n20_menu_header.show_drawer {
366
366
  max-height: calc(90vh - 50px);
367
367
  min-height: 350px;
368
368
  overflow-y: auto;
@@ -352,6 +352,7 @@ export default {
352
352
  style: {
353
353
  width: calcTextWidth(item, form[item.value])
354
354
  },
355
+ title: form[item.value],
355
356
  ruleField: true,
356
357
  'rule-form': 'ruleValidate',
357
358
  ruleErrorHide: item.ruleErrorHide,
@@ -473,7 +474,12 @@ export default {
473
474
  elementDom = h('inputNumber', {
474
475
  directives: [{ name: 'rule-key' }],
475
476
  ruleField: true,
476
- attrs: { 'rule-form': 'ruleValidate', rules: item.rules, ruleErrorHide: item.ruleErrorHide },
477
+ attrs: {
478
+ 'rule-form': 'ruleValidate',
479
+ title: form[item.value],
480
+ rules: item.rules,
481
+ ruleErrorHide: item.ruleErrorHide
482
+ },
477
483
  style: {
478
484
  width: calcWidth(form[item.value])
479
485
  },
@@ -35,7 +35,9 @@
35
35
  <el-popover ref="advanced_popover" placement="bottom-start" trigger="click">
36
36
  <el-input v-model="keyword" clearable class="input-w m-b-s" :placeholder="$lc('搜索筛选条件')" />
37
37
  <div class="flex-box flex-lr">
38
- <el-button type="text" @click="allCheck">全选</el-button>
38
+ <el-button type="text" @click="allCheck">{{
39
+ checkList.length === filterListS.length ? '取消全选' : '全选'
40
+ }}</el-button>
39
41
  <el-button type="text" @click="defaultCheck"> 恢复默认</el-button>
40
42
  </div>
41
43
  <filterItem
@@ -125,6 +127,7 @@ export default {
125
127
  GroupData: [],
126
128
  checkList: [],
127
129
  defineCheckList: [],
130
+ cancelCheck: [],
128
131
  userNo: sessionStorage.getItem('userNo')
129
132
  }
130
133
  },
@@ -152,8 +155,19 @@ export default {
152
155
  },
153
156
  created() {
154
157
  this.getFilterList()
158
+ this.getDefaultCheck()
155
159
  },
156
160
  methods: {
161
+ getDefaultCheck() {
162
+ let _checkList = this.filterList
163
+ .filter((item) => {
164
+ if (item.isDefault) {
165
+ return item
166
+ }
167
+ })
168
+ .map((item) => item[this.onlyKey])
169
+ this.defineCheckList = cloneDeep(_checkList)
170
+ },
157
171
  getOnlyKey(data) {
158
172
  return getOnlyKey(this.onlyKey, data)
159
173
  },
@@ -280,18 +294,21 @@ export default {
280
294
  }
281
295
  },
282
296
  allCheck() {
283
- if (this.maxLength) {
284
- this.checkList = this.filterListS.slice(0, this.maxLength)?.map((res) => res[this.onlyKey])
285
- console.log(this.checkList, this.filterListS)
297
+ if (this.checkList.length === this.filterListS.length) {
298
+ this.checkList = []
286
299
  } else {
287
- this.checkList = this.filterListS?.map((res) => res[this.onlyKey])
300
+ if (this.maxLength) {
301
+ this.checkList = this.filterListS.slice(0, this.maxLength)?.map((res) => res[this.onlyKey])
302
+ } else {
303
+ this.checkList = this.filterListS?.map((res) => res[this.onlyKey])
304
+ }
288
305
  }
289
306
  },
290
307
  defaultCheck() {
291
308
  this.checkList = this.defineCheckList
292
309
  },
293
310
  cancel() {
294
- this.checkList = this.defineCheckList
311
+ this.checkList = this.cancelCheck
295
312
  this.$refs.advanced_popover.showPopper = false
296
313
  },
297
314
  savaCheck() {
@@ -379,7 +396,7 @@ export default {
379
396
  }
380
397
  }
381
398
  this.checkList = this.GroupData.map((res) => res.id)
382
- this.defineCheckList = cloneDeep(this.checkList)
399
+ this.cancelCheck = cloneDeep(this.checkList)
383
400
  // 查找排序,在this.filterList中查找this.checkList中的每一项,并将其排在前面
384
401
  this.filterList = this.filterList.sort((a, b) => {
385
402
  if (this.checkList.includes(a[this.onlyKey]) && !this.checkList.includes(b[this.onlyKey])) {
@@ -52,6 +52,23 @@ let disabledDate_2 = (t) => {
52
52
  }
53
53
 
54
54
  let shortcuts_1 = [
55
+ {
56
+ text: $lc('今天'),
57
+ onClick(picker) {
58
+ const start = new Date()
59
+ const end = new Date()
60
+ picker.$emit('pick', [start, end])
61
+ }
62
+ },
63
+ {
64
+ text: $lc('最近一周'),
65
+ onClick(picker) {
66
+ const end = new Date()
67
+ const start = new Date()
68
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
69
+ picker.$emit('pick', [start, end])
70
+ }
71
+ },
55
72
  {
56
73
  text: $lc('最近一月'),
57
74
  onClick(picker) {
@@ -16,7 +16,6 @@ export default {
16
16
  }
17
17
  },
18
18
  created() {
19
- console.log(this.$slots.default)
20
19
  this.resize()
21
20
  window.addEventListener('resize', this.resize)
22
21
  },
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="pointer menu">
3
- <div class="menu_drawer_layout menu_drawer_box">
4
- <div v-for="(item, i) in menus" :key="i" class="menu-system-item">
2
+ <div class="pointer n20_menu_header">
3
+ <div class="n20_menu_header_drawer_layout n20_menu_header_drawer_box">
4
+ <div v-for="(item, i) in menus" :key="i" class="n20_menu_header-system-item">
5
5
  <div class="flex-box flex-v" @click="clickSystem(item)">
6
6
  <svg
7
7
  style="width: 2em; height: 2em; vertical-align: -0.15em; fill: currentColor; overflow: hidden"
@@ -9,16 +9,16 @@
9
9
  >
10
10
  <use :xlink:href="item.icon"></use>
11
11
  </svg>
12
- <span class="m-l-s menu-system-item_title">{{ item.NAME }}</span>
12
+ <span class="m-l-s n20_menu_header-system-item_title">{{ item.NAME }}</span>
13
13
  </div>
14
- <div v-if="item.menuTree.length" class="menu_drawer_layout menu-system-child">
14
+ <div v-if="item.menuTree.length" class="n20_menu_header_drawer_layout n20_menu_header-system-child">
15
15
  <div
16
16
  v-for="(row, i) in item.menuTree"
17
17
  :key="i"
18
- class="menu-first-item"
18
+ class="n20_menu_header-first-item truncate"
19
19
  @click="clickMenu(row, item.menuTree)"
20
20
  >
21
- <span class="menu-first-item_title">{{ row.title }}</span>
21
+ <span class="n20_menu_header-first-item_title">{{ row.title }}</span>
22
22
  </div>
23
23
  </div>
24
24
  </div>
@@ -53,6 +53,7 @@ export default {
53
53
  async clickSystem(item) {
54
54
  await this.getTreeList(item)
55
55
  window.localStorage.setItem('pageInSystemNo', item.NO)
56
+ window.sessionStorage.setItem('navFlog', true)
56
57
  // 切换系统的时候清除缓存的页签
57
58
  window.sessionStorage.removeItem('tab-list')
58
59
  let { base = '/' } = this.$router.options
@@ -60,6 +61,8 @@ export default {
60
61
  window.location.href = window.location.origin + base + 'dashboard/workplace'
61
62
  },
62
63
  async clickMenu(row, MenuTre) {
64
+ console.log(row)
65
+ window.sessionStorage.setItem('navFlog', true)
63
66
  let pageInSystemNo = window.localStorage.getItem('pageInSystemNo')
64
67
  window.localStorage.setItem('pageInType', 'toFront')
65
68
  if (pageInSystemNo === row.systemNo) {
@@ -435,11 +435,11 @@ export default {
435
435
  async init() {
436
436
  const { _layoutData = {}, loginSetting, screenInspect } = await getJsonc('/server-config.jsonc')
437
437
  let _loginSetting = loginSetting || _layoutData.loginSetting
438
+ this.jsonData = _layoutData
438
439
  if (_loginSetting !== 'JSON' && this.jsonData.showSystem) {
439
440
  await this.getSysSet()
440
441
  }
441
442
  screenInspect && this.getScreenSetting()
442
- this.jsonData = _layoutData
443
443
 
444
444
  if (this.systemList.length <= 1) {
445
445
  this.$set(this.form, 'LOGIN_TYPE', 'T0')
package/src/i18n.json CHANGED
@@ -11,6 +11,9 @@
11
11
  "初始化后将全局生效!": {
12
12
  "en": "After initialization, it will be global!"
13
13
  },
14
+ "请上传附件": {
15
+ "en": "Please upload the attachment"
16
+ },
14
17
  "数据请求": {
15
18
  "en": "Data request"
16
19
  },