|
@@ -51,10 +51,15 @@
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
style="width: 150px; margin-left: 5px"
|
|
style="width: 150px; margin-left: 5px"
|
|
>
|
|
>
|
|
- <el-option v-for="item,i in sour_list" :key="i+'j'" :label='item.name' :value="item.id"></el-option>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item, i) in sour_list"
|
|
|
|
+ :key="i + 'j'"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<el-button @click="search">搜索</el-button>
|
|
<el-button @click="search">搜索</el-button>
|
|
- <div class="promotion" @click="is_show=true">
|
|
|
|
|
|
+ <div class="promotion" @click="is_show = true,s_push=[],params.tid='',source=''">
|
|
<span class="el-icon-s-promotion"></span> 推送错题
|
|
<span class="el-icon-s-promotion"></span> 推送错题
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -107,9 +112,9 @@
|
|
</div>
|
|
</div>
|
|
<!-- 推送错题 -->
|
|
<!-- 推送错题 -->
|
|
<div class="fit" v-show="is_show">
|
|
<div class="fit" v-show="is_show">
|
|
- <div>
|
|
|
|
- <div class="tit">错题推送</div>
|
|
|
|
- <div class="form_box">
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <div class="tit">错题推送</div>
|
|
|
|
+ <div class="form_box">
|
|
<div>
|
|
<div>
|
|
<span>班级</span>
|
|
<span>班级</span>
|
|
<el-select
|
|
<el-select
|
|
@@ -136,44 +141,51 @@
|
|
style="width: 100px"
|
|
style="width: 100px"
|
|
@change="sourceList"
|
|
@change="sourceList"
|
|
>
|
|
>
|
|
- <el-option value="exam" label="考试"></el-option>
|
|
|
|
- <el-option value="work" label="作业"></el-option>
|
|
|
|
|
|
+ <el-option value="exam" label="考试"></el-option>
|
|
|
|
+ <el-option value="work" label="作业"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<el-select
|
|
<el-select
|
|
- v-model="params.ly2"
|
|
|
|
|
|
+ v-model="params.tid"
|
|
clearable
|
|
clearable
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
style="width: 220px; margin-left: 5px"
|
|
style="width: 220px; margin-left: 5px"
|
|
>
|
|
>
|
|
- <el-option v-for="item,i in sour_list" :key="i+'j'" :label='item.name' :value="item.id"></el-option>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item, i) in sour_list"
|
|
|
|
+ :key="i + 'j'"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<span>学生</span>
|
|
<span>学生</span>
|
|
<div class="transfer_box">
|
|
<div class="transfer_box">
|
|
- <el-transfer
|
|
|
|
- filterable
|
|
|
|
- :filter-method="filterMethod"
|
|
|
|
- filter-placeholder="请输入"
|
|
|
|
- v-model="value"
|
|
|
|
- :data="data">
|
|
|
|
- </el-transfer>
|
|
|
|
|
|
+ <el-transfer
|
|
|
|
+ filterable
|
|
|
|
+ filter-placeholder="请输入"
|
|
|
|
+ :titles="['全选', '全选']"
|
|
|
|
+ v-model="value"
|
|
|
|
+ :data="data"
|
|
|
|
+ @change="handleChange"
|
|
|
|
+ >
|
|
|
|
+ </el-transfer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div>
|
|
|
|
|
|
+ <div style="margin-top: 40px">
|
|
<span>备注</span>
|
|
<span>备注</span>
|
|
<el-input
|
|
<el-input
|
|
style="width: 325px"
|
|
style="width: 325px"
|
|
- v-model="params.l"
|
|
|
|
|
|
+ v-model="remark"
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
></el-input>
|
|
></el-input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="btn">
|
|
|
|
- <el-button @click="is_show = false">取消</el-button>
|
|
|
|
- <el-button type="primary" @click="is_show = false">确认</el-button>
|
|
|
|
|
|
+ <div class="btn">
|
|
|
|
+ <el-button @click="is_show = false,params.tid='',source=''">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="sure_push">确认</el-button>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<!-- <foot></foot> -->
|
|
<!-- <foot></foot> -->
|
|
</div>
|
|
</div>
|
|
@@ -182,7 +194,7 @@
|
|
import topNav from "@/components/assembly/topnav";
|
|
import topNav from "@/components/assembly/topnav";
|
|
import topHead from "@/components/assembly/head";
|
|
import topHead from "@/components/assembly/head";
|
|
import foot from "@/components/assembly/foot";
|
|
import foot from "@/components/assembly/foot";
|
|
-import { searchClass, classes ,tasks} from "@/util/api";
|
|
|
|
|
|
+import { searchClass, classes, tasks,clsErrPost } from "@/util/api";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -190,19 +202,18 @@ export default {
|
|
page: 1,
|
|
page: 1,
|
|
size: 10,
|
|
size: 10,
|
|
cid: "",
|
|
cid: "",
|
|
- tid:'',
|
|
|
|
|
|
+ tid: "",
|
|
},
|
|
},
|
|
- source: "", //来源
|
|
|
|
|
|
+ source: "", //来源
|
|
sour_list: [],
|
|
sour_list: [],
|
|
- is_show:false,
|
|
|
|
|
|
+ is_show: false,
|
|
tableData: [],
|
|
tableData: [],
|
|
classL: [],
|
|
classL: [],
|
|
total: 0,
|
|
total: 0,
|
|
- value:'',
|
|
|
|
- filterMethod(query, item) {
|
|
|
|
- return item.pinyin.indexOf(query) > -1;
|
|
|
|
- },
|
|
|
|
- data:[],
|
|
|
|
|
|
+ value:[],
|
|
|
|
+ data: [],
|
|
|
|
+ s_push:[],
|
|
|
|
+ remark:'',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -213,28 +224,57 @@ export default {
|
|
that.classL = res.data;
|
|
that.classL = res.data;
|
|
that.params.cid = res.total > 0 ? res.data[0].id : "";
|
|
that.params.cid = res.total > 0 ? res.data[0].id : "";
|
|
that.getList();
|
|
that.getList();
|
|
- searchClass({cid:that.params.cid}).then(res=>{
|
|
|
|
- if(res.errcode==0){
|
|
|
|
|
|
+ searchClass({ cid: that.params.cid }).then((res) => {
|
|
|
|
+ if (res.errcode == 0) {
|
|
var l = [];
|
|
var l = [];
|
|
- res.data.forEach(item => {
|
|
|
|
|
|
+ res.data.forEach((item) => {
|
|
var obj = {};
|
|
var obj = {};
|
|
obj.key = item.id;
|
|
obj.key = item.id;
|
|
obj.label = item.name;
|
|
obj.label = item.name;
|
|
- l.push(obj)
|
|
|
|
|
|
+ obj.label = item.name;
|
|
|
|
+ l.push(obj);
|
|
});
|
|
});
|
|
that.data = l;
|
|
that.data = l;
|
|
- console.log(that.data)
|
|
|
|
|
|
+ console.log(that.data);
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //创建错题推送
|
|
|
|
+ sure_push(){
|
|
|
|
+ if(! this.s_push.length > 0 ){
|
|
|
|
+ this.$message.warning('请选择需要推送的学生');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(! this.params.tid){
|
|
|
|
+ this.$message.warning('请选择来源');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var p = {};
|
|
|
|
+ p.cid = this.params.cid;
|
|
|
|
+ p.task_id = this.params.tid;
|
|
|
|
+ p.stu_ids = this.s_push;
|
|
|
|
+ this.remark?p.remark = this.remark:'';
|
|
|
|
+ clsErrPost(p).then(res=>{
|
|
|
|
+ if(res.errcode == 0){
|
|
|
|
+ this.is_show = false;
|
|
|
|
+ this.params.tid='';
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.warning(res.mess);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //推送学生
|
|
|
|
+ handleChange(value, direction, movedKeys) {
|
|
|
|
+ this.s_push = movedKeys
|
|
|
|
+ },
|
|
//来源
|
|
//来源
|
|
sourceList(val) {
|
|
sourceList(val) {
|
|
var that = this,
|
|
var that = this,
|
|
obj = {};
|
|
obj = {};
|
|
- this.params.tid='';
|
|
|
|
|
|
+ this.params.tid = "";
|
|
obj.mtype = val;
|
|
obj.mtype = val;
|
|
tasks(obj).then((res) => {
|
|
tasks(obj).then((res) => {
|
|
if (res.errcode == 0) {
|
|
if (res.errcode == 0) {
|
|
@@ -248,12 +288,6 @@ export default {
|
|
this.params.cid = i;
|
|
this.params.cid = i;
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
- //重置
|
|
|
|
- reset() {
|
|
|
|
- this.params.page = 1;
|
|
|
|
- this.params.cid = "";
|
|
|
|
- this.getList();
|
|
|
|
- },
|
|
|
|
//搜索
|
|
//搜索
|
|
search() {
|
|
search() {
|
|
this.params.page = 1;
|
|
this.params.page = 1;
|
|
@@ -270,22 +304,22 @@ export default {
|
|
// },
|
|
// },
|
|
//获取列表
|
|
//获取列表
|
|
getList() {
|
|
getList() {
|
|
- // const load = this.$loading({
|
|
|
|
- // lock: true,
|
|
|
|
- // text: "Loading",
|
|
|
|
- // spinner: "el-icon-loading",
|
|
|
|
- // background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
- // });
|
|
|
|
- // var that = this;
|
|
|
|
- // var obj = JSON.parse(JSON.stringify(this.params));
|
|
|
|
- // searchClass(obj).then((res) => {
|
|
|
|
- // if (res.errcode == 0) {
|
|
|
|
- // that.tableData = res.data;
|
|
|
|
- // that.total = res.total;
|
|
|
|
- // //关闭loading
|
|
|
|
- // load.close();
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
|
|
+ const load = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: "Loading",
|
|
|
|
+ spinner: "el-icon-loading",
|
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
+ });
|
|
|
|
+ var that = this;
|
|
|
|
+ var obj = JSON.parse(JSON.stringify(this.params));
|
|
|
|
+ searchClass(obj).then((res) => {
|
|
|
|
+ if (res.errcode == 0) {
|
|
|
|
+ that.tableData = res.data;
|
|
|
|
+ that.total = res.total;
|
|
|
|
+ //关闭loading
|
|
|
|
+ load.close();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
jump(url) {
|
|
jump(url) {
|
|
this.$router.push(url);
|
|
this.$router.push(url);
|
|
@@ -466,6 +500,9 @@ export default {
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
<style>
|
|
<style>
|
|
|
|
+.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label{
|
|
|
|
+ font-size: 14px;
|
|
|
|
+}
|
|
.screen1 .el-select {
|
|
.screen1 .el-select {
|
|
width: 120px;
|
|
width: 120px;
|
|
}
|
|
}
|
|
@@ -485,30 +522,32 @@ export default {
|
|
height: 276px;
|
|
height: 276px;
|
|
margin: 0 auto 40px auto;
|
|
margin: 0 auto 40px auto;
|
|
}
|
|
}
|
|
-.transfer_box .el-transfer{
|
|
|
|
|
|
+.transfer_box .el-transfer {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
width: 325px;
|
|
width: 325px;
|
|
}
|
|
}
|
|
-.transfer_box .el-input__prefix{
|
|
|
|
|
|
+.transfer_box .el-input__prefix {
|
|
left: 2px;
|
|
left: 2px;
|
|
}
|
|
}
|
|
-.transfer_box .el-transfer-panel__filter{
|
|
|
|
|
|
+.transfer_box .el-transfer-panel__filter {
|
|
margin: 10px;
|
|
margin: 10px;
|
|
}
|
|
}
|
|
-.transfer_box .el-input--prefix .el-input__inner{
|
|
|
|
|
|
+.transfer_box .el-input--prefix .el-input__inner {
|
|
padding-left: 30px;
|
|
padding-left: 30px;
|
|
}
|
|
}
|
|
-.transfer_box .el-transfer-panel__filter .el-input__inner{
|
|
|
|
|
|
+.transfer_box .el-transfer-panel__filter .el-input__inner {
|
|
height: 30px;
|
|
height: 30px;
|
|
}
|
|
}
|
|
-.transfer_box .el-transfer-panel{
|
|
|
|
|
|
+.transfer_box .el-transfer-panel {
|
|
width: 155px;
|
|
width: 155px;
|
|
}
|
|
}
|
|
-.transfer_box .el-transfer__buttons{
|
|
|
|
|
|
+.transfer_box .el-transfer__buttons {
|
|
position: absolute;
|
|
position: absolute;
|
|
|
|
+ bottom: 130px;
|
|
|
|
+ left: 205px;
|
|
}
|
|
}
|
|
-.transfer_box .el-transfer__buttons{
|
|
|
|
- display: none;
|
|
|
|
|
|
+.transfer_box .el-button {
|
|
|
|
+ padding: 0;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|