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.
Files changed (88) hide show
  1. package/dist/mooho-base-admin-plus.min.esm.js +15796 -15624
  2. package/dist/mooho-base-admin-plus.min.js +40 -41
  3. package/dist/setting.js +4 -2
  4. package/dist/style.css +1 -1
  5. package/package.json +2 -2
  6. package/public/setting.js +4 -2
  7. package/src/api/customModel.js +1 -1
  8. package/src/api/dataSource.js +1 -1
  9. package/src/api/dataView.js +1 -1
  10. package/src/api/i18nText +33 -0
  11. package/src/api/model.js +1 -1
  12. package/src/components/home/notice-list.vue +2 -2
  13. package/src/components/home/shortcut.vue +9 -9
  14. package/src/components/input/dialog-select.vue +3 -3
  15. package/src/components/input/item-select.vue +5 -5
  16. package/src/components/upload/upload-attachment.vue +13 -3
  17. package/src/components/upload/upload-image.vue +2 -2
  18. package/src/components/view/column-check.vue +3 -3
  19. package/src/components/view/column-edit.vue +18 -18
  20. package/src/components/view/column-select.vue +4 -4
  21. package/src/components/view/condition-edit.vue +10 -10
  22. package/src/components/view/filter-edit.vue +30 -13
  23. package/src/components/view/filter-setting.vue +8 -8
  24. package/src/components/view/form-setting-layout.vue +37 -39
  25. package/src/components/view/form-setting.vue +18 -18
  26. package/src/components/view/group-column.vue +5 -5
  27. package/src/components/view/group-method.vue +5 -5
  28. package/src/components/view/modal-form-filter.vue +28 -25
  29. package/src/components/view/modal-form-sort.vue +32 -27
  30. package/src/components/view/modal-form.vue +30 -8
  31. package/src/components/view/modal-table.vue +22 -2
  32. package/src/components/view/table-filter.vue +22 -12
  33. package/src/components/view/table-setting.vue +30 -42
  34. package/src/components/view/view-chart.vue +6 -6
  35. package/src/components/view/view-form-draggable.vue +7 -4
  36. package/src/components/view/view-form.vue +27 -14
  37. package/src/components/view/view-table.vue +87 -40
  38. package/src/components/workflow/flow-chart.vue +22 -23
  39. package/src/i18n/index.js +7 -7
  40. package/src/index.js +13 -8
  41. package/src/layouts/basic-layout/header-breadcrumb/index.vue +18 -3
  42. package/src/layouts/basic-layout/header-i18n/index.vue +5 -6
  43. package/src/layouts/basic-layout/header-notice/index.vue +2 -2
  44. package/src/layouts/basic-layout/header-search/index.vue +3 -3
  45. package/src/layouts/basic-layout/header-user/index.vue +18 -18
  46. package/src/layouts/basic-layout/menu-side/index.vue +9 -3
  47. package/src/layouts/basic-layout/menu-side/menu-title.vue +5 -4
  48. package/src/layouts/basic-layout/tabs/index.vue +4 -4
  49. package/src/libs/request/index.js +18 -4
  50. package/src/mixins/page.js +72 -18
  51. package/src/pages/account/login.vue +6 -6
  52. package/src/pages/common/task-form.vue +33 -33
  53. package/src/pages/common/todo.vue +1 -1
  54. package/src/pages/system/apiLog.vue +7 -7
  55. package/src/pages/system/applicationType.vue +6 -6
  56. package/src/pages/system/customTable.vue +7 -7
  57. package/src/pages/system/dict.vue +1 -1
  58. package/src/pages/system/dictType.vue +4 -4
  59. package/src/pages/system/entityView.vue +3 -3
  60. package/src/pages/system/error/404.vue +1 -1
  61. package/src/pages/system/extendColumn.vue +7 -7
  62. package/src/pages/system/formView.vue +10 -10
  63. package/src/pages/system/i18nText.vue +98 -0
  64. package/src/pages/system/log.vue +4 -4
  65. package/src/pages/system/openUser.vue +5 -5
  66. package/src/pages/system/organization.vue +1 -1
  67. package/src/pages/system/permission.vue +5 -5
  68. package/src/pages/system/planJob.vue +3 -3
  69. package/src/pages/system/process.vue +10 -10
  70. package/src/pages/system/role.vue +18 -18
  71. package/src/pages/system/rolePropertyEdit.vue +83 -100
  72. package/src/pages/system/systemData.vue +4 -4
  73. package/src/pages/system/tableView.vue +17 -17
  74. package/src/pages/system/taskQueue.vue +13 -6
  75. package/src/pages/system/user.vue +17 -17
  76. package/src/pages/template/processPage.vue +22 -22
  77. package/src/plugins/sweetalert2/index.js +1 -5
  78. package/src/router/dynamic.js +7 -6
  79. package/src/store/modules/admin/modules/i18n.js +72 -32
  80. package/src/store/modules/admin/modules/menu.js +1 -0
  81. package/src/styles/css/default.css +4 -0
  82. package/test/api/barcode.js +1 -1
  83. package/test/api/inbound.js +1 -1
  84. package/test/api/movePlan.js +1 -1
  85. package/test/api/outbound.js +1 -1
  86. package/test/main.js +4 -4
  87. package/test/router/routes.js +2 -2
  88. package/src/i18n/locale.js +0 -102
