1
0

knowinfo.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. console.log('this.infoObj',this.infoObj);
  41. },
  42. created(){
  43. },
  44. watch: {
  45. data(value) {
  46. this.infoObj = value;
  47. },
  48. },
  49. };
  50. </script>
  51. <style lang="less" scoped>
  52. .know-info {
  53. .table-card {
  54. border-collapse: collapse;
  55. width: 100%;
  56. color: @white;
  57. tr {
  58. font-size: 12px;
  59. th {
  60. width: 120px;
  61. height: 60px;
  62. border: 0.093vh solid @darkgray;
  63. line-height: 27px;
  64. padding: 0 4px;
  65. }
  66. td {
  67. height: 60px;
  68. border: 0.093vh solid @darkgray;
  69. line-height: 27px;
  70. padding: 0 4px;
  71. }
  72. }
  73. }
  74. }
  75. </style>