eoss-ui 0.8.45 → 0.8.47
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/lib/eoss-ui.common.js +65 -33
- package/lib/flow.js +59 -27
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/packages/flow/src/component/SortFlow.vue +112 -110
- package/packages/flow/src/flow.vue +155 -133
- package/packages/flow/src/main.vue +2 -1
- package/packages/flow/src/selectUser.vue +1 -1
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,110 +1,112 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="flow-sort-box"
|
|
4
|
-
style="height: 100%;overflow-y: auto;"
|
|
5
|
-
v-loading="loading"
|
|
6
|
-
element-loading-text="加载中..."
|
|
7
|
-
element-loading-spinner="el-icon-loading"
|
|
8
|
-
element-loading-background="rgba(255, 255,255, 0.8)">
|
|
9
|
-
<Draggable
|
|
10
|
-
class="flow-sort-draggable"
|
|
11
|
-
:list="sortList"
|
|
12
|
-
>
|
|
13
|
-
<es-button style="margin-top: 10px;" v-for="item in sortList" :key="item.id" plain>{{
|
|
14
|
-
item.name
|
|
15
|
-
}}</es-button></Draggable
|
|
16
|
-
>
|
|
17
|
-
<div class="flow-sort-btn">
|
|
18
|
-
<es-button type="primary" @click="saveSort(true)">保存</es-button>
|
|
19
|
-
<es-button @click="saveSort(false)">取消</es-button>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script>
|
|
25
|
-
import util from 'eoss-ui/src/utils/util';
|
|
26
|
-
import Draggable from 'vuedraggable';
|
|
27
|
-
import { toDefinitionChangeSort,setSort } from 'eoss-ui/src/config/api';
|
|
28
|
-
export default {
|
|
29
|
-
name: 'SortFlow',
|
|
30
|
-
components: {
|
|
31
|
-
Draggable
|
|
32
|
-
},
|
|
33
|
-
props: {
|
|
34
|
-
flowTypeCode: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: ''
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
this.$
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="flow-sort-box"
|
|
4
|
+
style="height: 100%;overflow-y: auto;"
|
|
5
|
+
v-loading="loading"
|
|
6
|
+
element-loading-text="加载中..."
|
|
7
|
+
element-loading-spinner="el-icon-loading"
|
|
8
|
+
element-loading-background="rgba(255, 255,255, 0.8)">
|
|
9
|
+
<Draggable
|
|
10
|
+
class="flow-sort-draggable"
|
|
11
|
+
:list="sortList"
|
|
12
|
+
>
|
|
13
|
+
<es-button style="margin-top: 10px;" v-for="item in sortList" :key="item.id" plain>{{
|
|
14
|
+
item.name
|
|
15
|
+
}}</es-button></Draggable
|
|
16
|
+
>
|
|
17
|
+
<div class="flow-sort-btn">
|
|
18
|
+
<es-button type="primary" @click="saveSort(true)">保存</es-button>
|
|
19
|
+
<es-button @click="saveSort(false)">取消</es-button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import util from 'eoss-ui/src/utils/util';
|
|
26
|
+
import Draggable from 'vuedraggable';
|
|
27
|
+
import { toDefinitionChangeSort,setSort } from 'eoss-ui/src/config/api';
|
|
28
|
+
export default {
|
|
29
|
+
name: 'SortFlow',
|
|
30
|
+
components: {
|
|
31
|
+
Draggable
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
flowTypeCode: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ''
|
|
37
|
+
},
|
|
38
|
+
ownerType:{type:String, default: ''},
|
|
39
|
+
defaultProcessKey: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ''
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
sortList: [],
|
|
47
|
+
loading:false
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
mounted() {
|
|
51
|
+
this.getSortInfo();
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
saveSort(type){
|
|
55
|
+
if(type){
|
|
56
|
+
let arr = [];
|
|
57
|
+
this.sortList.map((item,index)=>{
|
|
58
|
+
arr.push({
|
|
59
|
+
id:item.id,
|
|
60
|
+
processDefId:item.processDefId,
|
|
61
|
+
sort:this.sortList.length - index
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
const params = {
|
|
65
|
+
url: setSort,
|
|
66
|
+
method: 'post',
|
|
67
|
+
format: false,
|
|
68
|
+
headers: {
|
|
69
|
+
Accept: 'application/json,text/plain',
|
|
70
|
+
'Content-Type': 'application/json;charset=UTF-8'
|
|
71
|
+
},
|
|
72
|
+
data: arr
|
|
73
|
+
};
|
|
74
|
+
this.loading=true;
|
|
75
|
+
util.ajax(params).then((res) => {
|
|
76
|
+
this.loading=false;
|
|
77
|
+
if (res.rCode === 0 || res.status=== 'success') {
|
|
78
|
+
this.$message.success('保存成功');
|
|
79
|
+
this.$emit('success',this.sortList)
|
|
80
|
+
}
|
|
81
|
+
}).catch(() => {
|
|
82
|
+
this.loading=false;
|
|
83
|
+
});
|
|
84
|
+
}else{
|
|
85
|
+
this.$emit('close')
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
getSortInfo() {
|
|
89
|
+
const params = {
|
|
90
|
+
url: toDefinitionChangeSort,
|
|
91
|
+
method: 'get',
|
|
92
|
+
params: {
|
|
93
|
+
flowTypeCode: this.flowTypeCode,
|
|
94
|
+
defaultProcessKey: this.defaultProcessKey,
|
|
95
|
+
ownerType:this.ownerType
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
this.loading=true;
|
|
99
|
+
util.ajax(params).then((res) => {
|
|
100
|
+
this.loading=false;
|
|
101
|
+
if (res.rCode === 0) {
|
|
102
|
+
this.sortList = res.results.definitionList || [];
|
|
103
|
+
}
|
|
104
|
+
}).catch(() => {
|
|
105
|
+
this.loading=false;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<style></style>
|