@@ -3,25 +3,25 @@
3
3
  <Modal v-model="opened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" width="800">
4
4
  <template #header>
5
5
  <div>
6
- <span class="title">参数设置</span>
7
- <span class="description">Property Setting</span>
6
+ <span class="title">{{ $t('Front_Label_Property_Setting') }}</span>
7
+ <span class="description">{{ $t('Front_Label_Property_Setting_Desc') }}</span>
8
8
  </div>
9
9
  </template>
10
10
  <div class="ivu-ml-8 ivu-mr-8">
11
11
  <Form ref="form" :model="data" label-position="top" label-colon=":" class="ivu-mt" :rules="rules" @submit.prevent>
12
12
  <Row :gutter="24" type="flex">
13
13
  <Col v-bind="grid8">
14
- <FormItem label="属性名称" prop="propertyName">
14
+ <FormItem :label="$t('Front_Label_Property_Name')" prop="propertyName">
15
15
  <Input type="text" v-model="data.propertyName"></Input>
16
16
  </FormItem>
17
17
  </Col>
18
18
  <Col v-bind="grid8">
19
- <FormItem label="属性代码" prop="propertyCode">
19
+ <FormItem :label="$t('Front_Label_Property_Code')" prop="propertyCode">
20
20
  <Input type="text" v-model="data.propertyCode"></Input>
21
21
  </FormItem>
22
22
  </Col>
23
23
  <Col v-bind="grid8">
24
- <FormItem label="数据类型" prop="dataType">
24
+ <FormItem :label="$t('Front_Label_Data_Type')" prop="dataType">
25
25
  <Select v-model="data.dataType" :transfer="true">
26
26
  <Option v-for="item in getEnumList('DataType')" :key="item.id" :value="item.id">{{ item.name }}</Option>
27
27
  </Select>
@@ -41,7 +41,7 @@
41
41
  </FormItem>
42
42
  </Col>
43
43
  <Col v-bind="grid8" v-if="needDataSource" v-show="data.controlType == 'Select' || data.controlType == 'MultiSelect' || data.controlType == 'ComboSelect'">
44
- <FormItem label="数据源" key="Source" prop="Source">
44
+ <FormItem :label="$t('Front_Label_Data_Source')" key="Source" prop="Source">
45
45
  <dialog-select
46
46
  ref="select"
47
47
  v-model="data.source"
@@ -53,7 +53,7 @@
53
53
  </FormItem>
54
54
  </Col>
55
55
  <Col v-bind="grid8" v-if="needDataSource" v-show="data.controlType == 'DialogSelect' || data.controlType == 'MultiDialogSelect'">
56
- <FormItem label="视图" key="DataViewSource" prop="DataViewSource">
56
+ <FormItem :label="$t('Front_Label_View')" key="DataViewSource" prop="DataViewSource">
57
57
  <dialog-select
58
58
  ref="dataViewSource"
59
59
  v-model="data.source"
@@ -66,7 +66,7 @@
66
66
  </FormItem>
67
67
  </Col>
68
68
  <Col v-bind="grid8">
