qzc提交

master
秦子超 2024-06-12 16:53:07 +08:00
parent 1bc56086b8
commit 9141414f35
12 changed files with 2177 additions and 12 deletions

View File

@ -152,6 +152,62 @@
"style" : {
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/gqzq/gqxx/gqxx",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/gqzq/gqxx/qk",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/gqzq/gqxx/xq",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/gqzq/gqxx/qkForm",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/gqzq/gqxx/xqForm",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/gqzq/zqxx/zqxx",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/gqzq/zqxx/table",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/gqzq/zqxx/form",
"style" :
{
"navigationBarTitleText" : ""
}
}
],

View File

@ -149,7 +149,7 @@ const warngrade = {
showStmPicker:false,
showEtmPicker:false,
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
stm:Number(moment(new Date()).add(-1,'days')),
etm:Number(new Date()),
check1:['0','30'],
check2:['6','5'],
@ -179,7 +179,7 @@ const warngrade = {
this.show = false
},
reSet() {
this.stm = Number(moment(new Date()).add(-7,'days'))
this.stm = Number(moment(new Date()).add(-1,'days'))
this.etm = Number(new Date())
this.check1 = ['0','30']
this.check2 = ['6','5']

87
pages/gqzq/gqxx/gqxx.vue Normal file
View File

@ -0,0 +1,87 @@
<template>
<view :style="{height:'100vh',overflow:'hidden'}">
<u-status-bar></u-status-bar>
<u-navbar
title="工情信息"
:autoBack="true"
:titleStyle="{
fontSize:'18px'
}"
:height='44'
:safeAreaInsetTop=true
leftIconSize='20'
leftIconColor='rgb(153, 153, 153)'
>
</u-navbar>
<u-tabs
:list="tabsOptions"
@click="tabsChange"
:scrollable=false
class="tabsClass"
:activeStyle="{color: 'rgb(37, 157, 255)',fontSize: '16px'}"
:inactiveStyle="{color: '#606266',fontSize: '16px'}"
lineColor="transparent"
itemStyle="height: 44px"
>
</u-tabs>
<uniQk v-if="tabsVal==='uniQk'" ref="childRef1"></uniQk>
<uniXq v-if="tabsVal==='uniXq'" ref="childRef2"></uniXq>
</view>
</template>
<script>
import moment from 'moment'
import uniQk from './qk.vue';
import uniXq from './xq.vue';
export default {
components: { uniQk, uniXq },
data() {
return {
tabsOptions:[
{
name:'运行情况',
components:'uniQk'
},
{
name:'工程险情',
components:'uniXq'
}
],
tabsVal:'uniQk'
};
},
methods: {
tabsChange(item) {
this.tabsVal = item.components
console.log(this.tabsVal);
},
refresh(fun) {
console.log('执行刷新')
fun()
}
},
onShow() {
if(this.tabsVal==='uniQk'){
this.$refs.childRef1.submit();
}else{
this.$refs.childRef2.submit();
}
},
}
</script>
<style lang="scss" scoped>
.myTitleStyle{
font-size: 30px;
background-color: red;
height: 200px;
}
.tabsClass{
margin-top: 44px;
height: 44px;
padding: 0 40px;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
}
</style>

362
pages/gqzq/gqxx/qk.vue Normal file
View File

@ -0,0 +1,362 @@
<template>
<view class="tabBody">
<div class="searchBox">
<div class="searchBox_left">
<u-search
shape="square"
:clearabled="true"
:showAction=false
v-model="searchVal"
placeholder='请输入工程名称/上报人'
height=40
>
</u-search>
</div>
<div class="searchBox_right">
<view
hover-class="is-hover"
class="searchBox_right_btn"
hover-stay-time=100
@click="myShow"
>
<u--image :src="'../../../static/images/filter.png'" width="22px" height="22px"></u--image>
</view>
</div>
</div>
<div class="mybody">
<div class="countNum"><text>{{getSearchVal.length}}条信息</text></div>
<div v-for="(item,index) in getSearchVal" class="listItem" @click="toForm(index)">
<div>
<div class="row1"><text>{{item.projectName}}</text></div>
<div class="row2">
<div>
<text :style="{marginRight:'5px'}">{{item.reporter}}</text>
<text>{{item.reportTime}}</text>
</div>
</div>
</div>
<div class="icon" v-show="item.isRead===0"></div>
</div>
<div :style="{height:'100px'}"></div>
</div>
<u-popup
:show="show"
mode="right"
:safeAreaInsetTop='true'
:closeOnClickOverlay='false'
@close="close"
@open="myShow">
<view :style="{padding:'10px',width:'250px'}">
<u-toast ref="uToast"></u-toast>
<text class="title">按工程类型</text>
<u-checkbox-group
placement="row"
v-model="check1"
:style="{padding:'10px 0px 20px 0px'}"
>
<u-checkbox name="1" label="水库" class="checkItem"></u-checkbox>
<u-checkbox name="2" label="水电站" class="checkItem"></u-checkbox>
</u-checkbox-group>
<text class="title">按上报时间</text>
<div :style="{display:'flex',marginTop:'10px'}">
<view
class="tmPicker"
@click="showStmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getStmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text>
</div>
<div :style="{display:'flex',marginTop:'10px'}">
<view
class="tmPicker"
@click="showEtmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getEtmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%'}"></text>
</div>
<div :style="{position:'absolute',bottom:'20px',right:'20px',display:'flex'}">
<u-button
:style="{width:'80px',marginRight:'10px'}"
text="重置"
@click="reSet"
></u-button>
<u-button
:style="{width:'80px'}"
color="rgba(217, 0, 27, 1)"
type="primary"
text="确定"
@click="submit"
></u-button>
</div>
</view>
<u-datetime-picker
:show="showStmPicker"
v-model="stm"
mode="datetime"
closeOnClickOverlay
@confirm="showStmPicker = false"
@cancel="showStmPicker = false"
@close="showStmPicker = false"
>
</u-datetime-picker>
<u-datetime-picker
:show="showEtmPicker"
v-model="etm"
mode="datetime"
closeOnClickOverlay
@confirm="showEtmPicker = false"
@cancel="showEtmPicker = false"
@close="showEtmPicker = false"
>
</u-datetime-picker>
</u-popup>
</view>
</template>
<script>
import moment from 'moment'
export default {
data() {
return {
show:false,
showStmPicker:false,
showEtmPicker:false,
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
check1:['1','2'],
list:[]
}
},
computed: {
getStmStr() {
return moment(this.stm).format('YYYY-MM-DD HH:mm:ss')
},
getEtmStr() {
return moment(this.etm).format('YYYY-MM-DD HH:mm:ss')
},
getSearchVal() {
if(this.searchVal){
return this.list.filter(o => (o.projectName?.indexOf(this.searchVal)>-1 || o.reporter?.indexOf(this.searchVal)>-1))
}else{
return this.list
}
},
},
methods: {
myShow() {
this.show = true
},
close() {
this.show = false
},
reSet() {
this.stm = Number(moment(new Date()).add(-7,'days'))
this.etm = Number(new Date())
this.check1 = ['1','2']
},
async submit() {
if(!moment(this.stm).isBefore(this.etm)){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "开始时间需小于结束时间",
})
return
}
try{
const params = {
timeSo:{
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
},
projectTypes:this.check1,
}
console.log('params',params)
const res = await uni.$http.post('/gunshiApp/xfflood/xfProjectRun/list',params)
console.log('res',res)
this.list = [...res.data.data
,
{
id:'1',
projectName:'工程名称',
projectType:'1',//(1 2)
reportType:'上报类型',
isPowerGeneration:'1',//0 1
isFloodRelease:'0',//0 1
waterLevel:'10',//(m)
inflowVolume:'21',//(m³/s)
outflowVolume:'11',//(m³/s)
reporter:'上报人',
reportTime:'2011-12-12 11:11:22',//
reportUnit:'上报单位',
moditime:'时间戳',
remark:'情况说明',
isRead:0,//0 1
},
{
id:'2',
projectName:'工程3名称3',
projectType:'2',//(1 2)
reportType:'上报类型',
isPowerGeneration:'0',//0 1
isFloodRelease:'0',//0 1
waterLevel:'3',//(m)
inflowVolume:'1',//(m³/s)
outflowVolume:'6',//(m³/s)
reporter:'上报人2',
reportTime:'2011-12-12 11:11:22',//
reportUnit:'上报单位2',
moditime:'时间戳',
remark:'情况说明2',
isRead:0,//0 1
},
{
id:'3',
projectName:'工程3名称',
projectType:'2',//(1 2)
reportType:'上报类型',
isPowerGeneration:'0',//0 1
isFloodRelease:'0',//0 1
waterLevel:'3',//(m)
inflowVolume:'1',//(m³/s)
outflowVolume:'6',//(m³/s)
reporter:'上报人2',
reportTime:'2011-12-12 11:11:22',//
reportUnit:'上报单位2',
moditime:'时间戳',
remark:'情况说明2',
isRead:0,//0 1
},
]
this.close()
}catch(e){
//TODO handle the exception
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
setTimeout(()=>{
this.close()
},1000)
}
},
toForm(myIndex) {
uni.navigateTo({
url: '/pages/gqzq/gqxx/qkForm?obj='+JSON.stringify({list:this.getSearchVal,myIndex:myIndex}) //
});
},
},
created() {
this.submit()
},
}
</script>
<style lang="scss" scoped>
.tabBody{
background-color: rgba(247, 247, 247, 1);
height: 100%;
// display: flex;
// flex-direction: column;
// align-items: center;
}
.searchBox{
height: 62px;
width: 100%;
background-color: #ffffff;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
}
.mybody{
background-color: #ffffff;
margin: 5px 5px;
padding: 5px 20px;
height: calc( 100vh - 100px );
overflow: scroll;
}
.countNum{
width: 100%;
text-align: right;
font-size: 13px;
}
.listItem{
width: 100%;
border-bottom: 1px solid #eee;
padding: 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.row1{
font-size: 14px;
font-weight: 700;
color: #333333;
width: 100%;
height: 30px;
line-height: 30px;
}
.row2{
font-size: 12px;
color: #999999;
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon{
width: 10px;
height: 10px;
border-radius: 5px;
background-color: red;
}
.searchBox_left{
width: 82%;
padding-left: 15px;
}
.searchBox_right{
width: 18%;
display: flex;
align-items: center;
justify-content: center;
}
.searchBox_right_btn{
width: 40px;
height: 40px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
}
.is-hover{
background-color: #eee;
}
.title{
display: inline-block;
font-size: 16px;
}
.checkItem{
margin-right: 10px;
}
.tmPicker{
width: 100%;
height: 30px;
border: 1px solid rgba(240, 240, 240, 1);
border-radius: 4px;
margin-right: 10px;
font-size: 14px;
display: flex;
justify-content: space-around;
align-items: center;
// padding-left: 10px;
}
</style>

275
pages/gqzq/gqxx/qkForm.vue Normal file
View File

@ -0,0 +1,275 @@
<template>
<view :style="{backgroundColor: 'rgba(247, 247, 247, 1)',height:'100vh',overflow:'hidden'}">
<u-status-bar></u-status-bar>
<u-navbar
title="查看"
:autoBack="true"
:titleStyle="{
fontSize:'18px'
}"
:height='44'
:safeAreaInsetTop=true
leftIconSize='20'
leftIconColor='rgb(153, 153, 153)'
>
</u-navbar>
<div class="bodyBg">
<div class="mybody">
<div class="myHead" v-if="list.length>1">
<div class="paging">
<view
class="paging_left"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(false)"
>{{index===0?'返回':'上一条'}}</view>
<view
class="paging_right"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(true)"
>{{index===list.length-1?'返回':'下一条'}}</view>
</div>
</div>
<div class="myscroll">
<div :style="{height:'10px'}"></div>
<div class="row">
<text class="lf">工程类型:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'1':'水库','2':'水电站'}[getRecord.projectType]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">工程名称:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.projectName"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">是否发电:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'0':'否','1':'是'}[getRecord.isPowerGeneration]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">是否泄洪:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'0':'否','1':'是'}[getRecord.isFloodRelease]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">水位(m):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.waterLevel"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">入库流量(/s):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.inflowVolume"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">出库流量(/s):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.outflowVolume"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">其他运行情况:</text>
<div class="rf">
<u--textarea
v-model="getRecord.remark"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">上报人:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reporter"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报单位:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportUnit"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报时间:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportTime"
:disabled='true'
></u--input>
</div>
</div>
<div :style="{height:'20vh'}"></div>
</div>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
record:{},
list:[],
index:0,
cs:''
}
},
created() {
this.getState()
},
computed: {
getRecord() {
return this.list[this.index] || {}
},
},
methods: {
async getState() {
try{
const id = this.getRecord.id
console.log('id',id)
const res = await uni.$http.get('/gunshiApp/xfflood/xfProjectRun/detail?id='+id)
console.log('res',res)
}catch(e){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
}
},
changePage(flag) {
if(flag){
if(this.index===this.list.length-1){
uni.navigateBack()
}else{
this.index = this.index+1
this.getState()
}
}else{
if(this.index===0){
uni.navigateBack()
}else{
this.index = this.index-1
this.getState()
}
}
}
},
onLoad(props){
const record = JSON.parse(props.obj)
this.index = record.myIndex
this.list= record.list
}
}
</script>
<style lang="scss" scoped>
.bodyBg{
display: flex;
flex-direction: column;
align-items: center;
}
.mybody{
margin-top: 50px;
padding-top: 10px;
width: 97%;
background-color: #ffffff;
}
.row{
display: flex;
margin-top: 5px;
}
.lf{
width: 25%;
min-height: 40px;
text-align: right;
line-height: 38px;
padding-right: 10px;
}
.rf{
width: 75%;
min-height: 40px;
padding-right: 20px;
padding-top: 1px;
}
.paging{
position: relative;
height: 30px;
line-height: 30px;
margin: 5px 50px 15px 50px;
display: flex;
text-align: center;
}
.paging_left{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
border-right: 0;
background: rgb(245, 247, 250);
border-radius: 8px 0 0 8px;
}
.paging_right{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
background: rgb(245, 247, 250);
border-radius: 0 8px 8px 0;
}
.is-hover{
background-color: #eee;
}
.myHead{
margin-bottom: 0px;
border-bottom: 1px solid #eee;
}
.myscroll{
height: 90vh;
overflow-y: scroll;
}
</style>

