bug
This commit is contained in:
@@ -54,56 +54,56 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
import {getRiskArea} from "../riskareaCrawler";
|
import {getRiskArea} from "../riskareaCrawler";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'List',
|
name: 'List',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
moduleName: String
|
moduleName: String
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
search: {
|
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
level: '',
|
|
||||||
province: ''
|
|
||||||
},
|
|
||||||
currIndex: -1,
|
|
||||||
areaList: [],
|
|
||||||
total: 10,
|
|
||||||
colConfigs: [
|
|
||||||
{ prop: 'province', label: '省级', align: 'left', width: '200px' },
|
|
||||||
{ prop: 'city', label: '市级', align: 'center' },
|
|
||||||
{ prop: 'district', label: '区级', align: 'center' },
|
|
||||||
{ prop: 'town', label: '镇级', align: 'center' },
|
|
||||||
{ prop: 'village', label: '村级', align: 'center' },
|
|
||||||
{ prop: 'address', label: '详细地址', align: 'center' },
|
|
||||||
{ prop: 'level', label: '等级', align: 'center', formart: v => this.dict.getLabel('epidemicDangerousAreaLevel', v) },
|
|
||||||
{ prop: 'createTime', label: '设置时间', align: 'center' },
|
|
||||||
{ prop: 'createUserName', label: '添加人', align: 'center' },
|
|
||||||
{ slot: 'options', label: '操作', align: 'center' }
|
|
||||||
],
|
|
||||||
areaName: '',
|
|
||||||
unitName: '',
|
|
||||||
tableData: []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
data() {
|
||||||
...mapState(['user'])
|
return {
|
||||||
},
|
search: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
level: '',
|
||||||
|
province: ''
|
||||||
|
},
|
||||||
|
currIndex: -1,
|
||||||
|
areaList: [],
|
||||||
|
total: 10,
|
||||||
|
colConfigs: [
|
||||||
|
{ prop: 'province', label: '省级', align: 'left', width: '200px' },
|
||||||
|
{ prop: 'city', label: '市级', align: 'center' },
|
||||||
|
{ prop: 'district', label: '区级', align: 'center' },
|
||||||
|
{ prop: 'town', label: '镇级', align: 'center' },
|
||||||
|
{ prop: 'village', label: '村级', align: 'center' },
|
||||||
|
{ prop: 'address', label: '详细地址', align: 'center' },
|
||||||
|
{ prop: 'level', label: '等级', align: 'center', formart: v => this.dict.getLabel('epidemicDangerousAreaLevel', v) },
|
||||||
|
{ prop: 'createTime', label: '设置时间', align: 'center' },
|
||||||
|
{ prop: 'createUserName', label: '添加人', align: 'center' },
|
||||||
|
{ slot: 'options', label: '操作', align: 'center' }
|
||||||
|
],
|
||||||
|
areaName: '',
|
||||||
|
unitName: '',
|
||||||
|
tableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
created() {
|
computed: {
|
||||||
this.dict.load('epidemicDangerousAreaLevel').then(() => {
|
...mapState(['user'])
|
||||||
this.getList()
|
},
|
||||||
})
|
|
||||||
},
|
created() {
|
||||||
|
this.dict.load('epidemicDangerousAreaLevel').then(() => {
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
@@ -130,27 +130,26 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
toAdd(id) {
|
toAdd(id) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'Add',
|
type: 'Add',
|
||||||
params: {
|
params: {
|
||||||
id: id || ''
|
id: id || ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSyncData() {
|
|
||||||
getRiskArea(this.instance).then(res => {
|
handleSyncData() {
|
||||||
if (res?.code == 0) {
|
getRiskArea(this.instance).then(res => {
|
||||||
this.getList()
|
if (res?.code == 0) {
|
||||||
this.$message.success("同步完毕!")
|
this.getList()
|
||||||
}
|
this.$message.success("同步完毕!")
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.notice {
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user