Commit f1cf855b authored by 黎博's avatar 黎博

修改

parent fad22b61
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>QA测试平台</title><link rel="shortcut icon" href=/QA.png><link href=/static/css/app.f41bd8009244a7c9a99512e9c4b5b82c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.8705403673bf9eca112f.js></script><script type=text/javascript src=/static/js/app.f87257f7b04ece982d07.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>QA测试平台</title><link rel="shortcut icon" href=/QA.png><link href=/static/css/app.1d15b56513a80841a9f8119897bea535.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.8705403673bf9eca112f.js></script><script type=text/javascript src=/static/js/app.65a1bf6e9c0903720bfc.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["webpack:///webpack/bootstrap 53967894d90fdd130634"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 53967894d90fdd130634"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap db16dcdc7dc5da4884f5"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap db16dcdc7dc5da4884f5"],"sourceRoot":""}
\ No newline at end of file
import request from '@/utils/request'
export function kdspDecrypt(queryInfo) {
return request({
url: '/kdsp/decrypt',
method: 'get',
params: queryInfo
})
}
import request from '@/utils/request'
export function getMockList() {
export function getMockList(queryInfo) {
return request({
url: '/list/mock',
method: 'get'
method: 'get',
params: queryInfo
})
}
......@@ -14,3 +15,11 @@ export function addMock(data) {
data
})
}
export function editMock(data) {
return request({
url: '/edit/mock',
method: 'post',
data
})
}
......@@ -13,6 +13,7 @@ import VccGetData from '../views/Vcc/GetData'
import VccGenData from '../views/Vcc/GenData'
import VccCheckData from '../views/Vcc/CheckData'
import Mock from '../views/Mock/Mock'
import kdspDecrypt from '../views/effect/KdspDecrypt'
Vue.use(Router)
......@@ -74,6 +75,10 @@ const router = new Router({
{
'path': '/mock/list',
component: Mock
},
{
'path': '/effect/kdsp/decrypt',
component: kdspDecrypt
}
]
}
......
......@@ -92,6 +92,18 @@
</template>
</el-menu-item>
</el-submenu>
<el-submenu :index="5">
<template slot="title">
<i class="el-icon-s-shop"></i>
<span>小工具</span>
</template>
<el-menu-item index="/effect/kdsp/decrypt" @click="saveNavState('/effect/kdsp/decrypt')">
<template slot="title">
<i class="el-icon-pear"></i>
<span>kdsp解密</span>
</template>
</el-menu-item>
</el-submenu>
</el-menu>
</el-aside>
<el-main>
......
......@@ -9,31 +9,28 @@
<el-card>
<el-button type="primary" @click="addDialogVisible = true">新增mock</el-button>
<el-table :data="mockList" border style="width: 100%">
<el-table-column prop="id" label="序号" width="100">
<el-table-column prop="id" label="序号" width="80">
</el-table-column>
<el-table-column prop="url" label="路径" width="250">
<el-table-column prop="url" label="路径" width="200">
</el-table-column>
<el-table-column prop="description" label="描述" width="200">
</el-table-column>
<!-- <el-table-column prop="success" label="成功响应" width="250">
</el-table-column>
<el-table-column prop="fail" label="失败响应" width="250">
</el-table-column> -->
<el-table-column label="操作">
<slot slot-scope="scope">
<el-button type="warning" @click="openDetailDialog(scope.row)">详情</el-button>
<el-button type="success" @click="openEditDialog(scope.row)">编辑</el-button>
<el-button type="danger">删除</el-button>
<!-- <el-button type="danger">删除</el-button> -->
</slot>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="queryInfo.pageNum"
:page-size="queryInfo.pageSize"
layout="total, prev, pager, next"
:total="totalNum"
></el-pagination>
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="queryInfo.pageNum" :page-size="queryInfo.pageSize" layout="total, prev, pager, next"
:total="totalNum"></el-pagination>
</el-card>
<!-- 详情对话框 -->
......@@ -52,7 +49,7 @@
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="detailDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="detailDialogVisible = false">确 定</el-button>
<el-button type="primary" @click="detailDialogVisible = false">保 存</el-button>
</span>
</el-dialog>
......@@ -66,15 +63,13 @@
<el-input v-model="addMockForm.description"></el-input>
</el-form-item>
<el-form-item label="成功响应">
<!-- <el-input v-model="addMockForm.success"></el-input> -->
<vue-json-editor v-model="addMockForm.success" :mode="'code'" :showBtns="false" lang="zh" @json-change="onSuccessJsonChange" @json-save="onSuccessJsonSave" />
</el-form-item>
<el-form-item label="失败响应">
<!-- <el-input v-model="addMockForm.fail"></el-input> -->
<vue-json-editor v-model="addMockForm.fail" :mode="'code'" :showBtns="false" lang="zh" @json-change="onFailJsonChange" @json-save="onFailJsonSave" />
</el-form-item>
<el-form-item label="当前返回">
<el-switch v-model="addMockForm.flag" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0" width="60">
<el-switch v-model="addMockForm.flag" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0">
</el-switch>
</el-form-item>
</el-form>
......@@ -83,18 +78,44 @@
<el-button type="primary" @click="addMock">确 定</el-button>
</span>
</el-dialog>
<!-- 编辑对话框 -->
<el-dialog title="编辑Mock" :visible.sync="editDialogVisible" width="60%">
<el-form label-width="80px" :model="editMockForm">
<el-form-item label="路径">
<el-input v-model="editMockForm.url"></el-input>
</el-form-item>
<el-form-item label="描述">
<el-input v-model="editMockForm.description"></el-input>
</el-form-item>
<el-form-item label="成功响应">
<vue-json-editor v-model="editMockForm.success" :mode="'code'" :showBtns="false" lang="zh" @json-change="onSuccessJsonChange" @json-save="onSuccessJsonSave" />
</el-form-item>
<el-form-item label="失败响应">
<vue-json-editor v-model="editMockForm.fail" :mode="'code'" :showBtns="false" lang="zh" @json-change="onFailJsonChange" @json-save="onFailJsonSave" />
</el-form-item>
<el-form-item label="当前返回">
<el-switch v-model="editMockForm.flag" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0">
</el-switch>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="editMock">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getMockList, addMock } from '@/api/mock'
import { getMockList, addMock, editMock } from '@/api/mock'
import vueJsonEditor from 'vue-json-editor'
export default {
data() {
return {
queryInfo: {
pageNo: '',
pageSize: ''
pageNo: 1,
pageSize: 10
},
mockList: [],
addDialogVisible: false,
......@@ -112,8 +133,17 @@ export default {
fail: '',
flag: ''
},
editMockForm: {
id: '',
url: '',
description: '',
success: '',
fail: '',
flag: ''
},
successJson: '',
failJson: ''
failJson: '',
totalNum: ''
}
},
components: {
......@@ -122,8 +152,9 @@ export default {
methods: {
// 获取mock列表
getMockList() {
getMockList().then((resp) => {
this.mockList = resp.data.data
getMockList(this.queryInfo).then((resp) => {
this.mockList = resp.data.data.list
this.totalNum = resp.data.data.total
})
},
openDetailDialog(row) {
......@@ -133,9 +164,6 @@ export default {
this.activeUrl = row.url
this.activeDescription = row.description
},
openEditDialog(row) {
this.editDialogVisible = true
},
addMock() {
this.addMockForm.success = JSON.stringify(this.addMockForm.success)
this.addMockForm.fail = JSON.stringify(this.addMockForm.fail)
......@@ -149,10 +177,40 @@ export default {
}
})
},
openEditDialog(row) {
this.editDialogVisible = true
this.editMockForm.id = row.id
this.editMockForm.url = row.url
this.editMockForm.description = row.description
this.editMockForm.success = JSON.parse(row.success)
this.editMockForm.fail = JSON.parse(row.fail)
this.editMockForm.flag = String(row.flag)
},
editMock() {
this.editMockForm.success = JSON.stringify(this.editMockForm.success)
this.editMockForm.fail = JSON.stringify(this.editMockForm.fail)
editMock(this.editMockForm).then((resp) => {
if (resp.data.data === true) {
this.editDialogVisible = false
this.getMockList()
return this.$message.success('修改mock成功!')
} else {
return this.$message.error('修改mock失败!')
}
})
},
onSuccessJsonChange() {},
onSuccessJsonSave() {},
onFailJsonChange() {},
onFailJsonSave() {}
onFailJsonSave() {},
handleSizeChange(newSize) {
this.queryInfo.pageSize = newSize
this.getMockList()
},
handleCurrentChange(newPage) {
this.queryInfo.pageNum = newPage
this.getMockList()
}
},
created() {
this.getMockList()
......
<template>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>小工具</el-breadcrumb-item>
<el-breadcrumb-item>kdsp解密</el-breadcrumb-item>
</el-breadcrumb>
<el-card>
<p>请输入待解密的数据:</p>
<vue-json-editor v-model="toBeDecrupt" :mode="'code'" :showBtns="false" lang="zh" @json-change="onJsonChange" @json-save="onJsonSave" />
<el-button type="primary" @click="decryptKdspData">开始解密</el-button>
<p>解密后的数据为:</p>
<vue-json-editor v-model="decryptResult" :mode="'code'" :showBtns="false" lang="zh" @json-change="onJsonChange" @json-save="onJsonSave" />
</el-card>
</div>
</template>
<script>
import { kdspDecrypt } from '@/api/effect'
import vueJsonEditor from 'vue-json-editor'
export default {
data() {
return {
queryInfo: {
data: ''
},
toBeDecrupt: '',
decryptResult: ''
}
},
components: {
vueJsonEditor
},
methods: {
decryptKdspData() {
this.queryInfo.data = JSON.stringify(this.toBeDecrupt)
kdspDecrypt(this.queryInfo).then((resp) => {
console.log(resp)
if (resp.data.code === 200) {
this.decryptResult = JSON.parse(resp.data.data)
}
})
},
onJsonChange() {},
onJsonSave() {}
}
}
</script>
<style lang="less" scoped>
.el-button {
margin-top: 20px;
}
.jsoneditor-outer {
height: 500px;
}
</style>
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