vue2-client 1.2.67 → 1.2.70

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 (42) hide show
  1. package/.env +15 -15
  2. package/.eslintrc.js +82 -82
  3. package/CHANGELOG.md +12 -1
  4. package/package.json +1 -1
  5. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +1 -1
  6. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +8 -6
  7. package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
  8. package/src/base-client/components/common/CitySelect/index.js +3 -3
  9. package/src/base-client/components/common/CitySelect/index.md +109 -109
  10. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +773 -770
  11. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
  12. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -550
  13. package/src/base-client/components/common/Upload/Upload.vue +151 -151
  14. package/src/base-client/components/common/Upload/index.js +3 -3
  15. package/src/base-client/components/common/XAddForm/XAddForm.vue +345 -345
  16. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
  17. package/src/base-client/components/common/XForm/XForm.vue +268 -268
  18. package/src/base-client/components/common/XForm/XFormItem.vue +358 -358
  19. package/src/base-client/components/common/XFormTable/XFormTable.vue +6 -0
  20. package/src/base-client/components/common/XTable/XTable.vue +14 -12
  21. package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +1 -1
  22. package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +1 -2
  23. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
  24. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +1 -1
  25. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
  26. package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +300 -300
  27. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +647 -647
  28. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  29. package/src/base-client/plugins/AppData.js +70 -70
  30. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  31. package/src/config/CreateQueryConfig.js +301 -301
  32. package/src/pages/resourceManage/orgListManage.vue +98 -98
  33. package/src/router/async/config.async.js +26 -26
  34. package/src/router/async/router.map.js +60 -60
  35. package/src/router/index.js +27 -27
  36. package/src/services/api/common.js +56 -56
  37. package/src/services/api/manage.js +16 -16
  38. package/src/services/api/restTools.js +24 -24
  39. package/src/theme/default/style.less +47 -47
  40. package/src/utils/map-utils.js +28 -28
  41. package/src/utils/request.js +198 -198
  42. package/src/utils/util.js +222 -222
@@ -219,6 +219,12 @@ export default {
219
219
  }
220
220
  },
