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

new

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