anliList.vue 36 KB

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