69
- <FormItem label="数据字段" key="SourceDataCode" prop="SourceDataCode" v-if="data.source">
69
+ <FormItem :label="$t('Front_Label_Source_Data_Code')" key="SourceDataCode" prop="SourceDataCode" v-if="data.source">
70
70
  <Input type="text" :readonly="true" v-model="data.sourceDataCode" @on-focus="openColumnSelect(data, 'sourceDataCode')">
71
71
  <template #prepend>
72
72
  <Button custom-icon="fa fa-search" @click="openColumnSelect(data, 'sourceDataCode')"></Button>
@@ -75,7 +75,7 @@
75
75
  </FormItem>
76
76
  </Col>
77
77
  <Col v-bind="grid8" v-if="needDataSource">
78
- <FormItem label="显示字段" key="SourceDisplayCode" prop="SourceDisplayCode" v-if="data.source">
78
+ <FormItem :label="$t('Front_Label_Source_Display_Code')" key="SourceDisplayCode" prop="SourceDisplayCode" v-if="data.source">
79
79
  <Input type="text" :readonly="true" v-model="data.sourceDisplayCode" @on-focus="openColumnSelect(data, 'sourceDisplayCode')">
80
80
  <template #prepend>
81
81
  <Button custom-icon="fa fa-search" @click="openColumnSelect(data, 'sourceDisplayCode')"></Button>
@@ -84,12 +84,12 @@
84
84
  </FormItem>
85
85
  </Col>
86
86
  <Col v-bind="grid16" v-if="needDataSource">
87
- <FormItem label="参数" key="Param" prop="Param" v-if="data.source">
87
+ <FormItem :label="$t('Front_Label_Param')" key="Param" prop="Param" v-if="data.source">
88
88
  <Input type="text" @click="paramOpen" :readonly="true" v-model="data.param" maxlength="200" />
89
89
  </FormItem>
90
90
  </Col>
91
91
  <Col v-bind="grid8">
92
- <FormItem label="是否必填" key="isRequired" prop="isRequired">
92
+ <FormItem :label="$t('Front_Label_Is_Required')" key="isRequired" prop="isRequired">
93
93
  <Switch
94
94
  :model-value="!!data.isRequired"
95
95
  @update:model-value="
@@ -105,8 +105,8 @@
105
105
  </div>
106
106
  <template #footer>
107
107
  <div>
108
- <Button type="primary" custom-icon="fa fa-check" @click="save">确定</Button>
109
- <Button type="default" custom-icon="fa fa-times" @click="close">关闭</Button>
108
+ <Button type="primary" custom-icon="fa fa-check" @click="save">{{ $t('Front_Btn_OK') }}</Button>
109
+ <Button type="default" custom-icon="fa fa-times" @click="close">{{ $t('Front_Btn_Close') }}</Button>
110
110
  </div>
111
111
  </template>
112
112
  </Modal>
@@ -114,40 +114,40 @@
114
114
  <template #header>
115
115
  <div>
116
116
  <slot name="header">
117
- <span class="title">参数</span>
118
- <span class="description">Param</span>
117
+ <span class="title">{{ $t('Front_Label_Param') }}</span>
118
+ <span class="description">{{ $t('Front_Label_Param_Desc') }}</span>
119
119
  </slot>
120
120
  </div>
121
121
  </template>
122
122
  <div class="i-table-no-border">
123
123
  <Table :columns="parpamColumns" :data="params" stripe size="small" no-data-text="暂无数据...">
124
124
  <template #command="{ row, index }">
125
- <Button size="small" title="编辑" type="primary" ghost custom-icon="fa fa-edit" @click="paramEdit(row, index)"></Button>
126
- <Button size="small" title="上移" type="primary" ghost custom-icon="fa fa-chevron-up" @click="upParam(row, index)"></Button>
127
- <Button size="small" title="下移" type="primary" ghost custom-icon="fa fa-chevron-down" @click="downParam(row, index)"></Button>
128
- <Button size="small" title="移除" type="primary" ghost custom-icon="fa fa-times" @click="paramRemove(row, index)"></Button>
125
+ <Button size="small" :title="$t('Front_Btn_Edit')" type="primary" ghost custom-icon="fa fa-edit" @click="paramEdit(row, index)"></Button>
126
+ <Button size="small" :title="$t('Front_Btn_Up')" type="primary" ghost custom-icon="fa fa-chevron-up" @click="upParam(row, index)"></Button>
127
+ <Button size="small" :title="$t('Front_Btn_Down')" type="primary" ghost custom-icon="fa fa-chevron-down" @click="downParam(row, index)"></Button>
128
+ <Button size="small" :title="$t('Front_Btn_Remove')" type="primary" ghost custom-icon="fa fa-times" @click="paramRemove(row, index)"></Button>
129
129
  </template>
