测试1
parent
459d1639eb
commit
7905d9c4f2
|
@ -10,6 +10,8 @@ export function selectEngineList(data){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export function insert(data){
|
export function insert(data){
|
||||||
return request({
|
return request({
|
||||||
url: "/engine/engine/insert",
|
url: "/engine/engine/insert",
|
||||||
|
@ -17,13 +19,6 @@ export function insert(data){
|
||||||
data:data
|
data:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function inserts(data){
|
|
||||||
return request({
|
|
||||||
url: "/engine/engine/insert",
|
|
||||||
method: "post",
|
|
||||||
data:data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function update(data){
|
export function update(data){
|
||||||
return request({
|
return request({
|
||||||
|
@ -44,6 +39,25 @@ export function del(id){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//开启
|
||||||
|
export function onEngine(id){
|
||||||
|
return request({
|
||||||
|
url: "/engine/engine/onEngine/" + id,
|
||||||
|
method: "post",
|
||||||
|
data:id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//禁用
|
||||||
|
export function forbiddenEngine(id){
|
||||||
|
return request({
|
||||||
|
url: "/engine/engine/forbiddenEngine/" + id,
|
||||||
|
method: "post",
|
||||||
|
data:id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function selectLevel(){
|
export function selectLevel(){
|
||||||
return request({
|
return request({
|
||||||
url: "/engine/level/selectLevelList",
|
url: "/engine/level/selectLevelList",
|
||||||
|
@ -60,3 +74,12 @@ export function getRuleEngineInfo(id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 通过id查询
|
||||||
|
export function findById(id) {
|
||||||
|
return request({
|
||||||
|
url: '/engine/engine/findById/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
>导出
|
>导出
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- 添加按钮 /-->
|
<!-- 添加按钮 /-->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页-->
|
<!-- 分页-->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
|
@ -211,7 +211,7 @@ export default {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
engineReq:{
|
engineReq:{
|
||||||
pageNum:1,
|
pageNum:1,
|
||||||
pageSize:5
|
pageSize:5
|
||||||
},
|
},
|
||||||
engine:{
|
engine:{
|
||||||
|
@ -267,22 +267,22 @@ export default {
|
||||||
},
|
},
|
||||||
findSelectSourceList(){
|
findSelectSourceList(){
|
||||||
selectEngineList(this.engineReq).then(res=>{
|
selectEngineList(this.engineReq).then(res=>{
|
||||||
this.arr=res.data.list;
|
this.arr=res.data.list;
|
||||||
this.total=res.data.total;
|
this.total=res.data.total;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDelete(id){
|
handleDelete(id){
|
||||||
if (confirm("是否删除这条数据?")){
|
if (confirm("是否删除这条数据?")){
|
||||||
del(id).then(res =>{
|
del(id).then(res =>{
|
||||||
//判断删除是否成功
|
//判断删除是否成功
|
||||||
this.$message.success(res.msg || "删除成功")
|
this.$message.success(res.msg || "删除成功")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
findSelectSourceExport(){
|
findSelectSourceExport(){
|
||||||
this.download('engine/engine/export', {
|
this.download('engine/engine/export', {
|
||||||
...this.engineReq
|
...this.engineReq
|
||||||
},
|
},
|
||||||
`source_${new Date().getTime()}.xlsx`)
|
`source_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
select(){
|
select(){
|
||||||
|
|
|
@ -1,117 +1,72 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-table :data="scopeList" style="width: 100%">
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="8" v-for="customer in scopeList" v-if="scopeList.length !== 0">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span style="font-size: 18px;font-weight: 900">{{ customer.name }}</span>
|
||||||
|
<span style="font-size: 18px;font-weight: 900">{{ customer.versionCode }}</span>
|
||||||
|
<span style="font-size: 18px;font-weight: 900">{{ customer.isActivate }}</span>
|
||||||
|
<span style="font-size: 18px;font-weight: 900">{{ customer.status }}</span>
|
||||||
|
<span style="font-size: 18px;font-weight: 900">{{ customer.testStatus }}</span>
|
||||||
|
<span style="font-size: 18px;font-weight: 900">{{ customer.ruleContent }}</span>
|
||||||
|
<span style="font-size: 18px;font-weight: 900">{{ customer.engineMaintenanceId }}</span>
|
||||||
|
<span style="font-size: 18px;font-weight: 900">{{ customer.description }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-descriptions class="margin-top" :column="1" :size="size" border>
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
<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.versionClass }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>是否激活</template>
|
||||||
|
{{ customer.versionCode }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>版本状态</template>
|
||||||
|
{{ customer.isActivate }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>版本测试状态</template>
|
||||||
|
{{ customer.status }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>规则内容</template>
|
||||||
|
{{ customer.testStatus }}
|
||||||
|
</el-descriptions-item><el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>引擎维护编号</template>
|
||||||
|
{{ customer.ruleContent }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
<template slot-scope="scope">
|
<el-descriptions-item>
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
<template slot="label"><i class="el-icon-user"></i>描述</template>
|
||||||
</template>
|
{{ customer.engineMaintenanceId }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-divider content-position="left">规则引擎版本</el-divider>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-table-column>
|
</div>
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="日期" width="180">
|
|
||||||
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-table-column label="操作">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- @click="handleEdit(scope.$index, scope.row)">编辑</el-button>-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="danger"-->
|
|
||||||
<!-- @click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {getRuleEngineInfo} from "@/api/engine/engine";
|
|
||||||
|
import {findById, forbiddenEngine, onEngine} from "@/api/engine/engine";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用"
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
|
@ -125,15 +80,29 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
List(){
|
List(){
|
||||||
getRuleEngineInfo().then(res =>{
|
findById(this.maintenance.id).then(res =>{
|
||||||
this.scopeList = res.data;
|
this.scopeList = res.data;
|
||||||
|
console.log(this.scopeList)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleStatusChange(row){
|
||||||
|
if (row.status === "Y"){
|
||||||
|
onEngine(row.id).then((res)=>{
|
||||||
|
this.$modal.msgSuccess("启用成功")
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
forbiddenEngine(row.id).then((res)=>{
|
||||||
|
this.$modal.msgSuccess("禁用成功")
|
||||||
|
this.getList()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||||
created() {
|
created() {
|
||||||
this.scopeList.id = this.$route.query.id
|
this.maintenance.id = this.$route.query.id
|
||||||
this.List();
|
this.List();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue