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

Merge branch 'dev' of https://git.yfzx.zjtys.com.cn/privateNetwork/inspection-pad-web into dev

# Conflicts: # pages/home/home.vue
...@@ -79,7 +79,6 @@ export default { ...@@ -79,7 +79,6 @@ export default {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB(); let sqllitedb = await SqlliteDbUtil.initSqlliteDB();
try { try {
let sql = `insert into ${table.inspectionRecordName}( let sql = `insert into ${table.inspectionRecordName}(
id,
inspectionType, inspectionType,
inspectionCode, inspectionCode,
recordName, recordName,
...@@ -93,7 +92,6 @@ export default { ...@@ -93,7 +92,6 @@ export default {
updateTime, updateTime,
inspectionData inspectionData
) values( ) values(
'${data.id}',
'${data.inspectionType}', '${data.inspectionType}',
'${data.inspectionCode}', '${data.inspectionCode}',
'${data.recordName}', '${data.recordName}',
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
// 初始化目录 // 初始化目录
await this.initDir() await this.initDir()
// 初始化数据库 // 初始化数据库
await this.initSqlLite() this.initSqlLite()
let sqllitedb = await SqlliteDbUtil.initSqlliteDB() let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
let isInit = await SqlliteDbUtil.checkIfDataImported(sqllitedb) let isInit = await SqlliteDbUtil.checkIfDataImported(sqllitedb)
if (!isInit) { if (!isInit) {
......
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
userName: "SYS_USER", userName: "SYS_USER",
user: [{ user: [{
field: "userId", field: "userId",
format: "TEXT", format: "TEXTWW",
}, },
{ {
field: "user", field: "user",
...@@ -51,7 +51,7 @@ module.exports = { ...@@ -51,7 +51,7 @@ module.exports = {
inspectionRecordName: "INSPECTION_RECORD", inspectionRecordName: "INSPECTION_RECORD",
inspectionRecord: [{ inspectionRecord: [{
field: "id", field: "id",
format: "TEXT NOT NULL", format: "INTEGER PRIMARY KEY AUTOINCREMENT",
}, },
{ {
field: "inspectionType", field: "inspectionType",
...@@ -109,7 +109,11 @@ module.exports = { ...@@ -109,7 +109,11 @@ module.exports = {
{ {
field: "inspectionData", field: "inspectionData",
format: "TEXT", format: "TEXT",
} },
{
field: "signImg",
format: "TEXT",
},
], ],
// 机房、井道信息表 // 机房、井道信息表
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
userId userId
} = data } = data
let sqllitedb = await SqlliteDbUtil.initSqlliteDB() let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
const [current] = await sqllitedb.selectSQL( const current = await sqllitedb.selectSQL(
`select * from ${table.userName} where userId = '${userId}' and user = '${userName}'` `select * from ${table.userName} where userId = '${userId}' and user = '${userName}'`
); );
if (current.passWord !== oldPwd) { if (current.passWord !== oldPwd) {
...@@ -101,10 +101,10 @@ export default { ...@@ -101,10 +101,10 @@ export default {
values = values.endsWith(',') ? values.substring(0, values.length - 1) : values values = values.endsWith(',') ? values.substring(0, values.length - 1) : values
let sql = `insert into ${table.userName}(${column}) values(${values})` let sql = `insert into ${table.userName}(${column}) values(${values})`
// let has = await this.info(data.userId) let has = await this.info(data.userId)
// if (has && has.userId) { if (has && has.userId) {
// await this.remove(data.userId) await this.remove(data.userId)
// } }
await sqllitedb.executeSQL(sql) await sqllitedb.executeSQL(sql)
} }
} catch (e) { } catch (e) {
......
<template> <template>
<!-- 首页 --> <!-- 首页 -->
<view class="container"> <view class="container">
<view class="flex"> <navigator url="/pages/test/index" hover-class="navigator-hover">
<navigator url="/pages/test/index" hover-class="navigator-hover"> <button type="default">跳转到新页面</button>
<button type="default" class="uni-btn">跳转TEST</button> </navigator>
</navigator>
<navigator
url="/pages/inspectionContent/inspectionContentList?uid=svk7crpold"
hover-class="navigator-hover"
>
<button type="default" class="uni-btn">测试巡检</button>
</navigator>
</view>
<!-- 第一个模块 --> <!-- 第一个模块 -->
<view class="header"> <view class="header">
<view class="title">杭州内网监管在线-运维在线</view> <view class="title">杭州内网监管在线-运维在线</view>
...@@ -82,88 +74,92 @@ ...@@ -82,88 +74,92 @@
<script> <script>
export default { export default {
data() { data() {
return { return {
cards: [ cards: [{
{ image: '../../static/img/jf.png',
image: "../../static/img/jf.png", text: '机房巡检',
text: "机房巡检", url:"/pages/inspectionContent/inspectionContentList?backValue=home"
url: "/pages/inspectionContent/inspectionContentList?backValue=home", },
}, {
{ image: '../../static/img/jd.png',
image: "../../static/img/jd.png", text: '井道巡检',
text: "井道巡检", url:"/pages/shaftInspection/shaftInspectionList?backValue=home"
url: "/pages/shaftInspection/shaftInspectionList?backValue=home", },
}, {
{ image: '../../static/img/sj.png',
image: "../../static/img/sj.png", text: '设备上架',
text: "设备上架", url: "/pages/listingManagement/index?backValue=home"
url: "/pages/listingManagement/index?backValue=home", }
}, ],
], userName: this.$store.state.now_user.user,
userName: this.$store.state.now_user.userName, };
}; },
}, computed: {
computed: { isAdmin() {
isAdmin() { return this.$store.state.now_user.isAdmin;
return this.$store.state.now_user.isAdmin; },
}, },
}, created() {
methods: { console.log(this.$store.state)
// 修改密码 },
updatePassword() { methods: {
uni.navigateTo({ // 修改密码
url: "/pages/index/editPd", updatePassword() {
}); uni.navigateTo({
}, url: "/pages/index/editPd",
//退出 });
logOut() { },
this.$refs.inputDialog2.open(); //退出
}, logOut() {
// 查看操作日志 this.$refs.inputDialog2.open();
lookLog() { },
uni.navigateTo({ // 查看操作日志
url: "/pages/index/operLog", lookLog() {
}); uni.navigateTo({
}, url: "/pages/index/operLog",
// 三模块卡片跳转页面 });
toList(url) { },
uni.navigateTo({ // 三模块卡片跳转页面
url: url, toList(url){
}); uni.navigateTo({
}, url: url,
// 巡检管理 });
toInspectionManagement() {
uni.navigateTo({ },
url: "/pages/inspectionManagement/index?backValue=home", // 巡检管理
}); toInspectionManagement() {
}, uni.navigateTo({
toListingManagement() { url: "/pages/inspectionManagement/index?backValue=home",
uni.navigateTo({ });
url: "/pages/listingManagement/index?backValue=home", },
}); toListingManagement() {
}, uni.navigateTo({
// 井道巡检 url: "/pages/listingManagement/index?backValue=home",
toShaftInspection() { });
uni.navigateTo({ },
url: "/pages/shaftInspection/shaftInspectionNew?backValue=home", // 井道巡检
}); toShaftInspection() {
}, uni.navigateTo({
//退出--弹出对话框 url: "/pages/shaftInspection/shaftInspectionNew?backValue=home",
dialogInputConfirm2() { });
uni.redirectTo({ },
url: "/pages/login/login", //退出--弹出对话框
success: () => { dialogInputConfirm2() {
// uni.clearStorage(); //测试将所有缓存清除 uni.redirectTo({
uni.setStorageSync("now_user", this.$store.state.now_user); url: "/pages/login/login",
uni.setStorageSync( success: () => {
"last_time", // uni.clearStorage(); //测试将所有缓存清除
this.$store.state.now_user.LastSynchronizationTime || "" uni.setStorageSync("now_user", this.$store.state.now_user);
); uni.setStorageSync(
}, "last_time",
}); this.$store.state.now_user.LastSynchronizationTime || ""
}, );
}, },
});
},
}
}; };
</script> </script>
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
</view> </view>
</block> </block>
</uni-nav-bar> </uni-nav-bar>
{{user}}
<view class="edit-main"> <view class="edit-main">
<!-- 占位---不可删除 --> <!-- 占位---不可删除 -->
<view class="seize-seat"> </view> <view class="seize-seat"> </view>
...@@ -18,7 +17,7 @@ ...@@ -18,7 +17,7 @@
<!-- <input type="text" class="uni-input" v-model="user.user" disabled="true" > --> <!-- <input type="text" class="uni-input" v-model="user.user" disabled="true" > -->
<uni-forms ref="form" :modelValue="formData" :rules="rules"> <uni-forms ref="form" :modelValue="formData" :rules="rules">
<uni-forms-item> <uni-forms-item>
<uni-easyinput class="uni-input" v-model="user.userName" :disabled="true"></uni-easyinput> <uni-easyinput class="uni-input" v-model="user.user" :disabled="true"></uni-easyinput>
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="oldPd"> <uni-forms-item name="oldPd">
<uni-easyinput type="password" class="uni-input" placeholder="原密码" v-model="formData.oldPd"> <uni-easyinput type="password" class="uni-input" placeholder="原密码" v-model="formData.oldPd">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论