pier.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //资源管理港口
  2. <template>
  3. <div class="steel_inbound">
  4. <div class="sache">
  5. <el-input
  6. placeholder="请输入内容"
  7. v-model="inputText"
  8. clearable>
  9. </el-input>
  10. <el-button type="primary" class="btn" @click="onclick">
  11. <i class="el-icon-search"></i>查询
  12. </el-button>
  13. <el-button type="primary" class="btn" @click="toInsert">
  14. <i class="el-icon-plus"></i>新增
  15. </el-button>
  16. </div>
  17. <div class="table">
  18. <dilTable v-bind.sync="options">
  19. <el-table-column fixed="right" label="操作" width="100">
  20. <template slot-scope="scope">
  21. <el-button
  22. type="text"
  23. size="mini"
  24. @click="deleteBmsTrainFreight(scope)"
  25. >
  26. 删除
  27. </el-button>
  28. </template>
  29. </el-table-column>
  30. </dilTable>
  31. </div>
  32. </div>
  33. </template>
  34. <script>
  35. export default {
  36. data(){
  37. return{
  38. inputText:"",
  39. options:{
  40. // first请求数据的地址
  41. requestUrl: "/api/v1/rms/getPier?apiId=223",
  42. },
  43. }
  44. },
  45. methods:{
  46. toInsert() {
  47. this.$router.push("/addPier");
  48. },
  49. deleteBmsTrainFreight(scope){
  50. this.$confirm("是否删除", "提示", {
  51. confirmButtonText: "确定",
  52. cancelButtonText: "取消",
  53. type: "warning",
  54. center: true,
  55. })
  56. .then(() => {
  57. this.axios
  58. .post("/api/v1/rms/deletePier/" + scope.row.pierId)
  59. .then((res) => {
  60. if (res.data.code == 200) {
  61. this.$message({
  62. type: "success",
  63. message: "删除成功!",
  64. });
  65. this.$router.go(0);
  66. } else {
  67. this.$message({
  68. message: "删除失败",
  69. type: "warning",
  70. });
  71. }
  72. });
  73. })
  74. .catch(() => {
  75. this.$message({
  76. type: "info",
  77. message: "删除操作已取消!",
  78. });
  79. });
  80. },
  81. },
  82. }
  83. </script>
  84. <style lang="scss" scode>
  85. .steel_inbound{
  86. .sache{
  87. height: 80px;
  88. display: flex;
  89. align-items: center;
  90. padding-left: 30px;
  91. }
  92. }
  93. </style>