vue2-client 1.3.1 → 1.3.4

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 (108) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/index.js +30 -28
  3. package/package.json +1 -1
  4. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
  5. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
  6. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
  7. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -163
  8. package/src/base-client/components/common/ScrollList/ScrollList.vue +113 -0
  9. package/src/base-client/components/common/ScrollList/index.js +3 -0
  10. package/src/base-client/components/common/Upload/Upload.vue +161 -158
  11. package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
  12. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +321 -322
  13. package/src/base-client/components/common/XForm/XForm.vue +273 -268
  14. package/src/base-client/components/common/XForm/XFormItem.vue +387 -371
  15. package/src/base-client/components/common/XFormTable/XFormTable.vue +6 -5
  16. package/src/base-client/components/common/XTable/XTable.vue +278 -274
  17. package/src/base-client/components/{iot → system}/LogDetailsView/LogDetailsView.vue +0 -0
  18. package/src/base-client/components/{iot → system}/LogDetailsView/index.js +0 -0
  19. package/src/base-client/components/{iot → system}/LogDetailsView/index.md +0 -0
  20. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -280
  21. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +806 -804
  22. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +24 -24
  23. package/src/base-client/plugins/PagedList.js +177 -176
  24. package/src/components/STable/index.js +318 -316
  25. package/src/components/index.js +36 -36
  26. package/src/components/table/StandardTable.vue +141 -142
  27. package/src/components/tool/TagSelect.vue +83 -83
  28. package/src/layouts/header/AdminHeader.vue +104 -109
  29. package/src/layouts/header/HeaderNotice.vue +167 -199
  30. package/src/layouts/header/InstitutionDetail.vue +181 -182
  31. package/src/pages/CreateQueryPage.vue +65 -59
  32. package/src/pages/system/dictionary/index.vue +43 -41
  33. package/src/pages/system/file/Info.vue +56 -0
  34. package/src/pages/system/file/index.vue +317 -0
  35. package/src/pages/system/queryParams/index.vue +43 -41
  36. package/src/pages/system/ticket/index.vue +458 -452
  37. package/src/pages/system/ticket/submitTicketSuccess.vue +206 -203
  38. package/src/router/async/config.async.js +2 -1
  39. package/src/router/async/router.map.js +56 -60
  40. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  41. package/src/services/api/LogDetailsViewApi.js +10 -10
  42. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  43. package/src/services/api/TicketDetailsViewApi.js +42 -40
  44. package/src/services/api/commonTempTable.js +10 -0
  45. package/src/services/api/index.js +2 -24
  46. package/src/services/api/manage.js +8 -16
  47. package/src/utils/excel/Blob.js +181 -181
  48. package/src/utils/excel/Export2Excel.js +141 -142
  49. package/src/utils/i18n.js +80 -80
  50. package/src/utils/request.js +4 -4
  51. package/src/utils/routerUtil.js +358 -350
  52. package/src/utils/theme-color-replacer-extend.js +91 -92
  53. package/vue.config.js +109 -163
  54. package/src/base-client/all.js +0 -62
  55. package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +0 -225
  56. package/src/base-client/components/iot/CustomerDetailsView/index.js +0 -3
  57. package/src/base-client/components/iot/CustomerDetailsView/index.md +0 -40
  58. package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +0 -127
  59. package/src/base-client/components/iot/DataAnalysisUser/index.js +0 -3
  60. package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +0 -452
  61. package/src/base-client/components/iot/DeviceBrandDetailsView/index.js +0 -3
  62. package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +0 -232
  63. package/src/base-client/components/iot/DeviceDetailsView/index.js +0 -3
  64. package/src/base-client/components/iot/DeviceDetailsView/index.md +0 -41
  65. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +0 -678
  66. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +0 -57
  67. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +0 -122
  68. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +0 -121
  69. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +0 -269
  70. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +0 -131
  71. package/src/base-client/components/iot/DeviceDetailsView/part/index.js +0 -8
  72. package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +0 -300
  73. package/src/base-client/components/iot/DeviceTypeDetailsView/index.js +0 -3
  74. package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +0 -464
  75. package/src/base-client/components/iot/InstructDetailsView/index.js +0 -3
  76. package/src/base-client/components/iot/InstructDetailsView/index.md +0 -43
  77. package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +0 -352
  78. package/src/base-client/components/iot/MeterDetailsView/index.js +0 -3
  79. package/src/base-client/components/iot/MeterDetailsView/index.md +0 -41
  80. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +0 -330
  81. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +0 -179
  82. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +0 -285
  83. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +0 -230
  84. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +0 -251
  85. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +0 -184
  86. package/src/base-client/components/iot/MeterDetailsView/part/index.js +0 -9
  87. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +0 -960
  88. package/src/base-client/components/iot/WebmeterAnalysisView/index.js +0 -3
  89. package/src/base-client/components/iot/WebmeterAnalysisView/index.md +0 -42
  90. package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +0 -370
  91. package/src/base-client/components/ticket/EmployeeDetailsView/index.js +0 -3
  92. package/src/base-client/components/ticket/EmployeeDetailsView/index.md +0 -28
  93. package/src/components/Charts/DataUserOrderSituation.vue +0 -77
  94. package/src/components/Charts/DataUserReporting.vue +0 -74
  95. package/src/components/Charts/DataUserSituation.vue +0 -107
  96. package/src/services/api/CustomerDetailsViewApi.js +0 -6
  97. package/src/services/api/DeviceBrandDetailsViewApi.js +0 -14
  98. package/src/services/api/DeviceDetailsViewApi.js +0 -10
  99. package/src/services/api/DeviceTypeDetailsViewApi.js +0 -6
  100. package/src/services/api/EmployeeDetailsViewApi.js +0 -12
  101. package/src/services/api/FormGroupEditApi.js +0 -6
  102. package/src/services/api/InstructDetailsViewApi.js +0 -12
  103. package/src/services/api/MeterDetailsViewApi.js +0 -24
  104. package/src/services/api/WebmeterAnalysisViewApi.js +0 -24
  105. package/src/services/api/applyInstallApi.js +0 -14
  106. package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +0 -18
  107. package/src/services/api/iot.js +0 -7
  108. package/src/services/api/service.js +0 -12
