channelManagement.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  1. <template>
  2. <div class="record-warp">
  3. <div class="record-main">
  4. <el-row>
  5. <el-col :span="24">
  6. <div class="search-head">
  7. <el-input v-model="planName" clearable placeholder="请输入计划名称"></el-input
  8. >&nbsp;&nbsp;&nbsp;&nbsp;
  9. <el-date-picker
  10. :clearable="false"
  11. v-model="planTime"
  12. type="date"
  13. format="yyyy-MM-dd"
  14. placeholder="选择创建日期"
  15. >
  16. </el-date-picker>
  17. <el-cascader
  18. v-show="userInfo.roleType == '5'"
  19. placeholder="请选择组织架构"
  20. v-model="group"
  21. :options="groupData"
  22. :props="{ checkStrictly: true }"
  23. clearable
  24. ></el-cascader>
  25. <!-- :props="{ checkStrictly: true }" -->
  26. <el-cascader
  27. v-show="userInfo.roleType == '4'"
  28. placeholder="请选择组织架构"
  29. v-model="group"
  30. :options="groupData"
  31. clearable
  32. ></el-cascader>
  33. &nbsp;&nbsp;&nbsp;&nbsp;
  34. <el-select v-model="planStatus" placeholder="请选择计划状态">
  35. <el-option
  36. :label="item.name"
  37. :value="item.id"
  38. v-for="item in channelList"
  39. :key="item.id"
  40. ></el-option>
  41. </el-select>
  42. &nbsp;&nbsp;&nbsp;&nbsp;
  43. <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
  44. >搜索</el-button
  45. >
  46. <el-button type="info" round @click="clearSearch">清空</el-button>
  47. </div>
  48. </el-col>
  49. </el-row>
  50. <div class="table-content">
  51. <el-table
  52. height="100%"
  53. :data="tableData"
  54. :row-style="{ height: '0px' }"
  55. :cell-style="{ padding: '5px' }"
  56. :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
  57. >
  58. <!-- <el-table-column prop="name" label="姓名" align="center" width="" show-overflow-tooltip>
  59. </el-table-column> -->
  60. <el-table-column
  61. :show-overflow-tooltip="true"
  62. prop="planName"
  63. label="计划名称"
  64. align="center"
  65. min-width="200px"
  66. >
  67. </el-table-column>
  68. <el-table-column
  69. prop="createTime"
  70. label="创建时间"
  71. :show-overflow-tooltip="true"
  72. align="center"
  73. width=""
  74. >
  75. </el-table-column>
  76. <el-table-column
  77. prop="planEndTime"
  78. label="结束时间"
  79. :show-overflow-tooltip="true"
  80. align="center"
  81. width=""
  82. >
  83. </el-table-column>
  84. <el-table-column
  85. :show-overflow-tooltip="true"
  86. prop="planOrgName"
  87. label="所属组织架构"
  88. align="center"
  89. width=""
  90. >
  91. </el-table-column>
  92. <!-- <el-table-column prop="userNo" label="测试人数" align="center" width="">
  93. </el-table-column> -->
  94. <el-table-column prop="createUserName" label="创建人" align="center" width="">
  95. </el-table-column>
  96. <el-table-column
  97. prop="planStatus"
  98. label="状态"
  99. :formatter="forMaPlan"
  100. align="center"
  101. width=""
  102. >
  103. <template slot-scope="scope">
  104. <div v-if="scope.row.planStatus == '1'" style="color: #ff7800">未开始</div>
  105. <div v-if="scope.row.planStatus == '2'" style="color: #2342ff">进行中</div>
  106. <div v-if="scope.row.planStatus == '3'" style="color: #333333">已完成</div>
  107. </template>
  108. </el-table-column>
  109. <el-table-column label="操作" width="250px" align="center">
  110. <template slot-scope="scope">
  111. <div class="detail_button_out" v-if="scope.row.planStatus == '3'">
  112. <div class="detail_button" @click="addUser(scope.row)">
  113. <img src="../../../assets/img/table/search.png" />
  114. <span> 查看报告</span>
  115. </div>
  116. <div
  117. v-if="scope.row.enable == '1'"
  118. class="detail_button"
  119. @click="downloadButton(scope.row)"
  120. >
  121. <img src="../../../assets/img/table/search.png" />
  122. <span> 下载报告</span>
  123. </div>
  124. </div>
  125. <!-- <el-popconfirm
  126. v-if="scope.row.state != 0"
  127. title="确定删除吗?"
  128. placement="top"
  129. @confirm="deleteUser(scope.$index, scope.row)"
  130. >
  131. <el-button
  132. size="small"
  133. style="margin-left: 10px"
  134. type="text"
  135. slot="reference"
  136. >删除</el-button
  137. >
  138. </el-popconfirm>
  139. <el-popconfirm
  140. v-if="scope.row.state != 0"
  141. title="密码将重置为123456"
  142. placement="top"
  143. @confirm="resetUser(scope.$index, scope.row)"
  144. >
  145. <el-button
  146. size="small"
  147. style="margin-left: 10px"
  148. type="text"
  149. slot="reference"
  150. >重置密码</el-button
  151. >
  152. </el-popconfirm> -->
  153. </template>
  154. </el-table-column>
  155. </el-table>
  156. </div>
  157. <!-- small -->
  158. <el-pagination
  159. class="pag_class"
  160. background
  161. @size-change="handleSizeChange"
  162. @current-change="handleCurrentChange"
  163. :current-page.sync="pageNum"
  164. layout="total, sizes, prev, pager, next"
  165. :page-size="pageSize"
  166. :page-sizes="[10, 20, 50, 100]"
  167. :total="total"
  168. >
  169. </el-pagination>
  170. <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
  171. </el-pagination> -->
  172. </div>
  173. <PlanReport ref="register" @search="searchTarget" />
  174. <!-- 弹出框---选择问题需要下载的组织架构 -->
  175. <div class="radius_dia">
  176. <el-dialog
  177. title=""
  178. :visible.sync="downloadVisible"
  179. width="40%"
  180. :before-close="handleClose"
  181. center
  182. >
  183. <div slot="title">
  184. <p style="text-align: center; margin-bottom: 20px; font-weight: 700">
  185. 报告下载
  186. </p>
  187. <el-form
  188. :inline="true"
  189. class="demo-form-inline form-plan"
  190. style="
  191. margin-top: 20px;
  192. display: flex;
  193. flex-direction: column;
  194. align-items: center;
  195. "
  196. >
  197. <el-form-item label="选择下载范围">
  198. <el-select v-model="dimensionality" placeholder="请选择下载范围">
  199. <el-option
  200. v-for="item in dimensionalityOption"
  201. :key="item.id"
  202. :label="item.name"
  203. :value="item.id"
  204. ></el-option>
  205. </el-select>
  206. </el-form-item>
  207. <el-form-item label="选择届" v-show="dimensionality == '1'">
  208. <el-select v-model="grade" placeholder="请选择届">
  209. <el-option
  210. v-for="item in gradeList"
  211. :key="item.id"
  212. :label="item"
  213. :value="item"
  214. ></el-option>
  215. </el-select>
  216. </el-form-item>
  217. <el-form-item label="选择班级" v-show="dimensionality == '2'">
  218. <el-select multiple v-model="orgName" placeholder="请选择班级">
  219. <el-option
  220. v-for="item in orgList"
  221. :key="item.id"
  222. :label="item.orgName"
  223. :value="item.orgNo"
  224. ></el-option>
  225. </el-select>
  226. </el-form-item>
  227. </el-form>
  228. <el-button
  229. type="success"
  230. style="border-radius: 20px"
  231. v-show="dimensionality == '0'"
  232. @click="downloadFun"
  233. >
  234. 全院下载
  235. </el-button>
  236. <el-button
  237. type="success"
  238. style="border-radius: 20px"
  239. v-show="dimensionality == '1'"
  240. @click="downloadFun"
  241. >
  242. 下载已选年级
  243. </el-button>
  244. <el-button
  245. type="success"
  246. style="border-radius: 20px"
  247. v-show="dimensionality == '2'"
  248. @click="downloadFun"
  249. >
  250. 下载已选班级
  251. </el-button>
  252. <el-button
  253. type="success"
  254. style="border-radius: 20px"
  255. v-show="dimensionality == '2'"
  256. @click="downloadAllFun"
  257. >
  258. 下载全部班级
  259. </el-button>
  260. </div>
  261. <span slot="footer" class="dialog-footer"> </span>
  262. </el-dialog>
  263. </div>
  264. </div>
  265. </template>
  266. <script>
  267. import { oSessionStorage } from "../../../utils/utils";
  268. import planReport from "../../../components/PlanReport.vue";
  269. import { basePath } from "../../../utils/http";
  270. export default {
  271. name: "userManage",
  272. components: {
  273. PlanReport: planReport,
  274. },
  275. data() {
  276. return {
  277. basePath: basePath,
  278. //上传文件的弹出款的标志
  279. fileVisible: false,
  280. //判断点击的是重置密码还是点击删除
  281. isDelete: false,
  282. //重置密码需要调用个userId
  283. userId: "",
  284. //充值密码使用userName
  285. userName: "",
  286. //重置密码弹出框
  287. resetVisible: false,
  288. //根据名称搜索
  289. name: "",
  290. //搜索的用户编号
  291. studentNumber: "",
  292. //搜索的组织架构
  293. // 搜索需要的性别
  294. sex: "",
  295. planName: "",
  296. planTime: "",
  297. planStatus: "",
  298. group: "",
  299. ppData: [],
  300. groupData: [],
  301. options: [
  302. {
  303. value: "1",
  304. label: "选项1",
  305. children: [
  306. {
  307. value: "11",
  308. label: "选项11",
  309. children: [{ value: "111", label: "选项111" }],
  310. },
  311. ],
  312. },
  313. ],
  314. centerDialogVisible: false,
  315. editUserFlag: false,
  316. startTime: "",
  317. endTime: "",
  318. value1: null,
  319. total: 0,
  320. pageSize: 10,
  321. pageNum: 1,
  322. keyword: "",
  323. tableData: [],
  324. userInfo: {}, //用户信息
  325. invitationCode: "",
  326. roleType: "0",
  327. type: 0,
  328. view: {
  329. name: "",
  330. studentNumber: "",
  331. sex: "",
  332. orgName: "",
  333. },
  334. channelList: [
  335. { name: "未开始", id: "1" },
  336. { name: "进行中", id: "2" },
  337. { name: "已完成", id: "3" },
  338. ],
  339. //下载报告标志
  340. downloadVisible: false,
  341. //当前下载的计划需要点击需要下
  342. //组织架构列表
  343. orgList: [],
  344. //组织编号name
  345. orgName: [],
  346. //下载报告 测试计划ID
  347. planId: "",
  348. dimensionality: 0,
  349. dimensionalityOption: [
  350. { id: 0, name: "学院" },
  351. { id: 1, name: "年级" },
  352. { id: 2, name: "班级" },
  353. ],
  354. //院的编号
  355. courtNum: "",
  356. grade: "",
  357. gradeList: [],
  358. };
  359. },
  360. created() {},
  361. mounted() {
  362. this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
  363. this.getChannel();
  364. if (!this.userInfo) {
  365. //如果用户信息不存在跳转登陆页
  366. this.$router.push({ path: "/" });
  367. }
  368. this.searchTarget();
  369. },
  370. methods: {
  371. handleClose() {
  372. this.downloadVisible = false;
  373. },
  374. //根据计划查询院
  375. queryCourt() {
  376. this.$http.get(`/planOrg/findPlanParentOrg?planId=${this.planId}`, {}, (res) => {
  377. if (res && res.code == 200) {
  378. this.courtNum = res.data[0].orgNo;
  379. // this.orgName = [res.data[0].orgNo];
  380. // this.orgList = res.data;
  381. } else {
  382. this.$message.error(res.msg);
  383. }
  384. });
  385. },
  386. //根据计划下班级
  387. queryGrade() {
  388. this.$http.get(`/planOrg/findPlanGrade?planId=${this.planId}`, {}, (res) => {
  389. if (res && res.code == 200) {
  390. this.grade = res.data[0];
  391. this.gradeList = res.data;
  392. // this.orgName = [res.data[0].orgNo];
  393. // this.orgList = res.data;
  394. } else {
  395. this.$message.error(res.msg);
  396. }
  397. });
  398. },
  399. //下载报告
  400. downloadFun() {
  401. //判断当前选择是院还是届--还是班级
  402. let params = {};
  403. if (this.dimensionality == 0) {
  404. //调用接口
  405. params = {
  406. planId: this.planId,
  407. orgNo: this.courtNum,
  408. flag: 0,
  409. };
  410. } else if (this.dimensionality == 1) {
  411. //调用班级接口
  412. params = {
  413. planId: this.planId,
  414. orgNo: this.courtNum,
  415. flag: 1,
  416. grade: this.grade,
  417. };
  418. } else if (this.dimensionality == 2) {
  419. if (this.orgName.length == 0) {
  420. this.$message.error("请选择班级");
  421. return;
  422. }
  423. params = {
  424. planId: this.planId,
  425. orgNo: this.courtNum,
  426. flag: 2,
  427. classIds: this.orgName,
  428. };
  429. }
  430. this.$http.post(`/plan/generate/report`, params, (res) => {
  431. if (res && res.code == 200) {
  432. // this.currentDownFun(res.data);
  433. let a = document.createElement("a");
  434. document.body.appendChild(a);
  435. a.setAttribute("href", basePath + `/plan/download?path=${res.data}`);
  436. a.click();
  437. // this.currentDownFun(res.data)
  438. // this.grade = res.data[0];
  439. // this.gradeList = res.data;
  440. // this.orgName = [res.data[0].orgNo];
  441. // this.orgList = res.data;
  442. } else {
  443. this.$message.error(res.msg);
  444. }
  445. });
  446. },
  447. //开始下载
  448. currentDownFun(val) {
  449. this.$http.getImg(`/plan/download?path=${val}`, {}, (res) => {
  450. debugger;
  451. if (res && res.code == 200) {
  452. debugger;
  453. // this.grade = res.data[0];
  454. // this.gradeList = res.data;
  455. // this.orgName = [res.data[0].orgNo];
  456. // this.orgList = res.data;
  457. } else {
  458. this.$message.error(res.msg);
  459. }
  460. });
  461. },
  462. //下载全部班级
  463. downloadAllFun() {
  464. //下载全部班级
  465. //循环班级列表拿到
  466. let params = {};
  467. let orgNameList = [];
  468. for (let i = 0; i < this.orgList.length; i++) {
  469. orgNameList.push(this.orgList[i].orgNo);
  470. }
  471. params = {
  472. planId: this.planId,
  473. orgNo: this.courtNum,
  474. flag: 2,
  475. classIds: orgNameList,
  476. };
  477. this.$http.post(`/plan/generate/report`, params, (res) => {
  478. if (res && res.code == 200) {
  479. let a = document.createElement("a");
  480. document.body.appendChild(a);
  481. console.log(basePath + `/plan/download?path=${res.data}`);
  482. debugger;
  483. a.setAttribute("href", basePath + `/plan/download?path=${res.data}`);
  484. a.click();
  485. // this.currentDownFun(res.data);
  486. } else {
  487. this.$message.error(res.msg);
  488. }
  489. });
  490. },
  491. //组织架构选择--
  492. getOrgList() {
  493. this.$http.get(`/planOrg/findAllByPlanId?planId=${this.planId}`, {}, (res) => {
  494. if (res && res.code == 200) {
  495. // this.orgName = [res.data[0].orgNo];
  496. this.orgList = res.data;
  497. } else {
  498. this.$message.error(res.msg);
  499. }
  500. });
  501. },
  502. //下载标志
  503. downloadButton(row) {
  504. this.planId = row.id;
  505. this.downloadVisible = true;
  506. this.getOrgList();
  507. this.queryCourt();
  508. this.queryGrade();
  509. },
  510. forMaPlan(val) {
  511. if (val.planStatus == "1") {
  512. return "未开始";
  513. //
  514. } else if (val.planStatus == "2") {
  515. //
  516. return "进行中";
  517. } else if (val.planStatus == "3") {
  518. //
  519. return "已完成";
  520. }
  521. },
  522. //文件上传成功
  523. fileSuccess(res) {
  524. if (res.code == 200) {
  525. this.searchTarget();
  526. this.$message({
  527. message: res.msg,
  528. type: "success",
  529. });
  530. } else {
  531. this.$message({
  532. message: res.msg,
  533. type: "error",
  534. });
  535. }
  536. //查询列表
  537. },
  538. //文件上传失败
  539. fileError() {
  540. this.$message({
  541. message: "上传失败",
  542. type: "error",
  543. });
  544. },
  545. cancle() {
  546. this.resetVisible = false;
  547. },
  548. //提交文本
  549. submitCom() {
  550. //判断当前是否是
  551. if (this.isDelete) {
  552. this.deleteUser();
  553. //调用删除方法
  554. } else {
  555. this.resetFun();
  556. // 调用重置密码方法
  557. }
  558. },
  559. //性别---
  560. genderFun(val) {
  561. let sex = val.gender;
  562. if (sex == "1") {
  563. return "男";
  564. } else if (sex == "0") {
  565. return "女";
  566. } else {
  567. return sex;
  568. }
  569. },
  570. //每页多少条
  571. handleSizeChange(val) {
  572. this.pageSize = val;
  573. this.searchTarget();
  574. // console.log(`每页 ${val} 条`);
  575. //将首页重置为1时---且总条数变化
  576. //设置为当前总条数
  577. },
  578. //获取组织架构方法--------------------开始-----------------------
  579. getChannel() {
  580. this.$http.get(
  581. `/org/findAllOrgByPOrgNo?orgNo=${this.userInfo.orgNo}`,
  582. {},
  583. (res) => {
  584. // this.$toast.success({message:'成功'});
  585. if (res && res.code == 200) {
  586. //将值赋值给list
  587. if (res.data.length > 0) {
  588. let resAdd = this.addPro(res.data);
  589. this.ppData = JSON.parse(JSON.stringify(resAdd));
  590. let forRes = this.arrToTree(resAdd);
  591. // console.log('格式化的结构')
  592. // console.log(forRes)
  593. let resultRes = this.deleteChildren(forRes);
  594. console.log("格式化的结构且去掉children");
  595. console.log(resultRes);
  596. this.groupData = resultRes[0].children;
  597. } else {
  598. this.groupData = [];
  599. }
  600. // this.channelList = res.data;
  601. } else {
  602. this.$message.error(res.msg);
  603. }
  604. }
  605. );
  606. },
  607. //z增加
  608. addPro(val) {
  609. let data = JSON.parse(JSON.stringify(val));
  610. for (let i = 0; i < val.length; i++) {
  611. data[i].value = val[i].orgNo;
  612. data[i].label = val[i].orgName;
  613. }
  614. return data;
  615. },
  616. //非递归方式:将平铺数据转换为树形结构数据
  617. arrToTree(arr) {
  618. let data = arr.filter((item) => {
  619. item.children = arr.filter((e) => {
  620. return item.orgNo === e.parentOrgNo;
  621. });
  622. return this.userInfo.orgNo == item.orgNo;
  623. // return !item.parentOrgNo;
  624. });
  625. return data;
  626. },
  627. //去除转换树形结构数据后存在的空children
  628. deleteChildren(arr) {
  629. let childs = arr;
  630. for (let i = childs.length; i--; i > 0) {
  631. if (childs[i].children) {
  632. if (childs[i].children.length) {
  633. this.deleteChildren(childs[i].children);
  634. } else {
  635. delete childs[i].children;
  636. }
  637. }
  638. }
  639. return arr;
  640. },
  641. //获取组织架构方法--------------------结束-----------------------
  642. formatterDelete(row) {
  643. if (row.state == 0) {
  644. return "已删除";
  645. } else {
  646. return "正常";
  647. }
  648. },
  649. resetUser(flag, val) {
  650. this.resetVisible = true;
  651. this.isDelete = flag;
  652. this.userId = val.id;
  653. this.userName = val.userName;
  654. //当前用户id
  655. //重置密码
  656. },
  657. editUser(row) {
  658. this.editRegisterUser(row);
  659. },
  660. viewUser(row) {
  661. this.view.name = row.userName;
  662. this.view.studentNumber = row.userNo;
  663. this.view.sex = row.gender == "0" ? "女" : "男";
  664. this.view.orgName = row.orgName;
  665. this.centerDialogVisible = true;
  666. },
  667. addUser(val) {
  668. this.addRegisterUser(val);
  669. },
  670. clearSearch() {
  671. this.planName = "";
  672. this.planTime = "";
  673. this.group = "";
  674. this.planStatus = "";
  675. this.searchTarget();
  676. },
  677. formatterTime(val) {
  678. let date = new Date(val);
  679. let year = date.getFullYear();
  680. let month = date.getMonth() + 1;
  681. month = this.formatterMon(month);
  682. let day = date.getDate();
  683. day = this.formatterMon(day);
  684. return year + "-" + month + "-" + day;
  685. },
  686. formatterMon(val) {
  687. if (val < 10) {
  688. return "0" + val;
  689. } else {
  690. return val;
  691. }
  692. },
  693. addRegisterUser(val) {
  694. this.$refs.register.open(val);
  695. },
  696. editRegisterUser(val) {
  697. this.$refs.register.edit(val);
  698. },
  699. resetFun() {
  700. this.$http.get(`/user/resetPassword?userId=${this.userId}`, {}, (res) => {
  701. // this.$toast.success({message:'成功'});
  702. if (res && res.code == 200) {
  703. this.resetVisible = false;
  704. this.$message.success("重置成功");
  705. this.searchTarget();
  706. } else {
  707. this.$message.error(res.msg);
  708. }
  709. });
  710. },
  711. deleteUser() {
  712. this.$http.get(`/user/delete?userId=${this.userId}`, {}, (res) => {
  713. // this.$toast.success({message:'成功'});
  714. if (res && res.code == 200) {
  715. this.$message.success("删除成功");
  716. this.resetVisible = false;
  717. this.searchTarget();
  718. } else {
  719. this.$message.error("删除失败");
  720. }
  721. });
  722. },
  723. handleCurrentChange(val) {
  724. this.pageNum = val;
  725. this.searchList();
  726. },
  727. //根据现有情况进行搜索
  728. searchList() {
  729. let time = "";
  730. if (this.planTime != "") {
  731. time = this.formatterTime(this.planTime);
  732. }
  733. let gp = "";
  734. if (this.group != "") {
  735. gp = this.group[this.group.length - 1];
  736. }
  737. console.log(this.planStatus);
  738. //格式化时间
  739. console.log("this.planTime");
  740. console.log(time);
  741. console.log(this.planName);
  742. console.log(gp);
  743. let url = `/plan/findListByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}${
  744. gp == "" ? `&orgNo=${this.userInfo.orgNo}` : `&orgNo=${gp}`
  745. }${time == "" ? "" : `&createDate=${time}`}${
  746. this.planStatus == "" ? "" : `&planStatus=${this.planStatus}`
  747. }${this.planName == "" ? "" : `&planName=${this.planName}`}`;
  748. this.$http.get(url, {}, (res) => {
  749. console.log(res);
  750. if (res && res.code == 200) {
  751. console.log("----------");
  752. console.log(res.data.content);
  753. this.tableData = res.data.content;
  754. this.total = res.data.totalElements;
  755. } else {
  756. // this.$toast.fail(res.msg);
  757. this.$message.error(res.msg);
  758. }
  759. });
  760. },
  761. searchTarget() {
  762. this.pageNum = 1;
  763. this.searchList();
  764. },
  765. //跳转首页
  766. goHome() {
  767. this.$router.push({ path: "/home" });
  768. },
  769. //跳转记录页
  770. goRecord() {
  771. this.$router.push({ path: "/record" });
  772. },
  773. //退出登陆
  774. logout() {
  775. oSessionStorage.removeItem("userInfo");
  776. oSessionStorage.removeItem("token");
  777. this.$router.push({ path: "/" });
  778. },
  779. //点击获取月出勤次数
  780. getTimes(param) {
  781. this.monthTimes = param;
  782. },
  783. },
  784. };
  785. </script>
  786. <style scoped>
  787. .form-plan >>> .el-form-item__label {
  788. width: 100px !important;
  789. }
  790. .radius_dia >>> .el-dialog {
  791. border-radius: 20px !important;
  792. }
  793. </style>
  794. <style lang="less" scoped>
  795. @import "../../../styles/theme.less";
  796. .pag_class {
  797. text-align: end;
  798. }
  799. .pag_class /deep/.el-input__inner {
  800. width: 100% !important;
  801. }
  802. .pag_class /deep/.el-pagination--small span:not([class*="suffix"]) {
  803. height: 22px;
  804. line-height: 28px !important;
  805. }
  806. .record-warp {
  807. width: 100%;
  808. height: 80vh;
  809. position: relative;
  810. .record-main {
  811. width: 100%;
  812. height: 100%;
  813. box-sizing: border-box;
  814. overflow-y: auto;
  815. display: flex;
  816. flex-direction: column;
  817. .search-head {
  818. width: 100%;
  819. display: flex;
  820. flex-direction: row;
  821. justify-content: flex-start;
  822. align-items: center;
  823. .zc-title {
  824. color: #606266;
  825. font-size: 14px;
  826. }
  827. }
  828. .table-content {
  829. margin: 10px 0;
  830. flex: 1;
  831. overflow-y: auto;
  832. }
  833. }
  834. }
  835. .add_user_class {
  836. margin-top: 10px;
  837. }
  838. .user_out {
  839. display: flex;
  840. width: 100%;
  841. align-items: center;
  842. border: 1px solid #eeeeef;
  843. line-height: 50px;
  844. margin-top: 10px;
  845. }
  846. .user_out_sub {
  847. flex: 1;
  848. background-color: #fafafa;
  849. text-align: center;
  850. // color:#ffffff
  851. }
  852. .user_out_subNext {
  853. padding-left: 10px;
  854. flex: 3;
  855. }
  856. .detail_button_out {
  857. display: flex;
  858. justify-content: flex-start;
  859. .detail_button {
  860. margin-left: 20px;
  861. display: flex;
  862. align-items: center;
  863. cursor: pointer;
  864. letter-spacing: 2px;
  865. img {
  866. width: 15px;
  867. margin-right: 5px;
  868. }
  869. span {
  870. color: #00bf78;
  871. // font-weight: 600;
  872. }
  873. }
  874. }
  875. //弹出框样式
  876. .dig_update /deep/.el-cascader {
  877. position: relative;
  878. font-size: 14px;
  879. line-height: 40px;
  880. width: 100%;
  881. }
  882. .dig_update /deep/.el-dialog {
  883. box-shadow: none !important;
  884. // background: transparent !important;
  885. }
  886. .demo-ruleForm /deep/ .el-form-item {
  887. margin-right: 10px;
  888. vertical-align: top;
  889. display: flex !important;
  890. flex-direction: column;
  891. }
  892. .demo-ruleForm /deep/.el-dialog__header {
  893. background-color: #ffffff;
  894. padding-left: 140px !important;
  895. }
  896. .demo-ruleForm /deep/.el-form-item__label {
  897. text-align: left;
  898. vertical-align: middle;
  899. float: left;
  900. font-size: 14px;
  901. color: #606266;
  902. line-height: 40px;
  903. padding: 0 12px 0 0;
  904. -webkit-box-sizing: border-box;
  905. box-sizing: border-box;
  906. }
  907. .demo-ruleForm /deep/.el-input {
  908. width: 100% !important;
  909. }
  910. .demo-ruleForm /deep/.el-input__inner {
  911. width: 100% !important;
  912. background-color: #f7f7f7;
  913. border: 0px;
  914. }
  915. .dig_button {
  916. margin-top: 40px;
  917. display: flex;
  918. width: 100%;
  919. justify-content: space-around;
  920. }
  921. .demo-ruleForm {
  922. background-color: #ffffff;
  923. // border-radius: 20px;
  924. margin-right: -10px;
  925. margin-top: -10px;
  926. padding-right: 100px;
  927. padding-left: 100px;
  928. border-radius: 20px;
  929. padding-top: 20px;
  930. padding-bottom: 20px;
  931. .dig_title {
  932. margin-bottom: 30px;
  933. text-align: center;
  934. font-weight: 700;
  935. }
  936. }
  937. </style>