|
@ -1,5 +1,11 @@ |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
<el-form :model="form" ref="formRef" label-width="120px" > |
|
|
<el-tabs v-model="activeName" style="margin-top: 8px"> |
|
|
|
|
|
<el-tab-pane label="图谱" name="1"> |
|
|
|
|
|
<treeNodeg6 ref="treeGraph" :mockData="mockData" /> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
<el-tab-pane label="表格" name="2"> |
|
|
|
|
|
<el-form :model="form" ref="formRef" label-width="120px" > |
|
|
<div class="form-container"> |
|
|
<div class="form-container"> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<!-- 代码归属 --> |
|
|
<!-- 代码归属 --> |
|
@ -20,24 +26,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 查询表单 --> |
|
|
|
|
|
<!-- <div class="query-form-container"> |
|
|
|
|
|
<el-form :model="queryParams" ref="queryRef" :inline="true"> |
|
|
|
|
|
<el-form-item label="代码值/名称" prop="codeNum"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="queryParams.codeNum" |
|
|
|
|
|
placeholder="请输入标准代码编号" |
|
|
|
|
|
clearable |
|
|
|
|
|
style="width: 220px" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<el-button type="primary" @click="handleQuery">搜索</el-button> |
|
|
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</div> --> |
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -116,12 +105,13 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
</el-table> |
|
|
</el-table> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
</el-tabs> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, reactive, onMounted, toRefs } from 'vue'; |
|
|
import { ref, reactive, onMounted, toRefs } from 'vue'; |
|
|
import { listStdCodemap,getStdCode} from "@/api/datastd/std"; // 更新为新的接口 |
|
|
import { listStdCodemap,getStdCode,getStdCodeMap} from "@/api/datastd/std"; // 更新为新的接口 |
|
|
|
|
|
import treeNodeg6 from "./treeNodeg6.vue"; |
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance(); |
|
|
const { proxy } = getCurrentInstance(); |
|
|
const { std_code_status } = proxy.useDict("std_code_status"); |
|
|
const { std_code_status } = proxy.useDict("std_code_status"); |
|
@ -134,6 +124,7 @@ const props = defineProps({ |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const queryParams = ref({ |
|
|
const queryParams = ref({ |
|
|
codeNum: '', |
|
|
codeNum: '', |
|
|
parentId: props.codeId, |
|
|
parentId: props.codeId, |
|
@ -159,7 +150,7 @@ const form = ref({ |
|
|
codeMapNum: '', |
|
|
codeMapNum: '', |
|
|
sysId: undefined |
|
|
sysId: undefined |
|
|
}); |
|
|
}); |
|
|
|
|
|
const activeName = ref("1"); // 默认打开图谱 |
|
|
const tableData = ref([]); |
|
|
const tableData = ref([]); |
|
|
const selections = ref([]); |
|
|
const selections = ref([]); |
|
|
const loading = ref(false); |
|
|
const loading = ref(false); |
|
@ -222,16 +213,41 @@ const resetQuery = () => { |
|
|
defineExpose({ |
|
|
defineExpose({ |
|
|
selections |
|
|
selections |
|
|
}); |
|
|
}); |
|
|
|
|
|
const treeGraph = ref(null); |
|
|
|
|
|
|
|
|
|
|
|
const mockData = ref({ |
|
|
|
|
|
id: "g1", |
|
|
|
|
|
name: "", |
|
|
|
|
|
count: 123456, |
|
|
|
|
|
label: "", |
|
|
|
|
|
rate: 1.0, |
|
|
|
|
|
status: "G", |
|
|
|
|
|
variableValue: "代码", |
|
|
|
|
|
variableUp: true, |
|
|
|
|
|
children:[] |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
getStdCode(props.codeId).then(response => { |
|
|
nextTick(() => { |
|
|
|
|
|
getStdCode(props.codeId).then(response => { |
|
|
form.value = response.data; |
|
|
form.value = response.data; |
|
|
queryParams.value.codeType=form.value.codeType |
|
|
queryParams.value.codeType=form.value.codeType |
|
|
|
|
|
mockData.value.variableValue=form.value.codeType == "sys"?"系统级":"公司级" |
|
|
|
|
|
mockData.value.name=form.value.codeName |
|
|
|
|
|
mockData.value.label=form.value.codeNum |
|
|
|
|
|
getStdCodeMap(form.value.id).then(response => { |
|
|
|
|
|
mockData.value.children = response.data.children; |
|
|
|
|
|
tableData.value = response.data.tableData; |
|
|
|
|
|
if (treeGraph.value) { |
|
|
|
|
|
treeGraph.value.refreshGraph(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
getList(); |
|
|
getList(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// getcompanyList() |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|