Commit f6cf64b0 authored by sven's avatar sven

Merge remote-tracking branch 'origin/master'

parents 9904bbeb d86393b3
......@@ -325,7 +325,7 @@
{
name:'液位',
prop:'a1',
value:0,
value:0.7,
unit:'m',
color:'#09a8ae',
create_time:'2022-09-01 10:00'
......@@ -333,7 +333,7 @@
{
name:'调解池流量',
prop:'a2',
value:0,
value:1,
unit:'m^3/h',
color:'#ff6b6b',
create_time:'2022-09-01 10:00'
......@@ -341,7 +341,7 @@
{
name:'出水池流量',
prop:'a3',
value:0,
value:1,
unit:'m^3/h',
color:'#946fd0',
create_time:'2022-09-01 10:00'
......@@ -349,7 +349,7 @@
{
name:'厌氧池PH值',
prop:'a4',
value:0,
value:8,
unit:'',
color:'#3396fb',
create_time:'2022-09-01 10:00'
......@@ -357,7 +357,7 @@
{
name:'好氧池PH值',
prop:'a5',
value:0,
value:8,
unit:'',
color:'#28ae09',
create_time:'2022-09-01 10:00'
......@@ -365,7 +365,7 @@
{
name:'出水池PH值',
prop:'a6',
value:0,
value:8,
unit:'',
color:'#ffc019',
create_time:'2022-09-01 10:00'
......@@ -373,7 +373,7 @@
{
name:'好氧池DO值',
prop:'a7',
value:0,
value:1,
unit:'mg/l',
color:'#f8893f',
create_time:'2022-09-01 10:00'
......@@ -381,7 +381,7 @@
{
name:'MBR池DO值',
prop:'a8',
value:0,
value:1,
unit:'mg/l',
color:'#eb509d',
create_time:'2022-09-01 10:00'
......@@ -457,6 +457,7 @@
}
function initGauge(){
nextTick(()=>{
setTimeout(()=>{
state.myChart = echarts.init(chart.value);
let option = {
series: [
......@@ -549,6 +550,7 @@
state.myChart.clear();
state.myChart.setOption(option);
state.myChart.resize();
},500)
})
}
function getList(){
......@@ -558,8 +560,9 @@
let p = {
page:page,
page_size:state.list.pageSize,
toilet_id:props.site_id
};
if(state.filter.time_order[0]&&state.filter.time_order[1]){
if(state.filter.time_order&&state.filter.time_order[0]&&state.filter.time_order[1]){
p.start_time = state.filter.time_order[0];
p.end_time = state.filter.time_order[1];
}
......@@ -834,6 +837,7 @@
align-items: center;
margin-right: 55px;
.filter-name{
flex-shrink: 0;
color: #666;
margin-right: 20px;
}
......
......@@ -29,7 +29,8 @@ func Login(c *gin.Context) {
u := &system.SysUser{Username: l.Username, Password: l.Password}
key := ghelp.Md5(ghelp.CreateUnique())
prefixKey := "qsh_wc:" + key
prefix := global.GVA_VP.GetString("redis.prefix")
prefixKey := prefix + key
if user, err := userService.Login(u); err != nil {
global.GVA_LOG.Error("登陆失败! 用户名不存在或者密码错误!", zap.Error(err))
response.FailWithMessage("用户名不存在或者密码错误", c)
......
package web
import (
"fmt"
"gitee.com/zjlsliupei/ghelp"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
"github.com/flipped-aurora/gin-vue-admin/server/request"
......@@ -29,7 +30,7 @@ func GetToiletList(c *gin.Context) {
func GetToiletDetail(c *gin.Context) {
var arg request.GetId
_ = c.ShouldBindJSON(&arg)
fmt.Println(c.ShouldBindJSON(&arg))
if data, err := toiletService.GetToiletDetail(arg); err != nil {
response.FailWithMessage(err.Error(), c)
} else {
......
......@@ -118,6 +118,7 @@ qiniu:
secret-key: ""
use-cdn-domains: false
redis:
prefix: "qsh_wc_prod:"
db: 0
addr: "r-bp1cm5ncyvq2hnul81.redis.rds.aliyuncs.com:6379"
password: "rRk2k3nf9JJi283lk119Jvwz"
......
......@@ -118,6 +118,7 @@ qiniu:
secret-key: ""
use-cdn-domains: false
redis:
prefix: "qsh_wc:"
db: 0
addr: "r-bp1cm5ncyvq2hnul81.redis.rds.aliyuncs.com:6379"
password: "rRk2k3nf9JJi283lk119Jvwz"
......
......@@ -118,6 +118,7 @@ qiniu:
secret-key: ""
use-cdn-domains: false
redis:
prefix: "qsh_wc:"
db: 0
addr: "r-bp1cm5ncyvq2hnul81pd.redis.rds.aliyuncs.com:16379"
password: "rRk2k3nf9JJi283lk119Jvwz"
......
......@@ -23,7 +23,8 @@ func Token() gin.HandlerFunc {
c.Abort()
return
}
res := global.GVA_REDIS.Get(c, "qsh_wc:"+token)
prefix := global.GVA_VP.GetString("redis.prefix")
res := global.GVA_REDIS.Get(c, prefix+token)
if res.Err() != nil {
response.Result(1000, "", "token不存在", c)
......
......@@ -7,6 +7,7 @@ type PatrolList struct {
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Type int `json:"type"`
ToiletId int `json:"toilet_id"`
}
type GetPatrolId struct {
......
......@@ -7,5 +7,5 @@ type Toilet struct {
}
type GetId struct {
ID string `json:"id"`
ID int `json:"id"`
}
......@@ -60,6 +60,9 @@ func (qshPartolService *QshPartolService) GetQshPartolInfoList(info adminReq.Qsh
if info.Type != 0 {
db = db.Where("type = ?", info.Type)
}
if info.ToiletId != 0 {
db = db.Where("toilet_id = ?", info.ToiletId)
}
err = db.Count(&total).Error
if err != nil {
return
......
......@@ -28,11 +28,14 @@ func (l *PatrolService) GetPatrolList(arg request.PatrolList) ([]admin.QshPatrol
if arg.Type != 0 {
db.Where("type = ?", arg.Type)
}
if arg.ToiletId != 0 {
db.Where("toilet_id = ?", arg.ToiletId)
}
err := db.Count(&total).Error
if err != nil {
return patrolList, total, err
}
err = db.Limit(limit).Offset(offset).Preload("Toilet").Find(&patrolList).Error
err = db.Debug().Limit(limit).Offset(offset).Preload("Toilet").Find(&patrolList).Error
if err != nil {
return patrolList, total, err
}
......
......@@ -26,7 +26,8 @@ func (l *ToiletService) GetToiletList(toilet request.Toilet) ([]admin.QshToilet,
func (l *ToiletService) GetToiletDetail(toilet request.GetId) (admin.QshToilet, error) {
var toiletInfo admin.QshToilet
err := global.GVA_DB.Model(toiletInfo).First(&toiletInfo).Error
err := global.GVA_DB.Model(toiletInfo).Where("id = ?", toilet.ID).First(&toiletInfo).Error
if err != nil {
return toiletInfo, err
}
......
......@@ -5,8 +5,6 @@
<img src="../../assets/notFound.png">
<p>页面被神秘力量吸走了(如果您是开源版请联系我们修复)</p>
<p style="font-size:18px;line-height:40px;">常见问题为当前此角色无当前路由,如果确定要使用本路由,请到角色管理进行分配</p>
<p></p>
<img src="../../assets/qm.png" class="leftPic">
</div>
</div>
</div>
......
......@@ -41,48 +41,48 @@
</p>
<p class="person-info">这个家伙很懒,什么都没有留下</p>
</div>
<div class="user-information">
<ul>
<li>
<el-icon>
<user />
</el-icon>
{{ userStore.userInfo.nickName }}
</li>
<el-tooltip
class="item"
effect="light"
content="北京反转极光科技有限公司-技术部-前端事业群"
placement="top"
>
<li>
<el-icon>
<data-analysis />
</el-icon>
北京反转极光科技有限公司-技术部-前端事业群
</li>
</el-tooltip>
<li>
<el-icon>
<video-camera />
</el-icon>
中国·北京市·朝阳区
</li>
<el-tooltip
class="item"
effect="light"
content="GoLang/JavaScript/Vue/Gorm"
placement="top"
>
<li>
<el-icon>
<medal />
</el-icon>
GoLang/JavaScript/Vue/Gorm
</li>
</el-tooltip>
</ul>
</div>
<!--<div class="user-information">-->
<!--<ul>-->
<!--<li>-->
<!--<el-icon>-->
<!--<user />-->
<!--</el-icon>-->
<!--{{ userStore.userInfo.nickName }}-->
<!--</li>-->
<!--<el-tooltip-->
<!--class="item"-->
<!--effect="light"-->
<!--content="北京反转极光科技有限公司-技术部-前端事业群"-->
<!--placement="top"-->
<!--&gt;-->
<!--<li>-->
<!--<el-icon>-->
<!--<data-analysis />-->
<!--</el-icon>-->
<!--北京反转极光科技有限公司-技术部-前端事业群-->
<!--</li>-->
<!--</el-tooltip>-->
<!--<li>-->
<!--<el-icon>-->
<!--<video-camera />-->
<!--</el-icon>-->
<!--中国·北京市·朝阳区-->
<!--</li>-->
<!--<el-tooltip-->
<!--class="item"-->
<!--effect="light"-->
<!--content="GoLang/JavaScript/Vue/Gorm"-->
<!--placement="top"-->
<!--&gt;-->
<!--<li>-->
<!--<el-icon>-->
<!--<medal />-->
<!--</el-icon>-->
<!--GoLang/JavaScript/Vue/Gorm-->
<!--</li>-->
<!--</el-tooltip>-->
<!--</ul>-->
<!--</div>-->
</div>
</div>
</el-col>
......@@ -91,27 +91,6 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="账号绑定" name="second">
<ul>
<li>
<p class="title">密保手机</p>
<p class="desc">
已绑定手机:{{ userStore.userInfo.phone }}
<a href="javascript:void(0)" @click="changePhoneFlag = true">立即修改</a>
</p>
</li>
<li>
<p class="title">密保邮箱</p>
<p class="desc">
已绑定邮箱:{{ userStore.userInfo.email }}
<a href="javascript:void(0)" @click="changeEmailFlag = true">立即修改</a>
</p>
</li>
<li>
<p class="title">密保问题</p>
<p class="desc">
未设置密保问题
<a href="javascript:void(0)">去设置</a>
</p>
</li>
<li>
<p class="title">修改密码</p>
<p class="desc">
......
......@@ -5,6 +5,12 @@
<el-form-item label="工单标题">
<el-input v-model="searchInfo.title" placeholder="搜索条件"/>
</el-form-item>
<el-form-item label="公厕名称">
<el-select v-model="searchInfo.toiletId" placeholder="请选择" style="width:100%" clearable>
<el-option v-for="(item,key) in toiletList" :key="key" :label="item.name"
:value="item.ID"/>
</el-select>
</el-form-item>
<el-form-item label="巡检类型" prop="type">
<el-select v-model="searchInfo.type" clearable placeholder="请选择"
@clear="()=>{searchInfo.type=undefined}">
......@@ -52,7 +58,9 @@
</el-table-column>
<el-table-column align="left" label="异常描述" prop="description" min-width="180"/>
<el-table-column align="left" label="巡视人" prop="partolName" min-width="120"/>
<el-table-column align="left" label="巡检公厕" prop="toiletId" min-width="120"/>
<el-table-column align="left" label="巡检公厕" prop="toiletId" min-width="180">
<template #default="scope">{{ toiletList.find(one=>one.ID==scope.row.toiletId)?.name||'--' }}</template>
</el-table-column>
<el-table-column align="left" label="创建时间" min-width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
......@@ -228,11 +236,19 @@
const pageSize = ref(10)
const tableData = ref([])
const toiletList = ref([])
const searchInfo = ref({})
const searchInfo = ref({
title:'',
toiletId:'',
type:'',
})
// 重置
const onReset = () => {
searchInfo.value = {}
searchInfo.value = {
title:'',
toiletId:'',
type:'',
}
}
// 搜索
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment