预约系统

master
Lion 4 years ago
parent bd151d307c
commit 433a27c550

@ -9,6 +9,7 @@ module.exports = {
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here

@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<script charset="utf-8" src="https://map.qq.com/api/gljs?v=2.exp&key=4VBBZ-HAA3X-QKI46-7GAL2-LQEOT-BEBKN"></script>
</head>
<body>
<noscript>

@ -1 +1,19 @@
import request from '@/utils/request'
import request from '@/utils/request'
export function listactiveorder(params) {
return request({
url: '/api/admin/activity/order-index',
method: 'get',
params:params
})
}
export function get(id) {
return request({
url: '/api/admin/activity/order-show',
method: 'get',
params: {
id
}
})
}

@ -0,0 +1,19 @@
import request from '@/utils/request'
export function listparkorder(params) {
return request({
url: '/api/admin/carpark/order-index',
method: 'get',
params:params
})
}
export function get(id) {
return request({
url: '/api/admin/carpark/order-show',
method: 'get',
params: {
id
}
})
}

@ -1,3 +1,16 @@
import request from '@/utils/request'
export function show(params) {
return request({
url: '/api/admin/visit/introduce-show',
method: 'get',
})
}
export function save(data) {
return request({
url: '/api/admin/visit/introduce-save',
method: 'post',
data
})
}

@ -0,0 +1,27 @@
import request from '@/utils/request'
export function list(params) {
return request({
url: '/api/admin/config/index',
method: 'get',
params:params
})
}
export function save(data) {
return request({
url: '/api/admin/config/save',
method: 'post',
data
})
}
export function get(tag) {
return request({
url: '/api/admin/config/show',
method: 'get',
params: {
tag
}
})
}

@ -1,3 +1,45 @@
import request from '@/utils/request'
export function listnotice(params) {
return request({
url: '/api/admin/notice/index',
method: 'get',
params:params
})
}
export function store(data) {
return request({
url: '/api/admin/notice/store',
method: 'post',
data
})
}
export function save(data) {
return request({
url: '/api/admin/notice/save',
method: 'post',
data
})
}
export function del(id) {
return request({
url: '/api/admin/notice/destroy',
method: 'get',
params: {
id
}
})
}
export function get(id) {
return request({
url: '/api/admin/notice/show',
method: 'get',
params: {
id
}
})
}

@ -0,0 +1,29 @@
export default {
init: function (){
const AK = "4VBBZ-HAA3X-QKI46-7GAL2-LQEOT-BEBKN";
const TMap_URL = "https://map.qq.com/api/gljs?v=1.exp&libraries=tools,service&key="+ AK +"&callback=onMapCallback";
return new Promise((resolve, reject) => {
// 如果已加载直接返回
if(typeof TMap !== "undefined") {
resolve(TMap);
return true;
}
// 地图异步加载回调处理
window.onMapCallback = function () {
resolve(TMap);
};
// 插入script脚本
let scriptNode = document.createElement("script");
scriptNode.setAttribute("type", "text/javascript");
scriptNode.setAttribute("src", TMap_URL);
document.body.appendChild(scriptNode);
});
},
clickHandler: function(evt){
var lat = evt.latLng.getLat().toFixed(6);
var lng = evt.latLng.getLng().toFixed(6);
console.log("您点击的的坐标是:"+ lat + "," + lng);
}
}

@ -21,13 +21,15 @@
: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="success" @click="changeStatus(scope.row)"
<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="success" @click="changeStatus(scope.row)"
<Button v-if="scope.row['status']==0" ghost size="small" type="warning" @click="changeStatus(scope.row)"
style="margin-left: 10px;">上架</Button>
</div>
@ -53,7 +55,6 @@
</div>
</div>
</div>
<el-dialog title="详情编辑" :visible.sync="dialogFormVisible" fullscreen width="90%">
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-row>
@ -152,8 +153,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总人数(0为不限制)" prop="total">
<el-input v-model="form.total" placeholder="请填写总人数" autocomplete="off"></el-input>
<el-form-item label="总人数" prop="total">
<el-input v-model="form.total" placeholder="请填写总人数(0为不限制)" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
@ -280,13 +281,13 @@
export default {
components: {
LxHeader,
Tinymce
Tinymce,
},
mounted() {},
data() {
return {
dialogFormVisible: false,
formLabelWidth: "120px",
selectedValue:null,
dialogImageUrl: '',
dialogVisible: false,
disabled: false,
@ -380,7 +381,8 @@
field: "dateRange",
title: "活动时间",
type: "dateRange",
align:"center"
align:"center",
width:300
},
{
field: "end_plan",
@ -399,7 +401,7 @@
{
field: "操作",
title: "操作",
width: 200,
width: 240,
type: "opt",
}
],
@ -414,6 +416,8 @@
}
},
mounted() {
},
created() {
this.uploadOther.token = getToken();
this.initLoad();
@ -599,13 +603,17 @@
this.bannersList=fileList
this.form.banners_list = listUrl
}
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
}
},
toactive(obj){
if(obj.id){
let url = "/#/order/activeorder?activity_id="+obj.id;
window.location.href = url
}
},
}
};
</script>

