Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

This commit is contained in:
liaofei 2023-04-17 10:14:51 +08:00
commit a71d605445
3 changed files with 22 additions and 22 deletions

View File

@ -58,3 +58,13 @@ export function crudDet(id) {
method: 'get',
});
}
/**
* @description 代码生成 - 下载
*/
export function crudDownload(id) {
return request({
url: `/system/crud/download/${id}`,
method: 'get',
});
}

View File

@ -2,7 +2,7 @@
<div>
<Card :bordered="false" dis-hover class="ivu-mt">
<Button type="primary" @click="groupAdd()" class="mr20">代码生成</Button>
<Button type="success" @click="buildCode()" class="mr20">重新发布</Button>
<!-- <Button type="success" @click="buildCode()" class="mr20">重新发布</Button> -->
<Table
:columns="columns1"
:data="tabList"
@ -29,6 +29,8 @@
<template slot-scope="{ row, index }" slot="action">
<a @click="edit(row, '编辑')">查看</a>
<Divider type="vertical" />
<a @click="downLoad(row)">下载</a>
<Divider type="vertical" />
<a @click="del(row, '删除', index)">删除</a>
</template>
</Table>
@ -104,7 +106,7 @@
<script>
import { mapState } from 'vuex';
import { crudList, crudDet } from '@/api/systemCodeGeneration';
import { crudList, crudDet, crudDownload } from '@/api/systemCodeGeneration';
import * as monaco from 'monaco-editor';
import { getCookies, removeCookies } from '@/libs/util';
import Setting from '@/setting';
@ -203,6 +205,11 @@ export default {
}
},
methods: {
downLoad(row) {
crudDownload(row.id).then((res) => {
window.open(res.data.download_url, '_blank');
});
},
buildCode() {
this.buildModals = true;
if (typeof EventSource !== 'undefined') {

View File

@ -30,23 +30,7 @@
</Table>
</Card>
<!-- 详情模态框-->
<Drawer
:closable="false"
width="740"
v-model="modals"
closable
:title="'[ ' + rows.name + ' ]' + rows.comment"
>
<!-- <Modal-->
<!-- v-model="modals"-->
<!-- class="tableBox"-->
<!-- scrollable-->
<!-- footer-hide-->
<!-- closable-->
<!-- :title="'[ ' + rows.name + ' ]' + rows.comment"-->
<!-- :mask-closable="false"-->
<!-- width="750"-->
<!-- >-->
<Drawer :closable="false" width="740" v-model="modals" :title="'[ ' + rows.name + ' ]' + rows.comment">
<Table
ref="selection"
:columns="columns2"
@ -270,13 +254,12 @@ export default {
this.markModal = true;
},
ok() {
console.log('1');
this.changeMarkData.mark = this.mark;
console.log(this.changeMarkData);
updateMark(this.changeMarkData).then((res) => {
this.$Message.success(res.msg);
console.log(this.rows);
if (this.changeMarkData.is_field) {
this.Info({ name: this.changeMarkData.table });
this.Info({ name: this.changeMarkData.table, comment: this.rows.comment });
} else {
this.getList();
}