Step2.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <div>
  3. <el-row :gutter="20">
  4. <el-col :span="6">
  5. <el-card>
  6. <div class="mb-4" v-for="item in 10" :key="item">
  7. <div class="mb-2">
  8. <i class="el-icon-setting text-red-400 font-bold mr-2"></i>
  9. <span>技术阵地电缆网</span>
  10. </div>
  11. <el-card>
  12. <div class="flex justify-between">
  13. <div class="font-bold">
  14. <i class="el-icon-setting"></i>
  15. 故障概率
  16. </div>
  17. <div>16.82%</div>
  18. </div>
  19. <div class="mt-5">
  20. <el-radio-group
  21. v-model="radio"
  22. class="flex items-center justify-around"
  23. >
  24. <el-radio :label="1">存在故障</el-radio>
  25. <el-radio :label="2">排除故障</el-radio>
  26. </el-radio-group>
  27. </div>
  28. </el-card>
  29. </div>
  30. </el-card>
  31. </el-col>
  32. <el-col :span="10">
  33. <el-card>
  34. <div class="flex flex-col">
  35. <el-select v-model="value" class="mb-2">
  36. <el-option
  37. v-for="item in options"
  38. :key="item.value"
  39. :label="item.label"
  40. :value="item.value"
  41. >
  42. </el-option>
  43. </el-select>
  44. <el-select v-model="value1" class="mb-2">
  45. <el-option
  46. v-for="item in options1"
  47. :key="item.value"
  48. :label="item.label"
  49. :value="item.value"
  50. >
  51. </el-option>
  52. </el-select>
  53. <div
  54. id="myDiagramDiv"
  55. style="width: 100%; min-height: 70vh; background: #ddd"
  56. ></div>
  57. </div>
  58. </el-card>
  59. </el-col>
  60. <el-col :span="8">
  61. <el-card>
  62. <div class="mb-5">排故指南</div>
  63. <div class="" style="min-height:76.5vh">
  64. <div>1检测装备升级</div>
  65. <div>2测试软件是否正常</div>
  66. </div>
  67. </el-card>
  68. </el-col>
  69. </el-row>
  70. </div>
  71. </template>
  72. <script>
  73. import ForceGuideChart from "./ForceGuideChart.vue";
  74. export default {
  75. name: "Step2",
  76. components: {
  77. ForceGuideChart,
  78. },
  79. data() {
  80. return {
  81. linkList: [
  82. { from: "a", to: "b" },
  83. { from: "a", to: "c" },
  84. { from: "a", to: "d" },
  85. { from: "a", to: "e" },
  86. { from: "e", to: "f" },
  87. { from: "e", to: "g" },
  88. ],
  89. dataList: [
  90. {
  91. name: "AAA",
  92. key: "a",
  93. loc: "0 0",
  94. category: "unit",
  95. diagnosisStatus: 0,
  96. },
  97. {
  98. name: "BBB",
  99. key: "b",
  100. loc: "100 50",
  101. category: "unit",
  102. diagnosisStatus: 1,
  103. },
  104. {
  105. name: "CCC",
  106. key: "c",
  107. loc: "100 50",
  108. category: "unit",
  109. diagnosisStatus: 1,
  110. },
  111. {
  112. name: "DDD",
  113. key: "d",
  114. loc: "100 50",
  115. category: "unit",
  116. diagnosisStatus: 1,
  117. },
  118. {
  119. name: "EEE",
  120. key: "e",
  121. loc: "100 50",
  122. category: "unit",
  123. diagnosisStatus: 1,
  124. },
  125. {
  126. name: "FFF",
  127. key: "f",
  128. loc: "100 50",
  129. category: "unit",
  130. diagnosisStatus: 1,
  131. },
  132. {
  133. name: "GGG",
  134. key: "g",
  135. loc: "100 50",
  136. category: "unit",
  137. diagnosisStatus: 1,
  138. },
  139. ],
  140. radio: 1,
  141. options: [
  142. {
  143. value: "控制系统",
  144. label: "控制系统",
  145. },
  146. {
  147. value: "指挥系统",
  148. label: "指挥系统",
  149. },
  150. ],
  151. value: "控制系统",
  152. options1: [
  153. {
  154. value: "测发控报表与未修配电器相关错误",
  155. label: "测发控报表与未修配电器相关错误",
  156. },
  157. {
  158. value: "测发控报表错误",
  159. label: "测发控报表错误",
  160. },
  161. ],
  162. value1: "测发控报表与未修配电器相关错误",
  163. };
  164. },
  165. mounted() {
  166. this.goInit();
  167. },
  168. methods: {
  169. goInit() {
  170. var $ = go.GraphObject.make;
  171. var myDiagram = $(go.Diagram, "myDiagramDiv", {
  172. initialContentAlignment: go.Spot.Center, // center Diagram contents
  173. "undoManager.isEnabled": true, // enable Ctrl-Z to undo and Ctrl-Y to redo
  174. layout: $(
  175. go.TreeLayout, // specify a Diagram.layout that arranges trees
  176. { angle: 90, layerSpacing: 35 }
  177. ),
  178. });
  179. // the template we defined earlier
  180. myDiagram.nodeTemplate = $(
  181. go.Node,
  182. "Auto",
  183. { desiredSize: new go.Size(120, 50) },
  184. { background: "white" },
  185. // $(
  186. // go.Picture,
  187. // { margin: 10, width: 50, height: 50 },
  188. // new go.Binding("source")
  189. // ),
  190. $(
  191. go.TextBlock,
  192. "Default Text",
  193. {
  194. margin: 12,
  195. stroke: "black",
  196. font: " 15px sans-serif",
  197. textAlign: "center",
  198. },
  199. new go.Binding("text", "name")
  200. )
  201. );
  202. // define a Link template that routes orthogonally, with no arrowhead
  203. myDiagram.linkTemplate = $(
  204. go.Link,
  205. { routing: go.Link.Orthogonal, corner: 5 },
  206. $(go.Shape, { strokeWidth: 1, stroke: "#555" })
  207. ); // the link shape
  208. var model = $(go.TreeModel);
  209. model.nodeDataArray = [
  210. { key: "1", name: "显示控制", source: "cat1.png" },
  211. { key: "2", parent: "1", name: "终端故障", source: "cat2.png" },
  212. { key: "3", parent: "1", name: "测控设备", source: "cat3.png" },
  213. { key: "4", parent: "3", name: "设备故障", source: "cat4.png" },
  214. { key: "5", parent: "3", name: "地面", source: "cat5.png" },
  215. { key: "6", parent: "2", name: "电缆网故障", source: "cat6.png" },
  216. ];
  217. myDiagram.model = model;
  218. },
  219. },
  220. };
  221. </script>
  222. <style scoped lang="scss"></style>