Browse Source

Merge remote-tracking branch 'origin/master'

master
xueyinfei 4 weeks ago
parent
commit
c31892a5ca
  1. 2
      vue-fastapi-backend/module_admin/service/metatask_service.py
  2. 73
      vue-fastapi-frontend/src/views/meta/metasercurity/MetaSecurityCol.vue
  3. 70
      vue-fastapi-frontend/src/views/meta/metasercurity/MetaSecurityRow.vue

2
vue-fastapi-backend/module_admin/service/metatask_service.py

@ -505,7 +505,7 @@ class MetataskService:
# oracl表字段 # oracl表字段
if config.ac_target=='0': if config.ac_target=='0':
# modified_json_str = config.taskDefinitionJson.replace("16699723296864", str_list[0]).replace("16699723296865", str_list[1]).replace("16699723296866", str_list[2]).replace("'ORCL_USER'", f"'{page_object.dbSName}'").replace("'orcl_conn'", f"'{page_object.dbRName}'") # modified_json_str = config.taskDefinitionJson.replace("16699723296864", str_list[0]).replace("16699723296865", str_list[1]).replace("16699723296866", str_list[2]).replace("'ORCL_USER'", f"'{page_object.dbSName}'").replace("'orcl_conn'", f"'{page_object.dbRName}'")
modified_json_str = config.taskDefinitionJson.replace("16699723296864", str_list[0]).replace("16699723296865", str_list[1]).replace("16699723296866", str_list[2]).replace("'ORCL_USER'", f"'{page_object.dbSName}'").replace("4 as ssys_id", f"{page_object.dbRCode} as ssys_id").replace("ssys_id = 4", f"ssys_id = {page_object.dbRCode}") modified_json_str = config.taskDefinitionJson.replace("16699723296864", str_list[0]).replace("16699723296865", str_list[1]).replace("16699723296866", str_list[2]).replace("'ORCL_USER'", f"'{page_object.dbSName}'").replace("11 as ssys_id", f"{page_object.dbRCode} as ssys_id").replace("ssys_id = 11", f"ssys_id = {page_object.dbRCode}")
if page_object.dbSName: if page_object.dbSName:
modified_json_str=modified_json_str.replace("'ORCL_USER'", f"'{page_object.dbSName}'") modified_json_str=modified_json_str.replace("'ORCL_USER'", f"'{page_object.dbSName}'")
else: else:

73
vue-fastapi-frontend/src/views/meta/metasercurity/MetaSecurityCol.vue

@ -520,33 +520,68 @@ const getDeptTree = async () => {
} }
}; };
const loadSchemaList = async (dbRID) => {
const res = await getMetaMdlNameList(dbRID)
schemaList.value = res.data || []
}
const loadTableList = async (mdlName) => {
const res = await getMetaDataList({
ssysId: form.value.dbRID,
mdlName,
pageNum: 1,
pageSize: 10000
})
tableList.value = res.data.rows.map(item => item.tabEngName)
}
const loadColumnList = async (tabName) => {
const res = await getColumnList({
ssysId: form.value.dbRID,
mdlName: form.value.dbSName,
tabName
})
columnList.value = ["ALL", ...res.data.map(item => item.fldEngName)]
}
// //
const handleEdit = (row) => { const handleEdit = async (row) => {
reset(); reset()
const colId = row.colId || ids.value; dialogTitle.value = "编辑列配置"
const colId = row.colId || ids.value
const res = await getMetaSecurityCol(colId)
const data = res.data
//
data.dbCName = data.dbCName ? data.dbCName.split(',') : []
//
form.value = data
getMetaSecurityCol(colId).then(response => { //
const data = response.data; await loadSchemaList(form.value.dbRID)
// //
if (data.dbCName && typeof data.dbCName === 'string') { if (form.value.dbSName) {
data.dbCName = data.dbCName.split(','); await loadTableList(form.value.dbSName)
} else if (!data.dbCName) {
data.dbCName = [];
} }
form.value = data; //
if (form.value.dbTName) {
await loadColumnList(form.value.dbTName)
}
//
if (data.objType === '0') { if (data.objType === '0') {
userOrRoleList.value = userList.value; // userOrRoleList.value = userList.value
} else if (data.objType === '1') { } else if (data.objType === '1') {
userOrRoleList.value = roleList.value; // userOrRoleList.value = roleList.value
} else {
userOrRoleList.value = [];
} }
dialogVisible.value = true;
dialogTitle.value = "编辑列配置"; dialogVisible.value = true
}); }
};
// //

70
vue-fastapi-frontend/src/views/meta/metasercurity/MetaSecurityRow.vue

@ -472,33 +472,67 @@ const handlePagination = (pageNum, pageSize) => {
// //
const handleEdit = (row) => {
reset(); const handleEdit = async (row) => {
reset()
dialogTitle.value = "编辑行配置"
const rowId = row.rowId || ids.value; const rowId = row.rowId || ids.value;
const res = await getMetaSecurityRow(rowId)
const data = res.data
//
data.dbCName = data.dbCName ? data.dbCName.split(',') : []
getMetaSecurityRow(rowId).then(response => { //
const data = response.data; form.value = data
//
await loadSchemaList(form.value.dbRID)
//
if (form.value.dbSName) {
await loadTableList(form.value.dbSName)
}
// //
if (data.dbCName && typeof data.dbCName === 'string') { if (form.value.dbTName) {
data.dbCName = data.dbCName.split(','); await loadColumnList(form.value.dbTName)
} else if (!data.dbCName) {
data.dbCName = [];
} }
//
if (data.objType === '0') { if (data.objType === '0') {
userOrRoleList.value = userList.value; // userOrRoleList.value = userList.value
} else if (data.objType === '1') { } else if (data.objType === '1') {
userOrRoleList.value = roleList.value; // userOrRoleList.value = roleList.value
} else {
userOrRoleList.value = [];
} }
form.value = data;
dialogVisible.value = true; dialogVisible.value = true
dialogTitle.value = "编辑行配置"; }
});
};
const loadSchemaList = async (dbRID) => {
const res = await getMetaMdlNameList(dbRID)
schemaList.value = res.data || []
}
const loadTableList = async (mdlName) => {
const res = await getMetaDataList({
ssysId: form.value.dbRID,
mdlName,
pageNum: 1,
pageSize: 10000
})
tableList.value = res.data.rows.map(item => item.tabEngName)
}
const loadColumnList = async (tabName) => {
const res = await getColumnList({
ssysId: form.value.dbRID,
mdlName: form.value.dbSName,
tabName
})
columnList.value = ["ALL", ...res.data.map(item => item.fldEngName)]
}
// //
function handleSave() { function handleSave() {
proxy.$refs["formRef"].validate(valid => { proxy.$refs["formRef"].validate(valid => {

Loading…
Cancel
Save