Commit 4b392ae959330a8c53dd622e5faaf2e4889e0322

Authored by 杨泽宇
1 parent 098a9802

debug

src/views/property/edit.vue
@@ -158,9 +158,8 @@ const submitForm = (formEl: InstanceType<typeof ElForm> | undefined) => { @@ -158,9 +158,8 @@ const submitForm = (formEl: InstanceType<typeof ElForm> | undefined) => {
158 }; 158 };
159 /** 159 /**
160 * 小区列表 160 * 小区列表
161 - * @param {number | null} pageSize 一次请求多少条数据  
162 */ 161 */
163 -const getCommunityList = async (pageSize: number = 20) => { 162 +const getCommunityList = async () => {
164 try { 163 try {
165 const res = await allNeighborhood(); 164 const res = await allNeighborhood();
166 form.communities = res?.data?.data; 165 form.communities = res?.data?.data;
src/views/repair/index.vue
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 import { reactive, ref, onMounted, getCurrentInstance } from "vue"; 2 import { reactive, ref, onMounted, getCurrentInstance } from "vue";
3 import { repairList } from "@/api/notify/repair"; 3 import { repairList } from "@/api/notify/repair";
4 import { getTableList } from "@/api/notify/maintain.ts"; 4 import { getTableList } from "@/api/notify/maintain.ts";
  5 +import { allNeighborhood } from "@/api/community/residence";
5 import { parseTime, globalFilters } from "@/utils/tool"; 6 import { parseTime, globalFilters } from "@/utils/tool";
6 import Pagination from "@/components/Pagination/index.vue"; 7 import Pagination from "@/components/Pagination/index.vue";
7 import { ElMessageBox } from "element-plus"; 8 import { ElMessageBox } from "element-plus";
@@ -26,6 +27,7 @@ interface Data { @@ -26,6 +27,7 @@ interface Data {
26 loading: boolean; 27 loading: boolean;
27 list: any[]; 28 list: any[];
28 projects: any[]; 29 projects: any[];
  30 + communities: any[];
29 status: any[]; 31 status: any[];
30 params: Params; 32 params: Params;
31 } 33 }
@@ -33,6 +35,7 @@ const value1 = ref([]); @@ -33,6 +35,7 @@ const value1 = ref([]);
33 let data: Data = reactive({ 35 let data: Data = reactive({
34 list: [], 36 list: [],
35 projects: [], 37 projects: [],
  38 + communities: [],
36 status: status, 39 status: status,
37 loading: false, 40 loading: false,
38 params: { 41 params: {
@@ -51,6 +54,17 @@ let data: Data = reactive({ @@ -51,6 +54,17 @@ let data: Data = reactive({
51 }, 54 },
52 }); 55 });
53 /** 56 /**
  57 + * 小区列表
  58 + */
  59 +const getCommunityList = async () => {
  60 + try {
  61 + const res = await allNeighborhood();
  62 + data.communities = res?.data?.data;
  63 + } catch (e) {
  64 + console.log(e);
  65 + }
  66 +};
  67 +/**
54 * 列表 68 * 列表
55 */ 69 */
56 const getList = async () => { 70 const getList = async () => {
@@ -83,7 +97,7 @@ const getProjects = async (pageSize: number = 20) => { @@ -83,7 +97,7 @@ const getProjects = async (pageSize: number = 20) => {
83 const res = await getTableList({ 97 const res = await getTableList({
84 page: 1, 98 page: 1,
85 pageSize: pageSize, 99 pageSize: pageSize,
86 - oid:store?.family?.loginStore()?.organizationId??0 100 + oid: store?.family?.loginStore()?.organizationId ?? 0,
87 }); 101 });
88 data.projects = res?.data?.data?.list; 102 data.projects = res?.data?.data?.list;
89 if (res?.data?.data?.total > pageSize) { 103 if (res?.data?.data?.total > pageSize) {
@@ -92,7 +106,7 @@ const getProjects = async (pageSize: number = 20) => { @@ -92,7 +106,7 @@ const getProjects = async (pageSize: number = 20) => {
92 } catch (e) { 106 } catch (e) {
93 console.log(e); 107 console.log(e);
94 } 108 }
95 -} 109 +};
96 /** 110 /**
97 * 获取维修项目名 111 * 获取维修项目名
98 * @param {string} ids 维修项目id串 112 * @param {string} ids 维修项目id串
@@ -120,6 +134,7 @@ enum payTypeEnum { @@ -120,6 +134,7 @@ enum payTypeEnum {
120 "支付宝", 134 "支付宝",
121 } 135 }
122 onMounted(() => { 136 onMounted(() => {
  137 + getCommunityList();
123 getProjects(); 138 getProjects();
124 getList(); 139 getList();
125 }); 140 });
@@ -193,7 +208,7 @@ onMounted(() => { @@ -193,7 +208,7 @@ onMounted(() => {
193 <el-input 208 <el-input
194 v-model.trim="data.params.query.id" 209 v-model.trim="data.params.query.id"
195 placeholder="请填写订单号" 210 placeholder="请填写订单号"
196 - maxlength="15" 211 + maxlength="50"
197 @change="getList" 212 @change="getList"
198 /> 213 />
199 </el-form-item> 214 </el-form-item>
@@ -218,6 +233,12 @@ onMounted(() =&gt; { @@ -218,6 +233,12 @@ onMounted(() =&gt; {
218 <el-table-column prop="id" label="订单编号" align="center"> 233 <el-table-column prop="id" label="订单编号" align="center">
219 </el-table-column> 234 </el-table-column>
220 <el-table-column prop="neighboorHoodId" label="小区" align="center"> 235 <el-table-column prop="neighboorHoodId" label="小区" align="center">
  236 + <template #default="scope">
  237 + {{
  238 + data.communities.find((i) => ~~i.id === ~~scope.row.neighboorHoodId)
  239 + ?.name ?? scope.row.neighboorHoodId
  240 + }}
  241 + </template>
221 </el-table-column> 242 </el-table-column>
222 <el-table-column prop="repairProject" label="报修项目" align="center"> 243 <el-table-column prop="repairProject" label="报修项目" align="center">
223 <template #default="scope"> 244 <template #default="scope">