提交 abc8ec03 authored 作者: JaxBBLL's avatar JaxBBLL

fix

上级 e1ca3e54
...@@ -45,9 +45,19 @@ ...@@ -45,9 +45,19 @@
:src="detailsInfo.signImg" :src="detailsInfo.signImg"
@click="previewImage([detailsInfo.signImg], 0)" @click="previewImage([detailsInfo.signImg], 0)"
></image> ></image>
<button class="record-button" @click="toSign">重签</button> <button
v-if="detailsInfo.synchronization != 1"
class="record-button"
@click="toSign"
>
重签
</button>
</div> </div>
<button class="record-button ml-10" @click="onSyncData"> <button
v-if="detailsInfo.synchronization != 1"
class="inspection-button ml-10"
@click="onSyncData(true)"
>
数据同步 数据同步
</button> </button>
</view> </view>
...@@ -199,6 +209,11 @@ ...@@ -199,6 +209,11 @@
:startDialogData="startDialogData" :startDialogData="startDialogData"
@confirm="handleStartDialog" @confirm="handleStartDialog"
></startDialog> ></startDialog>
<Dialog
v-show="isDialog"
:list="propList"
@close="onSyncData(false)"
></Dialog>
</view> </view>
</template> </template>
<script> <script>
...@@ -216,11 +231,14 @@ import startDialog from "./components/dialog.vue"; ...@@ -216,11 +231,14 @@ import startDialog from "./components/dialog.vue";
import assRoomApi from "@/api/assRoom.js"; import assRoomApi from "@/api/assRoom.js";
import inspectApi from "@/api/inspect"; import inspectApi from "@/api/inspect";
import { sqlToData, dataToSql } from "./shared"; import { sqlToData, dataToSql } from "./shared";
import Dialog from "@/pages/inspectionManagement/dialog.vue";
export default { export default {
components: { components: {
signDialog, signDialog,
detail, detail,
startDialog, startDialog,
Dialog,
}, },
data() { data() {
return { return {
...@@ -247,6 +265,8 @@ export default { ...@@ -247,6 +265,8 @@ export default {
name: "F座3楼-内环屏蔽机房", name: "F座3楼-内环屏蔽机房",
value: "1", value: "1",
listData: [], listData: [],
isDialog: false,
propList: [],
}; };
}, },
computed: { computed: {
...@@ -608,8 +628,9 @@ export default { ...@@ -608,8 +628,9 @@ export default {
urls: images, urls: images,
}); });
}, },
onSyncData() { onSyncData(show) {
console.log(this.uid); this.isDialog = show;
this.propList = [dataToSql(this.detailsInfo)];
}, },
}, },
}; };
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<text class="title">待打包数据</text> <text class="title">待打包数据</text>
</view> </view>
<view class="row-item count-num"> <view class="row-item count-num">
{{ list }}
<text class="num">{{ list.length }}</text> <text class="num">{{ list.length }}</text>
<text></text> <text></text>
</view> </view>
...@@ -77,8 +78,8 @@ export default { ...@@ -77,8 +78,8 @@ export default {
watch: { watch: {
list(newVal) { list(newVal) {
console.log("newVal",newVal); console.log("newVal", newVal);
this.init() this.init();
}, },
}, },
// async mounted() { // async mounted() {
...@@ -99,7 +100,7 @@ export default { ...@@ -99,7 +100,7 @@ export default {
methods: { methods: {
init() { init() {
const temp = []; const temp = [];
this.notSynchronizationList = this.list this.notSynchronizationList = this.list;
getAllInspections().then((res) => { getAllInspections().then((res) => {
this.allList = res; this.allList = res;
...@@ -214,11 +215,11 @@ export default { ...@@ -214,11 +215,11 @@ export default {
icon: "none", icon: "none",
duration: 2000, duration: 2000,
}); });
let ids = this.list.map(e => e.id) let ids = this.list.map((e) => e.id);
await inspectApi.updateSyncData(ids) await inspectApi.updateSyncData(ids);
this.close(); this.close();
this.loading = false; this.loading = false;
// 生成日志 // 生成日志
const logContent = getLogContent( const logContent = getLogContent(
LOG_TYPE_ENUM.sys, LOG_TYPE_ENUM.sys,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论