vue2-client 1.8.31 → 1.8.33

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/CHANGELOG.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.8.30 -2023-1-10 @张振宇**
4
+ **1.8.33 -2024-1-18 @江超**
5
+ - 获取配置改为openApi方式
6
+
7
+ **1.8.30 -2024-1-10 @张振宇**
5
8
  - 微前端兼容
6
9
 
7
- **1.8.26 -2023-1-10 @杨亚文**
10
+ **1.8.26 -2024-1-10 @杨亚文**
8
11
  - 解决单页面为首页时首次登录不加载问题
9
12
 
10
13
  **1.8.23 -2023-12-28 @杨亚文**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.31",
3
+ "version": "1.8.33",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -1,131 +1,131 @@
1
- <template>
2
- <a-modal
3
- title="数据导入"
4
- :visible="open"
5
- :zIndex="1001"
6
- :confirm-loading="uploading"
7
- @cancel="importExcelHandleCancel"
8
- @ok="importExcelHandleChange"
9
- >
10
- <a-spin tip="上传中..." :spinning="uploading">
11
- <a-upload-dragger
12
- name="file"
13
- accept=".xlsx, .xls"
14
- :file-list="fileList"
15
- :multiple="false"
16
- :remove="handleRemove"
17
- :before-upload="beforeUpload"
18
- >
19
- <p class="ant-upload-drag-icon">
20
- <a-icon type="inbox" />
21
- </p>
22
- <p class="ant-upload-text">
23
- 请将文件拖拽到此处上传
24
- </p>
25
- <p class="ant-upload-hint">
26
- 支持单个上传,也可以点击后选择文件上传
27
- </p>
28
- </a-upload-dragger>
29
- <a-divider/>
30
- <a v-if="queryParamsName !== 'none'" @click="importTemplate">下载导入模板</a>
31
- </a-spin>
32
- </a-modal>
33
- </template>
34
-
35
- <script>
36
-
37
- import { importData, downloadImportExcel } from '@vue2-client/services/api/common'
38
-
39
- export default {
40
- name: 'XImportExcel',
41
- props: {
42
- serviceName: {
43
- type: String,
44
- default: undefined
45
- },
46
- queryParamsName: {
47
- type: String,
48
- default: 'none'
49
- },
50
- // 业务名称
51
- title: {
52
- type: String,
53
- default: ''
54
- }
55
- },
56
- components: {
57
- },
58
- data () {
59
- return {
60
- open: false,
61
- uploadStatus: '',
62
- fileList: [],
63
- // 是否禁用上传
64
- uploading: false
65
- }
66
- },
67
- filters: {
68
- },
69
- created () {
70
- },
71
- computed: {
72
- },
73
- watch: {
74
- },
75
- methods: {
76
- /** 导入excel窗体关闭 */
77
- importExcelHandleCancel (e) {
78
- this.open = false
79
- this.fileList = []
80
- // 关闭后刷新列表
81
- this.$emit('ok')
82
- },
83
- /** 下载模板操作 */
84
- importTemplate () {
85
- downloadImportExcel({
86
- queryParamsName: this.queryParamsName
87
- }, this.serviceName).then(res => {
88
- if (!res || !res.value) {
89
- this.$message.warn('导入模板不存在,请检查配置')
90
- return
91
- }
92
- window.open('/res/excel/export/' + res.value)
93
- })
94
- },
95
- /** 导入excel窗体开启 */
96
- importExcelHandleOpen (e) {
97
- this.open = true
98
- },
99
- beforeUpload (file) {
100
- this.fileList = [file]
101
- return false
102
- },
103
- /** 导入excel */
104
- importExcelHandleChange () {
105
- const { fileList } = this
106
- const formData = new FormData()
107
- if (!fileList[0]) {
108
- this.$message.warn('请选择需要上传的文件')
109
- return
110
- }
111
- this.uploading = true
112
- formData.append('file', fileList[0])
113
- formData.append('queryParamsName', this.queryParamsName)
114
- importData(formData).then(res => {
115
- this.fileList = []
116
- this.$message.success(res.value)
117
- this.open = false
118
- this.$emit('ok')
119
- }).catch(e => {
120
- this.$message.error(e)
121
- }).finally(() => {
122
- this.uploading = false
123
- })
124
- },
125
- handleRemove () {
126
- this.fileList = []
127
- this.uploading = false
128
- }
129
- }
130
- }
131
- </script>
1
+ <template>
2
+ <a-modal
3
+ title="数据导入"
4
+ :visible="open"
5
+ :zIndex="1001"
6
+ :confirm-loading="uploading"
7
+ @cancel="importExcelHandleCancel"
8
+ @ok="importExcelHandleChange"
9
+ >
10
+ <a-spin tip="上传中..." :spinning="uploading">
11
+ <a-upload-dragger
12
+ name="file"
13
+ accept=".xlsx, .xls"
14
+ :file-list="fileList"
15
+ :multiple="false"
16
+ :remove="handleRemove"
17
+ :before-upload="beforeUpload"
18
+ >
19
+ <p class="ant-upload-drag-icon">
20
+ <a-icon type="inbox" />
21
+ </p>
22
+ <p class="ant-upload-text">
23
+ 请将文件拖拽到此处上传
24
+ </p>
25
+ <p class="ant-upload-hint">
26
+ 支持单个上传,也可以点击后选择文件上传
27
+ </p>
28
+ </a-upload-dragger>
29
+ <a-divider/>
30
+ <a v-if="queryParamsName !== 'none'" @click="importTemplate">下载导入模板</a>
31
+ </a-spin>
32
+ </a-modal>
33
+ </template>
34
+
35
+ <script>
36
+
37
+ import { importData, downloadImportExcel } from '@vue2-client/services/api/common'
38
+
39
+ export default {
40
+ name: 'XImportExcel',
41
+ props: {
42
+ serviceName: {
43
+ type: String,
44
+ default: undefined
45
+ },
46
+ queryParamsName: {
47
+ type: String,
48
+ default: 'none'
49
+ },
50
+ // 业务名称
51
+ title: {
52
+ type: String,
53
+ default: ''
54
+ }
55
+ },
56
+ components: {
57
+ },
58
+ data () {
59
+ return {
60
+ open: false,
61
+ uploadStatus: '',
62
+ fileList: [],
63
+ // 是否禁用上传
64
+ uploading: false
65
+ }
66
+ },
67
+ filters: {
68
+ },
69
+ created () {
70
+ },
71
+ computed: {
72
+ },
73
+ watch: {
74
+ },
75
+ methods: {
76
+ /** 导入excel窗体关闭 */
77
+ importExcelHandleCancel (e) {
78
+ this.open = false
79
+ this.fileList = []
80
+ // 关闭后刷新列表
81
+ this.$emit('ok')
82
+ },
83
+ /** 下载模板操作 */
84
+ importTemplate () {
85
+ downloadImportExcel({
86
+ queryParamsName: this.queryParamsName
87
+ }, this.serviceName).then(res => {
88
+ if (!res || !res.value) {
89
+ this.$message.warn('导入模板不存在,请检查配置')
90
+ return
91
+ }
92
+ window.open('/res/excel/export/' + res.value)
93
+ })
94
+ },
95
+ /** 导入excel窗体开启 */
96
+ importExcelHandleOpen (e) {
97
+ this.open = true
98
+ },
99
+ beforeUpload (file) {
100
+ this.fileList = [file]
101
+ return false
102
+ },
103
+ /** 导入excel */
104
+ importExcelHandleChange () {
105
+ const { fileList } = this
106
+ const formData = new FormData()
107
+ if (!fileList[0]) {
108
+ this.$message.warn('请选择需要上传的文件')
109
+ return
110
+ }
111
+ this.uploading = true
112
+ formData.append('file', fileList[0])
113
+ formData.append('queryParamsName', this.queryParamsName)
114
+ importData(formData).then(res => {
115
+ this.fileList = []
116
+ this.$message.success(res.value)
117
+ this.open = false
118
+ this.$emit('ok')
119
+ }).catch(e => {
120
+ this.$message.error(e)
121
+ }).finally(() => {
122
+ this.uploading = false
123
+ })
124
+ },
125
+ handleRemove () {
126
+ this.fileList = []
127
+ this.uploading = false
128
+ }
129
+ }
130
+ }
131
+ </script>
@@ -9,7 +9,7 @@ const casApi = {
9
9
  // 根据TGC生成ST
10
10
  createSTByTGC: '/api/af-sso/logic/createSTByTGC',
11
11
  // 验证ST
12
- serviceValidate: '/api/af-sso/logic/serviceValidate',
12
+ serviceValidate: '/api/af-sso/logic/openapi/serviceValidate',
13
13
  // 其他验证
14
14
  otherValidate: '/api/af-sso/logic'
15
15
  }
@@ -8,9 +8,9 @@ import { post } from '@vue2-client/services/api/restTools'
8
8
 
9
9
  const commonApi = {
10
10
  // 获取配置
11
- getConfig: 'logic/getLiuliConfiguration',
11
+ getConfig: 'logic/openapi/getLiuliConfiguration',
12
12
  // 获取原生配置
13
- getNativeConfig: 'logic/getLiuliNativeConfiguration',
13
+ getNativeConfig: 'logic/openapi/getLiuliNativeConfiguration',
14
14
  // 配置解析
15
15
  parseConfig: 'logic/parseConfig',
16
16
  // 通用查询