master
lion 4 years ago
parent e5827f9a65
commit 0ce46e48f7

@ -25,6 +25,7 @@
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"qqmap": "^1.0.1",
"table-excel": "^1.1.8",
"view-design": "^4.7.0",
"vue": "2.6.10",
"vue-count-to": "^1.0.13",

@ -17,3 +17,12 @@ export function get(id) {
}
})
}
export function listvisitor(params) {
return request({
url: '/api/admin/visit/order-detail-index',
method: 'get',
params:params
})
}

@ -51,3 +51,13 @@ export function chanStatus(params) {
params:params
})
}
export function delrule(id) {
return request({
url: '/api/admin/visit/rule-destroy',
method: 'get',
params:{
id
}
})
}

@ -44,3 +44,13 @@ export function get(id) {
})
}
export function delrule(id) {
return request({
url: '/api/admin/visit-special/rule-destroy',
method: 'get',
params:{
id
}
})
}

@ -29,7 +29,8 @@
</div>
</div>
<div v-else-if="column.type=='status'" v-for="item in parameters.status_list">
<div v-if="item.id==scope.row[column.field]">
<div v-if="item.id==scope.row[column.field]">
<el-tag v-if="scope.row[column.field]==3" type="info">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==1" type="warning">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==2" type="success">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==0" type="info">{{item.value}}</el-tag>
@ -174,7 +175,11 @@
}, {
value: '已取消',
id: "0"
}]
},{
value: '已过期',
id: "3"
}
]
},
tableHeight: 0,

@ -58,7 +58,7 @@
{{form.mobile}}
</div>
</el-form-item>
<el-form-item label="预约类型" prop="type">
<el-form-item label="车位类型" prop="type">
<div v-if="form.type==1">
小车位
</div>

