new-home.vue 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  1. <template>
  2. <div class="app-container">
  3. <el-row>
  4. <el-col :span="12" class="firstcol">
  5. <div class="vue-grid-item cssTransforms">
  6. <div class="el-card ibps-desktop-dashboard is-always-shadow jbd-home-card" alias="paddingApprove">
  7. <div class="el-card__header">
  8. <div class="clearfix">
  9. <span class="jbd-font-style"><i class="el-icon-edit"></i> 待办事宜</span>
  10. </div>
  11. </div>
  12. <el-table
  13. v-loading="waitLoading"
  14. :data="pendingData"
  15. style="color: #000"
  16. align="center"
  17. size="mini"
  18. border
  19. class="jbd-home-task"
  20. @row-click="handleLinkClick"
  21. :row-class-name="tableRowClassName"
  22. >
  23. <!-- <el-table-column show-overflow-tooltip label="年份" width="60">
  24. <template slot-scope="scope">{{ getParenthesesStr(scope.row.subject)[0] }}</template>
  25. </el-table-column> -->
  26. <el-table-column
  27. prop="subject"
  28. label="事务名称"
  29. show-overflow-tooltip
  30. >
  31. <template slot-scope="scope">{{ scope.row.subject.split('(')[0] }}</template>
  32. </el-table-column>
  33. <el-table-column
  34. show-overflow-tooltip
  35. width="100"
  36. label="状态"
  37. >
  38. <template slot-scope="scope">{{ '待' + scope.row.name }}</template>
  39. </el-table-column>
  40. <el-table-column
  41. prop="startDept"
  42. show-overflow-tooltip
  43. width="100"
  44. label="发起部门"
  45. />
  46. <el-table-column
  47. prop="submitBy"
  48. show-overflow-tooltip
  49. width="100"
  50. label="任务发起人"
  51. />
  52. <el-table-column
  53. prop="forwardBy"
  54. show-overflow-tooltip
  55. width="100"
  56. label="任务提交人"
  57. />
  58. <el-table-column
  59. show-overflow-tooltip
  60. width="145"
  61. label="时间"
  62. >
  63. <template slot-scope="scope">{{ scope.row.createTime.slice(0, 16) }}</template>
  64. </el-table-column>
  65. </el-table>
  66. <div>
  67. <el-pagination
  68. @current-change="handleCurrentChange"
  69. :current-page.sync="pendingPage.page"
  70. :page-size="pendingPage.limit"
  71. layout="total, prev, pager, next"
  72. :total="pendingPage.totalCount"
  73. >
  74. </el-pagination>
  75. </div>
  76. </div>
  77. </div>
  78. <bpmn-formrender
  79. :visible="dialogFormVisible"
  80. :task-id="taskId"
  81. :waiJian="waiJian"
  82. :title="FlowName"
  83. :processName="processName"
  84. @callback="getWait()"
  85. @close="visible => (dialogFormVisible = visible)"
  86. />
  87. </el-col>
  88. <el-col :span="12" class="firstcol">
  89. <!-- 展开工作栏-->
  90. <div
  91. v-if="!drawer"
  92. class="jbd-control-cont"
  93. style="background-color: #ddfff1"
  94. >
  95. <el-button
  96. type="success"
  97. icon="el-icon-caret-right"
  98. style="width: 100%; height: 100%"
  99. plain
  100. circle
  101. @mouseover.native="handleClose()"
  102. @mouseleave.native="handleClose()"
  103. />
  104. <p style="color: #000000; font-size: 14px">公</p>
  105. <p style="color: #000000; font-size: 14px">告</p>
  106. </div>
  107. <div class="vue-grid-item cssTransforms">
  108. <div
  109. class="el-card ibps-desktop-dashboard is-always-shadow jbd-home-card"
  110. alias="paddingApprove"
  111. style="width: 100%"
  112. >
  113. <div class="el-card__header">
  114. <div class="clearfix">
  115. <span class="jbd-font-style"><i class="el-icon-document-remove" /> 已办事宜</span>
  116. </div>
  117. </div>
  118. <el-table
  119. v-loading="orverLoading"
  120. :data="handledData"
  121. align="center"
  122. style="color: #000"
  123. class="jbd-home-task"
  124. :row-class-name="tableRowClassName"
  125. border
  126. size="mini"
  127. @row-click="handleLinkClickOrver"
  128. >
  129. <!-- <el-table-column
  130. show-overflow-tooltip
  131. label="年份"
  132. width="60"
  133. >
  134. <template slot-scope="scope">{{ getParenthesesStr(scope.row.subject)[0] }}</template>
  135. </el-table-column> -->
  136. <el-table-column
  137. prop="subject"
  138. label="事务名称"
  139. show-overflow-tooltip
  140. >
  141. <template slot-scope="scope">{{ scope.row.subject.split('(')[0] }}</template>
  142. </el-table-column>
  143. <el-table-column
  144. show-overflow-tooltip
  145. label="状态"
  146. width="100"
  147. >
  148. <template slot-scope="scope">{{ scope.row.curNode ? scope.row.status == 'running' ? '已发起' : '已' + scope.row.curNode : contOfValue(scope.row.status) }}</template>
  149. </el-table-column>
  150. <el-table-column
  151. show-overflow-tooltip
  152. label="发起部门"
  153. width="100"
  154. >
  155. <template slot-scope="scope">{{ getParenthesesStr(scope.row.subject)[1] }}</template>
  156. </el-table-column>
  157. <el-table-column
  158. show-overflow-tooltip
  159. label="任务提交人"
  160. width="100"
  161. >
  162. <template slot-scope="scope">{{ getParenthesesStr(scope.row.subject)[2] }}</template>
  163. </el-table-column>
  164. <el-table-column
  165. show-overflow-tooltip
  166. label="任务发起人"
  167. width="100"
  168. >
  169. <template slot-scope="scope">{{ scope.row.createBy | getUserName(userList)}}</template>
  170. </el-table-column>
  171. <el-table-column
  172. show-overflow-tooltip
  173. width="145"
  174. label="办理时间"
  175. >
  176. <template slot-scope="scope">{{ scope.row.createTime.slice(0, 16) }}</template>
  177. </el-table-column>
  178. </el-table>
  179. <div>
  180. <el-pagination
  181. @current-change="orverCurrentChange"
  182. :current-page.sync="orverPage.page"
  183. :page-size="orverPage.limit"
  184. layout="total, prev, pager, next"
  185. :total="orverPage.totalCount"
  186. >
  187. </el-pagination>
  188. </div>
  189. <!-- <div class="el-card__body">
  190. <div class="el-scrollbar" style="height: 100%;width: 100%;">
  191. <div class="ibps-scrollbar-wrapper el-scrollbar__wrap" style="margin-bottom: -8px; margin-right: -8px;">
  192. <div class="el-scrollbar__view">
  193. <div class="pending-Tabs el-tabs el-tabs--top">
  194. <div class="el-tabs__content">
  195. <div class="el-tab-pane">
  196. <div class="ibps-pr-10 ibps-list ibps-list-default ibps-list-horizontal ibps-list-split">
  197. <div class="ibps-list-container">
  198. <ul
  199. v-for='(item0,index1) in handledData'
  200. :key='index1'
  201. class="ibps-list-items"
  202. >
  203. <li
  204. class="ibps-list-item"
  205. style="cursor: pointer;"
  206. @click="handleLinkClickOrver(item0.id)"
  207. >
  208. <div class="ibps-list-item-meta">
  209. <div class="ibps-list-item-meta-avatar">
  210. <span class="el-avatar el-avatar--icon el-avatar--circle" style="background:#CC7832;"><i class="el-icon-document-copy"></i></span>
  211. </div>
  212. <div class="ibps-list-item-meta-content">
  213. <div class="ibps-list-item-meta-title" style="margin-bottom: 0px;">
  214. <el-link type="primary" :underline="false">
  215. <span class="el-link--inner" style="color: #909399;">{{item0.subject}}</span>
  216. </el-link>
  217. </div>
  218. <div class="ibps-list-item-meta-description">{{ item0.createTime }}</div>
  219. </div>
  220. </div>
  221. <div class="ibps-list-item-extra"></div>
  222. </li>
  223. </ul>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div> -->
  233. </div>
  234. </div>
  235. <bpmn-formrender
  236. :visible="orverDialogFormVisible"
  237. :instance-id="instanceId"
  238. :processName="processName"
  239. @callback="getOrver()"
  240. @close="visible => (orverDialogFormVisible = visible)"
  241. />
  242. </el-col>
  243. </el-row>
  244. <el-drawer
  245. title=""
  246. style="overflow: auto"
  247. :visible.sync="drawer"
  248. :direction="direction"
  249. :before-close="handleClose"
  250. >
  251. <el-row>
  252. <el-col :span="24">
  253. <div class="vue-grid-item cssTransforms" style="margin-bottom: 10px">
  254. <div
  255. class="el-card box-card is-always-shadow jbd-home-card"
  256. alias="userInfo"
  257. style="display: none"
  258. >
  259. <div class="el-card__body">
  260. <div class="ibps-list-item-meta">
  261. <div class="ibps-list-item-meta-avatar">
  262. <span
  263. class="el-avatar el-avatar--icon el-avatar--circle"
  264. style="
  265. height: 50px;
  266. width: 50px;
  267. line-height: 50px;
  268. font-size: 50px;
  269. color: rgb(192, 196, 204);
  270. background: rgb(255, 255, 255);
  271. "
  272. >
  273. <i class="ibps-icon-user-circle"></i>
  274. </span>
  275. </div>
  276. <div class="ibps-list-item-meta-content">
  277. <div class="ibps-list-item-meta-title">
  278. <div class="ibps-item-content">
  279. <!-- <span class="ibps-item-content-title">您好!
  280. <span>{{ orgName }}</span>
  281. <label>{{ name }}</label>
  282. </span><br><br> -->
  283. <div slot="label" class="ibps-item-content-label" style="display: none">
  284. <span style="color: #000000">所属部门<div class="home-text-border">{{ orgName }}</div></span>
  285. <span style="color: #000000">所处岗位<div class="home-text-border">{{ posName }}</div></span>
  286. <span style="color: #000000">拥有角色<div class="home-text-border">{{ roleName }}</div></span>
  287. <!-- <span>邮箱:<span> {{ email }}</span><br><br></span>
  288. <span>当前日期:<span> {{ getDate }}</span><br><br></span> -->
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. <!-- <div style="margin-left:3%;"> <slot name="myslot"></slot></div> -->
  296. </div>
  297. </div>
  298. </el-col>
  299. </el-row>
  300. <el-row>
  301. <el-col :span="24" style="margin-top: 5px; font-size: 14px; margin-bottom: 10px">
  302. <div class="vue-grid-item cssTransforms">
  303. <div
  304. class="el-card ibps-desktop-dashboard is-always-shadow jbd-home-card"
  305. alias="paddingApprove"
  306. style="width: 100%"
  307. >
  308. <div class="el-card__header">
  309. <div class="clearfix">
  310. <span class="jbd-font-style" style="font-family: KaiTi">公告栏目</span>
  311. </div>
  312. </div>
  313. <div class="el-card__body">
  314. <div class="el-scrollbar" style="height: 100%; width: 100%">
  315. <div class="ibps-scrollbar-wrapper el-scrollbar__wrap" style="margin-bottom: -8px;margin-right: -8px">
  316. <div class="el-scrollbar__view">
  317. <div class="pending-Tabs el-tabs el-tabs--top">
  318. <div class="el-tabs__content">
  319. <div class="el-tab-pane">
  320. <div class="ibps-pr-10 ibps-list ibps-list-default ibps-list-horizontal ibps-list-split">
  321. <div class="ibps-list-container">
  322. <ul class="ibps-list-items">
  323. <!-- <li class="ibps-list-item" style="cursor: pointer;" v-for='(item,index0) in newsData' :key='index0' @click="handelInteriorClick(item.id)" >
  324. <div class="ibps-list-item-meta">
  325. <div class="ibps-list-item-meta-content">
  326. <div class="ibps-list-item-meta-title">
  327. <a class="el-link el-link--primary">
  328. <span class="el-link--inner jbd-font-style" style="font-size: 14px;font-family: KaiTi;">{{ item.title }}</span>
  329. </a>
  330. </div>
  331. </div>
  332. </div>
  333. <div class="ibps-list-item-extra">
  334. <div><i class="ibps-icon ibps-icon-dot-circle-o" style="color: rgb(54, 198, 211);"></i>{{ item.userName }} | {{item.publicDate.substring(0,7)}}</div>
  335. </div>
  336. </li> -->
  337. <li
  338. class="ibps-list-item"
  339. style="cursor: pointer"
  340. v-for="(item, index0) in newsDataCms"
  341. :key="index0"
  342. @click="handelInteriorClick(item.sendtime_)"
  343. >
  344. <div class="ibps-list-item-meta">
  345. <div class="ibps-list-item-meta-content">
  346. <div class="ibps-list-item-meta-title">
  347. <a class="el-link el-link--primary">
  348. <span class="el-link--inner jbd-font-style" style="font-size: 14px; font-family: KaiTi;">
  349. <div><span>{{ item.templatename_ }}</span></div>
  350. </span>
  351. </a>
  352. </div>
  353. </div>
  354. </div>
  355. <div class="ibps-list-item-extra">
  356. <div><i class="ibps-icon ibps-icon-dot-circle-o" style="color: rgb(54, 198, 211)"></i>{{ item.NAME_ }} | {{ item.bian_zhi_shi_jian }}</div>
  357. </div>
  358. </li>
  359. </ul>
  360. </div>
  361. </div>
  362. </div>
  363. </div>
  364. </div>
  365. </div>
  366. </div>
  367. </div>
  368. </div>
  369. </div>
  370. </div>
  371. </el-col>
  372. </el-row>
  373. <!-- <el-row>
  374. <el-col :span="24" style="margin-top: 5px;">
  375. <div class="vue-grid-item cssTransforms">
  376. <div
  377. class="el-card ibps-desktop-dashboard is-always-shadow"
  378. alias="paddingApprove"
  379. style="height:434px;width: 100%;"
  380. >
  381. <div class="el-card__body">
  382. <homeCalendar></homeCalendar>
  383. </div>
  384. </div>
  385. </div>
  386. </el-col>
  387. </el-row> -->
  388. </el-drawer>
  389. </div>
  390. </template>
  391. <script>
  392. import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
  393. import { getAccountInfo, findBpm, getNews, unreadMessage, getCmsNews } from '@/api/demo/newHomeApi'
  394. import homeCalendar from './home-calendar'
  395. import { pending, handledTask } from '@/api/platform/office/bpmReceived'
  396. import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
  397. import ActionUtils from '@/utils/action'
  398. const taskState = {
  399. running: '已发起',
  400. end: '已结束',
  401. manualend: '已结束'
  402. }
  403. export default {
  404. components: { BpmnFormrender, homeCalendar },
  405. name: 'calendar',
  406. filters: {
  407. getUserName (v, list) {
  408. let user = list.find(i => i.id_ === v)
  409. return user ? user.name_ : ''
  410. }
  411. },
  412. data() {
  413. return {
  414. taskId: '', // 编辑dialog需要使用
  415. waiJian: '', // 编辑dialog需要使用
  416. waitLoading: false,
  417. drawer: false,
  418. bpmData: [],
  419. newsData: [],
  420. newsDataCms: [],
  421. pendingData: [],
  422. pendingPage: {},
  423. orverPage: {},
  424. handledData: [],
  425. unreadMessageData: [],
  426. instanceId: '',
  427. orverDialogFormVisible: false,
  428. dialogFormVisible: false,
  429. orverLoading: false,
  430. direction: 'rtl',
  431. orgName: '',
  432. roleName: '',
  433. name: '',
  434. email: '',
  435. title: '',
  436. userName: '',
  437. selectName: 'one',
  438. FlowName: '',
  439. activeName: 'first',
  440. getDate: '',
  441. posName: '',
  442. pagination: { page: 1, limit: 10 },
  443. orverPagination: { page: 1, limit: 10 },
  444. sorts: {},
  445. timer: null,
  446. processName: '',
  447. userList: []
  448. }
  449. },
  450. mounted: function () {
  451. this.loadData()
  452. let sql = `select id_, name_ from ibps_party_employee where status_ = 'actived'`
  453. curdPost('sql', sql).then(res => {
  454. this.userList = res.variables && res.variables.data
  455. })
  456. if (this.timer) {
  457. clearInterval(this.timer)
  458. }
  459. this.timer = setInterval(() => {
  460. this.getMessage() /* 获取公告 */
  461. this.getWait() /* 待办任务*/
  462. this.getOrver() /* 已办任务*/
  463. }, 180000)
  464. },
  465. beforeDestroy() {
  466. clearInterval(this.timer)
  467. },
  468. // 路由离开时
  469. beforeRouteLeave(to, from, next) {
  470. clearInterval(this.timer)
  471. },
  472. methods: {
  473. loadData() {
  474. let user = this.$store.getters.userInfo
  475. let pos, role
  476. this.orgName = user.employee.orgName
  477. for (let i in user.positions) {
  478. if (i == 0) pos = user.positions[0].name
  479. else pos = pos + ',' + user.positions[i].name
  480. }
  481. let contRole = this.unique(user.role) //去重
  482. for (let i in contRole) {
  483. if (i == 0) role = contRole[0].name
  484. else role = role + ',' + contRole[i].name
  485. }
  486. this.posName = pos
  487. this.roleName = role
  488. /* 用户消息 */
  489. this.getMessage() /* 获取公告 */
  490. this.getWait() /* 待办任务*/
  491. this.getOrver() /* 已办任务*/
  492. },
  493. tableRowClassName({ row, rowIndex }) {
  494. if (rowIndex % 2 === 1) return 'warning-row'
  495. return 'success-row'
  496. },
  497. /* 数组去重*/
  498. unique(arr) {
  499. const res = new Map()
  500. return arr.filter(arr => !res.has(arr.id) && res.set(arr.id, 1))
  501. },
  502. /* 待办分页*/
  503. handleCurrentChange(val) {
  504. this.pagination.page = val
  505. this.getWait()
  506. },
  507. /* 转换状态码*/
  508. contOfValue(cont) {
  509. let s = taskState[cont]
  510. return s ? s : '暂停'
  511. },
  512. /* 待办任务*/
  513. getWait() {
  514. this.waitLoading = true
  515. pending(this.getFormatParams(null, this.pagination)).then(response => {
  516. let {dataResult, pageResult} = response.data
  517. if (dataResult && dataResult.length) {
  518. let instList = []
  519. dataResult.forEach(item => {
  520. instList.push(item.bpmnInstId)
  521. })
  522. let sql = `select b.bpmn_inst_id_, b.create_by_, a.name_ from ibps_bpm_inst b left join ibps_party_employee a on a.id_ = b.create_by_ where b.bpmn_inst_id_ in (${instList.join(',')}) order by find_in_set(b.bpmn_inst_id_,'${instList.join(',')}')`
  523. curdPost('sql', sql).then(res => {
  524. const data = res.variables && res.variables.data
  525. data.forEach((item, index) => {
  526. dataResult[index].submitBy = item.name_
  527. })
  528. this.pendingData = dataResult
  529. this.pendingPage = pageResult
  530. })
  531. }
  532. this.waitLoading = false
  533. }).catch(() => {
  534. this.waitLoading = false
  535. }) /* 获取待办任务 */
  536. },
  537. /* 已办分页*/
  538. orverCurrentChange(val) {
  539. this.orverPagination.page = val
  540. this.getOrver()
  541. },
  542. /* 已办任务 status*/
  543. getOrver() {
  544. this.orverLoading = true
  545. handledTask(this.getFormatParams(1, this.orverPagination)).then(response => {
  546. let {dataResult, pageResult} = response.data
  547. if (dataResult && dataResult.length) {
  548. // let instList = []
  549. // dataResult.forEach(item => {
  550. // instList.push(item.bpmnInstId)
  551. // })
  552. // let sql = `select b.bpmn_inst_id_, b.create_by_, a.name_ from ibps_bpm_inst b left join ibps_party_employee a on a.id_ = b.create_by_ where b.bpmn_inst_id_ in (${instList.join(',')}) order by find_in_set(b.bpmn_inst_id_,'${instList.join(',')}')`
  553. // curdPost('sql', sql).then(res => {
  554. // const data = res.variables && res.variables.data
  555. // data.forEach((item, index) => {
  556. // dataResult[index].submitBy = item.name_
  557. // })
  558. // })
  559. this.handledData = dataResult
  560. this.orverPage = pageResult
  561. }
  562. this.orverLoading = false
  563. }).catch(() => {
  564. this.orverLoading = false
  565. }) /*获取已办任务 */
  566. },
  567. getMessage() {
  568. // console.log("当前用户id",this.$store.getters.userId)
  569. // console.log(this.$store)
  570. // console.log('当前用户信息', this.$store.getters.userInfo.employee)
  571. // getNews().then(response => {
  572. // this.newsData = response.data;
  573. // this.loading = false
  574. // }).catch(() => {
  575. // this.loading = false
  576. // })
  577. //新公告
  578. // let params = {
  579. // parameters: [
  580. // {
  581. // key: 'response_data',
  582. // value: '{"template_id":"961299238640156672","template_type":"","attrs":{"init_query":"Y","need_page":"Y","page_size":20},"query_columns":[{"label":"接收人","name":"received_","rights":[{"type":"all"}],"common":"Y","same":"Y","field_type":"text","field_options":{},"data_type":"varchar"},{"label":"编制部门","name":"bian_zhi_bu_men_","field_type":"selector","field_options":{"default_value_type":"present","placeholder":"请选择","selector_type":"org","store":"id","multiple":false,"filter":[],"required":false,"hide_rights":false,"read_rights":false,"hide_label":false,"is_width":false,"width":100,"width_unit":"%","is_label_width":false,"label_width":100,"label_width_unit":"px","mobile":true,"display":true,"clearable":true},"data_type":"varchar"}],"display_columns":[{"label":"方式","name":"fa_song_fang_shi_","rights":[{"type":"all"}],"noRightStyle":"","align":"left","sortable":true,"width":"80","same":"Y","field_type":"radio","field_options":{"required":false,"hide_rights":false,"read_rights":false,"hide_label":false,"is_label_width":false,"label_width":100,"label_width_unit":"px","mobile":true,"arrangement":"horizontal","default_value_type":"fixed","datasource":"custom","options":[{"val":"公告","label":"系统内","checked":true},{"val":"短信","label":"短信","checked":false},{"val":"短信和公告","label":"短信和系统内","disabled":false,"checked":false}],"display":true,"clearable":true,"custom_class":"font-weight:bolder"},"data_type":"varchar"},{"label":"类型","name":"templatename_","rights":[{"type":"all"}],"noRightStyle":"","align":"left","sortable":true,"width":"80","same":"Y","field_type":"text","field_options":{"default_value_type":"fixed","placeholder":"请输入","required":false,"is_min_length":false,"is_max_length":false,"hide_rights":true,"read_rights":false,"hide_label":false,"is_width":false,"width":100,"width_unit":"%","is_label_width":false,"label_width":100,"label_width_unit":"px","clearable":true,"mobile":true,"display":true},"data_type":"varchar"},{"label":"通知内容","name":"content_","rights":[{"type":"all"}],"noRightStyle":"","align":"left","sortable":true,"width":"","same":"Y","field_type":"textarea","field_options":{"default_value_type":"fixed","placeholder":"","required":false,"is_min_length":false,"is_max_length":false,"hide_rights":true,"read_rights":false,"hide_label":false,"is_width":false,"width":100,"width_unit":"%","is_label_width":false,"label_width":100,"label_width_unit":"px","clearable":true,"mobile":true,"display":true,"default_value":""},"data_type":"varchar"},{"label":"状态","name":"state_","rights":[{"type":"all"}],"noRightStyle":"","align":"left","sortable":true,"width":"80","same":"Y","field_type":"text","field_options":{},"data_type":"varchar"},{"label":"接收人","name":"received_","rights":[{"type":"all"}],"noRightStyle":"","align":"left","sortable":true,"width":"240","same":"Y","field_type":"text","field_options":{},"data_type":"varchar"},{"label":"发送时间","name":"sendtime_","rights":[{"type":"all"}],"noRightStyle":"","align":"left","sortable":true,"width":"150","same":"Y","field_type":"datePicker","field_options":{"default_value_type":"today","placeholder":"请选择","datefmt_type":"datetime","datefmt":"yyyy-MM-dd HH:mm:ss","required":false,"is_start_date":false,"is_end_date":false,"hide_rights":true,"read_rights":false,"hide_label":false,"is_width":false,"width":100,"width_unit":"%","is_label_width":false,"label_width":100,"label_width_unit":"px","clearable":true,"mobile":true,"display":true},"data_type":"varchar"},{"label":"部门","name":"bian_zhi_bu_men_","rights":[{"type":"all"}],"noRightStyle":"","align":"left","sortable":true,"width":"80","same":"Y","field_type":"selector","field_options":{"default_value_type":"present","placeholder":"请选择","selector_type":"org","store":"id","multiple":false,"filter":[],"required":false,"hide_rights":false,"read_rights":false,"hide_label":false,"is_width":false,"width":100,"width_unit":"%","is_label_width":false,"label_width":100,"label_width_unit":"px","mobile":true,"display":true,"clearable":true},"data_type":"varchar"},{"label":"通知人","name":"bian_zhi_ren_","rights":[{"type":"all"}],"noRightStyle":"","align":"left","sortable":true,"width":"120","same":"Y","field_type":"selector","field_options":{"default_value_type":"present","placeholder":"请选择","selector_type":"user","store":"id","multiple":false,"filter":[],"required":false,"hide_rights":false,"read_rights":false,"hide_label":false,"is_width":false,"width":100,"width_unit":"%","is_label_width":false,"label_width":100,"label_width_unit":"px","mobile":true,"display":true,"clearable":true},"data_type":"varchar"},{"label":"通知人","name":"tong_zhi_ren_","field_type":"text","field_options":{"default_value_type":"fixed","placeholder":"请输入","required":false,"is_min_length":false,"is_max_length":false,"hide_rights":true,"read_rights":true,"hide_label":false,"is_width":false,"width":100,"width_unit":"%","is_label_width":false,"label_width":100,"label_width_unit":"px","clearable":true,"mobile":true,"display":true},"data_type":"varchar"}],"orig_display_columns":"","filter_conditions":[{"label":"默认条件","key":"ffc246c0-5132-4c64-a31c-e46e240f4574","type":"condition","rights":[{"type":"all"}],"filter":{"condition":"OR","rules":[{"id":"fa_song_fang_shi_","field":"fa_song_fang_shi_","label":"发送方式","type":"string","input":"text","operator":"equal","source":"fixed","value":"公告"},{"id":"fa_song_fang_shi_","field":"fa_song_fang_shi_","label":"发送方式","type":"string","input":"text","operator":"equal","source":"fixed","value":"短信和公告"}]}}],"result_columns":[{"label":"主键","name":"id_"},{"label":"租户ID","name":"tenant_id_"},{"label":"IP地址","name":"ip_"},{"label":"创建人","name":"create_by_"},{"label":"发送时间","name":"create_time_","rights":[{"type":"all"}],"same":"Y","field_type":"orig","field_options":{"datefmt_type":"date","datefmt":"yyyy-MM-dd","selector_type":"user","options":[{"val":"","label":""}],"store":"id","dictionary":"","dictionary_name":""}},{"label":"更新时间","name":"update_time_"},{"label":"更新人","name":"update_by_"},{"label":"是否过审","name":"shi_fou_guo_shen_"},{"label":"编制人","name":"bian_zhi_ren_"},{"label":"编制部门","name":"bian_zhi_bu_men_"},{"label":"编制时间","name":"bian_zhi_shi_jian"},{"label":"sendTime","name":"sendtime_"},{"label":"state","name":"state_"},{"label":"templateCode","name":"templatecode_"},{"label":"receive","name":"received_"},{"label":"content","name":"content_"},{"label":"phone","name":"phone_"},{"label":"templateName","name":"templatename_"},{"label":"字段一","name":"zi_duan_yi_"},{"label":"字段二","name":"zi_duan_er_"},{"label":"字段三","name":"zi_duan_san_"},{"label":"通知部门","name":"tong_zhi_bu_men_"},{"label":"发送方式","name":"fa_song_fang_shi_"},{"label":"通知人","name":"tong_zhi_ren_"}],"sort_columns":[{"label":"创建时间","name":"create_time_","direction":"desc"}],"buttons":{"function_buttons":[{"button_type":"search","label":"查询","position":"toolbar"},{"label":"添加","button_type":"custom","rights":[{"type":"all"}],"position":"toolbar","code":"openTask","style":"success"},{"label":"删除","button_type":"remove","rights":[{"type":"all"}],"position":"toolbar"}],"edit_buttons":[{"button_type":"close","label":"关闭"},{"button_type":"save","label":"保存"}]},"export_columns":"","ext_columns":"","datasetKey":"dxtz","unique":"id_","dynamic_params":{}}'
  583. // },
  584. // {
  585. // key: 'filter_condition_key',
  586. // value: ''
  587. // }
  588. // ],
  589. // requestPage: {
  590. // pageNo: 1,
  591. // limit: 20
  592. // },
  593. // sorts: []
  594. // }
  595. // getCmsNews(params).then(response => {
  596. // console.log(response.data.dataResult)
  597. // this.newsDataCms = response.data
  598. // }).catch(() => {
  599. // this.loading = false
  600. // })
  601. let sql = "select td.*,ie.NAME_ from t_dxtz td,ibps_party_employee ie where td.bian_zhi_ren_ = ie.id_ and td.fa_song_fang_shi_ like '%公告%' ORDER BY create_time_ desc"
  602. curdPost('sql', sql).then(res => {
  603. // console.log(res)
  604. if (res.state == 200) {
  605. let dbData = res.variables.data
  606. this.newsDataCms = dbData
  607. // console.log('555', dbData)
  608. }
  609. })
  610. },
  611. getFormatParams(v, pagination) {
  612. const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
  613. return ActionUtils.formatParams(params, pagination, this.sorts)
  614. },
  615. /**
  616. * 处理排序
  617. */
  618. handleSortChange(sort) {
  619. ActionUtils.setSorts(this.sorts, sort)
  620. this.loadData()
  621. },
  622. handelundeMes(id) {
  623. this.newsEditId = id
  624. this.$emit('handleUnreadMessage', id)
  625. unreadMessage().then(response => {
  626. this.$nextTick(() => {
  627. this.unreadMessageData = response.data.system
  628. this.loading = false
  629. })
  630. }).catch(() => {
  631. this.loading = false
  632. })
  633. },
  634. handelInteriorClick(id) {
  635. this.messageEditId = id
  636. this.$emit('handleApprove', id)
  637. console.log('id是:' + id)
  638. },
  639. /**
  640. * 点击待办表格
  641. */
  642. handleLinkClick(cont) {
  643. this.taskId = cont.id || ''
  644. this.waiJian = cont.waiJian || ''
  645. this.FlowName = cont.name
  646. this.processName = this.getProjectName(cont.procDefKey)
  647. this.dialogFormVisible = true
  648. },
  649. /**
  650. * 点击已办表格
  651. */
  652. handleLinkClickOrver(cont) {
  653. this.processName = this.getProjectName(cont.procDefKey)
  654. this.instanceId = cont.id || ''
  655. this.orverDialogFormVisible = true
  656. },
  657. /* 开关右侧栏抽屉*/
  658. handleClose() {
  659. this.drawer = !this.drawer
  660. },
  661. /* 文字替换*/
  662. getParenthesesStr(text) {
  663. let result = ''
  664. if (!text) return result
  665. let regex = /\((.+?)\)/g
  666. let options = text.match(regex)
  667. if (options) {
  668. let option = options[0]
  669. if (option) {
  670. result = option.substring(1, option.length - 1)
  671. }
  672. if (options[1]) {
  673. let yersOption = options[1]
  674. if (yersOption) {
  675. result = result + '/' + yersOption.substring(1, yersOption.length - 1)
  676. }
  677. }
  678. }
  679. return result.split('/')
  680. },
  681. // 获取检测流程对应的检测项目名称
  682. getProjectName(v) {
  683. const { testingList } = this.$store.getters
  684. let res = testingList.find(item => item.processKey === v)
  685. return res ? res.name : ''
  686. }
  687. }
  688. }
  689. </script>
  690. <style lang="scss" scoped>
  691. .el-completing {
  692. background: #409eff !important;
  693. }
  694. .el-col {
  695. min-height: 1px;
  696. }
  697. .firstcol {
  698. padding-right: 10px;
  699. }
  700. .el-nothing {
  701. font-size: 13px;
  702. }
  703. .calendar-day {
  704. text-align: center;
  705. color: #202535;
  706. line-height: 30px;
  707. font-size: 12px;
  708. }
  709. .is-selected {
  710. color: #f8a535;
  711. font-size: 10px;
  712. margin-top: 5px;
  713. }
  714. #calendar .el-button-group > .el-button:not(:first-child):not(:last-child):after {
  715. content: '当月';
  716. }
  717. #calendar .item {
  718. position: relative;
  719. margin: 0;
  720. padding: 0;
  721. height: auto;
  722. border-radius: 4px;
  723. -webkit-box-sizing: border-box;
  724. box-sizing: border-box;
  725. overflow: hidden;
  726. color: #f8a535;
  727. }
  728. .ibps-list-split .ibps-list-item {
  729. border-bottom: 1px solid #dcdfe6;
  730. padding: 6px 0;
  731. }
  732. .jbd-font-style {
  733. font-weight: bold;
  734. }
  735. .home-text-border {
  736. color: #999999;
  737. box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 0px 0 rgba(0, 0, 0, 0.1);
  738. min-height: 20px;
  739. font-size: 14px;
  740. margin-left: 60px;
  741. margin-bottom: 5px;
  742. }
  743. .jbd-home-card {
  744. overflow: auto;
  745. }
  746. .jbd-home-task {
  747. width: 100%;
  748. padding: 10px;
  749. cursor: pointer;
  750. font-size: 12px;
  751. margin-bottom: 35px;
  752. }
  753. .jbd-home-card::-webkit-scrollbar {
  754. display: none;
  755. }
  756. .jbd-control-cont {
  757. text-align: center;
  758. position: absolute;
  759. z-index: 10;
  760. right: 0px;
  761. top: 50%;
  762. }
  763. </style>
  764. <style>
  765. .app-container .el-drawer.rtl {
  766. overflow: scroll;
  767. }
  768. .app-container .el-table th {
  769. background-color: #a7d6f8 !important;
  770. font-size: 14px;
  771. font-weight: bold;
  772. color: #000000;
  773. border: 0px;
  774. }
  775. .app-container .el-table td {
  776. padding: 4px;
  777. }
  778. .app-container .el-table .warning-row {
  779. background: #d3ebfc;
  780. color: #000000;
  781. }
  782. .app-container .el-table .success-row {
  783. background: #f9ffff;
  784. color: #000000;
  785. }
  786. </style>