ui-process-h5 0.1.36 → 1.0.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.
Files changed (92) hide show
  1. package/build/configure/README.md +212 -0
  2. package/build/configure/package.json +28 -0
  3. package/build/scripts/postinstall.mjs +14 -0
  4. package/build/scripts/switch-cli.mjs +4 -0
  5. package/build/scripts/utils.mjs +60 -0
  6. package/index.html +12 -0
  7. package/package.json +51 -20
  8. package/src/App.vue +222 -0
  9. package/src/assets/font-icon/iconfont.scss +57 -0
  10. package/src/assets/font-icon/iconfont.ttf +0 -0
  11. package/src/assets/img/arrow-right.png +0 -0
  12. package/src/assets/img/arrow.png +0 -0
  13. package/src/assets/img/check.png +0 -0
  14. package/src/assets/js/auth.js +65 -0
  15. package/src/assets/js/errorCode.js +6 -0
  16. package/src/assets/js/message.js +352 -0
  17. package/src/assets/js/request.js +99 -0
  18. package/src/assets/js/toast.js +239 -0
  19. package/src/assets/js/top.js +229 -0
  20. package/src/assets/js/utils.js +83 -0
  21. package/src/assets/js/vuePopper.js +123 -0
  22. package/src/assets/query.png +0 -0
  23. package/src/assets/status/check.png +0 -0
  24. package/src/assets/status/del.png +0 -0
  25. package/src/main.js +17 -0
  26. package/src/packages/attchUpload/index.js +374 -0
  27. package/src/packages/attchUpload/index.scss +143 -0
  28. package/src/packages/attchUpload/index.vue +173 -0
  29. package/src/packages/downSelect/index.js +99 -0
  30. package/src/packages/downSelect/index.scss +86 -0
  31. package/src/packages/downSelect/index.vue +57 -0
  32. package/src/packages/index.js +6 -0
  33. package/src/packages/popup/index.js +73 -0
  34. package/src/packages/popup/index.scss +173 -0
  35. package/src/packages/popup/index.vue +80 -0
  36. package/src/packages/preview/index.js +36 -0
  37. package/src/packages/preview/index.vue +15 -0
  38. package/src/packages/previewImage/index.js +281 -0
  39. package/src/packages/previewImage/index.scss +76 -0
  40. package/src/packages/previewImage/index.vue +53 -0
  41. package/src/packages/process/index.js +923 -0
  42. package/src/packages/process/index.scss +175 -0
  43. package/src/packages/process/index.vue +263 -0
  44. package/src/packages/process/operation/backNode.vue +485 -0
  45. package/src/packages/process/operation/cancel.vue +518 -0
  46. package/src/packages/process/operation/ccTask.vue +473 -0
  47. package/src/packages/process/operation/complete.vue +1126 -0
  48. package/src/packages/process/operation/counterSign.vue +590 -0
  49. package/src/packages/process/operation/delegateTask.vue +587 -0
  50. package/src/packages/process/operation/msgList.vue +174 -0
  51. package/src/packages/process/operation/restart.vue +316 -0
  52. package/src/packages/submitPopup/index.js +644 -0
  53. package/src/packages/submitPopup/index.scss +88 -0
  54. package/src/packages/submitPopup/index.vue +154 -0
  55. package/src/packages/tab/index.js +236 -0
  56. package/src/packages/tab/index.scss +177 -0
  57. package/src/packages/tab/index.vue +155 -0
  58. package/src/packages/tip/index.js +80 -0
  59. package/src/packages/tip/index.scss +121 -0
  60. package/src/packages/tip/index.vue +57 -0
  61. package/src/packages/viewAttchList/index.js +134 -0
  62. package/src/packages/viewAttchList/index.scss +76 -0
  63. package/src/packages/viewAttchList/index.vue +112 -0
  64. package/src/style.css +80 -0
  65. package/vite.config.ts +107 -0
  66. package/packages/components/approval/index.js +0 -0
  67. package/packages/components/process/index.js +0 -8
  68. package/packages/components/process/src/attchlist-upload.vue +0 -585
  69. package/packages/components/process/src/operation/backNode.vue +0 -141
  70. package/packages/components/process/src/operation/cancel.vue +0 -170
  71. package/packages/components/process/src/operation/ccTask.vue +0 -170
  72. package/packages/components/process/src/operation/complete.vue +0 -224
  73. package/packages/components/process/src/operation/counterSign.vue +0 -178
  74. package/packages/components/process/src/operation/delegateTask.vue +0 -168
  75. package/packages/components/process/src/operation/restart.vue +0 -172
  76. package/packages/components/process/src/popup.vue +0 -230
  77. package/packages/components/process/src/process.vue +0 -900
  78. package/packages/components/process/src/tab.vue +0 -459
  79. package/packages/components/process/src/tip.vue +0 -207
  80. package/packages/index.js +0 -4
  81. /package/{packages/components/process/theme → src/assets}/img/add-file.png +0 -0
  82. /package/{packages/components/process/theme → src/assets}/img/del.png +0 -0
  83. /package/{packages/components/process/theme → src/assets}/img/doc.png +0 -0
  84. /package/{packages/components/process/theme → src/assets}/img/file.png +0 -0
  85. /package/{packages/components/process/theme → src/assets}/img/image.png +0 -0
  86. /package/{packages/components/process/theme → src/assets}/img/pdf.png +0 -0
  87. /package/{packages/components/process/theme → src/assets}/img/xls.png +0 -0
  88. /package/{packages/components/process/theme → src/assets}/img/zip.png +0 -0
  89. /package/{packages/components/process/theme → src/assets}/status/error.png +0 -0
  90. /package/{packages/components/process/theme → src/assets}/status/loading.png +0 -0
  91. /package/{packages/components/process/theme → src/assets}/status/success.png +0 -0
  92. /package/{packages/components/process/src → src/packages/process}/operation/index.js +0 -0
