123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <!-- 海港-老区轨道衡计量委托 -->
- <div class="homeworkPath">
- <div class="top">
- <el-input
- class="el-input"
- placeholder="请输入内容"
- v-model="input"
- clearable
- >
- </el-input>
- <el-button type="primary" class="btn" @click="onclick">
- <i class="el-icon-search"></i>查询
- </el-button>
- </div>
- <dilTable v-bind.sync="option" @selection-change="selectionChange">
- </dilTable>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- input: "",
- option: {
- // 表格请求数据的地址
- requestUrl: "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2",
- // 控制显示多选列
- selectionType: "select",
- },
- selectionListMap: [],
- };
- },
- methods: {
- onclick() {
- this.option.requestUrl =
- "/api/v1/tms/getTmstrainWagonLoad?apiId=58&resultType=2&con=" +
- this.input;
- },
- btnclick() {
- let map = {
- resultIdList: this.selectionListMap,
- };
- if (this.selectionListMap.length == 0) {
- this.$message({
- message: "请勾选要发送计量委托的实绩!",
- type: "warning",
- });
- } else {
- this.axios
- .post("/api/v1/tms/batchSendMeasureCommission", map)
- .then((res) => {
- if (res.data.data == "发送成功") {
- this.$message({
- type: "success",
- message: res.data.data,
- });
- this.option.requestUrl =
- "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2&i=" +
- new Date();
- }else{
- this.$message({
- type: "warning",
- message: res.data.data,
- });
- }
- });
- }
- },
- selectionChange(selection) {
- this.selectionListMap = [];
- console.log(selection);
- this.selectionListMap = selection;
- },
- },
- };
- </script>
- <style lang='scss'>
- .homeworkPath {
- .top {
- padding: 1.25rem 0.375rem;
- .el-input {
- width: 20%;
- margin-right: 40rpx;
- }
- .btn {
- width: 5.5%;
- margin-left: 0.25rem;
- }
- .btn1 {
- width: 7%;
- margin-left: 00.375rem;
- }
- }
- }
- </style>
|