n20-common-lib 2.9.13 → 2.9.14

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 (130) hide show
  1. package/nstc-g6/components/NstcCharts/NstcCharts.vue +16 -8
  2. package/package.json +8 -5
  3. package/src/assets/css/approve-card.scss +1 -1
  4. package/src/assets/css/date-quarter.scss +8 -0
  5. package/src/assets/css/expandable-pane.scss +7 -0
  6. package/src/assets/css/file-upload-table.scss +2 -3
  7. package/src/assets/css/font-icon.scss +3 -1
  8. package/src/assets/css/message.scss +6 -6
  9. package/src/assets/css/normalize.scss +4 -1
  10. package/src/assets/css/table.scss +16 -11
  11. package/src/assets/iconFont/SIMSUN.ttf +0 -0
  12. package/src/assets/iconFont/font.css +4 -0
  13. package/src/components/AIButton/index.vue +101 -0
  14. package/src/components/AdvancedFilter/formItemRender.vue +7 -4
  15. package/src/components/AdvancedFilter/index.vue +6 -7
  16. package/src/components/Anchor/index.vue +1 -0
  17. package/src/components/ApprovalButtons/index.vue +404 -82
  18. package/src/components/ApprovalButtons/indexApp.vue +1102 -0
  19. package/src/components/ApprovalButtons/selectSpr.vue +128 -0
  20. package/src/components/ApprovalButtons/setCarboncopyProp.vue +1 -1
  21. package/src/components/ApprovalButtons/setRejectToProp.vue +45 -5
  22. package/src/components/ApprovalButtons/showAppOpi.vue +265 -8
  23. package/src/components/ApprovalButtons/showOtherAttrNew.vue +161 -0
  24. package/src/components/ApprovalCard/index.vue +190 -44
  25. package/src/components/ApprovalCard/indexApp.vue +592 -0
  26. package/src/components/ApprovalRecord/approvalImgPro/child.vue +1 -1
  27. package/src/components/ApprovalRecord/approvalImgPro/index.vue +42 -5
  28. package/src/components/ApprovalRecord/index.vue +23 -6
  29. package/src/components/ApprovalRecord/indexApp.vue +79 -0
  30. package/src/components/AttachmentPass/index.vue +286 -0
  31. package/src/components/Button/button-group.vue +3 -1
  32. package/src/components/CascaderArea/index.vue +5 -6
  33. package/src/components/DatePicker/por.vue +31 -1
  34. package/src/components/DateSelect/quarterDatePicker.vue +23 -1
  35. package/src/components/Descriptions/index.vue +7 -3
  36. package/src/components/Dialog/index.vue +4 -0
  37. package/src/components/Diff/index.vue +4 -2
  38. package/src/components/DynamicField/DynamicField.vue +29 -6
  39. package/src/components/DynamicField/DynamicFieldMixin.js +13 -5
  40. package/src/components/DynamicField/DynamicFieldOptions.vue +135 -62
  41. package/src/components/DynamicField/DynamicTable.vue +11 -1
  42. package/src/components/DynamicField/contentPop.vue +110 -0
  43. package/src/components/DynamicField/tableList.vue +5 -1
  44. package/src/components/DynamicField/tableView.vue +143 -0
  45. package/src/components/ECharts/index.vue +15 -9
  46. package/src/components/Expandable/main.vue +17 -2
  47. package/src/components/FileImport/index.vue +4 -5
  48. package/src/components/FileUploadTable/FileUploadTableV3.vue +937 -0
  49. package/src/components/FileUploadTable/aiCheckDialog.vue +139 -0
  50. package/src/components/FileUploadTable/index.vue +251 -33
  51. package/src/components/FileUploadTable/jytg.svg +6 -0
  52. package/src/components/FileUploadTable/wsc.svg +3 -0
  53. package/src/components/FileUploadTable/ysc.svg +3 -0
  54. package/src/components/HandlingAdvice/index.vue +191 -0
  55. package/src/components/InputAccount/index.vue +105 -0
  56. package/src/components/InputNumber/index.vue +16 -4
  57. package/src/components/InputNumber/numberRange.vue +14 -0
  58. package/src/components/InputSearch/index.vue +8 -0
  59. package/src/components/Layout/HeaderWrap/changePwd.vue +50 -23
  60. package/src/components/Layout/HeaderWrap/index.vue +2 -2
  61. package/src/components/Layout/HeaderWrap/indexN.vue +296 -119
  62. package/src/components/Layout/SubContent/index.vue +45 -14
  63. package/src/components/Layout/indexN.vue +26 -5
  64. package/src/components/LoginTemporary/form.vue +126 -34
  65. package/src/components/LoginTemporary/index.vue +14 -3
  66. package/src/components/LoginTemporary/indexN.vue +35 -13
  67. package/src/components/Preview/index.vue +199 -0
  68. package/src/components/SelectDatePickerPro/customDatePicker.vue +7 -0
  69. package/src/components/SelectDatePickerPro/halfYearPicker.vue +165 -0
  70. package/src/components/SelectDatePickerPro/index.vue +44 -4
  71. package/src/components/SelectDatePickerPro/quarterDatePicker.vue +32 -10
  72. package/src/components/SelectTree/index.vue +10 -4
  73. package/src/components/SelectTree/pro.vue +3 -0
  74. package/src/components/ShowColumn/index copy 2.vue +545 -0
  75. package/src/components/ShowColumn/index copy.vue +566 -0
  76. package/src/components/ShowColumn/index.vue +11 -7
  77. package/src/components/Statis/statisItem.vue +8 -7
  78. package/src/components/Table/filters.js +13 -0
  79. package/src/components/Table/index.vue +4 -4
  80. package/src/components/TablePro/filterContent.vue +18 -8
  81. package/src/components/TablePro/index.js +41 -1
  82. package/src/components/TablePro/index.vue +117 -6
  83. package/src/components/TableProOperateColumn/OperateBtns.vue +11 -53
  84. package/src/components/TableProOperateColumn/OperateBtns_copy.vue +141 -0
  85. package/src/components/TableProOperateColumn/childrenOperateBtn.vue +108 -0
  86. package/src/components/TableProOperateColumn/index.vue +3 -6
  87. package/src/components/TableSetSize/index.vue +1 -1
  88. package/src/components/Tree/index.vue +21 -5
  89. package/src/components/Upload/index.vue +25 -10
  90. package/src/components/Upload/uploadMsg.vue +30 -25
  91. package/src/components/operatingStatus/index.vue +3 -4
  92. package/src/directives/VTitle/index.js +15 -5
  93. package/src/directives/watermark/index.js +140 -56
  94. package/src/i18n.json +146 -18
  95. package/src/index.js +31 -3
  96. package/src/plugins/Sign/CaMap.js +47 -8
  97. package/src/plugins/Sign/Itrus/index.js +1 -1
  98. package/src/plugins/Sign/Itrus/sign_3720.js +2 -1
  99. package/src/plugins/Sign/NetSM3/index.js +20 -11
  100. package/src/plugins/Sign/NetV3/index.js +163 -22
  101. package/src/plugins/Sign/SkfSign/index.js +55 -52
  102. package/src/plugins/Sign/bjca/index.js +229 -9
  103. package/src/plugins/Sign/hnca/index.js +5064 -0
  104. package/src/plugins/Sign/index.js +155 -103
  105. package/src/plugins/Sign/kySign/base64.js +160 -0
  106. package/src/plugins/Sign/kySign/hex.js +92 -0
  107. package/src/plugins/Sign/kySign/index.js +186 -0
  108. package/src/plugins/Sign/kySign/skf.js +937 -0
  109. package/src/plugins/Sign/kySign/test.html +463 -0
  110. package/src/plugins/Sign/sdca/index.js +73 -0
  111. package/src/plugins/Sign/sign.js +72 -52
  112. package/src/plugins/Sign/signV3/InfosecNetSignCNGAgent.min.js +1 -0
  113. package/src/plugins/Sign/signV3/sign.js +187 -0
  114. package/src/plugins/Sign/sign_back.js +172 -0
  115. package/src/utils/accountFormat.js +7 -0
  116. package/src/utils/asyncGetRelaNos.js +79 -46
  117. package/src/utils/axios.js +3 -5
  118. package/src/utils/i18n/index.js +1 -1
  119. package/src/utils/importGlobal.js +23 -12
  120. package/style/fonts/SIMSUN.5e0c362c.ttf +0 -0
  121. package/style/index.css +2 -2
  122. package/theme/blue.css +2 -2
  123. package/theme/cctcRed.css +2 -2
  124. package/theme/fonts/SIMSUN.5e0c362c.ttf +0 -0
  125. package/theme/green.css +2 -2
  126. package/theme/lightBlue.css +2 -2
  127. package/theme/orange.css +2 -2
  128. package/theme/purple.css +2 -2
  129. package/theme/red.css +2 -2
  130. package/theme/yellow.css +2 -2
@@ -0,0 +1,191 @@
1
+ <template>
2
+ <div>
3
+ <el-dialog
4
+ :visible.sync="visible"
5
+ width="600px"
6
+ :title="'提交意见' | $lc"
7
+ @close="$emit('close')"
8
+ @closed="$emit('closed')"
9
+ @open="$emit('open')"
10
+ @opened="$emit('opened')"
11
+ >
12
+ <el-form v-if="whether" style="margin-bottom: 50px">
13
+ <el-form-item>
14
+ <div slot="label">
15
+ <span v-if="optionsRequired" style="color: red">*</span>
16
+ {{ $lc('请确认提交内容') }}
17
+ </div>
18
+ <el-select v-model="reasonSelect" class="w-100p" @change="changeReasonSelect">
19
+ <el-option v-for="(item, i) in flowOptions" :key="i" :label="item.label" :value="item.value" />
20
+ </el-select>
21
+ </el-form-item>
22
+ <el-form-item>
23
+ <el-input
24
+ v-model="reason"
25
+ type="textarea"
26
+ :rows="rows"
27
+ :show-word-limit="showWordLimit"
28
+ :maxlength="maxlength"
29
+ class="w-100p"
30
+ :placeholder="placeholder"
31
+ />
32
+ </el-form-item>
33
+ </el-form>
34
+ <ExpandablePane v-if="otherAttDataA.length > 0" title="自定义项" :default-expand="true">
35
+ <el-form ref="approveBtnGroup" label-position="right" :label-width="_lang === 'zh' ? '12em' : '12em'">
36
+ <div
37
+ class="p-b-lg p-t-lg p-r-lg"
38
+ style="max-height: 150px; overflow-y: auto; border: 1px dashed var(--border-color-base); border-radius: 5px"
39
+ >
40
+ <show-other-att-new
41
+ ref="showOtherAttNew"
42
+ :form="customizationList"
43
+ :other-att-data-a="otherAttDataA"
44
+ :proc-inst-id="procInstId || this.$route.query.processInstanceId"
45
+ :required="true"
46
+ />
47
+ </div>
48
+ </el-form>
49
+ </ExpandablePane>
50
+ <span slot="footer">
51
+ <el-button type="primary" @click="submit">{{ $lc('提交') }}</el-button>
52
+ <el-button plain @click="visible = false">{{ $lc('取消') }}</el-button>
53
+ </span>
54
+ </el-dialog>
55
+ </div>
56
+ </template>
57
+
58
+ <script>
59
+ import { $lc } from '../../utils/i18n/index'
60
+ import ShowOtherAttNew from '../ApprovalButtons/showOtherAttrNew.vue'
61
+ import ExpandablePane from '../Expandable/main.vue'
62
+ export default {
63
+ name: 'HandlingAdvice',
64
+ components: { ShowOtherAttNew, ExpandablePane },
65
+ props: {
66
+ afterGetConf: {
67
+ type: Function,
68
+ default: undefined
69
+ },
70
+ beforeSubmit: {
71
+ type: Function,
72
+ default: undefined
73
+ },
74
+ maxlength: {
75
+ type: Number,
76
+ default: 150
77
+ },
78
+ showWordLimit: {
79
+ type: Boolean,
80
+ default: true
81
+ },
82
+ rows: {
83
+ type: Number,
84
+ default: 5
85
+ }
86
+ },
87
+ data() {
88
+ return {
89
+ customizationList: {},
90
+ visible: false,
91
+ flowOptions: [],
92
+ cb: null,
93
+ reasonSelect: '',
94
+ reason: '',
95
+ otherAttDataA: [],
96
+ procInstId: '',
97
+ whether: false,
98
+ optionsRequired: false,
99
+ placeholder: ''
100
+ }
101
+ },
102
+ methods: {
103
+ /**
104
+ *
105
+ * @param typeCode {String} 业务类型编码
106
+ */
107
+ async getHandlingAdvice(typeCode, procInstId) {
108
+ try {
109
+ const { code, data } = await this.$axios.post(
110
+ `/bems/activiti/admin/todo/isFlowStartWithOptions`,
111
+ { typeCode },
112
+ {
113
+ noMsg: true
114
+ }
115
+ )
116
+ // data.whether = true
117
+ // data.optionsRequired = true
118
+
119
+ if (code === 200) {
120
+ this.otherAttDataA = data.customizationList || []
121
+ this.whether = data.whether
122
+ this.optionsRequired = data.optionsRequired
123
+ if (data.optionsRequired) {
124
+ this.placeholder = '请选择或输入意见(必填)'
125
+ } else {
126
+ this.placeholder = '请选择或输入意见(选填)'
127
+ }
128
+ this.visible = data.whether === true || this.otherAttDataA.length > 0
129
+ this.flowOptions = data?.opinions?.map((d) => {
130
+ return {
131
+ label: d,
132
+ value: d
133
+ }
134
+ })
135
+ if (!data.whether && this.afterGetConf && this.otherAttDataA.length === 0) {
136
+ this.afterGetConf()
137
+ }
138
+ }
139
+ // 回显操作
140
+ if (procInstId) {
141
+ const { data: data1 } = await this.$axios.get(
142
+ `/bems/activiti/sample/getStartEventFlowHistory/${procInstId}`,
143
+ {},
144
+ {
145
+ noMsg: true
146
+ }
147
+ )
148
+ this.reason = data1?.suggestion || ''
149
+ this.reasonSelect = data1?.suggestion || ''
150
+ if (data1 && data1.flowHistoryCfgs && data1.flowHistoryCfgs.length > 0) {
151
+ this.otherAttDataA = this.otherAttDataA.map((item) => {
152
+ const bcData = data1.flowHistoryCfgs.find((item2) => {
153
+ return item2.cfgKey === item.cfgKey
154
+ })
155
+ return {
156
+ ...item,
157
+ cfgVal: ['31'].includes(item.cfgType) ? bcData.cfgVal.split(',') : bcData.cfgVal,
158
+ selectList: ['31'].includes(item.cfgType) ? bcData.cfgVal.split(',') : undefined,
159
+ checkList: ['32'].includes(item.cfgType) ? bcData.cfgVal.split(',') : undefined,
160
+ cfgHasRemark: bcData.cfgHasRemark,
161
+ cfgRemark: bcData.cfgRemark
162
+ }
163
+ })
164
+ }
165
+ }
166
+ // 重新执行一次 使数据更新
167
+ this.$refs.showOtherAttNew && this.$refs.showOtherAttNew.getData(this.otherAttDataA)
168
+ } catch (error) {
169
+ if (this.afterGetConf) {
170
+ this.afterGetConf()
171
+ }
172
+ }
173
+ },
174
+ changeReasonSelect(val) {
175
+ this.reason = val
176
+ },
177
+ submit() {
178
+ if (this.whether && this.optionsRequired && !this.reason) {
179
+ this.$message.warning('请选择或输入意见')
180
+ return
181
+ }
182
+ const getOtherAttData = this.$refs['showOtherAttNew'] && this.$refs['showOtherAttNew']?.getOtherAttData()
183
+ this.visible = false
184
+ if (this.beforeSubmit) {
185
+ this.beforeSubmit(this.reason, getOtherAttData)
186
+ }
187
+ this.$emit('submit', this.reason, getOtherAttData)
188
+ }
189
+ }
190
+ }
191
+ </script>
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <div class="n20-num-w" @mouseenter="isHove = true" @mouseleave="isHove = false">
3
+ <el-input
4
+ ref="input"
5
+ v-model="valueStr"
6
+ v-bind="$attrs"
7
+ class="n20-stc"
8
+ :disabled="disabled"
9
+ :placeholder="phd"
10
+ :clearable="isClearable"
11
+ :validate-event="false"
12
+ maxlength="40"
13
+ @focus="focusFn"
14
+ @input="inputFn"
15
+ @blur="blurFn"
16
+ @clear="clearFn"
17
+ @change="changeFn"
18
+ >
19
+ <!-- <template slot="suffix">
20
+ <slot name="suffix"></slot>
21
+ </template>
22
+ <template slot="prefix">
23
+ <slot name="prefix"></slot>
24
+ </template>
25
+ <template v-if="type === 'rate'">
26
+ <span v-if="suffixV" slot="suffix" class="el-input__icon">{{ suffix }}</span>
27
+ </template> -->
28
+ </el-input>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+ import emitter from '../../utils/element-ui-emitter'
34
+ import { $lc } from '../../utils/i18n/index'
35
+ import N from '../../utils/numberPor'
36
+
37
+ export default {
38
+ name: 'InputAccount',
39
+ mixins: [emitter],
40
+ props: {
41
+ value: {
42
+ type: [Number, String],
43
+ default: undefined
44
+ },
45
+ disabled: {
46
+ type: Boolean,
47
+ default: undefined
48
+ },
49
+ isClearable: {
50
+ type: Boolean,
51
+ default: true
52
+ },
53
+ placeholder: {
54
+ type: String,
55
+ default: undefined
56
+ },
57
+ format: {
58
+ type: String,
59
+ default: undefined
60
+ }
61
+ },
62
+ data() {
63
+ return {
64
+ valueStr: '',
65
+ isFocus: false
66
+ }
67
+ },
68
+ computed: {},
69
+ watch: {},
70
+ methods: {
71
+ focusFn() {
72
+ this.isFocus = true
73
+ if (!this.disabled && this.valueStr) {
74
+ this.valueStr = this.valueStr.replace(/\s+/g, '')
75
+ this.preValue = this.valueStr
76
+ }
77
+ },
78
+ blurFn() {
79
+ this.isFocus = false
80
+ if (!this.disabled && this.valueStr) {
81
+ this.valueStr = this.valueStr.replace(/(.{4})/g, '$1 ')
82
+ this.preValue = this.valueStr
83
+ }
84
+ this.$emit('blur')
85
+ },
86
+ clearFn() {
87
+ this.$emit('clear')
88
+ },
89
+ inputFn(valStr) {
90
+ if (isNaN(valStr.replace(/,/g, ''))) {
91
+ this.valueStr = this.preValue
92
+ } else {
93
+ this.preValue = valStr
94
+ }
95
+ this.$emit('input', this.preValue)
96
+ },
97
+ changeFn(valStr) {
98
+ if (!this.disabled && this.valueStr) {
99
+ this.valueStr = valStr.replace(/\s+/g, '')
100
+ }
101
+ this.$emit('change', this.preValue)
102
+ }
103
+ }
104
+ }
105
+ </script>
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <div class="n20-num-w" @mouseenter="isHove = true" @mouseleave="isHove = false">
2
+ <div
3
+ class="n20-num-w"
4
+ @mouseenter="isHove = true"
5
+ @mouseleave="isHove = false"
6
+ >
3
7
  <el-input
