96 Commits cf98e1b910 ... 26dd239f58

Author SHA1 Message Date
  sophieChenyx 26dd239f58 账号资源>已开通列表 添加高级筛选 6 years ago
  sophieChenyx 2ee2a9c6c4 账号资源>已开通列表 添加高级筛选 6 years ago
  sophieChenyx 7e432332e0 统计概览 > 总统计表 增加终端总数接口 6 years ago
  sophieChenyx 0249295174 修改下载方式 6 years ago
  sophieChenyx 4fca39e4fe 修改文件下载的方式 6 years ago
  sophieChenyx 723f3dbcdf 根据修改意见 调整列表名称和顺序 6 years ago
  sophieChenyx 183c6a7caa 更换终端课程包下载 6 years ago
  sophieChenyx 2c8e7776b9 下载请求 暂时去掉参数 6 years ago
  sophieChenyx b4067982df 修改未引入 stringfy 6 years ago
  sophieChenyx 5f21066435 更新下载功能 6 years ago
  sophieChenyx 52c5062062 --- 6 years ago
  sophieChenyx c86d9784f4 。。。 6 years ago
  sophieChenyx d0bc81d474 测试阶段 --下载7 6 years ago
  sophieChenyx 10dcf4e148 测试阶段 --下载6 6 years ago
  sophieChenyx 98a812a521 测试阶段 --下载5 6 years ago
  sophieChenyx ee3f32c538 测试阶段 --下载5 6 years ago
  sophieChenyx b7ad5f469d 测试阶段 --下载4 6 years ago
  sophieChenyx 1bb5651dea 测试阶段 --下载3 6 years ago
  sophieChenyx 1965e64540 测试下载 --阶段2 6 years ago
  sophieChenyx 6e7ce0c9a7 尝试获取blob对象 6 years ago
  sophieChenyx 971e3882e2 添加 统计概览> 即将逾期 6 years ago
  sophieChenyx 1f4e0c79ca 增加 统计概览> 总统计表 6 years ago
  sophieChenyx c09dfc9b09 增加&修改 总统计表&终端课程报 6 years ago
  sophieChenyx d370d7f63e 测试文件下载window.open的可行性 6 years ago
  sophieChenyx 84b205c805 统计概览> + 账号资源 6 years ago
  zhanghe b9edb7e4f8 :bug: fix SupportCreate.js 6 years ago
  zhanghe 49e67cd5ca :art: 增加设备类型 6 years ago
  zhanghe 367e6be7ab :art: device sort by gmtModified 6 years ago
  zhanghe 1a59a287b4 :art: 增加阅读历史过滤标记 6 years ago
  zhanghe d9620aed20 :art: 修改登录设备记录表 6 years ago
  zhanghe 93316ff043 :feature: 增加登录设备展示 6 years ago
  zhanghe d8859e8aeb :bug: 渠道产品过滤丢失渠道id参数 6 years ago
  zhanghe 2f83eb318c :lipstick: 用户标签配置->复制->增加标签类型显示 6 years ago
  zhanghe de21bceb1d :fire: 还原配置文件 6 years ago
  zhanghe d81595a281 :bug: 标签类型下的标签删除异常问题 6 years ago
  zhanghe f078d63503 :bug: 标签类型下不可删除标签的bug 6 years ago
  zhanghe 07770c7c2e :bug: 标签关联产品,已关联产品不回显bug 6 years ago
  zhanghe 720da15274 :bug: 优化代码 6 years ago
  zhanghe d743c03cdc :fire: 渠道标签组概念,用标签类型替代 6 years ago
  zhanghe 5a92decc36 :art: hash => true 6 years ago
  zhanghe 08c708c671 :lipstick: 去掉无用代码 6 years ago
  zhanghe b35250be38 :sparkles: 增加用户权限编辑功能 6 years ago
  zhanghe ea88bfbd0c :twisted_rightwards_arrows: fix conflict 6 years ago
  zhanghe f50c7942ad Merge branch 'master' of http://gogs.efunbox.cn:3000/Rankin/Hotax 6 years ago
  zhanghe ef2a307423 :twisted_rightwards_arrows: Merge branch 'dev_user_auth' 6 years ago
  zhanghe 66523d01f8 :sparkles: 增加用户个性化配置界面 6 years ago
  zhanghe c6b99fb440 :art: 权限列表样式调整 6 years ago
  zhanghe bc53aeb699 :twisted_rightwards_arrows: Merge branch 'dev_user_auth' of remote/dev_user_auth into dev_user_auth 6 years ago
  zhanghe d569807208 :bug: 修改utils.js文件 6 years ago
  zhanghe 36f53229bd :art: 课件编辑页内资源列表支持点击编号跳转 6 years ago
  zhanghe a27cf82372 :bug: 模态选择框单选会选中多个bug 6 years ago
  zhanghe bea4970c40 :bug: oss签名每次都请求获取 6 years ago
  zhanghe ef66963ba0 :bug: 系统用户昵称为空时页面异常bug修复 6 years ago
  zhanghe bb5a9725c8 :zap: 图片展示位样式微调 6 years ago
  zhanghe 6a3d360759 :lipstack: 视频缩略图居中显示 6 years ago
  zhanghe 23738c1cda :arrow-up: antd版本升级为3.6.2 6 years ago
  zhanghe 2bdcf96ee4 :bug: 图册轮播图为单张时自动播放遮挡问题 6 years ago
  zhanghe 9d670a42de :zap: 页面名称替换 6 years ago
  zhanghe 8738eda024 :lipstick: 课程、配套、师训详情图片显示样式调整 6 years ago
  zhanghe 0ad7ad2d33 :bug: 修复高级筛选功能翻页丢失记忆bug 6 years ago
  zhanghe 87faf22dc3 :zap: 视频编辑增传rid字段 6 years ago
  zhanghe fa256fec4f :bug: fix eslint warning 6 years ago
  zhanghe bfef5bd026 :bug: 修复模态选择框单选不能选中bug 6 years ago
  zhanghe 8b2d3de43b :bug: 图片上传过程签名失效问题 6 years ago
  sophieChenyx e2842dff34 edit document/platform 6 years ago
  sophieChenyx 91b0d0656b edit document/platform 6 years ago
  zhanghe dd75a3a6bb :bug: audio format `mp4` -> `mp3` 6 years ago
  zhanghe e4210a4438 :bug: create audiobook, post type error 6 years ago
  zhanghe 99d2e79788 :bug: fix audiobook resource type 6 years ago
  zhanghe a33ae8b04c :bug: fix aduiobook POST api 6 years ago
  zhanghe 929454bea3 修改项目名称 6 years ago
  zhanghe 007cf4c127 :bug: recommend poster related product id 6 years ago
  zhanghe 02c2eb6de6 :zap: fix audiobook create logic 6 years ago
  zhanghe 3965f29bf5 :bug: fix goods show bug 6 years ago
  zhanghe f19207fe3a :bug: fix config.js 6 years ago
  zhanghe 7e132ba92a 1. :wrench: modified webpack configuration; 6 years ago
  zhanghe 1901128b8b 1. :sparkles: add feature - audiobook manage module; 6 years ago
  zhanghe 26027f325d :lipstick: 调整列表页操作按钮样式 6 years ago
  zhanghe 51701fc400 :sparkles: 渠道产品列表页增加上架功能 6 years ago
  zhanghe 486b9b4e84 :bug: 修正资源管理中部分bug 6 years ago
  zhanghe 68c453b5e0 :bug: 海报管理product为null解构出错问题修复 6 years ago
  zhanghe 0881c84b7a :zap: improving performance of poster manager 6 years ago
  zhanghe 7d7b3262ba :bug: fix some bugs; 6 years ago
  zhanghe d3d7ff82cb [update] 优化代码,调整部分交互样式 6 years ago
  zhanghe f0230be547 :sparkles: add feature `create poster`; 6 years ago
  zhanghe 9ca3bcf031 :sparkles: add feature `create video`; 6 years ago
  zhanghe 4457b4f746 [Update] 更改项目名称及部分文件名称 6 years ago
  zhanghe 402ec06dde 调整代码结构 6 years ago
  zhanghe 4e76a8f21f 增加推荐位配置管理模块 6 years ago
  zhanghe 04768c02f8 添加订单管理状态修改功能 6 years ago
  zhanghe 5cf9fd31f3 增加订单管理模块 6 years ago
  zhanghe 8609115436 增加购物车管理模块 6 years ago
  zhanghe 1665614bf3 修正代码风格 6 years ago
  zhanghe fd025909f7 增加校区管理模块 6 years ago
  zhanghe 2cb2a0c336 商户、校区管理模块 7 years ago
  zhanghe 2369ea5998 图片管理、单图上传、多图上传功能模块 7 years ago

