Changes
parent
594a9c4d32
commit
9cc3a87592
|
@ -0,0 +1,47 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// // 查询规则列表
|
||||||
|
// export function listRule(query) {
|
||||||
|
// return request({
|
||||||
|
// url: '/rule/rule/list',
|
||||||
|
// method: 'post',
|
||||||
|
// params: query
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 查询规则详细
|
||||||
|
export function getEditionList(id) {
|
||||||
|
return request({
|
||||||
|
url: '/rule/ruleEdition/findById/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// // 新增规则
|
||||||
|
// export function addRule(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/rule/rule/insert',
|
||||||
|
// method: 'post',
|
||||||
|
// data: data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 修改规则
|
||||||
|
// export function updateRule(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/rule/rule/update',
|
||||||
|
// method: 'put',
|
||||||
|
// data: data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// // 删除规则
|
||||||
|
// export function delRule(id) {
|
||||||
|
// return request({
|
||||||
|
// url: '/rule/rule/delete/' + id,
|
||||||
|
// method: 'delete'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
|
@ -3,26 +3,26 @@
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="规则名称" prop="name">
|
<el-form-item label="规则名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入规则名称"
|
placeholder="请输入规则名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否激活" prop="isActivate">
|
<el-form-item label="是否激活" prop="isActivate">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.isActivate"
|
v-model="queryParams.isActivate"
|
||||||
placeholder="请输入是否激活"
|
placeholder="请输入是否激活"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="规则代码" prop="ruleCode">
|
<el-form-item label="规则代码" prop="ruleCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.ruleCode"
|
v-model="queryParams.ruleCode"
|
||||||
placeholder="请输入规则代码"
|
placeholder="请输入规则代码"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -34,51 +34,51 @@
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['rule:rule:add']"
|
v-hasPermi="['rule:rule:add']"
|
||||||
>新增
|
>新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="success"
|
<!-- type="success"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-edit"
|
<!-- icon="el-icon-edit"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:disabled="single"
|
<!-- :disabled="single"-->
|
||||||
@click="handleUpdate"
|
<!-- @click="handleUpdate"-->
|
||||||
v-hasPermi="['rule:rule:edit']"
|
<!-- v-hasPermi="['rule:rule:edit']"-->
|
||||||
>修改
|
<!-- >修改-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="danger"
|
<!-- type="danger"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-delete"
|
<!-- icon="el-icon-delete"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:disabled="multiple"
|
<!-- :disabled="multiple"-->
|
||||||
@click="handleDelete"
|
<!-- @click="handleDelete"-->
|
||||||
v-hasPermi="['rule:rule:remove']"
|
<!-- v-hasPermi="['rule:rule:remove']"-->
|
||||||
>删除
|
<!-- >删除-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="warning"
|
<!-- type="warning"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-download"
|
<!-- icon="el-icon-download"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
@click="handleExport"
|
<!-- @click="handleExport"-->
|
||||||
v-hasPermi="['rule:rule:export']"
|
<!-- v-hasPermi="['rule:rule:export']"-->
|
||||||
>导出
|
<!-- >导出-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange">-->
|
<!-- <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange">-->
|
||||||
|
@ -126,91 +126,160 @@
|
||||||
<i class="el-icon-user"></i>
|
<i class="el-icon-user"></i>
|
||||||
主键
|
主键
|
||||||
</template>
|
</template>
|
||||||
{{ ruleAndVersion.id }}
|
{{ rule.id }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<i class="el-icon-user"></i>
|
<i class="el-icon-user"></i>
|
||||||
规则名称
|
规则名称
|
||||||
</template>
|
</template>
|
||||||
{{ ruleAndVersion.name }}
|
{{ rule.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<i class="el-icon-user"></i>
|
<i class="el-icon-user"></i>
|
||||||
规则类型
|
规则类型
|
||||||
</template>
|
</template>
|
||||||
{{ ruleAndVersion.ruleType }}
|
{{ rule.ruleType }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<i class="el-icon-user"></i>
|
<i class="el-icon-user"></i>
|
||||||
是否激活
|
是否激活
|
||||||
</template>
|
</template>
|
||||||
{{ ruleAndVersion.isActivate }}
|
{{ rule.isActivate }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<i class="el-icon-user"></i>
|
<i class="el-icon-user"></i>
|
||||||
规则描述
|
规则描述
|
||||||
</template>
|
</template>
|
||||||
{{ ruleAndVersion.ruleDesc }}
|
{{ rule.ruleDesc }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<i class="el-icon-user"></i>
|
<i class="el-icon-user"></i>
|
||||||
规则代码
|
规则代码
|
||||||
</template>
|
</template>
|
||||||
{{ ruleAndVersion.ruleCode }}
|
{{ rule.ruleCode }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<pagination
|
<!-- <pagination-->
|
||||||
v-show="total>0"
|
<!-- v-show="total>0"-->
|
||||||
:total="total"
|
<!-- :total="total"-->
|
||||||
:page.sync="queryParams.pageNum"
|
<!-- :page.sync="queryParams.pageNum"-->
|
||||||
:limit.sync="queryParams.pageSize"
|
<!-- :limit.sync="queryParams.pageSize"-->
|
||||||
@pagination="getList"
|
<!-- @pagination="getList"-->
|
||||||
/>
|
<!-- />-->
|
||||||
|
|
||||||
|
|
||||||
|
<br><br>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<!-- <el-empty description="暂无支付客户" v-if="customerList.length === 0"></el-empty>-->
|
<!-- <el-empty description="暂无支付客户" v-if="customerList.length === 0"></el-empty>-->
|
||||||
<!-- <el-col :span="8" v-for="customer in customerList" v-if="customerList.length !== 0">-->
|
<el-col :span="12" v-for="customer in ruleAndEditionList">
|
||||||
|
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span style="font-size: 18px;font-weight: 900">{{ ruleAndVersion.appName }}</span>
|
|
||||||
<!-- <el-switch-->
|
|
||||||
<!-- style="float: right; margin: 4px 5px 0;"-->
|
|
||||||
<!-- v-model="customer.status"-->
|
|
||||||
<!-- active-color="#13ce66"-->
|
|
||||||
<!-- inactive-color="#ff4949"-->
|
|
||||||
<!-- active-value="Y"-->
|
|
||||||
<!-- inactive-value="N"-->
|
|
||||||
<!-- @change="handleStatusChange(customer)"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-switch>-->
|
|
||||||
|
|
||||||
<el-popconfirm
|
<div>
|
||||||
confirm-button-text='好的'
|
<el-descriptions class="margin-top" title="带边框列表" :column="3" :size="size" border>
|
||||||
cancel-button-text='不用了'
|
<template slot="extra">
|
||||||
icon="el-icon-info"
|
|
||||||
icon-color="red"
|
|
||||||
title="这是一段内容确定删除吗?"
|
|
||||||
@confirm="handleDelete(ruleAndVersion.id)"
|
|
||||||
>
|
|
||||||
<el-button style="float: right; padding: 5px ;margin: 0 5px" slot="reference" type="danger"
|
|
||||||
icon="el-icon-delete" circle></el-button>
|
|
||||||
</el-popconfirm>
|
|
||||||
|
|
||||||
<el-button style="float: right; padding: 5px ;margin: 0 5px" type="primary" icon="el-icon-edit"
|
<el-dropdown>
|
||||||
@click="handleUpdate(ruleAndVersion.id)" circle></el-button>
|
<span class="el-dropdown-link">
|
||||||
|
下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</span>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item>
|
||||||
|
<el-button type="primary" size="small">激活按钮</el-button>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item>激活按钮</el-dropdown-item>
|
||||||
|
<el-dropdown-item disabled>双皮奶</el-dropdown-item>
|
||||||
|
<el-dropdown-item divided>蚵仔煎</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
<!-- </el-button>-->
|
||||||
|
</template>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
版本主键
|
||||||
|
</template>
|
||||||
|
{{ customer.id }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
版本类
|
||||||
|
</template>
|
||||||
|
{{ customer.ruleKind }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
版本名称
|
||||||
|
</template>
|
||||||
|
{{ customer.name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
编码
|
||||||
|
</template>
|
||||||
|
{{ customer.ruleCoding }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
是否激活
|
||||||
|
</template>
|
||||||
|
{{ customer.ruleActivate }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
状态
|
||||||
|
</template>
|
||||||
|
{{ customer.status }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-descriptions-item>
|
||||||
|
<div>
|
||||||
|
<editor v-model="customer.ruleContent" :min-height="192"/>
|
||||||
|
</div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<!-- <el-switch-->
|
||||||
|
<!-- style="float: right; margin: 4px 5px 0;"-->
|
||||||
|
<!-- v-model="customer.status"-->
|
||||||
|
<!-- active-color="#13ce66"-->
|
||||||
|
<!-- inactive-color="#ff4949"-->
|
||||||
|
<!-- active-value="Y"-->
|
||||||
|
<!-- inactive-value="N"-->
|
||||||
|
<!-- @change="handleStatusChange(customer)"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </el-switch>-->
|
||||||
|
<!-- <el-popconfirm-->
|
||||||
|
<!-- confirm-button-text='好的'-->
|
||||||
|
<!-- cancel-button-text='不用了'-->
|
||||||
|
<!-- icon="el-icon-info"-->
|
||||||
|
<!-- icon-color="red"-->
|
||||||
|
<!-- title="这是一段内容确定删除吗?"-->
|
||||||
|
<!-- @confirm="handleDelete(ruleAndVersion.id)"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-button style="float: right; padding: 5px ;margin: 0 5px" slot="reference" type="danger"-->
|
||||||
|
<!-- icon="el-icon-delete" circle></el-button>-->
|
||||||
|
<!-- </el-popconfirm>-->
|
||||||
|
|
||||||
|
<!-- <el-button style="float: right; padding: 5px ;margin: 0 5px" type="primary" icon="el-icon-edit"-->
|
||||||
|
<!-- @click="handleUpdate(ruleAndVersion.id)" circle></el-button>-->
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- </el-col>-->
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改规则对话框 -->
|
<!-- 添加或修改规则对话框 -->
|
||||||
|
@ -239,11 +308,15 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listRule, getRule, delRule, addRule, updateRule} from "/src/api/rule/rule";
|
import {listRule, getRule, delRule, addRule, updateRule} from "/src/api/rule/rule";
|
||||||
|
import {getEditionList} from "@/api/rule/ruleEdition";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Rule",
|
name: "Rule",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
ruleAndEditionList: [],
|
||||||
|
//版本
|
||||||
|
ruleAndEdition: {},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
@ -280,6 +353,7 @@ export default {
|
||||||
ruleDesc: "",
|
ruleDesc: "",
|
||||||
ruleCode: ""
|
ruleCode: ""
|
||||||
},
|
},
|
||||||
|
rule: {},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
@ -292,27 +366,37 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.ruleAndVersion.id = this.$route.query.id
|
this.ruleAndVersion.id = this.$route.query.id
|
||||||
this.getList();
|
this.findById();
|
||||||
|
this.findList()
|
||||||
|
},
|
||||||
|
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||||
|
mounted() {
|
||||||
this.findById();
|
this.findById();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//版本card
|
||||||
|
findList() {
|
||||||
|
getEditionList(this.ruleAndVersion.id).then(res => {
|
||||||
|
this.ruleAndEditionList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
//根据ID回显
|
//根据ID回显
|
||||||
findById() {
|
findById() {
|
||||||
getRule(this.ruleAndVersion.id).then(res => {
|
getRule(this.ruleAndVersion.id).then(res => {
|
||||||
this.ruleAndVersion = res.data[0]
|
this.rule = res.data[0]
|
||||||
console.log(this.ruleAndVersion)
|
console.log(this.rule)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 查询规则列表 */
|
// /** 查询规则列表 */
|
||||||
getList() {
|
// getList() {
|
||||||
this.loading = true;
|
// this.loading = true;
|
||||||
listRule(this.queryParams).then(response => {
|
// listRule(this.queryParams).then(response => {
|
||||||
this.ruleList = response.data;
|
// this.ruleList = response.data;
|
||||||
this.total = response.data;
|
// this.total = response.data;
|
||||||
this.loading = false;
|
// this.loading = false;
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -337,7 +421,7 @@ export default {
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
// this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
@ -356,13 +440,13 @@ export default {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加规则";
|
this.title = "添加规则";
|
||||||
},
|
},
|
||||||
/** 规则维护按钮操作 */
|
// /** 规则维护按钮操作 */
|
||||||
handleMaintain(row) {
|
// handleMaintain(row) {
|
||||||
this.$router.push({
|
// this.$router.push({
|
||||||
path: 'version',
|
// path: 'version',
|
||||||
query: {id: row.id}
|
// query: {id: row.id}
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
@ -381,13 +465,13 @@ export default {
|
||||||
updateRule(this.form).then(response => {
|
updateRule(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
// this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addRule(this.form).then(response => {
|
addRule(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
// this.getList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -399,7 +483,7 @@ export default {
|
||||||
this.$modal.confirm('是否确认删除规则编号为"' + ids + '"的数据项?').then(function () {
|
this.$modal.confirm('是否确认删除规则编号为"' + ids + '"的数据项?').then(function () {
|
||||||
return delRule(ids);
|
return delRule(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
// this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue