123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374 |
- <template>
- <!-- 区县级案例管理 -->
- <div class="pb_content">
- <div class="pb_head">
- <div>
- <span>案例管理</span>
- </div>
- </div>
- <div class="touTop" v-if="CourseType.length > 0">
- <div class="touLeft">
- <!-- <div>
- <div>案例分类</div>
- <el-select v-model="anliType" clearable>
- <el-option value="0" label="所有分类"></el-option>
- </el-select>
- </div> -->
- <div>
- <div
- class="all_choose"
- v-for="(item, index) in CourseType[0]"
- :key="index"
- >
- <span>{{ item.name }}</span>
- <el-select
- v-model="courseTypeId[item.id]"
- placeholder="请选择"
- @change="search"
- >
- <el-option label="全部" value="1">全部</el-option>
- <el-option
- v-for="item1 in CourseTypeJson[item.id]"
- :key="item1.id"
- :label="item1.name"
- :value="item1.id"
- >
- </el-option>
- </el-select>
- </div>
- <!-- <div class="anliCss">
- <div>案例筛选</div>
- <el-select v-model="anliBox" clearable @change="search">
- <el-option value="" label="全部"></el-option>
- <el-option value="1" label="经典案例"></el-option>
- <el-option value="0" label="平台案例"></el-option>
- </el-select>
- </div> -->
- </div>
- <div @click="clear" class="clear">重置</div>
- <div class="aName">
- <el-input
- v-model="anliName"
- auto-complete="off"
- placeholder="请输入案例名称"
- @input="search"
- ></el-input>
- </div>
- </div>
- <div class="touRight">
- <div></div>
- <div>
- <el-button @click="dialogVisibleMember = true">分配案例</el-button>
- </div>
- </div>
- </div>
- <div v-if="isNoTableData" class="isNoMessage">
- <img src="../../../assets/icon/isNoMessage.png" alt />
- </div>
- <div class="anliBox" v-loading="isLoading" v-if="tableData.length > 0">
- <div v-for="(a, aIndex) in tableData" :key="aIndex" class="anLi">
- <div class="anliImg">
- <img
- :src="a.info.cover.length > 0 ? a.info.cover[0].url : noBanner"
- alt=""
- />
- </div>
- <div class="anliBot">
- <div class="detailBox">
- <div>{{ a.info.title != "" ? a.info.title : "暂无" }}</div>
- <div>{{ a.time }}</div>
- </div>
- <div class="anliButton">
- <div
- :style="{
- width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
- }"
- @click="lookDetail(a.id)"
- >
- 查看
- </div>
- <div
- :style="{
- width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
- }"
- @click="openScore(a, 1)"
- >
- 评分
- </div>
- <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>
- </div>
- </div>
- <div class="student_page">
- <el-pagination
- background
- layout="prev, pager, next"
- :page-size="10"
- :total="total"
- v-if="page && tableData.length"
- style="padding-bottom: 20px"
- @current-change="handleCurrentChange"
- >
- </el-pagination>
- </div>
- <el-dialog
- title="分配案例"
- :visible.sync="dialogVisibleMember"
- :append-to-body="true"
- width="25%"
- height="80%"
- :before-close="handleClose"
- class="dialog_diy1 customWidth"
- >
- <div class="people">
- <div class="people_top">
- <div class="people_top_right">
- <div class="people_search">
- <div>选择评委</div>
- <el-select v-model="reviewer" placeholder="请选择评委">
- <el-option
- v-for="item in reviewerBox"
- :key="item.userid"
- :label="item.name"
- :value="item.userid"
- ></el-option>
- </el-select>
- </div>
- </div>
- <div class="aName">
- <div class="searchImg">
- <img src="../../../assets/icon/search.png" alt="" />
- </div>
- <el-input
- v-model="assCaseName"
- auto-complete="off"
- placeholder="请输入案例名称"
- @input="getAnliBox"
- ></el-input>
- </div>
- </div>
- <el-checkbox
- :indeterminate="isIndeterminate"
- v-model="checkAll"
- @change="handleCheckAllChange"
- style="padding: 15px 0 0 15px"
- >全选</el-checkbox
- >
- <el-checkbox-group
- v-loading="caseLoading"
- v-model="checkboxList"
- class="people_name"
- v-if="anliBox1.length"
- @change="handleCheckedAnliChange"
- >
- <el-checkbox v-for="item in anliBox1" :key="item.id" :label="item.id">
- <div class="t_j_box">
- <div>案例名称:</div>
- <el-tooltip
- placement="top"
- :content="item.info.title ? item.info.title : '暂无姓名'"
- >
- <span>{{
- item.info.title ? item.info.title : "暂无姓名"
- }}</span>
- </el-tooltip>
- </div>
- </el-checkbox>
- </el-checkbox-group>
- <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisibleMember = false">取 消</el-button>
- <el-button type="primary" @click="addCase">确定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="评分"
- :visible.sync="dialogVisibleScore"
- :append-to-body="true"
- width="25%"
- height="80%"
- :before-close="handleClose"
- class="dialog_diy customWidth1"
- >
- <div class="scoreBox" v-for="(s, sIndex) in scoreDetail" :key="sIndex">
- <div class="scoreCss">
- <div class="scoreTitle">
- <div><img src="../../../assets/avatar.png" alt="" /></div>
- <div>{{ s.uname }}</div>
- </div>
- <div class="anliTitle">
- <div>案例名称</div>
- <div>{{ s.title }}</div>
- </div>
- <div class="anliBrief">
- <div>案例简介</div>
- <div style="width: 650px; max-height: 150px; overflow: auto">
- {{ s.detail }}
- </div>
- </div>
- <div class="anliScore">
- <div>请选择评分</div>
- <div>
- <div class="scoreDiv">
- <div>项目式学习</div>
- <div>
- <el-input
- placeholder="输入分数"
- v-model="s.scoreAll.first"
- @change="isNumber($event, 1)"
- ></el-input>
- </div>
- </div>
- <div class="scoreDiv">
- <div>项目成果</div>
- <div>
- <el-input
- placeholder="输入分数"
- v-model="s.scoreAll.second"
- @change="isNumber($event, 2)"
- ></el-input>
- </div>
- </div>
- <div class="scoreDiv">
- <div>项目评价</div>
- <div>
- <el-input
- placeholder="输入分数"
- v-model="s.scoreAll.third"
- @change="isNumber($event, 3)"
- ></el-input>
- </div>
- </div>
- <!-- <div class="scoreDiv">
- <div>评审维度4</div>
- <div>
- <el-input
- placeholder="输入分数"
- v-model="s.scoreAll.fourth"
- @change="isNumber($event, 4)"
- ></el-input>
- </div>
- </div>
- <div class="scoreDiv">
- <div>评审维度5</div>
- <div>
- <el-input
- placeholder="输入分数"
- v-model="s.scoreAll.fivth"
- @change="isNumber($event, 5)"
- ></el-input>
- </div>
- </div> -->
- </div>
- </div>
- <div class="anliContent">
- <textarea
- :rows="5"
- class="tAreaCss"
- placeholder="请输入评语。"
- v-model="s.scoreAll.content"
- ></textarea>
- </div>
- <div class="addScore" @click="addScore">进行评分</div>
- </div>
- </div>
- </el-dialog>
- <el-dialog
- title="推荐省级评奖"
- :visible.sync="dialogVisibleRecommend"
- :append-to-body="true"
- width="25%"
- height="80%"
- :before-close="handleClose"
- class="dialog_diy customWidth1"
- >
- <div v-for="(r, rIndex) in scoreDetail" :key="rIndex">
- <div class="reTitle">
- <div>案例名称</div>
- <div>{{ r.title }}</div>
- </div>
- <div class="reDetail">
- <div>案例简介</div>
- <div>{{ r.detail }}</div>
- </div>
- <div class="reScore">
- <div>当前得分</div>
- <div>
- <span>{{ r.sumScore }}</span
- >分
- </div>
- </div>
- <div class="reBottom">
- <div>提示:点击确定提交,即可推送到市级进行评奖</div>
- <div @click="dialogVisibleRecommend = false">取消</div>
- <div @click="addRecommend">确定提交</div>
- </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>
- <script>
- export default {
- data() {
- return {
- page: 1,
- total: 0,
- // anliType: "",
- CourseType: [],
- CourseTypeJson: {},
- courseTypeId: {},
- courseTypeSon: [],
- anliName: "",
- assCaseName: "",
- caseLoading: false,
- anliBox: "",
- tableData: [],
- reviewer: "",
- reviewerBox: [],
- anliBox1: [],
- checkboxList: [],
- checkboxIdList: [],
- isNoTableData: false,
- isIndeterminate: false,
- isLoading: false,
- checkAll: false,
- dialogVisibleMember: false,
- dialogVisibleScore: false,
- dialogVisibleRecommend: false,
- noBanner: require("../../../assets/noBanner.jpg"),
- scoreDetail: [
- {
- id: "",
- uname: "",
- title: "",
- detail: "",
- scoreAll: {
- first: "",
- second: "",
- third: "",
- // fourth: "",
- // fivth: "",
- content: "",
- },
- sumScore: 0,
- },
- ],
- anliScoreList: [],
- dialogVisibleAllScore: false,
- allScoreSum: 0,
- };
- },
- methods: {
- handleCurrentChange(val) {
- this.page = val;
- this.getAnliList();
- },
- search() {
- this.page = 1;
- this.getAnliList();
- },
- goTo(path) {
- this.$router.push(path);
- },
- isNumber(e, t) {
- let value = /^\d+$/.test(e);
- // let value = e.replace(/[^d]/g, ""); // 只能输入数字
- if (value == true) {
- if (e < 0) {
- this.$message.error("请输入大于0的数值");
- if (t == 1) {
- this.scoreDetail[0].scoreAll.first = "";
- } else if (t == 2) {
- this.scoreDetail[0].scoreAll.second = "";
- } else {
- this.scoreDetail[0].scoreAll.third = "";
- }
- // else if (t == 4) {
- // this.scoreDetail[0].scoreAll.fourth = "";
- // } else {
- // this.scoreDetail[0].scoreAll.fivth = "";
- // }
- return;
- } else if (e > 100) {
- this.$message.error("数值不能大于100");
- if (t == 1) {
- this.scoreDetail[0].scoreAll.first = "";
- } else if (t == 2) {
- this.scoreDetail[0].scoreAll.second = "";
- } else {
- this.scoreDetail[0].scoreAll.third = "";
- }
- // else if (t == 4) {
- // this.scoreDetail[0].scoreAll.fourth = "";
- // } else {
- // this.scoreDetail[0].scoreAll.fivth = "";
- // }
- return;
- }
- } else {
- if (t == 1) {
- this.scoreDetail[0].scoreAll.first = "";
- } else if (t == 2) {
- this.scoreDetail[0].scoreAll.second = "";
- } else {
- this.scoreDetail[0].scoreAll.third = "";
- }
- // else if (t == 4) {
- // this.scoreDetail[0].scoreAll.fourth = "";
- // } else {
- // this.scoreDetail[0].scoreAll.fivth = "";
- // }
- this.$message.error("请输入数字");
- return;
- }
- // value = value.replace(/^0+(d)/, "$1"); // 第一位0开头,0后面为数字,则过滤掉,取后面的数字
- // value = value.replace(/(d{15})d*/, "$1"); // 最多保留15位整数
- // this.height = value;
- },
- handleCheckAllChange(val) {
- if (this.checkboxIdList.length == 0) {
- for (var i = 0; i < this.anliBox1.length; i++) {
- this.checkboxIdList.push(this.anliBox1[i].id);
- }
- }
- this.checkboxList = val ? this.checkboxIdList : [];
- this.isIndeterminate = false;
- },
- handleCheckedAnliChange(value) {
- let checkedCount = this.checkboxList.length;
- this.checkAll = checkedCount === this.anliBox1.length;
- this.isIndeterminate =
- checkedCount > 0 && checkedCount < this.anliBox1.length;
- },
- handleClose(done) {
- done();
- },
- clear() {
- for (var i = 0; i < this.CourseType[0].length; i++) {
- this.courseTypeId[this.CourseType[0][i].id] = "";
- }
- this.anliBox = "";
- this.getAnliList();
- },
- getAnliList(rc) {
- this.isLoading = true;
- var typeE = [];
- var typea, typeb, typec, typed;
- for (var i = 0; i < this.CourseType[0].length; i++) {
- if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
- typeE.push(this.CourseType[0][i].id);
- } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
- if (this.CourseType[0][i].name == "案例组别") {
- typea = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "年级") {
- typeb = this.courseTypeId[this.CourseType[0][i].id];
- } else if (this.CourseType[0][i].name == "学科") {
- typec = this.courseTypeId[this.CourseType[0][i].id];
- }
- this.courseTypeSon.push(this.courseTypeId[this.CourseType[0][i].id]);
- }
- }
- let params = {
- typea: typea != undefined ? typea : "",
- typeb: typeb != undefined ? typeb : "",
- typec: typec != undefined ? typec : "",
- typed: typed != undefined ? typed : "",
- typeE: typeE.join(","),
- cn: this.anliBox == "" ? 0 : this.anliBox,
- cid: rc ? rc : "",
- title: this.anliName,
- page: this.page,
- };
- this.ajax
- .get(this.$store.state.api + "selectAnliList", params)
- .then((res) => {
- this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
- 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.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);
- });
- },
- selectType(rc) {
- this.ajax
- .get(this.$store.state.api + "selectMatType")
- .then((res) => {
- this.CourseType = res.data;
- for (var i = 0; i < res.data[0].length; i++) {
- for (var j = 0; j < res.data[1].length; j++) {
- if (res.data[0][i].id == res.data[1][j].pid) {
- if (!this.CourseTypeJson[res.data[0][i].id]) {
- this.CourseTypeJson[res.data[0][i].id] = [];
- }
- this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
- }
- }
- }
- if (rc) {
- this.getAnliList(rc);
- } else {
- this.getAnliList();
- }
- })
- .catch((err) => {
- console.error(err);
- });
- },
- getAdmin() {
- let params = {
- uid: this.$store.state.userInfo.userid,
- cn: "",
- page: this.page,
- };
- this.ajax
- .get(this.$store.state.api + "selectReviewer", params)
- .then((res) => {
- this.reviewerBox = res.data[0];
- })
- .catch((err) => {
- console.error(err);
- });
- },
- getReviewerOrAdmin() {
- if (this.$store.state.userInfo.type == 6) {
- this.getUser();
- } else {
- this.selectType();
- }
- },
- getUser() {
- let params = {
- uid: this.$store.state.userInfo.userid,
- };
- this.ajax
- .get(this.$store.state.api + "selectCaseUser", params)
- .then((res) => {
- if (res.data[0].length > 0) {
- var reCid = res.data[0][0].aBox;
- this.selectType(reCid);
- } else {
- this.isNoTableData = true;
- }
- })
- .catch((err) => {
- console.error(err);
- });
- },
- getAnliBox() {
- this.caseLoading = true;
- let params = {
- title: this.assCaseName,
- };
- this.ajax
- .get(this.$store.state.api + "selecAnliBox", params)
- .then((res) => {
- this.anliBox1 = res.data[0];
- for (var i = 0; i < this.anliBox1.length; i++) {
- this.anliBox1[i].info = JSON.parse(this.anliBox1[i].info);
- this.anliBox1[i].overview = JSON.parse(this.anliBox1[i].overview);
- this.anliBox1[i].process = JSON.parse(this.anliBox1[i].process);
- this.anliBox1[i].proact = JSON.parse(this.anliBox1[i].proact);
- this.anliBox1[i].proexc = JSON.parse(this.anliBox1[i].proexc);
- this.anliBox1[i].results = JSON.parse(this.anliBox1[i].results);
- }
- this.caseLoading = false;
- })
- .catch((err) => {
- console.error(err);
- });
- },
- addCase() {
- if (this.reviewer == "") {
- this.$message.error("请选择评审员");
- return;
- } else if (this.checkboxList.length == 0) {
- this.$message.error("请选择案例");
- return;
- }
- let params = [
- {
- uid: this.reviewer,
- box: this.checkboxList.join(","),
- },
- ];
- this.ajax
- .post(this.$store.state.api + "insertCase", params)
- .then((res) => {
- this.$message({
- message: "分配成功",
- type: "success",
- });
- this.reviewer = "";
- this.checkboxList = [];
- this.isIndeterminate = false;
- this.checkAll = false;
- this.dialogVisibleMember = false;
- })
- .catch((err) => {
- this.$message.error("网络不佳");
- console.error(err);
- });
- },
- openScore(a, t) {
- this.scoreDetail[0].id = a.id;
- this.scoreDetail[0].title = a.info.title;
- this.scoreDetail[0].detail = a.info.courseText;
- this.scoreDetail[0].uname = a.uname;
- this.getScore(a.id, t);
- },
- getScore(id, t) {
- let params = {
- rid: id,
- suser: this.$store.state.userInfo.userid,
- };
- this.ajax
- .get(this.$store.state.api + "selectScore", params)
- .then((res) => {
- if (res.data[0].length > 0) {
- this.scoreDetail[0].scoreAll = JSON.parse(res.data[0][0].score);
- var a = parseInt(this.scoreDetail[0].scoreAll.first);
- var b = parseInt(this.scoreDetail[0].scoreAll.second);
- var c = parseInt(this.scoreDetail[0].scoreAll.third);
- // var d = parseInt(this.scoreDetail[0].scoreAll.fourth);
- // var e = parseInt(this.scoreDetail[0].scoreAll.fivth);
- // this.scoreDetail[0].sumScore = Math.round((a + b + c + d + e) / 5);
- this.scoreDetail[0].sumScore = Math.round((a + b + c) / 3);
- } else {
- this.scoreDetail[0].scoreAll = {
- first: "",
- second: "",
- third: "",
- // fourth: "",
- // fivth: "",
- content: "",
- };
- this.scoreDetail[0].sumScore = 0;
- }
- if (t == 1) {
- this.dialogVisibleScore = true;
- } else {
- this.dialogVisibleRecommend = true;
- }
- })
- .catch((err) => {
- console.error(err);
- });
- },
- addScore() {
- if (this.scoreDetail[0].scoreAll.first == "") {
- this.$message.error("请将信息填写完整");
- return;
- } else if (this.scoreDetail[0].scoreAll.second == "") {
- this.$message.error("请将信息填写完整");
- return;
- } else if (this.scoreDetail[0].scoreAll.third == "") {
- this.$message.error("请将信息填写完整");
- return;
- }
- // else if (this.scoreDetail[0].scoreAll.fourth == "") {
- // this.$message.error("请将信息填写完整");
- // return;
- // } else if (this.scoreDetail[0].scoreAll.fivth == "") {
- // this.$message.error("请将信息填写完整");
- // return;
- // }
- let params = [
- {
- rid: this.scoreDetail[0].id,
- suser: this.$store.state.userInfo.userid,
- s: JSON.stringify(this.scoreDetail[0].scoreAll),
- },
- ];
- this.ajax
- .post(this.$store.state.api + "addScore", params)
- .then((res) => {
- this.$message({
- message: "评分成功",
- type: "success",
- });
- this.scoreDetail = [
- {
- id: "",
- uname: "",
- title: "",
- detail: "",
- scoreAll: {
- first: "",
- second: "",
- third: "",
- // fourth: "",
- // fivth: "",
- content: "",
- },
- sumScore: 0,
- },
- ];
- this.dialogVisibleScore = false;
- })
- .catch((err) => {
- console.error(err);
- });
- },
- addRecommend() {
- if (this.scoreDetail[0].sumScore == 0) {
- this.$message.error("还未评审,不可推荐");
- return;
- }
- let params = {
- id: this.scoreDetail[0].id,
- rec: 1,
- };
- this.ajax
- .get(this.$store.state.api + "updateRaceRec", params)
- .then((res) => {
- this.$message({
- message: "推荐成功",
- type: "success",
- });
- this.dialogVisibleRecommend = false;
- })
- .catch((err) => {
- console.error(err);
- });
- },
- lookDetail(aid) {
- window.open(
- window.location.origin +
- window.location.pathname +
- "/#/anliDetail?aid=" +
- 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();
- this.getAdmin();
- // this.selectType();
- this.getReviewerOrAdmin();
- this.getAnliBox();
- },
- };
- </script>
- <style scoped>
- .el-popover {
- min-width: 80px;
- text-align: center;
- }
- </style>
- <style scoped>
- .dialog_diy1 >>> .el-dialog__header,
- .dialog_diy >>> .el-dialog__header {
- background: #3d67bd !important;
- padding: 15px 20px;
- }
- .dialog_diy1 >>> .el-dialog__header {
- text-align: center;
- }
- .dialog_diy1 >>> .el-dialog__title,
- .dialog_diy >>> .el-dialog__title {
- color: #fff;
- }
- .dialog_diy1 >>> .el-dialog__headerbtn,
- .dialog_diy >>> .el-dialog__headerbtn {
- top: 19px;
- }
- .dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close,
- .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
- color: #fff;
- }
- .dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close:hover,
- .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
- color: #fff;
- }
- .dialog_diy1 >>> .el-dialog__body,
- .dialog_diy1 >>> .el-dialog__footer,
- .dialog_diy >>> .el-dialog__body,
- .dialog_diy >>> .el-dialog__footer {
- background: #fafafa;
- }
- .disUoloadSty >>> .el-upload--picture-card {
- display: none;
- /* 上传按钮隐藏 */
- }
- .tou {
- border-bottom: 1px solid #c9c9c9;
- height: 50px;
- font-size: 30px;
- }
- .touTop {
- margin: 15px auto;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: baseline;
- justify-content: space-between;
- width: 95%;
- }
- .touLeft {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: baseline;
- }
- .touLeft > div:nth-child(1) {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items: center;
- }
- .touLeft > div > div {
- margin: 0 10px 10px 0;
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- .touRight > div:nth-child(2) > .el-button {
- background: #2268bd;
- color: #fff;
- }
- .student_page {
- width: 95%;
- margin: 20px auto 0;
- }
- .anliBox {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items: flex-start;
- margin: 25px auto 0;
- width: 95%;
- height: 570px;
- }
- .anLi {
- width: 280px;
- margin: 0 20px 10px 0;
- box-shadow: 3px 1px 15px 3px #f0f0f2;
- }
- .anliImg {
- width: 100%;
- height: 170px;
- }
- .anliImg > img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .anliBot {
- background: #fff;
- border: 1px solid #f5f5f5;
- padding: 5px 0 10px 0;
- box-sizing: border-box;
- }
- .detailBox {
- padding: 0 0 10px 10px;
- box-sizing: border-box;
- }
- .detailBox > div:nth-child(1) {
- font-size: 20px;
- width: 250px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-word;
- }
- .detailBox > div:nth-child(2) {
- color: #999;
- margin-top: 5px;
- font-size: 14px;
- }
- .anliButton {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- justify-content: center;
- padding: 10px 0 0 0;
- width: 100%;
- border-top: 1px solid #ccc;
- }
- .anliButton > div {
- margin-right: 5px;
- text-align: center;
- cursor: pointer;
- }
- .anliButton > div:not(:last-child) {
- border-right: 1px solid #ccc;
- }
- .customWidth >>> .el-dialog {
- min-width: 500px !important;
- }
- .customWidth1 >>> .el-dialog {
- min-width: 800px !important;
- }
- .people {
- border: 1px solid rgb(229 229 229);
- height: 495px;
- border-radius: 5px;
- width: 100%;
- overflow: auto;
- background: #fff;
- box-shadow: 0px 0px 10px 8px #ededed;
- }
- .people::-webkit-scrollbar {
- /*滚动条整体样式*/
- width: 6px;
- /*高宽分别对应横竖滚动条的尺寸*/
- height: 6px;
- }
- /*定义滚动条轨道 内阴影+圆角*/
- .people::-webkit-scrollbar-track {
- border-radius: 10px;
- background-color: #eee;
- }
- /*定义滑块 内阴影+圆角*/
- .people::-webkit-scrollbar-thumb {
- border-radius: 10px;
- -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
- background-color: rgba(0, 0, 0, 0.1);
- }
- .people_top {
- display: flex;
- width: 100%;
- flex-direction: column;
- padding: 10px 25px 10px;
- box-sizing: border-box;
- border-bottom: 1px solid #f4f4f7;
- }
- .people_top_right {
- height: 40px;
- margin-bottom: 10px;
- }
- .people_search {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- }
- .people_search > div:nth-child(1) {
- font-size: 16px;
- margin-right: 10px;
- }
- .t_j_box {
- display: flex;
- }
- .t_j_box span:nth-child(1) {
- width: 15%;
- overflow: hidden;
- margin-right: 10px;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .t_j_box span:nth-child(2) {
- width: 300px;
- overflow: hidden;
- text-overflow: ellipsis;
- margin-right: 10px;
- }
- .t_j_box span:nth-child(3) {
- width: calc(55% - 20px);
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .people_name {
- display: flex;
- flex-direction: column;
- flex-wrap: wrap;
- align-items: flex-start;
- padding: 15px 0 0 15px;
- }
- .people_name >>> .el-checkbox {
- margin-bottom: 10px;
- }
- .all_choose > span {
- margin-right: 10px;
- }
- .clear {
- width: 70px;
- height: 35px;
- background: #2268bc;
- color: #fff;
- text-align: center;
- border-radius: 5px;
- line-height: 35px;
- cursor: pointer;
- }
- .anliCss {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- }
- .anliCss > div:nth-child(1) {
- margin-right: 10px;
- }
- .scoreBox {
- background: #fff;
- }
- .scoreCss {
- padding: 10px;
- }
- .scoreTitle {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- }
- .scoreTitle > div:nth-child(1) {
- width: 50px;
- }
- .scoreTitle > div:nth-child(1) > img {
- width: 100%;
- height: 100%;
- }
- .scoreTitle > div:nth-child(2) {
- margin-left: 15px;
- }
- .anliTitle,
- .anliBrief,
- .anliScore {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: flex-start;
- padding: 10px 0 10px 0;
- font-size: 18px;
- }
- .anliTitle > div:nth-child(1),
- .anliBrief > div:nth-child(1) {
- min-width: 75px;
- width: 75px;
- }
- .anliTitle > div:nth-child(2),
- .anliBrief > div:nth-child(2) {
- font-size: 17px;
- margin-left: 35px;
- color: #b0b0b0;
- }
- .anliScore > div:nth-child(2) {
- margin: -13px 0 0 20px;
- }
- .scoreDiv {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- padding: 10px 0;
- }
- .scoreDiv > div:nth-child(1) {
- min-width: 90px;
- width: 90px;
- }
- .scoreDiv > div:nth-child(2) {
- margin-left: 10px;
- }
- .scoreDiv > div:nth-child(2) >>> .el-input__inner {
- border-radius: 15px;
- background: #fafafa;
- height: 30px;
- font-size: 16px;
- }
- .anliContent {
- width: 80%;
- margin: 0 auto;
- border-top: 2px solid #ededed;
- padding: 10px 0 0 0;
- }
- .tAreaCss {
- resize: none;
- width: 100%;
- text-indent: 10px;
- border: 1px solid #e6e6e8;
- background: #fafafa;
- }
- .tAreaCss:focus-visible {
- outline: none !important;
- }
- .addScore {
- width: 75%;
- margin: 10px auto;
- background: #409efe;
- color: #fff;
- height: 35px;
- text-align: center;
- line-height: 35px;
- border-radius: 5px;
- cursor: pointer;
- }
- .reTitle {
- font-size: 18px;
- }
- .reTitle > div:nth-child(2) {
- width: 99%;
- border: 1px solid #dbdbdb;
- font-size: 16px;
- height: 35px;
- line-height: 35px;
- text-indent: 10px;
- border-radius: 5px;
- margin: 10px 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-word;
- }
- .reDetail,
- .reScore {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: flex-start;
- padding: 10px 0 10px 0;
- font-size: 18px;
- }
- .reDetail > div:nth-child(2) {
- font-size: 17px;
- margin-left: 10px;
- color: #b0b0b0;
- width: 650px;
- max-height: 150px;
- overflow: auto;
- }
- .reScore > div:nth-child(2) {
- font-size: 35px;
- margin-left: 20px;
- }
- .reScore > div:nth-child(2) > span {
- color: #6188d5;
- }
- .reBottom {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- justify-content: flex-end;
- }
- .reBottom > div:nth-child(2) {
- border: 1px solid #d7d7d9;
- width: 70px;
- height: 35px;
- text-align: center;
- line-height: 35px;
- border-radius: 5px;
- margin: 0 10px 0 20px;
- cursor: pointer;
- }
- .reBottom > div:nth-child(3) {
- background: #409efe;
- color: #fff;
- height: 35px;
- line-height: 35px;
- width: 85px;
- text-align: center;
- border-radius: 5px;
- cursor: pointer;
- }
- .isNoMessage {
- width: 20%;
- margin: 10% auto 0;
- }
- .isNoMessage > img {
- width: 100%;
- height: 100%;
- }
- .aName {
- position: relative;
- }
- .aName >>> .el-input__inner {
- width: 290px;
- text-indent: 12px;
- }
- .searchImg {
- width: 20px;
- height: 20px;
- position: absolute;
- z-index: 9;
- top: 10px;
- left: 5px;
- }
- .searchImg > img {
- width: 100%;
- height: 100%;
- }
- </style>
|