130
130
  </Table>
131
131
  </div>
132
132
  <template #footer>
133
133
  <div>
134
- <Button type="primary" ghost custom-icon="fa fa-plus" @click="paramEdit()">新增</Button>
135
- <Button type="primary" custom-icon="fa fa-check" @click="paramSave">确定</Button>
134
+ <Button type="primary" ghost custom-icon="fa fa-plus" @click="paramEdit()">{{ $t('Front_Btn_Add') }}</Button>
135
+ <Button type="primary" custom-icon="fa fa-check" @click="paramSave">{{ $t('Front_Btn_OK') }}</Button>
136
136
  </div>
137
137
  </template>
138
138
  </Modal>
139
139
  <Modal v-model="paramItemOpened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" width="800">
140
140
  <template #header>
141
141
  <div>
142
- <span class="title">参数设置</span>
143
- <span class="description">Param Setting</span>
142
+ <span class="title">{{ $t('Front_Label_Param_Setting') }}</span>
143
+ <span class="description">{{ $t('Front_Label_Param_Setting_Desc') }}</span>
144
144
  </div>
145
145
  </template>
146
146
  <div class="ivu-ml-8 ivu-mr-8">
147
147
  <Form ref="paramItemForm" :rules="paramItemFormRules" :model="paramData" label-position="top" label-colon=":" class="ivu-mt" @submit.prevent>
148
148
  <Row :gutter="24" type="flex">
149
149
  <Col v-bind="grid8">
150
- <FormItem label="字段" key="code" prop="code">
150
+ <FormItem :label="$t('Front_Msg_Column')" key="code" prop="code">
151
151
  <Input type="text" v-model="paramData.code">
152
152
  <template #prepend>
153
153
  <Button custom-icon="fa fa-search" @click="openColumnSelect(paramData, 'code')"></Button>
@@ -156,7 +156,7 @@
156
156
  </FormItem>
157
157
  </Col>
158
158
  <Col v-bind="grid8">
159
- <FormItem label="" key="val" prop="val">
159
+ <FormItem :label="$t('Front_Msg_Value')" key="val" prop="val">
160
160
  <Input type="text" v-model="paramData.val" />
161
161
  </FormItem>
162
162
  </Col>
@@ -165,8 +165,8 @@
165
165
  </div>
166
166
  <template #footer>
167
167
  <div>
168
- <Button type="primary" custom-icon="fa fa-check" @click="paramItemSave">确定</Button>
169
- <Button type="default" custom-icon="fa fa-times" @click="paramItemClose">关闭</Button>
168
+ <Button type="primary" custom-icon="fa fa-check" @click="paramItemSave">{{ $t('Front_Btn_OK') }}</Button>
169
+ <Button type="default" custom-icon="fa fa-times" @click="paramItemClose">{{ $t('Front_Btn_Close') }}</Button>
170
170
  </div>
171
171
  </template>
172
172
  </Modal>
@@ -187,98 +187,98 @@
187
187
  data: {},
188
188
  callback: null,
189
189
  opened: false,
