jufubao-admin-library 1.1.174 → 1.1.176

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.
@@ -428,7 +428,7 @@
428
428
  && policySettingObj.data.formula.options
429
429
  && policySettingObj.data.formula.options.length > 0
430
430
  ) {
431
- if(this.channelParams.scene === 'modifyprice'){
431
+ if(this.channelParams.scene === 'modifyprice'||this.channelParams.scene === 'select'){
432
432
  commonConfig['sale_price_base'] = policySettingObj.data.formula;
433
433
  }
434
434
  }
@@ -737,7 +737,7 @@ export default {
737
737
  params['material_status'] ==='Y' && {
738
738
  label: "称呼",
739
739
  ele: "el-input",
740
- value: params['material_nickname'] || '亲爱的 {{name}}!' ,
740
+ value: params['material_nickname'] || '亲爱的 {{name}}:' ,
741
741
  valueKey: "material_nickname",
742
742
  className: "input100",
743
743
  type:'text',
@@ -35,6 +35,49 @@ const companyRouter = {
35
35
  icon: 'xdicon_jiamengshangyonghu',
36
36
  roles: [mCompany.getXAppList]
37
37
  }
38
+ },
39
+ {
40
+ path: 'entrance/:id/:site_id?/:site_name?',
41
+ name: 'PartnerCompanyEntrance',
42
+ hidden: true,
43
+ component: () => setModuleName(import('@/viewsCompany/entrance'), 'PartnerCompanyEntrance'),
44
+ meta: {
45
+ title: '入口配置',
46
+ icon: 'xdicon_jiamengshangyonghu',
47
+ }
48
+ },
49
+ {
50
+ path: 'entranceCreate/:type/:group_id',
51
+ component: () => setModuleName(import('@/viewsCompany/entranceCreate'), 'entryCreate'),
52
+ name: "entryCreate",
53
+ hidden: true,
54
+ meta: {
55
+ title: "添加入口页",
56
+ activeMenu: "/m-company/list",
57
+ noCache: true,
58
+ }
59
+ },
60
+ {
61
+ path: 'entranceEdit/:type/:id/:group_id',
62
+ component: () => setModuleName(import('@/viewsCompany/entranceCreate'), 'entryEdit'),
63
+ name: "entryEdit",
64
+ hidden: true,
65
+ meta: {
66
+ title: "编辑入口页",
67
+ activeMenu: "/m-company/list",
68
+ noCache: true,
69
+ }
70
+ },
71
+ {
72
+ path: 'entranceInfo/:type/:id',
73
+ component: () => setModuleName(import('@/viewsCompany/entranceCreate'), 'entryInfo'),
74
+ name: "entryInfo",
75
+ noCache: true,
76
+ hidden: true,
77
+ meta: {
78
+ title: "查看入口页",
79
+ activeMenu: "/m-company/list",
80
+ }
38
81
  }
39
82
  ]
40
83
  }
