Commit 73212b01 authored by 熊成伟's avatar 熊成伟

debug

parent 9f9eddd0
This diff is collapsed.
......@@ -35,7 +35,7 @@
min-width: 100px;
}
.auto-list-content{
padding: 10px 20px;
padding: 10px 18px;
font-size: 14px;
line-height: 22px;
}
......@@ -8,7 +8,7 @@ const Index = () => {
<ul className="auto-step-card">
{
data.map((item, index) => (
<li className="auto-step-item">
<li className="auto-step-item" key={index}>
<div className={`auto-step-item-title ${item.s ? 'step-current' : 'step-success'}`}>
<div className="auto-step-item-title-name">发起申请(拟稿)</div>
</div>
......
......@@ -88,7 +88,7 @@
margin-top: 15px;
line-height: 41px;
border-radius: 7px;
background: rgba(0, 0, 0, 0.12);
background: rgba(0, 0, 0, 0.05);
padding: 0 15px;
}
......
......@@ -30,8 +30,8 @@ const Index = (props) => {
</div>
<div className="todo-footer">
<div>
<p>更新时间:2020-05-26 17:51</p>
<p style={{marginTop: 15}}>停滞时间:24h</p>
<p className="pos-aline"><img alt="" src="/img/time.png" className="footer-mes-img"/>更新时间:2020-05-26 17:51</p>
<p className="pos-aline footer-mes-sec"><img alt="" src="/img/time-2.png" className="footer-mes-img"/>停滞时间:24h</p>
</div>
<img
alt=""
......
......@@ -47,3 +47,11 @@
width: 40px;
height: 40px;
}
.footer-mes-img{
width: 12px;
height: 12px;
margin-right: 5px;
}
.footer-mes-sec{
margin-top: 15px;
}
import React from 'react';
import React, {Component} from 'react';
import {Icon} from 'antd-mobile'
import './index.less'
const Index = (props) => {
const topSearch = () => {
class Index extends Component {
state={
status: false
};
topSearch = () => {
const input = document.getElementsByClassName("top-single-search");
this.props.onSearch(input[0].value);
let inputValue = input[0].value
this.setState({status: (inputValue != null && inputValue != undefined && inputValue != '')})
};
clear = () => {
this.setState({status: false})
const input = document.getElementsByClassName("top-single-search");
props.onSearch(input[0].value)
input[0].value = null;
input[0].focus();
}
render() {
const {status} = this.state
return (
<div className="search-box">
<Icon type="search" size="xs" className="search-svg"/>
<input onChange={this.topSearch} className="top-single-search" placeholder="请输入关键字搜索" />
{status && (
<Icon type="cross-circle-o" color="rgba(35, 35, 35, 0.3)" size="xxs" className="clear-svg" onClick={this.clear}/>
)}
</div>
);
}
return (
<div className="search-box">
<Icon type="search" size="xs" className="search-svg"/>
<input onChange={topSearch} className="top-single-search" placeholder="请输入关键字搜索" />
</div>
);
};
}
export default Index;
......@@ -8,10 +8,15 @@
position: absolute;
padding-left: 10px;
}
.clear-svg{
position: absolute;
//float: right;
padding-left: 320px;
}
.top-single-search{
width: 100%;
height: 100%;
border:0 solid rgba(38, 104, 255, 0.2);
border-radius:6px;
padding: 0 0 0 40px;
}
\ No newline at end of file
padding: 0 40px;
}
......@@ -10,7 +10,7 @@ const Backlog = (props) => {
return (
<WingBlank>
<WhiteSpace/>
<TopSearch/>
<TopSearch onSearch={val => console.log(val)}/>
{
[{},{},{},{},{},{}].map((item, index) => (
<div key={index}>
......
import React from 'react';
import './index.less'
const Option = () => {
const Option = (props) => {
const topSearch = () => {
const input = document.getElementsByClassName("option-text");
props.onChange(input[0].value)
}
return (
<div id="event-option">
<div className="option-card">
<div className="option-title">
<div>流转意见:</div>
<a className="option-fast">常用阅办意见</a>
<a className="option-fast">常用阅办意见<img alt="" src="/img/option-icon.png" className="option-icon"/></a>
</div>
<textarea className="option-text"/>
<textarea className="option-text" onChange={topSearch}/>
</div>
</div>
);
......
......@@ -7,7 +7,7 @@ import Adjunct from './Adjunct'
import Flow from './Flow';
import Option from './Option';
//Ipone antd-mobile ActionSheet
const isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent);
let wrapProps;
if (isIPhone) {
......@@ -22,6 +22,8 @@ class Process extends Component {
this.optionBlur = this.optionBlur.bind(this)
// this.handleScroll = this.handleScroll.bind(this)
this.state = {
disabled: true,
footStatus: false,
footButton: '处理'
}
};
......@@ -31,7 +33,7 @@ class Process extends Component {
// window.addEventListener('scroll', this.handleScroll, true);
}
optionBlur = () => {
this.setState({footButton: '确认发送'})
this.setState({footButton: '确认发送', footStatus: true})
}
componentWillUnmount() {
......@@ -56,6 +58,12 @@ class Process extends Component {
const top = document.getElementById(`event-${name}`).offsetTop;
document.getElementById("event").scrollTo(0,top - 9)
};
textClick = () => {
const top = document.getElementById(`event-option`).offsetTop;
document.getElementById("event").scrollTo(0,top - 9)
document.getElementsByClassName("option-text")[0].focus();
this.optionBlur()
}
showActionSheet = () => {
const BUTTONS = ['送部门领导审核', '送办公室分管主任审批', '办结', '取消'];
......@@ -68,9 +76,14 @@ class Process extends Component {
(buttonIndex) => {
console.log(buttonIndex)
});
};
optionChange = val => {
this.setState({disabled: !(val != null && val != undefined && val != '')})
}
render() {
console.log(this.props.match.params);
const {footButton, disabled, footStatus} = this.state
return (
<div>
<TopTabs onClick={this.tabClick}/>
......@@ -83,11 +96,14 @@ class Process extends Component {
<WhiteSpace/>
<Flow/>
<WhiteSpace/>
<Option/>
<Option onChange={this.optionChange}/>
</WingBlank>
</div>
<div className="event-footer">
<div className="event-footer-button" onClick={this.showActionSheet}>
<div className={`event-footer-button ${(footStatus && disabled) ? 'button-disabled' : '' }`} onClick={footStatus && !disabled ? this.showActionSheet: this.textClick}>
{!footStatus && (
<img alt="" src="/img/process-edit.png" className="process-edit"/>
)}
{this.state.footButton}
</div>
......
......@@ -3,7 +3,7 @@
top: 44px;
left: 0;right: 0; bottom: 50px;
overflow: auto;
padding-bottom: 300px;
padding-bottom: 340px;
}
.event-footer{
height: 45px;
......@@ -23,6 +23,9 @@
.event-footer-button:active{
background: rgba(54, 147, 239, 0.8);
}
.event-footer-button.button-disabled{
background: rgba(152, 152, 152, 1);
}
.option-card{
display: flex;
justify-content: center;
......@@ -37,6 +40,8 @@
justify-content: space-between;
}
.option-fast{
display: flex;
align-items: center;
color: rgba(239, 154, 54, 1);
}
.option-text{
......@@ -78,3 +83,14 @@
height: 30px;
margin-right: 3px;
}
.option-icon{
margin-left: 10px;
width: 16px;
height: 16px;
}
.process-edit{
width: 15px;
height: 15px;
margin-right: 5px;
}
......@@ -3,16 +3,6 @@ import {WhiteSpace, WingBlank} from "antd-mobile";
import TopSearch from '../../components/TopSearch'
import WorkCard from '../../components/WorkCard'
const data = Array.from(new Array(7)).map((_val, i) => ({
id: `name${i}`,
icon: '/img/test/test.png',
text: `name${i}`,
}));
const data2 = Array.from(new Array(7)).map((_val, i) => ({
id: `name2${i}`,
icon: '/img/test/test-1.png',
text: `name${i}`,
}));
class Work extends Component {
state = {
......@@ -25,16 +15,28 @@ class Work extends Component {
workSearch = (val) => {
console.log(val)
};
itemAdd = (id) => {
console.log('add')
}
itemSlice = (id) => {
console.log('slice')
}
itemAdd = (id, arr, arr2) => {
// const item = arr2.filter(item => item.id === id);
// arr.splice(arr.length - 1, 0, item[0]);
};
itemSlice = (id, arr, arr2) => {
// const index = arr.findIndex(item => item.id == id);
// index > -1 && arr.splice(index, 1);
};
render() {
const {addStatus} = this.state;
//测试数据
const data222 = Array.from(new Array(7)).map((_val, i) => ({
id: `name${i}`,
icon: '/img/test/test.png',
text: `name${i}`,
}));
const data22222 = Array.from(new Array(7)).map((_val, i) => ({
id: `name2${i}`,
icon: '/img/test/test-1.png',
text: `name${i}`,
}));
return (
<WingBlank>
......@@ -46,7 +48,7 @@ class Work extends Component {
title="常用板块"
addCommon={this.commonEdit}
addStatus={addStatus}
data={data}
data={data222}
iconAction={this.itemSlice}
/>
<WhiteSpace/>
......@@ -54,7 +56,7 @@ class Work extends Component {
title="事物管理"
addCommon={this.commonEdit}
addStatus={addStatus}
data={data2}
data={data22222}
iconAction={this.itemAdd}
/>
</WingBlank>
......
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