190
- rules: {
190
+ params: [],
191
+ paramData: {},
192
+ paramOpened: false,
193
+ paramItemOpened: false,
194
+ sourceBefore: null
195
+ };
196
+ },
197
+ async created() {},
198
+ props: {},
199
+ computed: {
200
+ // 选择框,或复选框组,且非枚举类型,需要输入数据源
201
+ needDataSource() {
202
+ if (this.data) {
203
+ return (
204
+ (this.data.controlType === 'Select' ||
205
+ this.data.controlType === 'MultiSelect' ||
206
+ this.data.controlType === 'DialogSelect' ||
207
+ this.data.controlType === 'MultiDialogSelect') &&
208
+ (this.data.dataType == null || this.data.dataType.indexOf('Enum:') !== 0)
209
+ );
210
+ } else {
211
+ return false;
212
+ }
213
+ },
214
+ rules() {
215
+ return {
191
216
  propertyName: {
192
217
  type: 'string',
193
218
  required: true,
194
- message: '请输入属性名称',
219
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Property_Name')),
195
220
  trigger: 'blur'
196
221
  },
197
222
  propertyCode: {
198
223
  type: 'string',
199
224
  required: true,
200
- message: '请输入属性代码',
225
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Property_Code')),
201
226
  trigger: 'blur'
202
227
  },
203
228
  dataType: {
204
229
  type: 'string',
205
230
  required: true,
206
- message: '请输入数据类型',
231
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Data_Type')),
207
232
  trigger: 'blur'
208
233
  },
209
234
  controlType: {
210
235
  type: 'string',
211
236
  required: true,
212
- message: '请输入控件类型',
237
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Control_Type')),
213
238
  trigger: 'blur'
214
239
  },
215
240
  source: {
216
241
  type: 'string',
217
242
  required: true,
218
- message: '请输入数据源',
243
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Data_Source')),
219
244
  trigger: 'blur'
220
245
  },
221
246
  sourceDataCode: {
222
247
  type: 'string',
223
248
  required: true,
224
- message: '请输入数据字段',
249
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Source_Data_Code')),
225
250
  trigger: 'blur'
226
251
  },
227
252
  sourceDisplayCode: {
228
253
  type: 'string',
229
254
  required: true,
230
- message: '请输入显示字段',
255
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Source_Display_Code')),
231
256
  trigger: 'blur'
232
257
  }
233
- },
234
- parpamColumns: [
235
- { title: '参数', resizable: true, align: 'center', key: 'code' },
236
- { title: '值', align: 'center', resizable: true, key: 'val' },
258
+ };
259
+ },
260
+ parpamColumns() {
261
+ return [
262
+ { title: this.$t('Front_Label_Param'), resizable: true, align: 'center', key: 'code' },
263
+ { title: this.$t('Front_Label_Value'), align: 'center', resizable: true, key: 'val' },
237
264
  { slot: 'command', title: ' ', align: 'center', resizable: true, fixed: 'right' }
238
- ],
239
- params: [],
240
- paramData: {},
241
- paramItemFormRules: {
265
+ ];
266
+ },
267
+ paramItemFormRules() {
268
+ return {
242
269
  code: {
243
270
  type: 'string',
244
271
  required: true,
245
- message: '请输入字段名称',
246
- trigger: 'blur,change'
247
- },
248
- keyType: {
249
- type: 'string',
250
- required: true,
251
- message: '请选择字段类型',
272
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Source_Display_Code')),
252
273
  trigger: 'blur,change'
253
274
  },
254
275
  val: {
255
276
  type: 'string',
256
277
  required: true,
257
- message: '请输入值',
278
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Value')),
258
279
  trigger: 'blur,change'
259
280
  }
260
- },
261
- paramOpened: false,
262
- paramItemOpened: false,
263
- sourceBefore: null
264
- };
265
- },
266
- async created() {},
267
- props: {},
268
- computed: {
269
- // 选择框,或复选框组,且非枚举类型,需要输入数据源
270
- needDataSource() {
271
- if (this.data) {
272
- return (
273
- (this.data.controlType === 'Select' ||
274
- this.data.controlType === 'MultiSelect' ||
275
- this.data.controlType === 'DialogSelect' ||
276
- this.data.controlType === 'MultiDialogSelect') &&
277
- (this.data.dataType == null || this.data.dataType.indexOf('Enum:') !== 0)
278
- );
279
- } else {
280
- return false;
281
- }
281
+ };
282
282
  }
283
283
  },
284
284
  methods: {
@@ -292,6 +292,7 @@
292
292
 
293
293
  this.callback = callback;
294
294
  this.opened = true;
295
+
295
296
  this.$refs.form.resetFields();
296
297
  },
297
298
  // 关闭
@@ -303,16 +304,16 @@
303
304
  let isOK = await this.$refs.form.validate();
304
305
 
