Commit 8cb706f3 by end

修改bug

parent b2a1997a
...@@ -1315,11 +1315,11 @@ class homePage extends Component { ...@@ -1315,11 +1315,11 @@ class homePage extends Component {
<p>年度累计问卷参与人数()</p> <p>年度累计问卷参与人数()</p>
</div> </div>
</div> </div>
{/* 我要投稿 */} {/* 信箱统计 */}
<div> <div>
<div> <div>
<img src={img5} alt="" /> <img src={img5} alt="" />
<p>我要投稿</p> <p>信箱统计</p>
</div> </div>
<div> <div>
{/* 左侧 */} {/* 左侧 */}
...@@ -1327,8 +1327,7 @@ class homePage extends Component { ...@@ -1327,8 +1327,7 @@ class homePage extends Component {
<div className={styles.chartTop}> <div className={styles.chartTop}>
<div> <div>
<div> <div>
{/* <img src={img5} alt="" /> */}
<p>投稿总数</p>
</div> </div>
<div> <div>
<Select <Select
......
...@@ -4,21 +4,11 @@ import { ...@@ -4,21 +4,11 @@ import {
Modal, Modal,
Form, Form,
Input, Input,
Textarea,
Radio,
Cascader, Cascader,
DatePicker,
Upload,
Icon,
message, message,
} from "antd"; } from "antd";
import { connect } from "react-redux"; import { connect } from "react-redux";
// import {gupList, gupfetch} from 'ACTIONS/upload';
import { gupList, gupfetch } from "@/common/UpLoad/redux/actions"; import { gupList, gupfetch } from "@/common/UpLoad/redux/actions";
import Editor from "@/common/Editor/editor";
import UpLoad from "@/common/UpLoad";
import moment from "moment";
import validator from "@/common/validatorForm/index";
import UploadImageCover from "@/common/UploadImageCover"; import UploadImageCover from "@/common/UploadImageCover";
const FormItem = Form.Item; const FormItem = Form.Item;
...@@ -98,12 +88,6 @@ class addEdit extends React.Component { ...@@ -98,12 +88,6 @@ class addEdit extends React.Component {
} }
//123 //123
handleUploadChange({ file, fileList }) { handleUploadChange({ file, fileList }) {
// console.log(123,file.name.split('.')[1])
// if (file.name.indexOf("pdf") == -1) {
// message.error("请上传pdf文件");
// return;
// }
let temp = this.state.fileList; let temp = this.state.fileList;
if (file.status == "removed") { if (file.status == "removed") {
temp = temp.filter(item => { temp = temp.filter(item => {
......
import React from "react"; import React from "react";
import { import { Tree, Form, Input, Select, Table, message } from "antd";
Row,
Col,
Tree,
Form,
Modal,
Input,
Select,
Steps,
Icon,
Table,
Button,
message,
} from "antd";
import Head from "./head"; import Head from "./head";
import func from "@/common/commonFunc"; import func from "@/common/commonFunc";
import Breadcrumb from "@/common/Breadcrumb"; import Breadcrumb from "@/common/Breadcrumb";
...@@ -193,12 +180,42 @@ class Atricle extends React.Component { ...@@ -193,12 +180,42 @@ class Atricle extends React.Component {
return params; return params;
} }
//审核 //审核
approve = (id, type) => { approve = (id, type, pdfOssUrl, pdfFileName) => {
let _this = this; let _this = this;
const { page, pagesize, inputValue } = this.state; const { page, pagesize, inputValue } = this.state;
const { getApprove, getUnapprove, getList } = this.props; const { getApprove, getUnapprove, getList } = this.props;
if (type == 1) { if (type == 1) {
let _this = this;
const form = this.formRef.props.form;
const { page, pagesize, inputValue } = this.state;
const { postUpdata, getList } = this.props;
form.validateFields((err, values) => {
if (err) {
return;
}
const jsonEdit = {
id,
logoPath: values.logoPath,
fileName: values.fileName.trim(),
content: values.content,
author: values.author,
deptName: values.deptName,
pdfOssUrl: pdfOssUrl,
pdfFileName: pdfFileName,
typeOne: values.type[0],
typeTwo: values.type[1] ? values.type[1] : 0,
typeThree: values.type[2] ? values.type[2] : 0,
};
postUpdata(_this.filterParams(jsonEdit), () => {
// reset
getList(
_this.filterParams({
pageNo: page,
pageSize: pagesize,
...inputValue,
}),
() => {
//通过 //通过
getApprove({ id }, () => { getApprove({ id }, () => {
getList( getList(
...@@ -217,6 +234,10 @@ class Atricle extends React.Component { ...@@ -217,6 +234,10 @@ class Atricle extends React.Component {
} }
); );
}); });
}
);
});
});
} else { } else {
//不通过 //不通过
getUnapprove({ id }, () => { getUnapprove({ id }, () => {
...@@ -294,7 +315,7 @@ class Atricle extends React.Component { ...@@ -294,7 +315,7 @@ class Atricle extends React.Component {
} }
const jsonEdit = { const jsonEdit = {
id, id,
logoPath:values.logoPath, logoPath: values.logoPath,
fileName: values.fileName.trim(), fileName: values.fileName.trim(),
content: values.content, content: values.content,
author: values.author, author: values.author,
......
...@@ -31,7 +31,7 @@ class Header extends React.Component { ...@@ -31,7 +31,7 @@ class Header extends React.Component {
); );
}); });
const status = [ const status = [
{ value: 1, text: "接收" }, { value: 1, text: "接收" },
{ value: 2, text: "已接收" }, { value: 2, text: "已接收" },
]; ];
const types = status.map((item, index) => { const types = status.map((item, index) => {
......
...@@ -80,6 +80,7 @@ class TestModal extends Component { ...@@ -80,6 +80,7 @@ class TestModal extends Component {
}; };
render() { render() {
const { defaultValue, status } = this.props; const { defaultValue, status } = this.props;
console.log('111111111111',status)
const { radioNum } = this.state; const { radioNum } = this.state;
const { getFieldDecorator, getFieldValue } = this.props.form; const { getFieldDecorator, getFieldValue } = this.props.form;
const formItemLayout = { const formItemLayout = {
...@@ -120,7 +121,7 @@ class TestModal extends Component { ...@@ -120,7 +121,7 @@ class TestModal extends Component {
], ],
})(<TextArea rows={4} disabled={status === "look"} />)} })(<TextArea rows={4} disabled={status === "look"} />)}
</FormItem> </FormItem>
{status === "look" && ( {status === "look" && defaultValue.contentAppendixUrl && (
<div> <div>
<img <img
src={defaultValue.contentAppendixUrl} src={defaultValue.contentAppendixUrl}
......
...@@ -563,7 +563,7 @@ class Details extends Component { ...@@ -563,7 +563,7 @@ class Details extends Component {
jumptests={jumptests} jumptests={jumptests}
ref={obj => (this.newTest = obj)} ref={obj => (this.newTest = obj)}
uploadProps={uploadProps} uploadProps={uploadProps}
status={"look"} status={this.type == "2" ? "look" : ""}
/> />
</Modal> </Modal>
)} )}
......
...@@ -102,7 +102,7 @@ class UploadUtil extends Component { ...@@ -102,7 +102,7 @@ class UploadUtil extends Component {
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
return ( return (
<Form> <Form>
<FormItem extra={"请上传资源附件(附件格式:png、jpg、jpeg、gif)"}> <FormItem extra={"请上传图片类型资源附件"}>
{getFieldDecorator("upload", { {getFieldDecorator("upload", {
valuePropName: "fileList", valuePropName: "fileList",
getValueFromEvent: this.normFile, getValueFromEvent: this.normFile,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment