entrustEmergency.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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-s-promotion"></i>发送
  11. </el-button>
  12. </div>
  13. <dilTable v-bind.sync="option" @selection-change="selectionChange">
  14. </dilTable>
  15. </div>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. input: "",
  22. option: {
  23. // 表格请求数据的地址
  24. requestUrl: "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2",
  25. // 控制显示多选列
  26. selectionType: "select",
  27. },
  28. selectionListMap:[],
  29. };
  30. },
  31. methods: {
  32. onclick() {
  33. this.option.requestUrl = "/api/v1/tms/getTmstrainWagonLoad?apiId=58&resultType=1&con="+this.input;
  34. },
  35. btnclick() {
  36. this.axios.post('/api/v1/tms/batchSendMeasureCommission',{resultIdList:this.selectionListMap}).then((res)=>{
  37. if(res.data.code == "200"){
  38. this.$message({
  39. type: "success",
  40. message: "发送成功",
  41. });
  42. this.option.requestUrl = "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2";
  43. }
  44. })
  45. },
  46. selectionChange(selection) {
  47. this.selectionListMap = []
  48. selection.forEach(element => {
  49. this.selectionListMap.push(element.resultId);
  50. });
  51. },
  52. },
  53. };
  54. </script>
  55. <style lang='scss'>
  56. .homeworkPath {
  57. .top {
  58. padding: 1.25rem 0.375rem;
  59. .el-input{
  60. width: 20%;
  61. margin-right: 40rpx;
  62. }
  63. .btn{
  64. width: 5.5%;
  65. margin-left: 0.25rem;
  66. }
  67. .btn1{
  68. width: 7%;
  69. margin-left: 00.375rem;
  70. }
  71. }
  72. }
  73. </style>