刘翔宇-旅管家 4 years ago
parent 75a300ecd6
commit a173d8855b

@ -28,6 +28,7 @@
"view-design": "^4.7.0",
"vue": "2.6.10",
"vue-count-to": "^1.0.13",
"vue-qr": "^4.0.9",
"vue-qrcode-reader": "^3.1.0",
"vue-router": "3.0.6",
"vuex": "3.1.0"

@ -1,12 +1,12 @@
import request from '@/utils/request'
export function listactive(params) {
return request({
url: '/api/admin/activity/index',
method: 'get',
params:params
params: params
})
}
}
export function store(data) {
return request({
@ -15,6 +15,13 @@ export function store(data) {
data
})
}
export function codeUse(params) {
return request({
url: '/api/mobile/activity/code-use',
method: 'get',
params: params
})
}
export function save(data) {
return request({
@ -42,12 +49,12 @@ export function get(id) {
id
}
})
}
}
export function chanStatus(params) {
return request({
url: '/api/admin/activity/status',
method: 'get',
params:params
params: params
})
}

@ -0,0 +1,9 @@
import request from '@/utils/request'
export function sexRpt(params) {
return request({
url: '/api/admin/chart/sex',
method: 'get',
params: params
})
}

@ -31,11 +31,14 @@
style="margin-left: 10px;">下架</Button>
<Button v-if="scope.row['status']==0" ghost size="small" type="warning" @click="changeStatus(scope.row)"
style="margin-left: 10px;">上架</Button>
<Button ghost size="small" @click="toshowQr(scope.row)" type="primary"
style="margin-left: 10px;">核销码</Button>
</div>
<div v-else-if="column.type=='dateRange'">
{{scope.row["start_time"]+"-"+changeEndTime(scope.row["end_time"])}}
</div>
<div v-else-if="column.type=='status'">
<el-tag v-if="scope.row['status']==1" type="" effect="dark">
上架中
@ -213,11 +216,18 @@
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<el-dialog title="活动核销码" :visible.sync="isShowQr">
<div style="display: flex;justify-content: center;align-items: center;">
<vue-qr :text="url" :size="200"></vue-qr>
</div>
</el-dialog>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import Tinymce from '@/components/Tinymce'
import VueQr from 'vue-qr'
import {
getToken
} from '@/utils/auth'
@ -233,9 +243,12 @@
components: {
LxHeader,
Tinymce,
VueQr
},
data() {
return {
isShowQr: false,
url: "",
dialogFormVisible: false,
formLabelWidth: "120px",
selectedValue: null,
@ -353,7 +366,7 @@
{
field: "操作",
title: "操作",
width: 240,
width: 380,
type: "opt",
}
],
@ -419,11 +432,15 @@
}
},
methods: {
toshowQr(row) {
this.url = "https://" + location.host + "/admin/#/check?code=" + row.code
this.isShowQr = true;
},
initMap() {
//
if (this.map!=null) {
this.map.destroy()
}
//
if (this.map != null) {
this.map.destroy()
}
this.$nextTick(() => {
let that = this;
console.log(window); // window
@ -522,7 +539,7 @@
},
submitForm(formName) {
var that = this;
that.form.end_time = that.form.start_time.substring(0, 10) + " " + that.form.end_time;
that.form.end_time = that.form.start_time.substring(0, 10) + " " + that.form.end_time;
let listUrl = [];
for (var m of that.bannersList) {
if (m.response)
@ -533,7 +550,7 @@
listUrl.push({
"upload_id": m.upload_id
});
}
}
that.form.banners_list = listUrl;
this.$refs[formName].validate((valid) => {
if (valid) {
@ -666,8 +683,15 @@
},
toactive(obj) {
if (obj.id) {
let url = "/#/order/activeorder?activity_id=" + obj.id;
window.location.href = url
if (obj.id) {
this.$router.push({
path: '/order/activeorder',
query: {
activity_id: obj.id
}
})
}
}
},
changeEndTime(val) {

@ -28,7 +28,7 @@
<div class="myQrcode" style="padding: 10px 20px;">
<el-form ref="form" :model="form" label-position="top" label-width="80px">
<el-form-item label="核销码">
<el-input v-model="form.code" :autofocus="true" style="text-align: center;" ref="input"></el-input>
<el-input v-model="result" :autofocus="true" style="text-align: center;" ref="input"></el-input>
</el-form-item>
<el-form-item>
@ -53,6 +53,10 @@
QrcodeStream
} from 'vue-qrcode-reader';
import {
codeUse
} from "../../api/active/activity.js"
export default {
//
components: {
@ -73,13 +77,15 @@
qrcode: true,
torchActive: false,
camera: 'rear',
hcode: ""
};
},
created() {
var query = this.$route.query;
this.hcode = query.code;
},
methods: {
onDecode(result) {
console.log(result);
this.form.code=result;
this.result = result;
},
async onInit(promise) {
@ -106,6 +112,16 @@
}
}
},
onSubmit() {
var that = this;
that.form.code = that.hcode + "-" + that.result;
codeUse(that.form).then(response => {
console.log(response)
this.$Message.success('成功核销');
}).catch(error => {
this.$Message.error(error);
})
}
//
// openCamera() {
// this.camera = 'rear'
@ -146,10 +162,11 @@
},
};
</script>
<style scoped>
.el-input__inner{
text-align: center !important;
<style scoped>
.el-input__inner {
text-align: center !important;
}
.error {
font-weight: bold;
color: red;

@ -22,124 +22,124 @@
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="show(scope.row)" type="primary"
style="margin-left: 10px;">查看</Button>
</div>
<div v-else-if="column.type=='type'" v-for="item in parameters.visitType">
<div v-if="item.id==scope.row[column.field]">
{{item.value}}
</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]">
<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>
</div>
</div>
<div v-else-if="column.type=='type'" v-for="item in parameters.visitType">
<div v-if="item.id==scope.row[column.field]">
{{item.value}}
</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]">
<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>
</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>
</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>
<el-dialog title="预约信息查看" :visible.sync="dialogViewVisible" fullscreen>
<div class="dialogConcent">
<el-scrollbar style="flex: 1">
<el-form :model="form" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="类型" prop="type">
<el-tag v-if="form.type==1" type="" effect="dark" >
团体
</el-tag>
<el-tag v-if="form.type==2" type="" effect="dark" >
个人
</el-tag>
</el-form-item>
<el-form-item label="联系方式" prop="mobile">
<div>
{{form.mobile}}
</div>
</el-form-item>
<el-form-item v-if="form.type==1" label="单位名称" prop="unit">
<div>
{{form.unit}}
</div>
</el-form-item>
<el-form-item label="联系人" prop="leader">
<div>
{{form.leader}}
</div>
</el-form-item>
<el-form-item label="证件类型" prop="card_type">
<div v-if="form.card_type==1">
身份证
</div>
<div v-if="form.card_type==2">
护照
</div>
</el-form-item>
<el-form-item label="证件号" prop="idcard">
<div>
{{form.idcard}}
</div>
</el-form-item>
<el-form-item label="参与人数" prop="total">
<div>
{{form.total}}
</div>
</el-form-item>
<div style="padding: 20px 0px;" class="form-sub-title">
<span>详细人员资料
</span>
</div>
<div v-if="form.details_list.length>0" class="table-tree tableswidth">
<el-table :data="form.details_list" class="v-table" style="width: 100%;margin-bottom: 20px;">
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column width="200px" prop="name" label="姓名">
<template slot-scope="scope">
{{scope.row.name}}
</template>
</el-table-column>
<el-table-column prop="mobile" label="联系方式">
<template slot-scope="scope">
{{scope.row.mobile}}
</template>
</el-table-column>
<el-table-column prop="card_type" label="证件类型">
<template slot-scope="scope">
<div v-if="scope.row.card_type==1">
身份证
</div>
<div v-if="scope.row.card_type==2">
护照
</div>
</template>
</el-table-column>
<el-table-column prop="idcard" label="证件号">
<template slot-scope="scope">
{{scope.row.idcard}}
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
</div>
</el-dialog>
<el-dialog title="预约信息查看" :visible.sync="dialogViewVisible" fullscreen>
<div class="dialogConcent">
<el-scrollbar style="flex: 1">
<el-form :model="form" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="类型" prop="type">
<el-tag v-if="form.type==1" type="" effect="dark">
团体
</el-tag>
<el-tag v-if="form.type==2" type="" effect="dark">
个人
</el-tag>
</el-form-item>
<el-form-item label="联系方式" prop="mobile">
<div>
{{form.mobile}}
</div>
</el-form-item>
<el-form-item v-if="form.type==1" label="单位名称" prop="unit">
<div>
{{form.unit}}
</div>
</el-form-item>
<el-form-item label="联系人" prop="leader">
<div>
{{form.leader}}
</div>
</el-form-item>
<el-form-item label="证件类型" prop="card_type">
<div v-if="form.card_type==1">
身份证
</div>
<div v-if="form.card_type==2">
护照
</div>
</el-form-item>
<el-form-item label="证件号" prop="idcard">
<div>
{{form.idcard}}
</div>
</el-form-item>
<el-form-item label="参与人数" prop="total">
<div>
{{form.total}}
</div>
</el-form-item>
<div style="padding: 20px 0px;" class="form-sub-title">
<span>详细人员资料
</span>
</div>
<div v-if="form.details_list.length>0" class="table-tree tableswidth">
<el-table :data="form.details_list" class="v-table" style="width: 100%;margin-bottom: 20px;">
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column width="200px" prop="name" label="姓名">
<template slot-scope="scope">
{{scope.row.name}}
</template>
</el-table-column>
<el-table-column prop="mobile" label="联系方式">
<template slot-scope="scope">
{{scope.row.mobile}}
</template>
</el-table-column>
<el-table-column prop="card_type" label="证件类型">
<template slot-scope="scope">
<div v-if="scope.row.card_type==1">
身份证
</div>
<div v-if="scope.row.card_type==2">
护照
</div>
</template>
</el-table-column>
<el-table-column prop="idcard" label="证件号">
<template slot-scope="scope">
{{scope.row.idcard}}
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
listactiveorder,
listactiveorder,
get
} from "../../api/order/activeorder.js";
export default {
@ -151,80 +151,79 @@
dialogViewVisible: false,
formLabelWidth: "120px",
parameters: {
visitType:[{
id:1,
value:"团体"
},{
id:2,
value:"个人"
}],
cardType:[{
id:1,
value:"身份证"
},{
id:2,
value:"护照"
}],
status_list:[{
value: '待参加',
id: "1"
}, {
value: '已参加',
id: "2"
}, {
value: '取消预约',
id: "0"
visitType: [{
id: 1,
value: "团体"
}, {
id: 2,
value: "个人"
}],
cardType: [{
id: 1,
value: "身份证"
}, {
id: 2,
value: "护照"
}],
status_list: [{
value: '待参加',
id: "1"
}, {
value: '已参加',
id: "2"
}, {
value: '取消预约',
id: "0"
}]
},
tableHeight: 0,
clientHeight:0,
//
searchFields: {
name: ""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
tableHeight: 0,
clientHeight: 0,
//
searchFields: {
name: ""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
form: {
card_type: "",
rule_id: "",
unit: "",
card_type:"",
leader:"",
idcard: "",
total: "",
mobile: "",
type:"",
unit: "",
card_type: "",
leader: "",
idcard: "",
total: "",
mobile: "",
type: "",
details_list: []
},
columns: [
{
field: "leader",
title: "联系人",
type: "string",
align:"center"
},
{
field: "mobile",
title: "联系电话",
type: "string",
align:"center"
},
{
field: "type",
title: "类型",
type: "type",
align:"center"
},
{
field: "status",
title: "订单状态",
type: "status",
align:"center"
columns: [{
field: "leader",
title: "联系人",
type: "string",
align: "center"
},
{
field: "mobile",
title: "联系电话",
type: "string",
align: "center"
},
{
field: "type",
title: "类型",
type: "type",
align: "center"
},
{
field: "status",
title: "订单状态",
type: "status",
align: "center"
},
{
field: "操作",
@ -252,26 +251,22 @@
that.tableHeight = tableHeight;
},
load() {
var that = this;
var query=this.$route.query;
let activityId = query.activity_id;
if(activityId){
listactiveorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
activity_id: activityId
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
})
}else{
this.$Message.error('请在活动管理页选择要查询的活动!');
setTimeout(function(){
window.location.href='/#/active/activity'
},2000)
}
var that = this;
var query = this.$route.query;
let activityId = "";
if (query.activity_id)
activityId = query.activity_id
listactiveorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
activity_id: activityId
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
})
},
show(obj) {
@ -281,22 +276,22 @@
},
info(obj) {
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
that.form.details_list = result.details;
}).catch(error => {
//reject(error)
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
that.form.details_list = result.details;
}).catch(error => {
//reject(error)
})
},
resetForm(formName) {
var that = this;
that.dialogViewVisible = false;
this.$refs[formName].resetFields();
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
resetForm(formName) {
var that = this;
that.dialogViewVisible = false;
this.$refs[formName].resetFields();
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
}
}
};

@ -3,7 +3,7 @@
<!-- 查询配置 -->
<div style="padding: 0px 20px">
<div ref="lxHeader">
<LxHeader icon="md-apps" text="活动预约" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<LxHeader icon="md-apps" text="车位预约" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
@ -26,64 +26,64 @@
<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>
</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>
<el-dialog title="预约信息查看" :visible.sync="dialogViewVisible" width="60%">
<div class="dialogConcent">
<el-scrollbar style="flex: 1">
<el-form :model="form" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="预约时间" prop="time">
<div>
{{form.time}}
</div>
</el-form-item>
<el-form-item label="车牌号" prop="plate">
<div>
{{form.plate}}
</div>
</el-form-item>
<el-form-item label="联系方式" prop="mobile">
<div>
{{form.mobile}}
</div>
</el-form-item>
<el-form-item label="预约类型" prop="type">
<div v-if="form.type==1">
小车位
</div>
<div v-if="form.type==2">
大车位
</div>
</el-form-item>
<el-form-item label="车辆类型" prop="car_type">
<div v-if="form.car_type==1">
普通车
</div>
<div v-if="form.car_type==2">
新能源车
</div>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
</div>
</el-dialog>
<el-dialog title="预约信息查看" :visible.sync="dialogViewVisible" width="60%">
<div class="dialogConcent">
<el-scrollbar style="flex: 1">
<el-form :model="form" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="预约时间" prop="time">
<div>
{{form.time}}
</div>
</el-form-item>
<el-form-item label="车牌号" prop="plate">
<div>
{{form.plate}}
</div>
</el-form-item>
<el-form-item label="联系方式" prop="mobile">
<div>
{{form.mobile}}
</div>
</el-form-item>
<el-form-item label="预约类型" prop="type">
<div v-if="form.type==1">
小车位
</div>
<div v-if="form.type==2">
大车位
</div>
</el-form-item>
<el-form-item label="车辆类型" prop="car_type">
<div v-if="form.car_type==1">
普通车
</div>
<div v-if="form.car_type==2">
新能源车
</div>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
listparkorder,
listparkorder,
get
} from "../../api/order/parkorder.js";
export default {
@ -95,56 +95,55 @@
dialogViewVisible: false,
formLabelWidth: "120px",
parameters: {
parkType:[{
id:1,
value:"小车位"
},{
id:2,
value:"大车位"
}],
carType:[{
id:1,
value:"普通车"
},{
id:2,
value:"新能源车"
parkType: [{
id: 1,
value: "小车位"
}, {
id: 2,
value: "大车位"
}],
carType: [{
id: 1,
value: "普通车"
}, {
id: 2,
value: "新能源车"
}]
},
tableHeight: 0,
clientHeight:0,
//
searchFields: {
name: ""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
tableHeight: 0,
clientHeight: 0,
//
searchFields: {
name: ""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
form: {
time: "",
car_park_id: "",
plate: "",
type:"",
car_type:"",
plate: "",
type: "",
car_type: "",
mobile: "",
},
columns: [
{
field: "time",
title: "预约时间",
type: "string",
},
{
field: "plate",
title: "车牌号",
type: "string",
},
{
field: "mobile",
title: "联系方式",
type: "string",
columns: [{
field: "time",
title: "预约时间",
type: "string",
},
{
field: "plate",
title: "车牌号",
type: "string",
},
{
field: "mobile",
title: "联系方式",
type: "string",
},
{
field: "操作",
@ -172,27 +171,23 @@
that.tableHeight = tableHeight;
},
load() {
var that = this;
var query=this.$route.query;
let carId = query.car_park_id;
if(carId){
listparkorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
car_park_id: carId
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
})
}else{
this.$Message.error('请在停车场管理页选择要查询的停车场!');
setTimeout(function(){
window.location.href='/#/resource/parking'
},2000)
}
var that = this;
var query = this.$route.query;
let carId = ""
if (query.car_park_id)
carId = query.car_park_id
listparkorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
car_park_id: carId
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
})
},
@ -203,21 +198,21 @@
},
info(obj) {
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
}).catch(error => {
//reject(error)
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
}).catch(error => {
//reject(error)
})
},
resetForm(formName) {
var that = this;
that.dialogViewVisible = false;
this.$refs[formName].resetFields();
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
resetForm(formName) {
var that = this;
that.dialogViewVisible = false;
this.$refs[formName].resetFields();
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
}
}
};

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,9 @@
<template>
<router-view></router-view>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,86 @@
<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>
<DatePicker type="daterange" :start-date="new Date()" placement="bottom-end" placeholder="参观日期区间"
style="width: 200px"></DatePicker>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="viewPart" style="margin-left: 10px">图表展示</Button>
</div>
</slot>
</LxHeader>
</div>
<div class="table-tree" v-if="showData">
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%">
<el-table-column type="index" align="center">
</el-table-column>
<el-table-column prop="sex_name" label="性别" sortable width="180">
</el-table-column>
<el-table-column prop="plan_total" label="预约人数" sortable>
</el-table-column>
<el-table-column prop="use_total" label="入场人数" sortable>
</el-table-column>
<el-table-column prop="per" label="核销比" sortable>
</el-table-column>
</el-table>
</div>
<div v-else>
</div>
</div>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
sexRpt
} from "@/api/report/visit.js";
export default {
components: {
LxHeader
},
created() {
this.initLoad()
this.load()
},
mounted() {},
data() {
return {
showData: false,
searchFields: {},
tableData: [],
tableHeight: 0
}
},
methods: {
viewPart(){
this.showData=false;
},
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() {
this.showData = true;
sexRpt().then((res) => {
for (var m of res) {
m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%"
}
this.tableData = res;
}).catch((res) => {})
}
}
};
</script>

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -4,125 +4,117 @@
<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>
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.name" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="edit()" style="margin-left: 10px">新增</Button>
</div>
<div slot="content"></div>
<slot>
<div>
<!-- <Input style="width: 200px; margin-right: 10px" v-model="searchFields.name" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="edit()" style="margin-left: 10px">新增</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="序号"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="toactive(scope.row)" type="success"
style="margin-left: 10px;">订单</Button>
<Button ghost size="small" @click="edit(scope.row)" type="primary"
style="margin-left: 10px;">编辑</Button>
<Button ghost size="small" type="error" @click="del(scope.row)"
style="margin-left: 10px;">删除</Button>
<Button v-if="scope.row['status']==1" ghost size="small" type="info" @click="changeStatus(scope.row)"
style="margin-left: 10px;">下架</Button>
<Button v-if="scope.row['status']==0" ghost size="small" type="warning" @click="changeStatus(scope.row)"
style="margin-left: 10px;">上架</Button>
</div>
<div v-else-if="column.type=='dateRange'">
{{scope.row["start_time"]+"至"+scope.row["end_time"]}}
</div>
<div v-else-if="column.type=='status'">
<el-tag v-if="scope.row['status']==1" type="" effect="dark" >
上架中
</el-tag>
<el-tag v-if="scope.row['status']==0" type="info" effect="dark" >
下架
</el-tag>
</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>
<el-table :data="tableData" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="toactive(scope.row)" type="success"
style="margin-left: 10px;">订单</Button>
<Button ghost size="small" @click="edit(scope.row)" type="primary"
style="margin-left: 10px;">编辑</Button>
<!-- <Button ghost size="small" type="error" @click="del(scope.row)"
style="margin-left: 10px;">删除</Button> -->
<Button v-if="scope.row['status']==1" ghost size="small" type="info" @click="changeStatus(scope.row)"
style="margin-left: 10px;">下架</Button>
<Button v-if="scope.row['status']==0" ghost size="small" type="warning" @click="changeStatus(scope.row)"
style="margin-left: 10px;">上架</Button>
</div>
<div v-else-if="column.type=='dateRange'">
{{scope.row["start_time"]+"至"+scope.row["end_time"]}}
</div>
<div v-else-if="column.type=='status'">
<el-tag v-if="scope.row['status']==1" type="" effect="dark">
上架中
</el-tag>
<el-tag v-if="scope.row['status']==0" type="info" effect="dark">
下架
</el-tag>
</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>
<el-dialog title="详情编辑" :visible.sync="dialogFormVisible" width="60%">
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="停车场名称" prop="name">
<el-input v-model="form.name" placeholder="请填写停车场名称" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="form.address" placeholder="请填写停车场地址" autocomplete="off"></el-input>
</el-form-item>
<el-row>
<el-col :span="10">
<el-form-item label="地址经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="请填写地址经度" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="10" :offset="4">
<el-form-item label="地址纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="请填写地址纬度" autocomplete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="开始时间" prop="start_time">
<el-time-select
style="width:100%"
placeholder="开始时间"
v-model="form.start_time"
:picker-options="{
start: '00:00',
step: '00:15',
end: '24:00'
}">
</el-time-select>
</el-form-item>
</el-col>
<el-col :span="10" :offset="4">
<el-form-item label="结束时间" prop="end_time">
<el-time-select
style="width:100%"
placeholder="结束时间"
v-model="form.end_time"
:picker-options="{
start: '00:00',
step: '00:15',
end: '24:00',
minTime: form.start_time
}">
</el-time-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="充电桩总数" prop="charge_total">
<el-input v-model="form.charge_total" placeholder="请填写充电桩总数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="小车位数" prop="small_park_total">
<el-input v-model="form.small_park_total" placeholder="请填写小车位数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="大车位数" prop="big_park_total">
<el-input v-model="form.big_park_total" placeholder="请填写大车位数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="停车场名称" prop="name">
<el-input v-model="form.name" placeholder="请填写停车场名称" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="form.address" placeholder="请填写停车场地址" autocomplete="off"></el-input>
</el-form-item>
<el-row>
<el-col :span="10">
<el-form-item label="地址经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="请填写地址经度" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="10" :offset="4">
<el-form-item label="地址纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="请填写地址纬度" autocomplete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="开始时间" prop="start_time">
<el-time-select style="width:100%" placeholder="开始时间" v-model="form.start_time" :picker-options="{
start: '00:00',
step: '00:15',
end: '24:00'
}">
</el-time-select>
</el-form-item>
</el-col>
<el-col :span="10" :offset="4">
<el-form-item label="结束时间" prop="end_time">
<el-time-select style="width:100%" placeholder="结束时间" v-model="form.end_time" :picker-options="{
start: '00:00',
step: '00:15',
end: '24:00',
minTime: form.start_time
}">
</el-time-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="充电桩总数" prop="charge_total">
<el-input v-model="form.charge_total" placeholder="请填写充电桩总数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="小车位数" prop="small_park_total">
<el-input v-model="form.small_park_total" placeholder="请填写小车位数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="大车位数" prop="big_park_total">
<el-input v-model="form.big_park_total" placeholder="请填写大车位数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@ -135,11 +127,11 @@
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
listpark,
store,
save,
del,
get,
listpark,
store,
save,
del,
get,
chanStatus
} from "../../api/resource/parking.js";
export default {
@ -154,101 +146,101 @@
data() {
return {
dialogFormVisible: false,
formLabelWidth: "120px",
tableHeight: 0,
//
searchFields: {
name: ""
},
paginations: {
page: 1,
page_size: 15,
total: 0
},
formLabelWidth: "120px",
tableHeight: 0,
//
searchFields: {
name: ""
},
paginations: {
page: 1,
page_size: 15,
total: 0
},
tableData: [],
form: {
name:"",
address:"",
start_time: "",
end_time:"",
charge_total:"",
small_park_total:"",
big_park_total:"",
longitude:"",
latitude:"",
},
columns: [{
field: "name",
title: "停车场名称",
type: "string",
},
{
field: "address",
title: "地址",
type: "string",
},
{
field: "dateRange",
title: "可入场时段",
type: "dateRange",
align: "center",
width:120
},
{
field: "charge_total",
title: "充电桩总数",
type: "string",
align: "center",
width:120
},
{
field: "small_park_total",
title: "小车位数",
type: "string",
align: "center",
width:120
},
{
field: "big_park_total",
title: "大车位数",
type: "string",
align: "center",
width:120
},
{
field: "status",
title: "状态",
type: "status",
align:"center",
width:120
},
{
field: "操作",
title: "操作",
width: 240,
type: "opt",
}
form: {
name: "",
address: "",
start_time: "",
end_time: "",
charge_total: "",
small_park_total: "",
big_park_total: "",
longitude: "",
latitude: "",
},
columns: [{
field: "name",
title: "停车场名称",
type: "string",
},
{
field: "address",
title: "地址",
type: "string",
},
{
field: "dateRange",
title: "可入场时段",
type: "dateRange",
align: "center",
width: 120
},
{
field: "charge_total",
title: "充电桩总数",
type: "string",
align: "center",
width: 120
},
{
field: "small_park_total",
title: "小车位数",
type: "string",
align: "center",
width: 120
},
{
field: "big_park_total",
title: "大车位数",
type: "string",
align: "center",
width: 120
},
{
field: "status",
title: "状态",
type: "status",
align: "center",
width: 120
},
{
field: "操作",
title: "操作",
width: 240,
type: "opt",
}
],
rules: {
name: [{
required: true,
message: '请输入停车场名称',
trigger: 'blur'
}],
address: [{
required: true,
message: '请输入停车场地址',
trigger: 'blur'
}],
longitude: [{
required: true,
message: '请输入经度',
trigger: 'blur'
}],
latitude: [{
required: true,
message: '请输入纬度',
trigger: 'blur'
}],
address: [{
required: true,
message: '请输入停车场地址',
trigger: 'blur'
}],
longitude: [{
required: true,
message: '请输入经度',
trigger: 'blur'
}],
latitude: [{
required: true,
message: '请输入纬度',
trigger: 'blur'
}]
},
@ -267,15 +259,15 @@
},
load() {
var that = this;
listpark({
page: this.paginations.page,
page_size: this.paginations.page_size,
name:this.searchFields.name
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
listpark({
page: this.paginations.page,
page_size: this.paginations.page_size,
name: this.searchFields.name
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
})
},
show(obj) {
@ -284,13 +276,13 @@
this.info(obj);
},
info(obj) {
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
}).catch(error => {
//reject(error)
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
}).catch(error => {
//reject(error)
})
},
edit(obj) {
@ -352,44 +344,49 @@
}
});
}
},
changeStatus(obj){
var that = this;
if (obj) {
let status = obj.status==0?1:0;
let para={
id:obj.id,
status:status
}
this.$Modal.confirm({
title: '确认要变更状态?',
onOk: () => {
chanStatus({
id:para.id,
status:para.status
}).then(response => {
this.$Message.success('操作成功');
that.load();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
}
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
toactive(obj){
if(obj.id){
let url = "/#/order/parkorder?car_park_id="+obj.id;
window.location.href = url
}
},
changeStatus(obj) {
var that = this;
if (obj) {
let status = obj.status == 0 ? 1 : 0;
let para = {
id: obj.id,
status: status
}
this.$Modal.confirm({
title: '确认要变更状态?',
onOk: () => {
chanStatus({
id: para.id,
status: para.status
}).then(response => {
this.$Message.success('操作成功');
that.load();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
}
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
toactive(obj) {
if (obj.id) {
this.$router.push({
path: '/order/parkorder',
query: {
car_park_id: obj.id
}
})
}
}
}
};

@ -114,7 +114,7 @@
get(obj.tag).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
this.$refs.tiny.setContent(result.content);
this.$refs.tiny.setContent(result.value);
}).catch(error => {
//reject(error)
})

@ -4,65 +4,63 @@
<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>
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.KeyWord" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
</div>
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.KeyWord" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</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="序号"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="show(scope.row)" type="primary"
style="margin-left: 10px;">查看</Button>
<Button ghost size="small" type="error" @click="del(scope.row)" style="margin-left: 10px;">删除</Button>
</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>
<el-table :data="tableData" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="show(scope.row)" type="primary"
style="margin-left: 10px;">查看</Button>
<Button ghost size="small" type="error" @click="del(scope.row)" style="margin-left: 10px;">删除</Button>
</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>
<el-dialog title="内容查看" :visible.sync="dialogFormVisible" fullscreen>
<div class="dialogConcent" :style="{height:clientHeight+'px'}">
<el-scrollbar style="flex: 1">
<el-form :model="form" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="标题" prop="name">
<div>
{{form.name}}
</div>
</el-form-item>
<el-form-item label="内容" prop="content">
<div style="width: 99.9%;" v-html="form.content">
</div>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
</div>
</el-dialog>
<el-dialog title="内容查看" :visible.sync="dialogFormVisible" >
<div class="dialogConcent" >
<el-scrollbar style="flex: 1">
<el-form :model="form" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="联系电话" prop="mobile">
<div>{{form.mobile}} </div>
</el-form-item>
<el-form-item label="内容" prop="content">
<div style="width: 99.9%;" v-html="form.content">
</div>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
listtip,
get,
listtip,
get,
del
} from "../../../api/resource/complaint.js";
export default {
@ -72,41 +70,48 @@
data() {
return {
dialogFormVisible: false,
formLabelWidth: "120px",
tableHeight: 0,
clientHeight:0,
//
searchFields: {
KeyWord: ""
},
paginations: {
page: 1,
page_size: 15,
total: 0
},
formLabelWidth: "120px",
tableHeight: 0,
clientHeight: 0,
//
searchFields: {
KeyWord: ""
},
paginations: {
page: 1,
page_size: 15,
total: 0
},
tableData: [],
form: {
name:"",
content:""
},
columns: [{
field: "name",
title: "标题",
type: "string",
},
{
field: "操作",
title: "操作",
width: 220,
type: "opt",
}
form: {
content: ""
},
columns: [{
field: "content",
title: "内容",
type: "string",
}, {
field: "mobile",
title: "联系电话",
type: "string",
}, {
field: "created_at",
title: "创建时间",
type: "string",
},
{
field: "操作",
title: "操作",
width: 220,
type: "opt",
}
],
}
},
created() {
this.initLoad();
this.load();
},
},
created() {
this.initLoad();
this.load();
},
mounted() {},
methods: {
initLoad() {
@ -119,16 +124,16 @@
that.tableHeight = tableHeight;
},
load() {
var that = this;
listtip({
page: this.paginations.page,
page_size: this.paginations.page_size,
name:this.searchFields.name
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
var that = this;
listtip({
page: this.paginations.page,
page_size: this.paginations.page_size,
name: this.searchFields.name
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
})
},
@ -136,7 +141,7 @@
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
that.form = result;
this.$refs.tiny.setContent(result.content);
}).catch(error => {
//reject(error)
@ -170,15 +175,15 @@
}
});
}
},
resetForm(formName) {
var that = this;
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
resetForm(formName) {
var that = this;
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
}
}
};

Loading…
Cancel
Save