parent
0a867b0480
commit
ea634a674c
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "接龙信息表单"
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
// logs.ts
|
||||||
|
// const util = require('../../utils/util.js')
|
||||||
|
import { formatTime } from '../../utils/util'
|
||||||
|
|
||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
logs: [],
|
||||||
|
taskList: [],
|
||||||
|
taskFlag: false,
|
||||||
|
releaseFlag: false,
|
||||||
|
id:undefined,
|
||||||
|
name:'',
|
||||||
|
property:'',
|
||||||
|
stuid:'',
|
||||||
|
deadtime:'',
|
||||||
|
addUrl:'http://localhost:81/dragon/addDragon',
|
||||||
|
updateUrl:'http://localhost:81/dragon/dragonInfo',
|
||||||
|
from: {
|
||||||
|
taskName: "",
|
||||||
|
end: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formSubmit:function(e:any){
|
||||||
|
var that = this;
|
||||||
|
//获取表单值
|
||||||
|
var formData = e.detail.value;
|
||||||
|
var url = this.data.addUrl;
|
||||||
|
if(this.data.id != undefined){
|
||||||
|
//如果是编辑按钮跳转
|
||||||
|
formData.id = this.data.id;
|
||||||
|
url = this.data.updateUrl;
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify(formData));
|
||||||
|
wx.request({
|
||||||
|
url: url,
|
||||||
|
//将其转换成JSON
|
||||||
|
data: JSON.stringify(formData),
|
||||||
|
method: 'POST',
|
||||||
|
success: function(res:any) {
|
||||||
|
var result = res.data.success;
|
||||||
|
var toastText = '请求成功';
|
||||||
|
if(!result){
|
||||||
|
toastText = '请求失败'+res.data.msg;
|
||||||
|
}
|
||||||
|
wx.showToast({
|
||||||
|
title: toastText,
|
||||||
|
duration: 2000,
|
||||||
|
})
|
||||||
|
if(result){
|
||||||
|
wx.redirectTo({
|
||||||
|
//操作结束后跳转回列表页
|
||||||
|
url: '../list1/list1',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
atTaskFlag() {
|
||||||
|
this.setData({ taskFlag: !this.data.taskFlag })
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.setData({
|
||||||
|
taskList: wx.getStorageSync("taskList") || []
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onLoad: function (options:any) {
|
||||||
|
//options为页面跳转带来的参数
|
||||||
|
var that = this;
|
||||||
|
if(options.id != undefined){
|
||||||
|
//若是由编辑按钮跳转过来的
|
||||||
|
that.setData({
|
||||||
|
id:options.id
|
||||||
|
});
|
||||||
|
wx.request({
|
||||||
|
url: 'http://localhost:81/dragon/one',
|
||||||
|
data: {'id':options.id},
|
||||||
|
method: 'GET',
|
||||||
|
success: function(res:any) {
|
||||||
|
var result = res.data.success;
|
||||||
|
if(result){
|
||||||
|
that.setData({
|
||||||
|
areaName:res.data.data.name,
|
||||||
|
priority: res.data.data.priority
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
wx.showToast({
|
||||||
|
title: '请求失败'+res.data.msg,
|
||||||
|
duration: 2000,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
@ -0,0 +1,18 @@
|
|||||||
|
<view class="release-view">
|
||||||
|
<form bindsubmit='formSubmit' bindreset='formReset'>
|
||||||
|
<label>接龙名称
|
||||||
|
<input type='text' name='name' placeholder='请输入接龙名' value='{{name}}'></input>
|
||||||
|
</label>
|
||||||
|
<label>接龙结束时间
|
||||||
|
<input type="text" name="deadtime" value="{{deadtime}}" placeholder="输入接龙结束时间" ></input>
|
||||||
|
</label>
|
||||||
|
<label>接龙详情
|
||||||
|
<input type="text" name="property" value="{{property}}" placeholder="输入接龙详情" ></input>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<view class='row'>
|
||||||
|
<button type='primary' form-type='submit' catchtap="addSelect">提交</button>
|
||||||
|
<button type='primary' form-type='reset'>清空</button>
|
||||||
|
</view>
|
||||||
|
</form>
|
||||||
|
</view>
|
@ -0,0 +1,69 @@
|
|||||||
|
/* pages/opration/opration.wxss */
|
||||||
|
.row input {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
flex-grow: 3;
|
||||||
|
border: ipx solid #09c;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 0.3rem;
|
||||||
|
box-shadow: 0 0 0.15rem #aaa;
|
||||||
|
padding: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row button {
|
||||||
|
padding: 0.3rem;
|
||||||
|
margin: 3rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
padding: 1rem;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
line-height: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row text {
|
||||||
|
flex-grow: 1.5;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.form-box picker{
|
||||||
|
margin: 30rpx 30rpx 0 0;
|
||||||
|
color: rgb(153, 153, 153);
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
background: #fff;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 4px;
|
||||||
|
margin: 10px 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
width: 100vw;
|
||||||
|
height: 4px;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.release-view{
|
||||||
|
padding: 8px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.release-view input{
|
||||||
|
border: 1px #ccc solid;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 6px 0;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarTitleText": "请完成任务提交"
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
/* pages/submit/submit.wxss */
|
|
||||||
.wrip-view {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.image {
|
|
||||||
height: 120%;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.swip {
|
|
||||||
background: rgb(243, 243, 243);
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swip-text {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 100;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 20px;
|
|
||||||
color: rgb(95, 95, 95);
|
|
||||||
}
|
|
||||||
.container{
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding-top: 10rpx;
|
|
||||||
padding-bottom: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.widget{
|
|
||||||
position: relative;
|
|
||||||
margin-top: 5rpx;
|
|
||||||
margin-bottom: 5rpx;
|
|
||||||
padding-top: 20rpx;
|
|
||||||
padding-bottom: 20rpx;
|
|
||||||
padding-left: 5rpx;
|
|
||||||
padding-right: 4rpx;
|
|
||||||
border: rgb(16, 196, 157) 1px solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row{
|
|
||||||
width: 3rem;
|
|
||||||
font-size:larger;
|
|
||||||
display: table-cell;
|
|
||||||
}
|
|
||||||
.column{
|
|
||||||
font-size:larger;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.form-box picker{
|
|
||||||
margin: 30rpx 30rpx 0 0;
|
|
||||||
color: rgb(187, 19, 19);
|
|
||||||
}
|
|
||||||
|
|
||||||
.link-row{
|
|
||||||
width: 5rem;
|
|
||||||
display: table-cell;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link{
|
|
||||||
color: blue;
|
|
||||||
display: inline-table;
|
|
||||||
}
|
|
Loading…
Reference in new issue