ProjectStatistic.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. <template>
  2. <section class="content" style="margin-top: -18px;">
  3. <div class="box box-info">
  4. <!-- 头信息 -->
  5. <div
  6. class="box-header with-border"
  7. style="background-color:#d3dce6;margin-bottom:20px;"
  8. >
  9. <h3 class="box-title">项目统计</h3>
  10. <div class="box-tools pull-right">
  11. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  12. <i class="fa fa-minus"></i>
  13. </button>
  14. </div>
  15. </div>
  16. <!-- 正文信息 -->
  17. <div class="box-body">
  18. <el-form
  19. :model="formSearch"
  20. :inline="true"
  21. label-position="right"
  22. label-width="100px"
  23. >
  24. <el-form-item label="学校">
  25. <el-select
  26. :disabled="showGoBack"
  27. v-model="formSearch.orgId"
  28. placeholder="请选择"
  29. filterable
  30. clearable
  31. @change="searchExamList(formSearch.orgId);"
  32. >
  33. <el-option
  34. v-for="item in orgList"
  35. :label="item.orgName"
  36. :value="item.orgId"
  37. :key="item.orgId"
  38. ></el-option>
  39. </el-select>
  40. </el-form-item>
  41. <el-form-item label="考试">
  42. <el-select
  43. :disabled="showGoBack"
  44. v-model="formSearch.examId"
  45. @change="searchRecords"
  46. placeholder="请选择"
  47. >
  48. <el-option
  49. v-for="item in examList"
  50. :label="item.examName"
  51. :value="item.examId"
  52. :key="item.examId"
  53. ></el-option>
  54. </el-select>
  55. </el-form-item>
  56. <el-form-item>
  57. <el-button
  58. size="small"
  59. type="primary"
  60. icon="el-icon-search"
  61. @click="searchRecords"
  62. >查询
  63. </el-button>
  64. <el-button
  65. size="small"
  66. type="primary"
  67. icon="el-icon-plus"
  68. :disabled="!hasPermit"
  69. v-show="formSearch.examId != ''"
  70. @click="openOtherSettingDialog"
  71. >新增其它事项
  72. </el-button>
  73. <el-button
  74. size="small"
  75. type="primary"
  76. icon="el-icon-refresh"
  77. :disabled="!hasPermit"
  78. v-show="formSearch.examId != ''"
  79. @click="refreshStatistic"
  80. >刷新
  81. </el-button>
  82. <el-button
  83. size="small"
  84. type="primary"
  85. icon="el-icon-arrow-left"
  86. v-show="showGoBack"
  87. @click="goBack"
  88. >返回
  89. </el-button>
  90. </el-form-item>
  91. </el-form>
  92. <!-- 数据列表 -->
  93. <el-table
  94. v-loading="loading"
  95. :data="tableData"
  96. element-loading-text="数据加载中"
  97. style="width:100%;"
  98. border
  99. >
  100. <el-table-column width="60" label="类型" prop="type" />
  101. <el-table-column width="80" label="人科次" prop="totalStudent" />
  102. <el-table-column width="100" label="课程数量" prop="totalCourse" />
  103. <el-table-column width="100" label="试卷数量" prop="totalPaper" />
  104. <el-table-column width="100" label="印刷数量A3" prop="A3" />
  105. <el-table-column width="100" label="印刷数量A4" prop="A4" />
  106. <el-table-column width="100" label="总数(A3)" prop="sumA3" />
  107. <el-table-column width="80" label="试卷袋数" prop="totalPkg" />
  108. <el-table-column label="事项说明" prop="remark" />
  109. <el-table-column width="120" label="印刷供应商" prop="supplierName" />
  110. <el-table-column width="120" label="项目经理" prop="pmName" />
  111. <el-table-column width="180" label="操作" :context="_self">
  112. <template slot-scope="scope">
  113. <el-button
  114. size="mini"
  115. icon="el-icon-menu"
  116. v-if="scope.row.btnType == 'BACKUP'"
  117. @click="openBackupSettingDialog"
  118. :disabled="!hasPermit"
  119. >备份设置
  120. </el-button>
  121. <el-button
  122. size="mini"
  123. icon="el-icon-edit"
  124. v-if="scope.row.btnType == 'OTHER'"
  125. @click="openOtherSettingDialog(scope.row);"
  126. :disabled="!hasPermit"
  127. >修改
  128. </el-button>
  129. <el-button
  130. size="mini"
  131. type="danger"
  132. icon="el-icon-delete"
  133. v-if="scope.row.btnType == 'OTHER'"
  134. @click="removeOtherSetting(scope.row);"
  135. :disabled="!hasPermit"
  136. >删除
  137. </el-button>
  138. </template>
  139. </el-table-column>
  140. </el-table>
  141. </div>
  142. <!-- 备份设置弹窗 -->
  143. <el-dialog
  144. title="备份设置"
  145. width="500px"
  146. :visible.sync="backupSettingDialog"
  147. @close="closeBackupSettingDialog"
  148. >
  149. <el-form
  150. :model="backupSettingForm"
  151. ref="backupSettingForm"
  152. :rules="rules"
  153. label-position="right"
  154. label-width="80px"
  155. >
  156. <el-tabs v-model="eachPkgTab">
  157. <el-tab-pane name="first">
  158. <span slot="label"
  159. >每袋冗余设置
  160. <el-switch v-model="backupSettingForm.needEachPkg"></el-switch
  161. ></span>
  162. <el-form-item label="比例" prop="eachPkgPercent">
  163. <el-input
  164. v-model="backupSettingForm.eachPkgPercent"
  165. :disabled="!backupSettingForm.needEachPkg"
  166. ><template slot="append"
  167. >%</template
  168. ></el-input
  169. >
  170. </el-form-item>
  171. <el-form-item label="最大" prop="eachPkgMax">
  172. <el-input
  173. v-model="backupSettingForm.eachPkgMax"
  174. :disabled="!backupSettingForm.needEachPkg"
  175. ><template slot="append"
  176. >%</template
  177. ></el-input
  178. >
  179. </el-form-item>
  180. <el-form-item label="最小" prop="eachPkgMin">
  181. <el-input
  182. v-model="backupSettingForm.eachPkgMin"
  183. :disabled="!backupSettingForm.needEachPkg"
  184. ><template slot="append"
  185. >%</template
  186. ></el-input
  187. >
  188. </el-form-item>
  189. </el-tab-pane>
  190. </el-tabs>
  191. <el-tabs v-model="alonePkgTab">
  192. <el-tab-pane name="first">
  193. <span slot="label"
  194. >单独备份袋设置
  195. <el-switch v-model="backupSettingForm.needAlonePkg"></el-switch
  196. ></span>
  197. <el-form-item label="归集参数" prop="groupType">
  198. <el-select
  199. v-model="backupSettingForm.groupType"
  200. :disabled="!backupSettingForm.needAlonePkg"
  201. placeholder="请选择"
  202. >
  203. <el-option
  204. v-for="item in groupTypeList"
  205. :label="item.label"
  206. :value="item.value"
  207. :key="item.value"
  208. ></el-option>
  209. </el-select>
  210. </el-form-item>
  211. <el-form-item label="比例" prop="alonePkgPercent">
  212. <el-input
  213. v-model="backupSettingForm.alonePkgPercent"
  214. :disabled="!backupSettingForm.needAlonePkg"
  215. ><template slot="append"
  216. >%</template
  217. >
  218. </el-input>
  219. </el-form-item>
  220. <el-form-item label="最大" prop="alonePkgMax">
  221. <el-input
  222. v-model="backupSettingForm.alonePkgMax"
  223. :disabled="!backupSettingForm.needAlonePkg"
  224. ><template slot="append"
  225. >%</template
  226. ></el-input
  227. >
  228. </el-form-item>
  229. <el-form-item label="最小" prop="alonePkgMin">
  230. <el-input
  231. v-model="backupSettingForm.alonePkgMin"
  232. :disabled="!backupSettingForm.needAlonePkg"
  233. ><template slot="append"
  234. >%</template
  235. ></el-input
  236. >
  237. </el-form-item>
  238. </el-tab-pane>
  239. </el-tabs>
  240. </el-form>
  241. <div style="text-align: center;">
  242. <el-button type="primary" @click="editBackupSetting"
  243. >确 定
  244. </el-button>
  245. <el-button @click="closeBackupSettingDialog">取 消</el-button>
  246. </div>
  247. </el-dialog>
  248. <!-- 其它事项弹窗 -->
  249. <el-dialog
  250. title="其它事项"
  251. width="750px"
  252. :visible.sync="otherSettingDialog"
  253. @close="closeOtherSettingDialog"
  254. >
  255. <el-form
  256. :model="otherSettingForm"
  257. ref="otherSettingForm"
  258. :rules="rules"
  259. label-position="right"
  260. label-width="110px"
  261. >
  262. <el-form-item label="事项内容" prop="remark">
  263. <el-input
  264. type="textarea"
  265. :rows="8"
  266. v-model="otherSettingForm.remark"
  267. ></el-input>
  268. </el-form-item>
  269. </el-form>
  270. <div style="text-align: center">
  271. <el-button type="primary" @click="editOtherSetting">确 定 </el-button>
  272. <el-button @click="closeOtherSettingDialog">取 消</el-button>
  273. </div>
  274. </el-dialog>
  275. </div>
  276. </section>
  277. </template>
  278. <script>
  279. import { PRINT_API } from "@/constants/constants";
  280. import { userRole, groupTypeList } from "../constants/constants.js";
  281. import { mapState } from "vuex";
  282. export default {
  283. data() {
  284. let validateEachPkgPercent = (rule, value, callback) => {
  285. if (this.backupSettingForm.needEachPkg) {
  286. if (this.isEmptyNumber(this.backupSettingForm.eachPkgPercent)) {
  287. callback(new Error("请输入正确的数值!"));
  288. return;
  289. }
  290. }
  291. callback();
  292. };
  293. let validateEachPkgMax = (rule, value, callback) => {
  294. if (this.backupSettingForm.needEachPkg) {
  295. if (this.isEmptyNumber(this.backupSettingForm.eachPkgMax)) {
  296. callback(new Error("请输入正确的数值!"));
  297. return;
  298. }
  299. }
  300. callback();
  301. };
  302. let validateEachPkgMin = (rule, value, callback) => {
  303. if (this.backupSettingForm.needEachPkg) {
  304. if (this.isEmptyNumber(this.backupSettingForm.eachPkgMin)) {
  305. callback(new Error("请输入正确的数值!"));
  306. return;
  307. }
  308. }
  309. callback();
  310. };
  311. let validateAlonePkgPercent = (rule, value, callback) => {
  312. if (this.backupSettingForm.needAlonePkg) {
  313. if (this.isEmptyNumber(this.backupSettingForm.alonePkgPercent)) {
  314. callback(new Error("请输入正确的数值!"));
  315. return;
  316. }
  317. }
  318. callback();
  319. };
  320. let validateAlonePkgMax = (rule, value, callback) => {
  321. if (this.backupSettingForm.needAlonePkg) {
  322. if (this.isEmptyNumber(this.backupSettingForm.alonePkgMax)) {
  323. callback(new Error("请输入正确的数值!"));
  324. return;
  325. }
  326. }
  327. callback();
  328. };
  329. let validateAlonePkgMin = (rule, value, callback) => {
  330. if (this.backupSettingForm.needAlonePkg) {
  331. if (this.isEmptyNumber(this.backupSettingForm.alonePkgMin)) {
  332. callback(new Error("请输入正确的数值!"));
  333. return;
  334. }
  335. }
  336. callback();
  337. };
  338. let validateGroupType = (rule, value, callback) => {
  339. if (this.backupSettingForm.needAlonePkg) {
  340. if (this.isEmptyStr(this.backupSettingForm.groupType)) {
  341. callback(new Error("请选择归集参数!"));
  342. return;
  343. }
  344. }
  345. callback();
  346. };
  347. return {
  348. formSearch: {
  349. orgId: "",
  350. examId: ""
  351. },
  352. curUserRole: userRole,
  353. groupTypeList: groupTypeList,
  354. hasPermit: false,
  355. loading: false,
  356. showGoBack: false,
  357. tableData: [],
  358. projectId: "",
  359. eachPkgTab: "first",
  360. alonePkgTab: "first",
  361. orgList: [],
  362. examList: [],
  363. backupSettingDialog: false,
  364. backupSettingForm: {
  365. projectId: "",
  366. needAlonePkg: true,
  367. needEachPkg: true,
  368. eachPkgPercent: "",
  369. eachPkgMax: "",
  370. eachPkgMin: "",
  371. alonePkgPercent: "",
  372. alonePkgMax: "",
  373. alonePkgMin: "",
  374. groupType: ""
  375. },
  376. otherSettingDialog: false,
  377. otherSettingForm: {
  378. id: "",
  379. projectId: "",
  380. remark: ""
  381. },
  382. rules: {
  383. eachPkgPercent: [
  384. {
  385. type: "number",
  386. required: true,
  387. validator: validateEachPkgPercent,
  388. trigger: "change"
  389. }
  390. ],
  391. eachPkgMax: [
  392. {
  393. type: "number",
  394. required: true,
  395. validator: validateEachPkgMax,
  396. trigger: "change"
  397. }
  398. ],
  399. eachPkgMin: [
  400. {
  401. type: "number",
  402. required: true,
  403. validator: validateEachPkgMin,
  404. trigger: "change"
  405. }
  406. ],
  407. alonePkgPercent: [
  408. {
  409. type: "number",
  410. required: true,
  411. validator: validateAlonePkgPercent,
  412. trigger: "change"
  413. }
  414. ],
  415. alonePkgMax: [
  416. {
  417. type: "number",
  418. required: true,
  419. validator: validateAlonePkgMax,
  420. trigger: "change"
  421. }
  422. ],
  423. alonePkgMin: [
  424. {
  425. type: "number",
  426. required: true,
  427. validator: validateAlonePkgMin,
  428. trigger: "change"
  429. }
  430. ],
  431. groupType: [
  432. { required: true, validator: validateGroupType, trigger: "change" }
  433. ],
  434. remark: [
  435. { required: true, message: "请输入事项内容!", trigger: "change" }
  436. ]
  437. }
  438. };
  439. },
  440. methods: {
  441. searchRecords() {
  442. /* 查询记录列表 */
  443. let orgId = this.formSearch.orgId;
  444. if (this.isEmptyNumber(orgId)) {
  445. this.$notify({
  446. message: "请选择学校!",
  447. type: "warning"
  448. });
  449. return;
  450. }
  451. let examId = this.formSearch.examId;
  452. if (this.isEmptyNumber(examId)) {
  453. this.$notify({
  454. message: "请选择考试!",
  455. type: "warning"
  456. });
  457. return;
  458. }
  459. this.loading = true;
  460. let url =
  461. PRINT_API + "/printing/project/statistic/" + orgId + "/" + examId;
  462. this.$http.post(url, this.formSearch).then(
  463. response => {
  464. this.tableData = [];
  465. this.projectId = response.data.projectId;
  466. this.renderTableColumns(response.data);
  467. this.loadOtherSetting(this.projectId);
  468. this.loading = false;
  469. },
  470. error => {
  471. console.log(error);
  472. this.loading = false;
  473. }
  474. );
  475. },
  476. renderTableColumns(data) {
  477. let normalColumn = {
  478. type: "常规",
  479. A3: data.normalA3,
  480. A4: data.normalA4,
  481. sumA3: data.summary,
  482. totalStudent: data.totalStudent,
  483. totalCourse: data.totalCourse,
  484. totalPaper: data.totalPaper,
  485. totalPkg: data.totalPkg,
  486. supplierName: data.supplierName,
  487. pmName: data.pmName
  488. };
  489. this.tableData.push(normalColumn);
  490. let backupColumn = {
  491. type: "备份",
  492. A3: data.backupA3,
  493. A4: data.backupA4,
  494. sumA3: data.backupSummary,
  495. btnType: "BACKUP"
  496. };
  497. this.tableData.push(backupColumn);
  498. let totalColumn = {
  499. type: "合计",
  500. A3: data.totalA3,
  501. A4: data.totalA4,
  502. sumA3: data.totalSummary
  503. };
  504. this.tableData.push(totalColumn);
  505. },
  506. searchExamList(orgId) {
  507. /* 查询考试列表 */
  508. this.formSearch.examId = "";
  509. this.examList = [];
  510. this.tableData = [];
  511. this.projectId = "";
  512. //console.log("orgId:" + orgId);
  513. if (!this.isEmptyNumber(orgId)) {
  514. let url = PRINT_API + "/printing/project/exam/list?orgId=" + orgId;
  515. this.$http.post(url).then(response => {
  516. this.examList = response.data;
  517. });
  518. }
  519. },
  520. refreshStatistic() {
  521. /* 刷新当前统计信息 */
  522. let orgId = this.formSearch.orgId;
  523. if (this.isEmptyNumber(orgId)) {
  524. this.$notify({
  525. message: "请选择学校!",
  526. type: "warning"
  527. });
  528. return;
  529. }
  530. let examId = this.formSearch.examId;
  531. if (this.isEmptyNumber(examId)) {
  532. this.$notify({
  533. message: "请选择考试!",
  534. type: "warning"
  535. });
  536. return;
  537. }
  538. this.$confirm("刷新当前统计信息?", "提示", {
  539. confirmButtonText: "确定",
  540. cancelButtonText: "取消",
  541. type: "warning"
  542. })
  543. .then(() => {
  544. let url =
  545. PRINT_API +
  546. "/printing/project/statistic/refresh/" +
  547. orgId +
  548. "/" +
  549. examId;
  550. this.$http.post(url).then(
  551. () => {
  552. this.$notify({
  553. type: "success",
  554. message: "刷新成功!"
  555. });
  556. this.searchRecords();
  557. },
  558. () => {
  559. this.$notify({
  560. type: "error",
  561. message: "刷新失败!"
  562. });
  563. }
  564. );
  565. })
  566. .catch(() => {
  567. //ignore
  568. });
  569. },
  570. editBackupSetting() {
  571. /* 保存备份设置 */
  572. this.$refs.backupSettingForm.validate(valid => {
  573. if (!valid) {
  574. return false;
  575. }
  576. if (
  577. !this.backupSettingForm.needEachPkg &&
  578. !this.backupSettingForm.needAlonePkg
  579. ) {
  580. this.$notify({
  581. message: "请至少设置一种备份方式!",
  582. type: "warning"
  583. });
  584. return;
  585. }
  586. let url = PRINT_API + "/project/backup/setting/save";
  587. this.$http.post(url, this.backupSettingForm).then(
  588. () => {
  589. this.$notify({
  590. type: "success",
  591. message: "保存备份设置成功!"
  592. });
  593. this.backupSettingDialog = false;
  594. },
  595. error => {
  596. console.log(error);
  597. this.$notify({
  598. message: "保存备份设置失败!",
  599. type: "error"
  600. });
  601. }
  602. );
  603. });
  604. },
  605. openBackupSettingDialog() {
  606. /* 打开备份设置弹窗 */
  607. let url = PRINT_API + "/project/backup/setting/" + this.projectId;
  608. this.$http.post(url).then(
  609. response => {
  610. this.backupSettingForm = response.data;
  611. },
  612. () => {
  613. this.backupSettingForm = {
  614. projectId: this.projectId,
  615. needAlonePkg: true,
  616. needEachPkg: true,
  617. eachPkgPercent: "",
  618. eachPkgMax: "",
  619. eachPkgMin: "",
  620. alonePkgPercent: "",
  621. alonePkgMax: "",
  622. alonePkgMin: "",
  623. groupType: ""
  624. };
  625. }
  626. );
  627. this.backupSettingDialog = true;
  628. },
  629. closeBackupSettingDialog() {
  630. /* 关闭备份设置弹窗 */
  631. this.backupSettingDialog = false;
  632. },
  633. loadOtherSetting(projectId) {
  634. /* 查询其它事项列表 */
  635. let url =
  636. PRINT_API + "/project/other/setting/list?projectId=" + projectId;
  637. this.$http.post(url).then(
  638. response => {
  639. let list = response.data;
  640. if (!list || list.length < 1) {
  641. return;
  642. }
  643. for (let obj of list) {
  644. obj.type = "其它";
  645. obj.btnType = "OTHER";
  646. this.tableData.push(obj);
  647. }
  648. },
  649. error => {
  650. console.log(error);
  651. }
  652. );
  653. },
  654. editOtherSetting() {
  655. /* 保存其它事项 */
  656. this.$refs.otherSettingForm.validate(valid => {
  657. if (!valid) {
  658. return false;
  659. }
  660. let url = PRINT_API + "/project/other/setting/save";
  661. this.$http.post(url, this.otherSettingForm).then(
  662. () => {
  663. this.$notify({
  664. type: "success",
  665. message: "保存其它事项成功!"
  666. });
  667. this.otherSettingDialog = false;
  668. this.searchRecords();
  669. },
  670. error => {
  671. console.log(error);
  672. this.$notify({
  673. message: "保存其它事项失败!",
  674. type: "error"
  675. });
  676. }
  677. );
  678. });
  679. },
  680. removeOtherSetting(row) {
  681. /* 删除某个其它事项 */
  682. this.$confirm("确定删除当前事项吗?", "提示", {
  683. confirmButtonText: "确定",
  684. cancelButtonText: "取消",
  685. type: "warning"
  686. })
  687. .then(() => {
  688. var url = PRINT_API + "/project/other/setting/delete/" + row.id;
  689. this.$http.post(url).then(
  690. () => {
  691. this.$notify({
  692. type: "success",
  693. message: "删除当前事项成功!"
  694. });
  695. this.searchRecords();
  696. },
  697. () => {
  698. this.$notify({
  699. type: "error",
  700. message: "删除当前事项失败!"
  701. });
  702. }
  703. );
  704. })
  705. .catch(() => {
  706. /*ignore*/
  707. });
  708. },
  709. openOtherSettingDialog(row) {
  710. /* 打开其它事项弹窗 */
  711. if (this.isEmptyNumber(this.projectId)) {
  712. this.$notify({
  713. message: "请选择学校和考试!",
  714. type: "warning"
  715. });
  716. return;
  717. }
  718. this.otherSettingDialog = true;
  719. this.otherSettingForm.projectId = this.projectId;
  720. if (row.id) {
  721. this.otherSettingForm.id = row.id;
  722. } else {
  723. this.otherSettingForm.id = "";
  724. }
  725. if (row.remark) {
  726. this.otherSettingForm.remark = row.remark;
  727. } else {
  728. this.otherSettingForm.remark = "";
  729. }
  730. },
  731. closeOtherSettingDialog() {
  732. /* 关闭其它事项弹窗 */
  733. this.otherSettingDialog = false;
  734. },
  735. goBack() {
  736. /* 返回上级界面 */
  737. this.$router.push({ path: "/print/project/list" });
  738. }
  739. },
  740. computed: {
  741. ...mapState({ user: state => state.user })
  742. },
  743. created() {
  744. this.loadOrgList();
  745. this.loadUserRole(this.user);
  746. if (this.curUserRole.isSuperLeader || this.curUserRole.isPM) {
  747. this.hasPermit = true;
  748. } else {
  749. this.hasPermit = false;
  750. }
  751. /* 加载默认数据 */
  752. let orgId = this.$route.params.orgId;
  753. let examId = this.$route.params.examId;
  754. if (orgId != "0" || examId != "0") {
  755. this.searchExamList(orgId);
  756. this.showGoBack = true;
  757. this.formSearch.orgId = parseInt(orgId);
  758. this.formSearch.examId = parseInt(examId);
  759. this.searchRecords();
  760. }
  761. }
  762. };
  763. </script>
  764. <style scoped>
  765. .page {
  766. margin-top: 10px;
  767. }
  768. .pull-right {
  769. float: right;
  770. }
  771. .pull-left {
  772. float: left;
  773. }
  774. </style>