<!--
|
* @Date: 2024-04-09 20:19:46
|
* @LastEditors: Sneed
|
* @LastEditTime: 2024-04-09 21:57:50
|
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/base/Shiftsystem.vue
|
-->
|
<template>
|
<el-container>
|
<el-aside width="320px">
|
<el-button type="primary" @click="add">新建班制</el-button>
|
<el-table :data="tableData" stripe style="width: 100%" @row-click="rowClick">
|
<el-table-column prop="code" label="班制编号" />
|
<el-table-column prop="name" label="班制名称" />
|
</el-table>
|
</el-aside>
|
<el-container>
|
<ul>
|
<li>
|
<span>班制编号</span>
|
{{ info.code }}
|
</li>
|
<li>
|
<span>班制颜色</span>
|
{{ info.code }}
|
</li>
|
<li>
|
<span>开始-结束时间</span>
|
{{ info.code }}
|
</li>
|
</ul>
|
</el-container>
|
<Dialog ref="dialog" :option="{types,status,group}"></Dialog>
|
</el-container>
|
</template>
|
|
<script>
|
import Dialog from './Dialog.vue'
|
export default {
|
components: {
|
Dialog
|
},
|
data () {
|
return {
|
tableData: [],
|
info: {
|
code: ''
|
}
|
}
|
},
|
created () {
|
this.$API.calender.getShiftsystemList.post({params: {current:1,size: 15},data: {
|
code: "",name: "",statusList: [1]
|
}}).then(res => {
|
this.tableData = res?.data?.records || []
|
let current = this.tableData?.[0] || ''
|
current.id && this.rowClick(current)
|
})
|
},
|
methods: {
|
rowClick(row) {
|
console.log(row)
|
this.$API.calender.getShiftsystemInfo.get({id: row.id}).then(res => {
|
console.log(res.data)
|
this.info = res.data
|
})
|
},
|
add () {
|
this.$refs.dialog.open()
|
}
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped></style>
|