Merge branch 'xy-ly' into fly

master
fanluyan 2 years ago
commit 0699651b42

@ -3,10 +3,52 @@
<div class="photoBox"> <div class="photoBox">
<div class="photoGraphicBtnGroup"> <div class="photoGraphicBtnGroup">
<h4>拍照装置管理</h4> <h4>拍照装置管理</h4>
<el-button type="primary" icon="el-icon-plus" @click="handleAddPhoto()" <el-button type="primary" icon="el-icon-plus" @click="handleAddPhoto()" >新增</el-button>
>新增</el-button
>
</div> </div>
<!-- <div class="searchBox">
<el-form :inline="true" :model="formdata" class="demo-form-inline">
<el-form-item label="电压等级" class="dybox">
<el-select v-model="formdata.dyId" @change="getSearchxl">
<el-option
v-for="item in dyOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="线路名称" class="xlbox">
<el-select
v-model="formdata.lineId"
@change="getSearchgt"
filterable
>
<el-option
v-for="item in xlOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="杆塔名称">
<el-select v-model="formdata.towerId" filterable>
<el-option
v-for="item in gtOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input v-model="formdata.searchnr" placeholder="请输入线路/杆塔/设备编号"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
</el-form-item>
</el-form>
</div> -->
<div class="photoGraphicTable"> <div class="photoGraphicTable">
<el-table <el-table
ref="multipleTable" ref="multipleTable"
@ -142,7 +184,7 @@
min-width="80" min-width="80"
><template slot-scope="scope" ><template slot-scope="scope"
>{{ scope.row.batteryCapacity }} / >{{ scope.row.batteryCapacity }} /
{{ scope.row.batteryVoltage.toFixed(1) }}V</template {{ scope.row.batteryVoltage.toFixed(1) == 0.0 ? 0 : scope.row.batteryVoltage.toFixed(1)}}V</template
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -331,6 +373,7 @@ import {
deleteTerminalJoggle, deleteTerminalJoggle,
resetTerminalApi, resetTerminalApi,
setTermGPSJoggle, setTermGPSJoggle,
getSearchInfo
} from "@/utils/api/index"; } from "@/utils/api/index";
import moment from "moment"; import moment from "moment";
import addPhotoDialog from "./components/addPhotoDialog.vue"; import addPhotoDialog from "./components/addPhotoDialog.vue";
@ -348,6 +391,15 @@ export default {
}, },
data() { data() {
return { return {
dyOptions: [{ id: 0, name: "全部" }], //
xlOptions: [{ id: 0, name: "全部" }], //线
gtOptions: [{ id: 0, name: "全部" }], //
formdata: {
dyId: 0,
lineId: 0,
towerId: 0,
searchnr:''
},
roleUser: "", roleUser: "",
terminalTableData: [], // terminalTableData: [], //
photoDialog: false, // photoDialog: false, //
@ -373,7 +425,48 @@ export default {
gpsvalue: "1", gpsvalue: "1",
}; };
}, },
created() {
this.terminalList();
this.getSearchdy();
this.roleUser = localStorage.getItem("role");
console.log(this.roleUser);
},
methods: { methods: {
//
getSearchdy() {
getSearchInfo({ type: 1 })
.then((res) => {
this.dyOptions = this.dyOptions.concat(res.data.list);
this.formdata.dyId = this.dyOptions[0].id;
this.getSearchxl();
})
.catch((err) => {});
},
//线
getSearchxl() {
getSearchInfo({ type: 2, id: this.formdata.dyId })
.then((res) => {
this.xlOptions = [{ id: 0, name: "全部" }];
this.xlOptions = this.xlOptions.concat(res.data.list);
this.formdata.lineId = this.xlOptions[0].id;
this.getSearchgt();
})
.catch((err) => {});
},
//
getSearchgt() {
getSearchInfo({ type: 3, id: this.formdata.lineId })
.then((res) => {
this.gtOptions = [{ id: 0, name: "全部" }];
this.gtOptions = this.gtOptions.concat(res.data.list);
this.formdata.towerId = this.gtOptions[0].id;
})
.catch((err) => {});
},
//
onSubmit() {
this.terminalList();
},
//// ////
terminalList() { terminalList() {
this.loading = true; this.loading = true;
@ -572,15 +665,10 @@ export default {
this.pageSize = val; this.pageSize = val;
this.terminalList(); this.terminalList();
}, },
}, }
created() {
this.terminalList();
this.roleUser = localStorage.getItem("role");
console.log(this.roleUser);
},
}; };
</script> </script>
<style lang="less"> <style lang="less" scoped>
.photoGraphicDevice { .photoGraphicDevice {
width: calc(100% - 32px); width: calc(100% - 32px);
height: calc(100% - 32px); height: calc(100% - 32px);
@ -591,6 +679,23 @@ export default {
height: calc(100% - 32px); height: calc(100% - 32px);
padding: 16px; padding: 16px;
border-radius: 4px; border-radius: 4px;
.searchBox {
.ml10 {
margin-left: 10px;
}
.el-form {
.dybox {
.el-form-item__content {
width: 120px;
}
}
.xlbox {
.el-form-item__content {
width: 160px;
}
}
}
}
} }
.photoGraphicBtnGroup { .photoGraphicBtnGroup {
display: flex; display: flex;
@ -599,8 +704,9 @@ export default {
} }
.photoGraphicTable { .photoGraphicTable {
margin-top: 16px; // margin-top: 16px;
height: calc(100% - 48px); margin-top: 36px;
height: calc(100% - 70px);
} }
.dropgps { .dropgps {
color: @color-primary; color: @color-primary;

Loading…
Cancel
Save