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