大屏工程管理修改

prv
haha 2023-12-28 23:35:19 +08:00
parent e711aa172f
commit 95418668ca
4 changed files with 181 additions and 8 deletions

View File

@ -47,6 +47,17 @@ const listByUnit=(projectId,deptId,unit,pageNum,pageSize)=>{
}
})
}
const listByCategory=(projectId,deptId,category,pageNum,pageSize)=>{
return request({
url: `bgscreen/flow/listByCategory?pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'post',
data:{
category:category,
deptId:deptId,
projectId:projectId
}
})
}
const listByState=(projectId,deptId,state,pageNum,pageSize)=>{
return request({
url: `bgscreen/flow/listByState?pageNum=${pageNum}&pageSize=${pageSize}`,
@ -83,5 +94,6 @@ export default{
listByState,
groupByProject,
findSafetyWorkList,
findFormDatasByProcInsId
findFormDatasByProcInsId,
listByCategory
}

View File

@ -0,0 +1,148 @@
<template>
<div class="flow-list-by-category quality-table ">
<div class="nav">
<div class="nav-item" :style="'width:' + navWidth" :class="it.dictValue == selItem.dictValue ? 'active' : ''"
v-for="(it, idx) in categories" :key="idx" @click="doQuery(it)">{{ it.dictLabel }}</div>
</div>
<el-table :data="tableData" class="mytable" style="background: transparent;"
ref="fbsubordinateUnit">
<el-table-column prop="businessKeyName" label="申请项目" class-name="text-left">
</el-table-column>
<el-table-column prop="startUserName" label="当前状态" width="100">
<template slot-scope="{row}">
<span v-if="row.finishTime" style="color: greenyellow;"></span>
<span v-else style="color: red;">进行中</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="申请时间" width="150">
</el-table-column>
<el-table-column prop="createTime" label="申请附件" width="100">
<template slot-scope="{row}">
<span slot="reference" style="cursor: pointer; color: #01a9ff" @click="loadRowFils(row)"></span>
</template>
</el-table-column>
</el-table>
<el-pagination layout="total,prev, pager, next" :hide-on-single-page="true" @current-change="handleCurrentChange"
:total="total" :page-size="size" :current-page.sync="index" class="bg-pagination"></el-pagination>
</div>
</template>
<script>
export default {
name: 'JhbigscreenFlowListByCategory',
props: {
getPData: {
type: Function,
default: null
}
},
data() {
return {
index: 1,
size: 10,
total: 0,
categories: [],
selItem: {},
tableData: [],
navWidth: '',
};
},
created() {
this.$api.dict('sys_process_category').then(d => {
this.categories = d || [];
if (this.categories.length > 0) {
this.doQuery(this.categories[0])
}
this.navWidth = (98.0 / this.categories.length).toFixed(2) + "%";
});
},
mounted() {
},
methods: {
loadRowFils(it){
this.$api.flow.findFormDatasByProcInsId(it.procInsId).then(d => {
if(d.data && d.data.files){
//
d.data.files.split(",").forEach(item => {
this.$api.downFile("/jhapi" + item, {}, item.substring(item.lastIndexOf("/")+1));
});
}
})
},
handleCurrentChange(n) {
this.index = n;
this.loadData();
},
doNav(n) {
this.nav = n;
this.index = 1;
this.loadData();
},
doQuery(it) {
this.selItem = it;
this.index = 1;
this.loadData();
},
loadData() {
let obj = this.getPData ? this.getPData() || {} : {}
this.$api.flow.listByCategory(obj.projectId, obj.deptId, this.selItem.dictValue, this.index, this.size).then(d => {
this.tableData = d.rows || [];
this.total = d.total;
})
}
},
};
</script>
<style lang="less" scoped>
.flow-list-by-category {
padding:0px;
height:calc(~"100% - 40px");
.bg-pagination{
margin-top:10px;
}
.nav {
display: flex;
.nav-item {
text-align: center;
flex-grow: 1;
padding: 4px 4px;
cursor: pointer;
background: #142c6a;
color: #738fb4;
&.active {
color: #01a9ff
}
}
}
.mytable{
height:calc(~"100% - 100px");
margin:12px 12px;
width:calc(~"100% - 24px");
border:solid 1px #142c6a;
/deep/ th .cell{
color: aquamarine;
}
}
/deep/ .mytable {
.el-table__body-wrapper::-webkit-scrollbar {
width: 8px;
height: 8px;
}
//
.el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: rgb(1, 169, 255);
border-radius: 4px;
}
}
}</style>

View File

@ -67,6 +67,10 @@
<module-one-1-1 :label="label6" style="position: relative;">
<enginChart ref="chart3" :height="300"></enginChart>
</module-one-1-1>
<module-one-2-1 label="审批明细" style="position: relative;">
<list-by-category :getPData="getInfo"/>
</module-one-2-1>
<!--
<module-one-1-1 :label="label7" style="position: relative;">
<enginChart ref="chart4" :height="300"></enginChart>
</module-one-1-1>
@ -76,6 +80,7 @@
@click="doUnitDlg">
<enginChart ref="chart5" :height="300"></enginChart>
</module-one-1-1>
-->
</el-col>
</el-row>
</div>
@ -98,9 +103,10 @@ import stateDialog from './engin/flowDetailByStateDialog.vue'
import projectStandardDialog from './engin/projectStandardDialog.vue'
import enginChart from './engin/enginChart.vue'
import { tryToJson } from '@/utils/tools'
import ListByCategory from './engin/flowListByCategory.vue'
export default {
name: 'JhbigscreenProjectEngin',
components: {BorderBox6,imageItem, unitDialog, stateDialog, enginChart,projectStandardDialog},
components: {BorderBox6,imageItem, unitDialog, stateDialog, enginChart,projectStandardDialog,ListByCategory},
data() {
return {
label1: '项目标准化管理',
@ -151,6 +157,13 @@ export default {
}
},
methods: {
getInfo(){
let obj={
deptId: this.dept?.id || 0,
projectId: this.project?.id || 0
};
return obj
},
doStandardDlg(it){
let obj={
deptId: this.dept?.id || 0,
@ -534,8 +547,8 @@ export default {
this.$api.flow.groupByProject(this.dept?.id || 0),
this.$api.periodical.getList(),
this.$api.flow.groupByUnitTotal(this.project?.id || 0, this.dept?.id || 0),
this.$api.flow.groupByUnitFinish(this.project?.id || 0, this.dept?.id || 0),
this.$api.flow.groupByUnit(this.project?.id || 0, this.dept?.id || 0),
//this.$api.flow.groupByUnitFinish(this.project?.id || 0, this.dept?.id || 0),
//this.$api.flow.groupByUnit(this.project?.id || 0, this.dept?.id || 0),
];
this.$api.http.all(ajaxs).then(res => {
this.showChart1(res[0]);
@ -544,8 +557,8 @@ export default {
this.showList2(res[3]);
this.showList3(res[4]);
this.showChart3(res[5]);
this.showChart4(res[6]);
this.showChart5(res[7]);
//this.showChart4(res[6]);
//this.showChart5(res[7]);
this.loading = false;
});
});

View File

@ -37,8 +37,8 @@ module.exports = defineConfig({
}
},
'/jhapi':{
target: `http://62.234.3.186/jhapi/`,
//target: `http://127.0.0.1:8090/jhapi/`,
//target: `http://62.234.3.186/jhapi/`,
target: `http://127.0.0.1:8090/jhapi/`,
changeOrigin: true,
pathRewrite: {
'^/jhapi':'/'