channelManagement.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974
  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. debugger;
  393. // this.orgName = [res.data[0].orgNo];
  394. // this.orgList = res.data;
  395. } else {
  396. this.$message.error(res.msg);
  397. }
  398. });
  399. },
  400. //下载报告
  401. downloadFun() {
  402. //判断当前选择是院还是届--还是班级
  403. let params = {};
  404. if (this.dimensionality == 0) {
  405. //调用接口
  406. params = {
  407. planId: this.planId,
  408. orgNo: this.courtNum,
  409. flag: 0,
  410. };
  411. } else if (this.dimensionality == 1) {
  412. //调用班级接口
  413. params = {
  414. planId: this.planId,
  415. orgNo: this.courtNum,
  416. flag: 1,
  417. grade: this.grade,
  418. };
  419. } else if (this.dimensionality == 2) {
  420. if (this.orgName.length == 0) {
  421. this.$message.error("请选择班级");
  422. return;
  423. }
  424. params = {
  425. planId: this.planId,
  426. orgNo: this.courtNum,
  427. flag: 2,
  428. classIds: this.orgName,
  429. };
  430. }
  431. this.$http.post(`/plan/generate/report`, params, (res) => {
  432. if (res && res.code == 200) {
  433. // this.currentDownFun(res.data);
  434. let a = document.createElement("a");
  435. document.body.appendChild(a);
  436. a.setAttribute("href", basePath + `/plan/download?path=${res.data}`);
  437. a.click();
  438. // this.currentDownFun(res.data)
  439. // this.grade = res.data[0];
  440. // this.gradeList = res.data;
  441. // this.orgName = [res.data[0].orgNo];
  442. // this.orgList = res.data;
  443. } else {
  444. this.$message.error(res.msg);
  445. }
  446. });
  447. },
  448. //开始下载
  449. currentDownFun(val) {
  450. this.$http.getImg(`/plan/download?path=${val}`, {}, (res) => {
  451. debugger;
  452. if (res && res.code == 200) {
  453. debugger;
  454. // this.grade = res.data[0];
  455. // this.gradeList = res.data;
  456. // this.orgName = [res.data[0].orgNo];
  457. // this.orgList = res.data;
  458. } else {
  459. this.$message.error(res.msg);
  460. }
  461. });
  462. },
  463. //下载全部班级
  464. downloadAllFun() {
  465. //下载全部班级
  466. //循环班级列表拿到
  467. let params = {};
  468. let orgNameList = [];
  469. for (let i = 0; i < this.orgList.length; i++) {
  470. orgNameList.push(this.orgList[i].orgNo);
  471. }
  472. params = {
  473. planId: this.planId,
  474. orgNo: this.courtNum,
  475. flag: 2,
  476. classIds: orgNameList,
  477. };
  478. this.$http.post(`/plan/generate/report`, params, (res) => {
  479. if (res && res.code == 200) {
  480. let a = document.createElement("a");
  481. document.body.appendChild(a);
  482. console.log(basePath + `/plan/download?path=${res.data}`);
  483. debugger;
  484. a.setAttribute("href", basePath + `/plan/download?path=${res.data}`);
  485. a.click();
  486. // this.currentDownFun(res.data);
  487. } else {
  488. this.$message.error(res.msg);
  489. }
  490. });
  491. },
  492. //组织架构选择--
  493. getOrgList() {
  494. this.$http.get(`/planOrg/findAllByPlanId?planId=${this.planId}`, {}, (res) => {
  495. if (res && res.code == 200) {
  496. // this.orgName = [res.data[0].orgNo];
  497. this.orgList = res.data;
  498. } else {
  499. this.$message.error(res.msg);
  500. }
  501. });
  502. },
  503. //下载标志
  504. downloadButton(row) {
  505. this.planId = row.id;
  506. this.downloadVisible = true;
  507. this.getOrgList();
  508. this.queryCourt();
  509. this.queryGrade();
  510. },
  511. forMaPlan(val) {
  512. if (val.planStatus == "1") {
  513. return "未开始";
  514. //
  515. } else if (val.planStatus == "2") {
  516. //
  517. return "进行中";
  518. } else if (val.planStatus == "3") {
  519. //
  520. return "已完成";
  521. }
  522. },
  523. //文件上传成功
  524. fileSuccess(res) {
  525. if (res.code == 200) {
  526. this.searchTarget();
  527. this.$message({
  528. message: res.msg,
  529. type: "success",
  530. });
  531. } else {
  532. this.$message({
  533. message: res.msg,
  534. type: "error",
  535. });
  536. }
  537. //查询列表
  538. },
  539. //文件上传失败
  540. fileError() {
  541. this.$message({
  542. message: "上传失败",
  543. type: "error",
  544. });
  545. },
  546. cancle() {
  547. this.resetVisible = false;
  548. },
  549. //提交文本
  550. submitCom() {
  551. //判断当前是否是
  552. if (this.isDelete) {
  553. this.deleteUser();
  554. //调用删除方法
  555. } else {
  556. this.resetFun();
  557. // 调用重置密码方法
  558. }
  559. },
  560. //性别---
  561. genderFun(val) {
  562. let sex = val.gender;
  563. if (sex == "1") {
  564. return "男";
  565. } else if (sex == "0") {
  566. return "女";
  567. } else {
  568. return sex;
  569. }
  570. },
  571. //每页多少条
  572. handleSizeChange(val) {
  573. this.pageSize = val;
  574. this.searchTarget();
  575. // console.log(`每页 ${val} 条`);
  576. //将首页重置为1时---且总条数变化
  577. //设置为当前总条数
  578. },
  579. //获取组织架构方法--------------------开始-----------------------
  580. getChannel() {
  581. this.$http.get(
  582. `/org/findAllOrgByPOrgNo?orgNo=${this.userInfo.orgNo}`,
  583. {},
  584. (res) => {
  585. // this.$toast.success({message:'成功'});
  586. if (res && res.code == 200) {
  587. //将值赋值给list
  588. if (res.data.length > 0) {
  589. let resAdd = this.addPro(res.data);
  590. this.ppData = JSON.parse(JSON.stringify(resAdd));
  591. let forRes = this.arrToTree(resAdd);
  592. // console.log('格式化的结构')
  593. // console.log(forRes)
  594. let resultRes = this.deleteChildren(forRes);
  595. console.log("格式化的结构且去掉children");
  596. console.log(resultRes);
  597. this.groupData = resultRes[0].children;
  598. } else {
  599. this.groupData = [];
  600. }
  601. // this.channelList = res.data;
  602. } else {
  603. this.$message.error(res.msg);
  604. }
  605. }
  606. );
  607. },
  608. //z增加
  609. addPro(val) {
  610. let data = JSON.parse(JSON.stringify(val));
  611. for (let i = 0; i < val.length; i++) {
  612. data[i].value = val[i].orgNo;
  613. data[i].label = val[i].orgName;
  614. }
  615. return data;
  616. },
  617. //非递归方式:将平铺数据转换为树形结构数据
  618. arrToTree(arr) {
  619. let data = arr.filter((item) => {
  620. item.children = arr.filter((e) => {
  621. return item.orgNo === e.parentOrgNo;
  622. });
  623. return this.userInfo.orgNo == item.orgNo;
  624. // return !item.parentOrgNo;
  625. });
  626. return data;
  627. },
  628. //去除转换树形结构数据后存在的空children
  629. deleteChildren(arr) {
  630. let childs = arr;
  631. for (let i = childs.length; i--; i > 0) {
  632. if (childs[i].children) {
  633. if (childs[i].children.length) {
  634. this.deleteChildren(childs[i].children);
  635. } else {
  636. delete childs[i].children;
  637. }
  638. }
  639. }
  640. return arr;
  641. },
  642. //获取组织架构方法--------------------结束-----------------------
  643. formatterDelete(row) {
  644. if (row.state == 0) {
  645. return "已删除";
  646. } else {
  647. return "正常";
  648. }
  649. },
  650. resetUser(flag, val) {
  651. this.resetVisible = true;
  652. this.isDelete = flag;
  653. this.userId = val.id;
  654. this.userName = val.userName;
  655. //当前用户id
  656. //重置密码
  657. },
  658. editUser(row) {
  659. this.editRegisterUser(row);
  660. },
  661. viewUser(row) {
  662. this.view.name = row.userName;
  663. this.view.studentNumber = row.userNo;
  664. this.view.sex = row.gender == "0" ? "女" : "男";
  665. this.view.orgName = row.orgName;
  666. this.centerDialogVisible = true;
  667. },
  668. addUser(val) {
  669. this.addRegisterUser(val);
  670. },
  671. clearSearch() {
  672. this.planName = "";
  673. this.planTime = "";
  674. this.group = "";
  675. this.planStatus = "";
  676. this.searchTarget();
  677. },
  678. formatterTime(val) {
  679. let date = new Date(val);
  680. let year = date.getFullYear();
  681. let month = date.getMonth() + 1;
  682. month = this.formatterMon(month);
  683. let day = date.getDate();
  684. day = this.formatterMon(day);
  685. return year + "-" + month + "-" + day;
  686. },
  687. formatterMon(val) {
  688. if (val < 10) {
  689. return "0" + val;
  690. } else {
  691. return val;
  692. }
  693. },
  694. addRegisterUser(val) {
  695. this.$refs.register.open(val);
  696. },
  697. editRegisterUser(val) {
  698. this.$refs.register.edit(val);
  699. },
  700. resetFun() {
  701. this.$http.get(`/user/resetPassword?userId=${this.userId}`, {}, (res) => {
  702. // this.$toast.success({message:'成功'});
  703. if (res && res.code == 200) {
  704. this.resetVisible = false;
  705. this.$message.success("重置成功");
  706. this.searchTarget();
  707. } else {
  708. this.$message.error(res.msg);
  709. }
  710. });
  711. },
  712. deleteUser() {
  713. this.$http.get(`/user/delete?userId=${this.userId}`, {}, (res) => {
  714. // this.$toast.success({message:'成功'});
  715. if (res && res.code == 200) {
  716. this.$message.success("删除成功");
  717. this.resetVisible = false;
  718. this.searchTarget();
  719. } else {
  720. this.$message.error("删除失败");
  721. }
  722. });
  723. },
  724. handleCurrentChange(val) {
  725. this.pageNum = val;
  726. this.searchList();
  727. },
  728. //根据现有情况进行搜索
  729. searchList() {
  730. let time = "";
  731. if (this.planTime != "") {
  732. time = this.formatterTime(this.planTime);
  733. }
  734. let gp = "";
  735. if (this.group != "") {
  736. gp = this.group[this.group.length - 1];
  737. }
  738. console.log(this.planStatus);
  739. //格式化时间
  740. console.log("this.planTime");
  741. console.log(time);
  742. console.log(this.planName);
  743. console.log(gp);
  744. let url = `/plan/findListByPage?pageSize=${this.pageSize}&pageNum=${this.pageNum}${
  745. gp == "" ? `&orgNo=${this.userInfo.orgNo}` : `&orgNo=${gp}`
  746. }${time == "" ? "" : `&createDate=${time}`}${
  747. this.planStatus == "" ? "" : `&planStatus=${this.planStatus}`
  748. }${this.planName == "" ? "" : `&planName=${this.planName}`}`;
  749. this.$http.get(url, {}, (res) => {
  750. console.log(res);
  751. if (res && res.code == 200) {
  752. console.log("----------");
  753. console.log(res.data.content);
  754. this.tableData = res.data.content;
  755. this.total = res.data.totalElements;
  756. } else {
  757. // this.$toast.fail(res.msg);
  758. this.$message.error(res.msg);
  759. }
  760. });
  761. },
  762. searchTarget() {
  763. this.pageNum = 1;
  764. this.searchList();
  765. },
  766. //跳转首页
  767. goHome() {
  768. this.$router.push({ path: "/home" });
  769. },
  770. //跳转记录页
  771. goRecord() {
  772. this.$router.push({ path: "/record" });
  773. },
  774. //退出登陆
  775. logout() {
  776. oSessionStorage.removeItem("userInfo");
  777. oSessionStorage.removeItem("token");
  778. this.$router.push({ path: "/" });
  779. },
  780. //点击获取月出勤次数
  781. getTimes(param) {
  782. this.monthTimes = param;
  783. },
  784. },
  785. };
  786. </script>
  787. <style scoped>
  788. .form-plan >>> .el-form-item__label {
  789. width: 100px !important;
  790. }
  791. .radius_dia >>> .el-dialog {
  792. border-radius: 20px !important;
  793. }
  794. </style>
  795. <style lang="less" scoped>
  796. @import "../../../styles/theme.less";
  797. .pag_class {
  798. text-align: end;
  799. }
  800. .pag_class /deep/.el-input__inner {
  801. width: 100% !important;
  802. }
  803. .pag_class /deep/.el-pagination--small span:not([class*="suffix"]) {
  804. height: 22px;
  805. line-height: 28px !important;
  806. }
  807. .record-warp {
  808. width: 100%;
  809. height: 80vh;
  810. position: relative;
  811. .record-main {
  812. width: 100%;
  813. height: 100%;
  814. box-sizing: border-box;
  815. overflow-y: auto;
  816. display: flex;
  817. flex-direction: column;
  818. .search-head {
  819. width: 100%;
  820. display: flex;
  821. flex-direction: row;
  822. justify-content: flex-start;
  823. align-items: center;
  824. .zc-title {
  825. color: #606266;
  826. font-size: 14px;
  827. }
  828. }
  829. .table-content {
  830. margin: 10px 0;
  831. flex: 1;
  832. overflow-y: auto;
  833. }
  834. }
  835. }
  836. .add_user_class {
  837. margin-top: 10px;
  838. }
  839. .user_out {
  840. display: flex;
  841. width: 100%;
  842. align-items: center;
  843. border: 1px solid #eeeeef;
  844. line-height: 50px;
  845. margin-top: 10px;
  846. }
  847. .user_out_sub {
  848. flex: 1;
  849. background-color: #fafafa;
  850. text-align: center;
  851. // color:#ffffff
  852. }
  853. .user_out_subNext {
  854. padding-left: 10px;
  855. flex: 3;
  856. }
  857. .detail_button_out {
  858. display: flex;
  859. justify-content: flex-start;
  860. .detail_button {
  861. margin-left: 20px;
  862. display: flex;
  863. align-items: center;
  864. cursor: pointer;
  865. letter-spacing: 2px;
  866. img {
  867. width: 15px;
  868. margin-right: 5px;
  869. }
  870. span {
  871. color: #00bf78;
  872. // font-weight: 600;
  873. }
  874. }
  875. }
  876. //弹出框样式
  877. .dig_update /deep/.el-cascader {
  878. position: relative;
  879. font-size: 14px;
  880. line-height: 40px;
  881. width: 100%;
  882. }
  883. .dig_update /deep/.el-dialog {
  884. box-shadow: none !important;
  885. // background: transparent !important;
  886. }
  887. .demo-ruleForm /deep/ .el-form-item {
  888. margin-right: 10px;
  889. vertical-align: top;
  890. display: flex !important;
  891. flex-direction: column;
  892. }
  893. .demo-ruleForm /deep/.el-dialog__header {
  894. background-color: #ffffff;
  895. padding-left: 140px !important;
  896. }
  897. .demo-ruleForm /deep/.el-form-item__label {
  898. text-align: left;
  899. vertical-align: middle;
  900. float: left;
  901. font-size: 14px;
  902. color: #606266;
  903. line-height: 40px;
  904. padding: 0 12px 0 0;
  905. -webkit-box-sizing: border-box;
  906. box-sizing: border-box;
  907. }
  908. .demo-ruleForm /deep/.el-input {
  909. width: 100% !important;
  910. }
  911. .demo-ruleForm /deep/.el-input__inner {
  912. width: 100% !important;
  913. background-color: #f7f7f7;
  914. border: 0px;
  915. }
  916. .dig_button {
  917. margin-top: 40px;
  918. display: flex;
  919. width: 100%;
  920. justify-content: space-around;
  921. }
  922. .demo-ruleForm {
  923. background-color: #ffffff;
  924. // border-radius: 20px;
  925. margin-right: -10px;
  926. margin-top: -10px;
  927. padding-right: 100px;
  928. padding-left: 100px;
  929. border-radius: 20px;
  930. padding-top: 20px;
  931. padding-bottom: 20px;
  932. .dig_title {
  933. margin-bottom: 30px;
  934. text-align: center;
  935. font-weight: 700;
  936. }
  937. }
  938. </style>