+ )
+}
+
+
+
+function mapStateToProps (state) {
+ const { depMessage } = state;
+ const pakData = (dep) => {
+ return dep.map((d) => {
+ return {
+ title: d.name,
+ value: d.id,
+ children: pakData(d.subordinate)
+ }
+ })
+ }
+ let depData = pakData(depMessage.data || [])
+ return {
+ loading: depMessage.isRequesting,
+ depData,
+ };
+}
+export default connect(mapStateToProps)(VideoUpload);
\ No newline at end of file
diff --git a/web/client/src/sections/fillion/components/promotionalTable.js b/web/client/src/sections/fillion/components/promotionalTable.js
index 3b8a42b9..8922356e 100644
--- a/web/client/src/sections/fillion/components/promotionalTable.js
+++ b/web/client/src/sections/fillion/components/promotionalTable.js
@@ -1,169 +1,181 @@
-import React, { useEffect, useState } from 'react';
+import React, { useEffect, useState} from 'react';
import { connect } from 'react-redux';
-import { Spin, Button, Popconfirm, Badge } from 'antd';
+import { Spin, Button, Popconfirm, Switch } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
-import moment from 'moment';
-import { getReportStatistic } from "../actions/infor"
+import VideoUpload from './infor/videoUpload';
+import { getPropagata } from '../actions/infor';
+import { putEditPropagata } from '../actions/infor';
+import { delPropagata } from '../actions/infor';
+
const promotionalTable = (props) => {
- const { dispatch, user, depData, depMessage, depLoading } = props
- const [rowSelected, setRowSelected] = useState([])
- const [regionId, setRegionId] = useState()//区域id
- const [placeType, setPlaceType] = useState()//场所
- const [day, setDay] = useState([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])//日期
- const [sitename, setSitename] = useState()//场所名称
- const [counts, setCounts] = useState()//shuju
+ const { dispatch, } = props
+ const [rowSelected, setRowSelected] = useState([])
+ const [counts, setCounts] = useState()//shuju
+ const onClickEnable = (record) => {
+ const id = record.id
+ const name = record.name
+ const video = record.video
- const columns =
- [{
- title: '序号',
- search: false,
- dataIndex: 'containers',
+ const enable = true ? record.enable == false : true
+ const data = ({ publicityId: id, name: name, video: video, enable: enable })
+ dispatch(putEditPropagata(data)).then((res) => {
+ dispatch(getPropagata()).then((res) => {
+ setCounts(res.payload.data)
+ })
+ })
+ }
- fixed: 'left',
- width: 120,
- render: (dom, record) => {
- return record.address
- },
- fieldProps: {
- getPopupContainer: (triggerNode) => triggerNode.parentNode,
- }
- },
- {
- title: '视频名称',
- dataIndex: 'placeName',
- fixed: 'left',
- width: 120,
- options: 1,
- backgroundColor: "#ffffff",
- fieldProps: {
- onChange: (value, cs) => {
- setSitename(value.currentTarget.value)
- },
- placeholder: '请输入视频名称进行搜索',
- getPopupContainer: (triggerNode) => triggerNode.parentNode,
- },
- },
-
- {
- title: '修改时间',
- search: false,
- dataIndex: 'time2',
- valueType: 'dateRange',
- // align: 'right',
- width: 120,
- render: (dom, record) => {
- return record.address
- },
- fieldProps: {
- getPopupContainer: (triggerNode) => triggerNode.parentNode,
- }
- },
- {
- key: "direction",
- hideInTable: true,
- dataIndex: "direction",
- order: 6,
- renderFormItem: (item, { type, defaultRender, ...rest }, form) => {
- return (
-