mooho-base-admin-plus 0.1.68 → 0.4.0
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/dist/mooho-base-admin-plus.min.esm.js +15796 -15624
- package/dist/mooho-base-admin-plus.min.js +40 -41
- package/dist/setting.js +4 -2
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/public/setting.js +4 -2
- package/src/api/customModel.js +1 -1
- package/src/api/dataSource.js +1 -1
- package/src/api/dataView.js +1 -1
- package/src/api/i18nText +33 -0
- package/src/api/model.js +1 -1
- package/src/components/home/notice-list.vue +2 -2
- package/src/components/home/shortcut.vue +9 -9
- package/src/components/input/dialog-select.vue +3 -3
- package/src/components/input/item-select.vue +5 -5
- package/src/components/upload/upload-attachment.vue +13 -3
- package/src/components/upload/upload-image.vue +2 -2
- package/src/components/view/column-check.vue +3 -3
- package/src/components/view/column-edit.vue +18 -18
- package/src/components/view/column-select.vue +4 -4
- package/src/components/view/condition-edit.vue +10 -10
- package/src/components/view/filter-edit.vue +30 -13
- package/src/components/view/filter-setting.vue +8 -8
- package/src/components/view/form-setting-layout.vue +37 -39
- package/src/components/view/form-setting.vue +18 -18
- package/src/components/view/group-column.vue +5 -5
- package/src/components/view/group-method.vue +5 -5
- package/src/components/view/modal-form-filter.vue +28 -25
- package/src/components/view/modal-form-sort.vue +32 -27
- package/src/components/view/modal-form.vue +30 -8
- package/src/components/view/modal-table.vue +22 -2
- package/src/components/view/table-filter.vue +22 -12
- package/src/components/view/table-setting.vue +30 -42
- package/src/components/view/view-chart.vue +6 -6
- package/src/components/view/view-form-draggable.vue +7 -4
- package/src/components/view/view-form.vue +27 -14
- package/src/components/view/view-table.vue +87 -40
- package/src/components/workflow/flow-chart.vue +22 -23
- package/src/i18n/index.js +7 -7
- package/src/index.js +13 -8
- package/src/layouts/basic-layout/header-breadcrumb/index.vue +18 -3
- package/src/layouts/basic-layout/header-i18n/index.vue +5 -6
- package/src/layouts/basic-layout/header-notice/index.vue +2 -2
- package/src/layouts/basic-layout/header-search/index.vue +3 -3
- package/src/layouts/basic-layout/header-user/index.vue +18 -18
- package/src/layouts/basic-layout/menu-side/index.vue +9 -3
- package/src/layouts/basic-layout/menu-side/menu-title.vue +5 -4
- package/src/layouts/basic-layout/tabs/index.vue +4 -4
- package/src/libs/request/index.js +18 -4
- package/src/mixins/page.js +72 -18
- package/src/pages/account/login.vue +6 -6
- package/src/pages/common/task-form.vue +33 -33
- package/src/pages/common/todo.vue +1 -1
- package/src/pages/system/apiLog.vue +7 -7
- package/src/pages/system/applicationType.vue +6 -6
- package/src/pages/system/customTable.vue +7 -7
- package/src/pages/system/dict.vue +1 -1
- package/src/pages/system/dictType.vue +4 -4
- package/src/pages/system/entityView.vue +3 -3
- package/src/pages/system/error/404.vue +1 -1
- package/src/pages/system/extendColumn.vue +7 -7
- package/src/pages/system/formView.vue +10 -10
- package/src/pages/system/i18nText.vue +98 -0
- package/src/pages/system/log.vue +4 -4
- package/src/pages/system/openUser.vue +5 -5
- package/src/pages/system/organization.vue +1 -1
- package/src/pages/system/permission.vue +5 -5
- package/src/pages/system/planJob.vue +3 -3
- package/src/pages/system/process.vue +10 -10
- package/src/pages/system/role.vue +18 -18
- package/src/pages/system/rolePropertyEdit.vue +83 -100
- package/src/pages/system/systemData.vue +4 -4
- package/src/pages/system/tableView.vue +17 -17
- package/src/pages/system/taskQueue.vue +13 -6
- package/src/pages/system/user.vue +17 -17
- package/src/pages/template/processPage.vue +22 -22
- package/src/plugins/sweetalert2/index.js +1 -5
- package/src/router/dynamic.js +7 -6
- package/src/store/modules/admin/modules/i18n.js +72 -32
- package/src/store/modules/admin/modules/menu.js +1 -0
- package/src/styles/css/default.css +4 -0
- package/test/api/barcode.js +1 -1
- package/test/api/inbound.js +1 -1
- package/test/api/movePlan.js +1 -1
- package/test/api/outbound.js +1 -1
- package/test/main.js +4 -4
- package/test/router/routes.js +2 -2
- package/src/i18n/locale.js +0 -102
|
@@ -3,36 +3,36 @@
|
|
|
3
3
|
<Modal v-model="opened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" :width="formView.width || '800'">
|
|
4
4
|
<template #header>
|
|
5
5
|
<div>
|
|
6
|
-
<span class="title"
|
|
7
|
-
<span class="description">
|
|
6
|
+
<span class="title">{{ $t('Front_Label_Sorting_Setting') }}</span>
|
|
7
|
+
<span class="description">{{ $t('Front_Label_Sorting_Setting_Desc') }}</span>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
<div class="i-table-no-border">
|
|
11
11
|
<Table stripe :columns="columnsSorting" :data="dataSorting">
|
|
12
12
|
<template #action="{ row, index }">
|
|
13
|
-
<Button size="small" title="
|
|
14
|
-
<Button size="small" title="
|
|
15
|
-
<Button size="small" title="
|
|
16
|
-
<Button size="small" title="
|
|
13
|
+
<Button size="small" :title="$t('Front_Btn_Edit')" type="primary" ghost custom-icon="fa fa-edit" @click="sortingFmModalopen(row)"></Button>
|
|
14
|
+
<Button size="small" :title="$t('Front_Btn_Up')" type="primary" ghost custom-icon="fa fa-chevron-up" @click="upSorting(row, index)"></Button>
|
|
15
|
+
<Button size="small" :title="$t('Front_Btn_Down')" type="primary" ghost custom-icon="fa fa-chevron-down" @click="downSorting(row, index)"></Button>
|
|
16
|
+
<Button size="small" :title="$t('Front_Btn_Remove')" type="primary" ghost custom-icon="fa fa-times" @click="removeSorting(row, index)"></Button>
|
|
17
17
|
</template>
|
|
18
18
|
</Table>
|
|
19
19
|
</div>
|
|
20
20
|
<template #footer>
|
|
21
|
-
<Button type="primary" ghost custom-icon="fa fa-plus" @click="sortingFmModalopen(null)"
|
|
22
|
-
<Button type="primary" custom-icon="fa fa-check" @click="SaveSorting"
|
|
21
|
+
<Button type="primary" ghost custom-icon="fa fa-plus" @click="sortingFmModalopen(null)">{{ $t('Front_Btn_Add') }}</Button>
|
|
22
|
+
<Button type="primary" custom-icon="fa fa-check" @click="SaveSorting">{{ $t('Front_Btn_OK') }}</Button>
|
|
23
23
|
</template>
|
|
24
24
|
<!-- 对排序字段进行处理 -->
|
|
25
25
|
<Modal v-model="sortingFmModal" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" width="800">
|
|
26
26
|
<template #header>
|
|
27
27
|
<div>
|
|
28
|
-
<span class="title"
|
|
29
|
-
<span class="description">
|
|
28
|
+
<span class="title">{{ $t('Front_Label_Sorting_Setting_Edit') }}</span>
|
|
29
|
+
<span class="description">{{ $t('Front_Label_Sorting_Setting_Edit_Desc') }}</span>
|
|
30
30
|
</div>
|
|
31
31
|
</template>
|
|
32
32
|
<Form ref="sortingform">
|
|
33
33
|
<Row :gutter="24" type="flex">
|
|
34
34
|
<Col>
|
|
35
|
-
<FormItem label="
|
|
35
|
+
<FormItem :label="$t('Front_Label_Column')" prop="Code">
|
|
36
36
|
<Input type="text" readonly v-model="data.code" @on-focus="openSelect()">
|
|
37
37
|
<template #prepend>
|
|
38
38
|
<Button custom-icon="fa fa-search" @click="openSelect()"></Button>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</FormItem>
|
|
42
42
|
</Col>
|
|
43
43
|
<Col>
|
|
44
|
-
<FormItem label="
|
|
44
|
+
<FormItem :label="$t('Front_Label_Operator')" prop="SortingRule">
|
|
45
45
|
<Select v-model="data.rule" :transfer="true">
|
|
46
46
|
<Option v-for="item in sortingList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
47
47
|
</Select>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</Row>
|
|
51
51
|
</Form>
|
|
52
52
|
<template #footer>
|
|
53
|
-
<Button type="primary" custom-icon="fa fa-check" @click="saveSortingForm($event)"
|
|
53
|
+
<Button type="primary" custom-icon="fa fa-check" @click="saveSortingForm($event)">{{ $t('Front_Btn_OK') }}</Button>
|
|
54
54
|
</template>
|
|
55
55
|
</Modal>
|
|
56
56
|
<column-check ref="columnCheck" />
|
|
@@ -68,25 +68,30 @@
|
|
|
68
68
|
sort: String, //原排序字段json值
|
|
69
69
|
dataView: {} //原表单对象
|
|
70
70
|
},
|
|
71
|
-
computed: {},
|
|
72
71
|
data() {
|
|
73
72
|
return {
|
|
74
73
|
opened: false,
|
|
75
74
|
formView: {},
|
|
76
75
|
sortingFmModal: false,
|
|
77
|
-
|
|
76
|
+
dataSorting: [],
|
|
77
|
+
data: {}
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
computed: {
|
|
81
|
+
columnsSorting() {
|
|
82
|
+
return [
|
|
78
83
|
{
|
|
79
84
|
type: 'index',
|
|
80
85
|
width: 100,
|
|
81
|
-
title: '
|
|
86
|
+
title: this.$t('Front_Label_Sn'),
|
|
82
87
|
align: 'center'
|
|
83
88
|
},
|
|
84
89
|
{
|
|
85
|
-
title: '
|
|
90
|
+
title: this.$t('Front_Label_Column'),
|
|
86
91
|
key: 'column'
|
|
87
92
|
},
|
|
88
93
|
{
|
|
89
|
-
title: '
|
|
94
|
+
title: this.$t('Front_Label_Rule'),
|
|
90
95
|
key: 'rule'
|
|
91
96
|
},
|
|
92
97
|
{
|
|
@@ -96,20 +101,20 @@
|
|
|
96
101
|
fixed: 'right',
|
|
97
102
|
align: 'center'
|
|
98
103
|
}
|
|
99
|
-
]
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
];
|
|
105
|
+
},
|
|
106
|
+
sortingList() {
|
|
107
|
+
return [
|
|
102
108
|
{
|
|
103
109
|
value: 'asc',
|
|
104
|
-
label: '
|
|
110
|
+
label: this.$t('Front_Label_Asc')
|
|
105
111
|
},
|
|
106
112
|
{
|
|
107
113
|
value: 'desc',
|
|
108
|
-
label: '
|
|
114
|
+
label: this.$t('Front_Label_Desc')
|
|
109
115
|
}
|
|
110
|
-
]
|
|
111
|
-
|
|
112
|
-
};
|
|
116
|
+
];
|
|
117
|
+
}
|
|
113
118
|
},
|
|
114
119
|
async created() {},
|
|
115
120
|
methods: {
|
|
@@ -178,7 +183,7 @@
|
|
|
178
183
|
// 确认后关闭modal
|
|
179
184
|
this.sortingFmModal = false;
|
|
180
185
|
} else {
|
|
181
|
-
this.error('
|
|
186
|
+
this.error('Front_Msg_Column_Sorting_Required');
|
|
182
187
|
}
|
|
183
188
|
},
|
|
184
189
|
// 添加排序字段table确认
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
@slot 页头
|
|
18
18
|
-->
|
|
19
19
|
<slot name="header">
|
|
20
|
-
<span class="title">{{ formView
|
|
21
|
-
<span class="description">{{ formView
|
|
20
|
+
<span class="title">{{ getNameI18n(formView) }}</span>
|
|
21
|
+
<span class="description">{{ getDescI18n(formView) }}</span>
|
|
22
22
|
</slot>
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
@slot 页脚
|
|
81
81
|
-->
|
|
82
82
|
<slot name="footer">
|
|
83
|
-
<Button type="primary" custom-icon="fa fa-save" v-if="canSave() && saveEnable" @click="onSave"
|
|
83
|
+
<Button type="primary" custom-icon="fa fa-save" v-if="canSave() && saveEnable" @click="onSave">{{ $t('Front_Btn_Save') }}</Button>
|
|
84
84
|
</slot>
|
|
85
|
-
<Button type="default" custom-icon="fa fa-times" @click="clickClose"
|
|
86
|
-
<Button type="error" title="
|
|
85
|
+
<Button type="default" custom-icon="fa fa-times" @click="clickClose">{{ $t('Front_Btn_Close') }}</Button>
|
|
86
|
+
<Button type="error" :title="$t('Front_Btn_Setting')" custom-icon="fa fa-cog" v-if="settingEnable && allow('permission/formView')" @click="settingOpen"></Button>
|
|
87
87
|
</div>
|
|
88
88
|
</template>
|
|
89
89
|
</Modal>
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
let isOK = await this.$refs.form.validate();
|
|
372
372
|
|
|
373
373
|
if (!isOK) {
|
|
374
|
-
this.error('
|
|
374
|
+
this.error('Front_Msg_Form_Validate_Fail');
|
|
375
375
|
} else {
|
|
376
376
|
// 验证方法
|
|
377
377
|
if (this.validateFunction) {
|
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
this.confirm('
|
|
394
|
+
this.confirm('Front_Msg_Sure_To_Save', async () => {
|
|
395
395
|
if (this.formView.isCustom) {
|
|
396
396
|
if (!data.id) {
|
|
397
397
|
await customModelApi.add(this.formView.model, data);
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
this.success('
|
|
409
|
+
this.success('Front_Msg_Success', () => {
|
|
410
410
|
this.$refs.form.data = {};
|
|
411
411
|
/**
|
|
412
412
|
* 保存后事件
|
|
@@ -447,6 +447,28 @@
|
|
|
447
447
|
} else {
|
|
448
448
|
this.close();
|
|
449
449
|
}
|
|
450
|
+
},
|
|
451
|
+
// 获取多语言名称
|
|
452
|
+
getNameI18n(formView) {
|
|
453
|
+
if (formView) {
|
|
454
|
+
if (this.layout.showI18n) {
|
|
455
|
+
if (formView.code) {
|
|
456
|
+
return this.$t('DataView_' + formView.code);
|
|
457
|
+
}
|
|
458
|
+
} else {
|
|
459
|
+
return formView.name;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
// 获取多语言描述
|
|
464
|
+
getDescI18n(formView) {
|
|
465
|
+
if (this.layout.showI18n) {
|
|
466
|
+
if (formView.code) {
|
|
467
|
+
return this.$t('DataView_' + formView.code + '_$Desc');
|
|
468
|
+
}
|
|
469
|
+
} else {
|
|
470
|
+
return formView.description;
|
|
471
|
+
}
|
|
450
472
|
}
|
|
451
473
|
}
|
|
452
474
|
};
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
@slot 页头
|
|
19
19
|
-->
|
|
20
20
|
<slot name="header">
|
|
21
|
-
<span class="title">{{ tableView
|
|
22
|
-
<span class="description">{{ tableView
|
|
21
|
+
<span class="title">{{ getNameI18n(tableView) }}</span>
|
|
22
|
+
<span class="description">{{ getDescI18n(tableView) }}</span>
|
|
23
23
|
</slot>
|
|
24
24
|
</div>
|
|
25
25
|
</template>
|
|
@@ -472,6 +472,26 @@
|
|
|
472
472
|
* @property {object} args { index1 来源行序号, index2 目标行序号 }
|
|
473
473
|
*/
|
|
474
474
|
this.$emit('on-drag-drop', args);
|
|
475
|
+
},
|
|
476
|
+
// 获取多语言名称
|
|
477
|
+
getNameI18n(tableView) {
|
|
478
|
+
if (this.layout.showI18n) {
|
|
479
|
+
if (tableView.code) {
|
|
480
|
+
return this.$t('DataView_' + tableView.code);
|
|
481
|
+
}
|
|
482
|
+
} else {
|
|
483
|
+
return tableView.name;
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
// 获取多语言描述
|
|
487
|
+
getDescI18n(tableView) {
|
|
488
|
+
if (this.layout.showI18n) {
|
|
489
|
+
if (tableView.code) {
|
|
490
|
+
return this.$t('DataView_' + tableView.code + '_$Desc');
|
|
491
|
+
}
|
|
492
|
+
} else {
|
|
493
|
+
return tableView.description;
|
|
494
|
+
}
|
|
475
495
|
}
|
|
476
496
|
}
|
|
477
497
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<Col v-for="(column, index) in columns" :key="index" v-bind="getGrid(column.columnWidth)">
|
|
4
4
|
<template v-if="column.isShow">
|
|
5
5
|
<div :key="column.code" v-if="column.controlType === 'Placeholder'"></div>
|
|
6
|
-
<FormItem :label="column
|
|
6
|
+
<FormItem :label="getNameI18n(column)" :key="column.code" v-if="column.controlType !== 'Placeholder'">
|
|
7
7
|
<template v-if="column.controlType === 'Custom'">
|
|
8
8
|
<!--
|
|
9
9
|
@slot 自定义列
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
@on-change="selected => onSelectDataChange(column, selected)"
|
|
109
109
|
>
|
|
110
110
|
<Option v-for="item in getDataSource(data, column)" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
111
|
-
<Option key="__Other" value="__Other"
|
|
111
|
+
<Option key="__Other" value="__Other">{{ $t('Front_Label_Others') }}</Option>
|
|
112
112
|
</Select>
|
|
113
113
|
<Input
|
|
114
114
|
type="text"
|
|
@@ -215,12 +215,12 @@
|
|
|
215
215
|
</Radio>
|
|
216
216
|
</RadioGroup>
|
|
217
217
|
</template>
|
|
218
|
-
<template v-else
|
|
218
|
+
<template v-else>{{ $t('Front_Label_Control_Type_Not_Supported') }} {{ column.controlType }}</template>
|
|
219
219
|
</FormItem>
|
|
220
220
|
</template>
|
|
221
221
|
</Col>
|
|
222
|
-
<Col v-if="keywordEnable" v-bind="grid6">
|
|
223
|
-
<FormItem label="
|
|
222
|
+
<Col v-if="tableView.keywordEnable" v-bind="grid6">
|
|
223
|
+
<FormItem :label="$t('Front_Label_Keyword')">
|
|
224
224
|
<Input v-model="data.keyword" v-focus @on-keyup="$event => onKeyup($event)" size="small" />
|
|
225
225
|
</FormItem>
|
|
226
226
|
</Col>
|
|
@@ -244,12 +244,9 @@
|
|
|
244
244
|
this.init();
|
|
245
245
|
},
|
|
246
246
|
props: {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
// 是否存储过程
|
|
251
|
-
isDataSource: {
|
|
252
|
-
type: Boolean
|
|
247
|
+
// 表格视图
|
|
248
|
+
tableView: {
|
|
249
|
+
type: Object
|
|
253
250
|
},
|
|
254
251
|
// 筛选项数据
|
|
255
252
|
data: {
|
|
@@ -280,8 +277,11 @@
|
|
|
280
277
|
// 当前时间转字符串
|
|
281
278
|
let format = item.defaultValue.substr(7, item.defaultValue.length - 9);
|
|
282
279
|
this.setData(data, item.code, dateFormat(new Date(), format));
|
|
280
|
+
} else if (item.defaultValue == '{currentUserID}') {
|
|
281
|
+
// 当前用户编号
|
|
282
|
+
this.setData(data, item.code, this.info.id);
|
|
283
283
|
} else if (item.defaultValue == '{currentUser}') {
|
|
284
|
-
//
|
|
284
|
+
// 当前用户姓名
|
|
285
285
|
this.setData(data, item.code, this.info.name);
|
|
286
286
|
} else {
|
|
287
287
|
if (item.dataType === 'Integer') {
|
|
@@ -696,6 +696,16 @@
|
|
|
696
696
|
} else {
|
|
697
697
|
return value;
|
|
698
698
|
}
|
|
699
|
+
},
|
|
700
|
+
// 获取多语言名称
|
|
701
|
+
getNameI18n(column) {
|
|
702
|
+
if (this.layout.showI18n) {
|
|
703
|
+
if (column.code) {
|
|
704
|
+
return this.$t('DataView_' + this.tableView.code + '_Filter_' + column.code + '_' + column.operator);
|
|
705
|
+
}
|
|
706
|
+
} else {
|
|
707
|
+
return column.name;
|
|
708
|
+
}
|
|
699
709
|
}
|
|
700
710
|
}
|
|
701
711
|
};
|
|
@@ -2,31 +2,17 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<modal-table ref="table" :static="true" :setting-enable="false" :footer-enable="true" :draggable="true" :sticky="true" @on-drag-drop="dragDrop" v-if="active">
|
|
4
4
|
<template #command="{ row, index }">
|
|
5
|
-
<Button size="small" title="
|
|
6
|
-
<Button size="small" title="
|
|
7
|
-
<Button size="small" title="
|
|
8
|
-
<Button size="small" title="
|
|
5
|
+
<Button size="small" :title="$t('Front_Btn_Edit')" type="primary" ghost custom-icon="fa fa-edit" @click="edit(row, index)"></Button>
|
|
6
|
+
<Button size="small" :title="$t('Front_Btn_Up')" type="primary" ghost custom-icon="fa fa-chevron-up" @click="up(row, index)"></Button>
|
|
7
|
+
<Button size="small" :title="$t('Front_Btn_Down')" type="primary" ghost custom-icon="fa fa-chevron-down" @click="down(row, index)"></Button>
|
|
8
|
+
<Button size="small" :title="$t('Front_Btn_Remove')" type="primary" ghost custom-icon="fa fa-times" @click="remove(row, index)"></Button>
|
|
9
9
|
</template>
|
|
10
10
|
<template #footer>
|
|
11
|
-
<Button type="primary" v-if="!dataView.isVirtual" ghost custom-icon="fa fa-indent" @click="openColumnSelect"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@click="reset">
|
|
17
|
-
重置
|
|
18
|
-
</Button> -->
|
|
19
|
-
<Button type="primary" custom-icon="fa fa-bookmark" @click="createVirtual">虚拟字段</Button>
|
|
20
|
-
<!-- <Button type="primary"
|
|
21
|
-
ghost
|
|
22
|
-
custom-icon="fa fa-save"
|
|
23
|
-
v-if="isSetting"
|
|
24
|
-
@click="userSave">
|
|
25
|
-
保存
|
|
26
|
-
</Button> -->
|
|
27
|
-
<Button type="primary" custom-icon="fa fa-save" v-if="!isSetting" @click="save">保存</Button>
|
|
28
|
-
<Button type="error" custom-icon="fa fa-save" v-if="isSetting" @click="globalSave">全局保存</Button>
|
|
29
|
-
<Button type="error" custom-icon="fa fa-cog" v-if="isSetting" @click="setting">表格设置</Button>
|
|
11
|
+
<Button type="primary" v-if="!dataView.isVirtual" ghost custom-icon="fa fa-indent" @click="openColumnSelect">{{ $t('Front_Btn_Select_Column') }}</Button>
|
|
12
|
+
<Button type="primary" custom-icon="fa fa-bookmark" @click="createVirtual">{{ $t('Front_Btn_Virtual_Column') }}</Button>
|
|
13
|
+
<Button type="primary" custom-icon="fa fa-save" v-if="!isSetting" @click="save">{{ $t('Front_Btn_Save') }}</Button>
|
|
14
|
+
<Button type="error" custom-icon="fa fa-save" v-if="isSetting" @click="globalSave">{{ $t('Front_Btn_Global_Save') }}</Button>
|
|
15
|
+
<Button type="error" custom-icon="fa fa-cog" v-if="isSetting" @click="setting">{{ $t('Front_Btn_Table_Setting') }}</Button>
|
|
30
16
|
</template>
|
|
31
17
|
</modal-table>
|
|
32
18
|
<column-select ref="columnSelect" />
|
|
@@ -115,7 +101,7 @@
|
|
|
115
101
|
@on-change="checkChange('editEnableJson', 'editEnable')"
|
|
116
102
|
/>
|
|
117
103
|
<Button style="margin-left: 8px" @click="$refs.conditionEdit.open(data, 'editEnableJson', 'editEnable', dataView.model)" type="primary" size="small" icon="ios-settings">
|
|
118
|
-
|
|
104
|
+
{{ $t('Front_Btn_Condition') }}
|
|
119
105
|
</Button>
|
|
120
106
|
</div>
|
|
121
107
|
<div v-if="code == 'removeEnable'">
|
|
@@ -137,24 +123,26 @@
|
|
|
137
123
|
size="small"
|
|
138
124
|
icon="ios-settings"
|
|
139
125
|
>
|
|
140
|
-
|
|
126
|
+
{{ $t('Front_Btn_Condition') }}
|
|
141
127
|
</Button>
|
|
142
128
|
</div>
|
|
143
129
|
</template>
|
|
144
130
|
<template #bottom>
|
|
145
131
|
<Divider :plain="true" dashed orientation="left" size="small">
|
|
146
|
-
<span class="title"
|
|
132
|
+
<span class="title">{{ $t('Front_Label_Command_Button') }}</span>
|
|
147
133
|
</Divider>
|
|
148
134
|
<view-table ref="commandButton" view-code="CommandButton" :static="true" :embedded="true">
|
|
149
135
|
<template #column="{ row, code }">
|
|
150
136
|
<template v-if="code == 'params'">
|
|
151
|
-
<Button type="primary" v-if="row.viewCode && row.viewType == 'TableView'" size="small" custom-icon="fa fa-list" @click="openParams(row)"
|
|
137
|
+
<Button type="primary" v-if="row.viewCode && row.viewType == 'TableView'" size="small" custom-icon="fa fa-list" @click="openParams(row)">
|
|
138
|
+
{{ $t('Front_Btn_Param') }}
|
|
139
|
+
</Button>
|
|
152
140
|
</template>
|
|
153
141
|
</template>
|
|
154
142
|
</view-table>
|
|
155
143
|
</template>
|
|
156
144
|
<template #footer>
|
|
157
|
-
<Button type="primary" custom-icon="fa fa-save" @click="saveSetting"
|
|
145
|
+
<Button type="primary" custom-icon="fa fa-save" @click="saveSetting">{{ $t('Front_Btn_Save') }}</Button>
|
|
158
146
|
</template>
|
|
159
147
|
</modal-form>
|
|
160
148
|
<modal-table ref="commandButtonParams" view-code="CommandButtonParams" :static="true" :embedded="true" :footerEnable="true">
|
|
@@ -175,7 +163,7 @@
|
|
|
175
163
|
</template>
|
|
176
164
|
</template>
|
|
177
165
|
<template #footer>
|
|
178
|
-
<Button type="primary" custom-icon="fa fa-save" @click="saveParams"
|
|
166
|
+
<Button type="primary" custom-icon="fa fa-save" @click="saveParams">{{ $t('Front_Btn_Save') }}</Button>
|
|
179
167
|
</template>
|
|
180
168
|
</modal-table>
|
|
181
169
|
<modal-form-sort ref="modal_sort" :sort="sort" :dataView="dataView" @bindSort="bindSort" />
|
|
@@ -359,15 +347,15 @@
|
|
|
359
347
|
},
|
|
360
348
|
// 全局保存
|
|
361
349
|
globalSave() {
|
|
362
|
-
this.confirm('
|
|
363
|
-
this.confirm('
|
|
350
|
+
this.confirm('Front_Msg_Sure_To_Save_Global_Setting', () => {
|
|
351
|
+
this.confirm('Front_Msg_Sure_To_Save_Global_Setting_Confirm', async () => {
|
|
364
352
|
await this.saveDataView({
|
|
365
353
|
code: this.dataView.code,
|
|
366
354
|
columns: this.$refs.table.data
|
|
367
355
|
});
|
|
368
356
|
|
|
369
357
|
this.$emit('on-change', this.dataView.code);
|
|
370
|
-
this.success('
|
|
358
|
+
this.success('Front_Msg_Success', () => {
|
|
371
359
|
this.$refs.table.close();
|
|
372
360
|
});
|
|
373
361
|
});
|
|
@@ -375,38 +363,38 @@
|
|
|
375
363
|
},
|
|
376
364
|
// 重置
|
|
377
365
|
reset() {
|
|
378
|
-
this.confirm('
|
|
366
|
+
this.confirm('Front_Msg_Sure_To_Reset_Setting', async () => {
|
|
379
367
|
await this.resetDataView(this.dataView.code);
|
|
380
368
|
|
|
381
369
|
this.$emit('on-change', this.dataView.code);
|
|
382
|
-
this.success('
|
|
370
|
+
this.success('Front_Msg_Success', () => {
|
|
383
371
|
this.$refs.table.close();
|
|
384
372
|
});
|
|
385
373
|
});
|
|
386
374
|
},
|
|
387
375
|
// 用户保存
|
|
388
376
|
userSave() {
|
|
389
|
-
this.confirm('
|
|
377
|
+
this.confirm('Front_Msg_Sure_To_Save_Setting', async () => {
|
|
390
378
|
await this.saveUserView({
|
|
391
379
|
code: this.dataView.code,
|
|
392
380
|
columns: this.$refs.table.data
|
|
393
381
|
});
|
|
394
382
|
|
|
395
383
|
this.$emit('on-change', this.dataView.code);
|
|
396
|
-
this.success('
|
|
384
|
+
this.success('Front_Msg_Success', () => {
|
|
397
385
|
this.$refs.table.close();
|
|
398
386
|
});
|
|
399
387
|
});
|
|
400
388
|
},
|
|
401
389
|
// 保存
|
|
402
390
|
save() {
|
|
403
|
-
this.confirm('
|
|
391
|
+
this.confirm('Front_Msg_Sure_To_Save_Setting', async () => {
|
|
404
392
|
await this.saveDataView({
|
|
405
393
|
code: this.dataView.code,
|
|
406
394
|
columns: this.$refs.table.data
|
|
407
395
|
});
|
|
408
396
|
|
|
409
|
-
this.success('
|
|
397
|
+
this.success('Front_Msg_Success', () => {
|
|
410
398
|
this.$refs.table.close();
|
|
411
399
|
});
|
|
412
400
|
});
|
|
@@ -430,7 +418,7 @@
|
|
|
430
418
|
let isOK = await this.$refs.setting.validate();
|
|
431
419
|
|
|
432
420
|
if (!isOK) {
|
|
433
|
-
this.error('
|
|
421
|
+
this.error('Front_Msg_Form_Validate_Fail');
|
|
434
422
|
} else {
|
|
435
423
|
if (!this.$refs.commandButton.validate()) {
|
|
436
424
|
return;
|
|
@@ -439,12 +427,12 @@
|
|
|
439
427
|
// 操作栏按钮
|
|
440
428
|
this.$refs.setting.data.commandButton = JSON.stringify(this.$refs.commandButton.getData());
|
|
441
429
|
|
|
442
|
-
this.confirm('
|
|
430
|
+
this.confirm('Front_Msg_Sure_To_Save_Setting', async () => {
|
|
443
431
|
let res = await this.saveDataViewSetting(this.$refs.setting.data);
|
|
444
432
|
this.dataView = res.dataView;
|
|
445
433
|
|
|
446
434
|
this.$emit('on-change', this.dataView.code);
|
|
447
|
-
this.success('
|
|
435
|
+
this.success('Front_Msg_Success', () => {
|
|
448
436
|
this.$refs.setting.close();
|
|
449
437
|
});
|
|
450
438
|
});
|
|
@@ -482,7 +470,7 @@
|
|
|
482
470
|
// 打开筛选字段选择
|
|
483
471
|
keywordColumnOpen() {
|
|
484
472
|
if (!(this.dataView.model || '').trim()) {
|
|
485
|
-
this.error('
|
|
473
|
+
this.error('Front_Msg_Please_Select_Model_First');
|
|
486
474
|
return;
|
|
487
475
|
}
|
|
488
476
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:style="{ height: setting.chartHeight ? setting.chartHeight + 'px' : '400px', width: setting.chartWidth ? setting.chartWidth + 'px' : '95%' }"
|
|
7
7
|
></div>
|
|
8
8
|
<div>
|
|
9
|
-
<Button class="ivu-fr" type="error" title="
|
|
9
|
+
<Button class="ivu-fr" type="error" :title="$t('Front_Btn_Setting')" custom-icon="fa fa-cog" v-if="allow('permission/tableView')" @click="openSetting()"></Button>
|
|
10
10
|
</div>
|
|
11
11
|
<modal-form ref="setting" view-code="ChartSetting">
|
|
12
12
|
<template #column="{ code }">
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
</template>
|
|
30
30
|
<template #footer>
|
|
31
|
-
<Button type="primary" custom-icon="fa fa-save" @click="saveSetting"
|
|
31
|
+
<Button type="primary" custom-icon="fa fa-save" @click="saveSetting">{{ $t('Front_Btn_Save') }}</Button>
|
|
32
32
|
</template>
|
|
33
33
|
</modal-form>
|
|
34
34
|
<column-check ref="columnCheck" />
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
let view = await this.loadDataView(viewCode);
|
|
93
93
|
|
|
94
94
|
if (view == null) {
|
|
95
|
-
this.error('
|
|
95
|
+
this.error('Front_Msg_View_Code_Not_Exist|' + viewCode);
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -422,12 +422,12 @@
|
|
|
422
422
|
let isOK = await this.$refs.setting.validate();
|
|
423
423
|
|
|
424
424
|
if (!isOK) {
|
|
425
|
-
this.error('
|
|
425
|
+
this.error('Front_Msg_Form_Validate_Fail');
|
|
426
426
|
} else {
|
|
427
|
-
this.confirm('
|
|
427
|
+
this.confirm('Front_Msg_Sure_To_Save_Setting', async () => {
|
|
428
428
|
this.tableView.chartSetting = JSON.stringify(this.$refs.setting.data);
|
|
429
429
|
await this.saveDataViewSetting(this.tableView);
|
|
430
|
-
this.success('
|
|
430
|
+
this.success('Front_Msg_Success', () => {
|
|
431
431
|
this.$refs.setting.close();
|
|
432
432
|
window.location.reload();
|
|
433
433
|
});
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
:label="column.name"
|
|
43
43
|
:prop="column.code"
|
|
44
44
|
:key="column.code"
|
|
45
|
-
:error="column.code == null ? '
|
|
45
|
+
:error="column.code == null ? $t('Front_Label_Column_Not_Bind') : null"
|
|
46
46
|
v-if="column.controlType !== 'Placeholder' && column.controlType !== 'Title' && column.controlType !== 'Table' && column.controlType !== 'List'"
|
|
47
47
|
>
|
|
48
48
|
<template v-if="column.controlType === 'Custom'"></template>
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
@on-change="onDataChange(column)"
|
|
148
148
|
>
|
|
149
149
|
<Option v-for="item in getDataSource(data, column)" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
150
|
-
<Option key="__Other" value="__Other"
|
|
150
|
+
<Option key="__Other" value="__Other">{{ $t('Front_Label_Others') }}</Option>
|
|
151
151
|
</Select>
|
|
152
152
|
<Input
|
|
153
153
|
type="text"
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
</draggable>
|
|
353
353
|
</Form>
|
|
354
354
|
<!-- <FooterToolbar>
|
|
355
|
-
<Button type="primary" size="large"
|
|
355
|
+
<Button type="primary" size="large">{{ $t('Front_Btn_Submit') }}</Button>
|
|
356
356
|
</FooterToolbar>-->
|
|
357
357
|
</div>
|
|
358
358
|
</template>
|
|
@@ -735,8 +735,11 @@
|
|
|
735
735
|
// 当前时间转字符串
|
|
736
736
|
let format = item.defaultValue.substr(7, item.defaultValue.length - 9);
|
|
737
737
|
this.setData(data, item.code, dateFormat(new Date(), format));
|
|
738
|
+
} else if (item.defaultValue == '{currentUserID}') {
|
|
739
|
+
// 当前用户编号
|
|
740
|
+
this.setData(data, item.code, this.info.id);
|
|
738
741
|
} else if (item.defaultValue == '{currentUser}') {
|
|
739
|
-
//
|
|
742
|
+
// 当前用户姓名
|
|
740
743
|
this.setData(data, item.code, this.info.name);
|
|
741
744
|
} else {
|
|
742
745
|
if (item.dataType === 'Integer') {
|