@@ -10,9 +10,7 @@ module.exports = {
10
10
  isPublic: true,
11
11
  path: '/idaas-partner/v1/sites/options',
12
12
  isRule: false,
13
- params: {
14
- group_key: ['标识', 'String', '必选','saas'],
15
- },
13
+ params: {},
16
14
  resultKey: "data",
17
15
  disabled: true,
18
16
  role: '',
@@ -158,5 +156,103 @@ module.exports = {
158
156
  disabled: true,
159
157
  role: '@@@.@@@.SAAS_COMPANY_XAPP_BATCHCLOSE',
160
158
  },
159
+ {
160
+ title: '入口管理 - 列表',
161
+ mapFn: "getEntrySettingList",
162
+ path: '/cms-partner/v1/entry-setting',
163
+ isRule: false,
164
+ isPublic: true,
165
+ params: {
166
+ site_id: ['site_id', 'String', '必填'],
167
+ entry_name: ['入口名称', 'String', '选填'],
168
+ group_id: ['分组ID', 'String', '选填'],
169
+ no_card_is_show: ['卡登陆首页是否展示 Y/N', 'String', '选填'],
170
+ status: ['状态', 'String', '选填'],
171
+ page_size: ['每页', 'String', '必填'],
172
+ page_token: ['页数', 'String', '必填'],
173
+ },
174
+ resultKey: "data",
175
+ disabled: true,
176
+ },
177
+ {
178
+ title: 'saas入口管理 - 入口',
179
+ mapFn: "getSaasEntrySetting",
180
+ path: '/cms-partner/v1/entry-setting-custom/:company_id',
181
+ isRule: false,
182
+ isPublic: true,
183
+ params: {
184
+ site_id: ['site_id', 'String', '必填'],
185
+ company_id: ['company_id', 'String', '选填'],
186
+ },
187
+ resultKey: "data",
188
+ disabled: true,
189
+ },
190
+ {
191
+ title: 'saas入口管理 - 入口更新',
192
+ mapFn: "updateSaasEntrySetting",
193
+ path: '/cms-partner/v1/entry-setting-custom/:company_id',
194
+ isRule: false,
195
+ isPublic: true,
196
+ data: {
197
+ company_id: ['company_id', 'String', '必填'],
198
+ model: ['model', 'Object', '必填'],
199
+ site_id: ['site_id', 'String', '选填'],
200
+ },
201
+ method: 'PUT',
202
+ resultKey: "data",
203
+ disabled: true,
204
+ },
205
+ {
206
+ title: '入口管理 - 获取单个',
207
+ mapFn: "getEntrySettingInfo",
208
+ path: '/cms-partner/v1/entry-setting/:id',
209
+ isRule: false,
210
+ isPublic: true,
211
+ params: {
212
+ site_id: ['site_id', 'String', true],
213
+ id: ['id', 'ID', true],
214
+ },
215
+ disabled: true,
216
+ },
217
+ {
218
+ title: '入口管理 - 创建',
219
+ mapFn: "createEntrySetting",
220
+ path: '/cms-partner/v1/entry-setting',
221
+ isRule: false,
222
+ isPublic: true,
223
+ data: {
224
+ siteid: ['siteid', 'String', '必填'],
225
+ entry_name: ['入口名称', 'String', '必填'],
226
+ group_id: ['分组ID', 'String', '必填'],
227
+ business_code: ['业务线', 'String', '必填'],
228
+ image_url: ['图片', 'String', '必填'],
229
+ redirect_data: ['跳转内容', 'String', '必填'],
230
+ sort: ['排序', 'String', '必填'],
231
+ status: ['状态 Y|N', 'String', '必填'],
232
+ no_card_is_show: ['卡登陆首页是否展示 Y/N', 'String', '必填'],
233
+ },
234
+ disabled: true,
235
+ },
236
+ {
237
+ title: '入口管理 - 修改',
238
+ mapFn: "updateEntrySetting",
239
+ path: '/cms-partner/v1/entry-setting/:id',
240
+ isRule: false,
241
+ isPublic: true,
242
+ data: {
243
+ siteid: ['siteid', 'String', true],
244
+ id: ['id', 'String', true],
245
+ group_id: ['分组ID', 'String', '必填'],
246
+ entry_name: ['入口名称', 'String', 'true'],
247
+ business_code: ['业务线', 'String', 'true'],
248
+ image_url: ['图片', 'String', 'true'],
249
+ redirect_data: ['跳转内容', 'String', 'true'],
250
+ sort: ['排序', 'String', 'true'],
251
+ status: ['状态 Y|N', 'String', 'true'],
252
+ no_card_is_show: ['卡登陆首页是否展示 Y/N', 'String', '必填'],
253
+ },
254
+ method: "PUT",
255
+ disabled: true,
256
+ },
161
257
  ]
162
258
  }
@@ -164,15 +164,17 @@ export default {
164
164
  methods:{
165
165
 
166
166
  ...mapActions('mCompany', [
167
- 'getAllMPlatformCatelogs',
168
- 'getEditxSiteLists',
169
167
  'getXAppList',
170
168
  'xAppSync',
171
169
  'getxAppItem',
172
170
  'xAppItemUpdate',
173
171
  'xAppBatchOpen',
174
172
  'xAppBatchClose'
175
- ]),
173
+ ]),
174
+ ...mapActions({
175
+ getAllPlatformCatelogs: 'mCompany/getAllMPlatformCatelogs',
176
+ getEditxSiteLists: 'mCompany/getEditxSiteLists'
177
+ }),
176
178
  handleAppSync(){
177
179
  this.xAppSync({filters:{company_id:this.company_id}})
178
180
  .then(res=>{})
@@ -0,0 +1,302 @@
1
+ <template>
2
+ <div class="app-container">
3
+ <el-card class="app-container__list">
4
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
5
+ <el-form-item label="入口配置" prop="type">
6
+ <el-radio-group v-model="form.type">
7
+ <el-radio label="default">继承站点设置</el-radio>
8
+ <el-radio label="custom">自定义入口</el-radio>
9
+ </el-radio-group>
10
+ </el-form-item>
11
+ </el-form>
12
+ </el-card>
13
+ <el-card
14
+ v-if="form.type == 'custom'"
15
+ style="margin-top: 10px"
16
+ class="app-container__list"
17
+ >
18
+ <el-tabs v-model="group" type="card" @tab-click="handleClick">
19
+ <el-tab-pane
20
+ v-for="group in groupList"
21
+ :key="group.value"
22
+ :label="group.label"
23
+ :name="group.value"
24
+ ></el-tab-pane>
25
+ </el-tabs>
26
+ <div style="display: flex; justify-content: flex-end">
27
+ <el-button
28
+ type="primary"
29
+ @click="$router.push(`/m-company/entranceCreate/add/${group}?site_id=${site_id}&company_id=${company_id}`)"
30
+ >添加</el-button
31
+ >
32
+ </div>
33
+ <div class="app-container__list-table">
34
+ <xd-table
35
+ :headers="headers"
36
+ :list="tables"
37
+ is-border
38
+ @onClick="handleTableClick"
39
+ :custom-function="handleBtn"
40
+ ></xd-table>
41
+ </div>
42
+ <div class="app-container__list-pagination">
43
+ <xd-pagination
44
+ :total="total"
45
+ :limit.sync="limit"
46
+ :page="page_token"
47
+ :auto-scroll="false"
48
+ @onPagination="handlePagination"
49
+ ></xd-pagination>
50
+ </div>
51
+ </el-card>
52
+ <div style="margin-top: 10px">
53
+ <el-button @click="handleBack">返回</el-button>
54
+ <el-button type="primary" @click="handleSubmit">保存</el-button>
55
+ </div>
56
+ </div>
57
+ </template>
58
+
59
+ <script>
60
+ import XdPagination from "@/components/XdPagination.vue";
61
+ import XdTable from "@/components/XdTable";
62
+ import { mapActions } from "vuex";
63
+ import checkPermission from "@/utils/permission";
64
+ import { getOptions } from "@/utils/options";
65
+ import { Loading } from "element-ui";
66
+ export default {
67
+ name: "entrance",
68
+ components: {
69
+ XdPagination, //翻译插件
70
+ XdTable,
71
+ },
72
+ data() {
73
+ return {
74
+ form: {
75
+ type: "default",
76
+ },
77
+ rules: {
78
+ type: [
79
+ { required: true, message: "请选择入口配置", trigger: "change" },
80
+ ],
81
+ },
82
+ //列表对象
83
+ tables: [],
84
+ headers: [
85
+ {
86
+ type: "normal",
87
+ prop: "id",
88
+ align: "center",
89
+ width: 100,
90
+ label: "ID",
91
+ },
92
+ {
93
+ type: "normal",
94
+ prop: "entry_name",
95
+ align: "center",
96
+ minWidth: 150,
97
+ label: "名称",
98
+ },
99
+ {
100
+ type: "image",
101
+ prop: "image_url",
102
+ align: "center",
103
+ width: 140,
104
+ height: 140,
105
+ label: "广告图",
106
+ },
107
+ {
108
+ type: "normal",
109
+ prop: "url",
110
+ align: "center",
111
+ width: 200,
112
+ label: "链接地址",
113
+ },
114
+ {
115
+ type: "normal",
116
+ prop: "sort",
117
+ align: "center",
118
+ width: 100,
119
+ label: "排序",
120
+ },
121
+ {
122
+ type: "status",
123
+ prop: "status",
124
+ align: "center",
125
+ width: 100,
126
+ label: "状态",
127
+ },
128
+ {
129
+ type: "normal",
130
+ prop: "created_time",
131
+ align: "center",
132
+ width: 200,
133
+ label: "创建时间",
134
+ },
135
+ {
136
+ type: "normal",
137
+ prop: "updated_time",
138
+ align: "center",
139
+ width: 200,
140
+ label: "修改时间",
141
+ },
142
+ {
143
+ type: "operate",
144
+ align: "center",
145
+ width: 100,
146
+ label: "操作",
147
+ isCheckHide: true,
148
+ values: [
149
+ {
150
+ ui: "text-button",
151
+ name: "查看",
152
+ type: "text",
153
+ },
154
+ {
155
+ ui: "text-button",
156
+ name: "编辑",
157
+ type: "text",
158
+ },
159
+ ],
160
+ },
161
+ ],
162
+ //分页参数
163
+ page_token: 1, //当前页面数量
164
+ hasNextPage: true, //是否有下一页
165
+ total: 0,
166
+ limit: 20, //搜索参数
167
+ group: "",
168
+ groupList: [],
169
+ isFrist: true
170
+ };
171
+ },
172
+ computed: {
173
+ site_id() {
174
+ return this.$route.params.site_id;
175
+ },
176
+ company_id() {
177
+ return this.$route.params.id;
178
+ },
179
+ },
180
+ watch: {
181
+ "form.type"(val) {
182
+ if (val === "custom") {
183
+ this.getList();
184
+ }
185
+ },
186
+ },
187
+ async created() {
188
+ console.log(this.company_id, "this.company_id");
189
+ if (this.isFrist) {
190
+ await this.getSaasEntrySetting({
191
+ company_id: this.company_id,
192
+ site_id: this.site_id,
193
+ }).then((res) => {
194
+ this.form.type = res.data.mode;
195
+ this.isFrist=false
196
+ });
197
+ }
198
+ ///cms-partner/v1/entry-setting-group/options
199
+ const res = await getOptions({
200
+ server: "cms-partner",
201
+ fn: "entry-setting-group",
202
+ path: "p1",
203
+ params: { site_id: this.site_id,company_id: this.company_id, },
204
+ });
205
+ this.groupList = res.data.list;
206
+ if (res.data.list.length > 0) this.group = res.data.list[0].value;
207
+ },
208
+ methods: {
209
+ ...mapActions("mCompany", [
210
+ "getEntrySettingList",
211
+ "getSaasEntrySetting",
212
+ "updateSaasEntrySetting",
213
+ ]),
214
+ onJfbTagForReload() {
215
+ this.getList()
216
+ },
217
+ /**
218
+ * @description 获取数据列表
219
+ */
220
+ getList() {
221
+ //请求数据
222
+ let params = {
223
+ site_id: this.site_id,
224
+ page_token: this.page_token,
225
+ page_size: this.limit,
226
+ group_id: this.group,
227
+ company_id: this.company_id,
228
+ };
229
+ let loading = Loading.service({});
230
+ this.getEntrySettingList(params)
231
+ .then((res) => {
232
+ this.tables = res.data.list.map((item) => {
233
+ let url = "";
234
+ if (item.redirect_type === "INN") {
235
+ url = item.redirect_data.frontPath;
236
+ } else if (item.redirect_type === "URL") {
237
+ url = item.redirect_data.path;
238
+ }
239
+ item["created_time"] = getTimeFormat(item.created_time);
240
+ item["updated_time"] = getTimeFormat(item.updated_time);
241
+ item["url"] = url;
242
+ return item;
243
+ });
244
+ this.total = res.data.total_size;
245
+ loading.close();
246
+ })
247
+ .catch((err) => loading.close());
248
+ },
249
+ handleBtn({ action, data }) {
250
+ if (action === "btn") {
251
+ if (data.btn.name === "编辑") {
252
+ return 1 || checkPermission([this.customSetting.entryEdit]);
253
+ }
254
+ if (data.btn.name === "查看") {
255
+ return 1 || checkPermission([this.customSetting.entryInfo]);
256
+ }
257
+ }
258
+ },
259
+ handleClick(tab) {
260
+ this.getList();
261
+ },
262
+ handleTableClick({ row, value, ...opther }) {
263
+ console.log(row, value);
264
+ if (value.name === "查看") {
265
+ this.$router.push(`/m-company/entranceInfo/info/${row.id}?site_id=${this.site_id}&company_id=${this.company_id}`);
266
+ }
267
+ if (value.name === "编辑") {
268
+ this.$router.push(
269
+ `/m-company/entranceEdit/edit/${row.id}/${this.group}?site_id=${this.site_id}&company_id=${this.company_id}`
270
+ );
271
+ }
272
+ },
273
+ /**
274
+ * @description 翻页处理方法
275
+ * @param page {Number} 访问页面页码数
276
+ */
277
+ handlePagination(page) {
278
+ this.page_token = page;
279
+ this.getList();
280
+ },
281
+ handleSubmit() {
282
+ let data = {
283
+ company_id: this.company_id,
284
+ mode: this.form.type,
285
+ site_id: this.site_id,
286
+ };
287
+ this.updateSaasEntrySetting(data)
288
+ .then((res) => {
289
+ this.$message.success("修改成功");
290
+ this.$bus.$emit("delTags", this.$route, {}, "PartnerCompanyList");
291
+ })
292
+ .catch((err) => {});
293
+ },
294
+ handleBack() {
295
+ this.$bus.$emit("delTags", this.$route, {}, "PartnerCompanyList");
296
+ },
297
+ },
298
+ };
299
+ </script>
300
+
301
+ <style lang="scss" scoped>
302
+ </style>
@@ -0,0 +1,523 @@
1
+ <template>
2
+ <div class="app-container">
3
+ <el-card class="app-container-content">
4
+ <div class="app-container__title">{{ title }}</div>
5
+ <div class="app-container__body">
6
+ <xd-base-field
7
+ ref="poster"
8
+ v-if="status && listForm.length > 0"
9
+ v-model="listValue"
10
+ :list="listForm"
11
+ label-width="140px"
12
+ @success="handleSuccess"
13
+ @onApiSuccessUrl="handleApiSuccessUrl"
14
+ @onGetParamsAndHeader="handleGetParamsAndHeader"
15
+ ></xd-base-field>
16
+ <div class="adjust-btn">
17
+ <el-button
18
+ @click="handleClick()"
19
+ type="primary"
20
+ :disabled="type === 'info'"
21
+ >提交</el-button
22
+ >
23
+ <el-button type="default" @click="back">返回</el-button>
24
+ </div>
25
+ </div>
26
+ </el-card>
27
+ </div>
28
+ </template>
29
+
30
+
31
+ <script>
32
+ import { mapActions, mapState } from "vuex";
33
+ import XdBaseField from "@/components/XdBaseDynamicField";
34
+ import XdRemoteCascader from "@/components/XdRemoteCascader";
35
+ import XdRemoteInput from "@/components/XdRemoteInput";
36
+ import handleCity from "@/mixins/handleCity";
37
+ import { getOptions } from "@/utils/options";
38
+ import { getSiteRouter } from "@/utils/xd.base";
39
+
40
+ /**
41
+ * @description 演示resfull - 添加用户
42
+ * @author coder
43
+ * @module @/pages/resfull/create.vue
44
+ */
45
+ export default {
46
+ name: "entryCreate",
47
+ components: {
48
+ XdBaseField,
49
+ XdRemoteInput,
50
+ XdRemoteCascader,
51
+ },
52
+ mixins: [handleCity],
53
+ computed: {
54
+ site_id() {
55
+ return this.$route.query.site_id;
56
+ },
57
+ title() {
58
+ return this.$route.meta.title;
59
+ },
60
+ id() {
61
+ return this.$route.params.id;
62
+ },
63
+ company_id() {
64
+ return this.$route.query.company_id;
65
+ }
66
+ },
67
+
68
+ watch: {
69
+ "listValue.redirect_type"() {
70
+ this.initForm(this.listValue);
71
+ },
72
+ },
73
+
74
+ data() {
75
+ return {
76
+ /**提交信息**/
77
+ listForm: [],
78
+ listValue: {},
79
+ /**自定义模块存储**/
80
+ businessList: [],
81
+
82
+ /**初始化完成**/
83
+ status: false,
84
+ type: "",
85
+ group_name: "",
86
+ group_id: "",
87
+ };
88
+ },
89
+ async created() {
90
+ this.type = this.$route.params["type"];
91
+ this.group_id = this.$route.params.group_id;
92
+ let loading = this.$loading({});
93
+ let res = await getOptions({
94
+ server: "partner",
95
+ fn: "business-line",
96
+ path: "p1",
97
+ });
98
+ const groupList = await getOptions({
99
+ server: "cms-partner",
100
+ fn: "entry-setting-group",
101
+ path: "p1",
102
+ params: { site_id: this.site_id },
103
+ });
104
+ groupList.data.list.map((item) => {
105
+ if (this.group_id === item.value) {
106
+ this.group_name = item.label;
107
+ }
108
+ });
109
+ this.businessList = res.data.list;
110
+
111
+ if (this.id) {
112
+ console.log(this.id,'aaaaa');
113
+
114
+ this.getEntrySettingInfo({ id: this.id,company_id: this.company_id,site_id: this.site_id }).then((res) => {
115
+ loading.close();
116
+ if (res.data["redirect_type"] === "URL") {
117
+ res.data["redirect_data_url"] = res.data["redirect_data"]["path"];
118
+ delete res.data["redirect_data"];
119
+ }
120
+ this.initForm({
121
+ ...res.data,
122
+ upload: {
123
+ url: res.data.image_url,
124
+ },
125
+ upload2: {
126
+ url: res.data.image_url2,
127
+ },
128
+ upload3: {
129
+ url: res.data.image_url3,
130
+ },
131
+ });
132
+ });
133
+ } else {
134
+ loading.close();
135
+ this.initForm();
136
+ }
137
+ },
138
+ methods: {
139
+ ...mapActions("mCompany", [
140
+ "getEntrySettingInfo",
141
+ "createEntrySetting",
142
+ "updateEntrySetting",
143
+ ]),
144
+ ...mapActions({
145
+ getAllPlatformCatelogs: 'mCompany/getAllMPlatformCatelogs',
146
+ getEditxSiteLists: 'mCompany/getEditxSiteLists'
147
+ }),
148
+
149
+ back() {
150
+ this.$bus.$emit("delTags", this.$route, {}, "PartnerCompanyEntrance");
151
+ },
152
+
153
+ /**
154
+ * @description 自定义单独触发验证规则
155
+ * @param form 表单
156
+ * @param field 验证字段
157
+ */
158
+ handleCustomChange(form, field) {
159
+ this.$refs[form].validateField(field);
160
+ },
161
+ /**
162
+ * @description 初始化表单
163
+ * @param data
164
+ */
165
+ initForm(data = {}) {
166
+ this.listForm = [
167
+ {
168
+ label: "分组ID",
169
+ ele: "el-input",
170
+ valueKey: "group_id",
171
+ value: this.group_id,
172
+ className: "input40",
173
+ disabled: true,
174
+ },
175
+ {
176
+ label: "分组名称",
177
+ ele: "el-input",
178
+ valueKey: "group_name",
179
+ value: this.group_name,
180
+ className: "input40",
181
+ disabled: true,
182
+ },
183
+ {
184
+ label: "入口名称",
185
+ ele: "el-input",
186
+ placeholder: "请输入入口名称",
187
+ valueKey: "entry_name",
188
+ value: data.entry_name || "",
189
+ className: "input40",
190
+ disabled: this.type === "info",
191
+ rules: [{ required: true, message: "请输入入口名称" }],
192
+ },
193
+ {
194
+ disabled: this.type === "info",
195
+ label: "广告位图片:", //label
196
+ ele: "xd-upload", //package 名称
197
+ valueKey: "upload", //form[valueKey]
198
+ value: data.upload || null, //v-model
199
+ defaultValue: data.upload || null, //默认图片对象
200
+ slot: true, //按钮是否使用slot
201
+ elinputClassName: "input40",
202
+ tipsformet: "上传文件格式:@imageType@,不超过@size@MB.",
203
+ type: ["jpg", "png", "jpeg"],
204
+ styleType: "one", //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
205
+ uploadType: "aliyun", //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
206
+ size: 1, //5M
207
+ action: "aliyun",
208
+ sort: true, //当上传图片列表时候,是否启用排序
209
+ oneWidth: 140, //单个图片显示宽度
210
+ oneHeight: 140, //单个图片显示高度
211
+ rules: [
212
+ {
213
+ required: true,
214
+ message: "请上传图片",
215
+ trigger: ["blur", "change"],
216
+ },
217
+ ],
218
+ },
219
+ {
220
+ disabled: this.type === "info",
221
+ label: "二分屏图片:", //label
222
+ ele: "xd-upload", //package 名称
223
+ valueKey: "upload2", //form[valueKey]
224
+ value: data.upload2 || null, //v-model
225
+ defaultValue: data.upload2 || null, //默认图片对象
226
+ slot: true, //按钮是否使用slot
227
+ elinputClassName: "input40",
228
+ tipsformet: "上传文件格式:@imageType@,不超过@size@MB.",
229
+ type: ["jpg", "png", "jpeg"],
230
+ styleType: "one", //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
231
+ uploadType: "aliyun", //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
232
+ size: 1, //5M
233
+ action: "aliyun",
234
+ sort: true, //当上传图片列表时候,是否启用排序
235
+ oneWidth: 140, //单个图片显示宽度
236
+ oneHeight: 140, //单个图片显示高度
237
+ rules: [
238
+ {
239
+ required: true,
240
+ message: "请上传图片",
241
+ trigger: ["blur", "change"],
242
+ },
243
+ ],
244
+ },
245
+ {
246
+ disabled: this.type === "info",
247
+ label: "三分屏图片:", //label
248
+ ele: "xd-upload", //package 名称
249
+ valueKey: "upload3", //form[valueKey]
250
+ value: data.upload3 || null, //v-model
251
+ defaultValue: data.upload3 || null, //默认图片对象
252
+ slot: true, //按钮是否使用slot
253
+ elinputClassName: "input40",
254
+ tipsformet: "上传文件格式:@imageType@,不超过@size@MB.",
255
+ type: ["jpg", "png", "jpeg"],
256
+ styleType: "one", //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
257
+ uploadType: "aliyun", //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
258
+ size: 1, //5M
259
+ action: "aliyun",
260
+ sort: true, //当上传图片列表时候,是否启用排序
261
+ oneWidth: 140, //单个图片显示宽度
262
+ oneHeight: 140, //单个图片显示高度
263
+ rules: [
264
+ {
265
+ required: true,
266
+ message: "请上传图片",
267
+ trigger: ["blur", "change"],
268
+ },
269
+ ],
270
+ },
271
+ {
272
+ disabled: this.type === "info",
273
+ label: "业务线设置",
274
+ ele: "xd-select-list",
275
+ valueKey: "business_code",
276
+ value: data.business_code || "",
277
+ className: "input40",
278
+ placeholder: "请选择业务线",
279
+ list: this.businessList,
280
+ rules: [{ required: true, message: "请选择业务线" }],
281
+ },
282
+ {
283
+ label: "自定义票券登录地址",
284
+ ele: "xd-select-site-path",
285
+ className: "input50",
286
+ valueKey: "custom_redirect_data",
287
+ value: data["custom_redirect_data"] || null,
288
+ setting: { site_id: this.site_id },
289
+ handleCustom: ({ action, data }) => {
290
+ if (action === "siteList") {
291
+ this.getEditxSiteLists()
292
+ .then((res) => {
293
+ data.cb(
294
+ res.data.list.map((item) => {
295
+ return {
296
+ ...item,
297
+ label: item["site_name"],
298
+ value: item["site_id"],
299
+ };
300
+ })
301
+ );
302
+ })
303
+ .catch((res) => {
304
+ console.error(res);
305
+ data.cb([]);
306
+ });
307
+ }
308
+
309
+ //获取应用列表
310
+ if (action === "appList") {
311
+ if (data.params && data.params.value) {
312
+ getSiteRouter(this, data.cb, { site_id: data.params.value });
313
+ } else {
314
+ data.cb([]);
315
+ }
316
+ }
317
+ },
318
+ notice:
319
+ "如果跳转地址配置的为小程序地址,则自定义票券登录地址配置完成不生效;如果跳转配置的为H5界面,则自定义票券登录地址可为小程序或H5.",
320
+ inline: false,
321
+ },
322
+ {
323
+ label: "跳转方式",
324
+ ele: "xd-radio",
325
+ className: "input50",
326
+ valueKey: "redirect_type",
327
+ value: data.redirect_type || "INN",
328
+ list: [
329
+ { label: "站内", value: "INN" },
330
+ { label: "站外", value: "URL" },
331
+ ],
332
+ disabled: this.type === "info",
333
+ rules: [{ required: true, message: "请选择跳转方式" }],
334
+ },
335
+ data.redirect_type === "URL" && {
336
+ label: "跳转地址",
337
+ ele: "el-input",
338
+ placeholder: "请输入跳转地址",
339
+ valueKey: "redirect_data_url",
340
+ value: data["redirect_data_url"] || "",
341
+ className: "input40",
342
+ disabled: this.type === "info",
343
+ rules: [{ required: true, message: "请输入跳转地址" }],
344
+ },
345
+ (!data.redirect_type || data.redirect_type === "INN") && {
346
+ label: "跳转地址",
347
+ ele: "xd-select-site-path",
348
+ className: "input50",
349
+ valueKey: "redirect_data",
350
+ value: data.redirect_data || null,
351
+ setting: {
352
+ site_id: this.site_id,
353
+ },
354
+ disabled: this.type === "info",
355
+ handleCustom: ({ action, data }) => {
356
+ if (action === "siteList") {
357
+ this.getEditxSiteLists()
358
+ .then((res) => {
359
+ data.cb(
360
+ res.data.list.map((item) => {
361
+ return {
362
+ ...item,
363
+ label: item["site_name"],
364
+ value: item["site_id"],
365
+ };
366
+ })
367
+ );
368
+ })
369
+ .catch((res) => {
370
+ console.error(res);
371
+ data.cb([]);
372
+ });
373
+ }
374
+
375
+ //获取应用列表
376
+ if (action === "appList") {
377
+ if (data.params && data.params.value) {
378
+ getSiteRouter(this, data.cb, { site_id: data.params.value });
379
+ } else {
380
+ data.cb([]);
381
+ }
382
+ }
383
+ },
384
+ rules: [
385
+ { required: true, message: "请选择网站地址", trigger: "change" },
386
+ ],
387
+ },
388
+ {
389
+ label: "首页是否展示",
390
+ ele: "xd-radio",
391
+ valueKey: "no_card_is_show",
392
+ value: data.no_card_is_show || "",
393
+ list: [
394
+ { label: "显示", value: "Y" },
395
+ { label: "不显示", value: "N" },
396
+ ],
397
+ disabled: this.type === "info",
398
+ rules: [{ required: true, message: "请选择首页是否展示" }],
399
+ },
400
+ {
401
+ label: "排序",
402
+ ele: "el-input",
403
+ valueKey: "sort",
404
+ value: data.sort || "",
405
+ className: "input40",
406
+ rules: [{ required: true, message: "请输入排序" }],
407
+ disabled: this.type === "info",
408
+ },
409
+ {
410
+ label: "状态",
411
+ ele: "xd-radio",
412
+ valueKey: "status",
413
+ value: data.status || "",
414
+ list: [
415
+ { label: "启用", value: "Y" },
416
+ { label: "禁用", value: "N" },
417
+ ],
418
+ disabled: this.type === "info",
419
+ rules: [{ required: true, message: "请选择状态" }],
420
+ },
421
+ ].filter((i) => i);
422
+ this.status = true;
423
+ },
424
+ /**
425
+ * @description 提交数据事件
426
+ */
427
+ handleClick() {
428
+ Promise.all([this.$refs["poster"].submit()])
429
+ .then((res) => {
430
+ let {
431
+ redirect_data,
432
+ upload,
433
+ upload2,
434
+ upload3,
435
+ redirect_type,
436
+ custom_redirect_data,
437
+ ...postData
438
+ } = this.listValue;
439
+ postData["image_url"] = upload.url;
440
+ postData["image_url2"] = upload2.url;
441
+ postData["image_url3"] = upload3.url;
442
+ postData["redirect_type"] = redirect_type;
443
+ postData.site_id = this.site_id;
444
+ postData.company_id = this.company_id;
445
+ if (redirect_type === "URL") {
446
+ postData["redirect_data"] = JSON.stringify({
447
+ path: postData["redirect_data_url"],
448
+ });
449
+ delete postData["redirect_data_url"];
450
+ } else {
451
+ postData["redirect_data"] = JSON.stringify(redirect_data.app);
452
+ }
453
+
454
+ //自定义卡券登录链接
455
+ if (custom_redirect_data) {
456
+ postData["custom_redirect_data"] = JSON.stringify(
457
+ custom_redirect_data.app
458
+ );
459
+ }
460
+
461
+ if (postData.group_name) delete postData.group_name;
462
+
463
+ if (this.id) {
464
+ this.updateEntrySetting({ ...postData, id: this.id }).then(
465
+ (res) => {
466
+ this.$message.success("修改成功");
467
+ this.$bus.$emit("delTags", this.$route, {}, "PartnerCompanyEntrance");
468
+ }
469
+ );
470
+ } else {
471
+ this.createEntrySetting(postData).then((res) => {
472
+ this.$message.success("添加成功");
473
+ this.$bus.$emit("delTags", this.$route, {}, "PartnerCompanyEntrance");
474
+ });
475
+ }
476
+ })
477
+ .catch((res) => {
478
+ console.log("no");
479
+ });
480
+ },
481
+ },
482
+ };
483
+ </script>
484
+
485
+ <style scoped lang="scss">
486
+ .app-container {
487
+ &__title {
488
+ font-size: 16px;
489
+ line-height: 24px;
490
+ padding: 0 0 20px;
491
+ font-weight: bold;
492
+ }
493
+
494
+ &__body {
495
+ & ::v-deep .el-tabs__content {
496
+ padding-top: 20px;
497
+ }
498
+ }
499
+ }
500
+
501
+ .adjust-btn {
502
+ margin-left: 140px;
503
+ }
504
+
505
+ @media screen and (max-width: 768px) {
506
+ .app-container {
507
+ &__title {
508
+ padding: 0 0 10px;
509
+ }
510
+
511
+ & ::v-deep .el-card__body {
512
+ padding: 10px;
513
+ }
514
+
515
+ &__body {
516
+ & ::v-deep .el-tabs__content {
517
+ padding-top: 10px;
518
+ }
519
+ }
520
+ }
521
+ }
522
+ </style>
523
+
@@ -20,6 +20,31 @@
20
20
  is-border
21
21
  @onClick="handleTableClick"
22
22
  >
23
+ <template slot="operate" slot-scope="{ row, btn }">
24
+ <div class="app-container__list-table-option" :class="{ iphone: !isPc }">
25
+ <template v-for="(value, idx) in btn">
26
+ <template>
27
+ <template v-if="value.event === 'entrance'">
28
+ <el-button
29
+ v-if="row.site_id&&isEntry"
30
+ :key="idx"
31
+ size="mini"
32
+ :type="value.type"
33
+ @click="handleTableClick({ row, value, idx })"
34
+ >入口配置</el-button>
35
+ </template>
36
+ <el-button
37
+ v-else
38
+ size="mini"
39
+ :key="idx"
40
+ :type="value.type"
41
+ :icon="value.icon"
42
+ @click="handleTableClick({ row, value, idx })"
43
+ >{{ value.name }}</el-button>
44
+ </template>
45
+ </template>
46
+ </div>
47
+ </template>
23
48
  </xd-table>
24
49
  </div>
25
50
  <div class="app-container__list-pagination">
@@ -86,13 +111,17 @@ export default {
86
111
  { "type": "normal", "prop": "updated_time", "align": "center", "width": 180, "label": "修改时间" },
87
112
  { "type": "status", "prop": "company_status", "align": "center", "width": 100, "label": "状态" },
88
113
  {
89
- "type": "operate", "align": "center", "width": 180, "label": "操作",
114
+ "type": "operate", "align": "center", prop: "operate", "width": 180, "label": "操作",
90
115
  "values": [
116
+ { "ui": "text-button", "name": "入口配置", "type": "primary", "event": 'entrance' },
91
117
  checkPermission(mCompany.updateSaasCompany) && { "ui": "text-button", "name": "配置客户", "type": "primary", "event": 'edit' },
92
118
  checkPermission(mCompany.getXAppList) && { "ui": "text-button", "name": "应用配置", "type": "primary", "event": 'set' }
93
119
  ].filter(i => i)
94
120
  }
95
121
  ]
122
+ },
123
+ isEntry() {
124
+ return checkPermission('PARTNER-SAAS.SAAS-PARTNER.SAAS_COMPANY_ENTRY')
96
125
  }
97
126
  },
98
127
  watch:{
@@ -125,10 +154,12 @@ export default {
125
154
 
126
155
  //是否为编辑
127
156
  isEdit: false,
157
+ isPc: false,
128
158
  }
129
159
  },
130
160
 
131
- created () {
161
+ created() {
162
+ this.isPc = this.$xdHelper.isPC()
132
163
  this.initSearchForm({})
133
164
  },
134
165
  methods: {
@@ -136,9 +167,11 @@ export default {
136
167
  'getSaasCompanyList',
137
168
  'getSaasSiteList',
138
169
  'updateSaasCompany',
139
- 'getAllPlatformCatelogs',
140
170
  'xAppSync'
141
171
  ]),
172
+ ...mapActions({
173
+ getAllPlatformCatelogs: 'mCompany/getAllMPlatformCatelogs',
174
+ }),
142
175
 
143
176
  //create and edit
144
177
  clearDialog(){
@@ -293,7 +326,7 @@ export default {
293
326
  .catch(e => loading.close())
294
327
  },
295
328
 
296
- handleTableClick ({ row, value, index, rowIndex }) {
329
+ handleTableClick({ row, value, index, rowIndex }) {
297
330
  this.id = row.id;
298
331
  if(value.event==='edit'){
299
332
  let info = {
@@ -314,6 +347,8 @@ export default {
314
347
  .catch(err=>{
315
348
  console.log(err,'err')
316
349
  })
350
+ } else if (value.event === 'entrance') {
351
+ this.$router.push(`/m-company/entrance/${row.company_id}/${row.site_id}/${row.site_name}`)
317
352
  }
318
353
 
319
354
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.174",
3
+ "version": "1.1.176",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {