Commit 67a511bf1db800195a516a98103fdf0c1a54c27e

Authored by xp.Huang
2 parents d4ff1829 8e0ed8cc

Merge branch 'dev-ft' into 'main'

fix:修改Teambition上的问题、修改平台定制

See merge request huang/yun-teng-iot-front!304
... ... @@ -20,7 +20,7 @@
20 20 </template>
21 21
22 22 <script setup lang="ts">
23   - import { ref, nextTick } from 'vue';
  23 + import { ref, nextTick, onMounted } from 'vue';
24 24 import { BasicTable, useTable, BasicColumn } from '/@/components/Table';
25 25 import { Switch } from 'ant-design-vue';
26 26 import { h } from 'vue';
... ... @@ -76,6 +76,13 @@
76 76 const remotePort = ref(0);
77 77 const address = ref('');
78 78 const enableRemoteDisabled = ref(false);
  79 + onMounted(() => {
  80 + tableData.value.push({
  81 + enableRemote: '',
  82 + proxyName: props.deviceDetail.sn,
  83 + status: '',
  84 + });
  85 + });
79 86 const getTableData = async () => {
80 87 const res = await frpGetInfoApi(props.deviceDetail.sn);
81 88 enableRemote.value = res.enableRemote;
... ...
... ... @@ -176,12 +176,12 @@ const scheduleData = ref({
176 176 });
177 177 const handleBlur = (eS, eE) => {
178 178 if (eS > eE) {
179   - return createMessage.error('开始时间不能大于结束时间')
  179 + return createMessage.warn('开始时间不能大于结束时间')
180 180 }
181 181 }
182 182 const handleTimeBlur = (eS, eE) => {
183 183 if (eS > eE) {
184   - return createMessage.error('开始时间不能大于结束时间')
  184 + return createMessage.warn('开始时间不能大于结束时间')
185 185 }
186 186 }
187 187 const handleOk = () => {
... ...
... ... @@ -20,7 +20,11 @@
20 20 <div class="hidden min-h-full pl-4 mr-4 xl:flex xl:flex-col xl:w-6/12">
21 21 <!-- <AppLogo class="-enter-x" /> -->
22 22 <div style="display: flex; margin-top: 10px">
23   - <img v-if="getLogo" :src="getLogo" style="width: 48px; height: 48px" />
  23 + <img
  24 + v-if="defaultLogo || getLogo"
  25 + :src="defaultLogo || getLogo"
  26 + style="width: 48px; height: 48px"
  27 + />
24 28 <img style="width: 48px; height: 48px" v-else src="/src/assets/images/logo.png" />
25 29 <div
26 30 class="ml-2 truncate md:opacity-100"
... ... @@ -32,7 +36,7 @@
32 36 font-weight: 700;
33 37 "
34 38 >
35   - {{ getTitle }}
  39 + {{ defaultTitle || getTitle }}
36 40 </div>
37 41 </div>
38 42 <div v-if="ifCustom" class="my-auto">
... ... @@ -65,7 +69,7 @@
65 69 </div>
66 70 </template>
67 71 <script lang="ts" setup>
68   - import { computed, ref } from 'vue';
  72 + import { computed, ref, onMounted } from 'vue';
69 73 // import { AppLogo } from '/@/components/Application';
70 74 import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
71 75 import LoginForm from './LoginForm.vue';
... ... @@ -77,16 +81,31 @@
77 81 import { useDesign } from '/@/hooks/web/useDesign';
78 82 import { useLocaleStore } from '/@/store/modules/locale';
79 83 import { useUserStore } from '/@/store/modules/user';
  84 + import { getPlatForm } from '/@/api/oem/index';
80 85
81 86 defineProps({
82 87 sessionTimeout: {
83 88 type: Boolean,
84 89 },
85 90 });
  91 + const defaultTitle = ref('');
  92 + const defaultLogo = ref('');
  93 + const logoUrl = ref('');
  94 + onMounted(async () => {
  95 + const res = await getPlatForm();
  96 + logoUrl.value = res?.background;
  97 + defaultTitle.value = res?.name;
  98 + defaultLogo.value = res?.logo;
  99 + if (logoUrl.value !== undefined) {
  100 + ifCustom.value = false;
  101 + } else {
  102 + const defaultLogo = 'src/assets/svg/login-bg.svg';
  103 + logoUrl.value = 'url(' + defaultLogo + ')';
  104 + }
  105 + });
86 106
87 107 const userStore = useUserStore();
88 108
89   - const logoUrl = ref('');
90 109 const ifCustom = ref(true);
91 110 const getLogo = computed(() => {
92 111 return userStore.platInfo?.logo;
... ...