jufubao-admin-library 1.1.31 → 1.1.32

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.
@@ -2,13 +2,13 @@ import Layout from '@/layout'
2
2
 
3
3
  import {setModuleName} from "@/utils/xd.base";
4
4
  import roles from '@/constant/permissions';
5
- //const enterprise_buy = roles.enterprise_buy
5
+ const greetingCard = roles.greetingCard
6
6
 
7
7
 
8
8
  const greetingCardRouter = {
9
9
  path: '/greeting_card',
10
10
  component: Layout,
11
- sort: 80,
11
+ sort: 90,
12
12
  name: '贺卡管理',
13
13
  alwaysShow: false,
14
14
  // #ifdef saas-admin
@@ -19,7 +19,7 @@ const greetingCardRouter = {
19
19
  title: '贺卡管理',
20
20
  icon: 'el-icon-collection',
21
21
  iconSize: 20,
22
- //roles: []
22
+ roles: [greetingCard.getGreetingCardList]
23
23
  },
24
24
  children: [
25
25
  // #ifdef admin
@@ -30,7 +30,7 @@ const greetingCardRouter = {
30
30
  meta: {
31
31
  title: '贺卡管理',
32
32
  icon: 'el-icon-document',
33
- //roles: []
33
+ roles: [greetingCard.getGreetingCardList]
34
34
  }
35
35
  },
36
36
  // #endif
@@ -42,7 +42,7 @@ const greetingCardRouter = {
42
42
  meta: {
43
43
  title: '贺卡配置',
44
44
  icon: 'el-icon-s-platform',
45
- roles: [],
45
+ roles: [greetingCard.setGreetingCardBaseConfig],
46
46
  // #ifdef admin
47
47
  activeMenu: "/greeting_card/list",
48
48
  // #endif
@@ -48,7 +48,7 @@ module.exports = {
48
48
  page_size: ['页长', 'number', '必选'],
49
49
  },
50
50
  disabled: true,
51
- role: '',
51
+ role: '@@@.CARD.TEMPLATE_LIST',
52
52
  },
53
53
  {
54
54
  title: '贺卡管理 - 创建贺卡',
@@ -71,7 +71,7 @@ module.exports = {
71
71
  item:['贺卡记录对象', 'Object', '必填'],
72
72
  },
73
73
  disabled: true,
74
- role: '',
74
+ role: '@@@.CARD.TEMPLATE_EDIT',
75
75
  method: 'put'
76
76
  },
77
77
  {
@@ -84,7 +84,7 @@ module.exports = {
84
84
  group_id:['复制到分组ID', 'Object', '必填'],
85
85
  },
86
86
  disabled: true,
87
- role: '',
87
+ role: '@@@.CARD.TEMPLATE_COPY',
88
88
  },
89
89
  {
90
90
  title: '贺卡管理 - 获取贺卡信息',
@@ -107,7 +107,7 @@ module.exports = {
107
107
  item: ['素材配置对象', 'string|number', '必填']
108
108
  },
109
109
  disabled: true,
110
- role: '',
110
+ role: '@@@.CARD.TEMPLATE_CONFIG',
111
111
  method: 'put'
112
112
  },
113
113
 
@@ -121,7 +121,7 @@ module.exports = {
121
121
  x_material_id:['素材ID', 'string|number', '必填'],
122
122
  },
123
123
  disabled: true,
124
- role: '',
124
+ role: '@@@.CARD.TEMPLATE_CUSTOM_CONFIG',
125
125
  },
126
126
  {
127
127
  title: '贺卡管理 - 创建自定义素材',
@@ -42,13 +42,14 @@
42
42
  <img v-if="item['custom_material_cover']" :src="item['custom_material_cover']" :alt="item['material_name']">
43
43
  <i v-else class="iconfont icontuxiangma"></i>
44
44
  <div class="btn">
45
- <el-button round @click="handleSetting(item)">设置贺卡</el-button>
45
+ <el-button round v-if="isConfig" @click="handleSetting(item)">设置贺卡</el-button>
46
46
  <el-button round @click="handleEdit(item)">编辑贺卡</el-button>
47
- <el-button round @click="handleCopy(item)">复制贺卡</el-button>
47
+ <el-button round v-if="isCopy" @click="handleCopy(item)">复制贺卡</el-button>
48
48
  </div>
49
49
  </div>
50
50
  <div class="card-list-item__title">{{item['material_name']}}</div>
51
51
  <div class="card-list-item__desc">{{item['material_desc']}}</div>
52
+ <div class="card-list-item__status" :class="{open:item.material_status === 'Y',close:item.material_status !== 'Y'}">{{item.material_status === 'Y'?'正常':'禁用'}}</div>
52
53
  </div>
53
54
  </div>
54
55
  </div>
@@ -109,6 +110,8 @@ import XdTableImage from "@/components/XdTableImage.vue";
109
110
  import XdBaseDynamicField from "@/components/XdBaseDynamicField.vue";
110
111
  import {mapActions, mapState} from "vuex";
111
112
  import {Loading} from "element-ui";
113
+ import greetingCard from '@/constant/modules/greetingCard'
114
+ import checkPermission from "@/utils/permission"
112
115
 
113
116
  export default {
114
117
  name: "InfoMessage",
@@ -120,6 +123,15 @@ export default {
120
123
  XdBaseDynamicField,
121
124
  XdTableImage
122
125
  },
126
+ computed:{
127
+ isCopy(){
128
+ return checkPermission(greetingCard.copyGreetingCard)
129
+ },
130
+
131
+ isConfig(){
132
+ return checkPermission(greetingCard.setGreetingCardBaseConfig)
133
+ }
134
+ },
123
135
 
124
136
  data() {
125
137
  return {
@@ -600,6 +612,7 @@ export default {
600
612
  margin-bottom: 20px;
601
613
  overflow: hidden;
602
614
  cursor: pointer;
615
+ position: relative;
603
616
 
604
617
  .btn {
605
618
  display: none;
@@ -669,6 +682,27 @@ export default {
669
682
  -webkit-line-clamp: 1;
670
683
  -webkit-box-orient: vertical;
671
684
  }
685
+
686
+ &__status {
687
+ color: #fff;
688
+ height: 14px;
689
+ padding: 3px 10px;
690
+ line-height: 14px;
691
+ position: absolute;
692
+ bottom: 0;
693
+ right:0;
694
+ font-size: 12px;
695
+ border-radius: 8px 0 0 0;
696
+ box-sizing: content-box;
697
+ &.open {
698
+ background: $green;
699
+ }
700
+ &.close {
701
+ background: $pink;
702
+ }
703
+ }
704
+
705
+
672
706
  }
673
707
  }
674
708
  @media screen and (max-width: 768px) {
@@ -1,5 +1,6 @@
1
1
  import Layout from '@/layout'
2
- // import role from '@/constant/permissions' //引用权限值
2
+ import role from '@/constant/permissions' //引用权限值
3
+ const mAccounts = role.mAccounts;
3
4
 
4
5
  const accountsRouter = {
5
6
  path: '/m-accounts',
@@ -10,9 +11,9 @@ const accountsRouter = {
10
11
  meta: {
11
12
  title: '账号管理',
12
13
  icon: 'xdicon_guanliyuan',
13
- // roles: [
14
- // role.account.accountList
15
- // ]
14
+ roles: [
15
+ mAccounts.getSaasUserList
16
+ ]
16
17
  },
17
18
  children: [
18
19
  {
@@ -22,9 +23,9 @@ const accountsRouter = {
22
23
  meta: {
23
24
  title: '账号列表',
24
25
  icon: 'xdicon_guanliyuan',
25
- // roles: [
26
- // role.account.accountList
27
- // ]
26
+ roles: [
27
+ mAccounts.getSaasUserList
28
+ ]
28
29
  }
29
30
  }
30
31
  ]
@@ -14,7 +14,7 @@
14
14
  ></xd-search>
15
15
  </el-card>
16
16
  <el-card class="app-container__list">
17
- <div class="app-container__list-pagination">
17
+ <div class="app-container__list-pagination" v-if="isCreate">
18
18
  <div></div>
19
19
  <div>
20
20
  <el-button icon="el-icon-edit" type="primary" @click="openDialog">新增账号</el-button>
@@ -72,6 +72,7 @@ import XdBaseDynamicField from "@/components/XdBaseDynamicField.vue";
72
72
  import XdDialog from "@/components/XdDialog.vue";
73
73
  import {mapActions} from 'vuex'
74
74
  import {createPwd} from "@/utils/xd.base";
75
+ import mAccounts from '@/constant/modules/mAccounts'
75
76
 
76
77
  export default {
77
78
  name: "PartnerAccountList",
@@ -93,14 +94,17 @@ export default {
93
94
  { "type": "normal", "prop": "created_time", "align": "center", "width": 180, "label": "创建时间" },
94
95
  { "type": "normal", "prop": "updated_time", "align": "center", "width": 180, "label": "修改时间" },
95
96
  { "type": "status", "prop": "status", "align": "center", "width": 100, "label": "状态" },
96
- {
97
+ checkPermission(mAccounts.createSaasUser) && {
97
98
  "type": "operate", "align": "center", "width": 100, "label": "操作",
98
99
  "values": [
99
100
  { "ui": "text-button", "name": "编辑", "type": "primary", "event": 'edit' }
100
101
  ].filter(i => i)
101
102
  }
102
103
  ]
103
- }
104
+ },
105
+ isCreate(){
106
+ return checkPermission(mAccounts.createSaasUser)
107
+ },
104
108
  },
105
109
  data () {
106
110
  return {
@@ -187,7 +191,13 @@ export default {
187
191
  if(form.user_id) delete form.user_id;
188
192
  let company = this.$xdHelper.cloneDeep(form['company'])
189
193
  if(form['company']) delete form['company'];
190
- let params ={
194
+ let password = '';
195
+ if( form.password) {
196
+ password =form.password;
197
+ delete form.password;
198
+ }
199
+ let params = {
200
+ password: password,
191
201
  user: {
192
202
  ...form,
193
203
  // #ifdef partner-saas
@@ -311,6 +321,20 @@ export default {
311
321
  { required: true, message: "请选择客户名称",trigger: ['change']}
312
322
  ]
313
323
  },
324
+ // #ifdef partner-saas
325
+ {
326
+ label: 'SaaS后台是否:',
327
+ ele: 'xd-radio',
328
+ valueKey: 'is_show_saas',
329
+ value: params['is_show_saas'] || 'N',
330
+ backValueType: '1',
331
+ placeholder: '请选SaaS后台是否显示',
332
+ list: [
333
+ {label: '不可见', value: 'N'},
334
+ {label: '可见', value: 'Y'}
335
+ ],
336
+ },
337
+ // #endif
314
338
  {
315
339
  label: '状态:',
316
340
  ele: 'xd-radio-status',
@@ -358,8 +382,10 @@ export default {
358
382
  role_ids: row.role_ids,
359
383
  status: row.status,
360
384
  // #ifdef partner-saas
361
- company:[{label: row.company_name, value: row.company_id}]
385
+ company:[{label: row.company_name, value: row.company_id}],
386
+ is_show_saas: row.is_show_saas,
362
387
  // #endif
388
+
363
389
  };
364
390
  this.initForm(info);
365
391
  this.dialog = true;
@@ -1,6 +1,7 @@
1
1
  import Layout from '@/layout'
2
2
  import {setModuleName} from "@/utils/xd.base";
3
- // import role from '@/constant/permissions' //引用权限值
3
+ import role from '@/constant/permissions' //引用权限值
4
+ const mCompany = role.mCompany
4
5
 
5
6
  const companyRouter = {
6
7
  path: '/m-company',
@@ -11,7 +12,7 @@ const companyRouter = {
11
12
  meta: {
12
13
  title: '客户管理',
13
14
  icon: 'xdicon_jiamengshangyonghu',
14
- roles: []
15
+ roles: [mCompany.getSaasCompanyList]
15
16
  },
16
17
  children: [
17
18
  {
@@ -21,7 +22,7 @@ const companyRouter = {
21
22
  meta: {
22
23
  title: '客户管理',
23
24
  icon: 'xdicon_jiamengshangyonghu',
24
- roles: []
25
+ roles: [mCompany.getSaasCompanyList]
25
26
  }
26
27
  }
27
28
  ]
@@ -65,6 +65,7 @@ import checkPermission from "@/utils/permission"
65
65
  import {mapActions,} from 'vuex'
66
66
  import XdBaseDynamicField from "@/components/XdBaseDynamicField.vue";
67
67
  import XdDialog from "@/components/XdDialog.vue";
68
+ import mCompany from '@/constant/modules/mCompany'
68
69
 
69
70
  export default {
70
71
  name: "ModuleCompanyList",
@@ -84,7 +85,7 @@ export default {
84
85
  { "type": "normal", "prop": "created_time", "align": "center", "width": 180, "label": "创建时间" },
85
86
  { "type": "normal", "prop": "updated_time", "align": "center", "width": 180, "label": "修改时间" },
86
87
  { "type": "status", "prop": "company_status", "align": "center", "width": 100, "label": "状态" },
87
- {
88
+ checkPermission(mCompany.updateSaasCompany) && {
88
89
  "type": "operate", "align": "center", "width": 100, "label": "操作",
89
90
  "values": [
90
91
  { "ui": "text-button", "name": "配置客户", "type": "primary", "event": 'edit' }
@@ -214,11 +215,11 @@ export default {
214
215
  ]
215
216
  },
216
217
  params['site_id'] && {
217
- label: '指定站点应用',
218
+ label: '默认进入应用',
218
219
  ele: 'xd-remote-select-list',
219
220
  valueKey: 'index_path',
220
221
  value: params['index_path'] || null,
221
- placeholder: '请选择指定站点应用:',
222
+ placeholder: '请选择默认进入应用:',
222
223
  setting: { multiple: false,},
223
224
  className: 'input80',
224
225
  handleCustom:({action, data}) =>{
@@ -237,7 +238,7 @@ export default {
237
238
  })
238
239
  },
239
240
  rules: [
240
- { required: true, message: "请选择指定站点",trigger: ['change']}
241
+ { required: true, message: "请选择默认进入应用",trigger: ['change']}
241
242
  ]
242
243
  },
243
244
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.31",
3
+ "version": "1.1.32",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {