提交 69be96d9 authored 作者: zs's avatar zs

edit

上级 e0416766
......@@ -129,8 +129,8 @@ LIMIT 1;`
},
async batchRemove(id) {
let sql = `update ${table.inspectionRecordName} set delFlag=1 where id = '${id}'`;
let sqllitedb = await SqlliteDbUtil.initSqlliteDB();
try {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB();
let rs = await sqllitedb.executeReturnDataSQL(sql);
return rs;
} catch (e) {
......
......@@ -46,7 +46,7 @@
synFlags: {
0: '未同步',
1: '已同步',
2: '巡检中'
2: '编辑中'
}
}
},
......
......@@ -46,7 +46,6 @@
<text class="num">{{ tableData.length || 0 }}</text>
<text>查询结果</text>
</view>
{{tableData}}
<!-- 展示区域 -->
<view class="table-main box-shaow-box">
<view
......
......@@ -30,8 +30,7 @@
{{index}}
</view>
<view class="inspect-list">
<InspectionItem v-for="(its,idx) in item" :details="its" @longpress="onLongPress"
/>
<InspectionItem v-for="(its,idx) in item" :details="its" @longpress="onLongPress" />
</view>
</view>
......@@ -47,6 +46,11 @@
</template>
<script>
import {
addLog,
getLogContent,
LOG_TYPE_ENUM,
} from "@/utils/IoReadingAndWriting.js";
import SearchCom from "@/components/searchCom/index.vue";
import InspectionItem from "@/components/inspectionItem/index.vue";
import {
......@@ -104,11 +108,14 @@
uni.navigateTo({
url: "/pages/shaftInspection/shaftInspectionList",
});
}
}
},
async init() {
console.log(this.userInfo,'==================')
let res = await inspectApi.selectDataForTime({...this.searchForm,userId:this.userInfo.userId})
console.log(this.userInfo, '==================')
let res = await inspectApi.selectDataForTime({
...this.searchForm,
userId: this.userInfo.userId
})
this.propList = res.filter(e => e.synFlag == 0)
this.countNum = res.length
const resultMap = {};
......@@ -147,9 +154,20 @@
},
async onLongPress(item) {
let rs = await inspectApi.batchRemove(item.id)
if(rs){
if (rs) {
// 生成日志
const logContent = getLogContent(
LOG_TYPE_ENUM.delete,
"",
"巡检模块"
);
const log_list = this.$store.state.log_list;
log_list.push(logContent);
this.$store.commit("SET_LOG_LIST", log_list);
addLog(log_list).then((res) => {});
await this.init()
}
},
deleteItem() {
if (this.currentIndexToDelete !== null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论