vue2-client 1.3.6 → 1.3.9
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 +1 -1
- package/package.json +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +4 -4
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1 -1
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +1 -1
- package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
- package/src/base-client/components/common/Upload/Upload.vue +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +6 -2
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +7 -2
- package/src/base-client/components/common/XForm/XForm.vue +1 -1
- package/src/base-client/components/common/XForm/XFormItem.vue +4 -2
- package/src/base-client/components/common/XFormTable/XFormTable.vue +1 -0
- package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -372
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +1 -1
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +14 -13
- package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +1 -1
- package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
- package/src/base-client/plugins/AppData.js +4 -6
- package/src/base-client/plugins/GetLoginInfoService.js +252 -252
- package/src/base-client/plugins/PagedList.js +3 -3
- package/src/base-client/plugins/i18n-extend.js +32 -32
- package/src/components/Ellipsis/index.md +38 -38
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/STable/README.md +341 -341
- package/src/components/Trend/index.md +45 -45
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/checkbox/ImgCheckbox.vue +163 -163
- package/src/components/exception/ExceptionPage.vue +70 -70
- package/src/components/form/FormRow.vue +52 -52
- package/src/components/menu/SideMenu.vue +62 -62
- package/src/components/menu/menu.js +273 -273
- package/src/components/setting/Setting.vue +235 -235
- package/src/components/table/advance/ActionColumns.vue +158 -158
- package/src/components/table/advance/SearchArea.vue +355 -355
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/components/tool/AvatarList.vue +68 -69
- package/src/components/tool/Drawer.vue +142 -142
- package/src/components/transition/PageToggleTransition.vue +97 -97
- package/src/config/replacer/resolve.config.js +67 -67
- package/src/layouts/AdminLayout.vue +174 -174
- package/src/layouts/header/AdminHeader.vue +3 -3
- package/src/layouts/header/HeaderNotice.vue +1 -1
- package/src/layouts/header/HeaderSearch.vue +67 -67
- package/src/layouts/header/InstitutionDetail.vue +3 -3
- package/src/layouts/tabs/TabsHead.vue +190 -190
- package/src/layouts/tabs/TabsView.vue +379 -379
- package/src/mock/goods/index.js +108 -108
- package/src/pages/CreateQueryPage.vue +2 -2
- package/src/pages/report/ReportTable.js +124 -125
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/system/file/index.vue +3 -3
- package/src/pages/system/ticket/index.vue +4 -1
- package/src/services/api/DictionaryDetailsViewApi.js +1 -1
- package/src/services/api/LogDetailsViewApi.js +3 -3
- package/src/services/api/QueryParamsDetailsViewApi.js +1 -1
- package/src/services/api/TicketDetailsViewApi.js +15 -23
- package/src/services/api/common.js +11 -11
- package/src/services/api/commonTempTable.js +3 -3
- package/src/services/api/manage.js +2 -2
- package/src/theme/default/nprogress.less +76 -76
- package/src/utils/colors.js +103 -103
- package/src/utils/excel/Blob.js +53 -54
- package/src/utils/excel/Export2Excel.js +4 -4
- package/src/utils/formatter.js +68 -68
- package/src/utils/i18n.js +1 -1
- package/src/utils/routerUtil.js +3 -3
- package/src/utils/theme-color-replacer-extend.js +3 -3
- package/src/utils/themeUtil.js +100 -102
- package/src/utils/util.js +2 -2
- package/vue.config.js +5 -15
- package/vue2-client.iml +9 -0
package/src/mock/goods/index.js
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
import Mock from 'mockjs'
|
|
2
|
-
import '@vue2-client/mock/extend'
|
|
3
|
-
import { parseUrlParams } from '@vue2-client/utils/request'
|
|
4
|
-
|
|
5
|
-
const current = new Date().getTime()
|
|
6
|
-
|
|
7
|
-
const goodsList = Mock.mock({
|
|
8
|
-
'list|100': [{
|
|
9
|
-
'id|+1': 0,
|
|
10
|
-
'name': '@GOODS',
|
|
11
|
-
'orderId': `${current}-@integer(1,100)`,
|
|
12
|
-
'status|1-4': 1,
|
|
13
|
-
'send': '@BOOLEAN',
|
|
14
|
-
'sendTime': '@DATETIME',
|
|
15
|
-
'orderDate': '@DATE',
|
|
16
|
-
'auditTime': '@TIME'
|
|
17
|
-
}]
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
Mock.mock(RegExp(`${process.env.VUE_APP_API_BASE_URL}/goods` + '.*'), 'get', ({ url }) => {
|
|
21
|
-
const params = parseUrlParams(decodeURI(url))
|
|
22
|
-
let { page, pageSize } = params
|
|
23
|
-
// eslint-disable-next-line no-eval
|
|
24
|
-
page = eval(page) - 1 || 0
|
|
25
|
-
// eslint-disable-next-line no-eval
|
|
26
|
-
pageSize = eval(pageSize) || 10
|
|
27
|
-
delete params.page
|
|
28
|
-
delete params.pageSize
|
|
29
|
-
let result = goodsList.list.filter(item => {
|
|
30
|
-
for (const [key, value] of Object.entries(params)) {
|
|
31
|
-
if (item[key]
|
|
32
|
-
return false
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return true
|
|
36
|
-
})
|
|
37
|
-
const total = result.length
|
|
38
|
-
if ((page) * pageSize > total) {
|
|
39
|
-
result = []
|
|
40
|
-
} else {
|
|
41
|
-
result = result.slice(page * pageSize, (page + 1) * pageSize)
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
code: 0,
|
|
45
|
-
message: 'success',
|
|
46
|
-
data: {
|
|
47
|
-
page: page + 1,
|
|
48
|
-
pageSize,
|
|
49
|
-
total,
|
|
50
|
-
list: result
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
const columnsConfig = [
|
|
56
|
-
{
|
|
57
|
-
title: '商品名称',
|
|
58
|
-
dataIndex: 'name',
|
|
59
|
-
searchAble: true
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
title: '订单号',
|
|
63
|
-
dataIndex: 'orderId'
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
searchAble: true,
|
|
67
|
-
dataIndex: 'status',
|
|
68
|
-
dataType: 'select',
|
|
69
|
-
slots: { title: 'statusTitle' },
|
|
70
|
-
scopedSlots: { customRender: 'status' },
|
|
71
|
-
search: {
|
|
72
|
-
selectOptions: [
|
|
73
|
-
{ title: '已下单', value: 1 },
|
|
74
|
-
{ title: '已付款', value: 2 },
|
|
75
|
-
{ title: '已审核', value: 3 }
|
|
76
|
-
// {title: '已发货', value: 4}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
title: '发货',
|
|
82
|
-
searchAble: true,
|
|
83
|
-
dataIndex: 'send',
|
|
84
|
-
dataType: 'boolean',
|
|
85
|
-
scopedSlots: { customRender: 'send' }
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
title: '发货时间',
|
|
89
|
-
dataIndex: 'sendTime',
|
|
90
|
-
dataType: 'datetime'
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
title: '下单日期',
|
|
94
|
-
searchAble: true,
|
|
95
|
-
dataIndex: 'orderDate',
|
|
96
|
-
dataType: 'date',
|
|
97
|
-
visible: false
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
title: '审核时间',
|
|
101
|
-
dataIndex: 'auditTime',
|
|
102
|
-
dataType: 'time'
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
|
|
106
|
-
Mock.mock(`${process.env.VUE_APP_API_BASE_URL}/columns`, 'get', () => {
|
|
107
|
-
return columnsConfig
|
|
108
|
-
})
|
|
1
|
+
import Mock from 'mockjs'
|
|
2
|
+
import '@vue2-client/mock/extend'
|
|
3
|
+
import { parseUrlParams } from '@vue2-client/utils/request'
|
|
4
|
+
|
|
5
|
+
const current = new Date().getTime()
|
|
6
|
+
|
|
7
|
+
const goodsList = Mock.mock({
|
|
8
|
+
'list|100': [{
|
|
9
|
+
'id|+1': 0,
|
|
10
|
+
'name': '@GOODS',
|
|
11
|
+
'orderId': `${current}-@integer(1,100)`,
|
|
12
|
+
'status|1-4': 1,
|
|
13
|
+
'send': '@BOOLEAN',
|
|
14
|
+
'sendTime': '@DATETIME',
|
|
15
|
+
'orderDate': '@DATE',
|
|
16
|
+
'auditTime': '@TIME'
|
|
17
|
+
}]
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
Mock.mock(RegExp(`${process.env.VUE_APP_API_BASE_URL}/goods` + '.*'), 'get', ({ url }) => {
|
|
21
|
+
const params = parseUrlParams(decodeURI(url))
|
|
22
|
+
let { page, pageSize } = params
|
|
23
|
+
// eslint-disable-next-line no-eval
|
|
24
|
+
page = eval(page) - 1 || 0
|
|
25
|
+
// eslint-disable-next-line no-eval
|
|
26
|
+
pageSize = eval(pageSize) || 10
|
|
27
|
+
delete params.page
|
|
28
|
+
delete params.pageSize
|
|
29
|
+
let result = goodsList.list.filter(item => {
|
|
30
|
+
for (const [key, value] of Object.entries(params)) {
|
|
31
|
+
if (item[key] !== value) {
|
|
32
|
+
return false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return true
|
|
36
|
+
})
|
|
37
|
+
const total = result.length
|
|
38
|
+
if ((page) * pageSize > total) {
|
|
39
|
+
result = []
|
|
40
|
+
} else {
|
|
41
|
+
result = result.slice(page * pageSize, (page + 1) * pageSize)
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
code: 0,
|
|
45
|
+
message: 'success',
|
|
46
|
+
data: {
|
|
47
|
+
page: page + 1,
|
|
48
|
+
pageSize,
|
|
49
|
+
total,
|
|
50
|
+
list: result
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const columnsConfig = [
|
|
56
|
+
{
|
|
57
|
+
title: '商品名称',
|
|
58
|
+
dataIndex: 'name',
|
|
59
|
+
searchAble: true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: '订单号',
|
|
63
|
+
dataIndex: 'orderId'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
searchAble: true,
|
|
67
|
+
dataIndex: 'status',
|
|
68
|
+
dataType: 'select',
|
|
69
|
+
slots: { title: 'statusTitle' },
|
|
70
|
+
scopedSlots: { customRender: 'status' },
|
|
71
|
+
search: {
|
|
72
|
+
selectOptions: [
|
|
73
|
+
{ title: '已下单', value: 1 },
|
|
74
|
+
{ title: '已付款', value: 2 },
|
|
75
|
+
{ title: '已审核', value: 3 }
|
|
76
|
+
// {title: '已发货', value: 4}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: '发货',
|
|
82
|
+
searchAble: true,
|
|
83
|
+
dataIndex: 'send',
|
|
84
|
+
dataType: 'boolean',
|
|
85
|
+
scopedSlots: { customRender: 'send' }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: '发货时间',
|
|
89
|
+
dataIndex: 'sendTime',
|
|
90
|
+
dataType: 'datetime'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
title: '下单日期',
|
|
94
|
+
searchAble: true,
|
|
95
|
+
dataIndex: 'orderDate',
|
|
96
|
+
dataType: 'date',
|
|
97
|
+
visible: false
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: '审核时间',
|
|
101
|
+
dataIndex: 'auditTime',
|
|
102
|
+
dataType: 'time'
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
Mock.mock(`${process.env.VUE_APP_API_BASE_URL}/columns`, 'get', () => {
|
|
107
|
+
return columnsConfig
|
|
108
|
+
})
|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
},
|
|
41
41
|
// 存储查询配置信息
|
|
42
42
|
saveQueryParams (source) {
|
|
43
|
-
return post('/af-system/addOrEditQueryParams', {
|
|
43
|
+
return post('/api/af-system/logic/addOrEditQueryParams', {
|
|
44
44
|
source: source
|
|
45
45
|
}).then(res => {
|
|
46
46
|
this.$message.success('保存查询配置成功')
|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
50
50
|
},
|
|
51
51
|
// 存储基础表单配置信息
|
|
52
52
|
saveSimpleFormQueryParams (source) {
|
|
53
|
-
return post('/af-system/addOrEditSimpleFormQueryParams', {
|
|
53
|
+
return post('/api/af-system/logic/addOrEditSimpleFormQueryParams', {
|
|
54
54
|
source: source
|
|
55
55
|
}).then(res => {
|
|
56
56
|
this.$message.success('保存基础表单配置成功')
|
|
@@ -1,125 +1,124 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
name: 'ReportTable',
|
|
3
|
-
functional: true,
|
|
4
|
-
render (h, content) {
|
|
5
|
-
if (!content.props.tableData) {
|
|
6
|
-
console.log('没有报表数据')
|
|
7
|
-
return
|
|
8
|
-
}
|
|
9
|
-
console.log('content=>', content)
|
|
10
|
-
const html = reportCompute(h, content.props.tableData)
|
|
11
|
-
console.log('html=>', html)
|
|
12
|
-
// 报表整体高度和宽度
|
|
13
|
-
const reportClass = `h-${html.h} w-${html.w}`
|
|
14
|
-
|
|
15
|
-
<div id='ReportTableHome'>
|
|
16
|
-
<div id='reportTable' class={reportClass}>
|
|
17
|
-
{html.el}
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
* @param
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*
|
|
37
|
-
* @
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*
|
|
45
|
-
* @
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
*
|
|
53
|
-
* @
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
* @param
|
|
62
|
-
* @param
|
|
63
|
-
* @param
|
|
64
|
-
* @
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
* @param
|
|
102
|
-
* @
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
let
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
name: 'ReportTable',
|
|
3
|
+
functional: true,
|
|
4
|
+
render (h, content) {
|
|
5
|
+
if (!content.props.tableData) {
|
|
6
|
+
console.log('没有报表数据')
|
|
7
|
+
return
|
|
8
|
+
}
|
|
9
|
+
console.log('content=>', content)
|
|
10
|
+
const html = reportCompute(h, content.props.tableData)
|
|
11
|
+
console.log('html=>', html)
|
|
12
|
+
// 报表整体高度和宽度
|
|
13
|
+
const reportClass = `h-${html.h} w-${html.w}`
|
|
14
|
+
return (
|
|
15
|
+
<div id='ReportTableHome'>
|
|
16
|
+
<div id='reportTable' class={reportClass}>
|
|
17
|
+
{html.el}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* class类生成
|
|
25
|
+
* @param w 宽
|
|
26
|
+
* @param h 高
|
|
27
|
+
* @param l left
|
|
28
|
+
* @param t top
|
|
29
|
+
* @returns {string}
|
|
30
|
+
*/
|
|
31
|
+
function generClass ({ w = 1, h = 1, l, t }) {
|
|
32
|
+
return `w-${w} h-${h} l-${l} t-${t}`
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 判断是否是个Number数据
|
|
36
|
+
* @param value
|
|
37
|
+
* @returns {boolean}
|
|
38
|
+
*/
|
|
39
|
+
function typeNumber (value) {
|
|
40
|
+
return Object.prototype.toString.call(value) === '[object Number]'
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 判断是否是个object数据
|
|
44
|
+
* @param value
|
|
45
|
+
* @returns {boolean}
|
|
46
|
+
*/
|
|
47
|
+
function typeObject (value) {
|
|
48
|
+
return Object.prototype.toString.call(value) === '[object Object]'
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 判断是否是个Array数据
|
|
52
|
+
* @param value
|
|
53
|
+
* @returns {boolean}
|
|
54
|
+
*/
|
|
55
|
+
function typeArray (value) {
|
|
56
|
+
return Object.prototype.toString.call(value) === '[object Array]'
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 一行数据转换html函数
|
|
60
|
+
* @param h vue的h
|
|
61
|
+
* @param row 一行json数据
|
|
62
|
+
* @param left 起始left距离
|
|
63
|
+
* @param top 起始top距离
|
|
64
|
+
* @returns {{el: Array, h: number}}
|
|
65
|
+
*/
|
|
66
|
+
function rowCompute (h, row, left, top) {
|
|
67
|
+
if (typeObject(row)) {
|
|
68
|
+
const el = []
|
|
69
|
+
const keys = Object.keys(row).filter((res) => res !== 'span')
|
|
70
|
+
let heigth = 0
|
|
71
|
+
for (const key of keys.values()) {
|
|
72
|
+
const value = row[key]['value'] ? row[key]['value'] : row[key]
|
|
73
|
+
const style = { l: left, t: top + heigth }
|
|
74
|
+
style.w = row[key]['span'] ? row[key]['span'] : 1
|
|
75
|
+
const nextL = left + style.w
|
|
76
|
+
const nextT = top + heigth
|
|
77
|
+
const divObject = rowCompute(h, value, nextL, nextT)
|
|
78
|
+
el.push(divObject.el)
|
|
79
|
+
style.h = divObject.h ? divObject.h : 1
|
|
80
|
+
heigth += style.h
|
|
81
|
+
const attrs = { class: generClass(style) + ' title' }
|
|
82
|
+
const div = <div {...attrs}>{key === 'value' ? value : key}</div>
|
|
83
|
+
el.push(div)
|
|
84
|
+
}
|
|
85
|
+
return { h: heigth, el: el }
|
|
86
|
+
} else if (typeArray(row)) {
|
|
87
|
+
const el = []
|
|
88
|
+
for (const [i, value] of row.entries()) {
|
|
89
|
+
const style = { l: (left + i), t: top, w: 1, h: 1 }
|
|
90
|
+
const extraClass = typeNumber(value) ? 'bold' : 'title'
|
|
91
|
+
const attrs = { class: generClass(style) + ` ${extraClass}` }
|
|
92
|
+
const div = <div {...attrs}>{value}</div>
|
|
93
|
+
el.push(div)
|
|
94
|
+
}
|
|
95
|
+
return { h: 1, el: el }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* 完整报表数据转换html函数
|
|
100
|
+
* @param h vue的h
|
|
101
|
+
* @param jsonArr json数组
|
|
102
|
+
* @returns {{el: Array, h: number}}
|
|
103
|
+
*/
|
|
104
|
+
function reportCompute (h, jsonArr) {
|
|
105
|
+
const html = []
|
|
106
|
+
let heigth = 0
|
|
107
|
+
let width = 0
|
|
108
|
+
for (const [index, row] of jsonArr.entries()) {
|
|
109
|
+
const rowHtml = rowCompute(h, row, 0, index)
|
|
110
|
+
// 取第一行的宽度作为整个报表的宽度
|
|
111
|
+
if (index === 0) {
|
|
112
|
+
const reg = /w-\d\s/
|
|
113
|
+
for (const vNode of rowHtml.el) {
|
|
114
|
+
if (!vNode.data || !vNode.data.class) continue
|
|
115
|
+
const c = vNode.data.class
|
|
116
|
+
const w = c.match(reg)[0].split('-')[1]
|
|
117
|
+
width += (w - 0)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
heigth += rowHtml.h
|
|
121
|
+
html.push(rowHtml.el)
|
|
122
|
+
}
|
|
123
|
+
return { el: html, h: heigth, w: width }
|
|
124
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<report-table :tableData="tableData"></report-table>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import { post } from '@vue2-client/services/api'
|
|
7
|
-
import ReportTable from '@vue2-client/pages/report/ReportTable'
|
|
8
|
-
export default {
|
|
9
|
-
name: 'ReportTableHome',
|
|
10
|
-
components: { ReportTable },
|
|
11
|
-
data () {
|
|
12
|
-
return {
|
|
13
|
-
tableData: null
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
created () {
|
|
17
|
-
},
|
|
18
|
-
mounted () {
|
|
19
|
-
this.getData()
|
|
20
|
-
},
|
|
21
|
-
methods: {
|
|
22
|
-
async getData () {
|
|
23
|
-
this.tableData = await post('
|
|
24
|
-
console.log('数据=>', JSON.stringify(this.tableData))
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<report-table :tableData="tableData"></report-table>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { post } from '@vue2-client/services/api'
|
|
7
|
+
import ReportTable from '@vue2-client/pages/report/ReportTable'
|
|
8
|
+
export default {
|
|
9
|
+
name: 'ReportTableHome',
|
|
10
|
+
components: { ReportTable },
|
|
11
|
+
data () {
|
|
12
|
+
return {
|
|
13
|
+
tableData: null
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
created () {
|
|
17
|
+
},
|
|
18
|
+
mounted () {
|
|
19
|
+
this.getData()
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
async getData () {
|
|
23
|
+
this.tableData = await post('/api/af-system/logic/reportTest', {})
|
|
24
|
+
console.log('数据=>', JSON.stringify(this.tableData))
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
@@ -195,10 +195,10 @@ export default {
|
|
|
195
195
|
getStockList () {
|
|
196
196
|
this.loading = true
|
|
197
197
|
// 请求仓库列表
|
|
198
|
-
post('/af-system/getFilesStock', {}).then(res => {
|
|
198
|
+
post('/api/af-system/logic/getFilesStock', {}).then(res => {
|
|
199
199
|
this.data = res.sort((a, b) => a.progress - b.progress)
|
|
200
200
|
// 请求仓库列表
|
|
201
|
-
post('/af-system/getFilesColl', {}).then(res => {
|
|
201
|
+
post('/api/af-system/logic/getFilesColl', {}).then(res => {
|
|
202
202
|
this.coll = res
|
|
203
203
|
this.loading = false
|
|
204
204
|
})
|
|
@@ -269,7 +269,7 @@ export default {
|
|
|
269
269
|
},
|
|
270
270
|
submitStock () {
|
|
271
271
|
// 保存仓库信息
|
|
272
|
-
post('/
|
|
272
|
+
post('/api/af-system/entity/t_files_manager', this.form).then(res => {
|
|
273
273
|
this.$message.success('提交成功')
|
|
274
274
|
this.visible = false
|
|
275
275
|
this.getStockList()
|
|
@@ -252,11 +252,14 @@
|
|
|
252
252
|
import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
|
|
253
253
|
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
254
254
|
import submitTicketSuccess from './submitTicketSuccess'
|
|
255
|
+
import Upload from '@/base-client/components/common/Upload'
|
|
255
256
|
|
|
256
257
|
export default {
|
|
257
258
|
name: 'submitTicket',
|
|
258
259
|
components: {
|
|
259
|
-
XFormTable,
|
|
260
|
+
XFormTable,
|
|
261
|
+
submitTicketSuccess,
|
|
262
|
+
Upload
|
|
260
263
|
},
|
|
261
264
|
data () {
|
|
262
265
|
return {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const LogDetailsViewApi = {
|
|
2
2
|
// 查询:获取日志详情
|
|
3
|
-
getLogDetails: '/af-system/foreignaidGetLogDetails',
|
|
3
|
+
getLogDetails: '/api/af-system/logic/foreignaidGetLogDetails',
|
|
4
4
|
// 查询:获取日志维护记录
|
|
5
|
-
getLogRecordList: '/af-system/foreignaidGetRecordList',
|
|
5
|
+
getLogRecordList: '/api/af-system/logic/foreignaidGetRecordList',
|
|
6
6
|
// 操作:更新日志状态
|
|
7
|
-
updateLogStatusData: '/af-system/foreignaidUpdateLogStatus'
|
|
7
|
+
updateLogStatusData: '/api/af-system/logic/foreignaidUpdateLogStatus'
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export { LogDetailsViewApi }
|