Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop
Showing
2 changed files
with
27 additions
and
12 deletions
| ... | @@ -249,6 +249,7 @@ const sheetTableInfo = ref({ | ... | @@ -249,6 +249,7 @@ const sheetTableInfo = ref({ |
| 249 | }, | 249 | }, |
| 250 | }); | 250 | }); |
| 251 | const selectRowData = ref([]); | 251 | const selectRowData = ref([]); |
| 252 | const fieldTableRef = ref(); | ||
| 252 | const fieldTableInfo = ref({ | 253 | const fieldTableInfo = ref({ |
| 253 | id: "metadata-table", | 254 | id: "metadata-table", |
| 254 | fields: [ | 255 | fields: [ |
| ... | @@ -681,7 +682,28 @@ const btnClick = async (btn, bType = null) => { | ... | @@ -681,7 +682,28 @@ const btnClick = async (btn, bType = null) => { |
| 681 | name: "taskConfig", | 682 | name: "taskConfig", |
| 682 | }); | 683 | }); |
| 683 | } else if (type == 'confirm') { | 684 | } else if (type == 'confirm') { |
| 684 | saveTask(); | 685 | const row = fieldTableInfo.value.data.find(item => item.STATE == 'Running'); |
| 686 | const rIndex = fieldTableInfo.value.data.findIndex(item => item.STATE == 'Running'); | ||
| 687 | if (rIndex > -1) { | ||
| 688 | ElMessageBox.confirm( | ||
| 689 | '存在未保存的数据,提交后会丢失,是否确定提交', | ||
| 690 | '提示', | ||
| 691 | { | ||
| 692 | confirmButtonText: '确定', | ||
| 693 | cancelButtonText: '取消', | ||
| 694 | type: 'warning', | ||
| 695 | } | ||
| 696 | ).then(() => { | ||
| 697 | saveTask(); | ||
| 698 | }).catch(() => { | ||
| 699 | // 设置高亮 | ||
| 700 | fieldTableRef.value.setCurrentRow(row) | ||
| 701 | // 设置表格滚动的位置 | ||
| 702 | fieldTableRef.value.scrollTo({ top: 36 * rIndex, behavior: 'smooth' }); | ||
| 703 | }) | ||
| 704 | } else { | ||
| 705 | saveTask(); | ||
| 706 | } | ||
| 685 | } else if (type == 'status') { | 707 | } else if (type == 'status') { |
| 686 | if (selectRowData.value.length == 0) { | 708 | if (selectRowData.value.length == 0) { |
| 687 | ElMessage.warning('请选择需要操作的数据'); | 709 | ElMessage.warning('请选择需要操作的数据'); |
| ... | @@ -1022,9 +1044,9 @@ onMounted(() => { | ... | @@ -1022,9 +1044,9 @@ onMounted(() => { |
| 1022 | </div> | 1044 | </div> |
| 1023 | <div class="table_panel_wrap panel" :style="{ height: 'calc(100% - ' + toolH + 'px)' }"> | 1045 | <div class="table_panel_wrap panel" :style="{ height: 'calc(100% - ' + toolH + 'px)' }"> |
| 1024 | <div class="table_panel" v-loading="fieldTableInfo.loading"> | 1046 | <div class="table_panel" v-loading="fieldTableInfo.loading"> |
| 1025 | <el-table ref="costTableRef" :data="fieldTableInfo.data" border :height="'100%'" | 1047 | <el-table ref="fieldTableRef" :data="fieldTableInfo.data" border :height="'100%'" |
| 1026 | style="width: 100%; display: inline-block" :style="{ 'max-height': 'calc(100% - 44px)' }" | 1048 | style="width: 100%; display: inline-block" :style="{ 'max-height': 'calc(100% - 44px)' }" |
| 1027 | :cell-class-name="tableCellClassName" @selection-change="tableSelectionChange"> | 1049 | :cell-class-name="tableCellClassName" @selection-change="tableSelectionChange" highlight-current-row> |
| 1028 | <el-table-column type="selection" align="center" :width="32" :selectable="rowSelectable" | 1050 | <el-table-column type="selection" align="center" :width="32" :selectable="rowSelectable" |
| 1029 | fixed="left" /> | 1051 | fixed="left" /> |
| 1030 | <el-table-column v-for="(item, i) in fieldTableInfo.fields" :label="item.label" :width="item.width" | 1052 | <el-table-column v-for="(item, i) in fieldTableInfo.fields" :label="item.label" :width="item.width" | ... | ... |
| ... | @@ -48,8 +48,7 @@ const treeInfo = ref({ | ... | @@ -48,8 +48,7 @@ const treeInfo = ref({ |
| 48 | expandOnNodeClick: false, | 48 | expandOnNodeClick: false, |
| 49 | data: [], | 49 | data: [], |
| 50 | }); | 50 | }); |
| 51 | // const toolH = ref(82) | 51 | |
| 52 | const toolRef = ref(); | ||
| 53 | const expand1 = ref(true) | 52 | const expand1 = ref(true) |
| 54 | const expand2 = ref(true) | 53 | const expand2 = ref(true) |
| 55 | 54 | ||
| ... | @@ -389,9 +388,6 @@ const getPermissionList = (val = {}, init = true) => { | ... | @@ -389,9 +388,6 @@ const getPermissionList = (val = {}, init = true) => { |
| 389 | tempInfo = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0] | 388 | tempInfo = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0] |
| 390 | } | 389 | } |
| 391 | listClick(tempInfo); | 390 | listClick(tempInfo); |
| 392 | // nextTick(() => { | ||
| 393 | // toolH.value = toolRef.value.offsetHeight | ||
| 394 | // }) | ||
| 395 | } | 391 | } |
| 396 | } else { | 392 | } else { |
| 397 | permissionList.value.push(...JSON.parse(JSON.stringify(data))) | 393 | permissionList.value.push(...JSON.parse(JSON.stringify(data))) |
| ... | @@ -439,9 +435,6 @@ onBeforeMount(() => { | ... | @@ -439,9 +435,6 @@ onBeforeMount(() => { |
| 439 | }) | 435 | }) |
| 440 | 436 | ||
| 441 | onMounted(() => { | 437 | onMounted(() => { |
| 442 | // window.addEventListener('resize', function () { | ||
| 443 | // toolH.value = toolRef.value.offsetHeight | ||
| 444 | // }) | ||
| 445 | }) | 438 | }) |
| 446 | 439 | ||
| 447 | </script> | 440 | </script> |
| ... | @@ -461,7 +454,7 @@ onMounted(() => { | ... | @@ -461,7 +454,7 @@ onMounted(() => { |
| 461 | </div> | 454 | </div> |
| 462 | <div class="main_wrap" :class="{ full: step == 1 }"> | 455 | <div class="main_wrap" :class="{ full: step == 1 }"> |
| 463 | <div class="content_main" v-show="step == 0"> | 456 | <div class="content_main" v-show="step == 0"> |
| 464 | <div class="template_panel" ref="toolRef"> | 457 | <div class="template_panel"> |
| 465 | <div class="title_item"> | 458 | <div class="title_item"> |
| 466 | <span class="title_label">分类标准:</span> | 459 | <span class="title_label">分类标准:</span> |
| 467 | <span class="title_text">{{ templateInfo.name || '--' }}</span> | 460 | <span class="title_text">{{ templateInfo.name || '--' }}</span> | ... | ... |
-
Please register or sign in to post a comment