File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -57,3 +57,11 @@ export function delTable(tableId) {
57
57
} )
58
58
}
59
59
60
+ // 生成代码到项目
61
+ export function toProjectTable ( tableId ) {
62
+ return request ( {
63
+ url : '/api/v1/gen/toproject/' + tableId ,
64
+ method : 'get'
65
+ } )
66
+ }
67
+
Original file line number Diff line number Diff line change 108
108
icon =" el-icon-view"
109
109
@click =" handlePreview(scope.row)"
110
110
>预览</el-button >
111
+ <el-button
112
+
113
+ type =" text"
114
+ size =" small"
115
+ icon =" el-icon-view"
116
+ @click =" handleToProject(scope.row)"
117
+ >生成到项目</el-button >
111
118
<el-button
112
119
113
120
type =" text"
150
157
</template >
151
158
152
159
<script >
153
- import { listTable , previewTable , delTable } from ' @/api/tools/gen'
160
+ import { listTable , previewTable , delTable , toProjectTable } from ' @/api/tools/gen'
154
161
import importTable from ' ./importTable'
155
162
import { downLoadFile } from ' @/utils/zipdownload'
156
163
export default {
@@ -244,6 +251,11 @@ export default {
244
251
this .preview .open = true
245
252
})
246
253
},
254
+ handleToProject (row ) {
255
+ toProjectTable (row .tableId ).then (response => {
256
+ this .msgSuccess (response .msg )
257
+ })
258
+ },
247
259
// 多选框选中数据
248
260
handleSelectionChange (selection ) {
249
261
this .ids = selection .map (item => item .tableId )
You can’t perform that action at this time.
0 commit comments