|
@@ -1,62 +1,82 @@
|
|
|
<template>
|
|
|
- <el-dialog title="设备通道详情" v-model="dialogVisible" width="900px" :before-close="closeDialog" :close-on-click-modal="false">
|
|
|
+ <!-- 设备通道详情 -->
|
|
|
+ <el-dialog :title="$t('message.channel.deviceChannelDetail')" v-model="dialogVisible" width="900px" :before-close="closeDialog" :close-on-click-modal="false">
|
|
|
<div class="page-full" style="height: 60vh;">
|
|
|
<el-tabs v-model="activeName">
|
|
|
- <el-tab-pane label="通道信息" name="1">
|
|
|
- <el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="120px" style="width: 90%; margin: 0 auto">
|
|
|
- <el-form-item label="通道名称" prop="title">
|
|
|
- <el-input v-model="temp.title" disabled placeholder="请输入通道名称" />
|
|
|
+ <!-- 通道信息 -->
|
|
|
+ <el-tab-pane :label="$t('message.channel.channelInfo')" name="1">
|
|
|
+ <el-form ref="dataForm" label-position="right" :model="temp" :label-width="currentLocale === 'en' ? '120px' : '80px'" style="width: 100%;">
|
|
|
+ <!-- 通道名称 -->
|
|
|
+ <el-form-item :label="$t('message.channel.channelTitle')" prop="title">
|
|
|
+ <!-- 请输入通道名称 -->
|
|
|
+ <el-input v-model="temp.title" disabled :placeholder="$t('message.channel.channelTitlePlaceholder')" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="注册码" prop="number">
|
|
|
- <el-input v-model="temp.number" disabled placeholder="请输入注册码" />
|
|
|
+ <!-- 注册码 -->
|
|
|
+ <el-form-item :label="$t('message.channel.channelNumber')" prop="number">
|
|
|
+ <!-- 请输入注册码 -->
|
|
|
+ <el-input v-model="temp.number" disabled :placeholder="$t('message.channel.channelNumberPlaceholder')" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="设备地址" prop="slaveId">
|
|
|
- <el-input v-model.number="temp.slaveId" disabled placeholder="请输入设备地址" />
|
|
|
+ <!-- 设备地址 -->
|
|
|
+ <el-form-item :label="$t('message.channel.deviceAddress')" prop="slaveId">
|
|
|
+ <!-- 请输入设备地址 -->
|
|
|
+ <el-input v-model.number="temp.slaveId" disabled :placeholder="$t('message.channel.deviceAddressPlaceholder')" />
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="调度周期(秒)" prop="interval">
|
|
|
<el-input v-model="temp.interval" placeholder="请输入调度周期" />
|
|
|
</el-form-item> -->
|
|
|
- <el-form-item label="" prop="">
|
|
|
- <div align="right">
|
|
|
- <el-button @click="closeDialog"> 取 消 </el-button>
|
|
|
- <!-- <el-button type="primary" @click="updateData()"> 保 存 </el-button> -->
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="任务" name="2">
|
|
|
+ <!-- 任务 -->
|
|
|
+ <el-tab-pane :label="$t('message.channel.task')" name="2">
|
|
|
<div class="filter-container">
|
|
|
- <el-button class="filter-item" type="primary" icon="el-icon-circle-plus-outline" @click="handleCreate"> 添加任务 </el-button>
|
|
|
+ <!-- 新增任务 -->
|
|
|
+ <el-button class="filter-item" type="primary" @click="handleCreate">
|
|
|
+ <el-icon>
|
|
|
+ <ele-FolderAdd />
|
|
|
+ </el-icon>
|
|
|
+ {{ $t('message.channel.addTask') }}
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
-
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="taskList" border fit highlight-current-row style="width: 100%">
|
|
|
- <el-table-column label="标题" prop="Job.title" align="center"></el-table-column>
|
|
|
- <el-table-column label="调度周期" prop="Job.interval" align="center"></el-table-column>
|
|
|
- <el-table-column label="转发格式" prop="encoding" align="center">
|
|
|
+ <!-- 标题 -->
|
|
|
+ <el-table-column :label="$t('message.channel.title')" prop="Job.title" align="center"></el-table-column>
|
|
|
+ <!-- 调度周期 -->
|
|
|
+ <el-table-column min-width="130" show-overflow-tooltip :label="$t('message.channel.interval')" prop="Job.interval" align="center"></el-table-column>
|
|
|
+ <!-- 转发格式 -->
|
|
|
+ <el-table-column min-width="130" show-overflow-tooltip :label="$t('message.channel.forwardFormat')" prop="encoding" align="center">
|
|
|
<template #default="{ row }">
|
|
|
{{ getCodingLabel(row) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="mqtt主题" prop="Job.publishTopic" align="center"></el-table-column>
|
|
|
- <el-table-column label="模板" prop="Template.title" align="center"></el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="200">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <el-button type="primary" size="small" @click="handleUpdate(row)"> 详情 </el-button>
|
|
|
- <el-button v-if="row.status != 'deleted'" size="small" type="danger" @click="handleDelete(row)"> 删除 </el-button>
|
|
|
+ <!-- mqtt主题 -->
|
|
|
+ <el-table-column min-width="130" show-overflow-tooltip :label="$t('message.channel.topic')" prop="Job.publishTopic" align="center"></el-table-column>
|
|
|
+ <!-- 模板 -->
|
|
|
+ <el-table-column min-width="130" show-overflow-tooltip :label="$t('message.channel.template')" prop="Template.title" align="center"></el-table-column>
|
|
|
+ <el-table-column :label="$t('message.tableI18nColumn.operation')" align="center" width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <!-- 详情 -->
|
|
|
+ <el-button type="primary" size="small" @click="handleUpdate(row)"> {{ $t('message.tableI18nAction.detail') }} </el-button>
|
|
|
+ <!-- 删除 -->
|
|
|
+ <el-button v-if="row.status != 'deleted'" size="small" type="danger" @click="handleDelete(row)"> {{ $t('message.tableI18nAction.delete') }} </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination v-if="total > 0" :total="total" v-model:page="listQuery.page" v-model:limit="listQuery.size" @pagination="getList()" />
|
|
|
- <TaskDialog ref="taskDialog" :formatOptions="formatOptions" @finish="getList()" />
|
|
|
+ <TaskDialog ref="taskDialogRef" :formatOptions="formatOptions" @finish="getList()" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="通道码流" name="3">
|
|
|
+ <!-- 通道码流 -->
|
|
|
+ <el-tab-pane :label="$t('message.channel.channelTitle')" name="3">
|
|
|
<div>
|
|
|
- <el-button :type="evsrc ? 'info' : 'primary'" @click="openEv()">开始</el-button>
|
|
|
- <el-button :type="evsrc ? 'primary' : 'info'" :disabled="!evsrc" @click="closeEv()">停止</el-button>
|
|
|
- <el-button type="defualt" @click="clearLog()">清空</el-button>
|
|
|
- <el-button type="info" style="margin-left: 150px" @click="downloadLog()">下载报文</el-button>
|
|
|
- <ul id="logContainer" ref="logContainer"></ul>
|
|
|
+ <!-- 开始 -->
|
|
|
+ <el-button :type="evsrc ? 'info' : 'primary'" @click="openEv()">{{ $t('message.channel.start') }}</el-button>
|
|
|
+ <!-- 停止 -->
|
|
|
+ <el-button :type="evsrc ? 'primary' : 'info'" :disabled="!evsrc" @click="closeEv()">{{ $t('message.channel.stop') }}</el-button>
|
|
|
+ <!-- 清空 -->
|
|
|
+ <el-button type="defualt" @click="clearLog()">{{ $t('message.channel.clear') }}</el-button>
|
|
|
+ <!-- 下载报文 -->
|
|
|
+ <el-button type="info" style="margin-left: 150px" @click="downloadLog()">{{ $t('message.channel.download') }}</el-button>
|
|
|
+ <ul id="logContainer" ref="logContainerRef"></ul>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
@@ -64,183 +84,199 @@
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
-<script lang="ts">
|
|
|
+<script lang="ts" setup>
|
|
|
+import { ref, watch, computed } from 'vue';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import api from '/@/api/device/modbus';
|
|
|
import { getOtherServersOrigin } from '/@/utils/origin';
|
|
|
import TaskDialog from './taskDialog.vue';
|
|
|
+import { useI18n } from 'vue-i18n';
|
|
|
+// 国际化
|
|
|
+const { locale, t } = useI18n();
|
|
|
|
|
|
-export default {
|
|
|
- components: { TaskDialog },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- temp: {
|
|
|
- title: '',
|
|
|
- number: '',
|
|
|
- templateNumber: '',
|
|
|
- slaveId: '',
|
|
|
- interval: '',
|
|
|
- },
|
|
|
- rules: {
|
|
|
- title: [{ required: true, message: '请输入通道名称', trigger: 'blur' }],
|
|
|
- number: [{ required: true, message: '请输入注册码', trigger: 'blur' }],
|
|
|
- slaveId: [{ required: true, message: '请输入设备地址', trigger: 'blur' }],
|
|
|
- templateNumber: [{ required: true, message: '请输入设备模板', trigger: 'change' }],
|
|
|
- },
|
|
|
- dialogVisible: false,
|
|
|
- activeName: '1',
|
|
|
- taskList: [],
|
|
|
- listLoading: false,
|
|
|
- total: 0,
|
|
|
- tableKey: 0,
|
|
|
- listQuery: {
|
|
|
- page: 1,
|
|
|
- size: 10,
|
|
|
- },
|
|
|
- evsrc: null as any,
|
|
|
- count: 0,
|
|
|
- templateOptions: [],
|
|
|
- formatOptions: [],
|
|
|
- };
|
|
|
- },
|
|
|
- watch: {
|
|
|
- activeName: 'handleTabClick',
|
|
|
- },
|
|
|
+const currentLocale = computed(() => locale.value);
|
|
|
+const taskDialogRef = ref();
|
|
|
+const logContainerRef = ref();
|
|
|
+const dialogVisible = ref(false);
|
|
|
+const activeName = ref('1');
|
|
|
+const taskList = ref([]);
|
|
|
+const listLoading = ref(false);
|
|
|
+const total = ref(0);
|
|
|
+const tableKey = ref(0);
|
|
|
+const listQuery = ref({
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+});
|
|
|
+const evsrc = ref<any>(null);
|
|
|
+const count = ref(0);
|
|
|
+const formatOptions = ref([]);
|
|
|
+const temp = ref({
|
|
|
+ title: '',
|
|
|
+ number: '',
|
|
|
+ templateNumber: '',
|
|
|
+ slaveId: '',
|
|
|
+ interval: '',
|
|
|
+})
|
|
|
+
|
|
|
+const open = (row: any) => {
|
|
|
+ temp.value = { ...row };
|
|
|
+ getDict();
|
|
|
+ dialogVisible.value = true;
|
|
|
+}
|
|
|
+const downloadLog = () => {
|
|
|
+ window.open(getOtherServersOrigin(import.meta.env.VITE_MODBUS_API) + '/debug/export_message?number=' + temp.value.number);
|
|
|
+}
|
|
|
+const closeDialog = () => {
|
|
|
+ dialogVisible.value = false;
|
|
|
+ activeName.value = '1';
|
|
|
+ closeEv();
|
|
|
+};
|
|
|
+const handleFilter = () => {
|
|
|
+ listQuery.value.page = 1;
|
|
|
+ getList();
|
|
|
+};
|
|
|
+// 获取字典数据
|
|
|
+const getDict = () => {
|
|
|
+ api.getDict({ code: 'forwardFormat' }).then((data: any) => {
|
|
|
+ formatOptions.value = data.list || [];
|
|
|
+ });
|
|
|
+};
|
|
|
|
|
|
- methods: {
|
|
|
- open(row: any) {
|
|
|
- this.temp = { ...row };
|
|
|
- this.getDict();
|
|
|
- this.dialogVisible = true;
|
|
|
- },
|
|
|
- downloadLog() {
|
|
|
- window.open(getOtherServersOrigin(import.meta.env.VITE_MODBUS_API) + '/debug/export_message?number=' + this.temp.number);
|
|
|
- },
|
|
|
- closeDialog() {
|
|
|
- this.dialogVisible = false;
|
|
|
- this.activeName = '1';
|
|
|
- (this.$refs['dataForm'] as any).resetFields();
|
|
|
- this.closeEv();
|
|
|
- },
|
|
|
- updateData() {
|
|
|
- (this.$refs['dataForm'] as any).validate((valid: boolean) => {
|
|
|
- if (valid) {
|
|
|
- const tempData = Object.assign({}, this.temp);
|
|
|
- api.channel.editDevice(tempData).then(() => {
|
|
|
- this.$emit('getList');
|
|
|
- this.closeDialog();
|
|
|
- ElMessage.success('操作成功!');
|
|
|
- });
|
|
|
+// 获取任务list
|
|
|
+const getList = () => {
|
|
|
+ listLoading.value = true;
|
|
|
+ api.task.getList(listQuery.value)
|
|
|
+ .then((res: any) => {
|
|
|
+ taskList.value = res.list || [];
|
|
|
+ total.value = res.Total;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ listLoading.value = false;
|
|
|
+ });
|
|
|
+}
|
|
|
+const handleDelete = (row: any) => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ // '是否确认删除任务名称为"' + row.Job.title + '"的数据项?'
|
|
|
+ t('message.channel.deleteTaskMessage', {name: row.Job.title}),
|
|
|
+ // 提示
|
|
|
+ t('message.tableI18nConfirm.deleteTitle'),
|
|
|
+ {
|
|
|
+ // 确认
|
|
|
+ confirmButtonText: t('message.tableI18nConfirm.confirmText'),
|
|
|
+ // 取消
|
|
|
+ cancelButtonText: t('message.tableI18nConfirm.cancelText'),
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(function () {
|
|
|
+ return api.task.deleteDeviceJob({ number: row.Job.number });
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ handleFilter();
|
|
|
+ // 删除成功!
|
|
|
+ ElMessage.success(t('message.tableI18nConfirm.deleteSuccess'));
|
|
|
+ })
|
|
|
+ .catch(function () { });
|
|
|
+};
|
|
|
+const handleCreate = () => {
|
|
|
+ taskDialogRef.value.openDialog({
|
|
|
+ dialogStatusText: 'create',
|
|
|
+ deviceNumber: temp.value.number,
|
|
|
+ });
|
|
|
+};
|
|
|
+const handleUpdate = (row: any) => {
|
|
|
+ taskDialogRef.value.openDialog({
|
|
|
+ dialogStatusText: 'update',
|
|
|
+ row,
|
|
|
+ deviceNumber: temp.value.number,
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+// 码流
|
|
|
+const initEv = () => {
|
|
|
+ if (evsrc.value) return;
|
|
|
+ const url = `${getOtherServersOrigin(import.meta.env.VITE_MODBUS_API)}/debug?number=${temp.value.number}`;
|
|
|
+
|
|
|
+ try {
|
|
|
+ evsrc.value = new EventSource(url);
|
|
|
+
|
|
|
+ evsrc.value.onopen = (event: any) => {
|
|
|
+ // 连接成功
|
|
|
+ logContainerRef.value?.insertAdjacentHTML('beforeEnd', `<li style="color: #67C23A;">${t('message.channel.connectSuccess')}...</li>`);
|
|
|
+ };
|
|
|
+
|
|
|
+ evsrc.value.onmessage = (ev: any) => {
|
|
|
+ try {
|
|
|
+ let obj = JSON.parse(ev.data);
|
|
|
+ if (obj.deviceId === temp.value.number) {
|
|
|
+ let color = obj.type === 'request' ? '#F56C6C' : '#409EFF';
|
|
|
+ // 请求/应答
|
|
|
+ let content = `${obj.type === 'request' ? `t('message.channel.request'):` : `t('message.channel.response'):`} ${obj.msg}`;
|
|
|
+ logContainerRef.value?.insertAdjacentHTML('afterbegin', `<li style="color: ${color}">${content}</li>`);
|
|
|
+ }
|
|
|
+ } catch (_e) {
|
|
|
+ console.log('解析消息错误: ', _e);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ evsrc.value.onerror = (event: any) => {
|
|
|
+ // 连接错误: 服务器可能不支持实时数据流
|
|
|
+ logContainerRef.value?.insertAdjacentHTML('beforeEnd', `<li style="color: #F56C6C;">${t('message.channel.connectError1')}</li>`);
|
|
|
+ // 自动关闭连接
|
|
|
+ if (evsrc.value) {
|
|
|
+ evsrc.value.close();
|
|
|
+ evsrc.value = null;
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- // tab 切换
|
|
|
- handleTabClick() {
|
|
|
- this.closeEv(false);
|
|
|
- if (this.activeName === '2') {
|
|
|
+ };
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+ console.error('创建 EventSource 失败:', error);
|
|
|
+ // 无法建立实时连接,请检查服务器配置
|
|
|
+ ElMessage.error(t('message.channel.connectError2'));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const openEv = () => {
|
|
|
+ // 开始
|
|
|
+ (logContainerRef.value as any).insertAdjacentHTML('beforeEnd', `<li style="color: #000;">${t('message.channel.start')}...</li>`);
|
|
|
+ initEv();
|
|
|
+}
|
|
|
+const closeEv = (log = true) => {
|
|
|
+ evsrc.value && evsrc.value.close();
|
|
|
+ evsrc.value = null;
|
|
|
+ count.value = 0;
|
|
|
+ // this.clearLog()
|
|
|
+ if (log) {
|
|
|
+ // 停止
|
|
|
+ (logContainerRef.value as any).insertAdjacentHTML('beforeEnd', `<li style="color: #000;">${t('message.channel.stop')}...</li>`);
|
|
|
+ }
|
|
|
+}
|
|
|
+ // 清空码流
|
|
|
+const clearLog = () => {
|
|
|
+ (logContainerRef.value as any).innerHTML = '';
|
|
|
+}
|
|
|
+const getCodingLabel = (row: any) => {
|
|
|
+ const item = formatOptions.value.find((item: any) => item.value === row.Job.encoding) as any;
|
|
|
+ return item.title;
|
|
|
+}
|
|
|
+
|
|
|
+watch(
|
|
|
+ () => activeName.value,
|
|
|
+ (val) => {
|
|
|
+ if (val) {
|
|
|
+ closeEv(false);
|
|
|
+ if (activeName.value === '2') {
|
|
|
// 任务
|
|
|
- this.getList();
|
|
|
- } else if (this.activeName === '3') {
|
|
|
+ getList();
|
|
|
+ } else if (activeName.value === '3') {
|
|
|
// 码流
|
|
|
// this.initEv()
|
|
|
}
|
|
|
- },
|
|
|
- handleFilter() {
|
|
|
- this.listQuery.page = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- // 获取字典数据
|
|
|
- getDict() {
|
|
|
- api.getDict({ code: 'forwardFormat' }).then((data: any) => {
|
|
|
- this.formatOptions = data.list || [];
|
|
|
- });
|
|
|
- },
|
|
|
- // 获取任务list
|
|
|
- getList() {
|
|
|
- this.listLoading = true;
|
|
|
- api.task.getList(this.listQuery)
|
|
|
- .then((res: any) => {
|
|
|
- this.taskList = res.list || [];
|
|
|
- this.total = res.Total;
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- this.listLoading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- handleDelete(row: any) {
|
|
|
- ElMessageBox.confirm('是否确认删除任务名称为"' + row.Job.title + '"的数据项?', '警告', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- .then(function () {
|
|
|
- return api.task.deleteDeviceJob({ number: row.Job.number });
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.handleFilter();
|
|
|
- ElMessage.success('删除成功!');
|
|
|
- })
|
|
|
- .catch(function () { });
|
|
|
- },
|
|
|
- handleCreate() {
|
|
|
- (this.$refs.taskDialog as any).openDialog({
|
|
|
- dialogStatus: 'create',
|
|
|
- deviceNumber: this.temp.number,
|
|
|
- });
|
|
|
- },
|
|
|
- handleUpdate(row: any) {
|
|
|
- (this.$refs.taskDialog as any).openDialog({
|
|
|
- dialogStatus: 'update',
|
|
|
- row,
|
|
|
- deviceNumber: this.temp.number,
|
|
|
- });
|
|
|
- },
|
|
|
- // 码流
|
|
|
- initEv() {
|
|
|
- if (this.evsrc) return;
|
|
|
- this.evsrc = new EventSource(`${getOtherServersOrigin(import.meta.env.VITE_MODBUS_API)}/debug?number=${this.temp.number}`);
|
|
|
- let that = this;
|
|
|
- this.evsrc.onmessage = function (ev: any) {
|
|
|
- try {
|
|
|
- let obj = JSON.parse(ev.data);
|
|
|
- if (obj.deviceId === that.temp.number) {
|
|
|
- let color = obj.type === 'request' ? '#F56C6C' : '#409EFF';
|
|
|
- let content = `${obj.type === 'request' ? '请求:' : '应答:'} ${obj.msg}`;
|
|
|
- this.$refs.logContainer.insertAdjacentHTML('afterbegin', `<li style="color: ${color}">${content}</li>`);
|
|
|
- }
|
|
|
- } catch (_e) {
|
|
|
- // @ts-ignore
|
|
|
- // console.log('error', e);
|
|
|
- }
|
|
|
- };
|
|
|
- // this.evsrc.onerror = function (_ev: any) {
|
|
|
- // @ts-ignore
|
|
|
- // console.log('readyState = ' + ev.currentTarget.readyState);
|
|
|
- // };
|
|
|
- },
|
|
|
- openEv() {
|
|
|
- (this.$refs.logContainer as any).insertAdjacentHTML('beforeEnd', `<li style="color: #000;">开始...</li>`);
|
|
|
- this.initEv();
|
|
|
- },
|
|
|
- closeEv(log = true) {
|
|
|
- this.evsrc && this.evsrc.close();
|
|
|
- this.evsrc = null;
|
|
|
- this.count = 0;
|
|
|
- // this.clearLog()
|
|
|
- if (log) {
|
|
|
- (this.$refs.logContainer as any).insertAdjacentHTML('beforeEnd', `<li style="color: #000;">停止...</li>`);
|
|
|
- }
|
|
|
- },
|
|
|
- // 清空码流
|
|
|
- clearLog() {
|
|
|
- (this.$refs.logContainer as any).innerHTML = '';
|
|
|
- },
|
|
|
- getCodingLabel(row: any) {
|
|
|
- const item = this.formatOptions.find((item: any) => item.value === row.Job.encoding) as any;
|
|
|
- return item.title;
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ }
|
|
|
+ }
|
|
|
+)
|
|
|
+
|
|
|
+defineExpose({ open });
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -265,4 +301,13 @@ export default {
|
|
|
background-color: #f2f2f2;
|
|
|
line-height: 22px;
|
|
|
}
|
|
|
+
|
|
|
+[data-theme='dark'] {
|
|
|
+
|
|
|
+ #logContainer {
|
|
|
+ background-color: transparent;
|
|
|
+ color: #fff;
|
|
|
+ border-color: #333333;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|