Browse Source

refactor(viteconfig): 更新 API 代理目标地址

- 将 API 代理目标地址从 192.168.110.235:8801 修改为 192.168.110.93:8801
- 移除了模拟数据 mockHouseList
- 调整了搜索表单中选择框的样式,使用内联样式替代类名
nahida 10 tháng trước cách đây
mục cha
commit
64a3b919bf
2 tập tin đã thay đổi với 13 bổ sung36 xóa
  1. 7 30
      src/views/zfgl/zfxxgl.vue
  2. 6 6
      vite.config.ts

+ 7 - 30
src/views/zfgl/zfxxgl.vue

@@ -114,34 +114,6 @@ const detailForm = reactive<AddAHouseInfoDetail & { id?: string }>({
 const selectedRows = ref<ASimplifiedHouseInfo[]>([])
 const currentHouseId = ref('')
 
-// 模拟数据
-const mockHouseList = ref<ASimplifiedHouseInfo[]>([
-  {
-    id: '1',
-    assetType: '公租房',
-    building: 'A栋',
-    floor: '1楼',
-    houseName: 'A栋101',
-    address: '某某小区A栋101室',
-    status: '空闲',
-    rentRange: '1000-1500元/月',
-    createTime: new Date(),
-    updateTime: new Date(),
-  },
-  {
-    id: '2',
-    assetType: '厂房',
-    building: 'B栋',
-    floor: '2楼',
-    houseName: 'B栋201',
-    address: '某某工业园B栋201室',
-    status: '已租',
-    rentRange: '2000-2500元/月',
-    createTime: new Date(),
-    updateTime: new Date(),
-  },
-])
-
 // API方法
 const addRentingHouse = async (info: AddASimplifiedHouseInfo) => {
   const res = await clientPost<AddASimplifiedHouseInfo, BaseResponse>(
@@ -408,7 +380,7 @@ onMounted(() => {
               v-model="searchForm.assetType"
               placeholder="请选择资产类型"
               clearable
-              class="w-40"
+              style="width: 8rem"
             >
               <el-option label="公租房" value="公租房" />
               <el-option label="厂房" value="厂房" />
@@ -434,7 +406,12 @@ onMounted(() => {
           </el-form-item>
 
           <el-form-item label="状态">
-            <el-select v-model="searchForm.status" placeholder="请选择状态" clearable class="w-32">
+            <el-select
+              v-model="searchForm.status"
+              placeholder="请选择状态"
+              clearable
+              style="width: 8rem"
+            >
               <el-option label="空闲" value="空闲" />
               <el-option label="已租" value="已租" />
             </el-select>

+ 6 - 6
vite.config.ts

@@ -25,16 +25,16 @@ export default defineConfig({
   ],
   resolve: {
     alias: {
-      '@': fileURLToPath(new URL('./src', import.meta.url))
+      '@': fileURLToPath(new URL('./src', import.meta.url)),
     },
   },
   server: {
     proxy: {
       '/api': {
-        target: 'http://192.168.110.235:8801',
+        target: 'http://192.168.110.93:8801',
         changeOrigin: true,
-        rewrite: (path) => path.replace(/^\/api/, '')
-      }
-    }
-  }
+        rewrite: (path) => path.replace(/^\/api/, ''),
+      },
+    },
+  },
 })