|
@@ -13,7 +13,7 @@
|
|
|
:apiId="{query:20221011144903,del:20221011145003}"
|
|
|
:autoQuery="false"
|
|
|
:options="options"
|
|
|
- @listData="list">
|
|
|
+ @listCreate="list">
|
|
|
<div slot="custom">
|
|
|
<div class="label_center">
|
|
|
<span class="search_label">状态: </span>
|
|
@@ -55,6 +55,7 @@ import addArea from './area/modules/add_area'
|
|
|
import editArea from './area/modules/edit_area'
|
|
|
import startArea from './area/modules/start_area'
|
|
|
import delArea from './area/modules/del_area'
|
|
|
+import { log } from '@antv/g2plot/lib/utils'
|
|
|
|
|
|
export default {
|
|
|
components:{
|
|
@@ -72,6 +73,11 @@ export default {
|
|
|
statusList:[]
|
|
|
}
|
|
|
},
|
|
|
+ provide () {
|
|
|
+ return {
|
|
|
+ areaInfo:() => this.areaInfo
|
|
|
+ }
|
|
|
+ },
|
|
|
created () {
|
|
|
this.userstatus()
|
|
|
},
|
|
@@ -96,11 +102,23 @@ export default {
|
|
|
this.$refs['basicLayout'].listData()
|
|
|
},
|
|
|
onClick (data) {
|
|
|
- this.areaInfo = data
|
|
|
- this.$refs['basicLayout'].param.content.sa_saleareaids = [data.sa_saleareaid]
|
|
|
- this.$refs['basicLayout'].param.content.containssub = 1
|
|
|
- this.$refs['basicLayout'].listData()
|
|
|
- this.$store.dispatch('sendDataToForm',data)
|
|
|
+ if (typeof data == 'string') {
|
|
|
+ this.$refs.arealist.btnType = 'primary'
|
|
|
+ this.$refs.arealist.$refs.treeRef.setCurrentKey(null)
|
|
|
+ this.$refs['basicLayout'].param.content.isAll = 1
|
|
|
+ this.$refs['basicLayout'].param.content.sa_saleareaids = []
|
|
|
+ this.$refs['basicLayout'].param.content.containssub = 1
|
|
|
+ this.$refs['basicLayout'].listData()
|
|
|
+ } else {
|
|
|
+ this.areaInfo = data
|
|
|
+ this.$refs.arealist.btnType = 'info'
|
|
|
+ this.$refs['basicLayout'].param.content.sa_saleareaids = [data.sa_saleareaid]
|
|
|
+ this.$refs['basicLayout'].param.content.containssub = 1
|
|
|
+ this.$refs['basicLayout'].param.content.isAll = 0
|
|
|
+ this.$refs['basicLayout'].listData()
|
|
|
+ this.$store.dispatch('sendDataToForm',data)
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
onSuccess () {
|
|
|
this.$refs.arealist.query_arealist()
|
|
@@ -118,9 +136,8 @@ export default {
|
|
|
onStartArea (status) {
|
|
|
status === 1?this.areaInfo.isused = 0:this.areaInfo.isused = 1
|
|
|
},
|
|
|
- list(data) {
|
|
|
- console.log(data);
|
|
|
-
|
|
|
+ list(param) {
|
|
|
+ param.content.isAll = 0
|
|
|
}
|
|
|
}
|
|
|
}
|