Commit 759a18ec by zhanxin liu

fix

parent 34593be7
var url = ""; var url = "http://47.94.204.226";
var addressSelectionTemp = []; var addressSelectionTemp = [];
var user = {}; var user = {};
var sysInfo = {};
export default{ export default{
url, url,
addressSelectionTemp, addressSelectionTemp,
user user,
sysInfo
} }
\ No newline at end of file
...@@ -6,5 +6,5 @@ page { ...@@ -6,5 +6,5 @@ page {
position: relative; /* 下拉刷新区域相对自身定位 */ position: relative; /* 下拉刷新区域相对自身定位 */
height: auto; /* 不可固定高度,否则overflow: hidden, 可通过设置最小高度使列表不满屏仍可下拉*/ height: auto; /* 不可固定高度,否则overflow: hidden, 可通过设置最小高度使列表不满屏仍可下拉*/
overflow: hidden; /* 遮住顶部下拉刷新区域 */ overflow: hidden; /* 遮住顶部下拉刷新区域 */
box-sizing: border-box; /* 避免设置padding出现双滚动条的问题 */ box-sizing: border-box; /* 避免设置padding出现双滚动条的问题 */
} }
\ No newline at end of file
<template> <template>
<view class="content"> <view class="content">
<text class="title">实验室名称:{{title}}</text> <text class="title"> 实验室名称: {{objectData.name}}</text>
<text class="title">位置</text> <text class="title" style="margin-top: 30rpx;">位置</text>
<view class="location-container"> <view class="location-container">
<text class="title">{{location}}</text> <text class="location">{{objectData.name}}</text>
<image class="arrow-right" src="../../static/common/arrow_right_gray.png"> </view>
<text class="title" style="margin-top: 30rpx;">整改项详情</text>
<view style="width: 100%;">
<textarea class="detail" />
</view>
<text class="title" style="margin-top: 30rpx;">整改项照片</text>
<view style="width: 100%;display: flex;align-items: flex-start; justify-content: flex-start;margin-top: 30rpx;">
<view>
<button @click="onclick" class="camera-button">
<image class="camera" src="../../static/common/camera.png">
</button>
</view>
</view> </view>
<textarea class="detail" />
<button @click="onclick" class="camera-button">
<image class="camera" src="../../static/common/camera.png">
</button>
<button hover-class="submithover" @click="onSubmitClick" class="submit-button"> <button hover-class="submithover" @click="onSubmitClick" class="submit-button">
<text class="submittext">提交</text> <text class="submittext">提交</text>
</button> </button>
...@@ -26,46 +33,121 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue" ...@@ -26,46 +33,121 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue"
export default { export default {
data() { data() {
return { return {
title: '虚拟仿真实验室',
location:"某个地址可能很长",
showActionSheet: false, showActionSheet: false,
maskClosable: true, maskClosable: true,
tips: "确认清空搜索历史吗?", tips: "请选择",
itemList: [],
color: "#9a9a9a", color: "#9a9a9a",
size: 26, size: 26,
isCancel: true, isCancel: true,
cityInfo:[], itemList: [{text:"打开相机"},{text:"从相册中选择"}],
maxLevel:4 objectData:{},
checkitem:{},
taskId:"",
images:[],
room:{}
} }
}, },
onLoad() { onLoad() {
var that = this;
uni.$on('addressSave',function(data){ uni.$on('addressSave',function(data){
console.log(this.GLOBALUTIL.addressSelectionTemp);
})
uni.$on('safeReportData',function(data){
that.objectData = data[0]
that.checkitem = data[1]
that.taskId = data[2]
}) })
}, },
onUnload(){ onUnload(){
var that = this
uni.$off('addressSave',function(data){ uni.$off('addressSave',function(data){
this.GLOBALUTIL.addressSelectionTemp = []; that.GLOBALUTIL.addressSelectionTemp = [];
})
uni.$on('safeReportData',function(data){
}) })
}, },
methods: { methods: {
onclick: function() { onclick: function() {
uni.chooseImage({ this.showActionSheet = true;
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
console.log(JSON.stringify(res));
}
});
}, },
onSubmitClick: function() { onSubmitClick: function() {
uni.navigateTo({ // uni.navigateTo({
url:'../../components/address-select/index?maxLevel='+this.maxLevel // url:'../../components/address-select/index?maxLevel='+this.maxLevel
}); // });
var body = {
"check_scope":JSON.stringify(this.objectData),
"check_item_id":this.checkitem.id,
"check_list_id":this.checkitem.check_list_id,
"check_task_id":this.taskId,
"images":JSON.stringify(this.images),
"place":this.objectData.name,
"description":this.description,
"room":JSON.stringify(this.room)
}
var user = {};
user.id = this.GLOBALUTIL.user.userid;
user.name = encodeURI(this.GLOBALUTIL.user.username);
uni.request({
url: this.GLOBALUTIL.url+'/safety/v1/danger',
method: 'POST',
body:JSON.stringify(body),
header: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'user' : JSON.stringify(user)
},
success: (res) => {
console.log(res)
}
})
},
itemClick: function(item) {
var that = this
if(item.index == 0){
uni.chooseImage({
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['camera'], //相机
success: function (res) {
var imgPath = res.tempFilePaths;
that.uploadPic(imgPath);
}
});
}else{
uni.chooseImage({
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
var imgPath = res.tempFilePaths;
that.uploadPic(imgPath);
}
});
}
this.closeActionSheet();
}, },
itemClick: function() { uploadPic(imgPath){
var currentTime = new Date().getTime();
var formData = new FormData();
let file = {uri: imgPath, type: 'application/octet-stream', name: currentTime+'.jpg'};
formData.append("file", file);
var user = {};
user.id = this.GLOBALUTIL.user.userid;
user.name = encodeURI(this.GLOBALUTIL.user.username);
console.log(formData)
uni.request({
url: this.GLOBALUTIL.url+'/safety/v1/file/image',
method: 'POST',
body:formData,
header: {
'Accept': 'application/json',
'Content-Type': 'multipart/form-data',
'user' : JSON.stringify(user)
},
success: (res) => {
console.log(res)
}
})
}, },
closeActionSheet: function() { closeActionSheet: function() {
this.showActionSheet = false this.showActionSheet = false
...@@ -84,8 +166,6 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue" ...@@ -84,8 +166,6 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue"
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
justify-content: center;
} }
.logo { .logo {
...@@ -103,7 +183,7 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue" ...@@ -103,7 +183,7 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue"
} }
.title { .title {
font-size: 36rpx; font-size: 30rpx;
color: #8f8f94; color: #8f8f94;
} }
.loginbtn { .loginbtn {
...@@ -124,7 +204,7 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue" ...@@ -124,7 +204,7 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue"
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; width:100%;
} }
.arrow-right{ .arrow-right{
width:40rpx; width:40rpx;
...@@ -150,6 +230,7 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue" ...@@ -150,6 +230,7 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue"
justify-content: center; justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%); background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx; border-radius: 15rpx;
margin-top: 80rpx;
} }
.submittext { .submittext {
font-size: 14px; font-size: 14px;
...@@ -160,12 +241,16 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue" ...@@ -160,12 +241,16 @@ import uniNavBar from "@/components/uni-header/uni-nav-bar/uni-nav-bar.vue"
opacity: 0.7; opacity: 0.7;
} }
.detail { .detail {
width:400rpx; width:100%;
height:100rpx; height:300rpx;
border: 1rpx solid #000000; border: 1rpx solid #000000;
} }
.status_bar { .status_bar {
height: var(--status-bar-height); height: var(--status-bar-height);
width: 100%; width: 100%;
}
.location{
font-size: 34rpx;
color: #000000;
} }
</style> </style>
<template> <template>
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback"> <mescroll-body class="containter" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback">
<view class="news-li" v-for="(item,index) in dataList" :key="index"> <view v-if="isShow" class="news-li" v-for="(item,index) in dataList" :key="index">
<view> <view>
<text>{{index}}.{{item.text}}</text> <text>{{index}}.{{item.content}}</text>
</view> </view>
<view style="display: flex;flex-direction: row; width: 100%;justify-content: space-between;"> <view style="display: flex;flex-direction: row; width:690rpx;justify-content: space-between;margin-top:20rpx;">
<view style="display: flex;flex-direction: row;"> <view style="display: flex;flex-direction: row;justify-content: flex-start;">
<view class="item-container" @click="itemClick(index,1)"> <view v-for="(obj,index1) in checkitems" :key="index1">
<view :class="item.status==1? 'selected' :'unselected' "></view> <view class="item-container" @click="itemClick(index,index1)">
<text>符合</text> <view :class="item.status==index1? 'selected' :'unselected' "></view>
</view> <text>{{obj.name}}</text>
<view class="item-container" @click="itemClick(index,2)"> </view>
<view :class="item.status==2? 'selected' :'unselected' "></view>
<text>不符合</text>
</view>
<view class="item-container" @click="itemClick(index,3)">
<view :class="item.status==3? 'selected' :'unselected' "></view>
<text>不适用</text>
</view> </view>
</view> </view>
<view ><image @click="checkItem(item)" class="icon" src="../../static/security-check/safeEdit.png"></view> <view ><image @click="checkItem(item)" class="icon" src="../../static/security-check/safeEdit.png"></view>
</view> </view>
</view> </view>
<button hover-class="submithover" @click="onSubmitClick" class="submit-button">
<text class="submittext">提交</text>
</button>
</mescroll-body> </mescroll-body>
</template> </template>
...@@ -34,13 +31,36 @@ ...@@ -34,13 +31,36 @@
downOption: { downOption: {
auto: false //是否在初始化后,自动执行downCallback; 默认true auto: false //是否在初始化后,自动执行downCallback; 默认true
}, },
dataList: [{text:"问题",status:1},{text:"问题",status:1},{text:"问题",status:1},{text:"问题",status:1}], dataList: [],
upOption: { upOption: {
use: false, // 是否启用上拉加载; 默认true use: false, // 是否启用上拉加载; 默认true
}, },
isShow:false,
checkitems:[],
objectData:{},
taskId:""
} }
}, },
methods: { methods: {
onLoad() {
var that = this;
uni.$on('sendCheckItem',function(data){
that.objectData = data[0]
that.taskId = data[2];
var content = data[1].children
content.map((opt)=>{
opt.status = 0;
// opt.checkitems = [];
})
that.dataList = content;
})
this.loadData();
},
onUnload(){
uni.$off('sendCheckItem',function(data){
})
},
/*下拉刷新的回调 */ /*下拉刷新的回调 */
downCallback() { downCallback() {
this.mescroll.endSuccess(); this.mescroll.endSuccess();
...@@ -55,12 +75,40 @@ ...@@ -55,12 +75,40 @@
}) })
}, },
itemClick(index,status){ itemClick(index,status){
this.dataList[index].status = status this.dataList[index].status = status;
this.$forceUpdate();
}, },
checkItem(){ checkItem(item){
uni.navigateTo({ uni.navigateTo({
url:"./index" url:"./index"
}) })
uni.$emit("safeReportData",[this.objectData,item,this.taskId]);
},
loadData(){
var user = {};
user.id = this.GLOBALUTIL.user.userid;
user.name = encodeURI(this.GLOBALUTIL.user.username);
uni.request({
url: this.GLOBALUTIL.url+'/base-data/v1/dict-items?sort_property=ID&sort_direction=ASC&dict_code=JCJG&page_number=1&page_size=10',
method: 'GET',
header: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'user' : JSON.stringify(user)
},
body:null,
success: (res) => {
this.dataList.map((opt)=>{
opt.checkitems = res.data.data;
})
this.checkitems = res.data.data;
this.isShow = true;
}
})
},
onSubmitClick(){
} }
} }
} }
...@@ -75,10 +123,13 @@ ...@@ -75,10 +123,13 @@
text-align: center; text-align: center;
} }
/*展示上拉加载的数据列表*/ /*展示上拉加载的数据列表*/
.news-li{ .news-li{
display: flex;
flex-direction: column;
font-size: 32upx; font-size: 32upx;
padding: 32upx; padding: 32upx;
border-bottom: 1upx solid #eee; border-bottom: 1upx solid #eee;
width: 100%;
} }
.news-li .new-content{ .news-li .new-content{
font-size: 28upx; font-size: 28upx;
...@@ -113,5 +164,30 @@ ...@@ -113,5 +164,30 @@
height:40rpx; height:40rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
border: 1rpx solid #00CE47 ; border: 1rpx solid #00CE47 ;
}
.containter{
display: flex;
width: 100%;
}
.submit-button {
display: flex;
width:600rpx;
height:60rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
position: absolute;
left: 50%;
bottom: 60rpx;
margin-left: -300rpx;
}
.submittext {
font-size: 14px;
color: #FFFFFF;
font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.submithover{
opacity: 0.7;
} }
</style> </style>
<template> <template>
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback"> <mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback">
<view class="news-li" v-for="news in dataList" :key="news.id" hover-class="hover" @click="goDetail"> <view class="news-li" v-for="news in dataList" :key="news.id" hover-class="hover" @click="goDetail(news)">
<view class="top-container" > <view class="top-container" >
<text class="title">安全检查任务</text> <text class="title">{{news.name}}</text>
<view class="status"> <view class="status">
<text class="status-text">未完成 0/1</text> <text class="status-text">{{news.taskstatus}}</text>
</view> </view>
</view> </view>
<view><text class="des">打我撒</text></view> <view><text class="des">{{news.check_point}}</text></view>
<view><image class="icon" src="../../static/security-check/safeTime.png"><text class="">2020-20123</text></view> <view><image class="icon" src="../../static/security-check/safeTime.png"><text class="detail">{{JSON.parse(news.schedule).startdate}}~{{JSON.parse(news.schedule).enddate}}</text></view>
<view><image class="icon" src="../../static/security-check/safeSys.png"><text>城建楼宿舍</text></view> <view style="display: flex;flex-direction: row;align-items: center;">
<view><image class="icon" src="../../static/security-check/safePerson.png"><text>陆冬梅</text></view> <image class="icon" src="../../static/security-check/safeSys.png">
<view><text>自建任务</text></view> <view style="display: flex;flex-direction: column;" v-for="(data,index) in JSON.parse(news.check_scope)" :key="index" >
<text class="detail">{{data.name}}</text>
</view>
</view>
<view><image class="icon" src="../../static/security-check/safePerson.png"><text class="detail">陆冬梅</text></view>
<view><text class="type">自建任务</text></view>
</view> </view>
</mescroll-body> </mescroll-body>
</template> </template>
...@@ -25,13 +30,16 @@ ...@@ -25,13 +30,16 @@
downOption: { downOption: {
auto: false //是否在初始化后,自动执行downCallback; 默认true auto: false //是否在初始化后,自动执行downCallback; 默认true
}, },
dataList: [1,2,3,4,5,6,6,7,8,8], dataList: [],
upOption: { upOption: {
use: false, // 是否启用上拉加载; 默认true use: false, // 是否启用上拉加载; 默认true
}, },
} }
}, },
methods: { methods: {
onLoad() {
this.loadData();
},
/*下拉刷新的回调 */ /*下拉刷新的回调 */
downCallback() { downCallback() {
this.mescroll.endSuccess(); this.mescroll.endSuccess();
...@@ -40,9 +48,60 @@ ...@@ -40,9 +48,60 @@
upCallback(page) { upCallback(page) {
}, },
goDetail(){ /*获取列表*/
loadData(){
var body = {};
var user = {};
user.id = this.GLOBALUTIL.user.userid;
user.name = encodeURI(this.GLOBALUTIL.user.username);
uni.request({
url: this.GLOBALUTIL.url+'/safety/v1/check-tasks?page_size=200&page_number=1',
method: 'GET',
header: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'user' : JSON.stringify(user)
},
body:null,
success: (res) => {
var data = res.data.data;
data.map((opt)=>{
opt.taskstatus = this.handleStatus(opt);
var taskexecutor = JSON.parse(opt.excutor);
var taskexecutortext = "";
taskexecutor.map((opt)=>{
taskexecutortext = opt.name +" ";
})
opt.taskexecutor = taskexecutortext;
})
this.dataList = data;
}
})
},
handleStatus(data){
var text = "";
if(data.execute_state){
var check_scope = JSON.parse(data.check_scope);
text = "已完成" + check_scope.length +"/" + check_scope.length;
}else{
var check_scope = JSON.parse(data.check_scope);
var checked = 0;
check_scope.map((opt)=>{
if(opt.execute_state){
checked++
}
})
if(checked == check_scope.length){
text = "已完成 " + check_scope.length +"/" + check_scope.length;
}else{
text = '未完成 '+checked+'/'+check_scope.length;
}
}
return text
},
goDetail(data){
uni.navigateTo({ uni.navigateTo({
url:"./select-checkobject" url:"./select-checkobject?taskId="+data.id
}) })
} }
} }
...@@ -72,6 +131,7 @@ ...@@ -72,6 +131,7 @@
.icon { .icon {
width:20rpx; width:20rpx;
height:20rpx; height:20rpx;
margin-right: 20rpx;
} }
.top-container { .top-container {
display: flex; display: flex;
...@@ -103,5 +163,11 @@ ...@@ -103,5 +163,11 @@
font-weight:200; font-weight:200;
font-size:14px; font-size:14px;
color:#676767 color:#676767
}
.detail {
font-size:14px;
}
.type {
font-size:14px;
} }
</style> </style>
<template> <template>
<view class="content"> <view class="content">
<text class="title">检查对象</text> <view style="width: 100%;margin-top: 20rpx;"><text class="title">检查对象</text></view>
<view class="location-container" @click="showPicker"> <view class="location-container" @click="showObjectPicker">
<text class="title">{{location}}</text> <text class="value">{{selObjectText}}</text>
<image class="arrow-right" src="../../static/common/arrow_right_gray.png"> <image class="arrow-right" src="../../static/common/arrow_right_gray.png">
</view> </view>
<text class="title">检查项类型</text> <view style="width: 100%;margin-top: 20rpx;"><text class="title">检查项类型</text></view>
<view class="location-container" @click="showPicker"> <view class="location-container" @click="showTypePicker">
<text class="title">{{location}}</text> <text class="value">{{selectItemText}}</text>
<image class="arrow-right" src="../../static/common/arrow_right_gray.png"> <image class="arrow-right" src="../../static/common/arrow_right_gray.png">
</view> </view>
<button hover-class="submithover" @click="onSubmitClick" class="submit-button"> <button hover-class="submithover" @click="onSubmitClick" class="submit-button">
...@@ -29,23 +29,24 @@ import Picker from "@/components/w-picker/w-picker.vue"; ...@@ -29,23 +29,24 @@ import Picker from "@/components/w-picker/w-picker.vue";
export default { export default {
data() { data() {
return { return {
title: '虚拟仿真实验室',
location:"",
showActionSheet: false, showActionSheet: false,
maskClosable: true, itemList: [],
tips: "确认清空搜索历史吗?", taskId:"",
itemList: [{label:"aaa",value:"10"}], selObject:"",
color: "#9a9a9a", selObjectText:"",
size: 26, selectItem:"",
isCancel: true, selectItemText:"",
cityInfo:[], objectarr:[],
maxLevel:4 itemarr:[],
curType:"object",
objectData:[],
itemData:[]
} }
}, },
onLoad() { onLoad(option) {
this.taskId = option.taskId
}, this.loadTaskObject();
},
methods: { methods: {
itemClick: function() { itemClick: function() {
...@@ -54,15 +55,103 @@ import Picker from "@/components/w-picker/w-picker.vue"; ...@@ -54,15 +55,103 @@ import Picker from "@/components/w-picker/w-picker.vue";
this.showActionSheet = false this.showActionSheet = false
}, },
onConfirm(data){ onConfirm(data){
console.log(data) if(this.curType == "object"){
this.selObject = data.checkValue[0];
this.selObjectText = data.checkArr[0];
this.itemarr = [];
this.selectItem = "";
this.selectItemText = "";
this.loadItemData();
}else{
this.selectItem = data.checkValue[0];
this.selectItemText = data.checkArr[0];
}
}, },
onSubmitClick(){ onSubmitClick(){
var objectData = this.findObjectData();
var itemData = this.findItemData();
uni.navigateTo({ uni.navigateTo({
url:"security-checkitem" url:"security-checkitem"
}) })
uni.$emit("sendCheckItem",[objectData,itemData,this.taskId]);
},
showObjectPicker(){
this.itemList = this.objectarr;
this.curType = "object"
this.$refs.picker.show()
},
showTypePicker(){
if(this.selObject == ""){
return
}
this.itemList = this.itemarr;
this.curType = "item";
this.$refs.picker.show()
},
loadTaskObject(){
var user = {};
user.id = this.GLOBALUTIL.user.userid;
user.name = encodeURI(this.GLOBALUTIL.user.username);
uni.request({
url: this.GLOBALUTIL.url+'/safety/v1/check-task-scope/'+this.taskId,
method: 'GET',
header: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'user' : JSON.stringify(user)
},
body:null,
success: (res) => {
var data = res.data;
this.objectData = data;
var itemList = data.map((opt)=>{
return {label:opt.name,value:opt.id};
})
this.objectarr = itemList;
this.itemList = itemList;
}
})
}, },
showPicker(){ loadItemData(){
this.$refs.picker.show() var user = {};
user.id = this.GLOBALUTIL.user.userid;
user.name = encodeURI(this.GLOBALUTIL.user.username);
uni.request({
url: this.GLOBALUTIL.url+'/safety/v1/check-task-lists/'+this.taskId+"?check_site_id="+this.selObject,
method: 'GET',
header: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'user' : JSON.stringify(user)
},
body:null,
success: (res) => {
var data = res.data;
this.itemData = data;
var itemList = data.map((opt)=>{
return {label:opt.content,value:opt.id};
})
this.itemarr = itemList;
}
})
},
findObjectData(){
var obj = {};
this.objectData.map((opt)=>{
if(opt.id == this.selObject){
obj = opt;
}
})
return obj;
},
findItemData(){
var obj = {};
this.itemData.map((opt)=>{
if(opt.id == this.selectItem){
obj = opt;
}
})
return obj;
} }
}, },
...@@ -77,7 +166,6 @@ import Picker from "@/components/w-picker/w-picker.vue"; ...@@ -77,7 +166,6 @@ import Picker from "@/components/w-picker/w-picker.vue";
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center;
} }
.logo { .logo {
...@@ -95,8 +183,9 @@ import Picker from "@/components/w-picker/w-picker.vue"; ...@@ -95,8 +183,9 @@ import Picker from "@/components/w-picker/w-picker.vue";
} }
.title { .title {
font-size: 36rpx; font-size: 30rpx;
color: #8f8f94; color: #8f8f94;
width: 100%;
} }
.loginbtn { .loginbtn {
width:180rpx; width:180rpx;
...@@ -116,7 +205,11 @@ import Picker from "@/components/w-picker/w-picker.vue"; ...@@ -116,7 +205,11 @@ import Picker from "@/components/w-picker/w-picker.vue";
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: flex-end;
width: 100%;
height: 60rpx;
border-bottom: 1rpx solid #898989;
} }
.arrow-right{ .arrow-right{
width:40rpx; width:40rpx;
...@@ -142,6 +235,7 @@ import Picker from "@/components/w-picker/w-picker.vue"; ...@@ -142,6 +235,7 @@ import Picker from "@/components/w-picker/w-picker.vue";
justify-content: center; justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%); background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx; border-radius: 15rpx;
margin-top: 80rpx;
} }
.submittext { .submittext {
font-size: 14px; font-size: 14px;
...@@ -159,5 +253,10 @@ import Picker from "@/components/w-picker/w-picker.vue"; ...@@ -159,5 +253,10 @@ import Picker from "@/components/w-picker/w-picker.vue";
.status_bar { .status_bar {
height: var(--status-bar-height); height: var(--status-bar-height);
width: 100%; width: 100%;
} }
.value {
font-size: 30rpx;
color: #000000;
width: 100%;
}
</style> </style>
...@@ -46,15 +46,19 @@ ...@@ -46,15 +46,19 @@
return { return {
providerList: [], providerList: [],
hasProvider: false, hasProvider: false,
account: '', account: '20040998',
password: '', password: 'password',
positionTop: 0, positionTop: 0,
isDevtools: false, isDevtools: false,
} }
}, },
// computed: mapState(['forcedLogin']), // computed: mapState(['forcedLogin']),
methods: { methods: {
onLoad() {
const sysInfo = uni.getSystemInfoSync();
console.log(sysInfo.windowWidth)
this.GLOBALUTIL.sysInfo = sysInfo
},
initPosition() { initPosition() {
/** /**
* 使用 absolute 定位,并且设置 bottom 值进行定位。软键盘弹出时,底部会因为窗口变化而被顶上来。 * 使用 absolute 定位,并且设置 bottom 值进行定位。软键盘弹出时,底部会因为窗口变化而被顶上来。
...@@ -73,7 +77,7 @@ ...@@ -73,7 +77,7 @@
} }
var bodyStr = form.join("&"); var bodyStr = form.join("&");
uni.request({ uni.request({
url: 'http://47.94.204.226/client/api', //仅为示例,并非真实接口地址。 url: this.GLOBALUTIL.url+'/client/api', //仅为示例,并非真实接口地址。
method: 'POST', method: 'POST',
data: body, data: body,
header: { header: {
...@@ -84,8 +88,8 @@ ...@@ -84,8 +88,8 @@
this.GLOBALUTIL.user = res.data.loginresponse this.GLOBALUTIL.user = res.data.loginresponse
console.log(res.data); console.log(res.data);
this.text = 'request success'; this.text = 'request success';
uni.reLaunch({ uni.navigateTo({
url: '../Security-Check/index', url: '../Security-Check/security-task-list',
}); });
} }
}) })
...@@ -162,7 +166,7 @@ ...@@ -162,7 +166,7 @@
*/ */
if (this.forcedLogin) { if (this.forcedLogin) {
uni.reLaunch({ uni.reLaunch({
url: '../Security-Check/index', url: '../Security-Check/security-task-list',
}); });
} else { } else {
uni.navigateBack(); uni.navigateBack();
......
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