ui-process-h5 0.1.29 → 0.1.30
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 +72 -73
- package/packages/component.ts +2 -3
- package/packages/components/process/index.ts +1 -1
- package/packages/components/{button/src/index.vue → process/src/button.vue} +17 -19
- package/packages/components/process/src/index.vue +8 -7
- package/packages/components/{popup/src/index.vue → process/src/popup.vue} +6 -6
- package/packages/components/{tab/src/index.vue → process/src/tab.vue} +14 -14
- package/packages/components/utils/request/api.ts +1 -1
- package/packages/components/utils/request/request.ts +2 -4
- package/packages/index.ts +0 -1
- package/packages/components/button/index.ts +0 -9
- package/packages/components/popup/index.ts +0 -11
- package/packages/components/tab/index.ts +0 -9
package/package.json
CHANGED
|
@@ -1,73 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ui-process-h5",
|
|
3
|
-
"private": false,
|
|
4
|
-
"description": "流程组件",
|
|
5
|
-
"version": "0.1.
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"dev": "vite",
|
|
9
|
-
"build": "vue-tsc && vite build",
|
|
10
|
-
"preview": "vite preview"
|
|
11
|
-
},
|
|
12
|
-
"files": [
|
|
13
|
-
"packages/*",
|
|
14
|
-
"Readme.md",
|
|
15
|
-
"package.json"
|
|
16
|
-
],
|
|
17
|
-
"publicConfig": {
|
|
18
|
-
"registry": "http://registry.npmjs.org/"
|
|
19
|
-
},
|
|
20
|
-
"main": "./packages/index.ts",
|
|
21
|
-
"module": "./packages/index.ts",
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"import": "./packages/index.ts",
|
|
25
|
-
"require": "./packages/index.ts"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"axios": "^1.3.6",
|
|
30
|
-
"dayjs": "^1.11.7",
|
|
31
|
-
"less-loader": "^11.1.0",
|
|
32
|
-
"sass": "^1.62.0",
|
|
33
|
-
"
|
|
34
|
-
"vue": "^
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"@commitlint/
|
|
39
|
-
"@
|
|
40
|
-
"@types/
|
|
41
|
-
"@
|
|
42
|
-
"@typescript-eslint/
|
|
43
|
-
"@
|
|
44
|
-
"@vitejs/plugin-vue": "^
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"eslint": "^8.
|
|
52
|
-
"eslint-config
|
|
53
|
-
"eslint-
|
|
54
|
-
"eslint-plugin-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"vite": "^
|
|
65
|
-
"vite-plugin-
|
|
66
|
-
"
|
|
67
|
-
"vue": "^
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ui-process-h5",
|
|
3
|
+
"private": false,
|
|
4
|
+
"description": "流程组件",
|
|
5
|
+
"version": "0.1.30",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "vue-tsc && vite build",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"packages/*",
|
|
14
|
+
"Readme.md",
|
|
15
|
+
"package.json"
|
|
16
|
+
],
|
|
17
|
+
"publicConfig": {
|
|
18
|
+
"registry": "http://registry.npmjs.org/"
|
|
19
|
+
},
|
|
20
|
+
"main": "./packages/index.ts",
|
|
21
|
+
"module": "./packages/index.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./packages/index.ts",
|
|
25
|
+
"require": "./packages/index.ts"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"axios": "^1.3.6",
|
|
30
|
+
"dayjs": "^1.11.7",
|
|
31
|
+
"less-loader": "^11.1.0",
|
|
32
|
+
"sass": "^1.62.0",
|
|
33
|
+
"vue": "^3.2.47",
|
|
34
|
+
"vue-demi": "^0.14.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@commitlint/cli": "^17.0.0",
|
|
38
|
+
"@commitlint/config-conventional": "^17.0.0",
|
|
39
|
+
"@types/node": "^18.15.12",
|
|
40
|
+
"@types/sass": "^1.43.1",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
42
|
+
"@typescript-eslint/parser": "^5.27.0",
|
|
43
|
+
"@vitejs/plugin-vue": "^4.1.0",
|
|
44
|
+
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
|
45
|
+
"axios": "^1.3.5",
|
|
46
|
+
"chalk": "^4.1.2",
|
|
47
|
+
"commitizen": "^4.2.4",
|
|
48
|
+
"cross-env": "^7.0.3",
|
|
49
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
50
|
+
"eslint": "^8.17.0",
|
|
51
|
+
"eslint-config-prettier": "^8.5.0",
|
|
52
|
+
"eslint-define-config": "^1.5.0",
|
|
53
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
54
|
+
"eslint-plugin-vue": "^9.1.0",
|
|
55
|
+
"good-storage": "^1.1.1",
|
|
56
|
+
"husky": "^8.0.1",
|
|
57
|
+
"js-cookie": "^3.0.1",
|
|
58
|
+
"prettier": "^2.6.2",
|
|
59
|
+
"rimraf": "^3.0.2",
|
|
60
|
+
"sass": "^1.49.7",
|
|
61
|
+
"standard-version": "^9.5.0",
|
|
62
|
+
"typescript": "^4.9.3",
|
|
63
|
+
"vite": "^4.2.0",
|
|
64
|
+
"vite-plugin-dts": "^1.2.0",
|
|
65
|
+
"vite-plugin-md": "^0.15.0",
|
|
66
|
+
"vue": "^3.2.47",
|
|
67
|
+
"vue-tsc": "^1.2.0"
|
|
68
|
+
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">=16.0.0"
|
|
71
|
+
}
|
|
72
|
+
}
|
package/packages/component.ts
CHANGED
|
@@ -13,32 +13,30 @@ export default defineComponent({
|
|
|
13
13
|
props: {
|
|
14
14
|
type: { default: "default", type: String },
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
created() {
|
|
28
|
-
switch (this.type) {
|
|
16
|
+
setup(props) {
|
|
17
|
+
const style = ref({
|
|
18
|
+
textColor: "#fff",
|
|
19
|
+
bckColor: "3c9cff",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
switch (props.type) {
|
|
29
23
|
case "primary":
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
style.value.textColor = "#fff";
|
|
25
|
+
style.value.bckColor = "#3c9cff";
|
|
32
26
|
break;
|
|
33
27
|
case "danger":
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
style.value.textColor = "rgb(255, 96, 96)";
|
|
29
|
+
style.value.bckColor = "rgb(255, 230, 230)";
|
|
36
30
|
break;
|
|
37
31
|
case "default":
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
style.value.textColor = "rgb(51, 51, 51)";
|
|
33
|
+
style.value.bckColor = "rgb(241, 241, 241)";
|
|
40
34
|
break;
|
|
41
35
|
}
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
style,
|
|
39
|
+
};
|
|
42
40
|
},
|
|
43
41
|
});
|
|
44
42
|
</script>
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
|
|
85
85
|
<script lang="ts">
|
|
86
86
|
import { defineComponent, ref, watch, computed } from "vue-demi";
|
|
87
|
-
import TopTab from "
|
|
88
|
-
import TopPopup from "
|
|
89
|
-
import TopButton from "
|
|
87
|
+
import TopTab from "./tab.vue";
|
|
88
|
+
import TopPopup from "./popup.vue";
|
|
89
|
+
import TopButton from "./button.vue";
|
|
90
90
|
// import { getProcessStatus } from "../../utils/request/api";
|
|
91
91
|
|
|
92
|
-
export default {
|
|
92
|
+
export default defineComponent({
|
|
93
93
|
name: "TopProcess",
|
|
94
94
|
components: {
|
|
95
95
|
TopTab,
|
|
@@ -103,8 +103,9 @@ export default {
|
|
|
103
103
|
taskId: { require: true, default: "", type: String },
|
|
104
104
|
isAdditional: { require: false, default: false, type: Boolean },
|
|
105
105
|
isView: { default: false, type: Boolean },
|
|
106
|
+
userId: { default: "", type: String}
|
|
106
107
|
},
|
|
107
|
-
setup(props
|
|
108
|
+
setup(props) {
|
|
108
109
|
const processStatus = ref<any>({});
|
|
109
110
|
|
|
110
111
|
const TopPopup1 = ref<any>();
|
|
@@ -202,7 +203,7 @@ export default {
|
|
|
202
203
|
}
|
|
203
204
|
);
|
|
204
205
|
|
|
205
|
-
|
|
206
|
+
/* getProcessStatus({
|
|
206
207
|
processInstId: "4ac28800-7056-483b-8d38-a4932daf055b",
|
|
207
208
|
}).then((res) => {
|
|
208
209
|
console.log("res", res);
|
|
@@ -348,7 +349,7 @@ export default {
|
|
|
348
349
|
return "#1389FF";
|
|
349
350
|
},
|
|
350
351
|
},
|
|
351
|
-
}
|
|
352
|
+
});
|
|
352
353
|
</script>
|
|
353
354
|
|
|
354
355
|
<style scoped>
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
@click="isMaskClose && handleClose()"
|
|
25
25
|
></div>
|
|
26
26
|
</template>
|
|
27
|
-
<script
|
|
27
|
+
<script>
|
|
28
28
|
import { defineComponent, ref, watch, computed, onMounted } from "vue-demi";
|
|
29
29
|
|
|
30
|
-
export default {
|
|
30
|
+
export default defineComponent({
|
|
31
31
|
name: "TopPopup",
|
|
32
32
|
props: {
|
|
33
33
|
titleText: { default: "top-popup", type: String },
|
|
@@ -35,11 +35,11 @@ export default {
|
|
|
35
35
|
comfigText: { default: "确定", type: String },
|
|
36
36
|
comfig: { default: null, type: Function },
|
|
37
37
|
cancel: { default: null, type: Function },
|
|
38
|
-
isMask: {
|
|
39
|
-
isMaskClose: {
|
|
38
|
+
isMask: { default: true, type: Boolean },
|
|
39
|
+
isMaskClose: { default: true, type: Boolean },
|
|
40
40
|
},
|
|
41
41
|
setup(props) {
|
|
42
|
-
const show = ref
|
|
42
|
+
const show = ref(false);
|
|
43
43
|
|
|
44
44
|
const handleOpen = () => {
|
|
45
45
|
show.value = true;
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
show,
|
|
71
71
|
};
|
|
72
72
|
},
|
|
73
|
-
}
|
|
73
|
+
});
|
|
74
74
|
</script>
|
|
75
75
|
<style scoped>
|
|
76
76
|
.top-popup {
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
</div>
|
|
93
93
|
</template>
|
|
94
94
|
|
|
95
|
-
<script
|
|
95
|
+
<script >
|
|
96
96
|
import { defineComponent, ref, watch, onMounted, computed } from "vue-demi";
|
|
97
97
|
// import { getProcessStatus } from "../../utils/request/api";
|
|
98
98
|
|
|
99
|
-
export default {
|
|
99
|
+
export default defineComponent({
|
|
100
100
|
name: "TopTab",
|
|
101
101
|
props: {
|
|
102
102
|
/**
|
|
@@ -117,14 +117,14 @@ export default {
|
|
|
117
117
|
default: () => [],
|
|
118
118
|
},
|
|
119
119
|
},
|
|
120
|
-
setup(props
|
|
120
|
+
setup(props) {
|
|
121
121
|
// 流程图
|
|
122
|
-
const trackUrl = ref
|
|
122
|
+
const trackUrl = ref(
|
|
123
123
|
"http://59.53.91.231:8088/portal/r/w?sid=6f714ec1-7570-4525-ac51-b092402d8295&cmd=CLIENT_BPM_FORM_TRACK_OPEN&processInstId=1f6e7196-e1ea-428e-b295-aa23a54a2402&supportCanvas=true&formInfo="
|
|
124
124
|
);
|
|
125
125
|
|
|
126
126
|
// 审批信息
|
|
127
|
-
const taskCommentList = ref
|
|
127
|
+
const taskCommentList = ref([
|
|
128
128
|
{
|
|
129
129
|
actionName: "提交",
|
|
130
130
|
activityName: "部门负责人",
|
|
@@ -143,10 +143,10 @@ export default {
|
|
|
143
143
|
]);
|
|
144
144
|
|
|
145
145
|
// 选中
|
|
146
|
-
const active = ref
|
|
146
|
+
const active = ref("");
|
|
147
147
|
|
|
148
148
|
// tab 渲染
|
|
149
|
-
const defaultTabList = ref
|
|
149
|
+
const defaultTabList = ref([
|
|
150
150
|
{
|
|
151
151
|
label: "基本信息",
|
|
152
152
|
key: "a",
|
|
@@ -167,7 +167,7 @@ export default {
|
|
|
167
167
|
},
|
|
168
168
|
]);
|
|
169
169
|
|
|
170
|
-
const isTapList = ref
|
|
170
|
+
const isTapList = ref([
|
|
171
171
|
{
|
|
172
172
|
label: "基本信息",
|
|
173
173
|
key: "a",
|
|
@@ -188,13 +188,13 @@ export default {
|
|
|
188
188
|
},
|
|
189
189
|
]);
|
|
190
190
|
|
|
191
|
-
const label = ref
|
|
191
|
+
const label = ref();
|
|
192
192
|
|
|
193
193
|
// taskNode taskObj
|
|
194
194
|
|
|
195
195
|
/* method */
|
|
196
196
|
// 选中方法
|
|
197
|
-
const handleActive = (e
|
|
197
|
+
const handleActive = (e, i) => {
|
|
198
198
|
if (e === active.value) {
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
@@ -203,9 +203,9 @@ export default {
|
|
|
203
203
|
tabAnimation(i);
|
|
204
204
|
};
|
|
205
205
|
|
|
206
|
-
const tabAnimation = (i
|
|
206
|
+
const tabAnimation = (i) => {
|
|
207
207
|
if (label.value.length) {
|
|
208
|
-
let doc =
|
|
208
|
+
let doc = (
|
|
209
209
|
document.getElementsByClassName("bottom-line")[0]
|
|
210
210
|
);
|
|
211
211
|
let left;
|
|
@@ -250,7 +250,7 @@ export default {
|
|
|
250
250
|
isTapList.value = [].concat(defaultTabList.value);
|
|
251
251
|
if (val.length > 0) {
|
|
252
252
|
/* return [] */
|
|
253
|
-
val.forEach((v
|
|
253
|
+
val.forEach((v, i) => {
|
|
254
254
|
if (v.sort && v.sort > 1) {
|
|
255
255
|
isTapList.value.splice(v.sort - 1, 0, v);
|
|
256
256
|
} else if (v.sort == 1) {
|
|
@@ -287,7 +287,7 @@ export default {
|
|
|
287
287
|
trackUrl,
|
|
288
288
|
};
|
|
289
289
|
},
|
|
290
|
-
};
|
|
290
|
+
});
|
|
291
291
|
</script>
|
|
292
292
|
|
|
293
293
|
<style scoped>
|
|
@@ -7,14 +7,12 @@ import axios, {
|
|
|
7
7
|
import { ACCESS_TOKEN, loadStorage } from "./cache";
|
|
8
8
|
|
|
9
9
|
const host = process.env.VUE_APP_BASE_URL;
|
|
10
|
-
// const
|
|
11
|
-
// const host = "http://59.53.91.231:2100/";
|
|
12
|
-
const api = "prod-api"
|
|
10
|
+
// const host = "http://59.53.91.231:2106";
|
|
13
11
|
|
|
14
12
|
axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
|
|
15
13
|
|
|
16
14
|
const opts = {
|
|
17
|
-
baseURL:
|
|
15
|
+
baseURL: host,
|
|
18
16
|
timeout: 999999999,
|
|
19
17
|
errorTip: true,
|
|
20
18
|
transformResponse: [
|
package/packages/index.ts
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { App, createApp } from "vue";
|
|
2
|
-
import TopPopup from "./src/index.vue";
|
|
3
|
-
|
|
4
|
-
TopPopup.install = function (app: App) {
|
|
5
|
-
// 组件注册,按需引入
|
|
6
|
-
console.log("TopPopup.install",app)
|
|
7
|
-
app.mount(TopPopup)
|
|
8
|
-
app.component(TopPopup.name, TopPopup);
|
|
9
|
-
return app;
|
|
10
|
-
};
|
|
11
|
-
export default TopPopup;
|