添加刷新

master
fanluyan 2 months ago
parent 26c6063011
commit a3a57bf1bf

@ -23,6 +23,9 @@
termInfo.protocolName
}}</el-descriptions-item>
</el-descriptions>
<el-button type="primary" icon="el-icon-refresh" @click="refreshClick"
>刷新</el-button
>
</div>
<div class="tableBox">
@ -131,6 +134,8 @@
</el-dialog>
</template>
<script>
import { refresh } from "less";
export default {
props: ["msgListData", "msgCompany", "multipleSelection", "msgtype"],
components: {},
@ -193,7 +198,9 @@ export default {
});
}
},
refreshClick() {
this.$parent.handlemsgList();
},
handleclose() {
this.msgisShow = false;
this.modifiedMsgListData = "";
@ -209,6 +216,11 @@ export default {
.msgHead {
margin-bottom: 8px;
width: 50%;
display: flex;
align-items: center;
}
.el-button {
margin-left: 12px;
}
}
.tableBox {

@ -2316,7 +2316,7 @@ export default {
//url: "http://180.166.218.222:40101/upload/",
termIds: this.idArray,
noSpecData: Number(logSetparam.noSpecData),
mTime: Number(logSetparam.mTime),
mtime: Number(logSetparam.mTime),
};
this.changeIssue(params);
return;
@ -2427,6 +2427,7 @@ export default {
termIdList: this.idArray,
content: this.sendForm.msginfo,
};
console.log(params);
sendMsgApi(params)
.then((res) => {
console.log(res);

@ -151,8 +151,26 @@
>
<b v-else>cmd{{ item.cmdMap }}</b>
<el-popover placement="left" width="480" trigger="click">
<p>{{ item.content }}</p>
<el-popover
placement="left"
trigger="click"
popper-class="lookPopover"
>
<p>createTime:{{ item.createTime }}</p>
<p>publishTime:{{ item.publishTime }}</p>
<p>resTime:{{ item.resTime }}</p>
<p v-if="item.name !== 'list_files'">{{ item.content }}</p>
<ul v-else>
<li
v-for="(item, index) in JSON.parse(item.content)"
:key="index"
>
{{ index + 1 }}.文件名: {{ item.n }} 大小:
{{ formatSize(item.s) }}
修改时间:
{{ formatDate(item.m) }}
</li>
</ul>
<!-- <el-table
v-else
:data="JSON.parse(item.content)"
@ -283,6 +301,21 @@ export default {
},
methods: {
formatDate(timestamp) {
//
const date = new Date(timestamp);
return date.toLocaleString();
},
formatSize(bytes) {
if (bytes === 0) return "0 B";
const units = ["B", "KB", "MB", "GB", "TB"];
const k = 1024; // 1 KB = 1024 B
const i = Math.floor(Math.log(bytes) / Math.log(k)); //
//
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + units[i];
},
getCmdOptionsFun() {
getCmdActionApi()
.then((res) => {
@ -631,4 +664,16 @@ export default {
}
}
}
.lookPopover {
height: 460px;
width: 540px;
overflow-y: auto;
overflow-x: hidden;
ul {
li {
margin-bottom: 4px;
list-style: none;
}
}
}
</style>

Loading…
Cancel
Save