unloadShip.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <!-- 卸船作业页面 -->
  3. <div class="shipTransport">
  4. <div class="top">
  5. <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.resultId)" type="text" size="small"
  17. >编辑</el-button
  18. >
  19. <el-button
  20. type="text"
  21. size="small"
  22. @click="deleteclick(scope.row.resultId)"
  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/getUnLoadShipList?apiId=68",
  40. },
  41. };
  42. },
  43. mounted() {
  44. },
  45. methods: {
  46. onclick() {
  47. this.option.requestUrl = "/api/v1/tms/getUnLoadShipList?apiId=68&con=" + this.input;
  48. },
  49. click(resultId) {
  50. this.$router.push("/updateUnloadShip/" + resultId);
  51. },
  52. addclick() {
  53. this.$router.push("/addUnloadShip/");
  54. },
  55. deleteclick(scope) {
  56. let resultId = scope;
  57. this.$confirm("是否删除", "提示", {
  58. confirmButtonText: "确定",
  59. cancelButtonText: "取消",
  60. type: "warning",
  61. center: true,
  62. })
  63. .then(() => {
  64. this.axios
  65. .post(
  66. "/api/v1/shipTms/tmsshipunloadshipresults/deleteUnLoadShip/" + resultId
  67. )
  68. .then(() => {
  69. this.$message({
  70. type: "success",
  71. message: "删除成功!",
  72. });
  73. this.$router.go(0);
  74. });
  75. })
  76. .catch(() => {
  77. this.$message({
  78. type: "info",
  79. message: "取消删除!",
  80. });
  81. });
  82. },
  83. },
  84. };
  85. </script>
  86. <style lang='scss' scoped>
  87. .shipTransport {
  88. .top {
  89. padding: 1.25rem 0.375rem;
  90. .el-input {
  91. width: 20%;
  92. margin-right: 1.25rem;
  93. }
  94. }
  95. }
  96. </style>