|
@@ -38,7 +38,7 @@
|
|
:data="{ uuid: scope.row.uuid }"
|
|
:data="{ uuid: scope.row.uuid }"
|
|
:on-success="handleSuccess"
|
|
:on-success="handleSuccess"
|
|
:on-error="handleError"
|
|
:on-error="handleError"
|
|
- :headers="{ Authorization: 'Bearer ' + token}"
|
|
|
|
|
|
+ :headers="authHeader"
|
|
:show-file-list="false">
|
|
:show-file-list="false">
|
|
<el-button size="small" type="text">导入证书</el-button>
|
|
<el-button size="small" type="text">导入证书</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
@@ -74,7 +74,7 @@
|
|
:on-success="handleSuccess"
|
|
:on-success="handleSuccess"
|
|
:on-error="handleError"
|
|
:on-error="handleError"
|
|
:data="{ password: form.password, name: form.name }"
|
|
:data="{ password: form.password, name: form.name }"
|
|
- :headers="{ Authorization: 'Bearer ' + token}"
|
|
|
|
|
|
+ :headers="authHeader"
|
|
:file-list="fileList"
|
|
:file-list="fileList"
|
|
:auto-upload="false">
|
|
:auto-upload="false">
|
|
<el-button size="small" type="primary">选择证书</el-button>
|
|
<el-button size="small" type="primary">选择证书</el-button>
|
|
@@ -92,13 +92,11 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { mapActions, mapState } from 'vuex'
|
|
import { mapActions, mapState } from 'vuex'
|
|
-const token = sessionStorage.getItem('token')
|
|
|
|
export default {
|
|
export default {
|
|
name: 'cert',
|
|
name: 'cert',
|
|
components: {},
|
|
components: {},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- token,
|
|
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
title: null,
|
|
title: null,
|
|
type: 'req',
|
|
type: 'req',
|
|
@@ -112,7 +110,11 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['sigdata'])
|
|
|
|
|
|
+ ...mapState(['sigdata']),
|
|
|
|
+ authHeader () {
|
|
|
|
+ const token = sessionStorage.getItem('token')
|
|
|
|
+ return { Authorization: 'Bearer ' + token }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
this.query()
|
|
this.query()
|