Commit 4d7e8596 authored by 黎博's avatar 黎博

新增清除数据,修改新增jira相关

parent 39b07fea
......@@ -55,3 +55,11 @@ export function clearCache(queryInfo) {
params: queryInfo
})
}
export function clearData(dataInfo) {
return request({
url: '/cleardata',
method: 'get',
params: dataInfo
})
}
......@@ -17,6 +17,7 @@ import LoginWhiteList from '../views/effect/LoginWhiteList'
import JiraNotify from '../views/jira/Notify'
import RiskControl from '../views/vcc/RiskControl'
import ClearCache from '../views/effect/ClearCache'
import ClearData from '../views/effect/ClearData'
Vue.use(Router)
......@@ -81,7 +82,7 @@ const router = new Router({
component: LoginWhiteList
},
{
'path': '/effect/jira/notify',
'path': '/jira/notify',
component: JiraNotify
},
{
......@@ -91,6 +92,10 @@ const router = new Router({
{
'path': '/effect/clearcache',
component: ClearCache
},
{
'path': '/effect/cleardata',
component: ClearData
}
]
}
......
<template>
<div>
<el-table :data="cacheList" border style="width: 100%">
<el-table-column type="index" width="50"></el-table-column>
<el-table-column prop="name" label="描述" width="180">
</el-table-column>
<el-table-column prop="url" label="地址" width="500">
</el-table-column>
<el-table-column label="操作">
<slot slot-scope="scope">
<el-button type="primary" @click="clearCache(scope.row)">清除缓存</el-button>
</slot>
</el-table-column>
</el-table>
<el-card>
<el-table :data="cacheList" border style="width: 100%">
<el-table-column type="index" width="50"></el-table-column>
<el-table-column prop="name" label="描述" width="180">
</el-table-column>
<el-table-column prop="url" label="地址" width="500">
</el-table-column>
<el-table-column label="操作">
<slot slot-scope="scope">
<el-button type="primary" @click="clearCache(scope.row)">清除缓存</el-button>
</slot>
</el-table-column>
</el-table>
<!-- <div class="result">清除结果:{{ clearResult }}</div> -->
<!-- <div class="result">清除结果:{{ clearResult }}</div> -->
</el-card>
</div>
</template>
......
<template>
<div>
<!-- <p>羊小咩相关数据清除</p> -->
<el-card>
手机号:<el-input v-model="clearParams.phoneNo" placeholder="请输入手机号" maxlength="11"></el-input>
<el-button type="primary" icon="el-icon-brush" @click="clearYxmData">清除数据</el-button>
</el-card>
</div>
</template>
<script>
import { clearData } from '@/api/effect'
export default {
data() {
return {
clearParams: {
phoneNo: '',
namespace: window.sessionStorage.getItem('env')
}
}
},
methods: {
clearYxmData() {
clearData(this.clearParams).then((resp) => {
if (resp.data.data === true) {
this.$message.success('数据清除成功!')
} else {
return this.$message.error('数据清除失败!')
}
}).catch((error) => {
console.log(error)
return this.$message.error('数据清除失败,请检查环境或是否正确!')
})
}
}
}
</script>
<style lang="less" scoped>
.el-input {
width: 200px;
margin-right: 20px;
}
</style>
......@@ -88,17 +88,30 @@
},
{
"id": 4,
"title": "jira-钉钉通知",
"icon": "el-icon-ice-tea",
"path": "/effect/jira/notify"
},
{
"id": 5,
"title": "缓存清理",
"icon": "el-icon-milk-tea",
"path": "/effect/clearcache"
},
{
"id": 5,
"title": "数据清理",
"icon": "el-icon-water-cup",
"path": "/effect/cleardata"
}
]
},
{
"id": 6,
"title": "Jira相关",
"icon": "el-icon-hot-water",
"child": [
{
"id": 1,
"title": "jira-钉钉通知",
"icon": "el-icon-ice-tea",
"path": "/jira/notify"
}
]
}
]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment