|
@@ -6,14 +6,14 @@
|
|
|
<div class="bottom-content">
|
|
|
<div class="bottom-item" @click="startHacking">查看申请记录</div>
|
|
|
<div class="bottom-item" @click="startHacking"><i class="el-icon-d-arrow-right icon"></i></div>
|
|
|
- <el-radio class="bottom-item" v-model="radio" label="1" @change="selectShowType">默认地图</el-radio>
|
|
|
+ <el-radio class="bottom-item" v-model="radio" label="1" @change="selectShowType(1)">默认地图</el-radio>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="top">
|
|
|
<div class="top-content">
|
|
|
<div class="top-item" @click="startHacking1">查看地图</div>
|
|
|
<div class="top-item" @click="startHacking1"><i class="el-icon-d-arrow-left icon"></i></div>
|
|
|
- <el-radio class="top-item" v-model="radio" label="2" @change="selectShowType">默认列表</el-radio>
|
|
|
+ <el-radio class="top-item" v-model="radio" label="2" @change="selectShowType(2)">默认列表</el-radio>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content2">
|
|
@@ -82,6 +82,7 @@
|
|
|
getList,
|
|
|
getMapInfo,
|
|
|
deleteTrageInfo,
|
|
|
+ getDefault,
|
|
|
setDefault
|
|
|
} from '@/model/tradeServicesManagement/index'
|
|
|
import {
|
|
@@ -96,7 +97,7 @@
|
|
|
searchVal: '',
|
|
|
searchKeyWord: '',
|
|
|
isActive: false,
|
|
|
- radio: '1',
|
|
|
+ radio: '',
|
|
|
tradeServicesList: [],
|
|
|
mapInfo: [],
|
|
|
currentPage: 1,
|
|
@@ -106,31 +107,31 @@
|
|
|
searchType: '',
|
|
|
warehouseList: [],
|
|
|
compId: '',
|
|
|
+ id:'',
|
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
|
let height = document.body.offsetHeight - 57
|
|
|
document.querySelector('.container').setAttribute('style', 'height:' + height + 'px;')
|
|
|
- let _showPage = localStorage.getItem('warehouseReceiptRegulation_selectShowType')
|
|
|
- if (_showPage == "1") {
|
|
|
- this.radio = '1'
|
|
|
+ // let _showPage = localStorage.getItem('warehouseReceiptRegulation_selectShowType')
|
|
|
+ getDefault({functionType:1}).toPromise().then((response) => {
|
|
|
+ console.log('地图数据', response)
|
|
|
+ if(response){
|
|
|
+ this.id=response
|
|
|
+ this.radio=response.enabled
|
|
|
+ }
|
|
|
+ // this.mapInfo = response.data.records
|
|
|
+ })
|
|
|
+ if (this.radio == "1") {
|
|
|
this.isActive = false
|
|
|
- } else if (_showPage == "2") {
|
|
|
- this.radio = '2'
|
|
|
+ } else if (this.radio == "2") {
|
|
|
this.isActive = true
|
|
|
- } else {
|
|
|
- this.radio = '1'
|
|
|
- this.isActive = false
|
|
|
- }
|
|
|
+ }
|
|
|
this.compId = localStorage.getItem('ws-pf_compId')
|
|
|
this.getMapInfo()
|
|
|
// this.getWarehouseList()
|
|
|
this.tradeServicesList = []
|
|
|
- // setDefault().toPromise().then((response) => {
|
|
|
- // // console.log('地图数据', response)
|
|
|
- // this.mapInfo = response
|
|
|
- // // this.mapInfo = response.data.records
|
|
|
- // })
|
|
|
+
|
|
|
localStorage.removeItem("pageUp")//删除出入库跳返回时数据刷新的问题
|
|
|
// let i = localStorage.getItem('warehouseReceiptRegulation_selectShowType')
|
|
|
// console.log(i)
|
|
@@ -250,8 +251,25 @@
|
|
|
})
|
|
|
},
|
|
|
selectShowType(e) {
|
|
|
- this.activated = !this.activated;
|
|
|
- localStorage.setItem('warehouseReceiptRegulation_selectShowType', e)
|
|
|
+ // this.isActive=!this.isActive
|
|
|
+ if(this.radio == 1){
|
|
|
+ this.radio = 2
|
|
|
+ }else{
|
|
|
+ this.radio = 1
|
|
|
+ }
|
|
|
+
|
|
|
+ var data={}
|
|
|
+ if(this.id!=''){
|
|
|
+ data={functionType:1,enabled:0,id:this.id}
|
|
|
+ }else{
|
|
|
+ data={
|
|
|
+ functionType:1,enabled:1,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ setDefault(data).toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
},
|
|
|
add() {
|
|
|
this.$router.push({
|