@zscreate/zhxy-app-component 1.0.184 → 1.0.186

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.
@@ -19,13 +19,14 @@ export const pubSubMixin = {
19
19
  var num = Number(num).toFixed(length);
20
20
  return type ? Number(num) : num;
21
21
  },
22
- calc_run(isFirstRun) {
22
+ calc_run(isFirstRun, msgData) {
23
23
  let invalids = false
24
24
  const {type: widgetType, options} = this.widget
25
25
  let { formula, relyWidgets =[] } = options.formula
26
26
  relyWidgets.forEach(item => {
27
27
  formula = formula.replaceAll(`\$${item}\#`, item)
28
28
  })
29
+ if (msgData.tableKey && msgData.tableKey === this.widget.tableKey && this.tableIndex != msgData.tableIndex) return
29
30
  const tableArr = relyWidgets.filter(item => item.includes(".")).map(item => item.split("."))
30
31
  const models = this.models
31
32
  const keys = Object.keys(models)
@@ -36,6 +37,9 @@ export const pubSubMixin = {
36
37
  if (tableData && Array.isArray(models[curr])) {
37
38
  prev[key] = JSON.parse(JSON.stringify(models[curr]))
38
39
  prev[key][tableData[1]] = prev[key].map(item => item[tableData[1]])
40
+ if ([msgData.tableKey, curr].every(item => this.widget.tableKey === item)) {
41
+ prev[key][tableData[1]] = prev[key][tableData[1]][msgData.tableIndex]
42
+ }
39
43
  }
40
44
  if (relyWidgets.includes(key) && isFirstRun && models[curr] === '') {
41
45
  invalids = true
@@ -76,7 +80,7 @@ export const pubSubMixin = {
76
80
  if (item.includes('.')) item = item.split('.').slice(-1)[0]
77
81
  Pubsub.subscribe('calc_' + item.replace('_widget_', ''),(key, data) =>{
78
82
  setTimeout(() => {
79
- this.calc_run()
83
+ this.calc_run(false, data)
80
84
  console.log(this, key, data)
81
85
  }, 100)
82
86
  } )
@@ -20,7 +20,7 @@
20
20
  <u-tr>
21
21
  <u-th width="50px" style="box-sizing: border-box">
22
22
  <view v-if="multiple">
23
- <u-checkbox :value="isAllCheck" @change="roleCheckAll">
23
+ <u-checkbox :value="isAllCheck" @change="roleCheckAll" >
24
24
  </u-checkbox>
25
25
  </view>
26
26
  <view v-else>选择</view>
@@ -31,7 +31,7 @@
31
31
  <u-tr v-for="user in roleUserList" :key="user.id">
32
32
  <u-td width="50px" >
33
33
  <view style="width: 33px;">
34
- <u-checkbox v-model="user.checked" @change="handleCheck" :name="user.id">
34
+ <u-checkbox v-model="user.checked" @change="handleCheck" :name="user.id" >
35
35
  </u-checkbox>
36
36
  </view>
37
37
  </u-td>
@@ -39,23 +39,19 @@
39
39
  <u-td style="flex: 1; word-break: break-all; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"><view>{{ user.departName }}</view></u-td>
40
40
  </u-tr>
41
41
  </u-table>
42
-
43
42
  </view>
44
-
45
- <view style="display: flex; justify-content: space-between; margin-top: 20rpx">
46
- <u-button type="primary" size="medium" @click="handleSelectRoleUserOk">确定</u-button>
47
- <u-button size="medium" @click="roleSelectShow = false">取消</u-button>
43
+ <view style="display: flex; justify-content: space-between; margin-top: 20rpx; gap: 20px">
44
+ <u-button type="primary" size="medium" @click="handleSelectRoleUserOk" :custom-style="{borderRadius: '5px'}">确定</u-button>
45
+ <u-button size="medium" @click="roleSelectShow = false" :custom-style="{borderRadius: '5px'}">取消</u-button>
48
46
  </view>
49
47
  </view>
50
48
 
51
-
52
49
  <t-loading :isLoading="isLoading"/>
53
50
  </u-popup>
54
51
  </template>
55
52
 
56
53
  <script>
57
54
  import {cloneObj} from "../../utils/util";
58
-
59
55
  export default {
60
56
  name: "userSelectByRole",
61
57
  props: {
@@ -204,7 +200,6 @@ export default {
204
200
  }
205
201
  }
206
202
  </script>
207
-
208
203
  <style scoped lang="less">
209
204
  /deep/ u-th:nth-child(1) {
210
205
  flex: 0 0 40px;
@@ -212,7 +207,6 @@ export default {
212
207
  /deep/ u-th {
213
208
  flex: 1;
214
209
  }
215
-
216
210
  /deep/ .u-icon__icon {
217
211
  top: -2px !important;
218
212
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.184",
3
+ "version": "1.0.186",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",