vue2-client 1.2.55-test3 → 1.2.57

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.
@@ -86,11 +86,12 @@ export default {
86
86
  const headers = {
87
87
  'Content-Type': 'multipart/form-data',
88
88
  }
89
+ // TODO 暂时给默认值 基础表单调整好后处理
89
90
  const formData = new FormData()
90
91
  formData.append('avatar', info.file)
91
- formData.append('resUploadMode', this.model.resUploadMode)
92
+ formData.append('resUploadMode', this.model.resUploadMode ?? 'server')
92
93
  if (this.model.pathKey) {
93
- formData.append('pathKey', this.model.pathKey)
94
+ formData.append('pathKey', this.model.pathKey ?? 'Default')
94
95
  }
95
96
  // formData.append('stockAlias', this.model.stockAlias)
96
97
  formData.append('formType', this.model.type)
@@ -257,10 +257,12 @@ export default {
257
257
  }
258
258
  }
259
259
  this.form = formData
260
- this.files = this.modifyModelData.files
261
- this.images = this.modifyModelData.images
262
- if (Object.keys(this.modifyModelData.data).length > 0) {
263
- this.getModifyModelData()
260
+ if (this.modifyModelData.data) {
261
+ this.files = this.modifyModelData.files
262
+ this.images = this.modifyModelData.images
263
+ if (Object.keys(this.modifyModelData.data).length > 0) {
264
+ this.getModifyModelData()
265
+ }
264
266
  }
265
267
  },