@@ -1,32 +1,32 @@
1
1
  <template>
2
2
  <a-drawer
3
- title="工单进度查询"
4
- placement="right"
5
- :width="isMobile ? screenWidth : screenWidth * 0.85"
6
3
  :visible="visible"
4
+ :width="isMobile ? screenWidth : screenWidth * 0.85"
5
+ placement="right"
6
+ title="工单进度查询"
7
7
  @close="onClose"
8
8
  >
9
9
  <!-- 添加描述弹框 -->
10
10
  <a-modal
11
- title="追加问题描述"
12
11
  :visible="addOnVisible"
13
- @ok="handleAddOn"
14
- @cancel="handleCancelAddOn"
15
12
  :zIndex="1001"
13
+ title="追加问题描述"
14
+ @cancel="handleCancelAddOn"
15
+ @ok="handleAddOn"
16
16
  >
17
17
  <a-form-model-item label="描述">
18
18
  <a-input v-model="desc" type="textarea" />
19
19
  </a-form-model-item>
20
20
  <div class="clearfix">
21
21
  <a-upload
22
- name="avatar"
23
- list-type="picture-card"
24
22
  :before-upload="beforeUpload"
25
- action="/webmeteruploadapi/upload"
26
23
  :file-list="fileList"
27
- @preview="handlePreview"
28
- @change="handleChange"
29
24
  :remove="remove"
25
+ action="/af-system/upload"
26
+ list-type="picture-card"
27
+ name="avatar"
28
+ @change="handleChange"
29
+ @preview="handlePreview"
30
30
  >
31
31
  <div v-if="fileList.length < 5">
32
32
  <a-icon type="plus" />
@@ -34,16 +34,16 @@
34
34
  </div>
35
35
  </a-upload>
36
36
  <a-modal
37
- :visible="previewVisible"
38
37
  :footer="null"
38
+ :visible="previewVisible"
39
39
  @cancel="handleCancel"
40
40
  >
