瀏覽代碼

Merge branch 'dc_admin' into 'master'

Dc admin

See merge request admin-manager/dc!18
王文博 5 年之前
父節點
當前提交
902769be25
共有 2 個文件被更改,包括 31 次插入4 次删除
  1. 26 3
      src/pages/dc/namelist/components/Append/index.js
  2. 5 1
      src/pages/dc/namelist/detail.js

+ 26 - 3
src/pages/dc/namelist/components/Append/index.js

@@ -18,6 +18,7 @@ class Index extends Component {
             params: {},
             businessName: '',
             reason: '',
+            expireTime:0,
         }
         this.formSetting = [{
             label: '业务标识',
@@ -56,13 +57,14 @@ class Index extends Component {
     }
 
     onOk = () => {
-        const { params ,reason} = this.state;
+        const { params ,reason, expireTime} = this.state;
         this.props.dispatch({
             type: 'template/_appendList',
             payload: {
                 "business":params.business,
                 "content":params.nameList,
-                "reason":reason
+                "reason":reason,
+                "expireTime":expireTime
             },
             callback: res => {
                 const { code, data } = res || {}
@@ -131,6 +133,13 @@ class Index extends Component {
             reason,
         });
     }
+    
+    onExpireTimeChange = event => {
+        const expireTime = event.target.value;
+        this.setState({
+            expireTime
+        });
+    }
 
     render () {
         const { showModal, onCancel, loading } = this.props
@@ -154,7 +163,21 @@ class Index extends Component {
                     <Col span={6} style={{
                         textAlign: 'right',
                         lineHeight: '32px',
-                    }}>追加理由:</Col>
+                    }}>过期时间戳 (默认0:代表永久):</Col>
+                    <Col span={16}>
+                        <Input style={{
+                            width: 450,
+                        }} value={this.state.expireTime} onChange={this.onExpireTimeChange}></Input>
+                    </Col>
+                </Row>
+                }
+                <br></br>
+                {
+                 <Row>
+                    <Col span={6} style={{
+                        textAlign: 'right',
+                        lineHeight: '32px',
+                    }}>追加理由(选填):</Col>
                     <Col span={16}>
                         <Input style={{
                             width: 450,

+ 5 - 1
src/pages/dc/namelist/detail.js

@@ -73,6 +73,10 @@ class Index extends React.PureComponent {
                 title: '添加原因',
                 dataIndex: 'reason'
             },
+            {
+                title: '过期时间',
+                dataIndex: 'expireTime'
+            },
             {
                 title: '操作',
                 dataIndex: 'actions',
@@ -96,7 +100,7 @@ class Index extends React.PureComponent {
     delItem ( record ) {
         this.props.dispatch({
             type: 'template/_delUserFromList',
-            payload: { "id":record.id },
+            payload: { "business":record.business,"userId":record.userId },
             callback: res => {
                 const { code } = res || {}
                 if (code === 0) {