|
@@ -28,7 +28,7 @@
|
|
|
width: 'calc(33% - 10px)',
|
|
|
height: '110px',
|
|
|
}"
|
|
|
- :uploadCloseStatus="siteList.inspectionStatus == 2"
|
|
|
+ :uploadCloseStatus="xunJianStore.inspectionStatus == 2"
|
|
|
@uploadSuccessChange="uploadSuccessChange"
|
|
|
@uploadDeleteChange="uploadDeleteChange"
|
|
|
></oa-upload>
|
|
@@ -38,24 +38,24 @@
|
|
|
<uni-section class="block mb10" title="备注" type="line"></uni-section>
|
|
|
|
|
|
<view style="height: calc(100% - 25px)">
|
|
|
- <span v-if="siteList.inspectionStatus == 2">
|
|
|
+ <span v-if="xunJianStore.inspectionStatus == 2">
|
|
|
{{ siteList.remarks }}
|
|
|
</span>
|
|
|
|
|
|
- <u-textarea v-if="siteList.inspectionStatus == 1" style="height: 100%" v-model="siteList.remarks" placeholder="请输入备注" maxlength="50"></u-textarea>
|
|
|
+ <u-textarea v-if="xunJianStore.inspectionStatus == 1" style="height: 100%" v-model="siteList.remarks" placeholder="请输入备注" maxlength="50"></u-textarea>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="bg-white p15 mb15">
|
|
|
- <uni-section class="block mb10" title="消防设施分布图" type="line"></uni-section>
|
|
|
+ <uni-section class="block mb10" title="点位分布" type="line"></uni-section>
|
|
|
|
|
|
<u-image width="100%" :src="siteList.pictureUrl"></u-image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="app-button-fixed">
|
|
|
- <u-button v-if="siteList.inspectionStatus == 1" class="app-buttom" type="primary" @click="buttonClick()" shape="circle"> 下一步 </u-button>
|
|
|
+ <u-button v-if="xunJianStore.inspectionStatus == 1" class="app-buttom" type="primary" @click="buttonClick()" shape="circle"> 下一步 </u-button>
|
|
|
|
|
|
- <u-button v-if="siteList.inspectionStatus == 2" class="app-buttom" type="primary" @click="buttonClick()" shape="circle"> 查看巡检项 </u-button>
|
|
|
+ <u-button v-if="xunJianStore.inspectionStatus == 2" class="app-buttom" type="primary" @click="buttonClick()" shape="circle"> 查看巡检项 </u-button>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</template>
|
|
@@ -65,7 +65,7 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
|
|
|
import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef } from "vue";
|
|
|
import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
|
|
|
|
|
|
-import { siteDetails } from "@/api/business/mhxf/xunJian/plan.js";
|
|
|
+import { recordList, recordOption, siteDetails } from "@/api/business/mhxf/xunJian/plan.js";
|
|
|
|
|
|
const xunJianStore = xunJianStores(); //全局变量值Store
|
|
|
|
|
@@ -134,11 +134,26 @@ function uploadDeleteChange(e) {
|
|
|
}
|
|
|
|
|
|
onLoad((options) => {
|
|
|
- if (JSON.stringify(xunJianStore.contentArray) == "{}") {
|
|
|
+ if (xunJianStore.inspectionStatus == 1) {
|
|
|
selectAPI();
|
|
|
- } else {
|
|
|
- contentList.value = xunJianStore.contentArray.contentList[0];
|
|
|
- siteList.value = xunJianStore.contentArray.siteList;
|
|
|
+ } else if (xunJianStore.inspectionStatus == 2) {
|
|
|
+ recordList({
|
|
|
+ siteId: xunJianStore.siteId,
|
|
|
+ planSonId: xunJianStore.planSonId,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.status == "SUCCESS") {
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ recordOption({
|
|
|
+ siteId: res.data[0].siteId,
|
|
|
+ recordId: res.data[0].id,
|
|
|
+ }).then((res1) => {
|
|
|
+ contentList.value = res1.data.contentList;
|
|
|
+ siteList.value = res.data[0];
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
|