anliList.vue 38 KB

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