From 4473d8dad5a42b70f28f90a60de867af14112eb1 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 19 Nov 2024 09:56:29 +0800 Subject: [PATCH 01/51] =?UTF-8?q?feature/2.15.2.2411.01=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF-=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/components/index.js | 111 ------------------ pc4mobx/hrmSalary/config.js | 3 +- pc4mobx/hrmSalary/index.js | 2 + pc4mobx/hrmSalary/pages/datapush/index.js | 59 ++++++++++ pc4mobx/hrmSalary/pages/datapush/index.less | 0 .../hrmSalary/pages/variableSalary/index.js | 1 - pc4mobx/hrmSalary/stores/baseForm.js | 60 +--------- 7 files changed, 67 insertions(+), 169 deletions(-) delete mode 100644 pc4mobx/hrmSalary/components/index.js create mode 100644 pc4mobx/hrmSalary/pages/datapush/index.js create mode 100644 pc4mobx/hrmSalary/pages/datapush/index.less diff --git a/pc4mobx/hrmSalary/components/index.js b/pc4mobx/hrmSalary/components/index.js deleted file mode 100644 index 74d0b74a..00000000 --- a/pc4mobx/hrmSalary/components/index.js +++ /dev/null @@ -1,111 +0,0 @@ -import React from "react"; -import { inject, observer } from "mobx-react"; -import { toJS } from "mobx"; - -import { Button } from "antd"; -import { WeaLogView } from "comsMobx"; -import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; - -import { getSearchs, renderLoading, renderNoright } from "../util"; // 从util文件引入公共的方法 - -const getLabel = WeaLocaleProvider.getLabel; -const WeaLogViewComp = WeaLogView.Component; - -@inject("baseFormStore") -@observer -export default class BaseForm extends React.Component { - componentWillMount() { // 初始化渲染页面 - const { baseFormStore: { doInit } } = this.props; - doInit(); - } - - componentWillReceiveProps(nextProps) { - const { baseFormStore: { doInit } } = this.props; - if (this.props.location.key !== nextProps.location.key) { // 手动刷新、切换菜单 重新初始化 - doInit(); - } - } - - // 渲染右键菜单和顶部下拉菜单 - getRightMenu() { - const { baseFormStore: { setLogVisible, saveForm } } = this.props; - let btnArr = [ - { - key: "BTN_SAVE", - icon: , - content: `${getLabel(86, "保存")}`, - onClick: () => saveForm() - }, - { - key: "log", - content: getLabel(83, "日志"), - icon: , - onClick: () => setLogVisible(true) - }]; - return btnArr; - } - - render() { - /* 页面渲染说明: - 1、判断是否无权限: 是显示无权限页面 - 2、渲染form页面: - 2-1: WeaRightMenu 右键菜单 - 2-2: WeaTop: 顶部: 包括下拉菜单 - 2-3: renderLoading: 加载数据中的loading效果(统一封装在util中) - 2-4: WeaNewScroll 顶部以下超长滚动处理 - 2-5: 通过getSearchs方法渲染form - */ - const { baseFormStore } = this.props; - const { - loading, - hasRight, - form, - condition, - logVisible, - logStore, - saveLoading, - setLogVisible, - saveForm - } = baseFormStore; // 从后台取数据 和 方法 - - if (!hasRight && !loading) { // 无权限处理 - return renderNoright(); - } - - const btns = [ // 顶部按钮 - - ]; - const collectParams = { // 收藏功能配置 - favname: "基础表单", - favouritetype: 1, - objid: 0, - link: "wui/index.html#/ns_demo01/index", - importantlevel: 1 - }; - return ( - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - buttons={btns} // 顶部按钮: 这里是保存按钮,不需要可以不显示 - buttonSpace={10} // 按钮之间的间隔 - showDropIcon={true} // 是否显示右侧下拉按钮 - dropMenuDatas={this.getRightMenu()} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > - {loading ? renderLoading() : - - {getSearchs(form, toJS(condition), 1)} - - } - setLogVisible(false)} // 关闭日志弹框时的操作:设置logVisible属性为false - logStore={logStore} // 日志的store - logType="1" // 模块编码: 该参数要根据模块来给 - logSmallType="1" // 细分模块编码: 该参数要根据模块来给 - /> - - ); - } -} diff --git a/pc4mobx/hrmSalary/config.js b/pc4mobx/hrmSalary/config.js index ba422c79..ca719497 100644 --- a/pc4mobx/hrmSalary/config.js +++ b/pc4mobx/hrmSalary/config.js @@ -18,5 +18,6 @@ export const PAGE = { "salaryField": ["/hrmSalary/fieldManagement"], //字段管理 "salaryItem": ["/hrmSalary/salaryItem"], //薪资项目管理 "siScheme": ["/socialSecurityBenefits/programme"], //社保福利方案 - "report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"] //报表 + "report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"], //报表 + "dataPush": ["/hrmSalary/datapush"] //数据推送 }; diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 281bf1de..42d08cee 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -54,6 +54,7 @@ import AdjustSalaryManage from "./pages/adjustSalaryManage"; import TopologyMap from "./pages/topologyMap"; import SupplementaryCalc from "./pages/supplementaryCalc"; import VariableSalary from "./pages/variableSalary"; +import Datapush from "./pages/datapush"; import Layout from "./layout"; import stores from "./stores"; import "./style/index"; @@ -116,6 +117,7 @@ const Routes = ( + diff --git a/pc4mobx/hrmSalary/pages/datapush/index.js b/pc4mobx/hrmSalary/pages/datapush/index.js new file mode 100644 index 00000000..dd7d1c3b --- /dev/null +++ b/pc4mobx/hrmSalary/pages/datapush/index.js @@ -0,0 +1,59 @@ +/* + * 数据推送 + * + * @Author: 黎永顺 + * @Date: 2024/11/19 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaLocaleProvider, WeaReqTop } from "ecCom"; +import { Button } from "antd"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("taxAgentStore", "baseFormStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "datapush", isQuery: false + }; + } + + handleOperate = () => { + }; + + render() { + const { selectedKey } = this.state; + const { taxAgentStore: { PageAndOptAuth }, baseFormStore: { form } } = this.props; + const showOperateBtn = PageAndOptAuth.opts.includes("admin"); + const tabs = [ + { + title: getLabel(111, "数据推送"), key: "datapush", showDropIcon: false, dropMenuDatas: [], + buttons: showOperateBtn ? [ + + ] : [], + children: null + } + ]; + return ( + } selectedKey={selectedKey} + iconBgcolor="#F14A2D" tabDatas={tabs} className="datapush_wrapper" buttonSpace={10} + buttons={_.find(tabs, o => selectedKey === o.key).buttons} + onChange={selectedKey => this.setState({ selectedKey })} + showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate} + dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas} + > + {_.find(tabs, o => selectedKey === o.key).children} + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/datapush/index.less b/pc4mobx/hrmSalary/pages/datapush/index.less new file mode 100644 index 00000000..e69de29b diff --git a/pc4mobx/hrmSalary/pages/variableSalary/index.js b/pc4mobx/hrmSalary/pages/variableSalary/index.js index 08fa8aa9..639355ea 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/index.js @@ -19,7 +19,6 @@ import SalaryItemList from "./components/salaryItemList"; import SalaryFileList from "./components/salaryFileList"; import SalaryFileImportDialog from "./components/salaryFileImportDialog"; import { Button, message } from "antd"; -import cs from "classnames"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; diff --git a/pc4mobx/hrmSalary/stores/baseForm.js b/pc4mobx/hrmSalary/stores/baseForm.js index 3eb3a57e..65a4e574 100644 --- a/pc4mobx/hrmSalary/stores/baseForm.js +++ b/pc4mobx/hrmSalary/stores/baseForm.js @@ -1,64 +1,12 @@ import { action, observable } from "mobx"; -import { message } from "antd"; -import { WeaForm, WeaLogView } from "comsMobx"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaForm } from "comsMobx"; -import * as API from "../apis"; // 引入API接口文件 - -const { LogStore } = WeaLogView; -const getLabel = WeaLocaleProvider.getLabel; export class BaseFormStore { + // 全局设置仓库 @observable form = new WeaForm(); // 规则渲染form - - @observable logStore = new LogStore(); - @observable condition = []; // 存储后台得到的form数据 - @observable saveLoading = false; // 保存状态处理:保证保存的时候接口只走一次 - @observable loading = true; // 页面初始化的loading状态:数据加载成功前后前使用 - @observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据 + @action("初始化form表单") initForm = () => this.form = new WeaForm(); @observable logVisible = false; // 控制日志弹框的显影 - - @action // 初始化操作: 一般用来初始化获取后台数据 - doInit = () => { - this.getBaseForm(); - }; - - @action // 获得form配置数据 - getBaseForm = () => { - API.getBaseForm().then(action(result => { - this.loading = false; - this.hasRight = result.hasRight; - if (result.hasRight) { - this.condition = result.condition; - this.form.initFormFields(result.condition); - } - })); - }; - - @action // 保存 - saveForm = () => { - this.form.validateForm().then(action(f => { // 表单的校验: 直接使用form的validateForm方法即可 - if (f.isValid) { // 校验听过: 走保存接口 - this.saveLoading = true; - const params = this.form.getFormParams(); - API.saveForm(params).then(action( - result => { - this.saveLoading = false; - if (result.api_status) { // 保存成功: 1、给出提示 2、刷新form数据 - message.success(`${getLabel(18758, "保存成功")}`); - this.getBaseForm(); - } else { - message.error(`${getLabel(22620, "保存失败")}`); - } - } - )); - } else { - f.showErrors(); - } - })); - }; - - @action + @action("日志显隐开关") setLogVisible = bool => this.logVisible = bool; - } From da79b1b7ffc6d9c81ef4c804904621800e1215b6 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 19 Nov 2024 13:28:04 +0800 Subject: [PATCH 02/51] =?UTF-8?q?feature/2.15.2.2411.01=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF-=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/datapush.js | 5 +++ .../datapush/components/datapushList/index.js | 39 +++++++++++++++++++ pc4mobx/hrmSalary/pages/datapush/index.js | 3 +- pc4mobx/hrmSalary/pages/datapush/index.less | 18 +++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 pc4mobx/hrmSalary/apis/datapush.js create mode 100644 pc4mobx/hrmSalary/pages/datapush/components/datapushList/index.js diff --git a/pc4mobx/hrmSalary/apis/datapush.js b/pc4mobx/hrmSalary/apis/datapush.js new file mode 100644 index 00000000..8287005c --- /dev/null +++ b/pc4mobx/hrmSalary/apis/datapush.js @@ -0,0 +1,5 @@ +import { postFetch } from "../util/request"; +// 推送配置列表 +export const getPushSettingList = (params) => { + return postFetch("/api/bs/hrmsalary/push/setting/list", params); +}; diff --git a/pc4mobx/hrmSalary/pages/datapush/components/datapushList/index.js b/pc4mobx/hrmSalary/pages/datapush/components/datapushList/index.js new file mode 100644 index 00000000..bcb3eb68 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/datapush/components/datapushList/index.js @@ -0,0 +1,39 @@ +/* + * 数据推送列表 + * + * @Author: 黎永顺 + * @Date: 2024/11/19 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import * as API from "../../../../apis/datapush"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + componentDidMount() { + this.getPushSettingList(); + } + + getPushSettingList = () => { + const payload = {}; + API.getPushSettingList(payload).then(({ status, data }) => { + if (status) { + console.log(data); + } + }); + }; + + render() { + return ( +
+ +
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/datapush/index.js b/pc4mobx/hrmSalary/pages/datapush/index.js index dd7d1c3b..e94935d4 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/index.js @@ -10,6 +10,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaLocaleProvider, WeaReqTop } from "ecCom"; +import DatapushList from "./components/datapushList"; import { Button } from "antd"; import "./index.less"; @@ -38,7 +39,7 @@ class Index extends Component { buttons: showOperateBtn ? [ ] : [], - children: null + children: } ]; return ( diff --git a/pc4mobx/hrmSalary/pages/datapush/index.less b/pc4mobx/hrmSalary/pages/datapush/index.less index e69de29b..a6b2b1f0 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.less +++ b/pc4mobx/hrmSalary/pages/datapush/index.less @@ -0,0 +1,18 @@ +.datapush_wrapper { + .wea-new-top-req-title > div:last-child { + right: 16px !important; + } + + .wea-new-top-req-content { + padding: 8px 16px 0 16px; + + .wea-new-table { + background: #FFF; + } + + .ant-spin-nested-loading, .ant-spin-container { + height: 100% !important; + } + + } +} From a2c5fdc5ec81be6082f129c040e19cf0b4da4ba7 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 19 Nov 2024 18:58:39 +0800 Subject: [PATCH 03/51] =?UTF-8?q?feature/2.15.2.2411.01=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF-=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/datapush.js | 13 ++ .../datapush/components/DPDialog/index.js | 128 ++++++++++++++++++ .../datapush/components/datapushList/index.js | 65 +++++++-- .../hrmSalary/pages/datapush/conditions.js | 76 +++++++++++ pc4mobx/hrmSalary/pages/datapush/index.js | 53 ++++++-- pc4mobx/hrmSalary/pages/datapush/index.less | 62 +++++++++ 6 files changed, 379 insertions(+), 18 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/datapush/components/DPDialog/index.js create mode 100644 pc4mobx/hrmSalary/pages/datapush/conditions.js diff --git a/pc4mobx/hrmSalary/apis/datapush.js b/pc4mobx/hrmSalary/apis/datapush.js index 8287005c..5260d269 100644 --- a/pc4mobx/hrmSalary/apis/datapush.js +++ b/pc4mobx/hrmSalary/apis/datapush.js @@ -1,5 +1,18 @@ +import { WeaTools } from "ecCom"; import { postFetch } from "../util/request"; // 推送配置列表 export const getPushSettingList = (params) => { return postFetch("/api/bs/hrmsalary/push/setting/list", params); }; +// 保存推送配置 +export const savePushSetting = (params) => { + return postFetch("/api/bs/hrmsalary/push/setting/save", params); +}; +// 删除推送配置 +export const deletePushSetting = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/push/setting/delete", "GET", params); +}; +// 推送配置明细列表 +export const getPushItemList = (params) => { + return postFetch("/api/bs/hrmsalary/push/item/list", params); +}; diff --git a/pc4mobx/hrmSalary/pages/datapush/components/DPDialog/index.js b/pc4mobx/hrmSalary/pages/datapush/components/DPDialog/index.js new file mode 100644 index 00000000..4c76dd1e --- /dev/null +++ b/pc4mobx/hrmSalary/pages/datapush/components/DPDialog/index.js @@ -0,0 +1,128 @@ +/* + * 数据推送 + * 新增编辑 + * @Author: 黎永顺 + * @Date: 2024/11/19 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaButtonIcon, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable, WeaTools } from "ecCom"; +import { postFetch } from "../../../../util/request"; +import * as API from "../../../../apis/datapush"; +import { conditions } from "../../conditions"; +import { getSearchs } from "../../../../util"; +import { Button, message } from "antd"; + +const getLabel = WeaLocaleProvider.getLabel; +const getKey = WeaTools.getKey; + +@inject("baseFormStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + conditions: [], loading: false, columns: [], dataSource: [] + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + document.querySelector(".datapush_wrapper").classList.add("zIndex0-weaslide-title"); + this.initForm(nextProps); + } + if (nextProps.visible !== this.props.visible && !nextProps.visible) { + document.querySelector(".datapush_wrapper").classList.remove("zIndex0-weaslide-title"); + this.props.baseFormStore.initForm(); + } + } + + initForm = async (props) => { + const { detail } = props; + const { data: salarySobList } = await postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "ADMIN_DATA" }); + this.setState({ + conditions: _.map(conditions, item => ({ + ...item, title: getLabel(item.lanId, item.title), items: _.map(item.items, o => { + o = { ...o, label: getLabel(o.lanId, o.label), value: detail[getKey(o)] ? String(detail[getKey(o)]) : "" }; + if (getKey(o) === "salarySobIds") { + return { + ...o, value: detail[getKey(o)] ? detail[getKey(o)] : "", + options: _.map(salarySobList, o => ({ key: String(o.id), showname: o.name })) + }; + } + return { ...o }; + }) + })) + }, () => { + props.baseFormStore.form.initFormFields(this.state.conditions); + !_.isEmpty(detail) && this.getPushItemList(props); + }); + }; + getPushItemList = ({ detail }) => { + const { id: settingId } = detail; + API.getPushItemList({ settingId }).then(({ status, data }) => { + if (status) { + const { columns, list: dataSource } = data; + this.setState({ dataSource, columns }); + } + }); + }; + save = () => { + const { baseFormStore: { form }, detail } = this.props; + form.validateForm().then(f => { + if (f.isValid) { + const { salarySobIds, ...payload } = form.getFormParams(); + this.setState({ loading: true }); + API.savePushSetting({ ...payload, salarySobIds: salarySobIds.split(","), id: detail.id }) + .then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(30700, "操作成功")); + this.props.onClose(this.props.onSearch()); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: false })); + } else { + f.showErrors(); + } + }); + }; + renderTitle = () => { + const { loading } = this.state, { title } = this.props; + return
+
+
+
{title}
+
+
+ +
+
; + }; + + render() { + const { baseFormStore: { form }, detail } = this.props, { conditions, columns, dataSource } = this.state; + return ( + {getSearchs(form, conditions, 2, false)} + { + !_.isEmpty(detail) && + +
+ +
+ +
+ } + } + />); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/datapush/components/datapushList/index.js b/pc4mobx/hrmSalary/pages/datapush/components/datapushList/index.js index bcb3eb68..83b83ac1 100644 --- a/pc4mobx/hrmSalary/pages/datapush/components/datapushList/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/components/datapushList/index.js @@ -8,31 +8,78 @@ * @description: */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom"; import * as API from "../../../../apis/datapush"; const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { + constructor(props) { + super(props); + this.state = { + columns: [], dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 } + }; + } + componentDidMount() { this.getPushSettingList(); } - getPushSettingList = () => { - const payload = {}; + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.isQuery !== this.props.isQuery) this.setState({ + pageInfo: { ...this.state.pageInfo, current: 1 } + }, () => this.getPushSettingList(nextProps)); + } + + getPushSettingList = (props) => { + const { pageInfo } = this.state, { query } = props || this.props; + const payload = { ...pageInfo, ...query }; + this.setState({ loading: true }); API.getPushSettingList(payload).then(({ status, data }) => { + this.setState({ loading: false }); if (status) { - console.log(data); + const { columns, list: dataSource, pageNum: current, pageSize, total } = data; + this.setState({ + pageInfo: { ...pageInfo, current, pageSize, total }, + dataSource: _.map(dataSource, o => ({ + ...o, salarySobs: _.map(o.salarySobs, k => k.name).join(","), + salarySobIds: _.map(o.salarySobs, k => k.id).join(",") + })), + columns: [..._.map(columns, o => { + if (o.dataIndex === "able") return { + ...o, render: v => () + }; + return { ...o }; + }), { + title: getLabel(111, "操作"), dataIndex: "opts", width: 120, render: (__, record) => ( + this.props.onChange("edit", record)}>{getLabel(111, "编辑")} + this.props.onChange("del", record.id)}>{getLabel(111, "删除")} + ) + }] + }); } }); }; render() { - return ( -
- -
- ); + const { columns, dataSource, loading, pageInfo } = this.state; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getPushSettingList()); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushSettingList()); + } + }; + return (); } } diff --git a/pc4mobx/hrmSalary/pages/datapush/conditions.js b/pc4mobx/hrmSalary/pages/datapush/conditions.js new file mode 100644 index 00000000..5ab37972 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/datapush/conditions.js @@ -0,0 +1,76 @@ +// 推送配置表单 +export const conditions = [ + { + items: [ + { + conditionType: "INPUT", + domkey: ["name"], + fieldcol: 14, + label: "任务名称", + lanId: 111, + labelcol: 6, + value: "", + rules: "required|string", + viewAttr: 3 + }, + { + conditionType: "SWITCH", + domkey: ["able"], + fieldcol: 14, + label: "是否启用", + lanId: 111, + labelcol: 6, + value: "0", + rules: "required|string", + viewAttr: 3 + }, + { + conditionType: "SELECT", + domkey: ["salarySobIds"], + fieldcol: 14, + label: "薪资账套", + lanId: 111, + labelcol: 6, + value: "", + multiple: true, + options: [], + rules: "required|string", + viewAttr: 3 + }, + { + conditionType: "INPUT", + domkey: ["tableName"], + fieldcol: 14, + label: "数据表名", + lanId: 111, + labelcol: 6, + value: "", + rules: "required|string", + viewAttr: 3 + }, + { + conditionType: "INPUT", + domkey: ["modeName"], + fieldcol: 14, + label: "建模名称", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["modeId"], + fieldcol: 14, + label: "建模ID", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + } + ], + title: "基础信息", + lanId: 111, + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/pages/datapush/index.js b/pc4mobx/hrmSalary/pages/datapush/index.js index e94935d4..1bbf5add 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/index.js @@ -9,9 +9,11 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaLocaleProvider, WeaReqTop } from "ecCom"; +import { WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom"; +import * as API from "../../apis/datapush"; import DatapushList from "./components/datapushList"; -import { Button } from "antd"; +import DatapushDialog from "./components/DPDialog"; +import { Button, message, Modal } from "antd"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -22,24 +24,54 @@ class Index extends Component { constructor(props) { super(props); this.state = { - selectedKey: "datapush", isQuery: false + selectedKey: "datapush", isQuery: false, query: { name: "" }, + DPDialog: { visible: false, title: "", detail: {} } //数据推送弹框 }; } - handleOperate = () => { + handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery }); + handleOperate = (type, detail = {}) => { + switch (type) { + case "create": + case "edit": + const title = type === "create" ? getLabel(111, "新建") : getLabel(111, "编辑"); + this.setState({ DPDialog: { visible: true, title, detail } }); + break; + case "del": + Modal.confirm({ + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), + onOk: () => { + API.deletePushSetting({ id: detail }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "删除成功")); + this.handleAdvanceSearch(); + } else { + message.error(errormsg); + } + }); + } + }); + break; + default: + break; + } }; render() { - const { selectedKey } = this.state; - const { taxAgentStore: { PageAndOptAuth }, baseFormStore: { form } } = this.props; + const { selectedKey, DPDialog, isQuery, query } = this.state; + const { taxAgentStore: { PageAndOptAuth } } = this.props; const showOperateBtn = PageAndOptAuth.opts.includes("admin"); const tabs = [ { title: getLabel(111, "数据推送"), key: "datapush", showDropIcon: false, dropMenuDatas: [], buttons: showOperateBtn ? [ - - ] : [], - children: + , + this.setState({ query: { ...query, name: v } })}/> + ] : [ this.setState({ query: { ...query, name: v } })}/>], + children: } ]; return ( @@ -52,6 +84,9 @@ class Index extends Component { dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas} > {_.find(tabs, o => selectedKey === o.key).children} + {/*数据推送框*/} + this.setState({ DPDialog: { ...DPDialog, visible: false } })} + onSearch={this.handleAdvanceSearch}/> ); } diff --git a/pc4mobx/hrmSalary/pages/datapush/index.less b/pc4mobx/hrmSalary/pages/datapush/index.less index a6b2b1f0..d96d8b5e 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.less +++ b/pc4mobx/hrmSalary/pages/datapush/index.less @@ -14,5 +14,67 @@ height: 100% !important; } + .pushdata_create_dialog { + .scroller { + background: #f6f6f6; + } + + .pushdata_detail { + .opts { + width: 100%; + display: flex; + justify-content: flex-end; + align-items: center; + padding: 8px; + } + } + + .wea-slide-modal-title { + border-bottom: 1px solid #ebebeb; + } + + .titleDialog { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 46px 0 16px; + + .titleCol { + flex: 1; + display: flex; + align-items: center; + } + + .titleLeftBox { + .titleIcon { + color: #fff; + margin: 0; + width: 40px; + height: 40px; + line-height: 40px; + font-size: 22px; + display: flex; + align-items: center; + justify-content: center; + background: #F14A2D; + border-radius: 50%; + } + + .title { + font-size: 14px; + color: #333; + padding-left: 6px; + } + } + + .titleRightBox { + justify-content: flex-end; + + button:last-child { + margin-left: 10px; + } + } + } + } } } From 18a87cb45c463177d5a5d2536ef9d3dba41baaae Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 20 Nov 2024 15:30:14 +0800 Subject: [PATCH 04/51] =?UTF-8?q?feature/2.15.2.2411.01=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF-=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/datapush.js | 8 ++ .../datapush/components/DPDialog/index.js | 67 +++++++-- .../components/PDDialog/customTreeSelect.js | 90 ++++++++++++ .../datapush/components/PDDialog/index.js | 135 ++++++++++++++++++ .../hrmSalary/pages/datapush/conditions.js | 61 +++++++- pc4mobx/hrmSalary/pages/datapush/index.less | 54 +++++++ pc4mobx/hrmSalary/stores/baseForm.js | 2 + 7 files changed, 403 insertions(+), 14 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/datapush/components/PDDialog/customTreeSelect.js create mode 100644 pc4mobx/hrmSalary/pages/datapush/components/PDDialog/index.js diff --git a/pc4mobx/hrmSalary/apis/datapush.js b/pc4mobx/hrmSalary/apis/datapush.js index 5260d269..3b2adc5c 100644 --- a/pc4mobx/hrmSalary/apis/datapush.js +++ b/pc4mobx/hrmSalary/apis/datapush.js @@ -16,3 +16,11 @@ export const deletePushSetting = (params) => { export const getPushItemList = (params) => { return postFetch("/api/bs/hrmsalary/push/item/list", params); }; +// 保存推送配置明细 +export const savePushItemList = (params) => { + return postFetch("/api/bs/hrmsalary/push/item/save", params); +}; +// 删除推送配置明细 +export const deletePushItemList = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/push/item/delete", "GET", params); +}; diff --git a/pc4mobx/hrmSalary/pages/datapush/components/DPDialog/index.js b/pc4mobx/hrmSalary/pages/datapush/components/DPDialog/index.js index 4c76dd1e..bbd174fb 100644 --- a/pc4mobx/hrmSalary/pages/datapush/components/DPDialog/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/components/DPDialog/index.js @@ -10,22 +10,23 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaButtonIcon, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable, WeaTools } from "ecCom"; +import PDetailDialog from "../PDDialog"; import { postFetch } from "../../../../util/request"; import * as API from "../../../../apis/datapush"; import { conditions } from "../../conditions"; import { getSearchs } from "../../../../util"; -import { Button, message } from "antd"; +import { Button, message, Modal } from "antd"; const getLabel = WeaLocaleProvider.getLabel; const getKey = WeaTools.getKey; -@inject("baseFormStore") -@observer +@inject("baseFormStore") @observer class Index extends Component { constructor(props) { super(props); this.state = { - conditions: [], loading: false, columns: [], dataSource: [] + conditions: [], loading: false, columns: [], dataSource: [], + PDDialog: { visible: false, title: "", settingId: "", detail: {} } //推送明细弹框 }; } @@ -61,15 +62,52 @@ class Index extends Component { !_.isEmpty(detail) && this.getPushItemList(props); }); }; - getPushItemList = ({ detail }) => { + getPushItemList = (props) => { + const { detail } = props || this.props; const { id: settingId } = detail; API.getPushItemList({ settingId }).then(({ status, data }) => { if (status) { const { columns, list: dataSource } = data; - this.setState({ dataSource, columns }); + this.setState({ + dataSource, columns: [...columns, { + title: getLabel(111, "操作"), width: 120, render: (__, record) => ( + this.handleOpts("edit", record)}>{getLabel(111, "编辑")} + this.handleOpts("del", record.id)}>{getLabel(111, "删除")} + ) + }], + PDDialog: { ...this.state.PDDialog, settingId } + }); } }); }; + handleOpts = (type, detail = {}) => { + switch (type) { + case "edit": + const { PDDialog } = this.state; + this.setState({ PDDialog: { ...PDDialog, visible: true, title: getLabel(111, "编辑"), detail } }); + break; + case "del": + Modal.confirm({ + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), + onOk: () => { + API.deletePushItemList({ id: detail }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "删除成功")); + this.getPushItemList(); + } else { + message.error(errormsg); + } + }); + } + }); + break; + default: + break; + } + }; save = () => { const { baseFormStore: { form }, detail } = this.props; form.validateForm().then(f => { @@ -105,21 +143,24 @@ class Index extends Component { }; render() { - const { baseFormStore: { form }, detail } = this.props, { conditions, columns, dataSource } = this.state; + const { baseFormStore: { form }, detail } = this.props, { conditions, columns, dataSource, PDDialog } = this.state; return ( {getSearchs(form, conditions, 2, false)} - { - !_.isEmpty(detail) && + {!_.isEmpty(detail) &&
- + this.setState({ + PDDialog: { ...PDDialog, visible: true, title: getLabel(111, "新建") } + })}/>
- -
- } + + this.setState({ PDDialog: { ...PDDialog, visible: false } })}/> + } } />); } diff --git a/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/customTreeSelect.js b/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/customTreeSelect.js new file mode 100644 index 00000000..eae803cd --- /dev/null +++ b/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/customTreeSelect.js @@ -0,0 +1,90 @@ +/* + * 数据推送 + * 自定义薪资项目选择树 + * @Author: 黎永顺 + * @Date: 2024/11/20 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { TreeSelect } from "antd"; +import { formualSearchField, formualSearchGroup } from "../../../../apis/item"; +import cs from "classnames"; + +const getLabel = WeaLocaleProvider.getLabel; +const TreeNode = TreeSelect.TreeNode; + +class CustomTreeSelect extends Component { + constructor(props) { + super(props); + this.state = { sourceList: [] }; + } + + componentDidMount() { + formualSearchGroup({ referenceType: "sql" }).then(({ status, data }) => { + if (status) this.setState({ sourceList: _.map(data, o => ({ ...o, isLeaf: true })) }); + }); + } + + getSourceItem = (sourceId) => { + formualSearchField({ sourceId, extendParam: { referenceType: "sql" } }).then(({ status, data }) => { + if (status) { + this.setState({ + sourceList: _.map(this.state.sourceList, o => { + if (o.key === sourceId) return { + ...o, + children: _.map(data, k => ({ key: k.fieldId, value: k.name, fieldType: k.fieldType, isLeaf: false })) + }; + return { ...o }; + }) + }); + } + }); + }; + generateTreeNodes = (data) => { + const treeNodes = [], showData = [...data]; + showData.map((item) => { + let title = ( +
+ {item.value} + { + item.fieldType ? + {item.fieldType === "number" ? getLabel(111, "数字") : getLabel(111, "文本")} : + + } +
+ ); + treeNodes.push(); + }); + return treeNodes; + }; + handleSelect = (nodeValue) => { + const { form } = this.props, { sourceList } = this.state; + const [source, item] = nodeValue.split("_"); + const itemName = _.find(_.find(sourceList, o => o.key === source).children, k => k.key === nodeValue).value; + form.updateFields({ item, itemName, source }); + }; + + render() { + const { sourceList } = this.state, { form } = this.props; + const { source, item } = form.getFormParams(); + return ( + this.getSourceItem(node.props.value)} + onSelect={this.handleSelect}> + { + _.map(sourceList, o => ( + + {this.generateTreeNodes(o.children || [])} + )) + } + + ); + } +} + +export default CustomTreeSelect; diff --git a/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/index.js b/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/index.js new file mode 100644 index 00000000..d2abc335 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/datapush/components/PDDialog/index.js @@ -0,0 +1,135 @@ +/* + * 数据推送 + * 推送明细新增编辑 + * @Author: 黎永顺 + * @Date: 2024/11/20 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom"; +import CustomTreeSelect from "./customTreeSelect"; +import { commonEnumList } from "../../../../apis/ruleconfig"; +import * as API from "../../../../apis/datapush"; +import { PDConditions } from "../../conditions"; +import { WeaSwitch } from "comsMobx"; +import { Button, message } from "antd"; + + +const getLabel = WeaLocaleProvider.getLabel; +const getKey = WeaTools.getKey; + +@inject("baseFormStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + conditions: [], loading: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm(nextProps); + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.baseFormStore.initFormExtra(); + } + + initForm = async (props) => { + const { detail = {} } = props; + const { data: fieldType } = await commonEnumList({ enumClass: "com.engine.salary.enums.push.PushItemFieldEnum" }); + this.setState({ + conditions: _.map(PDConditions, item => ({ + ...item, items: _.map(item.items, o => { + o = { ...o, label: getLabel(o.lanId, o.label), value: detail[getKey(o)] ? String(detail[getKey(o)]) : "" }; + if (getKey(o) === "fieldType") { + return { + ...o, value: detail[getKey(o)] ? String(detail[getKey(o)]) : "", + options: _.map(fieldType, o => ({ key: o.enum, showname: o.defaultLabel })) + }; + } + return { ...o }; + }) + })) + }, () => { + props.baseFormStore.formExtra.initFormFields(this.state.conditions); + }); + }; + + renderRuleForm = () => { + const { conditions } = this.state; + const { baseFormStore: { formExtra } } = this.props, { isFormInit } = formExtra; + const formParams = formExtra.getFormParams(); + let group = []; + isFormInit && conditions && conditions.map(c => { + let items = []; + c.items.map(fields => { + items.push({ + com: ( + + { + getKey(fields) === "item" ? + + + { + _.isEmpty(formParams.item) && + + + + } + + : + } + ), + colSpan: 1, + hide: fields.hide + }); + }); + !_.isEmpty(items) && group.push( + ); + }); + return group; + }; + save = () => { + const { baseFormStore: { formExtra }, id, settingId } = this.props; + formExtra.validateForm().then(f => { + if (f.isValid) { + const payload = formExtra.getFormParams(); + this.setState({ loading: true }); + API.savePushItemList({ ...payload, settingId, id }) + .then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(30700, "操作成功")); + this.props.onCancel(this.props.onSearch()); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: false })); + } else { + f.showErrors(); + } + }); + }; + + render() { + const { loading } = this.state; + return ( + {getLabel(111, "取消")}, + + ]} + > +
{this.renderRuleForm()}
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/datapush/conditions.js b/pc4mobx/hrmSalary/pages/datapush/conditions.js index 5ab37972..b419a334 100644 --- a/pc4mobx/hrmSalary/pages/datapush/conditions.js +++ b/pc4mobx/hrmSalary/pages/datapush/conditions.js @@ -73,4 +73,63 @@ export const conditions = [ lanId: 111, defaultshow: true } -]; +];// 推送配置表单 +export const PDConditions = [ + { + items: [ + { + conditionType: "INPUT", + domkey: ["item"], + fieldcol: 14, + label: "薪资项目", + lanId: 111, + labelcol: 6, + value: "", + rules: "required|string", + viewAttr: 3 + }, + { + conditionType: "INPUT", + domkey: ["itemName"], + fieldcol: 14, + label: "字段名称", + lanId: 111, + labelcol: 6, + viewAttr: 2, + hide: true + }, + { + conditionType: "INPUT", + domkey: ["source"], + fieldcol: 14, + label: "字段名称", + lanId: 111, + labelcol: 6, + viewAttr: 2, + hide: true + }, + { + conditionType: "INPUT", + domkey: ["fieldName"], + fieldcol: 14, + label: "字段名称", + lanId: 111, + labelcol: 6, + viewAttr: 2 + }, + { + conditionType: "SELECT", + domkey: ["fieldType"], + fieldcol: 14, + label: "字段类型", + lanId: 111, + labelcol: 6, + value: "", + options: [], + viewAttr: 2 + } + ], + title: "", + defaultshow: true + } +];// 推送详细配置表单 diff --git a/pc4mobx/hrmSalary/pages/datapush/index.less b/pc4mobx/hrmSalary/pages/datapush/index.less index d96d8b5e..57ea36c8 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.less +++ b/pc4mobx/hrmSalary/pages/datapush/index.less @@ -78,3 +78,57 @@ } } } + +.custom_item_treeselect { + .weapp-excel-code-action-list-variable-tip { + display: none; + } +} + +.no-child-item { + .ant-select-tree-switcher { + display: none !important; + } + + .ant-select-tree-node-content-wrapper { + width: 100%; + } + + .weapp-excel-code-action-list-variable { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + + .weapp-excel-code-action-list-variable-name { + height: 20px; + line-height: 18px; + -webkit-flex: 1 1; + flex: 1 1; + overflow: hidden; + text-overflow: ellipsis; + word-break: keep-all; + white-space: nowrap; + cursor: pointer; + } + + .danger { + color: rgb(255, 102, 106) !important; + border: 1px solid rgb(255, 193, 195) !important; + background-color: rgb(255, 223, 224) !important; + } + + .weapp-excel-code-action-list-variable-tip { + width: 40px; + height: 20px; + line-height: 18px; + text-align: center; + vertical-align: middle; + color: rgb(255, 205, 80); + border: 1px solid rgb(255, 222, 138); + background-color: rgb(255, 245, 219); + border-radius: 2px; + } + } +} + diff --git a/pc4mobx/hrmSalary/stores/baseForm.js b/pc4mobx/hrmSalary/stores/baseForm.js index 65a4e574..c4d10349 100644 --- a/pc4mobx/hrmSalary/stores/baseForm.js +++ b/pc4mobx/hrmSalary/stores/baseForm.js @@ -6,6 +6,8 @@ export class BaseFormStore { // 全局设置仓库 @observable form = new WeaForm(); // 规则渲染form @action("初始化form表单") initForm = () => this.form = new WeaForm(); + @observable formExtra = new WeaForm(); // 规则渲染form + @action("初始化form表单") initFormExtra = () => this.formExtra = new WeaForm(); @observable logVisible = false; // 控制日志弹框的显影 @action("日志显隐开关") setLogVisible = bool => this.logVisible = bool; From 571026ebf84d0f50e02ceb63463a850a89217317 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Thu, 21 Nov 2024 14:10:47 +0800 Subject: [PATCH 05/51] =?UTF-8?q?feature/2.15.2.2411.01=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF-=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/associativeSearchMult.js | 13 +++-- .../components/customBrowserDialog.js | 2 + .../components/CustomBrowser/index.js | 10 +--- .../datapush/components/DPDialog/index.js | 10 ++-- .../components/PDDialog/customTreeSelect.js | 10 ++-- .../datapush/components/PDDialog/index.js | 53 +++---------------- .../hrmSalary/pages/datapush/conditions.js | 32 +++++++---- .../hrmSalary/pages/datapush/formRender.js | 51 ++++++++++++++++++ pc4mobx/hrmSalary/style/index.less | 2 +- 9 files changed, 101 insertions(+), 82 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/datapush/formRender.js diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/associativeSearchMult.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/associativeSearchMult.js index 3f1dbc54..562ea657 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/associativeSearchMult.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/associativeSearchMult.js @@ -33,18 +33,17 @@ class AssociativeSearchMult extends Component { } } - handleSearch = (value) => { - this.setState({ loading: true }); - this.getData(value); - }; + handleSearch = (value) => this.getData(value); getData = (name = "") => { - const { browserConditionParam } = this.props; + const { browserConditionParam, tags } = this.props; + if (tags) return; const { completeURL, filterByName, searchParamsKey, convertDatasource, dataParams = {} } = browserConditionParam; if (_.trim(name)) { let payload = { ...dataParams }; searchParamsKey && (payload = { ...payload, [searchParamsKey]: name, current: 1, pageSize: 9999 }); + this.setState({ loading: true }); postFetch(completeURL, payload).then(({ status, data }) => { this.setState({ loading: false }); if (status && data.list) { @@ -105,7 +104,7 @@ class AssociativeSearchMult extends Component { render() { const { data, dropdownWidth } = this.state; - const { viewAttr, selectedValues, datas, isSingle, browserConditionParam = {} } = this.props; + const { viewAttr, selectedValues, datas, isSingle, browserConditionParam = {}, tags } = this.props; const clsname = classNames({ "required": (viewAttr === 3 || viewAttr === "3") && _.isEmpty(selectedValues), "mr12": viewAttr === "3" && _.isEmpty(selectedValues), @@ -127,7 +126,7 @@ class AssociativeSearchMult extends Component { ); } let options = data.map(d => ); - selectedValues && selectedValues.map((v) => { + !tags && selectedValues && selectedValues.map((v) => { v && options.unshift(); }); const select =