ap-dev 1.2.25 → 1.2.26

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 (91) hide show
  1. package/abap/ApiPanel/components/ApiContent.vue +1 -1
  2. package/abap/ApiPanel/components/ApiTable.vue +1 -1
  3. package/abap/ApiPanel/components/ApiTittle1.vue +1 -1
  4. package/abap/ApiPanel/components/ApiTittle2.vue +1 -1
  5. package/abap/ApiPanel/components/index.js +1 -1
  6. package/abap/CodePanel/abapKeywords.js +6 -6
  7. package/abap/CodePanel/componentMenus.js +28 -28
  8. package/abap/ConfigPanel/AbapCustomTable.vue +122 -122
  9. package/abap/ConfigPanel/AbapDocHistory.vue +145 -145
  10. package/abap/ConfigPanel/AbapSql.vue +81 -81
  11. package/abap/ConfigPanel/AbapTable.vue +379 -379
  12. package/abap/ConfigPanel/AbapTableCondition.vue +213 -213
  13. package/abap/ConfigPanel/AbapTableLink.vue +391 -391
  14. package/abap/SqlPanel/index.vue +1088 -1088
  15. package/abap/abap/abapStore.js +27 -27
  16. package/abap/abap/index.vue +87 -87
  17. package/abap/components/SapTable.vue +129 -129
  18. package/abap/components/SapTableField.vue +161 -161
  19. package/dev/ApiPanel/components/ApiCode.vue +1 -1
  20. package/dev/ApiPanel/components/ApiContent.vue +1 -1
  21. package/dev/ApiPanel/components/ApiTable.vue +1 -1
  22. package/dev/ApiPanel/components/ApiTittle1.vue +1 -1
  23. package/dev/ApiPanel/components/ApiTittle2.vue +1 -1
  24. package/dev/ApiPanel/components/index.js +1 -1
  25. package/dev/ApiPanel/modules/ApiBaseLayout.vue +1 -1
  26. package/dev/ComponentsPanel/items/ApDevItemBase.vue +1 -1
  27. package/dev/ComponentsPanel/items/ApDevItemButton.vue +1 -1
  28. package/dev/ComponentsPanel/items/ApDevItemChartBar.vue +1 -1
  29. package/dev/ComponentsPanel/items/ApDevItemChartGauge.vue +1 -1
  30. package/dev/ComponentsPanel/items/ApDevItemChartLine.vue +1 -1
  31. package/dev/ComponentsPanel/items/ApDevItemChartPie.vue +1 -1
  32. package/dev/ComponentsPanel/items/ApDevItemChartRadar.vue +1 -1
  33. package/dev/ComponentsPanel/items/ApDevItemCheckbox.vue +1 -1
  34. package/dev/ComponentsPanel/items/ApDevItemDateTime.vue +1 -1
  35. package/dev/ComponentsPanel/items/ApDevItemForm.vue +1 -1
  36. package/dev/ComponentsPanel/items/ApDevItemInput.vue +1 -1
  37. package/dev/ComponentsPanel/items/ApDevItemInputNumber.vue +1 -1
  38. package/dev/ComponentsPanel/items/ApDevItemLoading.vue +1 -1
  39. package/dev/ComponentsPanel/items/ApDevItemRadio.vue +1 -1
  40. package/dev/ComponentsPanel/items/ApDevItemSelect.vue +1 -1
  41. package/dev/ComponentsPanel/items/ApDevItemSwitch.vue +1 -1
  42. package/dev/ComponentsPanel/items/ApDevItemTooltip.vue +1 -1
  43. package/dev/ComponentsPanel/items/ApDevItemTree.vue +1 -1
  44. package/dev/ComponentsPanel/items/ApDevItemUpload.vue +1 -1
  45. package/dev/ComponentsPanel/items/test.vue +1 -1
  46. package/dev/ConfigPanel/DevCpt.vue +1036 -1036
  47. package/dev/ConfigPanel/DevCptBase.vue +210 -210
  48. package/dev/ConfigPanel/DevDbSource.vue +108 -108
  49. package/dev/ConfigPanel/DevDbUserSource.vue +117 -117
  50. package/dev/ConfigPanel/DevDocHistory.vue +145 -145
  51. package/dev/ConfigPanel/DevMyConfig.vue +205 -205
  52. package/dev/CustomPanel/CustomComponents.vue +10 -10
  53. package/dev/CustomPanel/CustomDataTree.vue +1 -1
  54. package/dev/CustomPanel/CustomTools.vue +1 -1
  55. package/dev/CustomPanel/index.vue +1 -1
  56. package/dev/CustomPanel/items/ApDevCheckbox.vue +7 -7
  57. package/dev/CustomPanel/items/ApDevCheckboxProp.vue +1 -1
  58. package/dev/CustomPanel/items/ApDevContainerRow.vue +155 -155
  59. package/dev/CustomPanel/items/ApDevContainerRowProp.vue +39 -39
  60. package/dev/CustomPanel/items/ApDevDateTime.vue +5 -5
  61. package/dev/CustomPanel/items/ApDevDateTimeProp.vue +1 -1
  62. package/dev/CustomPanel/items/ApDevDefaultProp.vue +20 -20
  63. package/dev/CustomPanel/items/ApDevInput.vue +49 -49
  64. package/dev/CustomPanel/items/ApDevInputNumber.vue +57 -57
  65. package/dev/CustomPanel/items/ApDevInputNumberProp.vue +96 -96
  66. package/dev/CustomPanel/items/ApDevInputProp.vue +85 -85
  67. package/dev/CustomPanel/items/ApDevRadio.vue +7 -7
  68. package/dev/CustomPanel/items/ApDevRadioProp.vue +1 -1
  69. package/dev/CustomPanel/items/ApDevSelect.vue +314 -314
  70. package/dev/CustomPanel/items/ApDevSelectProp.vue +83 -83
  71. package/dev/CustomPanel/items/ApDevTree.vue +5 -5
  72. package/dev/CustomPanel/items/ApDevTreeProp.vue +1 -1
  73. package/dev/CustomPanel/items/ApDevUpload.vue +6 -6
  74. package/dev/CustomPanel/items/ApDevUploadProp.vue +1 -1
  75. package/dev/CustomPanel/items/base/ApDevBase.vue +1 -1
  76. package/dev/CustomPanel/items/base/ApDevItemBase.vue +2 -2
  77. package/dev/CustomPanel/items/base/ApDevPropBase.vue +1 -1
  78. package/dev/CustomPanel/items/base/ApDevPropStyle.vue +93 -93
  79. package/dev/dev/DevUtil.js +31 -31
  80. package/dev/dev/devConfig.js +99 -99
  81. package/dev/dev/devStore.js +368 -368
  82. package/dev/dev/index.vue +85 -85
  83. package/ops/ApiPanel/components/ApiContent.vue +1 -1
  84. package/ops/ApiPanel/components/ApiTable.vue +1 -1
  85. package/ops/ApiPanel/components/ApiTittle1.vue +1 -1
  86. package/ops/ApiPanel/components/ApiTittle2.vue +1 -1
  87. package/ops/ApiPanel/components/index.js +1 -1
  88. package/ops/ConfigPanel/OpsDocHistory.vue +145 -145
  89. package/ops/ops/index.vue +60 -60
  90. package/ops/ops/opsStore.js +27 -27
  91. package/package.json +1 -1
