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 CHANGED
@@ -1,73 +1,72 @@
1
- {
2
- "name": "ui-process-h5",
3
- "private": false,
4
- "description": "流程组件",
5
- "version": "0.1.29",
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
- "ui-process-h5": "^0.1.29",
34
- "vue": "^3.2.47",
35
- "vue-demi": "^0.14.0"
36
- },
37
- "devDependencies": {
38
- "@commitlint/cli": "^17.0.0",
39
- "@commitlint/config-conventional": "^17.0.0",
40
- "@types/node": "^18.15.12",
41
- "@types/sass": "^1.43.1",
42
- "@typescript-eslint/eslint-plugin": "^5.27.0",
43
- "@typescript-eslint/parser": "^5.27.0",
44
- "@vitejs/plugin-vue": "^4.1.0",
45
- "@vitejs/plugin-vue-jsx": "^2.0.0",
46
- "axios": "^1.3.5",
47
- "chalk": "^4.1.2",
48
- "commitizen": "^4.2.4",
49
- "cross-env": "^7.0.3",
50
- "cz-conventional-changelog": "^3.3.0",
51
- "eslint": "^8.17.0",
52
- "eslint-config-prettier": "^8.5.0",
53
- "eslint-define-config": "^1.5.0",
54
- "eslint-plugin-prettier": "^4.0.0",
55
- "eslint-plugin-vue": "^9.1.0",
56
- "good-storage": "^1.1.1",
57
- "husky": "^8.0.1",
58
- "js-cookie": "^3.0.1",
59
- "prettier": "^2.6.2",
60
- "rimraf": "^3.0.2",
61
- "sass": "^1.49.7",
62
- "standard-version": "^9.5.0",
63
- "typescript": "^4.9.3",
64
- "vite": "^4.2.0",
65
- "vite-plugin-dts": "^1.2.0",
66
- "vite-plugin-md": "^0.15.0",
67
- "vue": "^3.2.47",
68
- "vue-tsc": "^1.2.0"
69
- },
70
- "engines": {
71
- "node": ">=16.0.0"
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
+ }
@@ -1,5 +1,4 @@
1
- import TopTab from "./components/tab";
2
1
  import TopProcess from "./components/process";
3
2
 
4
- export default [TopTab, TopProcess];
5
- export { TopTab, TopProcess };
3
+ export default [TopProcess];
4
+ export { TopProcess };
@@ -1,4 +1,4 @@
1
- import { App } from "vue";
1
+ import { App } from "vue-demi";
2
2
  import TopProcess from "./src/index.vue";
3
3
 
4
4
  TopProcess.install = function (app: App) {
@@ -13,32 +13,30 @@ export default defineComponent({
13
13
  props: {
14
14
  type: { default: "default", type: String },
15
15
  },
16
- data() {
17
- return {
18
- style: {
19
- type: Object,
20
- default: {
21
- textColor: "#fff",
22
- bckColor: "3c9cff",
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
- this.style.textColor = "#fff";
31
- this.style.bckColor = "#3c9cff";
24
+ style.value.textColor = "#fff";
25
+ style.value.bckColor = "#3c9cff";
32
26
  break;
33
27
  case "danger":
34
- this.style.textColor = "rgb(255, 96, 96)";
35
- this.style.bckColor = "rgb(255, 230, 230)";
28
+ style.value.textColor = "rgb(255, 96, 96)";
29
+ style.value.bckColor = "rgb(255, 230, 230)";
36
30
  break;
37
31
  case "default":
38
- this.style.textColor = "rgb(51, 51, 51)";
39
- this.style.bckColor = "rgb(241, 241, 241)";
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 "../../tab";
88
- import TopPopup from "../../popup";
89
- import TopButton from "../../button";
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: any) {
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
- /* getProcessStatus({
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 lang="ts">
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: { require: false, default: true, type: Boolean },
39
- isMaskClose: { require: false, default: true, type: Boolean },
38
+ isMask: { default: true, type: Boolean },
39
+ isMaskClose: { default: true, type: Boolean },
40
40
  },
41
41
  setup(props) {
42
- const show = ref<boolean>(false);
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 lang="ts">
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: any) {
120
+ setup(props) {
121
121
  // 流程图
122
- const trackUrl = ref<string>(
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<any>([
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<string>("");
146
+ const active = ref("");
147
147
 
148
148
  // tab 渲染
149
- const defaultTabList = ref<any>([
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<any>([
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<any>();
191
+ const label = ref();
192
192
 
193
193
  // taskNode taskObj
194
194
 
195
195
  /* method */
196
196
  // 选中方法
197
- const handleActive = (e: string, i: number) => {
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: number) => {
206
+ const tabAnimation = (i) => {
207
207
  if (label.value.length) {
208
- let doc = <any>(
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: any, i: number) => {
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>
@@ -1,6 +1,6 @@
1
1
  import request from "./request";
2
2
 
3
- const proxyStr = "/aws";
3
+ const proxyStr = "/prod-api/aws";
4
4
 
5
5
  export function getProcessStatus(query: any) {
6
6
  return request({
@@ -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 api = process.env.VUE_APP_BASE_API;
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: `${host}${api}`,
15
+ baseURL: host,
18
16
  timeout: 999999999,
19
17
  errorTip: true,
20
18
  transformResponse: [
package/packages/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { App } from "vue";
2
2
  import components from "./component";
3
- // import Design from 'ui-process-h5/lib/design.js'
4
3
 
5
4
  // 完整引入组件
6
5
  const install = function (app: App) {
@@ -1,9 +0,0 @@
1
- import { App, createApp } from "vue";
2
- import TopButton from "./src/index.vue";
3
-
4
- TopButton.install = function (app: App) {
5
- // 组件注册,按需引入
6
- app.component(TopButton.name, TopButton);
7
- return app;
8
- };
9
- export default TopButton;
@@ -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;
@@ -1,9 +0,0 @@
1
- import { App } from "vue";
2
- import TopTab from "./src/index.vue";
3
-
4
- TopTab.install = function (app: App) {
5
- // 组件注册,按需引入
6
- app.component(TopTab.name, TopTab);
7
- return app;
8
- };
9
- export default TopTab;