+ 1 - 0
.eslintrc

@@ -11,6 +11,7 @@
     "jasmine": true
   },
   "rules": {
+    "prefer-destructuring": ["error", {"object": false, "array": false}],
     "generator-star-spacing": [0],
     "consistent-return": [0],
     "react/forbid-prop-types": [0],

+ 1 - 0
.gitignore

@@ -20,3 +20,4 @@ yarn.lock
 package-lock.json
 *bak
 .prettierrc
+.jshintrc

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "description": "Enterprise applications - Content Manage System",
   "private": true,
   "scripts": {
-    "_precommit": "npm run lint-staged",
+    "precommit": "npm run lint-staged",
     "start": "cross-env ESLINT=none roadhog dev",
     "start:no-proxy": "cross-env NO_PROXY=true ESLINT=none roadhog dev",
     "build": "cross-env NODE_ENV=production ESLINT=none roadhog build",

+ 0 - 1
src/models/login.js

@@ -31,7 +31,6 @@ export default {
       }
     },
   },
-
   reducers: {
     changeLoginStatus(state, { payload }) {
       if (payload.data) {

+ 1 - 0
src/routes/Campus/CampusList.js

@@ -39,6 +39,7 @@ function merchantDataFormatter(data) {
   fetching: loading.models.merchant,
   loading: loading.models.campus,
 }))
+
 export default class CampusListPage extends Component {
   constructor(props) {
     super(props);

+ 100 - 10
src/routes/Dashboard/Accounts/AccountsTerminals.js

@@ -1,15 +1,38 @@
 import React, { Component } from 'react';
 import moment from 'moment';
 import { connect } from 'dva';
-import { Card, Badge } from 'antd';
+import { Card, Badge, Modal, Form } from 'antd';
 import { StandardTableList } from '../../../components/AXList';
 import { addRowKey } from '../../../utils/utils';
 import styles from './AccountsTerminals.less';
+import AXRemoteSelect from '../../../components/AXRemoteSelect';
 
+const formItemLayout = {
+  labelCol: {
+    xs: { span: 24 },
+    sm: { span: 7 },
+  },
+  wrapperCol: {
+    xs: { span: 24 },
+    sm: { span: 15 },
+    md: { span: 13 },
+  },
+};
+function arrayDataFormatter(data) {
+  return data.map((item) => {
+    return {
+      text: item.name,
+      value: `${item.name}||${item.id}`,
+    };
+  });
+}
 
-@connect(({ loading, accounts }) => ({
+@Form.create()
+@connect(({ loading, accounts, campus }) => ({
   accounts,
+  campus,
   loading: loading.models.accounts,
+  fetching: loading.models.campus,
 }))
 
 export default class TerminalsAccountsPage extends Component {
@@ -19,21 +42,29 @@ export default class TerminalsAccountsPage extends Component {
     this.state = {
       UIParams: (state || {}).UIParams, // 组件的状态参数
       Queryers: (state || {}).Queryers, // 查询的条件参数
+      campuses: (state || {}).campuses || [], // 记录筛选的校区
+      filterModalDestroy: true,
     };
   }
   componentWillMount() {
+    const { campuses } = this.state;
+    let campusId;
+    if (campuses && campuses.length) {
+      campusId = campuses[0].split('||')[1];
+    }
     this.props.dispatch({
       type: 'accounts/fetchTerminalsList',
-      payload: { ...this.state.Queryers }
-    })
+      payload: {
+        campusId,
+        ...this.state.Queryers,
+      },
+    });
   }
-  // 下载
   handleDownloadOperation = () => {
     this.props.dispatch({
       type: 'accounts/fetchTerminalsExcel',
-    })
+    });
   };
-
   handleFilterOperation = (params, states) => {
     this.setState({
       UIParams: states,
@@ -46,10 +77,43 @@ export default class TerminalsAccountsPage extends Component {
       },
     });
   };
+  handleFilterModalShow = () => {
+    this.setState({ filterModalDestroy: false });
+  };
+  handleFilterModalDestroy = () => {
+    this.setState({ filterModalDestroy: true });
+  };
+  handleModalFilterOperation = () => {
+    const { getFieldsValue } = this.props.form;
+    const { campuses } = getFieldsValue();
+    let campusId;
+    if (campuses && campuses.length) {
+      campusId = campuses[0].split('||')[1];
+    }
+    this.props.dispatch({
+      type: 'accounts/fetchTerminalsList',
+      payload: {
+        campusId,
+        ...this.state.Queryers,
+      },
+    });
+    this.handleFilterModalDestroy();
+    this.setState({ campuses });
+  };
+  handleTerminalsRemoteSelectSearch = (value) => {
+    this.props.dispatch({
+      type: 'campus/fetchCampusList',
+      payload: {
+        pageSize: 50,
+        name: value,
+      },
+    });
+  };
   render() {
-    const { loading,accounts } = this.props;
+    const { campuses } = this.state;
+    const { loading, accounts, fetching, campus, form } = this.props;
     const { list, totalSize, pageSize, pageNo } = accounts;
-
+    const { getFieldDecorator } = form;
     const basicSearch = {
       keys: [{
         name: '终端编号',
@@ -61,7 +125,6 @@ export default class TerminalsAccountsPage extends Component {
       pageSize,
       totalSize,
     };
-
     const columns = [{
       title: '终端编号',
       key: 1,
@@ -129,6 +192,7 @@ export default class TerminalsAccountsPage extends Component {
           dataSource={addRowKey(list)}
           header={{
             basicSearch,
+            onAdvanceFilterClick: this.handleFilterModalShow,
             onFilterClick: this.handleFilterOperation,
             onDownload: this.handleDownloadOperation,
           }}
@@ -138,6 +202,32 @@ export default class TerminalsAccountsPage extends Component {
           keepUIState={{ ...this.state.UIParams }}
           showStatusSelect={false}
         />
+        {!this.state.filterModalDestroy && (
+          <Modal
+            width={600}
+            visible
+            title="高级筛选"
+            okText="筛选"
+            cancelText="取消"
+            maskClosable={false}
+            onCancel={this.handleFilterModalDestroy}
+            onOk={this.handleModalFilterOperation}
+          >
+            <Form>
+              <Form.Item label="所属校区" {...formItemLayout}>
+                {getFieldDecorator('campuses', {
+                    initialValue: campuses,
+                  })(
+                    <AXRemoteSelect
+                      fetching={fetching}
+                      dataSource={arrayDataFormatter(campus.list)}
+                      onSearch={this.handleTerminalsRemoteSelectSearch}
+                    />
+                  )}
+              </Form.Item>
+            </Form>
+          </Modal>
+        )}
       </Card>
     );
   }

+ 1 - 1
src/services/courseware.js

@@ -1,6 +1,6 @@
 import { stringify } from 'qs';
 import request from '../utils/request';
-import { api, Hotax } from '../utils/config';
+import { api } from '../utils/config';
 
 export async function queryCoursewareList(params) {
   const newParams = {