提交 1431b6ab authored 作者: CRS's avatar CRS

版本回退

上级 cf4550ba
......@@ -4,7 +4,7 @@
// 服务地址
const IP = 'http://120.55.57.35'; // 刘杰
// const IP = 'http://localhost'; // 刘杰
// const IP = 'http://192.168.1.104'; // 刘杰
// 请求目标服务器域名配置
const DOMAIN_NAME = {
......
......@@ -2,7 +2,7 @@
<div>
<app-header></app-header>
<div style="display: flex;">
<sidebar></sidebar>
<sidebar v-show="$route.name == 'assessmentReport'?false:$route.name == 'reportAssess'?false:true"></sidebar>
<router-view ></router-view>
</div>
......
......@@ -7,12 +7,22 @@ textarea, p, blockquote, th, td {
margin: 0;
padding: 0;
}
html{
width: 100%;
height:100%;
}
body {
font-size: 16px;
line-height: 20px;
background: #fff;
font-family: "Regular";
width: 100%;
height:100%;
}
#app{
width: 100%;
height:100%;
position: absolute;
}
a {
......
......@@ -4,9 +4,13 @@
right: 15px;
top: 15px;
cursor: pointer;
display: inline-block;
width: 22px;
height: 24px;
background: url("../assets/img/close.png");
}
.closeModel:hover{
content: url("../assets/img/closeH.png");
background: url("../assets/img/closeH.png");
}
.el-dialog{
width: 740px;
......@@ -51,7 +55,7 @@
text-align: center;
background: #4877e6;
cursor: pointer;
border-radius: 2px;
border-radius: 4px;
color: #fff;
font-size: 18px;
}
......@@ -64,8 +68,146 @@
line-height: 34px;
text-align: center;
cursor: pointer;
border-radius: 2px;
border-radius: 4px;
color: #fff;
font-size: 18px;
background: #889cdd;
}
/*表格样式*/
.common-table{
margin: 24px 70px 0 70px;
box-shadow: rgba(72,119,230,0.1) 0 0 15px;;
border: .5px solid transparent;
border-radius: 10px;
cursor: default;
}
.el-table th > .cell{
font-size: 18px;
color: #333;
font-weight: normal;
}
.el-table th.is-leaf{
height: 70px;
}
.el-table tr{
font-size: 18px;
}
.el-table{
color: #233b6e;
}
.el-table--striped .el-table__body tr.el-table__row--striped.el-table__row--striped.el-table__row--striped td {
background-color: #fff;
}
.el-table--striped .el-table__body tr.el-table__row--striped.el-table__row--striped.el-table__row--striped:hover td {
background-color: #4877e6;
color: #fff;
/*表格双行hover样式*/
}
.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color: #4877e6;
color: #fff;
/*表格单行hover样式*/
}
.el-table th.is-leaf, .el-table td {
border-bottom: 1px solid #d5e3ff;
}
.el-table__body tr, .el-table__body td {
padding: 0;
height: 60px;
background: #f5f8fd;
cursor: pointer;
}
.content .block{
text-align: right;
padding: 30px 70px 0 0;
}
.el-pagination.is-background .el-pager li{
background-image: linear-gradient(to bottom, #c5d5f7,#7a95e6);
color: #fff;
}
.el-pagination.is-background .el-pager li:not(.disabled).active{
background-image: linear-gradient(to bottom, #7a9eeb,#274acf);
color: #fff;
}
.el-pagination__editor .el-input__inner{
width: 46px !important;
height: 28px !important;
line-height: 28px !important;
}
.content>>>.el-table td{
border-bottom: 1px solid #d5e3ff;
}
.content>>>.btn-prev,.role .content>>>.btn-next{
background: #c5d5f7;
background-image: linear-gradient(to bottom, #c5d5f7,#7a95e6);
color: #fff;
}
.content>>>.btn-prev:disabled,.dynamicList .content>>>.btn-next:disabled{
color: #C0C4CC;
}
.content>>>.el-table__body tr.current-row > td{
background: #f5f8fd;
}
/*input搜索*/
/*.content .search>>>.el-input__prefix{*/
/* left: 154px;*/
/*}*/
/*.content .search>>>.el-input--prefix .el-input__inner{*/
/* padding-left: 15px;*/
/*}*/
/*统一修改input、select字体样式颜色*/
.el-input__inner{
color: #333;
font-size: 18px;
font-family: 'Regular';
}
/*checkbox选择款*/
.el-checkbox__input.is-disabled .el-checkbox__inner,.el-checkbox__input.is-checked .el-checkbox__inner{
width: 16px;
height: 16px;
background-image: url("../assets/img/check_click.png");
background-repeat: no-repeat;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-color: rgba(0,0,0,0);
border-color: rgba(0,0,0,0);
}
.el-checkbox__inner{
width: 16px;
height: 16px;
background-image: url("../assets/img/check_clickN.png");
background-repeat: no-repeat;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-color: rgba(0,0,0,0);
border-color: rgba(0,0,0,0);
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner,.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after{
background-color: rgba(0,0,0,0);
border-color: rgba(0,0,0,0);
}
.el-checkbox__input.is-checked .el-checkbox__inner::after{
display: none;
}
.el-checkbox__label,.el-checkbox__input.is-checked + .el-checkbox__label,.el-checkbox__input.is-disabled + span.el-checkbox__label{
color: #333333;
font-size: 18px;
vertical-align: middle;
}
.el-upload-list{
display: none;
}
/*文件管理表格单双行hover*/
.el-table--striped .el-table__body tr.el-table__row--striped.el-table__row--striped.el-table__row--striped:hover td .buttonHandle{
background-color: #ffffff;
color: #4877e6;
/*表格双行hover样式*/
}
.el-table--enable-row-hover .el-table__body tr:hover>td .buttonHandle{
background-color: #ffffff;
color: #4877e6;
/*表格单行hover样式*/
}
\ No newline at end of file
<template>
<div class="UnDependence">
<el-row>
<el-col :span="24">
<div class="content">
<p class="search">
<span class="searchVal">
<span>查询:</span>
<el-input v-model="input2" size="medium" @change="search()" placeholder="请输入关键字"></el-input>
</span>
<span class="button searchBtn" @click="search()">搜索</span>
</p>
<div class="common-table">
<el-table
highlight-current-row
max-height="840"
:data="tableData"
stripe
style="width: 100%;">
<el-table-column
prop="technologyName"
label="关键技术"
align="center">
</el-table-column>
<el-table-column
prop="target"
label="关键字"
align="center">
</el-table-column>
<el-table-column
prop="number"
label="操作"
align="center">
<template slot-scope="scope">
<span class="buttonSupport support" @click="yesEdit(scope.row)">支持国产化</span>
<span class="buttonSupport Unsupport" @click="noEdit(scope.row)">不支持国产化</span>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="myPage"
:page-size="pageSize"
background
layout="prev, pager, next, jumper"
:total="tablePageSize">
</el-pagination>
</div>
<!-- 分页 -->
</div>
</el-col>
</el-row>
<!-- 新增 / 编辑 公用弹窗 -->
<el-dialog :visible.sync="openModel" class="model">
<span class="closeModel"></span>
<component :is="components" @on-cancel="reset"></component>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'roleDispose',
data () {
return {
tableData: [],
tablePageSize: 0,
myPage: 1, // 分页第一页
pageSize: 9, // 每页个数
openModel: false,
components: '',
technologyId:'内部依赖(未知)',
input2: '',
status: 0
}
},
mounted() {
this.getConfigList();
},
methods: {
// 搜索
search () {
let obj = {
technologyName: this.technologyId,
target: this.input2
}
this.$server.getConfigPageList(this.myPage, this.pageSize, obj).then(res => {
console.log(res);
this.tableData = res.data.rows;
this.tablePageSize = res.data.total;
})
},
// 数据
getConfigList(dex, num, st) {
let obj = {
technologyName:this.technologyId
}
this.$server.getConfigPageList(this.myPage,this.pageSize,obj).then(res => {
this.tableData = res.data.rows;
this.tablePageSize = res.data.total;
});
},
// 点击分页
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
// 当前页数
handleCurrentChange(val) {
console.log(val)
this.myPage = val;
this.getConfigList();
},
// 关闭弹框
reset() {
this.openModel = false;
this.components = '';
},
// 支持国产化
yesEdit(row, index){
let obj = {
suffix: 'java',
target: row.target,
technologyId: '967a8bd0-eb27-4fb6-ba1d-1bca21cea5b4',
technologyName: '内部依赖(支持)',
id: row.id,
oldRule:{
target:row.target,
suffix:row.suffix,
technologyId:row.technologyId,
id:row.id
}
};
console.log(index)
this.$server.editConfigUpdate(obj).then(res => {
this.$message({
message: '修改成功',
type: 'success'
});
this.getConfigList();
});
},
// 不支持国产化
noEdit(row, index){
let obj = {
suffix: ['java'],
target: row.target,
technologyId: '1cc9c4be-8245-49b6-bb4b-3f10c4e8b47f',
technologyName: '内部依赖(不支持)',
id: row.id,
oldRule:{
target:row.target,
suffix:row.suffix,
technologyId:row.technologyId,
id:row.id
}
};
this.$server.editConfigUpdate(obj).then(res => {
this.$message({
message: '修改成功',
type: 'success'
});
this.getConfigList();
});
},
}
}
</script>
<style scoped>
.UnDependence{
background: #ebf0f8;
width: 100%;
}
.UnDependence .content{
margin: 40px;
height: 841px;
background: #fff;
overflow: hidden;
}
.UnDependence .content .title{
padding: 30px 0 0 60px;
font-size: 20px;
color: #233b6e;
}
.UnDependence .content .search{
position: relative;
margin-top: 36px;
padding: 0px 70px 0px 70px;
display: flex;
}
.UnDependence .content .searchVal{
width: 280px;
display: flex;
font-size: 18px;
color: #4663a6;
}
.UnDependence .content .searchVal>span{
width: 75px;
display: inline-block;
line-height: 34px;
}
.UnDependence .content .button{
display: inline-block;
width: 100px;
height: 34px;
line-height: 34px;
text-align: center;
background: #4877e6;
cursor: pointer;
margin-left: 100px;
border-radius: 4px;
color: #fff;
font-size: 18px;
}
.UnDependence .content .button:hover{
background: rgba(72,119,230,.6);
}
/*.UnDependence .content .img{*/
/* width: 21px;*/
/* height: 21px;*/
/* display: inline-block;*/
/* vertical-align: middle;*/
/* margin-right: 5px;*/
/*}*/
.UnDependence .content .buttonSupport{
display: inline-block;
background-color: #4877e6;
color: #ffffff;
border-radius: 4px;
line-height: 34px;
margin-right: 5px;
width: 115px;
height: 34px;
}
.UnDependence .content .support:hover{
background-color: #ffffff;
color: #4877e6;
}
.UnDependence .content .Unsupport:hover{
background-color: #ffffff;
color: #4877e6;
}
</style>
<template>
<div class="imgs">
<el-carousel :height="height + 'px'" direction="vertical">
<el-carousel :height="height + 'px'" direction="vertical" :interval="4000">
<el-carousel-item v-for="item in imgUrls" :key="item.id">
<el-row>
<el-col :span="24">
......@@ -28,7 +28,6 @@ export default {
created() {
},
mounted(){
this.imgload();
window.addEventListener('resize',()=>{
this.height = this.$refs.height[0].height;
this.imgload();
......@@ -38,7 +37,6 @@ export default {
imgload() {
this.$nextTick(()=>{
this.height = this.$refs.height[0].height;
console.log(this.$refs.height[0].height);
})
}
},
......
......@@ -3,11 +3,10 @@
<el-row>
<el-col :span="24">
<div class="content">
<p class="title">最新动态</p>
<p class="search">
<span class="searchVal">
<span>名称</span>
<el-input v-model="searchVal" size="medium" placeholder="请输入"></el-input>
<span>查询</span>
<el-input v-model="searchVal" size="medium" placeholder="请输入查询内容"></el-input>
</span>
<span class="button">搜索</span>
</p>
......@@ -18,7 +17,7 @@
:data="allData"
@row-click="openTable"
stripe
style="width: 100%;margin-bottom: 10px;">
style="width: 100%;">
<el-table-column
prop="type"
label="标签"
......@@ -40,6 +39,7 @@
<el-table-column
prop="person"
label="发布机构"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
......@@ -50,14 +50,14 @@
</el-table>
</div>
<!-- 分页 -->
<div class="block" v-if="this.totleLength >= 10">
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......@@ -69,13 +69,14 @@
</template>
<script>
import $ from 'jquery';
export default {
data () {
return {
searchVal: '',
currentPage: 1, // 分页第一页
pagesize: 8, // 每页个数
totleLength: 100, // 获取后台传的所有数据的长度
pagesize: 9, // 每页个数
totleLength: 8, // 获取后台传的所有数据的长度
allData:[
{
name: '天津麒麟正式更名为麒麟软件 国产操作系统主力军吹响出征号角!',
......@@ -139,14 +140,9 @@ export default {
created() {
},
mounted(){
let val = this.$store.getters.getSidebar;
val.push(
{
name: '最新动态',
path: 'dynamicList'
}
)
this.$store.commit('changeSidebar', val);
$('.listVal>span').removeClass('menuClick') // 修改样式
$('.menuTitle').removeClass('goTitle')
$('.list>span:nth-child(2)>span').addClass('menuClick')
},
methods: {
// 点击表格
......@@ -192,29 +188,22 @@ export default {
display: flex;
}
.dynamicList .content .searchVal{
width: 245px;
width: 280px;
display: flex;
font-size: 18px;
color: #4663a6;
}
.dynamicList .content .searchVal>span{
width: 85px;
width: 75px;
display: inline-block;
line-height: 34px;
}
.dynamicList .content .common-table{
box-shadow: 4px 4px 5px rgba(72,119,230,0.1);
border: .5px solid transparent;
border-radius: 10px;
}
.dynamicList>>>.el-input__inner{
border: 1px solid rgba(8,104,157,.3);
border-radius: 2px;
font-size: 18px;
color: #999;
height: 34px;
line-height: 34px;
width: 180px;
}
.dynamicList .content .button{
display: inline-block;
......@@ -224,68 +213,12 @@ export default {
text-align: center;
background: #4877e6;
cursor: pointer;
margin-left: 100px;
border-radius: 2px;
border-radius: 4px;
color: #fff;
font-size: 18px;
margin-left: 100px;
}
.dynamicList .content .button:hover{
background: rgba(72,119,230,.6);
}
.dynamicList .content .common-table{
margin: 24px 70px 0 70px;
}
.dynamicList .content .common-table>>>.el-table th > .cell{
font-size: 18px;
color: #333;
font-weight: normal;
}
.dynamicList .content .common-table>>>.el-table th.is-leaf{
height: 70px;
}
.dynamicList .content .common-table>>>.el-table tr{
cursor: pointer;
font-size: 18px;
}
.dynamicList .content .common-table>>>.el-table{
color: #233b6e;
}
.dynamicList .content .common-table>>>.el-table--striped .el-table__body tr.el-table__row--striped.el-table__row--striped.el-table__row--striped td {
background-color: #fff;
}
.dynamicList .content .common-table>>>.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color: #f5f8fd;
}
.dynamicList .content .common-table>>>.el-table th.is-leaf, .el-table td {
border-bottom: 1px solid #d5e3ff;
}
.dynamicList .content .common-table>>>.el-table__body tr, .el-table__body td {
padding: 0;
height: 60px;
background: #f5f8fd;
}
.dynamicList .content .block{
text-align: right;
padding: 30px 70px 0 0;
}
.dynamicList .content>>>.el-pagination.is-background .el-pager li{
background-image: linear-gradient(to bottom, #c5d5f7,#7a95e6);
color: #fff;
}
.dynamicList .content>>>.el-pagination.is-background .el-pager li:not(.disabled).active{
background-image: linear-gradient(to bottom, #7a9eeb,#274acf);
color: #fff;
}
.dynamicList .content>>>.el-table td{
border-bottom: 1px solid #d5e3ff;
}
.dynamicList .content>>>.btn-prev,.dynamicList .content>>>.btn-next{
background: #c5d5f7;
background-image: linear-gradient(to bottom, #c5d5f7,#7a95e6);
color: #fff;
}
.dynamicList .content>>>.btn-prev:disabled,.dynamicList .content>>>.btn-next:disabled{
color: #C0C4CC;
}
</style>
<template>
<div class="newsPage">
<div class="content">
<p class="title">
动态详情
</p>
<!-- <p class="title">-->
<!-- 动态详情-->
<!-- </p>-->
<p class="name"><span class="line"></span>{{name}}</p>
<p class="other">
<span>标签:{{type}}</span>
......@@ -30,21 +30,15 @@ export default {
person: '中国软件',
type: '新闻',
type2: '公司',
news:`2月18日,中国电子旗下中国软件发布公告:中国软件子公司天津麒麟换股收购子公司中标软件事项,按照协议约定,天津麒麟更名为麒麟软件有限公司(简称麒麟软件),已办理完成相关工商变更登记手续,并取得新的营业执照。至此,由天津麒麟和中标软件整合而成的麒麟软件工商手续业已完成,基础软件的央企主力军吹响出征号角,中国操作系统新旗舰正式起航!<br><img src="static/img/1.d16d70ca.jpg" style="width: 600px;display: block;margin: 0 auto;"><b>麒麟软件:</b><br><br>为顺应产业发展趋势、市场客户需求和国家网络空间安全战略需要,发挥中央企业在国家关键信息基础设施建设中的主力军作用,中国电子旗下两家操作系统公司:中标软件和天津麒麟,实现强强整合,打造中国操作系统新旗舰——麒麟软件有限公司。<br><br>麒麟软件以安全可信操作系统技术为核心,旗下拥有“中标麒麟”“银河麒麟”两大产品品牌,既面向通用领域打造安全创新操作系统和相应解决方案,又面向国防专用领域打造高安全高可靠操作系统和解决方案,现已形成了服务器操作系统、桌面操作系统、嵌入式操作系统、麒麟云等产品,能够同时支持飞腾、龙芯、申威、兆芯、海光、鲲鹏等国产CPU。企业坚持开放合作打造产业生态,为客户提供完整的国产化解决方案。<br><br>麒麟软件注重核心技术创新,先后申请专利320余项,其中授权专利138项,登记软件著作权340余项,主持和参与起草国家、行业、联盟技术标准30余项,荣获国家科技进步一等奖在内的各类国家级、省部级和行业奖项400余个,并被授予“国家规划布局内重点软件企业”“国家高技术产业化示范工程”等称号。企业注重质量体系和创新能力打造,通过了CMMI5级评估,现有博士后工作站、省部级基础软件工程中心等,具有雄厚的科研能力和严格的管理规范。<br><br>麒麟软件在天津、北京、上海、长沙、广州、太原、郑州、成都、西安、沈阳等地设有分支机构,服务网点遍布全国31个省会城市。旗下的操作系统系列产品,在党政、国防、金融、电信、能源、交通、教育、医疗等行业获得广泛应用。根据赛迪顾问统计,麒麟软件旗下操作系统产品,连续8年位列中国Linux市场占有率第一名。`
news:`2月18日,中国电子旗下中国软件发布公告:中国软件子公司天津麒麟换股收购子公司中标软件事项,按照协议约定,天津麒麟更名为麒麟软件有限公司(简称麒麟软件),已办理完成相关工商变更登记手续,并取得新的营业执照。至此,由天津麒麟和中标软件整合而成的麒麟软件工商手续业已完成,基础软件的央企主力军吹响出征号角,中国操作系统新旗舰正式起航!<br><img src="http://www.kylinos.cn/upload/202002/19/202002191353499207.jpg" style="margin: 0 auto;display: inherit;"><br><b>麒麟软件:</b><br><br>为顺应产业发展趋势、市场客户需求和国家网络空间安全战略需要,发挥中央企业在国家关键信息基础设施建设中的主力军作用,中国电子旗下两家操作系统公司:中标软件和天津麒麟,实现强强整合,打造中国操作系统新旗舰——麒麟软件有限公司。<br><br>麒麟软件以安全可信操作系统技术为核心,旗下拥有“中标麒麟”“银河麒麟”两大产品品牌,既面向通用领域打造安全创新操作系统和相应解决方案,又面向国防专用领域打造高安全高可靠操作系统和解决方案,现已形成了服务器操作系统、桌面操作系统、嵌入式操作系统、麒麟云等产品,能够同时支持飞腾、龙芯、申威、兆芯、海光、鲲鹏等国产CPU。企业坚持开放合作打造产业生态,为客户提供完整的国产化解决方案。<br><br>麒麟软件注重核心技术创新,先后申请专利320余项,其中授权专利138项,登记软件著作权340余项,主持和参与起草国家、行业、联盟技术标准30余项,荣获国家科技进步一等奖在内的各类国家级、省部级和行业奖项400余个,并被授予“国家规划布局内重点软件企业”“国家高技术产业化示范工程”等称号。企业注重质量体系和创新能力打造,通过了CMMI5级评估,现有博士后工作站、省部级基础软件工程中心等,具有雄厚的科研能力和严格的管理规范。<br><br>麒麟软件在天津、北京、上海、长沙、广州、太原、郑州、成都、西安、沈阳等地设有分支机构,服务网点遍布全国31个省会城市。旗下的操作系统系列产品,在党政、国防、金融、电信、能源、交通、教育、医疗等行业获得广泛应用。根据赛迪顾问统计,麒麟软件旗下操作系统产品,连续8年位列中国Linux市场占有率第一名。`
}
},
created() {
},
mounted(){
$('.newAll').html(this.news);
let val = this.$store.getters.getSidebar;
val.push(
{
name: '新闻页',
path: 'newsPage'
}
)
this.$store.commit('changeSidebar', val);
$('.listVal>span').removeClass('menuClick') // 修改样式
$('.menuTitle').removeClass('goTitle')
},
methods: {
},
......@@ -55,53 +49,53 @@ export default {
}
</script>
<style scoped>
.newsPage{
background: #ebf0f8;
width: 100%;
}
.newsPage .content{
margin: 40px;
height: 841px;
background: #fff;
overflow: hidden;
cursor: default;
}
.newsPage .content .title{
padding: 30px 0 0 70px;
font-size: 20px;
color: #233b6e;
}
.newsPage .content .name{
margin-top: 36px;
margin-left: 70px;
font-size: 18px;
color: #333;
}
.newsPage .content .line{
display: inline-block;
width: 5px;
height: 20px;
vertical-align: middle;
margin-right: 7px;
background: #4877e6;
}
.other{
margin-left: 80px;
margin-top: 23px;
font-size: 16px;
color: #999;
}
.other>span{
margin-right: 40px;
}
.news{
margin-top: 32px;
padding: 0 70px 0 70px;
font-size: 16px;
color: #666;
height: 615px;
}
.news>>>.el-scrollbar__wrap {
overflow-x: hidden;
}
.newsPage{
background: #ebf0f8;
width: 100%;
}
.newsPage .content{
margin: 40px;
height: 841px;
background: #fff;
overflow: hidden;
cursor: default;
}
.newsPage .content .title{
padding: 30px 0 0 70px;
font-size: 20px;
color: #233b6e;
}
.newsPage .content .name{
margin-top: 36px;
margin-left: 70px;
font-size: 18px;
color: #333;
}
.newsPage .content .line{
display: inline-block;
width: 5px;
height: 20px;
vertical-align: middle;
margin-right: 7px;
background: #4877e6;
}
.other{
margin-left: 80px;
margin-top: 23px;
font-size: 16px;
color: #999;
}
.other>span{
margin-right: 40px;
}
.news{
margin-top: 32px;
padding: 0 70px 0 70px;
font-size: 16px;
color: #666;
height: 615px;
}
.news>>>.el-scrollbar__wrap {
overflow-x: hidden;
}
</style>
<template>
<div class="company">
<el-row>
<el-col :span="24">
<div class="content">
<p class="search">
<span class="searchVal">
<span>单位名称:</span>
<el-input v-model="searchName" size="medium" @change="search('search')" placeholder="请输入"></el-input>
</span>
<span class="searchVal searchInput">
<span>单位类别:</span>
<el-select v-model="classVal" @change="search('search')" placeholder="请选择" clearable>
<el-option
v-for="item in companyClass"
:label="typeCompany(item)"
:value="typeCompany(item)">
</el-option>
</el-select>
</span>
<span class="button searchBtn" @click="search('search')">搜索</span>
</p>
<div class="common-table">
<el-table
highlight-current-row
max-height="840"
:data="allData"
@row-click="details"
stripe
style="width: 100%;">
<el-table-column
prop="name"
label="单位名称"
align="center">
</el-table-column>
<el-table-column
:formatter="typeCompany"
prop="type"
label="单位类别"
align="center">
</el-table-column>
<el-table-column
prop="number"
label="联系方式"
align="center">
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
background
layout="prev, pager, next, jumper"
:total="totalLength">
</el-pagination>
</div>
<!-- 分页 -->
</div>
</el-col>
</el-row>
<!-- 新增 / 编辑 公用弹窗 -->
<el-dialog :visible.sync="openModel" class="model">
<span class="closeModel" @click="reset()"></span>
<component :is="components" :name="companyName" :list="companyList" @on-cancel="reset" @on-name="getName"></component>
</el-dialog>
</div>
</template>
<script>
import newCompany from './newCompany';
export default {
data () {
return {
totalLength: 0,
currentPage: 1, // 分页第一页
pageSize: 9, // 每页个数
searchName: '',
openModel: false, // 弹框开关
components: '', // 当前弹框内容
companyName: '',
companyList: '',
classVal: '',
companyClass: [
{type: '1'},
{type: '2'},
{type: '3'},
{type: '4'},
{type: '5'}
],
allData: [],
typeVal: { // 单位类别
'1': '集成商',
'2': '开发商',
'3': '监理商',
'4': '产品商',
'5': '其他'
}
}
},
components: {
newCompany
},
mounted() {
this.search()
},
methods: {
// 单位搜索
search(val) {
let message = {
address: '',
name: '',
number: '',
principal: '',
score: '',
status: '',
type: ''
};
let change = {
'集成商': 1,
'开发商': 2,
'监理商': 3,
'产品商': 4,
'其他': 5
}
if (val === 'search') { // 点击搜索按钮,不是点击分页跳转
this.currentPage = 1;
message.name = this.searchName;
message.type = change[this.classVal];
}
let data = {
page: this.currentPage,
pageSize: this.pageSize,
t: message
}
this.$server.postUnitSearchAccess(data).then(res => {
this.allData = res.data.data.rows;
this.totalLength = res.data.data.total;
}).catch(err => {
console.log(err);
})
},
// 点击分页
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
// 当前页数
handleCurrentChange(val) {
this.currentPage = val;
this.search();
},
// 关闭弹框
reset(val) {
this.openModel = false;
this.components = '';
this.companyName = '';
if (val) {
this.search();
}
},
// 获取单位名称
getName(val) {
if (val !== '') {
this.companyName = val;
}
},
// 单位类别转换
typeCompany (row) {
return this.typeVal[String(row.type)]
},
// 单位查看详情
details(val) {
this.$router.push({name: 'companyDetails',params:{'value': val, 'type': this.typeVal}});
}
}
}
</script>
<style scoped>
.company{
background: #ebf0f8;
width: 100%;
}
.company .content{
margin: 40px;
height: 841px;
background: #fff;
overflow: hidden;
}
.company .content .title{
padding: 30px 0 0 60px;
font-size: 20px;
color: #233b6e;
}
.company .content .search{
position: relative;
margin-top: 36px;
padding: 0px 70px 0px 70px;
display: flex;
}
.company .content .searchVal{
width: 280px;
display: flex;
font-size: 18px;
color: #4663a6;
}
.company .content .searchVal>span{
width: 140px;
display: inline-block;
line-height: 34px;
}
.company .content .change{
color: #4877e6;
cursor: pointer;
}
.company .content .change>img{
margin-right: 3px;
}
.company .content .button{
display: inline-block;
width: 100px;
height: 34px;
line-height: 34px;
text-align: center;
background: #4877e6;
cursor: pointer;
/*margin-left: 100px;*/
border-radius: 4px;
color: #fff;
font-size: 18px;
}
.company .content .button:hover{
background: rgba(72,119,230,.6);
}
.company .content .new{
position: absolute;
right: 70px;
}
.company .import{
right: 70px;
position: absolute;
}
.company .searchBtn{
margin-left: 30px;
}
.company .content .block{
text-align: right;
padding: 30px 70px 0 0;
}
.company .content>>>.el-table td{
border-bottom: 1px solid #d5e3ff;
}
/*.company .content>>>.btn-prev,.role .content>>>.btn-next{*/
/* background: #c5d5f7;*/
/* background-image: linear-gradient(to bottom, #c5d5f7,#7a95e6);*/
/* color: #fff;*/
/*}*/
/*.company .content>>>.btn-prev:disabled,.dynamicList .content>>>.btn-next:disabled{*/
/* color: #C0C4CC;*/
/*}*/
.company .content>>>.el-table__body tr.current-row > td{
background: #f5f8fd;
}
.company .content>>>.el-pagination.is-background .el-pager li{
background-image: linear-gradient(to bottom, #c5d5f7,#7a95e6);
color: #fff;
}
.company .content>>>.el-pagination.is-background .el-pager li:not(.disabled).active{
background-image: linear-gradient(to bottom, #7a9eeb,#274acf);
color: #fff;
}
.company .content .searchInput{
margin-left: 25px;
}
.company .content>>>.el-select{
width: 100%;
}
</style>
<template>
<div class="details">
<el-row>
<el-col :span="24">
<div class="content">
<el-row>
<el-col :span="9">
<p class="title"><span class="backImg" @click="backPath"></span><span class="title-text">单位信息</span></p>
<p class="search">
<span class="value">
<span>单位名称:</span>
<el-input v-model="data.name" size="medium" :disabled="true"></el-input>
</span>
</p>
<p class="search">
<span class="value">
<span>单位地址:</span>
<el-input v-model="data.address" size="medium" :disabled="true"></el-input>
</span>
</p>
<p class="search">
<span class="value">
<span>联系方式:</span>
<el-input v-model="data.number" size="medium" :disabled="true"></el-input>
</span>
</p>
</el-col>
<el-col :span="5">
<p class="search">
<span class="status">
<span>单位类别:</span>
<img src="../person/img/click.png" style="width: 21px;height: 21px;">
<span class="text">{{typeChange(data.type)}}</span>
</span>
</p>
<p class="search">
<span class="status">
<span>是否准入:</span>
<img src="../person/img/click.png" style="width: 21px;height: 21px;">
<span class="text">{{statusChange(data.status)}}</span>
</span>
</p>
</el-col>
<el-col :span="4">
<p class="search">
<span class="button">相关项目</span>
</p>
<p class="search">
<span class="button" @click="personPage">相关人员</span>
</p>
<p class="search">
<span class="button">相关评价</span>
</p>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: 'details',
data () {
return {
data: {},
type: {}
}
},
mounted() {
this.data = this.$route.params.value;
this.type = this.$route.params.type;
},
methods: {
// 单位类别转换
typeChange(val) {
return this.type[String(val)];
},
// 准入状态转换
statusChange(val) {
return val === 1 ? '是': '否'
},
// 相关人员跳转
personPage () {
console.log(this.data)
this.$router.push({name: 'person',params:{'value': this.data}});
},
// 页面返回
backPath () {
this.$router.push({name: 'company'});
}
}
}
</script>
<style scoped>
.details{
background: #ebf0f8;
width: 100%;
}
.details .content{
margin: 40px;
height: 841px;
background: #fff;
overflow: hidden;
}
.details .content .title{
padding: 30px 0 0 60px;
font-size: 20px;
color: #233b6e;
}
.details .content .search{
position: relative;
margin-top: 36px;
padding: 0px 0px 0px 70px;
height: 36px;
width: 100%;
}
.details .content .value{
width: 410px;
display: flex;
font-size: 18px;
color: #666;
}
.details .content .status>span{
vertical-align: bottom;
}
.details .content .value>span{
width: 150px;
display: inline-block;
line-height: 34px;
text-align: right;
}
.details .content .button{
display: inline-block;
width: 100px;
height: 34px;
line-height: 34px;
text-align: center;
background: #4877e6;
cursor: pointer;
margin-left: 55px;
border-radius: 4px;
color: #fff;
font-size: 18px;
}
.details .content .button:hover{
background: rgba(72,119,230,.6);
}
.details>>>.el-input--medium .el-input__inner{
font-size: 18px;
color: #333;
font-family: 'Regular';
}
.status{
display: flex;
font-size: 18px;
color: #666;
}
.details>>>.el-col-9{
width: 49.5%;
}
.details>>>.el-col-5{
margin-top: 57px;
}
.details>>>.el-col-4{
margin-top: 49px;
}
.button{
display: inline-block;
width: 100px;
height: 34px;
line-height: 34px;
text-align: center;
background: #4877e6;
cursor: pointer;
margin-left: 100px;
border-radius: 2px;
color: #fff;
font-size: 18px;
}
.details .content .text{
margin-left: 5px;
}
.details .content .backImg{
width: 25px;
height: 25px;
position: absolute;
cursor: pointer;
background-image: url("../../../assets/img/back.png");
}
.details .content .backImg:hover{
background-image: url("../../../assets/img/back-select.png");
}
.details .content .title-text{
margin-left: 29px;
vertical-align: middle;
}
</style>
<template>
<div class="newCompany">
<p class="dialog-header">
<span>新建单位</span>
</p>
<div class="company-content" style="text-align: center; margin-top: 4px;">
<p class="new">
<span class="addVal">
<span>单位名称:</span>
<el-input v-model="name" size="medium" placeholder="请输入"></el-input>
</span>
<span class="addVal">
<span>单位类别:</span>
<el-radio-group v-model="type" size="small" style="padding-top: 11px;width: 100%;text-align: left">
<el-radio label="1">集成商 </el-radio>
<el-radio label="2">开发商</el-radio>
<el-radio label="3">监理商</el-radio>
<el-radio label="4">产品商 </el-radio>
<el-radio label="5">其他</el-radio>
</el-radio-group>
</span>
<span class="addVal" style="margin-top: 4px">
<span>是否准入:</span>
<el-radio-group v-model="status" size="small" style="padding-top: 11px; width: 100%;text-align: left">
<el-radio label="1"></el-radio>
<el-radio label="2"></el-radio>
</el-radio-group>
</span>
<span class="addVal">
<span>单位地址:</span>
<el-input v-model="address" size="medium" placeholder="请输入"></el-input>
</span>
<span class="addVal">
<span>负责人:</span>
<el-input v-model="principal" size="medium" placeholder="请输入"></el-input>
</span>
<span class="addVal">
<span>联系方式:</span>
<el-input v-model="number" size="medium" placeholder="请输入"></el-input>
</span>
</p>
</div>
<p class="line"></p>
<p class="buttonClick">
<span class="buttonCancl" @click="cancel">取消</span>
<span class="buttonSave" @click="save">确定</span>
</p>
</div>
</template>
<script>
export default {
data () {
return {
type: '',
name: '',
status: '',
address: '',
number: '',
principal: ''
}
},
created() {
},
mounted(){
},
methods: {
cancel() {
this.$emit('on-cancel')
},
save() {
if (!this.name) {
this.$message.error('单位名称不可为空!');
return;
};
let data = {
address: this.address,
name: this.name,
number: this.number,
principal: this.principal,
score: '',
status: parseInt(this.status),
type: parseInt(this.type)
};
this.$server.postUnitAdd(data).then(res => {
if (res.data.code === 200) {
this.$message.success('单位新建成功!');
this.$emit('on-cancel', true)
} else {
this.$message.error(res.data.msg);
}
}).catch(err => {
console.log(err);
})
}
},
components: {
},
watch: {
}
}
</script>
<style scoped>
.newCompany .new{
display: inline-block;
}
.newCompany .new{
right: 220px;
}
.newCompany .addVal{
width: 390px;
display: flex;
font-size: 18px;
color: #666;
text-align: center;
margin-top: 15px;
}
.newCompany .addVal>span{
width: 140px;
display: inline-block;
line-height: 34px;
}
.newCompany .line{
margin: 25px 30px 0 30px;
height: 1px;
background: rgba(72,119,230,0.2);
}
.newCompany .buttonClick{
display: flex;
justify-content: space-evenly;
margin-top: 8px;
}
.newCompany .company-content>>>.el-radio{
margin-right: 30px;
margin-bottom: 11px;
width: 49px;
}
.newCompany .company-content>>>.el-input__inner{
width: 290px;
}
</style>
<template>
<div class="newCompany">
<p class="dialog-header">
<span>{{productName}}</span>
</p>
<div class="company-content" style="text-align: center; margin-top: 8px;">
<p class="new">
<span class="addVal">
<span>产品名称:</span>
<el-input v-model="name" size="medium" :disabled="!authority" placeholder="请输入"></el-input>
</span>
<span class="addVal">
<span>产品分类:</span>
<el-radio-group v-model="type" :disabled="!authority" size="small" style="padding-top: 11px;width: 100%;text-align: left">
<el-radio label="1">软件 </el-radio>
<el-radio label="2">硬件</el-radio>
</el-radio-group>
</span>
<span class="addVal">
<span>产品类型:</span>
<el-radio-group v-model="form" :disabled="!authority" size="small" style="padding-top: 11px; width: 100%;text-align: left">
<el-radio label="1" style="margin-bottom: 11px;">服务器</el-radio>
<el-radio label="2" style="margin-bottom: 11px;">CPU</el-radio>
<el-radio label="3" style="margin-bottom: 11px;">操作系统</el-radio>
<el-radio label="4">数据库</el-radio>
<el-radio label="5">中间件</el-radio>
<el-radio label="6">其他</el-radio>
</el-radio-group>
</span>
<span class="addVal">
<span>产品型号:</span>
<el-input v-model="model" :disabled="!authority" size="medium" placeholder="请输入"></el-input>
</span>
<span class="addVal">
<span>厂商:</span>
<el-input v-model="producer" :disabled="!authority" size="medium" placeholder="请输入"></el-input>
</span>
<span class="addVal">
<span>是否准入:</span>
<el-radio-group v-model="status" :disabled="!authority" size="small" style="padding-top: 11px; width: 100%;text-align: left">
<el-radio label="1"></el-radio>
<el-radio label="-1"></el-radio>
</el-radio-group>
</span>
</p>
</div>
<p class="line"></p>
<p class="buttonClick">
<span class="buttonCancl" v-if="authority" @click="cancel">取消</span>
<span class="buttonSave" v-if="authority" @click="save">确定</span>
</p>
</div>
</template>
<script>
export default {
props: ['productName','list'],
data () {
return {
type: '',
name: '',
status: '',
model: '',
number: '',
form: '',
productList: [],
text: '',
producer: '',
authority: true,
id: ''
}
},
created() {
},
mounted(){
if (this.$store.getters.getSidebar.name === '市级名录') {
this.authority = false;
}
if (this.productName === '产品信息') {
this.productList = this.list;
this.name = this.productList.name;
this.status = String(this.productList.status);
this.type = String(this.productList.type);
this.form = String(this.productList.form);
this.model = this.productList.model;
this.producer = this.productList.producer;
this.id = this.productList.id;
this.text = '产品信息修改'
} else {
this.text = '产品新增'
}
},
methods: {
cancel() {
this.$emit('on-cancel')
},
save() {
if (!this.name) {
this.$message.error('产品名称不可为空!');
return;
};
let data = {
form: parseInt(this.form),
model: this.model,
name: this.name,
producer: this.producer,
status: parseInt(this.status),
techId: '',
id: this.id,
type: parseInt(this.type)
};
if ( this.text === '产品信息修改') {
this.$server.putProduceUpdate(data).then(res => {
if (res.data.code === 200) {
this.$message.success(this.text + '成功!');
this.$emit('on-cancel', true)
} else {
this.$message.error(this.text + '失败!');
}
}).catch(err => {
console.log(err);
})
} else {
this.$server.postProduceAdd(data).then(res => {
if (res.data.code === 200) {
this.$message.success(this.text + '成功!');
this.$emit('on-cancel', true)
} else {
this.$message.error(this.text + '失败!');
}
}).catch(err => {
console.log(err);
})
}
}
},
components: {
},
watch: {
}
}
</script>
<style scoped>
.newCompany .new{
display: inline-block;
}
.newCompany .new{
right: 220px;
}
.newCompany .addVal{
width: 390px;
display: flex;
font-size: 18px;
color: #666;
text-align: center;
margin-top: 15px;
}
.newCompany .addVal>span{
width: 140px;
display: inline-block;
line-height: 34px;
}
.newCompany .line{
margin: 20px 30px 0 30px;
height: 1px;
background: rgba(72,119,230,0.2);
}
.newCompany .buttonClick{
display: flex;
justify-content: space-evenly;
margin-top: 15px;
}
.newCompany .company-content>>>.el-radio{
margin-right: 22px;
width: 50px;
}
.newCompany .company-content>>>.el-input__inner{
width: 290px;
}
.newCompany .company-content>>>.el-radio__input.is-checked + .el-radio__label{
color: #409eff;
}
.newCompany .company-content>>>.el-radio__input.is-disabled.is-checked .el-radio__inner{
border-color: #409EFF;
background: #409EFF;
}
.newCompany .company-content>>>.el-radio__input.is-disabled.is-checked .el-radio__inner::after{
background-color: #ffffff;
}
</style>
<template>
<div class="product">
<el-row>
<el-col :span="24">
<div class="content">
<p class="search">
<span class="searchVal">
<span>产品名称:</span>
<el-input v-model="name" size="medium" placeholder="请输入" @change="search('search')"></el-input>
</span>
<span class="searchVal searchInput">
<span>产品类型:</span>
<el-select v-model="formValue" @change="search('search')" placeholder="请选择" clearable>
<el-option
v-for="item in formList"
:key="item.id"
:label="formChange(item)"
:value="formChange(item)">
</el-option>
</el-select>
</span>
<span class="searchVal" style="margin-left: 31px">
<span>技术路线:</span>
<el-select v-model="techVal" @change="search('search')" placeholder="请选择" clearable>
<el-option
v-for="item in techList"
:key="item.id"
:label="item.name"
:value="item.name">
</el-option>
</el-select>
</span>
<span class="button searchBtn" @click="search('search')">搜索</span>
</p>
<div class="common-table">
<el-table
highlight-current-row
max-height="840"
:data="allData"
@row-click="details"
stripe
style="width: 100%;">
<el-table-column
prop="name"
label="产品名称"
align="center">
</el-table-column>
<el-table-column
:formatter="formChange"
prop="form"
label="产品类型"
align="center">
</el-table-column>>
<el-table-column
prop="techId"
label="技术路线"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.tech !== null">{{scope.row.tech.name}}</span>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
background
layout="prev, pager, next, jumper"
:total="totalLength">
</el-pagination>
</div>
<!-- 分页 -->
</div>
</el-col>
</el-row>
<!-- 新增 / 编辑 公用弹窗 -->
<el-dialog :visible.sync="openModel" class="model">
<span class="closeModel" @click="reset()"></span>
<component :is="components" :productName="productName" :list="productList" :techList="techList" @on-cancel="reset" @on-name="getName"></component>
</el-dialog>
</div>
</template>
<script>
import newProduct from './newProduct';
import technology from './technology';
export default {
name: 'product',
data() {
return {
totalLength: 0,
currentPage: 1, // 分页第一页
pageSize: 9, // 每页个数
formValue: '',
name: '',
formList: [{form: 1},{form: 2},{form: 3},{form: 4},{form: 5},{form: 6}],
formVal: {
'1': '服务器',
'2': 'CPU',
'3': '操作系统',
'4': '数据库',
'5': '中间件',
'6': '其他'
},
techList: [],
techVal: '',
openModel: false, // 弹框开关
components: '', // 当前弹框内容
productName: '',
productList: '',
allData: []
}
},
components: {
newProduct,
technology
},
mounted() {
this.init();
this.search();
},
methods: {
init() {
// this.$server.getProduceFindAccess().then(res => {
// this.allData = res.data.data
// })
this.$server.getTechFindAll().then(res => { // 请求技术路线
this.techList = res.data.data
}).catch(err => {
console.log(err);
})
},
// 产品分类转换
formChange(row) {
return this.formVal[row.form]
},
// 搜索
search(val) {
let message = {
form: '',
model: '',
name: '',
producer: '',
status: '',
techId: '',
type: ''
};
let change = {
'服务器': 1,
'CPU': 2,
'操作系统': 3,
'数据库': 4,
'中间件': 5,
'其他': 6
}
if (val === 'search') {
this.currentPage = 1;
message.name = this.name;
this.techList.map(item => {
if (item.name === this.techVal) {
message.techId = item.id
}
})
message.form = change[this.formValue]
}
let data = {
page: this.currentPage,
pageSize: this.pageSize,
t: message
};
this.$server.postProduceSearchAccess(data).then(res => {
if (res.data.code === 200) {
this.allData = res.data.data.rows;
this.totalLength = res.data.data.total;
} else {
this.$message.error(res.data.msg);
}
}).catch(err => {
console.log(err);
})
},
// 点击分页
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
// 当前页数
handleCurrentChange(val) {
this.currentPage = val;
this.search()
},
// 关闭弹框
reset(val) {
this.openModel = false;
this.components = '';
this.productName = '';
if (val) {
this.search()
}
},
// 获取单位名称
getName(val) {
if (val !== '') {
this.productName = val;
}
},
// 产品详情
details (row) {
console.log(row)
this.openModel = true;
this.components = 'newProduct';
this.productName = '产品信息';
this.productList = row;
}
}
}
</script>
<style scoped>
.product{
background: #ebf0f8;
width: 100%;
}
.product .content{
margin: 40px;
height: 841px;
background: #fff;
overflow: hidden;
}
.product .content .title{
padding: 30px 0 0 60px;
font-size: 20px;
color: #233b6e;
}
.product .content .search{
position: relative;
margin-top: 36px;
padding: 0px 70px 0px 70px;
display: flex;
}
.product .content .searchVal{
width: 280px;
display: flex;
font-size: 18px;
color: #4663a6;
}
.product .content .searchVal>span{
width: 140px;
display: inline-block;
line-height: 34px;
}
.product .content .change{
color: #4877e6;
cursor: pointer;
}
.product .content .change>img{
margin-right: 3px;
}
.product .content .button{
display: inline-block;
width: 100px;
height: 34px;
line-height: 34px;
text-align: center;
background: #4877e6;
cursor: pointer;
margin-left: 20px;
border-radius: 4px;
color: #fff;
font-size: 18px;
}
.product .content .button:hover{
background: rgba(72,119,230,.6);
}
.product .content .import{
position: absolute;
right: 70px;
}
/*.product .add{*/
/* position: absolute;*/
/* right: 180px;*/
/*}*/
.product .content .block{
text-align: right;
padding: 30px 70px 0 0;
}
.product .content>>>.el-table td{
border-bottom: 1px solid #d5e3ff;
}
.product .content>>>.el-table__body tr.current-row > td{
background: #f5f8fd;
}
.product>>>.el-upload-list{
display: none;
}
.newCompany .new{
display: inline-block;
}
.newCompany .new{
right: 220px;
}
.newCompany .addVal{
width: 390px;
display: flex;
font-size: 18px;
color: #666;
text-align: center;
margin-top: 20px;
}
.newCompany .addVal>span{
width: 140px;
display: inline-block;
line-height: 34px;
}
.newCompany .line{
margin: 30px 30px 0 30px;
height: 1px;
background: rgba(72,119,230,0.2);
}
.newCompany .buttonClick{
display: flex;
justify-content: space-evenly;
margin-top: 20px;
}
.product .company-content>>>.el-radio{
margin-right: 22px;
width: 50px;
}
.searchInput{
margin-left: 25px;
}
.product .content>>>.el-select{
width: 100%;
}
</style>
<template>
<div class="newCompany">
<p class="dialog-header">
<span>技术路线信息</span>
</p>
<div class="company-content" style="text-align: center; margin-top: 40px;">
<p style="padding-top: 30px;" v-if="list.techId === null">{{text}}</p>
<p class="new" v-if="list.techId != null">
<span class="addVal">
<span>路线名称:</span>
<el-input v-model="name" size="medium" disabled></el-input>
</span>
<span class="addVal">
<span>产品组合:</span>
<span v-for="item in techNameList" style="color: #666;border: 1px solid rgba(8,104,157,.3); background-color: #f5f7fa; margin-left: 8px">{{formChange(item.form)}}</span>
</span>
</p>
</div>
<p class="line"></p>
<p class="buttonClick">
<span class="buttonSave" @click="cancel">确定</span>
</p>
</div>
</template>
<script>
export default {
props: ['techList','list'],
data () {
return {
type: '',
name: '',
formList: {
1: '服务器',
2: 'CPU',
3: '操作系统',
4: '数据库',
5: '中间件',
6: '其他',
},
text: '',
techNameList: []
}
},
created() {
},
mounted(){
console.log(this.list.techId);
this.list.techId = 4;
if (this.list.techId === null) {
this.text = '该产品没有添加到技术路线'
} else {
this.techList.map(item => {
if (item.id === this.list.techId) {
this.name = item.name
}
})
this.$server.getProduceFind(this.list).then(res => {
console.log(res)
this.techNameList = res.data.data
}).catch(err => {
console.log(err);
})
}
},
methods: {
cancel() {
this.$emit('on-cancel')
},
formChange(val) {
console.log(this.formList[val])
return this.formList[val]
}
},
components: {
},
watch: {
}
}
</script>
<style scoped>
.newCompany .new{
display: inline-block;
}
.newCompany .new{
right: 220px;
}
.newCompany .addVal{
width: 390px;
display: flex;
font-size: 18px;
color: #666;
text-align: center;
margin-top: 50px;
}
.newCompany .addVal>span{
width: 140px;
display: inline-block;
line-height: 34px;
}
.newCompany>>>.el-input__inner{
border: 1px solid rgba(8,104,157,.3);
border-radius: 2px;
font-size: 18px;
height: 34px;
line-height: 34px;
width: 180px;
}
.newCompany .line{
margin: 60px 30px 0 30px;
height: 1px;
background: rgba(72,119,230,0.2);
}
.newCompany .buttonClick{
display: flex;
justify-content: space-evenly;
margin-top: 40px;
}
.newCompany .company-content>>>.el-radio{
margin-right: 22px;
width: 50px;
}
.newCompany .company-content>>>.el-input__inner{
width: 290px;
}
</style>
<template>
<div class="add-role">
<p class="dialog-header">
<span>代码上传</span>
</p>
<div class="company-content" style="text-align: center; margin-top: 14px;">
<p class="new">
<el-form :model="form">
<el-form-item label="上传类型" :label-width="formLabelWidth">
<el-select v-model="form.region" placeholder="请选择">
<el-option label="压缩包" value="zip"></el-option>
<el-option label="git地址" value="git"></el-option>
</el-select>
</el-form-item>
<div class="upload-text" v-show="form.region == 'zip'"><img src="../img/upload-text.png" alt="" style="margin-right:5px;margin-botton:5px; cursor: pointer;">上传文件<input type="file" name="file" id="fileUpload" class="up-input" ref="file" @change="after"> </div>
<div class="box">{{ziptext}}</div>
<el-form-item label="请输入git账号" :label-width="formLabelWidth" v-show="form.region == 'git'">
<el-input v-model="form.username" ></el-input>
</el-form-item>
<el-form-item label="请输入git密码" :label-width="formLabelWidth" v-show="form.region == 'git'">
<el-input type="password" v-model="form.password" ></el-input>
</el-form-item>
<el-form-item label="请输入git地址" :label-width="formLabelWidth" v-show="form.region == 'git'">
<el-input type="textarea" v-model="form.desc" ></el-input>
</el-form-item>
</el-form>
</p>
</div>
<p class="line"></p>
<p class="buttonClick">
<!-- <span class="buttonCancl" @click="cancel">取消</span> -->
<span class="buttonSave" @click="goAdd" :class="{'buttonCancl my':ziptext==''?form.desc == ''?true:false:false}">确定</span>
</p>
</div>
</template>
<script>
export default {
name: 'addRole',
props: ['detailData', 'modalName'],
data () {
return {
tableDataAdd: [],
content: '',
target: '',
suffix: '',
technologyId: '',
oldRule: {},
form: {
region:'zip',
desc:''
},
ziptext:'',
formLabelWidth: '120px'
}
},
mounted() {
},
methods: {
testLoading(){
this.$parent.myLoading()
},
add(){
this.form = { region:'zip', desc:''}
// this.dialogFormVisible = true
},
close(){
// this.dialogFormVisible = false
this.form={}
},
after(file){
// var test = document.getElementById('fileUpload').files[0].name
this.ziptext = this.$refs.file.files[0].name
},
goAdd(){
if(this.form.region == 'zip' && this.ziptext != ''){
// this.$parent.reset()
this.$emit('reset')
var fd = new FormData()
fd.append('file',this.$refs.file.files[0])
this.$emit('myLoading')
// this.$parent.myLoading()
this.$server.upZip(fd).then(res =>{
console.log(res)
this.$message({
message: '上传代码成功',
type: 'success'
});
this.$emit('addZip','zip',res.data.path)
// this.$parent.addZip('zip',res.data.path)
this.form = { region:'zip', desc:''}
this.ziptext = ''
})
}else if (this.form.region == 'git' && this.form.desc != '' && this.form.username != '' && this.form.password != ''){
// this.$parent.reset()
// this.$parent.myLoading()
var obj = {
gitAddress:this.form.desc,
username:this.form.username,
password:this.form.password,
}
var url = this.form.desc
console.log(obj)
this.$emit('reset')
this.$emit('myLoading')
this.$server.upGit(obj).then(res =>{
console.log(res)
this.$message({
message: '上传代码成功',
type: 'success'
});
console.log("上传的git",url)
// this.$parent.addZip('git',res.data,url)
this.$emit('addZip','git',res.data,url)
this.form = { region:'zip', desc:''}
})
}
}
}}
</script>
<style scoped>
.buttonCancl.my{
cursor:default;
}
.upload-text{
position: relative;
cursor: pointer;
}
.up-input{
cursor: pointer;
opacity: 0;
position: absolute;
left: 30%;
top: 0;
display: block;
}
.add-role .new{
display: inline-block;
}
.add-role .new{
right: 220px;
}
.add-role .addVal{
/*width: 390px;*/
width: 710px;
display: flex;
font-size: 18px;
color: #666;
text-align: center;
margin-top: 40px;
}
.add-role .addVal>span{
width: 160px;
display: inline-block;
line-height: 34px;
text-align: right;
}
.add-role .line{
margin: 40px 30px 0 30px;
height: 1px;
background: rgba(72,119,230,0.2);
}
.add-role .buttonClick{
display: flex;
justify-content: space-evenly;
margin-top: 30px;
}
.add-role .company-content{
height: 240px;
}
.add-role .company-content>>>.el-radio{
margin-right: 30px;
margin-bottom: 11px;
width: 49px;
}
.add-role .company-content>>>.el-input__inner, .add-role .company-content>>>.el-input{
width: 220px;
}
</style>
\ No newline at end of file
<!-- 页面布局 -->
<template>
<div class="upload-add">
<el-dialog title="上传代码" :visible.sync="dialogFormVisible" @close="close" :close-on-click-modal='false'>
<img src="../img/upload-line.png" alt="" style="width:95%;">
<el-form :model="form">
<el-form-item label="上传类型" :label-width="formLabelWidth">
<el-select v-model="form.region" placeholder="请选择">
<el-option label="压缩包" value="zip"></el-option>
<el-option label="git地址" value="git"></el-option>
</el-select>
</el-form-item>
<div class="upload-text" v-show="form.region == 'zip'"><img src="../img/upload-text.png" alt="" style="margin-right:5px;margin-botton:5px;">上传文件<input type="file" name="file" id="fileUpload" class="up-input" ref="file" @change="after"> </div>
<div class="box">{{ziptext}}</div>
<el-form-item label="请输入git账号" :label-width="formLabelWidth" v-show="form.region == 'git'">
<el-input v-model="form.username" ></el-input>
</el-form-item>
<el-form-item label="请输入git密码" :label-width="formLabelWidth" v-show="form.region == 'git'">
<el-input type="password" v-model="form.password" ></el-input>
</el-form-item>
<el-form-item label="请输入git地址" :label-width="formLabelWidth" v-show="form.region == 'git'">
<el-input type="textarea" v-model="form.desc" ></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" >
<div >
<el-button type="primary" @click="goAdd" :class="{'hui':ziptext==''?form.desc == ''?true:false:false}" >确 定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
export default {
name: "uploadAdd",
//import引入的组件需要注入到对象中才能使用
components: {},
data() {
//这里存放数据
return {
dialogFormVisible: false,
form: {
region:'zip',
desc:''
},
ziptext:'',
formLabelWidth: '120px'
};
},
//监听属性 类似于data概念
computed: {},
//监控data中的数据变化
watch: {},
//方法集合
methods: {
testLoading(){
this.$parent.myLoading()
},
add(){
this.form = { region:'zip', desc:''}
this.dialogFormVisible = true
},
close(){
this.dialogFormVisible = false
this.form={}
},
after(file){
// var test = document.getElementById('fileUpload').files[0].name
this.ziptext = this.$refs.file.files[0].name
},
goAdd(){
if(this.form.region == 'zip' && this.ziptext != ''){
this.dialogFormVisible = false
var fd = new FormData()
fd.append('file',this.$refs.file.files[0])
this.$parent.myLoading()
this.$server.upZip(fd).then(res =>{
console.log(res)
this.$message({
message: '上传代码成功',
type: 'success'
});
this.$parent.addZip('zip',res.data.path)
this.form = { region:'zip', desc:''}
this.ziptext = ''
})
}else if (this.form.region == 'git' && this.form.desc != '' && this.form.username != '' && this.form.password != ''){
this.dialogFormVisible = false
this.$parent.myLoading()
var obj = {
gitAddress:this.form.desc,
username:this.form.username,
password:this.form.password,
}
var url = this.form.desc
this.$server.upGit(obj).then(res =>{
console.log(res)
this.$message({
message: '上传代码成功',
type: 'success'
});
console.log("上传的git",url)
this.$parent.addZip('git',res.data,url)
this.form = { region:'zip', desc:''}
})
}
}
},
//生命周期 - 创建完成(可以访问当前this实例)
created() {
},
//生命周期 - 挂载完成(可以访问DOM元素)
mounted() {},
beforeCreate() {}, //生命周期 - 创建之前
beforeMount() {}, //生命周期 - 挂载之前
beforeUpdate() {}, //生命周期 - 更新之前
updated() {}, //生命周期 - 更新之后
beforeDestroy() {}, //生命周期 - 销毁之前
destroyed() {}, //生命周期 - 销毁完成
activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
};
</script>
<style scoped>
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论