提交 641df8e3 authored 作者: JaxBBLL's avatar JaxBBLL
...@@ -66,7 +66,8 @@ export default { ...@@ -66,7 +66,8 @@ export default {
}, },
methods: { methods: {
// 打开弹窗 // 打开弹窗
open() { open(item) {
this.summary = item.conclusion;
this.isOpen = true; this.isOpen = true;
}, },
// 关闭弹窗 // 关闭弹窗
......
...@@ -88,10 +88,10 @@ ...@@ -88,10 +88,10 @@
<text <text
v-if="list[activeTab].conclusion" v-if="list[activeTab].conclusion"
class="conclusion have" class="conclusion have"
@click="showPopup(index)" @click="showPopup(list[activeTab])"
>{{ list[activeTab].conclusion }}</text >{{ list[activeTab].conclusion }}</text
> >
<text v-else class="conclusion" @click="showPopup(index)" <text v-else class="conclusion" @click="showPopup(list[activeTab])"
>请输入情况摘要</text >请输入情况摘要</text
> >
</view> </view>
...@@ -99,7 +99,8 @@ ...@@ -99,7 +99,8 @@
<text class="form-label" <text class="form-label"
><text class="required">*</text>现场照片</text ><text class="required">*</text>现场照片</text
> >
<CommonUpload v-model="list[activeTab].photos" :max-count="5"> </CommonUpload> <CommonUpload v-model="list[activeTab].photos" :max-count="5">
</CommonUpload>
<!-- <view class="photo-box"> <!-- <view class="photo-box">
<view class="photo-container"> <view class="photo-container">
<view <view
...@@ -173,7 +174,7 @@ import { sqlToData, dataToSql } from "./shared"; ...@@ -173,7 +174,7 @@ import { sqlToData, dataToSql } from "./shared";
export default { export default {
components: { components: {
customPopup, customPopup,
CommonUpload CommonUpload,
}, },
data() { data() {
return { return {
...@@ -531,13 +532,13 @@ export default { ...@@ -531,13 +532,13 @@ export default {
const send = dataToSql(params); const send = dataToSql(params);
let api; let api;
if (this.uid) { if (this.uid) {
send.id = this.uid send.id = this.uid;
api = inspectApi.update api = inspectApi.update;
} else { } else {
api = inspectApi.save api = inspectApi.save;
} }
try { try {
let saveRes = await api(send) let saveRes = await api(send);
if (this.uid) { if (this.uid) {
const index = this.all_data.findIndex( const index = this.all_data.findIndex(
(element) => element.uid == this.uid (element) => element.uid == this.uid
...@@ -585,12 +586,13 @@ export default { ...@@ -585,12 +586,13 @@ export default {
icon: "success", icon: "success",
}); });
uni.navigateTo({ uni.navigateTo({
url: `/pages/shaftInspection/shaftInspectionList?uid=${ this.uid ? this.uid : saveRes.lastInsertId}&backValue=${this.backValue}`, url: `/pages/shaftInspection/shaftInspectionList?uid=${
this.uid ? this.uid : saveRes.lastInsertId
}&backValue=${this.backValue}`,
}); });
} catch (err) { } catch (err) {
console.log('err',err) console.log("err", err);
} }
}, },
// 检查所有Tab 的必填项是否填写完整 // 检查所有Tab 的必填项是否填写完整
isAllTabValid() { isAllTabValid() {
...@@ -610,8 +612,8 @@ export default { ...@@ -610,8 +612,8 @@ export default {
}; };
} }
// 如果巡检结论为正常,则不对摘要和现场照片做必填校验 // 如果巡检结论为正常,则不对摘要和现场照片做必填校验
if(item.inspectionResult === 0) { if (item.inspectionResult === 0) {
continue continue;
} }
// 2. 检查是否填写了情况摘要 // 2. 检查是否填写了情况摘要
if (!item.conclusion || item.conclusion.trim() === "") { if (!item.conclusion || item.conclusion.trim() === "") {
...@@ -665,9 +667,9 @@ export default { ...@@ -665,9 +667,9 @@ export default {
this.updateCurrentTabData(); this.updateCurrentTabData();
}, },
// 显示弹窗 // 显示弹窗
showPopup(index) { showPopup(item) {
this.currentIndex = index; console.log(item);
this.$refs.customPopup.open(); this.$refs.customPopup.open(item);
}, },
// 处理弹窗确认 // 处理弹窗确认
handlePopupConfirm(summary) { handlePopupConfirm(summary) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论