305
306
  if (!isOK) {
306
- this.error('有内容不符合要求,请正确填写!');
307
+ this.error('Front_Msg_Form_Validate_Fail');
307
308
  } else {
308
- this.confirm('确定要保存吗?', async () => {
309
+ this.confirm('Front_Msg_Sure_To_Save', async () => {
309
310
  if (!this.data.id) {
310
311
  await modelApi.add('RoleProperty', this.data);
311
312
  } else {
312
313
  await modelApi.update('RoleProperty', this.data);
313
314
  }
314
315
 
315
- this.success('保存成功!');
316
+ this.success('Front_Msg_Success');
316
317
  this.callback();
317
318
  this.opened = false;
318
319
  });
@@ -363,14 +364,9 @@
363
364
  if (this.data.param != null && this.data.param != '') {
364
365
  let obj = JSON.parse(this.data.param);
365
366
  for (let key in obj) {
366
- let type = '变量';
367
- if (obj[key].indexOf('[') == 0 && obj[key].indexOf(']') + 1 == obj[key].length) {
368
- type = '常量';
369
- }
370
367
  this.params.push({
371
368
  code: key,
372
- val: obj[key],
373
- type: type
369
+ val: obj[key]
374
370
  });
375
371
  }
376
372
  }
@@ -380,25 +376,20 @@
380
376
  let isOK = await this.$refs.paramItemForm.validate();
381
377
 
382
378
  if (!isOK) {
383
- this.error('有内容不符合要求,请正确填写!');
379
+ this.error('Front_Msg_Form_Validate_Fail');
384
380
  return;
385
381
  }
386
382
  let val = this.paramData.val;
387
-
388
- if (this.paramData.keyType == '常量') {
389
- let len = this.paramData.val.length;
390
- val = this.paramData.val.padStart(len + 1, '[').padEnd(len + 2, ']');
391
- }
383
+ let len = this.paramData.val.length;
384
+ val = this.paramData.val.padStart(len + 1, '[').padEnd(len + 2, ']');
392
385
 
393
386
  if (this.paramData.source) {
394
387
  this.paramData.source.code = this.paramData.code;
395
388
  this.paramData.source.val = val;
396
- this.paramData.source.type = this.paramData.keyType;
397
389
  } else {
398
390
  this.params.push({
399
391
  code: this.paramData.code,
400
- val: val,
401
- type: this.paramData.keyType
392
+ val: val
402
393
  });
403
394
  }
404
395
  this.paramItemOpened = false;
@@ -408,12 +399,6 @@
408
399
  this.paramItemOpened = false;
409
400
  this.$refs.paramItemForm.resetFields();
410
401
  },
411
- keyTypeChange() {
412
- setTimeout(() => {
413
- this.paramData.val = null;
414
- //this.$forceUpdate();
415
- });
416
- },
417
402
  // 打开字段选择界面
418
403
  openColumnSelect(data, code) {
419
404
  if (this.data.source == null) {
@@ -446,14 +431,12 @@
446
431
  this.paramData = {
447
432
  code: row.code,
448
433
  val: row.val.replace('[', '').replace(']', ''),
449
- keyType: row.type,
450
434
  source: row
451
435
  };
452
436
  } else {
453
437
  this.paramData = {
454
438
  code: '',
455
- val: '',
456
- keyType: '常量'
439
+ val: ''
457
440
  };
458
441
  }
459
442
  this.paramItemOpened = true;
@@ -6,10 +6,10 @@
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
7
  <view-form ref="form" view-code="SystemData"></view-form>
8
8
  <div style="text-align: center">
9
- <Button type="info" custom-icon="fa fa-cloud-download-alt" @click="exportFile()">导出</Button>
9
+ <Button type="info" custom-icon="fa fa-cloud-download-alt" @click="exportFile()">{{ $t('Front_Btn_Export') }}</Button>
10
10
  <file-upload url="api/System/importFile" accept=".syd" @on-success="importFileSuccess" style="display: inline-block; margin-left: 8px; margin-right: 8px">
11
11
  <template #>
12
- <Button type="primary" custom-icon="fa fa-cloud-upload-alt">导入</Button>
12
+ <Button type="primary" custom-icon="fa fa-cloud-upload-alt">{{ $t('Front_Btn_Import') }}</Button>
13
13
  </template>
14
14
  </file-upload>
15
15
  </div>
@@ -36,13 +36,13 @@
36
36
  if (types && types.length > 0) {
37
37
  systemApi.exportFile(JSON.parse(types));
38
38
  } else {
39
- this.error('请选择需要导出的内容!');
39
+ this.error('Front_Msg_Please_Select_Export_Item');
40
40
  }
41
41
  },
42
42
  // 导入成功
43
43
  importFileSuccess(res) {
44
44
  if (res.code == 0) {
45
- this.success('导入成功!');
45
+ this.success('Front_Msg_Success');
46
46
  } else {
47
47
  this.error(res.message);
48
48
  }
@@ -6,16 +6,16 @@
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
7
  <view-table ref="table" view-code="TableView" :filter="filter" :selectEnable="true" @create="create" @edit="edit">
8
8
  <template #filterCommand>
9
- <Button size="small" type="info" custom-icon="fa fa-cloud-download-alt" @click="exportFile()">导出</Button>
9
+ <Button size="small" type="info" custom-icon="fa fa-cloud-download-alt" @click="exportFile()">{{ $t('Front_Btn_Export') }}</Button>
10
10
  <file-upload url="api/DataView/importFile" accept=".view" @on-success="importFileSuccess" style="display: inline-block; margin-left: 4px; margin-right: 4px">
11
11
  <template #>
12
- <Button type="primary" custom-icon="fa fa-cloud-upload-alt" size="small">导入</Button>
12
+ <Button type="primary" custom-icon="fa fa-cloud-upload-alt" size="small">{{ $t('Front_Btn_Import') }}</Button>
13
13
  </template>
14
14
  </file-upload>
15
15
  </template>
16
16
  <template #command="{ row }">
17
- <Button size="small" title="字段设置" type="info" custom-icon="fa fa-bars" @click="tableSetting(row)"></Button>
18
- <Button size="small" title="筛选设置" type="info" custom-icon="fa fa-filter" @click="filterSetting(row)"></Button>
17
+ <Button size="small" :title="$t('Front_Btn_Column_Setting')" type="info" custom-icon="fa fa-bars" @click="tableSetting(row)"></Button>
18
+ <Button size="small" :title="$t('Front_Btn_Filter_Setting')" type="info" custom-icon="fa fa-filter" @click="filterSetting(row)"></Button>
19
19
  </template>
20
20
  </view-table>
21
21
  </Card>
@@ -110,7 +110,7 @@
110
110
  size="small"
111
111
  icon="ios-settings"
112
112
  >
113
- 条件
113
+ {{ $t('Front_Btn_Condition') }}
114
114
  </Button>
115
115
  </div>
116
116
  <div v-if="code == 'removeEnable'">
@@ -132,13 +132,13 @@
132
132
  size="small"
133
133
  icon="ios-settings"
134
134
  >
135
- 条件
135
+ {{ $t('Front_Btn_Condition') }}
136
136
  </Button>
137
137
  </div>
138
138
  </template>
139
139
  <template #footer>
140
- <Button type="primary" custom-icon="fa fa-save" @click="() => $refs.form.onSave()">保存</Button>
141
- <Button type="primary" v-if="canCopy" custom-icon="fa fa-copy" @click="copy">复制</Button>
140
+ <Button type="primary" custom-icon="fa fa-save" @click="() => $refs.form.onSave()">{{ $t('Front_Btn_Save') }}</Button>
141
+ <Button type="primary" v-if="canCopy" custom-icon="fa fa-copy" @click="copy">{{ $t('Front_Btn_Copy') }}</Button>
142
142
  </template>
143
143
  </modal-form>
144
144
  <modal-form-sort ref="modal_sort" :sort="data.sorting" :dataView="data" @bindSort="bindSort" />
@@ -252,7 +252,7 @@
252
252
  this.data = this.$refs.form.data;
253
253
  this.$refs.modal_sort.open();
254
254
  } else {
255
- this.error('请先选择模型!');
255
+ this.error('Front_Msg_Please_Select_Model_First');
256
256
  }
257
257
  },
258
258
  // 打开筛选编辑框
@@ -261,7 +261,7 @@
261
261
  this.data = this.$refs.form.data;
262
262
  this.$refs.modal_filter.open();
263
263
  } else {
264
- this.error('请先选择模型!');
264
+ this.error('Front_Msg_Please_Select_Model_First');
265
265
  }
