n20-common-lib 1.3.96 → 1.3.98

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": "1.3.96",
3
+ "version": "1.3.98",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -8,7 +8,10 @@
8
8
  <div>{{ item.endTime | timeF }}</div>
9
9
  </div>
10
10
  <div>
11
- <div class="flex-box flex-v">
11
+ <div v-if="item.result === 0" class="flex-box flex-v">
12
+ <div class="n20-worker p-r-s">{{ item.assignee }}</div>
13
+ </div>
14
+ <div v-else class="flex-box flex-v">
12
15
  <div class="n20-worker p-r-s" style="width: 300px">{{ item.memberName }}</div>
13
16
  <div class="n20-worker p-r-s" style="width: 150px">{{ item.roleName }}</div>
14
17
  <div class="n20-worker p-r-s text-c" style="width: 80px">{{ item.assignee }}</div>
@@ -17,6 +20,7 @@
17
20
  </div>
18
21
  <div class="flex-item">{{ item.suggestion }}</div>
19
22
  </div>
23
+
20
24
  <div v-if="item.ccUserName" class="n20-description-c m-t">抄送人:{{ item.ccUserName }}</div>
21
25
  </div>
22
26
  </el-timeline-item>
@@ -96,6 +100,7 @@ export default {
96
100
  endTime: item.endTime || '',
97
101
  assignee: item.assignee,
98
102
  suggestion: item.suggestion,
103
+ roleName: item.roleName,
99
104
  ccUserName: item.ccUserName, // 抄送人
100
105
  memberName: item.memberName // 审批人单位
101
106
  }
@@ -16,9 +16,9 @@
16
16
  <div class="n20-approval m-r-s" style="width: auto; min-width: 100px">
17
17
  <template v-if="item.result == status.submit">{{ '提交' | $lc }}</template>
18
18
  <template v-else-if="item.result == status.end">{{ '结束' | $lc }}</template>
19
- <template v-else>
19
+ <template v-else-if="item.result !== status.waiting">
20
20
  <span>{{ '审批意见:' | $lc }}</span>
21
- <span :class="item | typeF(status, 'color-')">{{ $lc(item.resultName || '驳回') }}</span>
21
+ <span :class="item | typeF(status, 'color-')">{{ $lc(item.resultName) }}</span>
22
22
  </template>
23
23
  </div>
24
24
  </div>
@@ -23,7 +23,7 @@
23
23
  <slot v-if="item.slotName" :name="item.slotName"></slot>
24
24
  <form-item-input v-else :form="form" :item="item" />
25
25
  </el-form-item>
26
- <template v-if="filterList.length > defaultShow">
26
+ <template v-if="filterLT.length > defaultShow">
27
27
  <div :style="{ paddingLeft: labelWidth }">
28
28
  <el-button class="p-t-0 m-b-s color-primary" type="text" @click="moreFn"
29
29
  ><span>{{ '更多条件' | $lc }}</span
@@ -56,7 +56,8 @@
56
56
  ref="setRemote"
57
57
  :dialog-visible.sync="setRemoteV"
58
58
  :check-columns="remoteList"
59
- :columns="filterList"
59
+ :columns="filterLT"
60
+ :columns-groups="filterGp"
60
61
  :is-filter="true"
61
62
  :auto-save="true"
62
63
  :page-id="pageId"
@@ -110,6 +111,10 @@ export default {
110
111
  filterId: {
111
112
  type: String,
112
113
  default: undefined
114
+ },
115
+ isGroup: {
116
+ type: Boolean,
117
+ default: false
113
118
  }
114
119
  },
115
120
  data() {
@@ -123,11 +128,29 @@ export default {
123
128
  }
124
129
  },
