This commit is contained in:
gtz
2022-11-07 08:45:49 +08:00
commit 4d1231adc2
1222 changed files with 194552 additions and 0 deletions

View File

@@ -0,0 +1,123 @@
<!--
* @Author: your name
* @Date: 2021-07-21 16:13:20
* @LastEditTime: 2021-07-21 17:32:59
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \mt-bus-fe\src\views\orderManage\consumption\consumption.vue
-->
<template>
<div>
<div class="method-btn-area">
<el-input v-model="listQuery.key" :placeholder="$i18nForm(['placeholder.input', this.$t('module.orderManage.consumption.workOrderId')])" filterable clearable style="width: 200px;" />
<!-- <el-select v-model="listQuery.workerId" :placeholder="$t('module.equipmentManager.eqManagerManage.worker')" clearable style="width: 200px;">
<el-option
v-for="item in workerList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select> -->
<el-button type="primary" @click="getList">{{ 'btn.search' | i18nFilter }}</el-button>
</div>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
>
<method-btn
slot="handleBtn"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList1()"
/>
</div>
</template>
<script>
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import i18n from '@/lang'
import { getPower } from '@/api/orderManage/order/order'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
const tableBtn = [
{
type: 'detail',
btnName: 'btn.detail'
}
]
const tableProps = [
{
prop: 'workOrderId',
label: i18n.t('module.orderManage.consumption.workOrderId'),
align: 'center'
},
{
prop: 'power',
label: i18n.t('module.orderManage.consumption.power'),
align: 'center'
},
{
prop: 'workOrderStatus',
label: i18n.t('module.orderManage.consumption.workOrderStatus'),
align: 'center'
}
]
export default {
components: {
BaseTable,
Pagination,
MethodBtn
},
data() {
return {
tableProps,
tableBtn,
list: [],
listLoading: true,
total: 0,
listQuery: {
current: 1,
size: 10,
key: ''
}
}
},
mounted() {
this.getList()
},
methods: {
getList() {
getPower(this.listQuery).then(res => {
if (res.code === 0) {
this.list = res.data.records
this.listLoading = false
}
})
// this.list = result.data.records
},
handleClick(raw) {
const id = raw.data.workOrderId
this.$router.push({
path: '/powerList',
query: {
id
}
})
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,94 @@
<!--
* @Author: your name
* @Date: 2021-07-21 17:08:01
* @LastEditTime: 2021-07-21 17:33:37
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \mt-bus-fe\src\views\orderManage\consumption\list.vue
-->
<template>
<div>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList1()"
/>
</div>
</template>
<script>
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import i18n from '@/lang'
import { getPower } from '@/api/orderManage/order/order'
const tableBtn = [
{
type: 'detail',
btnName: 'btn.detail'
}
]
const tableProps = [
{
prop: 'equipmentName',
label: i18n.t('module.orderManage.consumption.equipmentName'),
align: 'center'
},
{
prop: 'power',
label: i18n.t('module.orderManage.consumption.power'),
align: 'center'
},
{
prop: 'workOrderStatus',
label: i18n.t('module.orderManage.consumption.workOrderStatus'),
align: 'center'
}
]
export default {
components: {
BaseTable,
Pagination
},
data() {
return {
tableProps,
tableBtn,
list: [],
listLoading: true,
total: 0,
listQuery: {
current: 1,
size: 10,
workOrderId: this.$route.query.id
}
}
},
mounted() {
this.getList()
},
methods: {
getList() {
console.log(this.listQuery.workOrderId)
getPower(this.listQuery).then(res => {
if (res.code === 0) {
this.list = res.data.records
this.listLoading = false
}
})
}
}
}
</script>
<style>
</style>