Aideindex.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. <template>
  2. <div>
  3. <div class="all-box">
  4. <div class="list-staff">
  5. <div class="aide-schedule">
  6. <!-- 代办任务 日程表 -->
  7. <div class="top" style="background: #fff; padding: 8px 6px">
  8. <div class="modelBox">
  9. <span class="radis"></span>
  10. </div>
  11. <div class="tabs" style="width: 100%">
  12. <FullCalendar ref="fullCalendar" :options="calendarOptions" class="demo-app-calendar" />
  13. </div>
  14. </div>
  15. </div>
  16. <div class="staff-list">
  17. <div class="staff-title">
  18. <div>员工列表</div>
  19. <div class="staff-box">
  20. <el-input
  21. placeholder="请输入内容"
  22. v-model="input"
  23. clearable>
  24. </el-input>
  25. <el-button type="primary"><i class="iconfont icon-sousuo"></i></el-button>
  26. </div>
  27. </div>
  28. <template>
  29. <el-table
  30. :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
  31. border
  32. style="width: 100%">
  33. <el-table-column
  34. prop="num"
  35. label="序 号"
  36. width="60">
  37. </el-table-column>
  38. <el-table-column
  39. prop="name"
  40. width="100"
  41. label="员工号">
  42. </el-table-column>
  43. <el-table-column
  44. width="100"
  45. prop="name"
  46. label="姓 名">
  47. </el-table-column>
  48. <el-table-column
  49. prop="date"
  50. label="分属公司"
  51. width="220">
  52. </el-table-column>
  53. <el-table-column
  54. prop="date"
  55. label="职 位"
  56. width="200">
  57. </el-table-column>
  58. <el-table-column
  59. prop="date"
  60. label="分机号"
  61. width="100">
  62. </el-table-column>
  63. <el-table-column
  64. prop="pnum"
  65. label="手机号"
  66. width="200">
  67. </el-table-column>
  68. <el-table-column
  69. prop="pnum"
  70. label="紧急联络电话"
  71. width="200">
  72. </el-table-column>
  73. <el-table-column
  74. prop="date"
  75. label="电子邮箱">
  76. </el-table-column>
  77. </el-table>
  78. </template>
  79. <div class="block">
  80. <el-pagination align='center'
  81. @size-change="handleSizeChange"
  82. @current-change="handleCurrentChange"
  83. :current-page="currentPage"
  84. :page-sizes="[10,15,20]"
  85. :page-size="pageSize"
  86. layout="total, sizes, prev, pager, next"
  87. :total="tableData.length">
  88. </el-pagination>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </template>
  95. <script>
  96. import FullCalendar from '@fullcalendar/vue'
  97. import dayGridPlugin from '@fullcalendar/daygrid'
  98. import timeGridPlugin from '@fullcalendar/timegrid'
  99. import interactionPlugin from '@fullcalendar/interaction'
  100. import zhCnLocale from '@fullcalendar/core/locales/zh-cn'
  101. import tippy from 'tippy.js';
  102. export default {
  103. components:{
  104. FullCalendar
  105. },
  106. data(){
  107. return{
  108. tableData: [
  109. {
  110. num:'1',
  111. date: '2016-05-03',
  112. name: '王小虎',
  113. pnum:'15896358421',
  114. address: '上海市普陀区金沙江路 1518 弄'
  115. },
  116. {
  117. num:'2',
  118. date: '2016-05-02',
  119. name: '王小虎',
  120. pnum:'15896358421',
  121. address: '上海市普陀区金沙江路 1518 弄'
  122. },
  123. {
  124. num:'3',
  125. date: '2016-05-04',
  126. name: '王小虎',
  127. pnum:'15896358421',
  128. address: '上海市普陀区金沙江路 1518 弄'
  129. },
  130. {
  131. num:'4',
  132. date: '2016-05-01',
  133. name: '王小虎',
  134. pnum:'15896358421',
  135. address: '上海市普陀区金沙江路 1518 弄'
  136. },
  137. {
  138. num:'5',
  139. date: '2016-05-08',
  140. name: '王小虎',
  141. pnum:'15896358421',
  142. address: '上海市普陀区金沙江路 1518 弄'
  143. },
  144. {
  145. num:'6',
  146. date: '2016-05-06',
  147. name: '王小虎',
  148. pnum:'15896358421',
  149. address: '上海市普陀区金沙江路 1518 弄'
  150. },
  151. {
  152. num:'7',
  153. date: '2016-05-07',
  154. name: '王小虎',
  155. pnum:'15896358421',
  156. address: '上海市普陀区金沙江路 1518 弄'
  157. },
  158. {
  159. num:'8',
  160. date: '2016-05-06',
  161. name: '王小虎',
  162. pnum:'15896358421',
  163. address: '上海市普陀区金沙江路 1518 弄'
  164. },
  165. {
  166. num:'9',
  167. date: '2016-05-07',
  168. name: '王小虎',
  169. pnum:'15896358421',
  170. address: '上海市普陀区金沙江路 1518 弄'
  171. },
  172. {
  173. num:'10',
  174. date: '2016-05-06',
  175. name: '王小虎',
  176. pnum:'15896358421',
  177. address: '上海市普陀区金沙江路 1518 弄'
  178. },
  179. {
  180. num:'11',
  181. date: '2016-05-07',
  182. name: '王小虎',
  183. pnum:'15896358421',
  184. address: '上海市普陀区金沙江路 1518 弄'
  185. },
  186. {
  187. num:'12',
  188. date: '2016-05-06',
  189. name: '王小虎',
  190. pnum:'15896358421',
  191. address: '上海市普陀区金沙江路 1518 弄'
  192. },
  193. {
  194. num:'13',
  195. date: '2016-05-07',
  196. name: '王小虎',
  197. pnum:'15896358421',
  198. address: '上海市普陀区金沙江路 1518 弄'
  199. },
  200. {
  201. num:'14',
  202. date: '2016-05-06',
  203. name: '王小虎',
  204. pnum:'15896358421',
  205. address: '上海市普陀区金沙江路 1518 弄'
  206. },
  207. {
  208. num:'15',
  209. date: '2016-05-07',
  210. name: '王小虎',
  211. pnum:'15896358421',
  212. address: '上海市普陀区金沙江路 1518 弄'
  213. },
  214. {
  215. num:'16',
  216. date: '2016-05-06',
  217. name: '王小虎',
  218. pnum:'15896358421',
  219. address: '上海市普陀区金沙江路 1518 弄'
  220. },
  221. {
  222. num:'17',
  223. date: '2016-05-07',
  224. name: '王小虎',
  225. pnum:'15896358421',
  226. address: '上海市普陀区金沙江路 1518 弄'
  227. }
  228. ],
  229. currentPage: 1, // 当前页码
  230. pageSize: 8 ,// 每页的数据条数
  231. input:'',
  232. //日程数据
  233. calendarOptions: {
  234. plugins: [
  235. // 加载插件,V5采用插件模块方式加入
  236. dayGridPlugin,
  237. timeGridPlugin,
  238. interactionPlugin, // needed for dateClick
  239. ],
  240. //height: 660, //日历高度
  241. width: 600,
  242. headerToolbar: {
  243. // 头部toolba
  244. left: 'prev,next today',
  245. center: 'title',
  246. right: 'timeGridDay,timeGridWeek,dayGridMonth',
  247. // right: 'dayGridMonth'
  248. },
  249. handleWindowResize: true, //随浏览器窗口变化
  250. initialView: 'dayGridMonth', // 初始化插件显示
  251. // initialDate:""//初始化日期
  252. // initialEvents: INITIAL_EVENTS, // alternatively, use the `events` setting to fetch from a feed
  253. //editable: true, //是否可编辑
  254. // droppable: true,//可拖拽的
  255. // timeZone: 'local',//采用时区
  256. selectable: true,
  257. // selectMirror: true,
  258. dayMaxEvents: true,
  259. // weekends: true, // 是否显示一周七天
  260. // select: this.handleDateSelect,
  261. // eventClick: this.handleEventClick, // 日程点击事件
  262. eventMouseEnter: this.handleEventMouseEnter, // 用户将鼠标悬停在事件上时触发
  263. // eventsSet: this.handleEvents,
  264. dateClick: this.handleDateClick,//日期方格点击事件
  265. eventClick: this.handleEventClick, //日程点击事件
  266. locale: zhCnLocale,
  267. nextDayThreshold: '01:00:00',
  268. events: [
  269. //日程事件的json
  270. { title: '雷怡', date: '2023-03-24 12:00:00',color:'#ff9900'},
  271. { title: '雷怡', date: '2023-03-24 15:00:00',color:'#ff9900'},
  272. { title: 'event 1', start: '2023-03-25 10:59:23',end:'2023-03-26 14:59:23' },
  273. { title: 'event 3', date: '2023-03-25 08:23:00' },
  274. { title: 'event 4', date: '2023-03-25 09:30:00' },
  275. { title: 'event 5', date: '2023-03-26 12:00:00' },
  276. { title: 'event 2', date: '2023-03-26 15:00:00' }
  277. ],
  278. // datesSet: this.handleDateSet,
  279. /* you can update a remote database when these fire:
  280. eventAdd:
  281. eventChange:
  282. eventRemove:
  283. */
  284. }
  285. }
  286. },
  287. methods:{
  288. //每页条数改变时触发 选择一页显示多少行
  289. handleSizeChange(val) {
  290. this.currentPage = 1;
  291. this.pageSize = val;
  292. },
  293. //当前页改变时触发 跳转其他页
  294. handleCurrentChange(val) {
  295. this.currentPage = val;
  296. },
  297. handleEventMouseEnter(info) {
  298. console.log(info, 'yyyy')
  299. let col = info.event.borderColor
  300. let eve = info.event._def.extendedProps
  301. let category = info.event._def.extendedProps.category
  302. tippy(info.el, {
  303. // content:"<div style='width: 280px;background-color:#FAFAFA;padding:5px;font-size:14px;z-index:99999'>" +
  304. // "<div style='color: #666666;overflow: hidden;'><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>会议名称:" + info.event.title+"</div>" +
  305. // "<div style='color: #666666;overflow: hidden;'><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>会议类型:"+eve.type+"</div>" +
  306. // "<div style='color: #666666;overflow: hidden;'><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>会议时间:"+eve.times+"</div>" +
  307. // "<div style='color: #666666;overflow: hidden;'><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>会议状态:"+eve.status+"</div>" +
  308. // "</div>",
  309. content: `<div style='width: 260px;background-color:#FAFAFA;padding:5px;font-size:14px;z-index:99999;'>
  310. <div style='display:flex;color: #666666;overflow: hidden;' class="${ eve.category == 1 ? 'hidden' : ''}">
  311. <div><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>会议名称: </div>
  312. <div style="width:161px;white-space:normal;overflow: auto;table-layout:fixed; word-break: break-all; height:auto;display:inner-block">${info.event.title}</div>
  313. </div>
  314. <div style='color: #666666;overflow: hidden;' class="${ eve.category == 1 ? 'hidden' : ''}"><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>会议类型:${eve.type}</div>
  315. <div style='color: #666666;overflow: hidden;' class="${ eve.category == 1 ? 'hidden' : ''}"><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>会议时间:${eve.times}</div>
  316. <div style='color: #666666;overflow: hidden;' class="${ eve.category == 1 ? 'hidden' : ''}"><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>会议状态:${eve.status}</div>
  317. <div style='color: #666666;overflow: hidden;' class="${ eve.category == 0 ? 'hidden' : ''}"><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>年份:${eve.year}</div>
  318. <div style='color: #666666;overflow: hidden;' class="${ eve.category == 0 ? 'hidden' : ''}"><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>领域角色:${eve.depRoleName}</div>
  319. <div style='color: #666666;overflow: hidden;' class="${ eve.category == 0 ? 'hidden' : ''}"><span style='display:inline-block;width:6px;height:6px;background-color:#318DDE;border-radius:50%;margin:0 5px;'></span>姓名:${eve.name}</div>
  320. </div>`,
  321. theme: 'light', //主题选取
  322. // trigger: 'click', //触发类型
  323. interactive: true, //可交互的
  324. placement: 'top-start', //悬浮框位置
  325. allowHTML: true, //是否允许html文本
  326. zIndex: 99999,
  327. })
  328. },
  329. handleEventClick(info){
  330. console.log(info)
  331. },
  332. handleDateClick(inif){
  333. // console.log(info)
  334. }
  335. }
  336. }
  337. </script>
  338. <style>
  339. .staff-list{
  340. background-color: #fff;
  341. padding: 10px;
  342. box-shadow: 0 0 5px #0005;
  343. border-radius: 10px;
  344. }
  345. .staff-title{
  346. display: flex;
  347. font-size: 17px;
  348. font-weight:600 ;
  349. color: #555;
  350. margin-top: 8px;
  351. margin-bottom: 2px;
  352. justify-content: space-between;
  353. align-items: center;
  354. }
  355. .staff-box{
  356. display: flex;
  357. }
  358. .staff-box>button{
  359. margin-left: 10px;
  360. padding: 8px 20px;
  361. }
  362. .aide-schedule{
  363. margin-bottom: 20px;
  364. border-radius: 10px;
  365. box-shadow: 0 0 5px #0005;
  366. overflow: hidden;
  367. }
  368. /*element*/
  369. .el-table td.el-table__cell div{
  370. text-align: center;
  371. }
  372. .el-table th.el-table__cell>.cell{
  373. text-align: center;
  374. }
  375. /*FullCalendar*/
  376. .fc .fc-toolbar-title{
  377. color: #555;
  378. }
  379. .fc .fc-button-primary{
  380. background-color: #5EADFF;
  381. border-color: #5EADFF;
  382. }
  383. .fc .fc-button-primary:hover{
  384. background-color: #108dff;
  385. border-color: #108dff;
  386. }
  387. .fc .fc-button-primary:not(:disabled):active:focus {
  388. box-shadow: none;
  389. }
  390. .fc .fc-button-primary:not(:disabled):active {
  391. background-color: #108dff;
  392. border-color: #108dff;
  393. }
  394. .fc .fc-button-primary:focus {
  395. box-shadow: none;
  396. }
  397. .fc .fc-button-primary:disabled {
  398. background-color: #5EADFF;
  399. border-color: #5EADFF;
  400. }
  401. .fc .fc-button-primary:not(:disabled).fc-button-active:focus{
  402. box-shadow:none;
  403. }
  404. .fc .fc-button-primary:not(:disabled).fc-button-active{
  405. background-color: #108dff;
  406. border-color: #108dff;
  407. }
  408. .fc .fc-toolbar.fc-header-toolbar{
  409. margin-bottom: 0.1em;
  410. }
  411. </style>