index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <div class="fixture">
  3. <avue-crud class="Myavue" :data="data" :option="option">
  4. <template slot-scope="{ row }" slot="menu">
  5. <el-dropdown style="margin-left: 10px;" size="small">
  6. <span class="el-dropdown-link">
  7. <i class="el-icon-more"></i>
  8. 更多
  9. </span>
  10. <el-dropdown-menu slot="dropdown">
  11. <el-dropdown-item>下发</el-dropdown-item>
  12. <el-dropdown-item>上传附件</el-dropdown-item>
  13. <el-dropdown-item>关闭</el-dropdown-item>
  14. </el-dropdown-menu>
  15. </el-dropdown>
  16. </template>
  17. </avue-crud>
  18. </div>
  19. </template>
  20. <script>
  21. export default {
  22. name: "",
  23. props: {},
  24. components: {},
  25. data() {
  26. return {
  27. data: [
  28. {
  29. name: "张三",
  30. sex: "男",
  31. num: "1",
  32. state: "3",
  33. site: "5",
  34. type: 2,
  35. ready: 3,
  36. remark: "",
  37. plan: "已关闭",
  38. },
  39. {
  40. name: "李四",
  41. sex: "女",
  42. num: "1",
  43. state: "3",
  44. site: "5",
  45. type: 2,
  46. ready: 3,
  47. remark: "",
  48. plan: "已关闭",
  49. },
  50. ],
  51. option: {
  52. align: "center",
  53. menuAlign: "center",
  54. menuWidth: 400,
  55. viewBtn: true,
  56. stripe: true,
  57. selection: true,
  58. menuTitle: "操作",
  59. editBtnText: "修改",
  60. emptyBtnText: "重置",
  61. emptyBtnIcon: "el-icon-refresh-left",
  62. viewBtnIcon: "el-icon-document",
  63. addBtnIcon: "el-icon-plus",
  64. searchMenuPosition: "center",
  65. searchMenuSpan: 6,
  66. excelBtn: true,
  67. index: true,
  68. indexLabel: "序号",
  69. column: [
  70. {
  71. label: "仪器设备名称",
  72. prop: "name",
  73. search: true,
  74. searchLabelWidth: 100,
  75. },
  76. {
  77. label: "仪器设备编号",
  78. prop: "sex",
  79. },
  80. {
  81. label: "日期",
  82. prop: "date",
  83. type: "datetime",
  84. searchRange: true,
  85. search: true,
  86. },
  87. {
  88. label: "检测样品编号",
  89. prop: "num",
  90. },
  91. {
  92. label: "使用开始时间",
  93. prop: "state",
  94. },
  95. {
  96. label: "使用结束时间",
  97. prop: "ready",
  98. },
  99. {
  100. label: "仪器使用性能(前)",
  101. prop: "site",
  102. },
  103. {
  104. label: "仪器使用性能(后)",
  105. prop: "remark",
  106. },
  107. {
  108. label: "计划状态",
  109. prop: "plan",
  110. },
  111. ],
  112. },
  113. };
  114. },
  115. methods: {},
  116. mounted() {},
  117. watch: {},
  118. computed: {},
  119. filters: {},
  120. };
  121. </script>
  122. <style scoped lang="scss">
  123. .fixture {
  124. padding: 20px;
  125. background-color: #fff;
  126. }
  127. .el-dropdown-link {
  128. cursor: pointer;
  129. color: #409eff;
  130. }
  131. .el-icon-arrow-down {
  132. font-size: 12px;
  133. }
  134. </style>