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

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

parent 39b07fea
...@@ -55,3 +55,11 @@ export function clearCache(queryInfo) { ...@@ -55,3 +55,11 @@ export function clearCache(queryInfo) {
params: 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' ...@@ -17,6 +17,7 @@ import LoginWhiteList from '../views/effect/LoginWhiteList'
import JiraNotify from '../views/jira/Notify' import JiraNotify from '../views/jira/Notify'
import RiskControl from '../views/vcc/RiskControl' import RiskControl from '../views/vcc/RiskControl'
import ClearCache from '../views/effect/ClearCache' import ClearCache from '../views/effect/ClearCache'
import ClearData from '../views/effect/ClearData'
Vue.use(Router) Vue.use(Router)
...@@ -81,7 +82,7 @@ const router = new Router({ ...@@ -81,7 +82,7 @@ const router = new Router({
component: LoginWhiteList component: LoginWhiteList
}, },
{ {
'path': '/effect/jira/notify', 'path': '/jira/notify',
component: JiraNotify component: JiraNotify
}, },
{ {
...@@ -91,6 +92,10 @@ const router = new Router({ ...@@ -91,6 +92,10 @@ const router = new Router({
{ {
'path': '/effect/clearcache', 'path': '/effect/clearcache',
component: ClearCache component: ClearCache
},
{
'path': '/effect/cleardata',
component: ClearData
} }
] ]
} }
......
<template> <template>
<div> <div>
<el-card>
<el-table :data="cacheList" border style="width: 100%"> <el-table :data="cacheList" border style="width: 100%">
<el-table-column type="index" width="50"></el-table-column> <el-table-column type="index" width="50"></el-table-column>
<el-table-column prop="name" label="描述" width="180"> <el-table-column prop="name" label="描述" width="180">
...@@ -14,6 +15,7 @@ ...@@ -14,6 +15,7 @@
</el-table> </el-table>
<!-- <div class="result">清除结果:{{ clearResult }}</div> --> <!-- <div class="result">清除结果:{{ clearResult }}</div> -->
</el-card>
</div> </div>
</template> </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,15 +88,28 @@ ...@@ -88,15 +88,28 @@
}, },
{ {
"id": 4, "id": 4,
"title": "jira-钉钉通知",
"icon": "el-icon-ice-tea",
"path": "/effect/jira/notify"
},
{
"id": 5,
"title": "缓存清理", "title": "缓存清理",
"icon": "el-icon-milk-tea", "icon": "el-icon-milk-tea",
"path": "/effect/clearcache" "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"
} }
] ]
} }
......
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