添加刷新

master
fanluyan 2 months ago
parent 26c6063011
commit a3a57bf1bf

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

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

@ -151,8 +151,26 @@
> >
<b v-else>cmd{{ item.cmdMap }}</b> <b v-else>cmd{{ item.cmdMap }}</b>
<el-popover placement="left" width="480" trigger="click"> <el-popover
<p>{{ item.content }}</p> 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 <!-- <el-table
v-else v-else
:data="JSON.parse(item.content)" :data="JSON.parse(item.content)"
@ -283,6 +301,21 @@ export default {
}, },
methods: { 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() { getCmdOptionsFun() {
getCmdActionApi() getCmdActionApi()
.then((res) => { .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> </style>

Loading…
Cancel
Save