vue2-client 1.14.9 → 1.14.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.14.9",
3
+ "version": "1.14.11",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -200,8 +200,14 @@ export default {
200
200
  const values = []
201
201
  if (extra.allCheckedNodes) {
202
202
  for (const item of extra.allCheckedNodes) {
203
- if (item.node.key && (item.node?.data?.props?.label !== item.node?.data?.props?.value && item.children && item.children.length)) {
204
- values.push(`${item.node.key}`)
203
+ if (item.node.key) {
204
+ if (item.node?.data?.props?.label === item.node?.data?.props?.value) {
205
+ if (!item.children?.length) {
206
+ values.push(`${item.node.key}`)
207
+ }
208
+ } else {
209
+ values.push(`${item.node.key}`)
210
+ }
205
211
  }
206
212
  if (item.children && item.children.length) {
207
213
  this.getNodeValues(item.children, value, values)
@@ -6,6 +6,7 @@
6
6
  <x-form-table
7
7
  title="示例表单"
8
8
  :queryParamsName="queryParamsName"
9
+ :x-tree-config-name="xTreeConfigName"
9
10
  :fixedAddForm="fixedAddForm"
10
11
  @action="action"
11
12
  @columnClick="columnClick"
@@ -26,9 +27,9 @@ export default {
26
27
  data () {
27
28
  return {
28
29
  // 查询配置文件名
29
- queryParamsName: 'ChargeQueryCRUD',
30
+ queryParamsName: 'address_management',
30
31
  // 查询配置左侧tree
31
- // xTreeConfigName: 'addressType',
32
+ xTreeConfigName: 'addressType',
32
33
  // 新增表单固定值
33
34
  fixedAddForm: {},
34
35
  // 是否显示详情抽屉
@@ -38,8 +38,8 @@
38
38
  <a-modal
39
39
  title="阀控管理"
40
40
  :visible="valve"
41
- :closable="false"
42
41
  :width="600"
42
+ @cancel="closeValveModal"
43
43
  :body-style="{ padding: '24px' }"
44
44
  >
45
45
  <!-- 阀控状态选择 -->
@@ -60,7 +60,7 @@
60
60
  <div style="margin-bottom: 16px;">
61
61
  <label
62
62
  style="display: block; font-size: 14px; color: #555; margin-bottom: 8px;"
63
- :style="operateReason ? '' : 'color: #ff4d4f;'"
63
+ class="ant-form-item-required"
64
64
  >
65
65
  操作原因
66
66
  </label>
@@ -69,16 +69,17 @@
69
69
  placeholder="请填写操作原因"
70
70
  :rows="2"
71
71
  style="width: 100%;"
72
+ :class="{ 'error-border': operateReasonError }"
73
+ @blur="checkOperateReason"
72
74
  />
75
+ <div v-if="operateReasonError" style="color: red; margin-top: 8px;">
76
+ 请填写操作原因
77
+ </div>
73
78
  </div>
74
79
 
75
80
  <!-- 底部按钮 -->
76
81
  <template #footer>
77
- <div style="display: flex; justify-content: space-between; align-items: center;">
78
- <!-- 左侧关闭按钮 -->
79
- <a-button type="danger" @click="closeValveModal" style="border-radius: 4px;">
80
- 关闭
81
- </a-button>
82
+ <div style="display: flex; justify-content: flex-end; align-items: center;">
82
83
  <!-- 右侧开阀和关阀按钮 -->
83
84
  <div>
84
85
  <a-button
@@ -132,8 +133,9 @@ export default {
132
133
  '6小时后自动',
133
134
  '12小时后自动'
134
135
  ],
135
- selectedOption: '',
136
+ selectedOption: '手动',
136
137
  operateReason: '',
138
+ operateReasonError: false,
137
139
  }
138
140
  },
139
141
  watch: {
@@ -149,6 +151,13 @@ export default {
149
151
  }
150
152
  },
151
153
  methods: {
154
+ checkOperateReason () {
155
+ if (this.operateReason.trim() === '') {
156
+ this.operateReasonError = true
157
+ } else {
158
+ this.operateReasonError = false
159
+ }
160
+ },
152
161
  refresh () {
153
162
  return runLogic('getUserInfoDetailV4', this.userInfo, 'af-revenue').then(res => {
154
163
  this.userInfo = res
@@ -178,13 +187,15 @@ export default {
178
187
  },
179
188
  closeValveModal () {
180
189
  this.valve = false
181
- this.selectedOption = ''
190
+ this.selectedOption = '手动'
182
191
  this.operateReason = ''
192
+ this.operateReasonError = false
183
193
  },
184
194
  async init (user) {
185
195
  this.userInfo = user
186
196
  await this.refresh()
187
197
  this.userInfoDetailVisible = true
198
+ this.operateReasonError = false
188
199
  },
189
200
  onClose () {
190
201
  this.userInfoDetailVisible = false
@@ -266,12 +277,14 @@ export default {
266
277
  },
267
278
  mounted () {},
268
279
  computed: {
269
- ...mapState('account', { currUser: 'user' }),
270
- ...mapState('setting', { isMobile: 'isMobile' })
280
+ ...mapState('account', {currUser: 'user'}),
281
+ ...mapState('setting', {isMobile: 'isMobile'})
271
282
  }
272
283
  }
273
284
  </script>
274
285
 
275
286
  <style scoped>
276
-
287
+ .error-border {
288
+ border-color: red;
289
+ }
277
290
  </style>