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