|
|
@ -6,16 +6,24 @@
|
|
|
|
<div slot="content" class="table-page-search-wrapper">
|
|
|
|
<div slot="content" class="table-page-search-wrapper">
|
|
|
|
<a-form layout="inline" :form="form">
|
|
|
|
<a-form layout="inline" :form="form">
|
|
|
|
<a-row :gutter="48">
|
|
|
|
<a-row :gutter="48">
|
|
|
|
<a-col :md="4" :sm="24">
|
|
|
|
<a-col :md="6" :sm="24" :style="{ paddingRight: 0 }">
|
|
|
|
<a-form-item label="接口代码">
|
|
|
|
<a-form-item
|
|
|
|
|
|
|
|
label="接口代码"
|
|
|
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
|
|
|
>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
placeholder="请输入接口代码"
|
|
|
|
placeholder="请输入接口代码"
|
|
|
|
v-decorator="['ApiCode', { rules: [{ required: false, message: '请输入接口代码' }] }]"
|
|
|
|
v-decorator="['ApiCode', { rules: [{ required: false, message: '请输入接口代码' }] }]"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :md="4" :sm="24">
|
|
|
|
<a-col :md="6" :sm="24" :style="{ paddingRight: 0 }">
|
|
|
|
<a-form-item label="接口名称">
|
|
|
|
<a-form-item
|
|
|
|
|
|
|
|
label="接口名称"
|
|
|
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
|
|
|
>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
placeholder="请输入接口名称"
|
|
|
|
placeholder="请输入接口名称"
|
|
|
|
v-decorator="[
|
|
|
|
v-decorator="[
|
|
|
@ -25,13 +33,12 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :md="4" :sm="24">
|
|
|
|
<a-col :md="6" :sm="24" :style="{ paddingRight: 0 }">
|
|
|
|
<a-form-item label="是否禁用">
|
|
|
|
<a-form-item
|
|
|
|
<a-switch v-decorator="['IsDisable']"/>
|
|
|
|
label="租户名称"
|
|
|
|
</a-form-item>
|
|
|
|
:labelCol="labelCol"
|
|
|
|
</a-col>
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
<a-col :md="4" :sm="24">
|
|
|
|
>
|
|
|
|
<a-form-item label="租户名称">
|
|
|
|
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
placeholder="请输入租户名称"
|
|
|
|
placeholder="请输入租户名称"
|
|
|
|
v-decorator="[
|
|
|
|
v-decorator="[
|
|
|
@ -41,8 +48,12 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :md="4" :sm="24">
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
<a-form-item label="用户姓名">
|
|
|
|
<a-form-item
|
|
|
|
|
|
|
|
label="用户姓名"
|
|
|
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
|
|
|
>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
placeholder="请输入用户姓名"
|
|
|
|
placeholder="请输入用户姓名"
|
|
|
|
v-decorator="[
|
|
|
|
v-decorator="[
|
|
|
@ -52,18 +63,26 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<!-- <a-col :md="6" :sm="24">
|
|
|
|
<a-col :md="12" :sm="24" :style="{ paddingRight: 0 }">
|
|
|
|
<a-form-item label="搜索值">
|
|
|
|
<a-form-item
|
|
|
|
<a-input
|
|
|
|
label="是否禁用"
|
|
|
|
placeholder="请输入搜索值"
|
|
|
|
:labelCol="labelCol"
|
|
|
|
v-decorator="[
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
'SearchValue',
|
|
|
|
>
|
|
|
|
{ rules: [{ required: false, message: '请输入搜索值' }] },
|
|
|
|
<a-radio-group class="disable-radio" v-decorator="['IsDisable']">
|
|
|
|
]"
|
|
|
|
<a-radio :value="0">
|
|
|
|
/>
|
|
|
|
启用
|
|
|
|
|
|
|
|
</a-radio>
|
|
|
|
|
|
|
|
<a-radio :value="1">
|
|
|
|
|
|
|
|
禁用
|
|
|
|
|
|
|
|
</a-radio>
|
|
|
|
|
|
|
|
<a-radio :value="2">
|
|
|
|
|
|
|
|
全部
|
|
|
|
|
|
|
|
</a-radio>
|
|
|
|
|
|
|
|
</a-radio-group>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col> -->
|
|
|
|
</a-col>
|
|
|
|
<a-col :md="4" :sm="24" :labelCol="{ span: 2, offset: 12 }">
|
|
|
|
<a-col :md="12" :sm="24" :labelCol="{ span: 2, offset: 12 }">
|
|
|
|
<span class="table-page-search-submitButtons" style="text-align: right">
|
|
|
|
<span class="table-page-search-submitButtons" style="text-align: right">
|
|
|
|
<a-button type="primary" @click="tableRefresh">查询</a-button>
|
|
|
|
<a-button type="primary" @click="tableRefresh">查询</a-button>
|
|
|
|
<a-button style="margin-left: 8px" @click="tableReset">重置</a-button>
|
|
|
|
<a-button style="margin-left: 8px" @click="tableReset">重置</a-button>
|
|
|
@ -75,9 +94,9 @@
|
|
|
|
</x-card>
|
|
|
|
</x-card>
|
|
|
|
<x-card class="content-table">
|
|
|
|
<x-card class="content-table">
|
|
|
|
<div slot="content" class="table-page-search-wrapper" :style="{ marginTop: '-8px' }">
|
|
|
|
<div slot="content" class="table-page-search-wrapper" :style="{ marginTop: '-8px' }">
|
|
|
|
<!-- <vxe-toolbar>
|
|
|
|
<vxe-toolbar>
|
|
|
|
<template #buttons>
|
|
|
|
<template #buttons>
|
|
|
|
<a-button type="primary" icon="edit" @click="addProject">新增品名分类</a-button>
|
|
|
|
<a-button type="primary" icon="edit" @click="addProject">新增接口授权</a-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template #tools>
|
|
|
|
<template #tools>
|
|
|
|
<div class="right">
|
|
|
|
<div class="right">
|
|
|
@ -86,7 +105,7 @@
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</vxe-toolbar> -->
|
|
|
|
</vxe-toolbar>
|
|
|
|
<vxe-grid
|
|
|
|
<vxe-grid
|
|
|
|
ref="xGrid"
|
|
|
|
ref="xGrid"
|
|
|
|
v-bind="gridOptions"
|
|
|
|
v-bind="gridOptions"
|
|
|
@ -94,28 +113,39 @@
|
|
|
|
@page-change="handlePageChange"
|
|
|
|
@page-change="handlePageChange"
|
|
|
|
style="margin-top: 6px"
|
|
|
|
style="margin-top: 6px"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #isDisable="{ row }">
|
|
|
|
|
|
|
|
<span v-if="row.isDisable">禁用</span>
|
|
|
|
|
|
|
|
<span v-else>启用</span>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
<template #operate="{ row }">
|
|
|
|
<template #operate="{ row }">
|
|
|
|
<vxe-button type="text" icon="vxe-icon-edit" @click="editColumns(row)"></vxe-button>
|
|
|
|
<vxe-button type="text" class="disable-btn" @click="editColumns(row)">编辑</vxe-button>
|
|
|
|
<vxe-button type="text" icon="vxe-icon-delete" @click="removeColumns(row)"></vxe-button>
|
|
|
|
<vxe-button type="text" class="disable-btn active" @click="removeColumns(row)">删除</vxe-button>
|
|
|
|
|
|
|
|
<span v-if="row.isDisable" class="disable-btn" @click="setDisableFun(row)">启用</span>
|
|
|
|
|
|
|
|
<span v-else class="disable-btn active" @click="setDisableFun(row)">禁用</span>
|
|
|
|
|
|
|
|
<a-popconfirm title="确认删除?" ok-text="是" cancel-text="否" @confirm="secretResetFun(row)" @cancel="cancel">
|
|
|
|
|
|
|
|
<vxe-button class="disable-btn active" type="text">重置秘钥</vxe-button>
|
|
|
|
|
|
|
|
</a-popconfirm>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</vxe-grid>
|
|
|
|
</vxe-grid>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</x-card>
|
|
|
|
</x-card>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-row>
|
|
|
|
<add-form ref="addForm" :fromData="addFromData" :type="addFromType" @ok="handleOk" />
|
|
|
|
<add-form ref="addForm" :formData="addFormData" :type="addFormType" @ok="handleOk" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { XCard } from '@/components'
|
|
|
|
import { XCard } from '@/components'
|
|
|
|
import initData from './modules/initData'
|
|
|
|
import initData from './modules/initData'
|
|
|
|
import columnSetting from '@/components/tableColumnSetting'
|
|
|
|
import columnSetting from '@/components/tableColumnSetting'
|
|
|
|
import addForm from './modules/addFrom'
|
|
|
|
import addForm from './modules/addForm'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
GetApiPage,
|
|
|
|
GetApiPage,
|
|
|
|
SaveApi,
|
|
|
|
SaveApi,
|
|
|
|
DeleteApi,
|
|
|
|
DeleteApi,
|
|
|
|
GetApiDetail,
|
|
|
|
GetApiDetail,
|
|
|
|
|
|
|
|
DisableApi,
|
|
|
|
|
|
|
|
ResetApi
|
|
|
|
} from '@/api/modular/main/DjyApiAuth'
|
|
|
|
} from '@/api/modular/main/DjyApiAuth'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
@ -130,6 +160,16 @@ export default {
|
|
|
|
form: this.$form.createForm(this),
|
|
|
|
form: this.$form.createForm(this),
|
|
|
|
setVisible: false,
|
|
|
|
setVisible: false,
|
|
|
|
// showColumns: null,
|
|
|
|
// showColumns: null,
|
|
|
|
|
|
|
|
labelCol: {
|
|
|
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
|
|
|
sm: { span: 8 },
|
|
|
|
|
|
|
|
md: { span: 9 }
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
wrapperCol: {
|
|
|
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
|
|
|
sm: { span: 16 },
|
|
|
|
|
|
|
|
md: { span: 15 }
|
|
|
|
|
|
|
|
},
|
|
|
|
gridOptions: {
|
|
|
|
gridOptions: {
|
|
|
|
border: false,
|
|
|
|
border: false,
|
|
|
|
resizable: true,
|
|
|
|
resizable: true,
|
|
|
@ -150,12 +190,11 @@ export default {
|
|
|
|
columns: JSON.parse(JSON.stringify(initData.columns)),
|
|
|
|
columns: JSON.parse(JSON.stringify(initData.columns)),
|
|
|
|
data: [],
|
|
|
|
data: [],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addFromData: {},
|
|
|
|
addFormData: {},
|
|
|
|
addFromType: 'add',
|
|
|
|
addFormType: 'add'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
// this.showColumns = JSON.parse(JSON.stringify(initData.columns))
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {},
|
|
|
|
mounted() {},
|
|
|
@ -177,22 +216,6 @@ export default {
|
|
|
|
} = this
|
|
|
|
} = this
|
|
|
|
validateFields((err, values) => {
|
|
|
|
validateFields((err, values) => {
|
|
|
|
if (!err) {
|
|
|
|
if (!err) {
|
|
|
|
if (values.createdTime) {
|
|
|
|
|
|
|
|
const time = values.createdTime.map((item, index) => {
|
|
|
|
|
|
|
|
const str = this.dateFtt('YYYY-MM-DD', item._d)
|
|
|
|
|
|
|
|
return str
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log(time)
|
|
|
|
|
|
|
|
values.createdTime = time
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (values.updataTime) {
|
|
|
|
|
|
|
|
const _time = values.updataTime.map((item, index) => {
|
|
|
|
|
|
|
|
const str = this.dateFtt('YYYY-MM-DD', item._d)
|
|
|
|
|
|
|
|
return str
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log(_time)
|
|
|
|
|
|
|
|
values.updataTime = _time
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.gridOptions.pagerConfig.currentPage = currentPage
|
|
|
|
this.gridOptions.pagerConfig.currentPage = currentPage
|
|
|
|
this.gridOptions.pagerConfig.pageSize = pageSize
|
|
|
|
this.gridOptions.pagerConfig.pageSize = pageSize
|
|
|
|
this.getList(values)
|
|
|
|
this.getList(values)
|
|
|
@ -200,19 +223,23 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getList(queryParam = {}) {
|
|
|
|
getList(queryParam = {}) {
|
|
|
|
debugger
|
|
|
|
|
|
|
|
const { currentPage, pageSize } = this.gridOptions.pagerConfig
|
|
|
|
const { currentPage, pageSize } = this.gridOptions.pagerConfig
|
|
|
|
|
|
|
|
console.log('查询内容', queryParam)
|
|
|
|
|
|
|
|
let IsDisable = null
|
|
|
|
|
|
|
|
if (Object.keys(queryParam).length > 0 && queryParam.IsDisable !== 2) {
|
|
|
|
|
|
|
|
IsDisable = Boolean(queryParam.IsDisable)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log('IsDisable = ', IsDisable)
|
|
|
|
GetApiPage({
|
|
|
|
GetApiPage({
|
|
|
|
ApiCode: queryParam.ApiCode,
|
|
|
|
ApiCode: queryParam.ApiCode,
|
|
|
|
ApiName: queryParam.ApiName,
|
|
|
|
ApiName: queryParam.ApiName,
|
|
|
|
IsDisable: queryParam.IsDisable,
|
|
|
|
IsDisable: IsDisable,
|
|
|
|
TenantName: queryParam.TenantName,
|
|
|
|
TenantName: queryParam.TenantName,
|
|
|
|
UserName: queryParam.UserName,
|
|
|
|
UserName: queryParam.UserName,
|
|
|
|
pageNo: currentPage,
|
|
|
|
pageNo: currentPage,
|
|
|
|
pageSize: pageSize
|
|
|
|
pageSize: pageSize
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
debugger
|
|
|
|
|
|
|
|
const _data = res.data.rows.map((item, index) => {
|
|
|
|
const _data = res.data.rows.map((item, index) => {
|
|
|
|
item.row_id = (currentPage - 1) * pageSize + index
|
|
|
|
item.row_id = (currentPage - 1) * pageSize + index
|
|
|
|
return item
|
|
|
|
return item
|
|
|
@ -227,14 +254,14 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
editColumns(data) {
|
|
|
|
editColumns(data) {
|
|
|
|
this.addFromType = 'edit'
|
|
|
|
this.addFormType = 'edit'
|
|
|
|
this.addFromId = data.id
|
|
|
|
this.addFormId = data.id
|
|
|
|
GetApiDetail({
|
|
|
|
GetApiDetail({
|
|
|
|
id: this.addFromId,
|
|
|
|
id: this.addFormId,
|
|
|
|
}).then((res) => {
|
|
|
|
}).then((res) => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|
this.addFromData = res.data
|
|
|
|
this.addFormData = res.data
|
|
|
|
console.log(this.addFromData)
|
|
|
|
console.log(this.addFormData)
|
|
|
|
this.$refs.addForm.add()
|
|
|
|
this.$refs.addForm.add()
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(res.message)
|
|
|
|
this.$message.error(res.message)
|
|
|
@ -242,7 +269,9 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
removeColumns(data) {
|
|
|
|
removeColumns(data) {
|
|
|
|
DeleteApi(data.id).then((res) => {
|
|
|
|
DeleteApi({
|
|
|
|
|
|
|
|
id: data.id
|
|
|
|
|
|
|
|
}).then((res) => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
const {
|
|
|
|
const {
|
|
|
@ -259,9 +288,9 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addProject() {
|
|
|
|
addProject() {
|
|
|
|
this.addFromData = {}
|
|
|
|
this.addFormData = {}
|
|
|
|
this.addFromType = 'add'
|
|
|
|
this.addFormType = 'add'
|
|
|
|
this.addFromId = ''
|
|
|
|
this.addFormId = ''
|
|
|
|
this.$refs.addForm.add()
|
|
|
|
this.$refs.addForm.add()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
columnChange(data) {
|
|
|
|
columnChange(data) {
|
|
|
@ -305,35 +334,21 @@ export default {
|
|
|
|
console.log(e)
|
|
|
|
console.log(e)
|
|
|
|
this.$message.error('取消操作')
|
|
|
|
this.$message.error('取消操作')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleOk() {
|
|
|
|
handleOk(data) {
|
|
|
|
const form = this.$refs.addForm.form
|
|
|
|
SaveApi(data)
|
|
|
|
form.validateFields((errors, values) => {
|
|
|
|
.then((res) => {
|
|
|
|
if (!errors) {
|
|
|
|
this.$refs.addForm.$data.confirmLoading = false
|
|
|
|
console.log('values', values)
|
|
|
|
if (res.success) {
|
|
|
|
SaveApi({
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
id: this.addFromId,
|
|
|
|
this.$refs.addForm.handleCancel()
|
|
|
|
goodsCode: values.goodsCode,
|
|
|
|
this.init()
|
|
|
|
goodsNameCN: values.goodsNameCN,
|
|
|
|
} else {
|
|
|
|
goodsNameEN: values.goodsNameEN,
|
|
|
|
this.$message.error(res.message)
|
|
|
|
goodsDesp: values.goodsDesp,
|
|
|
|
}
|
|
|
|
goodsCategory: values.goodsCategory,
|
|
|
|
})
|
|
|
|
goodsCategoryName: values.goodsCategoryName,
|
|
|
|
.catch((err) => {
|
|
|
|
})
|
|
|
|
console.log(err)
|
|
|
|
.then((res) => {
|
|
|
|
})
|
|
|
|
this.$refs.addForm.$data.confirmLoading = false
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
|
|
|
this.$refs.addForm.handleCancel()
|
|
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
|
|
console.log(err)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tableRefresh() {
|
|
|
|
tableRefresh() {
|
|
|
|
const {
|
|
|
|
const {
|
|
|
@ -350,7 +365,59 @@ export default {
|
|
|
|
this.init()
|
|
|
|
this.init()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tableHeaderEdit() {},
|
|
|
|
tableHeaderEdit() {},
|
|
|
|
},
|
|
|
|
setDisableFun(data) {
|
|
|
|
|
|
|
|
console.log('是否禁用: ', data.id, data.isDisable, data)
|
|
|
|
|
|
|
|
DisableApi({
|
|
|
|
|
|
|
|
id: data.id,
|
|
|
|
|
|
|
|
disable: !data.isDisable
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
|
|
|
|
const tip = !data.isDisable ? '已禁用' : '已启用'
|
|
|
|
|
|
|
|
this.$message.success(tip)
|
|
|
|
|
|
|
|
this.gridOptions.data[data.row_id].isDisable = !data.isDisable
|
|
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
|
|
console.log(err)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
secretResetFun (data) {
|
|
|
|
|
|
|
|
ResetApi({
|
|
|
|
|
|
|
|
id: data.id
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
|
|
|
|
this.$message.success('秘钥已重置')
|
|
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
|
|
console.log(err)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
cancel() {}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
|
|
.disable-btn{
|
|
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
color: @primary-color;
|
|
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&.active{
|
|
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.disable-radio{
|
|
|
|
|
|
|
|
display:flex;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
margin-top: 7px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|