index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <div>
  3. <div class="search">
  4. <el-popover placement="top-start" width="300" trigger="hover" content="具体元器件型号所对应的元器件参数的具体值">
  5. <i slot="reference" class="el-icon-question" />
  6. </el-popover>
  7. <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
  8. <el-button slot="append" icon="el-icon-search" />
  9. </el-input>
  10. </div>
  11. <el-table :data="product" stripe style="width: 100%">
  12. <el-table-column type="selection" width="55" align="center" />
  13. <el-table-column prop="id" label="分类id" width="100" />
  14. <el-table-column prop="name" label="名称" width="180" />
  15. <el-table-column prop="model" label="型号" />
  16. <el-table-column prop="Images" label="Images" />
  17. <el-table-column prop="Description" label="Description" align="center" />
  18. <el-table-column prop="Temperature accuracytyp(typ)(°C)" label="Temperature accuracytyp(typ)(°C)" />
  19. <el-table-column prop="Supply voltage (min) (V)" label="Supply voltage (min) (V)" />
  20. <el-table-column prop="Supply voltage (max) (V)" label="Supply voltage (max) (V)" />
  21. <el-table-column prop="Operating temperature range (°C)" label="Operating temperature range (°C)" />
  22. <el-table-column prop="Status" label="Status" />
  23. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  24. <template slot-scope="scope">
  25. <el-button
  26. size="mini"
  27. type="text"
  28. @click="handleUpdate(scope.row)"
  29. >编辑</el-button>
  30. </template>
  31. </el-table-column>
  32. </el-table>
  33. </div>
  34. </template>
  35. <script>
  36. import data from '@/data/customData/compDetail.json'
  37. export default {
  38. name: 'CompDetail',
  39. data() {
  40. return {
  41. // 遮罩层
  42. loading: true,
  43. // 选中数组
  44. ids: [],
  45. // 非单个禁用
  46. single: true,
  47. // 非多个禁用
  48. multiple: true,
  49. // 显示搜索条件
  50. showSearch: true,
  51. // 总条数
  52. total: 0,
  53. // 弹出层标题
  54. title: '',
  55. // 是否显示弹出层
  56. open: false,
  57. // 表单参数
  58. form: {},
  59. // 表单校验
  60. rules: {},
  61. // 搜索内容
  62. search: '',
  63. product: data.product
  64. }
  65. },
  66. methods: {
  67. /** 编辑按钮操作 */
  68. handleUpdate(row) {
  69. // const id = row.id || this.ids
  70. // this.editDialog = true
  71. // this.xmlContent = row.content
  72. },
  73. /** 搜索按钮操作 */
  74. handleQuery() {
  75. // this.queryParams.pageNum = 1
  76. // this.getList()
  77. },
  78. /** 重置按钮操作 */
  79. resetQuery() {
  80. // this.resetForm('queryForm')
  81. // this.handleQuery()
  82. }
  83. }
  84. }
  85. </script>
  86. <style scoped>
  87. .search{
  88. width: 100%;
  89. height: 60px;
  90. position: relative;
  91. }
  92. .input-with-select{
  93. position: absolute;
  94. top: 20px;
  95. right: 20px;
  96. }
  97. .el-icon-question{
  98. margin: 20px;
  99. font-size: 24px;
  100. color: #5cb6ff;
  101. }
  102. </style>