343
pages/gqzq/gqxx/xq.vue Normal file
View File

@ -0,0 +1,343 @@
<template>
<view class="tabBody">
<div class="searchBox">
<div class="searchBox_left">
<u-search
shape="square"
:clearabled="true"
:showAction=false
v-model="searchVal"
placeholder='请输入工程名称/上报人'
height=40
>
</u-search>
</div>
<div class="searchBox_right">
<view
hover-class="is-hover"
class="searchBox_right_btn"
hover-stay-time=100
@click="myShow"
>
<u--image :src="'../../../static/images/filter.png'" width="22px" height="22px"></u--image>
</view>
</div>
</div>
<div class="mybody">
<div class="countNum"><text>{{getSearchVal.length}}条信息</text></div>
<div v-for="(item,index) in getSearchVal" class="listItem" @click="toForm(index)">
<div>
<div class="row1"><text>{{item.projectName}}</text></div>
<div class="row2">
<div>
<text :style="{marginRight:'5px'}">{{item.reporter}}</text>
<text>{{item.reportTime}}</text>
</div>
</div>
</div>
<div class="icon" v-show="item.isRead===0"></div>
</div>
<div :style="{height:'100px'}"></div>
</div>
<u-popup
:show="show"
mode="right"
:safeAreaInsetTop='true'
:closeOnClickOverlay='false'
@close="close"
@open="myShow">
<view :style="{padding:'10px',width:'250px'}">
<u-toast ref="uToast"></u-toast>
<text class="title">按严重程度</text>
<u-checkbox-group
placement="col"
v-model="check1"
:style="{padding:'10px 0px 20px 0px'}"
>
<u-checkbox name="1" label="一般险情" class="checkItem"></u-checkbox>
<u-checkbox name="2" label="较大险情" class="checkItem"></u-checkbox>
<u-checkbox name="3" label="重大险情" class="checkItem"></u-checkbox>
<u-checkbox name="4" label="特别重大险情" class="checkItem"></u-checkbox>
</u-checkbox-group>
<text class="title">按工程类型</text>
<u-checkbox-group
placement="row"
v-model="check2"
:style="{padding:'10px 0px 20px 0px'}"
>
<u-checkbox name="1" label="水库" class="checkItem"></u-checkbox>
<u-checkbox name="2" label="水电站" class="checkItem"></u-checkbox>
</u-checkbox-group>
<text class="title">按上报时间</text>
<div :style="{display:'flex',marginTop:'10px'}">
<view
class="tmPicker"
@click="showStmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getStmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text>
</div>
<div :style="{display:'flex',marginTop:'10px'}">
<view
class="tmPicker"
@click="showEtmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getEtmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%'}"></text>
</div>
<div :style="{position:'absolute',bottom:'20px',right:'20px',display:'flex'}">
<u-button
:style="{width:'80px',marginRight:'10px'}"
text="重置"
@click="reSet"
></u-button>
<u-button
:style="{width:'80px'}"
color="rgba(217, 0, 27, 1)"
type="primary"
text="确定"
@click="submit"
></u-button>
</div>
</view>
<u-datetime-picker
:show="showStmPicker"
v-model="stm"
mode="datetime"
closeOnClickOverlay
@confirm="showStmPicker = false"
@cancel="showStmPicker = false"
@close="showStmPicker = false"
>
</u-datetime-picker>
<u-datetime-picker
:show="showEtmPicker"
v-model="etm"
mode="datetime"
closeOnClickOverlay
@confirm="showEtmPicker = false"
@cancel="showEtmPicker = false"
@close="showEtmPicker = false"
>
</u-datetime-picker>
</u-popup>
</view>
</template>
<script>
import moment from 'moment'
export default {
data() {
return {
show:false,
showStmPicker:false,
showEtmPicker:false,
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
check1:['1','2','3','4'],
check2:['1','2'],
list:[]
}
},
computed: {
getStmStr() {
return moment(this.stm).format('YYYY-MM-DD HH:mm:ss')
},
getEtmStr() {
return moment(this.etm).format('YYYY-MM-DD HH:mm:ss')
},
getSearchVal() {
if(this.searchVal){
return this.list.filter(o => (o.projectName?.indexOf(this.searchVal)>-1 || o.reporter?.indexOf(this.searchVal)>-1))
}else{
return this.list
}
},
},
methods: {
myShow() {
this.show = true
},
close() {
this.show = false
},
reSet() {
this.stm = Number(moment(new Date()).add(-7,'days'))
this.etm = Number(new Date())
this.check1 = ['1','2','3','4']
this.check2 = ['1','2']
},
async submit() {
if(!moment(this.stm).isBefore(this.etm)){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "开始时间需小于结束时间",
})
return
}
try{
const params = {
timeSo:{
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
},
severitys:this.check1,
projectTypes:this.check2,
}
console.log('params',params)
const res = await uni.$http.post('/gunshiApp/xfflood/xfProjectIncident/list',params)
console.log('res',res)
this.list = [
...res.data.data
,
{
id:'1',
projectName:'工程名称',
projectType:'1',//(1 2)
severity:'1',//1 2 3 4
incidentDescription:'险情描述',
isControlled:'1',//0 1
controlResponsiblePerson:'管控责任人',
responsiblePersonPhone:'12328281728',//
reporter:'张三',//
reportTime:'2022-11-21 10:21:11',//
reportUnit:'上报单位',
moditime:'时间戳',
remark:'情况说明',
isRead:0,//0 1
},
]
this.close()
}catch(e){
//TODO handle the exception
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
setTimeout(()=>{
this.close()
},1000)
}
},
toForm(myIndex) {
uni.navigateTo({
url: '/pages/gqzq/gqxx/xqForm?obj='+JSON.stringify({list:this.getSearchVal,myIndex:myIndex}) //
});
},
},
created() {
this.submit()
}
}
</script>
<style lang="scss" scoped>
.tabBody{
background-color: rgba(247, 247, 247, 1);
height: 100%;
// display: flex;
// flex-direction: column;
// align-items: center;
}
.searchBox{
height: 62px;
width: 100%;
background-color: #ffffff;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
}
.mybody{
background-color: #ffffff;
margin: 5px 5px;
padding: 5px 20px;
height: calc( 100vh - 100px );
overflow: scroll;
}
.countNum{
width: 100%;
text-align: right;
font-size: 13px;
}
.listItem{
width: 100%;
border-bottom: 1px solid #eee;
padding: 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.row1{
font-size: 14px;
font-weight: 700;
color: #333333;
width: 100%;
height: 30px;
line-height: 30px;
}
.row2{
font-size: 12px;
color: #999999;
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon{
width: 10px;
height: 10px;
border-radius: 5px;
background-color: red;
}
.searchBox_left{
width: 82%;
padding-left: 15px;
}
.searchBox_right{
width: 18%;
display: flex;
align-items: center;
justify-content: center;
}
.searchBox_right_btn{
width: 40px;
height: 40px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
}
.is-hover{
background-color: #eee;
}
.title{
display: inline-block;
font-size: 16px;
}
.checkItem{
margin-right: 10px;
margin-bottom: 10px;
}
.tmPicker{
width: 100%;
height: 30px;
border: 1px solid rgba(240, 240, 240, 1);
border-radius: 4px;
margin-right: 10px;
font-size: 14px;
display: flex;
justify-content: space-around;
align-items: center;
// padding-left: 10px;
}
</style>

275
pages/gqzq/gqxx/xqForm.vue Normal file
View File

@ -0,0 +1,275 @@
<template>
<view :style="{backgroundColor: 'rgba(247, 247, 247, 1)',height:'100vh',overflow:'hidden'}">
<u-status-bar></u-status-bar>
<u-navbar
title="查看"
:autoBack="true"
:titleStyle="{
fontSize:'18px'
}"
:height='44'
:safeAreaInsetTop=true
leftIconSize='20'
leftIconColor='rgb(153, 153, 153)'
>
</u-navbar>
<div class="bodyBg">
<div class="mybody">
<div class="myHead" v-if="list.length>1">
<div class="paging">
<view
class="paging_left"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(false)"
>{{index===0?'返回':'上一条'}}</view>
<view
class="paging_right"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(true)"
>{{index===list.length-1?'返回':'下一条'}}</view>
</div>
</div>
<div class="myscroll">
<div :style="{height:'10px'}"></div>
<div class="row">
<text class="lf">工程类型:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'1':'水库','2':'水电站'}[getRecord.projectType]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">工程名称:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.projectName"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">严重程度:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'1':'一般险情','2':'较大险情','3':'重大险情','4':'特别重大险情'}[getRecord.severity]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">是否已管控:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'0':'否','1':'是'}[getRecord.isControlled]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">险情描述:</text>
<div class="rf">
<u--textarea
v-model="getRecord.incidentDescription"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">管控责任人:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.controlResponsiblePerson"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">联系电话:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.responsiblePersonPhone"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">其他运行情况:</text>
<div class="rf">
<u--textarea
v-model="getRecord.remark"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">上报人:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reporter"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报单位:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportUnit"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报时间:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportTime"
:disabled='true'
></u--input>
</div>
</div>
<div :style="{height:'20vh'}"></div>
</div>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
record:{},
list:[],
index:0,
cs:''
}
},
created() {
this.getState()
},
computed: {
getRecord() {
return this.list[this.index] || {}
},
},
methods: {
async getState() {
try{
const id = this.getRecord.id
console.log('id',id)
const res = await uni.$http.get('/gunshiApp/xfflood/xfProjectIncident/detail?id='+id)
console.log('res',res)
}catch(e){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
}
},
changePage(flag) {
if(flag){
if(this.index===this.list.length-1){
uni.navigateBack()
}else{
this.index = this.index+1
this.getState()
}
}else{
if(this.index===0){
uni.navigateBack()
}else{
this.index = this.index-1
this.getState()
}
}
}
},
onLoad(props){
const record = JSON.parse(props.obj)
this.index = record.myIndex
this.list= record.list
}
}
</script>
<style lang="scss" scoped>
.bodyBg{
display: flex;
flex-direction: column;
align-items: center;
}
.mybody{
margin-top: 50px;
padding-top: 10px;
width: 97%;
background-color: #ffffff;
}
.row{
display: flex;
margin-top: 5px;
}
.lf{
width: 25%;
min-height: 40px;
text-align: right;
line-height: 38px;
padding-right: 10px;
}
.rf{
width: 75%;
min-height: 40px;
padding-right: 20px;
padding-top: 1px;
}
.paging{
position: relative;
height: 30px;
line-height: 30px;
margin: 5px 50px 15px 50px;
display: flex;
text-align: center;
}
.paging_left{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
border-right: 0;
background: rgb(245, 247, 250);
border-radius: 8px 0 0 8px;
}
.paging_right{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
background: rgb(245, 247, 250);
border-radius: 0 8px 8px 0;
}
.is-hover{
background-color: #eee;
}
.myHead{
margin-bottom: 0px;
border-bottom: 1px solid #eee;
}
.myscroll{
height: 90vh;
overflow-y: scroll;
}
</style>

