|
@@ -79,14 +79,39 @@
|
|
|
<div>{{ a.time }}</div>
|
|
|
</div>
|
|
|
<div class="anliButton">
|
|
|
- <div>
|
|
|
- <el-button @click="lookDetail(a.id)">查看</el-button>
|
|
|
+ <div
|
|
|
+ :style="{
|
|
|
+ width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
|
|
|
+ }"
|
|
|
+ @click="lookDetail(a.id)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <el-button @click="openScore(a, 1)">评分</el-button>
|
|
|
+ <div
|
|
|
+ :style="{
|
|
|
+ width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
|
|
|
+ }"
|
|
|
+ @click="openScore(a, 1)"
|
|
|
+ >
|
|
|
+ 评分
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <el-button @click="openScore(a, 2)">推荐</el-button>
|
|
|
+ <div
|
|
|
+ :style="{
|
|
|
+ width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
|
|
|
+ }"
|
|
|
+ @click="openScore(a, 2)"
|
|
|
+ >
|
|
|
+ 推荐
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="a.score"
|
|
|
+ style="min-width: 80px"
|
|
|
+ :style="{
|
|
|
+ width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
|
|
|
+ }"
|
|
|
+ @click="lookAnliScore(a.id)"
|
|
|
+ >
|
|
|
+ 查看评分
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -299,6 +324,64 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="查看评分"
|
|
|
+ :visible.sync="dialogVisibleAllScore"
|
|
|
+ :append-to-body="true"
|
|
|
+ width="70%"
|
|
|
+ height="80%"
|
|
|
+ :before-close="handleClose"
|
|
|
+ class="dialog_diy customWidth1"
|
|
|
+ >
|
|
|
+ <el-table :data="anliScoreList" stripe border style="width: 100%">
|
|
|
+ <el-table-column label="姓名" min-width="10" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.name ? scope.row.name : "-" }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="项目式学习" min-width="10">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.score.first ? scope.row.score.first : "-" }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="项目成果" min-width="10">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.score.second ? scope.row.score.second : "-" }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="项目评价" min-width="10">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.score.third ? scope.row.score.third : "-" }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="平均分" min-width="10">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.sum ? scope.row.sum : "-" }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="评价时间" min-width="10">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.time ? scope.row.time : "-" }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="评语" min-width="30">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.score.content ? scope.row.score.content : "-" }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="reScore">
|
|
|
+ <div>当前平均分</div>
|
|
|
+ <div>
|
|
|
+ <span>{{ allScoreSum }}</span
|
|
|
+ >分
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -348,6 +431,9 @@ export default {
|
|
|
sumScore: 0,
|
|
|
},
|
|
|
],
|
|
|
+ anliScoreList: [],
|
|
|
+ dialogVisibleAllScore: false,
|
|
|
+ allScoreSum: 0,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -479,14 +565,35 @@ export default {
|
|
|
this.tableData = res.data[0];
|
|
|
for (var i = 0; i < this.tableData.length; i++) {
|
|
|
this.tableData[i].info = JSON.parse(this.tableData[i].info);
|
|
|
- this.tableData[i].overview = JSON.parse(this.tableData[i].overview);
|
|
|
- this.tableData[i].process = JSON.parse(this.tableData[i].process);
|
|
|
- this.tableData[i].proact = JSON.parse(this.tableData[i].proact);
|
|
|
- this.tableData[i].proexc = JSON.parse(this.tableData[i].proexc);
|
|
|
- this.tableData[i].results = JSON.parse(this.tableData[i].results);
|
|
|
+ // this.tableData[i].overview = JSON.parse(this.tableData[i].overview);
|
|
|
+ // this.tableData[i].process = JSON.parse(this.tableData[i].process);
|
|
|
+ // this.tableData[i].proact = JSON.parse(this.tableData[i].proact);
|
|
|
+ // this.tableData[i].proexc = JSON.parse(this.tableData[i].proexc);
|
|
|
+ // this.tableData[i].results = JSON.parse(this.tableData[i].results);
|
|
|
}
|
|
|
+ this.sScore(this.tableData);
|
|
|
this.isLoading = false;
|
|
|
})
|
|
|
+ .catch((err) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sScore(t) {
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectAllScore")
|
|
|
+ .then((res) => {
|
|
|
+ var scoreList = res.data[0];
|
|
|
+ for (var i = 0; i < t.length; i++) {
|
|
|
+ for (var j = 0; j < scoreList.length; j++) {
|
|
|
+ if (t[i].id == scoreList[j].rid) {
|
|
|
+ t[i].score = scoreList[j].score;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.tableData = t;
|
|
|
+ this.$forceUpdate();
|
|
|
+ })
|
|
|
.catch((err) => {
|
|
|
console.error(err);
|
|
|
});
|
|
@@ -741,6 +848,34 @@ export default {
|
|
|
aid
|
|
|
);
|
|
|
},
|
|
|
+ lookAnliScore(id) {
|
|
|
+ this.anliScoreList = [];
|
|
|
+ let params = {
|
|
|
+ rid: id,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectAnliScore", params)
|
|
|
+ .then((res) => {
|
|
|
+ var sList = res.data[0];
|
|
|
+ var allScoreSum = 0;
|
|
|
+ for (var i = 0; i < sList.length; i++) {
|
|
|
+ sList[i].score = JSON.parse(sList[i].score);
|
|
|
+ var point = sList[i].score;
|
|
|
+ var a = parseInt(point.first);
|
|
|
+ var b = parseInt(point.second);
|
|
|
+ var c = parseInt(point.third);
|
|
|
+ var sumScore = Math.round((a + b + c) / 3);
|
|
|
+ sList[i].sum = sumScore;
|
|
|
+ allScoreSum += sList[i].sum;
|
|
|
+ }
|
|
|
+ this.allScoreSum = Math.round(allScoreSum / sList.length);
|
|
|
+ this.anliScoreList = sList;
|
|
|
+ this.dialogVisibleAllScore = true;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
// this.getAnliList();
|
|
@@ -906,19 +1041,19 @@ export default {
|
|
|
flex-direction: row;
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
- justify-content: flex-end;
|
|
|
+ justify-content: center;
|
|
|
padding: 10px 0 0 0;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
|
|
|
.anliButton > div {
|
|
|
margin-right: 5px;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
|
|
|
-.anliButton > div > .el-button {
|
|
|
- background: #409efe;
|
|
|
- color: #fff;
|
|
|
- width: 80px;
|
|
|
- border-radius: 5px;
|
|
|
+.anliButton > div:not(:last-child) {
|
|
|
+ border-right: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
.customWidth >>> .el-dialog {
|