| | |
| | | <template v-slot:left> |
| | | <el-button |
| | | icon="ele-ArrowLeft" |
| | | text |
| | | link |
| | | style="margin-right: 10px; margin-left: 10px; width: 40px" |
| | | size="small" |
| | | @click="backLastPage" |
| | |
| | | import titleBox from '/@/components/titleBox.vue'; |
| | | |
| | | import { v4 as uuid } from 'uuid'; |
| | | import { getAmisXml } from '/@/api/supervisorAdmin'; |
| | | import * as supervisorApi from '/@/api/supervisorAdmin'; |
| | | import { useCompRef } from '/@/utils/types'; |
| | | import { XMLParser, XMLBuilder, XMLValidator } from 'fast-xml-parser'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | const props = defineProps(['supervisor']); |
| | | const emit = defineEmits(['backLastPage']); |
| | |
| | | }); |
| | | }; |
| | | |
| | | |
| | | const xmlParserInstance = new XMLParser(); |
| | | const xmlBuilderInstance = new XMLBuilder(); |
| | | let xmlConfig = null; |
| | | let pageConfig = null; |
| | | onMounted(async () => { |
| | | xmlConfig = await getAmisXml({ |
| | | pageConfig = await supervisorApi.getLowCodeJson({ |
| | | agent_id: props.supervisor.id, |
| | | }); |
| | | if (!xmlConfig?.amis_xml) { |
| | | if (!pageConfig?.amis_xml) { |
| | | // ElMessage.warning('暂无数据'); |
| | | return; |
| | | } |
| | | const jObj = xmlParserInstance.parse(xmlConfig.amis_xml); |
| | | if (!jObj?.AMIS_JSON) { |
| | | return; |
| | | } |
| | | const amisJSON = jObj.AMIS_JSON; |
| | | parseJSONData(amisJSON); |
| | | // const jObj = xmlParserInstance.parse(pageConfig.amis_xml); |
| | | // if (!jObj?.AMIS_JSON) { |
| | | // return; |
| | | // } |
| | | // const amisJSON = jObj.AMIS_JSON; |
| | | // parseJSONData(amisJSON); |
| | | }); |
| | | </script> |