|
|
|
@ -57,11 +57,7 @@
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="开始时间" prop="start_date">
|
|
|
|
<el-form-item label="开始时间" prop="start_date">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker style="width:100%" v-model="form.start_date" type="date" value-format="yyyy-MM-dd"
|
|
|
|
style="width:100%"
|
|
|
|
|
|
|
|
v-model="form.start_date"
|
|
|
|
|
|
|
|
type="date"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -70,11 +66,7 @@
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
<el-form-item label="结束时间" prop="end_date">
|
|
|
|
<el-form-item label="结束时间" prop="end_date">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker style="width:100%" v-model="form.end_date" type="date" value-format="yyyy-MM-dd"
|
|
|
|
style="width:100%"
|
|
|
|
|
|
|
|
v-model="form.end_date"
|
|
|
|
|
|
|
|
type="date"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
|
|
placeholder="选择结束时间">
|
|
|
|
placeholder="选择结束时间">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -87,6 +79,13 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="isRules" class="table-tree tableswidth">
|
|
|
|
<div v-if="isRules" class="table-tree tableswidth">
|
|
|
|
<div style="display: flex;justify-content: flex-end;margin-right: 20px;margin-bottom: 10px;">
|
|
|
|
<div style="display: flex;justify-content: flex-end;margin-right: 20px;margin-bottom: 10px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-select v-model="form.selectId" placeholder="请选择" style="width:100%">
|
|
|
|
|
|
|
|
<el-option v-for="item in listVisitArr" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
<Button type="primary" @click="copyRow()" size="small" style="margin-left: 10px;" ghost>导入</Button>
|
|
|
|
|
|
|
|
|
|
|
|
<Button type="primary" @click="addRow()" size="small" style="margin-left: 10px;" ghost>新增</Button>
|
|
|
|
<Button type="primary" @click="addRow()" size="small" style="margin-left: 10px;" ghost>新增</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-table :data="form.rules_list" height="400" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
<el-table :data="form.rules_list" height="400" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
@ -94,59 +93,43 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="start_time" label="开始时间">
|
|
|
|
<el-table-column prop="start_time" label="开始时间">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-time-select
|
|
|
|
<el-time-select style="width:100%" v-model="scope.row.start_time" :picker-options="{
|
|
|
|
style="width:100%"
|
|
|
|
|
|
|
|
v-model="scope.row.start_time"
|
|
|
|
|
|
|
|
:picker-options="{
|
|
|
|
|
|
|
|
start: '00:00',
|
|
|
|
start: '00:00',
|
|
|
|
step: '00:15',
|
|
|
|
step: '00:15',
|
|
|
|
end: '24:00'
|
|
|
|
end: '24:00'
|
|
|
|
}"
|
|
|
|
}" placeholder="选择开始时间">
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
|
|
|
|
</el-time-select>
|
|
|
|
</el-time-select>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="show_start_time" label="实际开始时间">
|
|
|
|
<el-table-column prop="show_start_time" label="实际开始时间">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-time-select
|
|
|
|
<el-time-select style="width:100%" v-model="scope.row.show_start_time" :picker-options="{
|
|
|
|
style="width:100%"
|
|
|
|
|
|
|
|
v-model="scope.row.show_start_time"
|
|
|
|
|
|
|
|
:picker-options="{
|
|
|
|
|
|
|
|
start: '00:00',
|
|
|
|
start: '00:00',
|
|
|
|
step: '00:15',
|
|
|
|
step: '00:15',
|
|
|
|
end: '24:00'
|
|
|
|
end: '24:00'
|
|
|
|
}"
|
|
|
|
}" placeholder="选择开始时间">
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
|
|
|
|
</el-time-select>
|
|
|
|
</el-time-select>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="end_time" label="结束时间">
|
|
|
|
<el-table-column prop="end_time" label="结束时间">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-time-select
|
|
|
|
<el-time-select style="width:100%" v-model="scope.row.end_time" :picker-options="{
|
|
|
|
style="width:100%"
|
|
|
|
|
|
|
|
v-model="scope.row.end_time"
|
|
|
|
|
|
|
|
:picker-options="{
|
|
|
|
|
|
|
|
start: '00:00',
|
|
|
|
start: '00:00',
|
|
|
|
step: '00:15',
|
|
|
|
step: '00:15',
|
|
|
|
end: '24:00',
|
|
|
|
end: '24:00',
|
|
|
|
minTime: scope.row.start_time
|
|
|
|
minTime: scope.row.start_time
|
|
|
|
}"
|
|
|
|
}" placeholder="选择结束时间">
|
|
|
|
placeholder="选择结束时间">
|
|
|
|
|
|
|
|
</el-time-select>
|
|
|
|
</el-time-select>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="show_end_time" label="实际结束时间">
|
|
|
|
<el-table-column prop="show_end_time" label="实际结束时间">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-time-select
|
|
|
|
<el-time-select style="width:100%" v-model="scope.row.show_end_time" :picker-options="{
|
|
|
|
style="width:100%"
|
|
|
|
|
|
|
|
v-model="scope.row.show_end_time"
|
|
|
|
|
|
|
|
:picker-options="{
|
|
|
|
|
|
|
|
start: '00:00',
|
|
|
|
start: '00:00',
|
|
|
|
step: '00:15',
|
|
|
|
step: '00:15',
|
|
|
|
end: '24:00',
|
|
|
|
end: '24:00',
|
|
|
|
minTime: scope.row.start_time
|
|
|
|
minTime: scope.row.start_time
|
|
|
|
}"
|
|
|
|
}" placeholder="选择结束时间">
|
|
|
|
placeholder="选择结束时间">
|
|
|
|
|
|
|
|
</el-time-select>
|
|
|
|
</el-time-select>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
@ -182,9 +165,16 @@
|
|
|
|
get,
|
|
|
|
get,
|
|
|
|
delrule
|
|
|
|
delrule
|
|
|
|
} from "../../api/resource/visitspecial.js";
|
|
|
|
} from "../../api/resource/visitspecial.js";
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
listvisit,
|
|
|
|
|
|
|
|
get as getresource
|
|
|
|
|
|
|
|
} from "../../api/resource/visitresource.js";
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
getparameteritem
|
|
|
|
getparameteritem
|
|
|
|
} from "../../api/system/dictionary.js"
|
|
|
|
} from "../../api/system/dictionary.js"
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
Message
|
|
|
|
|
|
|
|
} from "element-ui";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
LxHeader
|
|
|
|
LxHeader
|
|
|
|
@ -194,11 +184,12 @@
|
|
|
|
dialogFormVisible: false,
|
|
|
|
dialogFormVisible: false,
|
|
|
|
formLabelWidth: "120px",
|
|
|
|
formLabelWidth: "120px",
|
|
|
|
tableHeight: 0,
|
|
|
|
tableHeight: 0,
|
|
|
|
isRules:false,
|
|
|
|
isRules: false,
|
|
|
|
//查询条件字段
|
|
|
|
//查询条件字段
|
|
|
|
searchFields: {
|
|
|
|
searchFields: {
|
|
|
|
name: ""
|
|
|
|
name: ""
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
listVisitArr: [],
|
|
|
|
tableData: [],
|
|
|
|
tableData: [],
|
|
|
|
paginations: {
|
|
|
|
paginations: {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
@ -206,32 +197,35 @@
|
|
|
|
total: 0
|
|
|
|
total: 0
|
|
|
|
},
|
|
|
|
},
|
|
|
|
parameters: {
|
|
|
|
parameters: {
|
|
|
|
visitType:[{
|
|
|
|
visitType: [{
|
|
|
|
id:1,
|
|
|
|
id: 1,
|
|
|
|
value:"闭馆"
|
|
|
|
value: "闭馆"
|
|
|
|
},{
|
|
|
|
}, {
|
|
|
|
id:2,
|
|
|
|
id: 2,
|
|
|
|
value:"修改预约时间"
|
|
|
|
value: "修改预约时间"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
id: 3,
|
|
|
|
|
|
|
|
value: "开馆"
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
form: {
|
|
|
|
form: {
|
|
|
|
|
|
|
|
selectId: "",
|
|
|
|
name: "",
|
|
|
|
name: "",
|
|
|
|
type:1,
|
|
|
|
type: 1,
|
|
|
|
start_date:"",
|
|
|
|
start_date: "",
|
|
|
|
end_date:"",
|
|
|
|
end_date: "",
|
|
|
|
rules_list:[{
|
|
|
|
rules_list: [{
|
|
|
|
id:"",
|
|
|
|
id: "",
|
|
|
|
start_time:"",
|
|
|
|
start_time: "",
|
|
|
|
end_time:"",
|
|
|
|
end_time: "",
|
|
|
|
show_start_time:"",
|
|
|
|
show_start_time: "",
|
|
|
|
show_end_time:"",
|
|
|
|
show_end_time: "",
|
|
|
|
total:""
|
|
|
|
total: ""
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
columns: [
|
|
|
|
columns: [{
|
|
|
|
{
|
|
|
|
|
|
|
|
field: "name",
|
|
|
|
field: "name",
|
|
|
|
title: "名称",
|
|
|
|
title: "名称",
|
|
|
|
type: "string",
|
|
|
|
type: "string",
|
|
|
|
@ -240,8 +234,8 @@
|
|
|
|
field: "type",
|
|
|
|
field: "type",
|
|
|
|
title: "类型",
|
|
|
|
title: "类型",
|
|
|
|
type: "type",
|
|
|
|
type: "type",
|
|
|
|
width:300,
|
|
|
|
width: 300,
|
|
|
|
align:"center"
|
|
|
|
align: "center"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
field: "操作",
|
|
|
|
field: "操作",
|
|
|
|
@ -264,6 +258,7 @@
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.initLoad();
|
|
|
|
this.initLoad();
|
|
|
|
this.load();
|
|
|
|
this.load();
|
|
|
|
|
|
|
|
this.listvisit();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {},
|
|
|
|
mounted() {},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
@ -281,7 +276,7 @@
|
|
|
|
listvisitspecial({
|
|
|
|
listvisitspecial({
|
|
|
|
page: this.paginations.page,
|
|
|
|
page: this.paginations.page,
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
name:this.searchFields.name
|
|
|
|
name: this.searchFields.name
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
this.tableData = res.data;
|
|
|
|
this.tableData = res.data;
|
|
|
|
this.paginations.total = res.total
|
|
|
|
this.paginations.total = res.total
|
|
|
|
@ -289,12 +284,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
listvisit() {
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
listvisit({
|
|
|
|
|
|
|
|
page_size: 999
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
this.listVisitArr = res.data;
|
|
|
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
getresource(id) {
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
getresource(id).then(res => {
|
|
|
|
|
|
|
|
//let result = Object.assign(that.form, res);
|
|
|
|
|
|
|
|
//that.form = result;
|
|
|
|
|
|
|
|
that.form.rules_list = res.rules;
|
|
|
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
|
|
//reject(error)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
copyRow() {
|
|
|
|
|
|
|
|
if (this.form.selectId == "") {
|
|
|
|
|
|
|
|
Message.error("请选择需要导入的模版");
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getresource(this.form.selectId);
|
|
|
|
|
|
|
|
},
|
|
|
|
info(obj) {
|
|
|
|
info(obj) {
|
|
|
|
var that = this;
|
|
|
|
var that = this;
|
|
|
|
get(obj.id).then(res => {
|
|
|
|
get(obj.id).then(res => {
|
|
|
|
let result = Object.assign(that.form, res);
|
|
|
|
let result = Object.assign(that.form, res);
|
|
|
|
that.form = result;
|
|
|
|
that.form = result;
|
|
|
|
if(result.type==2){
|
|
|
|
if (result.type == 2||result.type == 3) {
|
|
|
|
this.isRules = true;
|
|
|
|
this.isRules = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
that.form.rules_list = result.rules;
|
|
|
|
that.form.rules_list = result.rules;
|
|
|
|
@ -316,14 +339,14 @@
|
|
|
|
var that = this;
|
|
|
|
var that = this;
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if(!this.isRules){
|
|
|
|
if (!this.isRules) {
|
|
|
|
that.form.rules_list = [{
|
|
|
|
that.form.rules_list = [{
|
|
|
|
id:"",
|
|
|
|
id: "",
|
|
|
|
start_time:"",
|
|
|
|
start_time: "",
|
|
|
|
end_time:"",
|
|
|
|
end_time: "",
|
|
|
|
show_start_time:"",
|
|
|
|
show_start_time: "",
|
|
|
|
show_end_time:"",
|
|
|
|
show_end_time: "",
|
|
|
|
total:""
|
|
|
|
total: ""
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (that.form.id) {
|
|
|
|
if (that.form.id) {
|
|
|
|
@ -374,24 +397,24 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
showYy(val){
|
|
|
|
showYy(val) {
|
|
|
|
console.log(val)
|
|
|
|
console.log(val)
|
|
|
|
this.isRules = !this.isRules
|
|
|
|
this.isRules = (val != 1);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addRow() {
|
|
|
|
addRow() {
|
|
|
|
var len = this.form.rules_list.length;
|
|
|
|
var len = this.form.rules_list.length;
|
|
|
|
this.form.rules_list.push({
|
|
|
|
this.form.rules_list.push({
|
|
|
|
id:"",
|
|
|
|
id: "",
|
|
|
|
start_time:"",
|
|
|
|
start_time: "",
|
|
|
|
end_time:"",
|
|
|
|
end_time: "",
|
|
|
|
show_start_time:"",
|
|
|
|
show_start_time: "",
|
|
|
|
show_end_time:"",
|
|
|
|
show_end_time: "",
|
|
|
|
total:""
|
|
|
|
total: ""
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
delRow(index,id) {
|
|
|
|
delRow(index, id) {
|
|
|
|
var that = this
|
|
|
|
var that = this
|
|
|
|
if(id){
|
|
|
|
if (id) {
|
|
|
|
delrule(id).then(response => {
|
|
|
|
delrule(id).then(response => {
|
|
|
|
that.$Message.success('删除成功');
|
|
|
|
that.$Message.success('删除成功');
|
|
|
|
that.form.rules_list.splice(index, 1);
|
|
|
|
that.form.rules_list.splice(index, 1);
|
|
|
|
@ -399,7 +422,7 @@
|
|
|
|
console.log(error)
|
|
|
|
console.log(error)
|
|
|
|
reject(error)
|
|
|
|
reject(error)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
this.form.rules_list.splice(index, 1);
|
|
|
|
this.form.rules_list.splice(index, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|