anliList.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367
  1. <template>
  2. <!-- 市级案例管理 -->
  3. <div class="pb_content">
  4. <div class="pb_head">
  5. <div>
  6. <span>案例管理</span>
  7. </div>
  8. </div>
  9. <div class="touTop" v-if="CourseType.length > 0">
  10. <div class="touLeft">
  11. <!-- <div>
  12. <div>案例分类</div>
  13. <el-select v-model="anliType" clearable>
  14. <el-option value="0" label="所有分类"></el-option>
  15. </el-select>
  16. </div> -->
  17. <div>
  18. <div
  19. class="all_choose"
  20. v-for="(item, index) in CourseType[0]"
  21. :key="index"
  22. >
  23. <span>{{ item.name }}</span>
  24. <el-select
  25. v-model="courseTypeId[item.id]"
  26. placeholder="请选择"
  27. @change="search"
  28. >
  29. <el-option label="全部" value="1">全部</el-option>
  30. <el-option
  31. v-for="item1 in CourseTypeJson[item.id]"
  32. :key="item1.id"
  33. :label="item1.name"
  34. :value="item1.id"
  35. >
  36. </el-option>
  37. </el-select>
  38. </div>
  39. <!-- <div class="anliCss">
  40. <div>案例筛选</div>
  41. <el-select v-model="anliBox" clearable @change="search">
  42. <el-option value="" label="全部"></el-option>
  43. <el-option value="1" label="经典案例"></el-option>
  44. <el-option value="0" label="平台案例"></el-option>
  45. </el-select>
  46. </div> -->
  47. </div>
  48. <div @click="clear" class="clear">重置</div>
  49. <div class="aName">
  50. <el-input
  51. v-model="anliName"
  52. auto-complete="off"
  53. placeholder="请输入案例名称"
  54. @input="search"
  55. ></el-input>
  56. </div>
  57. </div>
  58. <div class="touRight">
  59. <div></div>
  60. <div>
  61. <el-button @click="dialogVisibleMember = true">分配案例</el-button>
  62. </div>
  63. </div>
  64. </div>
  65. <div v-if="isNoTableData" class="isNoMessage">
  66. <img src="../../../assets/icon/isNoMessage.png" alt />
  67. </div>
  68. <div class="anliBox" v-loading="isLoading" v-if="tableData.length > 0">
  69. <div v-for="(a, aIndex) in tableData" :key="aIndex" class="anLi">
  70. <div class="anliImg">
  71. <img
  72. :src="a.info.cover.length > 0 ? a.info.cover[0].url : noBanner"
  73. alt=""
  74. />
  75. </div>
  76. <div class="anliBot">
  77. <div class="detailBox">
  78. <div>{{ a.info.title != "" ? a.info.title : "暂无" }}</div>
  79. <div>{{ a.time }}</div>
  80. </div>
  81. <div class="anliButton">
  82. <div>
  83. <el-button @click="lookDetail(a.id)">查看</el-button>
  84. </div>
  85. <div>
  86. <el-button @click="openScore(a, 1)">评分</el-button>
  87. </div>
  88. <div v-if="a.score">
  89. <el-button @click="lookAnliScore(a.id)">查看评分</el-button>
  90. </div>
  91. <!-- <div>
  92. <el-button @click="openScore(a, 2)">推荐</el-button>
  93. </div> -->
  94. </div>
  95. </div>
  96. </div>
  97. <div class="student_page">
  98. <el-pagination
  99. background
  100. layout="prev, pager, next"
  101. :page-size="10"
  102. :total="total"
  103. v-if="page && tableData.length"
  104. style="padding-bottom: 20px"
  105. @current-change="handleCurrentChange"
  106. >
  107. </el-pagination>
  108. </div>
  109. </div>
  110. <div v-else class="noAnli">
  111. <img src="../../../assets/icon/isNoMessage.png" alt="" />
  112. </div>
  113. <el-dialog
  114. title="分配案例"
  115. :visible.sync="dialogVisibleMember"
  116. :append-to-body="true"
  117. width="25%"
  118. height="80%"
  119. :before-close="handleClose1"
  120. class="dialog_diy1 customWidth"
  121. >
  122. <div class="people">
  123. <div class="people_top">
  124. <div class="people_top_right">
  125. <div class="people_search">
  126. <div>选择评委</div>
  127. <el-select v-model="reviewer" placeholder="请选择评委">
  128. <el-option
  129. v-for="item in reviewerBox"
  130. :key="item.userid"
  131. :label="item.name"
  132. :value="item.userid"
  133. ></el-option>
  134. </el-select>
  135. </div>
  136. </div>
  137. <div class="aName">
  138. <div class="searchImg">
  139. <img src="../../../assets/icon/search.png" alt="" />
  140. </div>
  141. <el-input
  142. v-model="assCaseName"
  143. auto-complete="off"
  144. placeholder="请输入案例名称"
  145. @input="getAnliBox"
  146. ></el-input>
  147. </div>
  148. </div>
  149. <el-checkbox
  150. :indeterminate="isIndeterminate"
  151. v-model="checkAll"
  152. @change="handleCheckAllChange"
  153. style="padding: 15px 0 0 15px"
  154. >全选</el-checkbox
  155. >
  156. <el-checkbox-group
  157. v-loading="caseLoading"
  158. v-model="checkboxList"
  159. class="people_name"
  160. v-if="anliBox1.length"
  161. @change="handleCheckedAnliChange"
  162. >
  163. <el-checkbox v-for="item in anliBox1" :key="item.id" :label="item.id">
  164. <div class="t_j_box">
  165. <div>案例名称:</div>
  166. <el-tooltip
  167. placement="top"
  168. :content="item.info.title ? item.info.title : '暂无姓名'"
  169. >
  170. <span>{{
  171. item.info.title ? item.info.title : "暂无姓名"
  172. }}</span>
  173. </el-tooltip>
  174. </div>
  175. </el-checkbox>
  176. </el-checkbox-group>
  177. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  178. </div>
  179. <span slot="footer" class="dialog-footer">
  180. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  181. <el-button type="primary" @click="addCase">确定</el-button>
  182. </span>
  183. </el-dialog>
  184. <el-dialog
  185. title="评分"
  186. :visible.sync="dialogVisibleScore"
  187. :append-to-body="true"
  188. width="25%"
  189. height="80%"
  190. :before-close="handleClose"
  191. class="dialog_diy customWidth1"
  192. >
  193. <div class="scoreBox" v-for="(s, sIndex) in scoreDetail" :key="sIndex">
  194. <div class="scoreCss">
  195. <div class="scoreTitle">
  196. <div><img src="../../../assets/avatar.png" alt="" /></div>
  197. <div>{{ s.uname }}</div>
  198. </div>
  199. <div class="anliTitle">
  200. <div>案例名称</div>
  201. <div>{{ s.title }}</div>
  202. </div>
  203. <div class="anliBrief">
  204. <div>案例简介</div>
  205. <div style="width: 650px; max-height: 150px; overflow: auto">
  206. {{ s.detail }}
  207. </div>
  208. </div>
  209. <div class="anliScore">
  210. <div>请选择评分</div>
  211. <div>
  212. <div class="scoreDiv">
  213. <div>项目式学习</div>
  214. <div>
  215. <el-input
  216. placeholder="输入分数"
  217. v-model="s.scoreAll.first"
  218. @change="isNumber($event, 1)"
  219. ></el-input>
  220. </div>
  221. </div>
  222. <div class="scoreDiv">
  223. <div>项目成果</div>
  224. <div>
  225. <el-input
  226. placeholder="输入分数"
  227. v-model="s.scoreAll.second"
  228. @change="isNumber($event, 2)"
  229. ></el-input>
  230. </div>
  231. </div>
  232. <div class="scoreDiv">
  233. <div>项目评价</div>
  234. <div>
  235. <el-input
  236. placeholder="输入分数"
  237. v-model="s.scoreAll.third"
  238. @change="isNumber($event, 3)"
  239. ></el-input>
  240. </div>
  241. </div>
  242. <!-- <div class="scoreDiv">
  243. <div>评审维度4</div>
  244. <div>
  245. <el-input
  246. placeholder="输入分数"
  247. v-model="s.scoreAll.fourth"
  248. @change="isNumber($event, 4)"
  249. ></el-input>
  250. </div>
  251. </div>
  252. <div class="scoreDiv">
  253. <div>评审维度5</div>
  254. <div>
  255. <el-input
  256. placeholder="输入分数"
  257. v-model="s.scoreAll.fivth"
  258. @change="isNumber($event, 5)"
  259. ></el-input>
  260. </div>
  261. </div> -->
  262. </div>
  263. </div>
  264. <div class="anliContent">
  265. <textarea
  266. :rows="5"
  267. class="tAreaCss"
  268. placeholder="请输入评语。"
  269. v-model="s.scoreAll.content"
  270. ></textarea>
  271. </div>
  272. <div class="addScore" @click="addScore">进行评分</div>
  273. </div>
  274. </div>
  275. </el-dialog>
  276. <el-dialog
  277. title="推荐省级评奖"
  278. :visible.sync="dialogVisibleRecommend"
  279. :append-to-body="true"
  280. width="25%"
  281. height="80%"
  282. :before-close="handleClose"
  283. class="dialog_diy customWidth1"
  284. >
  285. <div v-for="(r, rIndex) in scoreDetail" :key="rIndex">
  286. <div class="reTitle">
  287. <div>案例名称</div>
  288. <div>{{ r.title }}</div>
  289. </div>
  290. <div class="reDetail">
  291. <div>案例简介</div>
  292. <div>{{ r.detail }}</div>
  293. </div>
  294. <div class="reScore">
  295. <div>当前得分</div>
  296. <div>
  297. <span>{{ r.sumScore }}</span
  298. >分
  299. </div>
  300. </div>
  301. <div class="reBottom">
  302. <div>提示:点击确定提交,即可推送到省级进行评奖</div>
  303. <div @click="dialogVisibleRecommend = false">取消</div>
  304. <div @click="addRecommend">确定提交</div>
  305. </div>
  306. </div>
  307. </el-dialog>
  308. <el-dialog
  309. title="查看评分"
  310. :visible.sync="dialogVisibleAllScore"
  311. :append-to-body="true"
  312. width="70%"
  313. height="80%"
  314. :before-close="handleClose"
  315. class="dialog_diy customWidth1"
  316. >
  317. <el-table :data="anliScoreList" stripe border style="width: 100%">
  318. <el-table-column label="姓名" min-width="10" align="center">
  319. <template slot-scope="scope">
  320. <div>{{ scope.row.name ? scope.row.name : "-" }}</div>
  321. </template>
  322. </el-table-column>
  323. <el-table-column label="项目式学习" min-width="10">
  324. <template slot-scope="scope">
  325. <div>{{ scope.row.score.first ? scope.row.score.first : "-" }}</div>
  326. </template>
  327. </el-table-column>
  328. <el-table-column label="项目成果" min-width="10">
  329. <template slot-scope="scope">
  330. <div>
  331. {{ scope.row.score.second ? scope.row.score.second : "-" }}
  332. </div>
  333. </template>
  334. </el-table-column>
  335. <el-table-column label="项目评价" min-width="10">
  336. <template slot-scope="scope">
  337. <div>{{ scope.row.score.third ? scope.row.score.third : "-" }}</div>
  338. </template>
  339. </el-table-column>
  340. <el-table-column label="平均分" min-width="10">
  341. <template slot-scope="scope">
  342. <div>{{ scope.row.sum ? scope.row.sum : "-" }}</div>
  343. </template>
  344. </el-table-column>
  345. <el-table-column label="评价时间" min-width="10">
  346. <template slot-scope="scope">
  347. <div>{{ scope.row.time ? scope.row.time : "-" }}</div>
  348. </template>
  349. </el-table-column>
  350. <el-table-column label="评语" min-width="30">
  351. <template slot-scope="scope">
  352. <div>
  353. {{ scope.row.score.content ? scope.row.score.content : "-" }}
  354. </div>
  355. </template>
  356. </el-table-column>
  357. </el-table>
  358. </el-dialog>
  359. </div>
  360. </template>
  361. <script>
  362. export default {
  363. data() {
  364. return {
  365. page: 1,
  366. total: 0,
  367. // anliType: "",
  368. CourseType: [],
  369. CourseTypeJson: {},
  370. courseTypeId: {},
  371. courseTypeSon: [],
  372. anliName: "",
  373. assCaseName: "",
  374. caseLoading: false,
  375. anliBox: "",
  376. tableData: [],
  377. reviewer: "",
  378. reviewerBox: [],
  379. anliBox1: [],
  380. checkboxList: [],
  381. checkboxIdList: [],
  382. isNoTableData: false,
  383. isLoading: false,
  384. isIndeterminate: false,
  385. checkAll: false,
  386. dialogVisibleMember: false,
  387. dialogVisibleScore: false,
  388. dialogVisibleRecommend: false,
  389. dialogVisibleAllScore: false,
  390. anliScoreList: [],
  391. noBanner: require("../../../assets/noBanner.jpg"),
  392. scoreDetail: [
  393. {
  394. id: "",
  395. uname: "",
  396. title: "",
  397. detail: "",
  398. scoreAll: {
  399. first: "",
  400. second: "",
  401. third: "",
  402. // fourth: "",
  403. // fivth: "",
  404. content: "",
  405. },
  406. sumScore: 0,
  407. },
  408. ],
  409. reCid: [],
  410. };
  411. },
  412. methods: {
  413. handleCurrentChange(val) {
  414. this.page = val;
  415. this.getAnliList(this.reCid);
  416. },
  417. search() {
  418. this.page = 1;
  419. this.getAnliList(this.reCid);
  420. },
  421. goTo(path) {
  422. this.$router.push(path);
  423. },
  424. isNumber(e, t) {
  425. if (e.includes(".")) {
  426. this.$message.error("暂时不支持小数点评分");
  427. if (t == 1) {
  428. this.scoreDetail[0].scoreAll.first = "";
  429. } else if (t == 2) {
  430. this.scoreDetail[0].scoreAll.second = "";
  431. } else {
  432. this.scoreDetail[0].scoreAll.third = "";
  433. }
  434. } else {
  435. let value = /^\d+$/.test(e);
  436. // let value = e.replace(/[^d]/g, ""); // 只能输入数字
  437. if (value == true) {
  438. if (e < 0) {
  439. this.$message.error("请输入大于0的数值");
  440. if (t == 1) {
  441. this.scoreDetail[0].scoreAll.first = "";
  442. } else if (t == 2) {
  443. this.scoreDetail[0].scoreAll.second = "";
  444. } else {
  445. this.scoreDetail[0].scoreAll.third = "";
  446. }
  447. // else if (t == 4) {
  448. // this.scoreDetail[0].scoreAll.fourth = "";
  449. // } else {
  450. // this.scoreDetail[0].scoreAll.fivth = "";
  451. // }
  452. return;
  453. } else if (e > 100) {
  454. this.$message.error("数值不能大于100");
  455. if (t == 1) {
  456. this.scoreDetail[0].scoreAll.first = "";
  457. } else if (t == 2) {
  458. this.scoreDetail[0].scoreAll.second = "";
  459. } else {
  460. this.scoreDetail[0].scoreAll.third = "";
  461. }
  462. // else if (t == 4) {
  463. // this.scoreDetail[0].scoreAll.fourth = "";
  464. // } else {
  465. // this.scoreDetail[0].scoreAll.fivth = "";
  466. // }
  467. return;
  468. }
  469. } else {
  470. if (t == 1) {
  471. this.scoreDetail[0].scoreAll.first = "";
  472. } else if (t == 2) {
  473. this.scoreDetail[0].scoreAll.second = "";
  474. } else {
  475. this.scoreDetail[0].scoreAll.third = "";
  476. }
  477. // else if (t == 4) {
  478. // this.scoreDetail[0].scoreAll.fourth = "";
  479. // } else {
  480. // this.scoreDetail[0].scoreAll.fivth = "";
  481. // }
  482. this.$message.error("请输入数字");
  483. return;
  484. }
  485. }
  486. // value = e.replace(/^0+(d)/, "$1"); // 第一位0开头,0后面为数字,则过滤掉,取后面的数字
  487. // value = e.replace(/(d{15})d*/, "$1"); // 最多保留15位整数
  488. // this.height = value;
  489. },
  490. handleCheckAllChange(val) {
  491. if (this.checkboxIdList.length == 0) {
  492. for (var i = 0; i < this.anliBox1.length; i++) {
  493. this.checkboxIdList.push(this.anliBox1[i].id);
  494. }
  495. }
  496. this.checkboxList = val ? this.checkboxIdList : [];
  497. this.isIndeterminate = false;
  498. },
  499. handleCheckedAnliChange(value) {
  500. let checkedCount = this.checkboxList.length;
  501. this.checkAll = checkedCount === this.anliBox1.length;
  502. this.isIndeterminate =
  503. checkedCount > 0 && checkedCount < this.anliBox1.length;
  504. },
  505. handleClose(done) {
  506. done();
  507. },
  508. handleClose1(done) {
  509. },
  510. clear() {
  511. for (var i = 0; i < this.CourseType[0].length; i++) {
  512. this.courseTypeId[this.CourseType[0][i].id] = "";
  513. }
  514. this.anliBox = "";
  515. this.getAnliList(this.reCid);
  516. },
  517. lookAnliScore(id) {
  518. this.anliScoreList = [];
  519. let params = {
  520. rid: id,
  521. };
  522. this.ajax
  523. .get(this.$store.state.api + "selectAnliScore", params)
  524. .then((res) => {
  525. var sList = res.data[0];
  526. for (var i = 0; i < sList.length; i++) {
  527. sList[i].score = JSON.parse(sList[i].score);
  528. var point = sList[i].score;
  529. var a = parseInt(point.first);
  530. var b = parseInt(point.second);
  531. var c = parseInt(point.third);
  532. var sumScore = Math.round((a + b + c) / 3);
  533. sList[i].sum = sumScore;
  534. }
  535. this.anliScoreList = sList;
  536. this.dialogVisibleAllScore = true;
  537. })
  538. .catch((err) => {
  539. console.error(err);
  540. });
  541. },
  542. getAnliList(rc) {
  543. this.isLoading = true;
  544. var typeE = [];
  545. var typea, typeb, typec, typed;
  546. for (var i = 0; i < this.CourseType[0].length; i++) {
  547. if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
  548. typeE.push(this.CourseType[0][i].id);
  549. } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
  550. if (this.CourseType[0][i].name == "案例组别") {
  551. typea = this.courseTypeId[this.CourseType[0][i].id];
  552. } else if (this.CourseType[0][i].name == "年级") {
  553. typeb = this.courseTypeId[this.CourseType[0][i].id];
  554. } else if (this.CourseType[0][i].name == "学科") {
  555. typec = this.courseTypeId[this.CourseType[0][i].id];
  556. }
  557. this.courseTypeSon.push(this.courseTypeId[this.CourseType[0][i].id]);
  558. }
  559. }
  560. let params = {
  561. typea: typea != undefined ? typea : "",
  562. typeb: typeb != undefined ? typeb : "",
  563. typec: typec != undefined ? typec : "",
  564. typed: typed != undefined ? typed : "",
  565. typeE: typeE.join(","),
  566. cn: this.anliBox == "" ? 0 : this.anliBox,
  567. cid: rc ? rc : "",
  568. title: this.anliName,
  569. page: this.page,
  570. };
  571. this.ajax
  572. .get(this.$store.state.api + "selectAnliList1", params)
  573. .then((res) => {
  574. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  575. this.tableData = res.data[0];
  576. for (var i = 0; i < this.tableData.length; i++) {
  577. this.tableData[i].info = JSON.parse(this.tableData[i].info);
  578. }
  579. this.sScore(this.tableData);
  580. this.isLoading = false;
  581. })
  582. .catch((err) => {
  583. this.isLoading = false;
  584. console.error(err);
  585. });
  586. },
  587. sScore(t) {
  588. this.ajax
  589. .get(this.$store.state.api + "selectAllScore")
  590. .then((res) => {
  591. var scoreList = res.data[0];
  592. for (var i = 0; i < t.length; i++) {
  593. for (var j = 0; j < scoreList.length; j++) {
  594. if (t[i].id == scoreList[j].rid) {
  595. t[i].score = scoreList[j].score;
  596. }
  597. }
  598. }
  599. this.tableData = t;
  600. this.$forceUpdate();
  601. })
  602. .catch((err) => {
  603. console.error(err);
  604. });
  605. },
  606. selectType(rc) {
  607. this.ajax
  608. .get(this.$store.state.api + "selectMatType")
  609. .then((res) => {
  610. this.CourseType = res.data;
  611. for (var i = 0; i < res.data[0].length; i++) {
  612. for (var j = 0; j < res.data[1].length; j++) {
  613. if (res.data[0][i].id == res.data[1][j].pid) {
  614. if (!this.CourseTypeJson[res.data[0][i].id]) {
  615. this.CourseTypeJson[res.data[0][i].id] = [];
  616. }
  617. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  618. }
  619. }
  620. }
  621. if (rc) {
  622. this.getAnliList(rc);
  623. } else {
  624. this.getAnliList();
  625. }
  626. })
  627. .catch((err) => {
  628. console.error(err);
  629. });
  630. },
  631. getAdmin() {
  632. let params = {
  633. uid: this.$store.state.userInfo.userid,
  634. cn: "",
  635. page: this.page,
  636. };
  637. this.ajax
  638. .get(this.$store.state.api + "selectReviewer", params)
  639. .then((res) => {
  640. this.reviewerBox = res.data[0];
  641. })
  642. .catch((err) => {
  643. console.error(err);
  644. });
  645. },
  646. getReviewerOrAdmin() {
  647. if (this.$store.state.userInfo.type == 4) {
  648. this.getUser();
  649. } else {
  650. this.selectType();
  651. }
  652. },
  653. getUser() {
  654. let params = {
  655. uid: this.$store.state.userInfo.userid,
  656. };
  657. this.ajax
  658. .get(this.$store.state.api + "selectCaseUser", params)
  659. .then((res) => {
  660. if (res.data[0].length > 0) {
  661. var reCid = res.data[0][0].aBox;
  662. this.reCid = reCid;
  663. this.selectType(reCid);
  664. } else {
  665. this.isNoTableData = true;
  666. }
  667. })
  668. .catch((err) => {
  669. console.error(err);
  670. });
  671. },
  672. getAnliBox() {
  673. this.caseLoading = true;
  674. let params = {
  675. title: this.assCaseName,
  676. };
  677. this.ajax
  678. .get(this.$store.state.api + "selecAnliBox1", params)
  679. .then((res) => {
  680. this.anliBox1 = res.data[0];
  681. for (var i = 0; i < this.anliBox1.length; i++) {
  682. this.anliBox1[i].info = JSON.parse(this.anliBox1[i].info);
  683. this.anliBox1[i].overview = JSON.parse(this.anliBox1[i].overview);
  684. this.anliBox1[i].process = JSON.parse(this.anliBox1[i].process);
  685. this.anliBox1[i].proact = JSON.parse(this.anliBox1[i].proact);
  686. this.anliBox1[i].proexc = JSON.parse(this.anliBox1[i].proexc);
  687. this.anliBox1[i].results = JSON.parse(this.anliBox1[i].results);
  688. }
  689. this.caseLoading = false;
  690. })
  691. .catch((err) => {
  692. console.error(err);
  693. });
  694. },
  695. addCase() {
  696. if (this.reviewer == "") {
  697. this.$message.error("请选择评审员");
  698. return;
  699. } else if (this.checkboxList.length == 0) {
  700. this.$message.error("请选择案例");
  701. return;
  702. }
  703. let params = [
  704. {
  705. uid: this.reviewer,
  706. box: this.checkboxList.join(","),
  707. },
  708. ];
  709. this.ajax
  710. .post(this.$store.state.api + "insertCase", params)
  711. .then((res) => {
  712. this.$message({
  713. message: "分配成功",
  714. type: "success",
  715. });
  716. this.reviewer = "";
  717. this.checkboxList = [];
  718. this.isIndeterminate = false;
  719. this.checkAll = false;
  720. this.dialogVisibleMember = false;
  721. })
  722. .catch((err) => {
  723. this.$message.error("网络不佳");
  724. console.error(err);
  725. });
  726. },
  727. openScore(a, t) {
  728. this.scoreDetail[0].id = a.id;
  729. this.scoreDetail[0].title = a.info.title;
  730. this.scoreDetail[0].detail = a.info.courseText;
  731. this.scoreDetail[0].uname = a.uname;
  732. this.getScore(a.id, t);
  733. },
  734. getScore(id, t) {
  735. let params = {
  736. rid: id,
  737. suser: this.$store.state.userInfo.userid,
  738. };
  739. this.ajax
  740. .get(this.$store.state.api + "selectScore", params)
  741. .then((res) => {
  742. if (res.data[0].length > 0) {
  743. this.scoreDetail[0].scoreAll = JSON.parse(res.data[0][0].score);
  744. var a = parseInt(this.scoreDetail[0].scoreAll.first);
  745. var b = parseInt(this.scoreDetail[0].scoreAll.second);
  746. var c = parseInt(this.scoreDetail[0].scoreAll.third);
  747. // var d = parseInt(this.scoreDetail[0].scoreAll.fourth);
  748. // var e = parseInt(this.scoreDetail[0].scoreAll.fivth);
  749. // this.scoreDetail[0].sumScore = Math.round((a + b + c + d + e) / 5);
  750. this.scoreDetail[0].sumScore = Math.round((a + b + c) / 3);
  751. } else {
  752. this.scoreDetail[0].scoreAll = {
  753. first: "",
  754. second: "",
  755. third: "",
  756. // fourth: "",
  757. // fivth: "",
  758. content: "",
  759. };
  760. this.scoreDetail[0].sumScore = 0;
  761. }
  762. if (t == 1) {
  763. this.dialogVisibleScore = true;
  764. } else {
  765. this.dialogVisibleRecommend = true;
  766. }
  767. })
  768. .catch((err) => {
  769. console.error(err);
  770. });
  771. },
  772. addScore() {
  773. if (this.scoreDetail[0].scoreAll.first == "") {
  774. this.$message.error("请将信息填写完整");
  775. return;
  776. } else if (this.scoreDetail[0].scoreAll.second == "") {
  777. this.$message.error("请将信息填写完整");
  778. return;
  779. } else if (this.scoreDetail[0].scoreAll.third == "") {
  780. this.$message.error("请将信息填写完整");
  781. return;
  782. }
  783. // else if (this.scoreDetail[0].scoreAll.fourth == "") {
  784. // this.$message.error("请将信息填写完整");
  785. // return;
  786. // } else if (this.scoreDetail[0].scoreAll.fivth == "") {
  787. // this.$message.error("请将信息填写完整");
  788. // return;
  789. // }
  790. let params = [
  791. {
  792. rid: this.scoreDetail[0].id,
  793. suser: this.$store.state.userInfo.userid,
  794. s: JSON.stringify(this.scoreDetail[0].scoreAll),
  795. },
  796. ];
  797. this.ajax
  798. .post(this.$store.state.api + "addScore", params)
  799. .then((res) => {
  800. this.$message({
  801. message: "评分成功",
  802. type: "success",
  803. });
  804. this.scoreDetail = [
  805. {
  806. id: "",
  807. uname: "",
  808. title: "",
  809. detail: "",
  810. scoreAll: {
  811. first: "",
  812. second: "",
  813. third: "",
  814. // fourth: "",
  815. // fivth: "",
  816. content: "",
  817. },
  818. sumScore: 0,
  819. },
  820. ];
  821. this.dialogVisibleScore = false;
  822. })
  823. .catch((err) => {
  824. console.error(err);
  825. });
  826. },
  827. addRecommend() {
  828. if (this.scoreDetail[0].sumScore == 0) {
  829. this.$message.error("还未评审,不可推荐");
  830. return;
  831. }
  832. let params = {
  833. id: this.scoreDetail[0].id,
  834. rec: 2,
  835. };
  836. this.ajax
  837. .get(this.$store.state.api + "updateRaceRec", params)
  838. .then((res) => {
  839. this.$message({
  840. message: "推荐成功",
  841. type: "success",
  842. });
  843. this.dialogVisibleRecommend = false;
  844. })
  845. .catch((err) => {
  846. console.error(err);
  847. });
  848. },
  849. lookDetail(aid) {
  850. window.open(
  851. window.location.origin +
  852. window.location.pathname +
  853. "/#/anliDetail?aid=" +
  854. aid
  855. );
  856. },
  857. },
  858. created() {
  859. // this.getAnliList();
  860. this.getAdmin();
  861. // this.selectType();
  862. this.getReviewerOrAdmin();
  863. this.getAnliBox();
  864. },
  865. };
  866. </script>
  867. <style scoped>
  868. .el-popover {
  869. min-width: 80px;
  870. text-align: center;
  871. }
  872. </style>
  873. <style scoped>
  874. .dialog_diy1 >>> .el-dialog__header,
  875. .dialog_diy >>> .el-dialog__header {
  876. background: #3d67bd !important;
  877. padding: 15px 20px;
  878. }
  879. .dialog_diy1 >>> .el-dialog__header {
  880. text-align: center;
  881. }
  882. .dialog_diy1 >>> .el-dialog__title,
  883. .dialog_diy >>> .el-dialog__title {
  884. color: #fff;
  885. }
  886. .dialog_diy1 >>> .el-dialog__headerbtn,
  887. .dialog_diy >>> .el-dialog__headerbtn {
  888. top: 19px;
  889. }
  890. .dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close,
  891. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
  892. color: #fff;
  893. }
  894. .dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close:hover,
  895. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
  896. color: #fff;
  897. }
  898. .dialog_diy1 >>> .el-dialog__body,
  899. .dialog_diy1 >>> .el-dialog__footer,
  900. .dialog_diy >>> .el-dialog__body,
  901. .dialog_diy >>> .el-dialog__footer {
  902. background: #fafafa;
  903. }
  904. .disUoloadSty >>> .el-upload--picture-card {
  905. display: none;
  906. /* 上传按钮隐藏 */
  907. }
  908. .tou {
  909. border-bottom: 1px solid #c9c9c9;
  910. height: 50px;
  911. font-size: 30px;
  912. }
  913. .touTop {
  914. margin: 15px auto;
  915. display: flex;
  916. flex-direction: row;
  917. flex-wrap: nowrap;
  918. align-items: baseline;
  919. justify-content: space-between;
  920. width: 95%;
  921. }
  922. .touLeft {
  923. display: flex;
  924. flex-direction: row;
  925. flex-wrap: nowrap;
  926. align-items: baseline;
  927. }
  928. .touLeft > div:nth-child(1) {
  929. display: flex;
  930. flex-direction: row;
  931. flex-wrap: wrap;
  932. align-items: center;
  933. }
  934. .touLeft > div > div {
  935. margin: 0 10px 10px 0;
  936. display: flex;
  937. flex-direction: row;
  938. align-items: center;
  939. }
  940. .touRight > div:nth-child(2) > .el-button {
  941. background: #2268bd;
  942. color: #fff;
  943. }
  944. .student_page {
  945. width: 95%;
  946. margin: 20px auto 0;
  947. }
  948. .anliBox {
  949. display: flex;
  950. flex-direction: row;
  951. flex-wrap: wrap;
  952. align-items: flex-start;
  953. margin: 25px auto 0;
  954. width: 95%;
  955. min-height: 570px;
  956. }
  957. .anLi {
  958. width: 280px;
  959. margin: 0 20px 10px 0;
  960. box-shadow: 3px 1px 15px 3px #f0f0f2;
  961. }
  962. .anliImg {
  963. width: 100%;
  964. height: 170px;
  965. }
  966. .anliImg > img {
  967. width: 100%;
  968. height: 100%;
  969. object-fit: cover;
  970. }
  971. .anliBot {
  972. background: #fff;
  973. border: 1px solid #f5f5f5;
  974. padding: 5px 0 10px 0;
  975. box-sizing: border-box;
  976. }
  977. .detailBox {
  978. padding: 0 0 0 10px;
  979. box-sizing: border-box;
  980. }
  981. .detailBox > div:nth-child(1) {
  982. font-size: 20px;
  983. width: 250px;
  984. white-space: nowrap;
  985. overflow: hidden;
  986. text-overflow: ellipsis;
  987. word-break: break-word;
  988. }
  989. .detailBox > div:nth-child(2) {
  990. color: #999;
  991. margin-top: 5px;
  992. font-size: 14px;
  993. }
  994. .anliButton {
  995. display: flex;
  996. flex-direction: row;
  997. flex-wrap: nowrap;
  998. align-items: center;
  999. justify-content: center;
  1000. padding: 10px 0 0 0;
  1001. }
  1002. .anliButton > div {
  1003. margin-right: 5px;
  1004. }
  1005. .anliButton > div > .el-button {
  1006. background: #409efe;
  1007. color: #fff;
  1008. }
  1009. .customWidth >>> .el-dialog {
  1010. min-width: 500px !important;
  1011. }
  1012. .customWidth >>> .el-dialog__headerbtn {
  1013. display: none !important;
  1014. }
  1015. .customWidth1 >>> .el-dialog {
  1016. min-width: 800px !important;
  1017. }
  1018. .people {
  1019. border: 1px solid rgb(229 229 229);
  1020. height: 495px;
  1021. border-radius: 5px;
  1022. width: 100%;
  1023. overflow: auto;
  1024. background: #fff;
  1025. box-shadow: 0px 0px 10px 8px #ededed;
  1026. }
  1027. .people::-webkit-scrollbar {
  1028. /*滚动条整体样式*/
  1029. width: 6px;
  1030. /*高宽分别对应横竖滚动条的尺寸*/
  1031. height: 6px;
  1032. }
  1033. /*定义滚动条轨道 内阴影+圆角*/
  1034. .people::-webkit-scrollbar-track {
  1035. border-radius: 10px;
  1036. background-color: #eee;
  1037. }
  1038. /*定义滑块 内阴影+圆角*/
  1039. .people::-webkit-scrollbar-thumb {
  1040. border-radius: 10px;
  1041. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1042. background-color: rgba(0, 0, 0, 0.1);
  1043. }
  1044. .people_top {
  1045. display: flex;
  1046. width: 100%;
  1047. flex-direction: column;
  1048. padding: 10px 25px 10px;
  1049. box-sizing: border-box;
  1050. border-bottom: 1px solid #f4f4f7;
  1051. }
  1052. .people_top_right {
  1053. height: 40px;
  1054. margin-bottom: 10px;
  1055. }
  1056. .people_search {
  1057. display: flex;
  1058. flex-direction: row;
  1059. flex-wrap: nowrap;
  1060. align-items: center;
  1061. }
  1062. .people_search > div:nth-child(1) {
  1063. font-size: 16px;
  1064. margin-right: 10px;
  1065. }
  1066. .t_j_box {
  1067. display: flex;
  1068. }
  1069. .t_j_box span:nth-child(1) {
  1070. width: 15%;
  1071. overflow: hidden;
  1072. margin-right: 10px;
  1073. text-overflow: ellipsis;
  1074. white-space: nowrap;
  1075. }
  1076. .t_j_box span:nth-child(2) {
  1077. width: 300px;
  1078. overflow: hidden;
  1079. text-overflow: ellipsis;
  1080. margin-right: 10px;
  1081. }
  1082. .t_j_box span:nth-child(3) {
  1083. width: calc(55% - 20px);
  1084. overflow: hidden;
  1085. text-overflow: ellipsis;
  1086. }
  1087. .people_name {
  1088. display: flex;
  1089. flex-direction: column;
  1090. flex-wrap: wrap;
  1091. align-items: flex-start;
  1092. padding: 15px 0 0 15px;
  1093. }
  1094. .people_name >>> .el-checkbox {
  1095. margin-bottom: 10px;
  1096. }
  1097. .all_choose > span {
  1098. margin-right: 10px;
  1099. }
  1100. .clear {
  1101. width: 70px;
  1102. height: 35px;
  1103. background: #2268bc;
  1104. color: #fff;
  1105. text-align: center;
  1106. border-radius: 5px;
  1107. line-height: 35px;
  1108. cursor: pointer;
  1109. }
  1110. .anliCss {
  1111. display: flex;
  1112. flex-direction: row;
  1113. flex-wrap: nowrap;
  1114. align-items: center;
  1115. }
  1116. .anliCss > div:nth-child(1) {
  1117. margin-right: 10px;
  1118. }
  1119. .scoreBox {
  1120. background: #fff;
  1121. }
  1122. .scoreCss {
  1123. padding: 10px;
  1124. }
  1125. .scoreTitle {
  1126. display: flex;
  1127. flex-direction: row;
  1128. flex-wrap: nowrap;
  1129. align-items: center;
  1130. }
  1131. .scoreTitle > div:nth-child(1) {
  1132. width: 50px;
  1133. }
  1134. .scoreTitle > div:nth-child(1) > img {
  1135. width: 100%;
  1136. height: 100%;
  1137. }
  1138. .scoreTitle > div:nth-child(2) {
  1139. margin-left: 15px;
  1140. }
  1141. .anliTitle,
  1142. .anliBrief,
  1143. .anliScore {
  1144. display: flex;
  1145. flex-direction: row;
  1146. flex-wrap: nowrap;
  1147. align-items: flex-start;
  1148. padding: 10px 0 10px 0;
  1149. font-size: 18px;
  1150. }
  1151. .anliTitle > div:nth-child(1),
  1152. .anliBrief > div:nth-child(1) {
  1153. min-width: 75px;
  1154. width: 75px;
  1155. }
  1156. .anliTitle > div:nth-child(2),
  1157. .anliBrief > div:nth-child(2) {
  1158. font-size: 17px;
  1159. margin-left: 35px;
  1160. color: #b0b0b0;
  1161. }
  1162. .anliScore > div:nth-child(2) {
  1163. margin: -13px 0 0 20px;
  1164. }
  1165. .scoreDiv {
  1166. display: flex;
  1167. flex-direction: row;
  1168. flex-wrap: nowrap;
  1169. align-items: center;
  1170. padding: 10px 0;
  1171. }
  1172. .scoreDiv > div:nth-child(1) {
  1173. min-width: 90px;
  1174. width: 90px;
  1175. }
  1176. .scoreDiv > div:nth-child(2) {
  1177. margin-left: 10px;
  1178. }
  1179. .scoreDiv > div:nth-child(2) >>> .el-input__inner {
  1180. border-radius: 15px;
  1181. background: #fafafa;
  1182. height: 30px;
  1183. font-size: 16px;
  1184. }
  1185. .anliContent {
  1186. width: 80%;
  1187. margin: 0 auto;
  1188. border-top: 2px solid #ededed;
  1189. padding: 10px 0 0 0;
  1190. }
  1191. .tAreaCss {
  1192. resize: none;
  1193. width: 100%;
  1194. text-indent: 10px;
  1195. border: 1px solid #e6e6e8;
  1196. background: #fafafa;
  1197. }
  1198. .tAreaCss:focus-visible {
  1199. outline: none !important;
  1200. }
  1201. .addScore {
  1202. width: 75%;
  1203. margin: 10px auto;
  1204. background: #409efe;
  1205. color: #fff;
  1206. height: 35px;
  1207. text-align: center;
  1208. line-height: 35px;
  1209. border-radius: 5px;
  1210. cursor: pointer;
  1211. }
  1212. .reTitle {
  1213. font-size: 18px;
  1214. }
  1215. .reTitle > div:nth-child(2) {
  1216. width: 99%;
  1217. border: 1px solid #dbdbdb;
  1218. font-size: 16px;
  1219. height: 35px;
  1220. line-height: 35px;
  1221. text-indent: 10px;
  1222. border-radius: 5px;
  1223. margin: 10px 0;
  1224. white-space: nowrap;
  1225. overflow: hidden;
  1226. text-overflow: ellipsis;
  1227. word-break: break-word;
  1228. }
  1229. .reDetail,
  1230. .reScore {
  1231. display: flex;
  1232. flex-direction: row;
  1233. flex-wrap: nowrap;
  1234. align-items: flex-start;
  1235. padding: 10px 0 10px 0;
  1236. font-size: 18px;
  1237. }
  1238. .reDetail > div:nth-child(2) {
  1239. font-size: 17px;
  1240. margin-left: 10px;
  1241. color: #b0b0b0;
  1242. width: 650px;
  1243. max-height: 150px;
  1244. overflow: auto;
  1245. }
  1246. .reScore > div:nth-child(2) {
  1247. font-size: 35px;
  1248. margin-left: 20px;
  1249. }
  1250. .reScore > div:nth-child(2) > span {
  1251. color: #6188d5;
  1252. }
  1253. .reBottom {
  1254. display: flex;
  1255. flex-direction: row;
  1256. flex-wrap: nowrap;
  1257. align-items: center;
  1258. justify-content: flex-end;
  1259. }
  1260. .reBottom > div:nth-child(2) {
  1261. border: 1px solid #d7d7d9;
  1262. width: 70px;
  1263. height: 35px;
  1264. text-align: center;
  1265. line-height: 35px;
  1266. border-radius: 5px;
  1267. margin: 0 10px 0 20px;
  1268. cursor: pointer;
  1269. }
  1270. .reBottom > div:nth-child(3) {
  1271. background: #409efe;
  1272. color: #fff;
  1273. height: 35px;
  1274. line-height: 35px;
  1275. width: 85px;
  1276. text-align: center;
  1277. border-radius: 5px;
  1278. cursor: pointer;
  1279. }
  1280. .isNoMessage {
  1281. width: 20%;
  1282. margin: 10% auto 0;
  1283. }
  1284. .isNoMessage > img {
  1285. width: 100%;
  1286. height: 100%;
  1287. }
  1288. .aName {
  1289. position: relative;
  1290. }
  1291. .aName >>> .el-input__inner {
  1292. width: 290px;
  1293. text-indent: 12px;
  1294. }
  1295. .searchImg {
  1296. width: 20px;
  1297. height: 20px;
  1298. position: absolute;
  1299. z-index: 9;
  1300. top: 10px;
  1301. left: 5px;
  1302. }
  1303. .searchImg > img {
  1304. width: 100%;
  1305. height: 100%;
  1306. }
  1307. .noAnli {
  1308. width: 400px;
  1309. height: auto;
  1310. margin: 100px auto;
  1311. }
  1312. .noAnli > img {
  1313. width: 100%;
  1314. height: 100%;
  1315. }
  1316. </style>