Commit ac835e0c by end

修改

parent 57efe942
...@@ -1963,7 +1963,6 @@ ...@@ -1963,7 +1963,6 @@
"test85": "显示成绩", "test85": "显示成绩",
"test86": "显示答案", "test86": "显示答案",
"test87": "显示解析", "test87": "显示解析",
"test88": "显示通用评价",
"test89": "积分设置", "test89": "积分设置",
"test90": "是否使用积分", "test90": "是否使用积分",
"test91": "请选择考试范围", "test91": "请选择考试范围",
......
...@@ -121,16 +121,16 @@ class Message extends React.Component { ...@@ -121,16 +121,16 @@ class Message extends React.Component {
} }
getMessageStatus(status) { getMessageStatus(status) {
switch (status) { switch (status) {
case 1: case 0:
return "功能异常"; return "功能异常";
break; break;
case 2: case 1:
return "体验问题"; return "体验问题";
break; break;
case 3: case 2:
return "产品建议"; return "产品建议";
break; break;
case 4: case 3:
return "其他"; return "其他";
break; break;
} }
......
...@@ -383,7 +383,7 @@ class enrollform extends React.Component { ...@@ -383,7 +383,7 @@ class enrollform extends React.Component {
</FormItem> </FormItem>
)} )}
{ {/* {
String(isPayForEnroll) == "0" ? String(isPayForEnroll) == "0" ?
<FormItem label="是否审核"> <FormItem label="是否审核">
<Col span={1}> <Col span={1}>
...@@ -400,11 +400,11 @@ class enrollform extends React.Component { ...@@ -400,11 +400,11 @@ class enrollform extends React.Component {
)} )}
</Col> </Col>
</FormItem> : "" </FormItem> : ""
} } */}
<FormItem label="报名须知"> {/* <FormItem label="报名须知">
{getFieldDecorator("notice", { {getFieldDecorator("notice", {
initialValue: this.state.notice, initialValue: this.state.notice,
rules: [{ required: false, message: "请填写须知" }], rules: [{ required: false, message: "请填写须知" }],
...@@ -416,7 +416,7 @@ class enrollform extends React.Component { ...@@ -416,7 +416,7 @@ class enrollform extends React.Component {
rows={4} rows={4}
/> />
)} )}
</FormItem> </FormItem> */}
</Form> </Form>
</div> </div>
); );
......
...@@ -375,7 +375,7 @@ class App extends React.Component { ...@@ -375,7 +375,7 @@ class App extends React.Component {
{getFieldDecorator("retroactive", { {getFieldDecorator("retroactive", {
initialValue: this.state.whether, initialValue: this.state.whether,
})( })(
<Radio.Group onChange={this.onWhether} disabled={usable}> <Radio.Group onChange={this.onWhether} disabled={true}>
<Radio value="1"></Radio> <Radio value="1"></Radio>
<Radio value="0"></Radio> <Radio value="0"></Radio>
</Radio.Group> </Radio.Group>
......
...@@ -762,6 +762,22 @@ class NewTP extends Component { ...@@ -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) { qdcode(record) {
console.log(record, "111111111"); console.log(record, "111111111");
...@@ -782,74 +798,30 @@ class NewTP extends Component { ...@@ -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() { downqcode() {
console.log("22222");
const saveAs = require("../../../common/FileSaver.js"); const saveAs = require("../../../common/FileSaver.js");
const { qcodelist } = this.props; const { qcodelist } = this.props;
var zip = new JSZip();
// console.log('检测打印变量=zip ',zip );
const trainName = this.state.trainName; const trainName = this.state.trainName;
const trainNameST = this.state.trainNameST; const trainNameST = this.state.trainNameST;
const trainNameET = this.state.trainNameET; const trainNameET = this.state.trainNameET;
for (let i = 0; i < qcodelist.length; i++) { for (let i = 0; i < qcodelist.length; i++) {
if (qcodelist[i].info.signTimeId.enablePosition == "1") { if (qcodelist[i].info.signTimeId.enablePosition == "1") {
zip.file( const canvas = document.getElementById(qcodelist[i].signTimeIds);
trainName + if (canvas) {
"(" + canvas.toBlob(blob => {
qcodelist[i].startTime + if (blob && saveAs) {
"~" + saveAs(
qcodelist[i].endTime + blob,
")" + `${trainName}(${qcodelist[i].startTime}~${qcodelist[i].endTime}).png`
".png", );
document }
.getElementById(qcodelist[i].signTimeIds) }, "image/png");
.toDataURL("png") }
.substring(22),
{ base64: true }
);
} }
} }
zip.generateAsync({ type: "blob" }).then(function(content) {
saveAs &&
saveAs(
content,
trainName + "(" + trainNameST + "~" + trainNameET + ")" + ".zip"
);
});
} }
//table相关分页 //table相关分页
//总条数 //总条数
......
...@@ -612,7 +612,7 @@ class AddQuestion extends Component { ...@@ -612,7 +612,7 @@ class AddQuestion extends Component {
//选择题库取消 //选择题库取消
handleCancelBank = () => { handleCancelBank = () => {
this.setState({ this.setState({
visible: false, visible: false,
selectedrecord:null, selectedrecord:null,
selectedRowKeys2:[], selectedRowKeys2:[],
...@@ -870,7 +870,7 @@ class AddQuestion extends Component { ...@@ -870,7 +870,7 @@ class AddQuestion extends Component {
arr.push(id); arr.push(id);
deleteQuestions(arr, () => { deleteQuestions(arr, () => {
message.success("删除成功"); message.success("删除成功");
if (questionWay != 1) { if (questionWay != 1) {
getLibraryCount({ examId: examID, libraryId: selectedrecord.id }); getLibraryCount({ examId: examID, libraryId: selectedrecord.id });
} }
...@@ -939,7 +939,7 @@ class AddQuestion extends Component { ...@@ -939,7 +939,7 @@ class AddQuestion extends Component {
if (!selectedRowId) { if (!selectedRowId) {
return message.warning("请先选择题库!"); return message.warning("请先选择题库!");
} else { } else {
getSelectQuestionList({ getSelectQuestionList({
examId: examID, examId: examID,
libraryId: selectedRowId[0], libraryId: selectedRowId[0],
...@@ -1682,74 +1682,7 @@ class AddQuestion extends Component { ...@@ -1682,74 +1682,7 @@ class AddQuestion extends Component {
)} )}
</FormItem> </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> </Form>
</div> </div>
); );
...@@ -2012,57 +1945,6 @@ class AddQuestion extends Component { ...@@ -2012,57 +1945,6 @@ class AddQuestion extends Component {
</div> </div>
</FormItem> </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}> <FormItem {...formBtnItemLayout}>
<div style={{ textAlign: "center" }}> <div style={{ textAlign: "center" }}>
{this.props.type == "edit" ? ( {this.props.type == "edit" ? (
......
...@@ -224,22 +224,22 @@ class ExamBasicInfo extends Component { ...@@ -224,22 +224,22 @@ class ExamBasicInfo extends Component {
image: values.examImageUrl, image: values.examImageUrl,
startTime: moment(values.examTime[0]).format("YYYY-MM-DD HH:mm:ss"), startTime: moment(values.examTime[0]).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(values.examTime[1]).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, makeStrategy: values.strategy,
}; };
if (values.examImageUrl == "") { if (values.examImageUrl == "") {
delete data.image; delete data.image;
} }
if (values.examTimeLen == 0) { // if (values.examTimeLen == 0) {
data.duration = 0; // data.duration = 0;
} else { // } else {
if (_this.state.timeLenMinutes <= 0) { // if (_this.state.timeLenMinutes <= 0) {
message.error("请输入正确的答卷时长"); // message.error("请输入正确的答卷时长");
return; // return;
} else { // } else {
data.duration = _this.state.timeLenMinutes; // data.duration = _this.state.timeLenMinutes;
} // }
} // }
if (values.examCishu == 0) { if (values.examCishu == 0) {
data.answerNum = 0; data.answerNum = 0;
} else { } else {
...@@ -299,7 +299,7 @@ class ExamBasicInfo extends Component { ...@@ -299,7 +299,7 @@ class ExamBasicInfo extends Component {
image: values.examImageUrl, image: values.examImageUrl,
startTime: moment(values.examTime[0]).format("YYYY-MM-DD HH:mm:ss"), startTime: moment(values.examTime[0]).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(values.examTime[1]).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, makeStrategy: values.strategy,
}; };
// 任务 938 // 任务 938
...@@ -310,17 +310,17 @@ class ExamBasicInfo extends Component { ...@@ -310,17 +310,17 @@ class ExamBasicInfo extends Component {
} }
_this.props.getQuestionWay(values.strategy); _this.props.getQuestionWay(values.strategy);
if (values.examTimeLen == 0) { // if (values.examTimeLen == 0) {
data.duration = 0; // data.duration = 0;
} else { // } else {
if (_this.state.timeLenMinutes <= 0) { // if (_this.state.timeLenMinutes <= 0) {
message.error("请输入正确的答卷时长"); // message.error("请输入正确的答卷时长");
this.setState({ nextBtnLoading: false }); // this.setState({ nextBtnLoading: false });
return; // return;
} else { // } else {
data.duration = _this.state.timeLenMinutes; // data.duration = _this.state.timeLenMinutes;
} // }
} // }
if (values.examCishu == 0) { if (values.examCishu == 0) {
data.answerNum = 0; data.answerNum = 0;
} else { } else {
...@@ -467,7 +467,7 @@ class ExamBasicInfo extends Component { ...@@ -467,7 +467,7 @@ class ExamBasicInfo extends Component {
</FormItem> </FormItem>
{/* label="答卷时长" */} {/* label="答卷时长" */}
<FormItem {...formItemLayout}> {/* <FormItem {...formItemLayout}>
<span>答卷时长:</span> <span>答卷时长:</span>
{getFieldDecorator("examTimeLen", { {getFieldDecorator("examTimeLen", {
rules: [], rules: [],
...@@ -489,7 +489,7 @@ class ExamBasicInfo extends Component { ...@@ -489,7 +489,7 @@ class ExamBasicInfo extends Component {
onChange={this.getExamTimeLen} onChange={this.getExamTimeLen}
/> />
<span className={styles.behindNumber}>分钟</span> <span className={styles.behindNumber}>分钟</span>
</FormItem> </FormItem> */}
{/* label="答卷次数" */} {/* label="答卷次数" */}
<FormItem {...formItemLayout}> <FormItem {...formItemLayout}>
<span>答卷次数:</span> <span>答卷次数:</span>
...@@ -625,7 +625,7 @@ class ExamBasicInfo extends Component { ...@@ -625,7 +625,7 @@ class ExamBasicInfo extends Component {
/> />
)} )}
</FormItem> </FormItem>
<FormItem {...formItemLayout} label="答卷时长"> {/* <FormItem {...formItemLayout} label="答卷时长">
{getFieldDecorator("examTimeLen", { {getFieldDecorator("examTimeLen", {
rules: [], rules: [],
initialValue: examInfo.timeLen, initialValue: examInfo.timeLen,
...@@ -646,7 +646,7 @@ class ExamBasicInfo extends Component { ...@@ -646,7 +646,7 @@ class ExamBasicInfo extends Component {
onChange={this.getExamTimeLen} onChange={this.getExamTimeLen}
/> />
<span className={styles.behindNumber}>分钟</span> <span className={styles.behindNumber}>分钟</span>
</FormItem> </FormItem> */}
<FormItem {...formItemLayout} label="答卷次数"> <FormItem {...formItemLayout} label="答卷次数">
{getFieldDecorator("examCishu", { {getFieldDecorator("examCishu", {
rules: [], rules: [],
......
...@@ -916,7 +916,7 @@ class ExamStrategy extends Component { ...@@ -916,7 +916,7 @@ class ExamStrategy extends Component {
: this.state.strategyInfo.displayStyle, : this.state.strategyInfo.displayStyle,
})( })(
<RadioGroup disabled> <RadioGroup disabled>
<Radio value={1}>整页呈现</Radio> {/* <Radio value={1}>整页呈现</Radio> */}
<Radio value={2}>逐题呈现</Radio> <Radio value={2}>逐题呈现</Radio>
</RadioGroup> </RadioGroup>
)} )}
...@@ -1010,35 +1010,6 @@ class ExamStrategy extends Component { ...@@ -1010,35 +1010,6 @@ class ExamStrategy extends Component {
</Select> </Select>
)} )}
</FormItem> </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> </Form>
<h3>积分设置</h3> <h3>积分设置</h3>
<Form onSubmit={this.strategySubmit}> <Form onSubmit={this.strategySubmit}>
...@@ -1177,7 +1148,7 @@ class ExamStrategy extends Component { ...@@ -1177,7 +1148,7 @@ class ExamStrategy extends Component {
: this.state.strategyInfo.displayStyle, : this.state.strategyInfo.displayStyle,
})( })(
<RadioGroup> <RadioGroup>
<Radio value={1}>整页呈现</Radio> {/* <Radio value={1}>整页呈现</Radio> */}
<Radio value={2}>逐题呈现</Radio> <Radio value={2}>逐题呈现</Radio>
</RadioGroup> </RadioGroup>
)} )}
...@@ -1266,35 +1237,6 @@ class ExamStrategy extends Component { ...@@ -1266,35 +1237,6 @@ class ExamStrategy extends Component {
</Select> </Select>
)} )}
</FormItem> </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> </Form>
<h3>积分设置</h3> <h3>积分设置</h3>
<Form onSubmit={this.strategySubmit}> <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