diff --git a/template/admin/src/pages/setting/systemMenus/index.vue b/template/admin/src/pages/setting/systemMenus/index.vue index 7f3378967..ed508a330 100644 --- a/template/admin/src/pages/setting/systemMenus/index.vue +++ b/template/admin/src/pages/setting/systemMenus/index.vue @@ -101,6 +101,7 @@ @on-visible-change="modalchange" >
+ 基础接口,可多选,并且添加后不会再展示出现;删除权限后才会出现;公共接口,可多选,并且添加后会继续展示; 搜索
+ diff --git a/template/admin/src/pages/system/codeGeneration/components/FoundationFor.vue b/template/admin/src/pages/system/codeGeneration/components/FoundationFor.vue index e54a94860..432bed7f5 100644 --- a/template/admin/src/pages/system/codeGeneration/components/FoundationFor.vue +++ b/template/admin/src/pages/system/codeGeneration/components/FoundationFor.vue @@ -117,7 +117,8 @@ @@ -196,6 +197,12 @@ export default { width: 70, align: 'center', }, + { + title: '操作', + slot: 'action', + width: 70, + align: 'center', + }, ], fromTypeList: [ { @@ -330,6 +337,9 @@ export default { this.columnTypeList = res.data.types; }); }, + del(index) { + this.tableField.splice(index, 1); + }, }, }; diff --git a/template/admin/src/pages/system/codeGeneration/list.vue b/template/admin/src/pages/system/codeGeneration/list.vue index e0cd52eaf..d1695b558 100644 --- a/template/admin/src/pages/system/codeGeneration/list.vue +++ b/template/admin/src/pages/system/codeGeneration/list.vue @@ -1,8 +1,8 @@ @@ -91,6 +106,8 @@ import { mapState } from 'vuex'; import { crudList, crudDet } from '@/api/systemCodeGeneration'; import * as monaco from 'monaco-editor'; +import { getCookies, removeCookies } from '@/libs/util'; +import Setting from '@/setting'; export default { data() { @@ -108,7 +125,9 @@ export default { title: '', }, loading: false, + buildModals: false, tabList: [], + codeBuildList: [], total: 0, columns1: [ { @@ -163,7 +182,34 @@ export default { mounted() { this.getList(); }, + beforeDestroy() { + if (this.source) { + this.source.close(); //关闭EventSource + } + }, methods: { + buildCode() { + this.buildModals = true; + if (typeof EventSource !== 'undefined') { + //支持eventSource + var postURL = Setting.apiBaseURL + '/system/crud/npm?token=' + getCookies('token'); + this.source = new EventSource(postURL); + let self = this; //因EventSource中this的指向变了,所以要提前存储一下 + this.source.onopen = function (res) { + console.log('项目链接Eventsource成功', res); + }; + this.source.onmessage = function (data) { + //代码块 + console.log(data); + }; + this.source.onerror = function (err) { + console.log('项目Eventsource链接失败', err); + //链接失败后EventSource会每隔三秒左右重新发起链接 + }; + } else { + console.log('暂不支持EventSource'); + } + }, // 跳转到组合数据列表页面 goList(row) { this.$router.push({