@ -7,9 +7,8 @@
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" />
<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>
@ -21,11 +20,10 @@
:label="column.title" :width="column.width">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<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 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.orderRule">
<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>
@ -33,124 +31,166 @@
<div v-else>{{scope.row[column.field]}}</div>
</template>
</el-table-column>
</el-table>
</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>
<div v-if="form.type==1">
<el-form-item 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>
</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="dialogFormVisible" fullscreen width="90%">
<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-row>
<el-col :span="10">
<el-form-item label="预约时间" prop="date">
<el-date-picker
style="width:100%"
v-model="form.date"
type="datetime"
placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10" :offset="4">
<el-form-item label="类型" prop="type">
<el-select v-model="form.type" placeholder="请选择类型" style="width:100%">
<el-option v-for="item in parameters.orderRule" :key="item.value" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="预约人数" prop="name">
<el-input v-model="form.num" placeholder="请填写预约人数" autocomplete="off"></el-input>
</el-form-item>
<div style="padding: 20px 0px;" class="form-sub-title">
<span>预约人信息
</span>
</div>
<div class="table-tree tableswidth">
<div style="display: flex;justify-content: flex-end;margin-right: 20px;margin-bottom: 10px;">
<Button type="primary" @click="addRow()" size="small" style="margin-left: 10px;" ghost>新增</Button>
</div>
<el-table :data="form.people_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 prop="name" label="姓名">
<template slot-scope="scope">
<el-input v-model="scope.row.name" placeholder="请填写姓名" autocomplete="off"></el-input>
</template>
</el-table-column>
<el-table-column prop="card" label="证件号">
<template slot-scope="scope">
<el-input v-model="scope.row.card" placeholder="请填写证件号" autocomplete="off"></el-input>
</template>
</el-table-column>
<el-table-column prop="tel" label="联系方式">
<template slot-scope="scope">
<el-input v-model="scope.row.tel" placeholder="请填写联系方式" autocomplete="off"></el-input>
</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;"
ghost>删除</Button>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
<el-button type="primary" @click="submitForm('form')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
} from "../../api/resource/visit.js";
import {
getparameteritem
} from "../../api/system/dictionary.js"
listactiveorder,
get
} from "../../api/order/activeorder.js";
export default {
components: {
LxHeader
},
data() {
return {
dialogFormVisible: false,
dialogViewVisible: false,
formLabelWidth: "120px",
parameters: {
orderRule: []
visitType:[{
id:1,
value:"团体"
},{
id:2,
value:"个人"
}],
cardType:[{
id:1,
value:"身份证"
},{
id:2,
value:"护照"
}]
},
tableHeight: 0,
clientHeight:0,
//
searchFields: {
name: ""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
form: {
name: "苏州市党性教育实训基地停车场",
date: "2022",
type: "1",
people_list: [{
name: "",
card:"",
tel:""
}]
card_type: "",
rule_id: "",
unit: "",
card_type:"",
leader:"",
idcard: "",
total: "",
mobile: "",
type:"",
details_list: []
},
columns: [{
field: "name",
title: "名称",
type: "string",
},
{
field: "type",
title: "类型",
type: "type",
},
columns: [
{
field: "date",
title: "预约时间",
type: "string",
width:300
field: "type",
title: "类型",
type: "type",
},
{
field: "操作",
@ -158,30 +198,8 @@
width: 220,
type: "opt",
}
],
rules: {
name: [{
required: true,
message: '请输入参观须知',
trigger: 'blur'
}]
]
},
tableHeight: 0,
//
searchFields: {
KeyWord: ""
},
tableData: [{
name: "苏州市党性教育实训基地停车场",
date: "2022-05-07 10:20",
type: 24,
people_list: [{
name: "",
card:"",
tel:""
}]
}]
}
},
created() {
@ -198,13 +216,28 @@
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
//
getparameteritem("order-rule").then(res => {
this.parameters.orderRule = res.detail;
});
},
load() {
var that = this;
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)
}
},
show(obj) {
@ -214,79 +247,23 @@
},
info(obj) {
var that = this;
},
edit(obj) {
this.form = this.$options.data().form;
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
if (obj) {
var that = this;
that.info(obj);
} else {}
this.dialogFormVisible = true;
},
submitForm(formName) {
var that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
if (that.form.id) {
save(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
} else {
store(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
}
} else {
this.$Message.error('数据校验失败');
return false;
}
});
},
resetForm(formName) {
var that = this;
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},
del(obj) {
var that = this;
if (obj) {
this.$Modal.confirm({
title: '确认要删除数据?',
onOk: () => {
del(obj.id).then(response => {
this.$Message.success('操作成功');
that.load();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
}
},
addRow() {
var len = this.form.people_list.length;
this.form.people_list.push({
name: "",
card:"",
tel:""
});
},
delRow(index) {
this.form.people_list.splice(index, 1);
},
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
that.for.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();
}
}
};
</script>

@ -3,13 +3,12 @@
<!-- 查询配置 -->
<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>
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" />
<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>
@ -21,101 +20,131 @@
:label="column.title" :width="column.width">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="edit(scope.row)" type="primary"
style="margin-left: 10px;">编辑</Button>
</div>
<div v-else-if="column.type=='type'" v-for="item in parameters.carType">
<div v-if="item.id==scope.row[column.field]">
{{item.value}}
</div>
<Button ghost size="small" @click="show(scope.row)" type="primary"
style="margin-left: 10px;">查看</Button>
</div>
<div v-else>{{scope.row[column.field]}}</div>
</template>
</el-table-column>
</el-table>
</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="dialogFormVisible" fullscreen width="90%">
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="入场时间" prop="date">
<el-date-picker style="width:100%" v-model="form.date" type="datetime" placeholder="选择入场时间">
</el-date-picker>
</el-form-item>
<el-form-item label="车牌号码" prop="card">
<el-input v-model="form.card" placeholder="请填写车牌号码" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="tel">
<el-input v-model="form.tel" placeholder="请填写联系方式" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="form.type" placeholder="请选择类型" style="width:100%">
<el-option v-for="item in parameters.carType" :key="item.value" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
<el-button type="primary" @click="submitForm('form')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import Tinymce from '@/components/Tinymce'
import {
} from "../../api/resource/parking.js";
import {
getparameteritem
} from "../../api/system/dictionary.js"
listparkorder,
get
} from "../../api/order/parkorder.js";
export default {
components: {
LxHeader,
Tinymce
},
created() {
this.initLoad();
this.load();
LxHeader
},
mounted() {},
data() {
return {
dialogFormVisible: false,
dialogViewVisible: false,
formLabelWidth: "120px",
parameters: {
carType: []
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
},
form: {
date: "",
tel: "姑苏区体育场路4号",
card: "09:30-17:50",
type: "200",
time: "",
car_park_id: "",
plate: "",
type:"",
car_type:"",
mobile: "",
},
columns: [{
field: "date",
title: "入场时间",
type: "string",
},
{
field: "card",
title: "车牌号",
type: "string",
},
{
field: "type",
title: "类型",
type: "type",
},
{
field: "tel",
title: "联系方式",
type: "string",
align: "center"
columns: [
{
field: "time",
title: "预约时间",
type: "string",
},
{
field: "plate",
title: "车牌号",
type: "string",
},
{
field: "mobile",
title: "联系方式",
type: "string",
},
{
field: "操作",
@ -123,24 +152,15 @@
width: 220,
type: "opt",
}
],
rules: {
]
},
tableHeight: 0,
//
searchFields: {
KeyWord: ""
},
tableData: [{
date: "2022-05-07 10:00",
tel: "1894号",
card: "苏E1124",
type: 26,
}]
}
},
created() {
this.initLoad();
this.load();
},
mounted() {},
methods: {
initLoad() {
var that = this;
@ -150,13 +170,30 @@
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
//
getparameteritem("car-type").then(res => {
this.parameters.carType = res.detail;
});
},
load() {
var that = this;
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)
}
},
show(obj) {
@ -166,67 +203,22 @@
},
info(obj) {
var that = this;
},
edit(obj) {
this.form = this.$options.data().form;
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
if (obj) {
var that = this;
that.info(obj);
} else {}
this.dialogFormVisible = true;
},
submitForm(formName) {
var that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
if (that.form.id) {
save(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
} else {
store(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
}
} else {
this.$Message.error('数据校验失败');
return false;
}
});
},
resetForm(formName) {
var that = this;
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},
del(obj) {
var that = this;
if (obj) {
this.$Modal.confirm({
title: '确认要删除数据?',
onOk: () => {
del(obj.id).then(response => {
this.$Message.success('操作成功');
that.load();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
}
},
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();
}
}
};
</script>

@ -7,7 +7,7 @@
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" />
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.name" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
</div>
</slot>
@ -174,7 +174,7 @@
clientHeight:0,
//
searchFields: {
KeyWord: ""
name: ""
},
tableData: [],
paginations: {
@ -252,13 +252,7 @@
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
// that.for.details_list = result.details;
that.form.details_list=[{
name:"11122",
card_type:1,
mobile:"1203",
idcard:"321281"
}]
that.for.details_list = result.details;
}).catch(error => {
//reject(error)
})

@ -34,53 +34,43 @@
</el-form-item>
<el-row>
<el-col :span="10">
<el-form-item label="成立日期" prop="date">
<el-date-picker style="width: 100%;" type="year" value-format="yyyy-MM-dd" v-model="form.date" placeholder="成立日期">
<el-form-item label="成立日期" prop="set_date">
<el-date-picker style="width: 100%;" type="date" value-format="yyyy-MM-dd" v-model="form.set_date" placeholder="成立日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10" :offset="4">
<el-form-item label="成立日期" prop="date">
<el-time-picker
style="width: 100%;"
is-range
v-model="form.opendate"
range-separator="至"
start-placeholder="开馆时间"
end-placeholder="闭馆时间"
placeholder="选择时间范围">
</el-time-picker>
</el-form-item>
</el-col>
</el-row>
<!-- // ,,退,退,, -->
<el-form-item label="团队预约须知" prop="grouptips">
<el-input type="textarea" rows="3" v-model="form.grouptips" placeholder="请填写团队预约须知" autocomplete="off"></el-input>
<el-form-item label="简介" prop="sub_title">
<el-input type="textarea" rows="3" v-model="form.sub_title" placeholder="请填写简介" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="团队预约须知" prop="team_notice">
<el-input type="textarea" rows="3" v-model="form.team_notice" placeholder="请填写团队预约须知" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="个人预约须知" prop="singletips">
<el-input type="textarea" rows="3" v-model="form.singletips" placeholder="请填写个人预约须知" autocomplete="off"></el-input>
<el-form-item label="个人预约须知" prop="person_notice">
<el-input type="textarea" rows="3" v-model="form.person_notice" placeholder="请填写个人预约须知" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="团队退票须知" prop="groupticket">
<el-input type="textarea" rows="3" v-model="form.groupticket" placeholder="请填写团队退票须知" autocomplete="off"></el-input>
<el-input type="textarea" rows="3" v-model="form.team_refund" placeholder="请填写团队退票须知" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="个人退票须知" prop="singletips">
<el-input type="textarea" rows="3" v-model="form.singleticket" placeholder="请填写个人退票须知" autocomplete="off"></el-input>
<el-input type="textarea" rows="3" v-model="form.person_refund" placeholder="请填写个人退票须知" autocomplete="off"></el-input>
</el-form-item>
<el-row>
<el-col :span="10">
<el-form-item label="地址经度" prop="lon">
<el-input v-model="form.lon" placeholder="请填写地址经度" autocomplete="off"></el-input>
<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="lat">
<el-input v-model="form.lat" placeholder="请填写地址纬度" autocomplete="off"></el-input>
<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-form-item label="详情内容" prop="content">
<div style="width: 99.9%;">
<tinymce v-model="form.content" :height="300" />
<tinymce ref="tiny" v-model="form.content" :height="300" />
</div>
</el-form-item>
</el-form>
@ -97,7 +87,8 @@
import Tinymce from '@/components/Tinymce'
// import maps from 'qqmap'
import {
show,
save
} from "../../api/resource/addressinfo.js";
export default {
components: {
@ -107,36 +98,36 @@
data() {
return {
dialogFormVisible: false,
formLabelWidth: "120px",
formLabelWidth: "120px",
tableHeight: 0,
tableData: [],
form: {
name:"苏州市党性教育实训基地",
address:"姑苏区体育场路4号",
date: "2020",
opendate:"",
grouptips:"",
singletips:"",
groupticket:"",
singleticket:"",
lon:"",
lat:"",
content:"苏州市党性教育实训基地位于姑苏区体育场路4号还原乐益女中校园布局设置教室、剧场等“沉浸式”场地。此外实训基地内设《燃血青春——中共苏州独立支部史迹陈列展》介绍中共苏州独立支部成立的背景、经过以及发挥的作用和产生的影响。实训基地还将组织课程、研学、演讲、展演、快闪等活动向大众讲述包括中共苏州独立支部历史在内的苏州地方党史、革命史。 [3] ",
},
name:"支部旧址详情",
address:"",
sub_title:"",
set_date: "",
team_notice:"",
person_notice:"",
team_refund:"",
person_refund:"",
longitude:"",
latitude:"",
content:""
},
columns: [{
field: "name",
title: "名称",
type: "string",
type: "string"
},
{
field: "address",
title: "地址",
type: "date",
width: 300,
align: "center"
type: "string"
},
{
field: "date",
field: "set_date",
title: "成立时间",
type: "date",
type: "string",
width: 300,
align: "center"
},
@ -153,19 +144,7 @@
message: '请输入基地名称',
trigger: 'blur'
}]
},
tableHeight: 0,
//
searchFields: {
KeyWord: ""
},
tableData: [{
name:"苏州市党性教育实训基地",
address:"姑苏区体育场路4号",
date:"2020",
content:"苏州市党性教育实训基地位于姑苏区体育场路4号还原乐益女中校园布局设置教室、剧场等“沉浸式”场地。此外实训基地内设《燃血青春——中共苏州独立支部史迹陈列展》介绍中共苏州独立支部成立的背景、经过以及发挥的作用和产生的影响。实训基地还将组织课程、研学、演讲、展演、快闪等活动向大众讲述包括中共苏州独立支部历史在内的苏州地方党史、革命史。 [3] ",
}
]
}
}
},
created() {
@ -189,10 +168,22 @@
},
load() {
var that = this;
show().then(res => {
this.tableData.push(res);
}).catch(error => {
})
},
info(obj) {
var that = this;
var that = this;
show().then(res => {
let result = Object.assign(that.form, res);
that.form = result;
this.$refs.tiny.setContent(result.content);
}).catch(error => {
})
},
edit(obj) {
@ -208,21 +199,15 @@
var that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
if (that.form.id) {
if (that.form) {
save(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.dialogFormVisible = false;
this.tableData=[];
that.load();
}).catch(error => {})
} else {
store(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
}
} else {}
} else {
this.$Message.error('数据校验失败');
@ -231,32 +216,11 @@
});
},
resetForm(formName) {
var that = this;
var that = this;
this.$refs.tiny.setContent("");
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},
del(obj) {
var that = this;
if (obj) {
this.$Modal.confirm({
title: '确认要删除数据?',
onOk: () => {
del(obj.id).then(response => {
this.$Message.success('操作成功');
that.load();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
}
},
}
};
</script>

@ -4,7 +4,14 @@
<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>
<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">
@ -16,6 +23,7 @@
<div v-if="column.type=='opt'">
<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>
</div>
<div v-else>{{scope.row[column.field]}}</div>
</template>
@ -26,20 +34,12 @@
<el-dialog title="详情编辑" :visible.sync="dialogFormVisible" fullscreen width="90%">
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" placeholder="请填写标题" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="时间" prop="date">
<el-date-picker
v-model="form.date"
type="datetime"
value-format="yyyy-MM-dd HH:ss"
placeholder="选择日期时间">
</el-date-picker>
<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="content">
<div style="width: 99.9%;">
<tinymce v-model="form.content" :height="300" />
<tinymce ref="tiny" v-model="form.content" :height="300" />
</div>
</el-form-item>
@ -55,38 +55,41 @@
import LxHeader from "@/components/LxHeader/index.vue";
import Tinymce from '@/components/Tinymce'
import {
listnotice,
store,
save,
del,
get
} from "../../api/resource/notice.js";
export default {
components: {
LxHeader,
Tinymce
},
created() {
this.initLoad();
this.load();
},
mounted() {},
data() {
return {
dialogFormVisible: false,
formLabelWidth: "120px",
formLabelWidth: "120px",
tableHeight: 0,
//
searchFields: {
name: ""
},
paginations: {
page: 1,
page_size: 15,
total: 0
},
tableData: [],
form: {
title:"苏州市党性教育实训基地停车场",
date:"2022-05-06 10:20",
name:"",
content:""
},
columns: [{
field: "title",
field: "name",
title: "标题",
type: "string",
},
{
field: "date",
title: "时间",
type: "string",
width:300
},
{
field: "操作",
title: "操作",
@ -102,19 +105,14 @@
}]
},
tableHeight: 0,
//
searchFields: {
KeyWord: ""
},
tableData: [{
title:"苏州市党性教育实训基地停车场",
date:"2022-05-06 10:20",
content:""
}
]
}
},
},
created() {
this.initLoad();
this.load();
},
mounted() {},
methods: {
initLoad() {
var that = this;
@ -126,16 +124,27 @@
that.tableHeight = tableHeight;
},
load() {
var that = this;
},
show(obj) {
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
this.dialogViewVisible = true;
this.info(obj);
var that = this;
listnotice({
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 => {
})
},
info(obj) {
var that = this;
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
this.$refs.tiny.setContent(result.content);
}).catch(error => {
//reject(error)
})
},
edit(obj) {
this.form = this.$options.data().form;
@ -173,7 +182,8 @@
});
},
resetForm(formName) {
var that = this;
var that = this;
this.$refs.tiny.setContent("");
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},

