| | |
| | | <!-- |
| | | * @Date: 2024-01-13 20:46:33 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-21 22:53:27 |
| | | * @LastEditTime: 2024-01-28 14:08:41 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/device.vue |
| | | --> |
| | | <template> |
| | | <div class="device-item"> |
| | | <el-checkbox class="care" v-model="care" @change="change"></el-checkbox> |
| | | <el-checkbox v-show="canconcern" class="care" v-model="concern" @change="change"></el-checkbox> |
| | | <p>{{ machineName }}</p> |
| | | <div class="device-item-box"> |
| | | <div class="img"> |
| | |
| | | import devicePng from './img/machine.png' |
| | | export default { |
| | | props: { |
| | | canconcern: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | id: { |
| | | type: [String, Number] |
| | | }, |
| | |
| | | data() { |
| | | return { |
| | | devicePng, |
| | | care: false, |
| | | concern: false, |
| | | item: {} |
| | | } |
| | | }, |
| | |
| | | <!-- |
| | | * @Date: 2024-01-06 17:40:19 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-23 21:50:27 |
| | | * @LastEditTime: 2024-01-28 14:34:17 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/index.vue |
| | | --> |
| | | <template> |
| | |
| | | </div> |
| | | </template> |
| | | <template slot="after"> |
| | | <div style="margin-left: auto;margin-right: 20px;"> |
| | | <div style="margin-left: auto;margin-right: 20px;display: flex;"> |
| | | <el-input v-model="searchWord" placeholder="请输入关键词"></el-input> |
| | | <el-button style="margin-left:8px;" type="primary" size="mini" @click="search">搜索</el-button> |
| | | </div> |
| | | </template> |
| | | </Status> |
| | | <div class="list-box"> |
| | | <div class="list"> |
| | | <Item v-for="item in list" :id="item.id" :info="item" :key="item.id"></Item> |
| | | <Item canconcern v-for="item in listFilter" :id="item.id" :info="item" :key="item.id"></Item> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | alarm: '', |
| | | stop: '', |
| | | idle: '', |
| | | } |
| | | }, |
| | | listFilter: [] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.query() |
| | | }, |
| | | methods: { |
| | | search () { |
| | | if (!this.searchWord) return this.query() |
| | | else { |
| | | this.listFilter = this.list.filter(item => item.machineName.indexOf(this.searchWord) > -1 ) |
| | | } |
| | | |
| | | }, |
| | | query(flag) { |
| | | if (flag !== undefined) { |
| | | this.concernFlag = flag |
| | |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.list = res.data.list |
| | | this.listFilter = res.data.list |
| | | this.info = { |
| | | runRate: res.data.runRate, |
| | | cutRate: res.data.cutRate, |