index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. <template>
  2. <div class="app-container patrolRecord">
  3. <div class="patrolRecordPage" v-show="pageType === 1">
  4. <div class="left-page-max-big-box">
  5. <el-tree
  6. style="margin-right:10px;"
  7. :data="deptOptions"
  8. :props="defaultProps"
  9. icon-class=""
  10. node-key="id"
  11. :highlight-current="true"
  12. default-expand-all
  13. :expand-on-click-node="false"
  14. :filter-node-method="filterNode"
  15. ref="tree"
  16. @node-click="handleNodeClick"
  17. />
  18. </div>
  19. <p class="center-border-p"></p>
  20. <div class="right-page-max-big-box">
  21. <div class="top-button-max-box">
  22. <div class="yearMonthButtonBox">
  23. <p @click="yearMonthSwitchButton(1)" :class="yearMonthType===1?'left-button-one':'left-button-tow'">月度</p>
  24. <p @click="yearMonthSwitchButton(2)" :class="yearMonthType===2?'right-button-one':'right-button-tow'">年度</p>
  25. </div>
  26. <div class="year-month-data-button-box">
  27. <p class="year-month-subtract-button" @click="subtractDate"><</p>
  28. <p class="year-month-text-p" v-show="yearMonthType===1">{{yearMonthData.year}}-{{yearMonthData.month}}</p>
  29. <p class="year-month-text-p" v-show="yearMonthType===2">{{yearMonthData.year}}</p>
  30. <p class="year-month-add-button" @click="addDate">></p>
  31. </div>
  32. <p class="return-year-month-button inquire-button-one" v-show="yearMonthType===1" @click="returnPresent">回到本月</p>
  33. </div>
  34. <div class="month-max-big-box scrollbar-box" v-if="yearMonthType === 1">
  35. <div class="month-week-box">
  36. <p class="for-week-box" v-for="item of weekList" :key="item.key">{{ item.value }}</p>
  37. </div>
  38. <div class="month-big-box">
  39. <div v-for="(year,index) in yearDate" v-if="year.year == yearMonthData.year && year.month == yearMonthData.month">
  40. <div class="for-month-max-big-box" v-for="(item,index) in year.list" :key="item.key">
  41. <p class="for-month-top-big-box" :class="item.disable?'for-month-top-big-box-color':''">{{item.date}}</p>
  42. <div class="for-month-bottom-big-box" :class="item.noSignedInCount>0?'red-backgroud-color':''"
  43. v-if="!item.disable&&item.signInCount>0" @click.stop="goPage('info',item)">
  44. <div class="for-month-bottom-left-min-box">
  45. <p>已签到人员:{{item.signInCount}}</p>
  46. <p>未签到人员:{{item.noSignedInCount}}</p>
  47. </div>
  48. <div class="for-month-bottom-right-min-box el-icon-arrow-right"></div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="year-max-big-box scrollbar-box" v-if="yearMonthType === 2">
  55. <div class="for-year-max-big-box" v-for="(year,index) in yearDate" :key="year.key" v-if="year.year == yearMonthData.year">
  56. <p class="year-name-p">{{year.month==1?'一月':(year.month===2?'二月':(year.month===3?'三月':(year.month===4?'四月':(
  57. year.month===5?'五月':(year.month===6?'六月':(year.month===7?'七月':(year.month===8?'八月':(year.month===9?'九月':(
  58. year.month===10?'十月':(year.month===11?'十一月':(year.month===12?'十二月':'')))))))))))}}</p>
  59. <div class="year-week-box">
  60. <p class="for-week-box" v-for="item of weekList" :key="item.key">{{ item.value }}</p>
  61. </div>
  62. <div class="year-big-box">
  63. <div class="for-year-big-box" v-for="(item,index) in year.list" :key="item.key">
  64. <p class="for-year-top-big-box" :class="item.disable?'for-year-top-big-box-color':''">{{item.date}}</p>
  65. <div class="for-year-bottom-big-box" :class="!item.disable&&item.noSignedInCount>0?'red-backgroud-color':''" v-if="item.signInCount>0&&!item.disable" @click.stop="goPage('info',item)">{{item.noSignedInCount>0?item.noSignedInCount:item.signInCount}}人</div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <info-page v-if="pageType === 2" :propsData="propsData"></info-page>
  73. </div>
  74. </template>
  75. <script>
  76. import { getListYmd } from '@/api/laboratory/patrolRecord'
  77. import { getTreeList} from '@/api/evacuation3_2/index'
  78. import { treeselect } from "@/api/system/user_teacher";
  79. import infoPage from "./infoPage.vue";
  80. export default {
  81. name: 'index',
  82. components: {
  83. infoPage
  84. },
  85. data() {
  86. return {
  87. //页面状态切换
  88. pageType:1,
  89. //树状结构
  90. treeList:[],
  91. deptOptions:[],
  92. defaultProps: {
  93. children: "children",
  94. label: "label"
  95. },
  96. checkTreeId:null,
  97. //年月状态切换 1.月度 2.年度
  98. yearMonthType:1,
  99. //全选按钮状态
  100. allButtonType:false,
  101. //年月数据切换
  102. yearMonthData:{
  103. presentYear:null,
  104. presentMonth:null,
  105. presentDate:null,
  106. year:null,
  107. month:null,
  108. },
  109. //计算用日期
  110. shareDate: new Date(),
  111. newKey:0,
  112. weekList: [
  113. {
  114. key:"1",
  115. value:"周一",
  116. },
  117. {
  118. key:"2",
  119. value:"周二",
  120. },
  121. {
  122. key:"3",
  123. value:"周三",
  124. },
  125. {
  126. key:"4",
  127. value:"周四",
  128. },
  129. {
  130. key:"5",
  131. value:"周五",
  132. },
  133. {
  134. key:"6",
  135. value:"周六",
  136. },
  137. {
  138. key:"7",
  139. value:"周日",
  140. },
  141. ],
  142. //年日历
  143. yearDate:[],
  144. //月日历
  145. monthDate:[],
  146. //已勾选数据
  147. checkList:[],
  148. //子页面传参数据
  149. propsData:{},
  150. }
  151. },
  152. created() {
  153. this.getTreeselect();
  154. },
  155. mounted() {
  156. },
  157. methods: {
  158. /**************************************************/
  159. //查询值班记录列表
  160. getListYmd(){
  161. let self = this;
  162. let obj = {
  163. deptId:this.checkTreeId,
  164. // beginTime:this.yearDate[0].list[0].value,
  165. beginTime:"",
  166. // endTime:this.yearDate[this.yearDate.length-1].list[this.yearDate[this.yearDate.length-1].list.length-1].value,
  167. endTime:"",
  168. };
  169. if(this.yearMonthType == 1){
  170. for(let i=0;i<self.yearDate.length;i++){
  171. if(self.yearDate[i].year == self.yearMonthData.year &&
  172. self.yearDate[i].month == self.yearMonthData.month){
  173. obj.beginTime = self.yearDate[i].list[0].value;
  174. obj.endTime = self.yearDate[i].list[self.yearDate[i].list.length-1].value;
  175. }
  176. }
  177. }else if(this.yearMonthType == 2){
  178. let list = [];
  179. for(let i=0;i<self.yearDate.length;i++){
  180. if(self.yearDate[i].year == self.yearMonthData.year){
  181. list.push(self.yearDate[i]);
  182. }
  183. }
  184. obj.beginTime = list[0].list[0].value;
  185. obj.endTime = list[list.length-1].list[list[list.length-1].list.length-1].value;
  186. }
  187. getListYmd(obj).then(response => {
  188. for(let o=0;o<self.yearDate.length;o++){
  189. for(let x=0;x<self.yearDate[o].list.length;x++){
  190. let signInCount = 0;
  191. let noSignedInCount = 0;
  192. for(let i=0;i<response.data.length;i++){
  193. if(self.yearDate[o].list[x].value == response.data[i].dutyTime){
  194. signInCount = response.data[i].signInCount
  195. noSignedInCount = response.data[i].noSignedInCount
  196. }
  197. }
  198. self.yearDate[o].list[x].signInCount = signInCount
  199. self.yearDate[o].list[x].noSignedInCount = noSignedInCount
  200. }
  201. }
  202. // for(let i=0;i<response.data.length;i++){
  203. // let year = parseInt(response.data[i].dutyTime.split('-')[0]);
  204. // let month = parseInt(response.data[i].dutyTime.split('-')[1]);
  205. // for(let o=0;o<self.yearDate.length;o++){
  206. // if(self.yearDate[o].year == year && self.yearDate[o].month == month){
  207. // for(let x=0;x<self.yearDate[o].list.length;x++){
  208. // if(self.yearDate[o].list[x].value == response.data[i].dutyTime){
  209. // self.yearDate[o].list[x].signInCount = response.data[i].signInCount
  210. // self.yearDate[o].list[x].noSignedInCount = response.data[i].noSignedInCount
  211. // }
  212. // }
  213. // }
  214. // }
  215. // }
  216. });
  217. },
  218. //时间初始化
  219. initializationDate(){
  220. let myDate = new Date();
  221. let obj = {
  222. presentYear:myDate.getFullYear(),
  223. presentMonth:myDate.getMonth()+1,
  224. presentDate:parseInt(this.stringify(myDate.getFullYear(),myDate.getMonth(), myDate.getDate()).replace(/-/g,"")),
  225. year:myDate.getFullYear(),
  226. month:myDate.getMonth()+1,
  227. };
  228. this.$set(this,'yearMonthData',obj);
  229. this.$set(this,'yearDate',[]);
  230. this.$set(this,'checkList',[]);
  231. if(this.generateDate()){
  232. //后端数据回填
  233. this.getListYmd();
  234. }
  235. },
  236. /** 查询部门下拉树结构 */
  237. getTreeselect() {
  238. let self = this;
  239. treeselect({}).then(response => {
  240. this.deptOptions = response.data;
  241. this.$nextTick(function(){
  242. if(response.data[0]){
  243. self.$refs.tree.setCurrentKey(response.data[0].id);
  244. self.$set(self,'checkTreeId',response.data[0].id);
  245. self.initializationDate();
  246. }
  247. })
  248. });
  249. },
  250. // 筛选节点
  251. filterNode(value, data) {
  252. if (!value) return true;
  253. return data.label.indexOf(value) !== -1;
  254. },
  255. // 节点单击事件
  256. handleNodeClick(data) {
  257. if(data.id != this.checkTreeId){
  258. console.log('123')
  259. this.$set(this,'checkTreeId',data.id);
  260. this.initializationDate();
  261. }
  262. },
  263. //页面切换
  264. goPage(type,item){
  265. if(type == 'index'){
  266. this.$set(this,'pageType',1)
  267. }else if(type=='info'){
  268. let obj = {
  269. checkTreeId:this.checkTreeId,
  270. time:item.value,
  271. }
  272. this.$set(this,'propsData',obj)
  273. this.$set(this,'pageType',2)
  274. }
  275. },
  276. //返回当前时间
  277. returnPresent(){
  278. this.$set(this.yearMonthData,'year',this.yearMonthData.presentYear);
  279. this.$set(this.yearMonthData,'month',this.yearMonthData.presentMonth);
  280. this.getListYmd();
  281. },
  282. //年或月增加
  283. addDate(){
  284. if(this.yearMonthType == 1){
  285. if(this.yearMonthData.month<12){
  286. this.yearMonthData.month++
  287. }else{
  288. if(this.yearMonthData.year>=this.yearMonthData.presentYear+1){
  289. return
  290. }
  291. this.yearMonthData.year++
  292. this.$set(this.yearMonthData,'month',1);
  293. }
  294. }else if(this.yearMonthType == 2){
  295. if(this.yearMonthData.year>=this.yearMonthData.presentYear+1){
  296. return
  297. }
  298. this.yearMonthData.year++
  299. }
  300. this.getListYmd();
  301. },
  302. //年或月减少
  303. subtractDate(){
  304. if(this.yearMonthType == 1){
  305. if(this.yearMonthData.month>1){
  306. this.yearMonthData.month--
  307. }else{
  308. if(this.yearMonthData.year==this.yearMonthData.presentYear){
  309. return
  310. }
  311. this.yearMonthData.year--
  312. this.$set(this.yearMonthData,'month',12);
  313. }
  314. }else if(this.yearMonthType == 2){
  315. if(this.yearMonthData.year==this.yearMonthData.presentYear){
  316. return
  317. }
  318. this.yearMonthData.year--
  319. }
  320. this.getListYmd();
  321. },
  322. //年月展示切换按钮
  323. yearMonthSwitchButton(type){
  324. if(this.yearMonthType != type){
  325. this.$set(this,'yearMonthType',type);
  326. }
  327. this.getListYmd();
  328. },
  329. // 生成日历
  330. generateDate() {
  331. let self = this;
  332. let myDate = new Date();
  333. let year = myDate.getFullYear();
  334. let newTimeList = [];
  335. self.newKey = 0;
  336. for(let o=0;o<2;o++){
  337. for(let i=0;i<12;i++){
  338. self.newKey++
  339. newTimeList.push(self.setCurrentYearMonth(year,i))
  340. }
  341. year++
  342. }
  343. this.$set(this,'yearDate',newTimeList);
  344. return true;
  345. },
  346. // 设置日历显示的日期(年-月)
  347. setCurrentYearMonth(year,month) {
  348. let showYearMonth = {
  349. year,
  350. month,
  351. };
  352. return this.createCalendar(showYearMonth);
  353. },
  354. // 创建当前月对应日历的日期数据
  355. createCalendar(showYearMonth) {
  356. const oneDayMS = 24 * 60 * 60 * 1000;
  357. let { year, month } = showYearMonth;
  358. let obj = {
  359. key:this.newKey,
  360. time:year+'-'+(month+1),
  361. year:year,
  362. month:month+1,
  363. list:[],
  364. }
  365. let firstDay = this.getFirstDayByMonths(year, month);
  366. let prefixDaysLen = firstDay === 0 ? 6 : firstDay - 1;
  367. let begin = new Date(year, month, 1).getTime() - oneDayMS * prefixDaysLen;
  368. let lastDay = this.getLastDayByMonth(year, month);
  369. let suffixDaysLen = lastDay === 0 ? 0 : 7 - lastDay;
  370. let end = new Date(year, month + 1, 0).getTime() + oneDayMS * suffixDaysLen;
  371. while (begin <= end) {
  372. this.shareDate.setTime(begin);
  373. let year = this.shareDate.getFullYear();
  374. let curMonth = this.shareDate.getMonth();
  375. let date = this.shareDate.getDate();
  376. let time = this.stringify(year, curMonth, date).replace(/-/g,"");
  377. obj.list.push({
  378. year: year,
  379. month: curMonth + 1,
  380. date: date,
  381. weeks:this.calculationWeeks(year, curMonth, date),
  382. value: this.stringify(year, curMonth, date),
  383. key:this.newKey+''+time,
  384. time:time,
  385. disable: curMonth !== month,
  386. checkType:false,
  387. signInCount:0,
  388. noSignedInCount:0,
  389. });
  390. begin += oneDayMS;
  391. }
  392. return obj;
  393. },
  394. //计算当前是周几
  395. calculationWeeks(year, curMonth, date){
  396. let now = new Date(this.stringify(year, curMonth, date));
  397. let day = now.getDay();
  398. let weeks = new Array(
  399. "7",
  400. "1",
  401. "2",
  402. "3",
  403. "4",
  404. "5",
  405. "6"
  406. );
  407. return weeks[day];
  408. },
  409. // 格式化时间
  410. stringify(year, month, date) {
  411. return [year, this.pad(month + 1), this.pad(date)].join("-");
  412. },
  413. // 对小于 10 的数字,前面补 0
  414. pad(str) {
  415. return str < 10 ? `0${str}` : str;
  416. },
  417. // 当前月的第一天是星期几
  418. getFirstDayByMonths(year, month) {
  419. return new Date(year, month, 1).getDay();
  420. },
  421. // 当前月的最后一天是星期几
  422. getLastDayByMonth(year, month) {
  423. return new Date(year, month + 1, 0).getDay();
  424. },
  425. }
  426. }
  427. </script>
  428. <style scoped lang="scss">
  429. .patrolRecord{
  430. display: flex;
  431. flex-direction: column;
  432. font-weight:500;
  433. *{
  434. margin:0;
  435. padding:0;
  436. }
  437. .patrolRecordPage{
  438. flex:1;
  439. display: flex;
  440. overflow: hidden;
  441. .left-page-max-big-box{
  442. width:250px;
  443. overflow: hidden;
  444. display: flex;
  445. flex-direction: column;
  446. padding:36px 0 36px 10px;
  447. .tree-box {
  448. flex: 1;
  449. .terr-max-box:nth-child(1){
  450. margin:0;
  451. }
  452. .terr-max-box {
  453. margin-top: 20px;
  454. .max-name-box {
  455. display: flex;
  456. margin-right: 20px;
  457. margin-bottom: 10px;
  458. color: #D8D8D8;
  459. font-size: 20px;
  460. .max-name {
  461. flex: 1;
  462. margin-right: 19px;
  463. color: #333;
  464. font-size: 16px;
  465. line-height: 16px;
  466. margin-top: 3px;
  467. cursor: pointer;
  468. overflow: hidden;
  469. }
  470. }
  471. .terr-big-box {
  472. margin-left: 30px;
  473. .big-name-box {
  474. cursor: pointer;
  475. height: 40px;
  476. line-height: 40px;
  477. display: flex;
  478. font-size: 16px;
  479. color: #333;
  480. img {
  481. width: 16px;
  482. height: 16px;
  483. margin-top: 12px;
  484. margin-right: 4px;
  485. }
  486. .name-p {
  487. flex: 1;
  488. overflow: hidden;
  489. }
  490. }
  491. .terr-min-box {
  492. margin-left: 30px;
  493. .min-name {
  494. cursor: pointer;
  495. height: 40px;
  496. line-height: 40px;
  497. display: flex;
  498. font-size: 16px;
  499. color: #333;
  500. overflow: hidden;
  501. }
  502. }
  503. }
  504. .check-color {
  505. color: #0183FA !important;
  506. }
  507. }
  508. }
  509. .tree-null-p {
  510. text-align: center;
  511. line-height: 100px;
  512. flex: 1;
  513. color: #999;
  514. }
  515. }
  516. .center-border-p{
  517. border-right:1px dashed #A2A2A2;
  518. margin:36px 35px 36px 0;
  519. }
  520. .right-page-max-big-box{
  521. flex:1;
  522. display: flex;
  523. flex-direction: column;
  524. overflow: hidden;
  525. -webkit-user-select: none;
  526. -moz-user-select: none;
  527. -ms-user-select: none;
  528. user-select: none;
  529. .top-button-max-box{
  530. height:87px;
  531. padding:21px 0 26px 0;
  532. display: flex;
  533. border-bottom:1px solid #E0E0E0;
  534. font-size:14px;
  535. .yearMonthButtonBox{
  536. width:200px;
  537. height:40px;
  538. display: flex;
  539. p{
  540. text-align: center;
  541. line-height:38px;
  542. width:100px;
  543. cursor: pointer;
  544. }
  545. p:nth-child(1){
  546. border-top-left-radius: 4px;
  547. border-bottom-left-radius: 4px;
  548. }
  549. p:nth-child(2){
  550. border-top-right-radius: 4px;
  551. border-bottom-right-radius: 4px;
  552. }
  553. .left-button-one{
  554. background: #0183FA;
  555. border:1px solid #0183FA;
  556. color:#fff;
  557. }
  558. .left-button-tow{
  559. color:#333333;
  560. border:1px solid #E0E0E0;
  561. border-right:none;
  562. }
  563. .right-button-one{
  564. background: #0183FA;
  565. border:1px solid #0183FA;
  566. color:#fff;
  567. }
  568. .right-button-tow{
  569. color:#333333;
  570. border:1px solid #E0E0E0;
  571. border-left:none;
  572. }
  573. }
  574. .year-month-data-button-box{
  575. display: flex;
  576. margin:0 33px 0 39px;
  577. p{
  578. line-height:38px;
  579. text-align: center;
  580. }
  581. .year-month-subtract-button{
  582. border:1px solid #E0E0E0;
  583. border-top-left-radius: 4px;
  584. border-bottom-left-radius: 4px;
  585. width:38px;
  586. cursor: pointer;
  587. }
  588. .year-month-text-p{
  589. border-top:1px solid #E0E0E0;
  590. border-bottom:1px solid #E0E0E0;
  591. width:150px;
  592. }
  593. .year-month-add-button{
  594. border:1px solid #E0E0E0;
  595. border-top-right-radius: 4px;
  596. border-bottom-right-radius: 4px;
  597. width:38px;
  598. cursor: pointer;
  599. }
  600. }
  601. .return-year-month-button{
  602. width:100px;
  603. height:40px;
  604. line-height:38px;
  605. }
  606. .flex-p{
  607. flex:1;
  608. }
  609. .all-button{
  610. width:80px;
  611. height:40px;
  612. margin-right:8px;
  613. line-height:38px;
  614. }
  615. .add-button{
  616. width:80px;
  617. height:40px;
  618. margin-right:23px;
  619. line-height:38px;
  620. }
  621. }
  622. .month-max-big-box{
  623. -webkit-user-select: none;
  624. -moz-user-select: none;
  625. -ms-user-select: none;
  626. user-select: none;
  627. flex:1;
  628. padding:10px 0 30px;
  629. .month-week-box{
  630. display: flex;
  631. overflow: hidden;
  632. font-size:0;
  633. .for-week-box{
  634. font-size:14px;
  635. width:180px;
  636. text-align: center;
  637. line-height:60px;
  638. border-bottom:1px solid #E0E0E0;
  639. }
  640. }
  641. .month-big-box{
  642. border-left:1px solid #E0E0E0;
  643. font-size:0;
  644. .for-month-max-big-box{
  645. overflow: hidden;
  646. font-size:16px;
  647. width:180px;
  648. height:110px;
  649. display: inline-block;
  650. border-right:1px solid #E0E0E0;
  651. border-bottom:1px solid #E0E0E0;
  652. position: relative;
  653. .for-month-top-big-box{
  654. width:180px;
  655. height:50px;
  656. line-height:50px;
  657. text-align: center;
  658. font-size:16px;
  659. color:#333;
  660. }
  661. .for-month-top-big-box-color{
  662. color:#E0E0E0;
  663. }
  664. .for-month-bottom-big-box{
  665. height:60px;
  666. background: rgba(1,131,250,0.2);
  667. color:#0183FA;
  668. display: flex;
  669. cursor: pointer;
  670. .for-month-bottom-left-min-box{
  671. flex: 1;
  672. font-size:14px;
  673. padding:10px 0 0 10px;
  674. p{
  675. line-height:20px;
  676. }
  677. }
  678. .for-month-bottom-right-min-box{
  679. width:24px;
  680. text-align: center;
  681. line-height:60px;
  682. font-size:12px;
  683. font-weight:900;
  684. }
  685. }
  686. }
  687. }
  688. }
  689. .year-max-big-box{
  690. flex:1;
  691. padding:30px 0;
  692. .for-year-max-big-box{
  693. vertical-align:top;
  694. width:596px;
  695. display: inline-block;
  696. margin:0 42px 40px 0;
  697. overflow: hidden;
  698. .year-name-p{
  699. text-align: center;
  700. font-size:16px;
  701. background: #CCE6FE;
  702. color:#0183FA;
  703. line-height:40px;
  704. border-top-left-radius:4px;
  705. border-top-right-radius:4px;
  706. }
  707. .year-week-box{
  708. overflow: hidden;
  709. font-size:0;
  710. background: rgba(224,224,224,0.2);
  711. .for-week-box{
  712. width:85px;
  713. line-height:40px;
  714. text-align: center;
  715. display: inline-block;
  716. font-size:12px;
  717. }
  718. }
  719. .year-big-box{
  720. border-top:1px solid #E0E0E0;
  721. border-left:1px solid #E0E0E0;
  722. overflow: hidden;
  723. font-size:0;
  724. .for-year-big-box{
  725. display: inline-block;
  726. overflow: hidden;
  727. width:85px;
  728. height:60px;
  729. border-right:1px solid #E0E0E0;
  730. border-bottom:1px solid #E0E0E0;
  731. position: relative;
  732. .for-year-top-big-box{
  733. flex:1;
  734. font-size:12px;
  735. color:#333;
  736. line-height:30px;
  737. text-align: center;
  738. }
  739. .for-year-top-big-box-color{
  740. color:#E0E0E0;
  741. }
  742. .for-year-bottom-big-box{
  743. line-height:30px;
  744. font-size:14px;
  745. text-align: center;
  746. background: #CCE6FE;
  747. color:#0183FA;
  748. cursor: pointer;
  749. }
  750. }
  751. }
  752. }
  753. }
  754. .red-backgroud-color{
  755. background: rgba(255,0,0,0.2)!important;
  756. color:#FF0000!important;
  757. }
  758. }
  759. }
  760. }
  761. </style>
  762. <style lang="scss">
  763. .patrolRecord{
  764. .el-tree-node__label{
  765. font-size:16px;
  766. }
  767. .el-tree-node__content{
  768. height:30px;
  769. line-height: 30px;
  770. }
  771. .el-tree-node__expand-icon{
  772. color:#333;
  773. font-size:16px;
  774. padding:0;
  775. margin-right:3px;
  776. }
  777. .el-tree-node__expand-icon.is-leaf{
  778. color: transparent;
  779. }
  780. .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content{
  781. background-color:#ffffff;
  782. color:#0183FA;
  783. }
  784. }
  785. </style>