中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

155 lines
5.9 KiB

6 months ago
<template>
<basic-container>
<el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange">
<el-tab-pane label="库房设置" name="warehouseSetup"></el-tab-pane>
<el-tab-pane label="库管设置" name="inventorySetup"></el-tab-pane>
<el-tab-pane label="库位设置" name="storageSetup"></el-tab-pane>
</el-tabs>
5 months ago
<avue-crud v-if="tabPosition != 'inventorySetup'" :option="option" :table-loading="loading" :data="data"
v-model="form" v-model:page="page" ref="crud" @row-del="rowDel" @search-change="searchChange"
@search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
@size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
<template #menu="{ row }">
6 months ago
<el-button type="text" v-if="tabPosition == 'warehouseSetup'">管理员设置</el-button>
</template>
</avue-crud>
5 months ago
<div v-if="tabPosition == 'inventorySetup'" class="setup-height">
6 months ago
<div style="margin-bottom: 10px;">
5 months ago
<el-button type="primary" @click="selectFn(1)">按人员设置</el-button>
<el-button type="primary" @click="selectFn(2)">按库房设置</el-button>
6 months ago
</div>
5 months ago
<el-select v-model="value" placeholder="请选择人员" v-if="isUser==1">
<el-option label="人员一" value="1">
</el-option>
<el-option label="人员二" value="2">
</el-option>
</el-select>
<el-select v-model="value" placeholder="请选择库房" v-if="isUser==2">
<el-option label="库房一" value="1">
</el-option>
<el-option label="库房二" value="2">
</el-option>
</el-select>
<el-transfer style="margin-top: 10px;height: 580px;" filterable :titles="['未选择', '已选择']"
:filter-method="filterMethod" filter-placeholder="请输入城市拼音" v-model="value" :data="transferData">
6 months ago
</el-transfer>
<div style="margin-top: 10px;display: flex;justify-content: center;align-items: center;">
5 months ago
<el-button type="primary"> </el-button>
6 months ago
</div>
</div>
5 months ago
</basic-container>
6 months ago
</template>
<script>
5 months ago
import warehouseMain from './js/warehouseMain'
export default {
data() {
return {
loading: false,
tabPosition: 'warehouseSetup',
data: [],
form: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
6 months ago
},
5 months ago
option: {
columnSort: true,
tip: false,
height: 'auto',
align: 'center',
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: true,
viewBtn: false,
addBtn: true,
delBtn: true,
editBtn: true,
editBtnIcon: ' ',
delBtnIcon: ' ',
labelWidth: 120,
menu: true,
menuWidth: 200,
dialogWidth: 920,
dialogClickModal: false,
searchEnter: true,
excelBtn: true,
gridBtn: false,
searchShowBtn: false,
showOverflowTooltip: true,
searchLabelPosition: 'left',
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
column: []
6 months ago
},
5 months ago
isUser:1,
6 months ago
}
5 months ago
},
mounted() {
this.option.delBtn = true
this.option.editBtn = true
this.option.column = warehouseMain[this.tabPosition]
},
methods: {
selectFn(val){
this.isUser = val
},
tabPositionChange(val) {
this.option.delBtn = false
this.option.editBtn = false
if (this.tabPosition == 'warehouseSetup') {
this.option.delBtn = true
this.option.editBtn = true
this.option.column = warehouseMain[this.tabPosition]
} else if (this.tabPosition == 'storageSetup') {
this.option.delBtn = true
this.option.editBtn = true
this.option.column = warehouseMain[this.tabPosition]
}
},
rowDel() {
this.$confirm('确定删除此条数据?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
})
},
onLoad() {
this.data = [
{ id: 1, shCode: '001', shName: '名称一', memo: '', toolingTypeStr: '001', typeStr: '', shLevel: '', userName: "" },
{ id: 1, shCode: '001', shName: '名称一', memo: '', toolingTypeStr: '001', typeStr: '', shLevel: '', userName: "" },
{ id: 1, shCode: '001', shName: '名称一', memo: '', toolingTypeStr: '001', typeStr: '', shLevel: '', userName: "" },
]
this.page.total = this.data.length
},
6 months ago
}
5 months ago
}
6 months ago
</script>
<style lang="scss" scoped>
5 months ago
::v-deep.el-transfer {
.el-transfer-panel {
6 months ago
width: 44% !important;
5 months ago
}
6 months ago
}
5 months ago
.setup-height {
height: calc(100vh - 54px - 40px - 40px - 56px - 35px);
}
6 months ago
</style>