From 906669b9a86c976b57e8cbcee81555339224815e Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Fri, 29 Jul 2022 16:30:03 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B2=BB=E8=B6=85?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=95=85=E9=9A=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/quanju/containers/footer/guanli/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/client/src/sections/quanju/containers/footer/guanli/index.js b/web/client/src/sections/quanju/containers/footer/guanli/index.js index 600b2d9a..bbf9d95b 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/index.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/index.js @@ -30,8 +30,9 @@ const Guanli = (props) => { // let d = res.payload.data?.overSpeedList.sort((a,b)=>b.processingTime < a.processingTime ?-1:1) var pattern = /[\u4e00-\u9fa5]*/; + console.log(res.payload.data,'好的号的') let d = res.payload.data?.overSpeedList?.filter((item,index)=>{ - return escape(item.processingTime).indexOf("%u")<0 + return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false }) d.map((item,index)=>{ From 8e0048ac0930469db61afd46fa34e62ba39fcd8e Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Fri, 29 Jul 2022 16:41:38 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B2=BB=E8=B6=85?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=95=85=E9=9A=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/quanju/containers/footer/guanli/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/src/sections/quanju/containers/footer/guanli/index.js b/web/client/src/sections/quanju/containers/footer/guanli/index.js index bbf9d95b..c9125ef9 100644 --- a/web/client/src/sections/quanju/containers/footer/guanli/index.js +++ b/web/client/src/sections/quanju/containers/footer/guanli/index.js @@ -30,7 +30,7 @@ const Guanli = (props) => { // let d = res.payload.data?.overSpeedList.sort((a,b)=>b.processingTime < a.processingTime ?-1:1) var pattern = /[\u4e00-\u9fa5]*/; - console.log(res.payload.data,'好的号的') + // console.log(res.payload.data,'好的号的') let d = res.payload.data?.overSpeedList?.filter((item,index)=>{ return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false }) From d9079d383754dda5b0c156ed7a73a95e4720ee4a Mon Sep 17 00:00:00 2001 From: wangyue Date: Fri, 29 Jul 2022 16:44:21 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../footer/leadership/right/right-bottom.js | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js b/web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js index 9f954ced..7f2f3f2d 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js @@ -10,15 +10,32 @@ const Rightbottom = (props) => { const style = { height: "28%", marginTop: "4%" } const [beijing, setBeijing] = useState() const [list, setList] = useState([]) + const [rightDatas, setrightDatas] = useState([]) const [nums, setNums] = useState([]) + const requestRightDatas = async () => { + const res = await dispatch(getZhichaolist()) + var pattern = /[\u4e00-\u9fa5]*/; + let d = res.payload.data?.overSpeedList?.filter((item, index) => { + return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false + }) + + d.map((item, index) => { + if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) { + return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}` + } + }) + d.sort((a, b) => b.processingTime.localeCompare(a.processingTime)) + // setrightDatas(res.payload.data) + setList(d) + } useEffect(() => { const zhichaolist = dispatch(getZhichaolist()).then((res) => { - setList(res.payload?.data?.overSpeedList.filter(item => /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false - )) - // console.log(res); setNums(res.payload?.data?.processed) + }) + requestRightDatas() }, []) + // console.log(list); const renderBody = () => { return (
From 13247e43f20e3cb0d02d79ee54ca925fed91ece1 Mon Sep 17 00:00:00 2001 From: yangsen <952208207@qq.com> Date: Fri, 29 Jul 2022 16:53:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=A3=E4=BC=A0=E6=97=B6=E8=A7=86?= =?UTF-8?q?=E9=A2=91-=E5=88=A0=E9=99=A4=E5=A4=8D=E9=80=89=E6=A1=86?= =?UTF-8?q?=E5=92=8C=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=BC=80=E5=90=AF=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fillion/components/infor/videoUpload.js | 32 ++-- .../fillion/components/promotionalTable.js | 166 +++++++++--------- 2 files changed, 97 insertions(+), 101 deletions(-) diff --git a/web/client/src/sections/fillion/components/infor/videoUpload.js b/web/client/src/sections/fillion/components/infor/videoUpload.js index 460dd75a..0bfc3c40 100644 --- a/web/client/src/sections/fillion/components/infor/videoUpload.js +++ b/web/client/src/sections/fillion/components/infor/videoUpload.js @@ -1,6 +1,6 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState } from 'react'; import { connect } from 'react-redux'; -import { Modal, Form, Button, Input, Card, List } from 'antd'; +import { Modal, Form, Button, Input, Switch } from 'antd'; import Uploads from "../../../../components/Upload/index" import { putAddPropagata } from '../../actions/infor'; import { putEditPropagata } from '../../actions/infor'; @@ -8,11 +8,9 @@ import { getPropagata } from '../../actions/infor'; const VideoUpload = (props) => { - // const [counts, setCounts] = useState()//shuju const { dispatch, record, counts, setCounts } = props - const [success, setSuccess] = useState() //状态 const [form] = Form.useForm(); //弹窗 @@ -34,7 +32,8 @@ const VideoUpload = (props) => { return item.storageUrl }) const videoname = values.videoname - const data = { name: videoname, video: videoAddress } + const enable = values.show + const data = { name: videoname, video: videoAddress, enable: enable } dispatch(putAddPropagata(data)).then(() => { dispatch(getPropagata()).then((res) => { setCounts(res.payload.data) @@ -48,9 +47,6 @@ const VideoUpload = (props) => { const handleOkEdit = (record) => { form.validateFields().then((values) => { - const videoAddress = values.video.map((item) => { - return item.storageUrl - }) const videoname = values.username const id = record.id const video = record.video @@ -68,8 +64,6 @@ const VideoUpload = (props) => { setIsModalVisible(false); }; - - const handleCancel = () => { setIsModalVisible(false); }; @@ -82,8 +76,6 @@ const VideoUpload = (props) => { console.log('Failed:', errorInfo); }; - - return (
{ @@ -99,7 +91,7 @@ const VideoUpload = (props) => { span: 16, }} initialValues={{ - remember: true, + show: true }} onFinish={onFinish} onFinishFailed={onFinishFailed} @@ -123,6 +115,12 @@ const VideoUpload = (props) => { { maxFileSize={200} /> + + +
@@ -180,8 +184,6 @@ const VideoUpload = (props) => { fileTypes={['mp4']} maxFileSize={200} /> - - diff --git a/web/client/src/sections/fillion/components/promotionalTable.js b/web/client/src/sections/fillion/components/promotionalTable.js index ff5a746f..0853f3a3 100644 --- a/web/client/src/sections/fillion/components/promotionalTable.js +++ b/web/client/src/sections/fillion/components/promotionalTable.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState} from 'react'; +import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { Spin, Button, Popconfirm, Switch } from 'antd'; import ProTable from '@ant-design/pro-table'; @@ -30,96 +30,96 @@ const promotionalTable = (props) => { const columns = - [{ - title: '序号', - search: false, - dataIndex: 'containers', - fixed: 'left', - width: 120, - render: (dom, record, key) => { - return key + 1 - } - }, - { - title: '视频名称', - dataIndex: 'videoName', - fixed: 'left', - search: false, - width: 120, - options: 1, - render: (dom, record) => { - return record.name - } - }, - { - title: '是否展示', - dataIndex: 'shuffling', - valueType: 'shufflingRange', - search: false, - width: 120, - fixed: 'right', - render: (dom, record) => { - return
- - onClickEnable(record)} defaultChecked={true ? record.enable == true : false} />
- } - }, - { - title: '操作', - dataIndex: 'creatTime', - valueType: 'dateTimeRange', - hideInSearch: true, - width: 160, - fixed: 'right', - render: (dom, record) => { - return
- - { - const query = { - publicityId: record.id - } - dispatch(delPropagata(query)).then(() => { - dispatch(getPropagata()).then((res) => { - setCounts(res.payload.data) + [ + { + title: '序号', + search: false, + dataIndex: 'containers', + fixed: 'left', + width: 120, + render: (dom, record, key) => { + return key + 1 + } + }, + { + title: '视频名称', + dataIndex: 'videoName', + fixed: 'left', + search: false, + width: 120, + options: 1, + render: (dom, record) => { + return record.name + } + }, + { + title: '是否展示', + dataIndex: 'shuffling', + valueType: 'shufflingRange', + search: false, + width: 120, + fixed: 'right', + render: (dom, record) => { + return
+ onClickEnable(record)} defaultChecked={true ? record.enable == true : false} /> +
+ } + }, + { + title: '操作', + dataIndex: 'creatTime', + valueType: 'dateTimeRange', + hideInSearch: true, + width: 120, + fixed: 'right', + render: (dom, record) => { + return
+ + { + const query = { + publicityId: record.id + } + dispatch(delPropagata(query)).then(() => { + dispatch(getPropagata()).then((res) => { + setCounts(res.payload.data) + }) }) - }) + } } - } - - > - - -
- } - }, - { - key: "direction", - hideInTable: true, - dataIndex: "direction", - order: 6, - renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => { - return ( -
- + > + +
- ); + + } + }, + { + key: "direction", + hideInTable: true, + dataIndex: "direction", + order: 6, + renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => { + return ( +
+ +
+ ); + }, }, - }, ] //获取数据 useEffect(() => { const vedio = dispatch(getPropagata()).then((res) => { setCounts(res.payload.data) - console.log(res.payload.data) }) }, []) @@ -133,12 +133,6 @@ const promotionalTable = (props) => { options={false} style={{ width: "100% ", overflow: "auto", height: '760px' }} rowKey='id' - rowSelection={{ - selectedRowKeys: rowSelected, - onChange: (selectedRowKeys) => { - setRowSelected(selectedRowKeys); - }, - }} form={{ submitter: false, }}