forked from xxhjsb/hbt-prevention-ui
feat:新增树全部
parent
3fc32115e2
commit
c44396a8f4
|
@ -99,7 +99,6 @@ import TableComponent from "hbt-common/components/common/table.component.vue"
|
||||||
import FormOption from "hbt-common/models/formOptions"
|
import FormOption from "hbt-common/models/formOptions"
|
||||||
import BtnOption from "hbt-common/models/btnOptions"
|
import BtnOption from "hbt-common/models/btnOptions"
|
||||||
import DrawComponent from '@/components/draw.component.vue';
|
import DrawComponent from '@/components/draw.component.vue';
|
||||||
import UnitTreeComponent from '@/components/tree.component.vue';
|
|
||||||
import WorkService from '@/service/work.service';
|
import WorkService from '@/service/work.service';
|
||||||
import UnitService from '@/service/unit.service';
|
import UnitService from '@/service/unit.service';
|
||||||
import AreaService from '@/service/area.service';
|
import AreaService from '@/service/area.service';
|
||||||
|
@ -115,7 +114,6 @@ import MeasureComponent from '@/components/measure.component.vue'
|
||||||
FormComponent,
|
FormComponent,
|
||||||
TableComponent,
|
TableComponent,
|
||||||
DrawComponent,
|
DrawComponent,
|
||||||
UnitTreeComponent,
|
|
||||||
ButtonListComponent,
|
ButtonListComponent,
|
||||||
MeasureComponent,
|
MeasureComponent,
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,6 @@ import TableComponent from "hbt-common/components/common/table.component.vue"
|
||||||
import FormOption from "hbt-common/models/formOptions"
|
import FormOption from "hbt-common/models/formOptions"
|
||||||
import BtnOption from "hbt-common/models/btnOptions"
|
import BtnOption from "hbt-common/models/btnOptions"
|
||||||
import DrawComponent from '@/components/draw.component.vue';
|
import DrawComponent from '@/components/draw.component.vue';
|
||||||
import UnitTreeComponent from '@/components/tree.component.vue';
|
|
||||||
import WorkService from '@/service/work.service';
|
import WorkService from '@/service/work.service';
|
||||||
import UnitService from '@/service/unit.service';
|
import UnitService from '@/service/unit.service';
|
||||||
import AreaService from '@/service/area.service';
|
import AreaService from '@/service/area.service';
|
||||||
|
@ -63,7 +62,6 @@ import { L_LECCOLUMN, L_LECVALUE, E_COLUMN, E_VALUE, C_COLUMN, C_VALUE } from '@
|
||||||
FormComponent,
|
FormComponent,
|
||||||
TableComponent,
|
TableComponent,
|
||||||
DrawComponent,
|
DrawComponent,
|
||||||
UnitTreeComponent,
|
|
||||||
ButtonListComponent,
|
ButtonListComponent,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Emit, Prop, Vue } from 'vue-property-decorator';
|
import { Component, Emit, Prop, Vue } from 'vue-property-decorator';
|
||||||
import mapboxgl from "mapbox-gl";
|
|
||||||
import "mapbox-gl/dist/mapbox-gl.css"
|
|
||||||
import UnitService from '@/service/unit.service';
|
import UnitService from '@/service/unit.service';
|
||||||
@Component
|
@Component
|
||||||
export default class UnitTreeComponent extends Vue {
|
export default class UnitTreeComponent extends Vue {
|
||||||
|
@ -20,7 +18,10 @@ export default class UnitTreeComponent extends Vue {
|
||||||
|
|
||||||
created(){
|
created(){
|
||||||
this.unitService.getUnitTree().then(res=>{
|
this.unitService.getUnitTree().then(res=>{
|
||||||
this.treeData = res.data;
|
this.treeData = [{
|
||||||
|
name:"全部",
|
||||||
|
children:res.data
|
||||||
|
}];
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
beforeDestory(){
|
beforeDestory(){
|
||||||
|
@ -29,8 +30,4 @@ export default class UnitTreeComponent extends Vue {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.map{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
|
@ -404,6 +404,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
|
|
||||||
public buildTable(){
|
public buildTable(){
|
||||||
this.tableColumn.push({name:'整改单编号',key:"number"});
|
this.tableColumn.push({name:'整改单编号',key:"number"});
|
||||||
|
this.tableColumn.push({name:'隐患描述',key:"description",width:"200px"});
|
||||||
this.tableColumn.push({name:'整改部门',key:"reformDeptName"});
|
this.tableColumn.push({name:'整改部门',key:"reformDeptName"});
|
||||||
this.tableColumn.push({name:'隐患级别',render:(data)=>{
|
this.tableColumn.push({name:'隐患级别',render:(data)=>{
|
||||||
return this.levelMap[data.level]
|
return this.levelMap[data.level]
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" v-if="isFile" @click="showUpdateModel(scope.row.userId)">查看</el-button>
|
<el-button type="text" v-if="isFile" @click="showUpdateModel(scope.row.userId)">查看</el-button>
|
||||||
<el-button type="text" v-if="isBase" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
<el-button type="text" v-if="isBase" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||||
<el-button type="text" v-if="isBase" @click="showUpdateModel(scope.row)">修改</el-button>
|
<el-button type="text" v-if="isBase" :disabled="isPlan && ((scope.row.planType===2 && scope.row.state) || (scope.row.planType===1 && scope.row.status))" @click="showUpdateModel(scope.row)">修改</el-button>
|
||||||
<el-button type="text" v-if="isBase" @click="deleteData([scope.row.id])">删除</el-button>
|
<el-button type="text" v-if="isBase" :disabled="isPlan && ((scope.row.planType===2 && (scope.row.state || scope.row.status)) || (scope.row.planType===1 && scope.row.status))" @click="deleteData([scope.row.id])">删除</el-button>
|
||||||
<el-button type="text" v-if="isPlan && !scope.row.status" @click="openSendModel(scope.row)">下发</el-button>
|
<el-button type="text" v-if="isPlan && !scope.row.status" :disabled="scope.row.planType===2 && scope.row.state===0 " @click="openSendModel(scope.row)">下发</el-button>
|
||||||
<el-button type="text" v-if="isPlan && scope.row.planType===2 && !scope.row.state" @click="changeState(scope.row)">启用</el-button>
|
<el-button type="text" v-if="isPlan && scope.row.planType===2 && !scope.row.state" @click="changeState(scope.row)">启用</el-button>
|
||||||
<el-button type="text" v-if="isPlan && scope.row.planType===2 && scope.row.state" @click="changeState(scope.row)">停用</el-button>
|
<el-button type="text" v-if="isPlan && scope.row.planType===2 && scope.row.state" @click="changeState(scope.row)">停用</el-button>
|
||||||
<el-button type="text" v-if="isPlan" @click="openRecordModel(scope.row)">检查情况</el-button>
|
<el-button type="text" v-if="isPlan" @click="openRecordModel(scope.row)">检查情况</el-button>
|
||||||
|
|
|
@ -91,7 +91,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
type:"primary"
|
type:"primary"
|
||||||
},{
|
},{
|
||||||
name:"保存",
|
name:"保存",
|
||||||
value:"save",
|
value:"draft",
|
||||||
type:"primary"
|
type:"primary"
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
||||||
if (data.areaId) {
|
if (data.areaId) {
|
||||||
this.params.unitName = data.name
|
this.params.unitName = data.name
|
||||||
} else {
|
} else {
|
||||||
this.params.areaName = data.name
|
this.params.areaName = data.name==="全部"?"":data.name
|
||||||
}
|
}
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
}
|
}
|
||||||
|
|
|
@ -407,7 +407,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
if (data.areaId) {
|
if (data.areaId) {
|
||||||
this.params.unitName = data.name
|
this.params.unitName = data.name
|
||||||
} else {
|
} else {
|
||||||
this.params.areaName = data.name
|
this.params.areaName = data.name==="全部"?"":data.name
|
||||||
}
|
}
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
|
|
||||||
|
|
|
@ -307,7 +307,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
||||||
if(data.areaId){
|
if(data.areaId){
|
||||||
this.params.unitName = data.name
|
this.params.unitName = data.name
|
||||||
}else{
|
}else{
|
||||||
this.params.areaName = data.name
|
this.params.areaName = data.name==="全部"?"":data.name
|
||||||
}
|
}
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
}
|
}
|
||||||
|
|
|
@ -406,7 +406,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
if (data.areaId) {
|
if (data.areaId) {
|
||||||
this.params.unitName = data.name
|
this.params.unitName = data.name
|
||||||
} else {
|
} else {
|
||||||
this.params.areaName = data.name
|
this.params.areaName = data.name==="全部"?"":data.name
|
||||||
}
|
}
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue