拍照装置--搜索、bug

master
13703816893 2 years ago
parent 524702ff9b
commit b06b7fddfa

@ -3,9 +3,51 @@
<div class="photoBox">
<div class="photoGraphicBtnGroup">
<h4>拍照装置管理</h4>
<el-button type="primary" icon="el-icon-plus" @click="handleAddPhoto()"
>新增</el-button
>
<el-button type="primary" icon="el-icon-plus" @click="handleAddPhoto()" >新增</el-button>
</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">
<el-table
@ -142,7 +184,7 @@
min-width="80"
><template slot-scope="scope"
>{{ 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
@ -282,6 +324,7 @@ import {
deleteTerminalJoggle,
resetTerminalApi,
setTermGPSJoggle,
getSearchInfo
} from "@/utils/api/index";
import moment from "moment";
import addPhotoDialog from "./components/addPhotoDialog.vue";
@ -299,6 +342,15 @@ export default {
},
data() {
return {
dyOptions: [{ id: 0, name: "全部" }], //
xlOptions: [{ id: 0, name: "全部" }], //线
gtOptions: [{ id: 0, name: "全部" }], //
formdata: {
dyId: 0,
lineId: 0,
towerId: 0,
searchnr:''
},
terminalTableData: [], //
photoDialog: false, //
photoDialogTitle: "", //
@ -324,6 +376,41 @@ export default {
};
},
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() {
this.loading = true;
@ -528,7 +615,7 @@ export default {
},
};
</script>
<style lang="less">
<style lang="less" scoped>
.photoGraphicDevice {
width: calc(100% - 32px);
height: calc(100% - 32px);
@ -539,6 +626,23 @@ export default {
height: calc(100% - 32px);
padding: 16px;
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 {
display: flex;
@ -547,8 +651,8 @@ export default {
}
.photoGraphicTable {
margin-top: 16px;
height: calc(100% - 48px);
// margin-top: 16px;
height: calc(100% - 70px);
}
.dropgps {
color: @color-primary;

@ -28,11 +28,11 @@ module.exports = defineConfig({
proxy: {
"/api": {
//表示拦截以/api开头的请求路径
//target: "http://47.96.238.157:8093", //阿里云服务器环境
target: "http://180.166.218.222:40080", //dell
target: "http://47.96.238.157:8093", //阿里云服务器环境
// target: "http://180.166.218.222:40080", //dell
changOrigin: true, //是否开启跨域
pathRewrite: {
"^/api": "/api", //重写api把api变成空字符因为我们真正请求的路径是没有api的
"^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的
},
},
},

Loading…
Cancel
Save