View File

@ -1,10 +1,18 @@
<template>
<view class="container">
<view class="nav_bar">
<!-- <u-icon name="arrow_left" color="#000" size="28"></u-icon> -->
<view class="nav_bar_tit"> 工情灾情 </view>
</view>
<u-status-bar></u-status-bar>
<u-navbar
title="工情灾情"
:autoBack="true"
:titleStyle="{
fontSize:'18px'
}"
:height='44'
:safeAreaInsetTop=true
leftIconSize='20'
leftIconColor='rgb(153, 153, 153)'
>
</u-navbar>
<view class="info">
<div class="ul_list" @click="todetail(1)">
<div class="left">工情信息</div>
@ -27,12 +35,12 @@ export default {
console.log('val', val)
if (val == 1) {
uni.navigateTo({
url: '/pages/gqzq/gqxx'
url: '/pages/gqzq/gqxx/gqxx'
})
}
if (val == 2) {
uni.navigateTo({
url: '/pages/gqzq/zqxx'
url: '/pages/gqzq/zqxx/zqxx'
})
}
}
@ -61,8 +69,10 @@ export default {
text-align: center;
}
.info {
padding: 20px;
background-color: #fff;
padding: 20px;
padding-top: 0;
background-color: #fff;
margin-top: 44px;
margin-bottom: 12rpx;
}
.ul_list {

326
pages/gqzq/zqxx/form.vue Normal file
View File

@ -0,0 +1,326 @@
<template>
<view :style="{backgroundColor: 'rgba(247, 247, 247, 1)',height:'100vh',overflow:'hidden'}">
<u-status-bar></u-status-bar>
<u-navbar
title="查看"
:autoBack="true"
:titleStyle="{
fontSize:'18px'
}"
:height='44'
:safeAreaInsetTop=true
leftIconSize='20'
leftIconColor='rgb(153, 153, 153)'
>
</u-navbar>
<div class="bodyBg">
<div class="mybody">
<div class="myHead" v-if="list.length>1">
<div class="paging">
<view
class="paging_left"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(false)"
>{{index===0?'返回':'上一条'}}</view>
<view
class="paging_right"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(true)"
>{{index===list.length-1?'返回':'下一条'}}</view>
</div>
</div>
<div class="myscroll">
<div :style="{height:'10px'}"></div>
<div class="row">
<text class="lf">灾害发生时间:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.otime"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">严重程度:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'1':'一般险情','2':'较大险情','3':'重大险情','4':'特别重大险情'}[getRecord.severity]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">灾害发生地点:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.address"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">经度:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.lgtd"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">纬度:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.lttd"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">灾情描述:</text>
<div class="rf">
<u--textarea
v-model="getRecord.ddscrib"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">伤亡人数:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.dpcount"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">失踪人数:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.mpcount"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">转移人数:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.spcount"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">损毁房屋():</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.chcount"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">直接经济损失(万元):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.elose"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">过程降雨量(mm):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.pfrain"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">其他运行情况:</text>
<div class="rf">
<u--textarea
v-model="getRecord.remark"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">上报人:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reporter"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报单位:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportUnit"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报时间:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportTime"
:disabled='true'
></u--input>
</div>
</div>
<div :style="{height:'20vh'}"></div>
</div>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
record:{},
list:[],
index:0,
cs:''
}
},
created() {
this.getState()
},
computed: {
getRecord() {
return this.list[this.index] || {}
},
},
methods: {
async getState() {
try{
const mtcd = this.getRecord.mtcd
console.log('mtcd',mtcd)
const res = await uni.$http.get('/gunshiApp/xfflood/iaCHsfwater/detail?mtcd='+mtcd)
console.log('res',res)
}catch(e){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
}
},
changePage(flag) {
if(flag){
if(this.index===this.list.length-1){
uni.navigateBack()
}else{
this.index = this.index+1
this.getState()
}
}else{
if(this.index===0){
uni.navigateBack()
}else{
this.index = this.index-1
this.getState()
}
}
}
},
onLoad(props){
const record = JSON.parse(props.obj)
this.index = record.myIndex
this.list= record.list
}
}
</script>
<style lang="scss" scoped>
.bodyBg{
display: flex;
flex-direction: column;
align-items: center;
}
.mybody{
margin-top: 50px;
padding-top: 10px;
width: 97%;
background-color: #ffffff;
}
.row{
display: flex;
margin-top: 5px;
}
.lf{
width: 25%;
min-height: 40px;
text-align: right;
line-height: 38px;
padding-right: 10px;
}
.rf{
width: 75%;
min-height: 40px;
padding-right: 20px;
padding-top: 1px;
}
.paging{
position: relative;
height: 30px;
line-height: 30px;
margin: 5px 50px 15px 50px;
display: flex;
text-align: center;
}
.paging_left{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
border-right: 0;
background: rgb(245, 247, 250);
border-radius: 8px 0 0 8px;
}
.paging_right{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
background: rgb(245, 247, 250);
border-radius: 0 8px 8px 0;
}
.is-hover{
background-color: #eee;
}
.myHead{
margin-bottom: 0px;
border-bottom: 1px solid #eee;
}
.myscroll{
height: 90vh;
overflow-y: scroll;
}
</style>

365
pages/gqzq/zqxx/table.vue Normal file
View File

@ -0,0 +1,365 @@
<template>
<view class="tabBody">
<div class="searchBox">
<div class="searchBox_left">
<u-search
shape="square"
:clearabled="true"
:showAction=false
v-model="searchVal"
placeholder='请输入灾害发生地点/上报人'
height=40
>
</u-search>
</div>
<div class="searchBox_right">
<view
hover-class="is-hover"
class="searchBox_right_btn"
hover-stay-time=100
@click="myShow"
>
<u--image :src="'../../../static/images/filter.png'" width="22px" height="22px"></u--image>
</view>
</div>
</div>
<div class="mybody">
<div class="countNum"><text>{{getSearchVal.length}}条信息</text></div>
<div v-for="(item,index) in getSearchVal" class="listItem" @click="toForm(index)">
<div>
<div class="row1"><text>{{item.address+'('+{'1':'一般险情','2':'较大险情','3':'重大险情','4':'特别重大险情'}[item.severity]+')'}}</text></div>
<div class="row2">
<div>
<text :style="{marginRight:'5px'}">{{item.reporter}}</text>
<text>{{item.reportTime}}</text>
</div>
</div>
</div>
<div class="icon" v-show="item.isRead===0"></div>
</div>
<div :style="{height:'100px'}"></div>
</div>
<u-popup
:show="show"
mode="right"
:safeAreaInsetTop='true'
:closeOnClickOverlay='false'
@close="close"
@open="myShow">
<view :style="{padding:'10px',width:'250px'}">
<u-toast ref="uToast"></u-toast>
<text class="title">按严重程度</text>
<u-checkbox-group
placement="col"
v-model="check1"
:style="{padding:'10px 0px 20px 0px'}"
>
<u-checkbox name="1" label="一般险情" class="checkItem"></u-checkbox>
<u-checkbox name="2" label="较大险情" class="checkItem"></u-checkbox>
<u-checkbox name="3" label="重大险情" class="checkItem"></u-checkbox>
<u-checkbox name="4" label="特别重大险情" class="checkItem"></u-checkbox>
</u-checkbox-group>
<text class="title">按上报时间</text>
<div :style="{display:'flex',marginTop:'10px'}">
<view
class="tmPicker"
@click="showStmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getStmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text>
</div>
<div :style="{display:'flex',marginTop:'10px'}">
<view
class="tmPicker"
@click="showEtmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getEtmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%'}"></text>
</div>
<div :style="{position:'absolute',bottom:'20px',right:'20px',display:'flex'}">
<u-button
:style="{width:'80px',marginRight:'10px'}"
text="重置"
@click="reSet"
></u-button>
<u-button
:style="{width:'80px'}"
color="rgba(217, 0, 27, 1)"
type="primary"
text="确定"
@click="submit"
></u-button>
</div>
</view>
<u-datetime-picker
:show="showStmPicker"
v-model="stm"
mode="datetime"
closeOnClickOverlay
@confirm="showStmPicker = false"
@cancel="showStmPicker = false"
@close="showStmPicker = false"
>
</u-datetime-picker>
<u-datetime-picker
:show="showEtmPicker"
v-model="etm"
mode="datetime"
closeOnClickOverlay
@confirm="showEtmPicker = false"
@cancel="showEtmPicker = false"
@close="showEtmPicker = false"
>
</u-datetime-picker>
</u-popup>
</view>
</template>
<script>
import moment from 'moment'
export default {
data() {
return {
show:false,
showStmPicker:false,
showEtmPicker:false,
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
check1:['1','2','3','4'],
list:[]
}
},
computed: {
getStmStr() {
return moment(this.stm).format('YYYY-MM-DD HH:mm:ss')
},
getEtmStr() {
return moment(this.etm).format('YYYY-MM-DD HH:mm:ss')
},
getSearchVal() {
if(this.searchVal){
return this.list.filter(o => (o.projectName?.indexOf(this.searchVal)>-1 || o.address?.indexOf(this.searchVal)>-1))
}else{
return this.list
}
},
},
methods: {
myShow() {
this.show = true
},
close() {
this.show = false
},
reSet() {
this.stm = Number(moment(new Date()).add(-7,'days'))
this.etm = Number(new Date())
this.check1 = ['1','2','3','4']
},
async submit() {
if(!moment(this.stm).isBefore(this.etm)){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "开始时间需小于结束时间",
})
return
}
try{
const params = {
timeSo:{
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
},
severitys:this.check1,
}
console.log('params',params)
const res = await uni.$http.post('/gunshiApp/xfflood/iaCHsfwater/queryList',params)
console.log('res',res)
this.list = [
...res.data.data
,{
// id:'1',
mtcd:'12121',//
wscd:'22222',//
otime:'2022-12-12 10:22:22',//
severity:'22222',//
wscd:'3',//1 2 3 4
address:'灾害发生地点',//
lgtd:'111.21',//
lttd:'32.12',//
ddscrib:'灾害描述',//
dpcount:'2',//
mpcount:'12',//
spcount:'2211',//
chcount:'41',//
elose:'6623',//
pfrain:'41',//mm
reporter:'张三',//
reportTime:'2022-11-21 10:21:11',//
reportUnit:'上报单位',
moditime:'时间戳',
remark:'情况说明',
isRead:0,//0 1
severity:'1',//1 2 3 4
},
{
// id:'1',
mtcd:'12121',//
wscd:'22222',//
otime:'2022-12-12 10:22:22',//
severity:'22222',//
wscd:'3',//1 2 3 4
address:'灾害发生地点2',//
lgtd:'111.21',//
lttd:'32.12',//
ddscrib:'灾害描述',//
dpcount:'2',//
mpcount:'12',//
spcount:'2211',//
chcount:'41',//
elose:'6623',//
pfrain:'41',//mm
reporter:'张三',//
reportTime:'2022-11-21 10:21:11',//
reportUnit:'上报单位',
moditime:'时间戳',
remark:'情况说明',
isRead:1,//0 1
severity:'1',//1 2 3 4
},
]
this.close()
}catch(e){
//TODO handle the exception
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
setTimeout(()=>{
this.close()
},1000)
}
},
toForm(myIndex) {
uni.navigateTo({
url: '/pages/gqzq/zqxx/form?obj='+JSON.stringify({list:this.getSearchVal,myIndex:myIndex}) //
});
},
},
created() {
this.submit()
}
}
</script>
<style lang="scss" scoped>
.tabBody{
margin-top: 44px;
background-color: rgba(247, 247, 247, 1);
height: 100%;
// display: flex;
// flex-direction: column;
// align-items: center;
}
.searchBox{
height: 62px;
width: 100%;
background-color: #ffffff;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
}
.mybody{
background-color: #ffffff;
margin: 5px 5px;
padding: 5px 20px;
height: calc( 100vh - 100px );
overflow: scroll;
}
.countNum{
width: 100%;
text-align: right;
font-size: 13px;
}
.listItem{
width: 100%;
border-bottom: 1px solid #eee;
padding: 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.row1{
font-size: 14px;
font-weight: 700;
color: #333333;
width: 100%;
height: 30px;
line-height: 30px;
}
.row2{
font-size: 12px;
color: #999999;
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon{
width: 10px;
height: 10px;
border-radius: 5px;
background-color: red;
}
.searchBox_left{
width: 82%;
padding-left: 15px;
}
.searchBox_right{
width: 18%;
display: flex;
align-items: center;
justify-content: center;
}
.searchBox_right_btn{
width: 40px;
height: 40px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
}
.is-hover{
background-color: #eee;
}
.title{
display: inline-block;
font-size: 16px;
}
.checkItem{
margin-right: 10px;
margin-bottom: 10px;
}
.tmPicker{
width: 100%;
height: 30px;
border: 1px solid rgba(240, 240, 240, 1);
border-radius: 4px;
margin-right: 10px;
font-size: 14px;
display: flex;
justify-content: space-around;
align-items: center;
// padding-left: 10px;
}
</style>

51
pages/gqzq/zqxx/zqxx.vue Normal file
View File

@ -0,0 +1,51 @@
<template>
<view :style="{height:'100vh',overflow:'hidden'}">
<u-status-bar></u-status-bar>
<u-navbar
title="灾情信息"
:autoBack="true"
:titleStyle="{
fontSize:'18px'
}"
:height='44'
:safeAreaInsetTop=true
leftIconSize='20'
leftIconColor='rgb(153, 153, 153)'
>
</u-navbar>
<uniTable ref="childRef"></uniTable>
</view>
</template>
<script>
import moment from 'moment'
import uniTable from './table.vue';
export default {
components: { uniTable },
data() {
return {
};
},
methods: {
},
onShow() {
this.$refs.childRef.submit();
},
}
</script>
<style lang="scss" scoped>
.myTitleStyle{
font-size: 30px;
background-color: red;
height: 200px;
}
.tabsClass{
margin-top: 44px;
height: 44px;
padding: 0 40px;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
}
</style>

View File

@ -13,6 +13,8 @@
<uni-forms-item>
<checkbox :checked="false" @click="handleChange(formData)" /><text>记住用户名和密码</text>
</uni-forms-item>
<!-- <button type="primary" class="button" @click="xian"></button> -->
<!-- <button type="primary" class="button" @click="xiang"></button> -->
<button type="primary" class="button" @click="login(formData)"></button>
</uni-forms>
</view>
@ -40,7 +42,20 @@
checked = !checked
formData.checked = !formData.checked
},
xian() {
this.formData = {
username: 'cwz',
password: '12345678a',
checked: false,
}
},
xiang() {
this.formData = {
username: 'mdx',
password: '1234567a',
checked: false,
}
},
login(formData){
//loading