anliList.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374
  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. border-top: 1px solid #ccc;
  1023. }
  1024. .anliButton > div {
  1025. margin-right: 5px;
  1026. text-align: center;
  1027. cursor: pointer;
  1028. }
  1029. .anliButton > div:not(:last-child) {
  1030. border-right: 1px solid #ccc;
  1031. }
  1032. .customWidth >>> .el-dialog {
  1033. min-width: 500px !important;
  1034. }
  1035. .customWidth1 >>> .el-dialog {
  1036. min-width: 800px !important;
  1037. }
  1038. .people {
  1039. border: 1px solid rgb(229 229 229);
  1040. height: 495px;
  1041. border-radius: 5px;
  1042. width: 100%;
  1043. overflow: auto;
  1044. background: #fff;
  1045. box-shadow: 0px 0px 10px 8px #ededed;
  1046. }
  1047. .people::-webkit-scrollbar {
  1048. /*滚动条整体样式*/
  1049. width: 6px;
  1050. /*高宽分别对应横竖滚动条的尺寸*/
  1051. height: 6px;
  1052. }
  1053. /*定义滚动条轨道 内阴影+圆角*/
  1054. .people::-webkit-scrollbar-track {
  1055. border-radius: 10px;
  1056. background-color: #eee;
  1057. }
  1058. /*定义滑块 内阴影+圆角*/
  1059. .people::-webkit-scrollbar-thumb {
  1060. border-radius: 10px;
  1061. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1062. background-color: rgba(0, 0, 0, 0.1);
  1063. }
  1064. .people_top {
  1065. display: flex;
  1066. width: 100%;
  1067. flex-direction: column;
  1068. padding: 10px 25px 10px;
  1069. box-sizing: border-box;
  1070. border-bottom: 1px solid #f4f4f7;
  1071. }
  1072. .people_top_right {
  1073. height: 40px;
  1074. margin-bottom: 10px;
  1075. }
  1076. .people_search {
  1077. display: flex;
  1078. flex-direction: row;
  1079. flex-wrap: nowrap;
  1080. align-items: center;
  1081. }
  1082. .people_search > div:nth-child(1) {
  1083. font-size: 16px;
  1084. margin-right: 10px;
  1085. }
  1086. .t_j_box {
  1087. display: flex;
  1088. }
  1089. .t_j_box span:nth-child(1) {
  1090. width: 15%;
  1091. overflow: hidden;
  1092. margin-right: 10px;
  1093. text-overflow: ellipsis;
  1094. white-space: nowrap;
  1095. }
  1096. .t_j_box span:nth-child(2) {
  1097. width: 300px;
  1098. overflow: hidden;
  1099. text-overflow: ellipsis;
  1100. margin-right: 10px;
  1101. }
  1102. .t_j_box span:nth-child(3) {
  1103. width: calc(55% - 20px);
  1104. overflow: hidden;
  1105. text-overflow: ellipsis;
  1106. }
  1107. .people_name {
  1108. display: flex;
  1109. flex-direction: column;
  1110. flex-wrap: wrap;
  1111. align-items: flex-start;
  1112. padding: 15px 0 0 15px;
  1113. }
  1114. .people_name >>> .el-checkbox {
  1115. margin-bottom: 10px;
  1116. }
  1117. .all_choose > span {
  1118. margin-right: 10px;
  1119. }
  1120. .clear {
  1121. width: 70px;
  1122. height: 35px;
  1123. background: #2268bc;
  1124. color: #fff;
  1125. text-align: center;
  1126. border-radius: 5px;
  1127. line-height: 35px;
  1128. cursor: pointer;
  1129. }
  1130. .anliCss {
  1131. display: flex;
  1132. flex-direction: row;
  1133. flex-wrap: nowrap;
  1134. align-items: center;
  1135. }
  1136. .anliCss > div:nth-child(1) {
  1137. margin-right: 10px;
  1138. }
  1139. .scoreBox {
  1140. background: #fff;
  1141. }
  1142. .scoreCss {
  1143. padding: 10px;
  1144. }
  1145. .scoreTitle {
  1146. display: flex;
  1147. flex-direction: row;
  1148. flex-wrap: nowrap;
  1149. align-items: center;
  1150. }
  1151. .scoreTitle > div:nth-child(1) {
  1152. width: 50px;
  1153. }
  1154. .scoreTitle > div:nth-child(1) > img {
  1155. width: 100%;
  1156. height: 100%;
  1157. }
  1158. .scoreTitle > div:nth-child(2) {
  1159. margin-left: 15px;
  1160. }
  1161. .anliTitle,
  1162. .anliBrief,
  1163. .anliScore {
  1164. display: flex;
  1165. flex-direction: row;
  1166. flex-wrap: nowrap;
  1167. align-items: flex-start;
  1168. padding: 10px 0 10px 0;
  1169. font-size: 18px;
  1170. }
  1171. .anliTitle > div:nth-child(1),
  1172. .anliBrief > div:nth-child(1) {
  1173. min-width: 75px;
  1174. width: 75px;
  1175. }
  1176. .anliTitle > div:nth-child(2),
  1177. .anliBrief > div:nth-child(2) {
  1178. font-size: 17px;
  1179. margin-left: 35px;
  1180. color: #b0b0b0;
  1181. }
  1182. .anliScore > div:nth-child(2) {
  1183. margin: -13px 0 0 20px;
  1184. }
  1185. .scoreDiv {
  1186. display: flex;
  1187. flex-direction: row;
  1188. flex-wrap: nowrap;
  1189. align-items: center;
  1190. padding: 10px 0;
  1191. }
  1192. .scoreDiv > div:nth-child(1) {
  1193. min-width: 90px;
  1194. width: 90px;
  1195. }
  1196. .scoreDiv > div:nth-child(2) {
  1197. margin-left: 10px;
  1198. }
  1199. .scoreDiv > div:nth-child(2) >>> .el-input__inner {
  1200. border-radius: 15px;
  1201. background: #fafafa;
  1202. height: 30px;
  1203. font-size: 16px;
  1204. }
  1205. .anliContent {
  1206. width: 80%;
  1207. margin: 0 auto;
  1208. border-top: 2px solid #ededed;
  1209. padding: 10px 0 0 0;
  1210. }
  1211. .tAreaCss {
  1212. resize: none;
  1213. width: 100%;
  1214. text-indent: 10px;
  1215. border: 1px solid #e6e6e8;
  1216. background: #fafafa;
  1217. }
  1218. .tAreaCss:focus-visible {
  1219. outline: none !important;
  1220. }
  1221. .addScore {
  1222. width: 75%;
  1223. margin: 10px auto;
  1224. background: #409efe;
  1225. color: #fff;
  1226. height: 35px;
  1227. text-align: center;
  1228. line-height: 35px;
  1229. border-radius: 5px;
  1230. cursor: pointer;
  1231. }
  1232. .reTitle {
  1233. font-size: 18px;
  1234. }
  1235. .reTitle > div:nth-child(2) {
  1236. width: 99%;
  1237. border: 1px solid #dbdbdb;
  1238. font-size: 16px;
  1239. height: 35px;
  1240. line-height: 35px;
  1241. text-indent: 10px;
  1242. border-radius: 5px;
  1243. margin: 10px 0;
  1244. white-space: nowrap;
  1245. overflow: hidden;
  1246. text-overflow: ellipsis;
  1247. word-break: break-word;
  1248. }
  1249. .reDetail,
  1250. .reScore {
  1251. display: flex;
  1252. flex-direction: row;
  1253. flex-wrap: nowrap;
  1254. align-items: flex-start;
  1255. padding: 10px 0 10px 0;
  1256. font-size: 18px;
  1257. }
  1258. .reDetail > div:nth-child(2) {
  1259. font-size: 17px;
  1260. margin-left: 10px;
  1261. color: #b0b0b0;
  1262. width: 650px;
  1263. max-height: 150px;
  1264. overflow: auto;
  1265. }
  1266. .reScore > div:nth-child(2) {
  1267. font-size: 35px;
  1268. margin-left: 20px;
  1269. }
  1270. .reScore > div:nth-child(2) > span {
  1271. color: #6188d5;
  1272. }
  1273. .reBottom {
  1274. display: flex;
  1275. flex-direction: row;
  1276. flex-wrap: nowrap;
  1277. align-items: center;
  1278. justify-content: flex-end;
  1279. }
  1280. .reBottom > div:nth-child(2) {
  1281. border: 1px solid #d7d7d9;
  1282. width: 70px;
  1283. height: 35px;
  1284. text-align: center;
  1285. line-height: 35px;
  1286. border-radius: 5px;
  1287. margin: 0 10px 0 20px;
  1288. cursor: pointer;
  1289. }
  1290. .reBottom > div:nth-child(3) {
  1291. background: #409efe;
  1292. color: #fff;
  1293. height: 35px;
  1294. line-height: 35px;
  1295. width: 85px;
  1296. text-align: center;
  1297. border-radius: 5px;
  1298. cursor: pointer;
  1299. }
  1300. .isNoMessage {
  1301. width: 20%;
  1302. margin: 10% auto 0;
  1303. }
  1304. .isNoMessage > img {
  1305. width: 100%;
  1306. height: 100%;
  1307. }
  1308. .aName {
  1309. position: relative;
  1310. }
  1311. .aName >>> .el-input__inner {
  1312. width: 290px;
  1313. text-indent: 12px;
  1314. }
  1315. .searchImg {
  1316. width: 20px;
  1317. height: 20px;
  1318. position: absolute;
  1319. z-index: 9;
  1320. top: 10px;
  1321. left: 5px;
  1322. }
  1323. .searchImg > img {
  1324. width: 100%;
  1325. height: 100%;
  1326. }
  1327. </style>