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

edit

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