Commit ac835e0c by end

修改

parent 57efe942
......@@ -1963,7 +1963,6 @@
"test85": "显示成绩",
"test86": "显示答案",
"test87": "显示解析",
"test88": "显示通用评价",
"test89": "积分设置",
"test90": "是否使用积分",
"test91": "请选择考试范围",
......
......@@ -121,16 +121,16 @@ class Message extends React.Component {
}
getMessageStatus(status) {
switch (status) {
case 1:
case 0:
return "功能异常";
break;
case 2:
case 1:
return "体验问题";
break;
case 3:
case 2:
return "产品建议";
break;
case 4:
case 3:
return "其他";
break;
}
......
......@@ -383,7 +383,7 @@ class enrollform extends React.Component {
</FormItem>
)}
{
{/* {
String(isPayForEnroll) == "0" ?
<FormItem label="是否审核">
<Col span={1}>
......@@ -400,11 +400,11 @@ class enrollform extends React.Component {
)}
</Col>
</FormItem> : ""
}
} */}
<FormItem label="报名须知">
{/* <FormItem label="报名须知">
{getFieldDecorator("notice", {
initialValue: this.state.notice,
rules: [{ required: false, message: "请填写须知" }],
......@@ -416,7 +416,7 @@ class enrollform extends React.Component {
rows={4}
/>
)}
</FormItem>
</FormItem> */}
</Form>
</div>
);
......
......@@ -375,7 +375,7 @@ class App extends React.Component {
{getFieldDecorator("retroactive", {
initialValue: this.state.whether,
})(
<Radio.Group onChange={this.onWhether} disabled={usable}>
<Radio.Group onChange={this.onWhether} disabled={true}>
<Radio value="1"></Radio>
<Radio value="0"></Radio>
</Radio.Group>
......
......@@ -762,6 +762,22 @@ class NewTP extends Component {
}
});
}
// 导出签到记录
downTxt = record => {
let data = {
trainingProjectId: record,
};
return request({
url: exportSignRecord,
data,
}).then(res => {
if (res.code === "1000") {
message.loading("数据导出中..", 3).then(() => window.open(res.data));
} else {
message.error(res.subMsg);
}
});
};
// 二维码导出
qdcode(record) {
console.log(record, "111111111");
......@@ -782,74 +798,30 @@ class NewTP extends Component {
}
});
}
// 导出签到记录
downTxt = record => {
let data = {
trainingProjectId: record,
};
return request({
url: exportSignRecord,
data,
}).then(res => {
if (res.code === "1000") {
message.loading("数据导出中..", 3).then(() => window.open(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() {
console.log("22222");
const saveAs = require("../../../common/FileSaver.js");
const { qcodelist } = this.props;
var zip = new JSZip();
// console.log('检测打印变量=zip ',zip );
const trainName = this.state.trainName;
const trainNameST = this.state.trainNameST;
const trainNameET = this.state.trainNameET;
for (let i = 0; i < qcodelist.length; i++) {
if (qcodelist[i].info.signTimeId.enablePosition == "1") {
zip.file(
trainName +
"(" +
qcodelist[i].startTime +
"~" +
qcodelist[i].endTime +
")" +
".png",
document
.getElementById(qcodelist[i].signTimeIds)
.toDataURL("png")
.substring(22),
{ base64: true }
const canvas = document.getElementById(qcodelist[i].signTimeIds);
if (canvas) {
canvas.toBlob(blob => {
if (blob && saveAs) {
saveAs(
blob,
`${trainName}(${qcodelist[i].startTime}~${qcodelist[i].endTime}).png`
);
}
}, "image/png");
}
}
}
zip.generateAsync({ type: "blob" }).then(function(content) {
saveAs &&
saveAs(
content,
trainName + "(" + trainNameST + "~" + trainNameET + ")" + ".zip"
);
});
}
//table相关分页
//总条数
......
......@@ -1682,74 +1682,7 @@ class AddQuestion extends Component {
)}
</FormItem>
)}
{/* label="题型排序" */}
<FormItem {...formItemLayout}>
<span>题型排序:</span>
{getFieldDecorator("typeSort", {
rules: [],
initialValue: examInfo.typeSort
? examInfo.typeSort
: this.state.typeSort,
})(
<RadioGroup disabled>
<Radio value={1}>默认排序</Radio>
<Radio value={2}>指定排序</Radio>
</RadioGroup>
)}
<div
style={{
display:
this.state.typeSort == 2 || examInfo.typeSort == 2
? "block"
: "none",
width: 250,
}}
>
{examInfo.trExamQuestionSortVOS &&
examInfo.trExamQuestionSortVOS.length > 0 && (
<QuestionSort
type={"look"}
getData={this.getQuestionSortData}
setData={examInfo.trExamQuestionSortVOS}
/>
)}
</div>
</FormItem>
{/* label="题干排序" */}
<FormItem {...formItemLayout}>
<span>题干排序:</span>
{getFieldDecorator("topicRank", {
rules: [],
initialValue: examInfo.stemSort
? examInfo.stemSort
: this.state.topicRank,
})(
<RadioGroup disabled>
<Radio value={1}>默认排序</Radio>
<Radio value={2}>随机排序</Radio>
</RadioGroup>
)}
{/*<div*/}
{/*style={{display: this.state.topicRank == 2 || examInfo.stemSort == 2 ? "block" : "none", width: 250}}>*/}
{/*{examInfo.trExamQuestionSortVOS && examInfo.trExamQuestionSortVOS.length > 0 &&*/}
{/*<QuestionSort type={"look"} getData={this.getQuestionSortData} setData={examInfo.trExamQuestionSortVOS}/>}*/}
{/*</div>*/}
</FormItem>
{/* label="选项排序" */}
<FormItem {...formItemLayout}>
<span>选项排序:</span>
{getFieldDecorator("optionRank", {
rules: [],
initialValue: examInfo.optionSort
? examInfo.optionSort
: this.state.optionRank,
})(
<RadioGroup disabled>
<Radio value={1}>默认排序</Radio>
<Radio value={2}>随机排序</Radio>
</RadioGroup>
)}
</FormItem>
</Form>
</div>
);
......@@ -2012,57 +1945,6 @@ class AddQuestion extends Component {
</div>
</FormItem>
)}
<FormItem {...formItemLayout} label="题型排序">
{getFieldDecorator("typeSort", {
rules: [],
initialValue: this.state.typeSort,
})(
<RadioGroup onChange={this.getQuestionSort}>
<Radio value={1}>默认排序</Radio>
<Radio value={2}>题型排序</Radio>
</RadioGroup>
)}
<div
style={{
display: this.state.typeSort === 2 ? "block" : "none",
width: 250,
}}
>
<QuestionSort
key={this.state.randoms}
getData={this.getQuestionSortData}
setData={this.state.trExamQuestionSortVOS}
/>
</div>
</FormItem>
<FormItem {...formItemLayout} label="题干排序">
{getFieldDecorator("topicRank", {
rules: [],
initialValue: this.state.topicRank,
})(
<RadioGroup>
<Radio value={1}>默认排序</Radio>
<Radio value={2}>随机排序</Radio>
</RadioGroup>
)}
{/*<div style={{display: this.state.topicRank === 2 ? "block" : "none", width: 250}}>*/}
{/*<QuestionSort key={this.state.randoms} getData={this.getQuestionSortData}*/}
{/*setData={this.state.trExamQuestionSortVOS}/>*/}
{/*</div>*/}
</FormItem>
<FormItem {...formItemLayout} label="选项排序">
{getFieldDecorator("optionRank", {
rules: [],
initialValue: examInfo.optionSort
? examInfo.optionSort
: this.state.optionRank,
})(
<RadioGroup>
<Radio value={1}>默认排序</Radio>
<Radio value={2}>随机排序</Radio>
</RadioGroup>
)}
</FormItem>
<FormItem {...formBtnItemLayout}>
<div style={{ textAlign: "center" }}>
{this.props.type == "edit" ? (
......
......@@ -224,22 +224,22 @@ class ExamBasicInfo extends Component {
image: values.examImageUrl,
startTime: moment(values.examTime[0]).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(values.examTime[1]).format("YYYY-MM-DD HH:mm:ss"),
// qualifiedScore:values.qualified,
duration:0,
makeStrategy: values.strategy,
};
if (values.examImageUrl == "") {
delete data.image;
}
if (values.examTimeLen == 0) {
data.duration = 0;
} else {
if (_this.state.timeLenMinutes <= 0) {
message.error("请输入正确的答卷时长");
return;
} else {
data.duration = _this.state.timeLenMinutes;
}
}
// if (values.examTimeLen == 0) {
// data.duration = 0;
// } else {
// if (_this.state.timeLenMinutes <= 0) {
// message.error("请输入正确的答卷时长");
// return;
// } else {
// data.duration = _this.state.timeLenMinutes;
// }
// }
if (values.examCishu == 0) {
data.answerNum = 0;
} else {
......@@ -299,7 +299,7 @@ class ExamBasicInfo extends Component {
image: values.examImageUrl,
startTime: moment(values.examTime[0]).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(values.examTime[1]).format("YYYY-MM-DD HH:mm:ss"),
// qualifiedScore:values.qualified,
duration:0,
makeStrategy: values.strategy,
};
// 任务 938
......@@ -310,17 +310,17 @@ class ExamBasicInfo extends Component {
}
_this.props.getQuestionWay(values.strategy);
if (values.examTimeLen == 0) {
data.duration = 0;
} else {
if (_this.state.timeLenMinutes <= 0) {
message.error("请输入正确的答卷时长");
this.setState({ nextBtnLoading: false });
return;
} else {
data.duration = _this.state.timeLenMinutes;
}
}
// if (values.examTimeLen == 0) {
// data.duration = 0;
// } else {
// if (_this.state.timeLenMinutes <= 0) {
// message.error("请输入正确的答卷时长");
// this.setState({ nextBtnLoading: false });
// return;
// } else {
// data.duration = _this.state.timeLenMinutes;
// }
// }
if (values.examCishu == 0) {
data.answerNum = 0;
} else {
......@@ -467,7 +467,7 @@ class ExamBasicInfo extends Component {
</FormItem>
{/* label="答卷时长" */}
<FormItem {...formItemLayout}>
{/* <FormItem {...formItemLayout}>
<span>答卷时长:</span>
{getFieldDecorator("examTimeLen", {
rules: [],
......@@ -489,7 +489,7 @@ class ExamBasicInfo extends Component {
onChange={this.getExamTimeLen}
/>
<span className={styles.behindNumber}>分钟</span>
</FormItem>
</FormItem> */}
{/* label="答卷次数" */}
<FormItem {...formItemLayout}>
<span>答卷次数:</span>
......@@ -625,7 +625,7 @@ class ExamBasicInfo extends Component {
/>
)}
</FormItem>
<FormItem {...formItemLayout} label="答卷时长">
{/* <FormItem {...formItemLayout} label="答卷时长">
{getFieldDecorator("examTimeLen", {
rules: [],
initialValue: examInfo.timeLen,
......@@ -646,7 +646,7 @@ class ExamBasicInfo extends Component {
onChange={this.getExamTimeLen}
/>
<span className={styles.behindNumber}>分钟</span>
</FormItem>
</FormItem> */}
<FormItem {...formItemLayout} label="答卷次数">
{getFieldDecorator("examCishu", {
rules: [],
......
......@@ -916,7 +916,7 @@ class ExamStrategy extends Component {
: this.state.strategyInfo.displayStyle,
})(
<RadioGroup disabled>
<Radio value={1}>整页呈现</Radio>
{/* <Radio value={1}>整页呈现</Radio> */}
<Radio value={2}>逐题呈现</Radio>
</RadioGroup>
)}
......@@ -1010,35 +1010,6 @@ class ExamStrategy extends Component {
</Select>
)}
</FormItem>
{/* label="显示通用评价" */}
<FormItem {...formItemLayout}>
<span>显示通用评价:</span>
{getFieldDecorator("showAppraise", {
rules: [],
initialValue: examInfo.isPaperid
? examInfo.isPaperid
: this.state.strategyInfo.showComment,
})(
<Select onChange={this.onSelectComment} disabled>
<Option value={0}>不显示</Option>
{/* <Option value={1}>交卷后显示</Option> */}
{/* <Option value={2}>考试结束后显示</Option> */}
</Select>
)}
<div
style={{ display: this.state.isShowComment ? "block" : "none" }}
>
<CommonComment
key={this.state.randoms}
type={"look"}
getDescription={this.getDescription}
arrTion={this.state.arrTion}
/>
{/*<Popover content={evaluate}>*/}
{/*<Icon type="question-circle-o"/>*/}
{/*</Popover>*/}
</div>
</FormItem>
</Form>
<h3>积分设置</h3>
<Form onSubmit={this.strategySubmit}>
......@@ -1177,7 +1148,7 @@ class ExamStrategy extends Component {
: this.state.strategyInfo.displayStyle,
})(
<RadioGroup>
<Radio value={1}>整页呈现</Radio>
{/* <Radio value={1}>整页呈现</Radio> */}
<Radio value={2}>逐题呈现</Radio>
</RadioGroup>
)}
......@@ -1266,35 +1237,6 @@ class ExamStrategy extends Component {
</Select>
)}
</FormItem>
<FormItem {...formItemLayout} label="显示通用评价">
{getFieldDecorator("showAppraise", {
rules: [],
initialValue: examInfo.isPaperid
? examInfo.isPaperid
: this.state.strategyInfo.showComment,
})(
<Select
style={{ width: 200, marginRight: 10 }}
onChange={this.onSelectComment}
>
<Option value={0}>不显示</Option>
{/* <Option value={1}>交卷后显示</Option>
<Option value={2}>考试结束后显示</Option> */}
</Select>
)}
{/*<Popover content={evaluate}>*/}
{/*<Icon type="question-circle-o"/>*/}
{/*</Popover>*/}
<div
style={{ display: this.state.isShowComment ? "block" : "none" }}
>
<CommonComment
key={this.state.randoms}
getDescription={this.getDescription}
arrTion={this.state.arrTion}
/>
</div>
</FormItem>
</Form>
<h3>积分设置</h3>
<Form onSubmit={this.strategySubmit}>
......
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