提交 4d3f989d authored 作者: zs's avatar zs

表结构更改

上级 0db56cf7
......@@ -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) {
......
......@@ -92,7 +92,7 @@ export default {
url: "/pages/listingManagement/index?backValue=home"
}
],
userName: this.$store.state.now_user.userName,
userName: this.$store.state.now_user.user,
};
},
computed: {
......@@ -100,6 +100,9 @@ export default {
return this.$store.state.now_user.isAdmin;
},
},
created() {
console.log(this.$store.state)
},
methods: {
// 修改密码
updatePassword() {
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论