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({ ...@@ -755,6 +755,7 @@ export const createTableSql = (data) => request({
755 export const exportCgDir = () => request({ 755 export const exportCgDir = () => request({
756 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/export`, 756 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/export`,
757 method: 'post', 757 method: 'post',
758 responseType: 'blob',
758 }) 759 })
759 760
760 /** 761 /**
...@@ -762,9 +763,10 @@ export const exportCgDir = () => request({ ...@@ -762,9 +763,10 @@ export const exportCgDir = () => request({
762 * @param {no params} 763 * @param {no params}
763 * @path /db-dir/table/export 764 * @path /db-dir/table/export
764 */ 765 */
765 export const exportDbDirTable = () => request({ 766 export const exportDbDirTable = (params) => request({
766 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/export`, 767 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/export?execGuid=${params.execGuid}`,
767 method: 'post', 768 method: 'post',
769 responseType: 'blob',
768 }) 770 })
769 771
770 /** 772 /**
...@@ -774,7 +776,7 @@ export const exportDbDirTable = () => request({ ...@@ -774,7 +776,7 @@ export const exportDbDirTable = () => request({
774 * 776 *
775 */ 777 */
776 export const getDbDirDetail = (params) => request({ 778 export const getDbDirDetail = (params) => request({
777 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/detail?guid=${params.tableGuid}`, 779 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/detail?tableGuid=${params.tableGuid}`,
778 method: 'get', 780 method: 'get',
779 }) 781 })
780 782
......
...@@ -331,7 +331,7 @@ const tableCheckboxSelectChange = (select, row) => { ...@@ -331,7 +331,7 @@ const tableCheckboxSelectChange = (select, row) => {
331 let rulesGuid: any = []; 331 let rulesGuid: any = [];
332 select.forEach((item: any) => { 332 select.forEach((item: any) => {
333 rulesName.push(item.fieldName); 333 rulesName.push(item.fieldName);
334 rulesGuid.push(item.guid); 334 rulesGuid.push(item.fieldGuid);
335 }); 335 });
336 selectedRulesData.value = { 336 selectedRulesData.value = {
337 rulesName: rulesName.join('、'), 337 rulesName: rulesName.join('、'),
...@@ -344,7 +344,7 @@ const tableCheckboxAllSelectChange = (select) => { ...@@ -344,7 +344,7 @@ const tableCheckboxAllSelectChange = (select) => {
344 let rulesGuid: any = []; 344 let rulesGuid: any = [];
345 select.forEach((item: any) => { 345 select.forEach((item: any) => {
346 rulesName.push(item.fieldName); 346 rulesName.push(item.fieldName);
347 rulesGuid.push(item.guid); 347 rulesGuid.push(item.fieldGuid);
348 }); 348 });
349 selectedRulesData.value = { 349 selectedRulesData.value = {
350 rulesName: rulesName.join('、'), 350 rulesName: rulesName.join('、'),
...@@ -1007,7 +1007,9 @@ const btnClick = async () => { ...@@ -1007,7 +1007,9 @@ const btnClick = async () => {
1007 }; 1007 };
1008 // 数据库导出 1008 // 数据库导出
1009 const exportDB = async () => { 1009 const exportDB = async () => {
1010 exportDbDirTable().then((res: any) => { 1010 exportDbDirTable({
1011 execGuid: execGuidInfo.value.execGuid,
1012 }).then((res: any) => {
1011 download(res, '数据库目录数据.xlsx', 'excel') 1013 download(res, '数据库目录数据.xlsx', 'excel')
1012 }); 1014 });
1013 } 1015 }
......
...@@ -4,9 +4,13 @@ ...@@ -4,9 +4,13 @@
4 4
5 <script lang="ts" setup name="configureRules"> 5 <script lang="ts" setup name="configureRules">
6 import { ref } from "vue"; 6 import { ref } from "vue";
7 import router from "@/router"; 7 import useUserStore from "@/store/modules/user";
8 import { getBizRuleConfigDetail, saveBizRuleConfig, } from '@/api/modules/dataInventory' 8 import { getBizRuleConfigDetail, saveBizRuleConfig, } from '@/api/modules/dataInventory'
9 const { proxy } = getCurrentInstance() as any; 9 const { proxy } = getCurrentInstance() as any;
10 const router = useRouter();
11 const route = useRoute();
12 const fullPath = route.fullPath;
13 const userStore = useUserStore();
10 const bizRuleConfigData = ref<any>() 14 const bizRuleConfigData = ref<any>()
11 const getBizRuleConfigDetailData = async () => { 15 const getBizRuleConfigDetailData = async () => {
12 const params = { 16 const params = {
...@@ -205,8 +209,9 @@ const data = [ ...@@ -205,8 +209,9 @@ const data = [
205 }, 209 },
206 ] 210 ]
207 211
212 const loading = ref(false)
208 const saveData = async () => { 213 const saveData = async () => {
209 214 loading.value = true
210 /**入参 215 /**入参
211 * "guid": "string", 216 * "guid": "string",
212 "fieldGuid": "string", 217 "fieldGuid": "string",
...@@ -220,7 +225,6 @@ const saveData = async () => { ...@@ -220,7 +225,6 @@ const saveData = async () => {
220 const inParams = [] as any 225 const inParams = [] as any
221 tableData.value.forEach((item: any) => { 226 tableData.value.forEach((item: any) => {
222 const obj = { 227 const obj = {
223 guid: router.currentRoute.value.query.tableGuid,
224 fieldGuid: item.fieldGuid, 228 fieldGuid: item.fieldGuid,
225 execGuid: router.currentRoute.value.query.execGuid, 229 execGuid: router.currentRoute.value.query.execGuid,
226 fieldLengthCondition: item.fieldLengthCondition, 230 fieldLengthCondition: item.fieldLengthCondition,
...@@ -236,15 +240,28 @@ const saveData = async () => { ...@@ -236,15 +240,28 @@ const saveData = async () => {
236 console.log('finalParams', inParams) 240 console.log('finalParams', inParams)
237 const res: any = await saveBizRuleConfig(inParams) 241 const res: any = await saveBizRuleConfig(inParams)
238 if (res.code === proxy.$passCode) { 242 if (res.code === proxy.$passCode) {
243 loading.value = false
239 proxy.$message.success('修改配置规则成功!') 244 proxy.$message.success('修改配置规则成功!')
240 router.back() 245 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
246 router.push({
247 name: 'classifyGradeCatalogue'
248 });
241 } else { 249 } else {
250 loading.value = false
242 proxy.$message.error(res.msg) 251 proxy.$message.error(res.msg)
243 } 252 }
244 } 253 }
245 254
255
246 const cancel = () => { 256 const cancel = () => {
247 router.back() 257 proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => {
258 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
259 router.push({
260 name: 'classifyGradeCatalogue'
261 });
262 }, () => {
263 proxy.$ElMessage.info("已取消");
264 });
248 } 265 }
249 266
250 </script> 267 </script>
...@@ -392,7 +409,7 @@ const cancel = () => { ...@@ -392,7 +409,7 @@ const cancel = () => {
392 </el-table> 409 </el-table>
393 </div> 410 </div>
394 <div class="botton_btn"> 411 <div class="botton_btn">
395 <el-button type="primary" @click="saveData">保存</el-button> 412 <el-button type="primary" @click="saveData" :loading="loading">保存</el-button>
396 <el-button @click="cancel">取消</el-button> 413 <el-button @click="cancel">取消</el-button>
397 </div> 414 </div>
398 </div> 415 </div>
......
...@@ -11,7 +11,7 @@ import { CirclePlus, Delete, Warning } from "@element-plus/icons-vue"; ...@@ -11,7 +11,7 @@ import { CirclePlus, Delete, Warning } from "@element-plus/icons-vue";
11 11
12 const { proxy } = getCurrentInstance() as any; 12 const { proxy } = getCurrentInstance() as any;
13 const dialogLabelFormRef = ref(); 13 const dialogLabelFormRef = ref();
14 14 const isAddDisabled = ref(true);
15 // 原始数据存储 15 // 原始数据存储
16 const classGradeTreeData: any = ref([]); 16 const classGradeTreeData: any = ref([]);
17 const expandedKey: any = ref([]) 17 const expandedKey: any = ref([])
...@@ -39,8 +39,10 @@ const getClassifyGradeTree = async () => { ...@@ -39,8 +39,10 @@ const getClassifyGradeTree = async () => {
39 } 39 }
40 // 分别赋值 分类guid 40 // 分别赋值 分类guid
41 classifyGuid.value = classGradeTreeData.value[0].guid; 41 classifyGuid.value = classGradeTreeData.value[0].guid;
42 newCreateGradeFormItems.value[1].options = transformDataForTree(transformedData) 42 console.log('getClassifyGradeTree', transformedData);
43 newCreateGradeFormItems.value[1].options = transformDataForTree([transformedData[0]])
43 treeInfo.value.loading = false; 44 treeInfo.value.loading = false;
45 isAddDisabled.value = false;
44 } else { 46 } else {
45 proxy.$ElMessage.error(res.msg); 47 proxy.$ElMessage.error(res.msg);
46 } 48 }
...@@ -77,8 +79,8 @@ const getLabelPageData = async () => { ...@@ -77,8 +79,8 @@ const getLabelPageData = async () => {
77 refCount.value++; 79 refCount.value++;
78 tableInfo.value.loading = true; 80 tableInfo.value.loading = true;
79 const params = { 81 const params = {
80 pageIndex: 1, 82 pageIndex: page.value.curr,
81 pageSize: 50, 83 pageSize: page.value.limit,
82 classifyGuid: classifyGuid.value, 84 classifyGuid: classifyGuid.value,
83 detailGuid: classifyDetailGuid.value 85 detailGuid: classifyDetailGuid.value
84 } 86 }
...@@ -207,7 +209,7 @@ const deleteLabelGuids = ref<any>([]); ...@@ -207,7 +209,7 @@ const deleteLabelGuids = ref<any>([]);
207 // 保存编辑的guid 209 // 保存编辑的guid
208 const editLabelRow = ref<any>(''); 210 const editLabelRow = ref<any>('');
209 const page = ref({ 211 const page = ref({
210 limit: 10, 212 limit: 50,
211 curr: 1, 213 curr: 1,
212 sizes: [ 214 sizes: [
213 { label: "10", value: 10 }, 215 { label: "10", value: 10 },
...@@ -230,12 +232,12 @@ const tableInfo = ref({ ...@@ -230,12 +232,12 @@ const tableInfo = ref({
230 return tempInfo.join('/') 232 return tempInfo.join('/')
231 }, 233 },
232 }, 234 },
233 { label: "分级", field: "gradeDetailName", width: 80 }, 235 { label: "分级", field: "gradeDetailName", width: 60 },
234 { 236 {
235 label: '状态', field: 'bizState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 'Y', inactiveValue: 'N', switchWidth: 56, width: 100, align: 'center' 237 label: '状态', field: 'bizState', type: 'switch', activeText: '启用', inactiveText: '停用', activeValue: 'Y', inactiveValue: 'N', switchWidth: 56, width: 100, align: 'center'
236 }, 238 },
237 { label: "修改人", field: "updateUserName", width: 140 }, 239 { label: "修改人", field: "updateUserName", width: 80 },
238 { label: "更新时间", field: "updateTime", width: 180 }, 240 { label: "更新时间", field: "updateTime", width: 160 },
239 ], 241 ],
240 data: tableDataList.value, 242 data: tableDataList.value,
241 page: { 243 page: {
...@@ -671,6 +673,10 @@ const searchClass = async (val: any, clear: boolean = false) => { ...@@ -671,6 +673,10 @@ const searchClass = async (val: any, clear: boolean = false) => {
671 } 673 }
672 if (val?.labelName?.length !== 0 || refCount.value >= 1) { 674 if (val?.labelName?.length !== 0 || refCount.value >= 1) {
673 tableInfo.value.loading = true; 675 tableInfo.value.loading = true;
676 classifyGuid.value = '';
677 classifyDetailGuid.value = '';
678 treeInfo.value.expandedKey = [];
679 treeInfo.value.currentNodeKey = '';
674 const params = { 680 const params = {
675 pageIndex: 1, 681 pageIndex: 1,
676 pageSize: 50, 682 pageSize: 50,
...@@ -818,7 +824,7 @@ const matchEnValue = ref({ ...@@ -818,7 +824,7 @@ const matchEnValue = ref({
818 @select-change="selectChange" /> 824 @select-change="selectChange" />
819 </div> 825 </div>
820 <div> 826 <div>
821 <el-button type="primary" class="v-add" @click="addNewLabel">新增</el-button> 827 <el-button type="primary" class="v-add" @click="addNewLabel" :disabled="isAddDisabled">新增</el-button>
822 <!-- <el-button class="v-import">导入</el-button> 828 <!-- <el-button class="v-import">导入</el-button>
823 <el-button>导出</el-button> --> 829 <el-button>导出</el-button> -->
824 </div> 830 </div>
...@@ -833,19 +839,21 @@ const matchEnValue = ref({ ...@@ -833,19 +839,21 @@ const matchEnValue = ref({
833 <template v-slot:default> 839 <template v-slot:default>
834 <div> 840 <div>
835 <div class="dim-label"> 841 <div class="dim-label">
836 <span class="front">模糊匹配</span> 842 <span class="front">精确匹配</span>
837 <el-icon> 843 <el-icon>
838 <Warning /> 844 <Warning />
839 </el-icon> 845 </el-icon>
840 <span class="tip"> 846 <span class="tip">
841 精确匹配使用中文;分隔每个规则 847 精确匹配使用英文","分隔每个规则
842 </span> 848 </span>
843 </div> 849 </div>
844 <div class="v-match"> 850 <div class="v-match">
845 <el-input v-model="matchChValue.value" :disabled="matchChValue.disabled" maxlength="200" 851 <el-input v-model="matchChValue.value" :disabled="matchChValue.disabled" maxlength="200"
846 style="width: 272px;height:94px;" show-word-limit type="textarea" class="no-resize" /> 852 style="width: 272px;height:94px;" show-word-limit type="textarea" class="no-resize"
853 placeholder="请输入字段中文" />
847 <el-input v-model="matchEnValue.value" :disabled="matchEnValue.disabled" maxlength="200" 854 <el-input v-model="matchEnValue.value" :disabled="matchEnValue.disabled" maxlength="200"
848 style="width: 272px;height:94px;" show-word-limit type="textarea" class="no-resize" /> 855 style="width: 272px;height:94px;" show-word-limit type="textarea" class="no-resize"
856 placeholder="请输入字段英文" />
849 </div> 857 </div>
850 </div> 858 </div>
851 <div class="dim-label" style="margin-top: 16px;"> 859 <div class="dim-label" style="margin-top: 16px;">
...@@ -861,7 +869,7 @@ const matchEnValue = ref({ ...@@ -861,7 +869,7 @@ const matchEnValue = ref({
861 <div v-for="(row, index) in formRows" :key="index" class="match-content-wrapper"> 869 <div v-for="(row, index) in formRows" :key="index" class="match-content-wrapper">
862 <div class="match-content" @mouseenter="handleMouseEnter(index)" @mouseleave="handleMouseLeave()"> 870 <div class="match-content" @mouseenter="handleMouseEnter(index)" @mouseleave="handleMouseLeave()">
863 <!-- 位置映射下拉框 --> 871 <!-- 位置映射下拉框 -->
864 <el-select v-model="row.name" placeholder="请选择中文名/英文名" :disabled=row.disabled class="v-select"> 872 <el-select v-model="row.name" placeholder="请选择" :disabled=row.disabled class="v-select">
865 <el-option v-for="option in languageOptions" :key="option.value" :label="option.label" 873 <el-option v-for="option in languageOptions" :key="option.value" :label="option.label"
866 :value="option.value" /> 874 :value="option.value" />
867 </el-select> 875 </el-select>
...@@ -964,12 +972,20 @@ const matchEnValue = ref({ ...@@ -964,12 +972,20 @@ const matchEnValue = ref({
964 align-items: center; 972 align-items: center;
965 margin-top: 6px; 973 margin-top: 6px;
966 974
975 .el-icon svg {
976 height: 16px;
977 width: 16px;
978 color: #999999;
979 }
980
967 .front { 981 .front {
968 margin-right: 8px; 982 margin-right: 16px;
969 } 983 }
970 984
971 .tip { 985 .tip {
972 margin-left: 3px; 986 margin-left: 4px;
987 font-size: 12px;
988 color: #999999;
973 } 989 }
974 } 990 }
975 991
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!