123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <template>
- <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
- <u-tabs :list="tabsList" :current="tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }" :scrollable="false"></u-tabs>
- </u-sticky>
- <oa-scroll
- customClass="repairManage-container scroll-height"
- :pageSize="pageSize"
- :total="total"
- :refresherLoad="true"
- :refresherEnabled="true"
- :refresherDefaultStyle="'none'"
- :refresherThreshold="44"
- :lowerThreshold="44"
- :refresherBackground="'#f5f6f7'"
- @load="load"
- @refresh="refresh"
- :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
- >
- <template #default>
- <view class="menu-list m0">
- <view class="list-cell list-cell-arrow" style="color: #666666; line-height: 25px" v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base)">
- <view class="content-area-top menu-item">
- <view class="content-area-top-time">
- {{ base.repairStatus == 1 ? (base.createTime ? base.createTime.replace("T", " ") : "") : base.handleTime ? base.handleTime.replace("T", " ") : "" }}
- </view>
- <view class="content-area-top-status" v-if="base.repairStatus == 1" style="background-color: #23dedc"> 受理中 </view>
- <view class="content-area-top-status" v-if="base.repairStatus == 2" style="background-color: #16bf00"> 处理完成 </view>
- </view>
- <view class="content-area-row_wrap menu-item">
- <view class="content-area-row_wrap-view"> 项目名称:{{ base.projectName }} </view>
- <view class="content-area-row_wrap-view"> 报修人:{{ base.reflectName }} </view>
- <view class="content-area-row_wrap-view"> 报修人电话:{{ base.reflectPhone }} </view>
- <view class="content-area-row_wrap-view"> 报修内容:{{ base.repairContent }} </view>
- <view class="content-area-row_wrap-view"> 报修地址:{{ base.projectAddress }} </view>
- </view>
- </view>
- </view>
- </template>
- </oa-scroll>
- </template>
- <script setup>
- import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
- import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
- import { useStores, commonStores } from "@/store/modules/index";
- import { page } from "@/api/business/fireIot/repairManage.js";
- const { proxy } = getCurrentInstance();
- const commonStore = commonStores();
- const tabsList = ref([
- {
- name: "全部",
- value: "",
- },
- {
- name: "受理中",
- value: 1,
- },
- {
- name: "处理完成",
- value: 2,
- },
- ]);
- const tabsCurrent = ref(1);
- const dataList = ref([]);
- const pageSize = ref(20);
- const current = ref(1);
- const total = ref(0);
- /**
- * @页面初始化
- */
- function init() {
- selectListApi();
- }
- /**
- * @列表查询
- * @api接口查询
- */
- function selectListApi() {
- page({
- repairStatus: tabsList.value[tabsCurrent.value].value,
- current: current.value,
- size: pageSize.value,
- }).then((requset) => {
- if (requset.status === "SUCCESS") {
- dataList.value = requset.data.records;
- total.value = requset.data.total;
- }
- });
- }
- /**
- * @跳转详情事件
- */
- function handleToDetails(e) {
- proxy.$tab.navigateTo(`/pages/business/videoMonitor/videoDetail?repairCode=${e.repairCode}`);
- }
- /**
- * @scrollView加载数据
- */
- function load() {
- pageSize.value += 10;
- init();
- }
- /**
- * @scrollView刷新数据
- */
- function refresh() {
- pageSize.value = 20;
- total.value = 0;
- init();
- }
- /**
- * @tabs点击事件
- */
- function tabsClick(e) {
- tabsCurrent.value = e.index;
- init();
- }
- onReady(() => {});
- onShow(() => {
- //调用系统主题颜色
- proxy.$settingStore.systemThemeColor([1]);
- });
- onLoad((options) => {
- init();
- });
- </script>
- <style lang="scss" scoped>
- .repairManage-container {
- .content-area {
- &-top {
- padding-right: 10px;
- font-size: 16px;
- font-weight: 600;
- color: #000000;
- &-time {
- max-width: 70%;
- margin: auto 0;
- font-size: 14px;
- color: rgb(102, 102, 102);
- }
- &-name {
- max-width: 70%;
- color: #000;
- }
- &-status {
- max-width: 30%;
- margin: auto 0 auto auto;
- font-size: 12px;
- color: #ffffff;
- padding: 0 5px;
- border-radius: 20px;
- line-height: 20px;
- }
- }
- &-row_wrap {
- padding-right: 10px;
- font-size: 13px;
- flex-flow: row wrap;
- &-view {
- display: flex;
- min-width: 50%;
- > .iconfont {
- font-size: 14px;
- color: #909399;
- margin-left: 5px;
- }
- }
- }
- }
- }
- </style>
|