|
|
|
|
@ -23,21 +23,21 @@
|
|
|
|
|
<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-if="column.type=='type'" v-for="item in parameters.visitType">
|
|
|
|
|
<div v-if="item.id==scope.row[column.field]">
|
|
|
|
|
{{item.value}}
|
|
|
|
|
</div>
|
|
|
|
|
<Button ghost size="small" type="error" @click="del(scope.row)" 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>{{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>
|
|
|
|
|
@ -52,34 +52,26 @@
|
|
|
|
|
<el-option v-for="item in parameters.visitType" :key="item.value" :label="item.value" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="开始时间" prop="start_date">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
style="width:100%"
|
|
|
|
|
v-model="form.start_date"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="结束时间" prop="end_date">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
style="width:100%"
|
|
|
|
|
v-model="form.end_date"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="选择结束时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="开始时间" prop="start_date">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="form.start_date" type="date" value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="结束时间" prop="end_date">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="form.end_date" type="date" value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="选择结束时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<div v-if="isRules" style="padding: 20px 0px;" class="form-sub-title">
|
|
|
|
|
<span>预约时间
|
|
|
|
|
@ -87,76 +79,67 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="isRules" class="table-tree tableswidth">
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="form.rules_list" height="400" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
|
<el-table-column type="index" align="center">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="start_time" label="开始时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-time-select
|
|
|
|
|
style="width:100%"
|
|
|
|
|
v-model="scope.row.start_time"
|
|
|
|
|
:picker-options="{
|
|
|
|
|
start: '00:00',
|
|
|
|
|
step: '00:15',
|
|
|
|
|
end: '24:00'
|
|
|
|
|
}"
|
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
|
</el-time-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="show_start_time" label="实际开始时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-time-select
|
|
|
|
|
style="width:100%"
|
|
|
|
|
v-model="scope.row.show_start_time"
|
|
|
|
|
:picker-options="{
|
|
|
|
|
start: '00:00',
|
|
|
|
|
step: '00:15',
|
|
|
|
|
end: '24:00'
|
|
|
|
|
}"
|
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
|
</el-time-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="end_time" label="结束时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-time-select
|
|
|
|
|
style="width:100%"
|
|
|
|
|
v-model="scope.row.end_time"
|
|
|
|
|
:picker-options="{
|
|
|
|
|
start: '00:00',
|
|
|
|
|
step: '00:15',
|
|
|
|
|
end: '24:00',
|
|
|
|
|
minTime: scope.row.start_time
|
|
|
|
|
}"
|
|
|
|
|
placeholder="选择结束时间">
|
|
|
|
|
</el-time-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="show_end_time" label="实际结束时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-time-select
|
|
|
|
|
style="width:100%"
|
|
|
|
|
v-model="scope.row.show_end_time"
|
|
|
|
|
:picker-options="{
|
|
|
|
|
start: '00:00',
|
|
|
|
|
step: '00:15',
|
|
|
|
|
end: '24:00',
|
|
|
|
|
minTime: scope.row.start_time
|
|
|
|
|
}"
|
|
|
|
|
placeholder="选择结束时间">
|
|
|
|
|
</el-time-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="total" label="可预约人数">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.total" placeholder="请填写可预约人数" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
<el-table-column prop="start_time" label="开始时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-time-select style="width:100%" v-model="scope.row.start_time" :picker-options="{
|
|
|
|
|
start: '00:00',
|
|
|
|
|
step: '00:15',
|
|
|
|
|
end: '24:00'
|
|
|
|
|
}" placeholder="选择开始时间">
|
|
|
|
|
</el-time-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="show_start_time" label="实际开始时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-time-select style="width:100%" v-model="scope.row.show_start_time" :picker-options="{
|
|
|
|
|
start: '00:00',
|
|
|
|
|
step: '00:15',
|
|
|
|
|
end: '24:00'
|
|
|
|
|
}" placeholder="选择开始时间">
|
|
|
|
|
</el-time-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="end_time" label="结束时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-time-select style="width:100%" v-model="scope.row.end_time" :picker-options="{
|
|
|
|
|
start: '00:00',
|
|
|
|
|
step: '00:15',
|
|
|
|
|
end: '24:00',
|
|
|
|
|
minTime: scope.row.start_time
|
|
|
|
|
}" placeholder="选择结束时间">
|
|
|
|
|
</el-time-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="show_end_time" label="实际结束时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-time-select style="width:100%" v-model="scope.row.show_end_time" :picker-options="{
|
|
|
|
|
start: '00:00',
|
|
|
|
|
step: '00:15',
|
|
|
|
|
end: '24:00',
|
|
|
|
|
minTime: scope.row.start_time
|
|
|
|
|
}" placeholder="选择结束时间">
|
|
|
|
|
</el-time-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="total" label="可预约人数">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.total" placeholder="请填写可预约人数" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="120px" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input style="display: none;" type="hidden" v-model="scope.row.id"></el-input>
|
|
|
|
|
<Button type="error" @click="delRow(scope.$index,scope.row.id)" size="small" style="margin-left: 10px;"
|
|
|
|
|
ghost>删除</Button>
|
|
|
|
|
@ -175,16 +158,23 @@
|
|
|
|
|
<script>
|
|
|
|
|
import LxHeader from "@/components/LxHeader/index.vue";
|
|
|
|
|
import {
|
|
|
|
|
listvisitspecial,
|
|
|
|
|
store,
|
|
|
|
|
save,
|
|
|
|
|
del,
|
|
|
|
|
get,
|
|
|
|
|
listvisitspecial,
|
|
|
|
|
store,
|
|
|
|
|
save,
|
|
|
|
|
del,
|
|
|
|
|
get,
|
|
|
|
|
delrule
|
|
|
|
|
} from "../../api/resource/visitspecial.js";
|
|
|
|
|
import {
|
|
|
|
|
getparameteritem
|
|
|
|
|
} from "../../api/resource/visitspecial.js";
|
|
|
|
|
import {
|
|
|
|
|
listvisit,
|
|
|
|
|
get as getresource
|
|
|
|
|
} from "../../api/resource/visitresource.js";
|
|
|
|
|
import {
|
|
|
|
|
getparameteritem
|
|
|
|
|
} from "../../api/system/dictionary.js"
|
|
|
|
|
import {
|
|
|
|
|
Message
|
|
|
|
|
} from "element-ui";
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
LxHeader
|
|
|
|
|
@ -192,56 +182,60 @@
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
formLabelWidth: "120px",
|
|
|
|
|
tableHeight: 0,
|
|
|
|
|
isRules:false,
|
|
|
|
|
//查询条件字段
|
|
|
|
|
searchFields: {
|
|
|
|
|
name: ""
|
|
|
|
|
},
|
|
|
|
|
tableData: [],
|
|
|
|
|
paginations: {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 15,
|
|
|
|
|
total: 0
|
|
|
|
|
formLabelWidth: "120px",
|
|
|
|
|
tableHeight: 0,
|
|
|
|
|
isRules: false,
|
|
|
|
|
//查询条件字段
|
|
|
|
|
searchFields: {
|
|
|
|
|
name: ""
|
|
|
|
|
},
|
|
|
|
|
listVisitArr: [],
|
|
|
|
|
tableData: [],
|
|
|
|
|
paginations: {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 15,
|
|
|
|
|
total: 0
|
|
|
|
|
},
|
|
|
|
|
parameters: {
|
|
|
|
|
visitType:[{
|
|
|
|
|
id:1,
|
|
|
|
|
value:"闭馆"
|
|
|
|
|
},{
|
|
|
|
|
id:2,
|
|
|
|
|
value:"修改预约时间"
|
|
|
|
|
visitType: [{
|
|
|
|
|
id: 1,
|
|
|
|
|
value: "闭馆"
|
|
|
|
|
}, {
|
|
|
|
|
id: 2,
|
|
|
|
|
value: "修改预约时间"
|
|
|
|
|
}, {
|
|
|
|
|
id: 3,
|
|
|
|
|
value: "开馆"
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
form: {
|
|
|
|
|
name: "",
|
|
|
|
|
type:1,
|
|
|
|
|
start_date:"",
|
|
|
|
|
end_date:"",
|
|
|
|
|
rules_list:[{
|
|
|
|
|
id:"",
|
|
|
|
|
start_time:"",
|
|
|
|
|
end_time:"",
|
|
|
|
|
show_start_time:"",
|
|
|
|
|
show_end_time:"",
|
|
|
|
|
total:""
|
|
|
|
|
selectId: "",
|
|
|
|
|
name: "",
|
|
|
|
|
type: 1,
|
|
|
|
|
start_date: "",
|
|
|
|
|
end_date: "",
|
|
|
|
|
rules_list: [{
|
|
|
|
|
id: "",
|
|
|
|
|
start_time: "",
|
|
|
|
|
end_time: "",
|
|
|
|
|
show_start_time: "",
|
|
|
|
|
show_end_time: "",
|
|
|
|
|
total: ""
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
field: "name",
|
|
|
|
|
title: "名称",
|
|
|
|
|
type: "string",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "type",
|
|
|
|
|
title: "类型",
|
|
|
|
|
type: "type",
|
|
|
|
|
width:300,
|
|
|
|
|
align:"center"
|
|
|
|
|
columns: [{
|
|
|
|
|
field: "name",
|
|
|
|
|
title: "名称",
|
|
|
|
|
type: "string",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "type",
|
|
|
|
|
title: "类型",
|
|
|
|
|
type: "type",
|
|
|
|
|
width: 300,
|
|
|
|
|
align: "center"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "操作",
|
|
|
|
|
@ -264,6 +258,7 @@
|
|
|
|
|
created() {
|
|
|
|
|
this.initLoad();
|
|
|
|
|
this.load();
|
|
|
|
|
this.listvisit();
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -278,28 +273,56 @@
|
|
|
|
|
},
|
|
|
|
|
load() {
|
|
|
|
|
var that = this;
|
|
|
|
|
listvisitspecial({
|
|
|
|
|
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 => {
|
|
|
|
|
|
|
|
|
|
listvisitspecial({
|
|
|
|
|
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 => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
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) {
|
|
|
|
|
var that = this;
|
|
|
|
|
get(obj.id).then(res => {
|
|
|
|
|
let result = Object.assign(that.form, res);
|
|
|
|
|
that.form = result;
|
|
|
|
|
if(result.type==2){
|
|
|
|
|
this.isRules = true;
|
|
|
|
|
}
|
|
|
|
|
that.form.rules_list = result.rules;
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
//reject(error)
|
|
|
|
|
var that = this;
|
|
|
|
|
get(obj.id).then(res => {
|
|
|
|
|
let result = Object.assign(that.form, res);
|
|
|
|
|
that.form = result;
|
|
|
|
|
if (result.type == 2||result.type == 3) {
|
|
|
|
|
this.isRules = true;
|
|
|
|
|
}
|
|
|
|
|
that.form.rules_list = result.rules;
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
//reject(error)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
@ -315,16 +338,16 @@
|
|
|
|
|
submitForm(formName) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if(!this.isRules){
|
|
|
|
|
that.form.rules_list = [{
|
|
|
|
|
id:"",
|
|
|
|
|
start_time:"",
|
|
|
|
|
end_time:"",
|
|
|
|
|
show_start_time:"",
|
|
|
|
|
show_end_time:"",
|
|
|
|
|
total:""
|
|
|
|
|
}]
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (!this.isRules) {
|
|
|
|
|
that.form.rules_list = [{
|
|
|
|
|
id: "",
|
|
|
|
|
start_time: "",
|
|
|
|
|
end_time: "",
|
|
|
|
|
show_start_time: "",
|
|
|
|
|
show_end_time: "",
|
|
|
|
|
total: ""
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
if (that.form.id) {
|
|
|
|
|
save(that.form).then(response => {
|
|
|
|
|
@ -349,7 +372,7 @@
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
resetForm(formName) {
|
|
|
|
|
var that = this;
|
|
|
|
|
var that = this;
|
|
|
|
|
this.isRules = false;
|
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
|
that.dialogFormVisible = false;
|
|
|
|
|
@ -373,39 +396,39 @@
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
showYy(val){
|
|
|
|
|
console.log(val)
|
|
|
|
|
this.isRules = !this.isRules
|
|
|
|
|
},
|
|
|
|
|
showYy(val) {
|
|
|
|
|
console.log(val)
|
|
|
|
|
this.isRules = (val != 1);
|
|
|
|
|
},
|
|
|
|
|
addRow() {
|
|
|
|
|
var len = this.form.rules_list.length;
|
|
|
|
|
this.form.rules_list.push({
|
|
|
|
|
id:"",
|
|
|
|
|
start_time:"",
|
|
|
|
|
end_time:"",
|
|
|
|
|
show_start_time:"",
|
|
|
|
|
show_end_time:"",
|
|
|
|
|
total:""
|
|
|
|
|
this.form.rules_list.push({
|
|
|
|
|
id: "",
|
|
|
|
|
start_time: "",
|
|
|
|
|
end_time: "",
|
|
|
|
|
show_start_time: "",
|
|
|
|
|
show_end_time: "",
|
|
|
|
|
total: ""
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
delRow(index,id) {
|
|
|
|
|
var that = this
|
|
|
|
|
if(id){
|
|
|
|
|
delrule(id).then(response => {
|
|
|
|
|
that.$Message.success('删除成功');
|
|
|
|
|
that.form.rules_list.splice(index, 1);
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.form.rules_list.splice(index, 1);
|
|
|
|
|
delRow(index, id) {
|
|
|
|
|
var that = this
|
|
|
|
|
if (id) {
|
|
|
|
|
delrule(id).then(response => {
|
|
|
|
|
that.$Message.success('删除成功');
|
|
|
|
|
that.form.rules_list.splice(index, 1);
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.form.rules_list.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(page) {
|
|
|
|
|
this.paginations.page = page;
|
|
|
|
|
this.load();
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(page) {
|
|
|
|
|
this.paginations.page = page;
|
|
|
|
|
this.load();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|