@ -9,7 +9,7 @@
<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>
<Button type="primary" @click="edit()" style="margin-left: 10px">新增</Button>
</div>
</slot>
</LxHeader>
@ -21,14 +21,16 @@
: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="success" @click="changeStatus(scope.row)"
<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="success" @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"]}}
@ -53,7 +55,7 @@
</div>
</div>
<el-dialog title="详情编辑" :visible.sync="dialogFormVisible" fullscreen width="90%">
<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>
@ -223,7 +225,7 @@
{
field: "操作",
title: "操作",
width: 220,
width: 240,
type: "opt",
}
],
@ -367,6 +369,12 @@
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
}
}
}
};

@ -3,15 +3,8 @@
<!-- 查询配置 -->
<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.number="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 icon="md-apps" text="停车场须知" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
</LxHeader>
</div>
<div class="table-tree">
@ -23,7 +16,6 @@
<div v-if="column.type=='opt'">
<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>
</div>
<div v-else>{{scope.row[column.field]}}</div>
</template>
@ -33,22 +25,12 @@
</div>
<el-dialog title="详情编辑" :visible.sync="dialogFormVisible" fullscreen width="90%">
<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="people">
<el-select v-model="form.people" placeholder="请选择目标群体" style="width:100%">
<el-option
v-for="item in parameters.orderRule"
:key="item.value"
:label="item.value"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="规则详情" prop="content">
<el-input type="textarea" rows="3" v-model="form.content" placeholder="请填写规则详情" autocomplete="off"></el-input>
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-input type="hidden" v-model="form.tag" placeholder="请填写标签" autocomplete="off"></el-input>
<el-form-item label="停车场须知" prop="value">
<div style="width: 99.9%;">
<tinymce ref="tiny" v-model="form.value" :height="300" />
</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -61,14 +43,15 @@
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
} from "../../api/resource/parking.js";
import {
getparameteritem
} from "../../api/system/dictionary.js"
list,
save,
get
} from "../../api/resource/config.js";
import Tinymce from '@/components/Tinymce'
export default {
components: {
LxHeader,
LxHeader,
Tinymce
},
created() {
this.initLoad();
@ -78,25 +61,15 @@
data() {
return {
dialogFormVisible: false,
formLabelWidth: "120px",
parameters: {
orderRule:[]
},
formLabelWidth: "120px",
form: {
name:"",
people:"",
content: "",
tag:"about",
value:""
},
columns: [{
field: "name",
title: "规则名称",
type: "string",
},
{
field: "people",
title: "限制人群",
title: "标题",
type: "string",
align: "center"
},
{
field: "操作",
@ -105,25 +78,10 @@
type: "opt",
}
],
rules: {
name: [{
required: true,
message: '请输入规则名称',
trigger: 'blur'
}]
},
rules: {},
tableHeight: 0,
//
searchFields: {
KeyWord: ""
},
tableData: [{
name:"规则名",
people:1,
content:"每单限购五张,同一身份证当天限购一张"
}
]
tableData: []
}
},
methods: {
@ -134,15 +92,17 @@
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
//
getparameteritem("order-rule").then(res => {
this.parameters.orderRule = res.detail;
});
that.tableHeight = tableHeight;
},
load() {
var that = this;
list({
name:"停车场须知"
}).then(res => {
this.tableData = res.data;
}).catch(error => {
})
},
show(obj) {
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
@ -150,7 +110,14 @@
this.info(obj);
},
info(obj) {
var that = this;
var that = this;
get(obj.tag).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
this.$refs.tiny.setContent(result.content);
}).catch(error => {
//reject(error)
})
},
edit(obj) {
this.form = this.$options.data().form;
@ -162,24 +129,18 @@
this.dialogFormVisible = true;
},
submitForm(formName) {
var that = this;
var that = this;
that.form.tag="car_park_notice";
this.$refs[formName].validate((valid) => {
if (valid) {
if (that.form.id) {
if (that.form.tag) {
save(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
} else {
store(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
}
} else {}
} else {
this.$Message.error('数据校验失败');
@ -191,27 +152,7 @@
var that = this;
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},
del(obj) {
var that = this;
if (obj) {
this.$Modal.confirm({
title: '确认要删除数据?',
onOk: () => {
del(obj.id).then(response => {
this.$Message.success('操作成功');
that.load();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
}
},
}
}
};
</script>

@ -4,14 +4,7 @@
<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.number="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>
<div slot="content"></div>
</LxHeader>
</div>
<div class="table-tree">
@ -23,8 +16,6 @@
<div v-if="column.type=='opt'">
<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>
</div>
<div v-else>{{scope.row[column.field]}}</div>
</template>
@ -34,12 +25,13 @@
</div>
<el-dialog title="详情编辑" :visible.sync="dialogFormVisible" fullscreen width="90%">
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="参观须知" prop="name">
<el-input type="textarea" rows="3" v-model="form.name" placeholder="请填写参观须知" autocomplete="off"></el-input>
</el-form-item>
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-input type="hidden" v-model="form.tag" placeholder="请填写标签" autocomplete="off"></el-input>
<el-form-item label="联系我们" prop="value">
<div style="width: 99.9%;">
<tinymce ref="tiny" v-model="form.value" :height="300" />
</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
@ -51,11 +43,15 @@
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
} from "../../../api/resource/visit.js";
list,
save,
get
} from "../../../api/resource/config.js";
import Tinymce from '@/components/Tinymce'
export default {
components: {
LxHeader
LxHeader,
Tinymce
},
created() {
this.initLoad();
@ -67,12 +63,9 @@
dialogFormVisible: false,
formLabelWidth: "120px",
form: {
name:"苏州市党性教育实训基地停车场",
public:"姑苏区体育场路4号",
question: "09:30-17:50",
proposal:"200",
contact:"100",
},
tag:"about",
value:""
},
columns: [{
field: "name",
title: "标题",
@ -85,27 +78,10 @@
type: "opt",
}
],
rules: {
name: [{
required: true,
message: '请输入参观须知',
trigger: 'blur'
}]
},
rules: {},
tableHeight: 0,
//
searchFields: {
KeyWord: ""
},
tableData: [{
name:"苏州市党性教育实训基地停车场",
public:"姑苏区体育场路4号",
question: "09:30-17:50",
proposal:"200",
contact:"100",
}
]
tableData: []
}
},
methods: {
@ -120,7 +96,13 @@
},
load() {
var that = this;
list({
name:"联系我们"
}).then(res => {
this.tableData = res.data;
}).catch(error => {
})
},
show(obj) {
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
@ -128,8 +110,14 @@
this.info(obj);
},
info(obj) {
var that = this;
var that = this;
get(obj.tag).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
this.$refs.tiny.setContent(result.content);
}).catch(error => {
//reject(error)
})
},
edit(obj) {
this.form = this.$options.data().form;
@ -141,24 +129,18 @@
this.dialogFormVisible = true;
},
submitForm(formName) {
var that = this;
var that = this;
that.form.tag="about";
this.$refs[formName].validate((valid) => {
if (valid) {
if (that.form.id) {
if (that.form.tag) {
save(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
} else {
store(that.form).then(response => {
console.log(response)
this.$Message.success('操作成功');
that.dialogFormVisible = false;
that.load();
}).catch(error => {})
}
} else {}
} else {
this.$Message.error('数据校验失败');
@ -171,26 +153,6 @@
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},
del(obj) {
var that = this;
if (obj) {
this.$Modal.confirm({
title: '确认要删除数据?',
onOk: () => {
del(obj.id).then(response => {
this.$Message.success('操作成功');
that.load();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
}
},
}
};
</script>

@ -207,6 +207,7 @@
},
resetForm(formName) {
var that = this;
this.$refs.tiny.setContent("");
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},

@ -207,6 +207,7 @@
},
resetForm(formName) {
var that = this;
this.$refs.tiny.setContent("");
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},

@ -207,6 +207,7 @@
},
resetForm(formName) {
var that = this;
this.$refs.tiny.setContent("");
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
},

@ -69,35 +69,35 @@
</el-select>
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="可预约最大天数" prop="visit_max_day">
<el-col :span="7" :offset="1">
<el-form-item class="longtext" label="可预约最大天数" prop="visit_max_day">
<el-input v-model="form.visit_max_day" placeholder="请填写可预约最大天数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预约修改提前天数" prop="visit_update_day">
<el-col :span="7" :offset="1">
<el-form-item class="longtext" label="预约修改提前天数" prop="visit_update_day">
<el-input v-model="form.visit_update_day" placeholder="请填写预约修改提前天数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="三个月内爽约多少次数计入黑名单" prop="month_blacklist">
<el-col :span="7" :offset="1">
<el-form-item class="longtext" label="三个月内爽约多少次数计入黑名单" prop="month_blacklist">
<el-input v-model="form.month_blacklist" placeholder="请填写三个月内爽约多少次数计入黑名单" autocomplete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="个人最大预定数量" prop="person_max_count">
<el-col :span="7" :offset="1">
<el-form-item class="longtext" label="个人最大预定数量" prop="person_max_count">
<el-input v-model="form.person_max_count" placeholder="请填写个人最大预定数量" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="团队最大预定数" prop="team_max_count">
<el-col :span="7" :offset="1">
<el-form-item class="longtext" label="团队最大预定数" prop="team_max_count">
<el-input v-model="form.team_max_count" placeholder="请填写团队最大预定数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="团队最小预定数" prop="team_min_count">
<el-col :span="7" :offset="1">
<el-form-item class="longtext" label="团队最小预定数" prop="team_min_count">
<el-input v-model="form.team_min_count" placeholder="请填写团队最小预定数" autocomplete="off"></el-input>
</el-form-item>
</el-col>
@ -116,24 +116,31 @@
</el-table-column>
<el-table-column prop="start_time" label="开始时间">
<template slot-scope="scope">
<el-date-picker
<el-time-select
style="width:100%"
v-model="scope.row.start_time"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="{
start: '00:00',
step: '00:15',
end: '24:00'
}"
placeholder="选择开始时间">
</el-date-picker>
</el-time-select>
</template>
</el-table-column>
<el-table-column prop="end_time" label="结束时间">
<template slot-scope="scope">
<el-date-picker
<el-time-select
style="width:100%"
v-model="scope.row.end_time"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="{
start: '00:00',
step: '00:15',
end: '24:00',
minTime: scope.row.start_time
}"
placeholder="选择结束时间">
</el-date-picker>
</el-time-select>
</template>
</el-table-column>
<el-table-column prop="total" label="可预约人数">
@ -406,3 +413,12 @@
}
};
</script>
<style>
.longtext label{
float:none;
padding-right:0;
}
.longtext .el-form-item__content{
margin-left:0!important
}
</style>

Loading…
Cancel
Save