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

fix

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