| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template id="exec-log">
- <el-dialog v-model="visible" :visible.sync="visible" width="800" @close="$emit('close')" title="执行日志" :close-on-click-modal="false">
- <div class="black-board">
- <pre v-if="output">{{ output == null ? "无日志数据" : output }}</pre>
- </div>
- </el-dialog>
- </template>
- <script>
- Vue.component('exec-log', {
- template: '#exec-log',
- props: {
- },
- data() {
- return {
- visible: false,
- output: '',
- }
- },
- methods: {
- async open(row) {
- console.log(row.output)
- this.output = row.output;
- this.visible = true;
- return this;
- }
- }
- });
- </script>
- <style scoped>
- .black-board {
- margin: 15px 0;
- max-height: 500px;
- white-space: normal;
- word-break: break-all;
- overflow-x: hidden;
- overflow-y: scroll;
- }
- pre {
- font-size: 12px;
- color: #ccc;
- padding: 20px;
- background: #333;
- font-family: consolas;
- line-height: 1.5;
- overflow: auto;
- border-radius: 4px;
- }
- </style>
|