@ -0,0 +1,309 @@
<template>
<div class="container">
<!-- 查询配置 -->
<div style="padding: 0px 20px">
<div ref="lxHeader">
<LxHeader icon="md-apps" text="参观游客" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<el-date-picker
class="vm10"
v-model="visitRange"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="参观开始时间"
end-placeholder="参观结束时间">
</el-date-picker>
<el-date-picker
class="vm10"
v-model="orderRange"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="订单开始时间"
end-placeholder="订单结束时间">
</el-date-picker>
<el-select class="vm10 vm15" v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in parameters.type_list" :key="item.id" :label="item.value"
:value="item.id">
</el-option>
</el-select>
<Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" />
<Input class="inputwrap" v-model="searchFields.unit" placeholder="请输入单位" />
<Button type="primary" style="margin-right:10px" @click="searchload"></Button>
<Button type="primary" @click="resetload"></Button>
<!-- <Button type="primary" @click="searchload"></Button> -->
</div>
</slot>
</LxHeader>
</div>
<div class="table-tree">
<el-table :data="tableData" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号" fixed="left"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width" :fixed="column.fixed">
<template slot-scope="scope">
<div v-if="column.type=='status'" >
<div v-for="item in parameters.status_list">
<div v-if="item.id==scope.row[column.field]">
<el-tag v-if="scope.row[column.field]==1" type="warning">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==2" type="success">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==0" type="info">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==3" type="info">{{item.value}}</el-tag>
</div>
</div>
</div>
<div v-else>{{scope.row[column.field]}}</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</div>
</div>
</div>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
listvisitor
} from "../../api/order/visitorder.js";
export default {
components: {
LxHeader
},
data() {
return {
parameters: {
type_list:[{
value: '团体',
id: "1"
},{
value: '个人',
id: "2"
}],
status_list:[{
value: '待参观',
id: "1"
}, {
value: '已参观',
id: "2"
}, {
value: '已取消',
id: "0"
},{
value: '已过期',
id: "3"
}]
},
tableHeight: 0,
clientHeight:0,
//
visitRange:[],
orderRange:[],
searchFields: {
keyword: "",
start_date:"",
end_date:"",
order_start_date:"",
order_end_date:"",
// is_export:0,
type:"",
unit:""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
columns: [{
field: "date",
title: "预约日期",
type: "date",
width:180,
fixed:"left"
},
{
field: "person",
title: "预约人",
type: "string",
align:"center",
width:120
},
{
field: "personmobile",
title: "游客电话",
type: "string",
align:"center",
width:180,
},
{
field: "is_disability",
title: "是否行动不便",
type: "string",
align:"center",
width:120
},
{
field: "typeName",
title: "类型",
type: "string",
align:"center",
width:120
},
{
field: "leader",
title: "领队人",
type: "string",
align:"center",
width:120
},
{
field: "mobile",
title: "联系电话",
type: "string",
align:"center",
width:180,
},
{
field: "unit",
title: "单位",
type: "string",
align:"center",
width:200,
},
{
field: "created_at",
title: "下单时间",
type: "string",
align:"center",
width:180,
},
{
field: "status",
title: "订单状态",
type: "status",
align:"center",
fixed:"right",
width:120
}
]
}
},
created() {
this.initLoad();
this.load();
},
mounted() {},
methods: {
initLoad() {
var that = this;
var clientHeight = document.documentElement.clientHeight
var lxHeader_height = 96.5; //
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
},
load() {
var that = this;
listvisitor({
page: this.paginations.page,
page_size: this.paginations.page_size,
keyword:this.searchFields.keyword,
start_date:this.searchFields.start_date,
end_date:this.searchFields.end_date,
order_start_date:this.searchFields.order_start_date,
order_end_date:this.searchFields.order_end_date,
is_export:0,
type:this.searchFields.type,
unit:this.searchFields.unit
}).then(res => {
let _data = [];
// let result = Object.assign(_data, res.data);
for(var m of res.data){
var mod ={};
mod.date = m.visit_order.date +" "+ m.visit_order.time
mod.leader = m.visit_order.type==1 ? m.visit_order.leader : m.name
mod.mobile = m.visit_order.mobile
mod.typeName = m.visit_order.type==1 ? "团体" : "个人"
mod.unit = m.visit_order.type==1 ? m.visit_order.unit : "无"
mod.person = m.name
mod.personmobile = m.mobile
mod.created_at = m.created_at
mod.is_disability = m.is_disability == 0 ? "否" : "是"
mod.status = m.status
_data.push(mod)
}
that.tableData = _data;
that.paginations.total = res.total
this.$forceUpdate()
}).catch(error => {
})
},
searchload(){
this.searchFields.start_date = this.visitRange[0]
this.searchFields.end_date = this.visitRange[1]
this.searchFields.order_start_date = this.orderRange[0]
this.searchFields.order_end_date = this.orderRange[1]
this.load()
},
resetload(){
this.searchFields = {
keyword: "",
start_date:"",
end_date:"",
order_start_date:"",
order_end_date:"",
// is_export:0,
type:"",
unit:""
},
this.visitRange = []
this.orderRange = []
this.load()
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
}
}
};
</script>
<style>
.inputwrap{
width:150px;
margin:10px;
margin-left:0;
}
.inputwrap input{
height:40px;
}
.inputwrap .ivu-input-suffix{
line-height: 40px!important;
}
.vm10{
vertical-align: middle;
margin:10px;
margin-left:0;
width: 360px !important;
}
.vm15{
width: 150px !important;
}
</style>

@ -42,6 +42,7 @@
<el-tag v-if="scope.row[column.field]==1" type="warning">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==2" type="success">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==0" type="info">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==3" type="info">{{item.value}}</el-tag>
</div>
</div>
<div v-else>{{scope.row[column.field]}}</div>
@ -186,8 +187,11 @@
value: '已参观',
id: "2"
}, {
value: '取消预约',
value: '取消',
id: "0"
},{
value: '已过期',
id: "3"
}]
},
tableHeight: 0,