4
8
  ref="input"
5
9
  v-model="valueStr"
@@ -9,6 +13,7 @@
9
13
  :placeholder="phd"
10
14
  :clearable="isClearable"
11
15
  :validate-event="false"
16
+ maxlength="16"
12
17
  @focus="focusFn"
13
18
  @input="inputFn"
14
19
  @blur="blurFn"
@@ -23,7 +28,9 @@
23
28
  <slot name="prefix"></slot>
24
29
  </template>
25
30
  <template v-if="type === 'rate'">
26
- <span v-if="suffixV" slot="suffix" class="el-input__icon">{{ suffix }}</span>
31
+ <span v-if="suffixV" slot="suffix" class="el-input__icon">{{
32
+ suffix
33
+ }}</span>
27
34
  </template>
28
35
  </el-input>
29
36
  </div>
@@ -141,7 +148,9 @@ export default {
141
148
  if (val || val === 0) {
142
149
  let nF = N.toString(val).split('.')[1] || ''
143
150
  if (nF.length < this.fNum) {
144
- return (this.valueStr = N.addThousands(N.subFixed(val, this.fNum)))
151
+ return (this.valueStr = N.addThousands(
152
+ N.subFixed(val, this.fNum)
153
+ ))
145
154
  }
146
155
  }
147
156
  this.valueStr = N.addThousands(val)
@@ -170,7 +179,10 @@ export default {
170
179
  this.$emit('clear')
171
180
  },
172
181
  stepFn(ev) {
173
- if ((ev.code === 'ArrowUp' || ev.code === 'ArrowDown') && !this.disabled) {
182
+ if (
183
+ (ev.code === 'ArrowUp' || ev.code === 'ArrowDown') &&
184
+ !this.disabled
185
+ ) {
174
186
  let val = N(this.valueStr)
175
187
  if (!isNaN(val)) {
176
188
  ev.preventDefault()
@@ -6,6 +6,7 @@
6
6
  :max="endValue || endValue === 0 ? endValue : $attrs.max"
7
7
  :type="type"
8
8
  style="width: calc(50% - 8px)"
9
+ :disabled="disabled || leftDisabled"
9
10
  @input="startChange"
10
11
  @clear="$emit('clear')"
11
12
  @blur="blurFn"
@@ -17,6 +18,7 @@
17
18
  :min="startValue || startValue === 0 ? startValue : $attrs.min"
18
19
  :type="type"
19
20
  style="width: calc(50% - 8px)"
21
+ :disabled="disabled || rightDisabled"
20
22
  @input="endChange"
21
23
  @clear="$emit('clear')"
22
24
  @blur="blurFn"
@@ -32,6 +34,18 @@ export default {
32
34
  inputNumber
33
35
  },
34
36
  props: {
37
+ disabled: {
38
+ type: Boolean,
39
+ default: false
40
+ },
41
+ leftDisabled: {
42
+ type: Boolean,
43
+ default: false
44
+ },
45
+ rightDisabled: {
46
+ type: Boolean,
47
+ default: false
48
+ },
35
49
  startValue: {
36
50
  type: [String, Number],
37
51
  default: undefined
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <el-input
3
3
  v-if="!select"
4
+ ref="input-search"
5
+ v-title
4
6
  class="n20-input-search-1"
5
7
  v-bind="Object.assign($attrs, { disabled: disabled })"
6
8
  :value="value"
@@ -131,4 +133,10 @@ export default {
131
133
  .n20-input-search .el-input__suffix-inner {
132
134
  background: var(--color-white);
133
135
  }
136
+ .n20-input-search-1 .el-input__inner,
137
+ .n20-input-search .el-select .el-input__inner {
138
+ overflow: hidden;
139
+ text-overflow: ellipsis;
140
+ white-space: nowrap;
141
+ }
134
142
  </style>
@@ -49,10 +49,11 @@
49
49
  </template>
50
50
 
51
51
  <script>
52
- import { $lc } from '../../../utils/i18n/index.js'
52
+ import JsEncrypt from 'jsencrypt'
53
+ import { jsonp } from 'vue-jsonp'
53
54
  import auth from '../../../utils/auth.js'
54
55
  import axios from '../../../utils/axios.js'
55
- import { jsonp } from 'vue-jsonp'
56
+ import { $lc } from '../../../utils/i18n/index.js'
56
57
 
57
58
  export default {
58
59
  props: {
@@ -73,7 +74,8 @@ export default {
73
74
  newPassword: '',
74
75
  validatePassword: ''
75
76
  },
76
- ipInfo:{},
77
+ ipInfo: {},
78
+ publicKey: '',
77
79
  laoding: false
78
80
  }
79
81
  },
@@ -87,31 +89,56 @@ export default {
87
89
  created() {
88
90
  this.getPwdRule()
89
91
  this.getIpInfo()
92
+ this.getRSAPublicKey()
90
93
  },
91
94
  methods: {
95
+ /**
96
+ * v1.15.0 修改密码渗透漏洞
97
+ */
98
+ async getRSAPublicKey() {
99
+ const { data, code } = await this.$axios.get(`/bems/prod_1.0/user/wfMasterUser/getRSAPubKey`)
100
+ if (code === 200) {
101
+ this.publicKey = data
102
+ }
103
+ },
92
104
  /**
93
105
  * v1.12.0 增加第三方ip信息查询接口
94
106
  */
95
107
  getIpInfo() {
96
- jsonp(`https://tbip.alicdn.com/api/queryip`).then(({code,data}) => {
97
- if (code ===0) {
98
- this.ipInfo = {
99
- headers: {
100
- reqIp: data?.ip,
101
- reqAddr: encodeURIComponent(data?.region && data?.city ? `${data?.region}-${data?.city}`:data?.region ?data?.region:data?.city),
102
- reqCountry: encodeURIComponent(data?.country),
108
+ jsonp(`https://tbip.alicdn.com/api/queryip`)
109
+ .then(({ code, data }) => {
110
+ if (code === 0) {
111
+ this.ipInfo = {
112
+ headers: {
113
+ reqIp: data?.ip,
114
+ reqAddr: encodeURIComponent(
115
+ data?.region && data?.city
116
+ ? `${data?.region}-${data?.city}`
117
+ : data?.region
118
+ ? data?.region
119
+ : data?.city
120
+ ),
121
+ reqCountry: encodeURIComponent(data?.country)
122
+ }
103
123
  }
104
124
  }
105
- }
106
- }).catch(
107
- this.ipInfo = {
108
- headers: {
109
- reqIp: '127.0.0.1',
110
- reqAddr: encodeURIComponent('内网'),
111
- reqCountry: encodeURIComponent('中国'),
112
- }
113
- }
114
- )
125
+ })
126
+ .catch(
127
+ (this.ipInfo = {
128
+ headers: {
129
+ reqIp: '127.0.0.1',
130
+ reqAddr: encodeURIComponent('内网'),
131
+ reqCountry: encodeURIComponent('中国')
132
+ }
133
+ })
134
+ )
135
+ },
136
+ //加密方法
137
+ RSAencrypt(pas) {
138
+ let jse = new JsEncrypt()
139
+ //设置公钥
140
+ jse.setPublicKey(this.publicKey)
141
+ return jse.encrypt(pas)
115
142
  },
116
143
  getPwdRule() {
117
144
  axios
@@ -153,7 +180,7 @@ export default {
153
180
  '/bems/prod_1.0/uas/api/authorization/password/validate',
154
181
  {
155
182
  // username: this.form.username,
156
- password: value
183
+ password: this.RSAencrypt(value)
157
184
  },
158
185
  { noMsg: true, loading: false }
159
186
  )
@@ -208,8 +235,8 @@ export default {
208
235
  .post(
209
236
  '/bems/prod_1.0/uas/api/authorization/password/update',
210
237
  {
211
- password: this.form.orginPassword,
212
- newPassword: this.form.newPassword
238
+ password: this.RSAencrypt(this.form.orginPassword),
239
+ newPassword: this.RSAencrypt(this.form.newPassword)
213
240
  },
214
241
  {
215
242
  loading: () => {
@@ -257,7 +257,7 @@ export default {
257
257
  }
258
258
  },
259
259
  created() {
260
- getJsonc('/server-config.jsonc').then(({ _layoutData = {}, loginSetting }) => {
260
+ getJsonc('/server-config.jsonc').then(({ _layoutData = {}, loginSetting, langConf = {} }) => {
261
261
  let _loginSetting = loginSetting || _layoutData.loginSetting
262
262
  this.headerLogoUrl = realUrl(_layoutData.headerLogoUrl)
263
263
  this.headerUserUrl = realUrl(_layoutData.headerUserUrl)
@@ -268,7 +268,7 @@ export default {
268
268
  this.headerBgUrl = realUrl(_layoutData.headerBgUrl)
269
269
  this.headerBgColor = _layoutData.headerBgColor
270
270
  this.hideHelpDoc = _layoutData.hideHelpDoc
271
- this.hideLang = _layoutData.hideLang
271
+ this.hideLang = (_layoutData.hideLang || langConf.hideLang) ?? false
272
272
  this.hideDowApp = _layoutData.hideDowApp
273
273
  this.hideTheme = _layoutData.hideTheme
274
274