|
@@ -3,7 +3,9 @@
|
|
|
<div class="left">
|
|
<div class="left">
|
|
|
<!-- <img class="first" src="../assets/three.png" alt="" />
|
|
<!-- <img class="first" src="../assets/three.png" alt="" />
|
|
|
<div class="shu"></div> -->
|
|
<div class="shu"></div> -->
|
|
|
|
|
+ <div class="cargo-owner" v-if="cargoOwnerName">{{ cargoOwnerName }}</div>
|
|
|
<img
|
|
<img
|
|
|
|
|
+ v-else
|
|
|
class="logo pointer"
|
|
class="logo pointer"
|
|
|
src="../assets/white-logo.png"
|
|
src="../assets/white-logo.png"
|
|
|
alt=""
|
|
alt=""
|
|
@@ -60,7 +62,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-<script>
|
|
|
|
|
|
|
+<script setup>
|
|
|
import store from "../store";
|
|
import store from "../store";
|
|
|
import router from "../router";
|
|
import router from "../router";
|
|
|
import { onMounted, ref } from "vue";
|
|
import { onMounted, ref } from "vue";
|
|
@@ -69,47 +71,43 @@ const db = tcb.database();
|
|
|
const v = db.collection("huihenduo_versions");
|
|
const v = db.collection("huihenduo_versions");
|
|
|
const __ = db.command;
|
|
const __ = db.command;
|
|
|
|
|
|
|
|
-export default {
|
|
|
|
|
- setup() {
|
|
|
|
|
- let contactName = localStorage.contactName;
|
|
|
|
|
- function quit() {
|
|
|
|
|
- localStorage.clear();
|
|
|
|
|
- store.commit("changeLogin", false);
|
|
|
|
|
- router.push({ path: "/login" });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function goToIndex() {
|
|
|
|
|
- router.replace({ path: "/index" });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- let timelineData = ref([]);
|
|
|
|
|
- onMounted(() => {
|
|
|
|
|
- cloudLogin();
|
|
|
|
|
- });
|
|
|
|
|
- async function getAbledVersions() {
|
|
|
|
|
- let res = await v
|
|
|
|
|
- .aggregate()
|
|
|
|
|
- .match({ deleted: __.neq(true) })
|
|
|
|
|
- .sort({
|
|
|
|
|
- createTime: -1,
|
|
|
|
|
- })
|
|
|
|
|
- .limit(10)
|
|
|
|
|
- .end();
|
|
|
|
|
- timelineData.value = res.data;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- async function cloudLogin() {
|
|
|
|
|
- await AnonymousLogin();
|
|
|
|
|
- getAbledVersions();
|
|
|
|
|
- }
|
|
|
|
|
- return {
|
|
|
|
|
- quit,
|
|
|
|
|
- contactName,
|
|
|
|
|
- timelineData,
|
|
|
|
|
- goToIndex,
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
-};
|
|
|
|
|
|
|
+let logoUrl = ref("");
|
|
|
|
|
+let cargoOwnerName = ref("");
|
|
|
|
|
+let contactName = localStorage.contactName;
|
|
|
|
|
+function quit() {
|
|
|
|
|
+ localStorage.clear();
|
|
|
|
|
+ store.commit("changeLogin", false);
|
|
|
|
|
+ router.push({ path: "/login" });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function goToIndex() {
|
|
|
|
|
+ router.replace({ path: "/index" });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+let timelineData = ref([]);
|
|
|
|
|
+
|
|
|
|
|
+async function getAbledVersions() {
|
|
|
|
|
+ let res = await v
|
|
|
|
|
+ .aggregate()
|
|
|
|
|
+ .match({ deleted: __.neq(true) })
|
|
|
|
|
+ .sort({
|
|
|
|
|
+ createTime: -1,
|
|
|
|
|
+ })
|
|
|
|
|
+ .limit(10)
|
|
|
|
|
+ .end();
|
|
|
|
|
+ timelineData.value = res.data;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+async function cloudLogin() {
|
|
|
|
|
+ await AnonymousLogin();
|
|
|
|
|
+ getAbledVersions();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ cloudLogin();
|
|
|
|
|
+ // logoUrl.value = localStorage.logoUrl || "../assets/white-logo.png";
|
|
|
|
|
+ cargoOwnerName.value = localStorage.userName;
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.header {
|
|
.header {
|
|
@@ -144,6 +142,8 @@ export default {
|
|
|
width: 120px;
|
|
width: 120px;
|
|
|
height: 40px;
|
|
height: 40px;
|
|
|
margin-left: 20px;
|
|
margin-left: 20px;
|
|
|
|
|
+ object-fit: contain;
|
|
|
|
|
+ /* background: #fff; */
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
.title {
|
|
@@ -181,4 +181,10 @@ export default {
|
|
|
.quit {
|
|
.quit {
|
|
|
margin-left: 26px;
|
|
margin-left: 26px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.cargo-owner {
|
|
|
|
|
+ margin: 20px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ font-size: 28px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|