Aris流程数据迁移日志记录处理
This commit is contained in:
parent
ff48acac1b
commit
69a05b8ee4
@ -40,14 +40,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="提示"
|
title="日志"
|
||||||
v-model="dlg.visible"
|
v-model="dlg.visible"
|
||||||
width="800px"
|
width="800px"
|
||||||
height="500px"
|
height="520px"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
@close="dlgClose">
|
@close="dlgClose">
|
||||||
<div style="width: 100%;height: 500px;">
|
<div style="width: 100%;height: 500px;">
|
||||||
<log-codemirror ref="dataCodemirrorRef" :width="logCodemirror.width" :height="logCodemirror.height" :log-str="logCodemirror.logStr" ></log-codemirror>
|
<log-codemirror ref="dataCodemirrorRef" :width="logCodemirror.width" :height="logCodemirror.height" :log-str="logCodemirror.logStr" ></log-codemirror>
|
||||||
|
<div style="width: 100%;height: 10px;">
|
||||||
|
<el-progress :percentage="result.totalCount == 0 ? 0 : (Math.floor(result.importingCount / result.totalCount * 100))" color="#287ff4" />
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%;height: 10px;text-align: left;">
|
||||||
|
<span>正在导入第[{{result.importingCount}}]条,总共[{{result.totalCount}}]条</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
@ -145,7 +152,7 @@ export default defineComponent({
|
|||||||
data: {
|
data: {
|
||||||
cmd: 'com.actionsoft.apps.coe.pal.datamigration_data_migrate',
|
cmd: 'com.actionsoft.apps.coe.pal.datamigration_data_migrate',
|
||||||
sid: settingParam.sessionId,
|
sid: settingParam.sessionId,
|
||||||
wsId: settingParam.wsId ? settingParam.wsId : 'd2f7c8d3-d5c6-4867-9dc8-bbaef5c11ce7',
|
wsId: settingParam.wsId ? settingParam.wsId : '1b19ab87-5727-4621-bc3f-117183b06e59',
|
||||||
groupValue: info.groupValue,
|
groupValue: info.groupValue,
|
||||||
fileValue: info.fileValue,
|
fileValue: info.fileValue,
|
||||||
fileName: info.fileName
|
fileName: info.fileName
|
||||||
@ -196,6 +203,9 @@ export default defineComponent({
|
|||||||
result.resultStatus = ro.data.resultStatus;
|
result.resultStatus = ro.data.resultStatus;
|
||||||
if (result.resultStatus != 0) {
|
if (result.resultStatus != 0) {
|
||||||
removeInterval();
|
removeInterval();
|
||||||
|
result.importingCount = result.totalCount;// 出错或成功,直接100%
|
||||||
|
} else {
|
||||||
|
result.importingCount = ro.data.importingCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,29 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<codemirror
|
<!-- <codemirror-->
|
||||||
ref="codeMirror"
|
<!-- ref="codeMirror"-->
|
||||||
v-model="logStr"
|
<!-- v-model="logStr"-->
|
||||||
placeholder="正在导入,请稍等"
|
<!-- placeholder="正在导入,请稍等"-->
|
||||||
:style="{ height: height, width: width }"
|
<!-- :style="{ height: height, width: width }"-->
|
||||||
:autofocus="true"
|
<!-- :autofocus="true"-->
|
||||||
:indent-with-tab="true"
|
<!-- :indent-with-tab="true"-->
|
||||||
:tab-size="2"
|
<!-- :tab-size="2"-->
|
||||||
:extensions="extensions"
|
<!-- :extensions="extensions"-->
|
||||||
@ready="log('ready', $event)"
|
<!-- @ready="log('ready', $event)"-->
|
||||||
@change="log('change', $event)"
|
<!-- @change="log('change', $event)"-->
|
||||||
@focus="log('focus', $event)"
|
<!-- @focus="log('focus', $event)"-->
|
||||||
@blur="log('blur', $event)"
|
<!-- @blur="log('blur', $event)"-->
|
||||||
/>
|
<!-- />-->
|
||||||
|
<!--先用div实现,不用codemirror-->
|
||||||
|
<div
|
||||||
|
id="codeMirrorDiv"
|
||||||
|
:style="{ height: height, width: width, overflow: 'auto', 'background-color':'#2c2c2c', color: '#287ff4'}"
|
||||||
|
v-html="logStr"
|
||||||
|
>
|
||||||
|
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {defineComponent, getCurrentInstance, reactive, ref} from 'vue';
|
import {defineComponent, getCurrentInstance, reactive, ref} from 'vue';
|
||||||
import { Codemirror } from 'vue-codemirror'
|
// import { Codemirror } from 'vue-codemirror'
|
||||||
import { javascript } from '@codemirror/lang-javascript'
|
// import { javascript } from '@codemirror/lang-javascript'
|
||||||
import { oneDark } from '@codemirror/theme-one-dark'
|
// import { oneDark } from '@codemirror/theme-one-dark'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
// components: {
|
||||||
Codemirror
|
// Codemirror
|
||||||
},
|
// },
|
||||||
name: "logcodemirror",
|
name: "logcodemirror",
|
||||||
props: {
|
props: {
|
||||||
width: {
|
width: {
|
||||||
@ -40,18 +48,21 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const codeMirror = ref()
|
// const codeMirror = ref()
|
||||||
const code = ref()
|
// const code = ref()
|
||||||
const extensions = [javascript(), oneDark]
|
// const extensions = [javascript(), oneDark]
|
||||||
const moveTextToEnd = () => {
|
const moveTextToEnd = () => {
|
||||||
debugger;
|
|
||||||
codeMirror.value.scrollIntoView(codeMirror.value.lineCount() - 1);
|
// debugger;
|
||||||
|
// codeMirror.value.scrollIntoView(codeMirror.value.lineCount() - 1);
|
||||||
// that.$refs.mycode.codemirror.scrollIntoView(that.$refs.mycode.codemirror.lineCount() - 1);
|
// that.$refs.mycode.codemirror.scrollIntoView(that.$refs.mycode.codemirror.lineCount() - 1);
|
||||||
|
var div = document.getElementById('codeMirrorDiv');
|
||||||
|
div.scrollTop = div.scrollHeight;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
codeMirror,
|
// codeMirror,
|
||||||
code,
|
// code,
|
||||||
extensions,
|
// extensions,
|
||||||
log: console.log,
|
log: console.log,
|
||||||
moveTextToEnd
|
moveTextToEnd
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user