Commit 8cb706f3 by end

修改bug

parent b2a1997a
......@@ -1315,11 +1315,11 @@ class homePage extends Component {
<p>年度累计问卷参与人数()</p>
</div>
</div>
{/* 我要投稿 */}
{/* 信箱统计 */}
<div>
<div>
<img src={img5} alt="" />
<p>我要投稿</p>
<p>信箱统计</p>
</div>
<div>
{/* 左侧 */}
......@@ -1327,8 +1327,7 @@ class homePage extends Component {
<div className={styles.chartTop}>
<div>
<div>
{/* <img src={img5} alt="" /> */}
<p>投稿总数</p>
</div>
<div>
<Select
......
......@@ -4,21 +4,11 @@ import {
Modal,
Form,
Input,
Textarea,
Radio,
Cascader,
DatePicker,
Upload,
Icon,
message,
} from "antd";
import { connect } from "react-redux";
// import {gupList, gupfetch} from 'ACTIONS/upload';
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";
const FormItem = Form.Item;
......@@ -98,12 +88,6 @@ class addEdit extends React.Component {
}
//123
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;
if (file.status == "removed") {
temp = temp.filter(item => {
......
import React from "react";
import {
Row,
Col,
Tree,
Form,
Modal,
Input,
Select,
Steps,
Icon,
Table,
Button,
message,
} from "antd";
import { Tree, Form, Input, Select, Table, message } from "antd";
import Head from "./head";
import func from "@/common/commonFunc";
import Breadcrumb from "@/common/Breadcrumb";
......@@ -193,29 +180,63 @@ class Atricle extends React.Component {
return params;
}
//审核
approve = (id, type) => {
approve = (id, type, pdfOssUrl, pdfFileName) => {
let _this = this;
const { page, pagesize, inputValue } = this.state;
const { getApprove, getUnapprove, getList } = this.props;
if (type == 1) {
//通过
getApprove({ id }, () => {
getList(
_this.filterParams({
pageNo: page,
pageSize: pagesize,
...inputValue,
}),
() => {
message.success("审核通过成功");
_this.setState({
record: _this.props.tableList,
total: _this.props.tableList.total,
visible: false,
});
}
);
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 }, () => {
getList(
_this.filterParams({
pageNo: page,
pageSize: pagesize,
...inputValue,
}),
() => {
message.success("审核通过成功");
_this.setState({
record: _this.props.tableList,
total: _this.props.tableList.total,
visible: false,
});
}
);
});
}
);
});
});
} else {
//不通过
......@@ -294,7 +315,7 @@ class Atricle extends React.Component {
}
const jsonEdit = {
id,
logoPath:values.logoPath,
logoPath: values.logoPath,
fileName: values.fileName.trim(),
content: values.content,
author: values.author,
......
......@@ -31,7 +31,7 @@ class Header extends React.Component {
);
});
const status = [
{ value: 1, text: "接收" },
{ value: 1, text: "接收" },
{ value: 2, text: "已接收" },
];
const types = status.map((item, index) => {
......
......@@ -80,6 +80,7 @@ class TestModal extends Component {
};
render() {
const { defaultValue, status } = this.props;
console.log('111111111111',status)
const { radioNum } = this.state;
const { getFieldDecorator, getFieldValue } = this.props.form;
const formItemLayout = {
......@@ -120,7 +121,7 @@ class TestModal extends Component {
],
})(<TextArea rows={4} disabled={status === "look"} />)}
</FormItem>
{status === "look" && (
{status === "look" && defaultValue.contentAppendixUrl && (
<div>
<img
src={defaultValue.contentAppendixUrl}
......
......@@ -563,7 +563,7 @@ class Details extends Component {
jumptests={jumptests}
ref={obj => (this.newTest = obj)}
uploadProps={uploadProps}
status={"look"}
status={this.type == "2" ? "look" : ""}
/>
</Modal>
)}
......
......@@ -102,7 +102,7 @@ class UploadUtil extends Component {
const { getFieldDecorator } = this.props.form;
return (
<Form>
<FormItem extra={"请上传资源附件(附件格式:png、jpg、jpeg、gif)"}>
<FormItem extra={"请上传图片类型资源附件"}>
{getFieldDecorator("upload", {
valuePropName: "fileList",
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