Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

inspection.vue 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div class="page_inspection">
  3. <div style="display:flex;justify-content: space-between;width:100%;margin-bottom:20px;">
  4. <div class="cell clearfix" style="margin-bottom:0;">
  5. <el-input style="width: 180px;margin-right:10px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  6. <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
  7. <label class="title"><span class="name">是否启用</span> : </label>
  8. <el-select v-model="value" style="width:140px;margin-right:10px;" placeholder="请选择">
  9. <el-option
  10. v-for="item in options"
  11. :key="item.value"
  12. :label="item.label"
  13. :value="item.value">
  14. </el-option>
  15. </el-select>
  16. </div>
  17. <el-button type="primary" @click="openForm(0)">新增</el-button>
  18. </div>
  19. <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}">
  20. <el-table-column prop="date" label="序号" width="80" align="center">
  21. <template slot-scope="scope">
  22. {{scope.$index + 1}}
  23. </template>
  24. </el-table-column>
  25. <el-table-column prop="date" label="名称" align="center">
  26. <template slot-scope="scope">
  27. {{scope.row.project_team}}
  28. </template>
  29. </el-table-column>
  30. <el-table-column prop="date" label="拼音助记符" width="140" align="center">
  31. <template slot-scope="scope">
  32. {{scope.row.pinyin}}
  33. </template>
  34. </el-table-column>
  35. <el-table-column prop="date" label="五笔助记符" width="140" align="center">
  36. <template slot-scope="scope">
  37. {{scope.row.wubi}}
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="价格" width="60" align="center">
  41. <template slot-scope="scope">
  42. {{scope.row.price}}
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="date" label="备注" align="center">
  46. <template slot-scope="scope">
  47. {{scope.row.remark}}
  48. </template>
  49. </el-table-column>
  50. <el-table-column prop="date" label="操作" width="300" align="center">
  51. <template slot-scope="scope">
  52. <el-button @click="editProjectTeam(scope.row.id)" type="primary" size="small">编辑</el-button>
  53. <el-button type="danger" size="small" @click="DeleteProjectTeam(scope.row.id,scope.$index)">删除</el-button>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. <el-pagination
  58. @size-change="handleSizeChange"
  59. @current-change="handleCurrentChange"
  60. :page-sizes="[10, 50, 100]"
  61. :page-size="10"
  62. background
  63. align="right"
  64. style="margin-top:20px;"
  65. layout="total, sizes, prev, pager, next, jumper"
  66. :total="total"
  67. >
  68. </el-pagination>
  69. <add-inspection ref="addInspection"></add-inspection>
  70. <edit-inspection ref="editInspection"></edit-inspection>
  71. </div>
  72. </template>
  73. <script>
  74. import addInspection from './addInspection'
  75. import editInspection from './editInspection'
  76. import { getProjectTeamList,DeleteProjectTeam } from "@/api/project/project"
  77. export default {
  78. components:{
  79. addInspection,
  80. editInspection
  81. },
  82. data(){
  83. return{
  84. search_input:'',
  85. options: [{
  86. value: '1',
  87. label: '是'
  88. }, {
  89. value: '2',
  90. label: '否'
  91. },],
  92. value: '',
  93. tableData: [],
  94. limit:20,
  95. page:1,
  96. total:0
  97. }
  98. },
  99. methods:{
  100. handleSizeChange(val) {
  101. this.limit = val
  102. this.getlist()
  103. },
  104. handleCurrentChange(val) {
  105. this.page = val
  106. this.getlist()
  107. },
  108. searchAction(){},
  109. clickSelfPayment(){
  110. this.$refs.selfPayment.show();
  111. },
  112. clickMainTain(){
  113. // this.$refs.maintain.show();
  114. },
  115. openForm(id){
  116. this.$refs.addInspection.show(id);
  117. },
  118. editProjectTeam(id){
  119. this.$refs.editInspection.show(id)
  120. },
  121. getlist(){
  122. const params = {
  123. limit:this.limit,
  124. page:this.page,
  125. }
  126. getProjectTeamList(params).then(response=>{
  127. if(response.data.state == 1){
  128. var projectTeamList = response.data.data.projectTeamList
  129. console.log("projectteamlist",projectTeamList)
  130. this.tableData = projectTeamList
  131. var total = response.data.data.total
  132. this.total = total
  133. }
  134. })
  135. },
  136. DeleteProjectTeam(id,index){
  137. this.$confirm("确认删除此项目组套吗?", "删除", {
  138. confirmButtonText: "确 定",
  139. cancelButtonText: "取 消",
  140. type: "warning"
  141. }).then(() => {
  142. DeleteProjectTeam(id,index).then(response => {
  143. if (response.data.state == 1) {
  144. var msg = response.data.data.msg
  145. this.$message.success("删除成功")
  146. this.tableData.splice(index, 1);
  147. }
  148. });
  149. })
  150. .catch(() => {});
  151. }
  152. },
  153. created(){
  154. this.getlist()
  155. }
  156. }
  157. </script>