@@ -0,0 +1,155 @@
1
+ <template>
2
+ <div class="tops-tab">
3
+ <div class="tops-tab-header">
4
+ <template v-for="(item, i) of isTapList">
5
+ <div
6
+ class="tops-tab-header-items"
7
+ :class="[item.key === active ? 'active' : '']"
8
+ @click="handleActive(item.key, i)"
9
+ >
10
+ {{ item.label }}
11
+ </div>
12
+ </template>
13
+ <div class="bottom-line" v-if="isTapList.length"></div>
14
+ </div>
15
+ <div class="tops-tab-body">
16
+ <div
17
+ v-for="item in isTapList"
18
+ :key="item.key"
19
+ v-show="active === item.key"
20
+ style="height: 100%;"
21
+ :class="[item.key === 'c' && 'tops-tab-body-taskcommentlist']"
22
+ >
23
+ <!-- :taskNode="getTaskNode()" -->
24
+ <slot
25
+ v-if="item.key === 'a' && item.type === 'default'"
26
+ name="default"
27
+ ></slot>
28
+ <div style="height:100%;"
29
+ v-if="item.key === 'b' && item.type === 'default'"
30
+ :name="item.slot"
31
+ >
32
+ <div
33
+ style="padding: 10px 20px; color: #1389ff;"
34
+ v-if="trackUrl"
35
+ @click="() => (visibleTack = true)"
36
+ >
37
+ 查看流程节点信息
38
+ </div>
39
+ <iframe
40
+ v-if="trackUrl"
41
+ :src="trackUrl"
42
+ style="
43
+ width: 100%;
44
+ height: calc(100% - 41px);
45
+ border: none;
46
+ "
47
+ scrolling="no"
48
+ frameborder="0"
49
+ ></iframe>
50
+ <div v-else class="textnone">
51
+ 暂无流程图
52
+ </div>
53
+ </div>
54
+ <div style="height:100%;"
55
+ v-if="item.key === 'c' && item.type === 'default'"
56
+ >
57
+ <template v-if="taskCommentList.length > 0">
58
+ <div
59
+ v-for="(item, index) in taskCommentList"
60
+ :key="item.id"
61
+ class="seal-list__item"
62
+ >
63
+ <div>
64
+ <div class="seal-list__item--option">
65
+ <span>节点名称</span>
66
+ <span>{{ item.activityName }}</span>
67
+ </div>
68
+ <div class="seal-list__item--option">
69
+ <span>审批人</span>
70
+ <span>{{ item.createUserName }}</span>
71
+ </div>
72
+ <div class="seal-list__item--option">
73
+ <span>审批操作</span>
74
+ <span>{{ item.actionName }}</span>
75
+ </div>
76
+ <div class="seal-list__item--option">
77
+ <span>审批意见</span>
78
+ <span v-html="item.msg"></span>
79
+ </div>
80
+ <div class="seal-list__item--option">
81
+ <span>审批时间</span>
82
+ <span>{{ item.createDate }}</span>
83
+ </div>
84
+ <div
85
+ v-if="
86
+ item.metaAnnexList &&
87
+ item.metaAnnexList.length
88
+ "
89
+ class="seal-list__item--attch"
90
+ @click="viewList(item.metaAnnexList)"
91
+ >
92
+ <span>查看附件</span>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </template>
97
+ <div v-else class="textnone">暂无数据</div>
98
+ </div>
99
+ <slot v-if="item.type == 'slot'" :name="item.slot"></slot>
100
+ </div>
101
+ </div>
102
+ <TopPopup
103
+ v-bind:visible="visible"
104
+ v-on:update:visible="(val) => (visible = val)"
105
+ ref="TopPopup"
106
+ titleText="附件列表"
107
+ isDrawer
108
+ :isIndex="5"
109
+ >
110
+ <ViewAttchList :inList="inList"></ViewAttchList>
111
+ </TopPopup>
112
+ <TopPopup
113
+ v-bind:visible="visibleTack"
114
+ v-on:update:visible="(val) => (visibleTack = val)"
115
+ ref="TopPopups"
116
+ titleText="流程信息"
117
+ isDrawer
118
+ width="60vw"
119
+ >
120
+ <template v-if="trackListss && trackListss.length">
121
+ <div
122
+ v-for="(item, index) in trackListss"
123
+ :key="item.id"
124
+ class="seal-list__item"
125
+ >
126
+ <div>
127
+ <div class="seal-list__item--option">
128
+ <span>序号</span>
129
+ <span style="max-width: 100px;">{{ item.no }}</span>
130
+ </div>
131
+ <div class="seal-list__item--option">
132
+ <span>节点名称</span>
133
+ <span style="max-width: 100px;"
134
+ >{{ item.name
135
+ }}{{
136
+ item.type !== "普通" ? `[${item.type}]` : ""
137
+ }}</span
138
+ >
139
+ </div>
140
+ <div class="seal-list__item--option">
141
+ <span>审批人</span>
142
+ <span style="max-width: 100px;">{{
143
+ item.assigneeNames
144
+ }}</span>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ </template>
149
+ </TopPopup>
150
+ </div>
151
+ </template>
152
+ <script src="./index.js"></script>
153
+ <style lang="scss" scoped>
154
+ @import "./index.scss";
155
+ </style>
@@ -0,0 +1,80 @@
1
+ import { defineComponent } from "vue-demi";
2
+ import error from "@/assets/status/error.png";
3
+ import loading from "@/assets/status/loading.png";
4
+ import success from "@/assets/status/success.png";
5
+
6
+ export default defineComponent({
7
+ name: "TopTips",
8
+ props: {
9
+ text: { default: "", type: String }, // tips文本展示
10
+ type: { default: "default", type: String }, // tips 类型 (success, error, loading)
11
+ statusTips: { default: false, type: Boolean }, // 开启状态展示
12
+ domNode: { default: "", type: String },
13
+ visible: { default: false, type: Boolean },
14
+ },
15
+ data() {
16
+ return {
17
+ show: false,
18
+ status: "",
19
+ timeOut: null,
20
+ };
21
+ },
22
+ computed: {
23
+ error() {
24
+ return error;
25
+ },
26
+ loading() {
27
+ return loading;
28
+ },
29
+ success() {
30
+ return success;
31
+ },
32
+ },
33
+ watch: {
34
+ type: {
35
+ handler(val, preVal) {
36
+ if (val == "loading") {
37
+ clearInterval(this.timeOut);
38
+ return;
39
+ } else {
40
+ this.timeOut = setTimeout(() => {
41
+ this.show = false;
42
+ }, 1500);
43
+ }
44
+ },
45
+ immediate: true,
46
+ deep: true,
47
+ },
48
+ },
49
+ mounted() {
50
+ this.$nextTick(() => {
51
+ const body = document.getElementsByClassName("process-warp")[0]
52
+ ? document.getElementsByClassName("process-warp")[0]
53
+ : document
54
+ .getElementsByClassName("sumbmitPopup-index-sumbit")[0]
55
+ .getElementsByClassName("top-popup-drawer")[0];
56
+ if (body.append) {
57
+ body.append(this.$el);
58
+ } else {
59
+ body.appendChild(this.$el);
60
+ }
61
+ });
62
+ },
63
+ methods: {
64
+ handleOpen() {
65
+ if (!this.show) {
66
+ this.show = true;
67
+ if (this.type == "loading") {
68
+ clearInterval(this.timeOut);
69
+ } else {
70
+ this.timeOut = setTimeout(() => {
71
+ this.show = false;
72
+ }, 1500);
73
+ }
74
+ }
75
+ },
76
+ handleClose() {
77
+ this.show = false;
78
+ },
79
+ },
80
+ });
@@ -0,0 +1,121 @@
1
+ .top-tipss {
2
+ position: absolute;
3
+ z-index: 2999;
4
+ top: 50%;
5
+ left: 50%;
6
+ -webkit-transform: translate(-50%, -50%);
7
+ transform: translate(-50%, -50%);
8
+ text-align: center;
9
+ max-width: 80%;
10
+ transition: all 0.3s ease;
11
+ visibility: hidden;
12
+ opacity: 0;
13
+ }
14
+
15
+ .top-tipss-animal {
16
+ animation: shows 1.5s ease;
17
+ }
18
+
19
+ .top-tipss-mask {
20
+ position: fixed;
21
+ width: 100vw;
22
+ height: 100vh;
23
+ background-color: #000;
24
+ opacity: 0.7;
25
+ top: 0;
26
+ left: 0;
27
+ z-index: 1999;
28
+ transition: all 0.3s ease;
29
+ }
30
+
31
+ .top-tipss-text {
32
+ display: inline-block;
33
+ vertical-align: middle;
34
+ color: #fff;
35
+ padding: 10px 20px;
36
+ border-radius: 5px;
37
+ font-size: 13px;
38
+ text-align: center;
39
+ max-width: 100%;
40
+ word-break: break-all;
41
+ white-space: normal;
42
+ background-color: rgba(17, 17, 17, 0.7);
43
+ }
44
+ .top-tipss-status {
45
+ width: 120px;
46
+ height: 120px;
47
+ border-radius: 12px;
48
+ background-color: rgba(17, 17, 17, 0.7);
49
+ display: flex;
50
+ }
51
+
52
+ .top-tipss-loadinig,
53
+ .top-tipss-success,
54
+ .top-tipss-error {
55
+ width: 100%;
56
+ height: 100%;
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ flex-direction: column;
61
+ }
62
+
63
+ .top-tipss-loadinig img,
64
+ .top-tipss-success img,
65
+ .top-tipss-error img {
66
+ width: 40px;
67
+ height: 40px;
68
+ }
69
+
70
+ .top-tipss-loadinig img {
71
+ -webkit-animation: rotation 0.8s linear infinite;
72
+ animation: rotation 0.8s linear infinite;
73
+ }
74
+
75
+ .top-tipss-status-text {
76
+ color: #fff;
77
+ font-size: 12px;
78
+ padding: 10px 5px 0;
79
+ }
80
+
81
+ @-webkit-keyframes rotation {
82
+ 0% {
83
+ transform: rotate(0deg);
84
+ }
85
+ 100% {
86
+ transform: rotate(360deg);
87
+ }
88
+ }
89
+
90
+ .fade-enter,
91
+ .fade-leave-to {
92
+ visibility: hidden;
93
+ opacity: 0;
94
+ }
95
+ .fade-enter-active,
96
+ .fade-leave-active {
97
+ transition: opacity 2s;
98
+ }
99
+
100
+ @keyframes shows {
101
+ 0% {
102
+ visibility: hidden;
103
+ opacity: 0;
104
+ }
105
+ 25% {
106
+ visibility: hidden;
107
+ opacity: 0.5;
108
+ }
109
+ 50% {
110
+ visibility: visible;
111
+ opacity: 1;
112
+ }
113
+ 75% {
114
+ visibility: hidden;
115
+ opacity: 0.5;
116
+ }
117
+ 100% {
118
+ visibility: hidden;
119
+ opacity: 0.5;
120
+ }
121
+ }
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <div v-if="show">
3
+ <div
4
+ v-if="!statusTips"
5
+ class="top-tipss"
6
+ :style="
7
+ show
8
+ ? 'visibility: visible; opacity: 1;'
9
+ : 'visibility: hidden; opacity: 0;'
10
+ "
11
+ >
12
+ <div v-if="text" class="top-tipss-text">{{ text }}</div>
13
+ </div>
14
+ <div
15
+ v-else
16
+ class="top-tipss"
17
+ :style="
18
+ show
19
+ ? 'visibility: visible; opacity: 1;'
20
+ : 'visibility: hidden; opacity: 0;'
21
+ "
22
+ >
23
+ <div class="top-tipss-status">
24
+ <div class="top-tipss-loadinig" v-if="type == 'loading'">
25
+ <img :src="loading" />
26
+ <div v-if="text" class="top-tipss-status-text">
27
+ {{ text }}
28
+ </div>
29
+ </div>
30
+ <div class="top-tipss-success" v-if="type == 'success'">
31
+ <img :src="success" />
32
+ <div v-if="text" class="top-tipss-status-text">
33
+ {{ text }}
34
+ </div>
35
+ </div>
36
+ <div class="top-tipss-error" v-if="type == 'error'">
37
+ <img :src="error" />
38
+ <div v-if="text" class="top-tipss-status-text">
39
+ {{ text }}
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ <div
45
+ class="top-tipss-mask"
46
+ :style="
47
+ show && statusTips
48
+ ? 'visibility: visible; opacity: .7;'
49
+ : 'visibility: hidden; opacity: 0;'
50
+ "
51
+ ></div>
52
+ </div>
53
+ </template>
54
+ <script src="./index.js"></script>
55
+ <style lang="scss" scoped>
56
+ @import "./index.scss";
57
+ </style>
@@ -0,0 +1,134 @@
1
+ import { defineComponent } from "vue-demi";
2
+ import dsBridge from "dsbridge";
3
+
4
+ import PreView from "../preview/index.vue";
5
+ import TopPopup from "../popup/index.vue";
6
+ import PreviewImage from "../previewImage/index.vue";
7
+
8
+ import del from "@/assets/img/del.png";
9
+ import doc from "@/assets/img/doc.png";
10
+ import file from "@/assets/img/file.png";
11
+ import image from "@/assets/img/image.png";
12
+ import pdf from "@/assets/img/pdf.png";
13
+ import xls from "@/assets/img/xls.png";
14
+ import zip from "@/assets/img/zip.png";
15
+
16
+ export default defineComponent({
17
+ name: "ViewAttchList",
18
+ components: {
19
+ PreView,
20
+ TopPopup,
21
+ PreviewImage,
22
+ },
23
+ computed: {
24
+ del() {
25
+ return del;
26
+ },
27
+ doc() {
28
+ return doc;
29
+ },
30
+ file() {
31
+ return file;
32
+ },
33
+ image() {
34
+ return image;
35
+ },
36
+ pdf() {
37
+ return pdf;
38
+ },
39
+ xls() {
40
+ return xls;
41
+ },
42
+ zip() {
43
+ return zip;
44
+ },
45
+ },
46
+ props: {
47
+ inList: {
48
+ type: Array,
49
+ default: () => [],
50
+ },
51
+ },
52
+ data() {
53
+ return {
54
+ listData: [],
55
+ imgIcon: ["jpg", "jpge", "png", "gif"],
56
+ docIcon: ["doc", "docx"],
57
+ xlsIcon: ["xls", "xlsx"],
58
+ zipIcon: ["zip", "rar", "7z"],
59
+ preList: [],
60
+ fileUrl: "",
61
+ visible: false,
62
+
63
+ visibleImg: false,
64
+ lists: [],
65
+ indexd: 0,
66
+ };
67
+ },
68
+ watch: {
69
+ inList: {
70
+ handler(val, preVal) {
71
+ if (val.length) {
72
+ this.listData = val;
73
+
74
+ this.lists = [];
75
+ let arr = [];
76
+ val.map((v, i) => {
77
+ if (
78
+ this.imgIcon.includes(
79
+ v.name.substring(v.name.lastIndexOf(".") + 1)
80
+ )
81
+ ) {
82
+ }
83
+ });
84
+ arr = val.filter((value) => {
85
+ return this.imgIcon.includes(
86
+ value.name.substring(
87
+ value.name.lastIndexOf(".") + 1
88
+ )
89
+ );
90
+ });
91
+ arr.forEach((v, i) => {
92
+ this.lists.push(v.url);
93
+ });
94
+ }
95
+ },
96
+ immediate: true,
97
+ deep: true,
98
+ },
99
+ },
100
+ methods: {
101
+ viewFile(val) {
102
+ if (
103
+ this.imgIcon.includes(
104
+ val.url.substring(val.url.lastIndexOf(".") + 1)
105
+ )
106
+ ) {
107
+ this.visibleImg = true;
108
+ this.indexd = this.lists.indexOf(val.url);
109
+ } else {
110
+ this.fileUrl = val.url;
111
+ this.visible = true;
112
+ }
113
+ },
114
+ loadFile(val) {
115
+ // console.log("loadFile", val);
116
+
117
+ if (dsBridge.hasNativeMethod("vueUpLoadFile")) {
118
+ let res = dsBridge.call("vueUpLoadFile", val.url);
119
+ } else {
120
+ if (
121
+ "undefined" != typeof nativeMethod &&
122
+ nativeMethod?.vueUpLoadFile
123
+ ) {
124
+ nativeMethod.vueUpLoadFile(val.url);
125
+ return false;
126
+ }
127
+ const a = document.createElement("a");
128
+ a.download = val.url?.match(/([^\/]+)$/g)[0];
129
+ a.href = val.url;
130
+ a.click();
131
+ }
132
+ },
133
+ },
134
+ });
@@ -0,0 +1,76 @@
1
+ .wrap-header {
2
+ height: 40px;
3
+ width: 100%;
4
+ display: flex;
5
+ align-items: center;
6
+ padding: 0 10px;
7
+ }
8
+ .wrap-header-back {
9
+ transform: rotateY(180deg);
10
+ width: 18px;
11
+ height: 18px;
12
+
13
+ }
14
+ .wrap-header-back img {
15
+ width: 100%;
16
+ height: 100%;
17
+ }
18
+ .wrap-header-title {
19
+ padding-left: calc(50% - 54px);
20
+ font-size: 18px;
21
+ color: #333;
22
+ }
23
+
24
+ .attch-list {
25
+ width: 100%;
26
+ }
27
+ .list-items {
28
+ display: flex;
29
+ margin-top: 18px;
30
+ padding: 0 20px 0 10px;
31
+ }
32
+
33
+ .list-items-icon {
34
+ width: 36px;
35
+ height: 40px;
36
+ margin-right: 10px;
37
+ line-height: 44px;
38
+ }
39
+ .list-items-icon .icon-img {
40
+ width: 100%;
41
+ height: 100%;
42
+ }
43
+
44
+ .list-items-info {
45
+ width: 225px;
46
+ }
47
+
48
+ .info-name {
49
+ font-size: 15px;
50
+ color: #333;
51
+ overflow-wrap: break-word;
52
+ }
53
+ .info-attribute {
54
+ color: #999;
55
+ font-size: 13px;
56
+ margin-top: 4px;
57
+ }
58
+ .info-attribute-time {
59
+ margin-right: 10px;
60
+ }
61
+
62
+ .list-items-download {
63
+ width: 26px;
64
+ margin-left: auto;
65
+ color: #1389ff;
66
+ font-size: 13px;
67
+ line-height: 44px;
68
+ white-space: nowrap;
69
+ }
70
+
71
+ .attch-list--white {
72
+ text-align: center;
73
+ margin-top: 50%;
74
+ font-size: 15px;
75
+ color: #333;
76
+ }