master
Qin Dong Ming 2024-08-27 11:50:51 +08:00
parent 459d1639eb
commit 7905d9c4f2
3 changed files with 121 additions and 129 deletions

View File

@ -10,6 +10,8 @@ export function selectEngineList(data){
}
export function insert(data){
return request({
url: "/engine/engine/insert",
@ -17,13 +19,6 @@ export function insert(data){
data:data
})
}
export function inserts(data){
return request({
url: "/engine/engine/insert",
method: "post",
data:data
})
}
export function update(data){
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(){
return request({
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'
})
}

View File

@ -27,7 +27,7 @@
>导出
</el-button>
<!-- 添加按钮 /-->
<!-- 添加按钮 /-->
<el-button
type="primary"
plain
@ -182,7 +182,7 @@
</template>
</el-table-column>
</el-table>
<!-- 分页-->
<!-- 分页-->
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
@ -211,7 +211,7 @@ export default {
return {
engineReq:{
pageNum:1,
pageNum:1,
pageSize:5
},
engine:{
@ -267,22 +267,22 @@ export default {
},
findSelectSourceList(){
selectEngineList(this.engineReq).then(res=>{
this.arr=res.data.list;
this.total=res.data.total;
this.arr=res.data.list;
this.total=res.data.total;
})
},
handleDelete(id){
if (confirm("是否删除这条数据?")){
del(id).then(res =>{
del(id).then(res =>{
//
this.$message.success(res.msg || "删除成功")
})
this.$message.success(res.msg || "删除成功")
})
}
},
findSelectSourceExport(){
this.download('engine/engine/export', {
...this.engineReq
},
...this.engineReq
},
`source_${new Date().getTime()}.xlsx`)
},
select(){

View File

@ -1,117 +1,72 @@
<template>
<div>
<el-table :data="scopeList" style="width: 100%">
<div>
<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">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
<el-descriptions-item>
<template slot="label"><i class="el-icon-user"></i>描述</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>
<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>
</div>
</template>
<script>
import {getRuleEngineInfo} from "@/api/engine/engine";
import {findById, forbiddenEngine, onEngine} from "@/api/engine/engine";
export default {
//import使"
@ -125,15 +80,29 @@ export default {
}
},
methods: {
List(){
getRuleEngineInfo().then(res =>{
this.scopeList = res.data;
List(){
findById(this.maintenance.id).then(res =>{
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",
created() {
this.scopeList.id = this.$route.query.id
this.maintenance.id = this.$route.query.id
this.List();
}
}