vue2-client 1.14.8 → 1.14.10

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.8",
3
+ "version": "1.14.10",
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
  // 是否显示详情抽屉
@@ -28,8 +28,8 @@
28
28
  </x-descriptions>
29
29
  <user-info-detail-query-tabs :userInfo="userInfo"/>
30
30
  <template #extra>
31
- <a-button type="primary" v-if="userInfo.gb_f_meter_type.includes('物联网表')" @click="openUser">开户</a-button>
32
- <a-button type="primary" v-if="userInfo.gb_f_meter_type.includes('物联网表')&&!(userInfo.u_f_user_state === '停用')" @click="valvecontrol">开关阀</a-button>
31
+ <a-button type="primary" v-if="openUserBtnShow" @click="openUser">开户</a-button>
32
+ <a-button type="primary" v-if="valveBtnShow" @click="valvecontrol">开关阀</a-button>
33
33
  <a-button type="dashed" @click="refresh">刷新</a-button>
34
34
  </template>
35
35
  </a-page-header>
@@ -121,6 +121,8 @@ export default {
121
121
  return {
122
122
  userInfo: undefined,
123
123
  userInfoDetailVisible: false,
124
+ openUserBtnShow: false,
125
+ valveBtnShow: false,
124
126
  valve: false,
125
127
  networkValveOptions: [
126
128
  '手动',
@@ -134,6 +136,18 @@ export default {
134
136
  operateReason: '',
135
137
  }
136
138
  },
139
+ watch: {
140
+ userInfo: {
141
+ handler () {
142
+ if (this.userInfo) {
143
+ console.log('userinfo', this.userInfo)
144
+ this.openUserBtnShow = this.userInfo.f_meter_type.includes('物联网表')
145
+ this.valveBtnShow = this.userInfo.f_meter_type.includes('物联网表') && this.userInfo.f_user_state !== '停用'
146
+ }
147
+ },
148
+ deep: true
149
+ }
150
+ },
137
151
  methods: {
138
152
  refresh () {
139
153
  return runLogic('getUserInfoDetailV4', this.userInfo, 'af-revenue').then(res => {
@@ -144,7 +158,7 @@ export default {
144
158
  this.$confirm({
145
159
  title: '开户确认',
146
160
  content: '是否需要给用户进行开户?',
147
- onOk: ()=> {
161
+ onOk: () => {
148
162
  const data = {
149
163
  f_userfiles_id: this.userInfo.f_userfiles_id
150
164
  }
@@ -167,7 +181,7 @@ export default {
167
181
  this.selectedOption = ''
168
182
  this.operateReason = ''
169
183
  },
170
- async init (user) {
184
+ async init (user) {
171
185
  this.userInfo = user
172
186
  await this.refresh()
173
187
  this.userInfoDetailVisible = true
@@ -237,7 +251,7 @@ export default {
237
251
  if (_this.selectedOption !== '手动') {
238
252
  const msg = _this.selectedOption !== '自动' ? `阀控状态将在${_this.selectedOption}后自动调整为【自动】` : `阀控状态自动调整为 【自动】`
239
253
  this.$message.success(msg)
240
- runLogic('iot_processDelayedOperations',datas,'af-revenue').then(res => {
254
+ runLogic('iot_processDelayedOperations', datas, 'af-revenue').then(res => {
241
255
  this.$emit('refresh')
242
256
  console.log('延时操作逻辑已执行')
243
257
  })