|
|
@@ -1,72 +1,117 @@
|
|
|
<template>
|
|
|
- <ibps-container ref="dashboardContainer" v-loading="loading"
|
|
|
- :element-loading-text="$t('common.loading')"
|
|
|
- :scroll-delay="scrollDelay" type="full" class="ibps-desktop-page" @scroll="({x, y}) => { scrollTop = y }">
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <newHome @handleApprove="handleApprove" @handleUnreadMessage="handleUnreadMessage">
|
|
|
-
|
|
|
- <template slot="myslot">
|
|
|
- <el-upload
|
|
|
- style="display:inline-block;"
|
|
|
+ <ibps-container
|
|
|
+ ref="dashboardContainer"
|
|
|
+ v-loading="loading"
|
|
|
+ :element-loading-text="$t('common.loading')"
|
|
|
+ :scroll-delay="scrollDelay"
|
|
|
+ type="full"
|
|
|
+ class="ibps-desktop-page"
|
|
|
+ @scroll="
|
|
|
+ ({ x, y }) => {
|
|
|
+ scrollTop = y
|
|
|
+ }
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <newHome
|
|
|
+ @handleApprove="handleApprove"
|
|
|
+ @handleUnreadMessage="handleUnreadMessage"
|
|
|
+ >
|
|
|
+ <template slot="myslot">
|
|
|
+ <el-upload
|
|
|
+ style="display: inline-block"
|
|
|
class="upload-demo"
|
|
|
:action="uloadPath"
|
|
|
- :headers = "headers"
|
|
|
+ :headers="headers"
|
|
|
:before-upload="beforeUpload"
|
|
|
:show-file-list="false"
|
|
|
:on-error="fileErr"
|
|
|
- :on-success = 'handleSuccess'>
|
|
|
- <el-button size="small" icon="el-icon-s-management" plain type="primary">导入委托单</el-button>
|
|
|
- </el-upload>
|
|
|
+ :on-success="handleSuccess"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-s-management"
|
|
|
+ plain
|
|
|
+ type="primary"
|
|
|
+ >导入委托单</el-button
|
|
|
+ >
|
|
|
+ </el-upload>
|
|
|
|
|
|
- <el-upload
|
|
|
- style="display:inline-block;margin-left: 10px;"
|
|
|
+ <el-upload
|
|
|
+ style="display: inline-block; margin-left: 10px"
|
|
|
class="upload-demo"
|
|
|
:action="reportPath"
|
|
|
v-if="showRepost"
|
|
|
- :headers = "headers"
|
|
|
+ :headers="headers"
|
|
|
:before-upload="ReportBeforeUpload"
|
|
|
:show-file-list="false"
|
|
|
:on-error="fileErr"
|
|
|
- :on-success = 'handleSuccess'>
|
|
|
+ :on-success="handleSuccess"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ icon="el-icon-s-order"
|
|
|
+ type="primary"
|
|
|
+ >替换/新增报表</el-button
|
|
|
+ >
|
|
|
+ </el-upload>
|
|
|
|
|
|
- <el-button
|
|
|
- size="small" plain
|
|
|
- icon="el-icon-s-order"
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
- >替换/新增报表</el-button>
|
|
|
-
|
|
|
- </el-upload>
|
|
|
-
|
|
|
- <el-button
|
|
|
- type="primary" plain
|
|
|
+ plain
|
|
|
size="small"
|
|
|
- style="display:inline-block;margin-left: 10px;"
|
|
|
+ style="display: inline-block; margin-left: 10px"
|
|
|
icon="el-icon-download"
|
|
|
@click="downloadData()"
|
|
|
- >
|
|
|
- 下载桌面应用</el-button>
|
|
|
- </template>
|
|
|
-
|
|
|
- </newHome>
|
|
|
- <ibps-back-to-top :visibility-height="150" :scroll-top="scrollTop" transition-name="fade"
|
|
|
- @scrollToTop="scrollToTop"/>
|
|
|
- <preview :id="id" :visible="dialogPreviewVisible"
|
|
|
- title="全屏预览" screen @close="visible => dialogPreviewVisible = visible"/>
|
|
|
- <bpmn-formrender :visible="bpmnFormrenderDialogVisible"
|
|
|
- :def-id="defId" :task-id="taskId" :instance-id="instanceId"
|
|
|
- @close="visible => bpmnFormrenderDialogVisible = visible" @callback="handleFlowCallback"/>
|
|
|
-
|
|
|
- <ibps-news-dialog :id="newsEditId" title="公告栏目明细" :visible="ibpsNewsDialogVisible"
|
|
|
- :readonly="true" @close="visible => ibpsNewsDialogVisible = visible" />
|
|
|
-
|
|
|
- <ibps-message-dialog :id="messageEditId" title="消息明细" :readonly="true"
|
|
|
- :visible="ibpsMessageDialogVisible" @close="visible => ibpsMessageDialogVisible = visible"/>
|
|
|
- </ibps-container>
|
|
|
-
|
|
|
- <!-- <template v-if="initLoading">
|
|
|
+ >
|
|
|
+ 下载桌面应用</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </newHome>
|
|
|
+ <ibps-back-to-top
|
|
|
+ :visibility-height="150"
|
|
|
+ :scroll-top="scrollTop"
|
|
|
+ transition-name="fade"
|
|
|
+ @scrollToTop="scrollToTop"
|
|
|
+ />
|
|
|
+ <preview
|
|
|
+ :id="id"
|
|
|
+ :visible="dialogPreviewVisible"
|
|
|
+ title="全屏预览"
|
|
|
+ screen
|
|
|
+ @close="(visible) => (dialogPreviewVisible = visible)"
|
|
|
+ />
|
|
|
+ <bpmn-formrender
|
|
|
+ :visible="bpmnFormrenderDialogVisible"
|
|
|
+ :def-id="defId"
|
|
|
+ :task-id="taskId"
|
|
|
+ :instance-id="instanceId"
|
|
|
+ @close="(visible) => (bpmnFormrenderDialogVisible = visible)"
|
|
|
+ @callback="handleFlowCallback"
|
|
|
+ />
|
|
|
+
|
|
|
+ <ibps-news-dialog
|
|
|
+ :id="newsEditId"
|
|
|
+ title="公告栏目明细"
|
|
|
+ :visible="ibpsNewsDialogVisible"
|
|
|
+ :readonly="true"
|
|
|
+ @close="(visible) => (ibpsNewsDialogVisible = visible)"
|
|
|
+ />
|
|
|
+
|
|
|
+ <ibps-message-dialog
|
|
|
+ :id="messageEditId"
|
|
|
+ title="消息明细"
|
|
|
+ :readonly="true"
|
|
|
+ :visible="ibpsMessageDialogVisible"
|
|
|
+ @close="(visible) => (ibpsMessageDialogVisible = visible)"
|
|
|
+ />
|
|
|
+
|
|
|
+ <div class="footer">
|
|
|
+ <span>© 2022{{ year == '2022' ? '' : `-${year}` }}深圳市明鉴细胞专业技术有限公司 版权所有 |<a href="https://beian.miit.gov.cn" target="_blank">粤ICP备2022077950号</a></span>
|
|
|
+ </div>
|
|
|
+ </ibps-container>
|
|
|
+
|
|
|
+ <!-- <template v-if="initLoading">
|
|
|
<template v-if="localSystem">
|
|
|
<ibps-grid-layout v-if="layout && layout.length >0" :layout.sync="layout"
|
|
|
:col-num="colNum" :row-height="rowHeight" :is-draggable="isDraggable"
|
|
|
@@ -88,21 +133,18 @@
|
|
|
</template> -->
|
|
|
<!--不是本地系统-->
|
|
|
<!-- <template v-else> -->
|
|
|
- <!--iframe方式-->
|
|
|
- <!-- <iframe v-if="systemUrlType === 'iframe'" ref="systemrender" class="ibps-container-frame" frameborder="0"/> -->
|
|
|
- <!--vue组件方式-->
|
|
|
- <!-- <component :is="systemUrlName" v-else ref="systemrender" :params="systemUrlParams"/> -->
|
|
|
+ <!--iframe方式-->
|
|
|
+ <!-- <iframe v-if="systemUrlType === 'iframe'" ref="systemrender" class="ibps-container-frame" frameborder="0"/> -->
|
|
|
+ <!--vue组件方式-->
|
|
|
+ <!-- <component :is="systemUrlName" v-else ref="systemrender" :params="systemUrlParams"/> -->
|
|
|
+ <!-- </template> -->
|
|
|
<!-- </template> -->
|
|
|
- <!-- </template> -->
|
|
|
-
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
import { getMyDesktop } from '@/api/platform/desktop/myLayout'
|
|
|
import { initColumn, isInit, getComponents } from './components'
|
|
|
-import { BASE_API,BUSINESS_BASE_URL } from '@/api/baseUrl' //引用导出地址
|
|
|
+import { BASE_API, BUSINESS_BASE_URL } from '@/api/baseUrl' //引用导出地址
|
|
|
// 网格布局组件
|
|
|
import { GridLayout, GridItem } from 'vue-grid-layout'
|
|
|
import IbpsBackToTop from '@/components/ibps-back-to-top'
|
|
|
@@ -115,351 +157,378 @@ import { StatisticsData } from '@/api/platform/system/jbdHome'
|
|
|
import { StatisticsSign } from '@/api/platform/system/jbdHome'
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
|
|
-import newHome from './components/new-home';
|
|
|
+import newHome from './components/new-home'
|
|
|
|
|
|
const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
|
|
|
|
|
|
export default {
|
|
|
- components: {
|
|
|
- 'ibps-news-dialog': IbpsNewsDialog,
|
|
|
- 'ibps-message-dialog': IbpsMessageDialog,
|
|
|
- IbpsBackToTop,
|
|
|
- Preview,
|
|
|
- newHome,
|
|
|
- BpmnFormrender,
|
|
|
- 'ibps-grid-layout': GridLayout,
|
|
|
- 'ibps-grid-item': GridItem
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- infoMessage:[],
|
|
|
- uloadPath:BASE_API()+BUSINESS_BASE_URL()+"/ck/task/importExcel",
|
|
|
- reportPath:BASE_API()+BUSINESS_BASE_URL()+"/sys/SysDataContext/replaceReportFile",
|
|
|
- layout: null,
|
|
|
- colNum: 24,
|
|
|
- rowHeight: 30,
|
|
|
- isDraggable: false,
|
|
|
- isResizable: false,
|
|
|
- isMirrored: false,
|
|
|
- verticalCompact: true,
|
|
|
- margin: [15, 15],
|
|
|
- useCssTransforms: true,
|
|
|
- taskId:'',
|
|
|
- ibpsNewsDialogVisible: false,
|
|
|
- newsEditId: '',
|
|
|
- showRepost:true,
|
|
|
-
|
|
|
- ibpsMessageDialogVisible: false,
|
|
|
- messageEditId: '',
|
|
|
-
|
|
|
- scrollDelay: 0,
|
|
|
- scrollTop: 0,
|
|
|
- initLoading: false,
|
|
|
- loading: false,
|
|
|
- id: '',
|
|
|
- dialogPreviewVisible: false, // 预览
|
|
|
- defaultData: [],
|
|
|
-
|
|
|
- bpmnFormrenderDialogVisible: false, // 流程
|
|
|
- defId: '',
|
|
|
- taskId: '',
|
|
|
- instanceId: '',
|
|
|
- layoutIndex: '',
|
|
|
- initInterval: null,
|
|
|
-
|
|
|
- systemUrlType: 'iframe',
|
|
|
- systemUrlName: '',
|
|
|
- systemUrlParams: {},
|
|
|
- alias: '',
|
|
|
- headers: {
|
|
|
- 'X-Authorization-access_token':getToken()
|
|
|
- },
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- system() {
|
|
|
- return this.$store.getters.system ? this.$store.getters.system : null
|
|
|
+ components: {
|
|
|
+ 'ibps-news-dialog': IbpsNewsDialog,
|
|
|
+ 'ibps-message-dialog': IbpsMessageDialog,
|
|
|
+ IbpsBackToTop,
|
|
|
+ Preview,
|
|
|
+ newHome,
|
|
|
+ BpmnFormrender,
|
|
|
+ 'ibps-grid-layout': GridLayout,
|
|
|
+ 'ibps-grid-item': GridItem
|
|
|
},
|
|
|
- systemAlias() {
|
|
|
- return this.$store.getters.system ? this.$store.getters.system.alias : ''
|
|
|
- },
|
|
|
- localSystem() {
|
|
|
- return this.system.isLocal
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- if('isNormal' == localStorage.getItem('statistic') ) this.showRepost = false
|
|
|
- this.initLoading = false
|
|
|
- this.initData()
|
|
|
- },
|
|
|
- created() {
|
|
|
- StatisticsData().then(data=>{ //将参数替换成对应参数
|
|
|
- if(data.state === 200 && data.variables.data.length>0){
|
|
|
- let h = this.$createElement,
|
|
|
- cont = data.variables.data,
|
|
|
- _this = this;
|
|
|
- for(let i = 0 ;i<cont.length;i++){
|
|
|
- window.setTimeout(() => {
|
|
|
- this.infoMessage[i] = this.$notify.info({
|
|
|
- title: '定时任务:'+cont[i].ren_wu_biao_ti_,
|
|
|
- message: h('p', null, [
|
|
|
- h('span', null, '任务时间: '+cont[i].ren_wu_shi_jian_),
|
|
|
- h('br'),
|
|
|
- h('span',null, '任务内容: '),
|
|
|
- h('span', {style:'color: #FF8C00;font-size:12px;'},cont[i].ding_shi_ren_wu_n),
|
|
|
- h('br'),
|
|
|
- h('el-button', {
|
|
|
- attrs: {
|
|
|
- size: 'mini',
|
|
|
- plain:true,
|
|
|
- },
|
|
|
- on: {
|
|
|
- click:()=>{
|
|
|
- this.infoMessage[i].close()
|
|
|
- }// 路由加载之后,调用关闭消息弹窗的方法
|
|
|
- }
|
|
|
- }, '忽略关闭')
|
|
|
-
|
|
|
- ]),
|
|
|
- duration: 0
|
|
|
- });
|
|
|
- }, 0)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- beforeDestroy() {
|
|
|
- for(let i =0;i<this.infoMessage.length;i++){
|
|
|
- this.infoMessage[i].close()
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- cancelInfo(cronId,title,num,processData,taskId){
|
|
|
- /* 调用流程*/
|
|
|
- if(taskId){
|
|
|
- this.$router.push({
|
|
|
- name:'pendingItems'
|
|
|
- })
|
|
|
- }else if(processData){
|
|
|
- this.defId = processData
|
|
|
- this.bpmnFormrenderDialogVisible = true
|
|
|
- }
|
|
|
- this.infoMessage[num].close()
|
|
|
- },
|
|
|
- downloadData(){
|
|
|
- window.location.href = BASE_API()+BUSINESS_BASE_URL()+"/sys/SysDataContext/downloadData";
|
|
|
- },
|
|
|
- scrollToTop() {
|
|
|
- this.$refs.dashboardContainer.scrollToTop()
|
|
|
- },
|
|
|
- initData() {
|
|
|
- this.initInterval = setInterval(() => {
|
|
|
- if (this.$utils.isNotEmpty(this.systemAlias)) {
|
|
|
- this.initLoading = true
|
|
|
- if (this.localSystem) {
|
|
|
- // this.fetchData()
|
|
|
- } else {
|
|
|
- this.initSystemUrl(this.system.homePage)
|
|
|
- }
|
|
|
- clearInterval(this.initInterval)
|
|
|
+ data() {
|
|
|
+ const date = new Date()
|
|
|
+ return {
|
|
|
+ infoMessage: [],
|
|
|
+ uloadPath:
|
|
|
+ BASE_API() + BUSINESS_BASE_URL() + '/ck/task/importExcel',
|
|
|
+ reportPath:
|
|
|
+ BASE_API() +
|
|
|
+ BUSINESS_BASE_URL() +
|
|
|
+ '/sys/SysDataContext/replaceReportFile',
|
|
|
+ layout: null,
|
|
|
+ colNum: 24,
|
|
|
+ rowHeight: 30,
|
|
|
+ isDraggable: false,
|
|
|
+ isResizable: false,
|
|
|
+ isMirrored: false,
|
|
|
+ verticalCompact: true,
|
|
|
+ margin: [15, 15],
|
|
|
+ useCssTransforms: true,
|
|
|
+ taskId: '',
|
|
|
+ ibpsNewsDialogVisible: false,
|
|
|
+ newsEditId: '',
|
|
|
+ showRepost: true,
|
|
|
+
|
|
|
+ ibpsMessageDialogVisible: false,
|
|
|
+ messageEditId: '',
|
|
|
+
|
|
|
+ scrollDelay: 0,
|
|
|
+ scrollTop: 0,
|
|
|
+ initLoading: false,
|
|
|
+ loading: false,
|
|
|
+ id: '',
|
|
|
+ dialogPreviewVisible: false, // 预览
|
|
|
+ defaultData: [],
|
|
|
+
|
|
|
+ bpmnFormrenderDialogVisible: false, // 流程
|
|
|
+ defId: '',
|
|
|
+ taskId: '',
|
|
|
+ instanceId: '',
|
|
|
+ layoutIndex: '',
|
|
|
+ initInterval: null,
|
|
|
+
|
|
|
+ systemUrlType: 'iframe',
|
|
|
+ systemUrlName: '',
|
|
|
+ systemUrlParams: {},
|
|
|
+ alias: '',
|
|
|
+ headers: {
|
|
|
+ 'X-Authorization-access_token': getToken()
|
|
|
+ },
|
|
|
+ year: date.getFullYear()
|
|
|
}
|
|
|
- }, 100)
|
|
|
- },
|
|
|
- // 抓取数据
|
|
|
- // fetchData() {
|
|
|
- // initColumn(this.systemAlias)
|
|
|
- // this.loading = true
|
|
|
- // const interval = setInterval(() => {
|
|
|
- // if (isInit()) {
|
|
|
- // // getMyDesktop({
|
|
|
- // // systemAlias: this.systemAlias
|
|
|
- // // }).then(response => {
|
|
|
- // // try {
|
|
|
- // // this.layout = this.$utils.parseData(response.data)
|
|
|
- // // this.defaultData = this.$utils.parseData(response.data)
|
|
|
- // // } catch (error) {
|
|
|
- // // this.layout = []
|
|
|
- // // this.defaultData = []
|
|
|
- // // }
|
|
|
- // // this.loading = false
|
|
|
- // // }).catch(() => {
|
|
|
- // // this.loading = false
|
|
|
- // // })
|
|
|
- // clearInterval(interval)
|
|
|
- // }
|
|
|
- // }, 100)
|
|
|
- // },
|
|
|
- getHeight(h) {
|
|
|
- return (h - 1) * (this.rowHeight + this.margin[1]) + this.margin[1]
|
|
|
- },
|
|
|
- hasComponent(alias) {
|
|
|
- const name = 'ibps-desktop-' + alias
|
|
|
- const components = getComponents()
|
|
|
- if (components) {
|
|
|
- return components.includes(name)
|
|
|
- } else {
|
|
|
- return false
|
|
|
- }
|
|
|
},
|
|
|
- resizedHandler(i, newH, newW, newHPx, newWPx) {
|
|
|
- if (!this.layout) return
|
|
|
- this.layout.layout.find((n) => {
|
|
|
- if (i === n.i) {
|
|
|
- n.widthPx = this.getWidth(n.w)
|
|
|
- n.heightPx = this.getHeight(n.h)
|
|
|
+ computed: {
|
|
|
+ system() {
|
|
|
+ return this.$store.getters.system
|
|
|
+ ? this.$store.getters.system
|
|
|
+ : null
|
|
|
+ },
|
|
|
+ systemAlias() {
|
|
|
+ return this.$store.getters.system
|
|
|
+ ? this.$store.getters.system.alias
|
|
|
+ : ''
|
|
|
+ },
|
|
|
+ localSystem() {
|
|
|
+ return this.system.isLocal
|
|
|
}
|
|
|
- })
|
|
|
},
|
|
|
- goMyLayout() {
|
|
|
- this.$router.push({
|
|
|
- path: '/officeDesk/grzlsw/desktopMyLayout'
|
|
|
- })
|
|
|
+ mounted() {
|
|
|
+ if ('isNormal' == localStorage.getItem('statistic'))
|
|
|
+ this.showRepost = false
|
|
|
+ this.initLoading = false
|
|
|
+ this.initData()
|
|
|
},
|
|
|
- handleActionEvent(command, params, index) {
|
|
|
- this.layoutIndex = index
|
|
|
- this.alias = params.$alias
|
|
|
- switch (command) {
|
|
|
- case 'fullscreen':
|
|
|
- this.handleFullscreen(params.id)
|
|
|
- break
|
|
|
- case 'collapse':
|
|
|
- case 'expansion':
|
|
|
- this.handleCollapseExpansion(index, command === 'collapse')
|
|
|
- break
|
|
|
- case 'flow':
|
|
|
- this.handleFlow(params)
|
|
|
- break
|
|
|
- case 'approve':
|
|
|
- this.handleApprove(params)
|
|
|
- break
|
|
|
- case 'unRead':
|
|
|
- this.handleUnreadMessage(params)
|
|
|
- break
|
|
|
-
|
|
|
- default:
|
|
|
- break
|
|
|
- }
|
|
|
- },
|
|
|
- /**
|
|
|
- * 全屏展示切换
|
|
|
- */
|
|
|
- handleFullscreen(id) {
|
|
|
- this.dialogPreviewVisible = true
|
|
|
- this.id = id
|
|
|
- },
|
|
|
- // 处理收缩/展开
|
|
|
- handleCollapseExpansion(index, isCollapse) {
|
|
|
- this.layout[index].h = isCollapse ? 2 : this.defaultData[index].h
|
|
|
- this.layout.push({ i: '0' })
|
|
|
- const deleteIndex = this.layout.findIndex(item => item.i === '0')
|
|
|
- this.layout.splice(deleteIndex, 1)
|
|
|
- },
|
|
|
-
|
|
|
- handleApprove(id) {
|
|
|
- this.ibpsNewsDialogVisible = true
|
|
|
- this.newsEditId = id
|
|
|
- },
|
|
|
-
|
|
|
- handleUnreadMessage(id) {
|
|
|
- this.ibpsMessageDialogVisible = true
|
|
|
- this.messageEditId = id
|
|
|
- },
|
|
|
- fileErr(err, file, fileList){
|
|
|
- this.$message.error("文件上传失败,请检查格式!")
|
|
|
- },
|
|
|
- handleFlow(params) {
|
|
|
- this.defId = params.defId || null
|
|
|
- this.taskId = params.taskId || null
|
|
|
- this.instanceId = params.instanceId || null
|
|
|
-
|
|
|
- this.instanceId = params.instanceId || null
|
|
|
- this.instanceId = params.instanceId || null
|
|
|
-
|
|
|
- this.bpmnFormrenderDialogVisible = true
|
|
|
- },
|
|
|
- handleFlowCallback() {
|
|
|
- this.$refs[this.alias] ? this.$refs[this.alias][0].refreshData() : null
|
|
|
- },
|
|
|
-
|
|
|
- //
|
|
|
- initSystemUrl(url) {
|
|
|
- if (url.startsWith('http')) {
|
|
|
- this.systemUrlType = 'iframe'
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.systemrender.src = url
|
|
|
- // 传递消息
|
|
|
- // this.$refs.systemrender.contentWindow.postMessage({ data: this.attributes }, '*')
|
|
|
+ created() {
|
|
|
+ StatisticsData().then((data) => {
|
|
|
+ //将参数替换成对应参数
|
|
|
+ if (data.state === 200 && data.variables.data.length > 0) {
|
|
|
+ let h = this.$createElement,
|
|
|
+ cont = data.variables.data,
|
|
|
+ _this = this
|
|
|
+ for (let i = 0; i < cont.length; i++) {
|
|
|
+ window.setTimeout(() => {
|
|
|
+ this.infoMessage[i] = this.$notify.info({
|
|
|
+ title: '定时任务:' + cont[i].ren_wu_biao_ti_,
|
|
|
+ message: h('p', null, [
|
|
|
+ h(
|
|
|
+ 'span',
|
|
|
+ null,
|
|
|
+ '任务时间: ' + cont[i].ren_wu_shi_jian_
|
|
|
+ ),
|
|
|
+ h('br'),
|
|
|
+ h('span', null, '任务内容: '),
|
|
|
+ h(
|
|
|
+ 'span',
|
|
|
+ { style: 'color: #FF8C00;font-size:12px;' },
|
|
|
+ cont[i].ding_shi_ren_wu_n
|
|
|
+ ),
|
|
|
+ h('br'),
|
|
|
+ h(
|
|
|
+ 'el-button',
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ size: 'mini',
|
|
|
+ plain: true
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ this.infoMessage[i].close()
|
|
|
+ } // 路由加载之后,调用关闭消息弹窗的方法
|
|
|
+ }
|
|
|
+ },
|
|
|
+ '忽略关闭'
|
|
|
+ )
|
|
|
+ ]),
|
|
|
+ duration: 0
|
|
|
+ })
|
|
|
+ }, 0)
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
- } else {
|
|
|
- const component = url.split('?')[0]
|
|
|
- this.systemUrlParams.attrs = this.urlParse(url)
|
|
|
- this.systemUrlType = 'inner'
|
|
|
- const systemUrlName = 'IbpsBpmnSystemUrl'
|
|
|
- this.$options.components[systemUrlName] = _import(component)
|
|
|
- this.systemUrlName = systemUrlName
|
|
|
- }
|
|
|
},
|
|
|
- urlParse(str) {
|
|
|
- const obj = {}
|
|
|
- if (str.indexOf('?') !== -1) {
|
|
|
- const str1 = str.split('?')[1].split('&')
|
|
|
- for (let i = 0; i < str1.length; i++) {
|
|
|
- const params = str1[i].split('=')
|
|
|
- obj[params[0]] = params[1]
|
|
|
+ beforeDestroy() {
|
|
|
+ for (let i = 0; i < this.infoMessage.length; i++) {
|
|
|
+ this.infoMessage[i].close()
|
|
|
}
|
|
|
- }
|
|
|
- return obj
|
|
|
},
|
|
|
- /* 文件类型*/
|
|
|
- beforeUpload(file) {
|
|
|
- var testmsg=file.name.substring(file.name.lastIndexOf('.')+1)
|
|
|
- const extension = testmsg === 'xls'
|
|
|
- const extension2 = testmsg === 'xlsx'
|
|
|
- if(!extension && !extension2) {
|
|
|
- this.$message({
|
|
|
- message: '上传文件只能是excel格式!',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- return false;
|
|
|
+ methods: {
|
|
|
+ cancelInfo(cronId, title, num, processData, taskId) {
|
|
|
+ /* 调用流程*/
|
|
|
+ if (taskId) {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'pendingItems'
|
|
|
+ })
|
|
|
+ } else if (processData) {
|
|
|
+ this.defId = processData
|
|
|
+ this.bpmnFormrenderDialogVisible = true
|
|
|
+ }
|
|
|
+ this.infoMessage[num].close()
|
|
|
+ },
|
|
|
+ downloadData() {
|
|
|
+ window.location.href =
|
|
|
+ BASE_API() +
|
|
|
+ BUSINESS_BASE_URL() +
|
|
|
+ '/sys/SysDataContext/downloadData'
|
|
|
+ },
|
|
|
+ scrollToTop() {
|
|
|
+ this.$refs.dashboardContainer.scrollToTop()
|
|
|
+ },
|
|
|
+ initData() {
|
|
|
+ this.initInterval = setInterval(() => {
|
|
|
+ if (this.$utils.isNotEmpty(this.systemAlias)) {
|
|
|
+ this.initLoading = true
|
|
|
+ if (this.localSystem) {
|
|
|
+ // this.fetchData()
|
|
|
+ } else {
|
|
|
+ this.initSystemUrl(this.system.homePage)
|
|
|
+ }
|
|
|
+ clearInterval(this.initInterval)
|
|
|
}
|
|
|
- return extension || extension2
|
|
|
- },
|
|
|
- /* 文件类型*/
|
|
|
- ReportBeforeUpload(file) {
|
|
|
- var testmsg=file.name.substring(file.name.lastIndexOf('.')+1)
|
|
|
- const extension = testmsg === 'rpx'
|
|
|
- if(!extension) {
|
|
|
- this.$message({
|
|
|
- message: '上传文件只能是rpx格式!',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- return extension
|
|
|
- },
|
|
|
-
|
|
|
- handleSuccess(res,file,fileList){
|
|
|
- if(res.state===200){
|
|
|
- this.$message({
|
|
|
- message: '上传数据成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- }else {
|
|
|
- this.$message({
|
|
|
- message: res.message,
|
|
|
- type: 'error'
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- }
|
|
|
+ }, 100)
|
|
|
+ },
|
|
|
+ // 抓取数据
|
|
|
+ // fetchData() {
|
|
|
+ // initColumn(this.systemAlias)
|
|
|
+ // this.loading = true
|
|
|
+ // const interval = setInterval(() => {
|
|
|
+ // if (isInit()) {
|
|
|
+ // // getMyDesktop({
|
|
|
+ // // systemAlias: this.systemAlias
|
|
|
+ // // }).then(response => {
|
|
|
+ // // try {
|
|
|
+ // // this.layout = this.$utils.parseData(response.data)
|
|
|
+ // // this.defaultData = this.$utils.parseData(response.data)
|
|
|
+ // // } catch (error) {
|
|
|
+ // // this.layout = []
|
|
|
+ // // this.defaultData = []
|
|
|
+ // // }
|
|
|
+ // // this.loading = false
|
|
|
+ // // }).catch(() => {
|
|
|
+ // // this.loading = false
|
|
|
+ // // })
|
|
|
+ // clearInterval(interval)
|
|
|
+ // }
|
|
|
+ // }, 100)
|
|
|
+ // },
|
|
|
+ getHeight(h) {
|
|
|
+ return (h - 1) * (this.rowHeight + this.margin[1]) + this.margin[1]
|
|
|
+ },
|
|
|
+ hasComponent(alias) {
|
|
|
+ const name = 'ibps-desktop-' + alias
|
|
|
+ const components = getComponents()
|
|
|
+ if (components) {
|
|
|
+ return components.includes(name)
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ resizedHandler(i, newH, newW, newHPx, newWPx) {
|
|
|
+ if (!this.layout) return
|
|
|
+ this.layout.layout.find((n) => {
|
|
|
+ if (i === n.i) {
|
|
|
+ n.widthPx = this.getWidth(n.w)
|
|
|
+ n.heightPx = this.getHeight(n.h)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ goMyLayout() {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/officeDesk/grzlsw/desktopMyLayout'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleActionEvent(command, params, index) {
|
|
|
+ this.layoutIndex = index
|
|
|
+ this.alias = params.$alias
|
|
|
+ switch (command) {
|
|
|
+ case 'fullscreen':
|
|
|
+ this.handleFullscreen(params.id)
|
|
|
+ break
|
|
|
+ case 'collapse':
|
|
|
+ case 'expansion':
|
|
|
+ this.handleCollapseExpansion(index, command === 'collapse')
|
|
|
+ break
|
|
|
+ case 'flow':
|
|
|
+ this.handleFlow(params)
|
|
|
+ break
|
|
|
+ case 'approve':
|
|
|
+ this.handleApprove(params)
|
|
|
+ break
|
|
|
+ case 'unRead':
|
|
|
+ this.handleUnreadMessage(params)
|
|
|
+ break
|
|
|
+
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 全屏展示切换
|
|
|
+ */
|
|
|
+ handleFullscreen(id) {
|
|
|
+ this.dialogPreviewVisible = true
|
|
|
+ this.id = id
|
|
|
+ },
|
|
|
+ // 处理收缩/展开
|
|
|
+ handleCollapseExpansion(index, isCollapse) {
|
|
|
+ this.layout[index].h = isCollapse ? 2 : this.defaultData[index].h
|
|
|
+ this.layout.push({ i: '0' })
|
|
|
+ const deleteIndex = this.layout.findIndex((item) => item.i === '0')
|
|
|
+ this.layout.splice(deleteIndex, 1)
|
|
|
+ },
|
|
|
+
|
|
|
+ handleApprove(id) {
|
|
|
+ this.ibpsNewsDialogVisible = true
|
|
|
+ this.newsEditId = id
|
|
|
+ },
|
|
|
+
|
|
|
+ handleUnreadMessage(id) {
|
|
|
+ this.ibpsMessageDialogVisible = true
|
|
|
+ this.messageEditId = id
|
|
|
+ },
|
|
|
+ fileErr(err, file, fileList) {
|
|
|
+ this.$message.error('文件上传失败,请检查格式!')
|
|
|
+ },
|
|
|
+ handleFlow(params) {
|
|
|
+ this.defId = params.defId || null
|
|
|
+ this.taskId = params.taskId || null
|
|
|
+ this.instanceId = params.instanceId || null
|
|
|
+
|
|
|
+ this.instanceId = params.instanceId || null
|
|
|
+ this.instanceId = params.instanceId || null
|
|
|
+
|
|
|
+ this.bpmnFormrenderDialogVisible = true
|
|
|
+ },
|
|
|
+ handleFlowCallback() {
|
|
|
+ this.$refs[this.alias]
|
|
|
+ ? this.$refs[this.alias][0].refreshData()
|
|
|
+ : null
|
|
|
+ },
|
|
|
+
|
|
|
+ //
|
|
|
+ initSystemUrl(url) {
|
|
|
+ if (url.startsWith('http')) {
|
|
|
+ this.systemUrlType = 'iframe'
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.systemrender.src = url
|
|
|
+ // 传递消息
|
|
|
+ // this.$refs.systemrender.contentWindow.postMessage({ data: this.attributes }, '*')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const component = url.split('?')[0]
|
|
|
+ this.systemUrlParams.attrs = this.urlParse(url)
|
|
|
+ this.systemUrlType = 'inner'
|
|
|
+ const systemUrlName = 'IbpsBpmnSystemUrl'
|
|
|
+ this.$options.components[systemUrlName] = _import(component)
|
|
|
+ this.systemUrlName = systemUrlName
|
|
|
+ }
|
|
|
+ },
|
|
|
+ urlParse(str) {
|
|
|
+ const obj = {}
|
|
|
+ if (str.indexOf('?') !== -1) {
|
|
|
+ const str1 = str.split('?')[1].split('&')
|
|
|
+ for (let i = 0; i < str1.length; i++) {
|
|
|
+ const params = str1[i].split('=')
|
|
|
+ obj[params[0]] = params[1]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ },
|
|
|
+ /* 文件类型*/
|
|
|
+ beforeUpload(file) {
|
|
|
+ var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
|
|
|
+ const extension = testmsg === 'xls'
|
|
|
+ const extension2 = testmsg === 'xlsx'
|
|
|
+ if (!extension && !extension2) {
|
|
|
+ this.$message({
|
|
|
+ message: '上传文件只能是excel格式!',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return extension || extension2
|
|
|
+ },
|
|
|
+ /* 文件类型*/
|
|
|
+ ReportBeforeUpload(file) {
|
|
|
+ var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
|
|
|
+ const extension = testmsg === 'rpx'
|
|
|
+ if (!extension) {
|
|
|
+ this.$message({
|
|
|
+ message: '上传文件只能是rpx格式!',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return extension
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSuccess(res, file, fileList) {
|
|
|
+ if (res.state === 200) {
|
|
|
+ this.$message({
|
|
|
+ message: '上传数据成功!',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.message,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import '~@/assets/styles/public.scss';
|
|
|
.ibps-desktop-page {
|
|
|
- .ibps-container-frame {
|
|
|
+ .ibps-container-frame {
|
|
|
position: absolute;
|
|
|
top: 0px;
|
|
|
left: 0px;
|
|
|
@@ -467,78 +536,93 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
|
|
|
- .ibps-grid-item,
|
|
|
- .el-card{
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- .vue-grid-layout {
|
|
|
- border-radius: 4px;
|
|
|
- // margin: -10px;
|
|
|
- .page_card {
|
|
|
- height: 100%;
|
|
|
- @extend %unable-select;
|
|
|
+ .ibps-grid-item,
|
|
|
+ .el-card {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .vue-grid-layout {
|
|
|
+ border-radius: 4px;
|
|
|
+ // margin: -10px;
|
|
|
+ .page_card {
|
|
|
+ height: 100%;
|
|
|
+ @extend %unable-select;
|
|
|
+ }
|
|
|
+ .vue-resizable-handle {
|
|
|
+ opacity: 0.3;
|
|
|
+ &:hover {
|
|
|
+ opacity: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- .vue-resizable-handle {
|
|
|
- opacity: .3;
|
|
|
- &:hover{
|
|
|
- opacity: 1;
|
|
|
- }
|
|
|
+ .app-container {
|
|
|
+ min-height: calc(100vh - 160px);
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss" >
|
|
|
-
|
|
|
-.ibps-desktop-dashboard{
|
|
|
-
|
|
|
- .item {
|
|
|
- position: relative;
|
|
|
- margin: 12px;
|
|
|
- padding: 12px;
|
|
|
- height: 90px;
|
|
|
- border-radius: 4px;
|
|
|
- box-sizing: border-box;
|
|
|
- overflow: hidden;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
- .item-header {
|
|
|
- position: relative;
|
|
|
- & > p {
|
|
|
- margin: 0px;
|
|
|
- font-size: 14px;
|
|
|
+.ibps-desktop-dashboard {
|
|
|
+ .item {
|
|
|
+ position: relative;
|
|
|
+ margin: 12px;
|
|
|
+ padding: 12px;
|
|
|
+ height: 90px;
|
|
|
+ border-radius: 4px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow: hidden;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
- & > span {
|
|
|
- position: absolute;
|
|
|
- right: 0px;
|
|
|
- top: 0px;
|
|
|
- padding: 2px 8px;
|
|
|
- border-radius: 4px;
|
|
|
- font-size: 12px;
|
|
|
- background: rgba(255, 255, 255, 0.3);
|
|
|
+ .item-header {
|
|
|
+ position: relative;
|
|
|
+ & > p {
|
|
|
+ margin: 0px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ & > span {
|
|
|
+ position: absolute;
|
|
|
+ right: 0px;
|
|
|
+ top: 0px;
|
|
|
+ padding: 2px 8px;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 12px;
|
|
|
+ background: rgba(255, 255, 255, 0.3);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- .item-body {
|
|
|
- & > h2 {
|
|
|
- margin: 0;
|
|
|
- font-size: 32px;
|
|
|
- line-height: 60px;
|
|
|
+ .item-body {
|
|
|
+ & > h2 {
|
|
|
+ margin: 0;
|
|
|
+ font-size: 32px;
|
|
|
+ line-height: 60px;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- .item-tip {
|
|
|
+ .item-tip {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ position: absolute;
|
|
|
+ width: 80px;
|
|
|
+ height: 80px;
|
|
|
+ bottom: -35px;
|
|
|
+ right: 50px;
|
|
|
+ border: 2px solid #fff;
|
|
|
+ border-radius: 100%;
|
|
|
+ font-size: 48px;
|
|
|
+ transform: rotate(-40deg);
|
|
|
+ opacity: 0.1;
|
|
|
+ }
|
|
|
+}
|
|
|
+.footer {
|
|
|
+ height: 50px;
|
|
|
+ font-size: 12px;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
justify-content: center;
|
|
|
- position: absolute;
|
|
|
- width: 80px;
|
|
|
- height: 80px;
|
|
|
- bottom: -35px;
|
|
|
- right: 50px;
|
|
|
- border: 2px solid #fff;
|
|
|
- border-radius: 100%;
|
|
|
- font-size: 48px;
|
|
|
- transform: rotate(-40deg);
|
|
|
- opacity: 0.1;
|
|
|
- }
|
|
|
+ align-items: center;
|
|
|
+ text-align: center;
|
|
|
+ a {
|
|
|
+ color: #000;
|
|
|
+ &:hover {
|
|
|
+ text-decoration: underline !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|