bargeShip.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <!-- 驳船作业页面 -->
  3. <div class="shipTransport">
  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" class="btn" @click="addclick">
  10. <i class="el-icon-circle-plus-outline"></i>新增
  11. </el-button>
  12. </div>
  13. <dilTable v-bind.sync="option">
  14. <el-table-column fixed="right" label="操作" align="center" width="100">
  15. <template slot-scope="scope">
  16. <el-button @click="click(scope.row.bargeOperationId)" type="text" size="small"
  17. >编辑</el-button
  18. >
  19. <el-button
  20. type="text"
  21. size="small"
  22. @click="deleteclick(scope.row.bargeOperationId)"
  23. >删除</el-button
  24. >
  25. </template>
  26. </el-table-column>
  27. </dilTable>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. name: "homeworkPath",
  33. data() {
  34. return {
  35. restaurants: [],
  36. input: "",
  37. option: {
  38. // 表格请求数据的地址
  39. requestUrl: "/api/v1/tms/getBargeOperationList?apiId=61",
  40. },
  41. };
  42. },
  43. mounted() {
  44. },
  45. methods: {
  46. onclick() {
  47. this.option.requestUrl = "/api/v1/tms/getBargeOperationList?apiId=61&con=" + this.input;
  48. },
  49. click(bargeOperationId) {
  50. this.$router.push("/updateBargeShip/" + bargeOperationId);
  51. },
  52. addclick() {
  53. this.$router.push("/addBargeShip/");
  54. },
  55. // deleteclick(scope) {
  56. // let pathId = scope;
  57. // this.axios
  58. // .post("/api/v1/tms/operationPath/operationPathDelete?pathId=" + pathId)
  59. // .then((res) => {
  60. // this.$message({
  61. // message: "删除成功",
  62. // type: "success",
  63. // });
  64. // this.$router.go(0);
  65. // });
  66. // },
  67. deleteclick(scope) {
  68. let bargeOperationId = scope;
  69. this.$confirm("是否删除", "提示", {
  70. confirmButtonText: "确定",
  71. cancelButtonText: "取消",
  72. type: "warning",
  73. center: true,
  74. })
  75. .then(() => {
  76. this.axios
  77. .post(
  78. "/api/v1/shipTms/tmsshipbargeoperations/deleteBargeOperation/" + bargeOperationId
  79. )
  80. .then(() => {
  81. this.$message({
  82. type: "success",
  83. message: "删除成功!",
  84. });
  85. this.$router.go(0);
  86. });
  87. })
  88. .catch(() => {
  89. this.$message({
  90. type: "info",
  91. message: "取消删除!",
  92. });
  93. });
  94. },
  95. },
  96. };
  97. </script>
  98. <style lang='scss' scoped>
  99. .shipTransport {
  100. .top {
  101. padding: 1.25rem 0.375rem;
  102. .el-input{
  103. width: 20%;
  104. margin-right: 40rpx;
  105. }
  106. .btn{
  107. width: 5.5%;
  108. margin-left: 0.25rem;
  109. }
  110. }
  111. }
  112. </style>