index.vue 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298
  1. <template>
  2. <div class="page-container">
  3. <!-- 顶部搜索区域 -->
  4. <div class="search-header-flex mb-4">
  5. <div class="page-title">门店管理</div>
  6. <div class="search-actions">
  7. <el-input v-model="queryParams.storeOrContact" placeholder="搜索门店名称/联系人" prefix-icon="Search"
  8. class="search-input" clearable @keyup.enter="handleQuery" @clear="handleQuery" />
  9. <el-cascader v-model="searchRegionValue" :options="areaOptions"
  10. :props="{ checkStrictly: true, value: 'id', label: 'name' }"
  11. placeholder="所属站点" class="filter-cascader" style="width: 350px" clearable @change="handleSearchAreaChange" />
  12. <el-select v-model="queryParams.status" placeholder="状态" class="filter-select-mini" clearable @change="handleQuery">
  13. <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
  14. </el-select>
  15. <el-button type="primary" class="add-btn" icon="Plus" @click="handleAdd" v-hasPermi="['merchant:storeManagement:add']">新增门店</el-button>
  16. </div>
  17. </div>
  18. <!-- 表格区域 -->
  19. <div class="table-card">
  20. <el-table v-loading="loading" :data="storeList" @selection-change="handleSelectionChange" class="custom-table" :header-cell-style="{ background: '#f8f9fb', color: '#606266', fontWeight: '600' }">
  21. <el-table-column type="selection" width="55" align="center" />
  22. <!-- 门店信息 -->
  23. <el-table-column label="门店信息" align="left" width="280">
  24. <template #default="scope">
  25. <div class="store-info-box">
  26. <div class="store-logo-wrap">
  27. <el-image :src="scope.row.logoUrl" class="store-logo-img" fit="cover">
  28. <template #error>
  29. <div class="image-slot"><el-icon><Picture /></el-icon></div>
  30. </template>
  31. </el-image>
  32. </div>
  33. <div class="store-text-details">
  34. <div class="store-name-title">{{ scope.row.name }}</div>
  35. <div class="store-tag-row">
  36. <span class="tag-brand" v-if="scope.row.tenantName">{{ scope.row.tenantName }}</span>
  37. <span class="tag-category" v-if="scope.row.tenantCatergoriesName">{{ scope.row.tenantCatergoriesName }}</span>
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. </el-table-column>
  43. <!-- 服务项目 -->
  44. <el-table-column label="服务项目" align="left" width="220">
  45. <template #default="scope">
  46. <div class="service-tags-container">
  47. <span v-for="service in scope.row.services" :key="service" class="service-item-tag">
  48. {{ getServiceName(service) }}
  49. </span>
  50. </div>
  51. </template>
  52. </el-table-column>
  53. <!-- 资质认证 -->
  54. <el-table-column label="资质认证" align="center" width="100">
  55. <template #default="scope">
  56. <div class="auth-img-wrap">
  57. <el-image v-if="scope.row.businessLicenseUrl" :src="scope.row.businessLicenseUrl" class="auth-img" :preview-src-list="[scope.row.businessLicenseUrl]" preview-teleported />
  58. <span v-else class="text-placeholder">-</span>
  59. </div>
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="所属站点" align="left" width="180">
  63. <template #default="scope">
  64. <div class="location-info">
  65. <div class="area-name">{{ getRegionNameBySite(scope.row.site) }}</div>
  66. <div class="station-name">
  67. <el-icon class="loc-icon"><Location /></el-icon>
  68. <span>{{ scope.row.siteName }}</span>
  69. </div>
  70. </div>
  71. </template>
  72. </el-table-column>
  73. <!-- 服务单 -->
  74. <el-table-column label="服务单" align="center" width="100">
  75. <template #default="scope">
  76. <span class="order-count">{{ scope.row.serviceOrder || 0 }}</span>
  77. </template>
  78. </el-table-column>
  79. <!-- 营业时间 -->
  80. <el-table-column label="营业时间" align="center" width="160">
  81. <template #default="scope">
  82. <div class="business-time-text">
  83. {{ formatTime(scope.row.startBusinessTime) }},{{ formatTime(scope.row.endBusinessTime) }}
  84. </div>
  85. </template>
  86. </el-table-column>
  87. <!-- 联系方式 -->
  88. <el-table-column label="联系方式" align="left" width="200">
  89. <template #default="scope">
  90. <div class="contact-card">
  91. <div class="contact-person">
  92. <el-icon><User /></el-icon>
  93. <span>{{ scope.row.contact }}</span>
  94. </div>
  95. <div class="contact-phone">
  96. <el-icon><Phone /></el-icon>
  97. <span class="phone-link">{{ scope.row.contactNumber }}</span>
  98. </div>
  99. </div>
  100. </template>
  101. </el-table-column>
  102. <!-- 门店地址 -->
  103. <el-table-column label="门店地址" align="left" min-width="250">
  104. <template #default="scope">
  105. <div class="address-text" :title="scope.row.detailAddress">{{ scope.row.detailAddress }}</div>
  106. </template>
  107. </el-table-column>
  108. <!-- 操作 -->
  109. <el-table-column label="操作" align="center" width="180" fixed="right">
  110. <template #default="scope">
  111. <div class="operation-links">
  112. <el-button v-hasPermi="['merchant:storeManagement:query']" link type="primary" @click="handleDetail(scope.row)">详情</el-button>
  113. <el-button v-hasPermi="['merchant:storeManagement:edit']" link type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
  114. <el-dropdown trigger="hover" @command="(cmd: string) => handleCommand(cmd, scope.row)">
  115. <span class="more-link">
  116. 更多 <el-icon><ArrowDown /></el-icon>
  117. </span>
  118. <template #dropdown>
  119. <el-dropdown-menu>
  120. <el-dropdown-item v-if="checkPermi(['merchant:storeManagement:renew'])" command="renew">续期</el-dropdown-item>
  121. <el-dropdown-item v-if="scope.row.status === 1 && checkPermi(['merchant:storeManagement:disable'])" command="ban">禁用</el-dropdown-item>
  122. <el-dropdown-item v-if="scope.row.status === 3 && checkPermi(['merchant:storeManagement:enable'])" command="enable">启用</el-dropdown-item>
  123. </el-dropdown-menu>
  124. </template>
  125. </el-dropdown>
  126. </div>
  127. </template>
  128. </el-table-column>
  129. </el-table>
  130. <div class="pagination-footer">
  131. <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
  132. v-model:limit="queryParams.pageSize" @pagination="getList" />
  133. </div>
  134. </div>
  135. <!-- 添加或修改门店管理对话框 -->
  136. <el-dialog :title="dialog.title" v-model="dialog.visible" width="600px" append-to-body>
  137. <el-form ref="storeFormRef" :model="form" :rules="rules" label-width="120px">
  138. <el-form-item label="门店Logo" prop="logo">
  139. <image-upload v-model="form.logo" :limit="1" />
  140. </el-form-item>
  141. <el-form-item label="营业执照" prop="businessLicense">
  142. <image-upload v-model="form.businessLicense" :limit="1" />
  143. </el-form-item>
  144. <el-form-item label="门店名称" prop="name">
  145. <el-input v-model="form.name" placeholder="请输入门店名称" />
  146. </el-form-item>
  147. <el-form-item label="服务项目" prop="services">
  148. <el-checkbox-group v-model="form.services">
  149. <el-checkbox v-for="service in serviceList" :key="service.id" :label="service.id" border>
  150. {{ service.name }}
  151. </el-checkbox>
  152. </el-checkbox-group>
  153. </el-form-item>
  154. <el-form-item label="商户分类" prop="tenantCatergories">
  155. <PageSelect v-model="form.tenantCatergories"
  156. :options="processedTenantCategoriesOptions"
  157. :total="tenantCategoriesTotal" :pageSize="10" placeholder="请选择商户分类"
  158. @page-change="handleTenantCategoriesPageChange" @visible-change="handleTenantCategoriesVisibleChange" />
  159. </el-form-item>
  160. <el-form-item label="营业时间" prop="startBusinessTime">
  161. <el-row :gutter="10">
  162. <el-col :span="10">
  163. <el-time-picker clearable v-model="form.startBusinessTime" format="HH:mm" value-format="HH:mm" placeholder="开始时间"
  164. style="width: 100%">
  165. </el-time-picker>
  166. </el-col>
  167. <el-col :span="4" style="text-align: center; line-height: 40px">
  168. </el-col>
  169. <el-col :span="10">
  170. <el-time-picker clearable v-model="form.endBusinessTime" format="HH:mm" value-format="HH:mm" placeholder="结束时间"
  171. style="width: 100%">
  172. </el-time-picker>
  173. </el-col>
  174. </el-row>
  175. </el-form-item>
  176. <el-form-item label="联系人" prop="contact">
  177. <el-input v-model="form.contact" placeholder="请输入联系人" />
  178. </el-form-item>
  179. <el-form-item label="联系电话" prop="contactNumber">
  180. <el-input v-model="form.contactNumber" placeholder="请输入联系电话" />
  181. </el-form-item>
  182. <el-form-item label="有效期至" prop="validity">
  183. <el-date-picker clearable v-model="form.validity" type="date" value-format="YYYY-MM-DD" placeholder="请选择有效期至"
  184. style="width: 100%">
  185. </el-date-picker>
  186. </el-form-item>
  187. <el-form-item label="所属站点" prop="site">
  188. <el-cascader v-model="regionValue" :options="areaOptions"
  189. :props="{ value: 'id', label: 'name' }"
  190. placeholder="请选择所属站点" style="width: 100%"
  191. @change="handleAreaChange" />
  192. </el-form-item>
  193. <el-form-item label="详细地址">
  194. <el-row :gutter="10" style="margin-bottom: 10px">
  195. <el-col :span="24">
  196. <el-cascader v-model="addressCascaderValue" :options="regionData" placeholder="选择省市区"
  197. style="width: 100%" />
  198. </el-col>
  199. </el-row>
  200. <el-input v-model="form.detailAddress" type="textarea" placeholder="输入详细地址" rows="3" style="width: 100%" />
  201. </el-form-item>
  202. <el-form-item>
  203. <el-button type="primary" style="width: 100%" @click="getGeolocation">获取经纬度</el-button>
  204. </el-form-item>
  205. <el-row :gutter="10">
  206. <el-col :span="12">
  207. <el-form-item label="经度" prop="longitude">
  208. <el-input v-model="form.longitude" placeholder="请获取/输入位置经度" />
  209. </el-form-item>
  210. </el-col>
  211. <el-col :span="12">
  212. <el-form-item label="纬度" prop="latitude">
  213. <el-input v-model="form.latitude" placeholder="请获取/输入位置纬度" />
  214. </el-form-item>
  215. </el-col>
  216. </el-row>
  217. </el-form>
  218. <template #footer>
  219. <div class="dialog-footer">
  220. <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
  221. <el-button @click="cancel">取 消</el-button>
  222. </div>
  223. </template>
  224. </el-dialog>
  225. <!-- 门店详情对话框 -->
  226. <el-dialog :title="detailDialog.title" v-model="detailDialog.visible" width="800px" append-to-body>
  227. <el-tabs v-model="activeTab" style="padding: 0 10px;">
  228. <el-tab-pane label="基础信息" name="basic">
  229. <el-descriptions :column="2" border>
  230. <el-descriptions-item label="门店名称">{{ detailData.name }}</el-descriptions-item>
  231. <el-descriptions-item label="商户分类">{{ detailData.tenantCatergoriesName || '-' }}</el-descriptions-item>
  232. <el-descriptions-item label="所属品牌">{{ detailData.tenantName || '-' }}</el-descriptions-item>
  233. <el-descriptions-item label="营业时间">{{ formatTime(detailData.startBusinessTime) }} - {{ formatTime(detailData.endBusinessTime) }}</el-descriptions-item>
  234. <el-descriptions-item label="有效期至">{{ parseTime(detailData.validity, '{y}-{m}-{d}') }}</el-descriptions-item>
  235. <el-descriptions-item label="联系人">{{ detailData.contact }}</el-descriptions-item>
  236. <el-descriptions-item label="联系电话">{{ detailData.contactNumber }}</el-descriptions-item>
  237. <el-descriptions-item label="所属站点">{{ detailData.siteName }}</el-descriptions-item>
  238. <el-descriptions-item label="详细地址">{{ detailData.detailAddress }}</el-descriptions-item>
  239. <el-descriptions-item label="营业执照">
  240. <image-preview v-if="detailData.businessLicenseUrl" :src="detailData.businessLicenseUrl" :width="80" :height="60" />
  241. <span v-else>-</span>
  242. </el-descriptions-item>
  243. </el-descriptions>
  244. </el-tab-pane>
  245. <el-tab-pane label="服务订单记录" name="orders">
  246. <el-table :data="orderList" border style="width: 100%" v-loading="orderLoading">
  247. <el-table-column label="订单号" prop="code" min-width="150" />
  248. <el-table-column label="服务项目" prop="service" min-width="120">
  249. <template #default="scope">
  250. {{ getServiceName(scope.row.service) }}
  251. </template>
  252. </el-table-column>
  253. <el-table-column label="客户" prop="customer" min-width="100" />
  254. <el-table-column label="金额" prop="price" min-width="100">
  255. <template #default="scope">
  256. ¥ {{ (scope.row.price / 100).toFixed(2) }}
  257. </template>
  258. </el-table-column>
  259. <el-table-column label="下单时间" prop="createTime" min-width="160" />
  260. <el-table-column label="状态" align="center" width="100">
  261. <template #default="scope">
  262. <el-tag :type="getOrderStatusType(scope.row.status)" effect="plain" size="small">
  263. {{ getOrderStatusName(scope.row.status) }}
  264. </el-tag>
  265. </template>
  266. </el-table-column>
  267. </el-table>
  268. <pagination v-show="orderTotal > 0" :total="orderTotal" v-model:page="orderQueryParams.pageNum"
  269. v-model:limit="orderQueryParams.pageSize" @pagination="getOrderList" />
  270. </el-tab-pane>
  271. </el-tabs>
  272. <template #footer>
  273. <div class="dialog-footer">
  274. <el-button @click="detailDialog.visible = false">关 闭</el-button>
  275. </div>
  276. </template>
  277. </el-dialog>
  278. <!-- 门店续期对话框 -->
  279. <el-dialog title="门店续期" v-model="renewDialog.visible" width="400px" append-to-body>
  280. <el-form :model="renewForm" label-width="80px">
  281. <el-form-item label="到期日期" prop="to">
  282. <el-date-picker
  283. v-model="renewForm.to"
  284. type="datetime"
  285. placeholder="选择到期日期时间"
  286. value-format="YYYY-MM-DD HH:mm:ss"
  287. style="width: 100%"
  288. />
  289. </el-form-item>
  290. </el-form>
  291. <template #footer>
  292. <div class="dialog-footer">
  293. <el-button type="primary" @click="submitRenew">确 定</el-button>
  294. <el-button @click="renewDialog.visible = false">取 消</el-button>
  295. </div>
  296. </template>
  297. </el-dialog>
  298. </div>
  299. </template>
  300. <script setup name="Store" lang="ts">
  301. import { listStore, getStore, delStore, addStore, updateStore, listStoreStatus, renewStore, banStore, enableStore } from '@/api/system/store';
  302. import { StoreVO, StoreQuery, StoreForm, StoreStatusVO, SysStorePageBo, StoreRenewReq } from '@/api/system/store/types';
  303. import { listOnStore } from '@/api/system/tenant';
  304. import { listOnStore as listTenantCategoriesOnStore } from '@/api/system/tenantCategories';
  305. import { listAllService as listServiceOnStore } from '@/api/service/list';
  306. import { listSubOrderOnStore } from '@/api/order/subOrder';
  307. import { SubOrderStoreVO } from '@/api/order/subOrder/types';
  308. import { listAreaStation } from '@/api/system/areaStation';
  309. import { AreaStationVO } from '@/api/system/areaStation/types';
  310. import { regionData, codeToText, textToCode } from 'element-china-area-data';
  311. import PageSelect from '@/components/PageSelect/index.vue';
  312. import { useUserStore } from '@/store/modules/user';
  313. import { checkPermi } from '@/utils/permission';
  314. const userStore = useUserStore();
  315. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  316. const storeList = ref<StoreVO[]>([]);
  317. const buttonLoading = ref(false);
  318. const loading = ref(true);
  319. const showSearch = ref(true);
  320. const ids = ref<Array<string | number>>([]);
  321. const single = ref(true);
  322. const multiple = ref(true);
  323. const total = ref(0);
  324. const queryFormRef = ref<ElFormInstance>();
  325. const storeFormRef = ref<ElFormInstance>();
  326. const brandSelectRef = ref<any>(null);
  327. const searchRegionValue = ref<any[]>([]); // 搜索的区域值
  328. const searchSiteOptions = ref<any[]>([]); // 搜索的站点选项
  329. /** 处理搜索区域选择变化 */
  330. const handleSearchAreaChange = (value: any[]) => {
  331. if (value && value.length > 0) {
  332. const lastId = value[value.length - 1];
  333. const node = areaStationList.value.find(item => String(item.id) === String(lastId));
  334. if (node && String(node.type) === '2') {
  335. queryParams.value.station = lastId;
  336. queryParams.value.area = node.parentId;
  337. } else {
  338. queryParams.value.area = lastId;
  339. queryParams.value.station = undefined;
  340. }
  341. } else {
  342. queryParams.value.area = undefined;
  343. queryParams.value.station = undefined;
  344. }
  345. handleQuery();
  346. };
  347. // 新增的响应式变量
  348. const regionValue = ref<any[]>([]);
  349. const province = ref('');
  350. const city = ref('');
  351. const district = ref('');
  352. const addressCascaderValue = ref<any[]>([]); // 省市区级联选择器值
  353. const brandList = ref<any[]>([]); // 品牌列表
  354. const brandLoading = ref(false); // 品牌加载状态
  355. const currentPage = ref(1); // 当前页码
  356. const brandKeyword = ref(''); // 搜索关键词
  357. const brandSelectVisible = ref(false); // 品牌选择框可见状态
  358. const brandTotal = ref(0); // 品牌总数
  359. const serviceList = ref<any[]>([]); // 服务项目列表
  360. const statusList = ref<StoreStatusVO[]>([]); // 状态列表
  361. const tenantCategoriesList = ref<any[]>([]); // 商户分类列表
  362. const tenantCategoriesTotal = ref(0); // 商户分类总数
  363. const areaStationList = ref<AreaStationVO[]>([]); // 区域站点列表
  364. const areaOptions = ref<any[]>([]); // 所在区域树形选项
  365. const siteOptions = ref<any[]>([]); // 归属站点选项
  366. /** 处理商户分类回显逻辑 */
  367. const processedTenantCategoriesOptions = computed(() => {
  368. const options = tenantCategoriesList.value.map(item => ({ value: item.id, label: item.name }));
  369. if (form.value.tenantCatergories && form.value.tenantCatergoriesName) {
  370. const exists = options.some(opt => opt.value === form.value.tenantCatergories);
  371. if (!exists) {
  372. options.unshift({ value: form.value.tenantCatergories, label: form.value.tenantCatergoriesName });
  373. }
  374. }
  375. return options;
  376. });
  377. const dialog = reactive<DialogOption>({
  378. visible: false,
  379. title: ''
  380. });
  381. const detailDialog = reactive({
  382. visible: false,
  383. title: '门店详情'
  384. });
  385. const activeTab = ref('basic');
  386. const detailData = ref<any>({});
  387. const orderList = ref<SubOrderStoreVO[]>([]);
  388. const orderTotal = ref(0);
  389. const orderLoading = ref(false);
  390. const orderQueryParams = reactive({
  391. pageNum: 1,
  392. pageSize: 10,
  393. storeId: undefined as any
  394. });
  395. const getOrderList = async () => {
  396. if (!orderQueryParams.storeId) return;
  397. orderLoading.value = true;
  398. try {
  399. const res = await listSubOrderOnStore(orderQueryParams);
  400. orderList.value = res.rows;
  401. orderTotal.value = res.total;
  402. } finally {
  403. orderLoading.value = false;
  404. }
  405. };
  406. const getOrderStatusName = (status: number) => {
  407. const map: any = { 0: '待派单', 1: '待接单', 2: '待服务', 3: '服务中', 4: '已完成', 5: '已取消' };
  408. return map[status] || '未知';
  409. };
  410. const getOrderStatusType = (status: number) => {
  411. const map: any = { 0: 'info', 1: 'warning', 2: 'primary', 3: 'success', 4: 'success', 5: 'danger' };
  412. return map[status] || 'info';
  413. };
  414. const renewDialog = reactive({
  415. visible: false,
  416. title: '门店续期'
  417. });
  418. const renewForm = ref<StoreRenewReq>({
  419. id: undefined as any,
  420. to: ''
  421. });
  422. /** 续期按钮操作 */
  423. const handleRenew = (row: StoreVO) => {
  424. renewForm.value.id = row.id as any;
  425. renewForm.value.to = row.validity ? String(row.validity) : '';
  426. renewDialog.visible = true;
  427. };
  428. /** 提交续期 */
  429. const submitRenew = async () => {
  430. if (!renewForm.value.to) {
  431. proxy?.$modal.msgError("请选择日期");
  432. return;
  433. }
  434. await renewStore(renewForm.value);
  435. proxy?.$modal.msgSuccess("续期成功");
  436. renewDialog.visible = false;
  437. getList();
  438. };
  439. /** 禁用按钮操作 */
  440. const handleBan = async (row: StoreVO) => {
  441. await proxy?.$modal.confirm('确认禁用该门店吗?');
  442. await banStore({ id: row.id });
  443. proxy?.$modal.msgSuccess("禁用成功");
  444. getList();
  445. };
  446. /** 启用按钮操作 */
  447. const handleEnable = async (row: StoreVO) => {
  448. await proxy?.$modal.confirm('确认启用该门店吗?');
  449. await enableStore({ id: row.id });
  450. proxy?.$modal.msgSuccess("启用成功");
  451. getList();
  452. };
  453. /** 详情按钮操作 */
  454. const handleDetail = async (row: StoreVO) => {
  455. const res = await getStore(row.id);
  456. // 合并列表里的关联数据,以便能够展示名称等额外字段
  457. detailData.value = { ...row, ...res.data };
  458. activeTab.value = 'basic';
  459. orderQueryParams.storeId = row.id;
  460. orderQueryParams.pageNum = 1;
  461. getOrderList();
  462. detailDialog.visible = true;
  463. };
  464. const initFormData: StoreForm = {
  465. id: undefined,
  466. logo: undefined,
  467. businessLicense: undefined,
  468. name: undefined,
  469. tenantCatergories: undefined,
  470. tenantCatergoriesName: undefined,
  471. startBusinessTime: undefined,
  472. endBusinessTime: undefined,
  473. contact: undefined,
  474. contactNumber: undefined,
  475. validity: undefined,
  476. site: undefined,
  477. detailAddress: undefined,
  478. status: undefined,
  479. longitude: undefined,
  480. latitude: undefined,
  481. tenantId: undefined,
  482. services: [],
  483. regionId: undefined,
  484. areaCode: undefined,
  485. }
  486. const data = reactive<PageData<StoreForm, SysStorePageBo>>({
  487. form: { ...initFormData },
  488. queryParams: {
  489. pageNum: 1,
  490. pageSize: 10,
  491. storeOrContact: undefined,
  492. area: undefined,
  493. station: undefined,
  494. status: undefined,
  495. params: {
  496. }
  497. },
  498. rules: {
  499. id: [
  500. { required: true, message: "序号不能为空", trigger: "blur" }
  501. ],
  502. businessLicense: [
  503. { required: true, message: "营业执照不能为空", trigger: "blur" }
  504. ],
  505. name: [
  506. { required: true, message: "门店名称不能为空", trigger: "blur" }
  507. ],
  508. tenantCatergories: [
  509. { required: true, message: "商户分类不能为空", trigger: "change" }
  510. ],
  511. startBusinessTime: [
  512. { required: true, message: "开始营业时间不能为空", trigger: "blur" }
  513. ],
  514. endBusinessTime: [
  515. { required: true, message: "结束营业时间不能为空", trigger: "blur" }
  516. ],
  517. contact: [
  518. { required: true, message: "联系人不能为空", trigger: "blur" }
  519. ],
  520. contactNumber: [
  521. { required: true, message: "联系电话不能为空", trigger: "blur" }
  522. ],
  523. validity: [
  524. { required: true, message: "有效期至不能为空", trigger: "blur" }
  525. ],
  526. regionId: [
  527. { required: true, message: "所在区域不能为空", trigger: "change" }
  528. ],
  529. site: [
  530. { required: true, message: "归属站点不能为空", trigger: "change" }
  531. ],
  532. }
  533. });
  534. const { queryParams, form, rules } = toRefs(data);
  535. /** 统一处理下拉操作 */
  536. const handleCommand = (command: string, row: StoreVO) => {
  537. switch (command) {
  538. case 'renew':
  539. handleRenew(row);
  540. break;
  541. case 'ban':
  542. handleBan(row);
  543. break;
  544. case 'enable':
  545. handleEnable(row);
  546. break;
  547. }
  548. };
  549. /** 查询门店管理列表 */
  550. const getList = async () => {
  551. loading.value = true;
  552. const res = await listStore(queryParams.value);
  553. storeList.value = res.rows;
  554. total.value = res.total;
  555. loading.value = false;
  556. }
  557. /** 取消按钮 */
  558. const cancel = () => {
  559. reset();
  560. dialog.visible = false;
  561. }
  562. /** 表单重置 */
  563. const reset = () => {
  564. form.value = { ...initFormData };
  565. // 重置新增的变量
  566. regionValue.value = [];
  567. province.value = '';
  568. city.value = '';
  569. district.value = '';
  570. addressCascaderValue.value = [];
  571. storeFormRef.value?.resetFields();
  572. }
  573. /** 搜索按钮操作 */
  574. const handleQuery = () => {
  575. queryParams.value.pageNum = 1;
  576. getList();
  577. }
  578. /** 重置按钮操作 */
  579. const resetQuery = () => {
  580. searchRegionValue.value = [];
  581. searchSiteOptions.value = [];
  582. queryParams.value.storeOrContact = undefined;
  583. queryParams.value.area = undefined;
  584. queryParams.value.station = undefined;
  585. queryParams.value.status = undefined;
  586. handleQuery();
  587. }
  588. /** 多选框选中数据 */
  589. const handleSelectionChange = (selection: StoreVO[]) => {
  590. ids.value = selection.map(item => item.id);
  591. single.value = selection.length != 1;
  592. multiple.value = !selection.length;
  593. }
  594. /** 新增按钮操作 */
  595. const handleAdd = () => {
  596. const hasStation = areaStationList.value.some((item: any) => String(item.type) === '2');
  597. if (!hasStation) {
  598. proxy?.$modal.msgWarning("请先在区域站点中配置类型为“站点”的数据");
  599. return;
  600. }
  601. reset();
  602. if (userStore.tenantId) {
  603. form.value.tenantId = userStore.tenantId;
  604. }
  605. dialog.visible = true;
  606. dialog.title = "添加门店管理";
  607. }
  608. /** 修改按钮操作 */
  609. const handleUpdate = async (row?: StoreVO) => {
  610. reset();
  611. const _id = row?.id || ids.value[0]
  612. const res = await getStore(_id);
  613. Object.assign(form.value, res.data);
  614. // 确保数据加载完
  615. if (areaStationList.value.length === 0) {
  616. await getAreaStationList();
  617. }
  618. if (res.data.areaCode) {
  619. if (Array.isArray(res.data.areaCode)) {
  620. addressCascaderValue.value = res.data.areaCode.map(String);
  621. } else if (typeof res.data.areaCode === 'string') {
  622. addressCascaderValue.value = res.data.areaCode.split(',').map(String);
  623. }
  624. }
  625. if (res.data.site) {
  626. form.value.site = String(res.data.site);
  627. const path: any[] = [];
  628. let currentId = res.data.site;
  629. while (currentId && String(currentId) !== '0') {
  630. path.unshift(String(currentId));
  631. const node = areaStationList.value.find((item: any) => String(item.id) === String(currentId));
  632. if (node) {
  633. currentId = node.parentId;
  634. } else {
  635. break;
  636. }
  637. }
  638. regionValue.value = path;
  639. // 设置 regionId
  640. const siteData = areaStationList.value.find((item: any) => String(item.id) === String(res.data.site));
  641. if (siteData) {
  642. form.value.regionId = String(siteData.parentId);
  643. }
  644. }
  645. dialog.visible = true;
  646. dialog.title = "修改门店管理";
  647. }
  648. /** 提交按钮 */
  649. const submitForm = () => {
  650. storeFormRef.value?.validate(async (valid: boolean) => {
  651. if (valid) {
  652. buttonLoading.value = true;
  653. if (form.value.id) {
  654. await updateStore(form.value).finally(() => buttonLoading.value = false);
  655. } else {
  656. await addStore(form.value).finally(() => buttonLoading.value = false);
  657. }
  658. proxy?.$modal.msgSuccess("操作成功");
  659. dialog.visible = false;
  660. await getList();
  661. }
  662. });
  663. }
  664. /** 删除按钮操作 */
  665. const handleDelete = async (row?: StoreVO) => {
  666. const _ids = row?.id || ids.value;
  667. await proxy?.$modal.confirm('是否确认删除门店管理编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
  668. await delStore(_ids);
  669. proxy?.$modal.msgSuccess("删除成功");
  670. await getList();
  671. }
  672. /** 导出按钮操作 */
  673. const handleExport = () => {
  674. proxy?.download('system/store/export', {
  675. ...queryParams.value
  676. }, `store_${new Date().getTime()}.xlsx`)
  677. }
  678. /** 高德地图 Key 配置 */
  679. const amapKey = 'a30e76f457c14b6570925522be37565d';
  680. const securityJsCode = '531ae14ec1dff87e552e1ea51e848582';
  681. /** 动态加载高德地图脚本 */
  682. const loadAMapScript = (): Promise<any> => {
  683. // 设置安全密钥
  684. (window as any)._AMapSecurityConfig = {
  685. securityJsCode: securityJsCode,
  686. };
  687. return new Promise((resolve, reject) => {
  688. if ((window as any).AMap) {
  689. resolve((window as any).AMap);
  690. return;
  691. }
  692. const script = document.createElement('script');
  693. script.src = `https://webapi.amap.com/maps?v=2.0&key=${amapKey}`;
  694. script.onload = () => resolve((window as any).AMap);
  695. script.onerror = reject;
  696. document.head.appendChild(script);
  697. });
  698. };
  699. /** 根据详细地址使用高德地图 Geocoder 获取经纬度 */
  700. const getGeolocation = () => {
  701. // 拼接完整地址(省市区 + 详细地址)
  702. let areaText = '';
  703. if (addressCascaderValue.value && addressCascaderValue.value.length > 0) {
  704. areaText = addressCascaderValue.value.map((code: string) => codeToText[code] || '').join('');
  705. }
  706. const detailAddr = form.value.detailAddress || '';
  707. const fullAddress = (areaText + detailAddr).trim();
  708. if (!fullAddress) {
  709. proxy?.$modal.msgWarning('请先填写省市区和详细地址');
  710. return;
  711. }
  712. // 确保高德地图脚本已加载
  713. const doGeocode = () => {
  714. const AMap = (window as any).AMap;
  715. if (!AMap) {
  716. proxy?.$modal.msgError('高德地图脚本未加载,请稍后重试');
  717. return;
  718. }
  719. AMap.plugin('AMap.Geocoder', () => {
  720. const geocoder = new AMap.Geocoder();
  721. geocoder.getLocation(fullAddress, (status: string, result: any) => {
  722. if (status === 'complete' && result.info === 'OK') {
  723. const location = result.geocodes[0]?.location;
  724. if (location) {
  725. form.value.longitude = location.lng.toFixed(6);
  726. form.value.latitude = location.lat.toFixed(6);
  727. proxy?.$modal.msgSuccess('获取经纬度成功');
  728. } else {
  729. proxy?.$modal.msgError('未能解析到该地址的坐标,请检查地址是否准确');
  730. }
  731. } else {
  732. proxy?.$modal.msgError('地理编码失败:' + (result.info || status));
  733. }
  734. });
  735. });
  736. };
  737. if ((window as any).AMap) {
  738. doGeocode();
  739. } else {
  740. loadAMapScript().then(() => doGeocode()).catch(() => {
  741. proxy?.$modal.msgError('高德地图加载失败,请检查网络');
  742. });
  743. }
  744. };
  745. /** 获取品牌列表 */
  746. const getBrandList = async (pageNum = 1, keyword = '', append = false) => {
  747. brandLoading.value = true;
  748. // 确保参数格式正确,直接传递数字类型的pageNum
  749. const res = await listOnStore({ pageNum: pageNum, pageSize: 10 });
  750. if (res.code === 200) {
  751. if (append) {
  752. // 追加模式,用于分页加载
  753. brandList.value = [...brandList.value, ...res.rows];
  754. } else {
  755. // 替换模式,用于初始加载或搜索
  756. brandList.value = res.rows;
  757. }
  758. // 存储总数
  759. brandTotal.value = res.total || 0;
  760. console.log('总数', brandTotal.value);
  761. }
  762. brandLoading.value = false;
  763. };
  764. /** 获取服务项目列表 */
  765. const getServiceList = async () => {
  766. try {
  767. const res = await listServiceOnStore();
  768. // 转换数据格式,适配checkbox组件
  769. serviceList.value = res.data || res;
  770. } catch (error) {
  771. console.error('获取服务项目列表失败:', error);
  772. }
  773. };
  774. /** 获取区域站点列表 */
  775. const getAreaStationList = async () => {
  776. try {
  777. const res = await listAreaStation();
  778. const data = res.data || res;
  779. areaStationList.value = data;
  780. // 构建包含所有层级(区域和站点)的树
  781. areaOptions.value = buildSearchTree(data, 0);
  782. // 初始化站点数据为空
  783. siteOptions.value = [];
  784. } catch (error) {
  785. console.error('获取区域站点列表失败:', error);
  786. }
  787. };
  788. /** 构建搜索树形结构(包含站点) */
  789. const buildSearchTree = (data: any[], parentId: any): any[] => {
  790. return data
  791. .filter(item => String(item.parentId) === String(parentId))
  792. .map(item => {
  793. const children = buildSearchTree(data, item.id);
  794. const res: any = {
  795. id: item.id,
  796. name: item.name,
  797. };
  798. if (children && children.length > 0) {
  799. res.children = children;
  800. }
  801. return res;
  802. });
  803. };
  804. /** 构建树形结构 */
  805. const buildTree = (data: any[], parentId: any): any[] => {
  806. return data
  807. .filter(item => String(item.parentId) === String(parentId))
  808. .map(item => {
  809. const children = buildTree(data, item.id);
  810. return {
  811. value: String(item.id),
  812. label: item.name,
  813. children: children.length > 0 ? children : undefined
  814. };
  815. });
  816. };
  817. /** 处理所在区域选择变化 */
  818. const handleAreaChange = (value: any[]) => {
  819. if (value && value.length > 0) {
  820. const lastId = value[value.length - 1];
  821. form.value.site = lastId;
  822. // 找到当前选择节点的父节点作为 regionId (如果需要)
  823. const node = areaStationList.value.find(item => String(item.id) === String(lastId));
  824. if (node) {
  825. form.value.regionId = String(node.parentId);
  826. }
  827. } else {
  828. form.value.site = undefined;
  829. form.value.regionId = undefined;
  830. }
  831. };
  832. /** 获取商户分类列表 */
  833. const getTenantCategoriesList = async (pageNum = 1) => {
  834. try {
  835. const res = await listTenantCategoriesOnStore({ pageNum, pageSize: 10 });
  836. if (res.code === 200) {
  837. tenantCategoriesList.value = res.rows;
  838. tenantCategoriesTotal.value = res.total || 0;
  839. }
  840. } catch (error) {
  841. console.error('获取商户分类列表失败:', error);
  842. }
  843. };
  844. /** 处理品牌页面切换 */
  845. const handleBrandPageChange = (page: number) => {
  846. // 确保page是数字类型
  847. const pageNum = Number(page);
  848. currentPage.value = pageNum;
  849. getBrandList(pageNum, brandKeyword.value, false);
  850. };
  851. /** 处理商户分类分页 */
  852. const handleTenantCategoriesPageChange = (page: number) => {
  853. // 确保page是数字类型
  854. const pageNum = Number(page);
  855. getTenantCategoriesList(pageNum);
  856. };
  857. /** 处理商户分类选择框可见性变化 */
  858. const handleTenantCategoriesVisibleChange = (visible: boolean) => {
  859. if (visible) {
  860. getTenantCategoriesList(1);
  861. }
  862. };
  863. /** 远程搜索方法 */
  864. const remoteMethod = (query: string) => {
  865. brandKeyword.value = query;
  866. currentPage.value = 1;
  867. getBrandList(1, query, false);
  868. };
  869. /** 处理品牌选择框显示状态变化 */
  870. const handleBrandSelectVisibleChange = (visible: boolean) => {
  871. brandSelectVisible.value = visible;
  872. if (visible) {
  873. // 选择框显示时,重置页码并重新加载数据
  874. currentPage.value = 1;
  875. getBrandList(1, brandKeyword.value, false);
  876. }
  877. };
  878. // 监听省市区选择变化,不追加到详细地址,直接存储到区域编码中
  879. watch(
  880. addressCascaderValue,
  881. (newValue) => {
  882. if (newValue && newValue.length > 0) {
  883. form.value.areaCode = newValue.join(',');
  884. } else {
  885. form.value.areaCode = undefined;
  886. }
  887. },
  888. { deep: true }
  889. );
  890. /** 获取服务项目名称 */
  891. const getServiceName = (serviceId: number): string => {
  892. const service = serviceList.value.find(item => item.id === serviceId);
  893. return service ? service.name : String(serviceId);
  894. };
  895. /** 根据站点ID获取区域全称(向上遍历树形关系) */
  896. const getRegionNameBySite = (siteId: string | number): string => {
  897. if (!siteId || areaStationList.value.length === 0) return '未知区域';
  898. const site = areaStationList.value.find((item: any) => String(item.id) === String(siteId));
  899. if (!site) return '未知区域';
  900. let parentNames: string[] = [];
  901. let currentParentId = site.parentId;
  902. // 向上遍历直到父级ID为0或没找到父级
  903. while (currentParentId && String(currentParentId) !== '0') {
  904. const parent = areaStationList.value.find((item: any) => String(item.id) === String(currentParentId));
  905. if (parent) {
  906. parentNames.unshift(parent.name);
  907. currentParentId = parent.parentId;
  908. } else {
  909. break;
  910. }
  911. }
  912. return parentNames.length > 0 ? parentNames.join('/') : '未知区域';
  913. };
  914. /** 获取状态列表 */
  915. const getStatusList = async () => {
  916. try {
  917. const res: any = await listStoreStatus();
  918. // 兼容可能的不同响应体结构
  919. statusList.value = res.data || res.rows || res;
  920. } catch (error) {
  921. console.error('获取状态列表失败:', error);
  922. }
  923. };
  924. /** 格式化时间为时分 */
  925. const formatTime = (time: string | number): string => {
  926. if (!time) return '';
  927. // 处理时间戳或日期字符串
  928. const date = new Date(time);
  929. // 检查是否是有效日期
  930. if (isNaN(date.getTime())) return '';
  931. // 格式化为 HH:mm
  932. const hours = date.getHours().toString().padStart(2, '0');
  933. const minutes = date.getMinutes().toString().padStart(2, '0');
  934. return `${hours}:${minutes}`;
  935. };
  936. onMounted(() => {
  937. getList();
  938. getBrandList();
  939. getServiceList();
  940. getAreaStationList();
  941. getStatusList();
  942. // 提前加载高德地图脚本,加快首次地理编码速度
  943. loadAMapScript().catch(() => {
  944. console.warn('高德地图预加载失败,将在首次使用时重试');
  945. });
  946. });
  947. </script>
  948. <style scoped>
  949. .page-container {
  950. padding: 20px;
  951. background-color: #f5f7fa;
  952. min-height: calc(100vh - 84px);
  953. }
  954. /* 顶部搜索栏 */
  955. .search-header-flex {
  956. display: flex;
  957. justify-content: space-between;
  958. align-items: center;
  959. background-color: #fff;
  960. padding: 16px 24px;
  961. border-radius: 8px;
  962. box-shadow: 0 1px 4px rgba(0,21,41,.04);
  963. }
  964. .page-title {
  965. font-size: 18px;
  966. font-weight: 600;
  967. color: #303133;
  968. }
  969. .search-actions {
  970. display: flex;
  971. gap: 12px;
  972. align-items: center;
  973. }
  974. .search-input {
  975. width: 240px;
  976. }
  977. .filter-cascader {
  978. width: 420px;
  979. }
  980. .filter-select {
  981. width: 150px;
  982. }
  983. .filter-select-mini {
  984. width: 100px;
  985. }
  986. .add-btn {
  987. background-color: #409eff;
  988. border-color: #409eff;
  989. padding: 8px 20px;
  990. font-weight: 500;
  991. border-radius: 6px;
  992. }
  993. /* 表格卡片 */
  994. .table-card {
  995. background-color: #fff;
  996. border-radius: 8px;
  997. padding: 10px;
  998. box-shadow: 0 1px 4px rgba(0,21,41,.04);
  999. }
  1000. .custom-table {
  1001. width: 100%;
  1002. }
  1003. /* 门店信息列 */
  1004. .store-info-box {
  1005. display: flex;
  1006. align-items: center;
  1007. gap: 12px;
  1008. }
  1009. .store-logo-wrap {
  1010. width: 48px;
  1011. height: 48px;
  1012. border-radius: 6px;
  1013. overflow: hidden;
  1014. border: 1px solid #f0f0f0;
  1015. flex-shrink: 0;
  1016. }
  1017. .store-logo-img {
  1018. width: 100%;
  1019. height: 100%;
  1020. }
  1021. .store-text-details {
  1022. display: flex;
  1023. flex-direction: column;
  1024. gap: 4px;
  1025. }
  1026. .store-name-title {
  1027. font-size: 14px;
  1028. font-weight: 600;
  1029. color: #303133;
  1030. }
  1031. .store-tag-row {
  1032. display: flex;
  1033. gap: 6px;
  1034. }
  1035. .tag-brand {
  1036. font-size: 11px;
  1037. color: #e6a23c;
  1038. background-color: #fdf6ec;
  1039. padding: 1px 6px;
  1040. border-radius: 4px;
  1041. }
  1042. .tag-category {
  1043. font-size: 11px;
  1044. color: #67c23a;
  1045. background-color: #f0f9eb;
  1046. padding: 1px 6px;
  1047. border-radius: 4px;
  1048. }
  1049. /* 服务项目列 */
  1050. .service-tags-container {
  1051. display: flex;
  1052. flex-wrap: wrap;
  1053. gap: 6px;
  1054. }
  1055. .service-item-tag {
  1056. font-size: 12px;
  1057. color: #409eff;
  1058. background-color: #ecf5ff;
  1059. padding: 2px 8px;
  1060. border-radius: 4px;
  1061. }
  1062. /* 资质列 */
  1063. .auth-img-wrap {
  1064. display: flex;
  1065. justify-content: center;
  1066. align-items: center;
  1067. }
  1068. .auth-img {
  1069. width: 40px;
  1070. height: 40px;
  1071. border-radius: 4px;
  1072. border: 1px solid #f0f0f0;
  1073. cursor: pointer;
  1074. }
  1075. .text-placeholder {
  1076. color: #c0c4cc;
  1077. }
  1078. /* 区域/站点列 */
  1079. .location-info {
  1080. display: flex;
  1081. flex-direction: column;
  1082. gap: 4px;
  1083. }
  1084. .area-name {
  1085. font-size: 13px;
  1086. color: #303133;
  1087. }
  1088. .station-name {
  1089. display: flex;
  1090. align-items: center;
  1091. gap: 4px;
  1092. font-size: 12px;
  1093. color: #909399;
  1094. }
  1095. .loc-icon {
  1096. font-size: 14px;
  1097. }
  1098. /* 服务单列 */
  1099. .order-count {
  1100. font-size: 14px;
  1101. color: #606266;
  1102. font-weight: 500;
  1103. }
  1104. /* 营业时间列 */
  1105. .business-time-text {
  1106. font-size: 13px;
  1107. color: #606266;
  1108. }
  1109. /* 联系方式列 */
  1110. .contact-card {
  1111. display: flex;
  1112. flex-direction: column;
  1113. gap: 6px;
  1114. }
  1115. .contact-person, .contact-phone {
  1116. display: flex;
  1117. align-items: center;
  1118. gap: 8px;
  1119. font-size: 13px;
  1120. color: #606266;
  1121. }
  1122. .phone-link {
  1123. color: #409eff;
  1124. font-weight: 500;
  1125. }
  1126. /* 门店地址列 */
  1127. .address-text {
  1128. font-size: 13px;
  1129. color: #606266;
  1130. white-space: nowrap;
  1131. overflow: hidden;
  1132. text-overflow: ellipsis;
  1133. }
  1134. /* 操作列 */
  1135. .operation-links {
  1136. display: flex;
  1137. justify-content: center;
  1138. align-items: center;
  1139. gap: 12px;
  1140. }
  1141. .more-link {
  1142. color: #409eff;
  1143. cursor: pointer;
  1144. font-size: 14px;
  1145. display: flex;
  1146. align-items: center;
  1147. gap: 4px;
  1148. }
  1149. .more-link:hover {
  1150. text-decoration: underline;
  1151. }
  1152. /* 分页 */
  1153. .pagination-footer {
  1154. margin-top: 20px;
  1155. display: flex;
  1156. justify-content: flex-end;
  1157. }
  1158. .image-slot {
  1159. display: flex;
  1160. justify-content: center;
  1161. align-items: center;
  1162. width: 100%;
  1163. height: 100%;
  1164. background: #f5f7fa;
  1165. color: #a8abb2;
  1166. }
  1167. </style>