Compare commits
No commits in common. "9fdc4000830d09d10f3f16c6eb9cf4e23c89abaf" and "536f9eeae1e7442f7c1992aaff6fd3d9cabd5f5b" have entirely different histories.
9fdc400083
...
536f9eeae1
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<router-view style="width: 100%;max-height: 100%;overflow: hidden"></router-view>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
<script>
|
||||
import router from "@/router";
|
||||
|
|
|
@ -1,115 +0,0 @@
|
|||
<template>
|
||||
<div id="TendencyChart" style="width: 100%;height: 100%;"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
name: "TendencyChart",
|
||||
props: {
|
||||
// 是否要上角图例
|
||||
isLegend: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否为满圆
|
||||
isRadius: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 数据列表
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
myChart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initEcharts();
|
||||
},
|
||||
computed: {
|
||||
getTotalNumber() {
|
||||
let total = this.dataList.reduce((prev, item) => {
|
||||
prev += item.value
|
||||
return prev
|
||||
}, 0)
|
||||
return total;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取配置
|
||||
getOption() {
|
||||
// 指定图表的配置项和数据
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '统计',
|
||||
type: 'pie',
|
||||
center: ['45%', '55%'],
|
||||
// radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '40',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: this.dataList
|
||||
}
|
||||
]
|
||||
};
|
||||
if (this.isLegend) {
|
||||
option.legend = {
|
||||
type: 'scroll',
|
||||
orient: 'vertical',
|
||||
right: 10,
|
||||
top: 20,
|
||||
bottom: 20,
|
||||
}
|
||||
}
|
||||
option.series[0].radius = this.isRadius ? '80%' : ['50%', '80%'];
|
||||
return option;
|
||||
},
|
||||
// 初始化图表
|
||||
initEcharts() {
|
||||
this.$nextTick(() => {
|
||||
this.myChart = echarts.init(document.getElementById(this.id));
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
this.myChart.setOption(this.getOption());
|
||||
});
|
||||
let that = this;
|
||||
window.addEventListener('resize', function () {
|
||||
console.log("addEventListener");
|
||||
// 让我们的图表调用 resize这个方法
|
||||
//that.$nextTick(()=>{
|
||||
that.myChart.resize();
|
||||
//});
|
||||
});
|
||||
},
|
||||
// 更新图表
|
||||
updateEcharts() {
|
||||
this.myChart.setOption(this.getOption(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -60,9 +60,9 @@ const tableHeight = ref();
|
|||
const {proxy, ctx} = getCurrentInstance()
|
||||
onMounted(() => {
|
||||
// 设置表格初始高度为innerHeight-offsetTop-表格底部与浏览器底部距离110
|
||||
tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
|
||||
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 110;
|
||||
window.onresize = () => {
|
||||
tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
|
||||
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 110;
|
||||
};
|
||||
});
|
||||
const router = useRouter()
|
||||
|
|
|
@ -49,12 +49,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="overflow: hidden;">
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="slide-right" mode="out-in">
|
||||
<component :is="Component" />
|
||||
</transition>
|
||||
</router-view>
|
||||
<el-main style="overflow: unset">
|
||||
<router-view></router-view>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
|
@ -191,30 +187,4 @@ export default {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
slide-left-enter-active,
|
||||
.slide-left-leave-active,
|
||||
.slide-right-enter-active,
|
||||
.slide-right-leave-active {
|
||||
will-change: transform;
|
||||
transition: all 500ms cubic-bezier(.55,0,.1,1);
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
.slide-right-enter-from {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
.slide-right-leave-to {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, 30%, 0);
|
||||
}
|
||||
.slide-left-enter-from{
|
||||
opacity: 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
.slide-left-leave-to{
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -30%, 0);
|
||||
}
|
||||
|
||||
|
||||
</style>
|
|
@ -55,10 +55,9 @@
|
|||
style="float: right;margin-top: 20px;">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<CreateProjectDialog v-model:dialogFormVisible="dialogFormVisible" :projectClasses="projectClasses"
|
||||
:projectSubClasses="projectSubClasses" @created="getProjects"></CreateProjectDialog>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -74,9 +73,9 @@ const tableHeight = ref();
|
|||
const {proxy, ctx} = getCurrentInstance()
|
||||
onMounted(() => {
|
||||
// 设置表格初始高度为innerHeight-offsetTop-表格底部与浏览器底部距离110
|
||||
tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
|
||||
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 110;
|
||||
window.onresize = () => {
|
||||
tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
|
||||
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 110;
|
||||
};
|
||||
});
|
||||
const router = useRouter()
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
display: flex;flex-direction: row;justify-content: space-between">
|
||||
<div style="width: 32%; height: 100%;display: flex;flex-direction: column">
|
||||
<p class="p-title" style="margin-left: 10px">基本信息</p>
|
||||
<div style="flex:1;margin-top: 30px;padding: 20px;
|
||||
<div
|
||||
style="flex:1;margin-top: 30px;padding: 20px;
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px; ">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
@ -36,8 +37,7 @@
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<p class="p-subtitle">进度</p>
|
||||
<el-progress
|
||||
:status="(totalNum!==0&&completeNum===totalNum) ? 'success' : ''"
|
||||
<el-progress :status="(totalNum !== 0 && completeNum === totalNum) ? 'success' : ''"
|
||||
:percentage="totalNum === 0 ? 0 : Math.round(completeNum * 100 / totalNum)" />
|
||||
|
||||
</el-col>
|
||||
|
@ -47,22 +47,25 @@
|
|||
</div>
|
||||
<div style="flex: 1;margin-left: 30px;height: 100%;display: flex;flex-direction: column">
|
||||
<p class="p-title" style="margin-left: 10px">工作项统计</p>
|
||||
<div style="flex:1;margin-top: 30px;padding: 20px;
|
||||
<div
|
||||
style="flex:1;margin-top: 30px;padding: 20px;
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 0 30px 30px 30px;height: 700px;
|
||||
<div style="margin: 0 30px 30px 30px;
|
||||
display: flex;flex-direction: row;justify-content: space-between;align-items: stretch">
|
||||
<div style="min-width: 60%; display: flex;flex-direction: column">
|
||||
<div style="width: 60%; height: 100%;display: flex;flex-direction: column">
|
||||
<div style="margin: 0 10px 0 10px;
|
||||
display: flex;flex-direction: row;justify-content: space-between">
|
||||
<p style="font-family: 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">详细信息</p>
|
||||
<el-button v-if="projectAccessLevel === 1" type="primary" @click.native="onEditProjectClick">编辑</el-button>
|
||||
</div>
|
||||
<div style="flex:1;margin-top: 30px;padding: 20px;
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px; ">
|
||||
<div
|
||||
style="flex:1;margin-top: 30px;padding: 20px;
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px; "
|
||||
ref="refs" id="refs">
|
||||
<el-row class="row-info">
|
||||
<el-col :span="6">
|
||||
<p class="p-subtitle">英文简称</p>
|
||||
|
@ -136,7 +139,7 @@
|
|||
<p>{{ project.projectCompany }}</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="height: 160px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<p class="p-subtitle">项目描述</p>
|
||||
<p>{{ project.projectDescription }}</p>
|
||||
|
@ -156,7 +159,7 @@
|
|||
</div>
|
||||
<!-- 公告具体内容 -->
|
||||
<div
|
||||
style="margin-top: 15px;padding: 8px;background-color: white; border-radius: 10px;flex:1;overflow: auto;position: relative;">
|
||||
style="margin-top: 15px;padding: 8px;background-color: white; border-radius: 10px;height: 470px;overflow: auto;position: relative;">
|
||||
|
||||
|
||||
<div v-if="findGgBoxShow "
|
||||
|
@ -168,14 +171,11 @@
|
|||
<h3>{{ findGgInfoContent.announcementTitle }} </h3></div>
|
||||
<div @click="showDelbox(findGgInfoContent.announcementId)"
|
||||
style="width:20%;height:100%;float:right;color: #409EFF;line-height: 250%;text-align: center;cursor: pointer;" >
|
||||
删除
|
||||
</div>
|
||||
删除</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
style="width:100%;height:7%;float:left;line-height: 250%;text-align: right;background:#EBEFF1;color: #898989;font-size:14px ">
|
||||
日期:{{ findGgInfoContent.announcementPublishTime }}
|
||||
发布人:{{ findGgInfoContent.announcementPublisherName }}
|
||||
<div style="width:100%;height:7%;float:left;line-height: 250%;text-align: right;background:#EBEFF1;color: #898989;font-size:14px ">
|
||||
日期:{{ findGgInfoContent.announcementPublishTime }} 发布人:{{ findGgInfoContent.announcementPublisherName }}
|
||||
</div>
|
||||
<div style="width:100%;height:80%;float:left;line-height: 120%;text-align: left;overflow: auto;">
|
||||
{{ findGgInfoContent.announcementContent }}
|
||||
|
@ -203,20 +203,61 @@
|
|||
|
||||
<div style="height: 300px;margin: 0 30px 30px 30px;
|
||||
display: flex;flex-direction: row;justify-content: space-between">
|
||||
<div style="flex: 1;height: 100%;display: flex;flex-direction: column">
|
||||
<div style="width: 32%; height: 100%;display: flex;flex-direction: column">
|
||||
<p class="p-title" style="margin-left: 10px">工作项完成趋势</p>
|
||||
<div style="flex:1;margin-top: 30px;padding: 20px;
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px; ">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<p class="p-subtitle">状态</p>
|
||||
<div>
|
||||
<div v-if="project.completed === false">
|
||||
<el-tag>进行中</el-tag>
|
||||
</div>
|
||||
<div v-if="project.completed === true">
|
||||
<el-tag type="info">已结项</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<p class="p-subtitle">项目经理</p>
|
||||
<p>{{ projectCreatorName }}</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<p class="p-subtitle">开始时间</p>
|
||||
<p>{{ formatDate(project.projectCreatedTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<p class="p-subtitle">结束时间</p>
|
||||
<p>{{ formatDate(project.projectClosedDate) }}</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<p class="p-subtitle">进度</p>
|
||||
<el-progress
|
||||
:status="(totalNum!==0&&completeNum===totalNum) ? 'success' : ''"
|
||||
:percentage="totalNum===0?0:Math.round(completeNum*100/totalNum)"/>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="flex: 1;margin-left: 30px;height: 100%;display: flex;flex-direction: column">
|
||||
<p class="p-title" style="margin-left: 10px">工作项统计</p>
|
||||
<div style="flex:1;margin-top: 30px;padding: 20px;
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px;align-items: stretch">
|
||||
<div style="background-color: #67c23a;flex: 1;"></div>
|
||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<EditProjectDialog
|
||||
:dialogFormVisible="editProjectDialogVisible" :projectClasses="projectClasses"
|
||||
:projectSubClasses="projectSubClasses"
|
||||
:projectInfo="editProjectInfo"
|
||||
@edited="onEdited"/>
|
||||
|
||||
<EditProjectDialog :dialogFormVisible="editProjectDialogVisible" :projectClasses="projectClasses"
|
||||
:projectSubClasses="projectSubClasses" :projectInfo="editProjectInfo" @edited="onEdited" />
|
||||
<!-- 新增公告框开始 -->
|
||||
|
||||
<el-dialog title="添加项目公告" v-model="centerDialogVisible" width="40%" center>
|
||||
|
@ -226,8 +267,7 @@
|
|||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" prop="addggtextarea">
|
||||
<el-input type="textarea" placeholder="请输入项目公告内容" v-model="form.addggtextarea" maxlength="1000" show-word-limit
|
||||
:rows="10">
|
||||
<el-input type="textarea" placeholder="请输入项目公告内容" v-model="form.addggtextarea" maxlength="1000" show-word-limit :rows="10">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -305,7 +345,6 @@ export default {
|
|||
|
||||
editProjectDialogVisible: false,
|
||||
editProjectInfo: {},
|
||||
|
||||
// 项目公告
|
||||
ggList: [],
|
||||
|
||||
|
@ -327,6 +366,7 @@ export default {
|
|||
findGgBoxShow: false,
|
||||
dialogVisible:false,
|
||||
delGGid:""
|
||||
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -387,6 +427,7 @@ export default {
|
|||
this.getProjectStats();
|
||||
this.getProjectClass();
|
||||
this.getannouncementList();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
const that = this
|
||||
|
@ -394,6 +435,7 @@ export default {
|
|||
window.onresize = () => {
|
||||
that.viewHeight = window.innerHeight - 150;
|
||||
};
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 删除公告
|
||||
|
@ -521,6 +563,19 @@ export default {
|
|||
console.log(error);
|
||||
});
|
||||
},
|
||||
formatDate(datetime) {
|
||||
// 获取年月日时分秒值 slice(-2)过滤掉大于10日期前面的0
|
||||
year = datetime.getFullYear(),
|
||||
month = ("0" + (datetime.getMonth() + 1)).slice(-2),
|
||||
date = ("0" + datetime.getDate()).slice(-2),
|
||||
hour = ("0" + datetime.getHours()).slice(-2),
|
||||
minute = ("0" + datetime.getMinutes()).slice(-2),
|
||||
second = ("0" + datetime.getSeconds()).slice(-2);
|
||||
// 拼接
|
||||
var result = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
|
||||
// 返回
|
||||
return result;
|
||||
},
|
||||
onEditProjectClick() {
|
||||
let { ...copy } = this.project
|
||||
copy.projectStartDate = new Date(this.project.projectStartDate * 1000)
|
||||
|
@ -539,9 +594,10 @@ export default {
|
|||
},
|
||||
formatDate(date) {
|
||||
if (date)
|
||||
return moment(date * 1000).format("yyyy年MM月DD日")
|
||||
return moment(date * 1000).format("yyyy年MM月DD日 HH:mm")
|
||||
return '无'
|
||||
},
|
||||
|
||||
getProjectInfo() {
|
||||
const that = this
|
||||
request({
|
||||
|
@ -597,7 +653,6 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
// 公告开始
|
||||
.gg-box {
|
||||
width: 100%;
|
||||
|
@ -607,8 +662,7 @@ export default {
|
|||
|
||||
}
|
||||
|
||||
.gg-info-txt {
|
||||
}
|
||||
.gg-info-txt {}
|
||||
|
||||
.gg-del-btn {
|
||||
width: 12%;
|
||||
|
@ -621,7 +675,6 @@ export default {
|
|||
}
|
||||
|
||||
// 公告结束
|
||||
|
||||
.row-info {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue