完善代码生成项目功能和测试数据
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:project:add']"
|
||||
v-hasPermi="['generator:project:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -63,7 +63,7 @@
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:project:edit']"
|
||||
v-hasPermi="['generator:project:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -74,7 +74,7 @@
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:project:remove']"
|
||||
v-hasPermi="['generator:project:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -84,7 +84,7 @@
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:project:export']"
|
||||
v-hasPermi="['generator:project:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
@@ -117,7 +117,7 @@
|
||||
type="text"
|
||||
icon="el-icon-notebook-2"
|
||||
@click="handleTableConfig(scope.row)"
|
||||
v-hasPermi="['generator:table:list']"
|
||||
v-hasPermi="['system:projectTable:list']"
|
||||
>数据表配置</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -128,7 +128,7 @@
|
||||
type="text"
|
||||
icon="el-icon-files"
|
||||
@click="handleTemplateConfig(scope.row)"
|
||||
v-hasPermi="['generator:template:config']"
|
||||
v-hasPermi="['generator:template:list']"
|
||||
>代码模板配置</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -144,35 +144,35 @@
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handlePreview(scope.row)"
|
||||
v-hasPermi="['system:project:preview']"
|
||||
v-hasPermi="['generator:project:preview']"
|
||||
>预览后端项目</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handlePreviewAdmin(scope.row)"
|
||||
v-hasPermi="['system:project:preview']"
|
||||
v-hasPermi="['generator:project:preview']"
|
||||
>预览后台前端项目</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handlePreviewFront(scope.row)"
|
||||
v-hasPermi="['system:project:preview']"
|
||||
v-hasPermi="['generator:project:preview']"
|
||||
>预览前台前端项目</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:project:edit']"
|
||||
v-hasPermi="['generator:project:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:project:remove']"
|
||||
v-hasPermi="['generator:project:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -406,7 +406,7 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/project/export', {
|
||||
this.download('generator/project/export', {
|
||||
...this.queryParams
|
||||
}, `project_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleBack">返 回</el-button>
|
||||
<el-button type="primary" @click="handleDownload">下 载</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleDownload"
|
||||
v-hasPermi="['generator:project:download']"
|
||||
>下 载</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -117,14 +121,14 @@ export default {
|
||||
highlightedCode(code, key) {
|
||||
const vmName = key.substring(key.lastIndexOf('/') + 1, key.indexOf('.vm'))
|
||||
var language = vmName.substring(vmName.indexOf('.') + 1, vmName.length)
|
||||
|
||||
|
||||
// 处理config.js文件,使用javascript语法高亮
|
||||
if (key.includes('config.js')) {
|
||||
language = 'javascript'
|
||||
}
|
||||
if (key.includes('html')) {
|
||||
language = 'html'
|
||||
}
|
||||
}
|
||||
if (key.includes('vue')) {
|
||||
language = 'vue'
|
||||
}
|
||||
@@ -137,8 +141,7 @@ export default {
|
||||
if (key.includes('sql')) {
|
||||
language = 'sql'
|
||||
}
|
||||
|
||||
|
||||
|
||||
const result = hljs.highlight(language, code || '', true)
|
||||
return result.value || ' '
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user