|
@@ -31,7 +31,9 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #timeSpent="{ item }">
|
|
|
- <div style="width: 100%">已耗时</div>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <span>{{ getTimeSpent(item) }}</span>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</byTable>
|
|
|
</div>
|
|
@@ -64,6 +66,7 @@
|
|
|
import { computed, ref } from "vue";
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
+import moment from "moment";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const sourceList = ref({
|
|
@@ -230,10 +233,10 @@ const checkTheTransferSlip = (item) => {
|
|
|
rowData.value.fileList = [];
|
|
|
rowData.value.packageFileList = [];
|
|
|
openAllFile.value = true;
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [item.contractId],fileType: 1 }).then((fileObj) => {
|
|
|
+ proxy.post("/fileInfo/getList", { businessIdList: [item.contractId], fileType: 1 }).then((fileObj) => {
|
|
|
rowData.value.fileList = fileObj[item.contractId] || [];
|
|
|
});
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [item.contractId],fileType: 2 }).then((fileObj) => {
|
|
|
+ proxy.post("/fileInfo/getList", { businessIdList: [item.contractId], fileType: 2 }).then((fileObj) => {
|
|
|
rowData.value.packageFileList = fileObj[item.contractId] || [];
|
|
|
});
|
|
|
};
|
|
@@ -275,6 +278,27 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
+const getTimeSpent = (item) => {
|
|
|
+ let text = "";
|
|
|
+ if (item.sampleTime && item.updateTime) {
|
|
|
+ let data = { days: 0, hours: 0, minutes: 0, seconds: 0 };
|
|
|
+ if (proxy.compareTime(item.sampleTime, item.updateTime)) {
|
|
|
+ data = proxy.timeInterval(item.sampleTime, moment().format("yyyy-MM-DD HH:mm:ss"));
|
|
|
+ } else {
|
|
|
+ data = proxy.timeInterval(item.updateTime, moment().format("yyyy-MM-DD HH:mm:ss"));
|
|
|
+ }
|
|
|
+ if (data.days) {
|
|
|
+ text = data.days + "天" + data.hours + "小时" + data.minutes + "分";
|
|
|
+ } else {
|
|
|
+ if (data.hours) {
|
|
|
+ text = data.hours + "小时" + data.minutes + "分";
|
|
|
+ } else {
|
|
|
+ text = data.minutes + "分";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return text;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|