田源
2024-01-08 78de02bda0021b6e574ed575a9877471d0fb08ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<template>
  <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";
 
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() {
 
  },
  created() {
    this.onLoad();
  },
  methods: {
    onLoad() {
      let xmlName = "PDM";
      //   getGroupMapXML({ xmlName: xmlName }).then((res) => {
      //     this.xmlContent = res.data.data;
      //     console.log(res.data.data);
      //   });
    },
 
  },
};
</script>
<style>
.editor-total {
  width: 100%;
  height: 100%;
}
</style>