xy 2 years ago
parent 4cddc74b25
commit f84ffdbf1a

@ -108,17 +108,17 @@ export default {
fontSize: 24, fontSize: 24,
fontWeight: 'normal' fontWeight: 'normal'
}, },
subtext: newData.year + '/' + newData.weekCategory[6], subtext: newData.asset?.name,
subtextStyle: { subtextStyle: {
color: '#fff', color: '#fff',
fontSize: 16 fontSize: 15
}, },
top: 14, top: 14,
left: 30 left: 12
}, },
legend: { legend: {
top: 128, top: 128,
left: 30, left: 12,
orient: 'vertical', orient: 'vertical',
itemGap: 15, itemGap: 15,
itemWidth: 12, itemWidth: 12,
@ -163,20 +163,16 @@ export default {
}, },
indicator: [ indicator: [
{ {
name: '服务态度', name: '教育'
max: newData.maxData
}, },
{ {
name: '产品质量', name: '交通'
max: 10
}, },
{ {
name: '任务效率', name: '商圈'
max: 12
}, },
{ {
name: '售后保障', name: '舒适度'
max: 3.5
} }
] ]
}, },
@ -194,18 +190,17 @@ export default {
color: 'rgba(255,255,255,.8)', color: 'rgba(255,255,255,.8)',
fontSize: 12 fontSize: 12
}, },
data: newData.weekCategory data: newData.lease.map(item => item?.zulinkaishiqixian??'')
}, },
// Y // Y
yAxis: { yAxis: {
name: '工单', name: '租赁面积',
nameLocation: 'end', nameLocation: 'end',
nameGap: 24, nameGap: 24,
nameTextStyle: { nameTextStyle: {
color: 'rgba(255,255,255,.5)', color: 'rgba(255,255,255)',
fontSize: 14 fontSize: 14
}, },
max: newData.maxData,
splitNumber: 4, splitNumber: 4,
axisLine: { axisLine: {
@ -232,7 +227,7 @@ export default {
symbolSize: 0, symbolSize: 0,
data: [ data: [
{ {
value: newData.radarDataAvg[6], value: newData.radarDataAvg,
name: '平均指标', name: '平均指标',
itemStyle: { itemStyle: {
normal: { normal: {
@ -256,7 +251,7 @@ export default {
} }
}, },
{ {
value: newData.radarData[6], value: newData.radarData,
name: '我的指标', name: '我的指标',
itemStyle: { itemStyle: {
normal: { normal: {
@ -303,7 +298,7 @@ export default {
color: this.colorList.areaBtoG color: this.colorList.areaBtoG
} }
}, },
data: newData.weekLineData, data: newData.lease.map(i => i?.zulinmianji??0),
lineSmooth: true, lineSmooth: true,
markLine: { markLine: {
silent: true, silent: true,
@ -327,7 +322,7 @@ export default {
}, },
tooltip: { tooltip: {
position: 'top', position: 'top',
formatter: '{c} m', formatter: '{c} 平方',
backgroundColor: 'rgba(28,152,232,.2)', backgroundColor: 'rgba(28,152,232,.2)',
padding: 6 padding: 6
} }
@ -344,7 +339,7 @@ export default {
}, },
silent: true, silent: true,
barWidth: '50%', barWidth: '50%',
data: newData.weekMaxData, data: newData.lease.map(i => i?.zulinmianji??0),
animation: false animation: false
} }
] ]

@ -55,6 +55,12 @@ export default {
zulinjieshuqixian: "租赁结束期限", zulinjieshuqixian: "租赁结束期限",
zulingmianji: "租赁面积", zulingmianji: "租赁面积",
yingshouzujin: "应收租金" yingshouzujin: "应收租金"
},
t4: {
zichanmingcheng: "资产名称",
zichanleixing: "资产类型",
jianchajilu: "检查记录",
riqi: "日期"
} }
} }
}, },
@ -82,6 +88,7 @@ export default {
if (this.type === 1) return this.t1; if (this.type === 1) return this.t1;
if (this.type === 2) return this.t2; if (this.type === 2) return this.t2;
if (this.type === 3) return this.t3; if (this.type === 3) return this.t3;
if (this.type === 4) return this.t4;
}, },
descriptionItem () { descriptionItem () {
return function (key) { return function (key) {

@ -78,6 +78,27 @@
<!-- <xy-table :height="400" :table-item="table2" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" :action="index" :req-opt="select1"></xy-table>--> <!-- <xy-table :height="400" :table-item="table2" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" :action="index" :req-opt="select1"></xy-table>-->
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="80" type="flex">
<el-col :span="12">
<div class="contract__title">
<h3>安全检查</h3>
<div class="more" @click="$router.push('/system/documents')">
更多
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
<div class="list">
<div class="list-item" v-for="item in assetSafetyInspections" @click="$refs['drawer'].setType(4),$refs['drawer'].setRow(item),$refs['drawer'].show()">
<span>{{ item.zichanmingcheng }}</span>
<span>{{ $moment(new Date(item.riqi)).format('YYYY-MM-DD') }}</span>
</div>
<Page class="list-page" :page-size="systemSelect.page_size" :total="systemTotal" size="small" />
</div>
</el-col>
</el-row>
</div> </div>
</Card> </Card>
@ -245,6 +266,20 @@
}, },
systems: [], systems: [],
systemTotal: 0, systemTotal: 0,
assetSafetyInspectionsSelect: {
table_name: 'asset_safety_inspections',
page: 1,
page_size: 10,
filter: [
{
key: "riqi",
op: "range",
value: `${this.$moment().format("YYYY-MM-DD")},2999-01-01`
}
]
},
assetSafetyInspectionsTotal: 0,
assetSafetyInspections: [],
noticeSelect: { noticeSelect: {
table_name: 'notices', table_name: 'notices',
page: 1, page: 1,
@ -436,6 +471,12 @@
this.notices = res; this.notices = res;
this.noticeTotal = res.length; this.noticeTotal = res.length;
}, },
async getAssetSafetyInspections () {
this.assetSafetyInspectionsSelect.filter[0].value = `${this.$moment().format("YYYY-MM-DD")},${this.$moment().add(this.config.time, this.config.unit).format("YYYY-MM-DD")}`
const res = await index(this.assetSafetyInspectionsSelect,false);
this.assetSafetyInspections = res.data;
this.assetSafetyInspectionsTotal = res.total;
},
async getSystems () { async getSystems () {
const res = await index(this.systemSelect,false); const res = await index(this.systemSelect,false);
this.systems = res.data; this.systems = res.data;
@ -458,6 +499,7 @@
this.getSystems(); this.getSystems();
this.getConfig().then(_ => { this.getConfig().then(_ => {
this.getLeases(); this.getLeases();
this.getAssetSafetyInspections();
}) })
//this.loadData(); //this.loadData();
}, },

@ -79,7 +79,7 @@ export default {
} }
] ]
}) })
console.log(res) this.leases = res.data
}, },
async getData () { async getData () {
await Promise.all([ await Promise.all([

@ -25,6 +25,7 @@
import SvgIcon from "@/components/SvgIcon" import SvgIcon from "@/components/SvgIcon"
import Chart from "@/components/Charts" import Chart from "@/components/Charts"
export default { export default {
inject: ["assets","leases"],
components: { components: {
SvgIcon, SvgIcon,
Chart Chart
@ -57,48 +58,38 @@ export default {
}, 6000); }, 6000);
}, },
setData () { setData () {
let myAsset,assets;
if (this.assetsList instanceof Array) {
assets = this.assetsList.filter(i => !!(i.jiaotong || i.jiaoyu || i.shangquan || i.shushidu))
myAsset = assets[Math.floor(Math.random() * assets.length)];
}
console.log(myAsset)
// if (this.leaseList instanceof Array) {
// console.log(this.leaseList)
// myLease = this.leaseList[Math.floor(Math.random() * this.leaseList.length)];
// console.log(myLease)
// }
// //
this.cdata.weekCategory = []; this.cdata.asset = myAsset??{};
this.cdata.weekMaxData = []; this.cdata.lease = myAsset ? myAsset["id_leases_land_id_relation"] : [];
this.cdata.weekLineData = []; console.log(this.cdata.lease)
this.cdata.radarData = []; this.cdata.radarData = myAsset ? [myAsset.jiaotong, myAsset.jiaoyu, myAsset.shangquan, myAsset.shushidu] : [];
this.cdata.radarDataAvg = []; this.cdata.radarDataAvg = assets ?
[
let dateBase = new Date(); assets.reduce((a,b) => (a + Number(b.jiaotong??0)),0)/assets.length,
this.cdata.year = dateBase.getFullYear(); assets.reduce((a,b) => (a + Number(b.jiaoyu??0)),0)/assets.length,
// assets.reduce((a,b) => (a + Number(b.shangquan??0)),0)/assets.length,
for (let i = 0; i < 7; i++) { assets.reduce((a,b) => (a + Number(b.shushidu??0)),0)/assets.length
// ] :
let date = new Date(); [0, 0, 0, 0];
this.cdata.weekCategory.unshift([date.getMonth() + 1, date.getDate()-i].join("/"));
// 线
this.cdata.weekMaxData.push(this.cdata.maxData);
let distance = Math.round(Math.random() * 11000 + 500);
this.cdata.weekLineData.push(distance);
//
//
let averageSpeed = +(Math.random() * 5 + 3).toFixed(3);
let maxSpeed = averageSpeed + +(Math.random() * 3).toFixed(2);
let hour = +(distance / 1000 / averageSpeed).toFixed(1);
let radarDayData = [distance, averageSpeed, maxSpeed, hour];
this.cdata.radarData.unshift(radarDayData);
//
let distanceAvg = Math.round(Math.random() * 8000 + 4000);
let averageSpeedAvg = +(Math.random() * 4 + 4).toFixed(3);
let maxSpeedAvg = averageSpeedAvg + +(Math.random() * 2).toFixed(2);
let hourAvg = +(distance / 1000 / averageSpeed).toFixed(1);
let radarDayDataAvg = [
distanceAvg,
averageSpeedAvg,
maxSpeedAvg,
hourAvg
];
this.cdata.radarDataAvg.unshift(radarDayDataAvg);
} }
},
computed: {
assetsList () {
return this.assets()[1]
},
leaseList () {
return this.leases()
} }
} }
}; };

Loading…
Cancel
Save