Compare commits

...

3 Commits

Author SHA1 Message Date
wuyize 9fdc400083 合并 2022-07-13 10:57:57 +08:00
wuyize 6dd7eabba5 Merge remote-tracking branch 'origin/main' into main
# Conflicts:
#	src/views/ProjectInfo.vue
2022-07-13 10:23:44 +08:00
wuyize 055a2cc7d0 Home页添加过渡动画 2022-07-13 10:21:15 +08:00
6 changed files with 289 additions and 196 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<router-view></router-view> <router-view style="width: 100%;max-height: 100%;overflow: hidden"></router-view>
</template> </template>
<script> <script>
import router from "@/router"; import router from "@/router";

View File

@ -0,0 +1,115 @@
<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>

View File

@ -60,9 +60,9 @@ const tableHeight = ref();
const {proxy, ctx} = getCurrentInstance() const {proxy, ctx} = getCurrentInstance()
onMounted(() => { onMounted(() => {
// innerHeight-offsetTop-110 // innerHeight-offsetTop-110
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 110; tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
window.onresize = () => { window.onresize = () => {
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 110; tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
}; };
}); });
const router = useRouter() const router = useRouter()

View File

@ -49,8 +49,12 @@
</div> </div>
</div> </div>
</el-header> </el-header>
<el-main style="overflow: unset"> <el-main style="overflow: hidden;">
<router-view></router-view> <router-view v-slot="{ Component }">
<transition name="slide-right" mode="out-in">
<component :is="Component" />
</transition>
</router-view>
</el-main> </el-main>
</el-container> </el-container>
</el-container> </el-container>
@ -187,4 +191,30 @@ export default {
font-weight: bold; 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> </style>

View File

@ -55,9 +55,10 @@
style="float: right;margin-top: 20px;"> style="float: right;margin-top: 20px;">
</el-pagination> </el-pagination>
</div> </div>
<CreateProjectDialog v-model:dialogFormVisible="dialogFormVisible" :projectClasses="projectClasses"
:projectSubClasses="projectSubClasses" @created="getProjects"></CreateProjectDialog>
</div> </div>
<CreateProjectDialog v-model:dialogFormVisible="dialogFormVisible" :projectClasses="projectClasses"
:projectSubClasses="projectSubClasses" @created="getProjects"></CreateProjectDialog>
</template> </template>
<script setup> <script setup>
@ -73,9 +74,9 @@ const tableHeight = ref();
const {proxy, ctx} = getCurrentInstance() const {proxy, ctx} = getCurrentInstance()
onMounted(() => { onMounted(() => {
// innerHeight-offsetTop-110 // innerHeight-offsetTop-110
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 110; tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
window.onresize = () => { window.onresize = () => {
tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 110; tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
}; };
}); });
const router = useRouter() const router = useRouter()

View File

@ -4,8 +4,7 @@
display: flex;flex-direction: row;justify-content: space-between"> display: flex;flex-direction: row;justify-content: space-between">
<div style="width: 32%; 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> <p class="p-title" style="margin-left: 10px">基本信息</p>
<div <div style="flex:1;margin-top: 30px;padding: 20px;
style="flex:1;margin-top: 30px;padding: 20px;
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px; "> display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px; ">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -37,8 +36,9 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<p class="p-subtitle">进度</p> <p class="p-subtitle">进度</p>
<el-progress :status="(totalNum !== 0 && completeNum === totalNum) ? 'success' : ''" <el-progress
:percentage="totalNum === 0 ? 0 : Math.round(completeNum * 100 / totalNum)" /> :status="(totalNum!==0&&completeNum===totalNum) ? 'success' : ''"
:percentage="totalNum===0?0:Math.round(completeNum*100/totalNum)"/>
</el-col> </el-col>
</el-row> </el-row>
@ -47,25 +47,22 @@
</div> </div>
<div style="flex: 1;margin-left: 30px;height: 100%;display: flex;flex-direction: column"> <div style="flex: 1;margin-left: 30px;height: 100%;display: flex;flex-direction: column">
<p class="p-title" style="margin-left: 10px">工作项统计</p> <p class="p-title" style="margin-left: 10px">工作项统计</p>
<div <div style="flex:1;margin-top: 30px;padding: 20px;
style="flex:1;margin-top: 30px;padding: 20px;
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px;"> display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px;">
</div> </div>
</div> </div>
</div> </div>
<div style="margin: 0 30px 30px 30px; <div style="margin: 0 30px 30px 30px;height: 700px;
display: flex;flex-direction: row;justify-content: space-between;align-items: stretch"> display: flex;flex-direction: row;justify-content: space-between;align-items: stretch">
<div style="width: 60%; height: 100%;display: flex;flex-direction: column"> <div style="min-width: 60%; display: flex;flex-direction: column">
<div style="margin: 0 10px 0 10px; <div style="margin: 0 10px 0 10px;
display: flex;flex-direction: row;justify-content: space-between"> 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> <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> <el-button v-if="projectAccessLevel===1" type="primary" @click.native="onEditProjectClick"></el-button>
</div> </div>
<div <div style="flex:1;margin-top: 30px;padding: 20px;
style="flex:1;margin-top: 30px;padding: 20px; display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px; ">
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-row class="row-info">
<el-col :span="6"> <el-col :span="6">
<p class="p-subtitle">英文简称</p> <p class="p-subtitle">英文简称</p>
@ -139,7 +136,7 @@
<p>{{ project.projectCompany }}</p> <p>{{ project.projectCompany }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row style="height: 160px">
<el-col :span="24"> <el-col :span="24">
<p class="p-subtitle">项目描述</p> <p class="p-subtitle">项目描述</p>
<p>{{ project.projectDescription }}</p> <p>{{ project.projectDescription }}</p>
@ -159,23 +156,26 @@
</div> </div>
<!-- 公告具体内容 --> <!-- 公告具体内容 -->
<div <div
style="margin-top: 15px;padding: 8px;background-color: white; border-radius: 10px;height: 470px;overflow: auto;position: relative;"> style="margin-top: 15px;padding: 8px;background-color: white; border-radius: 10px;flex:1;overflow: auto;position: relative;">
<div v-if="findGgBoxShow " <div v-if="findGgBoxShow "
style="position: absolute;width:100%;height: 470px;left:0;top:0;background-color: #ffffff;z-index: 999;"> style="position: absolute;width:100%;height: 470px;left:0;top:0;background-color: #ffffff;z-index: 999;">
<div style="width:100%;height:10%;float:left;"> <div style="width:100%;height:10%;float:left;">
<p @click="gbGgBosShow()" <p @click="gbGgBosShow()"
style="width:20%;height:100%;float:left;color: #606266;line-height: 250%;cursor: pointer;"> &lt;&nbsp;返回</p> style="width:20%;height:100%;float:left;color: #606266;line-height: 250%;cursor: pointer;"> &lt;&nbsp;返回</p>
<div style="width:60%;height:100%;float:left;line-height: 250%;text-align: center;"> <div style="width:60%;height:100%;float:left;line-height: 250%;text-align: center;">
<h3>{{ findGgInfoContent.announcementTitle }} </h3></div> <h3>{{ findGgInfoContent.announcementTitle }} </h3></div>
<div @click="showDelbox(findGgInfoContent.announcementId)" <div @click="showDelbox(findGgInfoContent.announcementId)"
style="width:20%;height:100%;float:right;color: #409EFF;line-height: 250%;text-align: center;cursor: pointer;" > style="width:20%;height:100%;float:right;color: #409EFF;line-height: 250%;text-align: center;cursor: pointer;">
删除</div> 删除
</div>
</div> </div>
<div style="width:100%;height:7%;float:left;line-height: 250%;text-align: right;background:#EBEFF1;color: #898989;font-size:14px "> <div
日期{{ findGgInfoContent.announcementPublishTime }} &nbsp;&nbsp;&nbsp;发布人{{ findGgInfoContent.announcementPublisherName }} &nbsp; style="width:100%;height:7%;float:left;line-height: 250%;text-align: right;background:#EBEFF1;color: #898989;font-size:14px ">
日期{{ findGgInfoContent.announcementPublishTime }}
&nbsp;&nbsp;&nbsp;发布人{{ findGgInfoContent.announcementPublisherName }} &nbsp;
</div> </div>
<div style="width:100%;height:80%;float:left;line-height: 120%;text-align: left;overflow: auto;"> <div style="width:100%;height:80%;float:left;line-height: 120%;text-align: left;overflow: auto;">
{{ findGgInfoContent.announcementContent }} {{ findGgInfoContent.announcementContent }}
@ -183,14 +183,14 @@
</div> </div>
<div v-if="!findGgBoxShow" > <div v-if="!findGgBoxShow">
<el-timeline> <el-timeline>
<el-timeline-item timestamp="" placement="top" v-for="(item, index) in ggList" :key="index"> <el-timeline-item timestamp="" placement="top" v-for="(item, index) in ggList" :key="index">
<el-card @click="findggInfo(item.announcementId)"> <el-card @click="findggInfo(item.announcementId)">
<h3 <h3
style="white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis; overflow: hidden;width:524px;cursor: pointer;"> style="white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis; overflow: hidden;width:524px;cursor: pointer;">
{{ item.announcementTitle }}</h3> {{ item.announcementTitle }}</h3>
<p> {{ item.announcementPublisherName }} 发布于 {{ item.announcementPublishTime }}</p> <p> {{ item.announcementPublisherName }} 发布于 {{ item.announcementPublishTime }}</p>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
@ -203,75 +203,35 @@
<div style="height: 300px;margin: 0 30px 30px 30px; <div style="height: 300px;margin: 0 30px 30px 30px;
display: flex;flex-direction: row;justify-content: space-between"> display: flex;flex-direction: row;justify-content: space-between">
<div style="width: 32%; height: 100%;display: flex;flex-direction: column"> <div style="flex: 1;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> <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;"> 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>
</div> </div>
</div> </div>
</div> </div>
</el-scrollbar> </el-scrollbar>
<EditProjectDialog
<EditProjectDialog :dialogFormVisible="editProjectDialogVisible" :projectClasses="projectClasses" :dialogFormVisible="editProjectDialogVisible" :projectClasses="projectClasses"
:projectSubClasses="projectSubClasses" :projectInfo="editProjectInfo" @edited="onEdited" /> :projectSubClasses="projectSubClasses"
:projectInfo="editProjectInfo"
@edited="onEdited"/>
<!-- 新增公告框开始 --> <!-- 新增公告框开始 -->
<el-dialog title="添加项目公告" v-model="centerDialogVisible" width="40%" center> <el-dialog title="添加项目公告" v-model="centerDialogVisible" width="40%" center>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="标题" prop="addggbttxt"> <el-form-item label="标题" prop="addggbttxt">
<el-input type="text" placeholder="请输入项目公告标题" v-model="form.addggbttxt" maxlength="45" show-word-limit> <el-input type="text" placeholder="请输入项目公告标题" v-model="form.addggbttxt" maxlength="45" show-word-limit>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="内容" prop="addggtextarea"> <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
</el-input> :rows="10">
</el-form-item> </el-input>
</el-form> </el-form-item>
</el-form>
<template #footer> <template #footer>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addxtggsj('form')"> </el-button> <el-button type="primary" @click="addxtggsj('form')"> </el-button>
@ -283,23 +243,23 @@
<!-- 新增公告框结束 --> <!-- 新增公告框结束 -->
<!-- 删除公告 --> <!-- 删除公告 -->
<el-dialog <el-dialog
title="提示" title="提示"
v-model="dialogVisible" v-model="dialogVisible"
width="30%" width="30%"
:before-close="handleClose"> :before-close="handleClose">
<div>确认删除该公告?</div> <div>确认删除该公告?</div>
<template #footer> <template #footer>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="delxtggsj()"> </el-button> <el-button type="primary" @click="delxtggsj()"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import {ref} from 'vue'
</script> </script>
@ -310,7 +270,7 @@ import EditProjectDialog from "../components/EditProjectDialog";
export default { export default {
name: "ProjectInfo", name: "ProjectInfo",
components: { EditProjectDialog }, components: {EditProjectDialog},
data() { data() {
return { return {
project: { project: {
@ -345,6 +305,7 @@ export default {
editProjectDialogVisible: false, editProjectDialogVisible: false,
editProjectInfo: {}, editProjectInfo: {},
// //
ggList: [], ggList: [],
@ -356,17 +317,16 @@ export default {
}, },
rules: { rules: {
addggbttxt: [ addggbttxt: [
{ required: true, message: '请输入公告标题', trigger: 'blur' }, {required: true, message: '请输入公告标题', trigger: 'blur'},
], ],
addggtextarea: [ addggtextarea: [
{ required: true, message: '请输入公告内容', trigger: 'blur' }, {required: true, message: '请输入公告内容', trigger: 'blur'},
], ],
}, },
findGgInfoContent: "", findGgInfoContent: "",
findGgBoxShow: false, findGgBoxShow: false,
dialogVisible:false, dialogVisible: false,
delGGid:"" delGGid: ""
} }
}, },
props: { props: {
@ -427,7 +387,6 @@ export default {
this.getProjectStats(); this.getProjectStats();
this.getProjectClass(); this.getProjectClass();
this.getannouncementList(); this.getannouncementList();
}, },
mounted() { mounted() {
const that = this const that = this
@ -435,41 +394,40 @@ export default {
window.onresize = () => { window.onresize = () => {
that.viewHeight = window.innerHeight - 150; that.viewHeight = window.innerHeight - 150;
}; };
}, },
methods: { methods: {
// //
delxtggsj(){ delxtggsj() {
var that = this; var that = this;
let projectId = this.$route.params.projectId; let projectId = this.$route.params.projectId;
let announcementId= that.delGGid; let announcementId = that.delGGid;
request({ request({
url: `project/${projectId}/announcement/${announcementId}`, url: `project/${projectId}/announcement/${announcementId}`,
method: "DELETE", method: "DELETE",
}) })
.then((response) => { .then((response) => {
if (response.data.code === 200) { if (response.data.code === 200) {
console.log("成功"); console.log("成功");
this.$message({ this.$message({
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}); });
that.dialogVisible = false; that.dialogVisible = false;
that.getannouncementList(); that.getannouncementList();
let data = response.data.data; let data = response.data.data;
console.log(data); console.log(data);
// //
that.gbGgBosShow(); that.gbGgBosShow();
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
}, },
showDelbox(id){ showDelbox(id) {
var that = this; var that = this;
that.dialogVisible = true; that.dialogVisible = true;
that.delGGid = id; that.delGGid = id;
}, },
// //
findggInfo(announcementId) { findggInfo(announcementId) {
@ -480,18 +438,18 @@ export default {
url: `project/${projectId}/announcement/${announcementId}`, url: `project/${projectId}/announcement/${announcementId}`,
method: "get", method: "get",
}) })
.then((response) => { .then((response) => {
if (response.data.code === 200) { if (response.data.code === 200) {
that.findGgBoxShow = true; that.findGgBoxShow = true;
let data = response.data.data; let data = response.data.data;
console.log(data); console.log(data);
data.announcementPublishTime = that.formatDate(data.announcementPublishTime) data.announcementPublishTime = that.formatDate(data.announcementPublishTime)
that.findGgInfoContent = data; that.findGgInfoContent = data;
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
}, },
gbGgBosShow() { gbGgBosShow() {
this.findGgBoxShow = false; this.findGgBoxShow = false;
@ -504,7 +462,7 @@ export default {
if (valid) { if (valid) {
console.log('submit') console.log('submit')
let { ...form} = this.form let {...form} = this.form
request({ request({
url: `project/${projectId}/announcement`, url: `project/${projectId}/announcement`,
method: 'post', method: 'post',
@ -513,23 +471,23 @@ export default {
announcementTitle: that.form.addggbttxt, announcementTitle: that.form.addggbttxt,
} }
}).then((response) => { }).then((response) => {
if (response.data.code === 200) { if (response.data.code === 200) {
console.log("成功"); console.log("成功");
this.$message({ this.$message({
message: '新增成功', message: '新增成功',
type: 'success' type: 'success'
}); });
that.getannouncementList(); that.getannouncementList();
that.centerDialogVisible = false; that.centerDialogVisible = false;
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}) })
} else { } else {
console.log('error submit!!') console.log('error submit!!')
return false return false
} }
}) })
}, },
// //
@ -546,38 +504,25 @@ export default {
url: `project/${projectId}/announcement`, url: `project/${projectId}/announcement`,
method: "get", method: "get",
}) })
.then((response) => { .then((response) => {
if (response.data.code === 200) { if (response.data.code === 200) {
let data = response.data.data; let data = response.data.data;
console.log("公告"); console.log("公告");
data.records.forEach(item => { data.records.forEach(item => {
item.announcementPublishTime = that.formatDate(item.announcementPublishTime) item.announcementPublishTime = that.formatDate(item.announcementPublishTime)
}) })
that.ggList = data.records that.ggList = data.records
console.log(that.ggList); console.log(that.ggList);
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
},
formatDate(datetime) {
// slice(-2)100
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() { onEditProjectClick() {
let { ...copy } = this.project let {...copy} = this.project
copy.projectStartDate = new Date(this.project.projectStartDate * 1000) copy.projectStartDate = new Date(this.project.projectStartDate * 1000)
copy.projectOnlineDate = new Date(this.project.projectOnlineDate * 1000) copy.projectOnlineDate = new Date(this.project.projectOnlineDate * 1000)
copy.projectFirstTestDate = new Date(this.project.projectFirstTestDate * 1000) copy.projectFirstTestDate = new Date(this.project.projectFirstTestDate * 1000)
@ -594,10 +539,9 @@ export default {
}, },
formatDate(date) { formatDate(date) {
if (date) if (date)
return moment(date * 1000).format("yyyy年MM月DD日 HH:mm") return moment(date * 1000).format("yyyy年MM月DD日")
return '无' return '无'
}, },
getProjectInfo() { getProjectInfo() {
const that = this const that = this
request({ request({
@ -653,6 +597,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
// //
.gg-box { .gg-box {
width: 100%; width: 100%;
@ -662,7 +607,8 @@ export default {
} }
.gg-info-txt {} .gg-info-txt {
}
.gg-del-btn { .gg-del-btn {
width: 12%; width: 12%;
@ -675,6 +621,7 @@ export default {
} }
// //
.row-info { .row-info {
margin-bottom: 40px; margin-bottom: 40px;
} }