提交 6758dfbe authored 作者: CRS's avatar CRS

new

上级 59221f14
......@@ -40,6 +40,7 @@
<el-table-column
prop="person"
label="发布机构"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
......
......@@ -7,7 +7,7 @@
<el-form :model="form" :rules="rules" ref="form" label-width="105px">
<p class="rowForm">
<el-form-item label="单位类型:" class="inline" prop="objectVal">
<el-select v-model="form.objectVal" placeholder="请选择" clearable>
<el-select v-model="form.objectVal" placeholder="请选择" clearable @change="findUnit">
<el-option v-for="item in object" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
......@@ -142,19 +142,9 @@ export default {
created() {
},
mounted(){
this.$server.getUnitFindAll().then(res => {
this.unit = res.data.data;
this.$server.getProduceFindAll().then(res => {
this.product = res.data.data;
this.$server.getProjectFindAll().then(res => {
console.log(res.data.data)
this.project = res.data.data;
}).catch(err => {
this.$message.error('数据请求失败!');
})
}).catch(err => {
this.$message.error('数据请求失败!');
})
this.$server.getProjectFindAll().then(res => {
console.log(res.data.data)
this.project = res.data.data;
}).catch(err => {
this.$message.error('数据请求失败!');
})
......@@ -216,6 +206,17 @@ export default {
} else {
this.anonymous = 1
}
},
// 获取单位名称
findUnit() {
this.$server.getUnitFindByType(this.form.objectVal).then(res => {
console.log(res.data)
if (res.data.code === 200) {
this.unit = res.data.data;
}
}).catch(err => {
this.$message.error('数据请求失败!');
})
}
},
components: {
......
......@@ -11,7 +11,7 @@
<el-option v-for="item in object" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="投诉单位:" class="inline" prop="unitVal" @change="findProject">
<el-form-item label="投诉单位:" class="inline" prop="unitVal">
<el-select v-model="form.unitVal" placeholder="请选择" clearable>
<el-option v-for="item in unit" :key="item.id" :label="item.name" :value="item.id" ></el-option>
</el-select>
......@@ -140,7 +140,14 @@ export default {
}
},
created() {},
mounted(){},
mounted(){
this.$server.getProjectFindAll().then(res => {
console.log(res.data.data)
this.project = res.data.data;
}).catch(err => {
this.$message.error('数据请求失败!');
})
},
methods: {
// 表单提交
submitForm(formName) {
......@@ -209,17 +216,6 @@ export default {
}).catch(err => {
this.$message.error('数据请求失败!');
})
},
// 获取项目名称
findProject() {
this.$server.getUnitFindByType(this.form.unitVal).then(res => {
console.log(res.data)
if (res.data.code === 200) {
this.project = res.data.data;
}
}).catch(err => {
this.$message.error('数据请求失败!');
})
}
},
components: {
......
......@@ -98,6 +98,7 @@ export default {
},
// 首页跳转
go() {
console.log(this.sidebar.path)
this.$router.push({name: this.sidebar.path});
$('.menuTitle').addClass('goTitle') // 样式修改
$('.listVal>span').removeClass('menuClick')
......
......@@ -39,7 +39,7 @@
</p>
</div>
<div class="menu">
<p class="bg" v-if="this.$store.getters.getUserData.type !== 1">
<p class="bg" v-if="this.$store.getters.getUserData.type !== 1" @click="jump('projectManagement',7,'我的项目')">
<img src="./img/WD.png">
<span>我的项目</span>
</p>
......@@ -110,7 +110,6 @@ export default {
methods: {
// 跳转
jump(path,index,title) {
this.$router.push({name: path});
let val = {
name: path,
index: index,
......@@ -118,13 +117,18 @@ export default {
}
this.$store.commit('changeHomeClick', val); // 传给导航进行样式定位和点击事件
this.$store.commit('changeNowPath', path); // 当前path传给header作比对
this.$router.push({name: path});
},
// 跳转到其他页面
goOther(path) {
if (path === 'http://120.55.57.35:8080/assessment/#/homeDetailcopy') {
let val = 'http://120.55.57.35:8080/assessment/#/homeDetailcopy' + '?username=' + this.$store.getters.getUserData.userName;
if (path === 'http://120.55.57.35:8080/assessment/#/homeDetailcopy' && this.$store.getters.getUserData.type === 1) {
let val = 'http://120.55.57.35:8080/assessment/#/homeDetailcopy' + '?username=' + this.$store.getters.getUserData.userName + '&authority=1';
window.open(val);
} else {
} else if (path === 'http://120.55.57.35:8080/assessment/#/homeDetailcopy' && this.$store.getters.getUserData.type !== 1) {
let val = 'http://120.55.57.35:8080/assessment/#/homeDetailcopy' + '?username=' + this.$store.getters.getUserData.userName + '&authority=0';
window.open(val);
}
else {
window.open(path);
}
}
......
......@@ -40,6 +40,7 @@
<el-table-column
prop="person"
label="发布机构"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
......
......@@ -19,6 +19,7 @@
style="width: 100%;">
<el-table-column
prop="content"
:show-overflow-tooltip="true"
label="操作内容"
align="center">
</el-table-column>
......
......@@ -117,21 +117,40 @@ export default {
}
}
}
this.$server.PostProjectSearch(val).then((res) => { // 数据请求
console.log(res.data.data)
if (res.data.code === 200) {
console.log(res.data.data);
this.allData = res.data.data.rows;
this.totleLength = res.data.data.total;
for (let item of this.allData) {
item.startTime = this.timeC(item.startTime);
item.endTime = this.timeC(item.endTime);
item.schedule = '需求确认中'
if (this.pageName === '我的项目') {
this.$server.postProjectSearchSelf(val).then((res) => { // 数据请求
console.log(res.data.data)
if (res.data.code === 200) {
console.log(res.data.data);
this.allData = res.data.data.rows;
this.totleLength = res.data.data.total;
for (let item of this.allData) {
item.startTime = this.timeC(item.startTime);
item.endTime = this.timeC(item.endTime);
item.schedule = item.processMap.actual === 0 ? '新建' : item.processMap.actual === 1 ? '需求调研阶段' :item.processMap.actual === 2 ? '开发阶段' : item.processMap.actual === 3 ? '试运行阶段' : item.processMap.actual === 4 ? '终验' : '';
}
}
}
}).catch(err => {
this.$message.error('数据请求失败!');
})
}).catch(err => {
this.$message.error('数据请求失败!');
})
} else {
this.$server.PostProjectSearch(val).then((res) => { // 数据请求
console.log(res.data.data)
if (res.data.code === 200) {
console.log(res.data.data);
this.allData = res.data.data.rows;
this.totleLength = res.data.data.total;
for (let item of this.allData) {
item.startTime = this.timeC(item.startTime);
item.endTime = this.timeC(item.endTime);
item.schedule = item.processMap.actual === 0 ? '新建' : item.processMap.actual === 1 ? '需求调研阶段' :item.processMap.actual === 2 ? '开发阶段' : item.processMap.actual === 3 ? '试运行阶段' : item.processMap.actual === 4 ? '终验' : '';
}
}
}).catch(err => {
this.$message.error('数据请求失败!');
})
}
},
// 搜索栏
search() {
......
......@@ -150,35 +150,14 @@ export default {
time: '2020-03-02'
}
],
now: 23, // 当前进度
forecase: 77 // 预计进度
now: 3, // 当前进度
forecase: 2 // 预计进度
}
},
created() {
},
mounted(){
this.init();
if (this.now >= 93) {
$('.blueLine').css('width', '')
} else {
$('.blueLine').css('width', this.now + '%');
$('.trasLine').css('left', this.forecase + '%')
}
if (this.now > 0 && this.now < 31) {
$('.processAll>p:nth-child(1) .processList').addClass('blue');
} else if (this.now >= 31 && this.now < 62) {
$('.processAll>p:nth-child(1) .processList').addClass('blue');
$('.processAll>p:nth-child(2) .processList').addClass('blue');
} else if (this.now >= 62 && this.now < 93) {
$('.processAll>p:nth-child(1) .processList').addClass('blue');
$('.processAll>p:nth-child(2) .processList').addClass('blue');
$('.processAll>p:nth-child(3) .processList').addClass('blue')
} else if (this.now >= 93) {
$('.processAll>p:nth-child(1) .processList').addClass('blue');
$('.processAll>p:nth-child(2) .processList').addClass('blue');
$('.processAll>p:nth-child(3) .processList').addClass('blue');
$('.processAll>p:nth-child(4) .processList').addClass('blue')
}
},
methods: {
init() {
......@@ -187,21 +166,66 @@ export default {
that.$server.GetProjectGet(that.value.id).then((res) => { // 数据请求
if (res.data.code === 200) {
console.log(res.data.data)
that.allVal.name = res.data.data.name, // 项目名称
that.allVal.startTime = that.timeC(res.data.data.startTime), // 开始时间
that.allVal.endTime = that.timeC(res.data.data.endTime), // 结束时间
that.allVal.technical = res.data.data.techName, // 技术路线
that.allVal.now = res.data.data.schedule, // 当前阶段
that.allVal.build = res.data.data.consName, // 建设方
that.allVal.basis = res.data.data.gratorName, // 集成商
that.allVal.develop = res.data.data.devName, // 开发商
that.allVal.supervision = res.data.data.thirdName // 监理方
that.allVal.name = res.data.data.name; // 项目名称
that.allVal.startTime = that.time(res.data.data.startTime); // 开始时间
that.allVal.endTime = that.time(res.data.data.endTime); // 结束时间
that.allVal.technical = res.data.data.techName; // 技术路线
that.allVal.now = res.data.data.schedule; // 当前阶段
that.allVal.build = res.data.data.consName; // 建设方
that.allVal.basis = res.data.data.gratorName; // 集成商
that.allVal.develop = res.data.data.devName; // 开发商
that.allVal.supervision = res.data.data.thirdName; // 监理方
that.marker[0].time = that.time(res.data.data.goals[0].startTime);
that.marker[1].time = that.time(res.data.data.goals[1].startTime);
that.marker[2].time = that.time(res.data.data.goals[2].startTime);
that.marker[3].time = that.time(res.data.data.endTime);
if (res.data.data.processMap !== null) {
that.now = res.data.data.processMap.actual;
that.forecase = res.data.data.processMap.expect;
that.allVal.now = res.data.data.processMap.actual === 0 ? '新建' : res.data.data.processMap.actual === 1 ? '需求调研阶段' : res.data.data.processMap.actual === 2 ? '开发阶段' : res.data.data.processMap.actual === 3 ? '试运行阶段' : res.data.data.processMap.actual === 4 ? '终验' : '';
}
that.changeCss();
}
}).catch(err => {
this.$message.error('数据请求失败!');
})
},30)
},
changeCss() {
if (this.forecase === 4) {
$('.trasLine').css('opacity', '0')
} else if (this.forecase === 3) {
$('.trasLine').css('left', '71%')
} else if (this.forecase === 2) {
$('.trasLine').css('left', '38%')
} else if (this.forecase === 1) {
$('.trasLine').css('left', '6%')
} else if (this.forecase === 0) {
$('.trasLine').css('opacity', '0')
}
if (this.now === 4) { // 终验
$('.blueLine').css('width', '');
$('.trasLine').css('opacity', '0')
$('.processAll>p:nth-child(1) .processList').addClass('blue');
$('.processAll>p:nth-child(2) .processList').addClass('blue');
$('.processAll>p:nth-child(3) .processList').addClass('blue');
$('.processAll>p:nth-child(4) .processList').addClass('blue')
} else if (this.now === 3) { // 试运行阶段
$('.blueLine').css('width', '80%');
$('.processAll>p:nth-child(1) .processList').addClass('blue');
$('.processAll>p:nth-child(2) .processList').addClass('blue');
$('.processAll>p:nth-child(3) .processList').addClass('blue');
} else if (this.now === 2) { // 开发阶段
$('.blueLine').css('width', '50%');
$('.processAll>p:nth-child(1) .processList').addClass('blue');
$('.processAll>p:nth-child(2) .processList').addClass('blue');
} else if (this.now === 1) { // 需求调研阶段
$('.blueLine').css('width', '20%');
$('.processAll>p:nth-child(1) .processList').addClass('blue');
} else { // 新建
$('.blueLine').css('width', '0.1%');
}
},
// 时间换算
timeC(value) {
let date = new Date(value); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
......@@ -212,6 +236,14 @@ export default {
let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
return Y + M + D + ' ' + h + m + s;
},
// 时间换算
time(value) {
let date = new Date(value); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
return Y + M + D;
}
},
components: {
......@@ -362,7 +394,7 @@ export default {
}
.projectInformation .milestone .line .trasLine{
position: absolute;
top: 11px;
top: 22px;
}
.projectInformation .milestone .line .trasLine>span{
position: absolute;
......@@ -382,13 +414,15 @@ export default {
.projectInformation .milestone .blueLine>img{
position: absolute;
right: -66px;
top: 10px;
top: 20px;
}
.projectInformation .milestone .blueLine>span{
position: absolute;
right: -50px;
top: 48px;
top: 58px;
color: #fff;
display: inline-block;
width: 98px;
}
.projectInformation .blue{
background: #4877e6;
......
......@@ -55,7 +55,7 @@
</p>
</div>
<div @click="clickMenu('',7,'我的项目')" v-if="this.$store.getters.getUserData.type !== 1">
<div @click="clickMenu('projectManagement',7,'我的项目')" v-if="this.$store.getters.getUserData.type !== 1">
<p class="menu">
<span class="font">我的项目</span>
</p>
......@@ -186,12 +186,7 @@ export default {
},
{
name: '我的项目',
menuList: [
{
name: '我的项目',
path: 'projectManagement'
}
]
menuList: []
},
]
}
......@@ -200,7 +195,7 @@ export default {
},
mounted(){
// home点击过来,定位到对应导航
this.clickMenu(this.$store.getters.getHomeClick.path,this.$store.getters.getHomeClick.index,this.$store.getters.getHomeClick.title)
this.clickMenu(this.$store.getters.getHomeClick.name,this.$store.getters.getHomeClick.index,this.$store.getters.getHomeClick.title)
},
methods: {
// 点击切换样式并且跳转
......
......@@ -252,6 +252,12 @@ const server = {
data: data.value,
headers: {'Content-Type': 'multipart/form-data'}
});
}
},
postProjectSearchSelf(data) { // 项目管理文件清单分页查询
return axios('/project/searchSelf', {
method: 'post',
data: data
})
},
}
export default server;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论