| | |
| | | 将选中的多个异常以数组形式返回给父组件 |
| | | --> |
| | | <script> |
| | | // import axios from 'axios'; |
| | | import axiosInstance from '../utils/request.js' |
| | | // import axiosInstance from 'axiosInstance'; |
| | | import axiosInstanceInstance from '../utils/request.js' |
| | | export default { |
| | | emits:['submitExceptionType'], |
| | | data() { |
| | |
| | | methods: { |
| | | //获取不同的异常类型 |
| | | getShopName() { |
| | | axiosInstance.get('/fume/exceptiontype').then(result => { |
| | | axiosInstanceInstance.get('/fume/exceptiontype').then(result => { |
| | | this.exceptionType = result.data.data |
| | | |
| | | }); |
| | |
| | | |
| | | <div class="container"> |
| | | <span class="text">异常类型:</span> |
| | | <div class="exception-type"> |
| | | <el-checkbox-group v-model="checkedList" :change="$emit('submitExceptionType',checkedList)"> |
| | | <el-checkbox :label="item.exceptionType" v-for="(item,index) in exceptionType" :key="index"> |
| | | <template #default> |
| | |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | /* 不能对 */ |
| | | .container { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | /* flex-wrap: wrap; */ |
| | | } |
| | | .text { |
| | | margin-top: 5px; |
| | | margin-right: 10px; |
| | | margin-left: 20px; |
| | | font-weight: bolder; |
| | | white-space: nowrap; |
| | | } |
| | | .exception-type { |
| | | white-space: nowrap; |
| | | } |
| | | </style> |