| | |
| | | {{ scope.row.personType == 1 ? '户籍人口' : '实有人口' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button :disabled="positionDisabled(scope.row)" @click="rowClick(scope.row)" type="text" |
| | | size="small" title="定位"> |
| | | <i class="el-icon-location" :style="{ color: positionColor(scope.row) }"></i> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages all-pagination-sty" ref="tablePagination"> |
| | |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | positionColor () { |
| | | return (row) => { |
| | | if (row.X && row.X != 0 || row.lng && row.lng != 0 || row.longitude && row.longitude != 0 || row.x && row.x != 0) { |
| | | return "#1AFA29" |
| | | } else { |
| | | return "#ccc" |
| | | } |
| | | } |
| | | }, |
| | | |
| | | positionDisabled () { |
| | | return (row) => { |
| | | if (row.X && row.X != 0 || row.lng && row.lng != 0 || row.longitude && row.longitude != 0 || row.x && row.x != 0) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | rowClick (row) { |
| | | console.log('rowClick', row) |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: row.lng, |
| | | siteWd: row.lat, |
| | | siteGd: 200 |
| | | }) |
| | | this.peopleVisible = false |
| | | }, |
| | | |
| | | /** |
| | | * @description: 现有人员和重点人员列表弹窗关闭的事件 |
| | | * @return {*} |