Commit e08fb120 by yanglang123

修改bug

parent 0f44f00a
File deleted
......@@ -4,6 +4,7 @@ import {
Modal,
Form,
Input,
Textarea,
Radio,
Cascader,
DatePicker,
......@@ -252,12 +253,15 @@ class addEdit extends React.Component {
})(<Input disabled={type != "edit" ? true : false} />)}
</FormItem>
<FormItem {...formItemLayout} label="正文">
<Editor
{/* <Editor
key={this.props.keyValue}
cbReceiver={this.getEditorHtml}
importContent={seeEdit && seeEdit.content}
importContent={seeEdit.content}
disabled={type != "edit" ? true : false}
/>
/> */}
{getFieldDecorator("content", {
initialValue: seeEdit && seeEdit.content,
})(<Input style={{"minHeight":'40px'}} disabled={type != "edit" ? true : false} />)}
</FormItem>
<FormItem {...formItemLayout} label="图片">
......
......@@ -239,6 +239,7 @@ class InfoComment extends React.Component {
},
{
trainingProjectId: this.props.id,
bizType:2,
pageNo: this.state.pageNo,
pageSize: this.state.pageSize,
},
......@@ -260,6 +261,7 @@ class InfoComment extends React.Component {
},
{
trainingProjectId: this.props.id,
bizType:2,
pageNo: this.state.pageNo,
pageSize: this.state.pageSize,
},
......@@ -281,6 +283,7 @@ class InfoComment extends React.Component {
},
{
trainingProjectId: this.props.id,
bizType:2,
pageNo: this.state.pageNo,
pageSize: this.state.pageSize,
},
......@@ -328,7 +331,7 @@ class InfoComment extends React.Component {
return (
<div className={styles.comment}>
<div className={styles.mar40}>
<span>
{/* <span>
<h2>{this.props.name}</h2>
<Row style={{ top: "-10px" }}>
<Col span={4} key={4} style={{ float: "right" }}>
......@@ -340,7 +343,7 @@ class InfoComment extends React.Component {
</Popconfirm>
</Col>
</Row>
</span>
</span> */}
<Table
columns={this.columns}
dataSource={commentlist.list}
......
......@@ -1101,13 +1101,13 @@ class Information extends React.Component {
key: "readNum",
render: text => <span>{text ? text : 0}</span>,
},
{
title: "点赞量",
dataIndex: "admireNum",
width: "80px",
key: "admireNum",
render: text => <span>{text ? text : 0}</span>,
},
// {
// title: "点赞量",
// dataIndex: "admireNum",
// width: "80px",
// key: "admireNum",
// render: text => <span>{text ? text : 0}</span>,
// },
{
title: "收藏量",
dataIndex: "favoriteNum",
......@@ -1115,13 +1115,13 @@ class Information extends React.Component {
key: "favoriteNum",
render: text => <span>{text ? text : 0}</span>,
},
{
title: "转发量",
dataIndex: "relayNum",
width: "80px",
key: "relayNum",
render: text => <span>{text ? text : 0}</span>,
},
// {
// title: "转发量",
// dataIndex: "relayNum",
// width: "80px",
// key: "relayNum",
// render: text => <span>{text ? text : 0}</span>,
// },
{
title: "操作",
dataIndex: "operation",
......
......@@ -177,6 +177,7 @@ export function checkComment(param, page, callback) {
export function tpCommentDel(param, page, callback) {
let params = {};
params.replyId = param.id;
params.bizType = "2";
if (param.isreply) {
return dispatch => {
return request({
......
......@@ -417,11 +417,10 @@ class Mailbox extends React.Component {
<a
className={Styles.marr10}
onClick={() => {
this.setState({ title: "编辑" });
this.seeEdit(record.id, "edit");
}}
>
编辑
删除
</a>
</div> */}
</div>
......
......@@ -188,36 +188,8 @@ class App extends React.Component {
],
})(<Input placeholder="未命名的学习活动" disabled={usable} />)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
{/* 副标题 */}
<FormItem {...formItemLayout} label="副标题">
<Row gutter={12}>
<Col span={16}>
{getFieldDecorator("subtitle", {
initialValue:
trainfirstinfo !== "" ? trainfirstinfo.subtitle : "", //bug-11153-liyuan 修改新增活动会出现缓存名称和时间
rules: [
{
required: false,
validator: (rule, value, callback) => {
validator(rule, value, callback, "请输入副标题", 50);
},
},
],
})(<Input placeholder="请输入副标题" disabled={usable} />)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
{/* 活动Logo */}
{/* {(this.props.infoTitle === "新建信息"||this.props.infoTitle === "修改信息") && ( */}
{/* <UpLoad {...uploadPropsNew} ref={c => (this.validate = c)} /> */}
<FormItem {...formItemLayout} label="活动Logo:">
{getFieldDecorator("logo", {
rules: [
......@@ -242,28 +214,6 @@ class App extends React.Component {
/>
)}
</FormItem>
<FormItem {...formItemLayout} label="图片来源">
<Row gutter={12}>
<Col span={16}>
{getFieldDecorator("pictureSource", {
initialValue:
trainfirstinfo !== "" ? trainfirstinfo.pictureSource : "", //bug-11153-liyuan 修改新增活动会出现缓存名称和时间
rules: [
{
required: false,
validator: (rule, value, callback) => {
validator(rule, value, callback, "请输入图片来源", 50);
},
},
],
})(<Input placeholder="请输入图片来源" disabled={usable} />)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
{/* )} */}
{/* {this.props.infoTitle === "查看信息" &&
trainfirstinfo !== undefined && (
......@@ -407,38 +357,6 @@ class App extends React.Component {
],
})(<Input placeholder="请输入活动地址" disabled={usable} />)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
<FormItem {...formItemLayout} label="上传视频地址">
<Row gutter={12}>
<Col span={16}>
{getFieldDecorator("videoUrl", {
initialValue:
trainfirstinfo !== "" ? trainfirstinfo.videoUrl : "", //bug-11153-liyuan 修改新增活动会出现缓存名称和时间
rules: [
{
required: false,
validator: (rule, value, callback) => {
validator(
rule,
value,
callback,
"请输入上传视频地址",
50
);
},
},
],
})(
<Input placeholder="请输入上传视频地址" disabled={usable} />
)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
<FormItem {...formItemLayout} label="组织方">
......@@ -462,69 +380,6 @@ class App extends React.Component {
</Col>*/}
</Row>
</FormItem>
<FormItem {...formItemLayout} label="协办方">
<Row gutter={12}>
<Col span={16}>
{getFieldDecorator("coOrganizer", {
initialValue:
trainfirstinfo !== "" ? trainfirstinfo.coOrganizer : "", //bug-11153-liyuan 修改新增活动会出现缓存名称和时间
rules: [
{
required: false,
validator: (rule, value, callback) => {
validator(rule, value, callback, "请输入协办方", 50);
},
},
],
})(<Input placeholder="请输入协办方" disabled={usable} />)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
<FormItem {...formItemLayout} label="温馨提示">
<Row gutter={12}>
<Col span={16}>
{getFieldDecorator("tips", {
initialValue:
trainfirstinfo !== "" ? trainfirstinfo.tips : "", //bug-11153-liyuan 修改新增活动会出现缓存名称和时间
rules: [
{
required: false,
validator: (rule, value, callback) => {
validator(rule, value, callback, "请输入温馨提示", 50);
},
},
],
})(<Input placeholder="请输入温馨提示" disabled={usable} />)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
<FormItem {...formItemLayout} label="其他提示">
<Row gutter={12}>
<Col span={16}>
{getFieldDecorator("other", {
initialValue:
trainfirstinfo !== "" ? trainfirstinfo.other : "", //bug-11153-liyuan 修改新增活动会出现缓存名称和时间
rules: [
{
required: false,
validator: (rule, value, callback) => {
validator(rule, value, callback, "请输入其他提示", 50);
},
},
],
})(<Input placeholder="请输入协办方" disabled={usable} />)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
<FormItem {...formItemLayout} label="活动奖励">
<Row gutter={12}>
<Col span={16}>
......@@ -541,9 +396,6 @@ class App extends React.Component {
],
})(<Input placeholder="请输入活动奖励" disabled={usable} />)}
</Col>
{/*<Col span={6}>
<Button size="small" disabled={usable} >复制已有活动</Button>
</Col>*/}
</Row>
</FormItem>
<FormItem label="奖励详情" {...formItemLayout}>
......
......@@ -76,14 +76,14 @@ class EnrollManag extends React.Component {
return <span>已报名</span>;
},
},
{
title: "报名花费",
dataIndex: "expenditure",
key: "expenditure",
render: text => {
return text?text:"/";
},
},
// {
// title: "报名花费",
// dataIndex: "expenditure",
// key: "expenditure",
// render: text => {
// return text?text:"/";
// },
// },
{
title: "审核结果",
dataIndex: "auditResult",
......
......@@ -211,7 +211,7 @@ class enrollform extends React.Component {
<div style={{ marginTop: "20px" }}>
<Form {...formItemLayout}>
<FormItem label={intl.get("exchangeConfigText32")} >
{/* <FormItem label={intl.get("exchangeConfigText32")} >
{getFieldDecorator("isPayForEnroll", {
initialValue: String(isPayForEnroll),
......@@ -274,7 +274,7 @@ class enrollform extends React.Component {
</Fragment>
: ""
}
} */}
{/* 报名日期 */}
{(this.props.infoTitle === "新建信息" && (
......
......@@ -783,7 +783,6 @@ class NewTP extends Component {
}
// 导出签到记录
downTxt = record => {
console.log(1111, record);
let data = {
trainingProjectId: record,
};
......@@ -792,29 +791,28 @@ class NewTP extends Component {
data,
}).then(res => {
if (res.code === "1000") {
message.success(res.data);
message.loading("数据导出中..", 3).then(() => window.open(res.data));
} else {
message.error(res.subMsg);
}
});
};
// 导出项目清单
downActivityTxt = record => {
console.log("项目", record);
let data = {
tpId: record,
};
return request({
url: activitiesExport,
data,
}).then(res => {
if (res.code === "1000") {
message.success(res.data);
} else {
message.error(res.subMsg);
}
});
};
// downActivityTxt = record => {
// let data = {
// tpId: record,
// };
// return request({
// url: activitiesExport,
// data,
// }).then(res => {
// if (res.code === "1000") {
// message.success(res.data);
// } else {
// message.error(res.subMsg);
// }
// });
// };
// 下载二维码
downqcode() {
const saveAs = require("../../../common/FileSaver.js");
......@@ -1242,21 +1240,15 @@ class NewTP extends Component {
const param = {
// 项目名字
name: values.name.trim(),
subtitle: values.subtitle,
detailsImage: [
{
id: parseFloat(Math.random()).toFixed(6) * 1000000,
img: values.activityUrl,
},
],
pictureSource: values.pictureSource,
activityAddress: values.activityAddress,
organizer: values.organizer,
coOrganizer: values.coOrganizer,
tips: values.tips,
other: values.other,
activityReward: values.activityReward,
videoUrl: values.videoUrl,
// logo地址
logoImg: values.logo,
// 分类
......@@ -1308,33 +1300,19 @@ class NewTP extends Component {
moment(values.time[1]).format("YYYY-MM-DD HH:mm:ss")
).getTime(),
// 是否需要审核,付费报名不需要审核
needAudit:
parseInt(values.isPayForEnroll) == 1
? 0
: values.needAudit
needAudit: values.needAudit
? 1
: 0,
// 报名人数限制
enablePay: 0,
personLimitNum: values.personLimitNum ? values.personLimitNum : 0,
// 报名须知
notice: values.notice ? values.notice : "",
//是否付费报名,否:0;是:1
enablePay: parseInt(values.isPayForEnroll),
//购买实际价格 当enablePay=1时必填
actualPrice: parseInt(values.enrollPrice),
originalPrice:
values.isShowOriginalPrice == "0" ? null : enrollOriginalPrice,
};
if (parseInt(values.isPayForEnroll) == 1) {
that.setState({
isPayTrain: true,
});
} else {
that.setState({
isPayTrain: false,
});
}
//
//签到
var enablePosition = this.state.signPosition ? 1 : 0;
......@@ -1716,21 +1694,15 @@ class NewTP extends Component {
const param = {
// 项目名字
name: values.name.trim(),
subtitle: values.subtitle,
detailsImage: [
{
id: parseFloat(Math.random()).toFixed(6) * 1000000,
img: values.activityUrl,
},
],
pictureSource: values.pictureSource,
activityAddress: values.activityAddress,
organizer: values.organizer,
coOrganizer: values.coOrganizer,
tips: values.tips,
other: values.other,
activityReward: values.activityReward,
videoUrl: values.videoUrl,
// logo地址
logoImg: this.state.logourl,
// 分类
......@@ -1794,7 +1766,7 @@ class NewTP extends Component {
// 报名须知
notice: values.notice ? values.notice : "",
//是否付费报名,否:0;是:1
enablePay: parseInt(values.isPayForEnroll),
enablePay: 0,
//购买实际价格 当enablePay=1时必填
actualPrice: parseInt(values.enrollPrice),
originalPrice:
......@@ -2033,7 +2005,7 @@ class NewTP extends Component {
// 报名须知
notice: values.notice ? values.notice : "",
//是否付费报名,否:0;是:1
enablePay: parseInt(values.isPayForEnroll),
enablePay: 0,
//购买实际价格 当enablePay=1时必填
actualPrice: parseInt(values.enrollPrice),
originalPrice:
......@@ -3212,7 +3184,7 @@ class NewTP extends Component {
""
)}
<div>
{/* <div>
<Popconfirm
title="确认导出?"
okText="确定"
......@@ -3223,7 +3195,7 @@ class NewTP extends Component {
导出项目清单
</a>
</Popconfirm>
</div>
</div> */}
</div>
),
},
......
......@@ -50,17 +50,17 @@ class Base extends Component {
data: [
{
key: "1",
name: "金融行业调研",
name: "金融行业问卷",
age: "2017-1-1",
},
{
key: "2",
name: "金融行业调研",
name: "金融行业问卷",
age: "2017-1-1",
},
{
key: "3",
name: "金融行业调研",
name: "金融行业问卷",
age: "2017-1-1",
},
],
......@@ -93,6 +93,7 @@ class Base extends Component {
this.props.getcopylist({
pageNo: this.state.pageNo,
pageSize: this.state.pageSize,
bizType: 1,
});
if (this.props.defaultValue.voteNum) {
this.setState({ voteNum: this.props.defaultValue.voteNum });
......@@ -326,7 +327,7 @@ class Base extends Component {
const columns = [
{
title: "调研名称",
title: "问卷名称",
dataIndex: "name",
key: "name",
width: "50%",
......@@ -353,7 +354,7 @@ class Base extends Component {
return (
<div className={styles.cred_edit}>
<Form>
<FormItem {...formItemLayout} label="调研名称:">
<FormItem {...formItemLayout} label="问卷名称:">
{getFieldDecorator("name", {
initialValue: defaultValue.name ? defaultValue.name : "",
rules: [
......@@ -364,7 +365,7 @@ class Base extends Component {
rule,
value,
callback,
"请输少于100字的调研名称",
"请输少于100字的问卷名称",
100
);
},
......@@ -372,7 +373,7 @@ class Base extends Component {
],
})(
<Input
placeholder="请输入调研名称"
placeholder="请输入问卷名称"
style={{ display: "inline-block" }}
/>
)}
......@@ -383,7 +384,7 @@ class Base extends Component {
size="small"
style={{ display: "inline-block" }}
>
复制调研
复制问卷
</Button>
)}
</FormItem>
......@@ -456,7 +457,7 @@ class Base extends Component {
)}
</FormItem>
)}
<FormItem {...formItemLayout} label="调研时间:">
<FormItem {...formItemLayout} label="问卷时间:">
{getFieldDecorator("time", {
initialValue: defaultValue.startTime
? [
......@@ -474,7 +475,7 @@ class Base extends Component {
{
type: "array",
required: true,
message: "请选择调研时间",
message: "请选择问卷时间",
},
],
})(
......@@ -486,7 +487,7 @@ class Base extends Component {
/>
)}
</FormItem>
<FormItem {...formItemLayout} label="投票次数:">
{/* <FormItem {...formItemLayout} label="投票次数:">
{getFieldDecorator("voteNum", {
initialValue: defaultValue.voteNum ? defaultValue.voteNum : 0,
rules: [
......@@ -496,7 +497,7 @@ class Base extends Component {
],
})(<Input type="number" placeholder="请输入投票次数" />)}
<p style={{ color: "red" }}>(0为不限次数)</p>
</FormItem>
</FormItem> */}
<FormItem
{...formItemLayout}
label={
......@@ -507,7 +508,7 @@ class Base extends Component {
style={{ fontSize: 12, color: "#999" }}
/>
</Tooltip>
调研logo
问卷logo
</span>
}
>
......@@ -516,7 +517,7 @@ class Base extends Component {
rules: [
{
required: false,
message: "请上传调研logo",
message: "请上传问卷logo",
},
],
})(
......@@ -549,7 +550,7 @@ class Base extends Component {
</RadioGroup>
)}
</FormItem>
<FormItem {...formItemLayout} label="调研说明:">
<FormItem {...formItemLayout} label="问卷说明:">
{getFieldDecorator("content", {
initialValue: defaultValue.content ? defaultValue.content : "",
rules: [
......@@ -560,7 +561,7 @@ class Base extends Component {
],
})(<TextArea />)}
</FormItem>
<FormItem {...formItemLayout} label="调研备注:">
<FormItem {...formItemLayout} label="问卷备注:">
{getFieldDecorator("remark", {
initialValue: defaultValue.remark ? defaultValue.remark : "",
rules: [
......@@ -573,14 +574,14 @@ class Base extends Component {
</FormItem>
</Form>
<Modal
title="选择调研"
title="选择问卷"
visible={visible}
onOk={this.handleOk}
confirmLoading={confirmLoading}
onCancel={this.handleCancel}
>
<Search
placeholder="请输入调研名称"
placeholder="请输入问卷名称"
onSearch={this.searchValue}
style={{ width: 200, marginBottom: 20 }}
/>
......
......@@ -265,7 +265,7 @@ class SurveyCreact extends Component {
usable: false,
contentFlag: true,
};
console.log(details.remind, "调研消息是否提醒", this.id, "调研id");
console.log(details.remind, "问卷消息是否提醒", this.id, "问卷id");
const steps = [
{
title: "基本信息",
......@@ -343,8 +343,8 @@ class SurveyCreact extends Component {
title: "预览",
content: (
<div className={styles.survey_create_qccode}>
<p className={styles.survey_create_info}>恭喜您,调研发布成功</p>
{/* <p className={styles.survey_create_info}>调研二维码</p> */}
<p className={styles.survey_create_info}>恭喜您,问卷发布成功</p>
{/* <p className={styles.survey_create_info}>问卷二维码</p> */}
{/* <div>
<QRCode style={{ marginTop: "20px" }} value={code} key="1" />
</div> */}
......@@ -356,7 +356,7 @@ class SurveyCreact extends Component {
const { current } = this.state;
return (
<div className={styles.survey_create}>
<Breadcrumb title="新建调研" />
<Breadcrumb title="新建问卷" />
<Steps current={current} className={styles.survey_create_steps}>
{steps.map(item => (
<Step key={item.title} title={item.title} />
......
......@@ -673,7 +673,7 @@ class Details extends Component {
<div>
{details.name && (
<div className="survey-details">
<Breadcrumb title="修改调研" />
<Breadcrumb title="修改问卷" />
<p className="survey-details-title">基本信息</p>
{this.state.isupdata == 1 ? (
<Base
......@@ -684,10 +684,10 @@ class Details extends Component {
/>
) : (
<Form>
<FormItem {...formItemLayout} label="调研名称:">
<FormItem {...formItemLayout} label="问卷名称:">
<Input defaultValue={details.name} disabled />
</FormItem>
<FormItem {...formItemLayout} label="调研时间:">
<FormItem {...formItemLayout} label="问卷时间:">
<RangePicker
showTime
disabled
......@@ -704,10 +704,10 @@ class Details extends Component {
]}
/>
</FormItem>
<FormItem {...formItemLayout} label="调研logo:">
<FormItem {...formItemLayout} label="问卷logo:">
<img src={details.image} style={{ width: 90, height: 54 }} />
</FormItem>
<FormItem {...formItemLayout} label="调研范围:">
<FormItem {...formItemLayout} label="问卷范围:">
<RadioGroup defaultValue={details.visibleRange} disabled>
<Radio value={1}>平台用户可见</Radio>
<Radio value={2}>指定用户可见</Radio>
......@@ -721,10 +721,10 @@ class Details extends Component {
</Button>
</RadioGroup>
</FormItem>
<FormItem {...formItemLayout} label="调研说明:">
<FormItem {...formItemLayout} label="问卷说明:">
<TextArea disabled defaultValue={details.content} />
</FormItem>
<FormItem {...formItemLayout} label="调研备注:">
<FormItem {...formItemLayout} label="问卷备注:">
<TextArea disabled defaultValue={details.remark} />
</FormItem>
</Form>
......@@ -806,11 +806,6 @@ class Details extends Component {
onShowSizeChange={this.handlePageSizeChange}
/>*/}
</div>
<p className="survey-details-title">预览调研</p>
<div className="dqorde" style={{ textAlign: "center" }}>
<QRCode style={{ marginTop: "20px" }} value={code} key="1" />
</div>
<div style={{ marginTop: 10, textAlign: "center" }}>
<Link
to={
......
......@@ -61,16 +61,19 @@ class Survey extends Component {
state: 1,
pageNo: 1,
pageSize: 20,
bizType:1
});
this.props.getlist({
state: 2,
pageNo: 1,
pageSize: 20,
bizType:1
});
this.props.getlist({
state: 0,
pageNo: 1,
pageSize: 20,
bizType:1
});
}
......@@ -111,6 +114,7 @@ class Survey extends Component {
name: searchValue,
pageNo: 1,
pageSize: pageSize,
bizType:1
});
this.setState(
{
......@@ -143,6 +147,7 @@ class Survey extends Component {
name: this.state.searchValue,
pageNo: 1,
pageSize: this.state.pageSize,
bizType:1
});
});
}
......@@ -160,6 +165,7 @@ class Survey extends Component {
name: this.state.searchValue,
pageNo: 1,
pageSize: this.state.pageSize,
bizType:1
});
if (data.subMsg !== "") {
message.error(data.subMsg);
......@@ -201,6 +207,7 @@ class Survey extends Component {
state: this.state.key,
pageNo: page,
pageSize: pageSize,
bizType:1
});
}
......@@ -212,6 +219,7 @@ class Survey extends Component {
state: this.state.key,
pageNo: 1,
pageSize: size,
bizType:1
});
});
}
......
......@@ -46,6 +46,7 @@ export function delsur(param, callback) {
state: 2,
pageNo: param.pageNo,
pageSize: param.pageSize,
bizType:1
})
);
if (callback) {
......@@ -83,6 +84,7 @@ export function getListFetch(param) {
url: url,
data: { ...param, bizType: 1 },
}).then(res => {
console.log('被请求l')
const temp = res.data;
switch (param.state) {
case 0:
......@@ -148,6 +150,7 @@ export function upFetch(param, callback) {
state: 1,
pageNo: param.pageNo,
pageSize: param.pageSize,
bizType:1
})
);
dispatch(
......@@ -156,6 +159,7 @@ export function upFetch(param, callback) {
pageNo: param.pageNo,
pageSize: param.pageSize,
name: param.name,
bizType:1
})
);
dispatch(
......@@ -164,6 +168,7 @@ export function upFetch(param, callback) {
pageNo: param.pageNo,
pageSize: param.pageSize,
name: param.name,
bizType:1
})
);
message.success("上架成功");
......@@ -248,6 +253,7 @@ export function downFetch(param, callback) {
pageNo: param.pageNo,
pageSize: param.pageSize,
name: param.name,
bizType:1
})
);
dispatch(
......@@ -255,6 +261,7 @@ export function downFetch(param, callback) {
state: 2,
pageNo: param.pageNo,
pageSize: param.pageSize,
bizType:1
})
);
if (callback) {
......@@ -327,9 +334,7 @@ export function insertSurFetch(param, callback) {
if (res.code === "1000") {
if (callback) callback(res);
console.log(res.data.id);
// browserHistory.push(
// `/${companyCode}/${siteCode}/index/tool/survey/survey-management/create/${res.data.id}`
// );
dispatch(
getTestListFetch({ researchId: res.data.id, pageNo: 1, pageSize: 20 })
);
......@@ -342,19 +347,6 @@ export function insertSurFetch(param, callback) {
message.error(res.subMsg);
}
});
// return fetch(url + `/insert`, {type: 'POST', data: param}).then((res) => {
// if(res.code === '1000'){
// if(callback) callback(res);
// console.log(res.data.id)
// browserHistory.push(`/${companyCode}/${siteCode}/index/tool/survey/survey-management/create/${res.data.id}`)
// dispatch(getTestListFetch({researchId: res.data.id, pageNo: 1, pageSize: 20}))
// dispatch({type: Types.GET_SURID, data: res.data.id});
// dispatch({type: Types.GET_SURTEST_LIST, data: {list: [], total: 0}});
// }else{
// message.error(res.subMsg);
// }
// })
};
}
......@@ -377,10 +369,6 @@ export function getCopyListFetch(param) {
message.error(res.subMsg);
}
});
// return fetch(url + `/page/list`, {type: 'GET', data: param}).then((res) => {
// const temp = res.data;
// dispatch({type: Types.GET_SUR_LIST, data: {total: temp.total, list: temp.records}})
// })
};
}
......@@ -398,20 +386,11 @@ export function getCopySurFetch(param, cb) {
if (cb) {
cb(res);
}
// browserHistory.push(
// `/${companyCode}/${siteCode}/index/tool/survey/survey-management/create/${res.data.id}`
// );
dispatch({ type: Types.GET_SUR_DETAILS, data: res.data });
} else {
message.error(res.subMsg);
}
});
// return fetch(url + `/copy`, {type: 'POST', data: param}).then((res) => {
// console.log(res.data)
// browserHistory.push(`/${companyCode}/${siteCode}/index/tool/survey/survey-management/create/${res.data.id}`)
// dispatch({type: Types.GET_SUR_DETAILS, data: res.data})
// })
};
}
......@@ -438,20 +417,6 @@ export function updateFetch(param, callback) {
}
});
// return fetch(url + `/update`, {type: 'POST', data: param}).then((res) => {
//
// if (res.code === "1000") {
// message.success('保存成功');
// dispatch(getTestListFetch({researchId: param.id, pageNo: 1, pageSize: 20}))
// dispatch({type: Types.GET_SURID, data: param.id});
// if (callback) {
// callback(res.code);
// }
// } else {
// message.error('保存失败,请重新尝试');
// }
// })
};
}
......@@ -512,10 +477,6 @@ export function insertTestFetch(param, no, size) {
})
);
});
// return fetch(url2 + `/insert`, {type: 'post', data: param}).then((res) => {
//
// dispatch(getTestListFetch({researchId: param.reseachId, pageNo: no, pageSize: size}))
// })
};
}
......@@ -562,17 +523,6 @@ export function editTestFetch(params, surid, no, size) {
message.success("操作失败");
}
});
// return fetch(url2 + `/batch/update`, {type: 'post', data: param}).then((res) => {
//
// if (res.code === "1000") {
// dispatch({type: Types.EDIT_TEST, data: res.data})
// dispatch(getTestListFetch({researchId: surid, pageNo: no, pageSize: size}))
// message.success('操作成功');
// } else {
// message.success('操作失败');
// }
// })
};
}
......@@ -596,17 +546,6 @@ export function moveTestFetch(params, surid, no, size) {
message.success("操作失败");
}
});
// return fetch(url2 + `/batch/update`, {type: 'post', data: param}).then((res) => {
//
// if (res.code === "1000") {
// dispatch({type: Types.EDIT_TEST, data: res.data})
// dispatch(getTestListFetch({researchId: surid, pageNo: no, pageSize: size}))
// message.success('操作成功');
// } else {
// message.success('操作失败');
// }
// })
};
}
......
......@@ -93,6 +93,7 @@ class Base extends Component {
this.props.getcopylist({
pageNo: this.state.pageNo,
pageSize: this.state.pageSize,
bizType:2
});
if (this.props.defaultValue.voteNum) {
this.setState({ voteNum: this.props.defaultValue.voteNum });
......
......@@ -231,6 +231,7 @@ class Details extends Component {
image: values.surveyImageUrl,
keywords: this.state.keywords,
enableTask: this.state.enableTask,
voteNum:values.voteNum
};
if (values.surveyImageUrl == "") {
delete data.image;
......@@ -244,7 +245,7 @@ class Details extends Component {
companyCode +
"/" +
siteCode +
"/index/tool/question/question-management"
"/index/tool/survey/survey-management"
);
}
});
......@@ -615,7 +616,7 @@ class Details extends Component {
<div>
{details.name && (
<div className="survey-details">
<Breadcrumb title="修改调研" />
<Breadcrumb title="修改投票" />
<p className="survey-details-title">基本信息</p>
{this.state.isupdata == 1 ? (
<Base
......@@ -626,10 +627,10 @@ class Details extends Component {
/>
) : (
<Form>
<FormItem {...formItemLayout} label="调研名称:">
<FormItem {...formItemLayout} label="投票名称:">
<Input defaultValue={details.name} disabled />
</FormItem>
<FormItem {...formItemLayout} label="调研时间:">
<FormItem {...formItemLayout} label="投票时间:">
<RangePicker
showTime
disabled
......@@ -646,10 +647,10 @@ class Details extends Component {
]}
/>
</FormItem>
<FormItem {...formItemLayout} label="调研logo:">
<FormItem {...formItemLayout} label="投票logo:">
<img src={details.image} style={{ width: 90, height: 54 }} />
</FormItem>
<FormItem {...formItemLayout} label="调研范围:">
<FormItem {...formItemLayout} label="投票范围:">
<RadioGroup defaultValue={details.visibleRange} disabled>
<Radio value={1}>平台用户可见</Radio>
<Radio value={2}>指定用户可见</Radio>
......@@ -663,10 +664,10 @@ class Details extends Component {
</Button>
</RadioGroup>
</FormItem>
<FormItem {...formItemLayout} label="调研说明:">
<FormItem {...formItemLayout} label="投票说明:">
<TextArea disabled defaultValue={details.content} />
</FormItem>
<FormItem {...formItemLayout} label="调研备注:">
<FormItem {...formItemLayout} label="投票备注:">
<TextArea disabled defaultValue={details.remark} />
</FormItem>
</Form>
......@@ -726,11 +727,6 @@ class Details extends Component {
onShowSizeChange={this.handlePageSizeChange}
/>*/}
</div>
<p className="survey-details-title">预览调研</p>
<div className="dqorde" style={{ textAlign: "center" }}>
<QRCode style={{ marginTop: "20px" }} value={code} key="1" />
</div>
<div style={{ marginTop: 10, textAlign: "center" }}>
<Link
to={
......@@ -738,7 +734,7 @@ class Details extends Component {
companyCode +
"/" +
siteCode +
"/index/tool/question/question-management"
"/index/tool/survey/survey-management"
}
>
<Button>返回</Button>
......
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