|
|
|
@ -10,6 +10,8 @@
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker
|
|
|
|
v-model="daterange"
|
|
|
|
v-model="daterange"
|
|
|
|
type="daterange"
|
|
|
|
type="daterange"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
|
|
@change='dateChange'
|
|
|
|
range-separator="至"
|
|
|
|
range-separator="至"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
@ -18,7 +20,7 @@
|
|
|
|
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
|
|
|
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
|
|
|
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
|
|
|
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
|
|
|
<Button type="primary" style="margin-left: 10px" @click="handleGo">导出</Button>
|
|
|
|
<Button type="primary" style="margin-left: 10px" @click="handleGo">导出</Button>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</slot>
|
|
|
|
</slot>
|
|
|
|
</LxHeader>
|
|
|
|
</LxHeader>
|
|
|
|
@ -68,8 +70,8 @@
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
showData: false,
|
|
|
|
showData: false,
|
|
|
|
daterange:"",
|
|
|
|
daterange:[],
|
|
|
|
searchFields: {},
|
|
|
|
select: {},
|
|
|
|
tableData: [],
|
|
|
|
tableData: [],
|
|
|
|
tableHeight: 0,
|
|
|
|
tableHeight: 0,
|
|
|
|
chartHeight:"",
|
|
|
|
chartHeight:"",
|
|
|
|
@ -112,13 +114,25 @@
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
that.chartHeight = tableHeight+"px"
|
|
|
|
that.chartHeight = tableHeight+"px"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
dateChange(e){
|
|
|
|
|
|
|
|
if(e){
|
|
|
|
|
|
|
|
this.select.start_date = e[0]
|
|
|
|
|
|
|
|
this.select.end_date = e[1]
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.select.start_date = ''
|
|
|
|
|
|
|
|
this.select.end_date = ''
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
load() {
|
|
|
|
load() {
|
|
|
|
// this.showData = true;
|
|
|
|
// this.showData = true;
|
|
|
|
var xarr = [];
|
|
|
|
var xarr = [];
|
|
|
|
var planarr=[];
|
|
|
|
var planarr=[];
|
|
|
|
var usearr=[];
|
|
|
|
var usearr=[];
|
|
|
|
visitdetailRpt().then((res) => {
|
|
|
|
visitdetailRpt({
|
|
|
|
|
|
|
|
start_date:this.select.start_date,
|
|
|
|
|
|
|
|
end_date:this.select.end_date
|
|
|
|
|
|
|
|
}).then((res) => {
|
|
|
|
for (var m of res) {
|
|
|
|
for (var m of res) {
|
|
|
|
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"
|
|
|
|
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"
|
|
|
|
xarr.push(m.date);
|
|
|
|
xarr.push(m.date);
|
|
|
|
|