提交 c0bad791 authored 作者: zax's avatar zax

下拉框文字bug

上级 447aee29
......@@ -275,4 +275,7 @@ export default {
.company .content .searchInput{
margin-left: 25px;
}
.company .content>>>.el-select{
width: 100%;
}
</style>
......@@ -322,14 +322,17 @@ export default {
justify-content: space-evenly;
margin-top: 20px;
}
.newCompany .company-content>>>.el-radio{
.product .company-content>>>.el-radio{
margin-right: 22px;
width: 50px;
}
.newCompany .company-content>>>.el-input__inner{
.product .company-content>>>.el-input__inner{
width: 290px;
}
.searchInput{
margin-left: 25px;
}
.product .content>>>.el-select{
width: 100%;
}
</style>
......@@ -327,4 +327,7 @@ export default {
.company .content .searchInput{
margin-left: 25px;
}
.company .content>>>.el-select{
width: 100%;
}
</style>
......@@ -377,14 +377,17 @@ export default {
justify-content: space-evenly;
margin-top: 20px;
}
.newCompany .company-content>>>.el-radio{
.product .content>>>.el-radio{
margin-right: 22px;
width: 50px;
}
.newCompany .company-content>>>.el-input__inner{
.product .content>>>.el-input__inner{
width: 290px;
}
.searchInput{
margin-left: 25px;
}
.product .content>>>.el-select{
width: 100%;
}
</style>
......@@ -13,21 +13,23 @@
<p class="search">
<span class="search-input">
<span>项目名称:</span>
<el-input size="medium" placeholder="请输入"></el-input>
<el-input v-model="name" size="medium" placeholder="请输入"></el-input>
</span>
<span class="search-input">
<span>开始时间:</span>
<el-date-picker
v-model="startTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</span>
<span class="search-input">
<span>完成时间:</span>
<el-date-picker
v-model="startTime"
v-model="endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</span>
......@@ -46,9 +48,9 @@
</span>
<span class="search-input">
<span>建设方:</span>
<el-select v-model="techVal" placeholder="请选择" clearable>
<el-select v-model="build" placeholder="请选择" clearable>
<el-option
v-for="item in techList"
v-for="item in buildList"
:key="item.id"
:label="item.name"
:value="item.name">
......@@ -57,9 +59,9 @@
</span>
<span class="search-input">
<span>集成商:</span>
<el-select v-model="techVal" placeholder="请选择" clearable>
<el-select v-model="integrate" placeholder="请选择" clearable>
<el-option
v-for="item in techList"
v-for="item in integrateList"
:key="item.id"
:label="item.name"
:value="item.name">
......@@ -70,9 +72,9 @@
<p class="search" style="width: 59.5%">
<span class="search-input">
<span>开发商:</span>
<el-select v-model="techVal" placeholder="请选择" clearable>
<el-select v-model="develop" placeholder="请选择" clearable>
<el-option
v-for="item in techList"
v-for="item in developList"
:key="item.id"
:label="item.name"
:value="item.name">
......@@ -81,9 +83,9 @@
</span>
<span class="search-input">
<span>监理方:</span>
<el-select v-model="techVal" placeholder="请选择" clearable>
<el-select v-model="supervisor" placeholder="请选择" clearable>
<el-option
v-for="item in techList"
v-for="item in supervisorList"
:key="item.id"
:label="item.name"
:value="item.name">
......@@ -111,11 +113,11 @@
</template>
</el-table-column>
<el-table-column
prop="introduction"
prop="des"
label="功能简介"
align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.introduction" placeholder="请输入"></el-input>
<el-input v-model="scope.row.des" placeholder="请输入"></el-input>
</template>
</el-table-column>
<el-table-column
......@@ -126,18 +128,21 @@
<el-date-picker
v-model="scope.row.startTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</template>
</el-table-column>
<el-table-column
prop="expected"
prop="endTime"
label="预计时间"
type="datetime"
align="center">
<template slot-scope="scope">
<el-date-picker
v-model="scope.row.expected"
v-model="scope.row.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</template>
......@@ -167,19 +172,19 @@
</template>
</el-table-column>
<el-table-column
prop="form"
prop="model"
label="型号"
align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.introduction" placeholder="请输入"></el-input>
<el-input v-model="scope.row.model" placeholder="请输入"></el-input>
</template>
</el-table-column>
<el-table-column
prop="type"
prop="form"
label="类型"
align="center">
<template slot-scope="scope">
<el-select v-model="scope.row" @change="typeVal($event)" placeholder="请选择" clearable>
<el-select v-model="scope.row.form" @change="typeVal($event)" placeholder="请选择" clearable>
<el-option
v-for="item in formList"
:key="item.id"
......@@ -190,11 +195,11 @@
</template>
</el-table-column>
<el-table-column
prop="expected"
prop="expect"
label="计划数量"
align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.introduction" placeholder="请输入"></el-input>
<el-input v-model="scope.row.expect" placeholder="请输入"></el-input>
</template>
</el-table-column>
</el-table>
......@@ -218,15 +223,15 @@
label="里程碑编号"
align="center">
<template slot-scope="scope">
<span>{{scope.row.number}}</span>
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column
prop="introduction"
prop="type"
label="里程碑名称"
align="center">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
<span>{{scope.row.type}}</span>
</template>
</el-table-column>
<el-table-column
......@@ -237,17 +242,24 @@
<el-date-picker
v-model="scope.row.time"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</template>
</el-table-column>
<el-table-column
prop="expected"
prop="type"
label="文件列表"
align="center">
<template slot-scope="scope">
<el-checkbox-group v-model="checkList1[scope.$index]">
<el-checkbox v-for="item in scope.row.file" :checked="item === '开工令' || item === '初验报告' || item === '终验报告'" :disabled="item === '开工令' || item === '初验报告' || item === '终验报告'" :label="item"></el-checkbox>
<el-checkbox-group v-if="scope.row.type === '需求确认'" v-model="scope.row.files">
<el-checkbox v-for="item in globalOne" :label="item"></el-checkbox>
</el-checkbox-group>
<el-checkbox-group v-if="scope.row.type === '初验'" v-model="scope.row.files">
<el-checkbox v-for="item in globalTwo" :label="item"></el-checkbox>
</el-checkbox-group>
<el-checkbox-group v-if="scope.row.type === '终验'" v-model="scope.row.files">
<el-checkbox v-for="item in globalThree" :label="item"></el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
......@@ -278,17 +290,22 @@ export default {
name: 'projectAdd',
data() {
return {
name: '',
startTime: '',
endTime: '',
techVal: '',
techList: [],
tableData: [{name: '',introduction: '',startTime: '',expected: ''}],
softwareData: [{name: '',introduction: '',startTime: '',expected: ''}],
productData: [{name: '',introduction: '',startTime: '',expected: ''}],
softwareData: [{name: '',des: '',startTime: '',endTime: ''}],
productData: [{name: '',model: '',form: '',expect: '1'}],
milepostData: [
{number: '里程碑1',name: '需求确认',time: '',file: ['需求文档', '详细设计', '开工令']},
{number: '里程碑2',name: '初验',time: '',file: ['初验报告']},
{number: '里程碑3',name: '终验',time: '',file: ['试运行报告','终验报告']},
{name: '里程碑1',type: '需求确认',time: '', files: []},
{name: '里程碑2',type: '初验',time: '', files: []},
{name: '里程碑3',type: '终验',time: '', files: []},
],
globalOne: ['需求文档', '详细设计', '开工令'],
globalTwo: ['初验报告'],
globalThree: ['试运行报告','终验报告'],
textarea: '',
addImg: require('./img/add.png'),
addSelect: require('./img/add-select.png'),
......@@ -306,35 +323,141 @@ export default {
document: '',
checkList1: '',
checked: false,
type: ''
type: '',
buildList: [], // 建设方
integrateList: [], // 集成商
developList: [], // 开发商
supervisorList: [], // 监理方
build: '',
integrate: '',
develop: '',
supervisor: ''
}
},
mounted() {
this.unit();
},
methods: {
// 下拉项数据
unit() {
this.$server.getTechFindAll().then(res => { // 请求技术路线
this.techList = res.data.data
this.techList = res.data.data;
}).catch(err => {
this.$message.error('数据请求失败!');
})
let arr = [5, 4, 8, 3];
arr.map(item => {
this.$server.getUnitFindByType(item).then(res => { // 单位类别
let list = res.data.data;
if (list[0].id === 5) { // 建设方
this.buildList = list;
}
if (list[0].id === 4) { // 集成商
this.integrateList = list;
}
if (list[0].id === 8) { // 开发商
this.developList = list;
}
if (list[0].id === 3) { // 监理方
this.supervisorList = list;
}
});
})
},
methods: {
// 提交新增
// 确定新增项目
save () {
console.log(this.type)
let changeProduct = {
'服务器': 1,
'CPU': 2,
'操作系统': 3,
'数据库': 4,
'中间件': 5,
'其他': 6
}
this.productData.map(item => { // 产品类型转换
item.form = changeProduct[item.form]
})
let changeGoals = {
'需求确认': 1,
'初验': 2,
'终验': 3,
}
this.milepostData.map(item => { // 里程碑编号转换
item.type = changeGoals[item.type]
})
console.log(this.milepostData)
let techId = '';
this.techList.map(item => { // 技术路线id
if (item.name === this.techVal) {
techId = item.id
}
})
let consId = '';
this.buildList.map(item => { // 建设方id
if (item.name === this.build) {
consId = item.id
}
});
let gratorId = '';
this.integrateList.map(item => { // 集成商id
if (item.name === this.integrate) {
gratorId = item.id
}
});
let devId = '';
this.developList.map(item => { // 开发商id
if (item.name === this.develop) {
devId = item.id
}
});
let thirdId = '';
this.supervisorList.map(item => { // 监理方id
if (item.name === this.supervisor) {
thirdId = item.id
}
})
let data = {
consId: consId,
consName: this.build,
devId: devId,
devName: this.develop,
endTime: this.endTime,
goals: this.milepostData,
gratorId: gratorId,
gratorName: this.integrate,
hardwares: this.productData,
name: this.name,
softWorks: this.softwareData,
startTime: this.startTime,
techId: techId,
techName: this.techVal,
thirdId: thirdId,
thirdName: this.supervisor
};
console.log(data)
// this.$server.postProjectAdd(data).then(res => {
// console.log(res)
// })
},
// 技术路线查询产品信息
search () {
if (this.techList) {
this.techList.map(item => { // 技术路线查询产品信息
if (item.name === this.techVal) {
if (item.name === this.techVal && item.producies) {
this.productData = item.producies;
this.productData.map(val => { // 默认技术数量
val.expect = 1;
})
}
})
}
},
typeVal(e) {
this.type = e.target.value
console.log(e.target.value)
},
// 软件信息新增
addSoftware() {
let data = {name: '',introduction: '',startTime: '',expected: ''};
let data = {name: '',des: '',startTime: '',endTime: ''};
this.softwareData.push(data);
},
// 产品信息类型转换
......@@ -343,7 +466,7 @@ export default {
},
// 产品信息新增
addProduct() {
let data = {name: '',introduction: '',startTime: '',expected: ''};
let data = {name: '',model: '',form: '',expect: '1'};
this.productData.push(data);
}
}
......
......@@ -199,6 +199,17 @@ const server = {
method: 'put',
data: data
})
},
getUnitFindByType(data) { // 修改产品信息
return axios('/unit/findByType/' + data, {
method: 'get'
})
},
postProjectAdd(data) { // 项目管理新增
return axios('/project/add', {
method: 'post',
data: data
})
}
}
export default server;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论