|
@@ -6,24 +6,24 @@
|
|
|
<span>数据概览</span>
|
|
<span>数据概览</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="card-cell-content">
|
|
<div class="card-cell-content">
|
|
|
- <div class="card-cell-value">
|
|
|
|
|
|
|
+ <div class="card-cell-value" @click="handelRouterTo('/page-pro/project-initiation')">
|
|
|
<div class="img-box img1-url"></div>
|
|
<div class="img-box img1-url"></div>
|
|
|
<div class="text-box">
|
|
<div class="text-box">
|
|
|
- <span>64</span>
|
|
|
|
|
|
|
+ <span>{{ projectNum }}</span>
|
|
|
<span>我的项目</span>
|
|
<span>我的项目</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="card-cell-value">
|
|
|
|
|
|
|
+ <div class="card-cell-value" @click="handelRouterTo('/page-pro/task-manage')">
|
|
|
<div class="img-box img2-url"></div>
|
|
<div class="img-box img2-url"></div>
|
|
|
<div class="text-box">
|
|
<div class="text-box">
|
|
|
- <span>15</span>
|
|
|
|
|
|
|
+ <span>{{ taskNum }}</span>
|
|
|
<span>我的任务</span>
|
|
<span>我的任务</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="card-cell-value">
|
|
|
|
|
|
|
+ <div class="card-cell-value" @click="handelRouterTo('/page-wt/tickets')">
|
|
|
<div class="img-box img3-url"></div>
|
|
<div class="img-box img3-url"></div>
|
|
|
<div class="text-box">
|
|
<div class="text-box">
|
|
|
- <span>22</span>
|
|
|
|
|
|
|
+ <span>{{ workOrderNum }}</span>
|
|
|
<span>我的工单</span>
|
|
<span>我的工单</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -44,18 +44,19 @@
|
|
|
<div class="card-cell-value">
|
|
<div class="card-cell-value">
|
|
|
<div>
|
|
<div>
|
|
|
<el-avatar shape="square" :size="80" src="https://empty" @error="errorHandler">
|
|
<el-avatar shape="square" :size="80" src="https://empty" @error="errorHandler">
|
|
|
- <img src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"/>
|
|
|
|
|
|
|
+ <img :src="xyy"/>
|
|
|
</el-avatar>
|
|
</el-avatar>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="text-box">
|
|
<div class="text-box">
|
|
|
<span>{{ user.info.name }}</span>
|
|
<span>{{ user.info.name }}</span>
|
|
|
|
|
+ <span>{{ user.info.deptName }}</span>
|
|
|
<span>{{ user.info.groupName }}</span>
|
|
<span>{{ user.info.groupName }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="card-cell-date">
|
|
<div class="card-cell-date">
|
|
|
- <!-- <span style="color: #7fa7ce">{{ date }}</span>-->
|
|
|
|
|
- <span>{{ time }}</span>
|
|
|
|
|
|
|
+ <span>{{ date }}</span>
|
|
|
<span>{{ week }} </span>
|
|
<span>{{ week }} </span>
|
|
|
|
|
+ <span>{{ time }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
@@ -127,7 +128,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
<div class="scroll-box-content-item">
|
|
<div class="scroll-box-content-item">
|
|
|
<span class="item-date">{{ o.createTime }}</span>
|
|
<span class="item-date">{{ o.createTime }}</span>
|
|
|
- <span class="item-text" :title="`${ o.templateNickname + ':'+o.templateContent}`">{{ o.templateNickname + ':' + o.templateContent }}</span>
|
|
|
|
|
|
|
+ <span class="item-text" :title="`${ o.templateNickname + ':'+o.templateContent}`">{{
|
|
|
|
|
+ o.templateNickname + ':' + o.templateContent
|
|
|
|
|
+ }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</el-timeline-item>
|
|
</el-timeline-item>
|
|
|
</div>
|
|
</div>
|
|
@@ -143,15 +146,43 @@
|
|
|
<span>常用功能</span>
|
|
<span>常用功能</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="card-cell-content">
|
|
<div class="card-cell-content">
|
|
|
- <div v-for="item in commonList" :key="item.id" class="card-cell-content-div">
|
|
|
|
|
- <i :class="item.icon||'el-icon-menu'"></i>
|
|
|
|
|
- <span>{{item.name}}</span>
|
|
|
|
|
|
|
+ <div v-for="(item,index) in commonList" :key="item.id" class="card-cell-content-box" @click="handleAdd(item)">
|
|
|
|
|
+ <!-- <el-popover-->
|
|
|
|
|
+ <!-- v-if="item.id !=='-1'"-->
|
|
|
|
|
+ <!-- placement="top-start"-->
|
|
|
|
|
+ <!-- title=""-->
|
|
|
|
|
+ <!-- width="10px"-->
|
|
|
|
|
+ <!-- trigger="click"-->
|
|
|
|
|
+ <!-- content="">-->
|
|
|
|
|
+ <!-- <i style="color: red" class="el-icon-delete"></i>-->
|
|
|
|
|
+ <!-- <div class="card-cell-content-div" slot="reference">-->
|
|
|
|
|
+ <!-- <i :class="item.icon||'el-icon-menu'"></i>-->
|
|
|
|
|
+ <!-- <span>{{ item.name }}</span>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </el-popover>-->
|
|
|
|
|
+ <el-tooltip placement="top" effect="light" v-if="item.id !=='-1'">
|
|
|
|
|
+ <div slot="content">
|
|
|
|
|
+ <i style="color: red;cursor: pointer;font-size: 18px" class="el-icon-delete"
|
|
|
|
|
+ @click="handleCommonListDel(item,index)"></i>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="card-cell-content-div">
|
|
|
|
|
+ <i :class="item.icon||'el-icon-s-opportunity'"></i>
|
|
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <div class="card-cell-content-div" v-else>
|
|
|
|
|
+ <i :class="item.icon||'el-icon-s-opportunity'"></i>
|
|
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</div>
|
|
</div>
|
|
|
<handleTask ref="handleTaskRef" @reload="reload"></handleTask>
|
|
<handleTask ref="handleTaskRef" @reload="reload"></handleTask>
|
|
|
<detail ref="detailRef"></detail>
|
|
<detail ref="detailRef"></detail>
|
|
|
|
|
+ <commonDialog ref="commonDialogRef" v-if="commonDialogFlag"
|
|
|
|
|
+ :common-dialog-flag.sync="commonDialogFlag" @reload="getUserResourceList"></commonDialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -164,15 +195,25 @@ import detail from "@/views/bpm/processInstance/detail.vue";
|
|
|
import handleTask from "@/views/bpm/handleTask/index.vue";
|
|
import handleTask from "@/views/bpm/handleTask/index.vue";
|
|
|
import {deepClone} from "ele-admin/lib/utils/core";
|
|
import {deepClone} from "ele-admin/lib/utils/core";
|
|
|
import vueSeamlessScroll from 'vue-seamless-scroll'
|
|
import vueSeamlessScroll from 'vue-seamless-scroll'
|
|
|
|
|
+import {projectsPageAPI, projectsTaskPageAPI, userResourceDeleteAPI, userResourceListAPI} from "@/api/home";
|
|
|
|
|
+import {getWorkOrderPage} from "@/api/tickets";
|
|
|
|
|
+import {statistics} from "@/api/bpm/components/inspectionManage";
|
|
|
|
|
+import commonDialog from "@/views/home/common-dialog.vue";
|
|
|
|
|
+import xyy from '@/assets/xyy.jpg'
|
|
|
export default {
|
|
export default {
|
|
|
name: "index",
|
|
name: "index",
|
|
|
- components: {handleTask, detail,vueSeamlessScroll},
|
|
|
|
|
|
|
+ components: {handleTask, detail, vueSeamlessScroll, commonDialog},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ xyy,
|
|
|
time: '',
|
|
time: '',
|
|
|
date: '',
|
|
date: '',
|
|
|
week: '',
|
|
week: '',
|
|
|
|
|
+ commonDialogFlag: false,
|
|
|
updateTimer: null,
|
|
updateTimer: null,
|
|
|
|
|
+ projectNum: 0,
|
|
|
|
|
+ taskNum: 0,
|
|
|
|
|
+ workOrderNum: 0,
|
|
|
messageScrollList: [],
|
|
messageScrollList: [],
|
|
|
defineScroll: {
|
|
defineScroll: {
|
|
|
step: 0.2, // 数值越大速度滚动越快
|
|
step: 0.2, // 数值越大速度滚动越快
|
|
@@ -184,18 +225,7 @@ export default {
|
|
|
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
|
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
|
|
waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
|
|
waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
|
|
|
},
|
|
},
|
|
|
- commonList: [
|
|
|
|
|
- {
|
|
|
|
|
- name: '常用分类',
|
|
|
|
|
- id: '1',
|
|
|
|
|
- icon: '',
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '编辑',
|
|
|
|
|
- id: '-1',
|
|
|
|
|
- icon: 'el-icon-edit',
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ commonList: [],
|
|
|
columns: [
|
|
columns: [
|
|
|
{
|
|
{
|
|
|
columnKey: 'index',
|
|
columnKey: 'index',
|
|
@@ -263,12 +293,56 @@ export default {
|
|
|
...mapGetters(['user'])
|
|
...mapGetters(['user'])
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- console.log(this.user);
|
|
|
|
|
// window.isFullscreen = false
|
|
// window.isFullscreen = false
|
|
|
this.updateTimer = setInterval(this.updateTime, 1000);
|
|
this.updateTimer = setInterval(this.updateTime, 1000);
|
|
|
this.getMessageList();
|
|
this.getMessageList();
|
|
|
|
|
+ this.getProjectNum();
|
|
|
|
|
+ this.getTaskNum();
|
|
|
|
|
+ this.getWorkOrderNum();
|
|
|
|
|
+ this.getUserResourceList();
|
|
|
|
|
+ console.log(this.user);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ async getProjectNum() {
|
|
|
|
|
+ const {count} = await projectsPageAPI({size: 1, pageNum: 1, parentId: "0"})
|
|
|
|
|
+ this.projectNum = count;
|
|
|
|
|
+ },
|
|
|
|
|
+ async getTaskNum() {
|
|
|
|
|
+ const {count} = await projectsTaskPageAPI({size: 1, pageNum: 1})
|
|
|
|
|
+ this.taskNum = count;
|
|
|
|
|
+ },
|
|
|
|
|
+ async getWorkOrderNum() {
|
|
|
|
|
+ const {total} = await statistics()
|
|
|
|
|
+
|
|
|
|
|
+ this.workOrderNum = total;
|
|
|
|
|
+ },
|
|
|
|
|
+ async getUserResourceList() {
|
|
|
|
|
+ this.commonList = await userResourceListAPI()
|
|
|
|
|
+ this.commonList.unshift({
|
|
|
|
|
+ name: '添加',
|
|
|
|
|
+ id: '-1',
|
|
|
|
|
+ icon: 'el-icon-edit',
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ handelRouterTo(path) {
|
|
|
|
|
+ window.history.pushState(null, '', path)
|
|
|
|
|
+ // this.$router.push(path);
|
|
|
|
|
+ },
|
|
|
|
|
+ handleAdd(item) {
|
|
|
|
|
+ if (item.id == -1) {
|
|
|
|
|
+ this.commonDialogFlag = true
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.commonDialogRef.init()
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let urlPath = item.topUrl + item.url
|
|
|
|
|
+ this.handelRouterTo(urlPath)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async handleCommonListDel(item, index) {
|
|
|
|
|
+ await userResourceDeleteAPI([item.id])
|
|
|
|
|
+ this.commonList.splice(index, 1)
|
|
|
|
|
+ },
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
datasource({page, limit, where, order}) {
|
|
datasource({page, limit, where, order}) {
|
|
|
return getTodoTaskPage({
|
|
return getTodoTaskPage({
|
|
@@ -278,7 +352,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
async getMessageList() {
|
|
async getMessageList() {
|
|
|
- const { list} = await notifyMessagePageAPI({
|
|
|
|
|
|
|
+ const {list} = await notifyMessagePageAPI({
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
size: 9999,
|
|
size: 9999,
|
|
|
userId: this.user.info.userId
|
|
userId: this.user.info.userId
|
|
@@ -335,6 +409,7 @@ export default {
|
|
|
this.$refs.detailRef.open(row.processInstance.id);
|
|
this.$refs.detailRef.open(row.processInstance.id);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$refs.table.reload({page: 1, where});
|
|
this.$refs.table.reload({page: 1, where});
|
|
@@ -451,7 +526,8 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
|
- font-size: 0.8vw;
|
|
|
|
|
|
|
+ font-size: 0.7vw;
|
|
|
|
|
+ color: #000000;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -460,9 +536,9 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
|
- align-items: center;
|
|
|
|
|
- color: #404446;
|
|
|
|
|
- font-size: 0.8vw;
|
|
|
|
|
|
|
+ align-items: flex-end;
|
|
|
|
|
+ color: #000000;
|
|
|
|
|
+ font-size: 0.7vw;
|
|
|
margin: 0 10px;
|
|
margin: 0 10px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -493,7 +569,8 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
min-height: 150px;
|
|
min-height: 150px;
|
|
|
min-width: 400px;
|
|
min-width: 400px;
|
|
|
- .card-cell-content{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .card-cell-content {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: flex-start;
|
|
justify-content: flex-start;
|
|
@@ -503,11 +580,12 @@ export default {
|
|
|
overflow-x: auto;
|
|
overflow-x: auto;
|
|
|
padding: 0 10px;
|
|
padding: 0 10px;
|
|
|
|
|
|
|
|
- .card-cell-content-div {
|
|
|
|
|
|
|
+ .card-cell-content-box {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
height: 80%;
|
|
height: 80%;
|
|
|
|
|
+ width: 100%;
|
|
|
border: 1px solid #e3e5e4;
|
|
border: 1px solid #e3e5e4;
|
|
|
justify-content: space-evenly;
|
|
justify-content: space-evenly;
|
|
|
flex: 0 0 5.5%;
|
|
flex: 0 0 5.5%;
|
|
@@ -515,18 +593,31 @@ export default {
|
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
+
|
|
|
&:hover {
|
|
&:hover {
|
|
|
background: #dee4e9;
|
|
background: #dee4e9;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .card-cell-content-div i{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .card-cell-content-div {
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-evenly;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .card-cell-content-div i {
|
|
|
font-size: 2vw;
|
|
font-size: 2vw;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.card-cell-content-div span {
|
|
.card-cell-content-div span {
|
|
|
letter-spacing: 2px;
|
|
letter-spacing: 2px;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.middle-cell {
|
|
.middle-cell {
|
|
|
flex: 0 0 100%;
|
|
flex: 0 0 100%;
|
|
|
}
|
|
}
|
|
@@ -549,6 +640,7 @@ export default {
|
|
|
height: calc(100% - 40px);
|
|
height: calc(100% - 40px);
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.scroll-box {
|
|
.scroll-box {
|
|
|
height: 80%;
|
|
height: 80%;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -616,4 +708,5 @@ export default {
|
|
|
.el-empty {
|
|
.el-empty {
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|