应用中心 脚本管理、数据源管理修改与开发

This commit is contained in:
hyt 2024-06-21 10:13:58 +08:00
parent ae4f646c13
commit f227e0fc4b
3 changed files with 88 additions and 79 deletions

View File

@ -22,6 +22,7 @@ const whiteList = [
'/systemInit',
'/databaseLogin',
'/apiLogs'
]
router.beforeEach((to, from, next) => {

View File

@ -50,6 +50,11 @@ export const constantRoutes = [{
component: () => import('@/views/login'),
hidden: true
},
{
path: '/test',
component: () => import('@/views/test'),
hidden: true
},
{
path: '/register',
component: () => import('@/views/register/index'),

View File

@ -19,14 +19,14 @@
</div>
<div class="table">
<BaseTable
ref="mainTable"
:tableData="mainTableData"
:tabLoading="mainTabLoading"
:tableColumn="mainTableColumn"
:border="false"
tableHeight="68vh"
:highlightCurrent="true"
@radioChange="mainOnClick"
ref="mainTable"
:tableData="mainTableData"
:tabLoading="mainTabLoading"
:tableColumn="mainTableColumn"
:border="false"
tableHeight="68vh"
:highlightCurrent="true"
@radioChange="mainOnClick"
>
<template #dbType="{row}">
{{ row.dbType === '1' ? '主表' : '子表' }}
@ -44,9 +44,9 @@
</BaseTable>
<div class="mainAddRow">
<el-link
type="primary"
@click="addMainAddRow"
:underline="false"
type="primary"
@click="addMainAddRow"
:underline="false"
>+ 数据表添加
</el-link
>
@ -58,15 +58,15 @@
<div class="bigTitle">表字段</div>
<div class="table">
<BaseTable
ref="activedTable"
:tableData="activedTableData"
:tabLoading="activedTabLoading"
:tableColumn="activedTableColumn"
:border="false"
tableHeight="73vh"
:highlightCurrent="true"
@radioChange="activedOnClick"
@onFunc="activedOnFunc"
ref="activedTable"
:tableData="activedTableData"
:tabLoading="activedTabLoading"
:tableColumn="activedTableColumn"
:border="false"
tableHeight="73vh"
:highlightCurrent="true"
@radioChange="activedOnClick"
@onFunc="activedOnFunc"
>
<template #filedType="{row}">
{{ dataTypeDist[row.filedType] }}
@ -84,10 +84,10 @@
</BaseTable>
<div class="mainAddRow">
<el-link
v-if="mainTempClick.id"
type="primary"
@click="activedAddRow"
:underline="false"
v-if="mainTempClick.id"
type="primary"
@click="activedAddRow"
:underline="false"
>+ 表字段添加
</el-link
>
@ -96,14 +96,14 @@
</div>
<!-- 单据规则-->
<base-right-dialog
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="ruleAddDialogShow"
title="单据规则"
@handleClose="ruleAddDialogShow=false"
:submitShow="true"
:size="'50%'"
@handleConfirmClick="ruleAddSaveHanlde"
ref="baseRightDialog"
:footerShow="true"
:dialogVisible.sync="ruleAddDialogShow"
title="单据规则"
@handleClose="ruleAddDialogShow=false"
:submitShow="true"
:size="'50%'"
@handleConfirmClick="ruleAddSaveHanlde"
>
<div class="receiptsTable">
<ruleAddTable ref="ruleAddTable"></ruleAddTable>
@ -111,14 +111,14 @@
</base-right-dialog>
<!-- 数据表 -->
<base-right-dialog
ref="mainTableAddtDialog"
:footerShow="true"
:dialogVisible.sync="mainTableDialogShow"
title="数据表"
@handleClose="mainTableDialogShow=false"
:submitShow="true"
:size="'30%'"
@handleConfirmClick="mainTableSaveHandle"
ref="mainTableAddtDialog"
:footerShow="true"
:dialogVisible.sync="mainTableDialogShow"
title="数据表"
@handleClose="mainTableDialogShow=false"
:submitShow="true"
:size="'30%'"
@handleConfirmClick="mainTableSaveHandle"
>
<div class="mainTable">
<mainTable ref="mainTable"></mainTable>
@ -126,14 +126,14 @@
</base-right-dialog>
<!-- 表字段-->
<base-right-dialog
ref="sonTableAddtDialog"
:footerShow="true"
:dialogVisible.sync="sonTableDialogShow"
title="表字段"
@handleClose="sonTableDialogShow=false"
:submitShow="true"
:size="'30%'"
@handleConfirmClick="sonTableSaveHandle"
ref="sonTableAddtDialog"
:footerShow="true"
:dialogVisible.sync="sonTableDialogShow"
title="表字段"
@handleClose="sonTableDialogShow=false"
:submitShow="true"
:size="'30%'"
@handleConfirmClick="sonTableSaveHandle"
>
<div class="mainTable">
<sonTable ref="sonTable" :activedTableData="activedTableData" :mainTempClick="mainTempClick"
@ -229,7 +229,7 @@ export default {
id: item.dbName,
label: item.remark,
dbId: item.id,
mdmId:item.mdmId,
mdmId: item.mdmId
})
})
@ -250,17 +250,17 @@ export default {
// (
mainDeleOnFunc(row, item) {
this.$confirm('确定删除?')
.then(async(_) => {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
mdmId: this.$route.query.id,
...row
})
this.$vmNews('删除成功!', 'success')
this.getMainTableHandle()
})
.catch((_) => {
.then(async(_) => {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
mdmId: this.$route.query.id,
...row
})
this.$vmNews('删除成功!', 'success')
this.getMainTableHandle()
})
.catch((_) => {
})
},
//
addMainAddRow() {
@ -294,22 +294,22 @@ export default {
//
activedOnFunc(row) {
this.$confirm('确定删除?')
.then(async(_) => {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', {
id: row.id,
mdmId: this.$route.query.id,
dbId: this.mainTempClick.id,
dbName: this.mainTempClick.dbName,
enName: row.enName,
filedType: row.filedType
})
this.$vmNews('删除成功', 'success')
this.mainOnClick(this.mainTempClick)
this.activedTableData.splice(row.index, 1)
})
.catch((_) => {
.then(async(_) => {
this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', {
id: row.id,
mdmId: this.$route.query.id,
dbId: this.mainTempClick.id,
dbName: this.mainTempClick.dbName,
enName: row.enName,
filedType: row.filedType
})
this.$vmNews('删除成功', 'success')
this.mainOnClick(this.mainTempClick)
this.activedTableData.splice(row.index, 1)
})
.catch((_) => {
})
},
//
sonTableEditHandle(row) {
@ -415,12 +415,15 @@ export default {
return
}
// "dbType":"2",// 1 2
console.log(this.mainTableData.length && !form.id,'this.mainTableData.length && !form.id',form,this.mainTableData.length,)
if (this.mainTableData.length && form.id) {
this.$set(form, 'dbType', 2)
} else {
this.$set(form, 'dbType', 1)
console.log(this.mainTableData.length && !form.id, 'this.mainTableData.length && !form.id', form, this.mainTableData.length)
if (!form.id) {
if (this.mainTableData.length) {
this.$set(form, 'dbType', 2)
} else {
this.$set(form, 'dbType', 1)
}
}
//id
if (form.id) {
this.openLoading('submit')