fix
Showing
3 changed files
with
50 additions
and
20 deletions
| ... | @@ -389,6 +389,11 @@ export const getMetaStandardField = (guid) => request({ | ... | @@ -389,6 +389,11 @@ export const getMetaStandardField = (guid) => request({ |
| 389 | url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/list-by-meta-standard-guid?metaStandardGuid=${guid}`, | 389 | url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/list-by-meta-standard-guid?metaStandardGuid=${guid}`, |
| 390 | method: 'get' | 390 | method: 'get' |
| 391 | }) | 391 | }) |
| 392 | /** 元数据标准字段详情 */ | ||
| 393 | export const getMetaStandardFieldsDetail = (guid) => request({ | ||
| 394 | url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/detail?guid=${guid}`, | ||
| 395 | method: 'get' | ||
| 396 | }) | ||
| 392 | 397 | ||
| 393 | /** 根据元数据标准展示字段去获取未展示的详情信息 */ | 398 | /** 根据元数据标准展示字段去获取未展示的详情信息 */ |
| 394 | export const getMetaStandardFieldDetail = (guid) => request({ | 399 | export const getMetaStandardFieldDetail = (guid) => request({ | ... | ... |
| ... | @@ -2,13 +2,13 @@ | ... | @@ -2,13 +2,13 @@ |
| 2 | <el-drawer | 2 | <el-drawer |
| 3 | v-model="visible" | 3 | v-model="visible" |
| 4 | :title="title" | 4 | :title="title" |
| 5 | width="520" | 5 | size="520px" |
| 6 | class="standard-meta-modal" | 6 | class="standard-meta-modal" |
| 7 | :close-on-click-modal="false" | 7 | :close-on-click-modal="false" |
| 8 | > | 8 | > |
| 9 | <el-form :model="form" :rules="formRules" ref="formEl" style="min-height: 200px;" require-asterisk-position="right"> | 9 | <el-form :model="form" :rules="formRules" ref="formEl" style="min-height: 200px;" require-asterisk-position="right"> |
| 10 | <el-row> | 10 | <el-row> |
| 11 | <el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;margin-bottom:10px;"> | 11 | <el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;"> |
| 12 | <el-form-item :label="item.fileNameCodeName" :prop="item.fileNameCode"> | 12 | <el-form-item :label="item.fileNameCodeName" :prop="item.fileNameCode"> |
| 13 | <el-input | 13 | <el-input |
| 14 | v-if="item.inputTypeCode == '1' || item.inputTypeCode == '3'" | 14 | v-if="item.inputTypeCode == '1' || item.inputTypeCode == '3'" |
| ... | @@ -21,7 +21,6 @@ | ... | @@ -21,7 +21,6 @@ |
| 21 | filterable | 21 | filterable |
| 22 | clearable | 22 | clearable |
| 23 | placeholder="请选择" | 23 | placeholder="请选择" |
| 24 | size="small" | ||
| 25 | > | 24 | > |
| 26 | <el-option v-for="op in formOptions[item.fileNameCode]" :label="op.label" :value="op.value" :key="op.value"></el-option> | 25 | <el-option v-for="op in formOptions[item.fileNameCode]" :label="op.label" :value="op.value" :key="op.value"></el-option> |
| 27 | </el-select> | 26 | </el-select> |
| ... | @@ -49,7 +48,7 @@ | ... | @@ -49,7 +48,7 @@ |
| 49 | import { watch } from 'vue' | 48 | import { watch } from 'vue' |
| 50 | import { ElMessage } from "element-plus"; | 49 | import { ElMessage } from "element-plus"; |
| 51 | import { getParamsList } from '@/api/modules/dataAsset' | 50 | import { getParamsList } from '@/api/modules/dataAsset' |
| 52 | import { saveMetaStandardDataFields, getMetaStandardFieldDetail, getStandardCodeTree } from '@/api/modules/dataMetaService' | 51 | import { saveMetaStandardDataFields, getMetaStandardFieldsDetail, getStandardCodeTree } from '@/api/modules/dataMetaService' |
| 53 | 52 | ||
| 54 | const { proxy } = getCurrentInstance() as any; | 53 | const { proxy } = getCurrentInstance() as any; |
| 55 | const props = defineProps({ | 54 | const props = defineProps({ |
| ... | @@ -130,7 +129,7 @@ function getOptions (dictType) { | ... | @@ -130,7 +129,7 @@ function getOptions (dictType) { |
| 130 | } | 129 | } |
| 131 | function getDetail () { | 130 | function getDetail () { |
| 132 | return new Promise((resolve) => { | 131 | return new Promise((resolve) => { |
| 133 | getMetaStandardFieldDetail(props.data.guid).then((res:any) => { | 132 | getMetaStandardFieldsDetail(props.data.guid).then((res:any) => { |
| 134 | if (res.code === proxy.$passCode) { | 133 | if (res.code === proxy.$passCode) { |
| 135 | resolve(res.data) | 134 | resolve(res.data) |
| 136 | } | 135 | } |
| ... | @@ -156,7 +155,8 @@ function confirm () { | ... | @@ -156,7 +155,8 @@ function confirm () { |
| 156 | ElMessage.success('操作成功') | 155 | ElMessage.success('操作成功') |
| 157 | emit('success') | 156 | emit('success') |
| 158 | visible.value = false | 157 | visible.value = false |
| 159 | return | 158 | } else { |
| 159 | ElMessage.error(res.msg) | ||
| 160 | } | 160 | } |
| 161 | }).finally(() => confirmLoading.value = false) | 161 | }).finally(() => confirmLoading.value = false) |
| 162 | }) | 162 | }) | ... | ... |
| ... | @@ -117,7 +117,7 @@ const selectRowData = ref([]) | ... | @@ -117,7 +117,7 @@ const selectRowData = ref([]) |
| 117 | const selectedRowData = ref([]) | 117 | const selectedRowData = ref([]) |
| 118 | const tableInfo: any = ref({ | 118 | const tableInfo: any = ref({ |
| 119 | id: 'data-source-table', | 119 | id: 'data-source-table', |
| 120 | multiple: false, | 120 | multiple: true, |
| 121 | fixedSelection: true, | 121 | fixedSelection: true, |
| 122 | fields: [ | 122 | fields: [ |
| 123 | { label: "序号", type: "index", width: 56, align: "center" }, | 123 | { label: "序号", type: "index", width: 56, align: "center" }, |
| ... | @@ -413,6 +413,32 @@ function exportData () { | ... | @@ -413,6 +413,32 @@ function exportData () { |
| 413 | }) | 413 | }) |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | function tableSelectionChange (list) { | ||
| 417 | selectedRowData.value = list | ||
| 418 | } | ||
| 419 | function batchDelete () { | ||
| 420 | // console.log(selectedRowData.value) | ||
| 421 | let selectRowGuids = selectedRowData.value.map(v => v.guid) | ||
| 422 | if (selectRowGuids.length === 0) { | ||
| 423 | ElMessage.error('请选择需要删除的数据') | ||
| 424 | return | ||
| 425 | } | ||
| 426 | ElMessageBox.confirm('确定删除吗?', '提示', { | ||
| 427 | confirmButtonText: "确定", | ||
| 428 | cancelButtonText: "取消", | ||
| 429 | type: 'warning', | ||
| 430 | }).then(() => { | ||
| 431 | deleteMetaStandardDataFields(selectRowGuids).then((res:any) => { | ||
| 432 | if (res.code === proxy.$passCode) { | ||
| 433 | ElMessage.success('删除成功') | ||
| 434 | getFirstPageData() | ||
| 435 | } else { | ||
| 436 | ElMessage.error(res.msg) | ||
| 437 | } | ||
| 438 | }) | ||
| 439 | }) | ||
| 440 | } | ||
| 441 | |||
| 416 | onBeforeMount(() => { | 442 | onBeforeMount(() => { |
| 417 | getTree() | 443 | getTree() |
| 418 | }) | 444 | }) |
| ... | @@ -434,7 +460,7 @@ const viewGraph = () => { | ... | @@ -434,7 +460,7 @@ const viewGraph = () => { |
| 434 | <div class="aside_wrap"> | 460 | <div class="aside_wrap"> |
| 435 | <div class="aside_title"> | 461 | <div class="aside_title"> |
| 436 | 元数据标准列表 | 462 | 元数据标准列表 |
| 437 | <el-icon color="#4fa1a4" @click="openStandardDialog" style="width:2em;height:2em" class="add"> | 463 | <el-icon color="#4fa1a4" @click="openStandardDialog" :size="20" class="custom-icon"> |
| 438 | <CirclePlus /> | 464 | <CirclePlus /> |
| 439 | </el-icon> | 465 | </el-icon> |
| 440 | </div> | 466 | </div> |
| ... | @@ -451,12 +477,13 @@ const viewGraph = () => { | ... | @@ -451,12 +477,13 @@ const viewGraph = () => { |
| 451 | <el-button @click="importData" v-preReClick>导入</el-button> | 477 | <el-button @click="importData" v-preReClick>导入</el-button> |
| 452 | <el-button @click="exportData" v-preReClick>导出</el-button> | 478 | <el-button @click="exportData" v-preReClick>导出</el-button> |
| 453 | <el-button @click="viewGraph" v-preReClick>查看</el-button> | 479 | <el-button @click="viewGraph" v-preReClick>查看</el-button> |
| 480 | <el-button @click="batchDelete">批量删除</el-button> | ||
| 454 | </div> | 481 | </div> |
| 455 | <el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="请输入关键字搜索" | 482 | <el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="请输入关键字搜索" |
| 456 | :suffix-icon="Search" clearable @change="val => getFirstPageData()" /> | 483 | :suffix-icon="Search" clearable @change="val => getFirstPageData()" /> |
| 457 | </div> | 484 | </div> |
| 458 | <div class="table_panel_wrap full"> | 485 | <div class="table_panel_wrap full"> |
| 459 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" | 486 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tableSelectionChange="tableSelectionChange" |
| 460 | @tablePageChange="tablePageChange"/> | 487 | @tablePageChange="tablePageChange"/> |
| 461 | </div> | 488 | </div> |
| 462 | </div> | 489 | </div> |
| ... | @@ -479,17 +506,7 @@ const viewGraph = () => { | ... | @@ -479,17 +506,7 @@ const viewGraph = () => { |
| 479 | </template> | 506 | </template> |
| 480 | 507 | ||
| 481 | <style lang="scss"> | 508 | <style lang="scss"> |
| 482 | .standard { | 509 | |
| 483 | .el-icon { | ||
| 484 | cursor: pointer; | ||
| 485 | width: 1em; | ||
| 486 | height: 1em | ||
| 487 | } | ||
| 488 | .el-icon svg { | ||
| 489 | width: 20px; | ||
| 490 | height: 20px; | ||
| 491 | } | ||
| 492 | } | ||
| 493 | </style> | 510 | </style> |
| 494 | <style lang="scss" scoped> | 511 | <style lang="scss" scoped> |
| 495 | .container_wrap { | 512 | .container_wrap { |
| ... | @@ -516,6 +533,14 @@ const viewGraph = () => { | ... | @@ -516,6 +533,14 @@ const viewGraph = () => { |
| 516 | </style> | 533 | </style> |
| 517 | 534 | ||
| 518 | <style lang="scss"> | 535 | <style lang="scss"> |
| 536 | .standard { | ||
| 537 | .custom-icon { | ||
| 538 | svg { | ||
| 539 | width: auto; | ||
| 540 | height: auto; | ||
| 541 | } | ||
| 542 | } | ||
| 543 | } | ||
| 519 | .tree_panel .el-tree .el-tree-node__content { | 544 | .tree_panel .el-tree .el-tree-node__content { |
| 520 | position: relative; | 545 | position: relative; |
| 521 | .list-item-text { | 546 | .list-item-text { | ... | ... |
-
Please register or sign in to post a comment