266
268
  itemDisabled (value) {
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <div>
3
+ <create-query
4
+ :visible.sync="visible"
5
+ @saveQueryParams="saveQueryParams"
6
+ />
7
+ <create-simple-form-query
8
+ :visible.sync="createSimpleFormVisible"
9
+ @saveSimpleFormQueryParams="saveSimpleFormQueryParams"
10
+ />
11
+ <a-button type="primary" style="margin-top: 10px;margin-left: 10px;" @click="showDrawer">打开完整查询配置生成工具</a-button>
12
+ <a-button type="primary" style="margin-top: 10px;margin-left: 10px;" @click="showSimpleFormQueryParamsDrawer">打开基础表单配置生成工具</a-button>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import { post } from '@/services/api/restTools'
18
+
19
+ export default {
20
+ name: 'CreateQueryPage',
21
+ data () {
22
+ return {
23
+ visible: false,
24
+ createSimpleFormVisible: false
25
+ }
26
+ },
27
+ methods: {
28
+ showDrawer () {
29
+ this.visible = true
30
+ },
31
+ showSimpleFormQueryParamsDrawer () {
32
+ this.createSimpleFormVisible = true
33
+ },
34
+ // 存储查询配置信息
35
+ saveQueryParams (source) {
36
+ return post('/webmeterapi/addOrEditQueryParams', {
37
+ source: source
38
+ }).then(res => {
39
+ this.$message.success('保存查询配置成功')
40
+ }, err => {
41
+ console.error(err)
42
+ })
43
+ },
44
+ // 存储基础表单配置信息
45
+ saveSimpleFormQueryParams (source) {
46
+ return post('/webmeterapi/addOrEditSimpleFormQueryParams', {
47
+ source: source
48
+ }).then(res => {
49
+ this.$message.success('保存基础表单配置成功')
50
+ }, err => {
51
+ console.error(err)
52
+ })
53
+ }
54
+ }
55
+ }
56
+ </script>
57
+ <style lang="less" scoped>
58
+ </style>
@@ -1,58 +1,60 @@
1
- // 视图组件
2
- const view = {
3
- tabs: () => import('@vue2-client/layouts/tabs'),
4
- blank: () => import('@vue2-client/layouts/BlankView'),
5
- page: () => import('@vue2-client/layouts/PageView')
6
- }
7
- // 动态路由对象定义
8
- const routerResource = {}
9
- // --------------------------------------基本视图组件--------------------------------------
10
- // 空白视图
11
- routerResource.blank = view.blank
12
- // 单页面视图
13
- routerResource.singlePage = view.blank
14
- // --------------------------------------系统配置--------------------------------------
15
- routerResource.system = view.blank
16
- // 字典管理
17
- routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
18
- // 查询配置管理
19
- routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
20
- // 系统问题反馈工单
21
- routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
22
- // --------------------------------------报表组件--------------------------------------
23
- routerResource.reportTable = () => import(/* webpackChunkName: "ReportTableHome" */ '@vue2-client/pages/report/ReportTableHome')
24
- // --------------------------------------资源管理--------------------------------------
25
- routerResource.resourceManageMain = () => import(/* webpackChunkName: "resourceManageMain" */ '@vue2-client/pages/resourceManage/resourceManageMain')
26
-
27
- // 基础路由组件注册
28
- const routerMap = {
29
- login: {
30
- authority: '*',
31
- path: '/login',
32
- component: () => import('@vue2-client/pages/login')
33
- },
34
- root: {
35
- path: '/',
36
- name: '首页',
37
- redirect: '/login',
38
- component: view.tabs
39
- },
40
- exp403: {
41
- authority: '*',
42
- name: 'exp403',
43
- path: '403',
44
- component: () => import('@vue2-client/pages/exception/403')
45
- },
46
- exp404: {
47
- name: 'exp404',
48
- path: '404',
49
- component: () => import('@vue2-client/pages/exception/404')
50
- },
51
- exp500: {
52
- name: 'exp500',
53
- path: '500',
54
- component: () => import('@vue2-client/pages/exception/500')
55
- }
56
- }
57
- Object.assign(routerMap, routerResource)
58
- export default routerMap
1
+ // 视图组件
2
+ const view = {
3
+ tabs: () => import('@vue2-client/layouts/tabs'),
4
+ blank: () => import('@vue2-client/layouts/BlankView'),
5
+ page: () => import('@vue2-client/layouts/PageView')
6
+ }
7
+ // 动态路由对象定义
8
+ const routerResource = {}
9
+ // --------------------------------------基本视图组件--------------------------------------
10
+ // 空白视图
11
+ routerResource.blank = view.blank
12
+ // 单页面视图
13
+ routerResource.singlePage = view.blank
14
+ // --------------------------------------系统配置--------------------------------------
15
+ routerResource.system = view.blank
16
+ // 字典管理
17
+ routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
18
+ // 查询配置管理
19
+ routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
20
+ // 查询配置生成
21
+ routerResource.createQuery = () => import('@vue2-client/pages/CreateQueryPage.vue')
22
+ // 系统问题反馈工单
23
+ routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
24
+ // --------------------------------------报表组件--------------------------------------
25
+ routerResource.reportTable = () => import(/* webpackChunkName: "ReportTableHome" */ '@vue2-client/pages/report/ReportTableHome')
26
+ // --------------------------------------资源管理--------------------------------------
27
+ routerResource.resourceManageMain = () => import(/* webpackChunkName: "resourceManageMain" */ '@vue2-client/pages/resourceManage/resourceManageMain')
28
+
29
+ // 基础路由组件注册
30
+ const routerMap = {
31
+ login: {
32
+ authority: '*',
33
+ path: '/login',
34
+ component: () => import('@vue2-client/pages/login')
35
+ },
36
+ root: {
37
+ path: '/',
38
+ name: '首页',
39
+ redirect: '/login',
40
+ component: view.tabs
41
+ },
42
+ exp403: {
43
+ authority: '*',
44
+ name: 'exp403',
45
+ path: '403',
46
+ component: () => import('@vue2-client/pages/exception/403')
47
+ },
48
+ exp404: {
49
+ name: 'exp404',
50
+ path: '404',
51
+ component: () => import('@vue2-client/pages/exception/404')
52
+ },
53
+ exp500: {
54
+ name: 'exp500',
55
+ path: '500',
56
+ component: () => import('@vue2-client/pages/exception/500')
57
+ }
58
+ }
59
+ Object.assign(routerMap, routerResource)
60
+ export default routerMap
package/vue.config.js CHANGED
@@ -73,6 +73,11 @@ module.exports = {
73
73
  pathRewrite: { '^/webmeterresourceapi': '/rs/resource' },
74
74
  target: local,
75
75
  changeOrigin: true
76
+ },
77
+ '/resource': {
78
+ pathRewrite: { '^/resource': '/' },
79
+ target: 'http://127.0.0.1:4789',
80
+ changeOrigin: true
76
81
  }
77
82
  }
78
83
  },