添加图片报表

jcbranch
fanluyan 10 months ago
parent d9fe04421d
commit 98e8af1350

@ -15,7 +15,7 @@
</el-select>
</el-form-item>
<el-form-item label="线路" class="xlbox">
<el-select v-model="formdata.lineId" filterable>
<el-select v-model="formdata.lineId" filterable @change="getlineNum">
<el-option
v-for="item in xlOptions"
:key="item.id"
@ -67,7 +67,9 @@
<el-table-column type="index" width="50" label="序号">
</el-table-column>
<el-table-column label="电压"> {{ dyName }} </el-table-column>
<el-table-column label="线路"> {{ xlName }} </el-table-column>
<el-table-column label="线路" show-overflow-tooltip>
{{ xlName }}
</el-table-column>
<el-table-column prop="day" label="日期"> </el-table-column>
<el-table-column label="装置总数"> {{ termTotalNum }} </el-table-column>
<el-table-column label="运维上线数量">
@ -156,8 +158,8 @@ export default {
formdata: {
dyId: null,
lineId: null,
picNum: "48",
norGraphRate: "100%",
picNum: "",
norGraphRate: "",
starttime:
new Date(new Date().setHours(0, 0, 0, 0)).getTime() -
3 * 24 * 60 * 60 * 1000, // 00:00:00
@ -196,9 +198,19 @@ export default {
.then((res) => {
this.xlOptions = res.data.list;
this.formdata.lineId = this.xlOptions[0].id;
this.getlineNum(this.xlOptions[0].id);
})
.catch((err) => {});
},
getlineNum(val) {
console.log(val);
const lineObj = this.xlOptions.find((item) => item.id == val);
console.log(lineObj);
this.formdata.picNum =
lineObj.photoCount == null ? "0" : lineObj.photoCount;
this.formdata.norGraphRate =
lineObj.photoRate == null ? "0%" : lineObj.photoRate;
},
onSubmit() {
if (this.formdata.starttime > this.formdata.endtime) {
return this.$message({
@ -230,11 +242,15 @@ export default {
picRportApi(params)
.then((res) => {
this.picLoading = false;
console.log(res.data);
this.tableData = res.data.dayList;
this.termTotalNum = res.data.termList.length;
this.dyName = res.data.termList[0].dyName;
this.xlName = res.data.termList[0].lineName;
if (res.data.termList.length !== 0) {
console.log(res.data);
this.tableData = res.data.dayList;
this.termTotalNum = res.data.termList.length;
this.dyName = res.data.termList[0].dyName;
this.xlName = res.data.termList[0].lineName;
} else {
this.tableData = [];
}
})
.catch((err) => {});
}, 100);

@ -21,7 +21,7 @@ module.exports = defineConfig({
"/api": {
//表示拦截以/api开头的请求路径
// target: "http://61.169.135.146:40101/", //
// target: "http://61.169.135.146:40080/", //dell
//target: "http://61.169.135.146:40080/", //dell
target: "http://61.169.135.146:40085/", //运维
//target: "http://192.168.50.197:8093/", //java本地后端
changOrigin: true, //是否开启跨域

Loading…
Cancel
Save