handlingFee.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <!-- 港口装卸费页面 -->
  3. <div class="homeworkPath">
  4. <div class="top">
  5. <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
  6. <el-button type="primary" class="btn" @click="addclick">
  7. 新增
  8. </el-button>
  9. </div>
  10. <dilTable v-bind.sync="option">
  11. <el-table-column fixed="right" label="操作" align="center" width="100">
  12. <template slot-scope="scope">
  13. <!-- <el-button @click="click(scope.row.feeId)" type="text" size="small"
  14. >编辑</el-button
  15. > -->
  16. <el-button
  17. type="text"
  18. size="small"
  19. @click="deleteclick(scope.row.feeId)"
  20. >删除</el-button
  21. >
  22. </template>
  23. </el-table-column>
  24. </dilTable>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. name: "homeworkPath",
  30. data() {
  31. return {
  32. input:"",
  33. restaurants: [],
  34. state: "",
  35. option: {
  36. // 表格请求数据的地址
  37. requestUrl: "/api/v1/bms/getPortHandlingFeeList?apiId=151"
  38. },
  39. };
  40. },
  41. mounted() {
  42. },
  43. methods: {
  44. handleSelect(item) {
  45. console.log(item);
  46. },
  47. onclick() {
  48. this.option.requestUrl = "/api/v1/bms/getPortHandlingFeeList?apiId=151&con="+this.input;
  49. },
  50. click(feeId) {
  51. this.$router.push("/updateHandlingFee/" + feeId);
  52. },
  53. addclick() {
  54. this.$router.push("/addHandlingFee");
  55. },
  56. deleteclick(scope) {
  57. let feeId = scope;
  58. this.$confirm("是否删除", "提示", {
  59. confirmButtonText: "确定",
  60. cancelButtonText: "取消",
  61. type: "warning",
  62. center: true,
  63. })
  64. .then(() => {
  65. this.axios
  66. .post(
  67. "/api/v1/bms/deletePortHandlingFee/" + feeId
  68. )
  69. .then(() => {
  70. this.$message({
  71. type: "success",
  72. message: "删除成功!",
  73. });
  74. this.$router.go(0);
  75. });
  76. })
  77. .catch(() => {
  78. this.$message({
  79. type: "info",
  80. message: "取消删除!",
  81. });
  82. });
  83. },
  84. },
  85. };
  86. </script>
  87. <style lang='scss' scoped>
  88. .homeworkPath {
  89. .top {
  90. padding: 1.25rem 1.875rem;
  91. .el-input {
  92. width: 250px;
  93. }
  94. }
  95. }
  96. </style>