+
-
- 防汛仓库
+
+ {{ item.value }}
- {{ item.value }}
+ {{ area.value }}
@@ -94,14 +102,16 @@ export default {
storages: []
},
areaList: [],
+ chubeileixingList: [],
+ activeTab: 'teams',
+ currentChubeileixing: '',
infoWindow: null,
openData: [],
materList: [],
quyu_id: '',
loading: true,
total: 0,
- addCur: false,
- loadingFull: null,
+ loadingFull: null,
myicon:require('@/assets/icon1.png'),
table: [{
label: '序号',
@@ -109,107 +119,107 @@ export default {
fixed: 'left',
width: 80
},
- {
- label: '物资代码',
- width: 120,
- prop: 'wuzidaima',
- align: 'left'
- },
- {
- label: '现物资名称',
- width: 120,
- prop: 'xianwuzimingcheng',
- align: 'center'
- },
- {
- label: '原物资名称',
- width: 120,
- prop: 'yuanwuzimingcheng',
- align: 'left'
- },
- {
- label: '物资型号',
- width: 120,
- prop: 'guigexinghao',
- align: 'center'
- },
- {
- label: '数量',
- width: 80,
- prop: 'shuliang',
- align: 'center'
- },
- {
- label: '单位',
- width: 80,
- prop: 'danwei',
- align: 'center'
- },
- {
- label: '价值(元)',
- width: 80,
- prop: 'jiazhiyuan',
- align: 'center'
- },
- {
- label: '生产日期',
- width: 120,
- prop: 'shengchanriqi',
- align: 'center'
- },
- {
- label: '入库日期',
- width: 120,
- prop: 'rukuriqi',
- align: 'center'
- },
- {
- label: '储备年限',
- width: 80,
- prop: 'chubeinianxian',
- align: 'center'
- },
- {
- label: '状态',
- width: 80,
- prop: 'zhuangtai',
- align: 'center'
- },
- {
- label: '资金来源',
- width: 120,
- prop: 'zijinlaiyuan',
- align: 'center'
- },
- {
- label: '储备方式',
- width: 120,
- prop: 'chubeifangshi',
- align: 'center'
- },
- {
- label: '储备地点',
- width: 180,
- prop: 'chubeididian',
- align: 'left'
- },
- {
- label: '备注',
- width: 180,
- prop: 'beizhu',
- align: 'left'
- },
- {
- label: '储备层级',
- width: 120,
- prop: 'chubeicengji',
- align: 'left'
- },
- {
- label: '是否展示',
- width: 120,
- prop: 'shifouzhanshi',
- align: 'left'
+ {
+ label: '物资代码',
+ width: 120,
+ prop: 'wuzidaima',
+ align: 'left'
+ },
+ {
+ label: '现物资名称',
+ width: 120,
+ prop: 'xianwuzimingcheng',
+ align: 'center'
+ },
+ {
+ label: '原物资名称',
+ width: 120,
+ prop: 'yuanwuzimingcheng',
+ align: 'left'
+ },
+ {
+ label: '物资型号',
+ width: 120,
+ prop: 'guigexinghao',
+ align: 'center'
+ },
+ {
+ label: '数量',
+ width: 80,
+ prop: 'shuliang',
+ align: 'center'
+ },
+ {
+ label: '单位',
+ width: 80,
+ prop: 'danwei',
+ align: 'center'
+ },
+ {
+ label: '价值(元)',
+ width: 80,
+ prop: 'jiazhiyuan',
+ align: 'center'
+ },
+ {
+ label: '生产日期',
+ width: 120,
+ prop: 'shengchanriqi',
+ align: 'center'
+ },
+ {
+ label: '入库日期',
+ width: 120,
+ prop: 'rukuriqi',
+ align: 'center'
+ },
+ {
+ label: '储备年限',
+ width: 80,
+ prop: 'chubeinianxian',
+ align: 'center'
+ },
+ {
+ label: '状态',
+ width: 80,
+ prop: 'zhuangtai',
+ align: 'center'
+ },
+ {
+ label: '资金来源',
+ width: 120,
+ prop: 'zijinlaiyuan',
+ align: 'center'
+ },
+ {
+ label: '储备方式',
+ width: 120,
+ prop: 'chubeifangshi',
+ align: 'center'
+ },
+ {
+ label: '储备地点',
+ width: 180,
+ prop: 'chubeididian',
+ align: 'left'
+ },
+ {
+ label: '备注',
+ width: 180,
+ prop: 'beizhu',
+ align: 'left'
+ },
+ {
+ label: '储备层级',
+ width: 120,
+ prop: 'chubeicengji',
+ align: 'left'
+ },
+ {
+ label: '是否展示',
+ width: 120,
+ prop: 'shifouzhanshi',
+ align: 'left'
}
]
}
@@ -222,10 +232,11 @@ export default {
})
},
methods: {
- getArea() {
- getparameteritem('area').then(res => {
- this.areaList = res.detail
- })
+ async getArea() {
+ const areaRes = await getparameteritem('area')
+ this.areaList = areaRes.detail || []
+ const chubeiRes = await getparameteritem('ck_chubeileixing')
+ this.chubeileixingList = chubeiRes.detail || []
},
initHeight() {
const winHeight = document.body.clientHeight
@@ -257,25 +268,31 @@ export default {
// this.setMapMarker()
},
changeMask(type) {
- if (type == 1) {
- this.addCur = false
+ if (type === 'teams') {
+ this.activeTab = 'teams'
+ this.currentChubeileixing = ''
this.setMapMarker('teams', this.makerObj.teams)
- } else if (type == 2) {
- this.addCur = true
- this.quyu_id = ''
+ }
+ },
+ selectChubeileixingTab(item) {
+ this.activeTab = String(item.id)
+ this.currentChubeileixing = item.id
+ if (this.quyu_id) {
this.getStorages()
- // this.setMapMarker("storages", this.makerObj.storages)
+ } else {
+ this.makerObj.storages = []
+ this.setMapMarker('storages', [])
}
},
async getTeams() {
await index({
page: 1,
page_size: 9999,
- table_name: 'teams',
- filter:[{
- 'key':'duiwushuxing',
- 'op':'eq',
- 'value':'自管队伍'
+ table_name: 'teams',
+ filter:[{
+ 'key':'duiwushuxing',
+ 'op':'eq',
+ 'value':'自管队伍'
}]
}).then(res => {
const markers = []
@@ -296,12 +313,16 @@ export default {
this.loadingFull.close()
})
},
- clickQuyu(e) {
- console.log('e', e)
- this.quyu_id = e
+ clickQuyu({ areaId, chubeileixingId }) {
+ this.activeTab = String(chubeileixingId)
+ this.currentChubeileixing = chubeileixingId
+ this.quyu_id = areaId
this.getStorages()
},
async getStorages() {
+ if (!this.quyu_id || !this.currentChubeileixing) {
+ return
+ }
this.loadingFull = this.$loading({
lock: true,
text: '',
@@ -309,32 +330,38 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
})
this.makerObj.storages = []
- await index({
- page: 1,
- page_size: 9999,
- table_name: 'materialstorages',
- filter: [{
- key: 'quyu_id',
- op: 'eq',
- value: this.quyu_id
- }]
- }).then(res => {
- const markers = []
- if (res.data.length < 1) {
- return
- }
- res.data.map(item => {
- this.makerObj.storages.push({
- type: 'storages',
- name: item.cangkumingcheng,
- ...item
- })
+ try {
+ const res = await index({
+ page: 1,
+ page_size: 9999,
+ table_name: 'materialstorages',
+ filter: [{
+ key: 'quyu_id',
+ op: 'eq',
+ value: this.quyu_id
+ }, {
+ key: 'chubeileixing',
+ op: 'eq',
+ value: this.currentChubeileixing
+ }]
})
+ if (res.data && res.data.length > 0) {
+ res.data.forEach(item => {
+ this.makerObj.storages.push({
+ type: 'storages',
+ name: item.cangkumingcheng,
+ ...item
+ })
+ })
+ }
this.setMapMarker('storages', this.makerObj.storages)
- this.loadingFull.close()
- })
+ } finally {
+ if (this.loadingFull) {
+ this.loadingFull.close()
+ }
+ }
},
- async getMater(id) {
+ async getMater(id) {
const res = await index({
page: 1,
page_size: 9999,
@@ -360,14 +387,14 @@ export default {
if (!item.jingdu || !item.weidu) {
return
}
- const icon = new AMap.Icon({
- size: new AMap.Size(40, 50), // 图标尺寸
- image: this.myicon, // Icon的图像
- imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
- imageSize: new AMap.Size(30, 30) // 根据所设置的大小拉伸或压缩图片
+ const icon = new AMap.Icon({
+ size: new AMap.Size(40, 50), // 图标尺寸
+ image: this.myicon, // Icon的图像
+ imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+ imageSize: new AMap.Size(30, 30) // 根据所设置的大小拉伸或压缩图片
});
const marker = new AMap.Marker({
- map: this.map,
+ map: this.map,
icon:icon,
// text: item.name,
zIndex: 9999999,
@@ -392,7 +419,7 @@ export default {
}
}
this.infoWindow.open(this.map, e.target.getPosition())
- })
+ })
console.log("marker",marker)
// if(item.type == 'storages'){
// this.makerObj.storages.push(marker)
@@ -404,7 +431,7 @@ export default {
console.log('this.makerObj', this.makerObj)
// this.map.add(this.makerObj['teams'])
},
- closeWin() {
+ closeWin() {
this.infoWindow.close()
}
}
@@ -425,10 +452,10 @@ export default {
align-items: center;
background: #fff;
padding: 20px 40px;
- border-radius: 40px;
- font-size: 18px;
- &>span{
- margin:0px 20px;
+ border-radius: 40px;
+ font-size: 18px;
+ &>span{
+ margin:0px 20px;
}
}
@@ -522,4 +549,4 @@ export default {
right: 5px;
cursor: pointer;
}
-
+
diff --git a/src/views/stocks/component/showRuku.vue b/src/views/stocks/component/showRuku.vue
index 6623847..68a04be 100644
--- a/src/views/stocks/component/showRuku.vue
+++ b/src/views/stocks/component/showRuku.vue
@@ -453,3 +453,5 @@
height: 300px;
}
+
+
diff --git a/src/views/storages/components/addStorage.vue b/src/views/storages/components/addStorage.vue
index 3e4b3bd..daae620 100644
--- a/src/views/storages/components/addStorage.vue
+++ b/src/views/storages/components/addStorage.vue
@@ -45,6 +45,30 @@