修改防汛物资仓库名称显示

master
lynn 7 months ago
parent fdf9383d2c
commit f16bdd2339

@ -13,9 +13,9 @@
</el-select> --> </el-select> -->
<Select v-model="select.guanliancangku" style="width:200px;margin-right: 10px;" placeholder="所在仓库" clearable> <Select v-model="select.guanliancangku" style="width:200px;margin-right: 10px;" placeholder="所在仓库" clearable>
<Option v-for="item in cangkuList" :value="item.id" :key="item.value">{{ item.cangkumingcheng }}</Option> <Option v-for="item in cangkuList" :value="item.id" :key="item.value">{{ item.cangkumingcheng }}</Option>
</Select> </Select>
<Select @on-change="clearArea" v-model="select.area" style="width: 200px;margin-right: 10px;" placeholder="所在区域" clearable> <Select @on-change="clearArea" v-model="select.area" style="width: 200px;margin-right: 10px;" placeholder="所在区域" clearable>
<Option v-for="item in areaList" :key="item.id" :value="item.id">{{ item.value }}</Option> <Option v-for="item in areaList" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select> </Select>
<Button type="primary" @click="getindex('page')"></Button> <Button type="primary" @click="getindex('page')"></Button>
<Button type="primary" style="margin-left: 10px;" <Button type="primary" style="margin-left: 10px;"
@ -30,18 +30,18 @@
</div> </div>
<xy-table :list="list" :total="total" v-loading="loading" @pageSizeChange="e => select.pageSize = e" <xy-table :list="list" :total="total" v-loading="loading" @pageSizeChange="e => select.pageSize = e"
@pageIndexChange="pageChange" :table-item="table"> @pageIndexChange="pageChange" :table-item="table">
<template v-slot:suozaiquyu> <template v-slot:suozaiquyu>
<el-table-column align="center" label="所在区域" width="120" header-align="center"> <el-table-column align="center" label="所在区域" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.quyu_detail"> <div v-if="scope.row.quyu_detail">
{{scope.row.quyu_detail.value?scope.row.quyu_detail.value:''}} {{scope.row.quyu_detail.value?scope.row.quyu_detail.value:''}}
</div> </div>
<div v-else></div> <div v-else></div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:btns> <template v-slot:btns>
<el-table-column fixed="right" label="操作" width="180" header-align="center"> <el-table-column fixed="right" label="操作" width="180" header-align="center">
@ -75,9 +75,9 @@
import { import {
Message Message
} from 'element-ui' } from 'element-ui'
import imports from "@/views/component/imports.vue" import imports from "@/views/component/imports.vue"
import { import {
getparameteritem getparameteritem
} from "@/api/system/dictionary.js" } from "@/api/system/dictionary.js"
export default { export default {
components: { components: {
@ -90,10 +90,10 @@
select: { select: {
pageSize: 10, pageSize: 10,
pageIndex: 1, pageIndex: 1,
keyword: "", keyword: "",
guanliancangku:'', guanliancangku:'',
area:'' area:''
}, },
areaList:[], areaList:[],
customForm: { customForm: {
tableName: "flood_materials" tableName: "flood_materials"
@ -118,14 +118,14 @@
{ {
label: "仓库名称", label: "仓库名称",
width: 220, width: 220,
prop: 'flood_storages_details.cangkumingcheng', prop: 'cangkumingcheng',
align: 'left', align: 'left',
}, },
// { // {
// label: "", // label: "",
// width: 120, // width: 120,
// prop: 'suozaiquyu', // prop: 'suozaiquyu',
// align: 'center', // align: 'center',
// }, // },
{ {
label: "物资代码", label: "物资代码",
@ -232,7 +232,7 @@
] ]
} }
}, },
mounted() { mounted() {
this.getArea() this.getArea()
this.getCangku() this.getCangku()
this.getindex() this.getindex()
@ -244,18 +244,18 @@
}) })
console.log("importForm", this.importForm) console.log("importForm", this.importForm)
}, },
methods: { methods: {
getArea(){ getArea(){
getparameteritem("area").then(res=>{ getparameteritem("area").then(res=>{
this.areaList = res.detail this.areaList = res.detail
}) })
}, },
clearArea(e){ clearArea(e){
if(e){ if(e){
this.select.area = e this.select.area = e
}else{ }else{
this.select.area = '' this.select.area = ''
} }
}, },
async getCangku() { async getCangku() {
let res = await index({ let res = await index({
@ -266,9 +266,9 @@
this.cangkuList = res.data this.cangkuList = res.data
}, },
async getindex(page) { async getindex(page) {
this.loading = true this.loading = true
if(page=='page'){ if(page=='page'){
this.select.pageIndex = 1 this.select.pageIndex = 1
} }
const res = await index({ const res = await index({
page_size: this.select.pageSize, page_size: this.select.pageSize,
@ -282,10 +282,10 @@
"key": "guanliancangku", "key": "guanliancangku",
"op": "eq", "op": "eq",
"value": this.select.guanliancangku?this.select.guanliancangku:'' "value": this.select.guanliancangku?this.select.guanliancangku:''
},{ },{
key:'quyu_id', key:'quyu_id',
op:'eq', op:'eq',
value:this.select.area?this.select.area:'' value:this.select.area?this.select.area:''
}], }],
}) })
this.list = res.data this.list = res.data
@ -299,7 +299,7 @@
}, },
editorMater(id, type) { editorMater(id, type) {
this.$refs['addMater'].id = id this.$refs['addMater'].id = id
this.$refs['addMater'].type = type this.$refs['addMater'].type = type
this.$refs['addMater'].setCkList(this.cangkuList) this.$refs['addMater'].setCkList(this.cangkuList)
this.$refs['addMater'].isShow = true this.$refs['addMater'].isShow = true
}, },
@ -334,4 +334,4 @@
/deep/ .el-timeline-item { /deep/ .el-timeline-item {
list-style: none; list-style: none;
} }
</style> </style>

Loading…
Cancel
Save