266
266
  },
267
267
  // 导出文件
@@ -272,13 +272,13 @@
272
272
  if (ids.length > 0) {
273
273
  dataViewApi.exportFile(ids);
274
274
  } else {
275
- this.error('请选择需要导出的内容!');
275
+ this.error('Front_Msg_Please_Select_Export_Item');
276
276
  }
277
277
  },
278
278
  // 导入成功
279
279
  importFileSuccess(res) {
280
280
  if (res.code == 0) {
281
- this.success('导入成功!', () => {
281
+ this.success('Front_Msg_Success', () => {
282
282
  this.$refs.table.loadData();
283
283
  });
284
284
  } else {
@@ -288,13 +288,13 @@
288
288
  // 复制
289
289
  copy() {
290
290
  if (!this.$refs.form.data.id) {
291
- this.error('新建时不能复制');
291
+ this.error('Front_Msg_Can_Not_Copy_In_Create');
292
292
  return;
293
293
  }
294
294
 
295
295
  this.confirmInput(
296
- '确认要复制并创建新的视图吗?',
297
- '视图代码',
296
+ 'Front_Msg_Sure_To_Copy_Create_View',
297
+ this.$t('Front_Label_View_Code'),
298
298
  async () => {
299
299
  let dataView = await dataViewApi.copy(this.$refs.form.data.id, this.newCode);
300
300
  this.$refs.form.open(dataView);
@@ -302,7 +302,7 @@
302
302
  },
303
303
  newCode => {
304
304
  if (!(newCode || '').trim()) {
305
- this.warning('请输入需要创建的视图代码!');
305
+ this.warning('Front_Msg_Please_Input_View_Code');
306
306
  return false;
307
307
  } else {
308
308
  this.newCode = newCode;
@@ -335,7 +335,7 @@
335
335
  // 打开筛选字段选择
336
336
  keywordColumnOpen() {
337
337
  if (!(this.$refs.form.data.model || '').trim()) {
338
- this.error('请先选择模型!');
338
+ this.error('Front_Msg_Please_Select_Model_First');
339
339
  return;
340
340
  }
341
341
 
@@ -6,8 +6,15 @@
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
7
  <view-table ref="table" view-code="TaskQueue">
8
8
  <template #command="{ row }">
9
- <Button size="small" title="执行" type="primary" custom-icon="fa fa-bolt" @click="execute(row)"></Button>
10
- <Button size="small" v-if="row.status == 'Pending' || row.status == 'Retry'" title="取消" type="warning" custom-icon="fa fa-times" @click="cancel(row)"></Button>
9
+ <Button size="small" :title="$t('Front_Btn_Execute')" type="primary" custom-icon="fa fa-bolt" @click="execute(row)"></Button>
10
+ <Button
11
+ size="small"
12
+ v-if="row.status == 'Pending' || row.status == 'Retry'"
13
+ :title="$t('Front_Btn_Cancel')"
14
+ type="warning"
15
+ custom-icon="fa fa-times"
16
+ @click="cancel(row)"
17
+ ></Button>
11
18
  </template>
12
19
  </view-table>
13
20
  </Card>
@@ -29,17 +36,17 @@
29
36
  methods: {
30
37
  // 执行
31
38
  execute(row) {
32
- this.confirm('确定要立即执行该任务吗?', async () => {
39
+ this.confirm('Front_Msg_Sure_To_Start_Immediately', async () => {
33
40
  await taskQueueApi.execute(row.id);
34
- this.success('操作成功!');
41
+ this.success('Front_Msg_Success');
35
42
  this.$refs.table.loadData();
36
43
  });
37
44
  },
38
45
  // 取消
39
46
  cancel(row) {
40
- this.confirm('确定要取消该任务吗?', async () => {
47
+ this.confirm('Front_Msg_Sure_To_Cancel_Task', async () => {
41
48
  await taskQueueApi.cancel(row.id);
42
- this.success('取消成功');
49
+ this.success('Front_Msg_Success');
43
50
  this.$refs.table.loadData();
44
51
  });
45
52
  }