|
@@ -1,19 +1,30 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="personPage">
|
|
|
- <!-- <div style="width: 100%;display: flex;justify-content: flex-end;">
|
|
|
+ <!-- <div
|
|
|
+ style="width: 100%;display: flex;justify-content: flex-end;align-items: center;"
|
|
|
+ >
|
|
|
<el-select v-model="teas" multiple placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in TeaOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ v-for="item in TeaList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <div><el-button type="primary" size="mini">提醒</el-button></div>
|
|
|
+ <div style="margin-left: 10px;">
|
|
|
+ <el-button type="primary" @click="remindExamine" size="mini"
|
|
|
+ >提醒</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div> -->
|
|
|
- <el-table :data="tableData" class="scoTab" style="width: 100%">
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ class="scoTab"
|
|
|
+ v-loading="tabLoading"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-table-column type="index" align="center" label="序号" width="180">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="username" align="center" label="教师姓名">
|
|
@@ -21,24 +32,51 @@
|
|
|
<el-table-column
|
|
|
prop="tea"
|
|
|
show-overflow-tooltip
|
|
|
+ :filters="TeachingOptions"
|
|
|
+ :filter-method="filterTea"
|
|
|
align="center"
|
|
|
label="教研室"
|
|
|
width="180"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="考核进度">
|
|
|
+ <el-table-column
|
|
|
+ :filters="[
|
|
|
+ { text: '已完成', value: '已完成' },
|
|
|
+ { text: '未完成', value: '未完成' }
|
|
|
+ ]"
|
|
|
+ :filter-method="filterExa"
|
|
|
+ :filter-multiple="false"
|
|
|
+ prop="state"
|
|
|
+ align="center"
|
|
|
+ label="考核进度"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.step == scope.row.allStep">√</div>
|
|
|
<div v-else>{{ scope.row.step }}/{{ scope.row.allStep }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="evaSca" align="center" label="自评分数">
|
|
|
+ <el-table-column
|
|
|
+ prop="evaSca"
|
|
|
+ :sortable="true"
|
|
|
+ :sort-method="sortEvaMethod"
|
|
|
+ align="center"
|
|
|
+ label="自评分数"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="cogSco" align="center" label="考核分数">
|
|
|
+ <el-table-column
|
|
|
+ prop="cogSco"
|
|
|
+ :sortable="true"
|
|
|
+ :sort-method="sortCogMethod"
|
|
|
+ align="center"
|
|
|
+ label="考核分数"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="评分">
|
|
|
+ <el-table-column align="center" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <div class="TabBtn" @click="lookScore(scope.row)">评分</div>
|
|
|
+ <div style="display: flex;justify-content: center;">
|
|
|
+ <div class="TabBtn" @click="lookScore(scope.row)">评分</div>
|
|
|
+ <div class="TabBtn" @click="withdraw(scope.row.id)">撤回</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -171,6 +209,10 @@
|
|
|
<div style="display: flex;justify-content: center;">
|
|
|
<div v-if="tableData.length > 0" class="ScoreStep">
|
|
|
<input
|
|
|
+ :style="{
|
|
|
+ color: k.sco1 == k.sco2 ? '#000' : 'red'
|
|
|
+ }"
|
|
|
+ :readonly="txtLoading"
|
|
|
@blur="
|
|
|
saveTab(
|
|
|
k.sco2 > k.score ? (k.sco2 = k.score) : ''
|
|
@@ -179,11 +221,11 @@
|
|
|
type="number"
|
|
|
v-model="k.sco2"
|
|
|
/>
|
|
|
- <!-- @blur="Submit(scope.row)" -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="display: flex;justify-content: center;">
|
|
|
<textarea
|
|
|
+ :readonly="txtLoading"
|
|
|
v-if="tableData.length > 0"
|
|
|
@blur="saveTab()"
|
|
|
v-model.trim="k.cogSum"
|
|
@@ -205,7 +247,7 @@
|
|
|
:visible.sync="diaIframe"
|
|
|
:append-to-body="true"
|
|
|
width="95%"
|
|
|
- :before-close="handleClose"
|
|
|
+ :before-close="handleClose2"
|
|
|
class="dialog_diy"
|
|
|
>
|
|
|
<div style="height: 100%;">
|
|
@@ -247,34 +289,15 @@ export default {
|
|
|
computedScoData: 0,
|
|
|
computedStepData: 0,
|
|
|
computedCogSCoData: 0,
|
|
|
-
|
|
|
+ TeaList: [],
|
|
|
+ tabLoading: false,
|
|
|
userid: this.$route.query.userid, //用户id
|
|
|
oid: this.$route.query.oid, //学校id
|
|
|
org: this.$route.query.org, //组织id
|
|
|
tableData: [],
|
|
|
- TeaOptions: [
|
|
|
- {
|
|
|
- value: "选项1",
|
|
|
- label: "黄金糕"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "选项2",
|
|
|
- label: "双皮奶"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "选项3",
|
|
|
- label: "蚵仔煎"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "选项4",
|
|
|
- label: "龙须面"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "选项5",
|
|
|
- label: "北京烤鸭"
|
|
|
- }
|
|
|
- ],
|
|
|
- teas: []
|
|
|
+ teas: [],
|
|
|
+ TeachingOptions: [],
|
|
|
+ txtLoading: false
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -333,10 +356,12 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getData();
|
|
|
+ this.getTeaList();
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取页面数据
|
|
|
getData() {
|
|
|
+ this.tabLoading = true;
|
|
|
let params = {
|
|
|
oid: this.oid,
|
|
|
org: this.org,
|
|
@@ -371,16 +396,25 @@ export default {
|
|
|
});
|
|
|
|
|
|
data.forEach(e => {
|
|
|
+ if (e.step == e.allStep) {
|
|
|
+ e.state = "已完成";
|
|
|
+ } else {
|
|
|
+ e.state = "未完成";
|
|
|
+ }
|
|
|
+ if (!e.tea) {
|
|
|
+ e.tea = "";
|
|
|
+ }
|
|
|
e.evaSca = e.evaSca.toFixed(2);
|
|
|
e.cogSco = e.cogSco.toFixed(2);
|
|
|
});
|
|
|
this.tableData = data;
|
|
|
+ this.tabLoading = false;
|
|
|
})
|
|
|
.catch(error => {
|
|
|
+ this.tabLoading = false;
|
|
|
console.log(error);
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
// 点击评分
|
|
|
lookScore(val) {
|
|
|
this.digLoading = true;
|
|
@@ -398,24 +432,110 @@ export default {
|
|
|
this.cutPerson();
|
|
|
this.getPageBase();
|
|
|
},
|
|
|
- // getTeaList() {
|
|
|
- // let params = {
|
|
|
- // oid: this.oid,
|
|
|
- // };
|
|
|
- // this.ajax
|
|
|
- // .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
|
|
|
- // .then((res) => {
|
|
|
- // this.TeachingOptions = res.data[0];
|
|
|
- // console.log('this.TeachingOptions',this.TeachingOptions);
|
|
|
- // })
|
|
|
- // .catch((err) => {
|
|
|
- // this.isLoading = false;
|
|
|
- // console.error(err);
|
|
|
- // });
|
|
|
- // },
|
|
|
+ // 获取教研室
|
|
|
+ getTeaList() {
|
|
|
+ let params = {
|
|
|
+ oid: this.oid
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
|
|
|
+ .then(res => {
|
|
|
+ // return console.log("this.TeachingOptions", res.data[0]);
|
|
|
+ let data = res.data[0];
|
|
|
+ let dataCopy = [];
|
|
|
+
|
|
|
+ data.forEach(e => {
|
|
|
+ let a = {};
|
|
|
+ a.value = e.name;
|
|
|
+ a.text = e.name;
|
|
|
+ dataCopy.push(a);
|
|
|
+ });
|
|
|
+ data.forEach(e => {
|
|
|
+ let a = {};
|
|
|
+ a.id = e.id;
|
|
|
+ a.name = e.name;
|
|
|
+ this.TeaList.push(a);
|
|
|
+ });
|
|
|
+
|
|
|
+ this.TeachingOptions = dataCopy;
|
|
|
+ // console.log("this.TeachingOptions", this.TeachingOptions);
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 撤回
|
|
|
+ withdraw(id) {
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ tid: id
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ this.$confirm("确认撤回?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: " info"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "updateExamineState", params)
|
|
|
+ .then(res => {
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消撤回"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 提醒
|
|
|
+ remindExamine() {
|
|
|
+ let params = {
|
|
|
+ oid: this.oid,
|
|
|
+ org: this.org,
|
|
|
+ tea: this.teas.join(","),
|
|
|
+ ptype: this.pType
|
|
|
+ };
|
|
|
+ return console.log(params);
|
|
|
+
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectExamineTeaRemind", params)
|
|
|
+ .then(res => {})
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 按照数字大小排序 方法-
|
|
|
+ sortCogMethod(before, after) {
|
|
|
+ return Number(before.cogSco) - Number(after.cogSco);
|
|
|
+ },
|
|
|
+ sortEvaMethod(before, after) {
|
|
|
+ return Number(before.evaSca) - Number(after.evaSca);
|
|
|
+ },
|
|
|
+ // 教研室筛选
|
|
|
+ filterTea(value, row, column) {
|
|
|
+ console.log(value, row, column);
|
|
|
+ const property = column["property"];
|
|
|
+ return row[property].includes(value);
|
|
|
+ },
|
|
|
+ // 是否完成筛选
|
|
|
+ filterExa(value, row, column) {
|
|
|
+ console.log(value, row, column);
|
|
|
+ const property = column["property"];
|
|
|
+ return row[property] == value;
|
|
|
+ },
|
|
|
// ----------------
|
|
|
+
|
|
|
// 保存修改
|
|
|
saveTab() {
|
|
|
+ this.txtLoading = true;
|
|
|
+
|
|
|
let PageBaseDataCopy = JSON.parse(JSON.stringify(this.PageBaseData));
|
|
|
|
|
|
for (const e of PageBaseDataCopy) {
|
|
@@ -452,7 +572,7 @@ export default {
|
|
|
return this.$message.error("暂无人员提交");
|
|
|
// this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.userid}`;
|
|
|
|
|
|
- this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${cid}&oid=${this.oid}&org=${this.oid}&type=2&role=0&peopleId=${this.digUserid}`;
|
|
|
+ this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${cid}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.digUserid}`;
|
|
|
// this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/test?userid=${this.userid}&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=&role=0`;
|
|
|
this.diaIframe = true;
|
|
|
},
|
|
@@ -615,6 +735,7 @@ export default {
|
|
|
this.DigSelfSco = 0;
|
|
|
this.twoTarget = 0;
|
|
|
}
|
|
|
+ this.txtLoading = false;
|
|
|
this.digLoading = false;
|
|
|
})
|
|
|
.catch(error => {
|
|
@@ -645,12 +766,18 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 关闭弹框
|
|
|
+ // 评分关闭弹框
|
|
|
handleClose(done) {
|
|
|
this.getData();
|
|
|
done();
|
|
|
},
|
|
|
+ // 数据来源关闭弹框
|
|
|
+ handleClose2(done) {
|
|
|
+ this.digLoading = true;
|
|
|
|
|
|
+ this.getPageBase();
|
|
|
+ done();
|
|
|
+ },
|
|
|
// 处理数据来源
|
|
|
async handleData() {
|
|
|
for (const e of this.PageBaseData) {
|
|
@@ -665,7 +792,7 @@ export default {
|
|
|
computedTest(val) {
|
|
|
let params = [
|
|
|
{
|
|
|
- uid: this.uid,
|
|
|
+ uid: this.digUserid,
|
|
|
testId: val.join(",")
|
|
|
}
|
|
|
];
|
|
@@ -702,6 +829,7 @@ export default {
|
|
|
.TabBtn {
|
|
|
cursor: pointer;
|
|
|
color: #528df6;
|
|
|
+ margin: 0 10px;
|
|
|
}
|
|
|
.dialog_diy >>> .el-dialog {
|
|
|
height: 95%;
|