wagonUnLoadMine.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <!-- 卸车作业页面 -->
  3. <div class="homeworkPath">
  4. <div class="top">
  5. <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input>
  6. <el-button type="primary" class="btn" @click="onclick">
  7. <i class="el-icon-search"></i>查询
  8. </el-button>
  9. <el-button type="primary" @click="btnclick(0)">
  10. <i class="el-icon-plus"></i>新增
  11. </el-button>
  12. </div>
  13. <dilTable v-bind.sync="option">
  14. <el-table-column fixed="right" label="操作" width="100">
  15. <template slot-scope="scope">
  16. <el-button @click="click(scope.row.unloadingId)" type="text" size="small"
  17. >修改</el-button
  18. >
  19. <el-button
  20. type="text"
  21. size="small"
  22. @click="deleteclick(scope.row.unloadingId)"
  23. >删除</el-button
  24. >
  25. </template>
  26. </el-table-column>
  27. </dilTable>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. name: "wagonUnload",
  33. data() {
  34. return {
  35. input: "",
  36. option: {
  37. // 表格请求数据的地址
  38. requestUrl: "/api/v1/tms/getTmstrainWagonUnLoad?apiId=214&resultType=3",
  39. },
  40. };
  41. },
  42. methods: {
  43. onclick() {
  44. this.option.requestUrl = "/api/v1/tms/getTmstrainWagonUnLoad?apiId=60&resultType=3&con="+this.input;
  45. },
  46. btnclick() {
  47. this.$router.push("/wagonUnLoadAdd");
  48. },
  49. click(unloadingId) {
  50. this.$router.push("/wagonUnLoadEdit/" + unloadingId);
  51. },
  52. deleteclick(scope) {
  53. let unloadingId = scope;
  54. this.$confirm("是否删除", "提示", {
  55. confirmButtonText: "确定",
  56. cancelButtonText: "取消",
  57. type: "warning",
  58. center: true,
  59. })
  60. .then(() => {
  61. this.$message({
  62. type: "success",
  63. message: "删除成功!",
  64. });
  65. this.axios
  66. .post(
  67. "/api/v1/tms/deleteTmstrainWagonUnLoadResultByUnLoadingId?unloadingId=" + unloadingId
  68. )
  69. .then(() => {
  70. this.$router.go(0);
  71. });
  72. })
  73. .catch(() => {
  74. this.$message({
  75. type: "info",
  76. message: "取消删除!",
  77. });
  78. });
  79. },
  80. },
  81. };
  82. </script>
  83. <style lang='scss' scoped>
  84. .homeworkPath {
  85. .top {
  86. padding: 1.25rem 0.375rem;
  87. .el-input{
  88. width: 20%;
  89. margin-right: 40rpx;
  90. }
  91. .btn{
  92. width: 5.5%;
  93. margin-left: 0.25rem;
  94. }
  95. }
  96. }
  97. </style>