|
|
|
|
@ -6,15 +6,23 @@
|
|
|
|
|
<span>在册人员:{{ totalPerson }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tabs">
|
|
|
|
|
<div :class="!addCur?'tabcur':''" @click="changeMask(1)">抢险队伍</div>
|
|
|
|
|
<div :class="activeTab === 'teams' ? 'tabcur' : ''" @click="changeMask('teams')">抢险队伍</div>
|
|
|
|
|
|
|
|
|
|
<div :class="addCur?'tabcur':''">
|
|
|
|
|
<div
|
|
|
|
|
v-for="item in chubeileixingList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:class="String(activeTab) === String(item.id) ? 'tabcur' : ''"
|
|
|
|
|
>
|
|
|
|
|
<el-dropdown :show-timeout="100" @command="clickQuyu">
|
|
|
|
|
<span class="el-dropdown-link" @click="changeMask(2)">
|
|
|
|
|
防汛仓库<i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
|
<span class="el-dropdown-link" @click="selectChubeileixingTab(item)">
|
|
|
|
|
{{ item.value }}<i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
|
</span>
|
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
|
<el-dropdown-item v-for="item in areaList" :command="item.id">{{ item.value }}</el-dropdown-item>
|
|
|
|
|
<el-dropdown-item
|
|
|
|
|
v-for="area in areaList"
|
|
|
|
|
:key="area.id"
|
|
|
|
|
:command="{ areaId: area.id, chubeileixingId: item.id }"
|
|
|
|
|
>{{ area.value }}</el-dropdown-item>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</el-dropdown>
|
|
|
|
|
</div>
|
|
|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|