41
- <img style="width: 100%" :src="previewImage" alt="图片上传"/>
41
+ <img :src="previewImage" alt="图片上传" style="width: 100%"/>
42
42
  </a-modal>
43
43
  </div>
44
44
  </a-modal>
45
- <a-card class="result-success" :bordered="false">
46
- <result :is-success="icon" :description="getDescription()" :title="getTitle()" :title-class="titleClass">
45
+ <a-card :bordered="false" class="result-success">
46
+ <result :description="getDescription()" :is-success="icon" :title="getTitle()" :title-class="titleClass">
47
47
  <template slot="action">
48
48
  <a-space v-show="btnGroup">
49
49
  <!--<a-tooltip placement="topLeft" :title="tip" arrow-point-at-center>-->
@@ -55,11 +55,11 @@
55
55
  <a-button v-show="!btnGroup" type="primary" @click="onClose">返回</a-button>
56
56
  </template>
57
57
  <a-modal
58
- title="关闭工单"
59
58
  :visible="closeVisible"
60
- @ok="handleCloseOk"
61
- @cancel="handleCloseCancel"
62
59
  :zIndex="1002"
60
+ title="关闭工单"
61
+ @cancel="handleCloseCancel"
62
+ @ok="handleCloseOk"
63
63
  >
64
64
  <p>是否确认手动关闭工单?</p>
65
65
  <p style="color: red">(该操作不可撤销,请谨慎操作!)</p>
@@ -79,13 +79,13 @@
79
79
  </a-step>
80
80
  <a-step title="工单处理中" >
81
81
  <a-step-item-group slot="description">
82
- <a-step-item :title="details.name" v-if="step >= 1" />
83
- <a-step-item :title="details.confirmTime" v-if="step >= 1"/>
82
+ <a-step-item v-if="step >= 1" :title="details.name" />
83
+ <a-step-item v-if="step >= 1" :title="details.confirmTime"/>
84
84
  </a-step-item-group>
85
85
  </a-step>
86
86
  <a-step title="工单完成" >
87
87
  <a-step-item-group slot="description">
88
- <a-step-item :title="details.finishedTime" v-if="step >= 2"/>
88
+ <a-step-item v-if="step >= 2" :title="details.finishedTime"/>
89
89
  </a-step-item-group>
90
90
  </a-step>
91
91
  </a-steps>
@@ -234,7 +234,7 @@ export default {
234
234
  file: file
235
235
  })
236
236
  .then(res => {
237
- if (res === 'success') {
237
+ if (res.data === 'success') {
238
238
  this.$message.success('删除成功')
239
239
  }
240
240
  this.fileList = this.fileList.filter((item) => {
@@ -332,7 +332,7 @@ export default {
332
332
  categoryStr: this.categoryStr
333
333
  })
334
334
  .then(res => {
335
- if (res === 1) {
335
+ if (res.data === 1) {
336
336
  this.$message.success(
337
337
  '已为您自动加急',
338
338
  5
@@ -517,7 +517,7 @@ export default {
517
517
  }
518
518
  </script>
519
519
 
520
- <style scoped lang="less">
520
+ <style lang="less" scoped>
521
521
  .result-success{
522
522
  .action:not(:first-child){
523
523
  margin-left: 8px;
@@ -1,176 +1,177 @@
1
- import Vue from 'vue'
2
- import { nanoid } from 'nanoid'
3
-
4
- export default class PagedList {
5
- // 用url及pageSize构造
6
- // url - 加载数据的url
7
- // pageSize - 每页数据个数
8
- // params - 除正常查询条件外,附加到后台sql中的参数,可以为空。格式为:{参数名:参数值}
9
- // sums - 需要求和的字段。格式为:{参数名:参数值}
10
- // isBlank - 是否使用空行填充表格,值为true或者 false
11
- // comp - 调用时的组件名,方便调试
12
- // aoteEncrypt - 加密类型, 不传使用全局的
13
- // encryKey - 加密key, 不传使用全局的
14
- // timeout - 查询超时时间, 默认50秒
15
- constructor (url, pageSize, params, sums, isBlank, comp, aoteEncrypt, encryKey, timeout) {
16
- // 正在查询标志位
17
- this.seaching = false
18
- this.url = url
19
- this.pageSize = pageSize
20
- this.pageIndex = 0
21
- this.isBlank = isBlank
22
- this.aoteEncrypt = aoteEncrypt || Vue.mmType
23
- this.encryKey = encryKey || Vue.mm
24
- this.timeout = timeout || 50000
25
-
26
- // 登记组件名
27
- if (comp) {
28
- this.comp = comp
29
- }
30
-
31
- // 登记参数源码,查询前,执行参数源码,获得实际参数值
32
- if (params) {
33
- this.paramSource = params
34
- }
35
- // 查询时,提交后台的参数值
36
- this.params = {}
37
-
38
- // 求和的字段
39
- this.sums = sums
40
- // 符合条件的数据总数
41
- this.count = 0
42
- // 符合条件的数据总页数
43
- this.totalPage = 0
44
- // 加载过来的数据
45
- this.rows = []
46
- // 状态,字符串型,包括:初始(默认),查询,错误,正确
47
- this.state = '初始'
48
- // 出现错误时的错误内容,没找到符合条件的数据当错误处理
49
- this.error = '请输入条件, 进行查询'
50
-
51
- // 每次加载所需要的条件
52
- this.condition = null
53
- this.model = null
54
- this.condValue = null
55
-
56
- // 初始填充数据空行
57
- // isNuN标记本行是否为空行
58
- if (isBlank == true) {
59
- for (let i = 1; i <= pageSize; i++) {
60
- this.rows.push({ isNuN: 'true' })
61
- }
62
- }
63
- }
64
-
65
- // 执行查询过程,加载数据汇总信息
66
- // condition - 查询组件产生的查询条件
67
- // model - 查询组件收集到的输入数据
68
- // condValue - 交给后台的查询条件,可以为空
69
- search (condition, model, condValue) {
70
- // 保存条件,以便加载某页时可以直接调用
71
- this.condition = condition
72
- this.model = model
73
- this.condValue = condValue
74
- this.state = '查询'
75
- this.procParams()
76
- this.seaching = true
77
- if (this.sums) {
78
- const totals = []
79
- for (const key in this.sums) {
80
- totals.push(key)
81
- var param = { data: this.params, sums: totals }
82
- }
83
- } else {
84
- param = { data: this.params }
85
- }
86
- // 发生请求时,不进行任何提醒
87
- return Vue.resetpost(`${this.url}/n`, param, {
88
- timeout: this.timeout,
89
- rejectMsg: null,
90
- aoteEncrypt: this.aoteEncrypt,
91
- encryKey: this.encryKey
92
- }).then(response => {
93
- this.seaching = false
94
- if (response.n === 0) {
95
- this.state = '错误'
96
- this.error = '没有符合条件的记录'
97
- this.rows = []
98
- return
99
- }
100
- this.state = '正确'
101
- this.count = response.n
102
- for (const key in this.sums) {
103
- this.sums[key] = response[key]
104
- }
105
- this.totalPage = Math.ceil(this.count / this.pageSize)
106
- // 加载第一页数据
107
- return this.loadPage(1, this.pageSize)
108
- }).catch((error) => {
109
- this.seaching = false
110
- if (error.status !== 603) {
111
- this.state = '错误'
112
- this.error = `提取数据出错,错误码: ${error.status}, 错误信息:${error.data},组件:${this.comp}`
113
- }
114
- })
115
- }
116
-
117
- // 重新进行查询
118
- refresh () {
119
- this.search(this.condition, this.model, this.condValue)
120
- }
121
-
122
- // 加载一页数据
123
- loadPage (pageNo, pageSize) {
124
- this.pageIndex = pageNo
125
- this.pageSize = pageSize
126
- this.state = '查询'
127
- return this.postGen(pageNo, pageSize)
128
- }
129
-
130
- postGen (pageNo, pageSize) {
131
- this.seaching = true
132
- return Vue.resetpost(`${this.url}?pageNo=${pageNo}&pageSize=${pageSize}`, { data: this.params }, {
133
- aoteEncrypt: this.aoteEncrypt,
134
- encryKey: this.encryKey,
135
- resolveMsg: null,
136
- rejectMsg: null
137
- }).then(response => {
138
- this.state = '正确'
139
- // a-table需要每条数据都加上一个字符传类型的key 这里通过一个生成uuid的库加入
140
- this.rows = response.map(item => {
141
- item.nanoid = nanoid()
142
- return item
143
- })
144
- if (this.isBlank == true) {
145
- const size = response.length % this.pageSize
146
- if (pageNo == this.totalPage) {
147
- for (let i = 1; i <= this.pageSize - size; i++) {
148
- this.rows.push({ isNuN: 'true' })
149
- }
150
- }
151
- }
152
- this.pageIndex = pageNo
153
- this.seaching = false
154
- }).catch(error => {
155
- this.seaching = false
156
- this.state = '错误'
157
- this.error = JSON.stringify(error)
158
- throw error
159
- })
160
- }
161
-
162
- // 处理查询参数,把condition以及condValue附加到参数列表中,condValue指后台查询条件
163
- procParams () {
164
- this.params.condition = this.condition
165
- if (this.condValue) {
166
- this.params.condValue = this.condValue
167
- }
168
- if (!this.paramSource) {
169
- return
170
- }
171
- // 对附加参数进行计算
172
- for (const name in this.paramSource) {
173
- this.params[name] = this.paramSource[name]
174
- }
175
- }
176
- }
1
+ import Vue from 'vue'
2
+ import { nanoid } from 'nanoid'
3
+
4
+ export default class PagedList {
5
+ // 用url及pageSize构造
6
+ // url - 加载数据的url
7
+ // pageSize - 每页数据个数
8
+ // params - 除正常查询条件外,附加到后台sql中的参数,可以为空。格式为:{参数名:参数值}
9
+ // sums - 需要求和的字段。格式为:{参数名:参数值}
10
+ // isBlank - 是否使用空行填充表格,值为true或者 false
11
+ // comp - 调用时的组件名,方便调试
12
+ // aoteEncrypt - 加密类型, 不传使用全局的
13
+ // encryKey - 加密key, 不传使用全局的
14
+ // timeout - 查询超时时间, 默认50秒
15
+ constructor (url, pageSize, params, sums, isBlank, comp, aoteEncrypt, encryKey, timeout) {
16
+ // 正在查询标志位
17
+ this.seaching = false
18
+ this.url = url
19
+ this.pageSize = pageSize
20
+ this.pageIndex = 0
21
+ this.isBlank = isBlank
22
+ this.aoteEncrypt = aoteEncrypt || Vue.mmType
23
+ this.encryKey = encryKey || Vue.mm
24
+ this.timeout = timeout || 50000
25
+
26
+ // 登记组件名
27
+ if (comp) {
28
+ this.comp = comp
29
+ }
30
+
31
+ // 登记参数源码,查询前,执行参数源码,获得实际参数值
32
+ if (params) {
33
+ this.paramSource = params
34
+ }
35
+ // 查询时,提交后台的参数值
36
+ this.params = {}
37
+
38
+ // 求和的字段
39
+ this.sums = sums
40
+ // 符合条件的数据总数
41
+ this.count = 0
42
+ // 符合条件的数据总页数
43
+ this.totalPage = 0
44
+ // 加载过来的数据
45
+ this.rows = []
46
+ // 状态,字符串型,包括:初始(默认),查询,错误,正确
47
+ this.state = '初始'
48
+ // 出现错误时的错误内容,没找到符合条件的数据当错误处理
49
+ this.error = '请输入条件, 进行查询'
50
+
51
+ // 每次加载所需要的条件
52
+ this.condition = null
53
+ this.model = null
54
+ this.condValue = null
55
+
56
+ // 初始填充数据空行
57
+ // isNuN标记本行是否为空行
58
+ if (isBlank == true) {
59
+ for (let i = 1; i <= pageSize; i++) {
60
+ this.rows.push({ isNuN: 'true' })
61
+ }
62
+ }
63
+ }
64
+
65
+ // 执行查询过程,加载数据汇总信息
66
+ // condition - 查询组件产生的查询条件
67
+ // model - 查询组件收集到的输入数据
68
+ // condValue - 交给后台的查询条件,可以为空
69
+ search (condition, model, condValue) {
70
+ let param
71
+ // 保存条件,以便加载某页时可以直接调用
72
+ this.condition = condition
73
+ this.model = model
74
+ this.condValue = condValue
75
+ this.state = '查询'
76
+ this.procParams()
77
+ this.seaching = true
78
+ if (this.sums) {
79
+ const totals = []
80
+ for (const key in this.sums) {
81
+ totals.push(key)
82
+ param = { data: this.params, sums: totals }
83
+ }
84
+ } else {
85
+ param = { data: this.params }
86
+ }
87
+ // 发生请求时,不进行任何提醒
88
+ return Vue.resetpost(`${this.url}/n`, param, {
89
+ timeout: this.timeout,
90
+ rejectMsg: null,
91
+ aoteEncrypt: this.aoteEncrypt,
92
+ encryKey: this.encryKey
93
+ }).then(response => {
94
+ this.seaching = false
95
+ if (response.n === 0) {
96
+ this.state = '错误'
97
+ this.error = '没有符合条件的记录'
98
+ this.rows = []
99
+ return
100
+ }
101
+ this.state = '正确'
102
+ this.count = response.n
103
+ for (const key in this.sums) {
104
+ this.sums[key] = response[key]
105
+ }
106
+ this.totalPage = Math.ceil(this.count / this.pageSize)
107
+ // 加载第一页数据
108
+ return this.loadPage(1, this.pageSize)
109
+ }).catch((error) => {
110
+ this.seaching = false
111
+ if (error.status !== 603) {
112
+ this.state = '错误'
113
+ this.error = `提取数据出错,错误码: ${error.status}, 错误信息:${error.data},组件:${this.comp}`
114
+ }
115
+ })
116
+ }
117
+
118
+ // 重新进行查询
119
+ refresh () {
120
+ this.search(this.condition, this.model, this.condValue)
121
+ }
122
+
123
+ // 加载一页数据
124
+ loadPage (pageNo, pageSize) {
125
+ this.pageIndex = pageNo
126
+ this.pageSize = pageSize
127
+ this.state = '查询'
128
+ return this.postGen(pageNo, pageSize)
129
+ }
130
+
131
+ postGen (pageNo, pageSize) {
132
+ this.seaching = true
133
+ return Vue.resetpost(`${this.url}?pageNo=${pageNo}&pageSize=${pageSize}`, { data: this.params }, {
134
+ aoteEncrypt: this.aoteEncrypt,
135
+ encryKey: this.encryKey,
136
+ resolveMsg: null,
137
+ rejectMsg: null
138
+ }).then(response => {
139
+ this.state = '正确'
140
+ // a-table需要每条数据都加上一个字符传类型的key 这里通过一个生成uuid的库加入
141
+ this.rows = response.map(item => {
142
+ item.nanoid = nanoid()
143
+ return item
144
+ })
145
+ if (this.isBlank == true) {
146
+ const size = response.length % this.pageSize
147
+ if (pageNo == this.totalPage) {
148
+ for (let i = 1; i <= this.pageSize - size; i++) {
149
+ this.rows.push({ isNuN: 'true' })
150
+ }
151
+ }
152
+ }
153
+ this.pageIndex = pageNo
154
+ this.seaching = false
155
+ }).catch(error => {
156
+ this.seaching = false
157
+ this.state = '错误'
158
+ this.error = JSON.stringify(error)
159
+ throw error
160
+ })
161
+ }
162
+
163
+ // 处理查询参数,把condition以及condValue附加到参数列表中,condValue指后台查询条件
164
+ procParams () {
165
+ this.params.condition = this.condition
166
+ if (this.condValue) {
167
+ this.params.condValue = this.condValue
168
+ }
169
+ if (!this.paramSource) {
170
+ return
171
+ }
172
+ // 对附加参数进行计算
173
+ for (const name in this.paramSource) {
174
+ this.params[name] = this.paramSource[name]
175
+ }
176
+ }
177
+ }