n20-common-lib 2.5.5-beta → 2.5.5-beta.1
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 +1 -1
- package/src/components/ApprovalButtons/index.vue +13 -13
- package/src/components/ApprovalButtons/showAppOpi.vue +4 -3
- package/src/components/ApprovalRecord/index.vue +20 -2
- package/src/components/CascaderArea/index.vue +13 -2
- package/src/components/ShowColumn/index.vue +32 -0
- package/src/components/TablePro/index.vue +2 -1
- package/src/directives/VDrag/index.js +72 -72
- package/src/directives/VTitle/index.js +0 -1
- package/src/i18n.json +10 -1
- package/src/utils/list2tree.js +23 -11
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
package/package.json
CHANGED
|
@@ -66,19 +66,6 @@
|
|
|
66
66
|
</el-form-item>
|
|
67
67
|
</div>
|
|
68
68
|
<div class="flex-box">
|
|
69
|
-
<el-form-item class="flex-1" :label="'审批意见' | $lc" :error="errMsg" :required="required" style="width: 70%">
|
|
70
|
-
<el-input
|
|
71
|
-
ref="msg-input"
|
|
72
|
-
v-model="messageC"
|
|
73
|
-
type="textarea"
|
|
74
|
-
:placeholder="
|
|
75
|
-
('请输入操作意见(' + messageMax + '字以内),批准该意见为非必填,驳回/作废该意见为必填!') | $lc
|
|
76
|
-
"
|
|
77
|
-
:maxlength="messageMax"
|
|
78
|
-
show-word-limit
|
|
79
|
-
:autosize="{ rows: 1 }"
|
|
80
|
-
/>
|
|
81
|
-
</el-form-item>
|
|
82
69
|
<template v-if="taskId && showBtn">
|
|
83
70
|
<show-app-opi
|
|
84
71
|
v-if="opiAndUser || authList.includes('showAppOpi')"
|
|
@@ -96,6 +83,19 @@
|
|
|
96
83
|
style="width: 18%"
|
|
97
84
|
/>
|
|
98
85
|
</template>
|
|
86
|
+
<el-form-item class="flex-1" :label="'审批意见' | $lc" :error="errMsg" :required="required" style="width: 70%">
|
|
87
|
+
<el-input
|
|
88
|
+
ref="msg-input"
|
|
89
|
+
v-model="messageC"
|
|
90
|
+
type="textarea"
|
|
91
|
+
:placeholder="
|
|
92
|
+
('请输入操作意见(' + messageMax + '字以内),批准该意见为非必填,驳回/作废该意见为必填!') | $lc
|
|
93
|
+
"
|
|
94
|
+
:maxlength="messageMax"
|
|
95
|
+
show-word-limit
|
|
96
|
+
:autosize="{ rows: 1 }"
|
|
97
|
+
/>
|
|
98
|
+
</el-form-item>
|
|
99
99
|
</div>
|
|
100
100
|
<el-form-item v-if="fileKit || fileKitT" label="附加上传">
|
|
101
101
|
<cl-upload
|
|
@@ -62,9 +62,10 @@ export default {
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
changeFn() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
this.$emit(
|
|
66
|
+
'update:message',
|
|
67
|
+
Array.isArray(this.approveMsgSlt) ? this.approveMsgSlt.join('\n') : this.approveMsgSlt
|
|
68
|
+
)
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* 审批记录 */
|
|
2
2
|
<template>
|
|
3
|
-
<div>
|
|
3
|
+
<div v-if="approvalMode === 'dialog' || !approvalMode">
|
|
4
4
|
<expandableWrap :title="'审批记录' | $lc" :show-expand="false" :icon="false">
|
|
5
5
|
<template slot="tips">
|
|
6
6
|
<el-button plain size="mini" :disabled="false" @click="cardV = true">{{ '审批进度查看' | $lc }}</el-button>
|
|
@@ -30,12 +30,24 @@
|
|
|
30
30
|
<approvalImg class="text-c p-a" :proc-inst-id="procInstIdC" style="height: 70vh; overflow: auto" />
|
|
31
31
|
</el-dialog>
|
|
32
32
|
</div>
|
|
33
|
+
<div v-else>
|
|
34
|
+
<expandableWrap title="审批记录">
|
|
35
|
+
<template slot="tips">
|
|
36
|
+
<el-button size="mini" plain @click="imgV = true">流程图查看</el-button>
|
|
37
|
+
</template>
|
|
38
|
+
<approvalCard :procInstId="procInstIdC" />
|
|
39
|
+
<el-dialog v-drag title="查看流程" :visible.sync="imgV" width="65%" class="p-a-0" append-to-body top="10vh">
|
|
40
|
+
<approvalImg class="text-c p-a" style="height: 70vh; overflow: auto" />
|
|
41
|
+
</el-dialog>
|
|
42
|
+
</expandableWrap>
|
|
43
|
+
</div>
|
|
33
44
|
</template>
|
|
34
45
|
|
|
35
46
|
<script>
|
|
36
47
|
import expandableWrap from '../Expandable/main.vue'
|
|
37
48
|
import approvalCard from '../ApprovalCard/index.vue'
|
|
38
49
|
import approvalImg from './approvalImg.vue'
|
|
50
|
+
import getJsonc from '../../assets/getJsonc'
|
|
39
51
|
export default {
|
|
40
52
|
name: 'ApprovalRecord',
|
|
41
53
|
components: {
|
|
@@ -52,13 +64,19 @@ export default {
|
|
|
52
64
|
data() {
|
|
53
65
|
return {
|
|
54
66
|
cardV: false,
|
|
55
|
-
imgV: false
|
|
67
|
+
imgV: false,
|
|
68
|
+
approvalMode: undefined
|
|
56
69
|
}
|
|
57
70
|
},
|
|
58
71
|
computed: {
|
|
59
72
|
procInstIdC() {
|
|
60
73
|
return this.procInstId || this.$route.query.processInstanceId
|
|
61
74
|
}
|
|
75
|
+
},
|
|
76
|
+
mounted() {
|
|
77
|
+
getJsonc('/server-config.jsonc').then(({ approvalMode }) => {
|
|
78
|
+
this.approvalMode = approvalMode
|
|
79
|
+
})
|
|
62
80
|
}
|
|
63
81
|
}
|
|
64
82
|
</script>
|
|
@@ -36,6 +36,10 @@ export default {
|
|
|
36
36
|
type: Boolean,
|
|
37
37
|
default: false
|
|
38
38
|
},
|
|
39
|
+
labelSort: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
39
43
|
countryId: {
|
|
40
44
|
type: String,
|
|
41
45
|
default: 'CHN'
|
|
@@ -81,7 +85,14 @@ export default {
|
|
|
81
85
|
.then(({ data }) => {
|
|
82
86
|
let dataAr = JSON.parse(JSON.stringify(data))
|
|
83
87
|
let dataUb = JSON.parse(JSON.stringify(data))
|
|
84
|
-
|
|
88
|
+
|
|
89
|
+
let areaTree = list2tree(
|
|
90
|
+
dataAr,
|
|
91
|
+
'regionNo',
|
|
92
|
+
'fatherNo',
|
|
93
|
+
'children',
|
|
94
|
+
this.labelSort ? 'regionName' : 'regionNo'
|
|
95
|
+
)
|
|
85
96
|
let noAreaTree = areaTree.filter((a) => a.regionLevel !== '1')
|
|
86
97
|
if (noAreaTree.length > 0) {
|
|
87
98
|
console.warn('这些区域找不到父级节点:', noAreaTree)
|
|
@@ -93,7 +104,7 @@ export default {
|
|
|
93
104
|
'regionNo',
|
|
94
105
|
'fatherNo',
|
|
95
106
|
'children',
|
|
96
|
-
'regionNo'
|
|
107
|
+
this.labelSort ? 'regionName' : 'regionNo'
|
|
97
108
|
)
|
|
98
109
|
|
|
99
110
|
window[this.urbanKey] = urbanTree.filter((a) => a.regionLevel === '1')
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
</div>
|
|
70
70
|
</div>
|
|
71
71
|
<div slot="footer" class="text-c">
|
|
72
|
+
<el-button type="primary" v-has="isHas" @click="handleInitialize">{{ '初始化' | $lc }}</el-button>
|
|
72
73
|
<el-button type="primary" @click="setChange">{{ '确定' | $lc }}</el-button>
|
|
73
74
|
<el-button plain @click="reset">{{ '恢复默认' | $lc }}</el-button>
|
|
74
75
|
</div>
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
<script>
|
|
79
80
|
import { $lc } from '../../utils/i18n/index'
|
|
80
81
|
import axios from '../../utils/axios'
|
|
82
|
+
|
|
81
83
|
import dialogWrap from '../Dialog/index.vue'
|
|
82
84
|
import dragList from '../DragList/index.vue'
|
|
83
85
|
export default {
|
|
@@ -124,6 +126,10 @@ export default {
|
|
|
124
126
|
width: {
|
|
125
127
|
type: String,
|
|
126
128
|
default: '800px'
|
|
129
|
+
},
|
|
130
|
+
isHas: {
|
|
131
|
+
type: String,
|
|
132
|
+
default: undefined
|
|
127
133
|
}
|
|
128
134
|
},
|
|
129
135
|
data() {
|
|
@@ -167,6 +173,31 @@ export default {
|
|
|
167
173
|
}
|
|
168
174
|
},
|
|
169
175
|
methods: {
|
|
176
|
+
async handleInitialize() {
|
|
177
|
+
if (this.dragList.length < 1) {
|
|
178
|
+
this.$message.error(
|
|
179
|
+
`${$lc(`至少设置`)}${
|
|
180
|
+
this.isExport ? $lc('一列导出数据') : this.isFilter ? $lc('一个筛选条件') : $lc('一列显示列')
|
|
181
|
+
}!`
|
|
182
|
+
)
|
|
183
|
+
return
|
|
184
|
+
}
|
|
185
|
+
await this.$msgboxPor({
|
|
186
|
+
title: $lc('确认初始化吗?'),
|
|
187
|
+
message: $lc('初始化后将全局生效!'),
|
|
188
|
+
type: 'info',
|
|
189
|
+
confirmButtonText: $lc('确定'),
|
|
190
|
+
cancelButtonText: $lc('取消')
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
let list = []
|
|
194
|
+
let preCols = this.columns.filter((col) => col.static === 'pre')
|
|
195
|
+
let nextCols = this.columns.filter((col) => col.static === 'next')
|
|
196
|
+
list.push(...preCols, ...this.dragList, ...nextCols)
|
|
197
|
+
this.userNo = '_global_'
|
|
198
|
+
this.saveColumns(list)
|
|
199
|
+
this.visible = false
|
|
200
|
+
},
|
|
170
201
|
popOpen() {
|
|
171
202
|
this.dragList = this.checkColumns.filter((col) => !col.static)
|
|
172
203
|
},
|
|
@@ -205,6 +236,7 @@ export default {
|
|
|
205
236
|
list.push(...preCols, ...this.dragList, ...nextCols)
|
|
206
237
|
|
|
207
238
|
// 自动保存设置的显示列
|
|
239
|
+
this.userNo = sessionStorage.getItem('userNo')
|
|
208
240
|
!this.isExport && this.autoSave && this.saveColumns(list)
|
|
209
241
|
|
|
210
242
|
this.$emit('setColumns', list)
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
remote: true,
|
|
20
20
|
trigger: 'cell',
|
|
21
21
|
iconAsc: 'n20-icon-daoxu',
|
|
22
|
-
iconDesc: 'n20-icon-shunxu'
|
|
22
|
+
iconDesc: 'n20-icon-shunxu',
|
|
23
|
+
...$attrs.sortConfig
|
|
23
24
|
}"
|
|
24
25
|
:filter-config="{ remote: true, iconNone: 'n20-icon-xiala-moren', iconMatch: 'n20-icon-xiala-moren' }"
|
|
25
26
|
v-on="$listeners"
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* author: zhengwei
|
|
3
|
-
* tiem: 2021-8-31
|
|
4
|
-
* amend: 只注册到bind上,有问题;onXX会导致事件覆盖
|
|
5
|
-
*/
|
|
6
|
-
// 封装全局弹窗拖拽指令 v-drag
|
|
7
|
-
function dialogMoveFn(_this) {
|
|
8
|
-
var dialogDom = _this.parentNode
|
|
9
|
-
dialogDom.style.top = parseFloat(dialogDom.style.top || '0') + _this.pageYc + 'px'
|
|
10
|
-
dialogDom.style.left = parseFloat(dialogDom.style.left || '0') + _this.pageXc + 'px'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const dialogMove = {
|
|
14
|
-
install: function (Vue) {
|
|
15
|
-
Vue.directive('drag', {
|
|
16
|
-
update(el, binding) {
|
|
17
|
-
if (el.style.display === 'none') {
|
|
18
|
-
var dialogDom = el.querySelector('.el-dialog')
|
|
19
|
-
if (dialogDom) {
|
|
20
|
-
dialogDom.style.left = ''
|
|
21
|
-
dialogDom.style.top = ''
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
Vue.nextTick(function () {
|
|
25
|
-
var dialogHeader = el.querySelector('.el-dialog__header')
|
|
26
|
-
if (dialogHeader && !dialogHeader._hasMoveDir) {
|
|
27
|
-
var _this, pvrPageX, pvrPageY
|
|
28
|
-
dialogHeader._hasMoveDir = true
|
|
29
|
-
dialogHeader.style.cursor = 'move'
|
|
30
|
-
|
|
31
|
-
dialogHeader.addEventListener('mousedown', function (evt) {
|
|
32
|
-
var ev = evt || event
|
|
33
|
-
this.pageXc = this.pageYc = 0
|
|
34
|
-
_this = this
|
|
35
|
-
pvrPageX = ev.pageX
|
|
36
|
-
pvrPageY = ev.pageY
|
|
37
|
-
document.addEventListener('mousemove', mousemoveThisMove)
|
|
38
|
-
document.addEventListener('mouseup', mouseupThisMove)
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
var mousemoveThisMove = function (evt) {
|
|
42
|
-
var ev = evt || event
|
|
43
|
-
ev.stopPropagation()
|
|
44
|
-
ev.preventDefault()
|
|
45
|
-
if (
|
|
46
|
-
ev.clientX >= 0 &&
|
|
47
|
-
ev.clientY >= 0 &&
|
|
48
|
-
ev.clientX <= document.documentElement.clientWidth &&
|
|
49
|
-
ev.clientY <= document.documentElement.clientHeight
|
|
50
|
-
) {
|
|
51
|
-
_this.pageXc = ev.pageX - pvrPageX
|
|
52
|
-
_this.pageYc = ev.pageY - pvrPageY
|
|
53
|
-
if (_this.pageXc !== 0 || _this.pageYc !== 0) {
|
|
54
|
-
binding.value ? binding.value(_this, binding.arg) : dialogMoveFn(_this)
|
|
55
|
-
}
|
|
56
|
-
pvrPageX = ev.pageX
|
|
57
|
-
pvrPageY = ev.pageY
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
var mouseupThisMove = function () {
|
|
62
|
-
document.removeEventListener('mousemove', mousemoveThisMove)
|
|
63
|
-
document.removeEventListener('mouseup', mouseupThisMove)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export default dialogMove
|
|
1
|
+
/**
|
|
2
|
+
* author: zhengwei
|
|
3
|
+
* tiem: 2021-8-31
|
|
4
|
+
* amend: 只注册到bind上,有问题;onXX会导致事件覆盖
|
|
5
|
+
*/
|
|
6
|
+
// 封装全局弹窗拖拽指令 v-drag
|
|
7
|
+
function dialogMoveFn(_this) {
|
|
8
|
+
var dialogDom = _this.parentNode
|
|
9
|
+
dialogDom.style.top = parseFloat(dialogDom.style.top || '0') + _this.pageYc + 'px'
|
|
10
|
+
dialogDom.style.left = parseFloat(dialogDom.style.left || '0') + _this.pageXc + 'px'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const dialogMove = {
|
|
14
|
+
install: function (Vue) {
|
|
15
|
+
Vue.directive('drag', {
|
|
16
|
+
update(el, binding) {
|
|
17
|
+
if (el.style.display === 'none') {
|
|
18
|
+
var dialogDom = el.querySelector('.el-dialog')
|
|
19
|
+
if (dialogDom) {
|
|
20
|
+
dialogDom.style.left = ''
|
|
21
|
+
dialogDom.style.top = ''
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
Vue.nextTick(function () {
|
|
25
|
+
var dialogHeader = el.querySelector('.el-dialog__header')
|
|
26
|
+
if (dialogHeader && !dialogHeader._hasMoveDir) {
|
|
27
|
+
var _this, pvrPageX, pvrPageY
|
|
28
|
+
dialogHeader._hasMoveDir = true
|
|
29
|
+
dialogHeader.style.cursor = 'move'
|
|
30
|
+
|
|
31
|
+
dialogHeader.addEventListener('mousedown', function (evt) {
|
|
32
|
+
var ev = evt || event
|
|
33
|
+
this.pageXc = this.pageYc = 0
|
|
34
|
+
_this = this
|
|
35
|
+
pvrPageX = ev.pageX
|
|
36
|
+
pvrPageY = ev.pageY
|
|
37
|
+
document.addEventListener('mousemove', mousemoveThisMove)
|
|
38
|
+
document.addEventListener('mouseup', mouseupThisMove)
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
var mousemoveThisMove = function (evt) {
|
|
42
|
+
var ev = evt || event
|
|
43
|
+
ev.stopPropagation()
|
|
44
|
+
ev.preventDefault()
|
|
45
|
+
if (
|
|
46
|
+
ev.clientX >= 0 &&
|
|
47
|
+
ev.clientY >= 0 &&
|
|
48
|
+
ev.clientX <= document.documentElement.clientWidth &&
|
|
49
|
+
ev.clientY <= document.documentElement.clientHeight
|
|
50
|
+
) {
|
|
51
|
+
_this.pageXc = ev.pageX - pvrPageX
|
|
52
|
+
_this.pageYc = ev.pageY - pvrPageY
|
|
53
|
+
if (_this.pageXc !== 0 || _this.pageYc !== 0) {
|
|
54
|
+
binding.value ? binding.value(_this, binding.arg) : dialogMoveFn(_this)
|
|
55
|
+
}
|
|
56
|
+
pvrPageX = ev.pageX
|
|
57
|
+
pvrPageY = ev.pageY
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var mouseupThisMove = function () {
|
|
62
|
+
document.removeEventListener('mousemove', mousemoveThisMove)
|
|
63
|
+
document.removeEventListener('mouseup', mouseupThisMove)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default dialogMove
|
|
@@ -117,7 +117,6 @@ HoverTooltip.install = (Vue) => {
|
|
|
117
117
|
el.$tipShow = () => tipShow(el, binding.arg)
|
|
118
118
|
el.$tipHide = () => tipHide(el)
|
|
119
119
|
el.addEventListener('mouseenter', () => {
|
|
120
|
-
console.log(getWidth(binding.value))
|
|
121
120
|
if (getWidth(binding.value) > (binding.arg || 98)) {
|
|
122
121
|
return el.$tipShow()
|
|
123
122
|
}
|
package/src/i18n.json
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
"筛选": {
|
|
3
3
|
"en": "Filter"
|
|
4
4
|
},
|
|
5
|
+
"初始化": {
|
|
6
|
+
"en": "Initialization"
|
|
7
|
+
},
|
|
8
|
+
"确认初始化吗?": {
|
|
9
|
+
"en": "Are you sure to initialize?"
|
|
10
|
+
},
|
|
11
|
+
"初始化后将全局生效!": {
|
|
12
|
+
"en": "After initialization, it will be global!"
|
|
13
|
+
},
|
|
5
14
|
"数据请求": {
|
|
6
15
|
"en": "Data request"
|
|
7
16
|
},
|
|
@@ -1880,4 +1889,4 @@
|
|
|
1880
1889
|
"请先勾选要删除的数据!": {
|
|
1881
1890
|
"en": "Please select the data to be deleted first!"
|
|
1882
1891
|
}
|
|
1883
|
-
}
|
|
1892
|
+
}
|
package/src/utils/list2tree.js
CHANGED
|
@@ -17,17 +17,29 @@ function list2tree(arr, id = 'id', pid = 'pId', children = 'children', sortk) {
|
|
|
17
17
|
}
|
|
18
18
|
})
|
|
19
19
|
if (sortk !== undefined) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
hash[item[id]][children]
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
if (typeof sortk === 'string') {
|
|
21
|
+
arr.forEach((item) => {
|
|
22
|
+
if (hash[item[id]][children]) {
|
|
23
|
+
hash[item[id]][children].sort(function (n1, n2) {
|
|
24
|
+
return n1[sortk].localeCompare(n2[sortk])
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
r.sort(function (n1, n2) {
|
|
29
|
+
return n1[sortk].localeCompare(n2[sortk])
|
|
30
|
+
})
|
|
31
|
+
} else {
|
|
32
|
+
arr.forEach((item) => {
|
|
33
|
+
if (hash[item[id]][children]) {
|
|
34
|
+
hash[item[id]][children].sort(function (n1, n2) {
|
|
35
|
+
return n1[sortk] - n2[sortk]
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
r.sort(function (n1, n2) {
|
|
40
|
+
return n1[sortk] - n2[sortk]
|
|
41
|
+
})
|
|
42
|
+
}
|
|
31
43
|
}
|
|
32
44
|
|
|
33
45
|
return r
|