12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <template>
- <!-- 发送计量委托界面 -->
- <div class="trainTransport">
- <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>
- <el-button type="primary" @click="btnclick(0)">
- <i class="el-icon-s-promotion"></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=1",
- // 控制显示多选列
- selectionType: "select",
- },
- selectionListMap:[],
- };
- },
- methods: {
- onclick() {
- this.option.requestUrl = "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=1&con="+this.input;
- },
- btnclick() {
- this.axios.post('/api/v1/tms/batchSendMeasureCommission',{resultIdList:this.selectionListMap}).then((res)=>{
- if(res.data.code == "200"){
- this.$message({
- type: "success",
- message: "发送成功",
- });
- this.option.requestUrl = "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=1"+"&i=" + new Date();
- }
- })
- },
- selectionChange(selection) {
- this.selectionListMap = []
- selection.forEach(element => {
- this.selectionListMap.push(element.resultId);
- });
- },
- },
- };
- </script>
- <style lang='scss'>
- .trainTransport {
- .top {
- padding: 1.25rem 0.375rem;
- .el-input {
- width: 20%;
- margin-right: 1.25rem;
- }
- }
- }
- </style>
|