Commit b6ccbba4 authored by caichuanming's avatar caichuanming

将searchview移动到submodule

parent 55e511f0
/* eslint-disable */
// 库/框架 // 库/框架
import React, { Component } from 'react'; import React from 'react';
// 组件 // 第三方库
import { Modal, message } from 'antd'; import { Modal, message } from 'antd';
import _ from 'lodash';
import moment from 'moment'; import moment from 'moment';
import SearchView from '@/components/SearchView'; import _ from 'lodash';
import FormFilterBtn from '@/components/form-FilterButton2'; // ant_components 组件
import SelfPagination from '@/components/SelfPagination';
import BITable from '@/ant_components/BITable'; import BITable from '@/ant_components/BITable';
import BIButton from '@/ant_components/BIButton'; import BIButton from '@/ant_components/BIButton';
// 自定义组件
import SearchView from '@/submodule/components/SearchView';
import FormFilterBtn from '@/components/form-FilterButton2';
import SelfPagination from '@/components/SelfPagination';
import ButtonAuth from '@/components/AuthButton'; import ButtonAuth from '@/components/AuthButton';
import IconFont from '@/components/CustomIcon/IconFont'; import IconFont from '@/components/CustomIcon/IconFont';
// 样式 // 样式
import s from './index.less'; import styles from './index.less';
// 工具 // 工具
import antiAssign from '@/utils/anti-assign'; import antiAssign from '@/utils/anti-assign';
import { DATE_FORMAT, PAGINATION } from '@/utils/constants'; import { DATE_FORMAT, PAGINATION } from '@/utils/constants';
...@@ -254,7 +254,7 @@ function removeItem(formData, removedItem) { ...@@ -254,7 +254,7 @@ function removeItem(formData, removedItem) {
} }
// 基础数据视图 // 基础数据视图
export default class DataView extends Component { export default class DataView extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
const { const {
...@@ -640,7 +640,7 @@ export default class DataView extends Component { ...@@ -640,7 +640,7 @@ export default class DataView extends Component {
const { tips } = this.props; const { tips } = this.props;
if (tips) { if (tips) {
return ( return (
<div className={s.tips}> <div className={styles.tips}>
{tips} {tips}
{this._renderBtns()} {this._renderBtns()}
</div> </div>
...@@ -658,7 +658,7 @@ export default class DataView extends Component { ...@@ -658,7 +658,7 @@ export default class DataView extends Component {
btns = btns.concat([{ label: '删除', onClick: this.del.bind(this) }]); btns = btns.concat([{ label: '删除', onClick: this.del.bind(this) }]);
} }
return ( return (
<div className={s.row}> <div className={styles.row}>
{btns.map((item, i) => { {btns.map((item, i) => {
const { label, onClick, authority, download, iconBtnSrc, type } = item; const { label, onClick, authority, download, iconBtnSrc, type } = item;
const style = { const style = {
...@@ -675,16 +675,16 @@ export default class DataView extends Component { ...@@ -675,16 +675,16 @@ export default class DataView extends Component {
<BIButton <BIButton
style={style} style={style}
key={i} key={i}
className={s.btn} className={styles.btn}
onClick={item.type === 'del' ? this.del.bind(this, label, onClick) : onClick} onClick={item.type === 'del' ? this.del.bind(this, label, onClick) : onClick}
{...antiAssign(item, 'label,onClick,type,iconBtnSrc')} {...antiAssign(item, 'label,onClick,type,iconBtnSrc')}
> >
{iconBtnSrc && iconBtnSrc !== '' ? ( {iconBtnSrc && iconBtnSrc !== '' ? (
<IconFont className={s.iconCls} type={iconBtnSrc} /> <IconFont className={styles.iconCls} type={iconBtnSrc} />
) : ( ) : (
<IconFont className={s.iconCls} type="iconxinzeng" /> <IconFont className={styles.iconCls} type="iconxinzeng" />
)} )}
<span className={s.titleCls}>{label}</span> <span className={styles.titleCls}>{label}</span>
</BIButton> </BIButton>
)} )}
</ButtonAuth> </ButtonAuth>
...@@ -723,7 +723,7 @@ export default class DataView extends Component { ...@@ -723,7 +723,7 @@ export default class DataView extends Component {
rowSelection = rowSelectionConfig; rowSelection = rowSelectionConfig;
} }
const commonProps = { const commonProps = {
className: s.table, className: styles.table,
rowKey, rowKey,
rowSelection, rowSelection,
columns: cols, columns: cols,
...@@ -776,11 +776,11 @@ export default class DataView extends Component { ...@@ -776,11 +776,11 @@ export default class DataView extends Component {
const { style, hideForm, tips } = this.props; const { style, hideForm, tips } = this.props;
const { loading } = this.state; const { loading } = this.state;
return ( return (
<div className={s.view} style={style}> <div className={styles.view} style={style}>
<BISpin spinning={loading}> <BISpin spinning={loading}>
{hideForm ? null : ( {hideForm ? null : (
<> <>
<div className={s.formWrap}> <div className={styles.formWrap}>
{/* 筛选条件 */} {/* 筛选条件 */}
{this._renderSearchForm()} {this._renderSearchForm()}
{/* 高级搜索 */} {/* 高级搜索 */}
...@@ -788,10 +788,10 @@ export default class DataView extends Component { ...@@ -788,10 +788,10 @@ export default class DataView extends Component {
{/* 已选条件、搜索按钮 */} {/* 已选条件、搜索按钮 */}
{this._renderFilterBtn()} {this._renderFilterBtn()}
</div> </div>
<div className={s.split} /> <div className={styles.split} />
</> </>
)} )}
<div className={s.tableWrap}> <div className={styles.tableWrap}>
{tips ? this._renderTips() : this._renderBtns()} {tips ? this._renderTips() : this._renderBtns()}
{this._renderData()} {this._renderData()}
{this._renderPagination()} {this._renderPagination()}
......
This diff is collapsed.
@import '~@/theme/common';
@smallSpace: 4px;
@normalSpace: 16px;
.view {
:global(.ant-checkbox-wrapper) {
min-width: 116px;
margin-right: 10px;
color: @textSupplyColor;
}
:global(.ant-select-selection) {
height: 32px;
overflow-y: auto;
}
.rowWrap {
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.colWrap {
display: inline-block;
vertical-align: middle;
&._2 {
width: 50%;
}
&._3 {
width: 33.33%;
}
&._4 {
width: 25%;
}
&._5 {
width: 20%;
}
.colInner {
display: flex;
justify-content: flex-start;
align-items: flex-start;
.label {
color: @textPrimaryColor;
margin-right: 25px;
width: 66px;
text-align: right;
}
.itemWrap {
flex: 1;
.itemContent {
//min-width: 230px;
//display: inline-block;
width: 100%;
margin-right: 20px;
}
.checkboxContainer {
display: flex;
flex-wrap: wrap;
margin-bottom: -20px;
}
.checkbox {
margin-bottom: 20px;
}
.searchBtnWrap {
display: inline-block;
.searchBtn {
background: @primaryColor;
}
}
}
}
}
}
}
.chooseAll {
//padding: 5px 0;
//display: block;
//background-color: blue;
//border-top: 1px solid red;
}
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