|
@@ -0,0 +1,195 @@
|
|
|
+<template>
|
|
|
+ <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
|
|
|
+ <view class="alarmDetails-container">
|
|
|
+ <view class="flex bg-white p15 mb15">
|
|
|
+ <image style="width: 40px; height: 40px; margin: auto 15px auto 0" :src="dataArray.typeImg ? dataArray.typeImg : '/static/images/404.png'" mode="aspectFill"></image>
|
|
|
+
|
|
|
+ <view style="margin: auto auto auto 0">
|
|
|
+ <view style="font-size: 15px"> {{ dataArray.projectName }} </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view style="margin: auto 0 auto 0">
|
|
|
+ <view style="font-size: 15px" :style="`color:${dataArray.repairStatus == 1 ? '#23dedc' : '#16bf00'}`">
|
|
|
+ {{ dataArray.repairStatus == 1 ? "受理中" : "已处理" }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="bg-white p15 mb15">
|
|
|
+ <uni-section class="block mb10" title="基本信息" type="line"></uni-section>
|
|
|
+
|
|
|
+ <view class="tableType3 padding-0">
|
|
|
+ <u-row v-for="da in dataList" :key="da">
|
|
|
+ <u-col span="4">
|
|
|
+ <view style="text-align: right; padding: 0px 5px 0px 5px">{{ da.title }}</view>
|
|
|
+ </u-col>
|
|
|
+ <u-col span="8">
|
|
|
+ <view style="text-align: left; padding: 0px 5px 0px 5px">{{ da.value }}</view>
|
|
|
+ </u-col>
|
|
|
+ </u-row>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="bg-white p15 mb15">
|
|
|
+ <uni-section class="block mb10" title="处理内容" type="line"></uni-section>
|
|
|
+
|
|
|
+ <view>
|
|
|
+ <u-input placeholder="报修人(必填)" border="surround" v-model="handleName" style="margin: 0 0 15px 0" :disabled="dataArray.repairStatus == 2"> </u-input>
|
|
|
+
|
|
|
+ <u--textarea v-model="handleContent" placeholder="填报内容,最多可输入50个字" :count="true" maxlength="50" style="margin: 0 0 15px 0" :disabled="dataArray.repairStatus == 2"></u--textarea>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="flex" v-if="dataArray.repairStatus != 2">
|
|
|
+ <u-button
|
|
|
+ type="info"
|
|
|
+ text="取消"
|
|
|
+ :plain="true"
|
|
|
+ shape="circle"
|
|
|
+ :customStyle="{
|
|
|
+ width: '80px',
|
|
|
+ height: '30px',
|
|
|
+ marginRight: '15px',
|
|
|
+ }"
|
|
|
+ @click="handleSubmit(1)"
|
|
|
+ ></u-button>
|
|
|
+ <u-button
|
|
|
+ type="primary"
|
|
|
+ text="处理"
|
|
|
+ shape="circle"
|
|
|
+ :customStyle="{
|
|
|
+ width: '80px',
|
|
|
+ height: '30px',
|
|
|
+ marginLeft: '15px',
|
|
|
+ }"
|
|
|
+ @click="handleSubmit(2)"
|
|
|
+ ></u-button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+</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 { publicStores, useStores } from "@/store/modules/index";
|
|
|
+
|
|
|
+import { page } from "@/api/business/fireIot/repairManage.js";
|
|
|
+import { baseAlarmList, baseAlarm } from "@/api/business/fireIot/alarmManage.js";
|
|
|
+
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
+
|
|
|
+const dataArray = ref({});
|
|
|
+const dataList = ref([
|
|
|
+ {
|
|
|
+ title: "报修日期",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "项目名称",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "报修人",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "报修电话",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "问题描述",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "报修地址",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
+const repairCode = ref("");
|
|
|
+const pageSize = ref(20);
|
|
|
+const current = ref(1);
|
|
|
+const total = ref(0);
|
|
|
+
|
|
|
+const handleName = ref("");
|
|
|
+const handleContent = ref("");
|
|
|
+
|
|
|
+/**
|
|
|
+ * @页面初始化
|
|
|
+ */
|
|
|
+function init() {
|
|
|
+ selectListApi();
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @列表查询
|
|
|
+ * @api接口查询
|
|
|
+ */
|
|
|
+function selectListApi() {
|
|
|
+ page({
|
|
|
+ repairCode: repairCode.value,
|
|
|
+ current: current.value,
|
|
|
+ size: pageSize.value,
|
|
|
+ }).then((requset) => {
|
|
|
+ if (requset.status === "SUCCESS") {
|
|
|
+ dataArray.value = requset.data.records[0];
|
|
|
+ dataList.value[0].value = requset.data.records[0].createTime;
|
|
|
+ dataList.value[1].value = requset.data.records[0].projectName;
|
|
|
+ dataList.value[2].value = requset.data.records[0].reflectName;
|
|
|
+ dataList.value[3].value = requset.data.records[0].reflectPhone;
|
|
|
+ dataList.value[4].value = requset.data.records[0].repairContent;
|
|
|
+ dataList.value[5].value = requset.data.records[0].projectAddress;
|
|
|
+ total.value = requset.data.total;
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @提交
|
|
|
+ */
|
|
|
+function handleSubmit(type) {
|
|
|
+ if (type == 1) {
|
|
|
+ proxy.$tab.navigateTo(`/pages/business/fireIot/repairManage/repairDetailsList`);
|
|
|
+ } else {
|
|
|
+ if (!handleName.value) {
|
|
|
+ proxy.$modal.msg("请输入报修人");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ baseAlarm({
|
|
|
+ handleName: handleName.value,
|
|
|
+ handleContent: handleContent.value,
|
|
|
+ }).then((requset) => {
|
|
|
+ if (requset.status === "SUCCESS") {
|
|
|
+ proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+onReady(() => {});
|
|
|
+
|
|
|
+onShow(() => {
|
|
|
+ //调用系统主题颜色
|
|
|
+ proxy.$settingStore.systemThemeColor([1]);
|
|
|
+});
|
|
|
+
|
|
|
+onLoad((options) => {
|
|
|
+ if ("repairCode" in options) {
|
|
|
+ repairCode.value = options.repairCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ init();
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+:deep(.u-input__content__field-wrapper__field) {
|
|
|
+ font-size: 13px !important;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.u-textarea__field) {
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
+</style>
|