@@ -1,210 +1,210 @@
1
- <template>
2
- <ap-container>
3
- <ap-header margin="1111">
4
- <el-form ref="tDevCptBaseSearchForm" :model="tDevCptBaseSearchForm" :rules="tDevCptBaseSearchFormRules"
5
- :inline="true" class="layout-header-form">
6
- <el-form-item label="搜索:" class="layout-header-form-item" prop="likeStr">
7
- <el-input v-model="tDevCptBaseSearchForm.likeStr" placeholder="名称"></el-input>
8
- </el-form-item>
9
- </el-form>
10
- <el-button type="primary" @click="searchEvent">查询</el-button>
11
- </ap-header>
12
- <ap-main margin="0111">
13
- <ap-table ref="tDevCptBaseRef" :options.sync="tDevCptBaseOpt"></ap-table>
14
- </ap-main>
15
-
16
- <el-dialog :title="dialogInfo.title" :visible.sync="dialogInfo.isVisible" @close="resetTDevCptBaseForm"
17
- width="700px">
18
- <el-form ref="tDevCptBaseFormRef" :model="tDevCptBaseForm" v-loading="dialogInfo.formIsLoading"
19
- label-width="80px" :inline="true">
20
-
21
- <el-form-item label='名称' prop='fdName'>
22
- <el-input v-model='tDevCptBaseForm.fdName'></el-input>
23
- </el-form-item>
24
- <br>
25
- <el-form-item label='左侧空间' prop='fdLeftSpace'>
26
- <el-input v-model='tDevCptBaseForm.fdLeftSpace'></el-input>
27
- </el-form-item>
28
- <el-form-item label='排序' prop='fdSort'>
29
- <el-input v-model='tDevCptBaseForm.fdSort'></el-input>
30
- </el-form-item>
31
- <el-form-item label='模板' prop='fdTemplate'>
32
- <el-input type="textarea" v-model='tDevCptBaseForm.fdTemplate' style="width: 500px" :rows="10"></el-input>
33
- </el-form-item>
34
- </el-form>
35
-
36
- <span slot="footer">
37
- <el-button @click="dialogInfo.isVisible = false">取 消</el-button>
38
- <el-button type="primary" @click="saveTDevCptBaseForm"
39
- :loading="dialogInfo.saveBtnIsLoading">确 定</el-button>
40
- </span>
41
- </el-dialog>
42
- </ap-container>
43
- </template>
44
-
45
- <script>
46
- export default {
47
- name: 'TDevCptBase',
48
- data() {
49
- let columns = [
50
- {
51
- prop: 'fdName',
52
- label: '名称',
53
- type: 'input',
54
- width: '120'
55
- }, {
56
- prop: 'fdLeftSpace',
57
- label: '向右偏移',
58
- type: 'input',
59
- help: '模板整体向右偏移空格数',
60
- width: '100'
61
- }, {
62
- prop: 'fdSort',
63
- label: '排序',
64
- type: 'input',
65
- width: '100'
66
- }, {
67
- prop: 'fdTemplate',
68
- label: '模板',
69
- type: 'input',
70
- html: (value, row) =>{
71
- console.log(value);
72
- value = value.replaceAll("<", "&lt;")
73
- let html = `<div class="api-code" style="line-height: 14px;">${value}</div>`;
74
- return html;
75
- },
76
- help: `1、参数格式:\${xxxx}<br> xxx只能是字母,默认空格连接<br>
77
- 2、数组参数格式:\${xxxx#abc}<br>使用#连接,abc为自定义连接符。使用\\n表示换行<br>
78
- 3、行以参数开头,则前缀空格会被自动清空。可使用组件模板控制前置空格。`
79
- }
80
- ];
81
- let toolbarBtn = [
82
- {type: "add", onClick: this.openAddDialog},
83
- {type: "edit", onClick: this.openEditDialog},
84
- "del", "refresh", "save"
85
- ];
86
- let tableOpt = {
87
- title: "组件基础模板",
88
- columns: columns,
89
- dataUrl: "/apd/TDevCptBase/getTDevCptBaseGridList",
90
- deletePk: "fdId", // 默认fdId
91
- deleteUrl: "/apd/TDevCptBase/deleteTDevCptBaseGridData",
92
- toolbarBtn: toolbarBtn,
93
- initData: true, // 默认false
94
- params: () => {
95
- return {
96
- likeStr: this.tDevCptBaseSearchForm.likeStr
97
- }
98
- }
99
- };
100
-
101
- let tDevCptBaseForm = {
102
- fdName: '',
103
- fdLeftSpace: '',
104
- fdTemplate: '',
105
- fdSort: '',
106
- };;
107
- return {
108
- tDevCptBaseOpt: tableOpt,
109
- tDevCptBaseForm: tDevCptBaseForm,
110
- tDevCptBaseFormRules: {
111
- },
112
- dialogInfo: {
113
- title: "",
114
- isAdd: false,
115
- isVisible: false,
116
- saveBtnIsLoading: false,
117
- formIsLoading: false
118
- },
119
- tDevCptBaseSearchForm: {
120
- likeStr: ""
121
- },
122
- tDevCptBaseSearchFormRules: {
123
- // TODO 自定义rules
124
- likeStr: [{min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur'}]
125
- }
126
- }
127
- },
128
- methods: {
129
- // 打开添加dialog
130
- openAddDialog() {
131
- this.dialogInfo.isAdd = true;
132
- this.dialogInfo.title = "添加数据";
133
- this.dialogInfo.isVisible = true;
134
- },
135
- // 打开编辑dialog
136
- openEditDialog() {
137
- let selectedRows = this.$refs.tDevCptBaseRef.getSelection();
138
- if (selectedRows.length < 1) {
139
- this.$message.error("请选择需要编辑的行!");
140
- return;
141
- }
142
- if (selectedRows.length > 1) {
143
- this.$message.error("只能选择单行数据进行编辑!");
144
- return;
145
- }
146
-
147
- this.dialogInfo.isAdd = false;
148
- this.dialogInfo.title = "编辑数据";
149
- this.dialogInfo.isVisible = true;
150
- this.dialogInfo.formIsLoading = true;
151
- // 获取单条数据
152
- this.$request({
153
- url: '/apd/TDevCptBase/getTDevCptBaseByFdId',
154
- method: 'post',
155
- data: {
156
- fdId: selectedRows[0].fdId
157
- }
158
- }).then(response => {
159
- this.tDevCptBaseForm = response.data;
160
- }).finally(() => {
161
- this.dialogInfo.formIsLoading = false;
162
- })
163
- },
164
- // 重置表单
165
- resetTDevCptBaseForm() {
166
- this.$refs.tDevCptBaseFormRef.resetFields();
167
- },
168
- // dialog表单保存
169
- saveTDevCptBaseForm() {
170
- // 表单rules认证
171
- this.$refs.tDevCptBaseFormRef.validate((valid) => {
172
- if (!valid) {
173
- this.$message.error('数据校验错误!');
174
- return false;
175
- }
176
- this.dialogInfo.saveBtnIsLoading = true;
177
-
178
- let fnName = this.dialogInfo.isAdd ? "insertTDevCptBase" : "updateTDevCptBase";
179
- // 添加数据
180
- this.$request({
181
- url: '/apd/TDevCptBase/' + fnName,
182
- method: 'post',
183
- data: this.tDevCptBaseForm
184
- }).then(response => {
185
- this.$message.success(`保存成功!`)
186
- this.dialogInfo.isVisible = false;
187
- // 刷新表格
188
- this.$refs.tDevCptBaseRef.refresh();
189
- }).finally(() => {
190
- this.dialogInfo.saveBtnIsLoading = false;
191
- })
192
- });
193
- },
194
- // 查询
195
- searchEvent() {
196
- // 表单rules认证
197
- this.$refs.tDevCptBaseSearchForm.validate((valid) => {
198
- if (!valid) {
199
- this.$message.error('搜索条件格式不正确!');
200
- return false;
201
- }
202
- this.$refs.tDevCptBaseRef.refresh();
203
- });
204
- }
205
- }
206
- }
207
- </script>
208
-
209
- <style scoped>
210
- </style>
1
+ <template>
2
+ <ap-container>
3
+ <ap-header margin="1111">
4
+ <el-form ref="tDevCptBaseSearchForm" :model="tDevCptBaseSearchForm" :rules="tDevCptBaseSearchFormRules"
5
+ :inline="true" class="layout-header-form">
6
+ <el-form-item label="搜索:" class="layout-header-form-item" prop="likeStr">
7
+ <el-input v-model="tDevCptBaseSearchForm.likeStr" placeholder="名称"></el-input>
8
+ </el-form-item>
9
+ </el-form>
10
+ <el-button type="primary" @click="searchEvent">查询</el-button>
11
+ </ap-header>
12
+ <ap-main margin="0111">
13
+ <ap-table ref="tDevCptBaseRef" :options.sync="tDevCptBaseOpt"></ap-table>
14
+ </ap-main>
15
+
16
+ <el-dialog :title="dialogInfo.title" :visible.sync="dialogInfo.isVisible" @close="resetTDevCptBaseForm"
17
+ width="700px">
18
+ <el-form ref="tDevCptBaseFormRef" :model="tDevCptBaseForm" v-loading="dialogInfo.formIsLoading"
19
+ label-width="80px" :inline="true">
20
+
21
+ <el-form-item label='名称' prop='fdName'>
22
+ <el-input v-model='tDevCptBaseForm.fdName'></el-input>
23
+ </el-form-item>
24
+ <br>
25
+ <el-form-item label='左侧空间' prop='fdLeftSpace'>
26
+ <el-input v-model='tDevCptBaseForm.fdLeftSpace'></el-input>
27
+ </el-form-item>
28
+ <el-form-item label='排序' prop='fdSort'>
29
+ <el-input v-model='tDevCptBaseForm.fdSort'></el-input>
30
+ </el-form-item>
31
+ <el-form-item label='模板' prop='fdTemplate'>
32
+ <el-input type="textarea" v-model='tDevCptBaseForm.fdTemplate' style="width: 500px" :rows="10"></el-input>
33
+ </el-form-item>
34
+ </el-form>
35
+
36
+ <span slot="footer">
37
+ <el-button @click="dialogInfo.isVisible = false">取 消</el-button>
38
+ <el-button type="primary" @click="saveTDevCptBaseForm"
39
+ :loading="dialogInfo.saveBtnIsLoading">确 定</el-button>
40
+ </span>
41
+ </el-dialog>
42
+ </ap-container>
43
+ </template>
44
+
45
+ <script>
46
+ export default {
47
+ name: 'TDevCptBase',
48
+ data() {
49
+ let columns = [
50
+ {
51
+ prop: 'fdName',
52
+ label: '名称',
53
+ type: 'input',
54
+ width: '120'
55
+ }, {
56
+ prop: 'fdLeftSpace',
57
+ label: '向右偏移',
58
+ type: 'input',
59
+ help: '模板整体向右偏移空格数',
60
+ width: '100'
61
+ }, {
62
+ prop: 'fdSort',
63
+ label: '排序',
64
+ type: 'input',
65
+ width: '100'
66
+ }, {
67
+ prop: 'fdTemplate',
68
+ label: '模板',
69
+ type: 'input',
70
+ html: (value, row) =>{
71
+ console.log(value);
72
+ value = value.replaceAll("<", "&lt;")
73
+ let html = `<div class="api-code" style="line-height: 14px;">${value}</div>`;
74
+ return html;
75
+ },
76
+ help: `1、参数格式:\${xxxx}<br> xxx只能是字母,默认空格连接<br>
77
+ 2、数组参数格式:\${xxxx#abc}<br>使用#连接,abc为自定义连接符。使用\\n表示换行<br>
78
+ 3、行以参数开头,则前缀空格会被自动清空。可使用组件模板控制前置空格。`
79
+ }
80
+ ];
81
+ let toolbarBtn = [
82
+ {type: "add", onClick: this.openAddDialog},
83
+ {type: "edit", onClick: this.openEditDialog},
84
+ "del", "refresh", "save"
85
+ ];
86
+ let tableOpt = {
87
+ title: "组件基础模板",
88
+ columns: columns,
89
+ dataUrl: "/apd/TDevCptBase/getTDevCptBaseGridList",
90
+ deletePk: "fdId", // 默认fdId
91
+ deleteUrl: "/apd/TDevCptBase/deleteTDevCptBaseGridData",
92
+ toolbarBtn: toolbarBtn,
93
+ initData: true, // 默认false
94
+ params: () => {
95
+ return {
96
+ likeStr: this.tDevCptBaseSearchForm.likeStr
97
+ }
98
+ }
99
+ };
100
+
101
+ let tDevCptBaseForm = {
102
+ fdName: '',
103
+ fdLeftSpace: '',
104
+ fdTemplate: '',
105
+ fdSort: '',
106
+ };;
107
+ return {
108
+ tDevCptBaseOpt: tableOpt,
109
+ tDevCptBaseForm: tDevCptBaseForm,
110
+ tDevCptBaseFormRules: {
111
+ },
112
+ dialogInfo: {
113
+ title: "",
114
+ isAdd: false,
115
+ isVisible: false,
116
+ saveBtnIsLoading: false,
117
+ formIsLoading: false
118
+ },
119
+ tDevCptBaseSearchForm: {
120
+ likeStr: ""
121
+ },
122
+ tDevCptBaseSearchFormRules: {
123
+ // TODO 自定义rules
124
+ likeStr: [{min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur'}]
125
+ }
126
+ }
127
+ },
128
+ methods: {
129
+ // 打开添加dialog
130
+ openAddDialog() {
131
+ this.dialogInfo.isAdd = true;
132
+ this.dialogInfo.title = "添加数据";
133
+ this.dialogInfo.isVisible = true;
134
+ },
135
+ // 打开编辑dialog
136
+ openEditDialog() {
137
+ let selectedRows = this.$refs.tDevCptBaseRef.getSelection();
138
+ if (selectedRows.length < 1) {
139
+ this.$message.error("请选择需要编辑的行!");
140
+ return;
141
+ }
142
+ if (selectedRows.length > 1) {
143
+ this.$message.error("只能选择单行数据进行编辑!");
144
+ return;
145
+ }
146
+
147
+ this.dialogInfo.isAdd = false;
148
+ this.dialogInfo.title = "编辑数据";
149
+ this.dialogInfo.isVisible = true;
150
+ this.dialogInfo.formIsLoading = true;
151
+ // 获取单条数据
152
+ this.$request({
153
+ url: '/apd/TDevCptBase/getTDevCptBaseByFdId',
154
+ method: 'post',
155
+ data: {
156
+ fdId: selectedRows[0].fdId
157
+ }
158
+ }).then(response => {
159
+ this.tDevCptBaseForm = response.data;
160
+ }).finally(() => {
161
+ this.dialogInfo.formIsLoading = false;
162
+ })
163
+ },
164
+ // 重置表单
165
+ resetTDevCptBaseForm() {
166
+ this.$refs.tDevCptBaseFormRef.resetFields();
167
+ },
168
+ // dialog表单保存
169
+ saveTDevCptBaseForm() {
170
+ // 表单rules认证
171
+ this.$refs.tDevCptBaseFormRef.validate((valid) => {
172
+ if (!valid) {
173
+ this.$message.error('数据校验错误!');
174
+ return false;
175
+ }
176
+ this.dialogInfo.saveBtnIsLoading = true;
177
+
178
+ let fnName = this.dialogInfo.isAdd ? "insertTDevCptBase" : "updateTDevCptBase";
179
+ // 添加数据
180
+ this.$request({
181
+ url: '/apd/TDevCptBase/' + fnName,
182
+ method: 'post',
183
+ data: this.tDevCptBaseForm
184
+ }).then(response => {
185
+ this.$message.success(`保存成功!`)
186
+ this.dialogInfo.isVisible = false;
187
+ // 刷新表格
188
+ this.$refs.tDevCptBaseRef.refresh();
189
+ }).finally(() => {
190
+ this.dialogInfo.saveBtnIsLoading = false;
191
+ })
192
+ });
193
+ },
194
+ // 查询
195
+ searchEvent() {
196
+ // 表单rules认证
197
+ this.$refs.tDevCptBaseSearchForm.validate((valid) => {
198
+ if (!valid) {
199
+ this.$message.error('搜索条件格式不正确!');
200
+ return false;
201
+ }
202
+ this.$refs.tDevCptBaseRef.refresh();
203
+ });
204
+ }
205
+ }
206
+ }
207
+ </script>
208
+
209
+ <style scoped>
210
+ </style>
@@ -1,108 +1,108 @@
1
- <template>
2
- <ap-container>
3
- <ap-main margin="1111">
4
- <div v-if="!showPage">
5
- <el-input v-model="secretKey" placeholder="请输入授权秘钥!" show-password style="width: 200px"></el-input>
6
- <el-button type="primary" @click="checkPageAuth">确定</el-button>
7
- </div>
8
- <ap-table v-if="showPage" ref="tDevDbSourceRef" :options.sync="tDevDbSourceOpt"></ap-table>
9
- </ap-main>
10
- </ap-container>
11
- </template>
12
-
13
- <script>
14
- export default {
15
- name: 'DevDbSource',
16
- data() {
17
- let columns = [
18
- {
19
- prop: 'fdName',
20
- label: '连接名',
21
- type: 'input',
22
- width: 150,
23
- }, {
24
- prop: 'fdDbName',
25
- label: '数据库名称',
26
- type: 'input',
27
- width: 100,
28
- }, {
29
- prop: 'fdUrl',
30
- label: '数据库地址',
31
- type: 'input',
32
- minWidth: 200,
33
- showOverflowTooltip: true
34
- }, {
35
- prop: 'fdUserName',
36
- label: '数据库用户名',
37
- type: 'input',
38
- width: 100,
39
- }, {
40
- prop: 'fdPassword',
41
- label: '数据库密码',
42
- type: 'input',
43
- width: 100,
44
- html: function (value, row) {
45
- return "******";
46
- }
47
- }, {
48
- prop: 'fdComment',
49
- label: '备注',
50
- type: 'input',
51
- minWidth: 150,
52
- }, {
53
- prop: "fdDisabled",
54
- label: "是否有效",
55
- type: "select",
56
- width: 100,
57
- selectOptions: [{label: "失效", value: 1}, {label: "有效", value: 0}],
58
- addDefaultValue: 0,
59
- align: "center",
60
- html: function (value, row) {
61
- if (value == 1) {
62
- return '<div class="ap-tag-danger">失效</div>'
63
- } else if (value == 0) {
64
- return '<div class="ap-tag-success">有效</el-tag>';
65
- }
66
- }
67
- },
68
- ];
69
- let tableOpt = {
70
- title: "数据源管理",
71
- columns: columns,
72
- editPk: "fdId", //默认fdId
73
- deletePk: "fdId", // 默认fdId
74
- dataUrl: "/apd/db/TDevDbSource/getTDevDbSourceGridList",
75
- saveUrl: "/apd/db/TDevDbSource/saveTDevDbSourceGridData",
76
- deleteUrl: "/apd/db/TDevDbSource/deleteTDevDbSourceGridData",
77
- toolbarBtn: ["add", "edit", "del", "cancel", "refresh", "save"],
78
- initData: true, // 默认false
79
- params: {}
80
- };
81
- return {
82
- tDevDbSourceOpt: tableOpt,
83
- secretKey: '',
84
- showPage: false
85
- }
86
- },
87
- methods: {
88
- checkPageAuth() {
89
- this.$request({
90
- url: '/apd/db/TDevDbAuth/checkPageAuth',
91
- method: 'post',
92
- data: {
93
- secretKey: this.secretKey
94
- }
95
- }).then(response => {
96
- if (response.data) {
97
- this.showPage = true;
98
- } else {
99
- this.$message.error("授权秘钥错误!")
100
- }
101
- })
102
- }
103
- }
104
- }
105
- </script>
106
-
107
- <style scoped>
108
- </style>
1
+ <template>
2
+ <ap-container>
3
+ <ap-main margin="1111">
4
+ <div v-if="!showPage">
5
+ <el-input v-model="secretKey" placeholder="请输入授权秘钥!" show-password style="width: 200px"></el-input>
6
+ <el-button type="primary" @click="checkPageAuth">确定</el-button>
7
+ </div>
8
+ <ap-table v-if="showPage" ref="tDevDbSourceRef" :options.sync="tDevDbSourceOpt"></ap-table>
9
+ </ap-main>
10
+ </ap-container>
11
+ </template>
12
+
13
+ <script>
14
+ export default {
15
+ name: 'DevDbSource',
16
+ data() {
17
+ let columns = [
18
+ {
19
+ prop: 'fdName',
20
+ label: '连接名',
21
+ type: 'input',
22
+ width: 150,
23
+ }, {
24
+ prop: 'fdDbName',
25
+ label: '数据库名称',
26
+ type: 'input',
27
+ width: 100,
28
+ }, {
29
+ prop: 'fdUrl',
30
+ label: '数据库地址',
31
+ type: 'input',
32
+ minWidth: 200,
33
+ showOverflowTooltip: true
34
+ }, {
35
+ prop: 'fdUserName',
36
+ label: '数据库用户名',
37
+ type: 'input',
38
+ width: 100,
39
+ }, {
40
+ prop: 'fdPassword',
41
+ label: '数据库密码',
42
+ type: 'input',
43
+ width: 100,
44
+ html: function (value, row) {
45
+ return "******";
46
+ }
47
+ }, {
48
+ prop: 'fdComment',
49
+ label: '备注',
50
+ type: 'input',
51
+ minWidth: 150,
52
+ }, {
53
+ prop: "fdDisabled",
54
+ label: "是否有效",
55
+ type: "select",
56
+ width: 100,
57
+ selectOptions: [{label: "失效", value: 1}, {label: "有效", value: 0}],
58
+ addDefaultValue: 0,
59
+ align: "center",
60
+ html: function (value, row) {
61
+ if (value == 1) {
62
+ return '<div class="ap-tag-danger">失效</div>'
63
+ } else if (value == 0) {
64
+ return '<div class="ap-tag-success">有效</el-tag>';
65
+ }
66
+ }
67
+ },
68
+ ];
69
+ let tableOpt = {
70
+ title: "数据源管理",
71
+ columns: columns,
72
+ editPk: "fdId", //默认fdId
73
+ deletePk: "fdId", // 默认fdId
74
+ dataUrl: "/apd/db/TDevDbSource/getTDevDbSourceGridList",
75
+ saveUrl: "/apd/db/TDevDbSource/saveTDevDbSourceGridData",
76
+ deleteUrl: "/apd/db/TDevDbSource/deleteTDevDbSourceGridData",
77
+ toolbarBtn: ["add", "edit", "del", "cancel", "refresh", "save"],
78
+ initData: true, // 默认false
79
+ params: {}
80
+ };
81
+ return {
82
+ tDevDbSourceOpt: tableOpt,
83
+ secretKey: '',
84
+ showPage: false
85
+ }
86
+ },
87
+ methods: {
88
+ checkPageAuth() {
89
+ this.$request({
90
+ url: '/apd/db/TDevDbAuth/checkPageAuth',
91
+ method: 'post',
92
+ data: {
93
+ secretKey: this.secretKey
94
+ }
95
+ }).then(response => {
96
+ if (response.data) {
97
+ this.showPage = true;
98
+ } else {
99
+ this.$message.error("授权秘钥错误!")
100
+ }
101
+ })
102
+ }
103
+ }
104
+ }
105
+ </script>
106
+
107
+ <style scoped>
108
+ </style>