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

表结构更改

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