n20-common-lib 1.2.36 → 1.2.39

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,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "1.2.36",
3
+ "version": "1.2.39",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -14,7 +14,12 @@ export default {
14
14
  // blobUrl: {
15
15
  // type: String,
16
16
  // default: undefined
17
- // }
17
+ // },
18
+ },
19
+ inject: {
20
+ procInstId: {
21
+ from: 'procInstId'
22
+ }
18
23
  },
19
24
  data() {
20
25
  return {
@@ -24,7 +29,7 @@ export default {
24
29
  created() {
25
30
  axios
26
31
  .get('/bems/activiti/sample/Q004', {
27
- procInstId: this.$route.query.processInstanceId
32
+ procInstId: this.procInstId
28
33
  })
29
34
  .then(({ data }) => {
30
35
  if (data) {
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <div>
3
+ <el-button plain size="mini" :disabled="false" @click="imgV = true"
4
+ >流程图查看</el-button
5
+ >
6
+ <el-dialog
7
+ title="查看流程"
8
+ :visible.sync="imgV"
9
+ width="65%"
10
+ class="p-a-0"
11
+ append-to-body
12
+ top="10vh"
13
+ >
14
+ <approvalImg
15
+ :proc-inst-id="procInstId"
16
+ class="text-c p-a"
17
+ style="height: 70vh; overflow: auto"
18
+ />
19
+ </el-dialog>
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ import approvalImg from './approvalImg.vue'
25
+ export default {
26
+ name: 'FlowDialog',
27
+ components: {
28
+ approvalImg
29
+ },
30
+ props: {
31
+ procInstId: {
32
+ type: String,
33
+ default: ''
34
+ }
35
+ },
36
+ provide() {
37
+ return { procInstId: this.$route.query.procInstId || this.procInstId }
38
+ },
39
+ data() {
40
+ return {
41
+ imgV: false
42
+ }
43
+ }
44
+ }
45
+ </script>
@@ -139,6 +139,9 @@ export default {
139
139
  }
140
140
  },
141
141
  created() {
142
+ clearTimeout(this.getNNumTimeOut)
143
+ this.getNNumTimeOut = setInterval(this.getNNum, 1000 * 60 * 2)
144
+
142
145
  this.getNNum()
143
146
  },
144
147
  methods: {
@@ -228,6 +231,19 @@ export default {
228
231
  }
229
232
  })
230
233
  }
234
+ if (item.readState === '0') {
235
+ this.$axios
236
+ .put(
237
+ `/bems/wkb/messageCenter/batchUpdate`,
238
+ { ids: [item.id], type: '1' },
239
+ { loading: false, noMsg: true }
240
+ )
241
+ .then(() => {
242
+ item.readState = '1'
243
+ this.noticeNum = this.noticeNum - 1
244
+ this.numC = this.numC - 1
245
+ })
246
+ }
231
247
  },
232
248
  seeDetailsAffiche(item) {
233
249
  if (this.$route.path === '/notice/views') {
@@ -1,90 +1,90 @@
1
- <template>
2
- <div v-loading="loadingV">
3
- <canvas
4
- ref="qr-canvas"
5
- style="display: block; width: 212px; height: 212px; margin: 0 auto"
6
- ></canvas>
7
- <div
8
- class="text-r"
9
- style="font-size: 12px; color: #3d4a57; margin-bottom: -8px"
10
- >
11
- 请使用网银移动端扫码免Ukey登录<el-button
12
- class="m-l-s"
13
- type="text"
14
- @click="refreshQrCode"
15
- >
16
- <i class="el-icon-refresh"></i>
17
- 刷新</el-button
18
- >
19
- </div>
20
- </div>
21
- </template>
22
- <script>
23
- import QRCode from 'qrcode'
24
- import axios from '../../utils/axios'
25
-
26
- export default {
27
- data() {
28
- this.timeA = undefined
29
- return {
30
- loadingV: false,
31
- qrCode: ''
32
- }
33
- },
34
- created() {
35
- this.getQrcode()
36
- },
37
- beforeDestroy() {
38
- clearTimeout(this.timeA)
39
- },
40
- methods: {
41
- getQrcode() {
42
- this.loadingV = true
43
- let loading = () => {
44
- setTimeout(() => {
45
- this.loadingV = false
46
- }, 500)
47
- }
48
-
49
- axios
50
- .get('/bems/prod_1.0/uas/api/qrCode', null, { loading })
51
- .then(({ data }) => {
52
- this.qrCode = data.qrCode
53
-
54
- let qrCanvas = this.$refs['qr-canvas']
55
- let width = qrCanvas.clientWidth
56
-
57
- QRCode.toCanvas(this.$refs['qr-canvas'], this.qrCode, {
58
- width: width,
59
- height: width,
60
- margin: 1
61
- })
62
-
63
- this.getQrCodePwd()
64
- })
65
- },
66
- refreshQrCode() {
67
- this.getQrcode()
68
- },
69
- getQrCodePwd() {
70
- axios
71
- .get(`/bems/prod_1.0/uas/api/qrCode/${this.qrCode}`, null, {
72
- loading: false
73
- })
74
- .then(({ data }) => {
75
- clearTimeout(this.timeA)
76
- if (data.status === 3) {
77
- this.QrcodeLogin(data)
78
- } else {
79
- this.timeA = setTimeout(() => {
80
- this.getQrCodePwd()
81
- }, 2000)
82
- }
83
- })
84
- },
85
- QrcodeLogin({ userNo, qrcode }) {
86
- this.$emit('qrcode-login', { userNo, qrcode })
87
- }
88
- }
89
- }
90
- </script>
1
+ <template>
2
+ <div v-loading="loadingV">
3
+ <canvas
4
+ ref="qr-canvas"
5
+ style="display: block; width: 212px; height: 212px; margin: 0 auto"
6
+ ></canvas>
7
+ <div
8
+ class="text-r"
9
+ style="font-size: 12px; color: #3d4a57; margin-bottom: -8px"
10
+ >
11
+ 请使用网银移动端扫码免Ukey登录<el-button
12
+ class="m-l-s"
13
+ type="text"
14
+ @click="refreshQrCode"
15
+ >
16
+ <i class="el-icon-refresh"></i>
17
+ 刷新</el-button
18
+ >
19
+ </div>
20
+ </div>
21
+ </template>
22
+ <script>
23
+ import QRCode from 'qrcode'
24
+ import axios from '../../utils/axios'
25
+
26
+ export default {
27
+ data() {
28
+ this.timeA = undefined
29
+ return {
30
+ loadingV: false,
31
+ qrCode: ''
32
+ }
33
+ },
34
+ created() {
35
+ this.getQrcode()
36
+ },
37
+ beforeDestroy() {
38
+ clearTimeout(this.timeA)
39
+ },
40
+ methods: {
41
+ getQrcode() {
42
+ this.loadingV = true
43
+ let loading = () => {
44
+ setTimeout(() => {
45
+ this.loadingV = false
46
+ }, 500)
47
+ }
48
+
49
+ axios
50
+ .get('/bems/prod_1.0/uas/api/qrCode', null, { loading })
51
+ .then(({ data }) => {
52
+ this.qrCode = data.qrCode
53
+
54
+ let qrCanvas = this.$refs['qr-canvas']
55
+ let width = qrCanvas.clientWidth
56
+
57
+ QRCode.toCanvas(this.$refs['qr-canvas'], this.qrCode, {
58
+ width: width,
59
+ height: width,
60
+ margin: 1
61
+ })
62
+
63
+ this.getQrCodePwd()
64
+ })
65
+ },
66
+ refreshQrCode() {
67
+ this.getQrcode()
68
+ },
69
+ getQrCodePwd() {
70
+ axios
71
+ .get(`/bems/prod_1.0/uas/api/qrCode/${this.qrCode}`, null, {
72
+ loading: false
73
+ })
74
+ .then(({ data }) => {
75
+ clearTimeout(this.timeA)
76
+ if (data.status === 3) {
77
+ this.QrcodeLogin(data)
78
+ } else {
79
+ this.timeA = setTimeout(() => {
80
+ this.getQrCodePwd()
81
+ }, 2000)
82
+ }
83
+ })
84
+ },
85
+ QrcodeLogin({ userNo, qrcode }) {
86
+ this.$emit('qrcode-login', { userNo, qrcode })
87
+ }
88
+ }
89
+ }
90
+ </script>
@@ -1,73 +1,73 @@
1
- import forEachs from '../../utils/forEachs'
2
- import list2tree from '../../utils/list2tree'
3
-
4
- export function siteTree2menus(siteTree) {
5
- let list_1 = []
6
-
7
- forEachs(siteTree, (item) => {
8
- if (item.resType === '1' || item.resType === '2') {
9
- list_1.push(item)
10
- }
11
- })
12
-
13
- let list_2 = []
14
- list_1.forEach((item) => {
15
- let menuObj = {
16
- menuid: item.menuid,
17
- pmid: item.pmid,
18
- sortnum: item.sortnum ? Number(item.sortnum) : item.menuid,
19
- appNo: item.appNo || undefined,
20
- title: item.label
21
- }
22
- if (/^http(s)?:|\/\//.test(item.pageurl)) {
23
- menuObj.href = item.pageurl
24
- } else {
25
- menuObj.route = item.pageurl
26
- }
27
-
28
- if (/\//.test(item.logo)) {
29
- menuObj.iconUrl = item.logo
30
- } else {
31
- menuObj.iconClass = item.logo
32
- }
33
-
34
- if (item.resType === '2') {
35
- menuObj.hide = true
36
- }
37
-
38
- list_2.push(menuObj)
39
- })
40
-
41
- return list2tree(list_2, 'menuid', 'pmid', 'children', 'sortnum')
42
- }
43
-
44
- export function siteTree2RelaNos(siteTree) {
45
- let relaNos = []
46
- siteTree.forEach((m) => {
47
- let oRelaObj = relaNos.find((item) => item.appNo === m.appNo)
48
- if (oRelaObj) {
49
- m.treeno && oRelaObj.relaNos.push(m.treeno)
50
- if (Array.isArray(m.children)) {
51
- forEachs(m.children, (item) => {
52
- item.treeno && oRelaObj.relaNos.push(item.treeno)
53
- })
54
- }
55
- } else {
56
- oRelaObj = {
57
- appNo: m.appNo,
58
- label: m.label,
59
- pageurl: m.pageurl,
60
- relaNos: []
61
- }
62
-
63
- m.treeno && oRelaObj.relaNos.push(m.treeno)
64
- if (Array.isArray(m.children)) {
65
- forEachs(m.children, (item) => {
66
- item.treeno && oRelaObj.relaNos.push(item.treeno)
67
- })
68
- }
69
- relaNos.push(oRelaObj)
70
- }
71
- })
72
- return relaNos
73
- }
1
+ import forEachs from '../../utils/forEachs'
2
+ import list2tree from '../../utils/list2tree'
3
+
4
+ export function siteTree2menus(siteTree) {
5
+ let list_1 = []
6
+
7
+ forEachs(siteTree, (item) => {
8
+ if (item.resType === '1' || item.resType === '2') {
9
+ list_1.push(item)
10
+ }
11
+ })
12
+
13
+ let list_2 = []
14
+ list_1.forEach((item) => {
15
+ let menuObj = {
16
+ menuid: item.menuid,
17
+ pmid: item.pmid,
18
+ sortnum: item.sortnum ? Number(item.sortnum) : item.menuid,
19
+ appNo: item.appNo || undefined,
20
+ title: item.label
21
+ }
22
+ if (/^http(s)?:|\/\//.test(item.pageurl)) {
23
+ menuObj.href = item.pageurl
24
+ } else {
25
+ menuObj.route = item.pageurl
26
+ }
27
+
28
+ if (/\//.test(item.logo)) {
29
+ menuObj.iconUrl = item.logo
30
+ } else {
31
+ menuObj.iconClass = item.logo
32
+ }
33
+
34
+ if (item.resType === '2') {
35
+ menuObj.hide = true
36
+ }
37
+
38
+ list_2.push(menuObj)
39
+ })
40
+
41
+ return list2tree(list_2, 'menuid', 'pmid', 'children', 'sortnum')
42
+ }
43
+
44
+ export function siteTree2RelaNos(siteTree) {
45
+ let relaNos = []
46
+ siteTree.forEach((m) => {
47
+ let oRelaObj = relaNos.find((item) => item.appNo === m.appNo)
48
+ if (oRelaObj) {
49
+ m.treeno && oRelaObj.relaNos.push(m.treeno)
50
+ if (Array.isArray(m.children)) {
51
+ forEachs(m.children, (item) => {
52
+ item.treeno && oRelaObj.relaNos.push(item.treeno)
53
+ })
54
+ }
55
+ } else {
56
+ oRelaObj = {
57
+ appNo: m.appNo,
58
+ label: m.label,
59
+ pageurl: m.pageurl,
60
+ relaNos: []
61
+ }
62
+
63
+ m.treeno && oRelaObj.relaNos.push(m.treeno)
64
+ if (Array.isArray(m.children)) {
65
+ forEachs(m.children, (item) => {
66
+ item.treeno && oRelaObj.relaNos.push(item.treeno)
67
+ })
68
+ }
69
+ relaNos.push(oRelaObj)
70
+ }
71
+ })
72
+ return relaNos
73
+ }
package/src/index.js CHANGED
@@ -45,6 +45,7 @@ import AnchorItem from './components/Anchor/AnchorItem.vue'
45
45
  import FlowStep from './components/FlowStep/index.vue'
46
46
  import CascaderArea from './components/CascaderArea/index.vue'
47
47
  import FileExportAsync from './components/FileExportAsync/index.vue'
48
+ import FlowDialog from './components/ApprovalRecord/flowDialog.vue'
48
49
  /* old */
49
50
  import TableO from './components/Table/indexO.vue'
50
51
  import FiltersO from './components/Filters/indexO.vue'
@@ -126,6 +127,7 @@ const components = [
126
127
  FlowStep,
127
128
  CascaderArea,
128
129
  FileExportAsync,
130
+ FlowDialog,
129
131
  /* old */
130
132
  TableO,
131
133
  FiltersO,
@@ -225,5 +227,6 @@ export {
225
227
  AnchorItem,
226
228
  FlowStep,
227
229
  CascaderArea,
228
- FileExportAsync
230
+ FileExportAsync,
231
+ FlowDialog
229
232
  }
@@ -192,8 +192,8 @@ customAxios.post = function (url, data = {}, opt = {}) {
192
192
  return request(Object.assign({ method: 'post', url, data }, opt))
193
193
  }
194
194
  /** @returns {Promise} */
195
- customAxios.put = function (url, data = {}, params = {}, opt = {}) {
196
- return this.request(Object.assign({ method: 'put', url, data, params }, opt))
195
+ customAxios.put = function (url, data = {}, opt = {}) {
196
+ return this.request(Object.assign({ method: 'put', url, data }, opt))
197
197
  }
198
198
  /** @returns {Promise} */
199
199
  customAxios.delete = function (url, params = {}, opt = {}) {
@@ -40,11 +40,11 @@ function repairPopper() {
40
40
  export default function (ElementUI) {
41
41
  repairPopper()
42
42
 
43
- setPropsDefault(ElementUI.Table, {
44
- tooltipEffect: {
45
- default: 'light'
46
- }
47
- })
43
+ // setPropsDefault(ElementUI.Table, {
44
+ // tooltipEffect: {
45
+ // default: 'light'
46
+ // }
47
+ // })
48
48
 
49
49
  setPropsDefault(ElementUI.TableColumn, {
50
50
  filterPlacement: {
Binary file
Binary file
Binary file
Binary file