671fb115 by fanguang Committed by lihua

fix

1 parent 3d4e4d90
......@@ -389,6 +389,11 @@ export const getMetaStandardField = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/list-by-meta-standard-guid?metaStandardGuid=${guid}`,
method: 'get'
})
/** 元数据标准字段详情 */
export const getMetaStandardFieldsDetail = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/detail?guid=${guid}`,
method: 'get'
})
/** 根据元数据标准展示字段去获取未展示的详情信息 */
export const getMetaStandardFieldDetail = (guid) => request({
......
......@@ -2,13 +2,13 @@
<el-drawer
v-model="visible"
:title="title"
width="520"
size="520px"
class="standard-meta-modal"
:close-on-click-modal="false"
>
<el-form :model="form" :rules="formRules" ref="formEl" style="min-height: 200px;" require-asterisk-position="right">
<el-row>
<el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;margin-bottom:10px;">
<el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;">
<el-form-item :label="item.fileNameCodeName" :prop="item.fileNameCode">
<el-input
v-if="item.inputTypeCode == '1' || item.inputTypeCode == '3'"
......@@ -21,7 +21,6 @@
filterable
clearable
placeholder="请选择"
size="small"
>
<el-option v-for="op in formOptions[item.fileNameCode]" :label="op.label" :value="op.value" :key="op.value"></el-option>
</el-select>
......@@ -49,7 +48,7 @@
import { watch } from 'vue'
import { ElMessage } from "element-plus";
import { getParamsList } from '@/api/modules/dataAsset'
import { saveMetaStandardDataFields, getMetaStandardFieldDetail, getStandardCodeTree } from '@/api/modules/dataMetaService'
import { saveMetaStandardDataFields, getMetaStandardFieldsDetail, getStandardCodeTree } from '@/api/modules/dataMetaService'
const { proxy } = getCurrentInstance() as any;
const props = defineProps({
......@@ -130,7 +129,7 @@ function getOptions (dictType) {
}
function getDetail () {
return new Promise((resolve) => {
getMetaStandardFieldDetail(props.data.guid).then((res:any) => {
getMetaStandardFieldsDetail(props.data.guid).then((res:any) => {
if (res.code === proxy.$passCode) {
resolve(res.data)
}
......@@ -156,7 +155,8 @@ function confirm () {
ElMessage.success('操作成功')
emit('success')
visible.value = false
return
} else {
ElMessage.error(res.msg)
}
}).finally(() => confirmLoading.value = false)
})
......
......@@ -117,7 +117,7 @@ const selectRowData = ref([])
const selectedRowData = ref([])
const tableInfo: any = ref({
id: 'data-source-table',
multiple: false,
multiple: true,
fixedSelection: true,
fields: [
{ label: "序号", type: "index", width: 56, align: "center" },
......@@ -413,6 +413,32 @@ function exportData () {
})
}
function tableSelectionChange (list) {
selectedRowData.value = list
}
function batchDelete () {
// console.log(selectedRowData.value)
let selectRowGuids = selectedRowData.value.map(v => v.guid)
if (selectRowGuids.length === 0) {
ElMessage.error('请选择需要删除的数据')
return
}
ElMessageBox.confirm('确定删除吗?', '提示', {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning',
}).then(() => {
deleteMetaStandardDataFields(selectRowGuids).then((res:any) => {
if (res.code === proxy.$passCode) {
ElMessage.success('删除成功')
getFirstPageData()
} else {
ElMessage.error(res.msg)
}
})
})
}
onBeforeMount(() => {
getTree()
})
......@@ -434,7 +460,7 @@ const viewGraph = () => {
<div class="aside_wrap">
<div class="aside_title">
元数据标准列表
<el-icon color="#4fa1a4" @click="openStandardDialog" style="width:2em;height:2em" class="add">
<el-icon color="#4fa1a4" @click="openStandardDialog" :size="20" class="custom-icon">
<CirclePlus />
</el-icon>
</div>
......@@ -451,12 +477,13 @@ const viewGraph = () => {
<el-button @click="importData" v-preReClick>导入</el-button>
<el-button @click="exportData" v-preReClick>导出</el-button>
<el-button @click="viewGraph" v-preReClick>查看</el-button>
<el-button @click="batchDelete">批量删除</el-button>
</div>
<el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="请输入关键字搜索"
:suffix-icon="Search" clearable @change="val => getFirstPageData()" />
</div>
<div class="table_panel_wrap full">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick"
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tableSelectionChange="tableSelectionChange"
@tablePageChange="tablePageChange"/>
</div>
</div>
......@@ -479,17 +506,7 @@ const viewGraph = () => {
</template>
<style lang="scss">
.standard {
.el-icon {
cursor: pointer;
width: 1em;
height: 1em
}
.el-icon svg {
width: 20px;
height: 20px;
}
}
</style>
<style lang="scss" scoped>
.container_wrap {
......@@ -516,6 +533,14 @@ const viewGraph = () => {
</style>
<style lang="scss">
.standard {
.custom-icon {
svg {
width: auto;
height: auto;
}
}
}
.tree_panel .el-tree .el-tree-node__content {
position: relative;
.list-item-text {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!