Commit 6d47ab0e by huangqy

早上改了点逻辑

parent 8d428e7a
<template>
<el-tabs :tab-position="tabPosition" type="card" :stretch="true" class="menu-tabs">
<el-tabs :tab-position="tabPosition" type="card" :stretch="true" class="menu-tabs" @tab-change="tabChange">
<el-tab-pane v-for="item in tabList" :key="item.title">
<template #label>
<span class="custom-tabs-label">
......@@ -7,13 +7,13 @@
<span>{{item.title}}</span>
</span>
</template>
<component :is="item.template"></component>
<component :is="item.template" :ref="item.template"></component>
</el-tab-pane>
</el-tabs>
</template>
<script>
import { defineComponent, ref } from 'vue'
import { defineComponent, ref, getCurrentInstance } from 'vue'
import RFID from './RFID.vue'
import InTask from './InTask.vue'
import OutTask from './OutTask.vue'
......@@ -22,18 +22,22 @@ import Setting from './Setting.vue'
export default defineComponent({
components: { RFID, InTask, OutTask, Query, Setting },
setup() {
const { proxy } = getCurrentInstance()
const tabPosition = ref('bottom')
const template = ref('rfid')
return {
tabPosition,
template,
tabList: [
const tabList = [
{title: '射频识别', icon: 'iconfont icon-tiaozhishibie', template: 'RFID'},
{title: '入库作业', icon: 'iconfont icon-rukuguanli-', template: 'InTask'},
{title: '出库作业', icon: 'iconfont icon-chukuguanli-', template: 'OutTask'},
{title: '手动设置', icon: 'iconfont icon-shezhi', template: 'Setting'},
{title: '查询', icon: 'iconfont icon-chaxun', template: 'Query'},
]
function tabChange(index) {
proxy.$refs[tabList[index].template][0].loadData()
}
return {
tabPosition,
tabList,
tabChange
}
},
})
......
......@@ -19,7 +19,8 @@
<template #default="scope">
<el-tag size="small" type="success" v-if="scope.row.activeState == 0">空闲</el-tag>
<el-tag size="small" type="warning" v-if="scope.row.activeState == 1">激活中</el-tag>
<el-tag size="small" type="primary" v-if="scope.row.activeState == 2">待上报</el-tag>
<el-tag size="small" v-if="scope.row.activeState == 2">待上报</el-tag>
<el-tag size="small" v-if="scope.row.activeState == 3">已上报</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
......@@ -135,7 +136,8 @@ export default defineComponent({
getGoodsPage: '/bill/getGoodsPage',
getModelPage: '/bill/getModelPage',
updateItem: '/bill/updateItem',
reportBill: '/platform/reportInBill'
reportBill: '/platform/reportInBill',
activateBill: '/bill/activateBill'
},
storeInfo: {},
storeCode: ''
......@@ -268,7 +270,8 @@ export default defineComponent({
handleChange,
edit,
check,
reportBill
reportBill,
loadData
}
},
})
......
......@@ -19,7 +19,8 @@
<template #default="scope">
<el-tag size="small" type="success" v-if="scope.row.activeState == 0">空闲</el-tag>
<el-tag size="small" type="warning" v-if="scope.row.activeState == 1">激活中</el-tag>
<el-tag size="small" type="primary" v-if="scope.row.activeState == 2">待上报</el-tag>
<el-tag size="small" v-if="scope.row.activeState == 2">待上报</el-tag>
<el-tag size="small" v-if="scope.row.activeState == 3">已上报</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
......@@ -135,7 +136,8 @@ export default defineComponent({
getGoodsPage: '/bill/getGoodsPage',
getModelPage: '/bill/getModelPage',
updateItem: '/bill/updateItem',
reportBill: '/platform/reportOutBill'
reportBill: '/platform/reportOutBill',
activateBill: '/bill/activateBill'
},
storeInfo: {},
storeCode: ''
......@@ -268,7 +270,8 @@ export default defineComponent({
handleChange,
edit,
check,
reportBill
reportBill,
loadData
}
},
})
......
......@@ -27,8 +27,8 @@
</el-col>
<el-col :span="18">
<el-card>
<el-table :data="logList" border style="width: 100%;height: 88vh;">
<el-table-column type="index" label="序号" width="60" align="center"/>
<el-table :data="logList" border size="large" style="width: 100%;height: 88vh;">
<el-table-column type="index" label="序号" width="70" align="center"/>
<el-table-column prop="inState" label="出入库" align="center">
<template #default="scope">
{{ scope.row.inState == 'IN' ? '入库' : '出库' }}
......
......@@ -160,7 +160,8 @@ export default defineComponent({
loadData,
channelSetting,
getConfig,
saveConfig
saveConfig,
loadData
}
},
})
......
......@@ -35,8 +35,8 @@
</el-col>
<el-col :span="18">
<el-card>
<el-table :data="bindList" border style="width: 100%;height: 88vh;">
<el-table-column type="index" label="序号" width="60" align="center"/>
<el-table :data="bindList" border size="large" style="width: 100%;height: 88vh;">
<el-table-column type="index" label="序号" width="70" align="center"/>
<el-table-column prop="stationId" label="通道号" align="center"/>
<el-table-column prop="state" label="状态" align="center">
<template #default="scope">
......@@ -199,7 +199,8 @@ export default defineComponent({
changeGoods,
changeModel,
automatic,
manual
manual,
loadData
}
},
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论