feat: 前后端联调代码生成接口

This commit is contained in:
橙子
2024-02-16 17:16:54 +08:00
parent 12ec7a0392
commit 6675376241
20 changed files with 62 additions and 50 deletions

View File

@@ -224,7 +224,7 @@ import {
updateData,
delData,
getType
} from "@/api/webfirst/fieldApi";
} from "@/api/code/fieldApi";
import { computed, onMounted, defineProps, ref } from "vue";
const { proxy } = getCurrentInstance();
@@ -267,7 +267,8 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data);
const getFieldTypeEnum=(field)=>{
return fieldList.value.filter(x=>x.value==field)[0].lable;
return field;
// return fieldList.value.filter(x=>x.value==field)[0]?.lable??'未知';
}
watch(

View File

@@ -1,4 +1,4 @@
import {listData} from "@/api/webfirst/tableApi.js"
import {listData} from "@/api/code/tableApi.js"
const useTable=()=>{
const dataList=ref([]);

View File

@@ -61,7 +61,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['webfirst:table:add']"
v-hasPermi="['codeGun:table:add']"
>新增</el-button
>
</el-col>
@@ -72,7 +72,7 @@
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['webfirst:table:edit']"
v-hasPermi="['codeGun:table:edit']"
>修改</el-button
>
</el-col>
@@ -83,7 +83,7 @@
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['webfirst:table:remove']"
v-hasPermi="['codeGun:table:remove']"
>删除</el-button
>
</el-col>
@@ -93,7 +93,7 @@
plain
icon="Download"
@click="handleExport"
v-hasPermi="['webfirst:table:export']"
v-hasPermi="['codeGun:table:export']"
>导出</el-button
>
</el-col>
@@ -104,7 +104,7 @@
plain
icon="Switch"
@click="handleExport"
v-hasPermi="['webfirst:table:export']"
v-hasPermi="['codeGun:table:export']"
>同步数据库WebToDb</el-button
>
</el-col> -->
@@ -115,7 +115,7 @@
icon="Switch"
@click="handleWebToCode"
:disabled="ids.length==0"
v-hasPermi="['webfirst:table:export']"
v-hasPermi="['codeGun:table:export']"
>代码生成WebToCode</el-button
>
</el-col>
@@ -126,7 +126,7 @@
plain
icon="Switch"
@click="handleCodeToWeb"
v-hasPermi="['webfirst:table:export']"
v-hasPermi="['codeGun:table:export']"
>实体同步CodeToWeb</el-button
>
</el-col>
@@ -242,8 +242,8 @@ import {
delData,
addData,
updateData,
} from "@/api/webfirst/tableApi";
import { codeToWeb,webToCode } from "@/api/webfirst/webfirstApi";
} from "@/api/code/tableApi";
import { codeToWeb,webToCode } from "@/api/code/codeGunApi";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");

View File

@@ -46,7 +46,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['webfirst:template:add']"
v-hasPermi="['codeGun:template:add']"
>新增</el-button
>
</el-col>
@@ -57,7 +57,7 @@
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['webfirst:template:edit']"
v-hasPermi="['codeGun:template:edit']"
>修改</el-button
>
</el-col>
@@ -68,7 +68,7 @@
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['webfirst:template:remove']"
v-hasPermi="['codeGun:template:remove']"
>删除</el-button
>
</el-col>
@@ -78,7 +78,7 @@
plain
icon="Download"
@click="handleExport"
v-hasPermi="['webfirst:template:export']"
v-hasPermi="['codeGun:template:export']"
>导出</el-button
>
</el-col>
@@ -145,14 +145,14 @@
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['webfirst:template:edit']"
v-hasPermi="['codeGun:template:edit']"
>修改</el-button
>
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['webfirst:template:remove']"
v-hasPermi="['codeGun:template:remove']"
>删除</el-button
>
</template>
@@ -231,8 +231,8 @@ import {
delData,
addData,
updateData,
} from "@/api/webfirst/templateApi";
import {openPath} from "@/api/webfirst/webfirstApi";
} from "@/api/code/templateApi";
import {openPath} from "@/api/code/codeGunApi";
import { ref } from "@vue/reactivity";
import ReplaceText from './components/ReplaceText'
import TempalteTip from './components/TempalteTip.vue'