1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <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>
- <el-button type="primary" class="btn1" @click="btnclick(0)">
- <i class="el-icon-success"></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=3",
- // 控制显示多选列
- selectionType: "select",
- },
- selectionListMap: [],
- };
- },
- methods: {
- onclick() {
- this.option.requestUrl =
- "/api/v1/tms/getLoadResultToSendMC?apiId=209&resultType=1&con=" +
- this.input;
- },
- btnclick() {
- if (this.selectionListMap.length == 0) {
- this.$message({
- message: "请勾选要发送计量委托的实绩!",
- type: "warning",
- });
- } else {
- 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=209&resultType=3";
- }
- });
- }
- },
- selectionChange(selection) {
- this.selectionListMap = [];
- selection.forEach((element) => {
- this.selectionListMap.push(element.resultId);
- });
- },
- },
- };
- </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>
|