221
221
  methods: {
222
+ refreshTable () {
223
+ this.$refs.xTable.refresh(true)
224
+ },
225
+ clearRowKeys () {
226
+ this.$refs.xTable.clearRowKeys()
227
+ },
222
228
  getColumnsJsonBySource () {
223
229
  this.mainLoading = true
224
230
  post(commonApi.getColumnsJson, { queryObject: this.queryParamsJson }).then(res => {
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div>
3
3
  <custom-columns-drawer
4
- :visible.sync="visible"
4
+ :columns-meta="jsonData"
5
5
  :columns.sync="tableColumns"
6
- :columns-meta="jsonData"/>
6
+ :visible.sync="visible"/>
7
7
  <a-row :gutter="48">
8
8
  <a-col>
9
9
  <span :style="{ float: 'left', overflow: 'hidden', marginBottom: '8px' }">
@@ -22,7 +22,7 @@
22
22
  <a-button @click="showDrawer">
23
23
  <a-icon :style="iconStyle" type="table" />
24
24
  </a-button>
25
- <a-button @click="exports" v-if="!buttonState || buttonState.export">
25
+ <a-button v-if="!buttonState || buttonState.export" @click="exports">
26
26
  <a-icon :style="iconStyle" type="cloud-download"/>
27
27
  </a-button>
28
28
  </a-button-group>
@@ -31,37 +31,37 @@
31
31
  </a-row>
32
32
  <s-table
33
33
  ref="table"
34
- size="default"
35
- :rowKey="rowKey"
34
+ :alert="true"
36
35
  :columns="tableColumns"
37
36
  :data="loadData"
38
- :alert="true"
37
+ :rowKey="rowKey"
39
38
  :rowSelection="rowSelection"
40
- showPagination="auto"
41
39
  :scroll="{ x: scrollXWidth, y: scrollYWidth }"
40
+ showPagination="auto"
41
+ size="default"
42
42
  >
43
43
  <template
44
44
  v-for="(item, index) in tableColumns"
45
45
  :slot="item.dataIndex"
46
46
  slot-scope="text, record">
47
47
  <!-- 文本溢出省略(ellipsis) -->
48
- <span :key="index" v-if="item.slotType === 'ellipsis'">
48
+ <span v-if="item.slotType === 'ellipsis'" :key="index">
49
49
  <ellipsis :length="item.slotValue" tooltip>{{ text === '' ? '--' : text }}</ellipsis>
50
50
  </span>
51
51
  <!-- 徽标(badge) -->
52
- <span :key="index" v-else-if="item.slotType === 'badge'">
52
+ <span v-else-if="item.slotType === 'badge'" :key="index">
53
53
  <x-badge :badge-key="item.slotKeyMap" :value="text" />
54
54
  </span>
55
55
  <!-- 日期(date) -->
56
- <span :key="index" v-else-if="item.slotType === 'date'">
56
+ <span v-else-if="item.slotType === 'date'" :key="index">
57
57
  {{ format(text,'yyyy-MM-dd') }}
58
58
  </span>
59
59
  <!-- 日期时间(datetime) -->
60
- <span :key="index" v-else-if="item.slotType === 'dateTime'">
60
+ <span v-else-if="item.slotType === 'dateTime'" :key="index">
61
61
  {{ format(text,'yyyy-MM-dd hh:mm:ss') }}
62
62
  </span>
63
63
  <!-- 操作列(action) -->
64
- <span :key="index" v-else-if="item.slotType === 'action'">
64
+ <span v-else-if="item.slotType === 'action'" :key="index">
65
65
  <a @click="action(record)">{{ item.slotValue }}</a>
66
66
  </span>
67
67
  </template>
@@ -206,6 +206,8 @@ export default {
206
206
  if (item.dataIndex === 'action') {
207
207
  item.fixed = 'right'
208
208
  item.width = 70
209
+ } else {
210
+ item.sorter = true
209
211
  }
210
212
  if (item.width) {
211
213
  totalWidth = totalWidth + item.width
@@ -190,7 +190,7 @@ export default {
190
190
  },
191
191
  props: {
192
192
  brandId: {
193
- type: String || Number,
193
+ type: Number,
194
194
  required: true
195
195
  },
196
196
  visible: {
@@ -96,8 +96,7 @@ export default {
96
96
  { key: '2', tab: '抄表' },
97
97
  { key: '3', tab: '指令' },
98
98
  { key: '4', tab: '异常' },
99
- { key: '5', tab: '指令操作' },
100
- { key: '6', tab: '设备位置' }
99
+ { key: '5', tab: '指令操作' }
101
100
  ],
102
101
  // 设备详情加载
103
102
  loadDeviceDetails: true
@@ -1,57 +1,57 @@
1
- <template>
2
- <a-card :bordered="false">
3
- <x-form-table
4
- v-if="tabActiveKey === '1'"
5
- :queryParamsName="queryParamsName"
6
- :fixedQueryForm="fixedQueryForm"
7
- @onSubmit="onSubmit"
8
- @action="toDetail">
9
- </x-form-table>
10
- </a-card>
11
- </template>
12
-
13
- <script>
14
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
15
-
16
- export default {
17
- name: 'DeviceDetailsException',
18
- components: {
19
- XFormTable
20
- },
21
- data () {
22
- return {
23
- // 选中的异常编号
24
- selectSingularId: undefined,
25
- tabActiveKey: undefined,
26
- fixedQueryForm: {},
27
- // 查询配置文件名
28
- queryParamsName: 'deviceToExceptionQueryParams',
29
- // 是否显示设置设备参数详情抽屉
30
- detailVisible: false
31
- }
32
- },
33
- props: {
34
- deviceId: {
35
- type: Number,
36
- required: true
37
- }
38
- },
39
- mounted () {
40
- this.initView()
41
- },
42
- methods: {
43
- initView () {
44
- this.tabActiveKey = '1'
45
- this.fixedQueryForm['e_f_device_id'] = this.deviceId
46
- },
47
- onSubmit (res) {
48
- res.form['e_f_device_id'] = this.deviceId
49
- this.$emit('onSubmit', res)
50
- },
51
- toDetail (record, id) {
52
- // this.selectSingularId = record.id + ''
53
- // this.detailVisible = true
54
- }
55
- }
56
- }
57
- </script>
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <x-form-table
4
+ v-if="tabActiveKey === '1'"
5
+ :queryParamsName="queryParamsName"
6
+ :fixedQueryForm="fixedQueryForm"
7
+ @onSubmit="onSubmit"
8
+ @action="toDetail">
9
+ </x-form-table>
10
+ </a-card>
11
+ </template>
12
+
13
+ <script>
14
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
15
+
16
+ export default {
17
+ name: 'DeviceDetailsException',
18
+ components: {
19
+ XFormTable
20
+ },
21
+ data () {
22
+ return {
23
+ // 选中的异常编号
24
+ selectSingularId: undefined,
25
+ tabActiveKey: undefined,
26
+ fixedQueryForm: {},
27
+ // 查询配置文件名
28
+ queryParamsName: 'deviceToExceptionQueryParams',
29
+ // 是否显示设置设备参数详情抽屉
30
+ detailVisible: false
31
+ }
32
+ },
33
+ props: {
34
+ deviceId: {
35
+ type: Number,
36
+ required: true
37
+ }
38
+ },
39
+ mounted () {
40
+ this.initView()
41
+ },
42
+ methods: {
43
+ initView () {
44
+ this.tabActiveKey = '1'
45
+ this.fixedQueryForm['e_f_device_id'] = this.deviceId
46
+ },
47
+ onSubmit (res) {
48
+ res.form['e_f_device_id'] = this.deviceId
49
+ this.$emit('onSubmit', res)
50
+ },
51
+ toDetail (record, id) {
52
+ // this.selectSingularId = record.id + ''
53
+ // this.detailVisible = true
54
+ }
55
+ }
56
+ }
57
+ </script>
@@ -119,7 +119,7 @@
119
119
  </a-col>
120
120
  <a-col :span="12">
121
121
  <a-card :bordered="false" title="设备位置" :loading="loading">
122
- <AmapPointRendering :markers="details" :describeList="describeList" :mapStyle="{width: '100%',height: '381px',border: '2px solid lightgray','border-radius': '5px'}"/>
122
+ <AmapPointRendering :markers="details.f_install_lng_lat" :describeList="describeList" :mapStyle="{width: '100%',height: '381px',border: '2px solid lightgray','border-radius': '5px'}"/>
123
123
  </a-card>
124
124
  </a-col>
125
125
  </a-row>
@@ -1,131 +1,131 @@
1
- <template>
2
- <div>
3
- <x-form-table
4
- :logicName="logicName"
5
- :logicParam="logicParam"
6
- :fixedQueryForm="fixedQueryForm"
7
- @onSubmit="onSubmit"
8
- @action="toDetail">
9
- </x-form-table>
10
- </div>
11
- </template>
12
- <script>
13
-
14
- import { STable, Ellipsis } from '@vue2-client/components'
15
- import { formatDate } from '@vue2-client/utils/util'
16
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
17
-
18
- export default {
19
- name: 'DeviceDetailsInstruct',
20
- components: {
21
- STable,
22
- Ellipsis,
23
- XFormTable
24
- },
25
- props: {
26
- deviceId: {
27
- type: Number,
28
- required: true
29
- }
30
- },
31
- data () {
32
- return {
33
- selectInstructId: undefined,
34
- startForm: {},
35
- fixedQueryForm: {},
36
- detailsViewVisible: false,
37
- // 加载数据方法 必须为 Promise 对象
38
- selectedRowKeys: [],
39
- selectedRows: [],
40
- logicName: 'getIotRead',
41
- logicParam: null,
42
- // 默认表格数据
43
- defaultData: {
44
- data: [],
45
- pageSize: 0,
46
- pageNo: 0,
47
- totalPage: 0,
48
- totalCount: 0
49
- },
50
- isShowUserFiles: false
51
- }
52
- },
53
- computed: {
54
- rowSelection () {
55
- return {
56
- selectedRowKeys: this.selectedRowKeys,
57
- onChange: this.onSelectChange
58
- }
59
- }
60
- },
61
- mounted () {
62
- this.initView()
63
- },
64
- methods: {
65
- initView () {
66
- this.logicParam = {
67
- id: this.deviceId
68
- }
69
- this.fixedQueryForm['d_id'] = this.deviceId
70
- },
71
- onSubmit (res) {
72
- res.form['d_id'] = this.deviceId
73
- this.$emit('onSubmit', res)
74
- },
75
- refresh () {
76
- this.$refs.table.refresh(true)
77
- },
78
- onSelectChange (selectedRowKeys, selectedRows) {
79
- this.selectedRowKeys = selectedRowKeys
80
- this.selectedRows = selectedRows
81
- },
82
- format (date, format) {
83
- return formatDate(date, format)
84
- },
85
- toDetail (record) {
86
- this.selectInstructId = record.id + ''
87
- this.detailsViewVisible = true
88
- }
89
- }
90
- }
91
- </script>
92
-
93
- <style lang='less' scoped>
94
- .detail-layout {
95
- margin-left: 44px
96
- }
97
- .text {
98
- color: rgba(0, 0, 0, .45)
99
- }
100
-
101
- .heading {
102
- color: rgba(0, 0, 0, .85);
103
- font-size: 20px
104
- }
105
-
106
- .no-data {
107
- color: rgba(0, 0, 0, .25);
108
- text-align: center;
109
- line-height: 64px;
110
- font-size: 16px
111
-
112
- /*i {*/
113
- /* font-size: 24px*/
114
- /* margin-right: 16px*/
115
- /* position: relative*/
116
- /* top: 3px*/
117
- /*}*/
118
- }
119
-
120
- .mobile {
121
- .detail-layout {
122
- margin-left: unset
123
- }
124
- .text {
125
-
126
- }
127
- .status-list {
128
- text-align: left
129
- }
130
- }
131
- </style>
1
+ <template>
2
+ <div>
3
+ <x-form-table
4
+ :logicName="logicName"
5
+ :logicParam="logicParam"
6
+ :fixedQueryForm="fixedQueryForm"
7
+ @onSubmit="onSubmit"
8
+ @action="toDetail">
9
+ </x-form-table>
10
+ </div>
11
+ </template>
12
+ <script>
13
+
14
+ import { STable, Ellipsis } from '@vue2-client/components'
15
+ import { formatDate } from '@vue2-client/utils/util'
16
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
17
+
18
+ export default {
19
+ name: 'DeviceDetailsInstruct',
20
+ components: {
21
+ STable,
22
+ Ellipsis,
23
+ XFormTable
24
+ },
25
+ props: {
26
+ deviceId: {
27
+ type: Number,
28
+ required: true
29
+ }
30
+ },
31
+ data () {
32
+ return {
33
+ selectInstructId: undefined,
34
+ startForm: {},
35
+ fixedQueryForm: {},
36
+ detailsViewVisible: false,
37
+ // 加载数据方法 必须为 Promise 对象
38
+ selectedRowKeys: [],
39
+ selectedRows: [],
40
+ logicName: 'getIotRead',
41
+ logicParam: null,
42
+ // 默认表格数据
43
+ defaultData: {
44
+ data: [],
45
+ pageSize: 0,
46
+ pageNo: 0,
47
+ totalPage: 0,
48
+ totalCount: 0
49
+ },
50
+ isShowUserFiles: false
51
+ }
52
+ },
53
+ computed: {
54
+ rowSelection () {
55
+ return {
56
+ selectedRowKeys: this.selectedRowKeys,
57
+ onChange: this.onSelectChange
58
+ }
59
+ }
60
+ },
61
+ mounted () {
62
+ this.initView()
63
+ },
64
+ methods: {
65
+ initView () {
66
+ this.logicParam = {
67
+ id: this.deviceId
68
+ }
69
+ this.fixedQueryForm['d_id'] = this.deviceId
70
+ },
71
+ onSubmit (res) {
72
+ res.form['d_id'] = this.deviceId
73
+ this.$emit('onSubmit', res)
74
+ },
75
+ refresh () {
76
+ this.$refs.table.refresh(true)
77
+ },
78
+ onSelectChange (selectedRowKeys, selectedRows) {
79
+ this.selectedRowKeys = selectedRowKeys
80
+ this.selectedRows = selectedRows
81
+ },
82
+ format (date, format) {
83
+ return formatDate(date, format)
84
+ },
85
+ toDetail (record) {
86
+ this.selectInstructId = record.id + ''
87
+ this.detailsViewVisible = true
88
+ }
89
+ }
90
+ }
91
+ </script>
92
+
93
+ <style lang='less' scoped>
94
+ .detail-layout {
95
+ margin-left: 44px
96
+ }
97
+ .text {
98
+ color: rgba(0, 0, 0, .45)
99
+ }
100
+
101
+ .heading {
102
+ color: rgba(0, 0, 0, .85);
103
+ font-size: 20px
104
+ }
105
+
106
+ .no-data {
107
+ color: rgba(0, 0, 0, .25);
108
+ text-align: center;
109
+ line-height: 64px;
110
+ font-size: 16px
111
+
112
+ /*i {*/
113
+ /* font-size: 24px*/
114
+ /* margin-right: 16px*/
115
+ /* position: relative*/
116
+ /* top: 3px*/
117
+ /*}*/
118
+ }
119
+
120
+ .mobile {
121
+ .detail-layout {
122
+ margin-left: unset
123
+ }
124
+ .text {
125
+
126
+ }
127
+ .status-list {
128
+ text-align: left
129
+ }
130
+ }
131
+ </style>