应用中心 脚本管理、数据源管理修改与开发
This commit is contained in:
parent
ae4f646c13
commit
f227e0fc4b
|
@ -22,6 +22,7 @@ const whiteList = [
|
||||||
'/systemInit',
|
'/systemInit',
|
||||||
'/databaseLogin',
|
'/databaseLogin',
|
||||||
'/apiLogs'
|
'/apiLogs'
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
|
|
@ -50,6 +50,11 @@ export const constantRoutes = [{
|
||||||
component: () => import('@/views/login'),
|
component: () => import('@/views/login'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/test',
|
||||||
|
component: () => import('@/views/test'),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/register',
|
path: '/register',
|
||||||
component: () => import('@/views/register/index'),
|
component: () => import('@/views/register/index'),
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<BaseTable
|
<BaseTable
|
||||||
ref="mainTable"
|
ref="mainTable"
|
||||||
:tableData="mainTableData"
|
:tableData="mainTableData"
|
||||||
:tabLoading="mainTabLoading"
|
:tabLoading="mainTabLoading"
|
||||||
:tableColumn="mainTableColumn"
|
:tableColumn="mainTableColumn"
|
||||||
:border="false"
|
:border="false"
|
||||||
tableHeight="68vh"
|
tableHeight="68vh"
|
||||||
:highlightCurrent="true"
|
:highlightCurrent="true"
|
||||||
@radioChange="mainOnClick"
|
@radioChange="mainOnClick"
|
||||||
>
|
>
|
||||||
<template #dbType="{row}">
|
<template #dbType="{row}">
|
||||||
{{ row.dbType === '1' ? '主表' : '子表' }}
|
{{ row.dbType === '1' ? '主表' : '子表' }}
|
||||||
|
@ -44,9 +44,9 @@
|
||||||
</BaseTable>
|
</BaseTable>
|
||||||
<div class="mainAddRow">
|
<div class="mainAddRow">
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="addMainAddRow"
|
@click="addMainAddRow"
|
||||||
:underline="false"
|
:underline="false"
|
||||||
>+ 数据表添加
|
>+ 数据表添加
|
||||||
</el-link
|
</el-link
|
||||||
>
|
>
|
||||||
|
@ -58,15 +58,15 @@
|
||||||
<div class="bigTitle">表字段</div>
|
<div class="bigTitle">表字段</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<BaseTable
|
<BaseTable
|
||||||
ref="activedTable"
|
ref="activedTable"
|
||||||
:tableData="activedTableData"
|
:tableData="activedTableData"
|
||||||
:tabLoading="activedTabLoading"
|
:tabLoading="activedTabLoading"
|
||||||
:tableColumn="activedTableColumn"
|
:tableColumn="activedTableColumn"
|
||||||
:border="false"
|
:border="false"
|
||||||
tableHeight="73vh"
|
tableHeight="73vh"
|
||||||
:highlightCurrent="true"
|
:highlightCurrent="true"
|
||||||
@radioChange="activedOnClick"
|
@radioChange="activedOnClick"
|
||||||
@onFunc="activedOnFunc"
|
@onFunc="activedOnFunc"
|
||||||
>
|
>
|
||||||
<template #filedType="{row}">
|
<template #filedType="{row}">
|
||||||
{{ dataTypeDist[row.filedType] }}
|
{{ dataTypeDist[row.filedType] }}
|
||||||
|
@ -84,10 +84,10 @@
|
||||||
</BaseTable>
|
</BaseTable>
|
||||||
<div class="mainAddRow">
|
<div class="mainAddRow">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="mainTempClick.id"
|
v-if="mainTempClick.id"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="activedAddRow"
|
@click="activedAddRow"
|
||||||
:underline="false"
|
:underline="false"
|
||||||
>+ 表字段添加
|
>+ 表字段添加
|
||||||
</el-link
|
</el-link
|
||||||
>
|
>
|
||||||
|
@ -96,14 +96,14 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 单据规则-->
|
<!-- 单据规则-->
|
||||||
<base-right-dialog
|
<base-right-dialog
|
||||||
ref="baseRightDialog"
|
ref="baseRightDialog"
|
||||||
:footerShow="true"
|
:footerShow="true"
|
||||||
:dialogVisible.sync="ruleAddDialogShow"
|
:dialogVisible.sync="ruleAddDialogShow"
|
||||||
title="单据规则"
|
title="单据规则"
|
||||||
@handleClose="ruleAddDialogShow=false"
|
@handleClose="ruleAddDialogShow=false"
|
||||||
:submitShow="true"
|
:submitShow="true"
|
||||||
:size="'50%'"
|
:size="'50%'"
|
||||||
@handleConfirmClick="ruleAddSaveHanlde"
|
@handleConfirmClick="ruleAddSaveHanlde"
|
||||||
>
|
>
|
||||||
<div class="receiptsTable">
|
<div class="receiptsTable">
|
||||||
<ruleAddTable ref="ruleAddTable"></ruleAddTable>
|
<ruleAddTable ref="ruleAddTable"></ruleAddTable>
|
||||||
|
@ -111,14 +111,14 @@
|
||||||
</base-right-dialog>
|
</base-right-dialog>
|
||||||
<!-- 数据表 -->
|
<!-- 数据表 -->
|
||||||
<base-right-dialog
|
<base-right-dialog
|
||||||
ref="mainTableAddtDialog"
|
ref="mainTableAddtDialog"
|
||||||
:footerShow="true"
|
:footerShow="true"
|
||||||
:dialogVisible.sync="mainTableDialogShow"
|
:dialogVisible.sync="mainTableDialogShow"
|
||||||
title="数据表"
|
title="数据表"
|
||||||
@handleClose="mainTableDialogShow=false"
|
@handleClose="mainTableDialogShow=false"
|
||||||
:submitShow="true"
|
:submitShow="true"
|
||||||
:size="'30%'"
|
:size="'30%'"
|
||||||
@handleConfirmClick="mainTableSaveHandle"
|
@handleConfirmClick="mainTableSaveHandle"
|
||||||
>
|
>
|
||||||
<div class="mainTable">
|
<div class="mainTable">
|
||||||
<mainTable ref="mainTable"></mainTable>
|
<mainTable ref="mainTable"></mainTable>
|
||||||
|
@ -126,14 +126,14 @@
|
||||||
</base-right-dialog>
|
</base-right-dialog>
|
||||||
<!-- 表字段-->
|
<!-- 表字段-->
|
||||||
<base-right-dialog
|
<base-right-dialog
|
||||||
ref="sonTableAddtDialog"
|
ref="sonTableAddtDialog"
|
||||||
:footerShow="true"
|
:footerShow="true"
|
||||||
:dialogVisible.sync="sonTableDialogShow"
|
:dialogVisible.sync="sonTableDialogShow"
|
||||||
title="表字段"
|
title="表字段"
|
||||||
@handleClose="sonTableDialogShow=false"
|
@handleClose="sonTableDialogShow=false"
|
||||||
:submitShow="true"
|
:submitShow="true"
|
||||||
:size="'30%'"
|
:size="'30%'"
|
||||||
@handleConfirmClick="sonTableSaveHandle"
|
@handleConfirmClick="sonTableSaveHandle"
|
||||||
>
|
>
|
||||||
<div class="mainTable">
|
<div class="mainTable">
|
||||||
<sonTable ref="sonTable" :activedTableData="activedTableData" :mainTempClick="mainTempClick"
|
<sonTable ref="sonTable" :activedTableData="activedTableData" :mainTempClick="mainTempClick"
|
||||||
|
@ -229,7 +229,7 @@ export default {
|
||||||
id: item.dbName,
|
id: item.dbName,
|
||||||
label: item.remark,
|
label: item.remark,
|
||||||
dbId: item.id,
|
dbId: item.id,
|
||||||
mdmId:item.mdmId,
|
mdmId: item.mdmId
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -250,17 +250,17 @@ export default {
|
||||||
// 主表按钮(删除)
|
// 主表按钮(删除)
|
||||||
mainDeleOnFunc(row, item) {
|
mainDeleOnFunc(row, item) {
|
||||||
this.$confirm('确定删除?')
|
this.$confirm('确定删除?')
|
||||||
.then(async(_) => {
|
.then(async(_) => {
|
||||||
this.openLoading('submit')
|
this.openLoading('submit')
|
||||||
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
|
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
|
||||||
mdmId: this.$route.query.id,
|
mdmId: this.$route.query.id,
|
||||||
...row
|
...row
|
||||||
})
|
|
||||||
this.$vmNews('删除成功!', 'success')
|
|
||||||
this.getMainTableHandle()
|
|
||||||
})
|
|
||||||
.catch((_) => {
|
|
||||||
})
|
})
|
||||||
|
this.$vmNews('删除成功!', 'success')
|
||||||
|
this.getMainTableHandle()
|
||||||
|
})
|
||||||
|
.catch((_) => {
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//数据表添加按钮
|
//数据表添加按钮
|
||||||
addMainAddRow() {
|
addMainAddRow() {
|
||||||
|
@ -294,22 +294,22 @@ export default {
|
||||||
//表字段点击操作
|
//表字段点击操作
|
||||||
activedOnFunc(row) {
|
activedOnFunc(row) {
|
||||||
this.$confirm('确定删除?')
|
this.$confirm('确定删除?')
|
||||||
.then(async(_) => {
|
.then(async(_) => {
|
||||||
this.openLoading('submit')
|
this.openLoading('submit')
|
||||||
const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', {
|
const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
mdmId: this.$route.query.id,
|
mdmId: this.$route.query.id,
|
||||||
dbId: this.mainTempClick.id,
|
dbId: this.mainTempClick.id,
|
||||||
dbName: this.mainTempClick.dbName,
|
dbName: this.mainTempClick.dbName,
|
||||||
enName: row.enName,
|
enName: row.enName,
|
||||||
filedType: row.filedType
|
filedType: row.filedType
|
||||||
})
|
|
||||||
this.$vmNews('删除成功', 'success')
|
|
||||||
this.mainOnClick(this.mainTempClick)
|
|
||||||
this.activedTableData.splice(row.index, 1)
|
|
||||||
})
|
|
||||||
.catch((_) => {
|
|
||||||
})
|
})
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.mainOnClick(this.mainTempClick)
|
||||||
|
this.activedTableData.splice(row.index, 1)
|
||||||
|
})
|
||||||
|
.catch((_) => {
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//表字段点击设置
|
//表字段点击设置
|
||||||
sonTableEditHandle(row) {
|
sonTableEditHandle(row) {
|
||||||
|
@ -415,12 +415,15 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//判断是主表还是子表 "dbType":"2",//类型 1、主表 2、明细
|
//判断是主表还是子表 "dbType":"2",//类型 1、主表 2、明细
|
||||||
console.log(this.mainTableData.length && !form.id,'this.mainTableData.length && !form.id',form,this.mainTableData.length,)
|
console.log(this.mainTableData.length && !form.id, 'this.mainTableData.length && !form.id', form, this.mainTableData.length)
|
||||||
if (this.mainTableData.length && form.id) {
|
if (!form.id) {
|
||||||
this.$set(form, 'dbType', 2)
|
if (this.mainTableData.length) {
|
||||||
} else {
|
this.$set(form, 'dbType', 2)
|
||||||
this.$set(form, 'dbType', 1)
|
} else {
|
||||||
|
this.$set(form, 'dbType', 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断有没有id如果有走编辑 没有走新增
|
//判断有没有id如果有走编辑 没有走新增
|
||||||
if (form.id) {
|
if (form.id) {
|
||||||
this.openLoading('submit')
|
this.openLoading('submit')
|
||||||
|
|
Loading…
Reference in New Issue