2d166788 by lxs

Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop

2 parents d8b88fc3 39db99b7
This diff could not be displayed because it is too large.
......@@ -755,6 +755,7 @@ export const createTableSql = (data) => request({
export const exportCgDir = () => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/export`,
method: 'post',
responseType: 'blob',
})
/**
......@@ -762,9 +763,10 @@ export const exportCgDir = () => request({
* @param {no params}
* @path /db-dir/table/export
*/
export const exportDbDirTable = () => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/export`,
export const exportDbDirTable = (params) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/export?execGuid=${params.execGuid}`,
method: 'post',
responseType: 'blob',
})
/**
......@@ -774,7 +776,7 @@ export const exportDbDirTable = () => request({
*
*/
export const getDbDirDetail = (params) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/detail?guid=${params.tableGuid}`,
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/detail?tableGuid=${params.tableGuid}`,
method: 'get',
})
......
......@@ -331,7 +331,7 @@ const tableCheckboxSelectChange = (select, row) => {
let rulesGuid: any = [];
select.forEach((item: any) => {
rulesName.push(item.fieldName);
rulesGuid.push(item.guid);
rulesGuid.push(item.fieldGuid);
});
selectedRulesData.value = {
rulesName: rulesName.join('、'),
......@@ -344,7 +344,7 @@ const tableCheckboxAllSelectChange = (select) => {
let rulesGuid: any = [];
select.forEach((item: any) => {
rulesName.push(item.fieldName);
rulesGuid.push(item.guid);
rulesGuid.push(item.fieldGuid);
});
selectedRulesData.value = {
rulesName: rulesName.join('、'),
......@@ -1007,7 +1007,9 @@ const btnClick = async () => {
};
// 数据库导出
const exportDB = async () => {
exportDbDirTable().then((res: any) => {
exportDbDirTable({
execGuid: execGuidInfo.value.execGuid,
}).then((res: any) => {
download(res, '数据库目录数据.xlsx', 'excel')
});
}
......
......@@ -4,9 +4,13 @@
<script lang="ts" setup name="configureRules">
import { ref } from "vue";
import router from "@/router";
import useUserStore from "@/store/modules/user";
import { getBizRuleConfigDetail, saveBizRuleConfig, } from '@/api/modules/dataInventory'
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const route = useRoute();
const fullPath = route.fullPath;
const userStore = useUserStore();
const bizRuleConfigData = ref<any>()
const getBizRuleConfigDetailData = async () => {
const params = {
......@@ -205,8 +209,9 @@ const data = [
},
]
const loading = ref(false)
const saveData = async () => {
loading.value = true
/**入参
* "guid": "string",
"fieldGuid": "string",
......@@ -220,7 +225,6 @@ const saveData = async () => {
const inParams = [] as any
tableData.value.forEach((item: any) => {
const obj = {
guid: router.currentRoute.value.query.tableGuid,
fieldGuid: item.fieldGuid,
execGuid: router.currentRoute.value.query.execGuid,
fieldLengthCondition: item.fieldLengthCondition,
......@@ -236,15 +240,28 @@ const saveData = async () => {
console.log('finalParams', inParams)
const res: any = await saveBizRuleConfig(inParams)
if (res.code === proxy.$passCode) {
loading.value = false
proxy.$message.success('修改配置规则成功!')
router.back()
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
name: 'classifyGradeCatalogue'
});
} else {
loading.value = false
proxy.$message.error(res.msg)
}
}
const cancel = () => {
router.back()
proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
name: 'classifyGradeCatalogue'
});
}, () => {
proxy.$ElMessage.info("已取消");
});
}
</script>
......@@ -392,7 +409,7 @@ const cancel = () => {
</el-table>
</div>
<div class="botton_btn">
<el-button type="primary" @click="saveData">保存</el-button>
<el-button type="primary" @click="saveData" :loading="loading">保存</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</div>
......
......@@ -11,7 +11,7 @@ import { CirclePlus, Delete, Warning } from "@element-plus/icons-vue";
const { proxy } = getCurrentInstance() as any;
const dialogLabelFormRef = ref();
const isAddDisabled = ref(true);
// 原始数据存储
const classGradeTreeData: any = ref([]);
const expandedKey: any = ref([])
......@@ -39,8 +39,10 @@ const getClassifyGradeTree = async () => {
}
// 分别赋值 分类guid
classifyGuid.value = classGradeTreeData.value[0].guid;
newCreateGradeFormItems.value[1].options = transformDataForTree(transformedData)
console.log('getClassifyGradeTree', transformedData);
newCreateGradeFormItems.value[1].options = transformDataForTree([transformedData[0]])
treeInfo.value.loading = false;
isAddDisabled.value = false;
} else {
proxy.$ElMessage.error(res.msg);
}
......@@ -77,8 +79,8 @@ const getLabelPageData = async () => {
refCount.value++;
tableInfo.value.loading = true;
const params = {
pageIndex: 1,
pageSize: 50,
pageIndex: page.value.curr,
pageSize: page.value.limit,
classifyGuid: classifyGuid.value,
detailGuid: classifyDetailGuid.value
}
......@@ -207,7 +209,7 @@ const deleteLabelGuids = ref<any>([]);
// 保存编辑的guid
const editLabelRow = ref<any>('');
const page = ref({
limit: 10,
limit: 50,
curr: 1,
sizes: [
{ label: "10", value: 10 },
......@@ -230,12 +232,12 @@ const tableInfo = ref({
return tempInfo.join('/')
},
},
{ label: "分级", field: "gradeDetailName", width: 80 },
{ label: "分级", field: "gradeDetailName", width: 60 },
{
label: '状态', field: 'bizState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 'Y', inactiveValue: 'N', switchWidth: 56, width: 100, align: 'center'
},
{ label: "修改人", field: "updateUserName", width: 140 },
{ label: "更新时间", field: "updateTime", width: 180 },
{ label: "修改人", field: "updateUserName", width: 80 },
{ label: "更新时间", field: "updateTime", width: 160 },
],
data: tableDataList.value,
page: {
......@@ -671,6 +673,10 @@ const searchClass = async (val: any, clear: boolean = false) => {
}
if (val?.labelName?.length !== 0 || refCount.value >= 1) {
tableInfo.value.loading = true;
classifyGuid.value = '';
classifyDetailGuid.value = '';
treeInfo.value.expandedKey = [];
treeInfo.value.currentNodeKey = '';
const params = {
pageIndex: 1,
pageSize: 50,
......@@ -818,7 +824,7 @@ const matchEnValue = ref({
@select-change="selectChange" />
</div>
<div>
<el-button type="primary" class="v-add" @click="addNewLabel">新增</el-button>
<el-button type="primary" class="v-add" @click="addNewLabel" :disabled="isAddDisabled">新增</el-button>
<!-- <el-button class="v-import">导入</el-button>
<el-button>导出</el-button> -->
</div>
......@@ -833,19 +839,21 @@ const matchEnValue = ref({
<template v-slot:default>
<div>
<div class="dim-label">
<span class="front">模糊匹配</span>
<span class="front">精确匹配</span>
<el-icon>
<Warning />
</el-icon>
<span class="tip">
精确匹配使用中文;分隔每个规则
精确匹配使用英文","分隔每个规则
</span>
</div>
<div class="v-match">
<el-input v-model="matchChValue.value" :disabled="matchChValue.disabled" maxlength="200"
style="width: 272px;height:94px;" show-word-limit type="textarea" class="no-resize" />
style="width: 272px;height:94px;" show-word-limit type="textarea" class="no-resize"
placeholder="请输入字段中文" />
<el-input v-model="matchEnValue.value" :disabled="matchEnValue.disabled" maxlength="200"
style="width: 272px;height:94px;" show-word-limit type="textarea" class="no-resize" />
style="width: 272px;height:94px;" show-word-limit type="textarea" class="no-resize"
placeholder="请输入字段英文" />
</div>
</div>
<div class="dim-label" style="margin-top: 16px;">
......@@ -861,7 +869,7 @@ const matchEnValue = ref({
<div v-for="(row, index) in formRows" :key="index" class="match-content-wrapper">
<div class="match-content" @mouseenter="handleMouseEnter(index)" @mouseleave="handleMouseLeave()">
<!-- 位置映射下拉框 -->
<el-select v-model="row.name" placeholder="请选择中文名/英文名" :disabled=row.disabled class="v-select">
<el-select v-model="row.name" placeholder="请选择" :disabled=row.disabled class="v-select">
<el-option v-for="option in languageOptions" :key="option.value" :label="option.label"
:value="option.value" />
</el-select>
......@@ -964,12 +972,20 @@ const matchEnValue = ref({
align-items: center;
margin-top: 6px;
.el-icon svg {
height: 16px;
width: 16px;
color: #999999;
}
.front {
margin-right: 8px;
margin-right: 16px;
}
.tip {
margin-left: 3px;
margin-left: 4px;
font-size: 12px;
color: #999999;
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!