|
@@ -54,7 +54,7 @@
|
|
|
|
|
|
<!-- 选择分类开始 -->
|
|
|
<el-dialog
|
|
|
- title="提示"
|
|
|
+ title="选择分类"
|
|
|
:visible.sync="selectType"
|
|
|
width="600px"
|
|
|
class="pageSubmitData"
|
|
@@ -63,13 +63,23 @@
|
|
|
:show-close="false"
|
|
|
>
|
|
|
<!-- <div class="addDialogLogo">LOGO</div> -->
|
|
|
- <div class="" style="display: flex;align-items: center;justify-content: center;margin-top: 10px;">
|
|
|
- <div style="margin-right: 10px;">选择分类</div>
|
|
|
- <el-cascader v-model="pageType" :options="projectApplicationApply1.sortOptions" clearable></el-cascader>
|
|
|
+ <div class="TypeBox">
|
|
|
+ <div class="selectType" v-for="item in projectApplicationApply1.sortOptions">
|
|
|
+ <el-tooltip class="item" v-for="item2 in item['children']" effect="dark" :content="item.label+'('+item2.label+')'" placement="top">
|
|
|
+ <div class="TypeCard" @click="changeType(item.value,item2.value)">
|
|
|
+ <img src="@/assets/img/file.png" alt="">
|
|
|
+ <span>{{item.label}}</span>
|
|
|
+ <span>({{ item2.label }})</span>
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <!-- <div style="margin-right: 10px;">选择分类</div> -->
|
|
|
+ <!-- <el-cascader v-model="pageType" :options="projectApplicationApply1.sortOptions" clearable></el-cascader> -->
|
|
|
</div>
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="selectTypeButton" class="AllDialogBtn">确定</el-button>
|
|
|
+ <!-- <el-button type="primary" @click="selectTypeButton" class="AllDialogBtn">确定</el-button> -->
|
|
|
<el-button @click="$router.back()" class="AllDialogBtn">取消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
@@ -153,30 +163,7 @@
|
|
|
projectApplyPerson:'', //项目申请人
|
|
|
},
|
|
|
departmentOptions: [], //部门下拉框
|
|
|
- sortOptions: [ //选择分类下拉框数据
|
|
|
- {
|
|
|
- value:"",
|
|
|
- label: '',
|
|
|
- children: [{
|
|
|
- value: 0,
|
|
|
- label: '创意组',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 1,
|
|
|
- label: '初创组',
|
|
|
- }
|
|
|
- ]},
|
|
|
- {
|
|
|
- value:"",
|
|
|
- label: '',
|
|
|
- children: [{
|
|
|
- value: 0,
|
|
|
- label: '已建设',
|
|
|
- }, {
|
|
|
- value: 1,
|
|
|
- label: '待建设',
|
|
|
- }]
|
|
|
- }],
|
|
|
+ sortOptions: []//分类下拉框,
|
|
|
|
|
|
},
|
|
|
|
|
@@ -264,7 +251,7 @@
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api+'/SelectAllDepartment',param)
|
|
|
.then(res=>{
|
|
|
- // console.log(res.data[0]);
|
|
|
+ console.log(res.data[0]);
|
|
|
let p=res.data[0]
|
|
|
let a=this.projectApplicationApply1
|
|
|
a.options=p
|
|
@@ -275,25 +262,44 @@
|
|
|
})
|
|
|
},
|
|
|
getProjectTypeData(){ //获取项目立项申请基础信息页面分类数据
|
|
|
+ let TypeList = [];
|
|
|
let param={
|
|
|
uid:this.$store.state.userInfo.userid
|
|
|
}
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api+'/SelectAllType',param)
|
|
|
.then(res=>{
|
|
|
- // console.log(res.data[0]);
|
|
|
- let p=res.data[0]
|
|
|
- let a=this.projectApplicationApply1
|
|
|
- a.sortOptions[0].value=p[0].id
|
|
|
- a.sortOptions[0].label=p[0].name
|
|
|
- a.sortOptions[1].value=p[1].id
|
|
|
- a.sortOptions[1].label=p[1].name
|
|
|
+ //获取主分类
|
|
|
+ let master = res.data[0].filter(item=>item['pid']=='');
|
|
|
+ //获取子分类
|
|
|
+ let minion = res.data[0].filter(item=>item['pid']!='');
|
|
|
+ master.forEach(item=>{
|
|
|
+ let type = {
|
|
|
+ value:item['id'],
|
|
|
+ label:item['name'],
|
|
|
+ children:[],
|
|
|
+ }
|
|
|
+ minion.forEach(min=>{
|
|
|
+ if(min['pid']==item['id']){
|
|
|
+ let minType = {
|
|
|
+ value:min['id'],
|
|
|
+ label:min['name']
|
|
|
+ }
|
|
|
+ type['children'].push(minType);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ TypeList.push(type);
|
|
|
+ })
|
|
|
+ this.projectApplicationApply1.sortOptions = TypeList;
|
|
|
},err=>{
|
|
|
console.log(err);
|
|
|
})
|
|
|
},
|
|
|
//立项基础信息页面删除功能在它自己页面人员信息
|
|
|
-
|
|
|
+ changeType(type1,type2){//修改分类信息
|
|
|
+ this.pageType = [type1,type2];
|
|
|
+ this.selectType = false;
|
|
|
+ },
|
|
|
|
|
|
init(){
|
|
|
//重置
|
|
@@ -563,86 +569,6 @@
|
|
|
}
|
|
|
// 顶部导航区结束
|
|
|
|
|
|
- //提交对话框开始 选择分类
|
|
|
- // .projectApplicationfundAddDialog{
|
|
|
-
|
|
|
- // .el-dialog__header{
|
|
|
- // display: flex;
|
|
|
- // justify-content: center;
|
|
|
- // }
|
|
|
- // .el-dialog{
|
|
|
- // border-radius: 5px;
|
|
|
- // overflow: hidden;
|
|
|
-
|
|
|
- // top: 10%;
|
|
|
- // }
|
|
|
-
|
|
|
- // .deleteContent{
|
|
|
- // width: 100%;
|
|
|
- // text-align: center;
|
|
|
- // font-size: 22px;
|
|
|
- // color: #000;
|
|
|
- // }
|
|
|
- // .addDialogLogo{
|
|
|
- // width: 60px;
|
|
|
- // height: 30px;
|
|
|
- // border-radius: 5px;
|
|
|
- // display: flex;
|
|
|
- // justify-content: center;
|
|
|
- // line-height: 30px;
|
|
|
- // background: #f2f2f2;
|
|
|
- // position: absolute;
|
|
|
- // left: 20px; top: 15px;
|
|
|
- // }
|
|
|
- // .el-dialog__header{
|
|
|
- // background: #32455b;
|
|
|
- // }
|
|
|
- // .el-dialog__title{
|
|
|
- // color:#fff;
|
|
|
- // display: flex;
|
|
|
- // justify-content: center;
|
|
|
- // font-size: 18px;
|
|
|
- // position: relative;
|
|
|
- // top: -2px;
|
|
|
- // }
|
|
|
- // .addDialogMid{
|
|
|
- // box-sizing: border-box;
|
|
|
- // padding:0 60px 0 10px;
|
|
|
- // .addDialogTit{
|
|
|
- // display: flex;
|
|
|
- // span{
|
|
|
- // width: 80px;
|
|
|
- // line-height: 40px;
|
|
|
- // text-align: left;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // .addDialogTit1{
|
|
|
- // display: flex;
|
|
|
- // justify-content: space-between;
|
|
|
- // margin-bottom: 15px;
|
|
|
- // }
|
|
|
- // .addDialogTit2{
|
|
|
- // margin-top: 10px;
|
|
|
- // font-size: 18px;
|
|
|
- // color: #000;
|
|
|
- // text-indent: 2em;
|
|
|
- // }
|
|
|
- // .addDialogCon{
|
|
|
- // margin-top: 20px;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // .dialog-footer{
|
|
|
- // display: flex;
|
|
|
- // justify-content: center;
|
|
|
- // // .btn5{
|
|
|
- // // height: 40px;
|
|
|
- // // font-size: 16px;
|
|
|
- // // background: #0e72e6;
|
|
|
- // // width: 200px;
|
|
|
- // // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- //提交对话框结束
|
|
|
|
|
|
|
|
|
.right{
|
|
@@ -702,6 +628,43 @@
|
|
|
}
|
|
|
}
|
|
|
// 左边栏结束
|
|
|
+ .TypeBox{
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ .selectType{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .TypeCard{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 90px;
|
|
|
+ padding: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ span{
|
|
|
+ width: 100%;
|
|
|
+ display: block;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ &:nth-child(3){
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ img{
|
|
|
+ width: 50px;
|
|
|
+ height: 50px;
|
|
|
+ }
|
|
|
+ &:hover{
|
|
|
+ background-color: #d4dde1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|