@jx3box/jx3box-common-ui 5.6.4 → 5.6.7

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.
@@ -49,8 +49,12 @@
49
49
  // color:#49c10f;
50
50
  // color:@color-link;
51
51
  color:#fba524;
52
- .fz(24px,1);
52
+ .fz(20px,1);
53
53
  .dbi;.y;
54
+ vertical-align: text-bottom;
55
+ }
56
+ .el-progress {
57
+ margin: 10px;
54
58
  }
55
59
  }
56
60
  .u-list{
@@ -67,6 +71,11 @@
67
71
  .mr(5px);
68
72
  }
69
73
  }
74
+ .el-input-number{
75
+ .ml(0) !important;
76
+ .mb(10px);
77
+ .w(140px);
78
+ }
70
79
  }
71
80
 
72
81
  .u-label{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "5.6.4",
3
+ "version": "5.6.7",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Author.vue CHANGED
@@ -196,7 +196,7 @@ export default {
196
196
  return getLink("org", team_id);
197
197
  },
198
198
  showTeamLogo: function(val) {
199
- return getThumbnail(val, 32);
199
+ return getThumbnail(val, 96);
200
200
  },
201
201
  },
202
202
  watch: {
@@ -83,7 +83,7 @@ export default {
83
83
  }
84
84
  },
85
85
  showAvatar: function(val) {
86
- return showAvatar(val, this.size);
86
+ return showAvatar(val, this.size*3);
87
87
  },
88
88
  authorLink,
89
89
  },
@@ -13,17 +13,28 @@
13
13
  <el-dialog title="品鉴评分" :visible.sync="visible" custom-class="w-boxcoin-pop" :close-on-click-modal="false">
14
14
  <div class="w-boxcoin-admin-content">
15
15
  <div class="u-left">
16
- <em class="u-label">本月剩余额度</em>
17
- <b>{{left}}</b>
16
+ <em class="u-label">本月状态</em>
17
+ <b>已用 {{this.used}} 剩余 {{this.left}} 总计 {{this.total}}</b>
18
+ <el-progress :percentage="100 - (this.used * 100 / this.total)" :stroke-width="15" :text-inside="true"></el-progress>
18
19
  </div>
19
20
  <div class="u-list">
20
21
  <em class="u-label">❤️ 品鉴</em>
21
22
  <Contributors v-if="authors && authors.length" :authors="authors" @chosen="handleChosen" />
22
23
  <div class="u-points">
24
+ <!--<el-radio-group v-model="fixedCount">-->
23
25
  <el-radio-group v-model="count">
24
26
  <el-radio :label="item" v-for="item in points" :key="item" border>
25
27
  <b>{{item}}</b>盒币
26
28
  </el-radio>
29
+ <!--<el-radio label="custom" border><b>自定义</b></el-radio>
30
+ <el-input-number
31
+ :disabled="this.fixedCount !== 'custom'"
32
+ v-model="customCount"
33
+ :min="this.allowedMin"
34
+ :max="this.allowedMax"
35
+ :controls="false">
36
+ </el-input-number>
37
+ -->
27
38
  </el-radio-group>
28
39
  </div>
29
40
  </div>
@@ -42,7 +53,7 @@
42
53
  </div>
43
54
  <span slot="footer" class="dialog-footer">
44
55
  <el-button @click="visible = false">取 消</el-button>
45
- <el-button type="primary" @click="submit" :disabled="!ready">确 定</el-button>
56
+ <el-button type="primary" @click="submit" :disabled="!ready || submitting">确 定</el-button>
46
57
  </span>
47
58
  </el-dialog>
48
59
  </div>
@@ -54,23 +65,37 @@ import User from "@jx3box/jx3box-common/js/user";
54
65
  import Contributors from './Contributors.vue';
55
66
  export default {
56
67
  name: "BoxcoinAdmin",
57
- props: ["postType", "postId", "userId", "own", "points", 'authors'],
68
+ props: ["postType", "postId", "userId", "own", "total", "points", "max", "min", 'authors'],
58
69
  components: {
59
70
  Contributors
60
71
  },
61
72
  data: function () {
62
73
  return {
63
74
  visible: false,
64
-
65
75
  count: 0,
66
- remark: "辛苦,感谢!",
76
+ //fixedCount: 0,
77
+ //customCount: 0,
67
78
 
79
+ remark: "辛苦,感谢!",
68
80
  left : this.own,
69
-
70
81
  chosen: '', // 被选中的人
82
+
83
+ submitting: false,
71
84
  };
72
85
  },
73
86
  computed: {
87
+ /*allowedMax: function () {
88
+ return this.max;
89
+ },
90
+ allowedMin: function () {
91
+ return this.min;
92
+ },*/
93
+ used: function () {
94
+ return this.total - this.left;
95
+ },
96
+ /*count: function() {
97
+ return this.fixedCount === "custom" ? this.customCount : this.fixedCount;
98
+ },*/
74
99
  ready: function () {
75
100
  return this.isNotSelf && this.isEnough && this.count && this.remark;
76
101
  },
@@ -95,12 +120,14 @@ export default {
95
120
  methods: {
96
121
  openBoxcoinPop: function () {
97
122
  this.visible = true;
123
+ //this.customCount = this.max / 2;
98
124
  },
99
125
  // 选择要打赏的对象
100
126
  handleChosen(userId) {
101
127
  this.chosen = userId
102
128
  },
103
129
  submit: function () {
130
+ this.submitting = true;
104
131
  grantBoxcoin(this.postType, this.postId, this.chosen || this.userId, this.count, {
105
132
  remark: this.remark,
106
133
  client : this.client
@@ -119,10 +146,9 @@ export default {
119
146
  this.$emit('updateRecord', data);
120
147
  })
121
148
  .finally(() => {
149
+ this.submitting = false;
122
150
  this.visible = false;
123
151
  });
124
-
125
-
126
152
  },
127
153
  init: function () {},
128
154
  },
@@ -29,7 +29,7 @@
29
29
  <img class="u-user-avatar" :src="showAvatar(item.ext_operate_user_info.avatar)" alt />
30
30
  <span>{{item.ext_operate_user_info.display_name}}</span>
31
31
  </a>
32
- <a
32
+ <a
33
33
  class="u-meta u-user"
34
34
  :href="authorLink(item.user_id)"
35
35
  target="_blank"
@@ -141,7 +141,7 @@ export default {
141
141
  });
142
142
  this.list.splice(i,1)
143
143
  })
144
-
144
+
145
145
  }
146
146
  },
147
147
  });
@@ -149,8 +149,8 @@ export default {
149
149
  authorLink,
150
150
  showTime,
151
151
  showAvatar: function (val) {
152
- return showAvatar(val, 24);
152
+ return showAvatar(val, 72);
153
153
  },
154
154
  },
155
155
  };
156
- </script>
156
+ </script>
@@ -104,7 +104,7 @@ export default {
104
104
  });
105
105
  },
106
106
  showAvatar: function (val) {
107
- return showAvatar(val, 48);
107
+ return showAvatar(val, 144);
108
108
  },
109
109
  authorLink,
110
110
  formatLabel : function (str){
@@ -211,4 +211,4 @@ export default {
211
211
  .none;
212
212
  }
213
213
  }
214
- </style>
214
+ </style>
@@ -133,7 +133,7 @@ export default {
133
133
  .m-single-header {
134
134
  padding-top: 20px;
135
135
  padding-bottom: 20px;
136
- padding-right: 280px;
136
+ // padding-right: 280px;
137
137
  .pr;
138
138
  .u-sub-block {
139
139
  .dbi;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="w-thx">
3
3
  <div class="w-thx-panel">
4
- <boxcoin-admin :postId="postId" :postType="postType" v-if="hasRight && adminBoxcoinEnable && boxcoin_enable" :userId="userId" :own="admin_left" :points="admin_points" :authors="authors" @updateRecord="updateRecord" />
4
+ <boxcoin-admin :postId="postId" :postType="postType" v-if="hasRight && adminBoxcoinEnable && boxcoin_enable" :userId="userId" :max="admin_max" :min="admin_min" :own="admin_left" :total="admin_total" :points="admin_points" :authors="authors" @updateRecord="updateRecord" />
5
5
  <Like :postId="postId" :postType="postType"></Like>
6
6
  <fav :postId="postId" :postType="postType" :postTitle="postTitle"></fav>
7
7
  <boxcoin-user :postId="postId" :postType="postType" :boxcoin="boxcoin" :userId="userId" :own="user_left" :points="user_points" :authors="authors" v-if="userBoxcoinEnable && boxcoin_enable" @updateRecord="updateRecord" />
@@ -43,8 +43,12 @@ export default {
43
43
  hasRight : User.getInfo().group >= 32,
44
44
  user: User.getInfo(),
45
45
 
46
+ admin_max : 0,
47
+ admin_min : 0,
46
48
  admin_left : 0,
49
+ admin_total: 0,
47
50
  admin_points : [100],
51
+
48
52
  user_left : 0,
49
53
  user_points : [100],
50
54
 
@@ -69,8 +73,12 @@ export default {
69
73
  methods: {
70
74
  loadBoxcoinConfig : function (){
71
75
  User.isLogin() && getPostBoxcoinConfig(this.postType).then((res) => {
76
+ this.admin_max = res.data.data.limit.admin_max || 0;
77
+ this.admin_min = res.data.data.limit.admin_min || 0;
72
78
  this.admin_points = res.data.data.limit.admin_points || [10, 1000];
73
79
  this.admin_left = res.data.data.asManagerBoxCoinRemain || 0;
80
+ this.admin_total = res.data.data.asManagerBoxCoinTotal || 0;
81
+
74
82
  this.user_points = res.data.data.limit.user_points || [10, 1000];
75
83
  this.user_left = res.data.data.asUserBoxCoinRemain || 0;
76
84
  });