| | |
| | | <template> |
| | | <el-container> |
| | | <div class="editor-total"> |
| | | <div id="editor" v-html="xmlContent"></div> |
| | | <button @click="saveXml">保 存</button> |
| | | </div> |
| | | </el-container> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :data="tableData" |
| | | @on-load="onLoad"> |
| | | <template slot="groupMapAttrContent" slot-scope="scope"> |
| | | <avue-text-ellipsis :text="scope.row.groupMapAttrContent" :height="50"> |
| | | <small slot="more">...</small> |
| | | </avue-text-ellipsis> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { getGroupMapXML } from "@/api/integration/groupMapAttrXML.js"; |
| | | import {getGroupMapXML} from "@/api/integration/groupMapAttrXML.js"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | xmlContent: "", // 从后端获取的XML内容 |
| | | tableData:[ |
| | | { |
| | | groupMapAttrName:"测试test", |
| | | attrMapPath:"测试test", |
| | | groupMapAttrContent:"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" + |
| | | "<clsfs>\n" + |
| | | " <clsf library=\"10\">\n" + |
| | | " <prop sourceKey=\"c6e_partName\" sourceName=\"Part名称\" targetKey=\"partname\" targetName=\"Part名称\"/>\n" + |
| | | " <prop sourceKey=\"c6e_drawingNo\" sourceName=\"图号\" targetKey=\"drawingno\" targetName=\"图号/标记\"/>\n" + |
| | | " <prop sourceKey=\"c6e_prodModel\" sourceName=\"产品型号\" targetKey=\"model\" targetName=\"初始型号\"/>\n" + |
| | | " <prop sourceKey=\"c6e_partClass\" sourceName=\"Part分类\" targetKey=\"partclass\" targetName=\"Part分类\"/>\n" + |
| | | " <prop sourceKey=\"c6e_partVer\" sourceName=\"Part版本\" targetKey=\"partver\" targetName=\"Part版本\"/>\n" + |
| | | " <prop sourceKey=\"c6e_prodStage\" sourceName=\"制造阶段标识\" targetKey=\"prodstage\" targetName=\"阶段标识\"/> \n" + |
| | | " <prop sourceKey=\"c6e_unit\" sourceName=\"计量单位\" targetKey=\"unit\" targetName=\"计量单位\"/>\n" + |
| | | " <prop sourceKey=\"c6e_virtualPartMark\" sourceName=\"虚拟件标识\" targetKey=\"virtualpartmark\" targetName=\"虚拟件标识\"/>\n" + |
| | | " <prop sourceKey=\"c6e_componentMark\" sourceName=\"组别件标识\" targetKey=\" componentmark\" targetName=\"组别件标识\"/>\n" + |
| | | " <prop sourceKey=\"c6e_characterType\" sourceName=\"特性分类\" targetKey=\"charactertype\" targetName=\"特性分类\"/>\n" + |
| | | " <prop sourceKey=\"c6e_material\" sourceName=\"材料牌号\" targetKey=\"material\" targetName=\"材料牌号\"/>\n" + |
| | | " <prop sourceKey=\"c6e_materialStandard\" sourceName=\"材料技术标准\" targetKey=\"materialstandard\" targetName=\"技术标准\"/>\n" + |
| | | " <prop sourceKey=\"c6e_blankStandard\" sourceName=\"毛坏标准\" targetKey=\"blankstandard\" targetName=\"毛坏标准\"/> \n" + |
| | | " <prop sourceKey=\"c6e_blankType\" sourceName=\"毛坏类型\" targetKey=\"blanktype\" targetName=\"毛坏类型\"/> \n" + |
| | | " <prop sourceKey=\"c6e_prodModel\" sourceName=\"制造型号\" targetKey=\"prodmodel\" targetName=\"制造型号\"/> \n" + |
| | | " <prop sourceKey=\"c6e_stageID\" sourceName=\"设计阶段标识\" targetKey=\"stageid\" targetName=\"设计阶段标识\"/> \n" + |
| | | " <prop sourceKey=\"c6e_remark\" sourceName=\"备注\" targetKey=\"remark\" targetName=\"备注\"/> \n" + |
| | | " <prop sourceKey=\"c6e_productCode\" sourceName=\"产品编码\" targetKey=\"productcode\" targetName=\"产品编码\"/> \n" + |
| | | " <prop sourceKey=\"c6e_hash\" sourceName=\"哈希码\" targetKey=\"hash\" targetName=\"哈希码\"/> \n" + |
| | | " <prop sourceKey=\"c6e_attrSynMark\" sourceName=\"更新标识\" targetKey=\"attrssynmark\" targetName=\"更新标识\"/> \n" + |
| | | " </clsf>\n" + |
| | | "</clsfs>" |
| | | } |
| | | ], |
| | | option:{ |
| | | height:'auto', |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | delBtn:false, |
| | | columnBtn:false, |
| | | refreshBtn:false, |
| | | highlightCurrentRow:true, |
| | | dialogClickModal:true, |
| | | column: [ |
| | | { |
| | | label: "文件名称", |
| | | prop: "groupMapAttrName", |
| | | }, |
| | | { |
| | | label: "文件保存路径", |
| | | prop: "attrMapPath", |
| | | labelWidth:120, |
| | | }, |
| | | { |
| | | type: "textarea", |
| | | label: "文件内容", |
| | | prop: "groupMapAttrContent", |
| | | slot: true, |
| | | minRows: 15, |
| | | span:24 |
| | | }, |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | methods: { |
| | | onLoad() { |
| | | let xmlName = "PDM"; |
| | | getGroupMapXML({ xmlName: xmlName }).then((res) => { |
| | | this.xmlContent = res.data.data; |
| | | console.log(res.data.data); |
| | | }); |
| | | // getGroupMapXML({ xmlName: xmlName }).then((res) => { |
| | | // this.xmlContent = res.data.data; |
| | | // console.log(res.data.data); |
| | | // }); |
| | | }, |
| | | |
| | | }, |