| | |
| | | <el-table-column label="运维单位" align="center" prop="unitName" /> |
| | | <el-table-column label="监管部门" align="center" prop="deptName" /> |
| | | <el-table-column label="备注" align="center" prop="remark" /> |
| | | <el-table-column v-for="(column, index) in dynamicColumnList" :key="index" :label="column.labelValue" :prop="column.propName" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ getDynamicValue(scope.row, column.propName) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addDynamicColumn, deleteDynamicColumnById, editDynamicColumn, getDynamicColumnList } from '@/api/platform/dynamicColumn' |
| | | import { listPoint, getPoint, delPoint, addPoint, batchEdit, updatePoint, exportData, importData, timeRange } from "@/api/platform/point"; |
| | | import { unitSelect } from "@/api/platform/unit"; |
| | | import { getCascader } from '@/api/platform/region' |
| | |
| | | dicts: ['point_tag', 'area_code'], |
| | | data() { |
| | | return { |
| | | dynamicColumnList: [], |
| | | needUpdateUnit: false, |
| | | importantTag: false, |
| | | provinceTag: false, |
| | |
| | | this.getUnitSelect(); |
| | | // this.getCascader(); |
| | | this.getDeptCascader(); |
| | | this.getDyColumn() |
| | | }, |
| | | methods: { |
| | | getDyColumn() { |
| | | // 查询动态列 |
| | | let params = { |
| | | tableName: 't_yw_point' |
| | | } |
| | | getDynamicColumnList(params).then(res => { |
| | | this.dynamicColumnList = res.data |
| | | }) |
| | | }, |
| | | getDynamicValue(row, propName) { |
| | | let target = row.dynamicColumnList.filter(item => item.propName === propName) |
| | | return target && target.length > 0 ? target[0].columnValue : '' |
| | | }, |
| | | getTagText(row) { |
| | | let text = ''; |
| | | |