vue2-client 1.7.1 → 1.7.3
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 +661 -658
- package/Components.md +60 -60
- package/index.js +0 -8
- package/package.json +83 -83
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +10 -7
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +1 -1
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +7 -3
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -96
- package/src/base-client/components/common/XForm/XFormItem.vue +2 -2
- package/src/base-client/components/common/XFormTable/XFormTable.vue +11 -8
- package/src/base-client/components/common/XTable/XTable.vue +1 -1
- package/src/base-client/components/index.js +41 -0
- package/src/components/menu/SideMenu.vue +15 -2
- package/src/config/default/setting.config.js +1 -1
- package/src/lib.js +1 -0
- package/src/pages/CreateQueryPage.vue +39 -41
- package/src/router/async/router.map.js +2 -0
- package/src/services/api/common.js +6 -0
- package/vue.config.js +1 -1
|
@@ -401,8 +401,8 @@ export default {
|
|
|
401
401
|
const value = newVal[this.attr.model]
|
|
402
402
|
const isEmpty = !value || !value.toString()
|
|
403
403
|
// 查询表单点击重置按钮时清空树形选择框选中状态
|
|
404
|
-
if (this.attr.type === 'treeSelect' && isEmpty) {
|
|
405
|
-
|
|
404
|
+
if (this.$refs.XTreeSelect && this.attr.type === 'treeSelect' && isEmpty) {
|
|
405
|
+
this.$refs.xTreeSelect.setValue(undefined)
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
408
|
deep: true
|
|
@@ -50,7 +50,7 @@ import XForm from '@vue2-client/base-client/components/common/XForm'
|
|
|
50
50
|
import XAddForm from '@vue2-client/base-client/components/common/XAddForm'
|
|
51
51
|
import XTable from '@vue2-client/base-client/components/common/XTable'
|
|
52
52
|
import XImportExcel from '@vue2-client/base-client/components/common/XImportExcel'
|
|
53
|
-
import { addOrModify, getConfigUrl } from '@vue2-client/services/api/common'
|
|
53
|
+
import { addOrModify, getConfigUrl, parseConfigUrl } from '@vue2-client/services/api/common'
|
|
54
54
|
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
55
55
|
import { mapState } from 'vuex'
|
|
56
56
|
import { post } from '@vue2-client/services/api/restTools'
|
|
@@ -186,8 +186,11 @@ export default {
|
|
|
186
186
|
},
|
|
187
187
|
getColumnsJsonBySource () {
|
|
188
188
|
this.loading = true
|
|
189
|
-
const url =
|
|
190
|
-
post(url, {
|
|
189
|
+
const url = parseConfigUrl(this.serviceName)
|
|
190
|
+
post(url, {
|
|
191
|
+
configType: 'CRUD_FORM',
|
|
192
|
+
configContent: this.queryParamsJson
|
|
193
|
+
}).then(res => {
|
|
191
194
|
this.updateComponents(res, true)
|
|
192
195
|
})
|
|
193
196
|
},
|
|
@@ -213,11 +216,11 @@ export default {
|
|
|
213
216
|
title: this.title,
|
|
214
217
|
viewMode: this.viewMode,
|
|
215
218
|
isTableTemp: this.isTableTemp,
|
|
216
|
-
serviceName:
|
|
219
|
+
serviceName: this.serviceName
|
|
217
220
|
})
|
|
218
221
|
this.$refs.xForm.init({
|
|
219
222
|
formItems: res.formJson,
|
|
220
|
-
serviceName:
|
|
223
|
+
serviceName: this.serviceName,
|
|
221
224
|
getDataParams: this.getDataParams
|
|
222
225
|
})
|
|
223
226
|
}
|
|
@@ -249,7 +252,7 @@ export default {
|
|
|
249
252
|
businessType: res.businessType,
|
|
250
253
|
operator: res.currUserName
|
|
251
254
|
}
|
|
252
|
-
addOrModify(requestParameters,
|
|
255
|
+
addOrModify(requestParameters, this.serviceName).then(data => {
|
|
253
256
|
this.$message.success(res.businessType + '成功!')
|
|
254
257
|
this.refreshTable(res.businessType === '新增')
|
|
255
258
|
// commit
|
|
@@ -289,7 +292,7 @@ export default {
|
|
|
289
292
|
formItems: res.formJson,
|
|
290
293
|
viewMode: this.viewMode,
|
|
291
294
|
isTableTemp: this.isTableTemp,
|
|
292
|
-
serviceName:
|
|
295
|
+
serviceName: this.serviceName,
|
|
293
296
|
fixedAddForm: this.fixedAddForm,
|
|
294
297
|
getDataParams: this.getDataParams
|
|
295
298
|
})
|
|
@@ -307,7 +310,7 @@ export default {
|
|
|
307
310
|
formItems: res.formJson,
|
|
308
311
|
viewMode: this.viewMode,
|
|
309
312
|
isTableTemp: this.isTableTemp,
|
|
310
|
-
serviceName:
|
|
313
|
+
serviceName: this.serviceName,
|
|
311
314
|
fixedAddForm: this.fixedAddForm,
|
|
312
315
|
getDataParams: this.getDataParams,
|
|
313
316
|
modifyModelData: modifyModelData
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import XForm from './common/XForm'
|
|
2
|
+
import XAddForm from './common/XAddForm'
|
|
3
|
+
import XAddNativeForm from './common/XAddNativeForm'
|
|
4
|
+
import XFormCol from './common/XFormCol'
|
|
5
|
+
import XTable from './common/XTable'
|
|
6
|
+
import XTreeOne from './common/XTreeOne'
|
|
7
|
+
import XImportExcel from './common/XImportExcel'
|
|
8
|
+
import XDataDrawer from './common/XDataDrawer'
|
|
9
|
+
import XCard from './common/XCard'
|
|
10
|
+
import XBadge from './common/XBadge'
|
|
11
|
+
import Upload from './common/Upload'
|
|
12
|
+
import JSONToTree from './common/JSONToTree'
|
|
13
|
+
import FormGroupEdit from './common/FormGroupEdit'
|
|
14
|
+
import FormGroupQuery from './common/FormGroupQuery'
|
|
15
|
+
import AddressSearchCombobox from './common/AddressSearchCombobox'
|
|
16
|
+
import AmapMarker from './common/AmapMarker'
|
|
17
|
+
import CreateQuery from './common/CreateQuery'
|
|
18
|
+
import CreateSimpleFormQuery from './common/CreateSimpleFormQuery'
|
|
19
|
+
import PersonSetting from './common/PersonSetting'
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
XForm,
|
|
23
|
+
XAddForm,
|
|
24
|
+
XAddNativeForm,
|
|
25
|
+
XFormCol,
|
|
26
|
+
XTable,
|
|
27
|
+
XTreeOne,
|
|
28
|
+
XImportExcel,
|
|
29
|
+
XDataDrawer,
|
|
30
|
+
XCard,
|
|
31
|
+
XBadge,
|
|
32
|
+
Upload,
|
|
33
|
+
JSONToTree,
|
|
34
|
+
FormGroupEdit,
|
|
35
|
+
FormGroupQuery,
|
|
36
|
+
AddressSearchCombobox,
|
|
37
|
+
AmapMarker,
|
|
38
|
+
CreateQuery,
|
|
39
|
+
CreateSimpleFormQuery,
|
|
40
|
+
PersonSetting
|
|
41
|
+
}
|
|
@@ -8,8 +8,14 @@
|
|
|
8
8
|
:trigger="null">
|
|
9
9
|
<div :class="['logo', theme]">
|
|
10
10
|
<router-link to="/dashboard/workplace">
|
|
11
|
-
<
|
|
12
|
-
|
|
11
|
+
<a-row type="flex" align="middle" style="height: 64px;word-wrap: break-word;word-break:break-all;">
|
|
12
|
+
<a-col :span="4">
|
|
13
|
+
<img :src="logoSrc" alt="logo">
|
|
14
|
+
</a-col>
|
|
15
|
+
<a-col :span="20" style="line-height: 18px;" v-show="!collapsed">
|
|
16
|
+
<span style="vertical-align: middle" :style="{ fontWeight: 'bold', fontSize: systemNameFontSizeMain, color: 'white' }">{{ systemName }}</span>
|
|
17
|
+
</a-col>
|
|
18
|
+
</a-row>
|
|
13
19
|
</router-link>
|
|
14
20
|
</div>
|
|
15
21
|
<i-menu :theme="theme" :collapsed="collapsed" :options="menuData" @select="onSelect" class="menu"/>
|
|
@@ -47,6 +53,13 @@ export default {
|
|
|
47
53
|
sideTheme () {
|
|
48
54
|
return this.theme === 'light' ? this.theme : 'dark'
|
|
49
55
|
},
|
|
56
|
+
systemNameFontSizeMain () {
|
|
57
|
+
let systemNameFontSize = this.systemNameFontSize
|
|
58
|
+
if (this.systemName.length > 15) {
|
|
59
|
+
systemNameFontSize = '18px'
|
|
60
|
+
}
|
|
61
|
+
return systemNameFontSize
|
|
62
|
+
},
|
|
50
63
|
...mapState('setting', ['isMobile', 'systemName', 'logoSrc', 'systemNameFontSize'])
|
|
51
64
|
},
|
|
52
65
|
methods: {
|
package/src/lib.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log('进入模块')
|
|
@@ -2,24 +2,34 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<create-query
|
|
4
4
|
:visible.sync="visible"
|
|
5
|
-
|
|
5
|
+
:to-edit-json="toEditJson"
|
|
6
6
|
/>
|
|
7
7
|
<create-simple-form-query
|
|
8
8
|
:visible.sync="createSimpleFormVisible"
|
|
9
|
-
|
|
9
|
+
:to-edit-json="toEditSimpleFormJson"
|
|
10
10
|
/>
|
|
11
|
-
<a-
|
|
11
|
+
<a-modal
|
|
12
|
+
:visible="importJsonVisible"
|
|
13
|
+
title="导入JSON配置"
|
|
14
|
+
@cancel="importJsonVisible = false"
|
|
15
|
+
@ok="importJsonHandleOk"
|
|
16
|
+
>
|
|
17
|
+
<a-textarea v-model="importEditJson" placeholder="输入现有的JSON配置"/>
|
|
18
|
+
</a-modal>
|
|
19
|
+
<a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="showDrawer">创建查询配置
|
|
12
20
|
</a-button>
|
|
21
|
+
<a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="openImportView(1)">导入已有查询配置
|
|
22
|
+
</a-button>
|
|
23
|
+
<br/>
|
|
13
24
|
<a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="showSimpleFormQueryParamsDrawer">
|
|
14
|
-
|
|
25
|
+
创建简易表单配置
|
|
26
|
+
</a-button>
|
|
27
|
+
<a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="openImportView(2)">导入已有简易表单配置
|
|
15
28
|
</a-button>
|
|
16
|
-
<a-button style="margin-top: 10px;margin-left: 10px;" type="primary" @click="searchReport">请求数据</a-button>
|
|
17
|
-
<!-- <webmeter-analysis-view/>-->
|
|
18
29
|
</div>
|
|
19
30
|
</template>
|
|
20
31
|
|
|
21
32
|
<script>
|
|
22
|
-
import { post } from '@vue2-client/services/api/restTools'
|
|
23
33
|
import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
|
|
24
34
|
import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
|
|
25
35
|
|
|
@@ -32,7 +42,12 @@ export default {
|
|
|
32
42
|
data () {
|
|
33
43
|
return {
|
|
34
44
|
visible: false,
|
|
35
|
-
createSimpleFormVisible: false
|
|
45
|
+
createSimpleFormVisible: false,
|
|
46
|
+
toEditJson: undefined,
|
|
47
|
+
toEditSimpleFormJson: undefined,
|
|
48
|
+
importJsonVisible: false,
|
|
49
|
+
type: undefined,
|
|
50
|
+
importEditJson: ''
|
|
36
51
|
}
|
|
37
52
|
},
|
|
38
53
|
methods: {
|
|
@@ -42,41 +57,24 @@ export default {
|
|
|
42
57
|
showSimpleFormQueryParamsDrawer () {
|
|
43
58
|
this.createSimpleFormVisible = true
|
|
44
59
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
'data': {
|
|
49
|
-
'condition': ' 1=1 ',
|
|
50
|
-
'startDate': '2022-11-21 00:00:00',
|
|
51
|
-
'endDate': '2022-11-21 23:59:59',
|
|
52
|
-
'f_orgid': 'f_orgid in (21142)'
|
|
53
|
-
}
|
|
54
|
-
}).then(res => {
|
|
55
|
-
this.$message.success(res)
|
|
56
|
-
}, err => {
|
|
57
|
-
console.error(err)
|
|
58
|
-
})
|
|
60
|
+
openImportView (type) {
|
|
61
|
+
this.type = type
|
|
62
|
+
this.importJsonVisible = true
|
|
59
63
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
importJsonHandleOk () {
|
|
65
|
+
try {
|
|
66
|
+
if (this.type === 1) {
|
|
67
|
+
this.toEditJson = JSON.parse(this.importEditJson)
|
|
68
|
+
this.showDrawer()
|
|
69
|
+
} else {
|
|
70
|
+
this.toEditSimpleFormJson = JSON.parse(this.importEditJson)
|
|
71
|
+
this.showSimpleFormQueryParamsDrawer()
|
|
72
|
+
}
|
|
73
|
+
} catch (e) {
|
|
74
|
+
this.$message.warn('操作失败,输入配置不是JSON格式')
|
|
75
|
+
}
|
|
76
|
+
this.importJsonVisible = false
|
|
69
77
|
},
|
|
70
|
-
// 存储基础表单配置信息
|
|
71
|
-
saveSimpleFormQueryParams (source) {
|
|
72
|
-
return post('/api/system/logic/addOrEditSimpleFormQueryParams', {
|
|
73
|
-
source: source
|
|
74
|
-
}).then(res => {
|
|
75
|
-
this.$message.success('保存基础表单配置成功')
|
|
76
|
-
}, err => {
|
|
77
|
-
console.error(err)
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
80
|
</script>
|
|
@@ -31,6 +31,8 @@ routerResource.operLog = () => import('@vue2-client/pages/system/monitor/operLog
|
|
|
31
31
|
routerResource.submitTicket = () => import('@vue2-client/pages/system/ticket')
|
|
32
32
|
// 系统设置
|
|
33
33
|
routerResource.settings = () => import('@vue2-client/pages/system/settings')
|
|
34
|
+
// 查询配置生成工具
|
|
35
|
+
routerResource.createQuery = () => import('@vue2-client/pages/CreateQueryPage')
|
|
34
36
|
|
|
35
37
|
// 基础路由组件注册
|
|
36
38
|
const routerMap = {
|
|
@@ -9,6 +9,8 @@ import { post } from '@vue2-client/services/api/restTools'
|
|
|
9
9
|
const commonApi = {
|
|
10
10
|
// 获取表格列配置
|
|
11
11
|
getConfig: 'logic/getLiuliConfiguration',
|
|
12
|
+
// 配置解析
|
|
13
|
+
parseConfig: 'logic/parseConfig',
|
|
12
14
|
// 通用查询
|
|
13
15
|
query: 'logic/commonQuery',
|
|
14
16
|
// 表单查询
|
|
@@ -35,6 +37,10 @@ export function getConfigUrl (serviceName = 'system') {
|
|
|
35
37
|
return '/api/' + serviceName + '/' + commonApi.getConfig
|
|
36
38
|
}
|
|
37
39
|
|
|
40
|
+
export function parseConfigUrl (serviceName = 'system') {
|
|
41
|
+
return '/api/' + serviceName + '/' + commonApi.parseConfig
|
|
42
|
+
}
|
|
43
|
+
|
|
38
44
|
/**
|
|
39
45
|
* 带缓存查询的表格配置文件查询
|
|
40
46
|
* @param queryParamsName 配置名称
|
package/vue.config.js
CHANGED