taskSample.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <div>
  3. <div slot="header" class="clearfix">
  4. <el-breadcrumb separator-class="el-icon-arrow-right">
  5. <el-breadcrumb-item >首页</el-breadcrumb-item>
  6. <el-breadcrumb-item>监测任务</el-breadcrumb-item>
  7. <el-breadcrumb-item>专项监测</el-breadcrumb-item>
  8. <el-breadcrumb-item>抽样单</el-breadcrumb-item>
  9. </el-breadcrumb>
  10. </div>
  11. <!-- 下拉菜单 -->
  12. <div>
  13. 牵头单位
  14. <el-select v-model="value" placeholder="请选择">
  15. <el-option
  16. v-for="item in options"
  17. :key="item.value"
  18. :label="item.label"
  19. :value="item.value">
  20. </el-option>
  21. </el-select>
  22. <!-- 返回按钮 -->
  23. <div class="btns">
  24. <el-button type="info" size="small" @click="returnTask">
  25. 返回任务列表
  26. </el-button>
  27. <el-button type="info" size="small" @click="sendBack">
  28. 退回
  29. </el-button>
  30. </div>
  31. </div>
  32. <!-- 表格数据区域-->
  33. <div class="table">
  34. <el-table ref="multipleTable"
  35. :data="tableData"
  36. border stripe highlight-current-row
  37. style="width: 100%"
  38. :row-style="rowStyle"
  39. :cell-style="cellStyle"
  40. @selection-change="handleSelectionChange">
  41. <el-table-column type="selection" width="50">
  42. </el-table-column>
  43. <el-table-column label="序号" width="50px">
  44. <template slot-scope="scope">
  45. {{ scope.$index+1 }}
  46. </template>
  47. </el-table-column>
  48. <el-table-column
  49. :key="table.label"
  50. v-for="table in tableHeader"
  51. :label="table.label"
  52. :prop="table.prop"
  53. align="center"
  54. :width="table.width"
  55. :fixed="table.fixed">
  56. </el-table-column>
  57. <el-table-column label="操作" align="center" fixed="right">
  58. <!-- 操作按钮区域的作用域插槽 -->
  59. <template slot-scope="scope">
  60. <el-button type="success" size="mini" @click="readDialogVisible1(scope.row)">抽样单详情</el-button>
  61. </template>
  62. </el-table-column>
  63. </el-table>
  64. <!-- 分页器区域-->
  65. <div class="block">
  66. <el-pagination
  67. @size-change="handleSizeChange"
  68. @current-change="handleCurrentChange"
  69. :current-page="queryInfo.pageNum"
  70. :page-sizes="[10, 15, 20]"
  71. :page-size="queryInfo.pageSize"
  72. layout="total, sizes, prev, pager, next, jumper"
  73. :total="total"
  74. background />
  75. </div>
  76. </div>
  77. </div>
  78. </template>
  79. <script>
  80. const token = window.sessionStorage.getItem('token')
  81. export default {
  82. name: '',
  83. data() {
  84. return {
  85. total:0,
  86. options: [{
  87. value: '选项1',
  88. label: '部级监测机构'
  89. }],
  90. queryInfo:{
  91. year:'',
  92. task_name:'',
  93. starttime:'',
  94. endtime:'',
  95. ispublic:'',
  96. pageSize:10,
  97. pageNum:1,
  98. task_class:'专项监测'
  99. },
  100. cellStyle: {
  101. padding: 2 + 'px'
  102. },
  103. rowStyle: {
  104. height: 35 + 'px'
  105. },
  106. tableHeader: [{
  107. label: '样品名称',
  108. prop: '',
  109. width: 150
  110. // fixed: 'left'
  111. },
  112. {
  113. label: '样品编码',
  114. prop: '',
  115. width: 80
  116. // fixed: 'left'
  117. }, {
  118. label: '商标',
  119. prop: '',
  120. width: 150
  121. // fixed: 'left'
  122. },
  123. {
  124. label: '等级',
  125. prop: '',
  126. width: 120
  127. },
  128. {
  129. label: '抽样基数',
  130. prop: '',
  131. width: 120
  132. },
  133. {
  134. label: '抽样场所',
  135. prop: '',
  136. width: 120
  137. },
  138. {
  139. label: '状态',
  140. prop: '',
  141. width: 180
  142. }
  143. ],
  144. // 数据表格数据
  145. tableData: []
  146. }
  147. },
  148. created() {
  149. },
  150. methods: {
  151. sendBack(){},
  152. // 获取牵头单位
  153. getTaskById(){
  154. },
  155. // 获取抽样单列表
  156. getZLTaskSampleListByJcInfo(){
  157. },
  158. returnTask(){
  159. this.$router.push('routineMonitor')
  160. },
  161. handleSizeChange(val) {
  162. console.log(`每页 ${val} 条`);
  163. },
  164. handleCurrentChange(val) {
  165. console.log(`当前页: ${val}`);
  166. }
  167. },
  168. }
  169. </script>
  170. <style>
  171. .block{
  172. padding: 10px;
  173. }
  174. btns{
  175. float:right;
  176. }
  177. </style>