evaluationDeptBusinessPage.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. <template>
  2. <div class="evaluationBusiness">
  3. <div class="evaluationBusinessBtn">
  4. <div class="collectSeach" :style="$utils.collectSeachSty()">
  5. <div class="exceed">
  6. <span class="exceedSpan">业务编号:</span>
  7. <el-input v-model="rescode" placeholder="请输入业务编号"></el-input>
  8. </div>
  9. <div class="exceed">
  10. <span class="exceedSpan">业务简述:</span>
  11. <el-input v-model="resDes" placeholder="请输入业务简述"></el-input>
  12. </div>
  13. <seachs @handleSeach="getSeachData" @handleRest="resetSeach"></seachs>
  14. <el-button size="mini" color="#3B7AD1" icon="Operation" v-if="userId === '23031009'"
  15. @click="businessTableFn" style="margin-left: 10px">
  16. <span>统计汇总</span>
  17. </el-button>
  18. </div>
  19. <div class="evaluationBusinessTableData">
  20. <el-table :data="evaluationBusinessData" style="width: 100%" @row-dblclick="getDetail">
  21. <el-table-column type="selection" label="操作" align="center"></el-table-column>
  22. <el-table-column label="业务编号" prop="responsibilityCode" width="300" />
  23. <el-table-column label="考评年度" prop="appraisalYear" width="200" />
  24. <el-table-column label="考评部门" prop="deptName" width="200" />
  25. <!-- <el-table-column label="业务简述" prop="des">
  26. <template #default="scope">
  27. <el-tooltip class="box-item" effect="customized" :content="scope.row.des" placement="top">
  28. <span class="tooltipCC">{{scope.row.des}}</span>
  29. </el-tooltip>
  30. </template>
  31. </el-table-column> -->
  32. <el-table-column label="流程状态" prop="stage" width="200">
  33. <template #default="scope">
  34. <p class="indicitem" @click="seeStates(scope.row)">{{scope.row.stage}}</p>
  35. </template>
  36. </el-table-column>
  37. <el-table-column label="创建人" prop="createName" width="200" />
  38. <el-table-column label="创建时间" prop="createTime" width="200" />
  39. <el-table-column label="操作" width="160">
  40. <template #default="scope">
  41. <div style="display:flex">
  42. <p class="indicitem" v-if="scope.row.stage === '流程未启动'"
  43. @click="agetdeptresponsibility(scope.row)">启动</p>
  44. <!-- <p class="indicitem" v-else @click="getDetail(scope.row)">详情</p> -->
  45. <p style="font-size: 12px;margin-right: 20px;" v-else-if="scope.row.stage === '流程已结束'">
  46. 已结束</p>
  47. <p style="font-size: 12px;margin-right: 20px;" v-else>已启动</p>
  48. <p class="indicitem" v-if="scope.row.stage === '流程已结束'"
  49. @click="getGenerateReport(scope.row)">生成报表</p>
  50. </div>
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  55. :current-page="page.currentPage" :page-size="page.pagesize"
  56. layout="total, prev, pager, next, jumper" :total="page.total">
  57. </el-pagination>
  58. </div>
  59. <el-dialog title="流程详情" v-model="statesVisible" :fullscreen="true" :close-on-click-modal="false">
  60. <div class="flowSty">
  61. <iframe id="iframeContain" width="100%" height="500px" frameborder="0" class="iframe"
  62. name="iframeContain" seamless scrolling="no" :src="iframeURL">
  63. </iframe>
  64. <el-table :data="stageArr" style="width: 100%">
  65. <el-table-column type="index" label="序号" align="center" />
  66. <el-table-column label="任务名称" prop="taskName" />
  67. <el-table-column label="任务创建时间" prop="createTime" />
  68. <el-table-column label="任务处理时间" prop="approveTime" />
  69. <el-table-column label="候选人" prop="assignInfo" width="300">
  70. <template #default="scope">
  71. <span>{{changeAssignInfo(scope.row)}}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="执行人" prop="approverName" />
  75. <el-table-column label="处理状态" prop="status">
  76. <template #default="scope">
  77. <div v-if="scope.row.status === 'start'">启动</div>
  78. <div v-else-if="scope.row.status === 'agree'">同意</div>
  79. <div v-else-if="scope.row.status === 'awaiting_check'">等待,待审批</div>
  80. <div v-else-if="scope.row.status === 'reject'">驳回</div>
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="备注/意见" prop="opinion" />
  84. </el-table>
  85. </div>
  86. </el-dialog>
  87. </div>
  88. <business-from-list ref="businessFromDetail"></business-from-list>
  89. <business-table ref="businessTable"></business-table>
  90. </div>
  91. </template>
  92. <script>
  93. import businessFromList from './evaluationDeptBusinessFrom.vue'
  94. import businessTable from './evaluationDeptBusinessTab.vue'
  95. import btns from '../elbuttonS.vue'
  96. import seachs from '../seachGroup.vue'
  97. import {
  98. saveAs
  99. } from 'file-saver'
  100. import {
  101. apiGetevaluationdeptassessmentlist,
  102. apiGetdoAction,
  103. apideptModifyassessmentState,
  104. apiGetworkflowgetOpinion,
  105. apiGetevaluationgenerateReport,
  106. apiGetevaluationdownloadReport
  107. } from '../../api/api'
  108. export default {
  109. components: {
  110. businessFromList,
  111. businessTable,
  112. btns,
  113. seachs
  114. },
  115. data() {
  116. return {
  117. evaluationBusinessData: [],
  118. page: {
  119. pagesize: 12,
  120. currentPage: 1,
  121. total: 0
  122. },
  123. rescode: '',
  124. resDes: '',
  125. iframeURL: '',
  126. stageArr: [],
  127. statesVisible: false,
  128. userId: ''
  129. }
  130. },
  131. created() {
  132. this.getevaluBusinessList()
  133. },
  134. methods: {
  135. // 查询列表页面
  136. getevaluBusinessList() {
  137. let that = this
  138. let userMes = JSON.parse(window.sessionStorage.getItem('user'))
  139. this.userId = userMes.deptId
  140. let params = {
  141. pageNum: that.page.currentPage,
  142. pageSize: that.page.pagesize,
  143. deptId: userMes.deptId,
  144. responsibilityCode: that.rescode,
  145. des: that.resDes
  146. }
  147. apiGetevaluationdeptassessmentlist(params).then(datas => {
  148. if (datas && datas.data) {
  149. that.evaluationBusinessData = datas.data.records
  150. that.page.total = datas.data.total
  151. }
  152. })
  153. },
  154. businessTableFn() {
  155. this.$refs.businessTable.init(this.departData)
  156. },
  157. agetdeptresponsibility(row) {
  158. let that = this
  159. let par = {
  160. defKey: "bbbmyjzbkh",
  161. businessKey: row.id,
  162. action: "start",
  163. opinion: "本部部门业绩指标考核",
  164. iamCode: window.localStorage.getItem('code')
  165. }
  166. apiGetdoAction(par).then(datas => {
  167. if (datas && datas.data) {
  168. if (!datas.data.isOk) {
  169. that.$message({
  170. message: datas.data.msg,
  171. type: 'error'
  172. });
  173. } else {
  174. let params = {
  175. id: row.id,
  176. stage: '流程已开始'
  177. }
  178. apideptModifyassessmentState(params).then(values => {
  179. if (values.success) {
  180. that.getevaluBusinessList()
  181. } else {
  182. that.$message({
  183. message: values.message,
  184. type: 'error'
  185. });
  186. }
  187. })
  188. }
  189. }
  190. })
  191. },
  192. //明细
  193. getDetail(row) {
  194. let userMes = JSON.parse(window.sessionStorage.getItem('user'))
  195. let ispersonDept = window.sessionStorage.getItem('ispersonDept')
  196. if (row.stage === '流程未启动') {
  197. if (ispersonDept === 'true') {
  198. this.$refs.businessFromDetail.init(row)
  199. }
  200. } else {
  201. this.$refs.businessFromDetail.init(row)
  202. }
  203. },
  204. changeAssignInfo(row) {
  205. let showStr = ''
  206. if (row.assignInfo) {
  207. showStr = row.assignInfo.substring(row.assignInfo.indexOf('-') + 1, row.assignInfo.length)
  208. .substring(0, row.assignInfo.substring(row.assignInfo.indexOf('-') + 1, row.assignInfo.length)
  209. .indexOf('-'))
  210. }
  211. return showStr
  212. },
  213. seeStates(row) {
  214. if (!row.instId) {
  215. this.$message({
  216. type: 'error',
  217. message: '无法查看流程'
  218. });
  219. } else {
  220. this.statesVisible = true
  221. let url = ''
  222. if (window.location.hostname === '10.65.78.81') {
  223. url = 'http://10.65.79.85:8080'
  224. } else {
  225. url = 'http://10.65.78.23:8080'
  226. }
  227. this.iframeURL = url + '/agilebpm-ui/bpm/instance/instanceImageDialog.html?instanceId=' + row
  228. .instId + '&iamCode=' + window.localStorage.getItem('code')
  229. this.getstageData(row.instId)
  230. }
  231. },
  232. // 根据流程id获取业务id
  233. getstageData(id) {
  234. let that = this
  235. let params = {
  236. instId: id,
  237. iamCode: window.localStorage.getItem('code')
  238. }
  239. apiGetworkflowgetOpinion(params).then(datas => {
  240. if (datas && datas.data) {
  241. that.stageArr = datas.data.data
  242. }
  243. })
  244. },
  245. getSeachData() {
  246. this.page.currentPage = 1
  247. this.getevaluBusinessList()
  248. },
  249. resetSeach() {
  250. this.page.currentPage = 1
  251. this.rescode = ''
  252. this.resDes = ''
  253. this.getevaluBusinessList()
  254. },
  255. handleSizeChange(val) {
  256. this.page.pagesize = val
  257. this.getevaluBusinessList()
  258. },
  259. handleCurrentChange(val) {
  260. this.page.currentPage = val
  261. this.getevaluBusinessList()
  262. },
  263. getGenerateReport(row) {
  264. let that = this
  265. apiGetevaluationgenerateReport(row.id).then(datas => {
  266. if (datas.success) {
  267. apiGetevaluationdownloadReport(datas.data).then(datass => {
  268. let blob = new Blob([datass], {
  269. type: 'application/msword;charset=UTF-8'
  270. })
  271. saveAs(blob, `${datas.data}`)
  272. })
  273. } else {
  274. that.$message({
  275. message: datas.message,
  276. type: 'error'
  277. });
  278. }
  279. })
  280. }
  281. }
  282. }
  283. </script>
  284. <style lang="less">
  285. .evaluationBusiness {
  286. .evaluationBusinessBtn {
  287. .collectSeach {
  288. display: flex;
  289. padding: 24px 20px;
  290. border-bottom: 1px solid#D6DBEA;
  291. .exceed {
  292. display: flex;
  293. .exceedSpan {
  294. width: 100px;
  295. height: 12px;
  296. font-size: 14px;
  297. font-family: Microsoft YaHei;
  298. font-weight: 400;
  299. color: #8991B0;
  300. line-height: 12px;
  301. margin-top: 14px;
  302. }
  303. .el-input {
  304. margin-right: 10px;
  305. height: 40px;
  306. .el-input__inner {
  307. height: 40px;
  308. }
  309. .el-input__suffix {
  310. .el-select__caret {
  311. line-height: 30px;
  312. }
  313. }
  314. }
  315. }
  316. .el-select {
  317. margin-right: 10px;
  318. .el-input__inner {
  319. height: 30px;
  320. }
  321. .el-input__suffix {
  322. .el-select__caret {
  323. line-height: 30px;
  324. }
  325. }
  326. }
  327. }
  328. span {
  329. font-size: 14px;
  330. }
  331. .el-button {
  332. height: 30px;
  333. // width:100px;
  334. padding: 0 20px;
  335. // padding-top: 8px;
  336. span {
  337. margin: 0;
  338. }
  339. }
  340. .evaluationBusinessTableData {
  341. .el-table {
  342. .el-table__body-wrapper {
  343. height: 68vh !important;
  344. }
  345. .el-input__inner {
  346. height: 30px !important;
  347. }
  348. .el-radio__label {
  349. display: none;
  350. }
  351. .tooltipCC {
  352. width: 300px;
  353. display: inline-block;
  354. overflow: hidden;
  355. text-overflow: ellipsis;
  356. white-space: nowrap;
  357. }
  358. .tooltipCCDes {
  359. width: 200px;
  360. display: inline-block;
  361. overflow: hidden;
  362. text-overflow: ellipsis;
  363. white-space: nowrap;
  364. }
  365. .indicitem {
  366. color: #409EFF;
  367. font-size: 12px;
  368. margin-right: 20px;
  369. cursor: pointer;
  370. &:hover {
  371. text-decoration: underline;
  372. }
  373. }
  374. }
  375. .el-pagination {
  376. margin-top: 20px;
  377. text-align: end;
  378. position: relative;
  379. }
  380. }
  381. .el-overlay {
  382. .startToDia {
  383. .el-dialog__body {
  384. padding: 30px 60px 30px 20px !important;
  385. .periodFrom {
  386. .el-select,
  387. .el-input {
  388. width: 100%;
  389. }
  390. .el-input {
  391. height: 30px;
  392. }
  393. }
  394. .flowSty {
  395. width: 100%;
  396. height: 70vh;
  397. }
  398. }
  399. }
  400. }
  401. }
  402. }
  403. </style>