@ -15,7 +15,8 @@
</el-date-picker>
<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>
</div>
</slot>
</LxHeader>
@ -43,7 +44,8 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import LineChart from './components/LineChart'
import LineChart from './components/LineChart'
import { ElMapExportTable } from "table-excel";
import {
activityRpt
} from "@/api/report/activity.js";
@ -74,7 +76,22 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "月份", dataIndex: "month" }, // dataIndex
{ title: "预约人数", dataIndex: "plan_total" },
{ title: "入场人数", dataIndex: "use_total" },
{ title: "核销比", dataIndex: "per" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("活动年度统计报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"
@ -99,6 +116,7 @@
year:this.searchFields.year
}).then((res) => {
for (var m of res) {
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"
m.month = m.month+"月";
xarr.push(m.month);
planarr.push(

@ -15,7 +15,8 @@
</el-date-picker>
<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>
</div>
</slot>
</LxHeader>
@ -41,7 +42,9 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import LineChart from './components/LineChart'
import LineChart from './components/LineChart'
import { ElMapExportTable } from "table-excel";
// import {export_json_to_excel} from '@/Excel/Export2Excel';
import {
carparkRpt
} from "@/api/report/parking.js";
@ -72,7 +75,21 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "月份", dataIndex: "month" }, // dataIndex
{ title: "预约车辆数", dataIndex: "plan_total" },
{ title: "入场车辆数", dataIndex: "use_total" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("停车年度统计报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"

@ -16,7 +16,9 @@
</el-date-picker>
<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>
</div>
</slot>
</LxHeader>
@ -44,7 +46,8 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import PieChart from '../components/PieChart'
import PieChart from '../components/PieChart'
import { ElMapExportTable } from "table-excel";
import {
ageRpt
} from "@/api/report/visit.js";
@ -73,7 +76,22 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "年龄段", dataIndex: "name" }, // dataIndex
{ title: "预约人数", dataIndex: "plan_total" },
{ title: "入场人数", dataIndex: "use_total" },
{ title: "核销比", dataIndex: "per" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("年龄分析报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "数据展示" : "图表展示"
@ -93,7 +111,7 @@
var arr = [];
ageRpt().then((res) => {
for (var m of res) {
m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%"
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"
arr.push({
name: m.name,

@ -16,7 +16,9 @@
</el-date-picker>
<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>
</div>
</slot>
</LxHeader>
@ -44,7 +46,8 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import LineChart from '../components/LineChart'
import LineChart from '../components/LineChart'
import { ElMapExportTable } from "table-excel";
import {
visitdetailRpt
} from "@/api/report/visit.js";
@ -75,7 +78,22 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "参观时间", dataIndex: "date" }, // dataIndex
{ title: "预约人数", dataIndex: "plan_total" },
{ title: "入场人数", dataIndex: "use_total" },
{ title: "核销比", dataIndex: "per" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("参观明细统计报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"
@ -98,7 +116,7 @@
var usearr=[];
visitdetailRpt().then((res) => {
for (var m of res) {
m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%"
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"
xarr.push(m.date);
planarr.push(
m.plan_total

@ -16,6 +16,8 @@
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
<Button type="primary" style="margin-left: 10px" @click="handleGo"></Button>
</div>
</slot>
</LxHeader>
@ -43,7 +45,8 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import LineChart from '../components/LineChart'
import LineChart from '../components/LineChart'
import { ElMapExportTable } from "table-excel";
import {
monthRpt
} from "@/api/report/visit.js";
@ -74,7 +77,22 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "月份", dataIndex: "month" }, // dataIndex
{ title: "预约人数", dataIndex: "plan_total" },
{ title: "入场人数", dataIndex: "use_total" },
{ title: "核销比", dataIndex: "per" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("月度增长分析统计报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"
@ -99,7 +117,7 @@
year:this.searchFields.year
}).then((res) => {
for (var m of res) {
m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%"
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"
m.month = m.month+"月";
xarr.push(m.month);
planarr.push(

@ -15,7 +15,9 @@
</el-date-picker>
<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>
</div>
</slot>
</LxHeader>
@ -47,7 +49,8 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import LineChart from '../components/LineChart'
import LineChart from '../components/LineChart'
import { ElMapExportTable } from "table-excel";
import {
detailRpt
} from "@/api/report/visit.js";
@ -78,7 +81,24 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "时段", dataIndex: "daterange" }, // dataIndex
{ title: "预约人数", dataIndex: "plan_total" },
{ title: "入场人数", dataIndex: "use_total" },
{ title: "性别男", dataIndex: "man_total" },
{ title: "性别女", dataIndex: "woman_total" },
{ title: "核销比", dataIndex: "per" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("时段统计报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"

@ -16,6 +16,8 @@
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
<Button type="primary" style="margin-left: 10px" @click="handleGo"></Button>
</div>
</slot>
</LxHeader>
@ -43,7 +45,8 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import LineChart from '../components/LineChart'
import LineChart from '../components/LineChart'
import { ElMapExportTable } from "table-excel";
import {
quarterRpt
} from "@/api/report/visit.js";
@ -91,7 +94,22 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "季度", dataIndex: "datelist" }, // dataIndex
{ title: "预约人数", dataIndex: "plan_total" },
{ title: "入场人数", dataIndex: "use_total" },
{ title: "核销比", dataIndex: "per" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("季度增长统计报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"
@ -117,7 +135,7 @@
year:this.searchFields.year
}).then((res) => {
for (var m of this.dataArr) {
res[m.id].per = (res[m.id].use_total / (res[m.id].plan_total == 0 ? 1 : res[m.id].plan_total)) * 100 + "%"
res[m.id].per = ((res[m.id].use_total / (res[m.id].plan_total == 0 ? 1 : res[m.id].plan_total)) * 100).toFixed(2) + "%"
xArr.push(m.value);
planarr.push(
res[m.id].plan_total

@ -16,7 +16,9 @@
</el-date-picker>
<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>
</div>
</slot>
</LxHeader>
@ -44,7 +46,8 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import PieChart from '../components/PieChart'
import PieChart from '../components/PieChart'
import { ElMapExportTable } from "table-excel";
import {
sexRpt
} from "@/api/report/visit.js";
@ -73,7 +76,22 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "性别", dataIndex: "sex_name" }, // dataIndex
{ title: "预约人数", dataIndex: "plan_total" },
{ title: "入场人数", dataIndex: "use_total" },
{ title: "核销比", dataIndex: "per" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("性别分析报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"
@ -93,7 +111,7 @@
var arr = [];
sexRpt().then((res) => {
for (var m of res) {
m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%"
m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%"
arr.push({
name: m.sex_name,

@ -16,7 +16,9 @@
</el-date-picker>
<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>
</div>
</slot>
</LxHeader>
@ -44,7 +46,8 @@
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import LineChart from '../components/LineChart'
import LineChart from '../components/LineChart'
import { ElMapExportTable } from "table-excel";
import {
duringRpt
} from "@/api/report/visit.js";
@ -94,7 +97,26 @@
}
}
},
methods: {
methods: {
/** 导出按钮操作 */
handleGo(){
var data = this.tableData; //
const column = [
{ title: "时段", dataIndex: "datelist" }, // dataIndex
{ title: "预约人数", dataIndex: "plan_total" },
{ title: "入场人数", dataIndex: "use_total" },
{ title: "核销比", dataIndex: "per" },
];
const instance = new ElMapExportTable(
{ column, data },
{ progress: progress => console.log(progress) }//
);
instance.download("参观明细统计报表"); //
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"
},
viewPart() {
this.showData = !this.showData;
this.btnText = this.showData ? "图表展示" : "数据展示"
@ -118,7 +140,7 @@
var tableArr = [];
duringRpt().then((res) => {
for (var m of this.dataArr) {
res[m.id].per = (res[m.id].use_total / (res[m.id].plan_total == 0 ? 1 : res[m.id].plan_total)) * 100 + "%"
res[m.id].per = ((res[m.id].use_total / (res[m.id].plan_total == 0 ? 1 : res[m.id].plan_total)) * 100).toFixed(2) + "%"
xArr.push(m.value);
planarr.push(
res[m.id].plan_total

@ -113,7 +113,8 @@
</div>
<el-table :data="form.rules_list" height="400" class="v-table" style="width: 100%;margin-bottom: 20px;">
<el-table-column type="index" align="center">
</el-table-column>
</el-table-column>
<el-table-column prop="start_time" label="开始时间">
<template slot-scope="scope">
<el-time-select
@ -178,8 +179,9 @@
</template>
</el-table-column>
<el-table-column label="操作" width="120px" align="center">
<template slot-scope="scope">
<Button type="error" @click="delRow(scope.$index)" size="small" style="margin-left: 10px;"
<template slot-scope="scope">
<el-input style="display: none;" type="hidden" v-model="scope.row.id"></el-input>
<Button type="error" @click="delRow(scope.$index,scope.row.id)" size="small" style="margin-left: 10px;"
ghost>删除</Button>
</template>
</el-table-column>
@ -201,7 +203,8 @@
save,
del,
get,
chanStatus
chanStatus,
delrule
} from "../../api/resource/visitresource.js";
export default {
components: {
@ -261,6 +264,7 @@
team_max_count: "",
team_min_count: "",
rules_list:[{
id:"",
start_time:"",
show_start_time:"",
end_time:"",
@ -347,7 +351,8 @@
} else {}
this.dialogFormVisible = true;
},
submitForm(formName) {
submitForm(formName) {
console.log(this.form)
var that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
@ -428,7 +433,8 @@
},
addRow() {
var len = this.form.rules_list.length;
this.form.rules_list.push({
this.form.rules_list.push({
id:"",
start_time: "",
end_time:"",
show_start_time: "",
@ -436,8 +442,23 @@
total:""
});
},
delRow(index) {
this.form.rules_list.splice(index, 1);
delRow(index,id) {
var that = this
if(id){
delrule(id).then(response => {
that.$Message.success('删除成功');
that.form.rules_list.splice(index, 1);
}).catch(error => {
console.log(error)
reject(error)
})
}else{
this.form.rules_list.splice(index, 1);
}
},
handleCurrentChange(page) {
this.paginations.page = page;

@ -156,8 +156,9 @@
</template>
</el-table-column>
<el-table-column label="操作" width="120px" align="center">
<template slot-scope="scope">
<Button type="error" @click="delRow(scope.$index)" size="small" style="margin-left: 10px;"
<template slot-scope="scope">
<el-input style="display: none;" type="hidden" v-model="scope.row.id"></el-input>
<Button type="error" @click="delRow(scope.$index,scope.row.id)" size="small" style="margin-left: 10px;"
ghost>删除</Button>
</template>
</el-table-column>
@ -178,7 +179,8 @@
store,
save,
del,
get
get,
delrule
} from "../../api/resource/visitspecial.js";
import {
getparameteritem
@ -219,6 +221,7 @@
start_date:"",
end_date:"",
rules_list:[{
id:"",
start_time:"",
end_time:"",
show_start_time:"",
@ -315,6 +318,7 @@
if (valid) {
if(!this.isRules){
that.form.rules_list = [{
id:"",
start_time:"",
end_time:"",
show_start_time:"",
@ -376,14 +380,28 @@
},
addRow() {
var len = this.form.rules_list.length;
this.form.rules_list.push({
start_time: "",
this.form.rules_list.push({
id:"",
start_time:"",
end_time:"",
show_start_time:"",
show_end_time:"",
total:""
});
},
delRow(index) {
this.form.rules_list.splice(index, 1);
delRow(index,id) {
var that = this
if(id){
delrule(id).then(response => {
that.$Message.success('删除成功');
that.form.rules_list.splice(index, 1);
}).catch(error => {
console.log(error)
reject(error)
})
}else{
this.form.rules_list.splice(index, 1);
}
},
handleCurrentChange(page) {
this.paginations.page = page;

Loading…
Cancel
Save