LineChart.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <template>
  2. <el-card style="min-height: 464px;overflow: hidden;">
  3. <div slot="header" class="clearfix">
  4. <img src="../../assets/image/sq.png" style="display: block;float: left;margin: 1px 5px 0 0;" height="15" width="17"/>
  5. <span>我的工作</span>
  6. <el-button style="float: right; padding: 3px 0;color: #000000;" type="text" @click="more">更多</el-button>
  7. </div>
  8. <el-tabs v-model="activeName" @tab-click="handleClick">
  9. <el-tab-pane label="待办工作" name="first">
  10. <el-table :data="toListItem" style="width: 100%;" :header-cell-style="[]" empty-text="暂无数据">
  11. <template slot="empty">
  12. <div>
  13. <div>
  14. <svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fillRule="evenodd"><ellipse fill="#F5F5F5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fillRule="nonzero" stroke="#D9D9D9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#FAFAFA"></path></g></g></svg>
  15. </div>
  16. <p>暂无数据</p>
  17. </div>
  18. </template>
  19. <el-table-column prop="fwtitle" label="标题" align="left" >
  20. <template slot-scope="scope">
  21. <el-button type="text" @click="openactform(scope.row.processInstanceId,scope.row.businessKey,scope.row.name,scope.row.title,scope.row.taskName)" style="color: black">{{scope.row.title}}</el-button>
  22. </template>
  23. </el-table-column>
  24. <el-table-column prop="taskName" label="流程名称" width="180" align="left"></el-table-column>
  25. <el-table-column prop="name" label="待操作" width="180" align="center"> </el-table-column>
  26. <el-table-column prop="createTime" label="接收时间" width="180" align="center">
  27. <template slot-scope="scope">
  28. <span>{{scope.row.createTime | timefilters}}</span>
  29. </template>
  30. </el-table-column>
  31. </el-table>
  32. </el-tab-pane>
  33. <el-tab-pane label="已办工作" name="second">
  34. <el-table class="body" :data="doneList1" :header-cell-style="{}">
  35. <!-- <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>-->
  36. <el-table-column prop="fwtitle" label="标题" align="left">
  37. <template slot-scope="scope">
  38. <el-button type="text" @click="detern1(scope.row)" style="color: black">{{scope.row.title}}</el-button>
  39. </template>
  40. </el-table-column>
  41. <el-table-column prop="taskName" label="流程名称" width="180" align="left"></el-table-column>
  42. <el-table-column prop="name" label="已操作" width="180" align="center"></el-table-column>
  43. <el-table-column prop="createTime" label="完成时间" width="180" align="center">
  44. <template slot-scope="scope">
  45. <span>{{scope.row.createTime | timefilters}}</span>
  46. </template>
  47. </el-table-column>
  48. </el-table>
  49. </el-tab-pane>
  50. </el-tabs>
  51. <el-dialog id="actform" title="待办工作详情" :visible.sync="actOpen" :before-close="cancel" append-to-body width="80%"
  52. top="10" height="90%">
  53. <!-- 动态引入组件-->
  54. <component :is="actForm" :data="details":actOpen="actOpen" @getList="getList" ></component>
  55. <Option :optiontitle="optiontitle" :optionactkey="optionactkey" :optionid="optionid" :optionName="optionName" v-show="optiontrue"></Option>
  56. </el-dialog>
  57. <el-dialog id="actform1" title="已办工作详情" :visible.sync="actOpen1" :before-close="cancel" append-to-body width="80%" top="10" height="90%">
  58. <!-- 动态引入组件-->
  59. <component :is="actForm1" :data="details1":actOpen="actOpen1" @getList="getList1" ></component>
  60. </el-dialog>
  61. </el-card>
  62. </template>
  63. <script>
  64. import { havedInfo } from "@/api/activiti/form/fw";
  65. import moment from "moment";
  66. import {toDoItemListInfo} from "@/api/activiti/form/fw";
  67. import {getCurrentFlowFormKey,getStartFormKey } from '@/api/activiti/process/startprocess'
  68. import Option from "@/components/files/option";
  69. export default {
  70. components: {Option},
  71. filters: {
  72. timefilters(val) {
  73. if (val == null || val == "") {
  74. return "暂无时间";
  75. } else {
  76. let d = new Date(val); //val 为表格内取到的后台时间
  77. let month =
  78. d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1;
  79. let day = d.getDate() < 10 ? "0" + d.getDate() : d.getDate();
  80. let hours = d.getHours() < 10 ? "0" + d.getHours() : d.getHours();
  81. let min = d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes();
  82. let sec = d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds();
  83. let times=d.getFullYear() + '-' + month + '-' + day + ' ' + hours + ':' + min + ':' + sec;
  84. return moment(val).format("YYYY-MM-DD HH:mm")
  85. }
  86. }
  87. },
  88. data() {
  89. return {
  90. dialogVisible:false,
  91. tabPosition:'left',
  92. optiontrue:false,
  93. optiontitle:'',
  94. optionactkey:'',
  95. optionName:'',
  96. optionid:'',
  97. actForm: null,
  98. actForm1: null,
  99. actOpen:false,
  100. actOpen1:false,
  101. //传入到下一页面的值
  102. details:{
  103. getactkey: '',
  104. formId:'',
  105. flg:'1'},
  106. details1:{getactkey: '',
  107. formId:'',
  108. flg:'2'},
  109. activeName: 'first',
  110. doneList1: [],
  111. toListItem: [],
  112. //参数
  113. raddarParams: {
  114. pageNum: 1,
  115. pageSize: 5,
  116. // orderByColumn: "createTime",
  117. // isAsc:"desc",//排序方式
  118. },
  119. queryParams: {
  120. pageNum: 1,
  121. pageSize: 5,
  122. // executionId:undefined,
  123. // processInstanceId:undefined,
  124. // createTime:undefined,
  125. // formKey:undefined,
  126. // name:undefined,
  127. // businessKey:undefined,
  128. // taskName:undefined,
  129. // id:undefined,
  130. // title:undefined,
  131. // processDfinitionId:undefined,
  132. // assign:undefined,
  133. },
  134. //参数
  135. query: {
  136. pageNum: 1,
  137. pageSize: 4,
  138. actkey:undefined,
  139. create_time:undefined,
  140. avtive_send:undefined,
  141. fwtitle:undefined,
  142. apply_user:undefined,
  143. title:undefined,
  144. content:undefined,
  145. copy_to:undefined,
  146. applyUser:undefined,
  147. update_time:undefined,
  148. security_class:undefined,
  149. businessKey:undefined,
  150. ponderance:undefined,
  151. taskName:undefined,
  152. dispose:undefined,
  153. id:undefined,
  154. fwdept:undefined,
  155. update_by:undefined,
  156. accessory:undefined,
  157. taskid:undefined,
  158. definitionId:undefined,
  159. },
  160. }
  161. },
  162. created() {
  163. this.getList1();
  164. this.getList();
  165. this.cancel();
  166. },
  167. methods: {
  168. // 取消按钮
  169. cancel() {
  170. this.actOpen=false;
  171. this.actOpen1 = false;
  172. },
  173. reset() {
  174. this.form = {
  175. mailGuid: undefined,
  176. senderName: undefined,
  177. senderAccount: undefined,
  178. receiverName: undefined,
  179. receiverAccount: undefined,
  180. mailTheme: undefined,
  181. mailContent: undefined,
  182. createTime: undefined,
  183. status: "0",
  184. deleteTime: undefined
  185. };
  186. this.resetForm("form");
  187. },
  188. getList1() {
  189. this.loading = true;
  190. havedInfo(this.raddarParams).then(response => {
  191. console.log(response.rows)
  192. this.doneList1 = response.rows;
  193. this.loading = false;
  194. this.$emit('getNum','yb',response.total)
  195. });
  196. },
  197. handleClick(tab, event) {
  198. console.log(tab, event);
  199. },
  200. getList() {
  201. this.loading = true;
  202. // 待办请求
  203. toDoItemListInfo(this.queryParams).then(response => {
  204. this.toListItem = response.rows;
  205. if(this.toListItem.length<5){
  206. this.toListItem.length=response.rows.length
  207. }else{
  208. this.toListItem.length=5
  209. }
  210. this.title = response.title;
  211. this.loading = false;
  212. this.$emit('getNum','db',response.total)
  213. });
  214. this.actOpen=false;
  215. this.actOpen1=false;
  216. },
  217. openactform(actkey,id,name,title,taskName) {
  218. //var actkey=row.processDfinitionId;
  219. // alert(id)
  220. //var id=row.businessKey
  221. if(name == "赋文号归档分发"){
  222. this.optiontrue = true;
  223. this.optiontitle = title;
  224. this.optionactkey = actkey;
  225. this.optionid = id;
  226. this.optionName=taskName;
  227. }else{
  228. this.optiontrue = false;
  229. }
  230. let vue = this
  231. actkey=actkey.split(":")[0];
  232. this.details.getactkey = actkey//动态传参到下面的页面
  233. this.details.formId = id//动态传参到下面的页面
  234. this.details.flg = 1//动态传参到下面的flg
  235. getCurrentFlowFormKey(actkey).then(response => {
  236. var path = response.msg
  237. this.actForm = () => Promise.resolve().then(() => require(`@/views/${path}`))
  238. this.actOpen = true
  239. })
  240. this.actOpen =false
  241. return vue.actForm = this.actForm
  242. },
  243. detern(row){
  244. const actkey = row.actkey
  245. const form = row || this.form
  246. this.$router.push({path:'/actwork/todo/tododetails',query: {bd:form,id:actkey }})
  247. },
  248. detern1(row){
  249. var actkey=row.processDfinitionId
  250. var id=row.businessKey
  251. let vue = this
  252. actkey=actkey.split(":")[0];
  253. this.details.getactkey = actkey//动态传参到下面的页面
  254. this.details.formId = id//动态传参到下面的页面
  255. this.details.flg = 2//动态传参到下面的flg
  256. getStartFormKey(actkey).then(response => {
  257. var path = response.msg
  258. this.actForm = () => Promise.resolve().then(() => require(`@/views/${path}`))
  259. })
  260. this.actOpen = true
  261. return vue.actForm = this.actForm
  262. // const actkey = row.taskid || this.ids
  263. // const form = row || this.form
  264. // this.$router.push({path:'/actwork/havedone/havedetails',query: {bd:form,id:actkey }})
  265. },
  266. more(){
  267. if(this.activeName=='first'){
  268. this.$router.replace('/todo')
  269. }else {
  270. this.$router.replace('/havedone')
  271. }
  272. },
  273. }
  274. };
  275. </script>
  276. <style lang="less" scoped>
  277. .el-table--medium td {
  278. padding: 9px 0 !important;
  279. }
  280. .clearfix{
  281. color:#1890ff;
  282. }
  283. body .el-table th.gutter{
  284. display: table-cell!important;
  285. }
  286. .el-table__header{
  287. width: 100% !important;
  288. }
  289. .el-table__thead{
  290. width: 100% !important;
  291. }
  292. .el-table__body{
  293. width: 100% !important;
  294. }
  295. /*.clearfix:before,*/
  296. /*.clearfix:after {*/
  297. /*display: table;*/
  298. /*content: "";*/
  299. /*}*/
  300. /*.clearfix:after {*/
  301. /*clear: both*/
  302. /*}*/
  303. .el-card__header{
  304. background: #f5f5f5;
  305. color:#1890ff;
  306. }
  307. .el-card__body {
  308. padding: 15px 20px 20px 20px;
  309. height: 354px;
  310. }
  311. .el-card__header{
  312. background: #f5f5f5;
  313. }
  314. </style>