提交 4781a716 authored 作者: 刘守彩's avatar 刘守彩

fix: bugs

上级 a4ebaaec
import SqlliteDbUtil from '@/utils/sqllitedb'
import table from './sqllite/table.js'
import {
fixNullVal
} from "@/utils/common";
// 用户
export default {
async selectList() {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
try {
let rs = await sqllitedb.selectSQL(`select * from ${table.logListName}`)
return rs
} catch (e) {
console.log(e.message)
} finally {
await sqllitedb.closeDB();
}
},
async pageSelect(data){
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
let pre = (data.page -1) * data.size
let nxt = data.size
try {
let count = await sqllitedb.selectSQL(`select count(*) as total from ${table.logListName} limit 1 `)
let sql = `select * from ${table.logListName} ORDER BY time desc limit ${nxt} offset ${pre} `
let rs = await sqllitedb.selectSQL(sql)
console.log('sql',sql)
return {
data:rs || [],
total:count[0].total || 0
}
} catch (e) {
console.log(e.message)
} finally {
await sqllitedb.closeDB();
}
},
async addlog(data) {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
try {
const values = `(
'${data.LastSynchronizationTime || ""}',
'${data.avatar || ""}',
'${data.detail || ""}',
'${data.isAdmin}',
'${data.level}',
'${data.module}',
'${data.passWord}',
'${data.roleName}',
'${data.time}',
'${data.type}',
'${data.unitName}',
'${data.user}',
'${data.userId}',
${data.userType === null ? 'NULL' : `'${data.userType}'` }
)`
const sql = `INSERT INTO ${table.logListName} (
LastSynchronizationTime,
avatar,
detail,
isAdmin,
level,
module,
passWord,
roleName,
time,
type,
unitName,
user,
userId,
userType
) VALUES ${values}`;
let rs = await sqllitedb.selectSQL(sql)
return rs
} catch (e) {
console.log(e.message)
} finally {
await sqllitedb.closeDB();
}
},
async remove(id) {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
try {
if (!id) {
return
}
let sql = `delete from ${table.logListName} where id = '${id}'`;
await sqllitedb.executeSQL(sql);
} catch (e) {
console.log(e.message)
} finally {
// await sqllitedb.closeDB();
}
},
async info(id) {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
let sql = `select * from ${table.logListName} where id = '${id}'`;
let res = await sqllitedb.selectSQL(sql);
if (res && res.length > 0) {
return res[0]
}
},
async saveBatch(list) {
if (list.length === 0) {
return;
}
console.log('开始保存用户信息....' + list.length)
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
try {
for (let data of list) {
let column = ''
let values = ''
let idx = 0
for (let attr in data) {
let dataField = table['user'].find(v => {
if (v.field === attr) {
return v
}
})
if (!dataField) {
continue
}
column += dataField.field + ','
values += "'" + fixNullVal(data[attr]) + "',"
idx++
}
column = column.endsWith(',') ? column.substring(0, column.length - 1) : column
values = values.endsWith(',') ? values.substring(0, values.length - 1) : values
let sql = `insert into ${table.logListName}(${column}) values(${values})`
let has = await this.info(data.id)
if (has && has.id) {
await this.remove(data.id)
}
await sqllitedb.executeSQL(sql)
}
} catch (e) {
console.log(e.message)
} finally {
await sqllitedb.closeDB();
}
console.log('导入完成...')
}
import SqlliteDbUtil from '@/utils/sqllitedb'
import table from './sqllite/table.js'
import {
fixNullVal
} from "@/utils/common";
// 用户
export default {
async selectList() {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
try {
let rs = await sqllitedb.selectSQL(`select * from ${table.logListName}`)
return rs
} catch (e) {
console.log(e.message)
} finally {
await sqllitedb.closeDB();
}
},
// async pageSelect(data){
// let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
// let pre = (data.page -1) * data.size
// let nxt = data.size
// try {
// let count = await sqllitedb.selectSQL(`select count(*) as total from ${table.logListName} limit 1 `)
// let sql = `select * from ${table.logListName} ORDER BY time desc limit ${nxt} offset ${pre} `
// let rs = await sqllitedb.selectSQL(sql)
// console.log('sql',sql, rs)
// return {
// data:rs || [],
// total:count[0].total || 0
// }
// } catch (e) {
// console.log(e.message)
// } finally {
// await sqllitedb.closeDB();
// }
// },
async pageSelect(data) {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
let pre = (data.page - 1) * data.size
let nxt = data.size
// 拼接时间范围条件
let whereClause = "1=1"
if (data.startTime && data.endTime) {
whereClause += ` AND time BETWEEN '${data.startTime} 00:00:00' AND '${data.endTime} 23:59:59'`
}
try {
// 获取总数
let countSql = `SELECT count(*) as total FROM ${table.logListName} WHERE ${whereClause} LIMIT 1`
let count = await sqllitedb.selectSQL(countSql)
// 获取分页数据
let sql =
`SELECT * FROM ${table.logListName} WHERE ${whereClause} ORDER BY time DESC LIMIT ${nxt} OFFSET ${pre}`
let rs = await sqllitedb.selectSQL(sql)
console.log('sql', sql, rs)
return {
data: rs || [],
total: count[0]?.total || 0
}
} catch (e) {
console.log(e.message)
} finally {
await sqllitedb.closeDB()
}
},
async addlog(data) {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
try {
const values = `(
'${data.LastSynchronizationTime || ""}',
'${data.avatar || ""}',
'${data.detail || ""}',
'${data.isAdmin}',
'${data.level}',
'${data.module}',
'${data.passWord}',
'${data.roleName}',
'${data.time}',
'${data.type}',
'${data.unitName}',
'${data.user}',
'${data.userId}',
${data.userType === null ? 'NULL' : `'${data.userType}'` }
)`
const sql = `INSERT INTO ${table.logListName} (
LastSynchronizationTime,
avatar,
detail,
isAdmin,
level,
module,
passWord,
roleName,
time,
type,
unitName,
user,
userId,
userType
) VALUES ${values}`;
let rs = await sqllitedb.selectSQL(sql)
return rs
} catch (e) {
console.log(e.message)
} finally {
await sqllitedb.closeDB();
}
},
async remove(id) {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
try {
if (!id) {
return
}
let sql = `delete from ${table.logListName} where id = '${id}'`;
await sqllitedb.executeSQL(sql);
} catch (e) {
console.log(e.message)
} finally {
// await sqllitedb.closeDB();
}
},
async info(id) {
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
let sql = `select * from ${table.logListName} where id = '${id}'`;
let res = await sqllitedb.selectSQL(sql);
if (res && res.length > 0) {
return res[0]
}
},
async saveBatch(list) {
if (list.length === 0) {
return;
}
console.log('开始保存用户信息....' + list.length)
let sqllitedb = await SqlliteDbUtil.initSqlliteDB()
try {
for (let data of list) {
let column = ''
let values = ''
let idx = 0
for (let attr in data) {
let dataField = table['user'].find(v => {
if (v.field === attr) {
return v
}
})
if (!dataField) {
continue
}
column += dataField.field + ','
values += "'" + fixNullVal(data[attr]) + "',"
idx++
}
column = column.endsWith(',') ? column.substring(0, column.length - 1) : column
values = values.endsWith(',') ? values.substring(0, values.length - 1) : values
let sql = `insert into ${table.logListName}(${column}) values(${values})`
let has = await this.info(data.id)
if (has && has.id) {
await this.remove(data.id)
}
await sqllitedb.executeSQL(sql)
}
} catch (e) {
console.log(e.message)
} finally {
await sqllitedb.closeDB();
}
console.log('导入完成...')
}
}
\ No newline at end of file
......@@ -113,7 +113,11 @@ module.exports = {
{
field: "signImg",
format: "TEXT",
},
},
{
field: "dataSource",
format: "INTEGER DEFAULT 1"
}
],
// 机房、井道信息表
......
......@@ -3,7 +3,7 @@
<view class="container">
<!-- 第一个模块 -->
<view class="header">
<view class="title">杭州内网监管在线-运维在线</view>
<view class="title">杭州内网监管在线-山南数据中心运维在线</view>
<view class="header-buttons">
<view class="log-button" @click="lookLog" v-if="isAdmin">操作日志</view>
<div class="exit-button" @click="logOut">
......@@ -188,12 +188,13 @@ export default {
left: 50%;
transform: translateX(-50%);
ont-family: PingFangSC-Medium;
font-size: 32px;
font-size: 30px;
color: #000000;
text-align: center;
line-height: 40px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
font-weight: 500;
font-weight: 500;
white-space: nowrap;
}
.header-buttons {
......
......@@ -16,8 +16,8 @@
<!-- 搜索区域 -->
<view class="search-com">
<view class="search-com-left">
<uni-data-select class="uni-search-item" v-model="searchFrom.type" :localdata="typeList"
@change="change" placeholder="操作类型:全部" :key="new Date().getTime()"></uni-data-select>
<!-- <uni-data-select class="uni-search-item" v-model="searchFrom.type" :localdata="typeList"
@change="change" placeholder="操作类型:全部" :key="new Date().getTime()"></uni-data-select> -->
<view class="search-com-right">
<uni-datetime-picker class="uni-datetime-picker" type="daterange"
......@@ -148,13 +148,8 @@
},
timeChange(val) {
let temp = [...val];
if (val.length && val[0] == val[1]) {
temp[1] = `${temp[1]} 23:59:59`;
}
this.searchForm.startTime = temp[0] || "";
this.searchForm.endTime = temp[1] || "";
this.searchForm.startTime = val[0] || "";
this.searchForm.endTime = val[1] || "";
this.getData();
},
......@@ -173,11 +168,13 @@
} = this.searchForm;
let data = {
page: 2,
size: 10
size: 10,
}
let res = await this.$logApi.pageSelect({
page: this.pageCurrent,
size: this.pageSize
size: this.pageSize,
startTime,
endTime
})
if (res) {
this.total = res.total
......
......@@ -140,7 +140,7 @@ export default {
conclusion: "",
settingLabel: "设定电池电压",
settingLabelShow: "设定电压",
setting: this.jfType === "3" ? "2V-2.35V" : "2V-2.35V", //设定温度值
setting: "10V-15V", //设定温度值
// value: "", //输入温度
unit: "V", //单位
photos: [],
......@@ -155,7 +155,7 @@ export default {
conclusion: "",
settingLabel: "设定电池温度",
settingLabelShow: "设定温度",
setting: "10℃-40℃", //设定湿度值
setting: "10℃-35℃", //设定湿度值
// value: "", //输入湿度
unit: "℃", //单位
photos: [],
......@@ -170,7 +170,7 @@ export default {
conclusion: "",
settingLabel: "设定电池内阻",
settingLabelShow: "设定内阻",
setting: this.jfType === "3" ? "<50mΩ" : "<50mΩ", //设定湿度值
setting: this.jfType === "3" ? "<10mΩ" : "<10mΩ", //设定湿度值
// value: "", //输入湿度
unit: "mΩ", //单位
photos: [],
......
......@@ -282,7 +282,7 @@ export default {
options: {}, //存储数据
backValue: "",
all_data: [], //所有数据
jfType: "0", //机房类型
jfType: "2", //机房类型
allIsSubmitOne: false,
startDialogData: {
text: [],
......@@ -547,7 +547,7 @@ export default {
}
console.log("this.detailsItem", this.detailsItem);
},
startDialogBtn(name = "山南UPS间", jfType = "0", value = "1") {
startDialogBtn(name = "山南UPS间", jfType = "2", value = "1") {
let item = this.findTargetObject(this.listData);
console.log("即将操作的机房", item);
......@@ -563,7 +563,7 @@ export default {
this.value = value;
this.$refs.startDialog.open();
},
startDialog(name = "山南UPS间", jfType = "0", value = "1") {
startDialog(name = "山南UPS间", jfType = "2", value = "1") {
this.name = name;
this.jfType = jfType;
this.value = value;
......
......@@ -210,7 +210,7 @@ export default {
}, //弹窗文案
listData: [],
name: "",
jfType: "0",
jfType: "2",
value: "1",
paramsObjFirst: {},
all_data: [],
......
......@@ -34,6 +34,7 @@ export function dataToSql(data) {
createTime: data.id ? data.createTime : `${new Date().getTime()}`,
updateTime: `${new Date().getTime()}`,
inspectionData: data.originData,
dataSource: data.dataSource
};
console.log("dataToSql", send);
return send;
......@@ -85,6 +86,7 @@ export function sqlToData(sqlData) {
inspectionNumber, // 已巡检数量
allIsSubmitOne, // 是否全部填写完成
isSign: !!sqlData.signImg, // 是否有签名
dataSource: sqlData.dataSource
};
return ret;
......
<template>
<!-- 登录页 -->
<view class="content">
<view class="login_wrap">
<view class="top-module">
<image src="@/static/logo.png" mode="aspectFit" alt="" />
<view class="title">杭州内网监管在线-运维在线</view>
</view>
<view class="form_wrap">
<view class="input_wrap">
<uni-easyinput class="log-input" clearSize="0" v-model="person.account" prefixIcon="person"
placeholder="用户名"></uni-easyinput>
<uni-easyinput v-if="passwordVisible" class="log-input" prefixIcon="locked" clearSize="0"
v-model="person.pwd" @iconClick="togglePasswordVisible" :placeholder="passwordPlaceholder"
:passwordIcon="false" :type="passwordVisible ? 'text' : 'password'"></uni-easyinput>
<uni-easyinput v-else class="log-input" prefixIcon="locked-filled" clearSize="0" v-model="person.pwd"
@iconClick="togglePasswordVisible" :placeholder="passwordPlaceholder" :passwordIcon="false"
:type="passwordVisible ? 'text' : 'password'"></uni-easyinput>
</view>
<view class="login_btn" @click="login">
<view class="login_btn_text"> 登录 </view>
</view>
</view>
</view>
</view>
</template>
<script>
import userApi from "@/api/user.js";
import logApi from "@/api/log.js";
import SqlliteDbUtil from "@/utils/sqllitedb";
import table from "@/api/sqllite/table.js";
import {
getUserList
} from "@/utils/systemCofig";
import {
LOG_TYPE_ENUM,
getLogContent,
addLog,
readLogData,
} from "@/utils/IoReadingAndWriting.js";
export default {
components: {},
data() {
return {
person: {
account: "管理员", // "管理员",
pwd: "Gly@124" // Gly@124",
},
backButtonPress: 0,
personList: [],
passwordVisible: false, // 是否显示密码
db: null,
};
},
computed: {
// 动态密码输入框 placeholder
passwordPlaceholder() {
return this.passwordVisible ? "密码" : "********";
},
},
created() {},
onShow() {},
async mounted() {},
// 定义返回退出
onBackPress(options) {
this.backButtonPress++;
if (this.backButtonPress > 1) {
uni.setStorageSync("oper_record", this.$store.state.oper_record);
uni.setStorageSync("all_data", this.$store.state.all_data);
uni.setStorageSync("now_user", this.$store.state.now_user);
uni.setStorageSync(
"last_time",
this.$store.state.now_user.LastSynchronizationTime
);
plus.runtime.quit();
} else {
plus.nativeUI.toast("再划一次退出应用");
}
setTimeout(function() {
this.backButtonPress = 0;
}, 1000);
return true;
},
methods: {
// 切换密码显示/隐藏
togglePasswordVisible() {
this.passwordVisible = !this.passwordVisible;
},
// 点击登录
<template>
<!-- 登录页 -->
<view class="content">
<view class="login_wrap">
<view class="top-module">
<image src="@/static/logo.png" mode="aspectFit" alt="" />
<view class="title">
杭州内网监管在线-山南数据中心运维在线
</view>
</view>
<view class="form_wrap">
<view class="input_wrap">
<uni-easyinput class="log-input" clearSize="0" v-model="person.account" prefixIcon="person"
placeholder="用户名"></uni-easyinput>
<uni-easyinput v-if="passwordVisible" class="log-input" prefixIcon="locked" clearSize="0" v-model="person.pwd"
@iconClick="togglePasswordVisible" :placeholder="passwordPlaceholder" :passwordIcon="false"
:type="passwordVisible ? 'text' : 'password'"></uni-easyinput>
<uni-easyinput v-else class="log-input" prefixIcon="locked-filled" clearSize="0" v-model="person.pwd"
@iconClick="togglePasswordVisible" :placeholder="passwordPlaceholder" :passwordIcon="false"
:type="passwordVisible ? 'text' : 'password'"></uni-easyinput>
</view>
<view class="login_btn" @click="login">
<view class="login_btn_text"> 登录 </view>
</view>
</view>
</view>
</view>
</template>
<script>
import userApi from "@/api/user.js";
import logApi from "@/api/log.js";
import SqlliteDbUtil from "@/utils/sqllitedb";
import table from "@/api/sqllite/table.js";
import {
getUserList
} from "@/utils/systemCofig";
import {
LOG_TYPE_ENUM,
getLogContent,
addLog,
readLogData,
} from "@/utils/IoReadingAndWriting.js";
export default {
components: {},
data() {
return {
person: {
account: "管理员", // "管理员",
pwd: "Gly@124" // Gly@124",
},
backButtonPress: 0,
personList: [],
passwordVisible: false, // 是否显示密码
db: null,
};
},
computed: {
// 动态密码输入框 placeholder
passwordPlaceholder() {
return this.passwordVisible ? "密码" : "********";
},
},
created() {},
onShow() {},
async mounted() {},
// 定义返回退出
onBackPress(options) {
this.backButtonPress++;
if (this.backButtonPress > 1) {
uni.setStorageSync("oper_record", this.$store.state.oper_record);
uni.setStorageSync("all_data", this.$store.state.all_data);
uni.setStorageSync("now_user", this.$store.state.now_user);
uni.setStorageSync(
"last_time",
this.$store.state.now_user.LastSynchronizationTime
);
plus.runtime.quit();
} else {
plus.nativeUI.toast("再划一次退出应用");
}
setTimeout(function() {
this.backButtonPress = 0;
}, 1000);
return true;
},
methods: {
// 切换密码显示/隐藏
togglePasswordVisible() {
this.passwordVisible = !this.passwordVisible;
},
// 点击登录
async login() {
userApi.login(this.person).then((res) => {
if (res.data) {
this.personList = res.data;
this.$store.commit("SET_USER", this.personList);
uni.setStorageSync("now_user", this.personList);
uni.setStorageSync(
"last_time",
this.personList.LastSynchronizationTime || ""
);
const logContent = getLogContent(
LOG_TYPE_ENUM.login,
"",
"其他"
);
this.$logApi.addlog(logContent)
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) => {});
uni.navigateTo({
url: "/pages/home/home",
});
} else {
uni.showToast({
title: "账号密码错误,请重新输入",
icon: "none",
duration: 2000,
});
}
});
},
},
};
</script>
<style scoped lang="less">
.content {
width: 100vw;
height: 100vh;
// background-color: red;
background-image: url("../../static/img/logbg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: center;
.top-module {
width: 350px;
margin-bottom: 48px;
text-align: center;
image {
width: 88px;
height: 88px;
}
.title {
font-size: 26px;
color: #000000;
line-height: 34px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}
}
.login_wrap {}
.log-input {
width: 350px;
margin-bottom: 24px;
background: #fff;
color: #4a4a4a;
}
/deep/.is-input-border {
border-radius: 2px !important;
height: 40px !important;
}
/deep/.uni-easyinput__content {
background-color: rgba(0, 0, 0, 0) !important;
}
/deep/.uni-easyinput__placeholder-class {
color: #4a4a4a;
}
/deep/.is-focused {
border: 1px solid #4a4a4a !important;
.uniui-eye-filled {
color: #4a4a4a !important;
}
.uniui-eye-slash-filled {
color: #4a4a4a !important;
}
}
/deep/.uni-input-input {
color: #4a4a4a !important;
}
/deep/.uniui-clear {
color: #4a4a4a !important;
}
.login_btn {
background: #3774f6;
box-shadow: 0px 2px 14px 0px rgba(51, 104, 246, 0.24);
border-radius: 3px;
.login_btn_text {
width: 350px;
height: 40px;
background-color: #3774f6;
box-shadow: 0px 1px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
}
}
userApi.login(this.person).then((res) => {
if (res.data) {
this.personList = res.data;
this.$store.commit("SET_USER", this.personList);
uni.setStorageSync("now_user", this.personList);
uni.setStorageSync(
"last_time",
this.personList.LastSynchronizationTime || ""
);
const logContent = getLogContent(
LOG_TYPE_ENUM.login,
"",
"其他"
);
this.$logApi.addlog(logContent)
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) => {});
uni.navigateTo({
url: "/pages/home/home",
});
} else {
uni.showToast({
title: "账号密码错误,请重新输入",
icon: "none",
duration: 2000,
});
}
});
},
},
};
</script>
<style scoped lang="less">
.content {
width: 100vw;
height: 100vh;
// background-color: red;
background-image: url("../../static/img/logbg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: center;
.top-module {
width: 350px;
margin-bottom: 20px;
text-align: center;
image {
width: 88px;
height: 88px;
}
.title {
font-size: 18px;
color: #000000;
line-height: 34px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}
}
.login_wrap {}
.log-input {
width: 350px;
margin-bottom: 24px;
background: #fff;
color: #4a4a4a;
}
/deep/.is-input-border {
border-radius: 2px !important;
height: 40px !important;
}
/deep/.uni-easyinput__content {
background-color: rgba(0, 0, 0, 0) !important;
}
/deep/.uni-easyinput__placeholder-class {
color: #4a4a4a;
}
/deep/.is-focused {
border: 1px solid #4a4a4a !important;
.uniui-eye-filled {
color: #4a4a4a !important;
}
.uniui-eye-slash-filled {
color: #4a4a4a !important;
}
}
/deep/.uni-input-input {
color: #4a4a4a !important;
}
/deep/.uniui-clear {
color: #4a4a4a !important;
}
.login_btn {
background: #3774f6;
box-shadow: 0px 2px 14px 0px rgba(51, 104, 246, 0.24);
border-radius: 3px;
.login_btn_text {
width: 350px;
height: 40px;
background-color: #3774f6;
box-shadow: 0px 1px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="sampleTable">
<uni-nav-bar
:fixed="true"
background-color="rgba(214, 240, 255, 0.0)"
status-bar
rightWidth="300"
>
<block slot="left">
<view class="" @click="back">
<text class="iconfont icon-fanhui"></text
></view>
</block>
</uni-nav-bar>
<view class="main">
<!-- 占位---不可删除 -->
<view class="seize-seat"> </view>
<view class="container box-shaow-box">
<view v-if="isJF" class="image-item top-image">
<image
src="@/static/img/add-img/jf_table.png"
mode="widthFix"
></image>
</view>
<view v-else class="image-item top-image">
<image
src="@/static/img/add-img/jd_table.png"
mode="widthFix"
></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isJF: false,
};
},
onNavigationBarButtonTap(val) {
uni.navigateBack();
},
onLoad(options) {
this.isJF = options.isJF == 1;
},
methods: {
checkImage(val) {
let res = "";
res = `/static/img/report-table/report${val + 1}.png`;
return res;
},
back() {
uni.navigateBack();
},
},
};
</script>
<style lang="less" scoped>
.sampleTable {
width: 100%;
height: 100%;
background-image: linear-gradient(
90deg,
#e9f7fe 0%,
#dceffe 40%,
#d5ebfd 66%,
#c9e8fe 100%
);
.main {
margin-top: -44px;
width: 100%;
background-size: 100% 40rpx;
background-repeat: no-repeat;
.container {
margin: 0 auto;
width: 730rpx;
height: calc(100vh - 44px - var(--status-bar-height) - 20px);
padding: 23.53rpx 17.65rpx;
padding-bottom: 0;
// width: 341.18rpx;
overflow: auto;
display: flex;
flex-wrap: wrap;
justify-sampletable: space-between;
.image-item {
text-align: center;
width: 60%;
height: 100%;
background-color: #ffffff;
border-radius: 4px;
margin: 0 auto;
}
.top-image {
height: 288.24rpx;
}
image {
width: 100%;
box-shadow: 0px 0px 9.41rpx 0px rgba(84, 116, 232, 0.2);
// object-fit: contain;
}
}
}
.seize-seat {
height: 50px;
width: 100%;
background-image: linear-gradient(
90deg,
#e9f7fe 0%,
#dceffe 40%,
#d5ebfd 66%,
#c9e8fe 100%
);
}
// 导航栏样式
.uni-nav-bar-text {
height: 36px;
width: 36px;
background: #ffffff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 18px;
border-radius: 50%;
color: #333;
text-align: center;
.iconfont {
font-size: 20px;
line-height: 36px;
}
}
}
</style>
<template>
<view class="sampleTable">
<uni-nav-bar :fixed="true" background-color="rgba(214, 240, 255, 0.0)" status-bar rightWidth="300">
<block slot="left">
<view class="" @click="back">
<text class="iconfont icon-fanhui"></text>
</view>
</block>
</uni-nav-bar>
<view class="main">
<!-- 占位---不可删除 -->
<view class="seize-seat"> </view>
<view class="container box-shaow-box">
<view v-if="isJF" class="image-item top-image">
<image src="@/static/img/add-img/jf_table_new.png" mode="widthFix"></image>
</view>
<view v-else class="image-item top-image">
<image src="@/static/img/add-img/jd_table.png" mode="widthFix"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isJF: false,
};
},
onNavigationBarButtonTap(val) {
uni.navigateBack();
},
onLoad(options) {
this.isJF = options.isJF == 1;
},
methods: {
checkImage(val) {
let res = "";
res = `/static/img/report-table/report${val + 1}.png`;
return res;
},
back() {
uni.navigateBack();
},
},
};
</script>
<style lang="less" scoped>
.sampleTable {
width: 100%;
height: 100%;
background-image: linear-gradient(90deg,
#e9f7fe 0%,
#dceffe 40%,
#d5ebfd 66%,
#c9e8fe 100%);
.main {
margin-top: -44px;
width: 100%;
background-size: 100% 40rpx;
background-repeat: no-repeat;
.container {
margin: 0 auto;
height: calc(100vh - 44px - var(--status-bar-height) - 20px);
padding: 23.53rpx 17.65rpx;
padding-bottom: 0;
overflow: auto;
display: flex;
flex-wrap: wrap;
justify-sampletable: space-between;
.image-item {
text-align: center;
width: 80%;
height: 100%;
background-color: #ffffff;
border-radius: 4px;
margin: 0 auto;
}
.top-image {
height: 288.24rpx;
}
image {
width: 100%;
box-shadow: 0px 0px 9.41rpx 0px rgba(84, 116, 232, 0.2);
}
}
}
.seize-seat {
height: 50px;
width: 100%;
background-image: linear-gradient(90deg,
#e9f7fe 0%,
#dceffe 40%,
#d5ebfd 66%,
#c9e8fe 100%);
}
// 导航栏样式
.uni-nav-bar-text {
height: 36px;
width: 36px;
background: #ffffff;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 18px;
border-radius: 50%;
color: #333;
text-align: center;
.iconfont {
font-size: 20px;
line-height: 36px;
}
}
}
</style>
\ No newline at end of file
zI7Z5z3b
\ No newline at end of file
别名:__uni__a11bfd5
密码:zI7Z5z3b
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论