knowinfo.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <div class="know-info">
  3. <table class="table-card">
  4. <tr>
  5. <th>故障代码</th>
  6. <td>{{ infoObj.code }}</td>
  7. <th>故障标识</th>
  8. <td>{{ infoObj.faultid }}</td>
  9. </tr>
  10. <tr>
  11. <th>停机类型</th>
  12. <td>{{ infoObj.halttype }}</td>
  13. <th>故障名称</th>
  14. <td>{{ infoObj.name }}</td>
  15. </tr>
  16. <tr>
  17. <th>故障原因</th>
  18. <td colspan="3">{{ infoObj.cause }}</td>
  19. </tr>
  20. <tr>
  21. <th>处理方法</th>
  22. <td colspan="3">{{ infoObj.treatmentmeasure }}</td>
  23. </tr>
  24. </table>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. name: "know-info",
  30. props: {
  31. data: Object,
  32. },
  33. data() {
  34. return {
  35. infoObj: "",
  36. };
  37. },
  38. mounted() {
  39. this.infoObj = this.data;
  40. },
  41. watch: {
  42. data(value) {
  43. this.infoObj = value;
  44. console.log(value);
  45. },
  46. },
  47. };
  48. </script>
  49. <style lang="less" scoped>
  50. .know-info {
  51. .table-card {
  52. border-collapse: collapse;
  53. width: 100%;
  54. color: @white;
  55. tr {
  56. font-size: 12px;
  57. th {
  58. width: 120px;
  59. height: 60px;
  60. border: 0.093vh solid @darkgray;
  61. line-height: 27px;
  62. padding: 0 4px;
  63. }
  64. td {
  65. height: 60px;
  66. border: 0.093vh solid @darkgray;
  67. line-height: 27px;
  68. padding: 0 4px;
  69. }
  70. }
  71. }
  72. }
  73. </style>