125
130
  computed: {
131
+ filterLT() {
132
+ if (!this.isGroup) {
133
+ return this.filterList
134
+ } else {
135
+ let list = []
136
+ this.filterList.forEach((gp) => {
137
+ if (gp.children) {
138
+ gp.children.forEach((col) => {
139
+ list.push(Object.assign({}, col, { groupId: gp.groupId }))
140
+ })
141
+ }
142
+ })
143
+ return list
144
+ }
145
+ },
146
+ filterGp() {
147
+ return !this.isGroup ? undefined : this.filterList.map((gp) => ({ groupId: gp.groupId, groupName: gp.groupName }))
148
+ },
126
149
  minList() {
127
- return this.filterList.slice(0, this.defaultShow)
150
+ return this.filterLT.slice(0, this.defaultShow)
128
151
  },
129
152
  moreList() {
130
- return this.filterList.slice(this.defaultShow)
153
+ return this.filterLT.slice(this.defaultShow)
131
154
  },
132
155
  pageId() {
133
156
  return 'filter:' + this.filterId
@@ -176,18 +199,18 @@ export default {
176
199
  }
177
200
  },
178
201
  setOptions(key, opts) {
179
- let item = this.filterList.find((f) => f.value === key)
202
+ let item = this.filterLT.find((f) => f.value === key)
180
203
  if (item) {
181
204
  item.options = opts || []
182
205
  }
183
206
  },
184
207
  getRemote() {
185
- getColumns(this.pageId, this.userNo, this.filterList).then((list) => {
208
+ getColumns(this.pageId, this.userNo, this.filterLT).then((list) => {
186
209
  if (list) {
187
210
  this.remoteList = list
188
211
  } else {
189
- let defaultList = this.filterList.filter((col) => col.isDefault)
190
- this.remoteList = defaultList.length ? defaultList : this.filterList.slice(0, this.defaultShow)
212
+ let defaultList = this.filterLT.filter((col) => col.isDefault)
213
+ this.remoteList = defaultList.length ? defaultList : this.filterLT.slice(0, this.defaultShow)
191
214
  }
192
215
  this.showPop = true
193
216
  })
@@ -25,15 +25,33 @@
25
25
  </div>
26
26
  <div class="flex-item p-r" style="height: 50%; overflow: auto">
27
27
  <el-checkbox-group :value="dragList.map((d) => d[labelKey])">
28
- <el-checkbox
29
- v-for="(column, i) in columnsAs"
30
- :key="i"
31
- :label="column[labelKey]"
32
- :disabled="column.checked"
33
- class="m-t"
34
- @change="(val) => checkChange(val, column)"
35
- >{{ column[labelKey] }}</el-checkbox
36
- >
28
+ <template v-if="!columnsGroups">
29
+ <el-checkbox
30
+ v-for="(column, i) in columnsAs"
31
+ :key="i"
32
+ :label="column[labelKey]"
33
+ :disabled="column.checked"
34
+ class="m-t"
35
+ @change="(val) => checkChange(val, column)"
36
+ >{{ column[labelKey] }}</el-checkbox
37
+ >
38
+ </template>
39
+ <template v-else>
40
+ <div v-for="gp in columnsGroups" :key="gp.groupId" class="m-b">
41
+ <div class="f-s-b font-w600">{{ gp.groupName }}</div>
42
+ <template v-for="(column, i) in columnsAs">
43
+ <el-checkbox
44
+ v-if="column.groupId === gp.groupId"
45
+ :key="i"
46
+ :label="column[labelKey]"
47
+ :disabled="column.checked"
48
+ class="m-t"
49
+ @change="(val) => checkChange(val, column)"
50
+ >{{ column[labelKey] }}</el-checkbox
51
+ >
52
+ </template>
53
+ </div>
54
+ </template>
37
55
  </el-checkbox-group>
38
56
  </div>
39
57
  </div>
@@ -54,6 +72,7 @@
54
72
  </div>
55
73
  </dialog-wrap>
56
74
  </template>
75
+
57
76
  <script>
58
77
  import { $lc } from '../../utils/i18n/index'
59
78
  import axios from '../../utils/axios'
@@ -72,6 +91,10 @@ export default {
72
91
  type: Array,
73
92
  default: () => []
74
93
  },
94
+ columnsGroups: {
95
+ type: Array,
96
+ default: undefined
97
+ },
75
98
  checkColumns: {
76
99
  type: Array,
77
100
  default: () => []